【Android OpenGL ES 开发 (五)】纹理相关(二)

纹理放大和缩小的过滤参数

1.使用线性插值效果最佳

2.通过修改

  float maxscale = 4.0f  //放大

  float  minscale = 0.5f //缩小

vertices[0].mPosition[0]=0.5f * maxscale; //x
vertices[0].mPosition[1]=0.5f * maxscale; //y

实现模糊效果

1.利用显卡的并行计算的强大功能对图像进行处理

2.FS中的代码实现

#ifdef GL_ES
prection mediump float;
#endif
uniform sampler2D U_Textture;
uniform vec4 U_ImageSize;
varying vec4 V_Texcoord;
void main(){vec3 color = vec3(0.0);float radius_in_pixle = 1.0;//半径//一个像素的偏移换算成纹理坐标在s,t方向偏移多少float radius_in_texcoord_s =  radius_in_pixle/U_ImageSize.x;float radius_in_texcoord_t =  radius_in_pixle/U_ImageSize.y;for(int y = -1; y<=1;y++){for(int x = -1; x<=1;x++){float texcoord_x= V_Texcoord.x + float(x) * radius_in_texcoord_s;float texcoord_y= V_Texcoord.y + float(y) * radius_in_texcoord_t;color += texture2D(U_Texture,vec2(texcoord_x,texcoord_y)).rgb;}}color/=9.0;gl_FragColor = vec4(color,texture2D(U_Texture,V_Texcoord.xy).a);
}

加载多张纹理

