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
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]); |
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
package main | |
import ( | |
"crypto/hmac" | |
"crypto/md5" | |
"encoding/hex" | |
"fmt" | |
"sort" | |
"strconv" | |
) |
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
<?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 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 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 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 X = cumSumFunc(image) | |
[m,n] = size(image); | |
X = zeros(m,n); | |
X(1,:) = image(1,:); | |
for i=2:m | |
for j=1:n | |
X(i,j) = image(i,j) + X(i-1,j); | |
end | |
end | |
end |
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
<template> | |
<f7-page> | |
<f7-navbar :title="title" class="target-name" back-link="Back" sliding></f7-navbar> | |
<f7-messages> | |
<ul> | |
{{this.$route.params.username}} | |
<li v-for="(value, key) in $route.params" :key="'param-' + key"><b>{{key}}:</b> {{value}}</li> | |
</ul> | |
<f7-message v-for="message in messages" | |
:text="message.text" |
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
<?php | |
//model | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
class Admin extends Authenticatable | |
{ |
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
1847f2fa2a8e97293b0db3201ecafc34 -> pau_{37.7387013,29.092491} |
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
= truncate(@text, :length => 100, :omission => '', :separator => ',') |
NewerOlder