Note Path extendability of claw-free graphs
AutoCAD Vault Professional PDF 自动创建文件说明书
MFG220676Automatic PDF Creation for Drawings in Vault Professional Based on a Custom WorkflowShaya GhanbarDescriptionTake advantage of Vault Professional (Pro) lifecycle and workflow tools to automatically create PDFs for your drawings. In this class, you will learn the steps required to create a lifecycle, workflow, and category for automatic PDF creation. This class will also help you to understand the functionality of the Job Server application for the PDF generation. Based on the knowledge you gain in this class, your Vaulted environment will be set up to automatically convert your IDW and DWG™ drawings to PDF files upon r eleasing the drawing files. This workflow will save you time by avoiding manual drawing file conversion to PDF. In addition, all the Vault users will always have access to the latest PDF drawings.Your AU ExpertAs a Mechanical Engineer, Shaya Ghanbar has several years of experience in mechanical component design in the automotive industry and knowledge in design and simulation of advance remote medical equipment. In 2010, Shaya co-published the Characterization of a Robotic Drug Delivery System Based on Magnetic Propulsion in the IEEE/ASME journal. In 2016, he acquired his Professional Engineering designation in Ontario, Canada. Throughout his engineering carrier, Shaya has used several CAD and FEA applications such as Autodesk Inventor, ANSYS and Pro Engineer for 2D/3D design and simulation analysis. He has also had the opportunity to use and manage both Vault Professional and PLM 360 for engineering project management. Currently, Shaya is working as a Manufacturing Industry Consultant with SolidCAD. He is taking advantage of his engineering and CAD design experience to help SolidCAD’s clients to improve their manufacturing processes and determine methods for time and cost management.*************************Table of ContentsOverview (1)Pros and Cons of Utilizing the Vault Pro PDF Creation Feature (1)Requirements for the Automatic PDF Creation (2)Setup and Configuration Procedures (2)Setup and Configuration for a New Install of Vault 2018 or a Newer Version (2)Deleting the rule (3)Disabling the Design Representation Category (5)Lifecycle Definition Creation and Configuration (7)Category Creation and Configuration (18)Correction to the PDF lifecycle definition (23)Rule Creation and Configuration (24)Necessary Changes to the Source Drawing File’s Lifecycle (27)Job Server Configuration (29)PDF File Name Configuration (31)Knowledge References (32)Lifecycle and Revision Control Setup (32)User Account Creation (32)Job Server (32)PDF File Name Modification (32)OverviewConversion of Inventor and AutoCAD drawing files, IDW and DWG, to PDF can be time consuming and can cause confusion if the PDF files are saved in a wrong location. In addition, businesses that practice storing their PDF drawings in their Vault database must ensure that converted PDF files are checked back into their Vault.By taking advantage of the PDF creation feature that was introduced in Vault Pro 2018, companies can automate the drawing file conversion to PDF. This method will not only save time, it will store the PDF drawings automatically in a designated location. As a result, once a designer releases a drawing the file will be automatically converted to PDF and saved in Vault. Pros and Cons of Utilizing the Vault Pro PDF Creation FeatureBelow is an evaluation of Autodesk Vault Pro PDF creation feature. This evaluation will help you decided if this feature is suitable for your business needs:∙Pros:o Time savings: no more manual conversion of drawing files to PDF.o Accurate naming convention: automatically created PDF files inherit the source drawing file name.o Accurate location: PDF files will be automatically saved in either the same location as the source drawing file or in a single designated location based on theuser’s preferences.∙Cons:o File name: there is a limitation on how customized the PDF name can be.Customisation to the PDF file name requires advanced Vault knowledge.o File location: PDF files cannot be automatically saved in a subfolder of a project.o Lifecycle definition: as of Vault Pro 2019.1, the state of the PDF lifecycle definition does not change in accordance with source drawing file’s state. As aresult, users need to manually change the state of their automatically createdPDF file.o If the PDF file is relocated/renamed in Vault, after rereleasing the source drawing Vault does not recognize the relocated/renamed file and creates a new PDFdocument.This document demonstrates the steps required to setup a workflow for automatic PDF creation.Requirements for the Automatic PDF CreationThe following is required to setup a workflow for the automatic PDF creation:∙Vault Pro 2018, or a newer version.∙ A functional lifecycle that is consistent of a released state:o The released state of an existing workflow will be used to trigger the PDF conversion.o If you do not have a functional lifecycle already setup in your Vault environment, please refer to the Knowledge References, Page 32, of this report.∙Administrative user right: the user who will make the changes needs to be a Vault administrator.Setup and Configuration ProceduresThe steps below will guide you to create a custom lifecycle, category and rule for the purpose of creating PDF drawings on release.Please note that the red boxes and the numbers in the images show the sequence of steps that needs to be followed and the buttons that have to be pressed.Setup and Configuration for a New Install of Vault 2018 or a Newer VersionIf you had Vault Pro prior to the 2018 version and you have migrated your Vault database from an older version to 2018 or a newer version, please ignore this section and move on to the Lifecycle Definition Creation and Configuration section of this report on Page 7.A fresh installation of Vault Pro 2018 comes with an out-of-the-box PDF creation workflow. Companies that implement Vault Pro 2018, or newer, for the first time have access to the out-of-the-box workflow for the PDF creation. The out-of-the-box workflow contains the following components: lifecycle (Design Representation Process), category (Design Representation) and rule (Design Representation). Since the out-of-the-box solution is not customized to meet every organization’s unique requirements, this report provides a solution that can be customized based on each individual firm’s unique needs.In order to create a customized workflow, first the out-of-the-box category (Design Representation) and rule (Design Representation) need to be disabled. The following steps demonstrate how to:∙Delete the rule (Design Representation).∙Disable the category (Design Representation).Deleting the ruleFigure 1: Accessing Vault SettingsFigure 2: Deleting the Design Representation ruleDisabling the Design Representation CategoryFigure 3: Removing the Design Representation Process lifecycle from the Design PresentationcategoryFigure 4: Removing the Design Representation Process lifecycle from the Assign CategoryoptionLifecycle Definition Creation and Configuration1A lifecycle is a powerful and flexible method for managing file access and revision control. Lifecycle configuration is the first step to creating a customized workflow. Defining and configuring a lifecycle includes the following tasks:∙Creation of a new lifecycle definition.∙Assigning lifecycle states.∙Configuring ‘Control’.∙Setting up user security.∙Transitions between states.The following images demonstrate the step-by-step tasks required to create a customized lifecycle:Figure 5: Accessing Vault Settings1 Lifecycle Definition Creation and ConfigurationFigure 6: Creating a new lifecycle definitionFigure 6 shows the 3 steps required to create a new lifecycle. Since step number 3 requires more setup than what is shown, below are the breakdown of required tasks:Step 3: after selecting ‘New’, you will be prompted with the ‘New Lifecycle Definition’ window. At this stage you have to customize the following options:1. Definition Name: in this example, PDF is chosen.2. Category: since a customized category for PDF has not been created, select Base asthe File Category.3. Adding Lifecycle States: Released and WIP (work in progress).a. By pressing the green plus icon, states can be added.b. Make sure that the Released state is marked as default.Figure 7: New lifecycle definition, before customizationFigure 8: New lifecycle definition, after customizationAs shown in Figure 8, only two states (Released and WIP) are added. As it was explained in the Pros and Cons of Utilizing the Vault Pro PDF Creation Feature section, PDF lifecycle definition is not linked to the source drawing file lifecycle definition. As a result, it is easier to only work with a simple two state lifecycle definition.Ensure the following options are selected:Figure 9: Customising the new lifecycle definition, Control tab for Released stateFigure 10: Customising the new lifecycle definition, Control tab for WIP stateAdd the required user security for the PDF lifecycle definition. This security is going to be applied to PDF files while they are in Released or WIP sates. Based on your criteria, users added under the Security tap will have Read, Modify or Delete permission. The majority of organizations lock the Released state to their users so users cannot edit released files. As presented in Figure 11, only the Administrator and Job Processor users are capable of making changes to a released PDF file.Ensure that the Job Processor user is added.For more information regarding the Job Processor user, please refer to Page 30.Figure 11: Customizing the new lifecycle definition, Security tab for Released stateFigure 12: Customizing the new lifecycle definition, Security tab for WIP stateStep number 6 ensures that the file changes its revision number if it is moved from Released state to WIP.Figure 13: Customizing the new lifecycle definition, Transitions tab: Released to WIP stateUnless you would like to add security regarding the users that are capable of changing the state from Released to WIP, check mark No restriction on this transition.Figure 14: Customizing the new lifecycle definition, Transitions: Released to WIP stateIn the transition state from WIP to Released, make sure that No restriction on this transition is marked.Figure 15: Customizing the new lifecycle definition, Transitions tab: WIP to Released stateCategory Creation and ConfigurationA file category defines the associated lifecycle, revision and file properties. Creating a customized category requires the following tasks:∙Creating a new category.∙Assigning a lifecycle to the category.∙Assigning a revision scheme to the category.The images below demonstrate how to create a customized category for the PDF workflow. As shown in step 5, the name of this category is PDF.Figure 16: Category creationSteps 4 and 5 of Figure 16 define the name of the category and the colour which represents this category. Once the PDF category is created, a lifecycle and a revision scheme need to be assigned to this category. The lifecycle definition assigned to this category is going to be the PDF lifecycle that was created in the Lifecycle Definition Creation and Configuration section of the report. The revision scheme assigned to this category needs to match the revision scheme of the source drawing file. For instance, if the source drawing file’s revision scheme is calledStandard Alphabetic Format, the PDF revision scheme also needs to be Standard Alphabetic Format.Figure 17: PDF category configuration, lifecycle assignmentAs presented in Figure 18, Vault Demo Standard Alphabetic revision scheme that was used in the source file category is also being used in the PDF file category.Figure 18: PDF category configuration, revision number assignmentFigure 19 shows the revision scheme that was used in the source drawing file category, DWG.Figure 19: Revision scheme used in the source drawing fileCorrection to the PDF lifecycle definitionNow that a customized lifecycle exists for PDF files, the category selected in the PDF lifecycle definition needs to be modified. Previously the Base category was selected. In order to correct the PDF Lifecycle, the following task is required:Deselecting the ‘Base’ category.The image below shows the modification that is required:Figure 20: Modification to PDF lifecycle, deselecting the Base categoryRule Creation and ConfigurationA rule associates a file to a category based on the file’s metadata properties or file extension. In the case of automatic PDF creation, the PDF rule finds the files in the Vault database with the file extension of .pdf and associates them with the PDF category. In this case, the rule is called PDF and the Category Assignment is set to PDF. The following tasks are required to create a customized category:∙Creating a new rule (PDF).∙Adding conditions to the rule.Below is a demonstration on how to create a customized rule:Figure 21: Creation of PDF ruleOnce the rule is created, a rule condition needs to be added. The rule condition defines which type of file is going to be enforced by the rule. Figure 22, demonstrates the settings that need to be selected for PDF rule condition.Figure 22: Rule conditionNecessary Changes to the Source Drawing File’s LifecycleThe Released state of the source drawing file is going to be utilized to trigger the PDF creation. Thus, when the drawing is transitioned to the Released state Vault will trigger the creation of a PDF file for that drawing. The trigger or so called the Synchronization needs to be selected in the source file’s transition to released state.In this example, Vault Pro Lifecycle Demo is the lifecycle dentition used for the source drawings files. As presented in the step 9 of Figure 23 , on the transition from For Review to Released the ‘Synchronize properties, update view and pdf using Job Server’ option is selected. Since the Synchronize option is selected, on Release of the source file Job Server will task the PDF creation to a Job Processor computer to convert the drawing to PDF.Figure 23: Synchronise properties, update view and pdf using Job ServerSince the Released state of the source file is going to trigger the PDF creation, the Job Processor user account needs to have Read and Write security access to carry on the PDF creation tasks. Figure 24 shows how the Job Processor user is added to the security of the Released state of the source file.Figure 24: Job Processor Security setup for the source file’s lifecycle definitionJob Server ConfigurationJob Server is a feature of Vault Professional and is designed to perform batch-processing operations. In addition to the standard functionality that Job Server provides (DWF creation, property synchronization and PDF conversion), Job Server can be configured to perform custom actions on lifecycle state changes. In order to configure the Job Server, it is important to understand some important aspects of this feature. Tasks are performed by a “Job Processor” which is a workstation-based application. Any workstation with Vault Pro client and Inventor installation can be leveraged as a Job Processor. Alternatively, a separate workstation, physical or virtual, can be implemented as a dedicated Job Processor.Jobs on the queue may not get processed immediately. Jobs would be delayed if either a Job Processor workstation is not logged into the vault or there are higher priority jobs on the Job Queue.In order to use the functionalities of the Job Server, Job Server needs to be enabled by the Vault administrator. The images below show how to enable this feature:Figure 25: Vault Global SettingsFigure 26: Enabling the Job ServerJob Process requires being log into Vault server in order to carry on the tasks designated by the Job Server. In this report, a user called Job Processor 2 with Administrative user permission is created. As shown below, once the Job Processor is opened the Job Processor user account can be used to log into Vault.Figure 27: Job Processor log in2 Job Processor Vault user accountPDF File Name ConfigurationAutomatically created PDF file name can be modified to include or exclude certain information. By editing the JobProcessor.exe.config file, the PDF file name can be changed. Below is a list of modifications that can be done to the PDF file naming convention:∙Removing the source file's extension, such as .idw or .dwg, from the PDF file name.∙Adding a prefix.∙Adding a suffix.∙Adding a property value.∙Adding a date property.Please refer to the Knowledge References section on Page 32 for detailed information on how to make changes to the PDF file name.Knowledge References3The links provided in this section will assist with the learning and setup of the following topics in Vault Pro environment.Lifecycle and Revision Control SetupAutodesk Knowledge Network, Lifecycle State Administration:https:///support/vault-products/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/Vault-Admin/files/GUID-FD67DFAA-1220-485B-AF15-38ABD19CF440-htm.htmlYouTube, Unlocking Vault Lifecycles | Autodesk Virtual Academy:https:///watch?v=oKXlCNoUNMAUser Account CreationAutodesk Knowledge Network, Add a New Userhttps:///support/vault-products/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/Vault-Admin/files/GUID-B71398EE-4A6B-4202-B472-25452C840366-htm.htmlJob ServerAutodesk Knowledge Network, documentation related to Job Server:https:///support/vault-products/learn-explore/caas/CloudHelp/cloudhelp/2017/ENU/Vault-Admin/files/GUID-DAE28A42-45C3-4501-9BF2-78EE2F42808D-htm.htmlPDF File Name ModificationAutodesk Knowledge Network, Publish PDF from 2D CAD Fileshttps:///support/vault-products/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/Vault-Admin/files/GUID-F05BFEAF-A362-4070-BBA6-F3A74602967E-htm.html3 Knowledge References。
成人高考试题及答案
成人高考试题及答案成人高考是一种灵活便捷的升学途径,对于想要提升学历、职场发展的成年人来说,是一个很好的选择。
成人高考考试内容涵盖广泛,对考生综合素质的要求也较高。
下面就为大家提供一些常见的成人高考试题及答案,希望能帮助大家更好地备考。
一、英语试题1. Choose the best answer to complete each of the following sentences.1) She insisted that the report _____ submitted immediately.A. isB. wasC. has beenD. be答案:D. be2) The new manager has already made a _____ on all the employees.A. impressionB. feelingC. beliefD. guess答案:A. impression2. Fill in the blank with the appropriate word.______, I will help you with your homework.A. HoweverB. ThereforeC. OtherwiseD. Furthermore答案:A. However二、数学试题1. Calculate the following equation:2x + 3 = 7A. x = 2B. x = 4C. x = 5D. x = 7答案:B. x = 42. Find the area of a circle with a radius of 5cm. (Take π=3.14)A. 15.7 cm²B. 25 cm²C. 31.4 cm²D. 78.5 cm²答案:D. 78.5 cm²三、政治试题1. What are the three branches of government in China?A. Executive, Legislative, JudicialB. Military, Legislative, EconomicC. Executive, Police, JudiciaryD. Legislative, Judicial, Agriculture答案:A. Executive, Legislative, Judicial2. What is the highest organ of state power in China?A. Standing Committee of the National People's CongressB. President of the People's Republic of ChinaC. National People's CongressD. State Council答案:C. National People's Congress四、专业课试题1. What does HTML stand for?A. Hyper Text Markup LanguageB. High Technology Management LanguageC. Home Tool Multi LanguageD. Health Teaching Material List答案:A. Hyper Text Markup Language2. Which programming language is used for creating dynamic web pages?A. JavaB. C++C. PythonD. JavaScript答案:D. JavaScript以上就是一些常见的成人高考试题及答案,希望对大家备考有所帮助。
Contributions
A Proof Environment for Specifications
March th,
/ in a Nutshell
e Object Constraint Language ()
Textual extension of the Allows for annotating diagrams In the context of class–diagrams:
invariants preconditions postconditions
Practice:
A machine checked semantics for .
Achim D. Brucker ( Zurich)
A Proof Environment for Specifications
March th,
/ in a Nutshell
context Account inv: 0 <= id
Account balance:Integer id:Integer 1..* getId():Integer accounts getBalance():Integer deposit(a:Integer):Boolean withdraw(a:Integer):Boolean
Achim D. Brucker ( Zurich)
A Proof Environment for Specifications
March th,
/ in a Nutshell
The Object Constraint Language ()
e Object Constraint Language ()
Outline
蓝芯蓝图工具使用指南说明书
Leviton Bluebeam Tools Usage GuideThis handbook contains information pertaining to settings, icons, and methodologies for the best use of the Bluebeam program and Toolchests.1.0 Initial Project Use Set-up1.1 Steps to take prior to placing the first Leviton created icons on a set of plans1. Setting up the document correctly at the onset will allow more efficient practices.1.2 Make a copy and work in the copy1. Always have an unmodified copy available1.3 Delete sheets not required for your work.1.4 Process markups that came with the drawings1. If the markups are necessary to be displayed in your layout, flatten them to their ownlayer.2. If the markups are not necessary to be displayed in your layout, delete them.1.5 Cover design team (Architect, Engineer, etc.) information & stamps as required by yourcustomer with white text box from “Leviton Legends”.1. After placing covers on fir st sheet, right click on each cover, select “Apply to AllPages”.1.6 Flatten the drawings.1.7 Delete all layers1. Do not delete markup layer noted above if created.1.8 Create Page Labels1. In the right-side drawer, select the Thumbnails view2. Select the first sheet3. Sele ct Create Page Labels from the drawer’s top menua. Select Option Page Regionb. Select [Select]1.) Zoom in and window the entire Sheet No. area which may containsheet number text2.) In “Selections” add a delineator (ex: “ –“)3.) Select [Add]4.) Zoom to the Sheet Title and window the area which may containsheet title text5.) Select [OK]c. If the entire set has consistent borders, leave Page Range set at All Pagesd. Select [OK]4. All sheets will be relabeled1.9 Set the sheet scale1. Tool Set icons are created for 1/8” = 1’-0” (1:96). Setting scale will ensure the iconsare displayed proportionately appropriate on the sheet.2. Review your drawings to see which sheets are to which scalea. Check that the drawing is plotted to scale by measuring a known element.These include 2x2 and 2x4 ceiling tile grids.3. Tools > Measure > Set Scalea. Set the unitsb. Pre Bluebeam v18: set “Store Scale in Page”c. Bluebeam v20 onward: list the pages on which to apply the scale4. Repeat for each plan sheet and scale combination5. Sheets with details of different scale may have regions of the sheet set to thedifferent scales.6. Sheets with no scale may be set to 1/8” = 1’-0” (1:96) for consistency when placingicons on these sheets.7. To place icons on a sheet without regard to scale, deselect the ruler icon on the ToolSet header prior to inserting the icon.1.10 Reduce File Size1. File > Reduce File Sizea. Pre Bluebeam v18: File > Batch > Reduce File Size1.11 “Grey-out” the document will make Leviton icons stand out1. Select Document > Process > Color Processing2. Select “Process Type” [Black and White]3. Select [OK] to ensure all sheets are processed4. Select Document > Process > Color Processing5. Select “Process Type” [Modify Colors]6. Select left Source Colora. Select the black square7. Select To (color on the right)a. Select the far-right column, third from the top gray square8. Select {OK} to process9. Check other sheets, large documents don’t always process all t he sheets preBluebeam v18a. Repeat 4. Thru 8. Above for sheets which aren’t modified.10. Save the document.2.0 Columns2.1 Several columns have been added to provide better access to icon data1. System Type2. Model3. Description4. Room Number5. Room Name6. Room Type7. Control Zone8. Fixture ID2.2 Import columns1. Open the lower drawer in Bluebeam2. Select Markups List > Columns > Manage Columnsa. Prior to v20: Select the gear icon next to Columns3. Select the Custom Columns tab4. Select [Import]a. Navigate to where you’ve saved the toolsb. Select “Leviton Columns.xml”c. Select [Open]5. Select [Save to Profile]a. Only necessary the first timeb. Once saved to profile, these columns will be applied to every PDF whichdoesn’t already have custom columns appliedc. Repeat step 4 above for any PDF which doesn’t automatically inc lude thesecolumns.6. Active columns must include those noted in 5.1 above.a. Open the lower drawer in Bluebeamb. Select Columnsc. Check the box next to the columns7. Deactivate columns not required for display clarity and simplify extracted datamanipulation.3.0 Tool Sets3.1 Leviton Controls Bluebeam tools are saved as a profile.1. Leviton Controls.bpxa. Installs locally: C:\Leviton\Bluebeam Tools.b. Updates sent in a ZIP file.c. Updates overwrite files this location, which are applied to Bluebeamautomatically thereafter.3.2 It is recommended that people requiring the use of legacy tools create a profile named toreflect the tool status. This will limit provide tool selection clarity.3.3 Re-ordering Tool Sets on the left column drawer1. Open the left column drawer in Bluebeam2. Select the Toolchest icon3. Select the gear icon under the Toolchest icon4. Select the Tool Set which you want to move5. Use the up or down arrow buttons to move the Tool Set to where you’d like it6. Repeat steps 4 & 5 above for each Tool Set7. Select [OK] to accept the change3.4 Editing a Tool Set1. Locally installed version can be edited by the user however the edits will beoverwritten by updates.3.5 Custom Tool Sets1. Creating a custom Tool Set using the Leviton Bluebeam Iconsa. Open the Manage Tool Sets window as noted aboveb. Select Add.1.) Name your Tool Set in the Title text box.2.) Select if it is to be added to all profiles or only the current profile.3.) Select OK.c. Drag Tool Icons from existing Tools Sets to place copies in the new Tool Set.d. Be mindful of tool updates – icons are not globally updated. Custom tool setswill need to be manually updated by deleting the existing icon and copyingthe updated icon into it.4.0 Icon Use4.1 Hovering over an icon in the Tool Set will display all information about the icon1. Pre v18 shows custom columns2. v20 shows Subject and Comments, items not used by the Leviton tool build4.2 Placing an icon1. At the bottom of the screen is the “Reuse” indicator. When inactive, a command willrun once. When active, a command will repeat until another command is selected.2. Select the desired icon in the Tool Set3. Place the icon on the drawinga. If Reuse is active, place additional icons4. It is not necessary to copy & paste existing icons to ensure they are correctthroughout the layout4.3 Do not scale, stretch, rotate, or otherwise deform an icon. Bluebeam will recognize thisdifference as a different item. It doesn’t work like AutoCAD.4.4 Do not change the Custom Columns Description information, Bluebeam will recognize thisas a different device. It doesn’t w ork like AutoCAD.1. When placing GreenMAX cabinets, indicate their name at the end of the CustomColumns Description (ex: LCP-1) to differentiate the device.5.0 Legends5.1 There are four (4) legends1. Devices This Sheet: the device count, sorted by system2. Leviton Exclusions: exclusions and their descriptions3. Fixture Control Notes: bookkeeping notes which may also be useful for the installeridentifying different control types (0-10V, Forward Phase, Reverse Phase, etc.).4. GreenMAX Connectivity Notes: bookkeeping notes which may also be useful for theinstaller to identify different GreenMAX related load and input types.5.2 Icons are assigned to the proper legend.1. Inserting the legend on the page should automatically assign all related icons intothe legend.2. Adding & deleting icons to a page with a legend present should automatically alterthe legend accordingly.6.0 Data Use and Extraction6.1 Custom Columns Data is editable in the right column drawer6.2 Multiple icons of different type may be selected at the same time and the Custom Columndata edited at one time1. Example: select all the icons in a room, in the right column drawer edit their RoomNumber and Room Name6.3 All instances of a specific model may be selected, and the model number changed1. Example: open the bottom drawer; select the column “Model” to so rt by modelnumber; scroll down to the model requiring change; select the first one then scroll towhere the last one is displayed, hold the shift key and select the last one; with all ofthe model selected, in the right column drawer, change the model number and select[enter]. All instances of the model will be changed.2. The above example can be used to quickly change all instances of OSC20-MWW toOSC20-M0W. The legends on each sheet will instantly reflect the change.6.4 If the facility has called out room types, use of the Room Type column can assist inorganizing the information appropriately as well as checking to ensure the types are aligned properly. Additional techniques may be employed to streamline assignment & estimationpurposes.6.5 Data Extraction1. Data may be extracted for use elsewhere2. Including Room Number (and Room Name) will increase the amount of automationthat will be applied to drawing creation.3. To extract data:a. Ensure at minimum the columns you wish to extract are as listed in 5.1 above– remove from visibility columns you do not wish to extract beyond those.b. In the bottom drawer, select Summary > CSV Summaryc. Ensure all the pages are selected for extractiond. Ensure all items are checked except “Open File After Creation” and “IncludeID Columns”e. Ensure Include is set to Markups.f. Select the location to extract the datag. It is highly recommended the file name be changed to something simple witha date and time stamp. Example: “Extraction 20210605-1532.cvs”h. Open the CVS file in Excel; SaveAs an XLSX file prior to modifying theworkbook to ensure your Excel work is saved.4. Excel Pivot Table may be employed directly against the extracted data to determineeither bulk model quantities or broken out by System Type, Room Numbers, Sheets,etc.End of Document。
The Binary Component Adaptation User Guide
The Binary Component Adaptation User GuideJuly 16, 1998 Ralph KellerDISCLAIMER OF WARRANTY. Free of charge Software is provided on an “AS IS” basis, without warranty of any kind, including without limitation the warranties that the Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Software is borne by you.Copyright (c) 1998 Ralph Kellerralph@All rights reserved.1.IntroductionBinary component adaptation (BCA)[KH98a] is a mechanism that modifies existing components (such as Java class files) to the specific needs of a programmer. Binary component adaptation allows components to be adapted and evolved in binary form and on the fly (during program loading). That is, a programmer can add methods and fields to classes and interfaces, rename and reimplement methods, and alter the type hierarchy even without access to the source code.This guide focuses on how to install and use the Java implementation of BCA. It does neither explain how BCA works nor how it is implemented. Furthermore, we expect that the reader is familiar with Java and the Java Virtual Machine (JVM).1.1Related ReadingIf you want to know more about the motivation and design rationales of BCA, you should read Binary Component Adaptation [KH98a]. Also an interesting paper is Integrating Independently-Developed Components in Object-Oriented Languages [Höl93]. If you are interested in the inner workings of BCA, you should have a look at Implementing Binary Component Adap-tation [KH98b] which describes the implementation for Java.For further information about BCA, check out the following URL:/oocsb2.Restrictions2.1BCA RestrictionsThe current implementation of BCA has some (minor) restrictions:•No type checker.The delta file compiler does not check adaptations for correctness. For example, it is possible to add an interface to a class even though the class does not implement all the required methods. In this case, the adaptation will com-pile, but at load-time the VM will cause a linkage error.However, new code added to classes is legal if it compiles correctly and can only reference class members that really exist.•No name conflict resolution. BCA does not (yet) transparently resolve method or field name clashes. For example, if a change introduced by evolution clashes with changes made by adaptation, then a linkage error occurs.•Fully qualified type declarations. The delta file compiler requires all types in methods and field declarations to be fully qualified. For example, it is fine to use the class type ng.String in a method declaration, but the unqualified String would cause a delta file compilation error.2.2JDK RestrictionsBCA needs to use the class files in javasrc-1.1.5/classes. It won’t work with the classes provided in the binary distribu-tion of the JDK1.1.5. If the class path is set incorrectly, bcajava fails to initialize and aborts silenlty. Simply set your class path accordingly (e.g.,setenv1 CLASSPATH<bca-dir>/javasrc-1.1.5/classes).1The syntax to set environment variables depends on the shell. In the following we assume tcsh.3.The Package StructureThe BCA package consists of the following subdirectories:4.Installing BCA 1.Untar the release in a directory, so type:tar xvf bca-releasenumber .tarThis extracts the package and generates several subdirectories. In the following <bca-dir > is the absolute path of the generated bca directory (such as /users/ralph/bca )2.For convenience, you might want to include the directory <bca-dir >/bin in your PATH .setenv PATH $PATH:<bca-dir >/bin3.Set the class search path to include the classes in <bca-dir>/src/java for the delta file compiler such as:setenv CLASSPATH .:<bca-dir>/src/javapile the delta file compiler. Change directory to <bca-dir>/src/java/dfc/main and invoke bcajavac :javac Main.java5.Adaptation SpecificationAn adaptation specification describes changes to the classes that are retrieved from the file system or network. In general, an adaptation specification includes Java source code fragments for added or reimplemented methods.The complete grammer for the adaptation specification is described in Appendix A. The following subsections describe the class files specifier and modifications.Note: Currently, each NameDecl in an adaptation specification must be fully qualified . For example, the type ng.String is fine but the unqualified type String would cause an error.5.1Class Files SpecifierThe class files specifier defines the set of classes to which the adaptation is applied:DirectoryContent Description ./binMiscellaneous shell scripts and binaries ./libLibraries for BCA ./examplesSimple example uses of BCA ./src Sources for delta file compiler ./javasrc-1.1.5 A stripped version of Sun’s JDK1.1.5 source code distribution for SPARC/Solaris that includes theJava VM and javac executables, compiled classes, and libraries. This directory does not contain anysource code.Class Files SpecifierDescription class NameDeclclass file that represents specific class interface NameDeclclass file that represents specific interface implements NameDecl all class files (classes and interfaces) that implement theinterfaceTable 1.Class Files Specifier5.2ModificationsCurrently, the modifications in Table 2 are supported.ing BCAThe BCA distribution includes three convenient scripts to invoke the interpreter, Java compiler, and delta file compiler.6.1BCA InterpreterYou invoke the interpreter in the following way:bcajava [-options] classbcajava is a complete replacement for the standard Java interpreter. In addition to the standard options,bcajava recognizes the -deltas flag which contains a colon-separated list of delta files that are used for modifications at run-time. Each file name must also include the .df extension. For example, a typical invocation of the interpreter looks as following:bcajava -deltas StringEncryption.df:Enumeration.df:ImplementsEnumeration.df Main6.2BCA Java CompilerTo compile against adapted classes, you invoke the Java compiler as following:bcajavac [-options]file .java ...The BCA java compiler is a complete replacement for the JDK’s javac . In addition to the standard flags,bcajavac recognizes the -deltas flag which contains a colon-separated list of delta files used for compilation. Classes that bcajavac loads to look up type information are then modified according to the delta files.For example, if you have a delta file that adds encryption to ng.String (such as the StringEncryption delta), in order to compile classes that use methods encrypt or decrypt you have to invoke bcajavac as following:bcajavac -deltas StringEncryption.df UsesAdaptedStringClass.java6.3Delta File CompilerThe delta file compiler translates an adaptation specification into a binary delta file. You invoke delta file compiler as following:bcadfc [-v]file .deltaProductionsfie l d s add field AccessFlagDecls opt TypeDecl Identifierrename field Identifier to Identifierrename reference field NameDecl Identifier to Identifierm e t h o d s add method AccessFlagDecls opt TypeDecl Identifier ( FormalParameterListDecl opt )ThrowsDecl optMethodBodyDecl opt rename method TypeDecl Identifier ( FormalParameterListDecl )to Identifierrename reference method NameDecl TypeDecl Identifier ( FormalParameterListDecl )to Identifieri n t e r f a c e sadd implements NameDeclTable 2.ModificationsThe delta file compiler reads in file.delta and, if compilation succeeds, produces a binary delta file. The delta file has the name as specified in the adaptation specification. The-v option causes bcadfc to print debugging information and the gener-ated delta file.For example, if you want to compile StringEncryption.delta, you invoke the delta file compiler as following: bcadfc StringEncryption.deltaThis creates the StringEncryption.df delta file.6.4Class File ToolsThe BCA distribution also contains three tools that can be helpful when dealing with class files.6.4.1mainjvmThe tool mainjvm is a class file viewer. You invoke it as following:mainjvm classfile.classmainjvm shows the complete class file structure in an easy to read form. For example, it displays the constant pool, access modi-fiers, super class, interfaces, fields, methods, and attributes. Byte codes are shown as hex values.6.4.2mainjhlThe tool mainjhl is a high-level class file viewer. You invoke it as following:mainjhl classfile.classmainjhl shows the class in a high-level representation. For example, all references to classes, interfaces, methods, and fields are resolved.mainjhl also disassembles byte codes as JVM instructions and resolves all references to the constant pool.6.4.3mainjdlmainjdl displays a class file after performing modifications. You invoke mainjdl as following:mainjdl classfile.class deltafilesmainjdl loads the classfile and then makes all modifications described in deltafiles, a colon-separated list of delta files such as StringEncryption.df:Rename.df.You can use mainjdl to test delta files for their correct behavior. For example, if you run:mainjdl String.class StringEncryption.dfThen the printed class file must also include the new methods encrypt and decrypt:...61: public encrypt ()Ljava/lang/String;0: CodeAttribute: max stack: 4 max locals: 3 codelength: 400x0000: 2a b6 01 12 4c 03 3d a7 00 10 2b 1c 2b 1c 34 100x0010: 56 82 92 55 84 02 01 1c 2a b6 01 13 a1 ff ee bb0x0020: 00 11 59 2b b7 00 22 b062: public decrypt ()Ljava/lang/String;0: CodeAttribute: max stack: 4 max locals: 3 codelength: 400x0000: 2a b6 01 12 4c 03 3d a7 00 10 2b 1c 2b 1c 34 100x0010: 56 82 92 55 84 02 01 1c 2a b6 01 13 a1 ff ee bb0x0020: 00 11 59 2b b7 00 22 b0...7.First Experiences with BCAIn this section, we illustrate a simple example of using BCA step by step.Suppose, we want to extend the standard class ng.String with functionality for encryption. Using BCA, we write the following adaptation and save it in a file StringEncryption.delta:delta StringEncryption adapts class ng.String {add method public ng.String encrypt() {char[] buf = this.toCharArray();for (int i=0; i<this.length(); i++) {buf[i] = (char) (buf[i] ^ 0x56);}return new String(buf);};add method public ng.String decrypt() {char[] buf = this.toCharArray();for (int i=0; i<this.length(); i++) {buf[i] = (char) (buf[i] ^ 0x56);}return new String(buf);};}This adaptation adds two methods encrypt and decrypt to ng.String. Then we compile the adaptation into the delta file by invoking:bcadfc StringEncryption.deltaThis generates StringEncryption.df. Now, we write a class Main.java that uses the encryption functionality provided by the delta.public class Main {public static void main(String[] args) {String s = “***secret***”;String encrypted = s.encrypt();System.out.println(“encrypted: “ + encrypted);String decrypted = encrypted.decrypt();System.out.println(“decrypted: “ + decrypted);}}We compile Main.java by invoking:bcajavac -deltas StringEncryption.df Main.javabcajavac requires the StringEncryption delta file since we use the methods encrypt and decrypt in Main.java. Now we can run Main by invoking:bcajava -deltas StringEncryption.df MainMain produces the following output:encrypted: |||%35$3”|||decrypted: ***secret***References[GJS96]James Gosling, Bill Joy and Guy Steele.The Java Language Specification. Addison-Wesley, 1996.[Höl93]Urs Hölzle. Integrating Independently-Developed Components in Object-Oriented Languages.Proceedings of ECOOP’93, Springer Verlag LNCS 512, 1993.[KH98a]Ralph Keller and Urs Hölzle. Binary Component Adaptation.Proceedings of ECOOP’98,Springer Verlag, July 1998.[KH98b]Ralph Keller and Urs Hölzle. Implementing Binary Component Adaptation.Technical Report, Department of Computer Science, University of California, Santa Barbara, July 1998.Appendix A Adaptation Specification GrammarThe following subsection presents a grammar for the adaptation specification.A.1Grammar NotationFor the grammar, we use the same notation as in chapter 19 of the Java Language Specification [GJS96]. Terminal symbols of the grammar are shown in fixed-width font. Nonterminal symbols are shown in italic type. The definition of a nonterminal is introduced by the name of the nonterminal, followed by a colon. One or more alternative right-hand sides for the nonterminal then follow on succeeding lines. Nonterminals that are not specified are identical to the Java Language Specification.A.2Productions from Adaptation SpecificationCompilationUnit:ImportDecl opt delta SimpleName adapts SpecifierDecl UsesDecl opt{ ModificationDecls opt}A.2.1Import DeclarationImportDecl:SingleTypeImportDeclTypeImportOnDemandDeclSingleTypeImportDecl:import NameDeclTypeImportOnDemandDecl:import NameDecl. *A.2.2Class files Specifier DeclarationSpecifierDecl:ClassSpecifierDeclInterfaceSpecifierDeclImplementsSpecifierDeclClassSpecifierDeclclass NameDeclInterfaceSpecifierDeclinterface NameDeclImplementsSpecifierDeclimplements NameDeclA.2.3Uses DeclarationUsesDecl:uses ClassTypeListDeclA.3Productions from Modification DeclarationsModificationDecls:ModificationDecls ModificationDecl;ModificationDecl:AddFieldDeclAddMethodDeclRenameFieldDeclRenameMethodDeclRenameFieldRefDeclRenameMethodRefDeclAddImplementsDeclAddFieldDecl:add field AccessFlagDecls opt TypeDecl IdentifierAddMethodDecl:add method AccessFlagDecls opt TypeDecl Identifier( FormalParameterListDecl opt)ThrowsDecl opt MethodBodyDecl opt RenameFieldDecl:rename field Identifier to IdentifierRenameMethodDecl:rename method TypeDecl Identifier( FormalParameterListDecl)to IdentifierRenameFieldRefDecl:rename reference field NameDecl Identifier to IdentifierRenameMethodRefDecl:rename reference method NameDecl TypeDecl Identifier( FormalParameterListDecl)to Identifier AddImplementsDecl:add implements NameDeclA.3.1Productions from AddMethodDeclFormalParameterListDecl:ProperFormalParameterListDeclProperFormalParameterListDecl:ProperFormalParameterListDecl, FormalParameterDeclFormalParameterDeclFormalParameterDecl:TypeDecl IdentifierThrowsDecl:throws ClassTypeListDeclClassTypeListDecl:ClassTypeListDecl, ClassTypeDeclClassTypeDeclClassTypeDecl:NameDeclMethodBodyDecl:{ BlockDecl}BlockDecl: any legal Java method bodyA.4Productions from Access ModifersAccessFlagDecls:AccessFlagDecls AccessFlagDeclAccessFlagDecl: one ofpublic protected privatestaticabstract final native synchronized transient volatile A.5Productions from Type DeclarationsTypeDecl:BaseTypeDeclReferenceTypeDecBaseTypeDecl: one ofbyte char double float int long short boolean void ReferenceTypeDecl:ArrayTypeDeclClassOrInterfaceTypeDeclClassOrInterfaceTypeDecl:NameDeclArrayTypeDeclBaseTypeDecl[]NameDecl[]ArrayTypeDecl[]A.6Productions from NamesNameDecl:SimpleNameDeclQualifiedNameDeclSimpleNameDecl:IdentifierQualifiedNameDecl:NameDecl. Identifier。
kofnGA包用户指南说明书
Package‘kofnGA’October13,2022Title A Genetic Algorithm for Fixed-Size Subset SelectionVersion1.3Description Provides a function that uses a genetic algorithm to search for a subset of size k from the integers1:n,such that a user-supplied objective functionis minimized at that subset.The selection step is done by tournament selectionbased on ranks,and elitism may be used to retain a portion of the best solutionsfrom one generation to the next.Population objective function values mayoptionally be evaluated in parallel.License GPL-2Encoding UTF-8LazyData trueRoxygenNote6.1.0Imports bigmemoryNeedsCompilation noAuthor Mark A.Wolters[aut,cre]Maintainer Mark A.Wolters<*****************>Repository CRANDate/Publication2018-11-0206:10:03UTCR topics documented:kofnGA-package (2)kofnGA (2)plot.GAsearch (6)print.GAsearch (6)print.summary.GAsearch (7)summary.GAsearch (7)Index81kofnGA-package kofnGA:A genetic algorithm for selection offixed-size subsets.DescriptionA genetic algorithm(GA)to do subset selection:search for a subset of afixed size,k,from theintegers1:n,such that user-supplied function is minimized at that subset.DetailsThis package provides the function kofnGA,which implements a GA to perform subset selection;that is,choosing the best k elements from among n possibilities.We label the set of possibilities from which we are choosing by the integers1:n,and a solution is represented by an index vector,i.e.,a vector of integers in the range[1,n](with no duplicates)indicating which members of the setto choose.The objective function(defining which solution is“best”)is arbitrary and user-supplied;the only restriction on this function is that itsfirst argument must be an index vector encoding the solution.The search results output by kofnGA are a list object assigned to the S3class GAsearch.The package includes summary,print,and plot methods for this class to make it easier to inspect the results. kofnGA Search for the best subset of size k from n choices.DescriptionkofnGA implements a genetic algorithm for subset selection.The function searches for a subset of afixed size,k,from the integers1:n,such that user-supplied function OF is minimized at that subset.The selection step is done by tournament selection based on ranks,and elitism may be used to retain the best solutions from one generation to the next.Population objective function values can be evaluated in parallel.UsagekofnGA(n,k,OF,popsize=200,keepbest=floor(popsize/10),ngen=500,tourneysize=max(ceiling(popsize/10),2),mutprob=0.01,mutfrac=NULL,initpop=NULL,verbose=0,cluster=NULL,sharedmemory=FALSE,...)Argumentsn The maximum permissible index(i.e.,the size of the set we are doing subset selection from).The algorithm chooses a subset of integers from1to n.k The number of indices to choose(i.e.,the size of the subset).OF The objective function.Thefirst argument of OF should be an index vector of length k containing integers in the range[1,n].Additional arguments can bepassed to OF through....popsize The size of the population;equivalently,the number of offspring produced each generation.keepbest The keepbest leastfit offspring each generation are replaced by the keepbest mostfit members of the previous ed to implement elitism.ngen The number of generations to run.tourneysize The number of individuals involved in each tournament at the selection stage.mutprob The probability of mutation for each of the k chosen indices in each individual.An index chosen for mutation jumps to any other unused index,uniformly atrandom.This probability can be set indirectly through mutfrac.mutfrac The average fraction of offspring that will experience at least one mutation.Equivalent to setting mutprob to1-(1-mutfrac)^(1/k).Only used if mutprobis not supplied.This method of controlling mutation may be preferable if thealgorithm is being run at different values of k.initpop A popsize-by-k matrix of starting solutions.Thefinal populations from one GA search can be passed as the starting point of the next search.Possibly usefulif using this function in an adaptive,iterative,or parallel scheme(see examples).verbose An integer controlling the display of progress during search.If verbose takes positive value v,then the iteration number and best objective function value aredisplayed at the console every v generations.Otherwise nothing is displayed.Default is zero(no display).cluster If non-null,the objective function evaluations for each generation are done in parallel.cluster can be either a cluster as produced by makeCluster,or an in-teger number of parallel workers to use.If an integer,makeCluster(cluster)will be called to create a cluster,which will be stopped on function exit.sharedmemory If cluster is non-null and sharedmemory is TRUE,the parallel computation will employ shared-memory techniques to reduce the overhead of repeatedly passingthe population matrix to worker es code from the Rdsm package,which depends on bigmemory....Additional arguments passed to OF.Details•Tournament selection involves creating mating"tournaments"where two groups of tourneysize solutions are selected at random without regard tofitness.Within each tournament,victors arechosen by weighted sampling based on within-tournamentfitness ranks(larger ranks given tomorefit individuals).The two victors become parents of an offspring.This process is carriedout popsize times to produce the new population.•Crossover(reproduction)is carried out by combining the unique elements of both parents andkeeping k of them,chosen at random.•Increasing tourneysize will put more"selection pressure"on the choice of mating pairs,andwill speed up convergence(to a local optimum)accordingly.Smaller tourneysize valueswill conversely promote better searching of the solution space.•Increasing the size of the elite group(keepbest)also promotes more homogeneity in thepopulation,thereby speeding up convergence.ValueA list of S3class"GAsearch"with the following elements:bestsol A vector of length k holding the best solution found.bestobj The objective function value for the best solution found.pop A popsize-by-k matrix holding thefinal population,row-sorted in order of in-creasing objective function.Each row is an index vector representing one solu-tion.obj The objective function values corresponding to each row of pop.old A list holding information about the search progress.Its elements are:old$best The sequence of best solutions known over the course of the search(an(ngen+1)-by-k matrix)old$obj The sequence of objective function values corresponding to the solutions inold$bestold$avg The average population objective function value over the course of the search(a vector of length ngen+1).Useful to give a rough indication of populationdiversity over the search.If the averagefitness is close to the bestfitness in thepopulation,most individuals are likely quite similar to each other.Notes on parallel evaluationSpecifying a cluster allows OF to be evaluated over the population in parallel.The population of solutions will be distributed among the workers in cluster using static dispatching.Any cluster produced by makeCluster should work,though the sharedmemory option is only appropriate for a cluster of workers on the same multicore processor.Solutions must be sent to workers(and results gathered back)once per generation.This introduces communication overhead.Overhead can be reduced,but not eliminated,by setting sharedmemory=TRUE.The impact of parallelization on run time will depend on how the run time cost of evaluationg OF compares to the communication overhead.Test runs are recommended to determine if parallel execution is beneficial in a given situation.Note that only the objective function evaluations are distributed to the workers.Other parts of the al-gorithm(mutation,crossover)are computed serially.As long as OF is deterministic,reproducibility of the results from a given random seed should not be affected by the use of parallel computation.ReferencesMark A.Wolters(2015),“A Genetic Algorithm for Selection of Fixed-Size Subsets,with Appli-cation to Design Problems,”Journal of Statistical Software,volume68,Code Snippet1,available online.See Alsoplot.GAsearch plot method,print.GAsearch print method,and summary.GAsearch summary method.Examples#---Find the four smallest numbers in a random vector of100uniforms---#Generate the numbers and sort them so the best solution is(1,2,3,4).Numbers<-sort(runif(100))Numbers[1:6]#-View the smallest numbers.ObjFun<-function(v,some_numbers)sum(some_numbers[v])#-The objective function.ObjFun(1:4,Numbers)#-The global minimum.out<-kofnGA(n=100,k=4,OF=ObjFun,ngen=50,some_numbers=Numbers)#-Run the GA.summary(out)plot(out)##Not run:#Note:the following two examples take tens of seconds to run(on a2018laptop).#---Harder:find the50x50principal submatrix of a500x500matrix s.t.determinant is max---#Use eigenvalue decomposition and QR decomposition to make a matrix with known eigenvalues.n<-500#-Dimension of the matrix.k<-50#-Size of subset to sample.eigenvalues<-seq(10,1,length.out=n)#-Choose the eigenvalues(all positive).L<-diag(eigenvalues)RandMat<-matrix(rnorm(n^2),nrow=n)Q<-qr.Q(qr(RandMat))M<-Q%*%L%*%t(Q)M<-(M+t(M))/2#-Enusre symmetry(fix round-off errors).ObjFun<-function(v,Mat)-(determinant(Mat[v,v],log=TRUE)$modulus)out<-kofnGA(n=n,k=k,OF=ObjFun,Mat=M)print(out)summary(out)plot(out)#---For interest:run GA searches iteratively(use initpop argument to pass results)---#Alternate running with mutation probability0.05and0.005,50generations each time.#Use the same problem as just above(need to run that first).mutprob<-0.05result<-kofnGA(n=n,k=k,OF=ObjFun,ngen=50,mutprob=mutprob,Mat=M)#-First run(random start) allavg<-result$old$avg#-For holding population average OF valuesallbest<-result$old$obj#-For holding population best OF valuesfor(i in2:10){if(mutprob==0.05)mutprob<-0.005else mutprob<-0.05result<-kofnGA(n=n,k=k,OF=ObjFun,ngen=50,mutprob=mutprob,initpop=result$pop,Mat=M)allavg<-c(allavg,result$old$avg[2:51])allbest<-c(allbest,result$old$obj[2:51])}plot(0:500,allavg,type="l",col="blue",ylim=c(min(allbest),max(allavg)))lines(0:500,allbest,col="red")legend("topright",legend=c("Pop average","Pop best"),col=c("blue","red"),bty="n", lty=1,cex=0.8)summary(result)##End(Not run)6print.GAsearch plot.GAsearch Plot method for the GAsearch class output by kofnGA.DescriptionArguments type,lty,pch,col,lwd Can be supplied to change the appearance of the lines produced by the plot method.Each is a2-vector:thefirst element gives the parameter for the plot of average objective function value,and the second element gives the parameter for the plot of the minimum objective function value.See plot or matplot for description and possible values.Usage##S3method for class GAsearchplot(x,type=c("l","l"),lty=c(1,1),pch=c(-1,-1),col=c("blue","red"),lwd=c(1,1),...)Argumentsx An object of class GAsearch,as returned by kofnGA.type Controls series types.lty Controls line types.pch Controls point markers.col Controls colors.lwd Controls line widths.ed to pass other plot-control arguments.print.GAsearch Print method for the GAsearch class output by kofnGA.DescriptionPrint method for the GAsearch class output by kofnGA.Usage##S3method for class GAsearchprint(x,...)Argumentsx An object of class GAsearch,as returned by kofnGA....Included for consistency with generic functions.print.summary.GAsearch7 print.summary.GAsearchPrint method for the summary.GAsearch class used in kofnGA.DescriptionPrint method for the summary.GAsearch class used in kofnGA.Usage##S3method for class summary.GAsearchprint(x,...)Argumentsx An object of class summary.GAsearch....Included for consistency with generic functions.summary.GAsearch Summary method for the GAsearch class output by kofnGA.DescriptionSummary method for the GAsearch class output by kofnGA.Usage##S3method for class GAsearchsummary(object,...)Argumentsobject An object of class GAsearch,as returned by kofnGA....Included for consistency with generic functions.Index∗designkofnGA,2∗optimizekofnGA,2kofnGA,2,2,6,7kofnGA-package,2makeCluster,3,4plot.GAsearch,4,6print.GAsearch,4,6print.summary.GAsearch,7summary.GAsearch,4,78。
高中英语新教材译林必修件Integrated Skills Writing
02
Key points of writing skill training
Writing Skills and Strategies
Understanding writing prompts and requirements
Students should learn to analyze writing prompts, identify key information, and understand the requirements of different writing tasks
Applicable objects and usage scenarios
Applicable objects
The Yilin Edition High School English Textbook and its Integrated Skills Writing section are suitable for high school students in China who are learning English as a foreign language
Ways to improve language proficiency
• Vocabulary building: Students should actively expand their vocabulary by reading broadly, learning new words, and practicing their usage in context
• Emphasis on practical language skills: The Yilin Edition High School English Textbook focuses on developing students' practical language skills, including listening, speaking, reading, and writing
外文翻译---Java核心技术 卷Ⅱ高级特性
附录4 外文翻译Java核心技术卷Ⅱ高级特性当Java技术刚刚问世时,令人激动的并不是因为它是一个设计完美的编程语言,而是因为它能够安全地运行通过因特网传播的各种applet。
很显然,只有当用户确信applet的代码不会破坏他的计算机时,用户才会接受在网上传播的可执行的applet。
正因为如此,无论过去还是现在,安全都是设计人员和Java技术使用者所关心的一个重大问题。
这就意味着,Java技术与其他的语言和系统有所不同,在那些语言和系统中安全是事后才想到要去实现的,或者仅仅是对破坏的一种应对措施,而对Java技术来说,安全机制是一个不可分割的组成部分。
Java技术提供了以下三种确保安全的机制:(1)语言设计特性(对数组的边界进行检查,无不检查类型的转换,无指针算法等)。
(2)访问控制机制,用于控制代码能够执行的功能(比如文件访问,网络访问等)。
(3) 代码签名,利用该特性,代码的作者就能够用标准的加密算法来表明Java代码的身份。
这样,该代码的使用者就能够准确地知道谁创建了该代码,以及代码被标识后是否被修改过。
下面,我们要介绍java.security包提供的加密算法,用来进行代码的标识和用户身份认证。
正如我们前面所说,applet 是在Java平台上开始流行起来的。
实际上,人们发现尽管他们可以编写像著名的“nervous text”那样栩栩如生的applet,但是在JDK1.0安全模式下无法发挥其一整套非常有用的作用。
例如,由于JDK1.0下的applet要受到严密的监督,因此,即使applet在公司安全内部网上运行时的风险相对较小,applet也无法在企业内部网上发挥很大的作用。
Sun公司很快就认识到,要使applet真正变得非常有用,用户必须可以根据applet的来源为其分配不同的安全级别。
如果applet来自值得信赖的提供商,并且没有被篡改过,那么applet的用户就可以决定是否给applet授予更多的运行特权。
Constant Contact 邮件可访问性指南说明书
Accessible Email with Constant ContactIt’s required by federal law that all digital communications must be accessible to a diverse audience no matter their disability or impairment.Most of these best practices apply to all your digital media. This guide shows you how it specifically applies to Constant Contact.Use these high-impact best practices:1.Give your content a logical reading order from left to right and top to bottom.e readable fonts with appropriate line spacing.e good color contrast (i.e., black text on a white background).4.Describe images using alt text.e meaningful link text.6.Create structure with headers.7.Keep emails concise and use formatting to break up text.*Note: All of the templates for creating emails are accessible.1.Maintain a Logical Reading OrderEstablish a logical order and maintain a hierarchy of your email content. Irrespective of their screen size, your subscribers should be able to view the content of your email in a logical reading order.This is especially helpful for people with cognitive disabilities and subscribers using screen readers. A logical order will also help users to pull out the key information quicker by allowing them to scan the hierarchy you’ve set up by organizing your content.e Readable Fonts with Appropriate LineSpacing•Make sure your font size is at least 14 or 16 pts for the body text.•Don’t use script-style fonts for the body of your email.•Use sans serif fonts such as Arial. They are easier to read on the web.•Avoid condensed fonts and lines.•Use center-aligned text sparingly. Left-justified text is easier to read than center-aligned because the jagged left edge creates problems for people with dyslexia and other print disabilities.•Use appropriate line spacing.Figures 1 and 2 show the same content. The first one has poor color contrast and inadequate spacing between letters and lines. The second example has a good heading, good color contrast, and good spacing between letters and lines.Which would you rather read?Figure 1: Not ReadableFigure 2: Readablee Good Color ContrastWhen changing the font color or adding graphics to your email, it is important to make sure the font color contrasts well with the background.A recent design trend is to use a light gray font on white backgrounds, but it doesn’t provide enough contrast for those with visual impairments. If you want people to read your content, don’t make it hard to see. Using black font on a white background is the best option.In Constant Contact, you can change the text color by highlighting any portion of text and selecting the Edit font color button. From here, you will be able to select and adjust the color.Web accessibility guidelines state that the contrast ratio between any text and the background color should be at least 4.5:1. This is also true for adjacent colors in graphics.But how do you know if the color you choose meets contrast standards?If you want to use something other than black font on a white background, we recommend using a free accessibility checker tool like WAVE or the Color Contrast Analyzer. Both tools allow you to quickly check the contrast of any color and adjust it until it meets standards.e Image Descriptions (Alt Text)Adding text descriptions to any graphics included in your emails is important not only for people who can’t see or have low vision but also as a backup in case the image breaks or does not load properly for some users.When uploading an image into Constant Contact, the alt text is by default the filename, which is not ideal. You can add alt text to an image while you are editing an email, or you can add alt text by editing an image in the library tab. Need help finding the alt text option? See Constant Contact’s guide for a reference.You will want to change the alt text to a concise description of the image. Be sure to include any information conveyed in the image that is relevant to the user. Visit our image accessibility webpage for tips on writing alt text.e Meaningful Link TextWhen possible, you should replace all URLs with descriptive link text (also known as a hyperlink). For example, when you link to an article, the link should be the name of the article and not the website address or a vague term like “click here” or “read more.” Visit our link accessibility webpage for more information.In Constant Contact, you can easily add the link text to replace the URL when you select the Insert Link button.e Heading StructuresBreak up content with meaningful headings to make your email easy to scan. Constant Contact allows you to easily set header styles (H1, H2, H3, etc.), to identify a heading programmatically, which provides vital navigation for screen reader users with no usable vision. Once your header text is added, you will highlight the textand use the text options pop-up to add header structure. (See the screenshot below for a reference.)Sometimes it is referred to as header styles, header levels, or header tags.The big take-aways with header levels are to use them in a logical order without skipping levels and to only use one H1 header. Visit our webpage on header levels to learn more.You will still want to ensure your visual headers are formatted by enlarging and/or bolding text to create good visual headings, making it easier for sighted users to scan the content and find what’s most relevant to them.7.Keep Emails Short and Use Formatting to ChunkInformationKeep your email as simple and short as possible, use enough white space to chunk information for easy scanning, and never use tables to align or format your content. Long chunks of text can be overwhelming for users, not to mention it’s hard to scan. It is important to give proper spacing to the text using the spacers in the build tab. This will add white space and make it easy to read.You can also use headers and dividers to break up your content. People who read your newsletter must be able to scan it and digest the information in manageable chunks. Remember, people don’t spend much time in an email, so keep it concise! In ConclusionYou are required to incorporate these best practices in your Constant Contact communications to meet accessibility standards. So, take the time to organize your content logically, use good color contrast, describe images, write meaningful link text, add headings, and use a readable font with good line spacing.This will allow your message to be more effective and reach a wider audience—and you will be adhering to The University of Arkansas System Division of Agriculture’s policy. Remember, we all benefit from these best practices, and they are not optional. Luckily, Constant Contact makes it easy to achieve this!Note: This guide is frequently updated to reflect changes to the software. Go to /email-accessibility to download the latest guide. Visit/accessibility to view all our resources.。
编译原理龙书课后部分答案(英文版)
1) What is the difference between a compiler and an interpreter?∙ A compiler is a program that can read a program in one language - the source language - and translate it into an equivalent program in another language – the target language and report any errors in the source program that it detects during the translation process.∙ Interpreter directly executes the operations specified in the source program on inputs supplied by the user.2) What are the advantages of:(a) a compiler over an interpretera. The machine-language target program produced by a compiler is usually much faster than an interpreter at mapping inputs to outputs.(b) an interpreter over a compiler?b. An interpreter can usually give better error diagnostics than a compiler, because it executes the source program statement by statement.3) What advantages are there to a language-processing system in which the compiler produces assembly language rather than machine language?The compiler may produce an assembly-language program as its output, becauseassembly language is easier to produce as output and is easier to debug.4.2.3 Design grammars for the following languages:a) The set of all strings of 0s and 1s such that every 0 is immediately followed by at least 1.S -> SS | 1 | 01 | ε4.3.1 The following is a grammar for the regular expressions over symbols a and b only, using + in place of | for unions, to avoid conflict with the use of vertical bar as meta-symbol in grammars:rexpr -> rexpr + rterm | rtermrterm -> rterm rfactor | rfactorrfactor -> rfactor * | rprimaryrprimary -> a | ba) Left factor this grammar.rexpr -> rexpr + rterm | rtermrterm -> rterm rfactor | rfactorrfactor -> rfactor * | rprimaryrprimary -> a | bb) Does left factoring make the grammar suitable for top-down parsing?No, left recursion is still in the grammar.c) In addition to left factoring, eliminate left recursion from the original grammar.rexpr -> rterm rexpr‟rexpr‟ -> + rterm rexpr | εrterm -> rfactor rterm‟rterm‟ -> rfactor rterm | εrfactor -> rprimary rfactor‟rfactor‟ -> * rfactor‟ | εrprimary -> a | bd) Is the resulting grammar suitable for top-down parsing?Yes.Exercise 4.4.1 For each of the following grammars, derive predictive parsers and show the parsing tables. You may left-factor and/or eliminate left-recursion from your grammars first.A predictive parser may be derived by recursive decent or by the table driven approach. Either way you must also show the predictive parse table.a) The grammar of exercise 4.2.2(a).4.2.2 a) S -> 0S1 | 01This grammar has no left recursion. It could possibly benefit from left factoring. Here is the recursive decent PP code.s() {match(…0‟);if (lookahead == …0‟)s();match(…1‟);}OrLeft factoring the grammar first:S -> 0S‟S‟ -> S1 | 1s() {match(…0‟); s‟();}s‟() {if (lookahead == …0‟)s(); match(…1‟);elsematch(…1‟);}Now we will build the PP tableS -> 0S‟S‟ -> S1 | 1First(S) = {0}First(S‟) = {0, 1}Follow(S) = {1, $}The predictive parsing algorithm on page 227 (fig4.19 and 4.20) can use this table for non-recursive predictive parsing.b) The grammar of exercise 4.2.2(b).4.2.2 b) S -> +SS | *SS | a with string +*aaa.Left factoring does not apply and there is no left recursion to remove.s() {if(lookahead == …+‟)match(…+‟); s(); s();else if(lookahead == …*‟)match(…*‟); s(); s();else if(lookahead == …a‟)match(…a‟);elsereport(“syntax error”);}First(S) = {+, *, a}Follow(S) = {$, +, *, a}The predictive parsing algorithm on page 227 (fig4.19 and 4.20) can use this table for non-recursive predictive parsing.5.1.1 a, b, c: Investigating GraphViz as a solution to presenting trees5.1.2: Extend the SDD of Fig. 5.4 to handle expressions as in Fig. 5.1:1.L -> E N1.L.val = E.syn2. E -> F E'1. E.syn = E'.syn2.E'.inh = F.val3.E' -> + T Esubone'1.Esubone'.inh = E'.inh + T.syn2.E'.syn = Esubone'.syn4.T -> F T'1.T'.inh = F.val2.T.syn = T'.syn5.T' -> * F Tsubone'1.Tsubone'.inh = T'.inh * F.val2.T'.syn = Tsubone'.syn6.T' -> epsilon1.T'.syn = T'.inh7.E' -> epsilon1.E'.syn = E'.inh8. F -> digit1. F.val = digit.lexval9. F -> ( E )1. F.val = E.syn10.E -> T1. E.syn = T.syn5.1.3 a, b, c: Investigating GraphViz as a solution to presenting trees5.2.1: What are all the topological sorts for the dependency graph of Fig. 5.7?1.1, 2, 3, 4, 5, 6, 7, 8, 92.1, 2, 3, 5, 4, 6, 7, 8, 93.1, 2, 4, 3, 5, 6, 7, 8, 94.1, 3, 2, 4, 5, 6, 7, 8, 95.1, 3, 2, 5, 4, 6, 7, 8, 96.1, 3, 5, 2, 4, 6, 7, 8, 97.2, 1, 3, 4, 5, 6, 7, 8, 98.2, 1, 3, 5, 4, 6, 7, 8, 99.2, 1, 4, 3, 5, 6, 7, 8, 910.2, 4, 1, 3, 5, 6, 7, 8, 95.2.2 a, b: Investigating GraphViz as a solution to presenting trees5.2.3: Suppose that we have a production A -> BCD. Each of the four nonterminals A, B, C, and D have two attributes: s is a synthesized attribute, and i is an inherited attribute. For each of the sets of rules below, tell whether (1) the rules are consistent with an S-attributed definition (2) the rules are consistent with an L-attributed definition, and (3) whether the rules are consistent with any evaluation order at all?a) A.s = B.i + C.s1.No--contains inherited attribute2.Yes--"From above or from the left"3.Yes--L-attributed so no cyclesb) A.s = B.i + C.s and D.i = A.i + B.s1.No--contains inherited attributes2.Yes--"From above or from the left"3.Yes--L-attributed so no cyclesc) A.s = B.s + D.s1.Yes--all attributes synthesized2.Yes--all attributes synthesized3.Yes--S- and L-attributed, so no cyclesd)∙ A.s = D.i∙ B.i = A.s + C.s∙ C.i = B.s∙ D.i = B.i + C.i1.No--contains inherited attributes2.No--B.i uses A.s, which depends on D.i, which depends on B.i (cycle)3.No--Cycle implies no topological sorts (evaluation orders) using the rules5.3.1: Below is a grammar for expressions involving operator + and integer or floating-point operands. Floating-point numbers are distinguished by having a decimal point.1. E -> E + T | T2.T -> num . num | numa) Give an SDD to determine the type of each term T and expression E.1. E -> Esubone + T1. E.type = if (E.type == float || T.type == float) { E.type = float } else{ E.type = integer }2. E -> T1. E.type = T.type3.T -> numsubone . numsubtwo1.T.type = float4.T -> num1.T.type = integerb) Extend your SDD of (a) to translate expressions into postfix notation. Use the binary operator intToFloat to turn an integer into an equivalent float.Note: I use character ',' to separate floating point numbers in the resulting postfix notation. Also, the symbol "||" implies concatenation.1. E -> Esubone + T1. E.val = Esubone.val || ',' || T.val || '+'2. E -> T1. E.val = T.val3.T -> numsubone . numsubtwo1.T.val = numsubone.val || '.' || numsubtwo.val4.T -> num1.T.val = intToFloat(num.val)5.3.2 Give an SDD to translate infix expressions with + and * into equivalent expressions without redundant parenthesis. For example, since both operators associate from the left, and * takes precedence over +, ((a*(b+c))*(d)) translates into a*(b+c)*d. Note: symbol "||" implies concatenation.1.S -> E1. E.iop = nil2.S.equation = E.equation2. E -> Esubone + T1.Esubone.iop = E.iop2.T.iop = E.iop3. E.equation = Esubone.equation || '+' || T.equation4. E.sop = '+'3. E -> T1.T.iop = E.iop2. E.equation = T.equation3. E.sop = T.sop4.T -> Tsubone * F1.Tsubone.iop = '*'2. F.iop = '*'3.T.equation = Tsubone.equation || '*' || F.equation4.T.sop = '*'5.T -> F1. F.iop = T.iop2.T.equation = F.equation3.T.sop = F.sop6. F -> char1. F.equation = char.lexval2. F.sop = nil7. F -> ( E )1.if (F.iop == '*' && E.sop == '+') { F.equation = '(' || E.equation || ')' }else { F.equation = E.equation }2. F.sop = nil5.3.3: Give an SDD to differentiate expressions such as x * (3*x + x * x) involving the operators + and *, the variable x, and constants. Assume that no simplification occurs, so that, for example, 3*x will be translated into 3*1 + 0*x. Note: symbol "||" implies concatenation. Also, differentiation(x*y) = (x * differentiation(y) + differentiation(x) * y) and differentiation(x+y) = differentiation(x) + differentiation(y).1.S -> E1.S.d = E.d2. E -> T1. E.d = T.d2. E.val = T.val3.T -> F1.T.d = F.d2.T.val = F.val4.T -> Tsubone * F1.T.d = '(' || Tsubone.val || ") * (" || F.d || ") + (" || Tsubone.d || ") * (" ||F.val || ')'2.T.val = Tsubone.val || '*' || F.val5. E -> Esubone + T1. E.d = '(' || Esubone.d || ") + (" || T.d || ')'2. E.val = Esubone.val || '+' || T.val6. F -> ( E )1. F.d = E.d2. F.val = '(' || E.val || ')'7. F -> char1. F.d = 12. F.val = char.lexval8. F -> constant1. F.d = 02. F.val = constant.lexval。
英语技术写作试题及答案
英语技术写作试题及答案一、选择题(每题2分,共20分)1. The term "API" stands for:A. Application Programming InterfaceB. Artificially Programmed IntelligenceC. Advanced Programming InterfaceD. Automated Programming Interface答案:A2. Which of the following is not a common data type in programming?A. IntegerB. StringC. BooleanD. Vector答案:D3. In technical writing, what is the purpose of using the term "shall"?A. To indicate a requirement or obligationB. To suggest a recommendationC. To express a possibilityD. To denote a future action答案:A4. What does the acronym "GUI" refer to in the context of computing?A. Graphical User InterfaceB. Global User InterfaceC. Generalized User InterfaceD. Graphical Unified Interface答案:A5. Which of the following is a correct statement regarding version control in software development?A. It is used to track changes in software over time.B. It is a type of software testing.C. It is a method for encrypting code.D. It is a way to compile code.答案:A6. What is the primary function of a compiler in programming?A. To debug codeB. To execute codeC. To translate code from one language to anotherD. To optimize code for performance答案:C7. In technical documentation, what does "RTFM" commonly stand for?A. Read The Frequently Asked QuestionsB. Read The Full ManualC. Read The File ManuallyD. Read The Final Message答案:B8. Which of the following is a common method for organizing code in a modular fashion?A. LoopingB. RecursionC. EncapsulationD. Inheritance答案:C9. What is the purpose of a "pseudocode" in programming?A. To provide a detailed step-by-step guide for executing codeB. To serve as a preliminary version of code before actual codingC. To act as an encryption for the codeD. To be used as a substitute for actual code in production答案:B10. What does "DRY" stand for in software development?A. Don't Repeat YourselfB. Data Retrieval YieldC. Database Record YieldD. Dynamic Resource Yield答案:A二、填空题(每空2分,共20分)1. The process of converting a high-level code into machine code is known as _______.答案:compilation2. In programming, a _______ is a sequence of characters that is treated as a single unit.答案:string3. The _______ pattern in object-oriented programming is a way to allow a class to be used as a blueprint for creating objects.答案:prototype4. A _______ is a type of software development methodology that emphasizes iterative development.答案:agile5. The _______ is a set of rules that defines how data is formatted, transmitted, and received between software applications.答案:protocol6. In technical writing, the term "should" is used toindicate a _______.答案:recommendation7. The _______ is a type of software that is designed to prevent, detect, and remove malicious software.答案:antivirus8. A _______ is a variable that is declared outside the function and hence belongs to the global scope.答案:global variable9. The _______ is a programming construct that allows you to execute a block of code repeatedly.答案:loop10. In software development, the term "branch" in version control refers to a _______.答案:separate line of development三、简答题(每题10分,共40分)1. Explain the difference between a "bug" and a "feature" in software development.答案:A "bug" is an unintended behavior or error in a software program that causes it to behave incorrectly or crash. A "feature," on the other hand, is a planned and intentional part of the software that provides some functionality or capability to the user.2. What is the significance of documentation in technical writing?答案:Documentation in technical writing is significant as it serves to provide detailed information about a product or system, making it easier for users, developers, and other stakeholders to understand its workings, usage, and maintenance. It is crucial for training, troubleshooting, and future development.3. Describe the role of a software architect in a software development project。
阿里巴巴编码规范 基础技能认证 考题分析(考题+答案)
以下考试题98分,哪题错了不知道,希望大家还是看官方提供规范,仔细看都可以过1.关于索引的设计和使用2.关于explanin执行计划3.关于数据库模糊检索的描述4数据使用Arrays.aslist转化为集合5.关于捕获异常和抛异常kv结构的集合关于java的接口描述关于代码注释关于文件编码和格式单元测试对于索引以下关于命名BCD关于类名下列那些说法ACD关于日志级别以下关于格式规约关于用日志记录关于工具类二方库关于常量定义下列哪些说法关于变量关于枚举关于使用ibatis根据防止NPEHashtable hashmap关于数据库是与否关于count相关关于二方库依赖根据为了更方便关于方法的关于索引效率关于integer关于测试关于java的方法通过集合关于二方库关于maven依赖针对tcp关于try关于系统安全关于并发处理在定义集合在关于二方库的sn关于多线程并行关于构造方法关于注释关于常量定义关于基本数据类型关于线程池关于生产环境关于二方库的依赖处理关于数据库中NULL关于表字和索引关于参数校验关于二方库GroupID和关于应用与数据关于mysql关于checked关于领域模型以下关于命名编写单元测试在多线程关于接口使用关于join关于参数有效性关于日志的关于异常的处理关于使用explain关于异常关于客户数据展示数组使用关于数据库查询的关于java代码的好的单元关于数据库索引关于异常处理关于数据库中表对于索引的关于应用中关于线程安全根据下面的关于分页关于类和方法关于建表规约关于常量的命名关于代码书写Liste子类关于类的序列化关于hashcode关于二方库Sort表示元素关于常量定义关于注释针对tcp协议关于控制关于map类关于数据库命名单元测试代码关于加锁关于代码书写利用索引进行--44如何处理单元关于JAVA代码的设计关于线程池的创建使用countDownlatch关于索引的使用关于代码注释关于日志的条件关于二方库使用关于组合索引关于系统安全根据关于orm以下关于格式以下关于格式关于索引的设计关于类和方法1.关于索引的设计和使用2.关于explanin执行计划3.关于数据库模糊检索的描述4.数据使用Arrays.aslist转化为集合5.关于捕获异常和抛异常6.kv结构的集合答案:A7.关于java的接口描述答案:B C D8.关于代码注释答案:A B D9.关于文件编码和格式10.单元测试11.对于索引12.以下关于命名答案:B C D13.关于类名答案:14.下列那些说法答案:A C D15.关于日志级别答案:16.以下关于格式规约答案:17.关于用日志记录答案:18.关于工具类二方库19.关于常量定义答案:20.下列哪些说法答案:21.关于变量答案:22.关于枚举23.关于使用ibatis答案:24.根据25.防止NPE答案:26.Hashtable hashmap答案:27.关于数据库是与否答案:28.关于count相关答案:29.关于二方库依赖答案:30.根据答案:。
DevOps导论_南京大学中国大学mooc课后章节答案期末考试题库2023年
DevOps导论_南京大学中国大学mooc课后章节答案期末考试题库2023年1.以下对于微服务优点的描述中,哪一个是错误的?参考答案:微服务系统测试变得非常简单2.以下描述是否正确:多步构建允许在Dockerfile中使用多个FROM指令。
两个FROM指令之间的所有指令会生产一个中间镜像,最后一个FROM指令之后的指令将生成最终镜像。
中间镜像中的文件可以通过COPY --from=指令拷贝,其中image-number为镜像编号,0为第一个基础镜像。
没有被拷贝的文件都不会存在于最终生成的镜像,这样可以减小镜像大小,同时避免出现安全问题。
参考答案:正确3.单体架构更多地作为应用的部署架构,单体应用只运行在一个进程中。
参考答案:错误4.PSP鼓励使用瀑布型生命周期模型。
参考答案:错误5.除Spring Boot之外,主流的微服务开发框架还有什么?参考答案:Apache Dubbo6.Nagios不属于监控工具。
参考答案:错误7.本质上,微服务架构是SOA的一种扩展。
参考答案:正确8.关于评审,下述说法中不恰当是:参考答案:代码的个人评审最好交叉进行,因为阅读自己代码容易产生思维定式,不利于缺陷发现。
_代码的个人评审应该安排在单元测试之后,确保评审对象有着较高的质量,提升评审价值。
9.关于质量路径(Quality Journey),下列说法中哪些不恰当。
参考答案:质量路径与个体软件工程师无关,是团队层面的集体努力。
_质量路径中所列举的方法都是提升开发质量的有效手段,可以随意选择使用。
10.DevOps的哪些特点可以有效支撑当前社会对软件系统的期望?参考答案:虚拟机技术的大量应用_敏捷开发、精益思想以及看板方法,支持快速开发、交付、迭代和演化_微服务架构设计_工具链支持高效率的自动化11.Zabbix有两种工作模式。
参考答案:正确12.微服务架构架构风格是一种将一个单一应用程序开发为一个小型服务的方法。
the dict method is deprecated
the dict method is deprecatedThe `dict` method is a deprecated feature in Python. Deprecated features are those that have been marked as obsolete and are no longer recommended for use in new code. The `dict` method was used in older versions of Python to create a dictionary object from a sequence of key-value pairs.Instead of using the `dict` method, it is recommended to use the dictionary literal syntax or the `dict()` constructor. The dictionary literal syntax allows you to create a dictionary directly by specifying key-value pairs within curly braces. For example:```pythonmy_dict = {"key1": "value1","key2": "value2",...}```Or, you can use the `dict()` constructor with keyword arguments to pass key-value pairs. For example:```pythonmy_dict = dict(key1 = "value1",key2 = "value2",...)```Using the dictionary literal syntax or the `dict()` constructor provides a more clear and readable way to create dictionaries in Python. It aligns with the Python style guide and is easier to understand for other developers reading your code.When you encounter the warning "the `dict` method is deprecated," it means that you are using an older or deprecated way of creating dictionaries. To fix this, simply switch to the recommended dictionary literal syntax or the `dict()` constructor.Remember to always follow the recommended practices and use the latest syntax to ensure the readability, maintainability, and compatibility of your code.。
java lucene 提取短语 -回复
java lucene 提取短语-回复1. 使用Lucene的PhraseQuery来提取短语。
2. 将文本分词,并使用N-gram模型来提取短语。
3. 使用Lucene的SpanQuery类来指定短语的位置。
4. 使用Lucene的Highlighter类来提取和高亮显示短语。
5. 使用Lucene的TermVector类来获取文档的短语。
6. 使用Lucene的SpanNearQuery类来指定相邻的词组。
7. 使用Lucene的NGramTokenizer类来提取短语。
8. 使用Lucene的MoreLikeThis类来提取相似的短语。
9. 使用Lucene的FieldStats类来统计词频并提取短语。
10. 使用Lucene的FuzzyQuery类来模糊匹配短语。
11. 使用Lucene的SloppyPhraseQuery类来指定短语的顺序和跨度。
12. 使用Lucene的Intervals类来指定短语的位置和跨度。
13. 使用Lucene的SpanNotQuery类来排除指定的短语。
14. 使用Lucene的PhraseSlopQuery类来指定短语的位置和距离。
15. 使用Lucene的MultiPhraseQuery类来提取多个短语。
16. 使用Lucene的GraphQuery类来提取图形结构中的短语。
17. 使用Lucene的WildCardQuery类来匹配通配符模式的短语。
18. 使用Lucene的PrefixQuery类来匹配以指定前缀开头的短语。
19. 使用Lucene的RegexpQuery类来匹配正则表达式模式的短语。
20. 使用Lucene的BooleanQuery类来组合多个查询条件以提取短语。
如何安全的上网英语作文
In the digital age,the internet has become an integral part of our daily lives,offering a wealth of information and services at our fingertips.However,with the convenience comes the responsibility of ensuring our safety online.Here are some essential tips for staying safe while navigating the vast expanse of the internet:e Strong Passwords:Create complex passwords that are difficult to bine letters,numbers,and special characters to enhance security.2.Enable TwoFactor Authentication:Whenever possible,enable twofactor authentication 2FA for an extra layer of security.This typically involves a code sent to your mobile device in addition to your password.3.Keep Software Updated:Regularly update your operating system,web browsers,and antivirus software to protect against the latest threats.4.Be Wary of Phishing Attempts:Be cautious of emails,messages,or websites that ask for personal information or prompt you to click on suspicious links.Always verify the source before providing any information.5.Secure Your WiFi Network:Use a strong password for your WiFi network and consider using a network security key to prevent unauthorized access.e a Firewall:A firewall can help prevent unauthorized access to your computer and protect your personal information.7.Beware of Public WiFi:Avoid using public WiFi for sensitive transactions,such as online banking or shopping,as these networks can be less secure.8.Install Antivirus Software:Use reputable antivirus software to protect your device from malware and viruses.cate Yourself About Online Scams:Stay informed about common online scams and how to recognize them to avoid falling victim to them.10.Monitor Your Online Activity:Regularly review your online accounts for any unusual activity that could indicate a security breach.11.Limit Personal Information Shared Online:Be mindful of the information you share on social media and other online platforms,as it can be used by cybercriminals.e Secure Websites:Look for websites that use HTTPS instead of HTTP,as the S indicates a secure connection.13.Encrypt Your Data:Use encryption tools to protect sensitive data,especially when transferring files or using cloud storage services.14.Be Mindful of Downloads:Only download files from trusted sources and always scan files for malware before opening them.cate Children About Online Safety:If you have children,teach them about the importance of online safety and set guidelines for their internet use.By following these guidelines,you can significantly reduce the risk of falling victim to online threats and enjoy a safer online experience.Remember,staying vigilant and informed is key to maintaining your security in the digital world.。
有道x10批改作文
有道x10批改作文英文回答:To begin with, I would like to discuss the importanceof learning multiple languages. Learning a second language, such as English, not only enhances communication skills but also opens up a world of opportunities. For instance, being bilingual or multilingual can greatly improve job prospects, as many companies nowadays require employees who can communicate with international clients. Moreover, learninga new language allows us to connect with people fromdifferent cultures and gain a better understanding of their perspectives and traditions.Furthermore, learning a second language can also boost cognitive abilities. Studies have shown that bilingual individuals have better problem-solving skills and improved memory compared to monolingual individuals. This is because learning a new language requires mental flexibility and the ability to switch between different linguistic systems.Additionally, it has been found that bilingualism can delay the onset of age-related cognitive decline and reduce the risk of developing dementia.In addition to the cognitive benefits, being able to speak multiple languages also allows us to experience different cultures more deeply. When we learn a new language, we gain access to literature, music, films, and other forms of cultural expression that may not beavailable in our native language. This exposure todifferent cultural perspectives can broaden our horizons and enrich our lives. For example, reading a novel in its original language can provide a more authentic and nuanced understanding of the author's intentions and the cultural context in which the story is set.Moreover, being able to communicate in multiple languages can also facilitate travel and make the experience more enjoyable. When we visit a foreign country, being able to speak the local language can help us navigate through unfamiliar surroundings, interact with locals, and truly immerse ourselves in the culture. It allows us to gobeyond the typical tourist experience and connect with people on a deeper level. Additionally, speaking the local language can also help us avoid miscommunications and misunderstandings, ensuring a smoother and more pleasant travel experience.中文回答:首先,我想讨论学习多种语言的重要性。
如何用好电脑看书英语作文
As a high school student who has embraced the digital age, Ive found that using a computer to read books has become an integral part of my learning and leisure activities. The transition from traditional paper books to digital ones has been a significant shift, and Id like to share my experiences and insights on how to effectively utilize a computer for reading.Firstly, the convenience of using a computer for reading cannot be overstated. With a vast array of ebooks available online, I can access a librarys worth of literature with just a few clicks. This has been particularly beneficial for my academic studies, as I can quickly find and read scholarly articles and textbooks that are relevant to my coursework.Moreover, the search functionality of ebooks on a computer is a gamechanger. When I come across a term or concept that Im unfamiliar with, I can instantly search for it within the text or online, which saves a considerable amount of time compared to flipping through pages of a physical book.Another advantage of reading on a computer is the ability to annotate and highlight text. This feature has been invaluable for my notetaking during literature classes. I can easily highlight important passages and add my own comments or questions, which helps me to engage more deeply with the material and remember key points more effectively.However, there are also challenges associated with reading on a computer. One of the most common issues is eye strain, especially when reading forextended periods. To mitigate this, I make sure to take regular breaks and adjust the screen brightness and text size to reduce the strain on my eyes.Additionally, the abundance of distractions when using a computer can sometimes hinder my focus. To combat this, I use apps that block certain websites and notifications while Im reading, creating a more conducive environment for concentration.One of the most exciting aspects of reading on a computer is the ability to customize my reading experience. I can choose from various fonts, colors, and layouts to make the text more visually appealing and easier to read. This level of personalization is not possible with traditional books.Furthermore, Ive found that reading on a computer has opened up new opportunities for collaboration. For example, I can share my annotations and notes with classmates or teachers, facilitating more indepth discussions and learning.In terms of environmental impact, using a computer for reading is a more sustainable option. Ebooks reduce the need for paper, ink, and the resources required to produce and transport physical books.However, its important to acknowledge that not all books are available in digital format, and some people still prefer the tactile experience of holding a physical book. Balancing the use of both digital and traditional books can provide the best of both worlds.In conclusion, reading on a computer offers numerous benefits, including convenience, searchability, annotation capabilities, and customization. While there are challenges to overcome, such as eye strain and distractions, these can be managed with proper techniques and tools. As technology continues to advance, I believe that the digital reading experience will only improve, making it an even more valuable tool for learning and personal growth.。
用课桌写作业英语
When it comes to doing homework in English,using a desk can provide a structured and organized environment that is conducive to learning.Here are some detailed steps and tips on how to effectively use a desk for homework in English:1.Prepare Your Workspace:Clear your desk of any distractions.Make sure you have all the necessary materials such as textbooks,notebooks,pens,and a dictionary at hand.anize Your Materials:Keep your English books and notes in a specific order that makes it easy for you to find what you need e folders or binders to keep your papers organized.3.Set Up a Comfortable Posture:Sit up straight in your chair with your feet flat on the floor.This helps maintain focus and reduces strain on your back and neck.e a Planner or ToDo List:Write down the tasks you need to complete for your English homework.This could include reading assignments,writing essays,or studying for a test.5.Break Down Tasks:If you have a large assignment,break it down into smaller, manageable tasks.This makes the work seem less daunting and helps you track your progress.e a Timer:Set a timer for focused work periods,such as25minutes of work followed by a5minute break.This is known as the Pomodoro Technique and can improve concentration.7.Take Notes:While doing your homework,jot down important points,new vocabulary, or grammar rules.This will help reinforce what youve learned.8.Practice Writing:If your homework involves writing,practice your penmanship and try to write in complete sentences.This will improve your writing skills over time.e Online Resources:Utilize online dictionaries,grammar checkers,and language learning apps to help with your homework.There are many free resources available that can provide additional practice and explanations.10.Review and Edit:After completing your homework,review your work for any errors or areas that could be improved.Editing is an important part of the learning process.11.Ask for Help:If youre stuck on a particular question or concept,dont hesitate to askfor help from a teacher,tutor,or classmate.12.Stay Consistent:Make a habit of using your desk for English homework regularly. Consistency helps create a routine that can improve your study habits.13.Reflect on Your Progress:After completing your homework,take a moment to reflect on what youve learned and how you can apply it to future assignments.14.Store Your Work:Once your homework is done,store it in a safe place so you can easily find it when its time to submit it.By following these steps,you can make the most of your time at the desk and improve your English homework skills.Remember,practice and consistency are key to mastering any language.。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Discrete Mathematics 306(2006)2010–2015/locate/discNotePath extendability of claw-free graphs ଁYu Sheng a ,Feng Tian a ,Jianglu Wang b ,Bing Wei a ,c ,1,Yongjin Zhu aa Institute of Systems Science,Chinese Academy of Sciences,Beijing 100080,Chinab Department of Mathematics,Shangdong Normal University,Jinan 250014,Chinac Department of Mathematics,University of Mississippi,MS 38677,USAReceived 2June 2004;received in revised form 23February 2006;accepted 9March 2006Available online 14June 2006AbstractLet G be a connected,locally connected,claw-free graph of order n and x,y be two vertices of G .In this paper,we prove that if for any 2-cut S of G ,S ∩{x,y }=∅,then each (x,y)-path of length less than n −1in G is extendable,that is,for any path P joining x and y of length h(<n −1),there exists a path P in G joining x and y such that V (P )⊂V (P )and |P |=h +1.This generalizes several related results known before.©2006Elsevier B.V .All rights reserved.Keywords:Claw-free graphs;Detour;Locally connected;Path extendable1.Introduction and main resultsWe consider only finite,simple and connected graphs.For terminology and notation not defined here we refer to [2].Throughout this paper,let G be a graph of order n ,V (G)and E(G)denote,respectively,the vertex set and the edge set of G .For each vertex u of G ,the neighborhood N(u)of u is the set of all vertices adjacent to u .Set N [u ]=N(u)∪{u }.For S ⊆V (G),denote by G [S ]the subgraph of G induced by S .For convenience,let H u =G [N(u)].A vertex u of G is said to be locally connected if H u is connected.G is called locally connected if each vertex of G is locally connected.Generally,G is called locally k -connected if for each vertex u ,H u is k -connected.A connected,locally k -connected graph must be (k +1)-connected.The distance between two vertices x,y is denoted by d(x,y).A k -cut is a cut set containing k vertices.A path with end vertices x and y is called an (x,y)-path.An (x,y)-path P is extendable if there is an (x,y)-path P in G such that V (P )⊃V (P )and |V (P )|=|V (P )|+1.In this case we say also that P can be extended to P .An (x,y)-path is a hamiltonian path of G if it contains all the vertices of G .A graph G is said to be path extendable if for each pair of vertices x,y and for each nonhamiltonian (x,y)-path P in G ,P is extendable.A graph G is said to be hamiltonian if it has a cycle containing all the vertices of G .G is panconnected if each pair of distinct vertices x,y are joined by a path of length h for each h ,d(x,y) h n −1.A graph G is called claw-free if it has no induced subgraph isomorphic to K 1,3.ଁThis work is supported by NNSF of China.1Also supported in part by the Summer Research Grant of the College of Liberal Arts and the Faculty Research Program of the University of Mississippi.0012-365X/$-see front matter ©2006Elsevier B.V .All rights reserved.doi:10.1016/j.disc.2006.03.057Y.Sheng et al./Discrete Mathematics306(2006)2010–20152011Many results on hamiltonian properties of claw-free graphs have appeared during the last two decades.We refer the reader to a recent survey[5].In this paper,we are interested in some results involving the local connectivity of a claw-free graph.In1979,Oberly and Sumner[7]proved that every connected,locally connected,claw-free graph G of order n 3is hamiltonian.Clark[4]improved this result by showing that in a graph G satisfying the same condition, each vertex of G lies on a cycle of length from3to n inclusive.Under the condition that G is locally2-connected, Kanetkar and Rao[6]and Wang and Zhu[9]got stronger properties of G,respectively.Theorem1(Kanetkar and Rao[6]).Every connected,locally2-connected,claw-free graph is panconnected.Theorem2(Wang and Zhu[9]).Every connected,locally2-connected,claw-free graph is path extendable.The question is whether the locally2-connectedness can be replaced by locally connectedness without changing those properties of G.In[8],Sheng et al.proved the following result:Theorem3(Sheng et al.[8]).Let G be a connected,locally connected,claw-free graph of order n and x,y be any two vertices of G.If for any2-cut S,S∩{x,y}=∅,then x and y are joined by a path of length h for each h, d(x,y) h n−1.Theorem3generalized Theorem1and solved the following conjecture proposed by Broersma and Veldman:Conjecture4(Broersma and Veldman[3]).Let G be a connected,locally connected,claw-free graph of order at least 4.Then G is panconnected if and only if G is3-connected.In this paper,we show the following,which generalizes all results mentioned above:Theorem5.Let G be a connected,locally connected,claw-free graph of order n and x,y be any two vertices of G. If for any2-cut S,S∩{x,y}=∅,then each(x,y)-path of length less than n−1of G is extendable.It is easy to see that if for given two vertices x and y of a graph G,G contains(x,y)-paths of all possible lengths, then{x,y}must not be a2-cut.We will construct a connected,locally connected,claw-free graph G0to show that the condition“for any2-cut S,S∩{x,y}=∅”cannot be replaced either by“{x,y}is not a2-cut”or by“S∩{x}=∅”. G0is a graph consisting of three distinct complete graphs G1,G2and G3with|G i| 3for1 i 3,|G i∩G j|=1 for1 i<j 3and G1∩G2∩G3=∅.Obviously,G0is a connected,locally connected,claw-free graph.Takingx∈G3\(G1∪G2)and y∈G1∩G2,there is no hamiltonian(x,y)-path in G0.2.Several lemmasLet P=x1x2···x p be an(x1,x p)-path of G with an orientation from x1to x p.We let x i P x j,for1 i j p,be the subpath x i x i+1···x j,and x j P x i=x j x j−1···x i.We will consider x i P x j and x j P x i both as paths and as vertexsets.We put x−(P)i =x i−1,x+(P)i=x i+1,x−2(P)i=x i−2and x+2(P)i=x i+2.If there is no doubt about the path we onlywrite x−i,x+i,etc.We say that an(x,y)-path P is minimal if there is no(x,y)-path P in G such that V(P )⊂V(P). Let z be an internal vertex of an(x,y)-path P.If there exists a minimal(u1,u s)-path Q=u1u2···u s in H z such that u2=x,u s=z+(u2=y,u s=z−,resp.)and u1is the only vertex of Q not contained in P,then we call z an x-detour(a y-detour,resp.)vertex of P,and Q a(z,x)-detour(a(z,y)-detour,resp.)of P.In this case,we say also that P has a(z,x)-detour(a(z,y)-detour,resp.).By the definition,if Q is a(z,x)-detour or a(z,y)-detour of P then the order of Q is at least3.We emphasis that for any z∈V(G),the order of any minimal path in H z is at most4,if G is a claw-free graph.We will use the following lemmas which were proved in[8].Lemma1(Sheng et al.[8]).Let G be a claw-free graph,P be an(x,y)-path of G and z be an internal vertex of P with N(z) V(P).If P is not extendable and z is a locally connected vertex,then P has a(z,x)-detour or a(z,y)-detour.2012Y.Sheng et al./Discrete Mathematics306(2006)2010–2015Lemma2(Sheng et al.[8]).Let G be a claw-free graph,P be an(x,y)-path which has a(z,x)-detour Q=u1u2···u s. If P is not extendable,then we have(1)x+u3∈E(G),s=4and u3∈x+2P z−.(2)u+3z+∈E(G).(3)if u3=z−,then u3z−∈E(G).Lemma2 (Sheng et al.[8]).Let G be a claw-free graph,P be an(x,y)-path which has a(z,y)-detour Q=u1u2···u s. If P is not extendable,then we have(1)x+u3∈E(G),s=4and u3∈z+Py−2.(2)u−3z−∈E(G).(3)if u3=z+,then u3z+∈E(G).Lemma3(Sheng et al.[8]).Let G be a claw-free graph,P be an(x,y)-path.If P has two x-detour vertices or y-detour vertices,then P is extendable.Lemma4(Sheng et al.[8]).Let G satisfy the conditions of Theorem5and P be an(x,y)-path of length k,3 k n−2. If N(x)⊆V(P)or N(y)⊆V(P),then P is extendable.By using a result of Bedrossian in[1],we can obtain the followingLemma5.Let x be a vertex of a claw-free graph G,A⊆N(x).If G[A]is connected,then either A can be parti-tioned into two subsets A1and A2such that G[A1],G[A2]are complete,possibly with edges in between,or G[A]is hamiltonian.Moreover,if v∈A is not a cut vertex of G[A],then there is a hamiltonian(x,v)-path in G[A∪{x}].3.Proof of Theorem5We prove the theorem by contradiction.Suppose that G satisfies the conditions of Theorem5and there exists an(x,y)-path P which is not extendable.Since G is connected and locally connected,we have|V(P)| 3.Set Z={z|N(z) V(P),z is an internal vertex of P}.By the assumptions of Theorem5,G\{x,y}is connected,and so there exists a vertex z1∈Z.By Lemma1,there is a(z1,x)-detour or(z1,y)-detour of P.Without loss of generality, we assume that there exists a(z1,x)-detour uxwz+1by Lemma2.We can assume that w=z−1,otherwise by Lemma2,we consider P0=xP wz1P w+z+1Py instead of P.Obviously,V(P0)=V(P)and xz−(P0)1(=xw)∈E(G).By Lemma2(3),we have z−(P0)1z+(P0)1(=wz−(P)1)∈E(G),and hence z1is an x-detour vertex of P0.First we show some claims.Claim1.|Z| 2.Proof.By Lemma1,for each z∈Z,P has a(z,x)-detour or a(z,y)-detour,that is to say z is an x-detour vertex or a y-detour vertex of P.If|Z| 3,then P has two x-detour vertices or two y-detour vertices.By Lemma3,P is extendable,a contradiction.Thus|Z| 2.Claim2.N(x+)∩N(u)∩N(x)⊆{y}.Proof.If not,then there exists a vertex v=y such that vx+,vu,vx∈E(G).It is obvious that v∈V(P),otherwise P is extendable in using v,a contradiction.Thus v∈Z,and hence v−v+∈E(G).So P can be extended to xuvx+P v−v+Py,a contradiction.Claim3.Let B1=(N[u]∩N(x))\{y},B2=(N[x+]∩N(x))\{y}.Then B1,B2have the following properties:(1)N(x)\{y}can be partitioned into B1,B2.(2)The graphs G[B1]and G[B2]are complete.Y.Sheng et al./Discrete Mathematics 306(2006)2010–20152013Proof.(1)By Claim 2,we know B 1∩B 2=∅.Clearly,we have ux +/∈E(G),otherwise P is extendable in using u ,a contradiction.If B 1∪B 2=N(x)\{y },then there is a vertex u such that u ∈N(x)\{y }and uu ,x +u /∈E(G),and hence the set {x,u,u ,x +}induces K 1,3,a contradiction.So B 1∪B 2=N(x)\{y }and (1)holds.(2)Assume that there exist v 1,v 2∈B 2with v 1v 2/∈E(G).Since P is not extendable,by Claim 2,we can easily derive that the induced subgraph G [{x,v 1,v 2,u }]is a claw,a contradiction.Thus G [B 2]is complete.Similarly,G [B 1]is complete.Claim 4.There is an (x,y)-path P such that V (P )⊆V (P )\{z −1,z 1}and |V (P )| 3,and moreover we have y −(P )=y −(P )if z 1=y −(P ).Proof.By the assumptions of Theorem 5,{x,z −1}is not a 2-cut,and hence G \{x,z −1}is connected.Note that x +P z −21=∅,since otherwise P can be extended to xuz 1z −1z +1Py .Thus,there is a path R =v 1v 2···v m in G \{x,z −1}such that V (R)∩(x +P z −21)={v 1},V (R)∩(z 1Py)={v m }.Case 1.N(v 1) V (P ).Note that z 1is an x -detour vertex of P .By Lemmas 1and 3,v 1is a y -detour vertex of P .And by Lemma 2 ,P has a (v 1,y)-detour Q =vyw v −1in H v 1,where w ∈v +1Py −.If z 1=y −,then xP v 1y is the required path.So in the rest of the proof,we assume that z 1=y −.If w ∈z +1Py −,then P =xP v −1w Py is the required path.If w ∈v +1P z −21,we can get w y −∈E(G)by the fact that z 1,v 1∈Z and |Z | 2and considering G [{y,v,y −,w }].And hence P =xP w y −y is the required path.If w =z 1,then v 1u /∈E(G),since otherwise P can be extended to xP v −1z 1(=w )uv 1P z −1z +1Py .It is obvious that uz +1/∈E(G).We get v 1z +1∈E(G)by considering G [{z 1(=w ),z +1,v 1,u }].Then P =xP v 1z +1Py is the required path.If w =z −1,we have z −1v(=w v)/∈E(G),since Q is a minimal path joining v and v −1.Considering G [{y,v,y −,z −1}],we have z −1y −∈E(G).Considering G [{x,x +,u,z −1}],we have z −1x +∈E(G).It is obvious that z −1v 1(=w v 1)∈E(G).We have x +=v 1,otherwise P can be extended to xuz 1Py −z −1P x +(=v 1)y ;and we have x +v 1/∈E(G),since otherwise P can be extended to xuz 1Py −z −1P v +1v −1P x +v 1y .Now we consider G [{z −1,x +,v 1,y −}],either x +y −∈E(G)or v 1y −∈E(G),and hence either P =xx +y −y or P =xP v 1y −y is the required path.Case 2.N(v 1)⊆V (P )(i.e.m =2).If v 2=z 1,then v 1z +1∈E(G),because z 1u,z 1v 1,z 1z +1∈E(G)and uz +1,uv 1/∈E(G).So we can let P =xP v 1z +1Py .If v 2=y and z 1=y −,let P =xP v 1y .If v 2=y and z 1=y −,we get v 1y −∈E(G)by considering G [y,v,y −,v 1],we know that there exists v ∈N(y)\V (P )by Lemma 4.Then P =xP v 1y −y is the required path.If v 2=z 1and v 2=y then P =xP v 1v 2Py is the required path.In all cases above we have |P | 3obviously.The proof of Claim 4is complete.Since |V (P )| 3,there is a vertex x ∈N(x)∩(x +(P )P y −(P ))such that vx /∈E(G)for each v ∈(x )+(P )P y −(P).Let P ∗=xx P y .Let A 1=N(x)∩N [u ]∩(Z ∪{u }),A 2=N(x)∩N [x +]∩(V (P )\{y })and A =A 1∪A 2.Clearly,we have x ∈(V (P )∩N(x))\{y }.By Claim 3(1),we can get x ∈A .By Claim 3(2),G [A 1]and G [A 2]are complete.Note that z 1∈A 1,z −(P )1∈A 2and x /∈{z 1,z −(P )1}.Thus G [A ]is connected and x is not a cut vertex of G [A ].By Lemma 5,there is a hamiltonian (x,x )-path H of G [{x }∪A ].Let P 1=xH x P ∗y .Note that x =y .By Claim 4,if y −(P )=z 1,then y −(P )=y −(P )(=y −(P ∗)),and hence y −(P )∈x P ∗y ;if y −(P )=z 1,then we have y −(P )∈A 1.So we always have y −(P )∈V (P 1).It is obvious that N(x)∩V (P )⊆N(x)∩V (P 1)and |V (P 1)\V (P )|=|{u }|=1.Let P 2be an (x,y)-path such that(1)N(x)∩V (P )⊆N(x)∩V (P 2),y −(P )∈V (P 2)and |V (P 2)\V (P )|=1;(2)subject to (1),|V (P )\V (P 2)|is as small as possible.2014Y.Sheng et al./Discrete Mathematics 306(2006)2010–2015Let {a }=V (P 2)\V (P )and S =V (P )\V (P 2).It is easy to see that S =∅,since otherwise P can be extended to P 2,a contradiction.Since N(x)∩V (P )⊆N(x)∩V (P 2),we get S ∩N(x)=∅.We have x +(P )∈V (P 2)by x +(P )∈N(x)∩V (P ).Since x +(P ),y −(P )∈V (P 2),there exist u 1,u 1∈S (possibly,u 1=u 1)such that u 1∈xP u 1and u −(P )1,u 1+(P )are two distinct internal vertices of P 2.Set u −(P )1=w 1,u 1+(P )=w 2.Since w 1,w 2are two locally connected vertices in G ,there exist two minimal paths Q 1=u 1u 2···u t in H w 1and Q 2=u 1u 2···u t in H w 2,suchthat u t =w −(P 2)1,u t =w −(P 2)2.Note that u 1∈V (P )and w 1=u −(P )1,so we have u 2∈V (P ),since otherwise P can be extended to xP u −(P )1(=w 1)u 2u 1Py ,a contradiction.Similarly,we have u 2∈V (P ).Claim 5.|V (P 2)| 6.Proof.We have x +(P )=z −(P )1,otherwise P can be extended to xuz 1x +(P )(=z −(P )1)z +(P )1Py .Note that xx +(P ),xz −(P )1,xz 1∈E(G)and N(x)∩V (P )⊆N(x)∩V (P 2).Now we have {x,y,a,z 1,z −(P )1,x +(P )}⊆V (P 2),Thus Claim 5holds.Claim 6.V (Q 1)⊆V (P )∪{a },V (Q 2)⊆V (P )∪{a }.Proof.Suppose that V (Q 1) V (P )∪{a }.Since u 1,u 2∈V (P ),u t ∈V (P 2)and t 4,we have u 3/∈V (P )∪{a }.Then there exist two vertices a,u 3/∈V (P ).Next we show that there exist three internal vertices of P which are contained in N(a)∪N(u 3),which contradicts Claim 1.Considering G [{w 1,u 1,u 3,w +(P 2)1}],by the minimality of Q 1and the choice (2)of P 2,we have u 3w +(P 2)1∈E(G).So w 1,u 2,w +(P 2)1,w −(P 2)1∈N(u 3).Thus {w 1,u 2,w +(P 2)1,w −(P 2)1,a −(P 2),a +(P 2)}⊆Z ∪{x,y,a }.Note that w 1(=u −(P )1)and w 2(=u 1+(P ))are two internal vertices of P .Thus w 1,w 2∈Z .Case 1.u 2=y .In this case,u 2is an internal vertex of P ,and hence u 2∈Z .Note that |Z | 2and w 1∈Z and w 1=u 2.By the choice (2)of P 2,we have u 2/∈{w +(P 2)1,w −(P 2)1}.Thus {w +(P 2)1,w −(P 2)1}⊆{x,y,a }.By Claim 5,we have {w −(P 2)1,w +(P 2)1}={x,y }.If w −(P 2)1=x,w +(P 2)1=a ,then a +(P 2)is an internal vertex of P by Claim 5,and hence a +(P 2)∈Z .We have u 2=a +(P 2),since otherwise let P 3=xu 3w 1u 1w +2(P 2)1(=u 2)P 2y ,which satisfies (1)and contradicts the choice (2)of P 2.Thus w 1,u 2,a +(P 2)are three distinct vertices of Z ,a contradiction.Similarly,if w −(P 2)1=a,w +(P 2)1=y ,then w 1,u 2,a −(P 2)are three distinct vertices of Z ,a contradiction.Case 2.u 2=y and u −(P 2)2=a .For G [{y,u 1,u 3,y −(P 2)}],we have u 3y −(P 2)∈E(G).Then w 1,y −(P 2)∈Z .We have w +(P 2)1=y −(P 2),sinceotherwise let P 3=xP 2w −(P 2)1y −(P 2)(=w +(P 2)1)w 1u 1y ,which contradicts the choice (2)of P 2.So {w −(P 2)1,w +(P 2)1}⊆{x,y,a },and hence w −(P 2)1=x,w +(P 2)1=a .Clearly,we have a +(P 2)∈Z and a +(P 2)=y −(P 2)by Claim 5,and hencew 1,y −(P 2),a +(P 2)are three distinct vertices of Z ,a contradiction.Case 3.u 2=y and u −(P 2)2=a .If w −(P 2)1=x ,then w 1,w +(P 2)1,a −(P 2)are three distinct vertices of Z by Claim 5,a contradiction.Thus w −(P 2)1is an internal vertex of P ,and hence w −(P 2)1∈Z .Since w 1∈Z ,we have w +(P 2)1=a =y −(P 2).Let P 3=xP 2w −(P 2)1y −(P 2)(=w +(P 2)1=a)w 1u 1y(=u 2),which contradicts the choice (2)of P 2.Similarly we have V (Q 2)⊆V (P )∪{a }. Now,we are ready to prove Theorem 3.Set G =G [V (P 2)∪V (Q 1)∪V (Q 2)].It is obvious that G is a connected claw-free graph,and V (G )⊆V (P )∪{a }by Claim 6.If w 1is not locally connected in G ,then G [N(w 1)∩V (G )]Y.Sheng et al./Discrete Mathematics306(2006)2010–20152015consists of two complete components.Thus u1w−(P2)1∈E and P2can be extended through u1,a contradiction.Thusw1is a locally connected vertex in G .Similarly,we have that w2is a locally connected vertex in G .Note that V(G )⊆V(P2)∪S and S∩N(x)=∅.By Lemma1,we know that w1,w2are two y-detour vertices of P2in G .By Lemma3,P2is extendable in G ,which contradicts the choice(2)of P2.Therefore,the proof of Theorem5is complete.Note.The main results of this paper are obtained independently by Sheng,Tian,Wei and by Wang,Zhu.Therefore, we put the two separate papers into this one.AcknowledgmentsMany thanks to the referees for their valuable suggestions and comments.References[1]P.Bedrossian,Forbidden subgraph and minimum degree conditions for hamiltonicity,Ph.D.Thesis,Memphis State University,1991.[2]J.A.Bondy,U.S.R.Murty,Graph Theory with Applications,Macmillan,London and Elsevier,New York,1976.[3]H.J.Broersma,H.J.Veldman,3-Connected line graphs of triangular graphs are panconnected and1-hamiltonian,J.Graph Theory11(1987)399–407.[4]L.Clark,Hamiltonian properties of connected,locally connected graphs,Congr.Numer.32(1981)199–204.[5]R.J.Faudree,E.Flandrin,Z.Ryjácek,Claw-free graphs—a survey,Discrete Math.164(1997)87–147.[6]S.V.Kanetkar,P.R.Rao,Connected locally2-connected K13-free graphs are panconnected,J.Graph Theory8(1984)347–353.[7]D.J.Oberly,D.P.Sumner,Every connected,locally connected nontrivial graph with no induced claw is hamiltonian,J.Graph Theory3(1979)351–356.[8]Y.Sheng,F.Tian,B.Wei,Panconnectivity of locally connected claw-free graphs,Discrete Math.203(1999)253–260.[9]J.L.Wang,Y.J.Zhu,Path extensibility of connected locally2-connected K1,3-free graphs,Systems Sci.Math.Sci.10(1997)267–274.。