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

代码片段 8064

#Ruby
Ruby 调用 Windows Excel 来生成电子表格

require 'win32ole' excelobj = WIN32OLE.new("excel.application") excelobj['Visible']=TRUE e…

2014-10-22 781

#Ruby
Ruby 检查 HTTP 回应的错误和重定向

require 'net/http' def get_web_document(url) uri = URI.parse(url) response = Net::HTTP.get…

2014-10-22 537

#Objective-C
UITextView/UITextField限制字数

+ (void)limitTextFieldLength:(UITextField *)textField maxLength:(NSInteger)maxLength { NSS…

2014-10-22 418

#HTML
检测浏览器是否支持HTML5

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>…

2014-10-21 508

#HTML
不同方式实现类似校内人人底部固定

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xh…

2014-10-21 929

#Python
系统监控

#! /usr/bin/env python #coding=utf-8 import sys,os ###得到系统当前路径 ##1 :根据文件名 得到当前路径名 print os…

2014-10-21 842

#Shell
linux通用清理脚本

#!/bin/sh ########################### #delete log # in_day_num: like 1 2 is delete 2day ag…

2014-10-21 564

#Python
爬取和保存豆瓣小组图片

#!/usr/bin/env python3 #-*- coding=utf-8 -*- import requests import time import random imp…

#Shell
网络军刀netcat nc发动弹

nc www.oschina.net 80 < 1.txt>>1.log

2014-10-21 941

#Python
自己编的汉诺塔游戏过程

def tower(a,b,c,n): if n==1: print "put 1 from b to a." elif n==2: print "put 1 from %r to…

2014-10-21 331

#Objective-C
ios自带菊花转圈圈 等待动画

CLLocationManager* activity = [[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(100…

2014-10-21 645