Python :数据结构

LearnPython :数据结构       Python 数据结构基础¶ Ref: link My questions: dictionary -- 字典 : array -- 数组 list -- 列表 sequence -- 序列? 元组 -- tuple   1. dictionary¶ In [ ]:     2. sequence¶ Python有6个序列的内置类型,但最常见的是列表和元组。 Sequence Types -- str, unicode, list, tuple, buffer, xrange ref 序列都可以进行的操作包括*索引,切片,加,乘,检查成员 Python已经内置确定序列的长度以及确定最大和最小的元素的方法   2.1 list 列表¶ 列表是最常用的Python数据类型,它可以作为一个方括号内的逗号分隔值出现。 列表的数据项不需要具有相同的类型. 例如: In [2]: #!/usr/bin/python3 list1 = [‘Google’, ‘Runoob’, 1997, 2000]; list2 = [1, 2, 3, 4, 5, 6, 7 ]; print (“list1[0]: “, list1[0]) print (“list2[1:5]: “, list2[1:5])   list1[0]: Google list2[1:5]: [2, 3, 4, 5]   2.

READ MORE

Quick Search Articles in My Blog

 === Quickly Search Articles in My Blog: === 本文介绍了如何快速在主流搜索引擎搜索本专栏内文章的方法。 Use Google's Search :  press me  Use Bing.com : press me   Use Baidu Search: press me    Enjoy~ :)

READ MORE

