Facebook Wire Protocal Buffer (protobuf)简介

Java代码保护与Vlinx Java Protector应用指南 Vlinx Java Protector 是一款专业的 Java 应用安全保护工具,旨在为开发者提供一系列的功能以确保 Java 应用在分发和执行过程中的安全。它不仅可以加密 Java 字节码,还能通过集成开发环境支持和一系列的配置参数来提高应用程序的安全性。本章节将详细介绍 Vlinx Java Protector 的功能特点及其用户界面的使用。在Java应用程序的保护中,混淆技术是一种关键的安全措施,用来提升代码的防御能力。 阅读详情

The Corner

Square Engineering Blog

 

Introducing Wire Protocol Buffers

August23, 2013

What is Wire?

Wire is a new, open-sourceimplementation of Google's Protocol Buffers. It'smeant for Android devices but can be used on anything that runs Java languagecode.

AtSquare, we use Protocol Buffers extensively. Protocol Buffers are a language-and platform-neutral schema for describing and transmitting data. Developerscan use the same schemas across diverse environments, including theenvironments we care about at Square, such as Java and Ruby servers and Androidand iOS devices.

ProtocolBuffer .proto sourcefiles are human-readable and can contain comments, so it's easy to documentyour schema right where it is defined. Protocol Buffers define a compact binarywire format that allows schemas to evolve without breaking existing clients.Typically, a code generator is used that reads .proto files, and emits source code inthe language of your choice. This approach helps to speed development since theresulting code is expressed in the same language as the rest of yourapplication, allowing tools such as IDE autocompletion to do their job fully.

Wire Features

As webegan to run into limitations of the standard Protocol Buffer implementation inour Android apps, we made a wish list of the features we wanted for a futureimplementation:

·        Messages should contain a minimumnumber of generated methods

·        Messages should be clean,developer-friendly data objects:

·        They should be highly readable

·        They should be deeply immutable

·        They should have meaningful equals, hashCode, and toString methods

·        They should support the chained Builder pattern

·        They should inherit documentationfrom the .proto sourcefiles

·        Protocol Buffer enums should maponto Java enums

·        Ideally, everything should be buildableusing Java-based tools

Before wedecided to build a new library we looked at several alternatives, including therecent NanoAndroid Protocol Buffer library.While Nano Protocol Buffers generate very few methods, they didn't meet ourother goals. Ultimately, we decided to create our own library from scratch,built on Square's ProtoParser and JavaWriter libraries.

It'shandy to be able to use generated Protocol Buffer classes as full-fledged dataobjects in your app. By including equals, hashCode, and toString methods,messages can participate in Java collections. Since the generated code is cleanand compact, stepping into it in the debugger is not a problem. And becausecomments in your .proto files arecopied into the generated Java source code, the documentation for your messagesand fields is right there in your IDE.

Reducing the Method Count

In thepast, Android developers attempting to use Protocol Buffers have paid a steepprice. The standard Protocol Buffer implementation (protoc) generates at least nine methods for each optional orrequired field in your schema (variants of get, set, has, and clear), and atleast eighteen methods for repeated fields!

Havingall this flexibility is great in non-constrained environments — whatever methodyou need is probably just a few auto-completed keystrokes away. But in Androidenvironments the Dalvik bytecode format imposes a hard limit of 64Kmethods in a single application. For the Square Register app, generatedProtocol Buffer code was taking up a large chunk of our method space. Byswitching to Wire, we removed almost 10,000 methods from our application andgained a lot of breathing room to add new features.

Wire Example

Considerthe classic Person protocolbuffer definition:

messagePerson{

  // The customer's full name.

  requiredstringname=1;

  // The customer's ID number.

  requiredint32id=2;

  // Email address for the customer.

  optionalstringemail=3;

 

  enumPhoneType{

   MOBILE=0;

   HOME=1;

   WORK=2;

  }

 

  messagePhoneNumber{

   // The user's phone number.

   requiredstringnumber=1;

   // The type of phone stored here.

   optionalPhoneTypetype=2[default=HOME];

  }

 

  // A list of the user's phone numbers.

  repeatedPhoneNumberphone=4;

}

