OFBIz之旅[结构]

2024-03-11 21:08
文章标签 结构 之旅 ofbiz

本文主要是介绍OFBIz之旅[结构],希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

 OFBIz之旅[结构]

注意:
1 ,持久层,在 OFBIZ 中的定义,就是 ModelDAO 被划分到业务层中。
OFBIz 已经改名为 OpenTaps 项目发展了。其自身的工作流引擎也已经停止发展。现在改用内嵌式的 shark 工作流引擎作为自己的工作流引擎。而且,实际上并没有使用 shark 制作任何工作流。
Opentaps 的宗旨,还是使用一系列自创的开源技术,开发大规模的企业级应用程序。它的目标,不是工作流,也不是 appfuse 这样一个整合其他开源技术的演示性的网站,而是一个综合的、企业级的电子商务网站。
First, go into your OFBiz directory and take a look inside:
首先,进入 Ofbiz 目录:
[sichen@localhost ofbiz_5010]$ ls -l
total 88
drwxrwxr-x   15 sichen   sichen       4096 May 20 07:54 applications
drwxrwxr-x    8 sichen   sichen       4096 May 20 07:59 base
-rw-rw-r--    1 sichen   sichen      10173 May 20 07:58 build.xml
drwxrwxr-x    4 sichen   sichen       4096 May 20 07:59 data
drwxrwxr-x   24 sichen   sichen       4096 May 20 07:58 framework
drwxrwxr-x    3 sichen   sichen       4096 May 20 07:52 hot-deploy
-rwxrwxr-x    1 sichen   sichen        309 May 20 07:58 ij.ofbiz
drwxrwxr-x    2 sichen   sichen       4096 May 20 08:08 logs
-rw-rw-r--    1 sichen   sichen      21167 May 20 08:07 ofbiz.jar
-rw-rw-r--    1 sichen   sichen       2869 May 20 07:58 rc.ofbiz
drwxrwxr-x    6 sichen   sichen       4096 May 20 07:55 specialized
-rw-rw-r--    1 sichen   sichen        265 May 20 07:58 startofbiz.bat
-rwxrw-r--    1 sichen   sichen        790 May 20 07:58 startofbiz.sh
-rwxrw-r--    1 sichen   sichen        325 May 20 07:58 stopofbiz.sh
drwxrwxr-x   12 sichen   sichen       4096 May 20 07:52 website
Things to note here:
1ofbiz-component.xml  每个组件都有这样一个文件。它们用于定位该组件的 jar 包和 entity 实体等配置文件。
  • OFBiz is built around a components-based architecture, which means each application is inside a component. This allows outside or custom applications to be added easily.
OFBIZ 采用了基于组件的架构。这就是说,每一个应用程序在一个组件内。这允许外部的和定制化的应用程序能够很容易的被包含近来。
  • The applications/ directory holds the applications components, such as order manager and ecommerce store.
Applications 目录,包含了 OFBIz 核心的应用程序组件,如订单管理,电子商务存储等。
component-load.xml 文件配置需要载入哪几个应用程序组件。
这里的每一个组件,都是一个基于 OFBIZ 构建的 Web 应用程序。
  • The framework/ directory holds the components for the OFBiz framework, such as the entity engine, and service engine.
Framework 框架目录,包含 OFBIZ 框架的组件,例如实体引擎和服务引擎。
这是 OFBIZ 框架的核心,其他应用程序都是基于它来构建的。
component-load.xml 文件配置需要载入哪几个框架组件。
  • specialized/ contains some other applications which are not part of the OFBiz core.
Specialized 专门目录,包含一些其他的应用程序,不是 OFBIZ 核心的一部分。
  • hot-deploy/ is another directory where components can be dropped in and automatically loaded.
hot-deploy 热部署目录,是另一个目录。它的组件能够被删除和自动载入。
金融和 CRM2 个项目在这里。
这里没有 component-load.xml 这个文件。
本目录中所有的组件,都会在 frameworkapplication 目录下的组件被导入之后导入。
  • base/ contains code for starting up and configuring ofbiz.
