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
<h1 tal:attributes="class php:repeat.current_item.number == 1 ? 'one' | |
: (repeat.current_item.number == 2 ? 'two' | |
: (repeat.current_item.number == 3 ? 'three' : NULL))" | |
tal:content="repeat/current_item/number" | |
tal:repeat="repeat_item collection"></h1> | |
<!-- collection bind from php code --> |
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
/* http://jsfiddle.net/KDtAX/487/ */ | |
img.grayscale { | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+ */ | |
filter: gray; /* IE6-9 */ | |
-webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */ | |
-webkit-transition: all .6s ease; /* Fade to color for Chrome and Safari */ | |
-webkit-backface-visibility: hidden; /* Fix for transition flickering */ | |
} |
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
.transparent { | |
background: transparent url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) repeat; | |
} |
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 | |
//strtoupper turkish | |
function strtoupper_tr($input) { | |
return str_replace( | |
array('a','b','c','ç','d','e','f','g','ğ','h','ı','i','j','k','l','m','n','o','ö','p','r','s','ş','t','u','ü','v','y','z','q','w','x'), | |
array('A','B','C','Ç','D','E','F','G','Ğ','H','I','İ','J','K','L','M','N','O','Ö','P','R','S','Ş','T','U','Ü','V','Y','Z','Q','W','X'), | |
$input); | |
} | |
?> |
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
header('X-UA-Compatible', 'IE=Edge'); /*for php*/ | |
Response.AddHeader("X-UA-Compatible", "IE=Edge"); /* for asp.net c# */ |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Show a warning message if user visiting with IE 7</title> | |
</head> | |
<body> | |
<!--[if lt IE 8]> | |
<p>Warning message for who uses IE 7.</p> | |
<![endif]--> |
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
//http://stackoverflow.com/a/1026087/181295 | |
String.prototype.turkishUpperCase = function () { | |
return this.replace(/ğ/g, 'Ğ') | |
.replace(/ü/g, 'Ü') | |
.replace(/ş/g, 'Ş') | |
.replace(/ı/g, 'I') | |
.replace(/i/g, 'İ') | |
.replace(/ö/g, 'Ö') | |
.replace(/ç/g, 'Ç') | |
.toUpperCase(); |
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 | |
$test = array( | |
'test' => 'I can access arrays and objects in curly braces.', | |
); | |
echo "This is a test : {$test['test']}"; | |
?> |
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 app = angular.module('app', []).config(['$interpolateProvider', function ($interpolateProvider) { | |
$interpolateProvider.startSymbol('[['); | |
$interpolateProvider.endSymbol(']]'); | |
}]); | |
/* | |
use: | |
<div ng-app="app"> | |
<div ng-controller="ControllerCtrl as app"> | |
<ul> | |
<li ng-repeat="item in app.items"> |