mauricio-oporto-photo

Mauricio Oporto

FULL STACK WEB DEVELOPER


Mauricio oporto is a Full Stack Web Developer
You will find here my skills acquired during my training,
self-taught and during my internships. Computer science is above all a passion, which is why I dedicate Much of my time.
I chose to specialize on JavaScript.

Code Snippets


Split String

This javascript program splits the string into pairs of two characters.
If the string contains even number of characters return ['ab', 'cd', 'ef']
If the string contains an odd number of characters return ['ab', 'c_']


  function solution(str) {
    var ch = str.split("");
    var letters = str.match(/.{1,2}/g) || [];

    if (ch.length % 2 === 0) {
        return letters;
    } else {
        letters[letters.length - 1] += "_";
        return letters;
    }
  };


  puts "Enter a number "
  num = gets.chomp.to_i

  digit = num % 10

  if num > 10 && num < 14
    suffix = 'th'
  elsif digit == 1
    suffix = 'st'
  elsif digit == 2
    suffix = 'nd'
  elsif digit == 3
    suffix = 'rd'
  else
    suffix = 'th'
  end

  puts "That's the #{num}#{suffix} item!"

Ordinal Challenge

This ruby program will convert a plain number to the ordinal of the number. So for example, if the user enters 2, it will display 2nd, if the user enters 3, it will display 3rd, etc.


Find the smallest number you can get

This javascript program have a positive number n consisting of digits. You can do at most one operation: Choosing the index of a digit in the number, remove this digit at that index and insert it back to another place in the number.

Example:

i) smallest(261235) --> [126235, 2, 0]
126235 is the smallest number gotten by taking 1 at index 2 and putting it at index 0
ii) smallest(209917) --> [29917, 0, 1]
29917 is the smallest number gotten by taking 2 at index 0 and putting it at index 1 which gave 029917 which is the number 29917.


  function smallest(n) {
    var arr = n.toString();
    var result = [+n,0,0];
    var tempArray = [];

    for (var i = 0; i < arr.length; i++) {
      for (var j = 0; j < arr.length; j++) {
          tempArray = +move(arr.split(""), i, j).join("");
          if (tempArray < result[0]) {
            result = [tempArray, i, j];
          }
      }
    }
    return result;
  }

  function move(array, oldIndex, newIndex) {
     array.splice(newIndex, 0, array.splice(oldIndex, 1)[0]);
     return array;
  }

Web Apps


Reservation App

reservation-app

Les Mécènes du numérique

les-mecenes-du-numerique-app

MyRecipes App

myrecipes-app

Postcode Finder

postcode-finder-app

Weather Predictor

weather-predictor-app

Secret Diary

secret-diary-app

Skills & Tools


Mauricio has developed proficiency and expertise in the following programming languages and comfort with the following tools.

docker-img trello-img slack-img svc-img webstorm-img
skills-img

Contact


Currently entertaining new opportunities. Please get in touch via email:

fmod@the-dsw.com