java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
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
private boolean o = true; | |
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { | |
ImageIcon imagenO = new ImageIcon("o.png"); | |
ImageIcon imagenX = new ImageIcon("x.png"); | |
if (o) { | |
jButton2.setIcon(imagenO); | |
} else { |
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
// | |
// Botón con borde basado en http://stackoverflow.com/a/38154358 | |
// | |
import UIKit | |
@IBDesignable class BotonConBorde: UIButton { | |
@IBInspectable var ancho: CGFloat = 0 { | |
didSet { |
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 | |
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB | |
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://8388608` # 4 GB | |
/usr/sbin/diskutil erasevolume HFS+ "RamDisk" $DISK | |
RAMDISK="/Volumes/RamDisk/ova" | |
mkdir $RAMDISK |
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 | |
TEMAS=`ls -1 /usr/local/share/highlight/themes/ | cut -f 1 -d "."` | |
for T in $TEMAS | |
do | |
highlight -i test.java -O rtf -o $T.rtf --syntax java --font "SF Mono" --style $T --font-size 12 | |
done |
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
package com.jaureguialzo; | |
public class Main { | |
public static void main(String[] args) { | |
// La mejor visualización se consigue poniendo como fuente de consola el tipo de letra "Arial Unicode MS" | |
char[][] tablero = { | |
{'♜', '♞', '♝', '♛', '♚', '♝', '♞', '♜'}, |
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
// Segue | |
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
if segue.identifier == "siguientePantalla" { | |
let destino = segue.destination as! OtroViewController; | |
} | |
} | |
// Unwind | |
@IBAction func guardar(segue: UIStoryboardSegue) { |
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 | |
OPCIONES="-a --delete --partial --progress" # Apple rsync | |
#OPCIONES="-a --delete --partial --info=progress2" # Homebrew rsync | |
ORIGEN="/Volumes/seagate" | |
DESTINO="/Volumes/seagate copia" | |
if [ -e "$ORIGEN" ] && [ -e "$DESTINO" ] | |
then |
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
function light() { | |
if [ -z "$2" ] | |
then | |
src="pbpaste" | |
else | |
src="cat $2" | |
fi | |
$src | highlight -O rtf --syntax $1 \ | |
--font "SF Mono" \ |
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 | |
# Los dos proyectos tienen que estar en la misma carpeta | |
# ./fusionar.sh <individual> <agrupado> <rama> <mensaje_commit> | |
# ./fusionar.sh miproyecto proyectos nombre_nombre "Nombre y Nombre" | |
cd "$2" | |
git remote add $3 "../$1" | |
git fetch $3 | |
git branch $3 |
OlderNewer