doclinzh.com
C++入门探索实践 | Doclinzh 的 Blog
http://www.doclinzh.com/2016/07/23/cpp_start
Cout sizeof(c ) endl;. Cout c ',' &c ',' sizeof(c) endl;. Cout c1 ',' &c1 ',' sizeof(c1) endl;. Cout &c1 1 "," c1 1 cp2 1 endl;. 在这行分别做了三个指针/地址的加法运算,可以观察到当对数组名做 1 时,地址值加上数组单个元素的长度值 第二个与第三个加法运算。 Cout cp ',' sizeof(cp) endl;. Int * a [4];. Include iostream using namespace std; int main() { int * a;/ pointer int * b, c;/ pointer,int int d, * e;/ int, pointer int *f, *g;/ pointer, pointer / (int *) i, j; error! Char * str1 = new char[4] {'a', 'b', 'c', 0}; cout str1 endl; cout strlen(str1) endl; str1[1] = 0;...
doclinzh.com
Doclinzh 的 Blog | Doclinzh 的 Blog
http://www.doclinzh.com/section/cpp
Thanks to mingluan Zhang. Using a theme provided by blog.pinaxproject.com.
doclinzh.com
Doclinzh 的 Blog | Doclinzh 的 Blog
http://www.doclinzh.com/section/1
目前使用的服务器结构为: Nginx uWSGI supervisor,以及其他组件,但一直对整个结构不能很好理解,现对其整合学习。 Thanks to mingluan Zhang. Using a theme provided by blog.pinaxproject.com.
doclinzh.com
Python内存管理及变量相关内容 | Doclinzh 的 Blog
http://www.doclinzh.com/2016/05/05/python_mem
在 Python核心编程 第一章有关Python介绍时候就有提到,不同于C/C ,Python解释器负责了绝大多数的内存管理,希望使程序员全神贯注于业务逻辑。 X = 314 y = x. Python的缓存 a = 1 b = 1 a f = 4.3 b f = 4.3 #简单浮点类 不可变类型 的更改 c = 1.1 d = c c = 2.1 #可变对象 list1 = [1,2,3] list2 = list1 list1[0] = 0 #可变对象整体更改时 list3 = [1.2] list4 = list3 list4 = [2,3]. 在小整型 可能是-1 100 中Python都会这样做,考虑整型本身是不可变类型,暂时在项目开发中未发现受到缓存特性影响的情况。 对于可变类型对象中的不可变对象 a = 1.1 b = 1.2 li = [a, b] a = 2.1. A = 1 def foo(): global a #global a = 2错误,不可同时对变量赋值 global b a = 2 b = 3 foo() print a,b # # # 2,3.
doclinzh.com
Origin | Doclinzh 的 Blog
http://www.doclinzh.com/2016/04/18/origin
The Zen of Python, by Tim Peters. Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Special cases aren’t special enough to break the rules. Although practicality beats purity. Errors should never pass silently. In the face of ambiguity, refuse the temptation to guess. There should be one– and preferably only one –obvious way to do it. Now is better than never.
doclinzh.com
Django中与网络服务有关部分初探 | Doclinzh 的 Blog
http://www.doclinzh.com/2016/04/18/django
Python manage.py runserver. Usr/bin/env python import os import sys if name = main : os.environ.setdefault(DJANGO SETTINGS MODULE, server.settings) from django.core.management import execute from command line execute from command line(sys.argv). 当执行runserver时,首先解析参数,并通过settings中的WSGI APPLICATION获取wsgi handler,并生成WSGIServer对象接受用户请求。 Django.core.servers.basehttp. 1请求首先到达Request Middlewares,中间件做预处理或直接返回 2.URL Conf通过. Thanks to mingluan Zhang. Using a theme provided by blog.pinaxproject.com.
doclinzh.com
Nginx与uWSGI基本理解 | Doclinzh 的 Blog
http://www.doclinzh.com/2016/04/18/nginxuwsgi
目前使用的服务器结构为: Nginx uWSGI supervisor,以及其他组件,但一直对整个结构不能很好理解,现对其整合学习。 它是一个Web服务器 如nginx 与应用服务器 如uWSGI服务器 通信的一种规范. The web client - the web server - the socket - uWSGI - Django. Uwsgi] vhost = true plugins = python #socket 文件 socket = /tmp/server.sock master = true enable-threads = true #最大进程数 processes = 6 #虚拟环境 virtualenv = /www/server/environment/ #django 项目地址 chdir = /www/server/web/ #django's wsgi 文件 wsgi-file = /www/server/web/server/wsgi.py. 应用层 - socket - 传输层 - 网络层 - 链路层 - 物理层.
doclinzh.com
部署django-websocket-redis examples | Doclinzh 的 Blog
http://www.doclinzh.com/2016/07/28/django-websocket-redis-examples
项目地址 https:/ github.com/jrief/django-websocket-redis. 文档地址 http:/ django-websocket-redis.readthedocs.io/en/latest/. Sudo apt-get install python-dev libpcre3 libpcre3-dev build-essential libssl-dev. Sudo apt-get install nginx. Sudo apt-get install supervisor. Sudo pip install uwsgi / 使用apt-get安装会出现版本过低以及ssl模块disabled等问题. Sudo apt-get install redis-server. Sudo apt-get install python-virtualenv. Pip install -r requirements.txt -i http:/ pypi.douban.com/simple. TIME ZONE = 'Asia/Shanghai'. Server { listen 8...
doclinzh.com
Doclinzh 的 Blog | Doclinzh 的 Blog
http://www.doclinzh.com/section/python
在 Python核心编程 第一章有关Python介绍时候就有提到,不同于C/C ,Python解释器负责了绝大多数的内存管理,希望使程序员全神贯注于业务逻辑。 Thanks to mingluan Zhang. Using a theme provided by blog.pinaxproject.com.
SOCIAL ENGAGEMENT