• 1 当日内容概要

  • 2 内容回顾

  • 3 Git版本控制之多人协同开发

  • 4 Git版本控制之fork

  • 5 版本控制之其他

  • 6 Redis之字典基本操作

  • 7 Django中操作Redis

  • 8 Django缓存

  • 9 小补充:Rest Framework访问频率限制

1 当日内容概要

1.1 Git ;

1.2 Redis;

1.3 修改代码;

2 内容回顾

2.1 Git;

  2.1.1 Git开发时候,出Bug之后如何解决?

  2.1.2 Git rebase的作用?不出现分叉!

  2.1.3 Git的操作命令;

  • git init
  • git add .
  • git commit -m "初次提交代码"
  • git config --global user.email "tqtl@tqtl.org"
  • git config --global user.name "cuxiiaozhao"
  • git branch
  • git branch dev
  • git branch master
  • git checkout dev
  • git pull origin dev
  • git push origin dev

  2.1.4 Redis是什么?

  • 用于操作计算机内存的软件;
  • 可以做数据持久化——AOF、RDB;
  • 相当于是一个非常非常大的“字典”;
  • Redis是一个单进程、单线程,但是因为数据放在内存中,速度也能保证很快!!!

  2.1.5 使用连接池进行连接Redis(以后所有的软件基本都是使用“连接池”的概念);

  • 使用连接池——本质是维护一个已经和服务端连接成功的socket,以后再次发送数据时候,直接获取一个socket,然后直接send data;

  2.1.6 路飞学城的表结构

  • 课程——大类、子类、学位课、奖学金、讲师、专题课、课程详细、大纲、作业、章节、课时、价格策略;
  • 深科技——文章来源、文章、用户、token、评论、收藏;

  2.1.7 支付宝支付

  • 加密方式:rsa;
  • 公钥私钥——商户私钥、支付宝公钥;
  • 订单提交成功后,服务器断电宕机,成功:return HttpResponse('success');

  2.1.8 Rest Framework 框架

  2.1.9 数据库特点?

  • 分页为什么越往后翻页越慢——限制页数、记录当前页的最大ID、最小ID;
  • 错误答案——扫描索引表、再去数据库中获取数据;

  2.1.10 缓存数据库Redis

3 Git版本控制之多人协同开发

3.1 多人协同开发;

  3.1.1 允许他人操作程序代码——合作者、创建组织organization;

  3.1.2 工作中常用到的分支——master、dev、cuixiaozhao、lijingping

  3.1.3 协同开发的时候,规则——小组协同在一起进行合并;合并时间建议1~2天合并一下,最好一天合并一次;

  3.1.4 问题:先拉取代码,再提交代码;

TQTL911@DESKTOP-U8JDGPP MINGW64 /e/TQTL/Practice/三里屯/dbhot (dev)
$ git push origin dev
To https://github.com/tqtl911/dbhot.git
! [rejected] dev -> dev (fetch first)
error: failed to push some refs to 'https://github.com/tqtl911/dbhot.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

  3.1.5 对代码进行Review;

  • Who Do it?开发组长,技术导师;

  • How Do it?创建Review分支;

4 Git版本控制之fork(如何提升自己)

4.1 找优秀的代码下载下来,“读源码”;

4.2 几个人做一个通用性的ORM;

4.3 接个人一起做一个开源项目并发布于Github;

4.4 发现著名开源项目的Bug,比如Django、Flask并给出修复建议;

4.5 Fork他人的项目;

5 版本控制之其他

5.1 给别人的代码贡献力量,比如Github如何做?先fork,再pull request;

5.2 其他;

  5.2.1 pull或者push需要每次输入用户名和密码;

  5.2.2 无需反复输入用户名和密码;

  • git remote add origin https://用户名:密码@github.com/cnstack/Tyrion.git(不推荐)
  • Use SSh:git@github.com:cnstack/Tyrion.git(推荐基于公钥私钥的方法)

5.3 .gitignore文件的引入,忽略不需要提交的文件;

https://github.com/github/gitignore/blob/master/Python.gitignore

5.4 创建项目的时候,指定忽略类型;

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class # C extensions
*.so # Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST # PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec # Installer logs
pip-log.txt
pip-delete-this-directory.txt # Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/ # Translations
*.mo
*.pot # Django stuff:
*.log
local_settings.py
db.sqlite3 # Flask stuff:
instance/
.webassets-cache # Scrapy stuff:
.scrapy # Sphinx documentation
docs/_build/ # PyBuilder
target/ # Jupyter Notebook
.ipynb_checkpoints # pyenv
.python-version # celery beat schedule file
celerybeat-schedule # SageMath parsed files
*.sage.py # Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/ # Spyder project settings
.spyderproject
.spyproject # Rope project settings
.ropeproject # mkdocs documentation
/site # mypy
.mypy_cache/

