集成式数码管动态扫描显示
#include<reg52.h>#define INT8U unsigned char#define INT16U unsigned intcode INT8U SEG_CODE[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};code INT8U array[]={2,0,1,5...
PCB_触摸延时开关
11月17日
#include<stdio.h>#include<stdlib.h>#include<time.h>int main(){ int n1,n2,answer; srand(time(NULL)); n1=0+rand()%100; n2=0+rand()%1...
GD库处理图片文字水印/图片水印/图片压缩
<?php require 'image.GD.class.php'; $img_url = 'image/1.jpg';  ...
Python正则采集邮箱脚本
def regcontent(urlstr): respose=urllib.request.urlopen(urlstr) html=respose.read() f=re.compile(r'\d{3,12}@.{2,3}.com') items=f...
Bt种子转磁力链
test.php include 'BEncode.php';include 'BDecode.php'; $torrent_content = file_get_contents('filename.torrent'); $desc = BDecode($torrent_content);$in...
mysql 12条入门语句
连接到数据库服务器 mysql-h地址-u用户名-p密码;创建数据库 createdatabase库名;查看所有库 showdatabases;选择目标库 use库名;删除数据库 drop...
字符串的拆分与合并
拆分字符串可以使用explode('拆分字符',文本);合并字符串可以使用implode(数组,'合并字符');<?php$str='php,linux,mysql';$arr=explode(',',$str);//返回的类型为数组implode($arr,',');?>...
截取字符串
substr(文本,起始位置,结束位置)<?php$str = 'tommrow is another day';substr($str,0,3);substr($str,0,-3);//负数代表,文本结束位置从后往前数?>...
替换字符串
替换一个字符串可以用str_replace('替换的内容','用于替换的内容',数据)<?php$str ='hi,fuck';str_replace('fuck','f**k';$str);?>替换多个字符串可以用strtr(数据,array('参数1'=>'值1','参数2'=>'值2...
Powered By Cheug's Blog
Copyright Cheug Rights Reserved.