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
document.onreadystatechange = function () { | |
if (document.readyState === 'complete') { | |
var els = document.getElementsByClassName("vidlink"); | |
// assign attributes needed for actions, self invoking on page load | |
(function () { | |
Array.prototype.forEach.call(els, function(el, i){ | |
var newAtts = ["data-vidname", "data-vidlect"]; | |
var newNames = ["vidname", "vidlect"]; | |
Array.prototype.forEach.call(newAtts, function(newAtt, j){ |
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
/* | |
* Palindrome | |
*/ | |
package palindrome; | |
import java.util.Scanner; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class Palindrome { |
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
function searchDepth() { | |
var maxDepth = 0, | |
d, | |
parents, | |
myselector = 'ul, ol'; | |
$(myselector).each( function(i) { | |
parents = $(this).parents(myselector); | |
d = parents ? parents.length + 1 : 1; | |
maxDepth = d > maxDepth ? d : maxDepth; |