Revisión actual |
Tu texto |
Línea 1: |
Línea 1: |
| Página para jugar un poco con la Wiki o probar como quedaria el codigo en un articulo de verdad. Cada uno puede hacer lo que quiera. | | Página para jugar un poco con la Wiki o probar como quedaria el codigo en un articulo de verdad. Cada uno puede hacer lo que quiera. |
|
| |
| == Syntax Highlighting ==
| |
| <source lang="php">
| |
| <?php
| |
| $v = "string"; // sample initialization
| |
| ?>
| |
| html text
| |
| <?
| |
| echo $v; // end of php code
| |
| ?>
| |
| </source>
| |
|
| |
| <source lang="java" line="1">
| |
| /* This is a regular multi-
| |
| * line comment. */
| |
| import java.io.*;
| |
|
| |
| /**
| |
| * This is a javadoc comment
| |
| * @see java.lang.String
| |
| */
| |
| public class Main extends Foo
| |
| {
| |
| @Test
| |
| public static void main(final String[] args)
| |
| {
| |
| // This is a one-line comment
| |
| System.out.println("Hello, World!");
| |
| int n = 1 + 2;
| |
| System.out.println("One plus two is: " + n);
| |
|
| |
| Foo foo = new Foo("foo");
| |
| List<Foo> list = new ArrayList<Foo>();
| |
| list.add(foo);
| |
| }
| |
| }
| |
| </source>
| |
|
| |
|
| |
|
| |
| <source lang="python">
| |
| import time
| |
| import threading
| |
| import Network
| |
| from CliqueIPC.RunnerThread import RunnerThread
| |
|
| |
| # Dispatcher
| |
| class Dispatcher(RunnerThread):
| |
| """
| |
| """
| |
| def __init__(self):
| |
| RunnerThread.__init__(self, "Dispatcher")
| |
| self.__connection = None
| |
| self.__connection_lock = threading.Lock()
| |
|
| |
| def Iteration(self):
| |
| if self.__connection_lock.acquire() and self.__connection:
| |
| Network.Protocol.RequestCommandHeader(self.__connection)
| |
| cl = self.__connection.GetEscaped().split()
| |
|
| |
| print "Dispatching:", cl
| |
| mod = __import__(cl[0])
| |
|
| |
| # server-side process file
| |
| mod.ss_process_file(self.__connection, cl[1], cl[2], cl[3])
| |
|
| |
| # release module
| |
| del mod
| |
|
| |
| self.__connection.Close()
| |
| self.__connection = None
| |
| self.__connection_lock.release()
| |
| else:
| |
| # wait
| |
| self.__connection_lock.release()
| |
| time.sleep(0.01)
| |
|
| |
| def IsConnected(self):
| |
| self.__connection_lock.acquire()
| |
| localst = (self.__connection != None)
| |
| self.__connection_lock.release()
| |
| return localst
| |
|
| |
| def ConnectTo(self, con):
| |
| self.__connection_lock.acquire()
| |
| self.__connection = con
| |
| self.__connection_lock.release()
| |
|
| |
| # DispatcherTasksMgr
| |
| class DispatcherTasksMgr:
| |
| """
| |
| """
| |
| def __init__(self, max_dispatchers):
| |
| self.__thread_pool = []
| |
| for i in range(max_dispatchers):
| |
| self.__thread_pool.append(Dispatcher())
| |
|
| |
| def Start(self):
| |
| for t in self.__thread_pool:
| |
| t.start()
| |
|
| |
| def Stop(self):
| |
| for t in self.__thread_pool:
| |
| t.Stop()
| |
|
| |
| def FreeSlots(self):
| |
| freeslots = 0
| |
|
| |
| for t in self.__thread_pool:
| |
| if not t.IsConnected():
| |
| freeslots += 1
| |
|
| |
| return freeslots
| |
|
| |
| # AddJob
| |
| # precondition: FreeSlots() > 0
| |
| def AddJob(self, con):
| |
| for t in self.__thread_pool:
| |
| if not t.IsConnected():
| |
| t.ConnectTo(con)
| |
| return
| |
| </source>
| |
|
| |
|
| == Uml plugin == | | == Uml plugin == |
Línea 197: |
Línea 75: |
| } | | } |
| </graphviz> | | </graphviz> |
|
| |
| ==Latexin?==
| |
|
| |
| Sea <math>f : \mathbb{N}\rightarrow \mathbb{N} </math> definida por
| |
|
| |
| <math>f(n)=
| |
|
| |
| \left\{
| |
| \begin{array}{ll}
| |
| 2n & \mbox{si } n \mbox{ es par} \\
| |
| {\frac{n+1}{2}} & \mbox{si } n \mbox{ es impar}
| |
| \end{array}
| |
| \right.
| |
| </math>
| |
|
| |
| a) Determinar si <math>f</math> es inyectiva, sobreyectiva o biyectiva.
| |
|
| |
| b) ¿Es posible definir una función <math>g : \mathbb{N}\rightarrow \mathbb{N}</math> tal que <math>f\circ g</math> sea biyectiva?
| |
|
| |
| c) ¿Es posible definir una función <math>g : \mathbb{N}\rightarrow \mathbb{N}</math> tal que <math>g\circ f</math> sea biyectiva?
| |
|
| |
|
| == Sensible and humble engineering soul == | | == Sensible and humble engineering soul == |
Línea 494: |
Línea 352: |
| || | | || |
| |} | | |} |
|
| |
| Quiero ver si logueado me pide captcha o no.
| |