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
/** | |
* @ngdoc directive | |
* @name ng.directive:translate | |
* | |
* @element ANY | |
* | |
* @description | |
* | |
* Angular icin ceviri directive'i | |
* |
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
/** | |
* 0 User must enter a digit (0 to 9). | |
* 9 User can enter a digit (0 to 9). | |
* # User can enter a digit, space, plus or minus sign. If skipped, enters a blank space. | |
* L User must enter a letter. | |
* ? User can enter a letter. | |
* A User must enter a letter or a digit. | |
* a User can enter a letter or a digit. | |
* & User must enter either a character or a space. | |
* C User can enter characters or spaces. |
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
/** | |
* @ngdoc directive | |
* @name safe.directive:checkboxAll | |
* | |
* @element input | |
* | |
* @description | |
* | |
* Bir listedeki tüm elemanları seçen bir checkbox kutusu yapmak için pratik bir directive. | |
* |
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
/** | |
* @ngdoc directive | |
* @name safe.directive:incomplete-confirmation | |
* | |
* @element ANY | |
* | |
* @description | |
* | |
* `name` attribute'u olan bütün form elementlerinde çalışarak | |
* üzerinde değişiklik yapılmış ancak kaydedilmemiş bir form olduğunda |
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
def get_score(word1, word2): | |
shared_chars = [char for char in word1.lower() if char in word2.lower()] | |
return len(shared_chars) | |
# Usage | |
get_score('murat', 'burak') | |
# > 3 |
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
from django.http import HttpResponse, JsonResponse, HttpResponseForbidden, HttpResponseNotAllowed, HttpResponseNotFound | |
from django.forms.models import model_to_dict | |
from django.db.models import Model | |
from django.db.models.query import QuerySet | |
from functools import wraps | |
from django.utils.decorators import available_attrs | |
from django.core import serializers | |
class PermissionError(Exception): | |
pass |
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
{ | |
init: function(elevators, floors) { | |
var upWaiters = {}, | |
downWaiters = {}, | |
idleElevators = [], | |
floorCount = floors.length, | |
arrayUnique = function(a) { | |
return a.reduce(function(p, c) { | |
if (p.indexOf(c) < 0) p.push(c); | |
return p; |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="tr" lang="tr"> | |
<head> | |
<title> JSON Encoder </title> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<?php | |
if($_POST) { | |
$unicodes = array('\u015f', '\u015e', '\u011f', '\u011e', '\u0130', '\u0131', '\u00fc', '\u00dc', '\u00d6', '\u00f6', '\u00c7', '\u00e7'); |
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
var timer = { | |
started: 0, | |
end: 0, | |
now: function(){ return new Date(); }, | |
start: function(){ return this.started = this.now(); }, | |
since: function(){ this.end = this.now(); return this.now()-this.started; } | |
} | |
// Usage: |
OlderNewer