【开发日志】2023.05 NormalMap Back To Sphere

news2024/10/6 5:54:28

【开发日志】2023.03.04 ZENO----SimpleGeometry----CreateSphere_EndlessDaydream的博客-CSDN博客CreateSpherehttps://blog.csdn.net/Angelloveyatou/article/details/129178914(4条消息) 【开发日志】2023.04 ZENO----Composite----CompNormalMap_EndlessDaydream的博客-CSDN博客https://blog.csdn.net/Angelloveyatou/article/details/130319455


Deprecated

struct CreateSphere : zeno::INode {
    virtual void apply() override {
        auto prim = std::make_shared<zeno::PrimitiveObject>();
        auto position = get_input2<zeno::vec3f>("position");
        auto scale = get_input2<zeno::vec3f>("scaleSize");
        auto rows = get_input2<int>("rows");
        auto columns = get_input2<int>("columns");
        auto radius = get_input2<float>("radius");
        auto quad = get_input2<bool>("quads");

        if (rows < 2) {
            rows = 2;
        }
        if (columns < 3) {
            columns = 3;
        }
        std::vector<zeno::vec3f> verts = {};
        std::vector<zeno::vec2i> poly = {};
        std::vector<int> loops = {};
        std::vector<zeno::vec2f> uvs = {};
        std::vector<zeno::vec3f> nors = {};

        verts.push_back (vec3f(0,1,0));
        for (auto row = 1; row < rows; row++) {
            float v = (float)row / (float)rows;
            float theta = M_PI * v;
            for (auto column = 0; column < columns; column++) {
                float u = (float)column / (float)columns;
                float phi = M_PI * 2 * u;
                float x = sin(theta) * cos(phi);
                float y = cos(theta);
                float z = -sin(theta) * sin(phi);
                verts.push_back(vec3f(x,y,z));
            }
        }
        verts.push_back (vec3f(0,-1,0));
        {
            //head
            for (auto column = 0; column < columns; column++) {
                if (column == columns - 1) {
                    loops.push_back(0);
                    loops.push_back(columns);
                    loops.push_back(1);
                    poly.push_back(vec2i(column * 3, 3));
                } else {
                    loops.push_back(0);
                    loops.push_back(column + 1);
                    loops.push_back(column + 2);
                    poly.push_back(vec2i(column * 3, 3));
                }
            }
            //body
            for (auto row = 1; row < rows - 1; row++) {
                for (auto column = 0; column < columns; column++) {
                    if (column == columns - 1) {
                        loops.push_back((row - 1) * columns + 1);
                        loops.push_back((row - 1) * columns + columns);
                        loops.push_back(row * columns + columns);
                        loops.push_back(row * columns + 1);
                        poly.push_back(vec2i(columns * 3 + (row - 1) * columns * 4 + column * 4, 4));
                    } else {
                        loops.push_back((row - 1) * columns + column + 2);
                        loops.push_back((row - 1) * columns + column + 1);
                        loops.push_back(row * columns + column + 1);
                        loops.push_back(row * columns + column + 2);
                        poly.push_back(vec2i(loops.size() - 4, 4));
                    }
                }
            }
            //tail
            for (auto column = 0; column < columns; column++) {
                if (column == columns - 1) {
                    loops.push_back((rows - 2) * columns + 1);
                    loops.push_back((rows - 2) * columns + column + 1);
                    loops.push_back((rows - 1) * columns + 1);
                    poly.push_back(vec2i(columns * 3 + (rows - 2) * columns * 4 + column * 3, 3));
                } else {
                    loops.push_back((rows - 2) * columns + column + 2);
                    loops.push_back((rows - 2) * columns + column + 1);
                    loops.push_back((rows - 1) * columns + 1);
                    poly.push_back(vec2i(loops.size() - 3, 3));
                }
            }
        }

        for(int column = 0;column < columns;column++){
            uvs.push_back({(column+0.5f)/columns, 1.0f, 0.0f});
        }
        for(int row = 1;row < rows;row++){
            for(int column = 0;column < columns+1;column++){
                uvs.push_back({(column+0.0f)/columns,1.0f-(row+0.0f)/rows,0.0f});
            }
        }
        for(int column = 0;column < columns;column++){
            uvs.push_back({(column+0.5f)/columns, 0.0f, 0.0f});
        }

        auto& loops_uv = prim->loops.add_attr<int>("uvs");
        loops_uv.resize(0);
        for(int column = 0;column < columns;column++){
            loops_uv.push_back(column);
            loops_uv.push_back(columns+column);
            loops_uv.push_back(columns+column+1);
        }
        for(int row = 1;row < rows-1;row++){
            for(int column = 0;column < columns;column++){
                loops_uv.push_back(columns+(columns+1)*(row-1)+column+1);
                loops_uv.push_back(columns+(columns+1)*(row-1)+column);
                loops_uv.push_back(columns+(columns+1)*row+column);
                loops_uv.push_back(columns+(columns+1)*row+column+1);
            }
        }
        for(int column = 0;column < columns;column++){
            loops_uv.push_back(columns+(columns+1)*(rows-2)+column+1);
            loops_uv.push_back(columns+(columns+1)*(rows-2)+column);
            loops_uv.push_back(columns+(columns+1)*(rows-1)+column);
        }

        nors.resize(verts.size());
        for(int i = 0; i < verts.size(); i++){
            auto n = verts[i];
            auto p = verts[i];
            auto rotate = get_input2<zeno::vec3f>("rotate");
            glm::mat4 transform = glm::mat4 (1.0);
            transform = glm::translate(transform, glm::vec3(position[0], position[1], position[2]));
            transform = glm::rotate(transform, glm::radians(rotate[0]), glm::vec3(1, 0, 0));
            transform = glm::rotate(transform, glm::radians(rotate[1]), glm::vec3(0, 1, 0));
            transform = glm::rotate(transform, glm::radians(rotate[2]), glm::vec3(0, 0, 1));
            transform = glm::scale(transform, glm::vec3(scale[0],scale[1],scale[2]) * radius);
            auto gp = transform * glm::vec4(p[0], p[1], p[2], 1);
            verts[i] = zeno::vec3f(gp.x, gp.y, gp.z);

            auto n_transform = glm::transpose(glm::inverse(transform));
            auto gn = n_transform * glm::vec4 (n[0], n[1], n[2], 0);
            nors[i] = zeno::vec3f (gn.x, gn.y, gn.z);
        }

        prim->verts.resize(verts.size());
        for (auto i = 0; i < verts.size(); i++) {
            prim->verts[i] = verts[i];
        }
        prim->polys.resize(poly.size());
        for (auto i = 0; i < poly.size(); i++) {
            prim->polys[i] = poly[i];
        }
        prim->loops.resize(loops.size());
        for (auto i = 0; i < loops.size(); i++) {
            prim->loops[i] = loops[i];
        }
        prim->uvs.resize(uvs.size());

        for (auto i = 0; i < uvs.size(); i++) {
            prim->uvs[i] = uvs[i];
        }

        auto &nors2 = prim->verts.add_attr<zeno::vec3f>("nrm");
        for (auto i = 0; i < nors.size(); i++) {
            nors2[i] = nors[i];
        }

        if (!get_input2<bool>("hasNormal")){
            prim->verts.attrs.erase("nrm");
        }

        if (!get_input2<bool>("hasVertUV")){
            prim->uvs.clear();
            prim->loops.erase_attr("uvs");
        }

        if (get_input2<bool>("isFlipFace")){
            for (auto i = 0; i < prim->polys.size(); i++) {
                auto [base, cnt] = prim->polys[i];
                for (int j = 0; j < (cnt / 2); j++) {
                    std::swap(prim->loops[base + j], prim->loops[base + cnt - 1 - j]);
                    if (prim->loops.has_attr("uvs")) {
                        std::swap(prim->loops.attr<int>("uvs")[base + j], prim->loops.attr<int>("uvs")[base + cnt - 1 - j]);
                    }
                }
            }
        }

        if(!quad){
            primTriangulate(prim.get());
        }
        set_output("prim",std::move(prim));
    }
};