5.5 项目版本release的引入;

  5.5.1 git tag -a v1.0 -m "初次创建第一个版本";

  5.5.2 git push origin --tags;

  5.5.3 练习要求;

  • 创建项目;
  • 邀请成员参与github
  • 各自创建以个人姓名命名的项目分支;
  • 修改代码,进行提交;
  • 分享项目的URL地址;
TQTL911@DESKTOP-U8JDGPP MINGW64 /e/TQTL/Practice/崔晓昭/dbhot (dev)
$ git push origin --tags
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 187 bytes | 187.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To https://github.com/cnstacks/dbhot.git
* [new tag] v1.0 -> v1.0 TQTL911@DESKTOP-U8JDGPP MINGW64 /e/TQTL/Practice/崔晓昭/dbhot (dev)

6 Redis之字典基本操作

6.1 Redis的特点:a.持久化;b.单线程、单进程;c.5大数据类型;

redis = {
k1:'',字符串
k2:[1,2,3,4,5,6,7],列表
k3:{1,2,3,4},集合
k4:{name :123,age:26},字典
k5:{('alex',60),('eva-j',80),('rt',70),},有序集合
}

6.2 使用字典:

  6.2.1 字典的基本操作;

  6.2.2 慎重使用hgetall,优先使用hscan_iter

  6.2.3 注意事项:不支持字典列表的多层级嵌套,仅支持第一层;

s2.py;

#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# __Author__:TQTL911
# Version:python3.6.6
# Time:2018/8/30 22:57 import redis pool = redis.ConnectionPool(host='47.95.121.154', port=6379, password='Ab123456.', max_connections=1000)
conn = redis.Redis(connection_pool=pool)
conn.set('foo', 'Bar')
# 字典的操作;
'''
redis = {
k4:{
username:alex,
age:18
}
}
'''
# conn.hset('k4', 'username', 'alex')
# conn.hset('k4', 'age', '18') val = conn.hget('k4', 'username')
print(val) # b'alex' vals = conn.hgetall('k4')
print(vals) # {b'username': b'alex', b'age': b'18'} # Redis中的计数器;
print(conn.hget('k4', 'age'))
# conn.hincrby('k4','age',amount=1)
conn.hincrby('k4', 'age', amount=-1)
print(conn.hget('k4', 'age'))
'''
b'18'
b'19'
'''
# 如果Redis的k4对应的字典中,有1000w的数据,请打印所有数据; # 方法1:从Redis拿到数据之后,服务器内存无法承受,爆栈!
result = conn.hgetall('k4') #
print(result) # {b'username': b'alex', b'age': b'19'} # 方法2:慎重使用hgetall方法;
ret = conn.hscan_iter('k4', count=100)
for item in ret:
print(item)

7 Django中操作Redis

7.1 Redis的应用

7.2 Django中使用Redis;

  7.2.1 自定义redis连接池;

views.py.bak

from django.shortcuts import render,HttpResponse
import redis
from utils.redis_pool import POOL
# Create your views here.
def index(request):
conn = redis.Redis(connection_pool=POOL)
# 设置值;
conn.hset('kkk', 'age',18)
return HttpResponse('设置成功') def order(request):
conn = redis.Redis(connection_pool=POOL)
conn.hget('kkk','age')
return HttpResponse('获取成功')

utils/redis_pool.py;

#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# __Author__:TQTL911
# Version:python3.6.6
# Time:2018/8/31 11:47
import redis
# 创建连接池(单例模式);
import redis
POOL = redis.ConnectionPool(host='47.205.221.154', port=6379, password='Ab123456.', max_connections=1000)

  7.2.2 使用第三方组件,如Django中的pip3 install django-redis;