The Person class Wire generates is below(the complete generated code is
here):

publicfinalclassPersonextendsMessage{

  /** The customer's full name. */

  @ProtoField(tag=1,type=STRING,label=REQUIRED)

  publicfinalStringname;

 

  /** The customer's ID number. */

  @ProtoField(tag=2,type=INT32,label=REQUIRED)

  publicfinalIntegerid;

 

  /** Email address for the customer. */

  @ProtoField(tag=3,type=STRING)

  publicfinalStringemail;

 

  /**  A list of the user's phonenumbers. */

  @ProtoField(tag=4,label=REPEATED)

  publicfinalList<PhoneNumber>phone;

 

  privatePerson(Builderbuilder){

   super(builder);

   this.name=builder.name;

   this.id=builder.id;

   this.email=builder.email;

   this.phone=immutableCopyOf(builder.phone);

  }

 

  @Overridepublicbooleanequals(Objectother){

   if(!(otherinstanceofPerson))returnfalse;

   Persono=(Person)other;

   returnequals(name,o.name)

       &&equals(id,o.id)

       &&equals(email,o.email)

       &&equals(phone,o.phone);

  }

 

  @OverridepublicinthashCode(){

   intresult=hashCode;

   if(result==0){

     result=name!=null?name.hashCode():0;

     result=result*37+(id!=null?id.hashCode():0);

     result=result*37+(email!=null?email.hashCode():0);

     result=result*37+(phone!=null?phone.hashCode():0);

     hashCode=result;

   }

   returnresult;

  }

 

  publicstaticfinalclassBuilderextendsMessage.Builder<Person>{

   // not shown

  }

}

How it Works

Aninstance of a message class can only be created by a corresponding nested Builder class. Wire generates a singlemethod per field in each builder in order to support chaining:

Personperson=newPerson.Builder()

   .name("Omar")

   .id(1234)

   .email("omar@wire.com")

   .phone(Arrays.asList(newPhoneNumber.Builder()

       .number("410-555-0909")

       .type(PhoneType.MOBILE)

       .build()))

   .build();

Wirereduces the number of generated methods by using a public final field for each message field.Arrays are wrapped, so message instances are deeply immutable. Each field isannotated with a @ProtoField annotationproviding metadata that Wire needs to perform serialization anddeserialization:

@ProtoField(tag=1,type=STRING,label=REQUIRED)

publicfinalStringname;

Use thesefields directly to access your data:

if(person.phone!=null){

  for(PhoneNumberphone:person.phone)

   if(phone.type==PhoneType.MOBILE){

     sendSms(person.name,phone.number,message);

     break;

   }

  }

}

The codeto serialize and deserialize the Person wecreated above looks like this:

byte[]data=person.toByteArray();

Wirewire=newWire();

PersonnewPerson=wire.parseFrom(data,Person.class);

Somefeatures, such as serialization, deserialization, and the toString method are implemented usingreflection. Wire caches reflection information about each message class thefirst time it is encountered for better performance.

Instandard Protocol Buffers, you would call person.hasEmail() to see if an email address hasbeen set. In Wire, you simply check if person.email == null. For repeated fields such asphone, Wire alsorequires your app to get or set a List of PhoneNumber instances all at once, whichsaves a lot of methods.

Wiresupports additional features such as extensions and unknown fields. At present,it lacks support for some advanced features including custom options, services,and runtime introspection of schemas. These can be added in the future as usecases for them on constrained devices emerge.

Wiredeliberately does not support the obsolete 'groups' feature.

Try it out!

Weencourage you to try Wire, contribute to the code, and let us know how it worksin your apps

Wire Protocol Buffers

“A man got to have a code!” - Omar Little

As ourteams and programs grow, the variety and volume of data also grows. Successwill turn your simple data models into complex ones! Whether your applicationis storing data to disk or transmitting it over a network, the structure andinterpretation of that data should be clear. Consumers work best with data theyunderstand!

Schemasdescribe and document data models. If you have data, you should have a schema.