ZENDEFNODE(CreateSphere, {
    {
        {"vec3f", "position", "0, 0, 0"},
        {"vec3f", "scaleSize", "1, 1, 1"},
        {"float", "radius", "1"},
        ROTATE_PARM
        NORMUV_PARM
        {"int", "rows", "12"},
        {"int", "columns", "24"},
        {"bool", "quads", "0"},
    },
    {"prim"},
    {},
    {"create"},
});
struct PrimitiveDuplicate : zeno::INode {
    virtual void apply() override {
        auto mesh = get_input<PrimitiveObject>("meshPrim");
        auto pars = get_input<PrimitiveObject>("particlesPrim");

        auto outm = std::make_shared<PrimitiveObject>();
        outm->resize(pars->size() * mesh->size());

        float uniScale = has_input("uniScale") ?
            get_input<NumericObject>("uniScale")->get<float>() : 1.0f;

        auto scaleByAttr = get_param<std::string>("scaleByAttr");

        auto const &parspos = pars->attr<vec3f>("pos");
        auto const &meshpos = mesh->attr<vec3f>("pos");
        auto &outmpos = outm->add_attr<vec3f>("pos");

        if (scaleByAttr.size()) {
            auto const &scaleAttr = pars->attr<float>(scaleByAttr);
            #pragma omp parallel for
            for(int i = 0; i < parspos.size(); i++) {
                for (int j = 0; j < meshpos.size(); j++) {
                    auto scale = uniScale * scaleAttr[i];
                    outmpos[i * meshpos.size() + j] = parspos[i] + scale * meshpos[j];
                }
            }
        } else {
            #pragma omp parallel for
            for(int i = 0; i < parspos.size(); i++) {
                for (int j = 0; j < meshpos.size(); j++) {
                    auto scale = uniScale;
                    outmpos[i * meshpos.size() + j] = parspos[i] + scale * meshpos[j];
                }
            }
        }

        if (get_param<bool>("attrFromMesh")) {
            mesh->verts.foreach_attr([&] (auto const &key, auto const &attr) {
                using T = std::decay_t<decltype(attr[0])>;
                auto &outattr = outm->add_attr<T>(key);
                #pragma omp parallel for
                for(int i = 0; i < pars->size(); i++) {
                    for (int j = 0; j < attr.size(); j++) {
                        outattr[i * attr.size() + j] = attr[j];
                    }
                }
            });
        }

        if (get_param<bool>("attrFromParticles")) {
            pars->verts.foreach_attr([&] (auto const &key, auto const &attr) {
                using T = std::decay_t<decltype(attr[0])>;
                auto &outattr = outm->add_attr<T>(key);
                #pragma omp parallel for
                for (int i = 0; i < attr.size(); i++) {
                    for (int j = 0; j < mesh->size(); j++) {
                        outattr[i * mesh->size() + j] = attr[i];
                    }
                }
            });
        }

        outm->points.resize(pars->size() * mesh->points.size());
        #pragma omp parallel for
        for(int i = 0; i < pars->size(); i++) {
            for (int j = 0; j < mesh->points.size(); j++) {
                outm->points[i * mesh->points.size() + j]
                    = mesh->points[j] + i * meshpos.size();
            }
        }

        outm->lines.resize(pars->size() * mesh->lines.size());
        #pragma omp parallel for
        for(int i = 0; i < pars->size(); i++) {
            for (int j = 0; j < mesh->lines.size(); j++) {
                outm->lines[i * mesh->lines.size() + j]
                    = mesh->lines[j] + i * meshpos.size();
            }
        }

        outm->tris.resize(pars->size() * mesh->tris.size());
        #pragma omp parallel for
        for(int i = 0; i < pars->size(); i++) {
            for (int j = 0; j < mesh->tris.size(); j++) {
                outm->tris[i * mesh->tris.size() + j]
                    = mesh->tris[j] + i * meshpos.size();
            }
        }

        outm->quads.resize(pars->size() * mesh->quads.size());
        #pragma omp parallel for
        for(int i = 0; i < pars->size(); i++) {
            for (int j = 0; j < mesh->quads.size(); j++) {
                outm->quads[i * mesh->quads.size() + j]
                    = mesh->quads[j] + i * meshpos.size();
            }
        }

        set_output("outPrim", std::move(outm));
    }
};