base 目录,包含启动和配置 ofbiz 的代码。
  • logs/ contains log files. On Unix/Linux, ofbiz runs as a background process, and all console output is in logs/console.log
logs 日志目录,包含日志文件。
  • website/ is the contents of ofbiz.org.
website 网站目录,是 ofbiz.org 网站的内容。
另外, data 目录下是几个内嵌式的数据库。
Now let's go inside framework/ and take a look:
现在,让我们进入 framework 目录看一看:
[sichen@localhost ofbiz_5010]$ cd framework/
[sichen@localhost framework]$ ls -l
total 88
drwxrwxr-x    7 sichen   sichen       4096 May 20 08:00 appserver
drwxrwxr-x    8 sichen   sichen       4096 May 20 07:59 catalina
drwxrwxr-x   12 sichen   sichen       4096 May 20 08:00 common
-rw-rw-r--    1 sichen   sichen       2988 May 20 07:58 component-load.xml
drwxrwxr-x    6 sichen   sichen       4096 May 20 07:59 datafile
drwxrwxr-x   10 sichen   sichen       4096 May 20 07:59 entity
drwxrwxr-x    9 sichen   sichen       4096 May 20 07:59 entityext
drwxrwxr-x   12 sichen   sichen       4096 May 20 07:55 example
drwxrwxr-x    6 sichen   sichen       4096 May 20 08:00 guiapp
drwxrwxr-x    4 sichen   sichen       4096 May 20 07:56 images
drwxrwxr-x    6 sichen   sichen       4096 May 20 07:59 jetty
drwxrwxr-x    7 sichen   sichen       4096 May 20 07:59 jotm
drwxrwxr-x    6 sichen   sichen       4096 May 20 07:59 minerva
drwxrwxr-x    7 sichen   sichen       4096 May 20 08:00 minilang
drwxrwxr-x    9 sichen   sichen       4096 May 20 07:59 security
drwxrwxr-x   11 sichen   sichen       4096 May 20 07:59 service
drwxrwxr-x   12 sichen   sichen       4096 May 20 08:00 shark
drwxrwxr-x   10 sichen   sichen       4096 May 20 08:00 tests
drwxrwxr-x    9 sichen   sichen       4096 May 20 08:00 webapp
drwxrwxr-x    9 sichen   sichen       4096 May 20 08:00 webtools
drwxrwxr-x    6 sichen   sichen       4096 May 20 08:00 widget
drwxrwxr-x    9 sichen   sichen       4096 May 20 08:00 workflow
These are the components of the OFBiz framework, which is used to develop the OFBiz applications.
这些是用来开发 OFBIZ 应用程序的 OFBIZ 框架组件。
 component-load.xml controls which of the components in the current directory are loaded.
