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
| <?php | |
| namespace Libraries; | |
| class TaxNumber | |
| { | |
| public static function check($tax) | |
| { | |
| $tax = str_replace(' ', '', trim($tax)); | |
| if (strlen($tax) != 10) { |
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
| <?php | |
| // bloomberght anlık | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com'); | |
| curl_setopt($ch, CURLOPT_URL, "http://www.bloomberght.com/doviz/dolar/"); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| $site = curl_exec($ch); | |
| curl_close($ch); |
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
| <?php | |
| /* @barisesen | |
| * http://www.tcmb.gov.tr/kurlar/201805/25052018.xml | |
| */ | |
| public function oldExchangeRate($date) | |
| { | |
| $dt = Carbon::parse($date); | |
| if ($dt->isWeekend()) { | |
| return $this->oldExchangeRate($dt->subDay()); | |
| } |
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
| package main | |
| import ( | |
| "crypto/hmac" | |
| "crypto/md5" | |
| "encoding/hex" | |
| "fmt" | |
| "sort" | |
| "strconv" | |
| ) |
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 verify(tcno) { | |
| if (!tcno.match(/^[1-9]{1}[0-9]{9}[0,2,4,6,8]{1}$/)) { | |
| return false; | |
| } | |
| tcno = tcno.split('').map(Number); | |
| var odd = tcno[0] + tcno[2] + tcno[4] + tcno[6] + tcno[8]; | |
| var even = tcno[1] + tcno[3] + tcno[5] + tcno[7]; | |
| var digit10 = (odd * 7 - even) % 10; | |
| var total = (odd + even + tcno[9]) % 10; | |
| return !(digit10 !== tcno[9] || total !== tcno[10]); |
OlderNewer