ZENDEFNODE(PrimitiveDuplicate, {
        {
        "meshPrim",
        "particlesPrim",
        {"float", "uniScale", "1.0"},
        }, {
        "outPrim",
        }, {
        {"bool", "attrFromMesh", "1"},
        {"bool", "attrFromParticles", "1"},
        {"string", "scaleByAttr", ""},
        }, {
        "deprecated",
        }});


}
void primSampleTexture(
    std::shared_ptr<PrimitiveObject> prim,
    const std::string &srcChannel,
    const std::string &uvSource,
    const std::string &dstChannel,
    std::shared_ptr<PrimitiveObject> img,
    const std::string &wrap,
    const std::string &filter,
    vec3f borderColor,
    float remapMin,
    float remapMax
) {
    if (!img->userData().has("isImage")) throw zeno::Exception("not an image");
    using ColorT = float;
    const ColorT *data = (float *)img->verts.data();
    auto &clr = prim->add_attr<zeno::vec3f>(dstChannel);
    auto w = img->userData().get2<int>("w");
    auto h = img->userData().get2<int>("h");
    std::function<zeno::vec3f(vec3f, const ColorT*, int, int, int, vec3f)> queryColor;
    if (filter == "nearest") {
        if (wrap == "REPEAT") {
            queryColor = [=](vec3f uv, const ColorT *data, int w, int h, int n, vec3f _clr) -> vec3f {
                uv = (uv - remapMin) / (remapMax - remapMin);
                auto iuv = uvRepeat(uv, w, h);
                return queryColorInner(iuv, data, w, n);
            };
        } else if (wrap == "CLAMP_TO_EDGE") {
            queryColor = [=](vec3f uv, const ColorT *data, int w, int h, int n, vec3f _clr) -> vec3f {
                uv = (uv - remapMin) / (remapMax - remapMin);
                auto iuv = uvClampToEdge(uv, w, h);
                return queryColorInner(iuv, data, w, n);
            };
        } else if (wrap == "CLAMP_TO_BORDER") {
            queryColor = [=](vec3f uv, const ColorT *data, int w, int h, int n, vec3f clr) -> vec3f {
                uv = (uv - remapMin) / (remapMax - remapMin);
                if (uv[0] < 0 || uv[0] > 1 || uv[1] < 0 || uv[1] > 1) {
                    return clr;
                }
                auto iuv = uvClampToEdge(uv, w, h);
                return queryColorInner(iuv, data, w, n);
            };
        } else {
            zeno::log_error("wrap type error");
            throw std::runtime_error("wrap type error");
        }
    }
    else {
        queryColor = [=](vec3f uv, const ColorT *data, int w, int h, int n, vec3f _clr) -> vec3f {
            uv = (uv - remapMin) / (remapMax - remapMin);
            float u, v;
            auto iuv = uvClampToEdge(uv, w, h, u, v);

            auto c00 = queryColorInner(iuv, data, w, n, h);
            auto c01 = queryColorInner(iuv + vec2i(1, 0), data, w, n, h);
            auto c10 = queryColorInner(iuv + vec2i(0, 1), data, w, n, h);
            auto c11 = queryColorInner(iuv + vec2i(1, 1), data, w, n, h);
            auto a = zeno::mix(c00, c01, u);
            auto b = zeno::mix(c10, c11, u);
            auto c = zeno::mix(a, b, v);
            return c;
        };
    }

    if (uvSource == "vertex") {
        auto &uv = prim->attr<zeno::vec3f>(srcChannel);
        #pragma omp parallel for
        for (auto i = 0; i < uv.size(); i++) {
            clr[i] = queryColor(uv[i], data, w, h, 3, borderColor);
        }
    }
    else if (uvSource == "tris") {
        auto uv0 = prim->tris.attr<vec3f>("uv0");
        auto uv1 = prim->tris.attr<vec3f>("uv1");
        auto uv2 = prim->tris.attr<vec3f>("uv2");
        #pragma omp parallel for
        for (auto i = 0; i < prim->tris.size(); i++) {
            auto tri = prim->tris[i];
            clr[tri[0]] = queryColor(uv0[i], data, w, h, 3, borderColor);
            clr[tri[1]] = queryColor(uv1[i], data, w, h, 3, borderColor);
            clr[tri[2]] = queryColor(uv2[i], data, w, h, 3, borderColor);
        }

    }
    else if (uvSource == "loopsuv") {
        auto &loopsuv = prim->loops.attr<int>("uvs");
        #pragma omp parallel for
        for (auto i = 0; i < prim->loops.size(); i++) {
            auto uv = prim->uvs[loopsuv[i]];
            int index = prim->loops[i];
            clr[index] = queryColor({uv[0], uv[1], 0}, data, w, h, 3, borderColor);
        }
    }
    else {
        zeno::log_error("unknown uvSource");
        throw std::runtime_error("unknown uvSource");
    }
}