component-load.xml 文件控制现在哪些组件被使用。
Now go back and take a look at the applications themselves:
[sichen@localhost framework]$ cd ..
[sichen@localhost ofbiz_5010]$ cd applications/
[sichen@localhost applications]$ ls -l
total 52
drwxrwxr-x   13 sichen   sichen       4096 May 20 08:00 accounting
-rw-rw-r--    1 sichen   sichen       2425 May 20 07:54 component-load.xml
drwxrwxr-x   15 sichen   sichen       4096 May 20 08:00 content
drwxrwxr-x   11 sichen   sichen       4096 May 20 08:00 ecommerce
drwxrwxr-x    5 sichen   sichen       4096 May 20 07:53 humanres
drwxrwxr-x   12 sichen   sichen       4096 May 20 08:00 manufacturing
drwxrwxr-x   12 sichen   sichen       4096 May 20 08:00 marketing
drwxrwxr-x   13 sichen   sichen       4096 May 20 08:00 order
drwxrwxr-x   12 sichen   sichen       4096 May 20 08:00 party
drwxrwxr-x   12 sichen   sichen       4096 May 20 08:00 pos
drwxrwxr-x   12 sichen   sichen       4096 May 20 08:00 product
drwxrwxr-x   10 sichen   sichen       4096 May 20 08:00 securityext
drwxrwxr-x   12 sichen   sichen       4096 May 20 08:00 workeffort
These are the OFBiz applications themselves. Each application is self-contained with its own data model definitions, business logic, and presentation (web or Swing) tier, although applications may reuse each others' business logic and thus depend on each other.
这些是 OFBIz 应用程序本身。每一个应用程序是自包含的。它们自己有自己的数据定义,业务层和表现层( WebSwing )。虽然应用程序之间可以重用业务逻辑(其数据层、数据库是一样的),因而是互相依赖的。
Now let's go inside an application and see what it looks like:
现在,让我们进入一个应用程序,看看里面有什么:
[sichen@localhost applications]$ cd product/
[sichen@localhost product]$ ls -l
total 52
drwxrwxr-x    4 sichen   sichen       4096 May 20 08:08 build
-rw-rw-r--    1 sichen   sichen       6413 May 20 07:53 build.xml
drwxrwxr-x    3 sichen   sichen       4096 May 20 07:53 config
drwxrwxr-x    3 sichen   sichen       4096 May 20 07:53 data
drwxrwxr-x    3 sichen   sichen       4096 May 20 07:53 entitydef
-rw-rw-r--    1 sichen   sichen       4202 May 20 07:53 ofbiz-component.xml
drwxrwxr-x    4 sichen   sichen       4096 May 20 07:53 script
drwxrwxr-x    3 sichen   sichen       4096 May 20 07:53 servicedef
drwxrwxr-x    4 sichen   sichen       4096 May 20 07:53 src
drwxrwxr-x    5 sichen   sichen       4096 May 20 07:53 webapp
drwxrwxr-x    5 sichen   sichen       4096 May 20 07:53 widget
Here is what you are seeing:
  • build/ is where the compiled Java code and any libraries for this application go.
Build 目录是已编译的 java 代码和任何 Java 库。它们能够使这个应用程序运行。(但是不能够仅仅靠它们运行。可以仅靠 webapp 目录下的一个或者多个 web 应用程序运行)
  • build.xml tells ant how to build this application. It is like a Makefile.
build.xml 文件是 ant 文件,用于测试和构建这个应用程序。
  • config/ is for configuration data, such as internationalization (i18n) UI labels in various languages.
Config 目录包含配置文件,例如多语言下的国际化 UI 标签的配置文件。
  • data/ is where the seed and demo data, in XML format, are located.
Data 目录包含种籽和演示数据, xml 格式。
  • entitydef/ is where the data model definitions of this application are.
Entitydef 目录,包含这个应用程序的数据模型定义。
  • script/ is where scripts for business logic are. Scripts can be written in beanshell, OFBiz minilang, Jython, etc.
script 脚本目录,包含业务逻辑的脚本文件。
  • servicedef/ is where the services, which are small, granular pieces of business logic (similar to functions or methods), are defined.
Servicedef 目录,包含 services 服务,它们是细粒度的业务逻辑(类似于方法或函数,它们就是 DAO 方法)。
  • src/ is where Java classes for implementing business logic are.
Src 源文件目录,包含实现业务逻辑的 Java 类文件(粗粒度的业务逻辑)。
  • webapp/ is where the web interface, or front end, applications are. An OFBiz application can have more than one webapp.
Webapp 目录,是 web 接口,是应用程序的前端。一个 OFBIZ 应用程序能有多个 webapp 应用程序。
  • ofbiz-component.xml defines this application by specifying where its data model, business logic, seed data, and web applications are located.
