21天学会APAP4的基础 Day13

合集下载

零起点大学英语基础教程4(李桂兰)_整理教(学)案

零起点大学英语基础教程4(李桂兰)_整理教(学)案

Unit 1 personal QualitiesI. Teaching aims and demands1. Understand the background knowledge2. Learn about the new words and phrases3. Grasp the main idea and structure of the text4. Conduct a series of reading, listening, speaking and writing activitiesII. Teaching importance and difficulties1.Background information2.The usage of some new words and phrases3.Some sentence patterns difficult to understandIII. Teaching methodsA combination of traditional teaching methods with the communicative approach will be adopted. Special attention should be paid to classroom interaction. More encouragement is needed and more guidance will be given to them in their extracurricular study. Use the multimedia device where necessary.IV. Teaching procedurea. Warming-up Activities1.Duty ReportHave a brainstorming about words to describe personal qualitiesrmation related to the text1> Cross-cultural communicationThe key to effective cross-cultural communication is knowledge. First, it is essentialthat people understand the potential problems of cross-cultural communication, and make a conscious effort to overcome these problems. Second, it is important to assume that one’s efforts will not always be successful, and adjust one’s behavior appropriately.For example, one should always assume that there is a significant possibility that cultural differences are causing communication problems, and be willing to be patient and forgiving, rather than hostile and aggressive, if problems develop. One should respond slowly and carefully in cross-cultural exchanges, not jumping to the conclusion that you know what is being thought and said.Active listening can sometimes be used to check this out–by repeating what one thinks he or she heard, one can confirm that one understands the communication accurately. If words are used differently between languages or cultural groups, however, even active listening can overlook misunderstandings.2> Personal qualitiesPersonal qualities are personal characteristics of an individual. They are what make up one's personality. They help a person get along in a new situation. For example, dependability and patience are qualities that employers would like a good worker to have. Other qualities employers value are: honesty, assertiveness, flexibility, problem solving, friendliness, intelligence, leadership, enthusiasm, and a good sense of humor.Most employers want people who are dependable and who get along with others. Though skills are important, an employer will select new employees based on their personal qualities as well.b. Language points1. Personal qualities generally have either positive or negative connotations.一般来说,一个人的品质包括两个方面:积极的和消极的。

powerup4知识点汇总

powerup4知识点汇总

powerup4知识点汇总PowerUp4是一个关于电子设计自动化(EDA)的课程,以下是该课程的一些重要知识点汇总:1.集成电路芯片:集成电路芯片是将多个电子元件集成在一块衬底上,实现一定的电路功能。

芯片的设计和制造需要经过多个步骤,包括电路设计、版图绘制、制造、测试等。

2.硬件描述语言:硬件描述语言是一种用于描述数字电路和系统的语言,它能够描述电路的结构、行为和功能。

常见的硬件描述语言包括Verilog和VHDL。

3.可编程逻辑器件:可编程逻辑器件是一种数字集成电路,可以通过编程来配置其内部逻辑,实现所需的电路功能。

常见的可编程逻辑器件包括FPGA (现场可编程门阵列)和CPLD(复杂可编程逻辑器件)。

4.数字电路设计:数字电路设计是指利用数字电路的基本元件和逻辑门来设计数字系统。

数字电路设计包括组合逻辑电路设计和时序逻辑电路设计。

5.模拟电路设计:模拟电路设计是指利用模拟电路的基本元件和放大器来设计模拟系统。

模拟电路设计需要考虑到信号的放大、滤波、调制和解调等方面。

6.PCB设计:PCB(印刷电路板)是电子系统中常用的互连器件,用于将电子元件连接在一起。

PCB设计是指将电子元件布局在电路板上,并设计出满足电气性能要求的互连线路。

7.电磁兼容性:电磁兼容性是指电子设备在电磁环境中正常工作的能力。

电磁兼容性需要考虑信号的传输、噪声的抑制、辐射的减小等方面。

8.系统级设计:系统级设计是指将多个模块或子系统组合在一起,形成一个完整的系统。

系统级设计需要考虑系统的总体架构、模块之间的接口和通信、系统的性能和可靠性等方面。

以上是PowerUp4课程中的一些重要知识点,它们是电子设计自动化领域的核心内容,对于学习和掌握电子设计自动化技术非常重要。

Icepak4.3练习中文教程(大量算例)

Icepak4.3练习中文教程(大量算例)

xS -0.025 yS 0 zS 0
xE 0.075 yE 0.25 zE 0.356
(c) 点击 Done. (d) 点击 Scale to fit 来看整个绘图窗口。 另外:
你也可以点击 button.
2. 建立背板 该 plate 是 0.006 m 厚并将 Cabinet 分成两个区域:设备一面 (high-power devices 在这一面的腔体内) 和 翅片一面 (fins 的那一面). 背板在这里是用 block 来描述. (a)
2
o heat exchangers 热交换器 o wires 线 o openings 开孔 o grilles 过滤网 o sources 热源 o printed circuit boards (PCBs) PCB 板 o enclosures 腔体 o plates 板 o walls 壁 o blocks 块 o fans (with hubs) 风扇 o blowers 离心风机 o resistances 阻尼 o heat sinks 散热器 o packages 封装 • macros 宏
1.3.9 报告
• 写出用户定义的 ASCII 文件 (如热流密度,质量流量,传热系数等) • 任何点的时间历程 • 求解过程中点的监控 • 报告风扇工作点 • 直接输出到打印机,格式如下:
o color, gray-scale, or monochrome PostScript o PPM o TIFF o GIF o JPEG o VRML o MPEG movies o AVI movies o FLI movies o animated GIF movies
目录
1.1 什么是 Icepak? ....................................... .... .... 1 1.2 程序结构.................................... .... .............. 1 1.3 软件功能................................ ..... ................ 2 练习 1 翅片散热器...........................................6 练习 2 辐射的块和板.........................................41 练习 3 瞬态分析.............................................56 练习 4 笔记本电脑...........................................75 练习 5 修改的笔记本电脑.....................................104 练习 6 非连续网格...........................................114 练习 7 Zoom-in 建模..........................................125 练习 8 带有离心风机的机柜.......................................146 练习 9 网格和模型强化练习.......................................150 练习 10 过滤网的损失系数.........................................159 练习 11 顺排或差排散热器.........................................174 练习 12 减小热阻.................................................189 练习 13 非均匀功率分布...........................................198 练习 14 ICEPAK 的 CAD Object 模型..................................204 练习 15 PCB 板布线层接口模块......................................224

《21天学会C++》笔记-推荐下载

《21天学会C++》笔记-推荐下载
delete[]删除数组内存空间,若遗漏了方括号,将只删除数组中的第一个对象,产生内 存泄露。 11. cin.get();//get 接收三个参数:待填充的缓冲区;要读取的最大字符数;终止输入的限定 符,默认限定符为换行符。
对全部高中资料试卷电气设备,在安装过程中以及安装结束后进行高中资料试卷调整试验;通电检查所有设备高中资料电试力卷保相护互装作置用调与试相技互术关,系电通,力1根保过据护管生高线0产中不工资仅艺料可高试以中卷解资配决料置吊试技顶卷术层要是配求指置,机不对组规电在范气进高设行中备继资进电料行保试空护卷载高问与中题带资22负料,荷试而下卷且高总可中体保资配障料置23试时23卷,各调需类控要管试在路验最习;大题对限到设度位备内。进来在行确管调保路整机敷使组设其高过在中程正资1常料中工试,况卷要下安加与全强过,看2度并55工且22作尽2下可护1都能关可地于以缩管正小路常故高工障中作高资;中料对资试于料卷继试连电卷接保破管护坏口进范处行围理整,高核或中对者资定对料值某试,些卷审异弯核常扁与高度校中固对资定图料盒纸试位,卷置编工.写况保复进护杂行层设自防备动腐与处跨装理接置,地高尤线中其弯资要曲料避半试免径卷错标调误高试高等方中,案资要,料求编5试技写、卷术重电保交要气护底设设装。备备4置管高调、动线中试电作敷资高气,设料中课并3技试资件且、术卷料拒管中试试调绝路包验卷试动敷含方技作设线案术,技槽以来术、及避管系免架统不等启必多动要项方高方案中式;资,对料为整试解套卷决启突高动然中过停语程机文中。电高因气中此课资,件料电中试力管卷高壁电中薄气资、设料接备试口进卷不行保严调护等试装问工置题作调,并试合且技理进术利行,用过要管关求线运电敷行力设高保技中护术资装。料置线试做缆卷到敷技准设术确原指灵则导活:。。在对对分于于线调差盒试动处过保,程护当中装不高置同中高电资中压料资回试料路卷试交技卷叉术调时问试,题技应,术采作是用为指金调发属试电隔人机板员一进,变行需压隔要器开在组处事在理前发;掌生同握内一图部线纸故槽资障内料时,、,强设需电备要回制进路造行须厂外同家部时出电切具源断高高习中中题资资电料料源试试,卷卷线试切缆验除敷报从设告而完与采毕相用,关高要技中进术资行资料检料试查,卷和并主检且要测了保处解护理现装。场置设。备高中资料试卷布置情况与有关高中资料试卷电气系统接线等情况,然后根据规范与规程规定,制定设备调试高中资料试卷方案。