ProtocolBuffers

Google'sProtocol Buffers are built around a great schema language:

  • It's cross platform and language independent. Whatever programming language you use, you'll be able to use proto schemas with your application.
  • Proto schemas are backwards-compatible and future-proof. You can evolve your schema as your application loses old features and gains new ones.
  • It's focused. Proto schemas describe your data models. That's it.

Here's asample message definition:

syntax ="proto2";

 

packagesquareup.dinosaurs;

 

optionjava_package = "com.squareup.dinosaurs";

 

import"squareup/geology/period.proto";

 

messageDinosaur {

  // Common name of this dinosaur, like"Stegosaurus".

  optionalstringname = 1;

 

  // URLs with images of this dinosaur.

  repeatedstringpicture_urls = 2;

 

  optionalsquareup.geology.Periodperiod = 5;

}

Andhere's an enum definition:

syntax ="proto2";

 

packagesquareup.geology;

 

optionjava_package = "com.squareup.geology";

 

enumPeriod {

  // 145.5 million years ago — 66.0million years ago.

  CRETACEOUS = 1;

 

  // 201.3 million years ago — 145.0million years ago.

  JURASSIC = 2;

 

  // 252.17 million years ago — 201.3million years ago.

  TRIASSIC = 3;

}

Thisschema language is Protocol Buffers' best feature. You might even use it purelyfor documentation purposes, such as to describe a JSON API.

Protocol Buffers also defines acompact binary encoding of messages that conform to the schema. This encodingis fast to encode, fast to decode, small to transmit, and small to store. Thebinary encoding uses numeric tags from the schema, like the 5 for period above.

Forexample, let's encode this dinosaur:

{

  name:"Stegosaurus",

  period: JURASSIC

}

Theencoded value is just 15 bytes:

Hex  Description

 0a  tag: name(1), field encoding:LENGTH_DELIMITED(2). 1 << 3 | 2

 0b  "Stegosaurus".length()

 53  'S'

 74  't'

 65  'e'

 67  'g'

 6f  'o'

 73  's'

 61  'a'

 75  'u'

 72  'r'

 75  'u'

 73  's'

 28  tag: period(5), field encoding: VARINT(0). 5<< 3 | 0

 02  JURASSIC(2)

Why Wire?

TheProtocol Buffers schema language and binary encoding are both defined byGoogle. Wire is an independent implementation from Square that's specificallydesigned for Android and Java.

For eachmessage type defined in the schema, Wire generates an immutable model class andits builder. The generated code looks like code you'd write by hand: it'sdocumented, formatted, and simple. Wire's APIs should feel at home toprogrammers who like Effective Java.

Thatsaid, there are some interesting design decisions in Wire:

  • Wire messages declare public final fields instead of the usual getter methods. This cuts down on both code generated and code executed. Less code is particularly beneficial for Android programs.
  • Wire avoids case mapping. A field declared as picture_urls in a schema yields a Java fieldpicture_urls and not the conventional pictureUrls camel case. Though the name feels awkward at first, it's fantastic whenever you use grep or more sophisticated search tools. No more mapping when navigating between schema, Java source code, and data. It also provides a gentle reminder to calling code that proto messages are a bit special.
  • Primitive types are always boxed. If a field is absent, its value is null. This is used for naturally optional fields, such as a dinosaur whose period is unknown. A field may also be null due to schema evolution: if tomorrow we add a carnivore boolean to our message definition, today's data won’t have a value for that field.

Here's the compact generated codefor the Dinosaur message defined above:

// Code generated by Wire protocol buffer compiler, donot edit.

// Source file: squareup/dinosaurs/dinosaur.proto at 9:1

packagecom.squareup.dinosaurs;

 

importcom.squareup.geology.Period;

importcom.squareup.wire.Message;

importcom.squareup.wire.ProtoAdapter;

importcom.squareup.wire.WireField;

importjava.util.List;

importokio.ByteString;

 

