首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏运维博客

    Go语言(十七) 配置文件库项目

    := t.Elem().Field(i) vField := v.Elem().Field(i) if tfield.Tag.Get("ini") ! struct type") } var strSlice []string //遍历结构体中的字段 for i:=0;i<t.NumField();i++ { tField := t.Field(i) vField := v.Field(i) if tField.Type.Kind() ! //subTFieldTagName := subTField.Tag.Get("ini") if len(tField.Tag.Get("ini")) > 0 { sectionName = tField.Tag.Get("ini") } //使用[]拼接sectionName sectionName = fmt.Sprintf

    60020发布于 2020-09-23
  • 来自专栏在周末的专栏

    RPC-Thrift(三)

    表示一个字段,写字段时调用的方法 public abstract void writeFieldBegin(TField field) throws TException; public abstract struct) {} public void writeStructEnd() {} //写字段方法,最终转换为对基本数据类型的写 public void writeFieldBegin(TField 0 : readI16(); return new TField("", type, id); } public void readFieldEnd() {} public TMap 表示一个字段,TField结构如下: public class TField { public TField() { this("", TType.STOP, (short)0); } public TField(String n, byte t, short i) { name = n; type = t; id = i; } public final

    95820发布于 2019-08-26
  • 来自专栏owent

    几个使用protobuf中C++接口的Arena的坑

    ::RepeatedField<TField> &src) { dst.Reserve(src.size()); dst.CopyFrom(src); } template <class TField> inline void protobuf_copy_message(::google::protobuf::RepeatedPtrField<TField> &dst, const : :google::protobuf::RepeatedPtrField<TField> &src) { dst.Reserve(src.size()); dst.CopyFrom(src ::RepeatedField<TField> &&src) { if (dst.GetArena() == src.GetArena()) { dst.Swap(&src); ::RepeatedPtrField<TField> &&src) { if (dst.GetArena() == src.GetArena()) { dst.Swap(&src

    7.3K51发布于 2020-11-13
  • 来自专栏爱生活爱编程

    Thrift快速入门和简单示例

    new org.apache.thrift.protocol.TStruct("User"); private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short )1); private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField AGE_FIELD_DESC = new org.apache.thrift.protocol.TField("age", org.apache.thrift.protocol.TType.I32,

    2.5K20编辑于 2022-06-27
  • 来自专栏孟君的编程札记

    Thrift使用教程(Java版本)

    , (short)1); private static final org.apache.thrift.protocol.TField BYTE_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField , (short)3); private static final org.apache.thrift.protocol.TField INT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField , (short)5); private static final org.apache.thrift.protocol.TField DOUBLE_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField , (short)1); private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField private static final org.apache.thrift.protocol.TField STRING_VALUE_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField

    8.3K43发布于 2020-08-27
  • 来自专栏二进制文集

    Thrift 对象序列化、反序列化-字节数组分析

    oprot.writeFieldBegin(AGE_FIELD_DESC); TBinaryProtocol 中的具体实现为: public void writeFieldBegin(TField field this.writeI16(field.id); } 可以看到,首先是将字节数组写入了一个byte表示该字段的类型,而这里的TFiled AGE_FIELD_DESC 为: private static final TField AGE_FIELD_DESC = new TField("age", TType.I32, (short)1); 在thrift中定义的第一个字段为: 1: required i32 age; 其中TType deserializer.deserialize(parsePerson, bytes); Person类的read函数: public void read(TProtocol iprot) throws TException { TField Struct: " + toString()); } validate(); } 其代码也很简单清晰,先在字节数组中读取TField(5个字节,1字节类型+4字节id),接着根据id

    3.5K30发布于 2018-12-19
  • 来自专栏golang算法架构leetcode技术php

    golang源码分析:go-mysql-elasticsearch(1)

    tfilter (id int(11),c1 int(11) , c2 int(11) , name varchar(256),primary key(id)); create table tfield think it is necessary to sync all tables in a database. tables = ["t", "t_[0-9]{1}","tid_[0-9]{1}", "tfield rule]] schema = "test" table = "t_[0-9]{1}" index = "test" type = "t" # Simple field rule # # desc tfield | # +----------+--------------+------+-----+---------+-------+ # [[rule]] schema = "test" table = "tfield " index = "test" type = "tfield" [rule.field] # Map column `id` to ES field `es_id` id="es_id" # Map

    46620编辑于 2023-09-06
  • 来自专栏Cyber Security

    【漏洞复现】万户 ezOFFICE协同管理平台 getAutoCode SQL注入

    %2898%29%7C%7CCHR%2866%29%7C%7CCHR%2890%29%7C%7CCHR%28108%29%2C8%29--+YJdO&field=field_name&tabName=tfield 6205=DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(66)||CHR(90)||CHR(108),8)-- YJdO&field=field_name&tabName=tfield

    1.3K10编辑于 2024-08-11
  • 来自专栏hightopo

    基于 HTML5 Canvas 的属性值点击出现多选项的制作

    创建表单面板 var formPane = new ht.widget.FormPane(); formPane.setPadding(0);//设置表单四周与组件内容的间距 var tField = new ht.widget.TextField();//创建一个文本框 tField.setText('');//文本框的内容为空 tField.setDisabled(true) { id: 'tag',//唯一标示属性,可通过formPane.getItemById(id)获取添加到对应的item对象 element: tField

    2.6K20发布于 2018-07-06
  • 来自专栏全栈程序员必看

    多栏式和三栏式的区别_找出在2013年有交易发生的账户列表

    procedure TformBuy.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState

    23920编辑于 2022-08-04
  • 来自专栏hightopo

    原 快速创建 HTML5 Canvas 电

    创建表单面板 var formPane = new ht.widget.FormPane(); formPane.setPadding(0);//设置表单四周与组件内容的间距 var tField = new ht.widget.TextField();//创建一个文本框 tField.setText('');//文本框的内容为空 tField.setDisabled(true) { id: 'tag',//唯一标示属性,可通过formPane.getItemById(id)获取添加到对应的item对象 element: tField

    1.8K20发布于 2018-06-05
  • 来自专栏微卡智享

    delphi提示“Undeclared identifier”的缺少引用单元列表

    ScktComp TComboBox StdCtrls TComponent Classes TControl Controls or QControls TCriticalSection SyncObjs TField

    2.7K20发布于 2019-07-25
  • 来自专栏菩提树下的杨过

    thrift 一个有意思的特性:Class名称无关性

    TProtocol iprot) 2 { 3 iprot.IncrementRecursionDepth(); 4 try 5 { 6 TField

    80480发布于 2018-01-18
  • 来自专栏菩提树下的杨过

    thrift:swift项目笔记

    org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField org.apache.thrift.protocol.TStruct("ping_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING iprot, ping_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField

    1.8K80发布于 2018-01-18
  • 来自专栏CDN_New

    thrift RPC 修改源码支持获取client ip

    sendLog_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField

    2.3K110发布于 2019-06-18
  • 来自专栏乐沙弥的世界

    SQL server 数据导入导出BCP工具使用详解

    ] [-6]                        --有关字符编码选项,通常很少使用       [-q] [-C { ACP | OEM | RAW | code_page } ] [-tfield_term

    3.9K20发布于 2018-08-07
  • 来自专栏DotNet NB && CloudNative

    .NET云原生应用实践(二):Sticker微服务RESTful API的实现

    GetPaginatedEntitiesAsync方法的代码: public Task<Paginated<TEntity>> GetPaginatedEntitiesAsync<TEntity, TField >( Expression<Func<TEntity, TField>> orderByExpression, bool sortAscending = true, int pageSize

    46410编辑于 2024-11-23
领券