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
public class StringChecker { | |
private String word; | |
public StringChecker() { | |
setString(""); | |
} | |
public StringChecker(String s) { | |
setString(s); | |
} | |
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
public boolean findLetter(char c) { | |
if(word.indexOf(c) != -1) { | |
return true; | |
} | |
else { | |
return false; | |
} | |
} | |
public boolean findSubString(String s) { |
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
<style>*{font-family:"Comic Sans MS",sans-serif;-webkit-animation:rainbow 2.5s infinite;animation:rainbow 2.5s infinite;text-shadow:1px 1px 5px #000}@-webkit-keyframes rainbow{0%{color:red}9.09%{color:#ff0080}18.18%{color:#f0f}27.27%{color:#8000ff}36.36%{color:#00f}45.45%{color:#0080ff}54.54%{color:#0ff}63.63%{color:#00ff80}72.72%{color:#0f0}81.81%{color:#80ff00}90.90%{color:#ff0}100%{color:#ff8000}}@-moz-keyframes rainbow{0%{color:red}9.09%{color:#ff0080}18.18%{color:#f0f}27.27%{color:#8000ff}36.36%{color:#00f}45.45%{color:#0080ff}54.54%{color:#0ff}63.63%{color:#00ff80}72.72%{color:#0f0}81.81%{color:#80ff00}90.90%{color:#ff0}100%{color:#ff8000}}@keyframes rainbow{0%{color:red}9.09%{color:#ff0080}18.18%{color:#f0f}27.27%{color:#8000ff}36.36%{color:#00f}45.45%{color:#0080ff}54.54%{color:#0ff}63.63%{color:#00ff80}72.72%{color:#0f0}81.81%{color:#80ff00}90.90%{color:#ff0}100%{color:#ff8000}}</style> |
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
<style>.soot-song-container{-webkit-perspective:1000px;perspective:1000px}.soot-album-art{display:inline-block;margin-top:25px;margin-left:25px;width:100px;height:auto;perspective:500px;transform:rotateY(45deg)}.soot-album-titles{display:inline-block;position:relative;bottom:35px;}.soot-album-titles h4,.soot-album-titles h5{margin-top:0;margin-bottom:0}</style><div class="soot-song-container"><img class="soot-album-art"src="https://dl.dropboxusercontent.com/u/40306997/FluffWorldImages/artworks-000106222703-uprdn3-original-1024x1024.jpg"/><div class="soot-album-titles"><h4>Hello World</h4><h5>Artist name</h5></div></div> |
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
public class AlphabeticalComparison { | |
public static void main(String[] args) { | |
System.out.println("apple".compareTo("orange")); //Gives back a negative number because "apple" comes before "orange" alphabetically | |
System.out.println("orange".compareTo("apple")); //Gives back a positive number because "orange" comes after "apple" alphabetically | |
//Note that .compareTo() doesn't ignore cases. A word with an uppercase character will appear *before* a letter earlier in the alphabet | |
//(because the alphabet is actually the unicode table) |
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
/* Copyright (c) 2006-2007 Christopher J. W. Lloyd | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<title>TITLE</title> | |
</head> | |
<body> | |
<p>Hello, World!</p> | |
</body> |
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
//You can also use this to asses the age of anything, really. | |
//For example, dynamically display how long your company has been around, when your next appointment is, etc. | |
var birthday = new Date(1998,10,22); //Change to your birthday (year,month,day) | |
//Your age in decimals, with complete precision (1000 milliseconds, 60 seconds, 60 minutes, 24 hours, 365 days) | |
var age = ((new Date() - birthday) / 1000 / 60 / 60 / 24 / 365); | |
var precision = 1000; //However many zeros is how many places (1000 returns 3 places, 1 returns 0 places) | |
//With `precision` set to 1000, you would get something like 16.495, and 1 would just be 16 |
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
<style type="text/css"> | |
* | |
{ | |
font-family:"Comic Sans MS",sans-serif; | |
-webkit-animation:rainbow 2.5s infinite; | |
animation:rainbow 2.5s infinite; | |
text-shadow:1px 1px 5px #000 | |
} | |
@-webkit-keyframes rainbow | |
{ |
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
<meta name="viewport" content="width=device-width, initial-scale=1"> |