publicfinalclassDinosaurextendsMessage<Dinosaur, Dinosaur.Builder> {

  publicstaticfinalProtoAdapter<Dinosaur>ADAPTER=ProtoAdapter.newMessageAdapter(Dinosaur.class);

 

  privatestaticfinallong serialVersionUID =0L;

 

  publicstaticfinalStringDEFAULT_NAME="";

 

  publicstaticfinalPeriodDEFAULT_PERIOD=Period.CRETACEOUS;

 

  /**

   * Common name ofthis dinosaur, like "Stegosaurus".

   */

  @WireField(

      tag=1,

      adapter="com.squareup.wire.ProtoAdapter#STRING"

  )

  publicfinalString name;

 

  /**

   * URLs withimages of this dinosaur.

   */

  @WireField(

      tag=2,

      adapter="com.squareup.wire.ProtoAdapter#STRING",

      label=WireField.Label.REPEATED

  )

  publicfinalList<String> picture_urls;

 

  @WireField(

      tag=5,

      adapter="com.squareup.geology.Period#ADAPTER"

  )

  publicfinalPeriod period;

 

  publicDinosaur(Stringname, List<String>picture_urls, Periodperiod) {

    this(name, picture_urls, period, ByteString.EMPTY);

  }

 

  publicDinosaur(Stringname, List<String>picture_urls, Periodperiod, ByteStringunknownFields) {

    super(unknownFields);

    this.name = name;

    this.picture_urls = immutableCopyOf("picture_urls", picture_urls);

    this.period = period;

  }

 

  @Override

  publicBuildernewBuilder() {

    Builder builder =newBuilder();

    builder.name = name;

    builder.picture_urls = copyOf("picture_urls", picture_urls);

    builder.period = period;

    builder.addUnknownFields(unknownFields());

    return builder;

  }

 

  @Override

  publicbooleanequals(Objectother) {

    if (other ==this) returntrue;

    if (!(other instanceofDinosaur)) returnfalse;

    Dinosaur o = (Dinosaur) other;

    return equals(unknownFields(), o.unknownFields())

        && equals(name, o.name)

        && equals(picture_urls, o.picture_urls)

        && equals(period, o.period);

  }

 

  @Override

  publicinthashCode() {

    int result =super.hashCode;

    if (result ==0) {

      result = unknownFields().hashCode();

      result = result *37+ (name !=null? name.hashCode() :0);

      result = result *37+ (picture_urls !=null? picture_urls.hashCode() :1);

      result = result *37+ (period !=null? period.hashCode() :0);

      super.hashCode = result;

    }

    return result;

  }

 

  publicstaticfinalclassBuilderextendscom.squareup.wire.Message.Builder<Dinosaur, Builder> {

    publicString name;

 

    publicList<String> picture_urls;

 

    publicPeriod period;

 

    publicBuilder() {

      picture_urls = newMutableList();

    }

 

    /**

     * Common nameof this dinosaur, like "Stegosaurus".

     */

    publicBuildername(Stringname) {

      this.name = name;

      returnthis;

    }

 

    /**

     * URLs withimages of this dinosaur.

     */

    publicBuilderpicture_urls(List<String>picture_urls) {

      checkElementsNotNull(picture_urls);

      this.picture_urls = picture_urls;

      returnthis;

    }

 

    publicBuilderperiod(Periodperiod) {

      this.period = period;

      returnthis;

    }

 

    @Override

    publicDinosaurbuild() {

      returnnewDinosaur(name, picture_urls, period,buildUnknownFields());

    }

  }

}

The Javacode to create and access proto models is compact and readable:

Dinosaur stegosaurus =newDinosaur.Builder()

    .name("Stegosaurus")

    .period(Period.JURASSIC)

    .build();

 

System.out.println("My favoritedinosaur existed in the "+ stegosaurus.period +"period.");

Each type has a corresponding ProtoAdapter that can encode a message tobytes and decode bytes back into a message.

Dinosaur stegosaurus =...

byte[] stegosaurusBytes =Dinosaur.ADAPTER.encode(stegosaurus);

 

byte[] tyrannosaurusBytes =...

Dinosaur tyrannosaurus =Dinosaur.ADAPTER.decode(tyrannosaurusBytes);

