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
.ask{ | |
color:#99a3b1; | |
font-size:30px; | |
line-height:50px; | |
} |
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
<div class="ask" contenteditable="true" id="ask_k" > | |
</div> |
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 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html id="cp"> | |
<head> | |
<title>Rtest</title> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | |
<style type="text/css"> | |
body { | |
background: #FFF; |
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 callfunction(name): | |
def warp(f): | |
def warp1(*args): | |
print "the caller is "+ name | |
f() | |
return warp1 | |
return warp | |
@callfunction("xman") | |
def f(*args): | |
print "f start" |
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
import datetime | |
def timeit(func): | |
def warp(*args): | |
print "begin at " + str(datetime.datetime.now()) | |
func(*args) | |
print "end at " + str(datetime.datetime.now()) | |
return warp | |
@timeit |
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 decorator_whith_params_and_func_args(arg_of_decorator): | |
def handle_func(func): | |
print "start handle" | |
def warp(): | |
print "start warp" | |
func() | |
print "end warp" | |
print "end handle" | |
return warp | |
return handle_func |
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
import math | |
class Point(object): | |
def __init__(self, x=0, y=0): | |
try: | |
int(x) + 1 | |
except TypeError: | |
self.x = 0 | |
else: |
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
class Point: | |
def __init__(self, x=0, y=0): | |
self.x = x | |
self.y = y | |
a = Point(1, 4) | |
b = Point(4, 4) | |
c = Point(1, 2) | |
d = Point(4, 2) |
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
a1 = Point(1, 5) | |
b1 = Point(4, 5) | |
c1 = Point(1, 2) | |
d1 = Point(4, 2) | |
r = Rectangle(a1, b1, c1, d1) |
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 | |
date('H'); | |
date('Y-m-d H:i:s'); | |
$endTime_h = date('H'); | |
$endTime_m = date('i'); | |
echo $endTime_m;echo "<br/>"; | |
if($endTime_m > 30){ | |
$work_m = 0.5; | |
}else{ |
OlderNewer