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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <kml xmlns="http://www.opengis.net/kml/2.2"> | |
| <NetworkLink> | |
| <name>WPC Day 1 24-Hour QPF</name> | |
| <open>1</open> | |
| <refreshVisibility>1</refreshVisibility> | |
| <Link> | |
| <href>http://www.wpc.ncep.noaa.gov/kml/qpf/QPF24hr_Day1_latest.kml</href> | |
| <refreshMode>onInterval</refreshMode> | |
| <refreshInterval>21600</refreshInterval> |
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
| // This uses a 100% height pseudo element to vertically align its child. | |
| // The parent can be any height/width. | |
| .parent { | |
| text-align: center; // horizontal alignment | |
| text-wrap: wrap; // just in case the container is narrower than the element inside. | |
| } | |
| .parent:before { | |
| content: ''; |
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
| // This works in a fixed sized environment. | |
| // The child element is 200x100. | |
| .parent { | |
| width: 500px; | |
| height: 500px; | |
| } | |
| .child { | |
| position: absolute; |
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
| .thing { | |
| display: table-cell; | |
| vertical-align: middle; | |
| } |
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
| - email address | |
| - /[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/i |
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
| var Singleton = (function () { | |
| var instance; | |
| function Singleton() { | |
| if (!instance) | |
| instance = { | |
| foo: 'bar' | |
| } | |
| return instance; |
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
| var arr = [1, 1, 1, 2, 3]; | |
| function getMajorityElement(input) { | |
| var count = 0; | |
| var majorityElement; | |
| var size = input.length; | |
| for (var i = 0; i < size; i++) { | |
| if (count === 0) | |
| majorityElement = input[i]; |
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
| Enumerable.Range(1, 100) | |
| .FirstOrDefault(m => | |
| { | |
| Console.WriteLine( | |
| m % 15 == 0 ? "FizzBuzz" : | |
| m % 5 == 0 ? "Buzz" : | |
| m % 3 == 0 ? "Fizz" : | |
| m.ToString() | |
| ); | |
| return false; |
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
| IEnumerable<string> SearchAccessibleFiles(string root, string searchTerm) { | |
| var files = new List<string>(); | |
| foreach (var file in Directory.EnumerateFiles(root).Where(m => m.Contains(searchTerm))) { | |
| files.Add(file); | |
| } | |
| foreach (var subDir in Directory.EnumerateDirectories(root)) { | |
| try { | |
| files.AddRange(SearchAccessibleFiles(subDir, searchTerm)); | |
| } |