When accessing a field, use Wire.get() to replace null values with thecorresponding default:

Period period =Wire.get(stegosaurus.period, Dinosaur.DEFAULT_PERIOD);

This isequivalent to the following:

Period period = stegosaurus.period != null ?stegosaurus.period : Dinosaur.DEFAULT_PERIOD;

GeneratingCode With Wire

Wire's compiler is available viaa Maven plugin. Put .proto sources in your project's src/main/protodirectory,then use the plugin to generate .java files. The plugin willautomatically add the generated Java code to your project's source roots.

<build>

  <plugins>

    <plugin>

      <groupId>com.squareup.wire</groupId>

      <artifactId>wire-maven-plugin</artifactId>

      <version>${project.version}</version>

      <executions>

        <execution>

          <phase>generate-sources</phase>

          <goals>

            <goal>generate-sources</goal>

          </goals>

          <configuration>

            <protoFiles>

              <param>squareup/dinosaurs/dinosaur.proto</param>

              <param>squareup/geology/period.proto</param>

            </protoFiles>

          </configuration>

        </execution>

      </executions>

    </plugin>

  </plugins>

</build>

Wire can read .proto files from the local file systemand from within .jar files.

Thecompiler can optionally prune your schema to a subset of root types and theirtransitive dependencies. This is useful when sharing a schema between projects:a Java service and Android app may each use a subset of a larger shared schema.

If you don't use Maven, thecompiler also has a command line interface. Just substitute wire-compiler-VERSION-jar-with-dependencies.jar with the path to your jar.

% java -jarwire-compiler-VERSION-jar-with-dependencies.jar \

   --proto_path=src/main/proto \

    --java_out=out\

   squareup/dinosaurs/dinosaur.proto \

   squareup/geology/period.proto

Writing com.squareup.dinosaurs.Dinosaur to out

Writing com.squareup.geology.Period to out

If you use Proguard, then youneed to add keep rules. The simplest option is totell Proguard not to touch the Wire runtime library and your generated protocolbuffers (of course these simple rules will miss opportunities to shrink andoptimize the code):

-keep class com.squareup.wire.** { *; }

-keep class com.yourcompany.yourgeneratedcode.** { *; }

Get Wire

The wire-runtime package contains runtime supportlibraries that must be included in applications that use Wire-generated code.

WithMaven:

<dependency>

  <groupId>com.squareup.wire</groupId>

  <artifactId>wire-runtime</artifactId>

  <version>1.8.0</version>

</dependency>

WithGradle:

compile 'com.squareup.wire:wire-runtime:1.8.0'

Snapshots of the developmentversion are available in Sonatype's snapshots repository.

Unsupported

Wire doesnot support:

  • Groups - they are skipped when parsing binary input data

Wire supports custom options onmessages and fields. Other custom options are ignored. Use the --no_options compiler flag to omit optionsfrom the generated code.

FurtherDocumentation

See Google's excellentdocumentation on the structure and syntax of proto schemas.

(UE5 5.2)HISM Mobile DrawInstance在渲染层的实现浅分析 在 (UE4 4.27) UHierarchicalInstancedStaticMesh(HISM)原理分析 这篇博客大致介绍HISM组件从游戏线程到渲染线程的重建KD-Tree和剔除并提交DrawCall逻辑,但是没有分析渲染层的大致数据结构和实现. 可以看出FHierarchicalStaticMeshSceneProxy 实际存储Instance数组数据来自于FInstancedStaticMeshSceneProxy FHierarchicalStaticMeshSceneProxy只是以FClu 阅读详情

相关推荐

【RDMA】13. RDMA之用户态与内核态交互

原文:https://zhuanlan.zhihu.com/p/346708569 在“RDMA之Verbs”一文中我们说道,Verbs API分为用户态和内核态,分别以ibv_和ib_作为前缀。RDMA技术的最大的优势就在于用户态可以绕过内核,直接控制硬件收发数据,减少了系统调用和内存拷贝次数,所以大部分的RDMA应用都是用户态应用,即使用以ibv_为前缀的用户态Verbs API。 但是并非所有的用户态Verbs API都可以完全绕开内核,本文中我来讲解一下哪些API依赖于内核RDMA子系统(包括驱