文件查重工具 ultraCompare 和 UltraFinder 用法 (moved to https://sonictl.github.io)

UltraCompare 是一款文件内容比较工具,它可以对于文本、文件夹、二进制进行比较。可进行文本模式,文件夹模式以及二进制模式的比较,可对比较的文件、文件夹等进行合并,同步等操作。是进行比较操作的很好的工具。你可以用它来比较两个文本文件的不同,也可以比较以二进制的模式比较两个EXE 文件的不同,还可以用它来比较两个文件夹及其子文件夹内文件的不同。 最为文件管理系统的补充,UltraCompare Professional 可以追踪不同文件、目录和 .zip/.jar 档案之间的差异。文件比较功能包括同时对两个或三个文件进行文本及二进制比较,并能合并这些文件之间的差异。文件夹比较支持对本地/网络目录(并递归比较子目录)和 zip 档案进行比较,同时与文本/二进制模式类似,可以合并这些目录之间的差异。 UltraCompare 与 UltraEdit 或 UEStudio 自动集成,是您必不可少的一款工具。我们提供免费试用版;立即下载,开始追踪并合并源代码的差异。阅读本文时您可能已经在使用 UltraEdit,但可能尚未安装 UltraCompare Professional。您可能还未意识到这样一个工具的重要性或通用性。 您甚至可能已经使用了 UltraCompare Lite,但现在觉得这一小巧的比较程序对您的编辑目的来说功能不够强劲。UltraCompare Professional 以更为丰富的功能著称,可以对两个或三个文件或目录进行文件和文件夹比较,并带有合并功能、忽略选项、FTP 支持等。 下载:链接 Crack: Installation Instructions by softasm: 1- Open [uc_english.exe] for x86 or [uc_english_64.exe] for x64 and install the software.     You may need to "Patch the Host file" on the keygen at this time. 2- Close Internet connection and run the program. 3- Click on Help menu and select “Enter License Key” License ID: softasm.com

READ MORE

配置httpd(Apache)服务器

配置httpd(Apache)使其指向网页首页所在目录 1. apachectl 命令查看apache服务器信息     apachectl -t #语法检查 2. 查看httpd系统服务:     ll /etc/init.d/httpd    如果没有,参考:http://www.cnblogs.com/zzzhfo/p/5925786.html     chkconfig --list httpd #查看httpd服务的自启动状态 2. 将网页文件放到以下地址:     /var/www/html" 3. 设置开机启动:chkconfig chkconfig --list chkconfig --add httpd chkconfig httpd on 4. 启动服务:      /etc/init.d/httpd start      /etc/init.d/httpd stop #关闭服务 5. 查看服务状态:     netstat -anpt | grep httpd 6. 更多配置,见配置文件: /etc/httpd/conf/httpd.conf   CentOS firewall 对80等端口的block解除: on centos run this commands: iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

READ MORE

ubuntu上virtualbox无法找到usb设备【解决】

How to set up USB for Virtualbox? USB in different versions of Virtual Box For use of USB in Virtual Box 3.x you need a PUEL-version. From Virtual Box > 4.x USB 1.0 is supported in the OSE version installed from software center. For USB 2.0 or USB 3.0 (from Virtual Box > 5.x) we need to install an extension pack free for download from Oracle. This will make our Virtual Box a PUEL-Version (see this question on details on how to install Virtual Box from the Oracle repository). To change settings of a virtual machine needs the guest to be powered off.

READ MORE

try or install Ubuntu on MeegoPad T01

 Ref: Install Ubuntu on Meego Pad T01 with a Live ISO Image   MeegoPad T01 has recently been shown to boot Ubuntu and Android, but no installation disk had been provided so far. But thanks to deadhp1, there’s now a “beta” Ubuntu 14.10 image with MATE desktop environment available for download in order to try or install Ubuntu on MeegoPad T01, and other Intel Atom Bay Trail-T devices. Ubuntu MATE 14.10 Live ISO (Click to Enlarge) Before you decide to try or install the image, be aware that audio and Bluetooth are not working for now, but everything else should work, including hardware video decoding in Kodi.

READ MORE

Git 2-客户端命令on Linux:

Git客户端命令on Linux: 在此之前:Git 1-服务端搭建 Setting up a Git Server in CentOS 6.5 本地客户端操作的第一步,通常是从远程主机克隆一个版本库,这时就要用到git clone命令,但在自己搭建Git Remote Server的用法中,往往是从git remote add(添加远程主机)开始的。 本文与git clone相关的内容被放在第2点。 1. 管理远程主机 a.查看远程主机名 为了便于管理,Git要求每个远程主机都必须指定一个主机名,即远程主机在本地的一个代号?。git remote命令就用于管理主机名。 >> git remote >> git remote -v origin sonictl@x.x.x.x:/home/git_admin/project1 (fetch) origin sonictl@x.x.x.x:/home/git_admin/project1 (push) #使用-<span style="color: #000000;">v选项,显示远程主机的网址。 &gt;&gt;git remote show &lt;主机名&gt; # 查看主机详细信息:git remote show origin</span></span></span></span></span></pre>        ==相关命令== 远程主机的改名。git remote rename命令 >> $ git remote rename <原主机名> <新主机名> 添加远程主机。 git remote add命令 >> $ git remote add <主机名> <网址> >> $ git remote add origin tony@x.x.x.x:/home/git_admin/project1 删除远程主机。git remote rm命令 >> $ git remote rm <主机名> === 2.

READ MORE

Git 1-服务端搭建 Setting up a Git Server in CentOS 6.5

Setting up a Git Server in CentOS 6.5 Quick jump to: Create a git user account Install git. [root@svn ~]# yum install git Add the developers group, all git users will be part of this group. [root@svn ~]# groupadd developers Create the git user which will own all the repos. [root@svn ~]# useradd -s /sbin/nologin -g developers git_admin [root@svn ~]# passwd git_admin Changing password for user git. New password: git******** Retype new password:git******** passwd: all authentication tokens updated successfully. Update Permissions. [root@svn ~]# chmod 2770 /home/git_admin/

READ MORE

正则表达式-使用说明Regular Expression How To (Perl, Python, etc)

notepad++ wiki about regular expression 正则表达式-使用说明Regular Expression How To (Perl, Python, etc) https://docs.python.org/2/howto/regex.html#regex-howto For more: Linux Shell 通配符、元字符、转义符使用实例介绍(\后面跟实际字符: [0-9]\a  =匹配=> '0a', '1a', '9a'... ) https://docs.python.org/2/library/re.html https://regexone.com/ Learn Regular Expressions with simple, interactive exercises.     Quick Reference: The first metacharacters we’ll look at are [ and ]. They’re used for specifying a character class, which is a set of characters that you wish to match. Characters can be listed individually, or a range of characters can be indicated by giving two characters and separating them by a '-'.

READ MORE

一个全栈Web/移动App开发学习路径

HTML、CSS 和 JavaScript 网页开发的基本元素,包括HTML、CSS个JavaScript。本课程完全适合零基础的同学,当然如果你有相关开发经验更好。在课程开始呢,我们先探索与讨论HTML与CSS。然后我们将继续学习Javascript的基本组件,包括变量、数组、循环、事件和函数。最后,我们将探索更高级的Javascript控制元素,包括函数的高级用法,控制事件,数组处理以及DOM操作。 前端 Web 界面框架(Bootstrap)与工具(Nodejs\npm\Bower) Front-End JavaScript Frameworks: AngularJS(MVC, two-way data binding and angular directives and filters. angular controllers and scopes. UI routing and templates ,angular modules and services) 使用 Web 技术进行多平台移动 App 开发 Cordova,Ionic, 使用 NodeJS 进行服务器端开发 web servers,CRUD operations, NoSQL databases, in particular MongoDB and Mongoose,REST concepts and building a RESTful API,backend as a service (BaaS) approaches, 毕业项目 The Capstone project is the culmination of your journey through the Full Stack Web Development specialization. The Capstone project is aimed at building a fully functional front-end Application (both Web App designed using Bootstrap+AngularJS, and hybrid mobile app implemented using the Ionic framework) and full server-side implementation using Node.

READ MORE