#SMELLS
- Código duplicado: SRP
- Métodos largos: SRP
- Clases grandes: SRP
- Listas de parámetros: DIP
- Cambio divergente: SRP
- Shotgun surgery: SRP
- Envidia: SRP
- Grupos/grumos de datos: OCP
- Demasiadas primitivas: OCP
| " =========================== | |
| " PLUGINS | |
| " =========================== | |
| call plug#begin('~/.vim/plugged') | |
| " === Editing Plugins === " | |
| " | |
| " .editorconfig | |
| Plug 'editorconfig/editorconfig-vim' |
| $(document).ready(function() { | |
| var womenSliderStarted = false; | |
| var width = $(window).width(); | |
| $("#mujeres").click(function () { | |
| $("#men_slider").hide(); | |
| $("#women_slider").show(); | |
| if( !womenSliderStarted ) { | |
| if (width >= 1023) { | |
| new Slider( | |
| "#women_slider", |
| $('.publicar-curso').click(function(e){ | |
| e.preventDefault(); | |
| $('#popup').load('popups.html #publicar-curso', function() { | |
| $('#publicar-curso').show(); | |
| $('.close').click(function(e){ | |
| $('.masc:visible').hide(); | |
| }); | |
| /* | |
| Aqui ya hemos cargado el popup #publicar-curso, ahora queremos vincular el click del botón que tiene dentro | |
| con mostrar un nuevo popup: |
| should = require 'should' | |
| class ArabicToRomanConversions | |
| conversions: | |
| [ | |
| { arabic: 1, roman: 'I'}, | |
| { arabic: 4, roman: 'IV'}, | |
| { arabic: 5, roman: 'V'}, | |
| { arabic: 9, roman: 'IX'}, |
| should = require 'should' | |
| class ArabicToRoman | |
| constructor: -> | |
| @CONVERSIONS = [ | |
| {'roman': 'M', 'arabic': 1000}, | |
| {'roman': 'CM', 'arabic': 900}, | |
| {'roman': 'D', 'arabic': 500}, | |
| {'roman': 'CD', 'arabic': 400}, |
#SMELLS
| public function findMetasFor($photo = null) { | |
| if ($photo != null) | |
| return $this->findMetasForShow($photo); | |
| else return $this->findMetasForCategory(); | |
| } | |
| private function findMetasForCategory() { | |
| if ($this->category != null) | |
| return $this->metainformation[$this->category]; | |
| else return $this->metainformation["all_{$this->locale}"]; |
| public function findMetasFor($photo = null) { | |
| $locale = $this->localization->getCurrentLocale(); | |
| if ($photo == null) { | |
| if($this->category == null) | |
| return $this->metainformation['all_'.$locale]; | |
| else { | |
| return $this->metainformation[$this->category]; | |
| } | |
| } else { | |
| $metas = $this->metainformation['shots_'.$locale]; |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include "sudoku_lib.h" | |
| #if _SSGRIND_ | |
| #include <ss_valgrind.h> | |
| #endif | |
| #if _EXTRAE_ | |
| #include "extrae_user_events.h" | |
| #endif |
| void sum_vector (int *X, int n) | |
| { | |
| int sum = 0; | |
| int i; | |
| int slice = n/OMP_get_num_threads(); | |
| vector<int> threads(n); | |
| for (int i = 0; i < OMP_get_num_threads(); ++i) | |
| { | |
| #pragma omp task | |
| threads[i] = sum_slice(X, i*slice, (i+1)*slice); |