我的笔记本 4285

Error: Program type already present: com.squareup.wire.AndroidMessage$ProtoAdapterCreator

记录遇到 Error: Program type already present: com.squareup.wire.AndroidMessage$ProtoAdapterCreator问题 解决方法: Error: Program type already present: 这后面表示com.squareup.wire.AndroidMessage$ProtoAdapterCreator冲突了 我查看了build.gradle 的dependencies下面确实引用了。删除解决 如果遇到vivo等手机无

qq_41543748的博客 563

高速DAC设计与实现--AD9122

目录 芯片简介: 功能配置设计 高速DAC软件驱动设计 芯片简介: AD9122 是一款双通道16位高性能数模转换器(DAC),在800MSPS工作条件下其无杂散动态范围(SFDR)高达72dBc,最高可提供1200 MSPS采样速率。 高速DAC--AD9122电路原理图 硬件设计的电路原理图如上图所示,AD9122具备针对直接变频传输应用进行优化的特性,包括复数数字调制以及增益与失调补偿。DAC输出经过优化后可直接与模拟正交调制器无缝接口,便于后期使...

独木舟216的博客 1万+

C# 使用PROTOCOL BUFFERS

Google Protocol Buffers 使用3.0版本 下载protoc.exe 下载链接 https://github.com/protocolbuffers/protobuf/releases 阅读使用指南 https://developers.google.com/protocol-buffers/docs/csharptutorial 生成命令 protoc -I=. --csharp_out=. ./addressbook.proto -I 输入当前目录--csha...

星辉Johnson的博客 957

遥感数据下载——FIRM:VIIRS火点数据、MODIS火点数据简介及下载

一、FIRMS(Fire Information for Resoutce Management System) 网站链接:https://firms.modaps.eosdis.nasa.gov/map/ 这个网站上对VIIRS及MODIS的火灾数据进行了显示,可以进行按日期、产品类别等动态的展示火点数据或火烧迹地,同时也提供了数据下载控件。高级选择中还可以进行数据统计结果展示。 二、VIIR...

knkn123的博客 3万+

YOLOv8改进 | Conv篇 | 轻量级下采样方法ContextGuided(大幅度涨点)

ContextGuided通过创新的局部-全局协同机制,解决了传统下采样方法中细节丢失与上下文缺失的核心痛点。实验证明其在YOLOv8上可实现最高2.6%的mAP提升,且计算开销增加不足5%。这种即插即用的设计为实时目标检测系统提供了新的优化方向。创新启示:轻量化不代表简单裁剪,智能信息融合才是未来方向!下一步探索与Transformer结合构建混合架构多尺度上下文融合机制3D点云中的扩展应用资源获取完整训练代码:[GitHub链接]预训练模型:[Google Drive链接]讨论话题。

QQ_778132974的博客 289

Protocol Buffers,一款比xml快100倍的序列化框架

我们通常习惯用Json、XML等形式的数据存储格式,但相信还有很多人没有听说过Protocol Buffer(简称protobuf)。protobuf是Google开源的一个语言无关、平台无关的通信协议,其小巧、高效和友好的兼容性设计,使其被广泛使用。性能比Json、XML真的强太多了! 而且,随着微服务架构的流行,RPC框架也成为服务框架的重要组成部分。在很多RPC的设计中,都采用了高性能的编解码技术,而protobuf就属于其中的佼佼者。 也就说,要想深入了解微服务架构中的RPC环节底层实现,设计出高效

程序新视界 886

全志A527 T527 android13支持usb摄像头

我们发现usb摄像头在A527 android13上面并不能正常使用,需要支持相关的摄像头。

zhutoubenben的专栏 964

android使用wire方式生成protobuf的Java文件