void primSampleTexture(
        std::shared_ptr<PrimitiveObject> prim,
        const std::string &srcChannel,
        const std::string &uvSource,
        const std::string &dstChannel,
        std::shared_ptr<PrimitiveObject> img,
        const std::string &wrap,
        vec3f borderColor,
        float remapMin,
        float remapMax
) {
    return primSampleTexture(prim, srcChannel, uvSource, dstChannel, img, wrap, "nearest", borderColor, remapMin, remapMax);;
}
struct PrimSample2D : zeno::INode {
    virtual void apply() override {
        auto prim = get_input<PrimitiveObject>("prim");
        auto srcChannel = get_input2<std::string>("uvChannel");
        auto srcSource = get_input2<std::string>("uvSource");
        auto dstChannel = get_input2<std::string>("targetChannel");
        auto image = get_input2<PrimitiveObject>("image");
        auto wrap = get_input2<std::string>("wrap");
        auto filter = get_input2<std::string>("filter");
        auto borderColor = get_input2<vec3f>("borderColor");
        auto remapMin = get_input2<float>("remapMin");
        auto remapMax = get_input2<float>("remapMax");
        primSampleTexture(prim, srcChannel, srcSource, dstChannel, image, wrap, filter, borderColor, remapMin, remapMax);

        set_output("outPrim", std::move(prim));
    }
};
ZENDEFNODE(PrimSample2D, {
    {
        {"PrimitiveObject", "prim"},
        {"PrimitiveObject", "image"},
        {"string", "uvChannel", "uv"},
        {"enum vertex tris loopsuv", "uvSource", "vertex"},
        {"string", "targetChannel", "clr"},
        {"float", "remapMin", "0"},
        {"float", "remapMax", "1"},
        {"enum REPEAT CLAMP_TO_EDGE CLAMP_TO_BORDER", "wrap", "REPEAT"},
        {"enum nearest linear", "filter", "nearest"},
        {"vec3f", "borderColor", "0,0,0"},
    },
    {
        {"PrimitiveObject", "outPrim"}
    },
    {},
    {"primitive"},
});

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

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

