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
// Programa para separar los digitos de un número dado | |
import java.util.Scanner; | |
public class Separador { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(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
<div id="imagen" align="center"> | |
<img src="./imagenes/3.jpg" alt="Imagen" id="pic" width="400" height="400" /><br/><br/> | |
Al pasar sobre cada imagen, esta se colocará arriba<br/> | |
<img src="./imagenes/1.png" alt "Imagen" id="1" width="100" height="100" onMouseOver="cambiar(this);" /> | |
<img src="./imagenes/2.jpg" alt "Imagen" id="2" width="100" height="100" onMouseOver="cambiar(this);" /> | |
<img src="./imagenes/3.jpg" alt "Imagen" id="3" width="100" height="100" onMouseOver="cambiar(this);" /> | |
</div> |
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 rollingDices; | |
import java.io.*; | |
public class RollingDices { | |
String[] dice_one = {"Action 1", "Action 2", "Action 3", "Action 4", "Action 5", "Action 6"}; // Primer dado | |
String[] dice_two = {"Action 1", "Action 2", "Action 3", "Action 4", "Action 5", "Action 6"}; // Segundo dado | |
public String diceOne() { // Tira el primer dado y devuelve el resultado | |
int rolling_one = (int)(Math.random() * 6); | |
return dice_one[rolling_one]; |
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.*; | |
public class ObjectWriter { | |
public static void añadirContacto() { | |
Objeto nuevoObjeto = new Objeto(parametro_1, parametro_2, parametro_3); | |
try { | |
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("/home/USUARIO/registro.txt", true)); | |
oos.writeObject(nuevoObjeto); | |
oos.close(); | |
System.out.println("Objeto escrito correctamente"); |
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.*; | |
public class ObjectReader { | |
public static void leerRegistro() { | |
try { | |
try (FileInputStream fis = new FileInputStream("/home/USER/registro.txt")) { | |
ObjectInputStream ois = new ObjectInputStream(fis); | |
while (fis.available() > 0) { | |
Objeto registro = (Objeto)ois.readObject(); | |
System.out.println(registro.toString() + "\n"); |
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
html { | |
background: url(background.jpg) no-repeat fixed center; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |
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
<script type="text/javascript" src="http://your-tumblr-blog/js?num=5"></script> | |
<script type="text/javascript"> | |
//try to remove img and iframe src asap to avoid image loading | |
$('.tumblr_posts .tumblr_photo_post img, .tumblr_posts .html_photoset iframe').each(function(index, element) | |
{ | |
$(element).attr('data-src', $(element).attr('src')) | |
$(element).removeAttr('src').addClass('superload') | |
}) | |
//load src when the page is loaded |
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
# Conky config | |
# Por Juanjo Salvador (http://juanjosalvador.github.io/) | |
background no | |
use_xft yes | |
xftfont Sans:size=8 | |
xftalpha 1 | |
update_interval 1 | |
total_run_times 0 | |
own_window yes |
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
# Tint2 theme | |
# By Juanjo Salvador (@Linuxneitor) | |
# http://juanjosalvador.github.io/ | |
# To use this as default tint2 config: save as $HOME/.config/tint2/tint2rc | |
# Background definitions | |
# ID 1 | |
rounded = 0 | |
border_width = 1 |
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
public class main { | |
public static void cambiaLetras() { | |
try { | |
FileReader fr = new FileReader("texto.txt"); | |
BufferedReader br = new BufferedReader(fr); | |
String str = null; | |
while ((str = br.readLine()) != null) { | |
for (int i = 0; i < str.length(); i++) { |
OlderNewer