#include "Sence.h"
#include "Utils.h"
static AAssetManager *sAssetManager= nullptr;
GLuint vbo;//vertex buffer object
GLuint ibo;//index buffer object ,element array buffer object
GLuint program;
GLint modelMatrixLocation,viewMatrixLocation,projectionMatrixLocation,textlocation,text2location;
GLint attrPositionLocation,attrTexCoordLocation;
GLuint texture , texture2 , texture3;
glm::mat4 modelMatrix,viewMatrix,projectionMatrix,modelMatrix2;unsigned char * LoadFileContent(const char *path,int&filesize){unsigned char *filecontent=nullptr;filesize=0;AAsset* asset = AAssetManager_open(sAssetManager,path,AASSET_MODE_UNKNOWN);if(asset!= nullptr){filesize=AAsset_getLength(asset);filecontent=new unsigned char[filesize+1];AAsset_read(asset,filecontent,filesize);filecontent[filesize] = 0;AAsset_close(asset);}return filecontent;
}
extern "C" JNIEXPORT void JNICALL Java_com_example_learnogles_MainActivity_Init(JNIEnv*env,jobject MainActivity,jobject am
){sAssetManager = AAssetManager_fromJava(env,am);__android_log_print(ANDROID_LOG_INFO,HANGYU_LOG_TAG,"Init");//设置擦除颜色glClearColor(0.6f,0.4f,0.1f,1.0f);Vertice vertices[4];//cpu -> gpu//图元左下角点vertices[0].mPosition[0]=-500.0f;//xvertices[0].mPosition[1]=-500.0f;//yvertices[0].mPosition[2]=0.0f;//zvertices[0].mPosition[3]=1.0f;//wvertices[0].mTexcoord[0]=0.0f;//uvertices[0].mTexcoord[1]=0.0f;//vvertices[0].mTexcoord[2]=0.0f;//vertices[0].mTexcoord[3]=0.0f;////图元右下角点vertices[1].mPosition[0]=500.0f;//xvertices[1].mPosition[1]=-500.0f;//yvertices[1].mPosition[2]=0.0f;//zvertices[1].mPosition[3]=1.0f;//wvertices[1].mTexcoord[0]=1.0f;//uvertices[1].mTexcoord[1]=0.0f;//vvertices[1].mTexcoord[2]=0.0f;//vertices[1].mTexcoord[3]=0.0f;////图元左上角点vertices[2].mPosition[0]=-500.0f;//xvertices[2].mPosition[1]=500.0f;//yvertices[2].mPosition[2]=0.0f;//zvertices[2].mPosition[3]=1.0f;//wvertices[2].mTexcoord[0]=0.0f;//uvertices[2].mTexcoord[1]=1.0f;//vvertices[2].mTexcoord[2]=0.0f;//vertices[2].mTexcoord[3]=0.0f;////图元右上角点vertices[3].mPosition[0]=500.0f;//xvertices[3].mPosition[1]=500.0f;//yvertices[3].mPosition[2]=0.0f;//zvertices[3].mPosition[3]=1.0f;//wvertices[3].mTexcoord[0]=1.0f;//uvertices[3].mTexcoord[1]=1.0f;//vvertices[3].mTexcoord[2]=0.0f;//vertices[3].mTexcoord[3]=0.0f;////沿X轴正方向平移x个单位(x是有符号数)modelMatrix = glm::translate(0.0f,0.0f,-1.0f);modelMatrix2 = glm::translate(50.0f,0.0f,-2.0f);unsigned short indexes[]={ 0,1,2,1,3,2};ibo = CreateBufferObject(GL_ELEMENT_ARRAY_BUFFER,indexes,sizeof(unsigned short)*6,GL_STATIC_DRAW);vbo = CreateBufferObject(GL_ARRAY_BUFFER,vertices,sizeof(Vertice) * 4,GL_STATIC_DRAW);program = CreateStandardProgram("test.vs","yuvtest.fs");attrPositionLocation = glGetAttribLocation(program,"position");attrTexCoordLocation = glGetAttribLocation(program,"texcoord");modelMatrixLocation = glGetUniformLocation(program,"U_ModelMatrix");viewMatrixLocation = glGetUniformLocation(program,"U_ViewMatrix");projectionMatrixLocation = glGetUniformLocation(program,"U_ProjectionMatrix");textlocation =  glGetUniformLocation(program,"U_Texture");text2location = glGetUniformLocation(program,"U_Texture2");;texture = CreateTextureFromFile("front.bmp");texture2 = CreateTextureFromFile("lenna.bmp");__android_log_print(ANDROID_LOG_INFO,HANGYU_LOG_TAG,"%d,%d,%d,%d",attrPositionLocation,modelMatrixLocation,viewMatrixLocation,projectionMatrixLocation);
}
extern "C" JNIEXPORT void JNICALL Java_com_example_learnogles_MainActivity_OnViewportChanged(JNIEnv*env,jobject MainActivity,jint width,jint height
){__android_log_print(ANDROID_LOG_INFO,HANGYU_LOG_TAG,"OnViewportChanged %dx%d",width,height);glViewport(0,0,width,height);viewMatrix=glm::lookAt(glm::vec3(0.0f,0.0f,0.0f),glm::vec3(0.0,0.0,-1.0f),glm::vec3(0.0,1.0f,0.0f));float half_width=float(width)/2.0f;float half_height=float(height)/2.0f;projectionMatrix=glm::ortho(-half_width,half_width,-half_height,half_height,0.1f,100.0f);
}
extern "C" JNIEXPORT void JNICALL Java_com_example_learnogles_MainActivity_Render(JNIEnv*env,jobject MainActivity
){glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);glBindBuffer(GL_ARRAY_BUFFER,vbo);//使用程序对象作为当前渲染状态的一部分glUseProgram(program);glEnable(GL_DEPTH_TEST);glActiveTexture(GL_TEXTURE0);//激活0号纹理单元(初始化为GL_TEXTURE0)glBindTexture(GL_TEXTURE_2D,texture);//绑定纹理glUniform1i(textlocation,0);//把0号纹理单元内容植入卡槽中glActiveTexture(GL_TEXTURE1);glBindTexture(GL_TEXTURE_2D,texture2);glUniform1i(text2location,1);//mvp矩阵glUniformMatrix4fv(modelMatrixLocation,1,GL_FALSE,glm::value_ptr(modelMatrix));glUniformMatrix4fv(viewMatrixLocation,1,GL_FALSE,glm::value_ptr(viewMatrix));glUniformMatrix4fv(projectionMatrixLocation,1,GL_FALSE,glm::value_ptr(projectionMatrix));//set attribute//启用或禁用通用顶点属性数组glEnableVertexAttribArray(attrPositionLocation);glVertexAttribPointer(attrPositionLocation,4,GL_FLOAT,GL_FALSE,sizeof(Vertice),0);glEnableVertexAttribArray(attrTexCoordLocation);glVertexAttribPointer(attrTexCoordLocation,4,GL_FLOAT,GL_FALSE,sizeof(Vertice),(void*)(sizeof(float)*4));glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,ibo);glDrawElements(GL_TRIANGLES,6,GL_UNSIGNED_SHORT,0);glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0);glBindBuffer(GL_ARRAY_BUFFER,0);glUseProgram(0);
}