Pahole Final EA

Pahole Final EA

FINAL ENVIRONMENTAL ASSESSMENT KAPUNA WATERSHED PROTECTION PROJECT PAHOLE NATURAL AREA RESERVEKapuna and Keawapilau DrainagesPahole Natural Area Reserve & Mokuleia Forest ReserveWaialua DistrictNorthern Wai‘anae MountainsIsland of O‘ahuIn accordance withChapter 343, Hawai‘i Revised StatutesProposed by:State of Hawai‘iDepartment of Land and Natural ResourcesDivision of Forestry and WildlifeNatural Area Reserves System1151 Punchbowl Street, Room 224Honolulu, Hawai‘i 96813October 2003TABLE OF CONTENTS……………………………………………………………….1I. SummaryII. Project Purpose & Need (2)III. Project Description (4)IV. Summary Description of Affected Environment (6)V. General Description of the Action Including Environmentaland Socioeconomic Characteristics (9)VI. Mitigation Measures (12)VII. Alternatives Considered (13)VIII. Anticipated Determination (15)IX. Findings and Reasons Supporting the Anticipated Determination 15X. List of Permits Required for this Project (18)XI. Environmental Assessment Preparation Information (18)XII. References (19)XIII. List of Appendices (19)Appendix A: Map of Project Site and Fence Line A-1DesignDetails B-1 FenceB:AppendixAppendix C: Endangered Plants, Candidate Plants, and PlantSpecies of Concern Known from the Project Area C-1 Appendix D: Native Animals Known from the Project Area D-1Appendix E: Species with Designated Critical Habitat in theProject Area E-1 Appendix F: Archaeological Reconnaissance Report F-1Appendix G: Comments Received During Public CommentG-1ResponsesandPeriodI. SUMMARYProject Name Kapuna Watershed Protection ProjectPahole Natural Area ReserveProject Location Kapuna and Keawapilau DrainagesPahole Natural Area Reserve/Mokuleia Forest ReserveWaialua DistrictNorthern Wai‘anae MountainsIsland of O‘ahuTMK 1-6-8-001-002 (State of Hawai‘i) (Pahole NAR)TMK 1-6-8-001-001 (State of Hawai‘i) (Mokuleia FR) Land Use Conservation District, Protective SubzoneProposing Agency State of Hawai‘iDepartment of Land and Natural ResourcesDivision of Forestry and WildlifeNatural Area Reserves SystemApproving Agency State of Hawai‘iDepartment of Land and Natural ResourcesAgencies Consulted Federal: U.S. Army Garrison, Hawai‘iU.S. Department of Agriculture, NaturalResources Conservation ServiceU.S. Department of Interior, Fish andWildlife ServiceU.S. Geological Survey, BiologicalResources DivisionState: Department of AgricultureDepartment of Business, EconomicDevelopment and Tourism, Office of PlanningDepartment of DefenseDepartment of Hawaiian Home LandsDepartment of HealthDepartment of Land and Natural ResourcesDivision of Conservation andResource EnforcementDivision of Forestry and WildlifeHistoricPreservationofDivisionDivision of Land ManagementStateParksofDivisionNARS CommissionOffice of Conservation and CoastalLandsLand Use CommissionOffice of Hawaiian AffairsOffice of Environmental Quality ControlUniversity of Hawai‘i, Dr. MichaelHadfieldUniversity of Hawai‘i, EnvironmentalCenterCounty: Board of Water SupplyDepartment of Planning and PermittingNorth Shore Neighborhood BoardWahiawa Neighborhood BoardWaianae Neighborhood BoardPrivate: Ahahui Malama I Ka LokahiBishop MuseumConservation Council of Hawai‘iEarthjustice Legal Defense FundHawai‘i Audubon SocietyHawai‘i Trail and Mountain ClubFoundationHawai‘iHistoricIlio‘ulaokalani CoalitionKahea – the Hawaiian EnvironmentalAllianceKo‘olau Mountains Watershed PartnershipO‘ahu Invasive Species CommitteeO‘ahu PigofAssociationHuntersOahuChapterClub,SierraHawai‘iofConservancy TheNatureClubCivicWaialuaHawaiianClubCivicHawaiianWaianaeSteve MontgomeryJonah IoaneSummary of ActionThe Hawai‘i Department of Land and Natural Resources, Division of Forestry and Wildlife proposes to construct a network of fences in the uppermost portion of the Kapuna and Keawapilau drainages, between the 1,500 and 2,590 foot elevation, in the Pahole Natural Area Reserve and extending slightly into the Mokuleia Forest Reserve, in the northern Wai‘anae Mountains on the island of O‘ahu. By eliminating the destructive impact of feral pigs in the project area, this project is directed at the protection of the watershed as well as rare and endangered species.The proposed fencing will have a combined length of approximately 3.5 miles, enclosing approximately 235 acres. The proposed action is part of an ongoing effort by DOFAW, USFWS, the United States Army, hunting clubs, and community volunteers to protect native ecosystems, watershed, and habitat for native species. At least eighteen species of listed, proposed, candidate or rareplants and several rare and/or endangered native snail species are found in the project area.Fence construction will involve hand clearing of a corridor no more than 10 feet wide and erecting a fenceline. The planned fence will be approximately three feet tall, made of hogwire. Where necessary, the outside of the fence will be skirted along the base with a hogwire apron. Management activities planned after the fence is completed include feral animal and weed control and outplanting of native species to restore the dryland forest.Potential impacts include short-term increase in soil disturbance along the fenceline, disturbance and damage to common native plants, and effects on rare and endangered plant and animal species, cultural resources, public hunting, and the Mokuleia Trail. Impact mitigation measures include conducting expert surveys of the fence route to ensure that no biological or cultural resources are within the fence clearing corridor, implementing measures to decrease the potential for accidental introduction of non-native species, and retaining the integrity of the Mokuleia Trail.II. PROJECT PURPOSE & NEEDThe Hawaiian Islands are known as the endangered species capital of the world. Approximately half the native rain forest and 90 percent of the native dry forest in Hawai‘i have been lost. Over one-third of the threatened and endangered species in the United States are unique to Hawai‘i, and more plant and bird extinctions have been recorded from the islands than anywhere else in the country.The Natural Area Reserves System (NARS) was established in 1970 by the State Legislature to “preserve in perpetuity specific land and water areas which support communities, as relatively unmodified as possible, of the natural flora and fauna, as well as geological sites, of Hawaii.” Chapter 195, HRS. The 658-acre Pahole Natural Area Reserve was established in 1981 to protect rare lowland native mesic and dry forest and habitat for endangered species. Pahole Natural Area Reserve supports the endangered O‘ahu ‘elepaio (Chasiempis sandwichensis ibidis), the endangered O‘ahu tree snail (Achatinella mustelina), at least 18 species of endangered plants, candidate plants, and plant species of concern, and additional native species of plants and animals.The Forest Reserve System was established in 1903 to protect the vital mountain watersheds. The Mokuleia Forest Reserve surrounds Pahole Natural Area Reserve and also supports the endangered O‘ahu ‘elepaio as well as various species of rare, threatened and endangered plants.The proposed action focuses on protecting some of the best examples of lowland native mesic forest remaining in the Hawaiian Islands. Protecting and actively managing native ecosystems on a landscape level is necessary to secure the long-term viability of these systems and to recover endangered species. Theecosystem approach to managing the Pahole Natural Area Reserve is consistent with the NARS mandate to protect natural communities in perpetuity. This strategy is also consistent with the USFWS policy of protecting large, intact, native ecosystems whenever possible.The proposed action will reduce the negative impacts of feral pigs on native forest, watershed, and habitat for native plants and animals, including endangered species. The installation of a ridgeline fence by the U.S. Army Garrison Hawai‘i along the entire southeastern border of the Reserve and continuing east on the crest of West Makaleha Gulch has resulted in a dramatic increase in feral pig activity in the upper Kapuna and Keawapilau drainages. Feral pigs pose a major threat by consuming and destroying native understory plants, creating conditions favoring non-native plant infestation and establishment, preventing the establishment of ground-rooting native plants, and disrupting soil nutrient cycling. The cumulative effect of these activities is the decline of native forests, watersheds, and suitable habitat for native plants and animals.The proposed action will enhance the Wai‘anae Mountains watershed, which serves the North Shore and Leeward O‘ahu communities. Fencing and removing feral pigs will enhance surface and ground water resources by reducing soil erosion and runoff.The project area, Pahole Natural Area Reserve and Mokuleia Forest Reserve, is State owned land within the Conservation District, which triggers the need for an Environmental Assessment to be written in accordance with Chapter 343, HRS.DESCRIPTIONIII. PROJECTGeneralThe Division of Forestry and Wildlife (DOFAW) proposes to construct a network of fences in the uppermost portion of the Kapuna and Keawapilau drainages, between the 1,500 and 2,590 feet elevation, in the Pahole Natural Area Reserve and the Mokuleia Forest Reserve, in the northern Wai‘anae Mountains on the island of O‘ahu. The project area is owned by the State of Hawai‘i and lies within the Conservation District. A map of the project area and proposed fence lines is included in Appendix A.The goals of the project are to: 1) protect native forest, watershed, and habitat for native species from feral pigs (Sus scrofa); and 2) secure outplanting sites for endangered plants. The proposed action is part of an ongoing effort by DOFAW, USFWS, the United States Army, hunting clubs, and community volunteers to protect native ecosystems, watershed, and habitat for native species.The project involves constructing a network of fences around four habitat management units that still support relatively intact native forest, watershed, and habitat for native species. The habitat management units range in size from eight to 207 acres. A perimeter fence will be installed around the fenced habitat management units, protecting a total of approximately 235 acres. The fenceswill be approximately three feet high with a combined length of approximately 3.5 miles.The proposed fencing is located primarily within Pahole Natural Area Reserve, but extends into a portion of the Mokuleia Forest Reserve to the east of Pahole. The proposed fence line was selected based on the need to minimize impacts of fence construction on native plant communities; ease of fence installation and maintenance; and long-term survival of the fences from vegetative encroachment, erosion, and slides.The fences will be constructed on remote ridges dominated by non-native plants to avoid disturbing sensitive species, slopes, and gulches. Helicopters and existing trails and roads will be used to transport fence materials and crews.A corridor no wider than 10 feet along the proposed fence line will be clearedby hand and with small power tools, if necessary. The fences will be made of steel and wood posts, hog wire, and a single strand of barbed wire along the bottom of the fence to prevent feral pigs from entering the fenced areas. Where necessary, the fences also will be skirted along the bottom of the fence with a horizontal 24-inch wide wire apron.The fenceline crosses the Mokuleia Trail in two locations. Gates or stiles will be constructed at these locations to preserve access along the trail forpublic users, such as hikers and hunters, and for resource managers conducting management activities within the Natural Area Reserve.Once the fences have been installed, feral pigs will be removed from the fenced areas. A comprehensive threat-control program will be implemented, invasive weed species and predatory rats (Rattus spp.) will be monitored and controlled, and human disturbance minimized.Fencing SpecificationsFence construction will involve driving steel T-posts and treated wood posts into the ground no more than 10 feet apart along the fence routes using powered drills and post pounders. One strand of galvanized barbed wire will be clipped to the posts and nailed to the poles at ground level. Bezinol-coated hog wire will be stretched and clipped or nailed to the standing posts and poles. Bezinol steel pins will be used as anchors within each 10-foot span. Where necessary, the bottom of the fence will be anchored with posts to ensure that the wire fabric is kept close to the ground. A 24-inch-wide apron of hog wire will be laid horizontally on the ground and attached to the outside of the standing fence where needed to curtail pig grubbing and consequent erosion along the fences.Timing & CostsFence construction is planned to occur in two phases because of funding constraints. Units 1, 2 and 3 will be constructed sequentially during Phase I ofthe project, and Unit 4 will be constructed during Phase II. Units 1, 2 and 3will create three separate fenced exclosures, while Unit 4 is a perimeter fencethat will enclose a larger area that includes Units 1, 2 and 3. (See map inAppendix A).The cost estimates for each unit are as follows:Item Unit 1 Unit 2 Unit 3 Subtotal Unit 4 Total3,080 1,509 4,307 8,896 9,518 18,414 Linear feetof FencingSupplies/$6,006 $2,943 $8,399 $17,348 $18,560 $35,908 FencingMaterialsFence line$8,121 $3,967 $11,412 $23,500 $15,648 $39,148 clearing$15,400 $7,545 $21,535 $44,480 $128,493 $172,973 FenceConstruction(LaborCosts)$1,440 $1,440 $1,440 $4,320 $4,320 $8,640 HelicopterSling LoadsTotals $30,967 $15,895 $42,786 $89,648 $167,021 $256,669Material costs are based on a cost of $1.95 per foot of fence constructed. Fencing materials for all phases of the project have been purchased andcurrently being stored at the Pahole Rare Plant Nursery.Fence clearing costs are based on a labor cost of $13.50 per hour plus15% benefits. The amount of time estimated for fence clearing for Units 1, 2and 3 is based on the amount of time it took to clear a similar amount of fenceline on the original fence constructed in the Pahole Natural Area Reserve in1995-1996. The clearing cost for each of the 3 units is based on the percentageof linear feet of fence that contributed to the combined total of the three units.The amount of time estimated for fence clearing for Unit 4 is based on past experience and the terrain.Fence construction costs are based on cost estimates obtained from an experienced fencing contractor. The cost for fence construction is estimated at$5.00 per linear foot for Units 1, 2 and 3 and at $12.00 to $15.00 per linear footfor Unit 4. The estimate for Unit 4 is higher because of the steepness of theterrain and because the proposed fenceline crosses several gulches. Construction costs in the table above utilize a cost of $13.50 per linear foot.The funds for the fence materials were provided to DOFAW in a grant of$36,000 from the U.S. Fish & Wildlife Service. Fence clearing will becompleted by DOFAW personnel with help from cooperating natural resource organizations such as The Nature Conservancy and the U.S. Army Environmental staff, or by contract labor supervised by DOFAW staff, or a combination of the above. Additional funds for fence construction labor will be provided through an Endangered Species Act Section 6 Candidate Conservation Grant in the amount of $35,250.Construction of Units 1, 2 and 3 will proceed as soon as all necessary approvals have been granted and is estimated to commence in the third quarterof 2003. Construction of these Units should take approximately one year.While the materials for the construction of Unit 4 have been purchased, the State will be seeking additional funds for construction of Unit 4. The timing of Phase II of this project depends upon the availability of additional funds for construction.IV. SUMMARY DESCRIPTION OF AFFECTED ENVIRONMENT The proposed fencing is located primarily within Pahole Natural Area Reserve, enclosing a small portion of the Mokuleia Forest Reserve to the east of Pahole. Pahole Natural Area Reserve is surrounded by the United States Army’s Makua Military Reservation to the west, the Mokuleia Forest Reserve to the northeast and southwest, and privately owned pasture to the northeast adjacent to the lowermost boundary of the Reserve.Pahole Natural Area Reserve occupies 658 acres on the northeastern face of the Wai‘anae Mountain Range in the district of Waialua on the island ofO‘ahu. Mokuleia Forest Reserve occupies approximately 3,341 acres, to the east and west of Pahole Natural Area Reserve. The project area is located entirely within the Conservation District, within the Protective subzone.Pahole Natural Area Reserve ranges in elevation from approximately1,200 to 2,590 feet, and receives an average annual rainfall of 57 to 66 inches. The runoff is rapid, and erosion occurs on the well-drained soils on slopes along drainage ways. Eroded spots, stony areas, and outcrops are present in the Reserve. The lower elevations of the Reserve contain dark friable soils with a surface layer of silt clay that is moderately to strongly acidic. At the upper elevations, the well-drained soil is strongly to extremely acidic. The surface layer of this soil is reddish-brown silt clay overlying ironstone or saprolite. Environmental conditions for the portion of Mokuleia Forest Reserve within the project area are similar to those of Pahole Natural Area Reserve.A privately controlled paved road to the abandoned Nike site and Pahole Rare Plant Nursery runs close to the north side of the Reserve. A jeep trail abuts the paved road near Peacock Flat and traverses the Mokuleia Forest Reserve upslope to the Mokuleia Trail head and Pahole Natural Area Reserve entrance. The trail continues into Pahole Natural Area Reserve, runs along its eastern boundary, and continues beyond the Reserve’s northeastern boundary.The Pahole Natural Area Reserve is accessible to the public by way of an improved road and the Mokuleia Trail. Activities that are compatible with the NARS mandate are allowed, including scientific research, hiking on designated trails, camping, public hunting during designated seasons, and cultural practices are allowed in the Reserve. Some of these activities require permits. Motorized vehicles and mountain bikes are not permitted.FloraThe Pahole Natural Area Reserve protects some of the best examples of lowland native mesic and dry forest remaining in the Hawaiian Islands. These forests are noted for their species diversity and richness, and are becoming increasingly uncommon. Native natural communities within the Reserve include koa/‘ohi‘a (Acacia/Metrosideros) lowland mesic forest, ‘ohi‘a/uluhe (Metrosideros/ Dicranopteris) lowland mesic forest, lonomea (Sapindus) lowland dry forest, O‘ahu diverse mesic forest, ‘a‘ali‘i lowland dry shrubland, and an intermittent stream.The species richness in the project area is found in the sub-canopy trees, shrubs, and ferns. At least 168 native plant taxa have been reported from the Reserve, including 58 rare and endangered species. Several of these plants are locally common in the Pahole Natural Area Reserve, but are not found elsewhere in Hawai‘i. At least 18 endangered plant species, candidate plant species, and plant species of concern are present within the project area and are listed in Appendix C.A sizeable portion of the Reserve is dominated by non-native vegetation. The near extirpation of native plants and their replacement by alien species in these areas are the result of rooting, disturbance of native ground cover, and weed dispersal by feral pigs.FaunaNative birds known to occur in the Pahole Natural Area Reserve are the‘apapane (Himatione sanguinea), ‘amakihi (Hemignathus virens), kolea or Pacific golden plover (Pluvialis fulva), and the endangered O‘ahu ‘elepaio (Chasiempis sandwichensis ibidis). One lone male ‘elepaio, but no nesting pairs, has been observed in the project area.One species of the endangered O‘ahu tree snail (Achatinella mustelina), three snail species of concern, and at least three additional snail species have been reported from the Reserve. Given the relatively intact condition of the native forests in the project area, it can be assumed that the site supports native insects and other invertebrates as well. A list of native animals known from the Reserve is contained in Appendix D.Non-native feral pigs (Sus scrofa), rats (Rattus spp.), mice (Mus spp.), mongooses (Herpestes auropunctatus), and the predatory land snail (Euglandina rosea) occur in the Reserve.Significant and Sensitive HabitatsThe entire Pahole Natural Area Reserve is considered to be a sensitive habitat, particularly for the endangered O‘ahu ‘elepaio (Chasiempis sandwichensis ibidis), one species of the endangered O‘ahu tree snail (Achatinella mustelina), three snail species of concern, and many rare native plant species. Pahole Natural Area Reserve has been designated as critical habitat for the ‘elepaio and for 25 threatened and endangered plants on O‘ahu by the U.S. Fish and Wildlife Service; a list of species with designated critical habitat in the project area is contained in Appendix E. The Natural Area Reserve also includes lowland native mesic and dry forests, which are becoming increasingly rare in Hawai‘i.Archaeological & Cultural ResourcesAn archaeological reconnaissance of the planned fence route was performed by Loren Zulick, Cultural Resources Specialist, Environmental Division, Directorate of Public Works (DPW), U.S. Army Garrison Hawai‘i to assess the potential impacts to known and previously unrecorded cultural sites. The full report is included as Appendix F.The archaeological reconnaissance survey involved walking the entire planned route for the fenceline. No extant cultural resources on the surface of the ground, including temporary shelters or other natural or constructed features, were observed within the project area. In addition, no cultural resources or historic properties were identified along the proposed fenceline routes. The closest known cultural site is State Site #50-80-03-5920, a habitation/agricultural complex located within Makua Valley, 1,000 meters to the southwest. The report concluded that Site 5920 would not be impacted by the proposed project.The report also noted that construction of the proposed exclosures may impact the Mokuleia Trail, as the fence will cross the trail twice, and suggested mitigation measures to minimize the potential impact. The report concluded that no cultural resources will be impacted by the proposed project.A search for relevant studies at the University of Hawai‘i and in the Hawaiian and Pacific Collection did not turn up any historical information regarding the site. A review of Sites of Oahu disclosed no specific sites, legends, traditions, or other information relating to the project area. Finally, during pre-consultation, the Office of Hawaiian Affairs, the Ilio‘ulaokalani Coalition, and Kahea – the Hawaiian Environmental Alliance were requested to share any information they had regarding traditional use of the area or to identify any groups or individuals who may use the area. No traditional orprocess. Collection of plants within a Natural Area Reserve is restricted and requires a Special Use Permit, and there have been no applications for Special Use Permits for traditional and cultural activities within Pahole Natural Area Reserve. Finally, as the project site is in a remote wilderness, visitation to the area apart from hunters and resource managers is minimal and is primarily limited to the area surrounding the Mokuleia Trail. Based on all the available information, there are no known traditional and cultural activities associated with the project area that might be impacted by fence construction.Because of the use of Federal funds, the U.S. Fish and Wildlife Service (as the funding agency) will be conducting a Section 106 consultation for this project.V. GENERAL DESCRIPTION OF THE ACTION INCLUDING ENVIRONMENTAL AND SOCIOECONOMIC CHARACTERISTICS Environmental ImpactsShort-Term ImpactsThe primary short-term environmental impacts of the proposed action are associated with fence construction. Disturbance of vegetation will occur along the fence line in a corridor no wider than 10 feet. Some common native plants may be damaged, but not to any significant degree. Disturbance of the vegetation will be limited to areas that do not contain sensitive resources.Soil will be disturbed along the proposed fence line. Soil disturbance will be short-term, and no changes in the normal runoff or percolation patterns are expected. The proposed project may enhance water quality in nearby intermittent streams by reducing feral pig activity.Noise and air pollution from helicopter sling loads and the use of small power tools will be unavoidable during fence construction. Increased human activity in the project area resulting from fence construction will be necessary. This increase in activity may temporarily disturb native birds in the immediate vicinity.Long-Term ImpactsThe long-term impacts of the proposed action are associated with the proposed fencing and removal of feral pigs, which may alter the vegetation in the project area. Fence construction would entail clearing a corridor no wider than 10-feet to remove hazards to fence construction crews and facilitate fence construction. Although most of the vegetation is expected to grow back, fence inspection and maintenance will require that the fence line be kept cleared of vegetation. The proposed fence construction may also affect plant species known to support the endangered O‘ahu tree snail, Achatinella mustelina.Soil disturbance along the proposed fence line, as well as the transport of fence materials and crews, will increase the potential accidental introduction of non-native plants to the project site. Species, such as Triumfetta semitriloba and Clidemia hirta, which occur in the project area, could be spread by fence construction workers, and new alien species could be introduced.Native plant populations, including populations of endangered species, should increase in numbers once feral pigs are removed from the fenced areas. At the same time, the removal of feral pigs could result in an increase in non-native plants that are currently suppressed by feral pig activity. However, non-native plants that are spread by feral pigs in the proposed fenced areas may decrease once the pigs are removed.Socio-Economic ImpactsThe proposed action will require spending the funds necessary for the project. Fencing materials have been purchased, and fence crews and helicopter operators will be contracted. Positive economic impacts will result from the release of project funds into the O‘ahu economy through the purchase of fence materials and employment of fence crews. The proposed action may attract additional funding for watershed protection, reforestation, and endangered species recovery.With respect to long-range planning policies, the project is consistent with Section 3.1.3, Guidelines for Open Space and the Natural Environment of the North Shore Sustainable Communities Plan, relating to identification and protection of endangered species, native ecosystems, and other important ecologically sensitive areas and with Section 3.4.3, Planning Guidelines for the Preservation of Forest Lands of the Wai‘anae Sustainable Communities Plan, relating to the protection of rare and endangered species and preventing the introduction of alien species.The proposed action will result in the loss of approximately 250 acres to public hunting. Under current DOFAW rules, public hunting of game mammals in Pahole Natural Area Reserve is restricted, requiring an entry permit from the O‘ahu NARS Manager and requiring hunters to be accompanied by a DOFAW staff member. The reduction in hunting acreage resulting from the proposed action is not expected to be significant because little hunting occurs in the relatively remote, upper elevations of the Pahole Natural Area Reserve. Further, the project area represents a small portion of the hunting land in the general area, most of which will remain open for public hunting in the foreseeable future. Finally, the planned fencing will not restrict access for hunters crossing Pahole Natural Area Reserve to get to other hunting areas.A portion of the proposed fence runs along and crosses the Mokuleia Trail. The trail is maintained and is used by hikers, hunters, and naturalists. In comparison to other trails on O‘ahu, Mokuleia Trail is not commonly used by the public because of the limited vehicular access to the trailhead.。

