自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 springboot中使用web3j监听智能合约事件

智能合约执行后有时需要在后台监听相应的事件。本文将介绍下如何在springboot中使用web3j库监听智能合约的事件导入web3j的包在 pom.xml 文件中添加如下依赖<dependency> <groupId>org.web3j</groupId> <artifactId>core<...

2019-01-05 20:26:34 5100 5

原创 netty与springboot的整合

netty框架在网络编程领域,Netty是Java的一个优秀的框架,他将java的复杂和难以使用的关于OIO和NIO的一些框架进行了封装,使其隐藏在易用的api后面。总之,如果你想编写高性能的网络服务,那么使用Netty就没错了。目前各个大公司比如google,facebook等公司都在使用Netty框架,很多项目比如dubbo和Elasticsearch等就使用了Netty.netty和...

2018-12-16 19:18:03 5377 1

原创 用 opengl 写一个小游戏 (2)

本节代码github 在这一节可以先写出这个游戏的雏形 如图,从启示旗子点到达出口点即可。而且当从底部掉落时玩家并不会死亡,而是在顶部相应的位置掉落。而如果顶部相应位置也有墙壁时玩家将会死亡。游戏场景player文字渲染碰撞检测和处理渲染游戏场景构建游戏场景需要各种游戏对象,我们可以抽象出一个类 GameObject.h#ifndef GAME_GAMEOBJECT_H#def

2017-02-14 13:51:57 3003

原创 用 opengl 写一个小游戏 (1)

用 opengl 写一个小游戏 (1)用 opengl 写一个小游戏 1环境搭建freetypesoilglm注意事项基本组件shadertexture资源加载渲染器主游戏类游戏窗口本节代码 github 环境搭建基本的环境搭建可以参考我之前的文章在 Eclipse或CLion 中集成 opengl 环境 (windows+mingw) 在这里我们还需要另外两个包,free

2017-02-11 13:35:07 11468

原创 qml 实现文本编辑器

实现文本编辑器要文件的 IO 功能,但是 QML 并没有提供,所以需要自己写一个。#ifndef FILEIO_H#define FILEIO_H#include #include #include class FileIO : public QObject{ Q_OBJECTpublic: Q_PROPERTY(QString source

2017-01-21 12:30:56 3615

原创 c++ 实现分数类

/* * fraction.h * 此分数类在输入分数后符号将只储存在分子位上,分母为正数。在进行加减乘除运算后会自动进行约分,也可自己执行约分操作。 * Created on: 2016年11月18日 * */#ifndef FRACTION_H_#define FRACTION_H_class fraction{private: int numerator;

2017-01-21 12:23:26 11258 4

原创 在 opengl 中画出三角形并用 shader 改变颜色

/*glew.h 源代码中的一些宏定义typedef unsigned int GLenum;typedef unsigned int GLbitfield;typedef unsigned int GLuint;typedef int GLint;typedef int GLsizei;typedef unsigned char GLboolean;typedef signed

2016-12-17 20:58:00 3082

原创 在 Eclipse或CLion 中集成 opengl 环境 (windows+mingw)

opengl 环境需要三个包,其中 opengl 在 windows 已用,需要的包为 glfw 和 glew。glfw 为 opengl 创建窗口环境。可在此处下载 源码http://www.glfw.org/download.html,源码还需要编译,最好直接下载编译好的 32-bit Windows binaries。另外由于 opengl 只是一个标准,在实现驱动上都有所不同,要使

2016-12-16 21:30:51 3388

原创 Integer Set Partition

Given a set of N (> 1) positive integers, you are supposed to partition them into two disjoint sets A1 and A2 of n1 and n2 numbers, respectively. Let S1 and S2 denote the sums of all the numbers in

2016-12-05 16:57:23 293

原创 Family Property

This time, you are supposed to help us collect the data for family-owned property. Given each person's family members, and the estate(房产)info under his/her own name, we need to know the size of each f

2016-12-04 21:08:45 215

原创 Counting Nodes in a BST

A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than or equal to the node's ke

2016-12-03 20:27:47 274

原创 Come on! Let's C

"Let's C" is a popular and fun programming contest hosted by the College of Computer Science and Technology, Zhejiang University. Since the idea of the contest is for fun, the award rules are funny as

2016-12-03 20:24:44 367

原创 Eddington Number

British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum integer E such that it is for E

2016-12-03 20:19:30 220

原创 Birds in Forest

Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are supposed to help the scientists to count the maxi

2016-12-03 20:10:47 232

原创 Pre- and Post-order Traversals

Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder traversal sequences, or preorder and inorder

2016-12-03 19:49:13 308

空空如也

空空如也

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

TA关注的人

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