摘要:
冒泡:bubbleSort(void* data[],int n, int (*cmpPro)(void* ,void*)){ void *temp=NULL; for(int i=0;i<n-1;i++) for(int j=0;j<n-i-1;j++) { if(( cmpPro(data[j] 阅读全文
摘要:
'''整型,浮点型,字符串都是不许修改的对变量赋值并没有修改数据,而是重新产生了一块新空间存放新赋值的数据''' #fruit = "apple,banana,peer,orange"#print(len(fruit))#print(id(fruit)) #fruit += ",lemon"#pri 阅读全文
摘要:
#-*-coding:utf-8-*- import socketimport threadingimport timeimport RPi.GPIO as GPIO#全局变量msg = ""data = ""#线程锁mutex = threading.Lock()changed = False d 阅读全文
摘要:
# !/usr/bin/python#coding:utf-8 import RPi.GPIO as GPIOimport time Trig = 17Echo = 27#设置编码模式GPIO.setmode(GPIO.BCM)GPIO.setup(Trig, GPIO.OUT, initial = 阅读全文