21天学通C语言

21天学通C语言
21天学通C语言,pdg版
本书是为初中级程序员编写的,可作为学习C语言的教程或参考资料。
目录:第一周课程
第1天课程 C语言初步 2
1.1 C语言简史 2
1.2 为何要使用C语言 2
1.3 编程前的准备工作 3
1.4 程序开发周期 4
1.4.1 创建源代码 4
8.2.1 初始化数组 115
8.2.2 初始化多维数组 116
8.2.3 数组的最大长度 119
8.3 总结 121
8.4 问与答 121
8.5 作业 121
8.5.1 小测验 121
8.5.2 练习 122
第9天课程 指针 123
9.1 指针是什么 123
9.10.2 练习 138
TYPE&RUN3 让程序暂停 139
第10天课程 字符和字符串 141
10.1 char数据类型 141
10.2 使用字符变量 141
10.3 使用字符串 144
10.3.1 字符数组 144
10.3.2 初始化字符数组 144
TYPE&RUN1 打印程序清单 12
第一个TYPE&RUN 12
第2天课程 C语言程序的组成部分 14
2.1 一个简短的C语言程序 14
2.2 程序的组成部分 15
2.2.1 main( )函数(第8~23行) 15
2.2.2 #include编译指令(第2行) 15
9.4.2 数组元素的存储 128
9.4.3 指针算术 130
9.5 有关指针的注意事项 133
9.6 数组下标表示法和指针 133

