QA Official

8. Mediator Pattern

https://qaofficial.com/post/2019/05/01/71110-8.-mediator-pattern.html 2019-05-01
1. Definition: Encapsulates a series of object interactions with a mediation object. Mediators make the interaction of objects unnecessary to display, thus making the coupling loose, and can independently change the interaction between them. 2. Resolution: It doesn't matter if you don't understand this passage. Let's look at a scene like this first: The company has one leader and nine employees. One day, the leader will go to the company's

Java Design Pattern-Mediator Pattern

https://qaofficial.com/post/2019/05/01/71123-java-design-pattern-mediator-pattern.html 2019-05-01
1 Mediator Pattern mediator pattern Purpose: Encapsulate a series of object interactions with an intermediary object. The intermediary makes it unnecessary for each object to refer to each other explicitly, thus making its coupling loose and changing the interactions between them independently.Implementation: Defines an object that encapsulates the way a group of objects interact. 1. Use when multiple classes are coupled to form a network structure, separating the network structure

Kotlin-12. extensions

https://qaofficial.com/post/2019/05/01/70961-kotlin-12.-extensions.html 2019-05-01
Official Document: http://kotlinlang.org/docs/reference/extensions.html 1. extensions 在不修改原类的情况下, Kotlin能给一个类扩展新功能,无需继承该类,也不用任何设计模式(如装饰模式等), Kotlin支持扩展函数

PHP Mediator Mode

https://qaofficial.com/post/2019/05/01/71175-php-mediator-mode.html 2019-05-01
Encapsulates a series of object interactions with an intermediary object. The intermediary makes the objects interact without display, thus making the coupling loose, and can independently change the interactions between their fingers. Composition of Mediator PatternMediator Abstract Mediator Role: The abstract mediator role defines a unified interface for communication between various colleague roles.Concrete Mediator Specific Mediator Role: The specific mediator role realizes cooperative behavior by coordinating various colleague roles, so

Tensorflow Trains His cnn Model for Pedestrian Recognition

https://qaofficial.com/post/2019/05/01/70970-tensorflow-trains-his-cnn-model-for-pedestrian-recognition.html 2019-05-01
code is as follows: #coding:utf-8 import string,os,sys import numpy as np import matplotlib.pyplot as plt import scipy.io import random import csv import tensorflow as tf import pandas as pd filename = "/home/yc/prid_2011_test/ptest.csv" data = pd.read_csv(filename,dtype='a') label = np.array(data['pid']) img_data = np.array(data['pixels']) N_sample = label.size Face_data = np.zeros((N_sample, 128*64)) Face_label=np.zeros((N_sample,40),dtype=int) for i in range(N_sample): x = img_data[i] x = np.fromstring(x, dtype=float, sep=' ') x_max = x.max() x = x/(x_max+0.0001) Face_data[i] =

[Kodi] (software)] Build Home Audio and Video Media System

https://qaofficial.com/post/2019/05/01/71020-kodi-software-build-home-audio-and-video-media-system.html 2019-05-01
brief introduction New move, Raspberry Pi 2 generation idle for a period of time.Because I like watching some movies or entertainment programs on the computer in my spare time, sometimes some friends come and several people move a small bench to watch them together … and just the living room has a large TV screen and a comfortable sofa, but I don't want to spend an extra 200 yuan per year to open the TV channel of radio and television.

eShopOnContainers --Ordering's mediator model

https://qaofficial.com/post/2019/05/01/71057-eshoponcontainers-orderingamp#x27s-mediator-model.html 2019-05-01
Preface Learning Purpose: MediatR is What? why did he use MediatR? how do i use MediatR? MediatR is What? MediatR official website: https://github.com/jbogard/MediatR. Official Introduction: Simple mediator implementation in .NET What is "mediator/ Mediator Mode"? PS: In fact, I learned from 23 design patterns before and almost forgot them when I used less.Similar problems encountered in the past were basically solved by Observer pattern (especially after ReactiveX appeared), and this

linux Installs XBMC to Build Own Home Cinema

https://qaofficial.com/post/2019/05/01/71053-linux-installs-xbmc-to-build-own-home-cinema.html 2019-05-01
Reference 1: http://www.linuxidc.com/Linux/2014-05/101525.htm Reference 2: http://www.hdpfans.com/thread-329076-1-1.html

pytorch Learning Notes (IX): Introduction to PyTorch Structure

https://qaofficial.com/post/2019/05/01/70927-pytorch-learning-notes-ix-introduction-to-pytorch-structure.html 2019-05-01
PyTorch structure introduction A superficial understanding of PyTorch architecture cannot guarantee complete correctness, but I hope I can have an overall grasp of PyTorch from a higher level.Level is limited, if there is any mistake, please refer to the wrong, thank you! Several Important Types Numerically Related Tensor Variable Parameter buffer (this cannot be called a type, in fact it is used to save tensor) Tensor:The calculation in PyTorch is basically based on Tensor, which can be said to be the basic calculation unit in PyTorch.

xbmc Remote Control Volume Plus Process Summary

https://qaofficial.com/post/2019/05/01/71041-xbmc-remote-control-volume-plus-process-summary.html 2019-05-01
AndroidKey.cpp replaces scancode with sym and forms XBMC_Key. //xbmc/android/activity/AndroidKey.cpp typedef struct { int32_t nativeKey; int16_t xbmcKey; } KeyMap; static KeyMap keyMap[] = { { AKEYCODE_VOLUME_UP , XBMCK_PLUS }, }; bool CAndroidKey::onKeyboardEvent(AInputEvent *event) { int32_t flags = AKeyEvent_getFlags(event); int32_t state = AKeyEvent_getMetaState(event); int32_t action = AKeyEvent_getAction(event); int32_t repeat = AKeyEvent_getRepeatCount(event); int32_t keycode = AKeyEvent_getKeyCode(event); int32_t deviceId = AInputEvent_getDeviceId(event); CJNIKeyCharacterMap map = CJNIKeyCharacterMap::load(deviceId); uint16_t unicode = map.get(keycode, state); // Check if we