在gradle中添加wire所需的jar包 compile 'com.squareup.wire:wire-runtime:2.1.0' 在libs中添加wire-compiler-1.8.0-jar-with-dependencies.jar  在build.gradle中添加 task generateWireFile(type: JavaExec ) { cla

阿依土鳖王子の博客 6534

枪支/刀具检测 (gun, knife) - SIXray, Clasp Dataset,YOLOv11+UI界面+数据集

python复制编辑# 计算 CIoU 损失。

YOLO 539

ZYNQ Petalinux编译系统启动文件实战指南

本文提出的混合编译加速方案实测可将编译时间从45分钟缩短至18分钟,QSPI双启动方案已在工业控制领域成功应用。Xilinx官方UG1144文档(最新v2023.1版)正点原子《ZYNQ嵌入式开发实战》开源项目Meta-Petalinux(GitHub趋势项目)未来展望:随着Versal平台的普及,Petalinux将支持更多AI加速器原生驱动,值得持续关注。

QQ_778132974的博客 812

Android开发中集成protobuf协议

protobuff是Google开源的一个二进制协议,被广泛应用与各大项目中。类似的还有腾讯MIG的JCE,原理上都是通过序号设置成员变量位置,然后实现序列化。但是在集成protobuff到Android中时,由于通过protobuf脚本生成的JAVA文件,含有大量的方法,稍微多生成几个类,就会造成方法方法数超64k。通过在gradle中设置: android { .......

小T的博客 9791

电路设计仿真软件:Mentor Graphics_(11).MentorGraphics软件操作与技巧

/ 定义自定义仿真命令// 加载设计文件// 运行仿真// 主函数return 1;return 0;// 自定义设计检查// 获取设计中的所有模块// 遍历所有模块// 检查模块名称是否符合规范if (!// 检查模块中的所有引脚if (!// 主函数main() {通过本节的学习,您应该已经掌握了如何在 Mentor Graphics 中进行二次开发,包括使用 Tcl、C++ 和 Python 进行基本和高级操作。

kkchenjj的博客 1638

Square/Wire 开源项目安装与使用指南

Square的Wire项目作为一款高性能的HTTP客户端库,其目录结构清晰,便于开发者理解和维护。下面详细介绍项目的主要目录及其作用: - `build.gradle`: 根级构建脚本,用于管理依赖、插件以及构建过程。 - `wire`: 包含了核心库的实现代码,这里是Wire的主体部分。 - `wire-gradle-plugin`: 提供Gradle插件以简化Wire在不同项目中的集成。 -...

gitblog_00157的博客 742

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Square的Wire Gradle插件使用指南

Square的Wire Gradle插件使用指南 项目介绍 Wire Gradle 插件是由Square公司开发的一个用于自动化生成Java代码的工具,特别针对Protocol Buffers(Protobuf)定义的文件。此插件使得在Android和Java项目中集成Protobuf变得更加便捷高效。然而,需要注意的是,该项目已被标记为废弃,并推荐使用嵌入在主库中的新版本Wire Gradle插...

gitblog_00406的博客 1123

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

java 解析tgw_pom.xml · tgw/ThingsBoard - Gitee.com

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">4.0.0org.thingsboardthingsboard3.2.1-SNAPSHOTpomThingsboardhttps://thingsboard.io2016${basedir}tru...

weixin_39870150的博客 517

android 个人错误集合

1、错误: 程序包com.squareup.leakcanary不存在 在编译时,没问题,但是打包选择自己创建的buildType时,报的错。 解决:我自己创建的buildType 是innerTest,所以要加上 innerTestImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.1' 2、local cl...

qq_35022307的博客 621

74HC/LS/HCT/F系列芯片的区别及使用[转]

 74HC/LS/HCT/F系列芯片的区别及使用 一、74HC/LS/HCT/F系列芯片的区别:1、 LS是低功耗肖特基,HC是高速COMS。LS的速度比HC略快。HCT输入输出与LS兼容,但是功耗低;F是高速肖特基电路;2、 LS是TTL电平,HC是COMS电平。3、 LS输入开路为高电平,HC输入不允许开路, hc 一般都要求有上下拉电阻来确定输入端无效时的电平。LS 却没有这个要

~~Jason 程序人生~~ 1万+

Wire: protobuf 管理的卓越解决方案

欢迎来到 Wire —— 一个专为管理 Protocol Buffers(protobuf)架构设计的强大工具。由 Square 开发并维护,这个开源项目提供了简单易用且功能强大的解决方案,帮助开发者更加高效地处理他们的 protobuf 文件。访问 [Wire 项目网站][wire] 获取详细的文档和 API 指南。 ## 项目技术分析 Wire 是基于 Apache 2.0 许可证的,这意...

gitblog_00081的博客 469

Wire protocol buffers的使用

Wire protocol buffers的好处 轻量级的protocol buffers,针对移动设备的java库。 (和protoc产生的代码相比较)由Wire生成的代码方法数量将大大减少,这将有助于android应用避免方法数65k的限制。 用public final的字段代替常规的getter方法,对安卓系统来说代码越少越好。 使用准备:1 在gradle里引入依赖的wire-runtime

zhaoningning1992的博客 1691

NXP BootLoader对应软件简单说明及blhost命令说明

接触到Kinetis系列芯片,想使用下内置的BootLoader功能,发现官方有现成pc端控制软件blhost,所以尝试着跑着运行下。 但是这个软件只针对特定系列的chip,我分析原因是,这个pc应用程序只能通过发送98 66 98来识别有反应的芯片,没反应的就不支持。 另外发现有一个KinetisFlashTool兼容性好一点,可以发送98 66 98和5A A6来尝试连接BootLoader。 总结如下: blhost: 缺点:命令行使用,只支持对98 66 98有反馈的芯片 优点:开放,.

yilonglucky 2939

mysql cbrt函数_基础方法或属性: 列表,元组,字典,字符串,集合及内置函数等(注:只有英文名)...

列表 listappendclearcopycountextendindexinsertpopremovereversesort元组 tuplecountindex字典 dictclearcopyfromkeysgetitemskeyspoppopitemsetdefaultupdatevalues字符串 strcapitalizecasefoldcentercountencodeendswith...

weixin_29168813的博客 2001

About REG, DAT, BIB, and DB files

About REG, DAT, BIB, and DB files REG FilesWindows CE build 过程用到的REG Files 几乎和 windows 其他版本的REG Files 相似。最大的不同在于文件头的REG版本的标记被移走。这样就预防了意外的把windows CE REG file 写入你正开发的工作站的注册表,比如,双击REG file就可以很正常的把数据

kevin_83的专栏 1072

couchbase原理介绍

http://www.couchbase.com/wiki/display/couchbase/Couchbase+View+Engine+Internals

三少GG 3706

Wire Protocol Buffers介绍

这是网上介绍Wire Protocol Buffers的东东,貌似对减少android应用的64k限制有一定作用,按照自己的理解把它翻译了一下,感觉还是很别扭。。。 什么是Wire ? 线是谷歌协议缓冲区的一个全新的,开源成果。它用于安卓设备,也可用于任何运行的java语言代码的地方。 在Square看来,我们广泛使用协议缓冲区。协议缓冲区是语言和平台的集合,它用来描述和传输数据。开发者可以

我是一只小菜鸟,飞丫飞丫飞~~~ 3387

Wire: 优雅的Protobuf管理解决方案

Wire是Square公司开发的一款强大的工具,专门用于管理和处理Protocol Buffers(简称 Protobuf)的编译和版本控制。它不仅简化了 Protobuf 的使用流程,更提高了代码质量和开发效率。通过其直观的API和全面的文档,你可以轻松地在各种项目中集成 Wire,并享受它所带来的便利。 ## 项目技术分析 Wire的核心功能在于它能将你的 Protobuf 定义转换为各种...

gitblog_00952的博客 1131

Protocol Buffers笔记

逆向Protocol Buffers协议,总结一些小工具。

碎片的博客 675
上一篇: Android QQ技术分享三(QQ换肤之SkinEngine实现)
下一篇: 快速高斯模糊(线性复杂度)
明斯基
博客等级 码龄18年 24粉丝 6原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值