acm知识点

acm知识点
转一个搞ACM需要的掌握的算法.
要注意,ACM的竞赛性强,因此自己应该和自己的实际应用联系起来.
适合自己的才是好的,有的人不适合搞算法,喜欢系统架构,因此不要看到别人什么就眼红,
发挥自己的长处,这才是重要的.
第一阶段:练经典常用算法,下面的每个算法给我打上十到二十遍,同时自己精简代码,
STL中的数据结构
vector
deque
set / map
动态规划 / 记忆化搜索
动态规划和记忆化搜索在思考方式上的区别
最长子序列系列问题
最长不下降子序列
最长公共子序列
最长公共不下降子序列
快速数论变换
……
素数问题
概率判素算法
概率因子分解
数据结构
组织结构
二叉堆
左偏树
二项树
胜者树
跳跃表
样式图标
弦图的性质和判定
组合数学
解决组合数学问题时常用的思想
逼近
递推 / 动态规划
概率问题
Polya定理
计算几何 / 解析几何
计算几何的核心:叉积 / 面积
解析几何的主力:复数
基本形
因为太常用,所以要练到写时不用想,10-15分钟内打完,甚至关掉显示器都可以把程序打
出来.
1.最短路(Floyd、Dijstra,BellmanFord)
2.最小生成树(先写个prim,kruscal要用并查集,不好写)
3.大数(高精度)加减乘除
4.二分查找. (代码可在五行以内)
5.叉乘、判线段相交、然后写个凸包.
(3)简单搜索技巧和剪枝(poj2531,poj1416,poj2676,1129)