新建Fragment shader

#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D U_Texture;
uniform sampler2D U_Texture2;
varying vec4 V_Texcoord;
void main(){gl_FragColor = texture2D(U_Texture,V_Texcoord.xy) * texture2D(U_Texture2,V_Texcoord.xy);
}

渲染YUV420格式图片

#include "Sence.h"
#include "Utils.h"
static AAssetManager *sAssetManager= nullptr;
GLuint vbo;//vertex buffer object
GLuint ibo;//index buffer object ,element array buffer object
GLuint program;
GLint modelMatrixLocation,viewMatrixLocation,projectionMatrixLocation,textYlocation,textUlocation,textVlocation;
GLint attrPositionLocation,attrTexCoordLocation;
GLuint texture_y , texture_u , texture_v;
glm::mat4 modelMatrix,viewMatrix,projectionMatrix,modelMatrix2;unsigned char * LoadFileContent(const char *path,int&filesize){unsigned char *filecontent = nullptr;filesize = 0;AAsset* asset = AAssetManager_open(sAssetManager,path,AASSET_MODE_UNKNOWN);if(asset!= nullptr){filesize = AAsset_getLength(asset);filecontent=new unsigned char[filesize+1];AAsset_read(asset,filecontent,filesize);filecontent[filesize] = 0;AAsset_close(asset);}return filecontent;
}void InitYUV420()
{int filesize = 0;unsigned char * filecontent = LoadFileContent("test.yuv",filesize);unsigned char * YData = filecontent;int YDataSize = 1280 * 720;unsigned char * UData = filecontent + YDataSize;int UDataSize = 640 * 360;unsigned char * VData = filecontent + (YDataSize + UDataSize);delete [] filecontent;texture_y = CreateTexture2D(YData,1280,720,GL_ALPHA,GL_ALPHA);texture_u = CreateTexture2D(UData,640,360,GL_ALPHA,GL_ALPHA);texture_v = CreateTexture2D(VData,640,360,GL_ALPHA,GL_ALPHA);}
extern "C" JNIEXPORT void JNICALL Java_com_example_learnogles_MainActivity_Init(JNIEnv*env,jobject MainActivity,jobject am
){sAssetManager = AAssetManager_fromJava(env,am);__android_log_print(ANDROID_LOG_INFO,HANGYU_LOG_TAG,"Init");//设置擦除颜色glClearColor(0.6f,0.4f,0.1f,1.0f);Vertice vertices[4];//cpu -> gpu//图元左下角点vertices[0].mPosition[0]=-500.0f;//xvertices[0].mPosition[1]=-500.0f;//yvertices[0].mPosition[2]=0.0f;//zvertices[0].mPosition[3]=1.0f;//wvertices[0].mTexcoord[0]=0.0f;//uvertices[0].mTexcoord[1]=0.0f;//vvertices[0].mTexcoord[2]=0.0f;//vertices[0].mTexcoord[3]=0.0f;////图元右下角点vertices[1].mPosition[0]=500.0f;//xvertices[1].mPosition[1]=-500.0f;//yvertices[1].mPosition[2]=0.0f;//zvertices[1].mPosition[3]=1.0f;//wvertices[1].mTexcoord[0]=1.0f;//uvertices[1].mTexcoord[1]=0.0f;//vvertices[1].mTexcoord[2]=0.0f;//vertices[1].mTexcoord[3]=0.0f;////图元左上角点vertices[2].mPosition[0]=-500.0f;//xvertices[2].mPosition[1]=500.0f;//yvertices[2].mPosition[2]=0.0f;//zvertices[2].mPosition[3]=1.0f;//wvertices[2].mTexcoord[0]=0.0f;//uvertices[2].mTexcoord[1]=1.0f;//vvertices[2].mTexcoord[2]=0.0f;//vertices[2].mTexcoord[3]=0.0f;////图元右上角点vertices[3].mPosition[0]=500.0f;//xvertices[3].mPosition[1]=500.0f;//yvertices[3].mPosition[2]=0.0f;//zvertices[3].mPosition[3]=1.0f;//wvertices[3].mTexcoord[0]=1.0f;//uvertices[3].mTexcoord[1]=1.0f;//vvertices[3].mTexcoord[2]=0.0f;//vertices[3].mTexcoord[3]=0.0f;////沿X轴正方向平移x个单位(x是有符号数)modelMatrix = glm::translate(0.0f,0.0f,-1.0f);modelMatrix2 = glm::translate(50.0f,0.0f,-2.0f);unsigned short indexes[]={ 0,1,2,1,3,2};ibo = CreateBufferObject(GL_ELEMENT_ARRAY_BUFFER,indexes,sizeof(unsigned short)*6,GL_STATIC_DRAW);vbo = CreateBufferObject(GL_ARRAY_BUFFER,vertices,sizeof(Vertice) * 4,GL_STATIC_DRAW);program = CreateStandardProgram("yuv420.vs","yuv420.fs");attrPositionLocation = glGetAttribLocation(program,"position");attrTexCoordLocation = glGetAttribLocation(program,"texcoord");modelMatrixLocation = glGetUniformLocation(program,"U_ModelMatrix");viewMatrixLocation = glGetUniformLocation(program,"U_ViewMatrix");projectionMatrixLocation = glGetUniformLocation(program,"U_ProjectionMatrix");textYlocation = glGetUniformLocation(program,"U_TextureY");textUlocation = glGetUniformLocation(program,"U_TextureU");textVlocation = glGetUniformLocation(program,"U_TextureV");InitYUV420();__android_log_print(ANDROID_LOG_INFO,HANGYU_LOG_TAG,"%d,%d,%d,%d",attrPositionLocation,modelMatrixLocation,viewMatrixLocation,projectionMatrixLocation);
}
extern "C" JNIEXPORT void JNICALL Java_com_example_learnogles_MainActivity_OnViewportChanged(JNIEnv*env,jobject MainActivity,jint width,jint height
){__android_log_print(ANDROID_LOG_INFO,HANGYU_LOG_TAG,"OnViewportChanged %dx%d",width,height);glViewport(0,0,width,height);viewMatrix=glm::lookAt(glm::vec3(0.0f,0.0f,0.0f),glm::vec3(0.0,0.0,-1.0f),glm::vec3(0.0,1.0f,0.0f));float half_width=float(width)/2.0f;float half_height=float(height)/2.0f;projectionMatrix=glm::ortho(-half_width,half_width,-half_height,half_height,0.1f,100.0f);
}
extern "C" JNIEXPORT void JNICALL Java_com_example_learnogles_MainActivity_Render(JNIEnv*env,jobject MainActivity
){glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT);glBindBuffer(GL_ARRAY_BUFFER,vbo);//使用程序对象作为当前渲染状态的一部分glUseProgram(program);glEnable(GL_DEPTH_TEST);glActiveTexture(GL_TEXTURE0);//激活0号纹理单元(初始化为GL_TEXTURE0)glBindTexture(GL_TEXTURE_2D,texture_y);//绑定纹理glUniform1i(textYlocation,0);//把0号纹理单元内容植入卡槽中glActiveTexture(GL_TEXTURE1);glBindTexture(GL_TEXTURE_2D,texture_u);glUniform1i(textUlocation,1);glActiveTexture(GL_TEXTURE2);glBindTexture(GL_TEXTURE_2D,texture_v);glUniform1i(textVlocation,2);//mvp矩阵glUniformMatrix4fv(modelMatrixLocation,1,GL_FALSE,glm::value_ptr(modelMatrix));glUniformMatrix4fv(viewMatrixLocation,1,GL_FALSE,glm::value_ptr(viewMatrix));glUniformMatrix4fv(projectionMatrixLocation,1,GL_FALSE,glm::value_ptr(projectionMatrix));//set attribute//启用或禁用通用顶点属性数组glEnableVertexAttribArray(attrPositionLocation);glVertexAttribPointer(attrPositionLocation,4,GL_FLOAT,GL_FALSE,sizeof(Vertice),0);glEnableVertexAttribArray(attrTexCoordLocation);glVertexAttribPointer(attrTexCoordLocation,4,GL_FLOAT,GL_FALSE,sizeof(Vertice),(void*)(sizeof(float)*4));glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,ibo);glDrawElements(GL_TRIANGLES,6,GL_UNSIGNED_SHORT,0);glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0);glBindBuffer(GL_ARRAY_BUFFER,0);glUseProgram(0);
}