Microsoft Windows [版本 10.0.17134.1]
(c) 2018 Microsoft Corporation。保留所有权利。 (venv) C:\Users\TQTL911\PycharmProjects\s9day110>pip install redis
Collecting redis
Using cached https://files.pythonhosted.org/packages/3b/f6/7a76333cf0b9251ecf49efff635015171843d9b977e4ffcf59f9c4428052/redis-2.10.6-py2.py3-none-any.whl
Installing collected packages: redis
Successfully installed redis-2.10.6
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command. (venv) C:\Users\TQTL911\PycharmProjects\s9day110>pip install django-redis
Collecting django-redis
Downloading https://files.pythonhosted.org/packages/d5/3c/184b7a962f2aa5e49388ced9664a308b8d1b9864dc6afe7adb2a8302b5c4/django_redis-4.9.0-py2.py3-none-any.whl
You should consider upgrading via the 'python -m pip install --upgrade pip' command. (venv) C:\Users\TQTL911\PycharmProjects\s9day110>pip install django-redis
Collecting django-redis
Downloading https://files.pythonhosted.org/packages/d5/3c/184b7a962f2aa5e49388ced9664a308b8d1b9864dc6afe7adb2a8302b5c4/django_redis-4.9.0-py2.py3-none
-any.whl
Requirement already satisfied: redis>=2.10.0 in c:\users\tqtl911\pycharmprojects\s9day110\venv\lib\site-packages (from django-redis) (2.10.6)
Requirement already satisfied: Django>=1.11 in c:\users\tqtl911\pycharmprojects\s9day110\venv\lib\site-packages (from django-redis) (2.1)
Requirement already satisfied: pytz in c:\users\tqtl911\pycharmprojects\s9day110\venv\lib\site-packages (from Django>=1.11->django-redis) (2018.5)
Installing collected packages: django-redis
Successfully installed django-redis-4.9.0
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command. (venv) C:\Users\TQTL911\PycharmProjects\s9day110>

  7.2.3 settings.py中的redis相关配置(default、back);

"""
Django settings for s9day110 project. Generated by 'django-admin startproject' using Django 2.1. For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
""" import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = ')jv_quydi65b@$3rl^$wsu94g^&vuxsjgpylpui_=js4-o^ni$' # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'app01.apps.App01Config',
] MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
] ROOT_URLCONF = 's9day110.urls' TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')]
,
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
] WSGI_APPLICATION = 's9day110.wsgi.application' # Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
} # Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
] # Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/ STATIC_URL = '/static/' # Redis配置;
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"CONNECTION_POOL_KWARGS": {"max_connections": 1000}
# "PASSWORD":"密码",
}
},
"back": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"CONNECTION_POOL_KWARGS": {"max_connections": 1000}
# "PASSWORD":"密码",
}
},
}

  7.2.4 django-redis的使用方法;

views.py;

import redis
from django.shortcuts import render, HttpResponse
from django_redis import get_redis_connection # Create your views here.
def index(request):
conn = get_redis_connection("default")
return HttpResponse('设置成功') def order(request):
conn = get_redis_connection("back")
return HttpResponse('获取成功')

8 Django缓存

8.1 让程序加上全站缓存;

8.2 全站缓存;

8.3 单视图缓存(基于装饰器做)from django.views.decorators.cache import cache_page;

import redis
from django.shortcuts import render, HttpResponse
from django_redis import get_redis_connection
import time
from django.views.decorators.cache import cache_page # Create your views here.
@cache_page(60 * 15)
def index(request):
ctime = str(time.time())
return HttpResponse(ctime) def order(request):
return render(request, 'order.html')

8.4 局部页面做缓存;

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>order</title>
<style type="text/css"> </style>
</head>
<body>
<h1>cuixiaozhao</h1>
<div>
cuixiaoshan
</div>
{% cache 10 cuixiaosi %}
<di>
cuixiaolei
</di>
{% endcache %}
</body>
</html>

8.5 Redis的同类软件Memcache(不支持持久化),但是没有Redis优秀;

settings.py;

"""
Django settings for s9day110 project. Generated by 'django-admin startproject' using Django 2.1. For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
""" import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = ')jv_quydi65b@$3rl^$wsu94g^&vuxsjgpylpui_=js4-o^ni$' # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'app01.apps.App01Config',
] MIDDLEWARE = [
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
] ROOT_URLCONF = 's9day110.urls' TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')]
,
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
] WSGI_APPLICATION = 's9day110.wsgi.application' # Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
} # Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
] # Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/ STATIC_URL = '/static/' # Redis配置;
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"CONNECTION_POOL_KWARGS": {"max_connections": 1000}
# "PASSWORD":"密码",
}
},
"back": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"CONNECTION_POOL_KWARGS": {"max_connections": 1000}
# "PASSWORD":"密码",
}
},
} # 自定义的文件缓存;
# CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
# 'LOCATION': '/var/tmp/django_cache',
# }
# } # 基于Memcache做缓存;
# CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
# 'LOCATION': '127.0.0.1:11211',
# }
# }

9 小补充:Rest Framework访问频率限制

9.1 Rest Framework框架访问频率限制,推荐大家使用Redis、Memcache;