相关文章

Linux-CentOS7安装Oracle11g 11.2.0.1.0

CentOS7安装Oracle11g 下载yum包更新RPM包解压安装包至tmp目录关闭selinux关闭防火墙创建Oracle用户修改内核配置文件创建安装目录和设置文件权限设置环境变量编辑静默安装响应文件安装打开一个新终端使用root用户登录启动监听建立数据库进程查询查看监听状态sqlplus登录设置开…

pgzero所有知识点详解

目录 什么是pgzero&#xff1f; pgzero的安装 4&#xff0c;正式开始&#xff01; 1&#xff0c;调整背景色 2&#xff0c;导入角色 3&#xff0c;鼠标事件 5&#xff0c;按键事件 6&#xff0c;刷新功能 1&#xff0c;角色属性 2&#xff0c;功能介绍 7&#xff0c;…

Java面试 异常

文章目录 1. Java 异常类层次结构概览图2. Exception 和 Error 有什么区别&#xff1f;3. Checked Exception 和 Unchecked Exception 有什么区别&#xff1f;4. Throwable 类常用方法有哪些&#xff1f;5. try-catch-finally 如何使用&#xff1f;6. finally 中的代码一定会执…

chatGPT VS 科大讯飞星火大模型 使用初体验,到底谁更胜一筹?

