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.util.Scanner; | |
import java.io.BufferedInputStream; | |
public class Lottery { | |
public static double LotteryProbability (String lottery) { | |
int m=0,n=0,t=0,p=0,requiredForWin=0; | |
double result=0.0; | |
String[] number = lottery.split(" "); |
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.util.Date; | |
import java.util.Scanner; | |
import java.util.LinkedList; | |
import java.util.Iterator; | |
import java.text.SimpleDateFormat; | |
public class BestBefore { | |
//Verify if it is a leap year | |
public static boolean isaleapyear (int year) { |
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
[DISPLAY.Device.NVIDIA GeForce GTX 780.0] | |
Anisotropic=1 | |
MipBias=6 | |
Mode=1920x1080x32 | |
WideViewAspect=False | |
TEXTURE_BANDWIDTH_MULT=100 | |
[MAPVIEW_MAP] | |
SHOW_AIRPORTS=1 | |
SHOW_AIRSPACE=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
package org.myorg; | |
import java.io.IOException; | |
import java.util.*; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.conf.*; | |
import org.apache.hadoop.io.*; | |
import org.apache.hadoop.mapreduce.*; | |
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; |
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
[ambari-qa@master-node ~]$ hadoop dfs -ls ./entrada | |
Found 2 items | |
drwx------ - ambari-qa hdfs 0 2013-05-23 18:41 /user/ambari-qa/entrada/entrada | |
-rw------- 3 ambari-qa hdfs 568233984 2013-05-23 20:31 /user/ambari-qa/entrada/input1.txt | |
[ambari-qa@master-node ~]$ hadoop jar /usr/lib/hadoop/hadoop-examples.jar wordcount ./entrada/input1.txt ./salida | |
13/05/23 20:38:15 INFO input.FileInputFormat: Total input paths to process : 1 | |
13/05/23 20:38:15 INFO lzo.GPLNativeCodeLoader: Loaded native gpl library | |
13/05/23 20:38:15 INFO lzo.LzoCodec: Successfully loaded & initialized native-lzo library [hadoop-lzo rev cf4e7cbf8ed0f0622504d008101c2729dc0c9ff3] | |
13/05/23 20:38:15 WARN snappy.LoadSnappy: Snappy native library is available | |
13/05/23 20:38:15 INFO util.NativeCodeLoader: Loaded the native-hadoop library |
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.*; | |
import java.util.*; | |
import org.json.*; | |
/* | |
JSON library provided by json.org (http://www.json.org/) | |
*/ | |
public class XmltoJson { | |
public static void main(String[] args) { |
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.*; | |
import java.util.Map; | |
import java.util.Vector; | |
import java.util.HashMap; | |
import java.util.StringTokenizer; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFCellStyle; |
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 | |
# | |
# Developed by: Javier Sianes - [email protected] | |
# | |
# Exit codes: | |
# 0: Correct program execution | |
# 1: Total hours doesn't match with partial aggregate hours | |
# 2: General error or program execution interrupted | |
# 3: Can't match resource as intern or extern | |
# 4: Error in command line execution |
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 | |
# | |
# This script make a local MySQL DB backup | |
# Developed for RHEL5 by Javier Sianes - [email protected] | |
# | |
# Start of Parameters | |
############################################## | |
USUARIO="username" | |
PASSWORD="password" |
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.*; | |
import java.util.*; | |
import java.text.*; | |
public class LCAP { | |
public static void Ley() { | |
System.out.printf("Evaluacion segun la LCAP:\n\n"+ | |
"Articulo 85. Criterios para apreciar las ofertas desproporcionadas o temerarias en las\n"+ | |
"subastas.- Se consideraran, en principio, desproporcionadas o temerarias las ofertas que\n"+ |
OlderNewer