Tech Kraft

Documentum, AWS, Java, Ruby on Rails, Linux, Windows, App Servers


JavaScript

  • Javascript: How to detect which element has focus

    If you are tabbing through a page and you seem to suddenly lose “focus”, that is, you are unable to determine which element has the focus currently, you can type the following in the console and tab back and forth. This code will print the the currently active element to the console: document.addEventListener(‘keyup’, function(){console.log(document.activeElement)}) Continue reading

  • JavaScript: PigLatin!

    Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an “ay”. If a word begins with a vowel you just add “way” to the end. function translatePigLatin(str) { var firstVowelIndex =0; while(str.charCodeAt(firstVowelIndex)!=97 && str.charCodeAt(firstVowelIndex)!=101 && str.charCodeAt(firstVowelIndex)!=105 && str.charCodeAt(firstVowelIndex)!=111 && str.charCodeAt(firstVowelIndex)!=117 && str.charCodeAt(firstVowelIndex)!=65 Continue reading

  • JavaScript: Convert to Roman Numbers

      function convertToRoman(num) { var romanNumberMap = { 1: “I”, 2: “II”, 3: “III”, 4: “IV”, 5: “V”, 6: “VI”, 7: “VII”, 8: “VIII”, 9: “IX”, 10: “X”, 20: “XX”, 30: “XXX”, 40: “XL”, 50: “L”, 60: “LX”, 70: “LXX”, 80: “LXXX”, 90: “XC”, 100: “C”, 200: “CC”, 300: “CCC”, 400: “CD”, 500: “D”, 600: Continue reading

  • JavaScript: Array Manipulations

    Remove all elements from the initial array that are of the same value as the arguments: function destroyer(arr) { for(var j=1; j<arguments.length; j++){ arr = arr.filter(checkVal, arguments[j]); } return arr; } function checkVal(value){ return (value != this); } destroyer([1, 2, 3, 1, 2, 3], 2, 3) should return [1, 1]. destroyer([1, 2, 3, 5, 1, Continue reading

  • Javascript: There are two isNaN functions!

    Javascript has two separate functions to test whether the value being tested is a Number or not. isNaN() The first one is a global isNan() function, which strictly tests whether the test value is a Number or not. So if you pass a string to this function, it will return true. For example, the following Continue reading

  • Javascript: String Manipulations

    Check String for Palindrome: function palindrome(str) { var result = true; var newStr=”; for(var i=0;i<str.length;i++){ if(/[a-zA-Z0-9]/gi.test(str.charAt(i))){ newStr+= str.charAt(i); } } var revStr=”; for(var j=0;j<newStr.length; j++){ if(newStr.charAt(j).toLowerCase() != newStr.charAt(newStr.length-j-1).toLowerCase()){ result = false; } } return result; } Find the Longest Word in a String: function findLongestWord(str) { var arrStr = str.split(‘ ‘); var maxLength=0; for(var i=0;i<arrStr.length;i++){ Continue reading

About Me

Senior Software Engineer professional with over 16 years of success with multiple open source technologies and various Content Management platforms and solutions.

Proven technical abilities through numerous projects involving enterprise web application design and development, application installation, configuration and support, and workflow and collaboration system designs.

  • Ability to learn new technologies and platforms quickly and apply them to the task at hand.
  • Excellent analytical skills, and strong communication and collaboration abilities.
  • Technical emphasis in including but not limited to Java, Ruby on Rails, Documentum and Alfresco
    in both Linux and Windows based environments

Newsletter