下午这会有时间&#xff0c;正好之前申请了讯飞星火大模型的体验&#xff0c;这里就想着简单使用体验对比一下chatGPT和星火大模型的差异&#xff0c;废话不多说这里直接上图&#xff1a; 【诺特兰德叶黄素与纯天然蔬菜中的叶黄素有什么区别】 【今年六月份我就要参加高考了&am…

Python实战案例03

文章目录 1、归并排序2、角谷猜想3、兔子数列4、学生管理系统5、饮品自动售货机6、信息安全策略——文件备份7、用户账户管理1、归并排序 先将待排序的序列划分成若干长度为 1 的子序列,依次将两个子序列排序后合并成长度为 2 的子序列;再依次将两个子序列排序后合并成长度为…

基于Yolov8的道路缺陷检测,加入PConv、WIOU 、DCNV2提升检测精度

1.数据集介绍 缺陷类型:crack 数据集数量:195张 1.1数据增强,扩充数据集 通过medianBlur、GaussianBlur、Blur3倍扩充得到780张图片 按照train、val、test进行8:1:1进行划分 1.1.1 通过split_train_val.py得到trainval.txt、val.txt、test.txt # coding:utf-8import…

事件轮询EventLoop

JS 是一门单线程语言 (换句话说: 一个时间内我只能做一件事), 异步操作都是放到事件循环队列中, 等待主执行栈来执行 JS 是如何执行的 (执行顺序) ●从上往下, 一行一行执行 ●如果中间的某一行书写有误, 那么程序在运行到这一行会报错并停止向下继续运行 ●先把所有的同步代码…

15个对Web开发人员有用工具网站

1. 代码转图片 网址&#xff1a;https://carbon.now.sh/ 使用 Carbon 创建和分享源代码的精美图像。它提供了多种代码风格和主题。 3.图片图库 网址&#xff1a;https://unsplash.com/ 4. 智能 WebP、PNG 和 JPEG 图片压缩 网址&#xff1a;https://tinypng.com/ tiny…

SpringCloud00

服务调用方式 RPC和HTTP 无论是微服务还是SOA&#xff0c;都面临着服务间的远程调用。那么服务间的远程调用方式有哪些呢&#xff1f; 常见的远程调用方式有以下2种&#xff1a; RPC&#xff1a;Remote Produce Call远程过程调用&#xff0c;类似的还有 。自定义数据格式&am…

VSAN 7 安装部署指南(一)

本文使用三台服务器安装ESXI 7.0 &#xff0c;并在其中一台ESXI中安装vCenter 7.0。本环境中最终在VMware Workstation虚拟机中做的嵌套虚拟化。每台虚拟机配置两块网卡&#xff0c;一块网卡桥接&#xff0c;一块NAT。三块硬盘&#xff0c;一块100GB作为系统盘&#xff0c;一块…

C++前序遍历(栈)

#include <stdio.h> #include <malloc.h> //树结构 typedef struct kl { int data; struct kl *lchild; struct kl *rchild; }bittree; //栈结构 typedef struct ji { int top; bittree **data; int size; }stack; //初始化栈 void in…