ofbiz-component.xml 文件定义这个应用程序指定的数据模型,业务逻辑,种籽数据和 web 应用程序的定位。包括部署 web 应用在哪里等等。
A look inside the entitydef/ and servicedef/ directories will show the XML files used to define the data model and business logic, respectively:
看一下 entitydef 目录和 servicedef 目录,它将显示被用来定义数据模型文件和业务逻辑( DAO )的 xml 文件。
[si@localhost product]$ ls -l entitydef/
total 264
-rw-rw-r--    1 si       si           3094 May 27 08:00 eecas.xml
-rw-rw-r--    1 si       si          16862 May 27 08:00 entitygroup.xml
-rw-rw-r--    1 si       si          62923 May 27 08:00 entitymodel_shipment.xml
-rw-rw-r--    1 si       si         171582 May 27 08:00 entitymodel.xml
[si@localhost product]$ ls -l servicedef/
total 252
-rw-rw-r--    1 si       si           1836 May 27 08:00 groups_shipment.xml
-rw-rw-r--    1 si       si           5217 May 27 08:00 secas_shipment.xml
-rw-rw-r--    1 si       si           3897 May 27 08:00 secas.xml
-rw-rw-r--    1 si       si          42967 May 27 08:00 services_facility.xml
-rw-rw-r--    1 si       si          15516 May 27 08:00 services_feature.xml
-rw-rw-r--    1 si       si           9261 May 27 08:00 services_maint.xml
-rw-rw-r--    1 si       si           9411 May 27 08:00 services_picklist.xml
-rw-rw-r--    1 si       si          19216 May 27 08:00 services_pricepromo.xml
-rw-rw-r--    1 si       si           3374 May 27 08:00 services_shipment_ups.xml
-rw-rw-r--    1 si       si           5844 May 27 08:00 services_shipment_usps.xml
-rw-rw-r--    1 si       si          29717 May 27 08:00 services_shipment.xml
-rw-rw-r--    1 si       si          16205 May 27 08:00 services_store.xml
-rw-rw-r--    1 si       si           9817 May 27 08:00 services_view.xml
-rw-rw-r--    1 si       si          56540 May 27 08:00 services.xml
The webapp/ directory holds the web front end applications. A look inside shows that this application actually has two web applications, catalog and facility:
[si@localhost product]$ ls -l webapp/
total 8
drwxrwxr-x   18 si       si           4096 May 27 08:00 catalog
drwxrwxr-x   13 si       si           4096 May 27 08:00 facility
catalog/ is the OFBiz Catalog Manager, used to manage product information. facility/ is the OFBiz Facility Manager, used to manage warehouses and inventory.
Catelog 目录是 OFBIZ 的目录管理器,用来管理产品信息。
Facility 设施目录,是 OFBIZ 设施管理器,用来管理仓库和存货。
In most dynamic web pages, there are some page elements, such as page headers, navigation bars, or shopping cart contents, that are repeated on many pages. When a visitor requests the page, the page will usually do some preprocessing, such as retrieving data from a database, and then present it to the user on a display page. In PHP, this is usually done by a SQL query first and then HTML code which presents the results of the query.
在大多数动态 Web 页面中,
With OFBiz, pages are divided into smaller pieces which are re-combined to create the final product. Thus, many pages can share common elements such as page headers, sidebars, and navigation bars. This is called the "decorator pattern." There is a further separation of the activities of a page into "actions," such as getting data from a database, and "presentation," the display of that data to the visitor.
装饰者模式 ---- 页面被分成很多小片,然后重新组合成最终的产品。
  有一个更进一步动态页面的分离技术,“ action ”:例如,从数据库得到数据,并且在表现层把数据显示给参观者。