怎么学习C++

怎么学习C++

-----------------------------------------------------------------------------------------------------------------------防抽区域,由于第一次上传错误,百度文库不给重复上传,所以加此标题,防抽-----------------------------------声明:此文档是转载的,觉得很经典就传到百度文库,免费给大家观看,绝对珍品,看到这文章的你可以下载下来,当自己在学习C++中感到无助,盲目时,可以在看看,这是一篇很好的文章,值得你收藏,值得你拥有,值得作为我们初学者的学习的”灯塔”感谢Tanky Woo和杨溪抽出宝贵的时间为本文审校。

在正确性、语法语义和用词上,他们为我提出了很多建设性的意见,我也进行了相应修改。

尽管如此,我相信错误还是再所难免,如果你发现了错误,请给本文留言,谢谢。

缘由有写这篇文章(确切的说是这种类型方式方法的文章)的想法是几个月之前了(2012.08.09),“不敢下手的原因是自己C++ 资历尚浅,如果言语不当,实在是害人”。

我的这种踌躇也让Tanky Woo批评过多次了,但是我仍旧抱着胆怯的心里,这种文章涉及的面有点广,还有一个很大的原因是我的太多想法过于偏激。

今天我去论坛回答了两个问题:关于结构体申请内存,c++中输入的问题,像这种类似的问题我在论坛回答过不知道多少遍了,可能每天仍旧有很多人会遇到。

于是我有了一个在博客建一个C++ FAQ 目录的想法,用来整理、总结一些常见的、不常见的、诡异的C++ 问题和解决方案(称作“奇淫技巧”或许要好一点)。

恰巧,我对此类问题也甚是关心。

我想写一篇怎样学习C++ 的文章做为C++ FAQ的序是再好不过的了,以前的种种顾虑用文章谨慎的文字来弥补吧。

