This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.io.IOException; | |
class LeerConsola{ | |
public static String leerCadena(){ | |
BufferedReader Entrada = new BufferedReader(new InputStreamReader(System.in)); | |
String Cadena = null; | |
try{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function NoProceso { | |
echo "No existe Proceso "$1 | |
} | |
function KillProceso { | |
kill -9 $1; | |
status=$? | |
echo $status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Servidor = require 'http' | |
Servidor.createServer (peticion,respuesta) -> | |
respuesta.writeHead(200 , "Constent-type" : "text/html") | |
respuesta.end("<h1> hola mundo </h1>") | |
.listen(3000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -*- mode: shell-script; tab-width: 4 -*- | |
# | |
# Ejecutar programa: | |
# Nombre_del_script Formato Lista_de_archivos | |
# | |
# Ejemplo: | |
# Convertidor.sh png $(pwd)/*.jpg | |
# Convertidor.sh jpg "Mi imagen con espacios.png" "Imagen con caracteres \*.png" | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import json | |
import urllib.parse | |
import urllib.request | |
def showsome (searchfor): | |
query = urllib.parse.urlencode ({'q': searchfor}) | |
print (query) | |
url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&' + query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun Seleccionar-todo-Buffer () | |
"Selecciona todo el contenido | |
del buffer actual" | |
(interactive) | |
(push-mark (point)) | |
(push-mark (point-max)) | |
(goto-char (point-min))) | |
(global-set-key (kbd "C-SPC") 'Seleccionar-todo-buffer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; turn line numbers off by default | |
(global-linum-mode -1) | |
(defun goto-line-with-feedback (&optional line) | |
"Show line numbers temporarily, while prompting for the line number input" | |
(interactive "P") | |
(if line | |
(goto-line line) | |
(unwind-protect | |
(progn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int (* closure_clang(void)) (int, int){ | |
int suma(int entero, int entero2){ | |
return entero + entero2; | |
} | |
return suma; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Te muestra un personaje aleatorio, con una frase | |
# aleatoria. | |
# | |
# Puedes incluirlo en tu archivo de configuracion | |
# de shell, para que cad vez que inicies sesion, | |
# inicies de una manera diferente. | |
# | |
# Dependencias: |
OlderNewer