The "actions" in OFBiz are written in beanshell scripts, while the "presentation" is written in Freemarker template pages. Beanshell (.bsh) is a scripted version of Java, while Freemarker (.ftl) is a templating language that is used in OFBiz to create HTML or XSL:FO pages.
So here are the contents immediately inside a web application. The sub-directories hold the pieces of Freemarker pages:
[si@localhost product]$ ls -l webapp/catalog/
total 80
drwxrwxr-x    3 si       si           4096 May 27 08:00 catalog
drwxrwxr-x    3 si       si           4096 May 27 08:00 category
-rw-rw-r--    1 si       si           1866 May 27 08:00 ChooseTopCategory.ftl
drwxrwxr-x    3 si       si           4096 May 27 08:00 config
drwxrwxr-x    3 si       si           4096 May 27 08:00 error
-rw-rw-r--    1 si       si           1552 May 27 08:00 FastLoadCache.ftl
drwxrwxr-x    3 si       si           4096 May 27 08:00 feature
drwxrwxr-x    3 si       si           4096 May 27 08:00 find
drwxrwxr-x    3 si       si           4096 May 27 08:00 includes
-rw-rw-r--    1 si       si             44 May 27 08:00 index.jsp
drwxrwxr-x    3 si       si           4096 May 27 08:00 lookup
-rw-rw-r--    1 si      si           4575 May 27 08:00 main.ftl
drwxrwxr-x    3 si       si           4096 May 27 08:00 price
drwxrwxr-x    3 si       si           4096 May 27 08:00 product
drwxrwxr-x    3 si       si           4096 May 27 08:00 promo
drwxrwxr-x    3 si       si           4096 May 27 08:00 reviews
drwxrwxr-x    3 si       si           4096 May 27 08:00 store
drwxrwxr-x    3 si       si           4096 May 27 08:00 thesaurus
drwxrwxr-x    4 si       si           4096 May 27 12:21 WEB-INF
Most of the web application's page sections are put into different directories depending on their function. The includes/ directory holds many of the pieces of a web application.
Includes 目录是包含一个应用程序的很多页面片。
 The WEB-INF directory is a "private" directory for files which should not be viewed directly by visitors. It holds files for controlling the flow logic and actions of this web application:
[si@localhost product]$ ls -l webapp/catalog/WEB-INF/
total 132
drwxrwxr-x   13 si       si           4096 May 27 08:00 actions
-rw-rw-r--    1 si       si         117202 May 27 08:00 controller.xml
-rw-rw-r--    1 si       si           4442 May 27 08:00 web.xml
  • controller.xml is a very important file that directs the flow of the web application. It maps URI requests from the visitor's browser to events, services, and pages.
  • web.xml contains supplemental information for the web application.
  • actions/ directory has beanshell scripts that are used to process and gather data for the pages.