Python-S9——Day110-Git继续的更多相关文章

  1. Python+Pytest+Allure+Git+Jenkins接口自动化框架

    Python+Pytest+Allure+Git+Jenkins接口自动化框架 一.接口基础 接口测试是对系统和组件之间的接口进行测试,主要是效验数据的交换,传递和控制管理过程,以及相互逻辑依赖关系. ...

  2. Python的高级Git库 Gittle

    Gittle是一个高级纯python git 库.构建在dulwich之上,提供了大部分的低层机制 Gittle是一个高级纯python git 库.构建在dulwich之上,提供了大部分的低层机制. ...

  3. python学习笔记——git的安装及使用

    1 git的基本介绍 git 是目前世界上最先进的分布式版本哦内阁制系统 详细信息可参考廖雪峰的官方网站中的Git教程 比git功能更加强大的有TortoiseGit和Tortoise SVN,具体安 ...

  4. 利用python代码操作git

    python操作git 安装模块 pip3 install gitpython 基本使用 import os from git.repo import Repo # 创建本地路径用来存放远程仓库下载的 ...

  5. Python增强下git那长长的指令

    场景 现如今有点规模的公司都使用GitFlow模式进行分支管理.虽然插件给我们带来了非常大的方便,但切换分支.找分支.起分支还是那么的麻烦 需求 在社会主次国家,每个生活在底层的劳动人民,他们默默的工 ...

  6. python爬虫之git的使用(windows下pycharm使用)

    相信很多同学学会了git或者github以后都不知道怎么跟windows上的pycharm连在一起工作,那么下面我们开始介绍简单的安装和使用方法. 一.安装 1.首先你的有一个github的账户.注册 ...

  7. python爬虫之git的团队协作

    一.Git实践: commit,push,pull,status,add基本是最常用的几个命令. 1.首先我在github上创建了一个项目,然后我在本地的文件建立了一个普通的目录(git_data). ...

  8. python爬虫之git的使用(origin说明)

    1.首先我们回忆两个命令 #git remote add origin 远程仓库链接 #git push -u origin master 我们一起看看这个命令,git是git的一级命令,push就是 ...

  9. python爬虫之git的使用(coding.net的使用)

    1.注册coding.net账号,然后登陆. 2.创建项目 套路和github都一样. 1.1.我们在远程仓库上创建了一个仓库,这样的话,我们需要在本地随便建立一个文件普通文件夹,进去以后,执行git ...

  10. python爬虫之git的使用(github的使用)

    上面博文中我们简单的了解了一下基本的git操作,但是我们都是将代码放到了本地的仓库里面,但是如果我们是一个团队开发的话,肯定不会放到每个人的本地,必须得有个统一的地方存放代码,国外的大家都在使用git ...

随机推荐

  1. 画报表框架——Echarts.js

    官网:http://echarts.baidu.com/index.html ————————————————————————————————— 先看看我做的第一个柱状图形报表 ——————————— ...

  2. 服网LNMP集群-1.0.5

    平台: arm 类型: ARM 模板 软件包: haproxy linux mysql nginx application server arm basic software fuwang infra ...

  3. ADS主要仿真器介绍

    ADS主要仿真器介绍        ADS ( Advanced Design System ) 是美国Agilent公司推出的电路和系统分析软件,它集成多种仿真软件的优点,仿真手段丰富多样,可实现包 ...

  4. 新版graylog2安装过程

    Graylog是一个开源的 log 收容器,背后的储存是搭配 mongodb,而搜寻引擎则由 elasticsearch 提供.以前版本主要有两个部分集合而成 server 与 web interfa ...

  5. .net reflector 的缺陷

    .net reflector是一个反编译DLL的工具,在安装后如果电脑上有VS也会同时安装到VS里面,但是他是收费的,虽然反编译的效果很好,但是运行VS2013时(或许其他版本也有这样的问题)如果项目 ...

  6. selenium显示等待解决浏览器未加载完成查找控件的问题

    问题描述:wap版支付成功后,跳转到支付成功页,查找的元素已出现,如图的:元素1,元素2,但是提示查找的元素超时,失败,并且每到这个页面都会报页面超时,不能查找到页面元素 原始代码: try{ op. ...

  7. CUDA:Supercomputing for the Masses (用于大量数据的超级计算)-第七节

    第七节:使用下一代CUDA硬件,快乐加速度 原文链接 Rob Farber 是西北太平洋国家实验室(Pacific Northwest National Laboratory)的高级科研人员.他在多个 ...

  8. 基于 Nginx && Lua 的简易CC防护方案

    零.前言 1.CC攻击简述 CC攻击(Challenge Collapsar)是常见网站应用层攻击的一种,目的是消耗服务器资源,降低业务响应效率:极端情况会让站点无法正常提供服务: 2.本文要点 旨在 ...

  9. 谭浩强 c++程序设计第一章课后习题 第7题

    #include <iostream> using namespace std; int main() { int a,b,c; int f(int x,int y,int z);//这是 ...

  10. 1037: [ZJOI2008]生日聚会Party

    Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 3121  Solved: 1858[Submit][Status][Discuss] Descript ...