This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Slider</title> | |
| <style type="text/css"></style> | |
| <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> | |
| <script src="http://bxslider.com/sites/default/files/jquery.bxSlider.min.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function(){ $('#slider1').bxSlider(); }); |
This file contains hidden or 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.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import java.net.HttpURLConnection; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.util.Map; |
This file contains hidden or 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
| def currency_euro(item) | |
| number_to_currency(item, :unit => "€", :separator => ",", :delimiter => "", :format => "%n %u") | |
| end |
This file contains hidden or 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
| # | |
| # This module defines a Sudoku::Puzzle class to represent a 9x9 | |
| # Sudoku puzzle and also defines exception classes raised for | |
| # invalid input and over-constrained puzzles. This module also defines | |
| # the method Sudoku.solve to solve a puzzle. The solve method uses | |
| # the Sudoku.scan method, which is also defined here. | |
| # | |
| # Use this module to solve Sudoku puzzles with code like this: | |
| # | |
| # require 'sudoku' |
This file contains hidden or 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
| /** | |
| * Método que combina las listas de los 3 recomendadores y devuelve la lista resultado | |
| * @param userId String identificador del usuario | |
| * @param listaRM lista del recomendador Mix | |
| * @param listaRG lista del recomendador Género/Género | |
| * @param listaRT lista del recomendador Temperamento/Temperamento | |
| * @return lista de las películas elegidas al tras la combinación de los tres recomendadores | |
| */ | |
| private List<PeliPuntuacion> combinaListas(String userId, | |
| List<PeliPuntuacion> listaRM, List<PeliPuntuacion> listaRG, |
This file contains hidden or 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 PesoRecomendadores getRepartoUsuario(Usuario u){ | |
| double pesoRecomendadorMix=0; | |
| double pesoRecomendadorGG=0; | |
| double pesoRecomendadorTT=0; | |
| double porcentajeTemp; | |
| porcentajeTemp=u.getPorcentajeArtesano()/100; | |
| pesoRecomendadorMix=pesoRecomendadorMix+porcentajeTemp*repartoArtesano.getPesoRecomendadorMix(); | |
| pesoRecomendadorGG=pesoRecomendadorGG+porcentajeTemp*repartoArtesano.getPesoRecomendadorGG(); | |
| pesoRecomendadorTT=pesoRecomendadorTT+porcentajeTemp*repartoArtesano.getPesoRecomendadorTT(); |
This file contains hidden or 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 RepartoRecomendadores(){ | |
| repartoArtesano= new PesoRecomendadores(0.35,0.31,0.34); | |
| repartoGuardian= new PesoRecomendadores(0.32,0.39,0.29); | |
| repartoIdealista= new PesoRecomendadores(0.36,0.28,0.36); | |
| repartoRacional= new PesoRecomendadores(0.38,0.34,0.28); | |
| } |
This file contains hidden or 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
| double[] arrayPunt; // Contendrá los resultados devueltos por el recomendador | |
| // si no hay pelis en esa comunudad, evitamos que falle metiendo valores nulos | |
| if (i==0){ | |
| if ((arrayPunt==null)||(arrayPunt.length<1)){ | |
| arrayPunt = new PeliPuntuacion[1]; | |
| } | |
| arrayPunt[0]=new PeliPuntuacion("nada",0.0); | |
| } | |
This file contains hidden or 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
| min=Double.MAX_VALUE; | |
| max=Double.MIN_VALUE; | |
| private void setMaxMinUser(){ | |
| double artesano=u.getPorcentajeArtesano(); | |
| double idealista=u.getPorcentajeIdealista(); | |
| double guardian=u.getPorcentajeGuardian(); | |
| double racional=u.getPorcentajeRacional(); | |
| double aux=0; |
This file contains hidden or 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 double calculoTT(Usuario u, double art, double ide, double gua, | |
| double rac) { | |
| double puntuacion=0; | |
| puntuacion=puntuacion+Math.abs(u.getPorcentajeArtesano()/100-art); | |
| puntuacion=puntuacion+Math.abs(u.getPorcentajeIdealista()/100-ide); | |
| puntuacion=puntuacion+Math.abs(u.getPorcentajeGuardian()/100-gua); | |
| puntuacion=puntuacion+Math.abs(u.getPorcentajeRacional()/100-rac); | |
| puntuacion=puntuacion/4; | |