首页 软件开发 代码片段 ( Page 629 )

代码片段 8064

#SQL
MySQL 找出使用了某列名的所有表

SELECT table_name,column_name FROM information_schema.columns WHERE column_name LIKE '% ta…

sql
2014-12-28 502

#Java
pyhooks实现键盘监控学习心得

pyhooks 下载:http://sourceforge.net/projects/pyhook/files/pyhook/1.5.1/ API手册:http://pyhook.…

2014-12-28 554

#PHP
php实现简单的图片验证码

这是最简单的图片验证码: image.php <?php header("Content-type: image/png"); $string = &qu…

php
2014-12-28 653

#Ruby
Rails 在 Controller 中选择要显示的 View

class HelloController < ApplicationController def there if Time.now.hour == 12 render(:…

2014-12-28 180

#PHP
裁剪图片PHP代码

下面的例子裁切图片的左上角的100×100的部分。可以通过修改$src_x,$src_y,$src_w,$src_h的值来修改裁剪的范围。 <?php $filen…

php
2014-12-28 706

#Ruby
Rails 对 Model 的数据库配置 set_table_name

drop database Contact; create database Contact; use Contact; CREATE TABLE Employee ( id in…

2014-12-28 808

#Python
Windows下python监控脚本

#!/usr/bin/env python # encoding: utf-8 """ MonitorLog.py Usage: MonitorLog…

2014-12-28 177

#PHP
javascript中的escape和unescape函数的php实现

escape函数 /** * js escape php 实现 * @param $string the sting want to be escaped * @param $in…

php
2014-12-28 979

#Python
使用python进行简单的文本处理

涉及到如下方面 txt文本的读取,utf8的处理 字符串的基本操作 dict的基本操作 list(数组)的基本操作 #!/usr/bin/python #print "H…

2014-12-28 232

#Ruby
10行代码实现coffeescript全自动编译成js(linux/mac os)

require 'fssm' FILE_PATH = '/home/yourpath/' def compile(path) system "coffee -c #{path}" …

2014-12-28 936

#Ruby
三角形的面积

def triangle(x,y,z) angleX=Math.acos((y**2+z**2-x**2)*3.14/(360*y*z)) #angleX is the angle…

2014-12-28 918