1 Xcq007

尚未进行身份认证

暂无相关描述

等级
TA的排名 37w+

应届生该如何找工作?

没有工作经验怎么办呢?还要求要会各种各样的技术。

2019-07-26 08:24:21

搭建MySQL主从

搭建主从#将主服务器的数据备份到从服务器上**#好处:**1.读写分离,2.数据备份,3.负载均衡#配置主从同步的基本步骤:1.在主服务器上,必须开启二进制日志机制和配置一个独立的ip2.在每一个从服务器上,配置一个唯一的id,创建一个用来专门复制主服务器数据的账号3.在开始复制进程之前,在主服务器上记录二进制文件的位置信息4.如果在开始复制之前,数据库中已有数据,就必须创建一个数据...

2018-11-18 11:13:26

有道翻译——爬取

输入英文从有道翻译网址爬取js数据#coding=utf-8importurllibimporturllib2fanyi_url='http://fanyi.youdao.com/translate?smartresult=dict&smartresult=rule'head={'Accept':'application/json,text/java...

2018-09-19 10:56:08

用户输入关键字,爬取百度贴吧

爬取百度贴吧#coding=utf-8importurllib2importurllibdefloadPage(url,filename):'''作用:根据url发送请求,获取服务器响应文件url:需要爬取的url地址filename:处理文件名'''head={'User-Agent':...

2018-09-18 16:21:42

binary search in Python

binarysearchdefbinary_search(list_02,item):n=len(list_02)ifn>=1:mid=n//2iflist_02[mid]==item:returnTrueelifitem<list_02[mid...

2018-08-27 16:59:50

merge sort in Python

mergesortdefmerge_sort(list_02):n=len(list_02)ifn<=1:returnlist_02mid=n//2left_li=merge_sort(list_02[:mid])right_li=merge_sort(list_02[mid:])...

2018-08-27 16:19:55

quick sort in Python

quicksortdefquick_sort(list_02,first,last):iffirst>=last:returnmid_val=list_02[first]low=firsthigh=lastwhilelow<high:whilelow<...

2018-08-27 15:06:12

shell sort in Python

shellsortdefshell_sort(list_02):gap=len(list_02)//2whilegap>0:foriinrange(gap,len(list_02)):whilei>0:iflist_02[i]<list_...

2018-08-26 16:57:07

insert sort in Python

insertsortdefinsert_sort(list_02):forjinrange(1,len(list_02)):foriinrange(j,0,-1):iflist_02[i]<list_02[i-1]:list_02[i],list_02[i-1...

2018-08-26 16:55:43

Selection sort in Python

Selectionsortdefselection_sort(list_02):forjinrange(len(list_02)-1):min_index=jforiinrange(j+1,len(list_02)):iflist_02[min_index]>list_02[i...

2018-08-25 14:11:41

Bubble sort in Pyton

Bubblesortdefbubble_sort(list_02):forjinrange(len(list_02)-1,0,-1):count=0foriinrange(0,j):iflist_02[i]>list_02[i+1]:lis...

2018-08-25 13:31:31

Queue in Python

QueueclassQueue():'''Queue'''def__init__(self):self.__list=[]defenqueue(self,item):'''Addanelementtothequeue'''self.__list.append(item)d...

2018-08-25 10:58:49

Deque in Python

DequeclassQueue():'''Queue'''def__init__(self):self.__list=[]defenqueue(self,item):'''Addanelementtothequeue'''self.__list.append(item)d...

2018-08-25 10:56:23

Stack in Python

StackclassStack():'''stack'''def__init__(self):self.__list=[]defpush(self,item):'''addanewelementtothetopofthestack'''self.__list.append(i...

2018-08-25 10:33:43

Double Link List

DoubleLinkListclassNode(object):'''thisisanode'''def__init__(self,elem):self.elem=elemself.next=Noneself.prev=NoneclassDoubleLinkList(object):...

2018-08-25 10:07:53

Single Circular Link List in Python

SingleCircularLinkListclassNode(object):'''thisisanode'''def__init__(self,elem):self.elem=elemself.next=NoneclassSingleCircularLinkList(object):'''...

2018-08-25 10:06:04

Single Link List in Python

SingleLinkListclassNode(object):'''thisisanode'''def__init__(self,elem):self.elem=elemself.next=NoneclassSingleLinkList(object):'''thisisaSingly...

2018-08-25 10:02:22

Remove duplicate list in Python

Methodonedefdistinct(list_1):list_2=set(list_1)list_3=list(list_2)print(list_3)defmain():list_1=[1,1,6,3,1,5,2]distinct(list_1)if__name__=='__main__':m...

2018-08-22 08:34:42

__getattrinute__ in Python

MethodofrestrictingattributeaccessclassGetAttribute():def__init__(self,name):self.name=namedef__getattribute__(self,item):print('sss')returno...

2018-08-21 11:02:48

File copy in Python

Filecopy#CopydatafunctiondefcopyData(old_file,new_file):whileTrue:fileData=old_file.read(1024)iflen(fileData)==0:breaknew_file.write(fileD...

2018-08-17 21:43:41

查看更多

勋章 我的勋章
    暂无奖章