A Pen by Tyler Thompson on CodePen.
This file contains 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.util.Scanner; | |
/** | |
* Tyler Thompson | |
* Validate phone numbers | |
*/ | |
public class phone { | |
private String pattern = "\\d{10}|(?:\\d{3}-){2}\\d{4}|\\(\\d{3}\\)\\d{3}-?\\d{4}"; | |
public phone(){} | |
public String validate(String number){ |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string name="fa_500px"></string> | |
<string name="fa_adjust"></string> | |
<string name="fa_adn"></string> | |
<string name="fa_align_center"></string> | |
<string name="fa_align_justify"></string> | |
<string name="fa_align_left"></string> | |
<string name="fa_align_right"></string> | |
<string name="fa_amazon"></string> |
This file contains 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
[].forEach.call(document.querySelector('#social-buttons + .container').querySelectorAll('.col-md-4.col-sm-6.col-lg-3'), function(e){console.log('<string name="'+ e.querySelector('i').title.replace('Copy to use ','')+'">' + e.querySelector("span.text-muted:last-of-type").innerText.replace('[','').replace(']','') + '</string>');}); |
This file contains 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
String transversePage(Event event, String attribute){ | |
Element findElm = ((event.target) as Element); | |
String name; | |
if(findElm.getAttribute('$attribute') != null){ | |
name = findElm.getAttribute('$attribute'); | |
} else { | |
for(int i = 0; i<=findElm.children.length;i++) { | |
if (findElm != null) { | |
if (findElm.children.length != i) { |
A simple Material designed dialog following specs found on http://www.google.com/design/spec/components/dialogs.html#dialogs-specs
A Pen by Tyler Thompson on CodePen.
This file contains 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 static boolean isValidEmail(String emailAddress) { | |
boolean isValid=false; | |
if((emailAddress.contains(" ") == false && emailAddress.matches(".+@.+\\.[a-z]+"))&&emailAddress.contains(" ") == false && emailAddress.matches("^([^.@]+)(\\.[^.@]+)*@([^.@]+\\.)+([^.@]+)$")){ | |
isValid=true; | |
} | |
return isValid; | |
} |
This file contains 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
javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}funct |