This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
# <类型>: (类型的值见下面描述) <主题> (最多50个字) | |
# 解释为什么要做这些改动 | |
# |<---- 请限制每行最多72个字 ---->| | |
# 提供相关文章和其它资源的链接和关键字 | |
# 例如: Github issue #23 | |
# --- 提交 结束 --- | |
# 类型值包含 |
# <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
- For your local dev, create a
Dockerfile
that is based on your production image and simply installxdebug
into it. Exemple:
FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
/** | |
* Mass (bulk) insert or update on duplicate for Laravel 4/5 | |
* | |
* insertOrUpdate([ | |
* ['id'=>1,'value'=>10], | |
* ['id'=>2,'value'=>60] | |
* ]); | |
* | |
* | |
* @param array $rows |
Nice answer on stackoverflow to the question of when to use one or the other content-types for POSTing data, viz. application/x-www-form-urlencoded
and multipart/form-data
.
“The moral of the story is, if you have binary (non-alphanumeric) data (or a significantly sized payload) to transmit, use multipart/form-data
. Otherwise, use application/x-www-form-urlencoded
.”
Matt Bridges' answer in full:
The MIME types you mention are the two Content-Type
headers for HTTP POST requests that user-agents (browsers) must support. The purpose of both of those types of requests is to send a list of name/value pairs to the server. Depending on the type and amount of data being transmitted, one of the methods will be more efficient than the other. To understand why, you have to look at what each is doing
#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
class BatchController < ApplicationController | |
# Public: a proposal for a batch request endpoint implementation in Rails, inspired | |
# by Facebook's Batch API (http://developers.facebook.com/docs/reference/api/batch/). | |
# If this makes sense technically, a Rails engine gem will be forthcoming :) | |
# | |
# Batch requests take the form of a series of REST API requests, | |
# each containing the following arguments: | |
# url - the API endpoint to hit, formatted exactly as you would for a | |
# regular REST API request (e.g. leading /, etc.) | |
# method - what type of request to make -- GET, POST, PUT, etc. |
[ | |
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" }, | |
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" } | |
] |