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

代码片段 8064

#Python
自动备份交换机配置

#!/usr/bin/env python #coding:utf-8 """ Author: Edward.Zhou -- <edgeman_03@163.com> …

#Shell
linux shell获得本机ip地址

IP=`/sbin/ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print …

2015-01-16 340

#Python
python通过MySQLdb访问mysql数据库

需要安装MySQLdb,windows下安装需要下载setup文件。 #!/usr/bin/python import MySQLdb def doInsert(cursor,db…

2015-01-16 769

#HTML
最基础的密码框验证

<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>…

2015-01-16 241

#Python
python利用PIL库读取图片的EXIF信息

  # -*- coding: Windows-1251 -*- ''' rename_to_exiftime.py Rename JPEG files accordin…

2015-01-16 770

#HTML
Fix Text Rendering in Mobile Safari

body { -webkit-text-size-adjust: 100%; }

2015-01-16 842

#Python
Python对象转Json

#!/usr/bin/env python #coding=utf-8 ''' an Simple example. To :https://github.com/hustcc/o…

#Objective-C
IOS 定位CoreLocation代码

定位需要使用苹果官方的类库CoreLocation,通过GPS来确定位置信息 并且需要实现CLLocationManagerDelegate协议 1.首先添加类库CoreLocat…

2015-01-15 304

#SQL
mysql 批量删除

CREATE PROCEDURE del_line() BEGIN DECLARE count_line INT; /** 先删除索引提高删除速度*/ ALTER TABLE `t…

sql
2015-01-15 624

#Golang
golang 获取ip代码

package main import ( "fmt" "net" "strings" ) func main() { …

2015-01-15 144

#Ruby
Ruby排列计算

#!/usr/bin/env ruby # PERMUTATIONS COMPUTER # based on Bogomolyn algorithm # http://www.be…

2015-01-15 862

#Java
Android判断网络状态方法

Android 判断网络状态这一应用技巧在实际应中是比较重要的。那么,在Android操作系统中,如何能够正确的判断我们所连接的网络是否断开恩?今天我们就针对这一应用技巧进行一个详…

2015-01-15 503