VS 

attribute vec4 position;
attribute vec4 texcoord;
uniform mat4 U_ModelMatrix;
uniform mat4 U_ViewMatrix;
uniform mat4 U_ProjectionMatrix;
varying vec4 V_Texcoord;
void main(){V_Texcoord=texcoord;gl_Position=U_ProjectionMatrix*U_ViewMatrix*U_ModelMatrix*position;
}

FS

#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D U_TextureY;
uniform sampler2D U_TextureU;
uniform sampler2D U_TextureV;
varying vec4 V_Texcoord;
vec3 YUV420ToRGB(float y,float u,float v){return vec3(y+1.402*v,y-0.34413*u-0.71414*v,y+1.772*u);
}
vec3 YUV420ToRGBViaMatrix(float y,float u,float v){mat3 transform_matrix=mat3(1.0,1.0,1.0,0.0,-0.34413,1.772,1.402,-0.71414,0.0);return transform_matrix*vec3(y,u,v);
}
void main(){vec2 texcoord=vec2(V_Texcoord.x,1.0-V_Texcoord.y);float Y=texture2D(U_TextureY,texcoord).a;float U=texture2D(U_TextureU,texcoord).a-0.5;float V=texture2D(U_TextureV,texcoord).a-0.5;gl_FragColor=vec4(YUV420ToRGBViaMatrix(Y,U,V),1.0);
}

