上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 28 下一页
摘要: Python中内存是如何管理的? Python memory is managed by Python private heap space. All Python objects and data structures are located in a private heap. The prog 阅读全文
posted @ 2017-08-23 14:56 Zoe233 阅读(683) 评论(0) 推荐(0) 编辑
摘要: Python是怎么解释的? Python language is an interpreted language. Python program runs directly from the source code. It converts the source code that is writt 阅读全文
posted @ 2017-08-23 13:33 Zoe233 阅读(716) 评论(0) 推荐(0) 编辑
摘要: pickling 和unpickling是什么? Pickle module accepts any Python object and converts it into a string representation and dumps it into a file by using dump f 阅读全文
posted @ 2017-08-22 13:44 Zoe233 阅读(705) 评论(0) 推荐(0) 编辑
摘要: PEP 8是什么? PEP 8 is a coding convention, a set of recommendation, about how to write your Python code more readable. PEP 8是一种编码规范和建议,关于如何编写您的Python代码,使 阅读全文
posted @ 2017-08-22 11:58 Zoe233 阅读(457) 评论(0) 推荐(0) 编辑
摘要: Python是什么?使用Python的好处是什么? 答: Python is a programming language with objects, modules, threads, exceptions and automatic memory management. The benefits 阅读全文
posted @ 2017-08-22 11:18 Zoe233 阅读(1404) 评论(0) 推荐(0) 编辑
摘要: 一、前言 不同程序之间实现通信的方法? A.通过不同程序之间建立socket,实现通信。实际应用适用于使用broker,如RabbitMQ,ZeroMQ. B.通过Json,Pickle,利用文件的写入和读取实现不同程序之间的通信,但是效率低。 C.通过在不同的程序之间加入一个中间代理程序,中间代理 阅读全文
posted @ 2017-08-22 10:42 Zoe233 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 符串如果直接全部都是utf-8编码,每个汉字有3个字节,每个英文有1个字节,1 bytes=8 bit。 先将字符串通过ord()转换为ascii码,再通过bin()将其转换为二进制。 阅读全文
posted @ 2017-08-22 09:55 Zoe233 阅读(2189) 评论(0) 推荐(0) 编辑
摘要: 应用场景:在某大型互联网公司,有上亿的用户,要统计当前用户的在线人数和在线用户id,最快的实现方法是什么? 答:一般情况下,我们都使用数据库字段在用户登陆状态发生变更时进行变更,查找在线人数和在线用户id都是用select的方式。但是这种方式在实际中,调取速度非常慢,效率比较低,时效性差。 在red 阅读全文
posted @ 2017-08-21 17:10 Zoe233 阅读(449) 评论(0) 推荐(0) 编辑
摘要: 一、缓存数据库介绍 NoSQL(NoSQL = Not Only SQL ),意即“不仅仅是SQL”,泛指非关系型的数据库,随着互联网web2.0网站的兴起,传统的关系数据库在应付web2.0网站,特别是超大规模和高并发的SNS类型的web2.0纯动态网站已经显得力不从心,暴露了很多难以克服的问题, 阅读全文
posted @ 2017-08-18 10:07 Zoe233 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 一、前提 Python中的队列: 1.线程QUEUE 线程队列不能跨进程,只是单线程下的多个线程间的数据交互 2.进程QUEUE 支持父进程于子进程进行交互,或者同属于同一父进程下的多个子进程进行交互。 因此,两个独立的程序之间是不能使用Python中的QUEUE实现交互。(因为每个程序是独立的,是 阅读全文
posted @ 2017-08-17 16:02 Zoe233 阅读(515) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 28 下一页