共同点在于:都有 ToUserName,FromUserName,CreateTime,MsgType, 这四个字段。
在信息接收方面,分为“普通消息”、“事件推送”,“语音识别结果(微信用户发送语音,微信服务器翻译成文本,只不过比语音消息多一个识别结果字段:Recognition)”。
- 文本消息(通过“Content”关键字来获取文本内容,这点比较重要,也是使用比较多的场合)
- 图片消息
| // Created by STRd6 | |
| // MIT License | |
| // jquery.paste_image_reader.js | |
| (function($) { | |
| var defaults; | |
| $.event.fix = (function(originalFix) { | |
| return function(event) { | |
| event = originalFix.apply(this, arguments); | |
| if (event.type.indexOf('copy') === 0 || event.type.indexOf('paste') === 0) { | |
| event.clipboardData = event.originalEvent.clipboardData; |
| source 'https://rubygems.org' | |
| gem 'activesupport' | |
| gem 'rspec-rails' |
| /** | |
| * Clipboard.js | |
| * | |
| * Copyright, Moxiecode Systems AB | |
| * Released under LGPL License. | |
| * | |
| * License: http://www.tinymce.com/license | |
| * Contributing: http://www.tinymce.com/contributing | |
| */ |
| var page = require('webpage').create(); | |
| page.onConsoleMessage = function (msg) { | |
| console.log('From Page Console: '+msg); | |
| }; | |
| page.onInitialized = function() { | |
| page.evaluate(function () { | |
| "use strict"; | |
| //The Referrer we want to set |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rvm' # for rvm support. (http://rvm.io) | |
| set :domain, 'esdb.cn' | |
| set :identity_file, '/User/somebody/.ssh/somebody.pem' | |
| set :deploy_to, '/home/ubuntu/apps/xxx.com' | |
| set :repository, 'ssh://git@bitbucket.org/somebody/xxx.com.git' | |
| set :branch, 'master' |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| class Company | |
| has_many :users | |
| end | |
| class User | |
| delegate :name, to: :company, prefix: true | |
| # User.last.company_name | |
| belongs_to :company |
| // ------------ | |
| // counterStore.js | |
| // ------------ | |
| import { | |
| INCREMENT_COUNTER, | |
| DECREMENT_COUNTER | |
| } from '../constants/ActionTypes'; | |
| const initialState = { counter: 0 }; |
| # Activate the gem you are reporting the issue against. | |
| gem 'activerecord', '4.0.0' | |
| require 'active_record' | |
| require 'minitest/autorun' | |
| require 'logger' | |
| # This connection will do for database-independent bug reports. | |
| ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
| ActiveRecord::Base.logger = Logger.new(STDOUT) |
共同点在于:都有 ToUserName,FromUserName,CreateTime,MsgType, 这四个字段。
在信息接收方面,分为“普通消息”、“事件推送”,“语音识别结果(微信用户发送语音,微信服务器翻译成文本,只不过比语音消息多一个识别结果字段:Recognition)”。