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 LightenColor = function(color, percent) { | |
| var num = parseInt(color,16), | |
| amt = Math.round(2.55 * percent), | |
| R = (num >> 16) + amt, | |
| B = (num >> 8 & 0x00FF) + amt, | |
| G = (num & 0x0000FF) + amt; | |
| return (0x1000000 + (R<255?R<1?0:R:255)*0x10000 + (B<255?B<1?0:B:255)*0x100 + (G<255?G<1?0:G:255)).toString(16).slice(1); | |
| }; |
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 otomatikBul() { | |
| // Browser desteğini kontrol et | |
| if( ! navigator.geolocation ) { | |
| console.log( 'Broserınız desteklemiyor. Lütfen manual seçim yapınız.' ); | |
| return; | |
| } | |
| // Uyarı | |
| console.log( 'Koordinatlar alınıyor...' ); |
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
| # coding: utf-8 | |
| # only works on 1.9+ | |
| # base idea is from: | |
| # - http://stackoverflow.com/questions/2583472/regex-to-validate-json | |
| # - http://www.slideshare.net/takesako/shibuyapm16-regexpjsonvalidator | |
| module JsonMatcher | |
| NUMBER = /-? (?= [1-9]|0(?!\d) ) \d+ (\.\d+)? ([eE] [+-]? \d+)?/x | |
| BOOLEAN = /true | false | null/x |
NewerOlder