YUV纹理刷新

Utils类新增

void SubmitTexture2D(GLuint texture,void*pixel,int x, int y,int width,int height,GLenum cpu_format,GLenum dataType);
void SubmitTexture2D(GLuint texture,void*pixel,int x, int y,int width,int height,GLenum cpu_format,GLenum dataType)
{glBindTexture(GL_TEXTURE_2D,texture);glTexSubImage2D(GL_TEXTURE_2D,0,x,y,width,height,cpu_format,dataType,pixel);glBindTexture(GL_TEXTURE_2D,0);}

 

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/335969.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python与sqlite3_sqlite3与python2.5,pysqlite和apsw有什么区别

我想知道python2.5,pysqlite和apsw的sqlite3之间的区别&#xff1f;当我尝试使用python2.5在windows vista上安装pysqlite时,我有一个颠簸的运行,请参阅以下内容&#xff1a;>从http://sqlite.org/download.html下载sqlite并将它们解压缩到windows / system32文件夹并将sqli…

monolith_将Java EE Monolith雕刻成微服务

monolith在介绍了为什么微服务应该由事件驱动的简介博客之后&#xff0c;我想采取一些其他步骤&#xff0c;并在有关博客的同时准备我即将进行的一系列演讲&#xff08;在jBCNconf和Red Hat Summit上与您见面&#xff09; 。旧金山 &#xff09;。 在Twitter christianposta上关…