The beanshell scripts in the WEB-INF/actions/ directory often mirror the Freemarker pages in the other directories. For example:
[si@localhost product]$ ls -l webapp/catalog/product/
total 240
-rw-rw-r--    1 si       si           6886 May 27 08:00 ApplyFeaturesFromCategory.ftl
-rw-rw-r--    1 si       si           2099 May 27 08:00 CreateVirtualWithVariantsForm.ftl
-rw-rw-r--    1 si       si          16552 May 27 08:00 EditProductAssoc.ftl
-rw-rw-r--    1 si       si           3813 May 27 08:00 EditProductAttributes.ftl
-rw-rw-r--    1 si       si           1407 May 27 08:00 EditProductContentContent.ftl
-rw-rw-r--    1 si       si          14132 May 27 08:00 EditProductContent.ftl
-rw-rw-r--    1 si       si           6126 May 27 08:00 EditProductDupForm.ftl
-rw-rw-r--    1 si       si           4519 May 27 08:00 EditProductFacilities.ftl
-rw-rw-r--    1 si       si           5273 May 27 08:00 EditProductFacilityLocations.ftl
-rw-rw-r--    1 si       si          13625 May 27 08:00 EditProductFeatures.ftl
-rw-rw-r--    1 si       si           5008 May 27 08:00 EditProductGlAccounts.ftl
-rw-rw-r--    1 si       si           4200 May 27 08:00 EditProductGoodIdentifications.ftl
-rw-rw-r--    1 si       si          13207 May 27 08:00 EditProductInventoryItems.ftl
-rw-rw-r--    1 si       si           6358 May 27 08:00 EditProductKeyword.ftl
-rw-rw-r--    1 si       si          23480 May 27 08:00 EditProductQuickAdmin.ftl
-rw-rw-r--    1 si       si          60917 May 27 08:00 ProductForms.xml
-rw-rw-r--    1 si       si           5721 May 27 08:00 ProductTabBar.ftl
-rw-rw-r--    1 si       si           6380 May 27 08:00 QuickAddVariants.ftl
[si@localhost product]$ ls -l webapp/catalog/WEB-INF/actions/product/
total 72
-rw-rw-r--    1 si       si           5862 May 27 08:00 ApplyFeaturesFromCategory.bsh
-rw-rw-r--    1 si       si           2489 May 27 08:00 ApplyFeaturesFromGroup.bsh
-rw-rw-r--    1 si       si           3548 May 27 08:00 EditProductAssoc.bsh
-rw-rw-r--    1 si       si           7490 May 27 08:00 EditProductContent.bsh
-rw-rw-r--    1 si       si           6920 May 27 08:00 EditProductContentContent.bsh
-rw-rw-r--    1 si       si           2574 May 27 08:00 EditProductFeatures.bsh
-rw-rw-r--    1 si       si          11386 May 27 12:27 EditProductInventoryItems.bsh
-rw-rw-r--    1 si       si          17166 May 27 08:00 EditProductQuickAdmin.bsh
-rw-rw-r--    1 si       si           1890 May 27 08:00 QuickAddVariants.bsh
There is not a one-to-one correspondence because the same beanshell script in actions/ can be reused for multiple pages, and also because some pages are pieced together from multiple Freemarker templates but require only one beanshell script.
Finally, there is one more component of an OFBiz application: the widgets/ directory:
[si@localhost product]$ ls -l widget/
total 8
drwxrwxr-x    3 si       si           4096 May 27 08:00 catalog
drwxrwxr-x    3 si       si           4096 May 27 08:00 facility
As you can see, this mirrors the contents of webapp/ from above. This is not an accident. The widgets/ directory holds "widgets" for rendering user interface screens. OFBiz allows user interface designs to be created as "generic screens" rather than just web pages, so they could be reused eventually for some other platform. The widgets/ directory's contents mirror those of the webapp/, so there are widgets for the catalog/ webapp and the facility/ webapp.
Now let's take a look at what's in a widgets directory:
[si@localhost product]$ ls -l widget/catalog/
total 176
-rwxrwxr-x    1 si       si          11824 May 27 08:00 CatalogScreens.xml
-rwxrwxr-x    1 si       si          19862 May 27 08:00 CategoryScreens.xml
-rw-rw-r--    1 si       si           9986 May 27 08:00 CommonScreens.xml
-rwxrwxr-x    1 si       si          11122 May 27 08:00 ConfigScreens.xml
-rw-rw-r--    1 si       si          10961 May 27 08:00 FeatureScreens.xml
-rwxrwxr-x    1 si       si           5937 May 27 08:00 FindScreens.xml
-rw-rw-r--    1 si       si           6695 May 27 08:00 LookupScreens.xml
-rwxrwxr-x    1 si       si           4440 May 27 08:00 PriceScreens.xml
-rw-rw-r--    1 si       si          39740 May 27 08:00 ProductScreens.xml
-rwxrwxr-x    1 si       si          14900 May 27 08:00 PromoScreens.xml
-rwxrwxr-x    1 si       si           3682 May 27 08:00 ReviewScreens.xml
-rwxrwxr-x    1 si       si          19802 May 27 08:00 StoreScreens.xml
-rwxrwxr-x    1 si       si           3588 May 27 08:00 ThesaurusScreens.xml
What you see are XML definitions for various screens here. The screens tell OFBiz how to create a screen: what pieces of common navigation elements, Freemarker page sections, and actions are required to create a particular page.
Now you've seen how an OFBiz application is put together. Future tutorials will show you how to develop one from scratch and customize an existing one.

这篇关于OFBIz之旅[结构]的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/799079

相关文章

Python中顺序结构和循环结构示例代码