【PCIE体系结构十】链路两端的参考时钟有频偏怎么办?

&#x1f449;个人主页&#xff1a;highman110 &#x1f449;作者简介&#xff1a;一名硬件工程师&#xff0c;持续学习&#xff0c;不断记录&#xff0c;保持思考&#xff0c;输出干货内容 参考书籍&#xff1a;《PCI.EXPRESS系统体系结构标准教材 Mindshare》 PCIE规范中…

Linux环境基础开发工具

目录 Linux软件包管理器yum Linux开发工具 文本编辑器vi、vim vim的基本概念 vim操作 Linux编译器-gcc\g使用 函数库分为动态库和静态库 Linux调试器gdb使用 在gdb模式下的命令 Linux软件包管理器yum yum怎么说呢&#xff1f;就相当我们手机里的应用商店。我们需要安…

RAID磁盘阵列(看咱这篇就够了!)

目录 一、RAID简介 二、RAID的级别详列 三、总结 前言&#xff1a; 写这篇博客的原因是小编在工作中遇到的这个不熟悉的硬件知识&#xff0c;然后工作之余就立马搜集了资料进行学习。了解了RAID的作用和区别以及如何进行挂载之类的。本篇以及之后的一篇博客适合新手小白来初…

8.防火墙

文章目录 防火墙iptables防火墙介绍基础操作高级操作通用匹配隐含匹配端口匹配&#xff1a;--sport 源端口、--dport 目的端口 TCP标志位匹配&#xff1a;--tcp-flags TCP标志位ICMP类型匹配&#xff1a;--icmp-type ICMP类型 显式匹配多端口匹配IP范围匹配&#xff1a;-m ipra…

FPGA_学习_04_Verilog基础语法和Modelsem仿真

前言&#xff1a;对于以前学过C/C/C#的作者来讲&#xff0c;Verilog的基础语法算是特别简单的。本文主要介绍Verilog的基础语法和Modelsem仿真。 Verilog的基础语法 1 模块声明 FPGA开发是以模块为基础的&#xff0c;每个可综合的.v文件都是一个模块&#xff0c;模块由module…

华为云——代码托管的使用

一、打开前后端项目 登录华为云&#xff0c;点击页面右上角的用户名——点击个人设置 2.点击代码托管的HTTPS密码管理&#xff0c;设置自己的密码 3.回到代码仓库&#xff0c;复制HTTP地址 4.打开GitHubDesktop&#xff0c;点击左上角进行仓库克隆 &#xff08;我这里已经cl…

Redis 介绍相关知识,常用五大数据结构

1.Redis 介绍相关知识 Redis 是单线程多路 IO 复用技术 多路复用是指使用一个线程来检查多个文件描述符&#xff08;Socket&#xff09;的就绪状态&#xff0c;比如调用select 和 poll 函数&#xff0c;传入多个文件描述符&#xff0c;如果有一个文件描述符就绪&#xff0c;则…

1米挂幅「社交泛娱乐出海作战地图」预定火爆,免费抢领纸质版

移步【融云全球互联网通信云】回复“地图”免费领 家人们&#xff01; 融云自制《社交泛娱乐出海作战地图》 首开大捷&#xff01; 预约已超 300 出海必备实战手册 移步公众号报名 泰火辣~ 已预约进入排队的朋友请耐心等待 后期我们将按照报名顺序依次派送 另外&#…

终于通过啦! 我拿到了阿里云【通义千问】大模型AI测试体验资格啦!

&#x1f680; 个人主页 极客小俊 ✍&#x1f3fb; 作者简介&#xff1a;web开发者、设计师、技术分享博主 &#x1f40b; 希望大家多多支持一下, 我们一起进步&#xff01;&#x1f604; &#x1f3c5; 如果文章对你有帮助的话&#xff0c;欢迎评论 &#x1f4ac;点赞&#x1…