自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(77)
  • 资源 (1)
  • 收藏
  • 关注

原创 STL_Allocator内存配置器

STL_Allocator内存配置器STL的内存配置器考虑到了小型的区块可能造成内存破碎问题,SGI STL 设计了双层级配置器,第一层配置器直接使用malloc() 和 free().第二层配置器则视情况采用不同的策略:但配置区块超过 128 bytes时,调用第一级配置器。当配置区块小于 128 bytes时,采用复杂的 memory pool 方式。1. 第一级配置器_ _malloc_alloc_template:class __malloc_alloc_template { privat

2020-05-22 17:30:26 667

原创 Muduo - Reactor模式

Muduo - Reactor模式一、Reactor 是什么wiki的中文定义:Reactor模式是事件驱动的,有一个或多个并发输入源,有一个Service Handler,有多个Request Handler,这个Service Handler会同步的将输入的请求(Event)多路复用的分发给相应的Request Handler。从上述文字中我们可以看出以下关键点:事件驱动(event handling)可以处理一个或多个输入源(one or more inputs)通过Servic

2020-05-22 17:25:44 460

原创 Ue4反射简析

Ue4反射简析UE4版本 4.18参考:insideUE41. 反射介绍在UE4里面,你无时无刻都会看到类似UFUNCTION()这样的宏。官方文档告诉你,只要在一个函数的前面加上这个宏,然后在括号里面加上BlueprintCallable就可以在编辑器里面调用了。按照他的指示,我们就能让我们的函数实现各种各样特别的功能,那这个效果就是通过UE4的反射系统来实现的。这看起来确实非常...

2019-09-18 10:44:16 1114 2

转载 SGI_STL内存管理器

1. 好多废话​ 在分析完nginx的内存池之后,也想了解一下C++的内存管理,于是就很自然得想到STL。STL是一个重量级的作品,据说当时的出现,完全可以说得上是一个划时代意义的作品。泛型、数据结构和算法的分离、底耦合、高复用… 啊,废话不多说了,再说下去让人感觉像王婆卖瓜了。​ 啊,还忘了得加上两位STL大师的名字来聊表我的敬意了。泛型大牛Alexander Stepan...

2018-10-24 15:25:53 333

原创 Ue4 Actor同步与序列化

Ue4 Actor同步与序列化主要讨论的是服务器Actor同步到客户端的过程,和序列化的过程。1. 基本概念服务器在NetDiver的TickFlush里面,每一帧都会去执行ServerReplicateActors来同步Actor的相关内容,大多数 actor 复制操作都发生在 UNetDriver::ServerReplicateActors 内。在这里,服务器将收集所有被认定与各个客户...

2018-10-17 15:27:37 3658

原创 Ue4 NetworkGUID 分析

Ue4 NetworkGUID 分析1. NetworkGUIDNetworkGUID有何作用?在网络同步的过程中,在传递一个UObject类型的指针时,这个UObject是怎么传递的?这个处理就需要通过FNetworkGUID了。服务器在同步一个对象引用(指针)的时候,会给其分配专门的FNetworkGUID并通过网络进行发送。客户端上通过识别这个ID,就可以找到对应的UObject。...

2018-10-17 15:21:31 3356

原创 Ue4_序列化浅析

序列化浅析1. 序列化基本概念序列化是指将对象转换成字节流,从而存储对象或将对象传输到内存、数据库或文件等的过程。 它的主要用途是保存对象的状态,以便能够在需要时重新创建对象。 反向过程称为“反序列化”。 (通俗来说就是保存和读取的过程分别为序列化和反序列化)而在维基百科里面是这样解释的。序列化(serialization)在计算机科学的数据处理中,是指将数据结构或对象状态转换成可取用格...

2018-10-12 14:54:52 19901 6

原创 UE4_网络同步原理深入

UE4_网络同步原理深入本文更多是对Exploring in UE4有关网络同步原理以及官方文档的一些自己理解和总结。1. 通信的基本流程1.1 UE4服务器与客户端的通信流程UE4进程内部服务器Server与客户端Client的通信 主要如下:每一个客户端叫做一个Connection,如图,就是一个server连接到两个客户端的效果。对于每一个客户端,都会建立起一...

2018-09-12 11:54:20 4013 1

转载 Ue4_Actor 复制流程详述

Actor 复制流程详述 官方文档转载加以理解大多数 actor 复制操作都发生在 UNetDriver::ServerReplicateActors 内。在这里,服务器将收集所有被认定与各个客户端相关的 actor,并发送那些自上次(已连接的)客户端更新后出现变化的所有属性。这里还定义了一个专门流程,指定了 actor 的更新方式、要调用的特定框架回调,以及在此过程中使用的特定...

2018-08-30 11:31:03 3249

转载 值得推荐的C++框架

下次造轮子前先看看现有的轮子吧值得学习的C语言开源项目- 1. WebbenchWebbench是一个在linux下使用的非常简单的网站压测工具。它使用fork()模拟多个客户端同时访问我们设定的URL,测试网站在压力下工作的性能,最多可以模拟3万个并发连接去测试网站的负载能力。Webbench使用C语言编写, 代码实在太简洁,源码加起来不到600行。下载链接:http:/...

2018-08-30 10:47:58 411

原创 UE4反射原理的探究

UE4反射本文主要是个人对UE4反射系统的一些总结和理解。1. UE4反射系统什么是反射系统 在UE4里面,你无时无刻都会看到类似UFUNCTION()这样的宏。官方文档告诉你,只要在一个函数的前面加上这个宏,然后在括号里面加上BlueprintCallable就可以在编辑器里面调用了。按照他的指示,我们就能让我们的函数实现各种各样特别的功能,那这个效果就是通过UE4的...

2018-08-21 19:57:39 12234 5

原创 UE4入门以及用源码编译

本周工作总结:1. 编译环境的搭建visual studio2017安装unrealengine安装:引擎源码安装:github源码解压之后,可以看到 首先点击Setup.bat,这个需要代理才能把资源下载下来。如何设置全局代理KM有人提供了较好的解决方案。大概需要下载5g左右的文件,然后点击GenerateProjectFiles.bat,等待一两分钟后,文件内会生...

2018-08-14 14:05:48 15915 1

原创 docker入门之用ubuntu16.04下载gcc编译helloworld

docker入门之用ubuntu16.04下载gcc编译helloworlddocker简介Docker 使用客户端-服务器 (C/S) 架构模式,使用远程API来管理和创建Docker容器,通过 Docker 镜像来创建,是一种轻量化的方式,与虚拟机相比,它没有硬件虚拟化层,其在内存访问,文件系统,网络速度上明显快的多 性能测试工具 主机 Docker...

2018-05-08 14:06:14 5032

原创 深度学习实训周报_3

深度学习实训周报1、Grad-CAM(Gradient-weighted Class Activation Mapping) Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization这次的任务 主要是跑代码和理解Grad CAM,通过训练和测试猫和狗的图片集,并且对这些...

2018-05-06 15:42:26 1773

原创 分布式第一次作业

分布式第一次作业在这次作业中我主要用到的是openmp来实现并行计算。 具体的运行结果如下: 因为openmp在数据比较少的时候需要启动时间,因此刚开始的运行时间是少于串行计算的。 但是当数据较多的时候,并行计算的优点就显现出来了。 当输入数字为2000000000的时候, omp需要时间接近29s,而串行计算需要38s。

2018-03-29 21:02:15 361

原创 NP-Complete Question

回答:可以将最大团问题归约到此问题。假设要求任意图G(V, E)中大小为k的团,可以在图G中添加k个相互独立的定顶点,得到新图G’。这新加的k个定点保证了图G’存在大小为k的独立集,同时又不影响到原图的团。

2018-01-12 19:19:01 163

原创 LeetCode34. Search for a Range

LeetCode34. Search for a Range题目:Given an array of integers sorted in ascending order, find the starting and ending position of a given target value.Your algorithm's runtime complexity must

2018-01-07 23:18:04 145

原创 Leetcode494. Target Sum

Leetcode494. Target Sum题目:You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its n

2017-12-29 14:28:43 130

原创 cloudgo-io

Cloudgo-io设计一个web小应用,展示静态文件服务、js请求支持、模板输出、表单处理、Filter中间件设计等能力。使用示范运行 $go run main.go [negroni] listening on :8080访问home/date 访问静态文件 js和html访问和表单提交,输出 对 /unknown 给出开发中的提示,返回码501 客服端的返回数据[negro

2017-12-20 00:51:54 272

原创 cloudgo-data

xorm体验全功能ORM(几乎)关联(包含一个,包含多个,属于,多对多,多种包含)Callbacks(创建/保存/更新/删除/查找之前/之后)预加载(急加载)事务复合主键SQL Builder自动迁移日志可扩展,编写基于GORM回调的插件每个功能都有测试开发人员友好运行go run main.go 服务跑起来后,进行测试,8000端口运行原版程序,8080运行xorm程序

2017-12-20 00:50:25 235

原创 cloudgo

cloudgo框架使用beego在这里我们使用的是beego框架,以下是获取beego框架的方法 go get -u github.com/astaxie/beego内部函数主要还是用了beego的框架函数来直接实现type MainController struct { beego.Controller //beego控制器}func (this *MainController) Ge

2017-12-20 00:48:55 379

原创 LeetCode28. Implement strStr()

LeetCode28. Implement strStr()题目:Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack

2017-12-20 00:44:34 127

原创 LeetCode27. Remove Element

LeetCode27. Remove Element题目:Given an array and a value, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must d

2017-12-20 00:40:07 111

原创 sicily1001. 输入输出LL(1)语法分析程序 **

sicily1001. 输入输出LL(1)语法分析程序 **题目:Time Limit: 1sec    Memory Limit:256MBDescription 输入开始符号,非终结符,终结符,产生式,LL(1)分析表输出LL(1)分析表Input 输入开始符号;非终结符个数,非终结符,空格符分隔;终结符个数,终结符,空格符分隔;

2017-12-19 18:13:49 956

原创 sicily1000. 输入输出LL(1)语法分析程序

1000. 输入输出LL(1)语法分析程序题目:Time Limit: 1sec    Memory Limit:256MBDescription 输入开始符号,非终结符,终结符,产生式,LL(1)分析表输出LL(1)分析表G[E]:E →E+T | E-T | TT →T*F | T/F | FF →(E) | DD →x |

2017-12-19 17:41:48 426

原创 LeetCode26. Remove Duplicates from Sorted Array

LeetCode26. Remove Duplicates from Sorted Array题目:Given a sorted array, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate

2017-12-15 01:33:54 107

原创 LeetCode21. Merge Two Sorted Lists

LeetCode21. Merge Two Sorted Lists题目:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:

2017-12-10 18:54:30 101

原创 LeetCode20. Valid Parentheses

LeetCode20. Valid Parentheses题目:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the corre

2017-12-10 18:50:53 95

原创 LeetCode14. Longest Common Prefix

LeetCode14. Longest Common Prefix题目:Write a function to find the longest common prefix string amongst an array of strings.题目分析:题目很直白,通过循环就可以判断出最大前缀。代码:class Solution {public: s

2017-12-10 18:48:19 106

原创 Leetcode7. Reverse Integer

Leetcode7. Reverse Integer题目:Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:

2017-12-03 22:33:05 102

原创 LeetCode2. Add Two Numbers

LeetCode2. Add Two Numbers题目:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single di

2017-12-03 22:29:48 130

原创 LeetCode718. Maximum Length of Repeated Subarray

LeetCode718. Maximum Length of Repeated Subarray题目:Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays.Example 1:Input:A: [1,2,3,2

2017-11-25 01:59:05 186

原创 LeetCode·64. Minimum Path Sum

LeetCode·64. Minimum Path Sum题目:Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: Y

2017-11-25 01:55:29 156

原创 LeetCode646. Maximum Length of Pair Chain

646. Maximum Length of Pair Chain题目:You are given n pairs of numbers. In every pair, the first number is always smaller than the second number.Now, we define a pair (c, d) can follow ano

2017-11-25 01:52:26 149

原创 LeetCode377. Combination Sum IV

LeetCode377. Combination Sum IV题目:Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target.Exampl

2017-11-19 13:31:14 246

原创 LeetCode216. Combination Sum III

LeetCode216. Combination Sum III题目:Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a uni

2017-11-19 13:24:50 181

原创 LeetCode40. Combination Sum II

LeetCode40. Combination Sum II题目:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in

2017-11-19 13:14:51 110

原创 Leetcode39. Combination Sum

Leetcode39. Combination Sum题目:Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.

2017-11-19 13:11:51 115

原创 LeetCode18. 4Sum

LeetCode18. 4Sum题目:Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of ta

2017-11-09 20:28:42 163

原创 LeetCode15. 3Sum

LeetCode15. 3Sum题目:Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The so

2017-11-09 20:26:53 164

图解+HTTP高清版

图解HTTP彩图版,清晰可靠,积分少,欢迎各位来下载这本书。

2018-10-09

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除