【H.264/AVC视频编解码技术】第四章【SPS序列参数集】

1.H264码流中重要的组成部分,保存针对整个视频序列的参数,丢失SPS的码流通常无法正常解码。 2.SPS信息的保存位置: 封装格式: FLV======会保存在 Tag中的Video Tag Data 部分,会有AVC VIDEO PACKET结构。SPS就包含在其中。 MP4===== H264裸码流: 保存…

spring内容协商管理_Spring框架中的内容协商

spring内容协商管理1.简介 使用BeanNameViewResolver完成的工作就是&#xff0c;我们刚刚在Spring上下文中创建了多个bean视图以生成预期的输出。 Spring很快引入了内容协商策略 &#xff0c;该策略可以使用传统的RESTful ResponseBody方法和HTTP消息转换器&#xff0c;以JSON或…

二叉树专题

二叉树 &#xff08;一&#xff09;二叉树的三种遍历方式&#xff1a; 前序遍历 &#xff1a; 1 2 4 5 3 6 7 &#xff1b; 中序遍历 &#xff1a; 4 2 5 1 6 3 7 &#xff1b; 后序遍历 &#xff1a; 4 5 2 6 7 3 1 &#xff1b; 本质是在递归序的基础上…

echart中拆线点的偏移_Real BIM | Rhino+Grasshopper在双曲异形玻璃幕墙中的应用

转载请联系并注明来源你好&#xff0c;我以自己所做的项目为例&#xff0c;介绍一下我的认知里&#xff0c;BIM技术对于真实项目的作用。案例是一个异形、双曲面的玻璃屋盖幕墙系统。如效果图所示&#xff0c;玻璃屋盖呈波浪状&#xff0c;塔楼装饰条与屋盖装饰条需要无缝连接。…

【安卓开发】Android初级开发(okhttp3发送带header与带参数的GET请求)

1.首先需要先加入相应依赖 dependencies{implementation com.squareup.okhttp3:okhttp:3.13.1 implementation com.squareup.okio:okio:2.2.2} 2.加入互联网权限 <!-- 互联网 --><uses-permission android:name"android.permission.INTERNET" /> <!…

java 文件保存在内存_如何掌握Java内存(并保存程序)

java 文件保存在内存通过AppDynamics解决应用程序问题的速度提高了10倍–以最小的开销在代码级深度监视生产应用程序。 开始免费试用&#xff01; 您花费了无数小时来解决Java应用程序中的错误并在需要的地方获得其性能。 在测试过程中&#xff0c;您注意到应用程序随着时间的…

sql 返回日期的年月部分_公示|2020年11月部分志愿活动名单公示

2020年11月部分志愿活动名单公示2020年11月18日人文与法学学院院楼协助分发教职工运动会服装志愿活动2020年11月19日人文与法学学院院楼“收彩旗”志愿活动2020年11月20日人文与法学学院组织观看2020年全国科学道德和学风建设宣讲教育报告会直播志愿活动(此活动不录入i志愿)202…

【安卓开发 】Android初级开发(三)动画

逐帧动画 方法一&#xff0c;在xml中设置 1.先将图片加入drawable 2.在drawable中新建xml,设置每一帧的图片和时间 <?xml version"1.0" encoding"utf-8"?> <animation-list xmlns:android"http://schemas.android.com/apk/res/android&…

