#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
var regex = /^("[\w-\.\s]+")|(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){255,})(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){65,}@)(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22))(?:\.(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]+)*\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-[a-z0-9]+)*)|(?:\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(? |
<?php | |
class Fcache | |
{ | |
protected $path = '/tmp/fcache'; | |
protected $content = null; | |
protected $time_limit = 3600; | |
protected $prefix_file = 'fcache_'; | |
public static $inst = null; | |
protected $out; |
<?php | |
/** | |
* Class SoundIndex | |
* Use: SoundIndex::get('some string la-la'); | |
*/ | |
class SoundIndex | |
{ | |
protected static function _sound($string, $is_cyrillic = true) { | |
static $codes = array( |
var isBirthdayToday = function (d, m) { | |
d = typeof d !== 'undefined' ? d : 1; | |
m = typeof m !== 'undefined' ? m : 1; | |
var myBirthday, today, bday, diff, days; | |
myBirthday = [d, m]; | |
today = new Date(); | |
bday = new Date(today.getFullYear(), myBirthday[1] - 1, myBirthday[0]); | |
if (today.getTime() > bday.getTime()) { | |
bday.setFullYear(bday.getFullYear() + 1); | |
} |
Main changes (short): | |
5.1 PDO enabled by default | |
5.2 Added data: stream support. | |
5.3 namespaces, closures, __callStatic() и __invoke() | |
5.4 traits, short array syntax | |
5.5 finally, generators (yield, range) | |
5.6 variadic functions, argument unpacking | |
7 return types, scalar type hints |
<?xml version="1.0"?> | |
<?xml-stylesheet href="file_template.xslt" type="text/xsl"?><!-- путь до xslt стилей указан в аттрибуте href --> | |
<data> | |
<title>Владелец и его собаки</title> | |
<owner>Владелец</owner> | |
<my_test> | |
<first>Имя</first> | |
<second>Фамилия</second> | |
<second>Ла-ла-ла</second> | |
</my_test> |
<?php | |
class MyClass | |
{ | |
private function privateMethod($args) { | |
return $args; | |
} | |
function callPrivate($object, $method, $args) { | |
$caller = function ($method, $args) { |
body { | |
background-color: #CCCCCC; | |
font: 1em 'PT Sans', Tahoma, Arial; | |
} | |
#wrapper { | |
/* коммент */ | |
margin: 80px; | |
perspective: 900px; | |
-webkit-perspective: 900px; |
DELIMITER // | |
DROP PROCEDURE IF EXISTS explode_table // | |
CREATE PROCEDURE explode_table(bound VARCHAR(255), startstr INT, endstr INT) | |
BEGIN | |
DECLARE id INT DEFAULT 0; | |
DECLARE value TEXT; | |
DECLARE occurance INT DEFAULT 0; | |
DECLARE i INT DEFAULT 0; |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync