自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(71)
  • 资源 (5)
  • 问答 (2)
  • 收藏
  • 关注

原创 elasticsearch相关记录

https://es.xiaoleilu.com/ Elasticsearch 权威指南(中文版)

2019-08-26 11:17:57 132

转载 docker 进入容器内部及退出

dokcer ps -a 查询正在运行的containerdocker exec-it容器ID /bin/bash 进入容器exit 退出容器

2019-06-24 10:45:00 21417 1

转载 docker相关

https://www.cnblogs.com/q4486233/p/6482711.html docker相关指令https://yeasy.gitbooks.io/docker_practice docker帮助文档

2019-06-04 15:57:24 161

转载 vue脚手架离线安装

某些环境下,由于网络联通性问题,会导致vue-cli命令无法下载到webapck模板。执行如下命令vue init webpack <project_name>发生如下错误vue-cli · Failed to download repo vuejs-templates/webpack: connect ETIMEDOUT13.250.177.223:443解决方法:...

2019-05-17 10:44:37 6223

原创 前端学习记录

1.vue-table-with-tree-grid github上一个比较好用的vue树形表格插件2.jest 报错 SecurityError: localStorage is not available for opaque origins解决办法:在 jest.conf.js 中加上 testURL: "http://localhost/"3.Vue全家桶+Mint...

2019-02-01 15:27:10 159

原创 spring atomikos 多数据源 分布式事务配置

spring-jdbc.xml&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co...

2019-01-26 15:53:03 215

转载 java web学习记录(转)

https://www.cnblogs.com/zhuxiansheng/p/7805552.html Spring自定义注解简单使用四步走https://www.cnblogs.com/aaronfeng/p/5537177.html 基于spring+quartz的分布式定时任务框架https://blog.csdn.net/u011677147/article/detail...

2019-01-24 14:27:35 165 1

原创 自定义标签切面问题

继承RequestContextAwareTag,并使用WebApplicationContext wac = this.getRequestContext().getWebApplicationContext();才能被切面“捕获”到,记录到这里,具体原因有待深究。

2018-06-04 17:31:46 267

原创 unity3D控制骨骼并不受动画影响

如果想用代码控制骨骼并且不受现有动画的影响,那么animator选项update mode选择animator physics

2018-05-10 01:38:10 4030

原创 spark-submit代码 Error communicating with MapOutp utTracker错误解决

spark-submit --master spark://ip:port --class com.deng.sparkTest.Test SparkTest-1.0-SNAPSHOT.jar注意SparkConf设置setMaster("local"),否则提交后会报错:17/04/26 16:08:29 ERROR MapOutputTrackerMaster: Error commu

2017-04-26 16:25:08 1560

原创 idea spark远程调试

建立maven项目,pom配置参考spark官网例子import org.apache.spark.api.java.*;import org.apache.spark.SparkConf;import org.apache.spark.api.java.function.Function;public class Test { public static void main(

2017-04-18 17:57:57 1013

转载 maven dependencyManagement和dependencies的区别

区别           dependencies即使在子项目中不写该依赖项,那么子项目仍然会从父项目中继承该依赖项(全部继承)         dependencyManagement里只是声明依赖,并不实现引入,因此子项目需要显示的声明需要用的依赖。如果不在子项目中声明依赖,是不会从父项目中继承下来的;只有在子项目中写了该依赖项,并且没有指定具体版本,才会从父项目中继承该项,并且ver

2017-02-13 15:09:17 320

转载 Java线程监听,意外退出线程后自动重启

Java线程监听,意外退出线程后自动重启  某日,天朗气清,回公司,未到9点,刷微博,顿觉问题泛滥,惊恐万分!  前一天写了一个微博爬行程序,主要工作原理就是每隔2分钟爬行一次微博,获取某N个关注朋友微博数量,然后将其保存起来,2分钟之后再次爬行,再取 其微博数量,与2分钟前保存的微博数量比较,如果数量增加,说明该好友在此2分钟之内发布微博,如果数量减少,则是删除微博。最后将爬行结果发送到

2017-02-13 10:21:15 1547 1

转载 有关jquery-ui的dialog的问题

我在项目中用到jquery-ui,用他的dialog的时候,发现dialog显示在IE8浏览器的左上角,可是在Chrome里显示的是正常的。我找了一天的答案。。。最后发现当我把文档声明标签XML/HTML code?1改成XML/HTML code?

2016-09-01 16:54:56 359

原创 关于ExecutorService 的用法

package my;import java.util.ArrayList;import java.util.Collections;import java.util.List;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.concu

2016-08-25 10:35:37 467

原创 使用netty4 和 protobuf2.6.1进行网络通信

test.proto文件package protobuf; option java_package = "com.test.protobuf"; option java_outer_classname = "FirstProtobuf"; message testBuf { required int32 ID = 1; required string Url = 2; }

2016-01-28 16:08:17 957

原创 对C语言回调函数的一点感悟

先来看个回调函数的例子:#includetypedef void(*pcb)(char *);void GetCallBack(pcb callback,char* s){ printf("\ngetCallBack"); callback(s);}void fCallback(char *s) { printf("\nthis is %s-0",s);} voi

2016-01-12 21:50:14 355

原创 struts2.1.8和hibernate4.3.11整合遇到的问题

出现的问题是struts里面的 antlr-2.7.2.jar和hibernate 里面的anltr-2.7.7.jar。将anltr-2.7.2.jar包删除即可。 但如果导入的是myeclipse包就需要将 antlr-2.7.2.jar 换成hibernate 里面的anltr-2.7.7.jar。并将名字改为 antlr-2.7.2.jar hibernate  antlr

2015-12-30 14:18:39 368

转载 Struts2 package namespace的作用

先看一段代码:  Struts.xml          /Namespace.jsp          /Namespace.jsp        namespace是什么?想访问的action前面就应该加上什么,比如这里就是/front/index.action  Namespace不写等于Namespace为空,Namespace等于空,意味着:只要

2015-11-19 17:10:30 1211

原创 Unity3D的一个坑

碰撞检测时,如果物体实现进行了旋转将检测不到,这时只能用射线检测来处理

2015-10-23 19:55:42 282

转载 [leetcode 289]Game of Life

给定一个由0,1组成的矩阵,每一个元素表示一个细胞的存活,1存活,0死亡,其中下一次更新每个细胞的存活由上、下、左、右、左上、左下、右上、右下,八个细胞决定,存活规则如下:     1、周围存活细胞小于2个,则死亡。    2、周围存活细胞2个或3个,则存活到下一次更新。    3、周围存活细胞3个以上,则死亡。    4、周围存活细胞3个的死细胞,将会成为一个活细

2015-10-12 15:58:15 277

转载 cocos各平台横屏竖屏设置方式

转自:http://blog.csdn.net/ctbinzi/article/details/24216175在cocos引擎里面找了好久,没找到相关接口,网上也搜索了好久,最后发现,原来需要根据各个平台分别进行设置。android修改项目根目录 proj.android\AndroidManifest.xml 文件中的android:screenOrientation属

2015-10-10 15:16:29 2000

转载 一种智能指针的实现方式

#include#includeusing namespace std;#define TEST_SMARTPTRclass Stub{public: void print(){ cout << "Stub:print" << endl; } ~Stub(){ cout << "Stub:Destructor" << endl; }};templateclas

2015-09-26 21:10:29 341

转载 打印字符串的全排列

#includeusing namespace std;void permutation(char* str, char* begin){if (*begin == '\0')cout else{for (char* ch = begin; *ch != '\0'; ch++){char tmp = *ch;*ch = *begin;*begin = tmp;

2015-09-26 12:31:27 319

转载 求n个骰子各点数和出现的概率-动态规划

题目:把n个骰子扔在地上,所有骰子朝上一面的点数之和为S。输入n,打印出S的所有可能的值出现的概率。声明思想非原创!只因动态规划思想的使用很好,记下!分析:动态规划就是分阶段考虑问题,给出变量,找出相邻阶段间的关系。具体定义给忘了。1.现在变量有:骰子个数,点数和。当有k个骰子,点数和为n时,出现次数记为f(k,n)。那与k-1个骰子阶段之间的关系是怎样的?2.当我有k-1个骰子时

2015-09-08 21:20:22 754

转载 打印N个数的全排列

#include #include void pailie(int *a, int n){ static int m = -1; int i, j; m++; if (m == n) //如果是最后一个数则输出该排列 { for (i = 0; i < n; i++) printf("%d ", a[i]); printf("\n"); return; } f

2015-09-08 20:49:28 661

转载 字符串的交错组成

【题 目】给定三个字符串str1、str2和aim。如果aim包含且仅包含来⾃自str1和str2的所有字符,⽽而且在aim中属于str1的字符之间保持原来在str1中的顺序,属于str2的字符之间保持原来在str2中的顺序,那么称aim是str1和str2的交错组成。实现⼀一个函数,判断aim是否是str1和str2交错组成。【举例】str1=“AB”,str2=“12”

2015-08-31 23:43:09 868

原创 MFC又踩了一个坑

radio控件在OnSize函数中重新定了位置之后两个同组的radio将无法正常的互斥,但不知道问题出在哪里,特此记录。

2015-08-04 17:51:19 298

原创 C/C++传递变参回调函数的使用

#include int (*fp)(int a,int b);int add(int a,int b){ return (a+b);}int sub(int a,int b){ return (a-b);}int caller(int (*fp)(int a,int b),int m,int n){ return fp(m,n); //这里如何传递不同的参数?}

2015-05-06 22:55:47 2208

转载 cuda实现字符统计

#include "cuda_runtime.h"#include "device_launch_parameters.h"#include#include#include#include#include#define TEXT_FILE "kafka.txt"typedef unsigned int uint;__global__ void histo_ker

2015-03-30 17:05:35 568

转载 cuda双调排序

#include "cuda_runtime.h"#include "device_launch_parameters.h"#include "device_functions.h"#include #include #include#define SHARED_SIZE_LIMIT 1024U#define UMUL(a, b) __umul24((a), (b))#def

2015-03-28 17:36:36 1647

原创 cuda 类模板以及全局内存的使用例子

#include "cuda_runtime.h"#include "device_launch_parameters.h"#include #include#define MAX_VALUES 1024templateclass myValues{T values[MAX_VALUES];public:__device__ myValues(T clear){}__device__ void s

2015-03-21 17:07:02 851

原创 C++11 lambda表达式

#include#include#includeusing namespace std;int main(){ vector sv; sv.push_back("fast"); sv.push_back("lazy"); sv.push_back("the"); int sz = 2; auto wc = find_if(sv.begin(),sv.end(),[sz](con

2015-03-20 13:28:18 350

原创 cuda两数组相加,带数组长度

#include "cuda_runtime.h"#include "device_launch_parameters.h"#include #include float A[1000]; float B[1000];float C[1000];cudaError_t addWithCuda(float *c, float *a, float *b, int size);__g

2015-03-03 16:58:46 1112

原创 opencl矩阵点乘运算及遇到的问题总结

matvec#define PROGRAM_FILE "matvec.cl"#define KERNEL_FUNC "matvec_mult"#include #include#include #include#include int main(){ cl_platform_id platform; cl_device_id device; cl_context cont

2015-02-01 22:33:31 1012

转载 D3D 调试

转自http://www.cnblogs.com/kex1n/archive/2012/10/24/2736723.html1. 在Create D3D资源的时候,使用V()宏是非常必要的,因为很多情况下,即使D3D 资源创建失败,他也会继续执行下去,如此以来,程序的bug的定位就麻烦了很多,而使用V()宏会在出错的地方及时停下来,当然也有不好的地方,因为宏定义本身使用了if语句,因此如果

2015-01-31 00:49:41 767

原创 opencl初尝试

注意context创建时的参数设置到底是CL_DEVICE_TYPE_GPU还是CL_DEVICE_TYPE_CPU,也即是当前所使用的设备类型

2015-01-27 18:57:16 553

原创 D3D绘制彩色立方体

d3dUtility.h#ifndef __d3dUtilityH__#define __d3dUtilityH__#include #include namespace d3d{ bool InitD3D( HINSTANCE hInstance, // [in] Application instance. int width, int height,

2015-01-27 14:57:28 559

原创 CUDA初学,实现1000*256的数组运算

#include "cuda_runtime.h"#include "device_launch_parameters.h"#include #define N 1000#define M 256float A[N][M],B[N][M],C[N][M];__global__ void add(float *A,float *B,float *C){ int i = blockId

2014-12-30 19:59:38 505

转载 leetcode-Rotate Image

Rotate ImageMar 18 '124182 / 9471You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place? 

2014-12-10 20:14:51 322

spring-data-elasticsearch api 离线文档

spring-data-elasticsearch api 离线文档, spring-data-elasticsearch2.0.2spring-data-elasticsearch api spring-data-elasticsearch api 离线文档

2017-09-08

重构_改善既有代码的设计_完美书签版

2017-04-15

real time rendering 第三版高清彩色

real time rendering 第三版高清彩色

2015-07-30

HLSL Development Cookbook源代码

从网上淘来的HLSL Development Cookbook的源代码

2014-07-07

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

TA关注的人

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