javafx swing_Swing应用程序中的JavaFX 8 DatePicker

javafx swing1.概述 本文显示了一个使用JavaFX 8 DatePicker控件的Java SE 8 Swing应用程序的示例。 DatePicker控件允许用户以文本形式输入日期或从日历弹出窗口中选择日期。 本示例使用其中带有FX控件的Swing JFrame 。 为了将FX内容嵌入Swing应用程序中&#xff0c; javafx…

cup过高是什么意思_做青和焙火有什么关系?

武夷岩茶制作工艺复杂&#xff0c;环环相扣&#xff0c;每一步工艺对下一步工艺都有很大的影响&#xff0c;经过一系列的生化变化&#xff0c;最终呈现一杯好茶在我们面前&#xff0c;那我们最关心的做青和焙火两个问题&#xff0c;有什么影响呢&#xff1f;它们之间既有因果关…

【安卓开发 】Android初级开发(四)ListView

ListView的实现步骤 1.单独一行的布局可以如下 <?xml version"1.0" encoding"utf-8"?> <LinearLayout xmlns:android"http://schemas.android.com/apk/res/android"android:orientation"horizontal"android:layout_width&…

platform_SpringOne Platform 2016回顾

platform我最近结束了在拉斯维加斯参加SpringOne Platform会议的总结。 这是我第一次参加SpringOne。 这是聆听演讲并与软件开发领域的一些顶级专家进行对话的一种体验。 如果您没有参加SpringOne&#xff0c;那么您肯定会想要阅读这篇文章。 我们将讨论这四个主题&#xff0c…

不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置_【网络安全宣传周】网络安全小黑板 | 如何正确设置浏览器...

李夏是一个公司的职员&#xff0c;一天晚上加班赶制文档&#xff0c;由于要向客户汇报产品情况&#xff0c;需要获取大量网上信息&#xff0c;然而在制作中却发现浏览器的网页打不开了。第二天原计划向客户展示的材料未能完整汇总&#xff0c;客户见面对接效果也打了折扣。在当…

【安卓开发 】Android初级开发(五)自定义View

1.自定义View的构造函数调用的场景 package com.sina.myapplication;import android.content.Context; import android.util.AttributeSet; import android.view.View;import androidx.annotation.Nullable;public class Textview extends View {//在new Textview类的时候调用…

kafka分布式_带有Kafka和ZeroMQ的分布式类星体演员

kafka分布式因此&#xff0c;您已经有了使用actor的精美设计&#xff0c;选择了JVM和Quasar在该主题上的强大而忠实的观点。 所有明智的决定&#xff0c;但是在集群上进行分配时您有什么选择呢&#xff1f; 星系 Galaxy是一个非常酷的选择&#xff1a;快速的内存中数据网格&am…

vs 不能自动 析构函数_深入理解C++虚函数的override、overload与hide以及虚析构函数...

今天主要讲的是虚函数的override与overload的区别。首先我们来看一段代码&#xff1a;示例代码#include <stdio.h>#include <string>#include <iostream>#include <complex>using namespace std;class Father{public: Father(); ~Father(); virtual vo…

【开源项目】C++BASE64图像编解码算法

ZBase64.h #pragma once #include <string> using namespace std; class ZBase64 { public:ZBase64(void);~ZBase64(void);/*编码DataByte[in]输入的数据长度,以字节为单位*/string Encode(const unsigned char* Data, int DataByte);/*解码DataByte[in]输入的数据长度,…

log4j2 xsd_Log4j 2.x XSD的描述不完整

log4j2 xsd在博客文章JAXB和Log4j XML配置文件中 &#xff0c;我讨论了“与使用JAXB通过Java类处理[Log4j 1.x和Log4j 2.x] XML配置文件相关的细微差别。” 在本文中&#xff0c;我将探讨与通过Log4j 2.x XML Schema文件Log4j-config.xsd生成的JAXB对象生成Log4j 2.x配置XML相关…