笔者简单的介绍一下笔者,目的在于读者在读本文的时候心里有一个定位:“这是什么样的人写的文章,可不可靠,我应该相信他几分?”我08 年上的大学,大一上学期学校开设了C 语言课,下学期学的数据结构,C++ 是在大一暑假自学的(也就是09 年6 月份,至今三年有余)。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Day 13Advanced Internal Tables, Part 2∙Chapter Objectives∙Filling an Internal Table from a Database Tableo Selecting Multiple Rows Directly into an Internal Tableo Adding Rows one by one Using selecto Summing Up select, Internal Tables, and Efficiency∙Using the lfa1, lfb1, lfc1, and lfc3 Sample Tables∙Control Break Processingo Using the at first and at last Statementso Using the at new and at end of Statementso Using the sum Statemento Using the on change of Statement∙Summary∙Q&A∙Workshopo Quizo Exercise 1o Exercise 2Chapter ObjectivesAfter you complete this chapter, you will be able to:∙Fill an internal table from a database table using the most efficient constructs∙Perform control break processing on internal tables using at and on change of Filling an Internal Table from a Database TableQuite often in ABAP/4, the data you put into an internal table comes from one or more database tables. This section presents the best ways to do this.The ways of filling an internal table from the database fall into two categories:272∙Selecting multiple rows directly into the body of an internal table∙Selecting single rows into a work area and then appendingSelecting Multiple Rows Directly into an Internal TableTo select multiple rows directly into the body of an internal table, use the into table addition of the select statement. It takes the selected rows and places them into the body of an internal table in a single operation known as an array operation. No work areas are used or needed.An array operation is any statement that performs an operation on multiple rows of an internal table, instead of a single row at a time. Array operations are always more efficient than single row operations.Syntax for the into table Addition of the select StatementThe following is the syntax for the into table addition of the select statement.(a) select *(b) select f1f2 . . .from dbtab into [corresponding fields of] table it.where:∙dbtab is the name of a database table.∙f1 and f2 are fields within dbtab.∙it is the name of an internal table.The following points apply:∙it can have a header line.∙Other additions, such as where and order by, can follow it.∙endselect is not used with into table. select into table does not start a loop, consequently no endselect is needed.273The select into table statement places all selected rows directly into the body of it. Existing internal table contents are first discarded. Listing.13.1 contains a sample program using select into tableListing 13.1 This Program Reads Rows from a Database Table Directly into an Internal Table1 report ztx1301.2 tables ztxlfa1.3 data it like ztxlfa1 occurs 23 with header line.45 select * from ztxlfa1 into table it. "don't code an endselect6 loop at it.7 write: / it-lifnr, it-name1.8 endloop.910 select * from ztxlfa1 into table it11 where lifnr between 'V2' and 'V5'.12 skip.13 loop at it.14 write: / it-lifnr, it-name1.15 endloop.16 free it.The code in Listing 13.1 produces this output:V9 Code Now, Specs Later Ltd.1000 Parts Unlimited1010 Industrial Pumps Inc.1020 Chemical Nation Ltd.1030 ChickenFeed Ltd.1050 The Bit Bucket1060 Memory Lane Ltd.1070 Flip My Switch Inc.V10 Duncan's Mouse Inc.V6 Anna Banana Ltd.274275 V8 Smile When You Say That Ltd.V11 Weiner Schnittsel Inc.V12 Saurkrouten1040 Motherboards Inc.1080 Silicon Sandwich Ltd.1090 Consume Inc.2000 Monitors and More Ltd.V1 Quantity First Ltd.V2 OverPriced Goods Inc.V3 Fluffy Bunnies Ltd.V4 Moo like a Cow Inc.V5 Wolfman Sport Accessories Inc.V7 The Breakfast Club Inc.V2 OverPriced Goods Inc.V3 Fluffy Bunnies Ltd.V4 Moo like a Cow Inc.V5 Wolfman Sport Accessories Inc.∙Line 5 retrieves all rows from database table ztxlfa1 and places them directly into the body of the internal table it . The header line is not used and its contents are unchanged. ∙ Line 10 is like line 5, except that it only retrieves vendor numbers between V2 and V5. Theexisting contents of it are discarded before it is filled.select into table and SortingSuppose your program already reads data into an internal table. If that data needs to be sorted, use the sort statement. Don't use order by on select even if those fields are supported by an index. On a quiet, standalone system, measurements reveal that the sort statement is a little faster. Even if they were at a par, sort would still bethe preferred method because it offloads cycles from the database server to the application server. Fields You Select Must Fit into the Internal TableImagine this scenario:∙A row is retrieved from dbtab.∙A row is allocated in it.∙The row from dbtab is moved byte-by-byte into the new row in it.Each row from dbtab is moved byte-by-byte into a new row of it, which is exactly like assigning one field string to another. There is only one difference between this and a field string assignment: dbtab can be shorter (in bytes) than it, but it cannot be longer than it. If it is longer, a short dump (error SAPSQL_SELECT_TAB_TOO_SMALL) occurs. The data types and lengths of each sending field in dbtab should match the receiving field in it. Any remaining fields in it are filled with initial values (blanks or zeros). Figures 13.1 through 13.4 illustrate this point.Figure 13.1 :Database table ztx1302 contains three fields: f1, f2, and f3. f1 is a single byte, f2 is two bytes long, and f3 is one byte.Figure 13.2 :The * causes all fields to be selected, in order, from database table ztx1302. They fit exactly into each row of it because the276structure of it matches that of the database table.Figure 13.3 :In this example, only the first two fields are selected from database table ztx1302, for a total of three bytes. They are placed byte-by- byte into the first three bytes of each row of it.Figure 13.4 :Again, the first two fields are selected from database table ztx1302, but this time in a different order than they appear in the internal table. This causes corrupt data when they are placed byte-by-byte into each row of it. it-f1 receives the first byte of f2, and it-f2 receives the last byte of f2 and one byte from f1.Table 13.1 summarizes the rules for using select with into table. Selected fields must fit into the internal table. This table describes the restrictions you will face.277Listings 13.2 and 13.3 illustrate this concept.Listing 13.2 What Happens if Table Structures Differ When Using the Select-into Statement1 report ztx1302.2 tables ztxlfa1.3 data begin of it occurs 2.4 include structure ztxlfa1.5 data: invoice_amt type p,6 end of it.78 select * from ztxlfa1 into table it where land1 = 'DE'.9 loop at it.10 write: / it-lifnr, it-land1, it-regio, it-invoice_amt.11 endloop.1213 skip.14 select lifnr land1 regio from ztxlfa1 into table it where land1 = 'DE'.15 loop at it.16 write: / it-mandt, it-lifnr, it-land1, it-regio.17 endloop.18 free it.The code in Listing 13.2 produces this output:V11 DE 07 0V12 DE 14 0V8 DE 03 0278V11 DE 07V12 DE 14V8 DE 03∙Line 3 defines it as having all of the fields of DDIC structure ztxlfa1, plus an additional field.∙Line 8 selects all fields from ztxlfa1. They fill the beginning of each row in it.Invoice_amt is set to zero.∙Line 14 selects lifnr land1 and regio into the first part of each row of it. However, it begins with mandt, not lifnr, because the DDIC structure ztxlfa1begins with mandt.The output shows that the first three bytes of lifnr end up in it-mandt, it-lifnr is shifted left three bytes and also contains land1, and regio is empty.Listing 13.3 Your Program Will Produce a Short Dump If You Try to Put More Fields into an Internal Table than Exist in That Table1 report ztx1303.2 tables ztxlfa1.3 data: begin of it occurs 23,4 lifnr like ztxlfa1-lifnr, "this is a char 10 field5 land1 like ztxlfa1-land1, "this is a char 3 field6 end of it.78 *The next line causes a short dump. The internal table is too narrow.9 select * from ztxlfa1 into table it.The code in Listing 13.3 produces the output shown in Figure 13.5.Figure 13.5 :This short dump occurs when you run report ztx1303. It happens when you select more fields than will fit into the internal table.279∙Line 3 defines an internal table that has two components. The total length of it is 13 bytes.∙Line 9 selects all fields from ztxlfa1into it. The total length of all of these fields is more than 13 bytes. Consequently, a short dump occurs.Using the corresponding fields AdditionIf the components of the internal table aren't in the same order as those from the database, or if they don't have the same data type and length, you can use the corresponding fields addition. This addition has the same effect as the move corresponding statement does on a field string: It moves fields from the database table into fields of the same name in the internaltable body.280The following points apply:∙The order of the sending and receiving fields does not matter.∙Sending fields that do not have a corresponding receiving field are discarded.∙Receiving fields that do not have a corresponding sending field are unchanged.Listing 13.4 shows efficient and inefficient uses for this addition.Listing 13.4 Using the corresponding fields Addition to Fill Internal Tables from the Database1 report ztx1304.2 tables ztxlfa1.3 data: begin of it1 occurs 23,4 lifnr like ztxlfa1-lifnr,5 lifnr_ext like ztxlfa1-lifnr,6 land1 like ztxlfa1-land1,7 end of it1,8 begin of it2 occurs 23,9 lifnr like ztxlfa1-lifnr,10 land1 like ztxlfa1-land1,11 end of it2.1213 * This is efficient usage:14 select lifnr land1 from ztxlfa115 into corresponding fields of table it116 where lifnr between 'V10' and 'V12'.17 loop at it1.18 write: / it1-lifnr, it1-land1.19 endloop.2021 * This is inefficient:22 select * from ztxlfa123 into corresponding fields of table it224 where lifnr between 'V10' and 'V12'.25 skip.26 loop at it1.27 write: / it1-lifnr, it1-land1.28 endloop.2928130 * Instead, write:31 select lifnr land1 from ztxlfa1 into table it232 where lifnr between 'V10' and 'V12'.33 skip.34 loop at it2.35 write: / it2-lifnr, it2-land1.36 endloop.37 free: it1, it2.The code in Listing 13.4 produces this output:V10 CCV11 DEV12 DEV10 CCV11 DEV12 DEV10 CCV11 DEV12 DE∙Line 14 reads the lifnr and land1 fields from table ztxlfa1 into the lifnr and land1 fields of internal table it1. The internal table has field lifnr_ext between lifnr and land1, so you cannot use into table. If it1 requires the fields to be in this order, the usage of corresponding fields is appropriate here.∙Line 22 selects all fields from table ztxlfa1into only two fields of table it2. This is inefficient. Instead, line 31 shows that by selecting only the needed fields in the correct order, you can use into table.Adding Rows one by one Using selectUsing select to add rows one at a time requires the use of a work area and a second statement such as append, insert, or collect. Omitting the table addition causes the row to be assigned to a work area. It is common to use the header line of an internal table as an explicit work area.282Alternatively, you can use the default table work area (defined using tables).Listing 13.5 shows some examples of using select to add rows one at a time to an internal table.Listing 13.5 Using select with the append Statement to Fill Internal Tables1 report ztx1305.2 tables ztxlfa1.3 data it like ztxlfa1 occurs 2 with header line.45 *Do it this way6 select * from ztxlfa1 into it "notice 'table' is omitted so the7 where land1 = 'DE'. "row goes into the header line of it8 append it.9 endselect.1011 loop at it.12 write: / it-lifnr, it-land1, it-regio.13 endloop.14 refresh it.1516 *Or this way17 select * from ztxlfa1 "no 'into' so the row goes into the18 where land1 = 'DE'. "default table work area19 append ztxlfa1 to it. "and then is appended to it20 endselect.2122 skip.23 loop at it.24 write: / it-lifnr, it-land1, it-regio.25 endloop.26 refresh it.2728 *Not this way29 select * from ztxlfa1 "row goes into default table work area30 where land1 = 'DE'.31 it = ztxlfa1. "then is assigned to the header line28332 append it.33 endselect.3435 skip.36 loop at it.37 write: / it-lifnr, it-land1, it-regio.38 endloop.39 free it.The code in Listing 13.5 produces this output:V11 DE 07V12 DE 14V8 DE 03V11 DE 07V12 DE 14V8 DE 03V11 DE 07V12 DE 14V8 DE 03∙On line 6, table does not appear before it, so the fields from ztxlfa1 go into the header line for it. Line 8 appends the header line to it.∙On line 17, there is no into clause, so each row goes into the default table work area ztxlfa1. Line 19 appends work area ztxlfa1 to the internal table (the header line is not used).∙Line 29 places each row into work area ztxlfa1. Line 31 moves ztxlfa1 to the header line of it before appending. This is the least efficient method.into corresponding fields can also be used to place data into a work area instead of into the body of the internal table. The effect is similar to that of the move-corresponding statement and is more efficient. Listing 13.6 shows how.284Listing 13.6 How the corresponding fields Addition to the select Statement Produces the Same Effect as the move-corresponding Statement1 report ztx1306.2 tables ztxlfa1.3 data: begin of it occurs 2,4 lifnr like ztxlfa1-lifnr,5 row_id like sy-index,6 land1 like ztxlfa1-land1,7 end of it.89 *Do it this way:10 select lifnr land1 from ztxlfa111 into corresponding fields of it "notice 'table' is omitted12 where land1 = 'DE'.13 append it.14 endselect.1516 loop at it.17 write: / it-lifnr, it-row_id, it-land1.18 endloop.19 refresh it.2021 *Not this way:22 select * from ztxlfa123 where land1 = 'DE'.24 move-corresponding ztxlfa1 to it.25 append it.26 endselect.2728 skip.29 loop at it.30 write: / it-lifnr, it-row_id, it-land1.31 endloop.32 free it.The code in Listing 13.6 produces this output:V11 0 DE285V12 0 DEV8 0 DEV11 0 DEV12 0 DEV8 0 DEOn line 11, the table addition is omitted from before it so that the row goes into the header line. lifnr goes into it-lifnr and land1 goes into it-land1. Line 7 appends the header line to it.Line 22 moves rows into work area ztxlfa1. Line 24 uses an additional statement-move-corresponding-to transfer the work area to the header line it. Line 25 then appends the header line to the body of it. This accomplishes the same result as the first select, but it involves an additional statement and so is less efficient.Summing Up select, Internal Tables, and EfficiencyTable 13.2 contains a list of the various forms of select as it is used with internal tables and their relative efficiency. They are in descending order of most-to-least efficient.Using the lfa1, lfb1, lfc1, and lfc3 Sample TablesBefore discussing the next topic, it will be helpful to become more acquainted with the sample tables ztxlfa1, ztxlfb1, ztxlfc1,and ztxlfc3; they will be frequently used in the examples and exercises that follow. These tables are based on the R/3 tables lfa1, lfb1, lfc1,and lfc3. Please review286the structures of these tables within the DDIC as you read the descriptions below.SAP designed R/3 to be usable by a conglomerate that consists of multiple companies. During initial R/3 configuration, a company code is assigned to each company in the conglomerate. The company code forms part of the primary key in many master data tables, which enables the conglomerate to keep the information for all of its companies in a single database. Management can run reports for an individual company code as well as consolidated reports spanning multiple companies.Table lfa1 contains vendor master information that is consistent across all companies. Ignoring mandt, its primary key consists only of lifnr, the vendor number. The fields of lfa1, for example, are vendor name and address, telephone numbers, spoken language, and industry key (defined by the type of product the vendor produces, such as chemical, agricultural, and so on).Table lfb1contains vendor master information that is specific to a company. Its primary key consists of lifnr and bukrs: the company code field (see Figure 13.6). Stored within lfb1 are the company's account number with the vendor, reconciliation account number, withholding tax information, an interest calculation indicator, and so on.Figure 13.6 :The relationship between the primary keys.Figure 13.6 is the relationship between the primary keys of tables lfa1 through lfc3. They all begin with lifnr, and lfa1 uses it as the entire primary key. lfb1uses the vendor number and company code. lfc1uses vendor number, company code, and fiscal year. lfc3 uses those same fields plus a special G/L indicator.Table lfc1 contains G/L (general ledger) transaction figures. Each row holds one fiscal year's worth of transaction figures for a vendor within a company. The primary key consists of lifnr, bukrs, and gjahr, the fiscal year.287The set of fields named umNNs, umNNh, and umNNu is repeated 16 times within an lfc1row. Each of the first 12 sets contains the debit postings, credit postings, and sales for one posting period (usually a month) of the fiscal year. The last four sets are additional closing periods used to contain year-end accounting adjustments.Table lfc3contains special G/L transaction figures. Special G/Ls use an alternative reconciliation account in the general ledger. Each row of lfc3 holds a summary of the special G/Ls for an entire fiscal year in three fields: saldv, solll, and habnl. These contain the balance carried forward and the total debit and credit posting for the fiscal year. The primary key is the same as lfc1, plus a special G/L indicator: shbkz. The value in this field indicates which alternative reconciliation account is used.Most master data tables use a similar model for their primary key structures.In this book, simplified versions of these tables are used: ztxlfa1, ztxlfb1, ztxlfc1, and ztxlfc3. These were created and populated by the setup routine.Control Break ProcessingAfter you fill an internal table with data, you often need to write the data out. This output will frequently contain summary information (such as totals) at the top or bottom of the report. There might also be interim summaries (such as subtotals) within the body of the report.For example, suppose you need to write the G/L figures from ztxlfc1 for each vendor, with subtotals by fiscal year and a grand total at the bottom of the report.To do this, you can read the data into an internal table and then, within loop at, use the following statements:∙at first / endat∙at last / endat∙at new / endat∙at end of / endat288∙sum∙on change of / endonThe first statement of each of these statement pairs-except forsum-controls when the code that lies between them is executed. This type of control is called a control break. Their purpose is to execute the code between them whenever a specific condition in the data is detected during the processing of the loop.Using the at first and at last StatementsUse the at first and at last statements to perform processing during the first or last loop pass of an internal table.Syntax for the at first and at last StatementsThe following is the syntax for the at first and at last statements.loop at it.---at first.---endat.---at last.---endat.---endloop.where:∙it is an internal table.∙--- represents any number of lines of code (even zero).The following points apply:∙These statements can only be used within loop at; they cannot be used within select.∙at first does not have to come before at last. The order of these statements can be interchanged.∙These statements can appear multiple times within the same loop. For example, you could289have two at first and three at last statements within one loop and they can appear inany order.∙These statements should not be nested inside of one another (that is, at last should not be placed inside of at first and endat).∙There are no additions to these statements.The first time through the loop, the lines of code between at first and endat are executed. The last time through the loop, the lines of code between at last and endat are executed. If there are multiple occurrences of at first, they are all executed. at last behaves in a similar fashion.Use at first for:∙Loop initialization processing∙Writing totals at the top of a report∙Writing headingsUse at last for:∙Loop termination processing∙Writing totals at the bottom of a report∙Writing footingsListing 13.7 shows a sample program that uses these constructs.Listing 13.7 Using at first to Write Headings and at last to Underline the Last Line1 report ztx1307.2 tables ztxlfc3.3 data it like ztxlfc3 occurs 25 with header line.4 select * from ztxlfc3 into table it where shbkz = 'Z'.5 loop at it.6 at first.7 write: / 'Vendor',8 12 'Cpny',9 17 'Year',10 22 'Bal C/F'.11 uline.12 endat.29013 write: / it-lifnr,14 12 it-bukrs,15 17 it-gjahr,16 22 it-saldv.17 at last.18 write: / '----------',19 12 '----',20 17 '----',21 22 '-------------------'.22 endat.23 endloop.24 free it.The code in Listing 13.7 produces this output:Vendor Cpny Year Bal C/F----------------------------------------1000 1000 1995 0.001000 1000 1996 5,000.001000 1000 1998 4,000.001040 4000 1997 0.001070 2000 1997 1,000.001090 2000 1997 250.50V1 1000 1992 1,000.00V1 3000 1990 1,000.00V1 3000 1994 1,000.00V4 4000 1997 100.00V6 2000 1997 1,000.00V6 4000 1997 0.00---------- ---- ---- -------------------∙Lines 6 through 11 are only executed the first time through the loop. This example writes headings followed by an underline (line 11).∙Lines 13 through 16 write out the contents of a row. They are executed for every row.∙Lines 17 through 22 are only executed the last time through the loop. This example writes an underline at the bottom of each of the columns.Using the Unexpected: Component Values Gone291Between the at first and endat, or between the at last and endat, the component values of the work area row will not contain any data. The default key fields are filled with * (asterisks) and the numeric fields are set to zeros. The endat restores the contents to the values they had prior to entering the at. Changes to the work area within at and endat are lost.Listing 13.8 demonstrates that the components of the default key fields are filled with asterisks, and the non-key fields filled with zeros,statement.inside an at or endatListing 13.8 The Contents of the Internal Table Fields Between at and endat1 report ztx1308.2 tables ztxlfc3.3 data it like ztxlfc3 occurs 1 with header line.4 select * up to 1 rows from ztxlfc3 into table it.5 loop at it.6 write: / 'Before ''at first'':',7 / it-lifnr, it-bukrs, it-gjahr, it-shbkz, it-saldv,8 it-solll.9 at first.10 write: / 'Inside ''at first'':',11 / it-lifnr, it-bukrs, it-gjahr, it-shbkz, it-saldv,12 it-solll.13 it-lifnr = 'XXXX'.14 endat.15 write: / 'Between ''at first'' and ''at last'':',16 / it-lifnr, it-bukrs, it-gjahr, it-shbkz, it-saldv,17 it-solll.18 at last.19 write: / 'Inside ''at last'':',20 / it-lifnr, it-bukrs, it-gjahr, it-shbkz, it-saldv,21 it-solll.22 it-lifnr = 'XXXX'.23 endat.24 write: / 'After ''at last'':',25 / it-lifnr, it-bukrs, it-gjahr, it-shbkz, it-saldv,26 it-solll.27 endloop.29228 free it.The code in Listing 13.8 produces this output:Before 'at first':1000 1000 1990 A 1,000.00 500.00Inside 'at first':********** **** **** * 0.00 0.00Between 'at first' and 'at last':1000 1000 1990 A 1,000.00 500.00Inside 'at last':********** **** **** * 0.00 0.00After 'at last':1000 1000 1990 A 1,000.00 500.00∙Line 4 selects one record from ztxlfc3 into it.∙Within the loop that begins on line 5, the contents of the row are written out first. They are then written again inside of an at first and endat. The output shows that the default key fields contain asterisks and the rest contain zeros.∙Line 13 assigns a new value to it-lifnr.∙After the endat on line 14, the output shows that all values have been restored to the work area. Changes to the header line made inside of the at / endat are lost.∙Line 18 shows that at last exhibits the same behavior.∙Line 27 exits the loop on the first pass to keep the output simple.Using the at new and at end of StatementsUse the at new and at end of statements to detect a change in a column from one loop pass to the next. These statements enable you to execute code at the beginning and end of a group of records.Syntax for the at new and at end ff StatementsThe following is the syntax for the at new and at end of statements.sort by c.loop at it.293---at new c.---endat.---at end of c.---endat.---endloop.where:∙it is an internal table.∙c is a component of it.∙--- represents any number of lines of code (even zero).The following points apply:∙These statements can only be used within loop at; they cannot be used within select.∙at new does not have to come before at end of. These statements can appear in any order.∙These statements can appear multiple times within the same loop. For example, you could have two at new and three at end of statements within one loop and they can appear in any order.∙These statements should not be nested inside of one another (that is, at end of should not be placed inside of at new / endat).∙There are no additions to these statements.Using at newEach time the value of c changes, the lines of code between at new and endat are executed. This block is also executed during the first loop pass or if any fields to the left of c change. Between at and endat, the numeric fields to the right of c are set to zero. The non-numeric fields are filled with asterisks (*). If there are multiple occurrences of at new, they arebehaves in a similar fashion.all executed. at end ofA control level is the component named on a control break statement; it regulates the control break. For example, in the following code snippet, f2 is a control level because it appears on the at new statement.loop at it.294。

相关文档
最新文档