《Python中顺序结构和循环结构示例代码》:本文主要介绍Python中的条件语句和循环语句,条件语句用于根据条件执行不同的代码块,循环语句用于重复执行一段代码,文章还详细说明了range函数的使... 目录一、条件语句(1)条件语句的定义(2)条件语句的语法(a)单分支 if(b)双分支 if-else(

使用Navicat工具比对两个数据库所有表结构的差异案例详解

《使用Navicat工具比对两个数据库所有表结构的差异案例详解》:本文主要介绍如何使用Navicat工具对比两个数据库test_old和test_new,并生成相应的DDLSQL语句,以便将te... 目录概要案例一、如图两个数据库test_old和test_new进行比较:二、开始比较总结概要公司存在多

Java中switch-case结构的使用方法举例详解

《Java中switch-case结构的使用方法举例详解》:本文主要介绍Java中switch-case结构使用的相关资料,switch-case结构是Java中处理多个分支条件的一种有效方式,它... 目录前言一、switch-case结构的基本语法二、使用示例三、注意事项四、总结前言对于Java初学者

结构体和联合体的区别及说明

《结构体和联合体的区别及说明》文章主要介绍了C语言中的结构体和联合体,结构体是一种自定义的复合数据类型,可以包含多个成员,每个成员可以是不同的数据类型,联合体是一种特殊的数据结构,可以在内存中共享同一... 目录结构体和联合体的区别1. 结构体(Struct)2. 联合体(Union)3. 联合体与结构体的

PostgreSQL如何查询表结构和索引信息

《PostgreSQL如何查询表结构和索引信息》文章介绍了在PostgreSQL中查询表结构和索引信息的几种方法,包括使用`d`元命令、系统数据字典查询以及使用可视化工具DBeaver... 目录前言使用\d元命令查看表字段信息和索引信息通过系统数据字典查询表结构通过系统数据字典查询索引信息查询所有的表名可

usaco 1.3 Mixing Milk (结构体排序 qsort) and hdu 2020(sort)

到了这题学会了结构体排序 于是回去修改了 1.2 milking cows 的算法~ 结构体排序核心: 1.结构体定义 struct Milk{int price;int milks;}milk[5000]; 2.自定义的比较函数,若返回值为正,qsort 函数判定a>b ;为负,a<b;为0,a==b; int milkcmp(const void *va,c

自定义类型:结构体(续)

目录 一. 结构体的内存对齐 1.1 为什么存在内存对齐? 1.2 修改默认对齐数 二. 结构体传参 三. 结构体实现位段 一. 结构体的内存对齐 在前面的文章里我们已经讲过一部分的内存对齐的知识,并举出了两个例子,我们再举出两个例子继续说明: struct S3{double a;int b;char c;};int mian(){printf("%zd\n",s

OpenCV结构分析与形状描述符(11)椭圆拟合函数fitEllipse()的使用

操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C++11 算法描述 围绕一组2D点拟合一个椭圆。 该函数计算出一个椭圆,该椭圆在最小二乘意义上最好地拟合一组2D点。它返回一个内切椭圆的旋转矩形。使用了由[90]描述的第一个算法。开发者应该注意,由于数据点靠近包含的 Mat 元素的边界,返回的椭圆/旋转矩形数据

C语言程序设计(选择结构程序设计)

一、关系运算符和关系表达式 1.1关系运算符及其优先次序 ①<(小于) ②<=(小于或等于) ③>(大于) ④>=(大于或等于 ) ⑤==(等于) ⑥!=(不等于) 说明: 前4个优先级相同,后2个优先级相同,关系运算符的优先级低于算术运算符,关系运算符的优先级高于赋值运算符 1.2关系表达式 用关系运算符将两个表达式(可以是算术表达式或关系表达式,逻辑表达式,赋值表达式,字符

Science|癌症中三级淋巴结构的免疫调节作用与治疗潜力|顶刊精析·24-09-08

小罗碎碎念 Science文献精析 今天精析的这一篇综述,于2022-01-07发表于Science,主要讨论了癌症中的三级淋巴结构(Tertiary Lymphoid Structures, TLS)及其在肿瘤免疫反应中的作用。 作者类型作者姓名单位名称(中文)通讯作者介绍第一作者Ton N. Schumacher荷兰癌症研究所通讯作者之一通讯作者Daniela S. Thomm