text
stringlengths
454
608k
url
stringlengths
17
896
dump
stringclasses
91 values
source
stringclasses
1 value
word_count
int64
101
114k
flesch_reading_ease
float64
50
104
This chapter includes the following sections: A Cisco UCS 6200 series fabric interconnect is a top-of-rack fabric interconnect that provides Ethernet and Fibre Channel to all servers in the UCS system. Servers connect to the fabric interconnect, and it connects to the LAN or SAN. This family of fabric interconnects connect UCS servers to 10 Gigabit Ethernet 1, 2, 4, and 8 Gbps Fibre Channel networks, and provides consolidated I/O connectivity to both production Ethernet LANs and Fibre Channel SANs in a cost-effective, high-performance, low-latency environment. The Cisco UCS 6200 series has the following characteristics: The UCS 6248 UP fabric interconnect is a one-rack-unit (1 RU), 10-Gigabit Ethernet and FCoE device that offers up to 960-Gbps throughput and up to 48 ports. It has 32 1- or 10-Gbps fixed small form-factor pluggable plus (SFP+) ports and one expansion slot. The Cisco UCS 6248 UP has 32 ports on the base system and can be upgraded with one expansion module providing an additional 16 ports. The UCS 6296 UP fabric interconnect is a two-rack-unit (2 RU), 10-Gigabit Ethernet and FCoE device that offers up to 1920-Gbps throughput and up to 96 ports. It has 48 1- or 10-Gbps fixed SFP+ ports and three expansion slots. The Cisco UCS 6248 UP has 48 ports on the base system and can be upgraded with three expansion modules providing an additional 48 ports. Universal port functionality allows Ethernet or Fibre Channel over Ethernet (FCoE) physical port types to be selected in software. Slots on the back of the switch for an expansion module. You can use the UCS EIGUP module. Slots on the front of the chassis for hot swap-capable power supplies. Slots on the front of the chassis for fan modules. One USB port at the front of the switch. The Cisco UCS 6248 UP chassis is 1 RU, 1.72 inches tall, 17.3 inches wide and 30.0 inches deep. It mounts in a standard 19-inch rack (the Cisco R Series rack is an ideal choice). The chassis has two power supplies and two fan modules on the front of the chassis, and it has network ports on the rear of the chassis and has one USB port (usb1:) at the front. Thirty-two fixed 10-Gigabit Ethernet ports and an expansion modules slot supporting 16 ports are at the rear of the switch. The airflow is front to back. The rear of the Cisco UCS 6248 UP chassis has 32 fixed 10-Gigabit, Fiber Channel over Ethernet-capable SFP+ Ethernet ports and 1 slot for an optional expansion module. The front connector ports are in a 2x2 stacked RJ-45 jack. The Cisco UCS 6296 UP chassis is 2 RU or 3.47 inches (8.8 cm) tall, 17.3 inches (43.9 cm) wide, and 29.5 inches (74.9 cm) deep. It is designed to be mounted in a standard 19-inch wide rack. The front of the switch has a USB port, four Ethernet and ports (two cross-connect ports, one management port, and one console port), two power supplies, and four fan modules. The management and console ports are in a 2 x 2 stacked RJ-45 jack. The rear of the Cisco UCS 6296 UP chassis has 48 fixed 10-Gigabit Ethernet data ports on the bottom and three slots for optional expansion modules on top.. The Cisco UCS 6296 has three slots for an optional expansion module. Only the 16-port UCS E16UP hot-pluggable expansion module using the small form factor pluggable plus (SFP+) interface is supported. Each individual port is numbered, and groups of ports are numbered based on their function. The ports are numbered top to bottom and left to right. There are 32 to 48 ports on the Cisco UCS 6248 UP, depending on whether an expansion module is installed. Each individual port is numbered, and groups of ports are numbered based on their function. The ports are numbered from top to bottom and left to right. Each port on the Cisco UCS 6296 UP is numbered, and groups of ports are numbered based on their function. The ports are numbered top to bottom and left to right. The 48 fixed ports support 8-, 4-, 2-, or 1-Gbps Fibre Channel transceivers and 1- or 10-Gigabit Ethernet transceivers. When you configure the links between the Cisco UCS 2200 Series FEX and a Cisco UCS 6200 series fabric interconnect in fabric port channel mode, the available virtual interface namespace (VIF) on the adapter varies depending on where the FEX uplinks are connected to the fabric interconnect ports. Inside the 6248 fabric interconnect there are six sets of eight contiguous ports, with each set of ports managed by a single chip. When all uplinks from an. For high availability cluster-mode applications, we strongly recommend symmetric cabling configurations.. The fabric interconnect uses a front-end power supply. The chassis has slots for two power supplies. Two power supplies can be used for redundancy, but the fabric interconnect is fully functional with one power supply. Power supplies have two LEDs: one for power status and one for failure condition. If one power supply is installed in the chassis, but the other power supply slot is empty, a blank filler panel (N10-S1BLKP=) should be used to cover the empty slot. The Cisco UCS 6248 UP fabric interconnect has slots for two fan modules (also called fan trays). Each fan module houses four fans. The combination of four fans per module and two modules provides the chassis with eight fans. The Cisco UCS 6296 UP switch has four fan modules with one fan each. The bicolor fan module LED indicates fan tray health. Green indicates normal operation, while amber indicates a fan failure. The fabric interconnect has three chassis status LEDs. There are port activity LEDs on the chassis and on the expansion modules. The fabric interconnect supports SFP+ Ethernet transceivers, SFP transceivers, and SFP Fibre Channel transceivers. Specifications for these transceivers are at this URL: The high bandwidth of 10-Gigabit Ethernet poses challenges to transmissions that are met by the transceiver and cabling options supported by the Cisco UCS 6200 platform. The enhanced SFP+ 10-Gigabit Ethernet transceiver module is a bidirectional device with a transmitter and receiver in the same physical package. It has a 20-pin connector on the electrical interface and duplex LC connector on the optical interface. The SFP 1 -Gigabit Ethernet transceiver module is a bidirectional device with a transmitter and receiver in the same physical package. Copper cables are available for use with the 10-Gigabit Ethernet SFP+ module. On the Cisco UCS 6200 platforms, you can use an innovative Twinax copper cable that connects to standard SFP+ connectors for in-rack use, and on optical cable for longer cable runs. For in-rack or adjacent-rack cabling, the Cisco UCS 6200 platform supports SFP+ direct-attach 10-Gigabit Ethernet copper, which integrates transceivers with Twinax cables into an energy efficient, low-cost, and low-latency solution. SFP+ direct-attach 10-Gigabit Twinax copper cables use only 0.1 watts of power per transceiver and introduce only approximately 0.25 microsecond of latency per link. For longer cable runs, the Cisco UCS 6200 platform supports multimode, short-reach optical SFP+ transceivers. These optical transceivers use approximately 1 W per transceiver and have a latency of less than 0.1 microsecond. The Cisco UCS 6200 series fabric interconnects support multimode 850 nm 4 Gbps and 8 Gbps SFPs with 150 m reach.
http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/hw/6200-install-guide/6200_HIG/6200_HIG_chapter_01.html
CC-MAIN-2017-04
refinedweb
1,275
63.9
We’ve formulated this post to cover some of the trickiest Python questions and answers. Read all of them carefully to get familiar with the latest questions asked during Python interviews. Also, please note that a good interviewer prepares himself before taking up any interview as per the job requirements. And most of the time, they will ask questions to evaluate your practical Python knowledge. So apart from the core understanding of the subject, you should emphasize more on the application part to find the right edge in the interview. Don’t stick yourself to only reading books or watching online tutorials. Instead, read Python questions and answers directed towards interviews. These efforts of yours will help you in getting the desired job profile of Python developer or a web development engineer working in Python Django. Now, you can begin reading the questions/answers given in the below section. All of these are related to the application of Python and would test your scripting skills of the language. - What is the function to randomize the items of a list in-place? - What is the best way to split a string in Python? - What is the right way to transform a Python string into a list? - How does exception handling in Python differ from Java? Also, list the optional clauses for a “try-except” block in Python? - What do you know about the “list” and “dict” comprehensions? Explain with an example. - What are the methods you know to copy an object in Python? - Can you write code to determine the name of an object in Python? - Can you write code to check whether the given object belongs to a class or its subclass? - What is the result of the following Python program? - What is the result of the below lines of code? - What is the result of the below Python code? - How would you produce a list with unique elements from a list with duplicate elements? - Can you iterate over a list of words and use a dictionary to keep track of the frequency(count) of each word? Consider the below example. - What is the result of the following Python code? - Can you describe what’s wrong with the below code? Top 15 Python Questions and Answers for Experienced. Python Questions and Answers for Experienced Q-1. What is the function to randomize the items of a list in-place? Ans. Python has a built-in module called as <random>. It exports a public method <shuffle(<list>)> which can randomize any input sequence. Q-2. What is the best way to split a string in Python? Ans. We can use Python <split()> function to break a string into substrings based on the defined separator. It returns the list of all words present in the input string. Program Output. Q-3. What is the right way to transform a Python string into a list? Ans. In Python, strings are just like lists. And it is easy to convert a string into the list. Simply by passing the string as an argument to the list would result in a string-to-list conversion. Program Output. Q-4. How does exception handling in Python differ from Java? Also, list the optional clauses for a <try-except> block in Python? Ans. Unlike Java, Python implements exception handling in a bit different way. It provides an option of using a <try-except> block where the programmer can see the error details without terminating the program. Sometimes, along with the problem, this <try-except> statement offers a solution to deal with the error. There are following clauses available in Python language. 1. try-except-finally 2. try-except-else Q-5. What do you know about the <list> and <dict> comprehensions? Explain with an example. Ans. The <List/Dict> comprehensions provide an easier way to create the corresponding object using the existing iterable. As per official Python documents, the list comprehensions are usually faster than the standard loops. But it’s something that may change between releases. The <List/Dict> Comprehensions Examples. #List Comprehension Both the above example would yield the same output. Q-6. What are the methods you know to copy an object in Python? Ans. Commonly, we use <copy.copy()> or <copy.deepcopy()> to perform copy operation on objects. Though not all objects support these methods but most do. But some objects are easier to copy. Like the dictionary objects provide a <copy()> method. Example. Q-7. Can you write code to determine the name of an object in Python? Ans. No objects in Python have any associated names. So there is no way of getting the one for an object. The assignment is only the means of binding a name to the value. The name then can only refer to access the value. The most we can do is to find the reference name of the object. Example. Q-8. Can you write code to check whether the given object belongs to a class or its subclass? Ans. Python has a built-in method to list the instances of an object that may consist of many classes. It returns in the form of a table containing tuples instead of the individual classes. Its syntax is as follows. The above method checks the presence of an object in one of the classes. The built-in types can also have many formats of the same function like <isinstance(obj, str)> or <isinstance(obj, (int, long, float, complex))>. Also, it’s not recommended to use the built-in classes. Create an user-defined class instead. We can take the following example to determine the object of a particular class. Example. Q-9. What is the result of the following Python program? Ans. The example code is as follows. The output of the above code is <[6, 6, 6, 6]>. It’s because of the late binding as the value of the variable <index> gets looked up after a call to any of multiplexers functions. Q-10. What is the result of the below lines of code? Here is the example code. Ans. The above code will give the following result. The function <fast> evaluates its arguments only once after the function gets defined. However, since <items> is a list, so it’ll get modified by appending a <1> to it. Q-11. What is the result of the below Python code? Ans. The above code will produce the following result. In Python, while performing string slicing, whenever the indices of both the slices collide, a <+> operator get applied to concatenates them. Q-12. How would you produce a list with unique elements from a list with duplicate elements? Ans. Iterating the list is not a desirable solution. The right answer should look like this. Q-13. Can you iterate over a list of words and use a dictionary to keep track of the frequency(count) of each word? Consider the below example. Ans. Please find out the below code. Q-14. What is the result of the following Python code? Ans. All print statement will display <1>. It’s because the value of object’s attribute(x) is never changing. Also, <x> becomes a part of the public members of class Test. Hence, it can be accessed directly. Q-15. Can you describe what’s wrong with the below code? Ans. The above code would throw a <NameError>. The variable n is local to the function <testProc> and can’t be accessed outside. So, printing it won’t be possible. Summary – Top 15 Python Questions and Answers for Experienced. So it was one of the posts where we took up an essential topic for Software engineers. Also, Python programming is becoming more and more relevant for the automation testing. That’s why we came up with this blog post on the top Python questions and answers for experienced engineers.. can you help he to write python script for getting the information from build queue list from jenkins. i new on python..so i m getting stuck with it. if any one know how to write python please do let me know. For accessing Jenkins from Python, you need to make use of python-jenkinslibrary. Below is a sample code to access the build queue of a Jenkins job. // Sample code to retrieve build queue of a Jenkins job import jenkins server = jenkins.Jenkins(‘′, username=’myuser’, password=’mypassword’) server.build_job(‘your job’) queue_info = server.get_queue_info() print queue_info
http://www.techbeamers.com/python-interview-questions-experienced/
CC-MAIN-2017-17
refinedweb
1,410
76.62
Objectives - Our first 4-digit numeric display. - Multiplexing the digits. - Learning to program: splitting the problem into functions. - Back to operations with integers. BILL OF MATERIALS 4-DIGIT LED DISPLAYS In the previous chapter we saw how to use a 4-digit display assembling all the electronics by ourselves. We saw that the thing worked pretty well, and saw that we didn’t realize the trick of multiplexing the digits because in general Duinos are fast enough. But what we certainly realized was how hard it is to assemble this circuit on a breadboard, the amount of wires that we have to connect and how easy it is to make mistake or inadvertently leave some wire unconnected. In practice this system is used only for the students to learn to suffer, but in the real world it is much better to use a display with an integrated control system, which is a little more expensive, but doesn’t show none of the already mentioned problems. Actually, they are so simple that do not usually have more than 4 pins and are directly controlled by software. Today I am going to introduce a tiny display, but very awesome, that has been lying around on the table for some time and I love it. It is a 4-digit display made by Catalex, a Chinese manufacturer, that is controlled via those 4 pins that we previously stated (two of them are Vcc and GND), has a very simple library and can be powered with both 5V and 3.3V. - I hope to receive one of these I2C displays soon (although we have not spoken of the I2C bus, but we will do it soon) and then we will make a chapter on the subject… CIRCUIT WIRING DIAGRAM The wiring of these displays is disturbingly simple: After connecting Ground and Vcc there are only two wires left: DIO, Data Input Output, and Clock, which we will connect to pins 2 and 3, respectively. And that’s all, folks! THE CONTROL PROGRAM The manufacturer of the display provides a library so we can forget the multiplexing and other stories:DigitalTube.zip We download and install it, as we saw in the chapter Getting to know servos, Then go to Sketch – > Include library and select the file you have just downloaded to be installed. And in the list of libraries that appear in the drop-down, choose DigitalTube. You will see that the following line will be included in your sketch: #include <TM1637.h> It is an awful name for a library, we know it. To use it, we have to assign a couple of Arduino pins for the CLK signal and DIO: #define CLK 3//pins definitions for TM1637 and can be changed to other ports #define DIO 2 Now we need to create an instance of the object type TM1637, that we have called Display1, and pass it the pins that control communication: TM1637 Display1(CLK,DIO); And now the manufacturer asks us to send it the digits to represent as an unsigned 4 byte array defined as a rare type int8_t, but you do not need to worry about it: int8_t Digits[] = {3,2,1,2}; In this case the display will show 3212. And now we have to initialize the library and the display. void setup() { Display1.set(); Display1.init(); } And now we only have to ask it to print the Digits[] array: Display1.display(Digits); And that’s all. By sheer laziness I write the entire program for you to see the difference:Sketch 40.1 #include "TM1637.h" #define CLK 3 #define DIO 2 TM1637 Display1(CLK,DIO); int8_t Digits[] = {5,2,1,2}; void setup() { Display1.set(); Display1.init(); } void loop() { Display1.display(Digits); } Let’s now make the counter example from the previous chapter to see how it looks. Let’s start with definitions #include "TM1637.h" #define CLK 3 #define DIO 2 TM1637 Display1(CLK,DIO); int8_t Digits[] = {7,6,5,4}; // Initial value void setup() { Display1.set(); Display1.init(); } Let’s use a counter to see its value in the display, so we will need to split the digits of the value and put them in the Digits array. To do this we will recover the CalculateDigits() function from the previous chapter and add some minor modification:Sketch 40.2 void CalculateDigits( int Num) { int8_t Digit0 = Num %10 ; int8_t Digit1 = (Num % 100) / 10 ; int8_t Digit2 = (Num % 1000) / 100 ; int8_t Digit3 = Num / 1000 ; Digits[3] = Digit0 ; Digits[2] = Digit1 ; Digits[1] = Digit2 ; Digits[0] = Digit3 ; Display1.display(Digits); } We calculate the digits and put them in the array, then simply call the display method (in lowercase) of the Display object (in capital letters). And to calculate the number we do the following: void loop() { for (int i = 0 ; i<10000 ; i++) { CalculateDigits(i); delay(100); } } SUMMARY - We have introduced the 4-digit 7-segment LED display from Catalex, which uses a proprietary (and undocumented) bus but as it works, I can almost forgive him. - We have modified our CalculateDigits() function, for we can use it with this display or others that require separated digits. - The virtue of this type of display or digital tube is the ease of connection and management using the library. Give a Reply
http://prometec.org/displays/display-with-interface/
CC-MAIN-2021-49
refinedweb
881
58.01
Customizing Fields in ASP.Net Dynamic Data Website - Part 2 Re-Cap Dynamic data website is a new feature released with ASP.Net 3.5. This new feature allows us to develop a fully operational data driven websites very easily. Read the following articles to know more, Introduction to ASP.Net Dynamic Data Websites Creating Custom Pages in ASP.Net Dynamic Data Website We have started an article series “Customizing Fields in ASP.Net Dynamic Data Website” to customize the fields displayed in ASP.Net Dynamic data website. In part 1 of this article series, we have seen how to customize an existing field template. We will continue the article series with part 2 to include a new field template for a datatype that can be used only at specific places. For example, if we want to display the Boolean field as “Yes” or “No” at some specific places and make the rest of the website to use the default template that uses CheckBox control to display the Boolean field. To have an easy understanding, we will use the same data model we used in my previous articles. We already have a Boolean field called IsTemporaryEmployee in Employee table. Apart from this, we will include one more new Boolean field in Employee table called HasPassport to understand this article. Moving forward, we will include a new field template and configure it so that the new Boolean field template is used for HasPassport field while the other Boolean field still uses the default. Something like below, Steps 1. Open Visual Studio 2008. 2. Click New> Website and Select “Dynamic Data Web Site”. You can select the language of your choice, rename the project name and click OK. The solution will have some files created automatically by default. 3. Include a new SQL express database inside App_Data folder and create a table called Employees and Department. Note Use "Server Explorer" in Visual Studio to do this easily. Right click your new Database in App_Data folder and select Open to view your database in Server Explorer. Now, create a table called Employees and Department with the necessary columns. Refer the below figure. 4. Design your LINQ to SQL classes. Refer Part 1 to know more. I have named my Data Context class as EmployeeDataClasses. Click Add. 5. Open Server Explorer, Expand the database tables. Drag Employee and Department into LINQ to SQL designer. The LINQ to SQL Objects will be created automatically. Click Save. Refer the below figure. 6. On Application_Start event of your Global.asax file, you can see a method called RegisterRoutes() which is defined in Global.asax file. Refer the below code. public static void RegisterRoutes(RouteCollection routes) { MetaModel model = new MetaModel(); // IMPORTANT: DATA MODEL REGISTRATION // Uncomment this line to register LINQ to SQL classes or an ADO.NET Entity Data // model for ASP.NET Dynamic Data. Set ScaffoldAllTables = true only if you are sure // that you want all tables in the data model to support a scaffold (i.e. templates) // view. To control scaffolding for individual tables, create a partial class for // the table and apply the [Scaffold, } In the above auto generated code, just uncomment the first line of code (bolded). Update the “YourDataContextType” on the above code with your data context class, EmployeeDataClasses in my case. Also, make the property ScaffoldAllTables to true. The final code will be, model.RegisterContext(typeof(EmployeeDataClassesDataContext), new ContextConfiguration() { ScaffoldAllTables = true }); That's it! We are noew done with creating a fully operational data driven websites that is capable of doing the CRUD operations on our data model. Execute the application and see it in action. Next, we will go ahead and add a new field template for Boolean field in the default field templates folder. Browse to DynamicData/FieldTemplates and right click FieldTemplates folder and select “Add New Item..”. Select “Dynamic DataField” from the dialog box and specify a name for your new field template, i have given as “BooleanYN.ascx”. Refer the below figure, This will add a new user control with name “BooleanYN.ascx” for view and “BooleanYN_Edit.ascx” for edit/insert mode. For time being, we will exclude the edit template and will finish configuring the view template first. Refer below, As is said in my previous articles, the code behind of this new template will be inherited from System.Web.DynamicData.FieldTemplateUserControl class. This class will provide the access to the field value and meta data for automatic validations, etc. Also, Dynamic data framework will automatically place a Literal control for view mode(See ascx file). Now, from the codebehind file, assign value as “Yes” if the FieldValue property returns true else “No” to the Literal control. Refer the below code, BooleanYN.ascx <%@ Control Language="C#" CodeFile="Boolean.ascx.cs" Inherits="BooleanField" %> <asp:Literal</asp:Literal> BooleanYN.ascx.cs public partial class BooleanField : System.Web.DynamicData.FieldTemplateUserControl { protected override void OnDataBinding(EventArgs e) { base.OnDataBinding(e); object val = FieldValue; if (val != null) { Literal1.Text = ((bool)val ? "Yes" : "No"); } public override Control DataControl { get { return Literal1; } Next, we have to configure the Employee object to use the new field template for HasPassport field. Dynamic data website includes a property called UIHint that helps us to do this. We need to create a meta data class for the employee object and decorate the HasPassport field with UIHint attribute. The UIHint attribute will take a string parameter that represents the new field template name and uses the field template to render the field specifed. Now, this meta data class should be exposed with the Employee object to look for the additional meta data in order to render the fields. This can be done by decorating the Employee object with a property called MetadataType. To do this, include a new class file into your project called Employee.cs. Make the class as partial as we already have an Employee object in our data model. Define a meta data class called EmployeeMetadata where we can specify the HasPassport field to use the new template. Decorate the Employee partial class with MetadataType property. We can include MetadataType directly in your Employee class in designer.cs file, but whenever you make any changes to your datamodel the changes will be cleared off and requires re-configuring. Hence, creating a partial class and decorating it with this property will help us to prevent this issue. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.DynamicData; using System.ComponentModel.DataAnnotations; /// <summary> /// Summary description for Employee /// </summary> [MetadataType(typeof(EmployeeMetadata))] public partial class Employee { public class EmployeeMetadata [UIHint("BooleanYN")] public System.Nullable<bool> HasPassport; That’s it! Execute the application and you can see Boolean field shows “Yes” or “No” in view mode for the HasPassport field and displays CheckBox control for IsTemporaryEmployee field. Refer the figure above [First Image of the article]. Edit and Insert mode will still show CheckBox control as we have excluded the new edit template for both the fields. Now, we will go ahead and include the edit template which we excluded when adding new field template and customize it. The default template will include textbox control and validators to validate. Remove all these and include a RadioButton control, just to differentiate it from default Boolean edit template which includes CheckBox control. Override the OnDataBind method to populate the RadioButton control in edit mode. Easy way to customize is to copy the content of default Boolean edit template and start customizing it. Copy paste the ascx and codebehind from an existing Boolean template and start customizing it. Refer the code below, ASCX <%@ Control Language="C#" AutoEventWireup="true" CodeFile="BooleanYN_Edit.ascx.cs" Inherits="DynamicData_FieldTemplates_BooleanYN_EditField" %> <asp:RadioButton I have deleted unwanted code ascx. ASCX.CS public partial class DynamicData_FieldTemplates_BooleanYN_EditField : System.Web.DynamicData.FieldTemplateUserControl { protected void Page_Load(object sender, EventArgs e) { //TextBox1.MaxLength = Column.MaxLength; //if (Column.MaxLength < 20) // TextBox1.Columns = Column.MaxLength; //TextBox1.ToolTip = Column.Description; // SetUpValidator(RequiredFieldValidator1); //SetUpValidator(RegularExpressionValidator1); //SetUpValidator(DynamicValidator1); protected override void OnDataBinding(EventArgs e) { RadioButton1.Checked = (bool)val; protected override void ExtractValues(IOrderedDictionary dictionary) { // dictionary[Column.Name] = ConvertEditedValue(TextBox1.Text); dictionary[Column.Name] = RadioButton1.Checked; // return TextBox1; return RadioButton1; Execute the application and you can see RadioButton control in edit page. Downloads Download Source Conclusion As i said in this article series, dynamic data website offers a greater flexibility to customize it for fitting our most of the needs. Part 1 and Part 2 of this article series would have given you a very basic idea on customizing the dynamic data website. Stay tuned! We will customize more in coming days! Download the source attached with this article and see it in action. Happy Coding!!
http://www.codedigest.com/Articles/ASPNET/312_Customizing_Fields_in_ASPNet_Dynamic_Data_Website-Part_2.aspx
CC-MAIN-2017-22
refinedweb
1,441
50.02
Thanks a million, I'll start experimenting with that right away. Looks just exactly like what I need, thanks again. Cheers, Markus Hajek Team Vienna - Kazemi, Hajek & Pisarik OG Von: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] Im Auftrag von Martin Maly Gesendet: Montag, 16. April 2007 20:13 An: Discussion of IronPython Betreff: Re: [IronPython] Callback per statement It is not possible to do this without change to code generation at this point. Essentially you could do something like this: public class MyCallbackClass { public void MyCallback() { // } } And then emit call to this utility wherever you like: cg.EmitCall(typeof(MyCallbackClass).GetMethod("MyCallback")) You can then control the granularity at which you call this. Per statement, or even per expression (I am a bit confused about your mention of operators below, whether you want to do this for each expression, but it is certainly possible as well). For starters, what you could easily do to get feel for things would be to modify SuiteStatement's Emit method (which only loops through enclosed statements and emits each of them) and add the above "cg.EmitCall" for each statement, run your repro, say: X = 1 X = 2 X = 3 And put breakpoint in the "MyCallback", or better yet, run the repro: Ipy.exe -X:SaveAssemblies x.py And examine the x.exe we'll generate with ildasm or reflector. Then you can add calls to your callbacks wherever desired. Hope this helps Martin From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Markus Hajek Sent: Monday, April 16, 2007 3:37 AM To: 'Discussion of IronPython' Subject: [IronPython] Callback per statement Hi, is there a way to execute a callback whenever a Python statement is about to be executed (or just has executed)? With Python statements, I mean method calls, operators, assignments. And if there's no such way, how would I have to go about changing code generation to facilitate that? Many thanks, Markus Hajek Team Vienna - Kazemi, Hajek & Pisarik OG -------------- next part -------------- An HTML attachment was scrubbed... URL: <>
https://mail.python.org/pipermail/ironpython-users/2007-April/004753.html
CC-MAIN-2014-10
refinedweb
352
64.41
Using MaryTTS or OpenMary in Java So now I've started another project (Again). This ones called Aimie and happens to be a robot with an AI coded in Java. For the voice portion of Aimie, I needed a voice synthesiser that sounded good but I also didnt want to reinvent the wheel, so I'm using a free TTS client/server called MaryTTS or OpenMary. I've found there's not much documentation for getting a standalone mary server/client running in your own application. The good news? It's easier than you thought. Take a look at the code below to get an idea of what I mean: package Speech; import javax.sound.sampled.AudioInputStream; import marytts.LocalMaryInterface; import marytts.MaryInterface; import marytts.exceptions.MaryConfigurationException; import marytts.exceptions.SynthesisException; import marytts.util.data.audio.AudioPlayer; public class Voice { private MaryInterface marytts; private AudioPlayer ap; public Voice(String voiceName) { try { marytts = new LocalMaryInterface(); marytts.setVoice(voiceName); ap = new AudioPlayer(); } catch (MaryConfigurationException ex) { ex.printStackTrace(); } } public void say(String input) { try { AudioInputStream audio = marytts.generateAudio(input); ap.setAudio(audio); ap.start(); } catch (SynthesisException ex) { System.err.println("Error saying phrase."); } } } As you can see, you only have to set up a 'LocalMaryInterface' to get all the benefits of Mary. Ignore all the people saying you need a server but beware, the startup time can be a few seconds. Published at 23 Dec 2013, 23:01 PM Tags: Robot,Java We're adding your comment. Your comment has been added. Please try again later.
http://lukealderton.com/blog/posts/2013/december/using-marytts-or-openmary-in-java/
CC-MAIN-2018-09
refinedweb
253
52.97
Contact Me. People attend conferences for many different reasons. Some come for the content of the lectures; some come to meet and hear well-known speakers; some come to meet and network with others in the industry; some come to see old friends. Me, I come for all those reasons. At DevLink last week in Murfreesboro, TN, I experienced all those things and more. But I also experienced something new. I had heard of Open Spaces in the past but had not experienced them. At DevLink, Open Spaces were promoted heavily as a different way of exchanging ideas. I was curious and gave it a try. An Open Space event consists of developers sitting together roughly in a circle in a room and they exchange ideas with one other. A topic is picked in advance by the group but the conversation is not limited to that topic. If the conversation drifts from the assigned topic and the group remains engaged, this is perfectly all right. The important thing is that ideas are exchanged and the group remains passionate about the conversation. And I heard a great deal of passion at the DevLink Open Spaces that I attended. During the event, I attended 3 Open Spaces sessions plus the planning session (where topics were picked) and the wrap-up session (where the group reviewed the open spaces of the previous 2 days). In each session I attended, I heard bright people sharing great ideas. Sometimes we argued and sometimes we were in violent agreement but I enjoyed it all. In a session on Service Oriented Architecture, I argued earnestly that, due to the costs of SOA, support from the top was necessary for SOA to succeed within any organization. Most of the other loud persons in the group insisted that newer tools such as WCF had lowered the cost of SOA sufficiently that a strong grass roots effort could drive SOA in an organization. By the end of the session, I think we had all learned something and moved a little toward understanding the others' side. I did attend a few traditional sessions in which a speaker stands in front of a classroom and delivers a lecture to an audience that is mostly passive. Richard Campbell and Carl Franklin were two of the speakers at this conference and I have long been a fan of their .Net Rocks podcast, so I made a point to attend a lecture by each of them. Both were good sessions but they were easily topped by Joe Wirtley who gave an excellent talk on WPF. It was excellent because it focused on building a business application, rather than the eye candy that clutters so many WPF presentations. Overall the conference was a great success. It drained me of energy but it fired me up at the same time. And I haven't even told you about the 28 hours I spent riding a bus with a few dozen techno-geeks. Or the flat tire that left us stranded in Carrolton, KY for 3 hours at 2AM. But that’s another story. Note: Click here to see more photos from DevLink In this article, we will add a new model, view and controller to an existing MVC project. 1. Open Visual Studio 2008 and create a new MVC project. For information on how to create a new MVC project, see 2. Open the Solution Explorer (View | Solution Explorer) and select the Models folder. 3. Add a Model to the project a. Right-click the Models folder and select Add | Class. The Add New Item dialog displays. Figure 1 i. At the Name textbox, enter “Customer”. ii. Click the OK button to create a Customer class. b. The Customer class opens in the class editor. This class will contain a few public properties that help describe a customer object. Add the following code to the Customer class. public class Customer { public int CustID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string StreetAddress { get; set; } public string City { get; set; } public string State { get; set; } public string PostalCode { get; set; } } public class Customer { public int CustID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string StreetAddress { get; set; } public string City { get; set; } public string State { get; set; } public string PostalCode { get; set; } } 4. Add a Controller to the project a. In the Solution Explorer, right-click the Controllers folder and select Add | New Item. The Add New Item dialog displays. Figure 2 ii. Under Templates, select MVC Controller Class. iii. In the Name textbox, enter “CustomerController”. iv. Click the Add button to create the CustomerController class and open it in the class editor. b. In the CustomerController class, we will create some actions. Each action will instantiate one or more Model objects and display them in a view object. i. Add the following statement at the top of the CustomerController class. using TestMVC.Models; using TestMVC.Models; ii. Add the following private methods to the CustomerController class. For now, we will create customers out of thin air (as if it were that easy). In a real application, we would probably call a web server or query a database to get customers. iii. Add some Action method to the CustomerController class. We’ll start with a List action. Paste the following code into CustomerController.cs. public ActionResult List() { var allCustomers = GetAllCustomers(); return View("List", allCustomers); } public ActionResult List() var allCustomers = GetAllCustomers(); return View("List", allCustomers); iv. In the List, we get a list of customers (all 2 of them) and return a view. Unlike the generated code, we explicitly specify which view to return (“List”) and we pass in some extra data (allCustomers) that the view will consume. 5. Add a view to the project. a. In the Solution Explorer, right-click the Views folder and select Add | New Folder. A new folder appears in the Solution Explorer. Rename this folder to “Customer”. b. In the Solution Explorer, right-click the Customer folder and select Add | New Item. The Add New Item dialog displays. iii. In the Name textbox, enter “List”. iv. The Select a Master Page dialog displays. Figure 4 c. Add visual elements to the View i. If it is not already open, open the List view by double-clicking List.aspx in the Solution Explorer. Click the Source tab at the bottom of the editor. ii. Replace the code in List.aspx with the following <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="TestMVC.Views.Customers.List" %> <%@ Import Namespace="TestMVC.Views.Customers"%> <%@ Import Namespace="TestMVC.Models"%> <asp:Content > </tr> <% } %> </table> </asp:Content>The above code displays a list of Customer model objects. In a real-world example, we may choose to have the Customer model derive from a base class and only refer to the base class in the view. This would increase the separation between our view and our model. <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="TestMVC.Views.Customers.List" %> <%@ Import Namespace="TestMVC.Models"%> > <% } %> </table> 6. Test the application d. You should see a list of 2 customers in your browser Figure 4 e. Set a breakpoint in the List method of CustomerController.cs and refresh the page to step through the code as it executes. In this article, we created a model, view and controller from scratch and displayed them. You can download the code for this project here. In the next article, we will use the ID of the URL to specify a single customer. I have been plagued recently by a recurring problem with Visual Studio 2005. When I attempt to exit Visual Studio, I receive the error "Visual Studio cannot shut down because a modal dialog is open" and I am not able to exit. The rub is that there is no modal dialog - close every visible window in VS, close all other apps, resize, move and minimize VS and I can find no dialogs, modal or otherwise. Some bit inside VS is set incorrectly convincing itself that a dialog has not yet been closed. The only solution was to open Task Manager and kill Visual Studio. I have automatic updates turned on so, if this is a bug, I expected it would have been fixed by now. I found a number of posts and threads about this issue so it is not uncommon but nearly every post did not list a solution. After some digging, I discovered a hotfix for this problem that is not included in the normal Windows updates. You can read the details of the problem from Microsoft here and you can download the hotfix here One important point. Visual Studio must be closed before installing the hotfix so you may end up killing the process via Task Manager one last time. Every year, I become a bit more accepting of my own ignorance. I decided a long time ago that I wanted a career in which I could continue to learn and to expand my knowledge. Software development affords me that opportunity because it is such a large field and because it changes so rapidly. It is conceivable (though extremely unlikely) I could learn everything there is to know about software development and find myself completely caught up with learning for one day. If that miracle were to occur however, I would go to bed that night and awaken to discover that things had been invented while I slept. And I would once again be ignorant about some things. But that day will never come. There is an infinite amount of knowledge to be acquired and a finite amount of time in which to learn it. The ratio of what I know to what I don't know is likely to remain small. Yesterday, I had lunch with a guy who knows a great deal about Windows Presentation Framework (WPF). Since I am extremely ignorant about WPF, it was a good opportunity to learn some new things. But WPF contains so much that we could probably have lunch every day for months and I would still only scratch the surface of this framework. I want to know everything but I realize and accept that I cannot. So what's the answer? The answer is in learning how to find the answers. "I don't know" is an acceptable answer to any question, but "I can't do it" is not. As new challenges and problems arise, we need to be able to figure them out - to find the answer. Usually our experiences only get us so far. We need help finding answers. Certainly the World Wide Web helps. Many times, when faced with a problem, I've discovered an article or blog post written by a developer who faced and conquered a similar problem. Search engines such as Google allow us to find these solutions more quickly. Books and magazines help as well. They provide knowledge based on the experiences of the authors. So do Classes and conferences. I've found one of the best ways to improve my knowledge base is to build a network of smart people on whom I can call for tough questions. I try to reciprocate as much as I can, but luckily software developers tend to be very generous with their ideas. So the conclusion I've come to after all this introspection is that what we know is not nearly as important as what we are capable of finding out. And that's encouraging for a guy like me who will never know it all. Microsoft recently released the ASP.Net Model View Controller framework (ASP.Net MVC). It is currently available as Community Technology Preview 3 and can be downloaded at This article describes how to create an ASP.Net MVC application and the code that is auto-generated for you. 1. Open Visual Studio 2008. Create a new project: Select File | New Project. The New Project dialog displays. Figure 1 a. Under Project Type, select Visual Basic\Web or Visual C#\Web, depending on your language preference. b. Under Templates, select ASP.Net MVC Web Application. This application was added when you installed the ASP.Net MVC preview. c. Provide an appropriate location and name for the project and solution. d. Click the OK button to create the project. 2. One of the advantages of an ASP.Net MVC project is that the separation of most of the code from the user interface makes it easier to write unit tests. Visual Studio encourages you to create unit tests for your new project by prompting you with the Create Unit Test Project dialog every time you create an MVC project. Figure 2 a. If you wish, you can decline to create a Unit Test project or you can change the default project name. Typically I do not change any defaults on this dialog. b. Click the OK button to create the Unit Test project. When you create a new MVC project, Visual Studio, generates a couple views and controllers. If you understand how these work, you can use them to guide how you will create more views and controllers. The solution contains two projects: an MVC project and a unit test project. View the projects in Solution Explorer. Select View | Solution Explorer. The MVC project contains several folders. Figure 3 1. The Content folder contains a stylesheet Site.css for this site. 2. The Controllers folder is where you will store all your controller classes. By default, this folder contains a single controller class - HomeController.cs. 3. The Models folder is where you will store any model classes for your application. 4. The Views folder contains a subfolder for each view in your application. By default, there are two subfolders: Home and Shared. a. The Shared subfolder contains a master page for the site because it is shared by multiple web pages. Any other UI elements shared by the site belong in this folder. b. The Home folder contains two pages: About.aspx and Index.aspx. 5. As with most web applications, the root folder of this project contains a Global.asax file and a Web.Config file, which contain setup and configuration information for the application as a whole. Open Global.asax and view the code. Notice that the Application_Start method (which fires once, at the startup of the web application) contains a call to the RegisterRoutes method. The RegisterRoutes method tells the MVC framework how to interpret a URL. public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); } The routes.MapRoute method accomplishes this. In this case, a “Default” route collection is created that interprets a URL with syntax like “{controller}/{action}/{id}”. · The first part of the URL specifies the controller to use. MVC looks in the Controllers folder for a class that inherits from System.Web.Mvc.Controller with a name that matches the controller specified in the URL. · The second part of the URL specifies the action to take. The action is the public method within this controller that will be called. · The third part of the URL specifies an id to pass to the action method. This can be used to further customize the action. For example, we could use the id as a filter to dynamically look up a single row in a database. The routes.MapRoute method also allows us to specify defaults if no controller or action or id is specified in the URL. If any of these are omitted from the URL, MVC will use the defaults specified in the third parameter of routes.Maproute. In this case the object new { controller = "Home", action = "Index", id = "" } tells MVC the following: · If no Controller is specified in the URL, assume the Home controller (i.e., look for a class named “Home.cs” in the Controllers folder). · If no Action is specified in the URL, assume the Index action (i.e., look for a public method “Index” in the Home.cs class). · If no ID is specified in the URL, assume a blank ID (i.e., any code looking for an ID will retrieve an empty string). Open the view files: Home.aspx and About.aspx and notice that there is no code behind in either. This is because ASP.Net MVC applications do not execute the page life cycle. All the code for this application is in the controllers. These view pages contain only visual elements. Open the controller class: Homecontroller.cs. As we mentioned before, this class derives from the System.Web.Mvc.Controller class and it contains two methods: Index and About."; return View(); } } }"; “HomeController” is the name of the class to implement the Home controller. This is typical of how MVC works – developers follow naming conventions in order tell the framework where to find the code to run. In the case of controllers, we implement a controller by sub-classing the System.Web.Mvc.Controller class, naming this subclass “xxxController” (where xxx is the Controller name) and placing that subclass in the Controllers folder of our MVC project. If we wanted to call a controller named “David”, we would create a System.Web.Mvc.Controller class named “DavidController” into the Controllers folder. This process is known as “convention over configuration”, meaning that the framework knows where to find code based on the names we use. Let’s look closely at the Index method. Recall that the method in the controller is the Action that is specified in the URL. So the Index method will be called if the Index action is specified. ViewData is a dictionary collection that is a property of every Controller object. We can add or update items in this collection by syntax such as ViewData["Title"] = "Home Page"; By placing items in this collection, we make them available to the view when it is called. The view (remember this is the UI that the user will see) is returned from this method. The following line returns the default view.return View(); We know it is the default view because the statement did not specify the name of the view. The default view has the same name as the Action called. In this case, we are returning the Index view. Once again, MVC uses conventions to determine where to find the view. All views associated with a given controller are stored in a subfolder named for that controller beneath the Views folder. In this case, we are using the Home controller, so we look for views in the Views\Home folder of the project. The view itself is a file with the same name as the view and with an extension of “.aspx” or “.ascx”. In this case, we are looking for the default view (Index) of the Home controller. MVC renders the page Views\Home\Index.aspx for this view. Again, the developer uses naming conventions to tell the framework where to find items. Open Index.aspx. Notice it displays the message stored in the ViewData dictionary by the controller.<%= Html.Encode(ViewData["Message"]) %> However, it contains no other code, because all logic is handled by the controller. Creating a new ASP.Net MVC project is as easy as creating any other Visual Studio project. Learning the paradigm that the MVC framework uses can be a challenge; but the samples created automatically with a new project can ease that learning curve. In the next article, we will add a new controller and view to a project. The Model-View-Controller (MVC) design pattern has existed for years. () ASP.Net developers have been implementing it for years either through their own custom code or via third-party frameworks such as Monorail (). Recently, Microsoft released the ASP.Net MVC framework to give web developers the option of using this design pattern without the need for a lot of “plumbing” code or the use of a third-party framework. The Model-View-Controller design pattern splits an application into three distinct parts called (you guessed it) “Models”, “Views” and “Controllers”.. Below is Trygve M. H. Reenskaug’s diagram of the relationship between these thee parts. Figure 1 This separation of the various concerns of the application encourages developers to create loosely-coupled components. Much of the communication to the controller occurs by raising events in the view, which keeps the controller loosely coupled from the other parts. However the real advantage of the MVC pattern is that, because they only communicate through the controller, the model and view are very loosely coupled. This provides the following advantages to an MVC application. In the next article, we will look at how to create a Microsoft ASP.Net MVC application..
http://www.davidgiard.com/default,month,2008-08.aspx
CC-MAIN-2014-42
refinedweb
3,514
66.54
I am currently working on an AT communication project for Arduino Mega and ESP8266 ESP 07S. We are having some technical issues and would like to ask a question. First of all, the parts list I currently have is: Arduino Mega FTDI converter ESP 07S + Break out board (soldered) DC to DC conveter The pinout at the time of the firmware update is as follows: I soldered it to the breakout board so no resistors were connected at the time. PIN Serial Adapter RESET <-3.3V CH_PD <-3.3V VCC <-3.3V GPIO0 <-3.3V GPIO15 <-GND GND <-GND RX <-TX TX <-RX After updating the firmware, I received the following message. Leaving .... Failed to leave Flash mode Thus, we determined that the firmware was updated successfully. After that, I tried to get an AT response using a serial monitor by changing the pinout. The other pinout is as follows: PIN Serial Adapter RESET <-3.3V (pull up) CH_PD <-3.3V (pull up) VCC <-3.3V (by DC to DC Conveter) GPIO0 <-3.3V (pull up) GPIO15 <-GND (pull down) GND <-GND (Connected to VCC and 100nF Capacitor.) RX <-TX (I soldered it to the breakout board so no resistors were connected at the time.) TX <-RX Here is the code I used: #include <SoftwareSerial.h> void setup () { uint32_t baud = 115200; Serial.begin (baud); Serial2.begin 115200; Serial.print ("SETUP !! @"); Serial.println (baud); Serial2.println ("AT \ r \ n"); } void loop () { while (Serial2.available ()> 0) { char a = Serial2.read (); if (a == '\ 0') continue; if (a! = '\ r' && a! = '\ n' && (a <32)) continue; Serial.print (a); } while (Serial.available ()> 0) { char a = Serial.read (); Serial.write (a); Serial2.write (a); } } No AT response has been received with the current serial monitor. Even if I changed both the baud rate of the code and the baud rate of the serial monitor, I could not receive a response. I have connected both pull up and pull down resistors and not connected resistors. But the result was the same. So I tried to upload a Blink example using FTDI Converter without using Arudino Mega. pinout was the same as the firmware update. But this didn't work either. Currently, Arudino Mega cannot communicate with ESP 07S, nor can it communicate with FTDI Converter. So the question I would like to ask is: 1. I wonder if I pinout wrong with ESP 07S. 2. I want to determine whether the ESP 07S is malfunctioning. Is there a proper way to judge this? In addition to the attempts mentioned above, there are various ways of connecting and proceeding, so I suspect that the device is broken. 3. I hope there is no failure next time. Is there a way to connect securely? 4. If you have anything else to point out, please tell me! Finally, thank you for reading this long article, and thank you for your lack of communication using the translator. When I call Esp 07s AT, it's so eager to get an OK.
https://www.esp8266.com/viewtopic.php?f=26&t=20393
CC-MAIN-2020-29
refinedweb
499
77.94
Sending and Receiving Events with Azure Event Hub If you are looking for what an Event Hub is, check out my previous post: This post is about sending and receiving events with Azure Event hub. Since the documentation explains well on how to create one, we won’t be covering how to create one in this blog post. If you are looking on how to create an Event Hub, check the documentation here: For further use in this post, find the architecture below. It is always interesting to have this in our head, to be able to understand the code that we will be writing. Interesting to note here is that to allow our Event Hub to scale horizontally, that we are using “Partitions”. A partition is an ordered sequence of events held in an event hub. You can think of this as a “commit log”. Events coming in will be distributed “Round-Robin” in the different partitions. A publisher can also send messages to a specific partition. This however is not recommended because it sidesteps the Event Hub scaling logic. Azure Event Hub works with “ThruPut Units” or TU. 1 TU means 1MB/s ingress, & 2MB/s egress or 1000msgs/sec and you pay per TU. Every partition that you create has the speed of a TU, so that means that if you have 5 TU and 6 Partitions that you will get 5 MB/s * 6 Partitions = 30MB/s ingress or a maximum of 5000 events being processed. This also means that if you want to utilize the maximum capacity of your TU that the number of partitions should be equal to the number of TU Connecting and processing events with Event Hub Configuring the Connection with your Connection String To start working with your Event Hub, you will need 2 components: - Namespace Connection String: This can be found by going to your Azure Portal, Selecting the Event Hub resource that you created → Shared Access Policies → RootManageSharedAccessKey → Connection String - Event Hub Name to send the events to: In your Event Hub, see the names that you created. Note: if you do not have one yet, create one by clicking the “+ Event Hub” button on the top. In my case, I then created a “config.js” file for my Node.js project and made it look like this: Sending Events We can now start sending messages. For this we just install the library provided to us via NPM (azure-event-hubs) and initialize the connection through the eventHubClient.fromConnectionString(namespace, eventHubName) Once we did this, we can create a sender and start sending events to it. This is it, you are now sending events, which will be automatically distributed over your partitions. You can find more samples here: Receiving Events Receiving events is almost just as easy as sending events. The only difference here is that we need to think about our consumer group, and about the partitions. Consumer Group: This is such as the Publish/Subscribe mechanism. An application specifies a consumer group and will then receive a subset of events which are sent to that consumer group. A consumer group can also be seen as a view (state, position, or offset) of an entire Event Hub. (more info:) Here we are just using the $Default consumer group, which is created by default. We connect to it and read from all the partitions. We are now receiving events and can view them by running our program with node receiver.js resulting in the following output:
https://medium.com/@xaviergeerinck/sending-and-receiving-events-with-azure-event-hub-f92af9ad7fa0
CC-MAIN-2018-51
refinedweb
587
69.01
Borislav Hadzhiev Last updated: Feb 19, 2022. The error message shows the command that you should try to run when you get the error. The command in the screenshot above is: npm i --save-dev @types/uuid If this doesn't work, try installing the latest version of the uuid package and its types. The versions between the package and the types should match or at least be very close to one another. npm i uuid@latest npm i --save-dev @types/uuid@latest Now you should be able to use the package like so: import { v4 as uuidv4 } from 'uuid'; console.log(uuidv4()); Usually, the names of type packages are consistent - @types/module-name, but you could try to look for a definition package by using the official TypeScript type search. If the error persists, the uuid-related third-party module you are importing might not provide typings, which means that you need to declare the module in a file with a .d.ts extension. TypeScript looks for .d.ts files in the same places it looks for your regular .ts files, which is determined by the include and exclude settings in your tsconfig.json file. Create a new file named module-name.d.ts next to your regular TypeScript files and add the following line to it. declare module 'module-name'; Make sure to replace module-name with the name of the module that's causing the error. anywhen importing it. This should be sufficient for most use cases. If you want to add your own type definitions for the package, replace the line with the following code: declare module 'module-name' { export function myFunction(): string; } The example shows how to add types for a function named myFunction that returns a string. If this still doesn't work, you should try to ignore the error by adding the following lines above the import. // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import { myFunction } from 'module-name'; Adding these lines above the import statement will suppress the error message..
https://bobbyhadz.com/blog/typescript-could-not-find-a-declaration-file-for-module-uuid
CC-MAIN-2022-40
refinedweb
343
62.48
"how do you generate the series of numbers composed of a given list of prime factors, where each can be used an unlimited number of times?" I interpreted that to mean all multiples of all prime factors provided minus duplicates were valid. My mistake was exacerbated by the fact the sample series provided fit my interpretation. I took my licks after posting an incorrect solution. I was happy to take the downvotes and be wrong since the mistake was just as interesting to me. My challenge then is to produce R as shown below for any set of given factors lazily: Given: Factors 2, 3, 5 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, ... 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, ... 5, 10, 15, 20, 25, 30, ... R = 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 2 +6, 27, 28, 30, ... [download] #!/usr/bin/perl use strict; use warnings; use constant HEAD => 0; use constant TAIL => -1; my $end = shift || 10; my @num = @ARGV ? @ARGV : (2, 3, 5); my $next = merge_multiple( \@num ); print $next->(), "\n" for 1 .. $end; sub merge_multiple { my $list = shift; return () if ! $list || ref $list ne 'ARRAY'; my $n = 1; my $h = $list->[TAIL]; my (@pool, @stream); return sub { return shift @pool if @pool; for ( 0 .. $#$list ) { my $mult = $list->[ $_ ]; my $beg = $h * ($n - 1) / $mult + 1; my $end = $h * $n / $mult; $stream[ $_ ] = [ map { $mult * $_ } $beg .. $end ]; } ++$n; @pool = merge( \@stream ); return shift @pool; } } sub merge { my $stream = shift; my $end = $#$stream; my @merged; while ( 1 ) { my $low; for ( 0 .. $end ) { my $val = $stream->[ $_ ][HEAD]; next if ! defined $val; $low = $_ if ! defined $low || $val < $stream->[ $low ][HE +AD]; } last if ! defined $low; my $num = shift @{ $stream->[ $low ] }; next if defined $merged[ TAIL ] && $merged[ TAIL ] == $num; push @merged, $num; } return @merged; } [download] Cheers - L~R In reply to Challenge: Another Infinite Lazy List.
http://www.perlmonks.org/index.pl?parent=440531;node_id=3333
CC-MAIN-2018-17
refinedweb
330
79.4
MessageListener speed when connecting to local messaging comDavid Howe Jun 21, 2006 3:02 AM I've noticed that dequeuing messages when connecting to a JBoss messaging server on localhost is heaps faster than when you connect to a remote server. Naturally, I would expect the local server to be faster, but connecting to a remote server I am only getting 2 - 3 messages per second using a MessageListener that does nothing. I've also noticed the same behaviour when browsing queues with Hermes - locally you get 100's of message/second and remotely it's only 2 - 3 messages per second. A rough test to see this is shown below. Am I doing anything wrong in the way I am using MessageListeners? I can get more throughput by increasing the number of sessions and message listeners I create, but I just wanted to know if there is anything else I can do to make it faster. The browsing in Hermes is a bit of a problem, as its slow enough to be unusable with anything more than a few messages. I am using JBoss Message 1.0.1 CR2 installed on JBoss 4.0.4 GA using the standalone installer provided. David public class TestMultiSessionMessageListener { /** * @param args */ public static void main(String[] args) { TestMultiSessionMessageListener ml = new TestMultiSessionMessageListener(); try { ml.test(); } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } } private void test() throws JMSException { Hashtable properties = new Hashtable(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); properties.put(Context.PROVIDER_URL, "jnp://D102334:1099"); properties.put(Context.SECURITY_PRINCIPAL, "admin"); properties.put(Context.SECURITY_CREDENTIALS, "admin"); ConnectionFactory connectionFactory = null; try { Context context = new InitialContext(properties); connectionFactory = (ConnectionFactory) context .lookup("ConnectionFactory"); } catch (NamingException ne) { throw new RuntimeException(ne); } Connection connection = connectionFactory.createConnection(); connection.start(); int numberOfProcesses = 1; MessageConsumer[] consumers = new MessageConsumer[numberOfProcesses]; Session[] sessions = new Session[numberOfProcesses]; for (int i = 0; i < consumers.length; i++) { sessions = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Queue q = sessions.createQueue("core.track"); consumers = sessions.createConsumer(q); MessageListener ml = new MessageListener() { public void onMessage(Message arg0) { System.out.println(Thread.currentThread().getName()); } }; consumers.setMessageListener(ml); } try { Thread.sleep(Long.MAX_VALUE); } catch (InterruptedException e) { } } } 1. Re: MessageListener speed when connecting to local messagingTim Fox Jun 21, 2006 3:08 AM (in response to David Howe) A few questions: How fast is your network? How large are your messages? What kind of messages are they? Is anyone else using the jms server? Are they persistent messages? If so, what database are you using? 2. Re: MessageListener speed when connecting to local messagingDavid Howe Jun 21, 2006 6:27 AM (in response to David Howe) The two machines are connected to each other on a 100 MB hub that's supposed to have intelligent switching. The hub is connected to our corporate network which is also 100 MB. The messages are text messages containing XML that is < 2 KB. There is another application producing the messages onto the queue, but it doesn't seem to make much of a difference whether this is running or not. I can stop the consuming application and let the producing one run to back up some messages. If I then stop the producer and start the consumer things are still about the same. The messages are persistent and we are using an Oracle 9i database. When running on the local server or a remote server, I am connecting to the same Oracle server and using a different schema for each. We've observed the speed difference browsing the remote queues through Hermes in both Windows and Solaris environments. Is Hermes a reliable gauge? 3. Re: MessageListener speed when connecting to local messagingTim Fox Jun 21, 2006 6:34 AM (in response to David Howe) 2-3 messages per sec does indeed sound very slow. Can you try sending non persistent messages? - I want to take Oracle out of the equation. Also, when you say it is much faster on a "local" server, do you mean the client is in a different VM on the same box as the server, or the same VM on the same box on the server. If it's the latter, can you try the former too? Thx 4. Re: MessageListener speed when connecting to local messagingDavid Howe Jun 21, 2006 6:58 AM (in response to David Howe) By local I mean the client application is running in a different VM on the same box as the JBoss messaging server. I'm connecting with the URL jnp://localhost:1099. Can the persistence behave differently if the client is local compared to remote? JBoss is still using Oracle when I'm connecting locally. I've noticed that when browsing with Hermes, you can only see a maximum of FullSize messages for the queue. I'm assuming this is because the QueueBrowser implementation only works of in memory messages to eliminate the overhead of paging all the messages back into memory for browsing (fair enough). Following this assumption, I'm also assuming that browsing the messages wouldn't be going to Oracle at all, yet it's still slow. I will try non persistent when I'm back at the office tomorrow. Thanks for the reply. 5. Re: MessageListener speed when connecting to local messagingTim Fox Jun 21, 2006 10:15 AM (in response to David Howe) I have just completed a test with JBoss Messaging 1.0.1.CR2 running on JBoss AS 4.0.4.GA, on an old slow intel box, connected via 100MB/s ethernet and a single switch to my laptop. I am sending persistent text messages with a payload of about 2K, and I'm consuming them, both from the laptop. I am seeing send rates of several hundred messages per sec for both the send and the receive. My best bet is you have a problem with your network. 6. Re: MessageListener speed when connecting to local messagingTim Fox Jun 21, 2006 10:16 AM (in response to David Howe) On your second point, you are correct. The current queue browser implementation only works with in memory messages, but this is due to be fixed in the not too distant future 7. Re: MessageListener speed when connecting to local messagingDavid Howe Jun 21, 2006 7:59 PM (in response to David Howe) Thanks Tim. Following your results, I have re-tested with a completely fresh 4.0.4.GA and messaging 1.0.1.CR2 installed in an out of the box configuration (i.e. no Oracle) using ant -f release-admin.xml. I'm still getting the same result - I'm only consuming 300 messages/minute. I've checked the message size and it's actually < 1 KB. Interestingly, putting the 300 messages onto the queue is almost instantaneous - I can't even time it it's so quick, and I'm putting them onto the queue from the remote machine as well. I've also tried disconnecting the hub from the rest of our network and connecting via. IP address and it's still the same. Browsing the JMX console from one machine to the other is also extremely fast. Will keep investigating... 8. Re: MessageListener speed when connecting to local messagingDavid Howe Jun 21, 2006 8:34 PM (in response to David Howe) I think I'm onto it. If you place plain text messages into the queue (i.e. text messages that don't contain XML) then everything is quick. I'm placing the JBoss copyright.txt which is 6 KB into the queue and it browses and dequeues like lightning. If the text message contains any sort of XML, then it bogs down. I've been placing the docs/dtd/jaws.dtd into the queue (as it's a similar size to my messages) and it also bogs down. If you mix non XML text messages and XML text messages, then it consumes the non XML ones quickly and the XML ones slowly. I know that Hermes can display messages in formatted XML, so it is parsing it, but my test case code doesn't touch the message at all, so there can be no parsing involved there. Tim, can you give this a try with your test rig and see if it's the same? 9. Re: MessageListener speed when connecting to local messagingTim Fox Jun 22, 2006 4:04 AM (in response to David Howe) Very interesting. The jms server or client doesn't treat xml text any differently from any other text. In fact it doesn't even look at the message bodies at all, they're ignored. One possibility here is you have an XML firewall on your network between the server and the client. Some companies have these which filter xml traffic to make sure employees aren't doing naughty things.... 10. Re: MessageListener speed when connecting to local messagingTim Fox Jun 22, 2006 4:35 AM (in response to David Howe) Just to be sure I have tried on my test setup with text messages containing xml (jaws.dtd) and others of the same size with non XML text and send/receive times are the same. As I say, Jboss messaging treats the message bodies as completely opaque anyway. 11. Re: MessageListener speed when connecting to local messagingDavid Howe Jun 23, 2006 2:27 AM (in response to David Howe) Thanks Tim. There must be something on our corporate install of Windows XP that is mucking this up - maybe virus scanner or local firewall. These are locked down, so I can't turn them off. We are deploying to Solaris on Monday, so I might just wait and see if the problem occurs in that environment. Thanks for your help.
https://developer.jboss.org/thread/128125
CC-MAIN-2018-30
refinedweb
1,626
56.05
AttendeeInEvents Since: BlackBerry 10.0.0 #include <bb/pim/calendar/AttendeeInEvents> To link against this class, add the following line to your .pro file: LIBS += -lbbpim The AttendeeInEvents class represents a participant of an event. This class includes information about an event participant, such as the attendee type, name, email address, and so on. This class is very can retrieve a list of an event's participants by calling CalendarService::attendees(). This function returns a list of AttendeeInEvents objects, each of which corresponds to a participant of an event. Overview Public Functions Index Public Functions Constructs a new AttendeeInEvents. BlackBerry 10.0.0 Copy constructor. This function constructs an AttendeeInEvents containing exactly the same values as the provided AttendeeInEvents. BlackBerry 10.0.0 Destructor. BlackBerry 10.0.0 void Adds an event key to this AttendeeInEvents. This function appends a new event key to the list of event keys for this AttendeeInEvents object. BlackBerry 10.0.0 QString Retrieves the email address of this AttendeeInEvents. The email address of this AttendeeInEvents. BlackBerry 10.0.0 QList< EventKey > Retrieves the list of events that this AttendeeInEvents participates in. This function returns a list of event keys, each of which represents an event that this attendee participates in. An event key contains the primary key for an event in the calendar database. The list of events that this AttendeeInEvents participates in. BlackBerry 10.0.0 bool Indicates whether this AttendeeInEvents is valid. This function determines whether the attributes of this AttendeeInEvents object have acceptable values. true if this AttendeeInEvents is valid, false otherwise. BlackBerry 10.0.0 QString Retrieves the name of this AttendeeInEvents. The name of this AttendeeInEvents. BlackBerry 10.0.0 AttendeeInEvents & Assignment operator. This operator copies all values from the provided AttendeeInEvents into this AttendeeInEvents. A reference to this AttendeeInEvents. BlackBerry 10.0.0 void Clears the event keys for this AttendeeInEvents. This function removes all event keys from this AttendeeInEvents object. BlackBerry 10.0.0 void Sets the email address of this AttendeeInEvents. BlackBerry 10.0.0 void Sets the list of event keys for this AttendeeInEvents. void Sets the name of this AttendeeInEvents. BlackBerry 10.0.0 Got questions about leaving a comment? Get answers from our Disqus FAQ.comments powered by Disqus
http://developer.blackberry.com/native/reference/cascades/bb__pim__calendar__attendeeinevents.html
CC-MAIN-2014-41
refinedweb
376
52.46
Fabulous Adventures In Coding Eric Lippert is a principal developer on the C# compiler team. Learn more about Eric. It is possible for a program with some local variable x: bool b = x is FooBar; to assign true to b at runtime, even though there is no conversion, implicit or explicit, from x to FooBar allowed by the compiler! That. This can happen if FooBar is a type parameter to the method containing the code and x is a variable of a known type that isn't known to be convertible to FooBar, right? something like: void Frob<FooBar>() { int x = 1; bool b = x is FooBar; } Frob<int>(); We're having a fun time trying to solve this in the C# StackOverflow chat room. Thanks for the puzzle Eric! bool b = (object)x is (object)FooBar? Gah, Ignore that, I misread the problem. static void M<T>(T x) { bool b = x is FooBar; FooBar foobar = (FooBar)x; } Michael beat me too it, but here is a example you can just dump into LINQ Pad if you want to play: void Main() { var x = new FooBar(); CheckForFoobar<FooBar>(x); public class FooBar public int test; public static bool CheckForFoobar<T>(T x) bool b = x is FooBar; //Will not compile //FooBar foobar = (FooBar)x; b.Dump("b"); return b; dynamic x = new FooBar(); Console.WriteLine(b); x = null; /* Uncomment this line to create compiler error: Cannot convert null to 'FooBar' because it is a non-nullable value type. */ public struct FooBar I, too, tested my code in LINQPad. Just realized that it does not produce a compiler error, but a RuntimeBinderException exception at runtime. What if FooBar is abstract? Then "is" can succeed, while instance creation can't. This seems more like a subtlety of explicit conversions than a subtlety of the 'is' operator, since the 'is' operator is translated to an IL 'isinst' instruction under the hood. So I took a minute to look it up in the spec, and the spec even admits to it being a subtlety: "The above rules do not permit a direct explicit conversion from an unconstrained type parameter to a non-interface type, which might be surprising. The reason for this rule is to prevent confusion and make the semantics of such conversions clear." This is because type arguments can't be substituted at compile-time, to know what explicit conversions exist. The allowable conversions for the 'is' operator, however, are all evaluated after type arguments have been substituted. I think any developer who's attempted generic math has run into this: public void DoMath<T>(T value) if (value is int) { DoIntMath((int)value); } Hello Eric. My guess is the below one, although I think you meant something smarter. namespace NS using Bad = FooBar; class FooBar { static void Main() Bad x = new Bad(); bool b = x is FooBar; Console.WriteLine(b); //returns true } Cheers Nope, forget it...it's an alias, thus the type is the same, and any cast/conversion would be allowed. var x = new TypedReference(); bool b = x is object; Console.WriteLine(b); object o = (object)x; Maybe this? class Program static void Main(string[] args) dynamic x = new FooBar(); Console.WriteLine(b); Console.ReadLine(); class FooBar
http://blogs.msdn.com/b/ericlippert/archive/2012/08/23/an-quot-is-quot-operator-puzzle-part-one.aspx?PageIndex=1
CC-MAIN-2014-23
refinedweb
539
62.48
Bio::Phylo::Parsers::Json - Parser used by Bio::Phylo::IO, no serviceable parts inside This module is used to import NeXML data that was re-formatted as JSON, using the mapping implemented by XML::XML2JSON. This module is experimental in that complex NeXML-to-JSON mapped strings may fail to yield valid NeXML (and, consequently, valid Bio::Phylo objects) in the round trip. The reason for this is that the XML2JSON omits xmlns declarations in its JSON output. We try to work around this here by re-introducing the default namespaces, but if any additional ones were present in the original NeXML (e.g. to specify namspaces for metadata predicates) these can't be reconstructed. In addition, the JSON that XML2JSON produces doesn't preserve element order. We try to be lenient about this when parsing the intermediate NeXML, though it is actually invalid. There is a mailing list at for any user or developer questions and discussions. The json parser is called by the Bio::Phylo::IO object. Look there to learn how to parse data using Bio::Phylo..
http://search.cpan.org/~rvosa/Bio-Phylo/lib/Bio/Phylo/Parsers/Json.pm
CC-MAIN-2017-43
refinedweb
180
54.93
A TR1 Tutorial: Smart Pointers WEBINAR: On-demand webcast How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER > Until TR1, the only smart pointer available in the standard library was auto_ptr; that presents some major disadvantages because of its exclusive ownership model. To address these issues, the new standard offers two new implementations, shared_ptr and weak_ptr, both defined in header <memory>. Class std::auto_ptr As mentioned earlier, auto_ptr is based on an exclusive ownership model; each means that two pointers (of this type) cannot point to the same resource. Copying or assigning makes the resource changing its owner, with the source giving the ownership to the destination. #include <memory> #include <iostream> class foo { public: void print() {std::cout << "foo::print" << std::endl;} }; int main() { std::auto_ptr<foo> ap1(new foo); ap1->print(); std::cout << "ap1 pointer: " << ap1.get() << std::endl; std::auto_ptr<foo> ap2(ap1); ap2->print(); std::cout << "ap1 pointer: " << ap1.get() << std::endl; std::cout << "ap2 pointer: " << ap2.get() << std::endl; return 0; } The output is: foo::print ap1 pointer: 0033A790 foo::print ap1 pointer: 00000000 ap2 pointer: 0033A790 The exact value of the wrapped pointer (0033A790) is not important. The issue here is that, after creating and initializing object ap2, ap1 gave up the ownership of the resource, and its wrapper pointer became NULL. The major problems introduced by auto_ptr are: - Copying and assigning changes the owner of a resource, modifying not only the destination but also the source, which it not intuitive. - It cannot be used in STL containers because the constraint that a container's elements must be copy constructable and assignable does not apply to this class. What's New in TR1? Two new smart pointers were added to the standard template library: - shared_ptr: Based on a reference counter model, with the counter incremented each time a new shared pointer object points to the resource, and decremented when the object's destructor executes; when the counter gets to 0, the resource is released. This pointer is copy constructable and assignable; this makes it usable in STL containers. Moreover, the shared pointer works with polymorphic types and incomplete types. Its major drawback is the impossibility to detect cyclic dependencies, in which case the resources never get released (for example, a tree with nodes having (shared) pointers to children but also to the parent, in which case the parent and the children are referencing each other, in a cycle). To fix this issue, a second smart pointer was created: - weak_ptr: Points to a resource referred by a shared pointer, but does not participate in reference counting. When the counters gets to 0, the resource is released, regardless the number of weak pointers referring it; all these pointers are marked as invalid. The next example shows a similar implementation to the first example, replacing auto_ptr with shared_ptr. int main() { std::tr1::shared_ptr<foo> sp1(new foo); sp1->print(); std::cout << "sp1 pointer: " << sp1.get() << std::endl; std::tr1::shared_ptr<foo> sp2(sp1); sp2->print(); std::cout << "sp1 pointer: " << sp1.get() << std::endl; std::cout << "sp2 pointer: " << sp2.get() << std::endl; std::cout << "counter sp1: " << sp1.use_count() << std::endl; std::cout << "counter sp2: " << sp2.use_count() << std::endl; return 0; } foo::print sp1 pointer: 0033A790 foo::print sp1 pointer: 0033A790 sp2 pointer: 0033A790 counter sp1: 2 counter sp2: 2 As you can see, when sp2 is created, sp1 does not give up the ownership, changing its wrapped pointer to NULL; it only increments the reference counter. When the two shared pointer objects get out of scope, the last one that is destroyed will release the resource. There are no comments yet. Be the first to comment!
https://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c15361/A-TR1-Tutorial-Smart-Pointers.htm
CC-MAIN-2017-51
refinedweb
615
59.64
table of contents - buster 1.1.1d-0+deb10u3 - testing 1.1.1h-1 - unstable 1.1.1i-1 - experimental 3.0.0~~alpha4-1 NAME¶SSL_get_peer_certificate - get the X509 certificate of the peer SYNOPSIS¶ #include <openssl/ssl.h> X509 *SSL_get_peer_certificate(const SSL *ssl); DESCRIPTION¶SSL_get_peer_certificate() returns a pointer to the X509 certificate the peer presented. If the peer did not present a certificate, NULL is returned. NOTES¶Due(). RETURN VALUES¶The following return values can occur: - NULL - No certificate was presented by the peer or no connection was established. - Pointer to an X509 certificate - The return value points to the certificate presented by the peer. SEE ALSO¶ssl(7), SSL_get_verify_result(3), SSL_CTX_set_verify(3) Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <>.
https://manpages.debian.org/buster/libssl-doc/SSL_get_peer_certificate.3ssl.en.html
CC-MAIN-2021-04
refinedweb
148
52.56
From our sponsor: From online stores to member areas, Squarespace is everything you need to sell anything. Superhero stories have captivated us for decades — from the fantastic worlds and characters of comic books, to the spectacular visual effects that help bring them to life in movies. In this tutorial, we’ll take inspiration from that and learn how to create and animate a superhero-like illustration effect for the web. Well, of course we don’t have the super powerful tools of big Hollywood studios available for us in our browsers, but worry not, SVG filters and masks will come to the rescue! 💪 We’ll learn how to recreate this cool mutant transformation effect. In case you’re not familiar with her story, Raven Darkhölme, better known as Mystique, is a shapeshifter character from the X-Men franchise. She has a natural navy-blue skin and can manipulate her body to turn into pretty much any person she wants. That’s certainly a useful ability for running away in disguise, something that she does quite frequently. So, to add an intriguing backstory to our project, she’s portrayed in a classic-style wanted poster. To prepare the illustrations, we’ll use Inkscape 1.1, a free open source vector drawing editor that you can download here. You can use any other vector drawing editor that you prefer. Just keep in mind that the steps will most likely be different. You also need to have at least an intermediate level of HTML, CSS and JavaScript knowledge and be familiar with GSAP, the library we’ll be using for animations. One last thing before we start As of now, animated SVG filters usually work better in Chrome than other browsers. Keep in mind that they can also slow down the page significantly. SVG filters are convenient and easy to use, but consider using WebGL if performance is a concern, since it’s GPU-optimized. Codrops has lots of resources about it. How to prepare a vector illustration for the web Inkscape is a powerful vector graphics editor full of advanced features for illustration and digital art. Plus, it’s a convenient tool to work with SVGs in a visual way, instead of writing all the code from scratch 😅. We won’t really cover the illustration process in Inkscape in detail for this tutorial, but you can learn more about it from the official documentation. Creating the drawing Ok, let’s get started. Follow Inkscape’s quick setup guide and it will get you to an empty canvas screen. Head over to File > Document Properties in order to set the page size and units. It’s important to use pixels instead of millimeters or inches, since it’s a lot easier to work with pixels on the web. From there, all you need to do is create your illustration using Inkscape’s tools, drawing everything using shapes and curves or importing other images to compose them on the screen. For this illustration in particular, I used Procreate on an iPad to draw the lines and imported them as PNGs into Inkscape with File > Import. Then, I used Path > Trace Bitmap to generate a high quality vector drawing from the PNG and colored by manually tracing basic shapes behind the lines. The final result was a composition of 4 different pieces: the background, foreground, mystique in her natural blue form and mystique in a transformed human form. Exporting an optimized SVG Once your illustration is complete, it’s time to export the SVGs. Each one of the pieces of the composition should go in its own file, since they’ll be combined on the page. ⚠️ Attention: Using Inkscape’s or your preferred editor’s native format on the web is not a good idea. These formats usually add extra data to the output that is not interpreted by browsers and just ends up making the file unnecessarily bigger. Luckily, Inkscape comes with a super handy File > Save as... > Optimized SVG option that produces a much smaller SVG. On the export panel, it’s important to check SVG Output > Enable viewboxing, in order to make the images easier to position with CSS. The remaining defaults options are fine, but I’d encourage you to experiment a little bit with them too. If you’re really serious about optimizing your assets, using SVGO is a must. It’s available as a command line tool and web interface on the super neat website SVGOMG. Once again, I recommend you enable Prefer viewBox to width/height to make positioning and sizing more flexible. I also recommend Prettify markup in case you intend to edit the exported code manually, it makes the output more readable. Markup and Style Let’s start with a very simple HTML5 page structure with index.html, style.css and index.js files and an images directory to store all the exported SVGs. Starting from a very simple HTML5 page, we import our stylesheets in the head and the script at the bottom. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http- <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Mystique</title> <link rel="stylesheet" href="style.css"> </head> <body> <svg class="picture" viewBox="0 0 196 296"> <rect id="bg-color" x="0" y="0" width="100%" height="100%" fill="#4a5eb2"/> <image id="background" x="0" y="0" width="100%" height="100%" href="images/background.svg"/> <image id="transformed" x="0" y="0" width="100%" height="100%" href="images/transformed.svg"/> <image id="mystique" x="0" y="0" width="100%" height="100%" href="images/mystique.svg"/> <image id="foreground" x="0" y="0" width="100%" height="100%" href="images/foreground.svg"/> </svg> <script src="index.js"></script> </body> </html> In the body, we have a single SVG element with viewBox=“0 0 196 296”. The viewBox parameter of an SVG file defines the cropping region of the image, the first two numbers are the top left point coordinates, and the two last, the width and height, respectively. We have to use the same size we defined back in Inkscape. Next, we import the images using <image> tags, each one of them positioned on the top left ( x=“0” y=“0”) and filling the entire viewport ( width=“100%” height=“100%”). Behind everything, we have a rect with the color we want for the background. It’s important to give each element its own id for organization. Styling is quite simple, a full page container with display: grid helps us to get the picture aligned to the center with place-self: center. To bring everything together and finalize the composition, we add a purple gradient to the background and a drop shadow. html, body { width: 100%; height: 100%; overflow: hidden; } body { display: grid; background: radial-gradient(at top, #5e4082, #3a124d); padding: 1rem; box-sizing: border-box; } .picture { place-self: center; max-width: 100%; height: 80vh; filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.5)); } The result should look like similar to the picture below. Both images are overlapping each other, but that’s ok, we’re going to use masks to create the sliding effect. Setting up svg masks 🎭 SVG masks are elements that define the transparency of the masked objects according to the color value information inside them. If a pixel of the mask is white, the corresponding pixel of the masked object will be visible; if gray, it will be partially transparent; and in case it’s black, it will be fully transparent. Everything outside the mask region will also be fully transparent. Hopefully, the diagram below will help you understand better how masks work: To define the mask, we add a <defs> element to the top of the SVG, with two <mask> tags inside it. One will be used to mask mystique ( id="mask_mystique"), the other will be used for her transformed version ( id="mask_transformed"). Each mask contains just a simple white rectangle with enough size to cover the entire visible area. Then, we apply the masks to their corresponding elements, using the mask="url(#mask_id)" attribute. <svg class="picture" viewBox="0 0 196 296"> <defs> <mask id="mask_mystique"> <rect class="mask" x="0" y="-100%" width="100%" height="100%" fill="white"/> </mask> <mask id="mask_transformed"> <rect class="mask" x="0" y="0" width="100%" height="100%" fill="white"/> <> Mystique’s mask is positioned at. . Adding visual effects ✨ SVG filters are super powerful tools to add some coolness to our boring simple SVGs. There’s A LOT of different filter options that are out of the scope of this tutorial, but if you want to read more about them, Codrops has plenty of tutorials explaining each one in detail. Now, let’s move on to the code. Inside the same <defs> tag we created for masks, we add a <filter id="distort">. <filter id="distort"> <feTurbulence type="turbulence" baseFrequency="0.08" numOctaves="2" result="turbulence" /> <feDisplacementMap in2="turbulence" in="SourceGraphic" scale="50" /> </filter> Filters are composed of primitives that can also be stacked and composed together. To create Mystique’s cool transformation effect, we’re going to use the feTurbulence primitive, which generates a Perlin Noise pattern. The attribute type of feTurbulence controls the type of turbulence that is generated, baseFrequency controls its size and numOctaves its roughness. Then, we name the output with result="turbulence". Next we’re going to use the output of feTurbulence and combine it with the SourceGraphic (the pixels of the object to which the filter is applied) into a feDisplacementMap primitive. This primitive deforms the content of its in parameter using the color information of in2. The scale controls the length of the deformation. 📝 Tip: I highly recommend you to play with Yoksel’s SVG filter playground, if you want to check out how each one of these parameters affects the output of the primitives 🤗. All we have to do next is apply the filters to both masks. Since the mask rectangles will be animated, to create the flowing transformation, we want to add the filters to a wrapper group <g>. Otherwise, the filter distortion would move along with the masks statically, which would not look as cool 😢. To wrap up this section, here’s how the final SVG should look like: <svg class="picture" viewBox="0 0 196 296"> <defs> <filter id="distort"> <feTurbulence type="turbulence" baseFrequency="0.08" numOctaves="2" result="turbulence" /> <feDisplacementMap in2="turbulence" in="SourceGraphic" scale="50" /> </filter> <mask id="mask_mystique"> <g filter="url(#distort)"> <rect class="mask" x="0" y="-100%" width="100%" height="100%" fill="white"/> </g> </mask> <mask id="mask_transformed"> <g filter="url(#distort)"> <rect class="mask" x="0" y="0" width="100%" height="100%" fill="white"/> </g> <> Animating with GSAP GSAP is an amazing JavaScript library for web animations. It can flawlessly handle animations from simple to complex with a streamlined API that gets the job done smoothly. We’re going to use it in our project to animate the masks rectangles. If you want to know more about how to use GSAP’s features, check out the official documentation here. import gsap from "gsap" const tl = gsap.timeline({ repeat: -1, // Makes animation repeat infinitely yoyo: true, // Animation will go back-and-forth like a yoyo }) tl .to('.mask', { translateY: '100%', // Move .mask elements down by 100% duration: 3, }) .to('#bg-color', { attr: { fill: '#ffd11b' // Change the "fill" attribute of #bg-color }, duration: 2 }, '<+=1') // Start 1s after the previous animation Looking into the code, first we import the GSAP and create a timeline that repeats back-and-forth. Next we animate the masks by translating them in the Y (vertical) axis and change the color of the #bg-color element to a #ffd11b yellow. The result should look like the demo from the intro: Super cool! But what about adding some interactivity to make the animation follow the mouse? Mouse movement events can be tricky to work with on the web, because they’re fired very frequently, forcing the browser to compute animations way too many times 😰. We can use lodash.throttle to help us ensure that the mouse move handler will not be triggered at a rate too fast. If you’re comfortable with it, you can also use the native requestAnimationFrame function, it’s perfect for throttling expensive animations like these. import gsap from "gsap" // We'll use throttle to make sure the mousemove event // doesn't trigger too often import { throttle } from "lodash" const tl = gsap.timeline({ paused: true, // Start at a paused state defaults: { ease: 'none' // With no easing (linear) } }) tl .to('.mask', { translateY: 296, duration: 3, }) .to('#bg-color', { attr: { fill: '#ffd11b' }, duration: 2 }, '<+=1') const $picture = document.querySelector('.picture') // Mouse move handler function handleMoveEvent(ev) { // Get the viewport rectangle of the picture const rect = $picture.getBoundingClientRect(); // Compute the relative mouse position inside the rect const relPos = (ev.clientY - rect.top) / (rect.bottom - rect.top) // Use the computed value to control the animation progress tl.progress(relPos) } // Bind the mousemove event, with a throttle to ensure it only // triggers once at every 60 milliseconds $picture.addEventListener( 'mousemove', throttle(handleMoveEvent, 60) ) This should be the final result of this project, a complete, interactive and super cool SVG super hero animation! I hope you enjoyed it and learned a bit about the superpowers of SVGs 😆.
https://tympanus.net/codrops/2021/08/09/superhero-animation-effect-with-svg-filters/
CC-MAIN-2022-40
refinedweb
2,220
62.27
ed T!"et#er$" 1. The flexibility of film allows the artist __________ unbridled imagination to the animation of cartoon characters. (A) to bring (B) bringing (C) is brought (D) brings2. Traditionally __________in !ew "ngland on Than#sgi$ing %ay. (A) when ser$ed is sweet cider (B) when sweet cider is ser$ed (C) is ser$ed sweet cider (%) sweet cider is ser$ed &. Ty'ical of the grassland dwellers of the continent __________ or 'ronghorn. (A) it is the American antelo'e (B) the American antelo'e is (C) is the American antelo'e (%) the American antelo'e (. )illian %. *ald 'ublic health nurse and __________ was born in Cincinnati +hio in 1,-.. (A) reforming society (B) social reformer (C) who reformed society (%) her social reform /. Co''er sulfate s'read in 0udicious amounts #ills algae __________ harming fish or a1uatic in$ert2 ebrates. (A) does not (B) but does no (C) exce't (%) without -. +f the millions who saw 3aley4s comet in 15,- how many 'eo'le __________long enough to see it return in the twenty2first century. (A) will they li$e (B) they will be li$ing (C) will li$e (%) li$ing .. __________that fear ha''iness sadness and sur'rise are uni$ersally reflected in facial ex'ressions. (A) Anthro'ologists ha$e disco$ered (B) Anthro'ologists disco$ering (C) The disco$ery by anthro'ologists (%) %isco$ered by anthro'ologists ,.6n 15-(__________of 3enry +ssawa Tanner4s 'aintings was shown at the 7mithsonian 6nstitution. (A) was a ma0or collection (B) that a ma0or collection (C) a collection was ma0or (%) a ma0or collection 5. __________irritating effect on humans the use of 'henol as a general antise'tic has been largely discontinued. (A) 6ts (B) *here its (C) 7ince its (%) Because of its 18.6n order to remain in existence __________must in the long run 'roduce something consumers consider useful or desirable. (A) a 'rofit2ma#ing organi9ation (B) a 'rofit2ma#ing organi9ation which (C) therefore a 'rofit2ma#ing organi9ation (%) whiche$er a 'rofit2ma#ing organi9ation 11.The greater the 'o'ulation there is in a locality __________for water trans'ortation and dis'osal of refuse. (A) the greater the need there is (B) greater need (C) is there great need (%) the great need 12. A historical no$el may do more than mirror history: __________future e$ents. (A) e$en influencing (B) it may e$en influence (C) may e$en influence (%) that it may e$en influence 1&. __________a child scul'tor Anne *hitney showed an eager intellect and artistic talent that her 'arents recogni9ed and encouraged. (A) 3as been (B) 6t was while (C) 7he was (%) As 1(. 6t is widely belie$ed that the 'ull of gra$ity on a falling raindro' changes__________round sha'e into a teardro' sha'e. (A) of the dro' (B) the dro'4s (C) dro' of (%) dro's their 1/.__________modern offices becoming more mechani9ed designers are attem'ting to 'ersonali9e them with warmer less se$ere interiors. (A) 6f (B) But (C) *ith (%) +nce 1-. !ot woman held a 'residential cabinet 'osition in the ;nited 7tates until 15&& when <rances =er#ins became secretary of labor. 1.. The human body relies on certainty nutrients for its sur$i$al. 1,. Too much electric current may flow into a circuit as a result either of a fault in the circuit and of an outside e$ent such as lightning. 15. The A''alachian Trail extending a''roximately 2 828 miles from >aine to ?eorgia is the longer continuous mar#ed foot'ath in the world. 28. <or years ele'hants were hunted for food and i$ory and as a result theirs numbers ha$e been greatly reduced. 21. Barges which carrier most of the hea$y freight on ri$ers and canals are usually 'ro'elled by towing. 22. Although afflicted by serious eyesight 'roblems Alicia Alonso was one the 'rinci'al stars of the American Ballet Theater and later formed her own dance com'any. 2(. 6t is more difficult to write sim'ly directly and effecti$e than to em'loy flowery but $ague ex'ressions that only obscure one4s meaning. 2/. %ifferent s'ecies of octo'uses may measure anywhere from two inches to o$er thirty feet in long. 2-. According to some theories deri$ed from 'sychoanalysis life is su''osedly easier and mo re 'leasant when inhibitions o$ercoming. 2.. *hen rainbows a''ear they are always in the 'art of the s#y o''osite directly the 7un. 2,. Ben0amin <ran#lin drew a 'olitical cartoon that is credited raising 18 888 $olunteers for the American @e$olutionary *ar. 25. The begins of the modern chemistry laboratory go bac# to the wor#rooms of medie$al lchemists. &8. 6n many 'ieces of music there is a dominant theme on which the restful of the com'osition is centered. &1. )uminescence refers to the emission of light by means another than heat. &&.?eorge *ashington Car$er found hundred of uses for the 'eanut the sweet 'otato and the soybean and thus stimulated the culti$ation of these cro's. &(. A citadel a fortress designed for the defense of a city usually standed on to' of a hill. &/. Conser$ati$e 'hiloso'hers argue that the $ery structure of society is threatening by ci$il disobedience while humanists stress the 'rimacy of the indi$idual conscience. &-. 7ince 15.1 the regional cor'orations set u' in Alas#a by Congress managing e$erything from fishing to ban#ing. &.. A roc#et burns 'ro'ellant ra'idly and most roc#ets carry a su''ly that last 0ust a few seconds. &,. Textile art is #nown for both its tactile and $ision 1ualities. &5. The metal aluminum has been first isolated early in the nineteenth century. (8. ?ulls can often be see swoo'ing o$er large bodies of water. 1989 05 1. The difference between libel and slander is that libel is 'rinted while__________. (A) s'o#en is slander (B) is s'o#en slander (C) slander is s'o#en (%) is slander s'o#en 2. ?reat numbers of tiny shelled animalsAon the ocean floor. (A) )i$e (B) )i$ing (C) They will li$e (%) 6f they li$ed &. The #nee is the 0oint __________the thigh bone meets the large bone of the lower leg. (A) when (B) where (C) why (%) which (. Closed 'lane figures li#e the s1uare or the e1uilateral triangle can be grou'ed into a class __________'olygons. (A) called (B) to call (C) is called (%) call as /. Acids are chemical com'ounds that in water solution ha$e __________ a corrosi$e action on metals and the ability to turn certain blue $egetable dyes red. (A) tastes shar' (B) shar'2tasting (C) a shar' taste (%) tasting shar' -. __________the history of the tough strong2willed !ebras#a farmer. (A) !ot only is much of the history of !ebras#a (B) Although it is much of the history of !ebras#a that is (C) 6t is much the history of !ebras#a4s being (%) >uch of the history of !ebras#a is .. Billie 3oliday4s re'utation as a great 0a992blues singer rests on her ability __________emotional de'th to her songs. (A) be gi$ing (B) are gi$en (C) being gi$en (%) to gi$e ,. __________1,5/ did Cornell ;ni$ersity begin to offer a degree in ornithology. (A) !ot until (B) !ot since (C) ;ntil (%) 6n 5. ;niform acceleration occurs __________the rate of change remains the same o$er successi$e and e1ual inter$als of time. (A) according (B) if (C) with (%) under 18. =eo'le4s ex'ectations for a higher standard of li$ing increase __________. (A) conditions in their community im'ro$e (B) since conditions in their im'ro$ing community (C) conditions im'ro$e in their community (%) as conditions in their community im'ro$e 11. "ssentially a theory is an abstract symbolic re'resentation of __________reality. (A) what it is concei$ed (B) that is concei$ed (C) what is concei$ed to be (%) that is being concei$ed of 12. All of the 'lants now raised on farms ha$e been de$elo'ed from 'lants __________wild. (A) once they grew (B) they grew once (C) that once grew (%) once grew 1&. __________relati$ely costly the diesel engine is highly efficient and needs ser$icing infre1uently. (A) "$en (B) 6t is (C) "$en though (%) There is 1(. __________images out of clay stone and metal. (A) The sha'ing of scul'ture (B) 7cul'ting the sha'es (C) To sha'e scul'ture (%) 7cul'tors sha'e 1/. __________dates from the end of the eighteenth century. (A) The modern circus (B) That the modern circus (C) *hile the modern circus (%) The modern circus that 1-. The boiled 'oint of any li1uid is determined by the 'ressure of the surrounding gases. 1.. The @anger s'acecraft it 'ro$ided more than 1. 888 'ictures of the moon. 1,. >any 'eo'le who li$e in !ew Bor# City thin#s that life in a large city offers s'ecial ad$antages. 15. The scientific re$olution of the early 15884s affected education by change the nature of technology. 28. >eadowlar#s are about the same si9e than robins but they ha$e hea$ier bodies shorter tails and longer bills. 21. +n >ay 28 15&2 Amelia "arhart became the first woman fly solo across the Atlantic +cean. 22. Translated into terms of 'sychological theory association has been thought of as the basis of to learn conditioning and creati$e thin#ing. 2&. The 7tatue of )iberty was originally 'ro'osed in 1,-/ to commemoration the alliance of <rance with the American colonies during the American @e$olution. 2(. @e'tiles are widely distributed all o$er the world but are much abundant in warm regions and are $irtually absent beyond the treeline in the Arctic. 2-. 6ndustrial buyers are res'onsible for su''lying the goods and ser$ices that an organi9ation re1uired for its o'erations. 2.. The most easiest 'rocess for mining gold is 'anning which in$ol$es using a circular dish with a small 'oc#et at the bottom. 2,. <arm animals ha$e been regardless by nearly all societies as a $aluable economic resource. 25. Although it is any longer the big business that it was in the forties radio continues to be a medium of essential communication es'ecially at the local le$el. &8. The field of dynamics in 'hysics is concerned with a 'article4s motion in relation to the forces acting it. &1. 6n the ;nited 7tates both the federal and state go$ernments ha$e laws designed to guard consumers against dece'ti$e ad$ertise. &2. ?ore Cidal has steadily 'ursue a literary career remar#able for its 'roducti$ity $ersatility and un'redictability. &&. *hen o$erall ex'orts exceed im'orts a country said to ha$e a trade sur'lus. &(. 6nstructors at the school of American Ballet first examine a young a''licant4s inste' to see whether it is 'liant and shows 'romising of a good arch. &/. Anthro'ologists agree that our 'rimiti$e ancestors who inhabited the tro'ics 'robably ha$e natural 'rotection against the sun. &-. Beha$ior modification techni1ues wor# best with 'roblems that manifest itself in o$ert actions. &.. Because they are generally ta#en sim'ly to obtain a recogni9able and relati$ely clear image most non'rofessional 'hotogra'hs demand few e1ui'ment. &5. Common to !orth America those cinnamon fern is found in wet 'laces. (8. The origins of the %emocratic 'arty is often traced to the coalition formed behind Thomas Defferson in the 1.584s to resist the 'olicies of ?eorge *ashington4s administration. 10 1989 08 1. The Cubists were concerned with how__________a gi$en sub0ect from different 'oints of $iew simultaneously. (A) re'resented (B) do the re'resent (C) to re'resent (%) re'resenting 2. 7ometimes__________to 'lace 'hysics and chemistry into se'arate categories. (A) difficult (B) is difficult (C) it is difficult (%) that it is difficult &. >artha ?raham __________ has run her own dance com'any for half a century. (A) is the great modern choreogra'her (B) one of the great modern choreogra'hers (C) that the great modern choreogra'hers (%) the modern choreogra'hers were great (. )ong before children are able to s'ea# or understand a language __________communicate through facial ex'ressions and by ma#ing noises. (A) howe$er (B) they (C) furthermore (%) who /. The seating of musicians in an orchestra is arranged __________to 'roduce the desired blend of sounds from the $arious musical sections . (A) the conductor of (B) from the conductor (C) the conductor and (%) by the conductor -. The worldwide race to de$elo' an affordable synthetic fuel has so far consumed billions of dollars and __________ few results. (A) yielded (B) yielding (C) yield ha (%) has a yield of 11 .. "x'eriments in the 'hotogra'hy of mo$ing ob0ects __________ in both the ;nited 7tates and "uro'e well before 1588. (A) ha$e been conducting (B) were conducting (C) had been conducted (%) being conducted ,. The ;ni$ersity of ?eorgia __________ in 1.,/ was the first state su''orted uni$ersity in the ;nited 7tates. (A) chartered (B) was chartered (C) it was chartered (%) to be chartered 5. Than#s to modern irrigation cro's now grow abundantly in areas where once __________ cacti and sagebrush could li$e. (A) nor (B) not the (C) none other (%) nothing but 18. __________ in the late 1,884s some libraries had to #ee' as many as twenty to thirty co'ies of each of >ary Dane 3olmes4s boo#s on hand. (A) 6n$entories showing (B) That show in$entories (C) 6n$entories show that (%) 7howing the in$entories 11. The scholarly interest in 'erce'tion stems largely from 1uestions about the sources and $alidity of what __________. (A) it is #nown as human #nowledge (B) is #nown as human #nowledge (C) #nown human #nowledge (%) is human #nowledge #nown 12. Because of the Aleuts4 constant ex'osure to cold weather they ha$e long recogni9ed __________ . (A) and body needs to be fat (B) body needs the fat (C) how fat the body needs (%) the body4s need for fat 1&. Almost all economists agree __________ by trading with one another. (A) nations that are gained (B) nations they gain (C) gaining nations 12 (%) that nations gain 1(. The de$elo'ment of mechanical time'ieces s'urred the search for __________ with which to regulate them. (A) more accurate than sundials (B) more accurate sundials (C) sundials more accurately (%) more accurately than sundials 1/. Anthro'ology is a science __________anthro'ologists use a rigorous set of methods and techni1ues to document obser$ations that can be chec#ed by others. (A) in that (B) that in (C) that (%) in 1-.A li1uid is similar to a gas because has molecules are not fixed to each other in any s'ecific way. 1..The Conestoga wagon used for to carry hea$y loads o$er long distances originated around 1.2/ in a region of =ennsyl$ania occu'ied by the Conestoga 6ndians. 1,.=ro$idence @hode 6sland is a busy manufacturing city and sea'ort as well the state ca'ital. 15.The young of most bird s'ecies are totally de'endence on 'arental care after hatching. 28.%uring most of this century A. =hili' @andol'h struggled for Blac# rights in the ;nited 7tates and becomes an im'ortant figure in the labor mo$ement. 21.6t has been calculated that the "arth4s circumference around the e1uator is o$er forty longer miles than the circumference around the two 'oles. 22. A fish must constantly to gul' water in order to #ee' a current flowing through its delicate gills. 2&. >aria >artine9 a =ueblo 6ndian redisco$ered the ancient art of =ueblo blac# 'ottery A and by teaching the 'rocess to family and friends de$elo' a lucrati$e business. 2(. >uscular motion is caused by the stimulate of s'ecific ner$e cells in the brain and s'inal cord. 13 2/. The first libraries in the !orth American colonies was established in >assachusetts in the year 1-&,. 2-. *hen does a neutron from one atom collides with the nucleus of another atom a chain reaction can occur. 2.. Ali#e other academic disci'lines sociology has se$eral ma0or sub2disci'lines. 2,. An enormous $ariety of information may be obtained from a largest daily news'a'er. 25. Before the in$ention of the cloc# 'eo'le had to reliable on the celestial bodies to tell time. &8. 3ow many 'eo'le remember listening to +rson *elles415&, radio broadcast. EThe *ar of the *orlds F *hich con$ince thousands that s'ace aliens had in$aded the "arthG &1. =ewter a metal with an ancient heritage is still 'ractical medium for the non'rofessional metalwor#er. &2. According to cogniti$e theories of emotion anger occurs when indi$iduals belie$e that A they ha$e been harmed and that the harm was either a$oidable and undeser$ed. &&. Dac#ie >clean4s recordings ha$e shown that he is one of the few 0a99 musicians who style A B of 'laying has #e't 'ace with the e$olution of modern 0a99. &(. 3ow !ati$e Americans de$elo'ed corn is a 'u99ling for no wild corn has e$er been disco$ered and it grows only where 'eo'le 'lant and tend it. &/. A 'rinci'le of manager is to ensure that e$ery action or decision achie$es a carefully 'lanned goal. &-. A good exercise 'rogram hel's teach 'eo'le to a$oid the habits that might shorten the li$es. &,. @esearchers at the ;ni$ersity of Colorado are in$estigating a series of indicators that A B could hel' themsel$es to 'redict earth1ua#es. 14 &5.<ungi are im'ortant in the 'rocess of decay which returns ingredients to the soil enhances soil fertility and decom'ose animal debris. (8. A common use with gold in the nineteenth century was as a standard for the $alue of money. 15 1989 10 1. Huasars __________ emitting extremely intense radio wa$es and $isible radiation. (A) 7tar2li#e ob0ects are (B) 7tar2li#e they are ob0ects (C) are star2li#e ob0ects (%) are they star2li#e ob0ects 2. >ary Cassatt s'eciali9ed __________ mothers with their children. (A) 'ainted (B) who 'ainted (C) 'aintings (%) in 'ainting &. ?orillas are 1uiet animals __________ they are able to ma#e about twenty different sounds. (A) how (B) in s'ite of (C) because of (%) e$en though (. <rom 15(- to 15(5 __________ *illiam 3enry 3astie ser$ed as go$ernor of the Cirgin 6slands. (A) the lawyer (B) he was the lawyer (C) the lawyer who (%) was the lawyer /. __________ struc# a tuning for# 'roduces an almost 'ure tone retaining its 'itch o$er a long 'eriod of time. (A) *hen is it (B) +ne is (C) *hen it is (%) 6s one -. __________ one time >anchester !ew 3am'shire was the home of the most 'roducti$e cotton mills in the world. (A) +n (B) At (C) By (%) To .. The edible tube mushroom __________ a cushion2li#e moist ca' that is light brown or dar#ish red. (A) which has (B) to ha$e (C) ha$ing (%) has 16 ,. 6n 15-1 the entertainer Chubby Chec#er introduced a __________ to !ew Bor#4s roc#4n I roll fans. (A) new dance the twist (B) twist was the new dance (C) twist the new dance that (%) new dance is the twist 5. 6n scul'ture __________FmodelingF denotes a way of sha'ing clay wax or other 'liable materials. (A) to the term (B) is termed (C) the term (%) to term 18. The ca'acity for flight __________insects from the other in$ertebrates. (A) to distinguish (B) distinguishes (C) which distinguishes (%) distinguishing 11. Although 'ecans are most 'lentiful in the southeastern 'art of the ;nited 7tates they are found __________ +hio and 6llinois. (A) far north (B) north as far (C) farthest north (%) as far north as 12. __________ of caffeine can result in restlessness insomnia and e$en delirium. (A) Consuming in excess (B) "xcessi$e consum'tion (C) To consume excessi$ely (%) The consum'tion excessi$e 1&. Considered one of the leading 'oets in America today __________. (A) a number of boo#s and 'lays ha$e also been written by 7onia 7anche9 (B) 7onia 7anche9 has also written a number of boo#s and 'lays (C) A number of 7onia 7anche9 boo#s and 'lays ha$e been written (%) There ha$e been a number of boo#s and 'lays written by 7onia 7anche9 1(. Cariables such as indi$idual and cor'orate beha$ior __________ nearly im'ossible for economists to forecast economic trends with 'recision. (A) ma#e (B) ma#e it (C) it ma#es (%) ma#es it 1/. __________ by transferring the blame to others is often called sca'egoating. 17 (A) "liminate 'roblems (B) The eliminated 'roblems (C) "liminating 'roblems (%) =roblems are eliminated 1-. 7ea turtles date bac# 188 million year and are the only ancient sea re'tiles to sur$i$e the 'resent %ay. 1.. At a first the scientific method may a''ear to be a narrow and restricti$e way of gaining understanding. 1,. 7ince 'rehistoric times artists ha$e 'ortrayed sub0ects that re'resentati$e their culture. 28. >ammals lose body heat to them en$ironment in cold weather more 1uic#ly than in hot weather. 21. >ahogany is often considered the finest cabinet wood because they has most of the 1ualities desired for furniture ma#ing. 22. The situation comedy has 'ro$ed to a remar#ably durable commercial tele$ision format. 2&. Calcium the most abundantly mineral in the body wor#s with 'hos'horus in maintaining bones and teeth. 2(. 7oil science begun with the formulation of the theory of humus in1,8,. 2/. 7cholars tend to cite 1,&1 as the started of the ;nited 7tates abolitionist mo$ement. 2-. >ary >c%owell shared Dane Addam4s interest in social wor# also was a loyal su''rter of the )eague of !ations. 2.. 6n adolescence a young 'erson may ex'erience some stress emotional due to conflicting and confusing social demands. 2,. 7ituated in the heart of a grain2farming and li$estoc#2raising region Abilene Jansas is a 'ros'erous trading and distribute center. 18 25. A hologram is a 'attern usually made on film in that can create a three2dimensional image of a scene. &8. The general sales tax has been a ma0or source of income for state go$ernments much of which deri$e more than half of their budgets from it. &1. =rinci'al #nown for his dictionary !oah *ebster was also the first e'idimiologist in the ;nited 7tates. &2. )i1uid lubricants contrast widely in weighing thic#ness and boiling 'oint. &&. 6nterest with ma0or social e$ents led to a 'eriod of growth in 0ournalism after 15(/. &(. 7aint "lmo4s fire is a luminous blue discharge of electricity sometimes seen when a thunderstorm. &/. Almanacs in sim'le form ha$e been #nown from the in$ention of writing. &-. 6f laid out in straight line the human digesti$e tract would measure a''roximately thirty foot in length. &.. The relationshi' of )atin American music to Blac# music in the ;nited 7tates is clearly e$ident in the unaccented beats that are common to either. &,. Today it is generally recogni9ed as the 'rimary function of the <ederal @eser$e 7ystem is to foster the flow of credit and money that will e$entually facilitate a balance in international 'ayments. &5. =ure flint is too hard and e$en2grained that it chi's in smooth cur$ed fla#es. (8. The ty'ical ?eorgian2style house is rectangular in sha'e at less two stories high and designed around a central stairway. 19 1990 01 1. 222ratchet is a wheel or bar that can mo$e in only one direction. (A) A (B) 6t is a (C) Although a (%) There is a 2. Thomas Defferson4s achie$ements as an architect ri$al his contributions 222a 'olitician. (A) such (B) more (C) as (%) than &. The chief foods eaten in any country de'end largely on 222best in its climate and soil. (A) it grows (B) what grows (C) does it grow (%) what does it grow (. =ossibly the greatest ad$ance in 222materials came with the in$ention of a chea' way to ma#e steel. (A) bridge2building (B) building of bridges (C) building a bridge (%) bridges are built /. 222 sna#es fre1uently subdue their 'rey without in0ecting 'oison. (A) Contrary to general belief (B) ?eneral belief contrary to (C) Belief contrary to general (%) Contrary belief general to -. Two years after she was chosen 'resident of the Texas 7tate 7enate 222successfully for a seat in the ;nited 7tates Congress. (A) Barbara Dordan4s cam'aign being (B) Barbara Dordan cam'aigned (C) Cam'aigning for Barbara Dordan (%) Barbara Dordan cam'aigning .. The $alues of a 'eo'le their customs and their 'erce'tions of the world 222their language. (A) are influenced (B) be influenced (C) influencing (%) influence ,. +$er a $ery large number of trials the 'robability of an e$ent4s 222is e1ual to the 'robability that it will not occur. (A) occurs (B) will occur (C) can occur (%) occurring 5. 222fashioned from a wic# floating in a bowl of oil functioned according to the 'rinci'le of ca'illary action. (A) All lam's early (B) )am's all early (C) All early lam's (%) "arly all lam's 20 18. Annie Dum' Cannon 222disco$ered so many stars that she was called Ethe census ta#er of the s#y.F (A) a leading astronomer who (B) who as a leading astronomer (C) was a leading astronomer (%) a leading astronomer 11. The less the surface of the ground yields to the weight of the body of a runner 222to the body. (A) the stress it is greater (B) greater is the stress (C) greater stress is (%) the greater the stress 12. And ideal is a standard 222'eo'le 0udge real 'henomena. (A) how (B) of (C) by which (%) for it 1&. >aine has 222weather than most of the other states in the continental ;nited 7tates. (A) coolest (B) the coolest (C) cooler (%) the cooler 1(. Amoebas are 222small to be seen without a microsco'e. (A) far too (B) far and (C) so far (%) as far as 1/. ?ra'hite conducts electricity 222does not burn. (A) because (B) if (C) when (%) and 1-. The methods of s'ectrum analysis $ary according to the wa$elength region were studied. 1.. 3urricanes are se$ere cyclones with winds o$er se$enty2fi$e miles an hour who originate o$er tro'ical ocean waters. 1,. A great 'ro'ortion of the seeds of desert flora they 'ossess germination2inhibiting substances. 15. *indow treatment furniture arrangement and color combine all contribute to the o$erall im'ression of a room. 28. 3ar$esting of grains is affected by annual changes in tem'erature or in the amount of moisture but both. 21 21. %ue to its excellent tensile strength acetate rayon is an im'ortant material for 'roducts so as balloons 'arachutes fire hoses and webbing. 22. 6t has not been determined how years sea turtles can li$e in their natural en$ironment but they will reach a $ery old age if left undisturbed by humans. 2&. A footnote is characteristically em'loyed to gi$e information that is too long or too detailed be included in the body of a text. 2/. 6n mathematical terms modern algebra is set of ob0ects with rules for connecting or relating those ob0ects. 2-. Ali#e most fruit trees the 1uince is normally 'ro'agated from shoots or cuttings. 2.. A 'atent gi$es in$entors exclusi$e rights to their in$entions for a fix 'eriod of time. 2,. 6n 15,1 the fossil 0aw of a 're$iously un#nown small mammal was found onto a !a$aho reser$ation in Ari9ona. 25. The wild carrot #new as Hueen Anne4s lace ga$e rise to the culti$ated carrot in its domesticated form. &8. A statue a monumental a building or a 'ar# may be dedicated to commemorate a distinguished indi$idual. &1. The "arth4s magnetic 'oles are not stationary but slowly shift its 'osition. &&. The elbows are 0oints that connected 'eo'le4s u' arms with their forearms. 22 &(. Ants ha$e an elaborate structure social and en0oy a longe$ity far greater than that of most insects. &/. >unici'al 'lanners deal chiefly for the 'hysical layout of communities. &-. A musician with multi'ly talents Aretha <ran#lin is able to write songs that are unusually consistent in style and content. &.. *hether a healthy adult tends to feel hungry two three or four times a daily is a 1uestion of 'hysiology and of culture. &,. +ne of the most distinction dialects of !orth American "nglish ?ullah is s'o#en by many 'eo'le in the 7outh Carolina area. &5. The no$els of Dohn Chee$er belongs to a literary tradition that is concerned 'rimarily with manners. (8. =ennsyl$ania has the most institutions of higher learning than any other state has. 23 1990 05 1. *hen 222in arctic regions the Aleuts construct igloos as tem'orary winter shelters. (A) tra$el (B) to tra$el (C) tra$eling them (%) tra$eling 2. >ost substances contract when they free9e so that the density of a substance4s solid is 222of its li1uid. (A) than the higher density (B) higher than the density (C) the density is higher than that (%) the higher the density &. The mechanism by which brain cells store memories is 222clearly understood. (A) none (B) no (C) not (%) nor (. %esert animals 222a means of retaining moisture in such a hot dry climate if they are to sur$i$e. (A) need (B) needing (C) to need (%) was needed /. 222state of *yoming is also #nown as the E"1uality 7tateF because *yoming women were the first in the nation to $ote. (A) The (B) There is a (C) That the (%) As the -. <ructose is a monosaccharide sugar that is much sweeter 222. (A) than cane sugar does (B) does cane sugar (C) cane sugar (%) than cane sugar .. ?round 'lans and contour ma's of the "arth 222from aerial 'hotogra'hs. (A) can be drawn (B) can draw (C) to draw (%) drawn ,. By the middle of the twentieth century 'ainters and scul'tors in the ;nited 7tates had begun to exert 222o$er art. (A) influence worldwide a great (B) a great worldwide influence (C) influence a great worldwide (%) a worldwide influence 5. 222millions of galaxies exist in the $ast s'ace outside the >il#y *ay. 24 (A) 6t is estimated that (B) An estimate that (C) That is estimated (%) That the estimated 18. The extent of the harmful effect of locoweeds on animals de'ends on the soil 222the 'lants grow. (A) which (B) which in (C) in which (%) in 11. The o'eretta first 222as a 'o'ular form of musical theater in the nineteenth century. (A) to emerge (B) emerging (C) has emerged (%) emerged 12. 222com'lex organic catalysts originating in li$ing cells. (A) "n9ymes (B) "n9ymes are (C) "n9ymes which are (%) "n9ymes while they 1&. 6n the eastern 'art of !ew Dersey 222 a ma0or shi''ing and manufacturing center. (A) lies the city of "li9abeth (B) the city of "li9abeth lies there (C) around the city of "li9abeth lies (%) there lies the city of "li9abeth around 1(. *or# in 'ara'sychology 222 has attracted a relati$ely small number of scientists. (A) is a $ery contro$ersial field (B) which a $ery contro$ersial field is (C) a $ery contro$ersial field (%) a field $ery contro$ersial which 1/. 222 the constitution of the Chero#ee !ation 'ro$ided for a chief executi$e a senate and a house of re'resentati$es. (A) 6n 1,2. they drafted (B) The draft in 1,2. (C) 6n 1,2. was drafted (%) %rafted in 1,2. 1-. 7ociological studies ha$e found that dee'ly hold $alues and 'rinci'les are highly resistant to change. 1.. <or centuries large communities of 'eo'le ha$e li$ing on houseboats in 'arts of the world where the climate is warm and the waters are calm. 1,. Ben0amin <ran#lin made the first bifocal s'ectacles for self by sawing the lenses of his eyeglasses in half. 25 15. !ot only do artificial reefs 'ro$ide fish with food and shelter they also ser$e as im'ortantly underwater landmar#s. 28. The ;nited 7tates %e'artment of Agriculture su'er$ises the 1uality clean and 'urity of meat. 21. All birds ali#e most re'tiles and a few 'rimiti$e mammals de$elo' from embryos in eggs outside the mother4s body. 22. The ex'ansion of adult training 'rograms has resulted 'artially from the feminist mo$ement which encouraging women to im'ro$e their s#ills for the 0ob mar#et. 2&. The most significant cosmological characteristic of the galaxies are the red shift in their o'tical s'ectra. 2(. Dames *histler was indifferent to the titles of his 'ainted and e$en changed the names of some wor#s years after their com'letion. 2/. %u#e "llington4s orchestra 'laying his original com'ositions and arrangements achie$ing a fine unity of style and made numerous inno$ations in modern 0a99. 2-. >oles are almost com'letely blind although its tiny eyes can distinguish light from dar#. 2.. !oise is a 'sychological term referring toward un'leasant unwanted or intolerable sound. 2,. "li9abeth Blac#well the first woman medical doctor in the ;nited 7tates founded the !ew Bor# 6nfirmary an institution that ha$e always had a com'letely female medical staff. 25. Criminal contem't committed in the 'resence of the court may consist of disorderly beha$ior disres'ectful or disobedience of a 0udge4s orders. &8. The Cubist mo$ement in art was a reaction against traditional methods of 'ortray reality. &1. %uring the 1-884s s#illed shoema#ers scarce were in what is now the ;nited 7tates. 26 &2. 6f a atom loses any of its electrons it becomes 'ositi$ely charged and can combine chemically with other atoms. &&. The !ational "ducation Association conduct extensi$e research on a great many as'ects of education. &(. The 'ain2#illing agent most commonly administered in dentistry is the local anesthetic who 'roduces loss of feeling only in a s'ecific area. &/. Certain ty'es of com'uters wor# 'ro'erly only in en$ironments with controlled 'recisely tem'eratures. &-. The gorilla while not as curious than the chim'an9ee shows more 'ersistence and memory retention in sol$ing a 'roblem. &.. The belief in fairies ha$e existed from earliest times and the literature of many countries includes tales of fairies and their relationshi' to humans. &,. Acrylic 'aint enables artists to ex'eriment with many colors effects. &5. 7alt )a#e City ;tah4s ca'ital and largest city is industrial and ban#ing center. (8. A rat4s shar' teeth can gnaw through wood 'laster or soft metallic such as lead. 27 1990 08 1. @esin is a substance that 222in water. (A) does not dissol$e (B) do not dissol$e (C) not dissol$ing (%) not dissol$ed 2. 222hardiness daylilies can be culti$ated 'articularly easily. (A) Their (B) 7ince their (C) 6t is their (%) Because of their &.A biologist does not merely describe organisms but tries to learn 222act as they do. (A) what cause them to (B) causes them to what (C) what to cause them (%) what does to them (.Ca'ori9ation in connection with general 222 has a mar#ed effect on long K term climate. (A) atmos'heric conditions that (B) conditions are atmos'heric (C) are atmos'heric conditions (%) atmos'heric conditions /. The oldest city in the state 222 . (A) the 3udson4s Bay Com'any founded Cancou$er *ashington in the early nineteenth century (B) the founding of Cancou$er *ashington by the 3udson4s Bay Com'any in the early nineteenth century (C) Cancou$er *ashington was founded by the 3udson4s Bay Com'any in the early nineteenth century (%) 6n the early nineteenth century with the founding of Cancou$er *ashington by the 3udson4s Bay Com'any -. 222 raw materials into useful 'roducts is called manufacturing. (A) Transform (B) Transforming (C) Being transformed (%) *hen transforming .. Alexander ?raham Bell once told his family that he would rather be remembered as a teacher of the deaf 222of the tele'hone. (A) than in$enting (B) than as the in$entor (C) the in$ention (%) as the in$entor ,. Because its lea$es remain green long after being 'ic#ed rosemary 222 associated with the idea of remembrance. (A) and becomes (B) became (C) becoming (%) to become 5. 222 that of iron construction the technology for constructing buildings with reinforced concrete de$elo'ed rather ra'idly. 28 (A) %issimilar (B) %ifferent (C) !ot li#ely (%) ;nli#e 18. Although adult education in the ;nited 7tates began in colonial times 222 chief growth has ta#en 'lace since the 15284s. (A) its (B) so it (C) but its (%) it is 11. 3ot ob0ects emit 222 do cold ob0ects. (A) rays more than infrared (B) rays are more infrared than (C) more than infrared rays (%) more infrared rays than 12. An +lym'ic marathon is 2- miles and &,/ yards a''roximately 222 from >arathon to Athens. (A) the distance is (B) that the distance is (C) is that the distance (%) the distance 1&. Although 222 rigid bones exhibit a degree of elasticity that enables the s#eleton to withstand considerable im'act. (A) a''arently (B) are a''arently (C) a''arently their (%) are they a''arently 1(. +ne of the oldest ty'es of aesthetic theory is that of formism 222 . (A) reference to the imitation theory is 'o'ular (B) the imitation theory is 'o'ularly referred to (C) is the reference to the 'o'ular imitation theory (%) 'o'ularly referred to as the imitation theory 1/. A 'anda4s 'rimary acti$ity is slee' 222 its wa#ing hours loo#ing for food. (A) that it s'ends (B) for s'ending (C) and it s'ends (%) will s'end 1-. The unit of measurement #nown as a EfootF has originally based on the a$erage si9e of the human foot. 1.. 7ocial reformer <lorence Jelly 'layed a role in the 1,5& decision of the 6llinois legislature to 'rohibition child labor. 1,. The term EtechnologyF refers to the disco$eries and in$entions that hel' 'eo'le im'ro$e its way of life. 29 15. Broo#lyn !ew Bor# had a 'o'ulation of about 2& 888 when it becomes a city in 1,&(. 28. =eo'le can remember more information for higher 'eriods of time when they use more than one sense in the 'rocess of learning. 21. Da99 first flourished in !ew +rleans )ouisiana and then s'read at cities all across the country. 22. <lower ha$e long been culti$ated and bred for their beauty and their fragrance. 2&. *hen a s'inning ball bounces some of the energy contained in its rotation can transferred to its energy of forward motion. 2(. +ne $alues 'roduct of a mus# deer is mus# which comes from a gland near the male4s abdomen and is used in medicines and 'erfumes. 2/. The economy of )ittle @oc# Ar#ansas is basis 'rimarily on manufacturing wholesale and retail trade and go$ernment functions. 2-. The first ;nited 7tates citi9en to become a 'rofessional scul'tor was =atience )o$ell *right which wor#s were executed in wax. 2.. A electric current can consist of charges that are 'ositi$e negati$e or both. 2,. =rogress in the field of o'tically and new #inds of glass ha$e made it 'ossible to construct 'hotogra'hic lenses with a minimum number of materials. &8. The ;nited 7tates Constitution re1uires that the =resident be a natural2born citi9en thirty2fi$e years of age or be older who has li$ed in the ;nited 7tates for a minimum of fourteen years. &1. 3ow many 'eo'le reali9e that >ar0orie Jinnan @awlings The yearling is a minor literary classic and an im'ortant contribute to regional literatureG 30 &2. "nsuring an ade1uate water su''ly ha$e been a concern e$er since 'eo'le began to li$e in towns and cities. &&. The most substances ex'and in $olume when they are heated. &(. %ue to so'histicated trans'ortation networ#s 'eo'le can now buy the same ty'es of 'erishable goods in Toronto li#e in !ew Bor# City. &/. ?laciers that de$elo' nearly the !orth and 7outh =oles ad$ance into the sea brea# into 'ieces and become icebergs. &-. As ine$itably as human culture has changed with the 'assing of time so does the en$ironment. &.. <or some 'ur'oses it is con$enient to thin# of a surface as the locus generated when a line straight or a cur$e mo$es through s'ace in a 'rescribed manner. &,. A significant 'ro'ortions of the 'lants and animals of 3awaii exists nowhere else in the *orld &5. >ass ad$ertising is em'loyed when 'erson K to K 'erson selling is im'ractical im'ossible or sim'ly inefficiency. (8. >exican 0um'ing beans are actually seeds in which contain moth lar$ae whose acti$ity causes the seeds to E0um'.F 31 1990 10 1. The significance of mythology within a culture is reflected in 222 the amount of time de$oted to this acti$ity and the rele$ance of mythology to ceremonials. (A) 7torytellers ha$e 'restige (B) The 'restige of storytellers (C) Telling stories is 'restigious (%) =restige comes with storytelling 2. Although 222 some textile 'roducts it im'orts many as well. (A) the ex'orts of the ;nited 7tates (B) ex'orting of the ;nited 7tates (C) ex'orter of the ;nited 7tates (%) the ;nited 7tates ex'orts &. "conomic goods may ta#e the form 222 of material things or of ser$ices. (A) either (B) because (C) as (%) or (. @agtime is a #ind of music 222 a strongly synco'ated melody and a regularly accented accom'animent. (A) has (B) that it has (C) that has (%) it has /. 3istorically 222 chief material for ma#ing furniture has been wood but metal and stone ha$e also been used. (A) 6t was the (B) That the (C) There was a (%) the -. All gases and most li1uids and solids ex'and 222 heated. (A) in (B) how (C) when (%) about .. Abstraction goes into the ma#ing of any wor# of art 222 or not. (A) whether the artist being aware of it (B) the artist is being aware whether (C) whether the artist is aware of it (%) the artist is aware whether ,. 222 often added to sauces and sou's is 'lentiful and relati$ely inex'ensi$e. (A) =arsley an herb that is (B) <or 'arsley an herb to be (C) An herb 'arsley is (%) =arsley is that herb 5. "mily =ost4s boo# "ti1uette 222 in 1522 was an immediate success. (A) 'ublished (B) was 'ublished (C) when it 'ublished 32 (%) that it 'ublished 18. "mily =ost4s boo# "ti1uette 222 in 1522 was an immediate success. (A) 'ublished (B) was 'ublished (C) when it 'ublished (%) that it 'ublished 11.A ma0ority of 'eo'le in the ;nited 7tates can get all the calcium their bodies 222 from the food they eat. (A) re1uire (B) re1uires (C) re1uiring (%) to re1uire 12. 222 ma' dates bac# to about & 888 B.C. (A) Jnown to be the oldest (B) 6t was the oldest #nown (C) Jnown as the oldest (%) The oldest #nown 1&. The best way to control rats is by seeing that they ha$e as 222 . (A) 'ossibly little nourishment (B) nourishment 'ossibly little (C) little as 'ossible nourishment (%) little nourishment as 'ossible 1(. The small greenish flowers of the American elm tree a''ear in the s'ring 222 . (A) is grown long before the lea$es (B) long before the lea$es grow (C) the lea$es before growing long (%) the growth of lea$es before long is 1/. 6n the years between 15&. and 15/2 author >argaret *ise Brown 222more than a hundred boo#s but also wrote the lyrics for 21 children4s records. (A) not only 'roduced (B) only not 'roduced (C) 'roduced only (%) only ha$e 'roduced 1.. %octor are disco$ering that there is a strong 'sychological com'onent to chronic 'ain. 1,. *ith her talent for business 'romotion Jate ?leason ex'ansion her family4s small machine2tool com'any into a ma0or manufacturer of gear K cutting machinery. 15. ;sing their bills as needles tailorbirds sew large lea$es together with 'lant fiber to forming their nests. 28. Columns may be circular or 'olygonal in cross section and are generally at least four times more taller than they are wide. 33 21. The 'oetry of ?wendolyn Broo#s demonstrates a ma0or characteristically of twentieth Kcentury writingL the conflict between commitment to a social ideal and commitment to art. 22. >ontessori 'reschools differ than 'ublic elementary schools in that the acti$ities focus on the child4s indi$idual abilities and interests rather than academic ones. 2&. Dosh Billings roamed the country as a laborer when he was a young man but settled down in his later life to become a humorist and lecturing. 2(. %ata recei$ed from two s'acecraft indicate that there is many e$idence that huge thunderstorms are now occurring around the e1uator of the 'lanet 7aturn. 2/. "$ery indi$idual cell whether its exists as an inde'endent microorganism or is 'art of a com'lex creature has its own life cycle. 2-. Because aluminum is nonmagnetic it is $alue for 'rotecting electrical e1ui'ment from magnetic interference. 2.. !itrogen and oxygen are too im'ortant that most li$ing organisms cannot sur$i$e without these elements. 2,. Coal and 'etroleum resulted when 'lants become buried in swam's and decayed. 25. =erca'ita income is a nation4s entire income di$iding by the number of 'eo'le in the nation. &8. Dim Thor'e a football trac# and baseball stars from =ennsyl$ania is considered by many to be the greatest all2around athlete of modern times. &1. <or centuries waterwheels were the only sources of 'ower aside from human and animal strong . &2. =roteins form the most of the structure of the body and also act as en9ymes. &&. The attorney general of the ;nited 7tates ad$ises the =resident on any 1uestions of law who may arise in the conduct of administrati$e affairs. 34 &(. >any of the science fiction 'ublications by @ay Bradbury dis'lay a desire to rebel against society4s de'end on machines. &/. The age of a geological sam'le can be estimated from the ratio of radioacti$e to nonradioacti$e carbon 'resent in the ob0ect is examined. &-. %ams $ary in si9e from small roc# barriers to concrete structures many feet height. &.. "$en before the human organism de$elo'ed into their 'resent stage of home sa'iens the beginnings of culture were already e$ident. &,. 6n the ;nited 7tates sleds for recreation were first 'roduced commercial in the 1,.84s or thereabouts. &5. "m'loyments agencies bring together 'ersons 1ualified for s'ecific 0obs and em'loyers who ha$e those 0obs a$ailable. (8. 7almon s'end most of their adult li$es in salt water des'ite they return to their freshwater birth'laces to s'awn and die. 35 1991 01 1.+rchestral instruments 222 under the following ty'esL strings woodwind brass and 'ercussion. (A) grou'ed (B) can grou' (C) can be grou'ed (%) to be grou'ed 2.222 de'ressions in the ocean floor are called trenches. (A) There are the dee' (B) Are the dee' (C) *here dee' (%) %ee' &.6n the course of her life >ary Anne 7adlier 222 some fifty of them original no$els and collections of stories. (A) =roduced nearly sixty boo#s (B) =roduced sixty boo#s nearly (C) !early sixty boo#s 'roduced (%) 7ixty boo#s nearly 'roduced (.222 xenon could not form chemical com'ounds was once belie$ed by scientists. (A) <or (B) 6t was (C) That (%) *hile /."astern meadowlar#s abound in 'laces 222 but eat harmful insects rather than grain. (A) land is culti$ated there (B) there is land culti$ated (C) where land is culti$ated (%) where is culti$ated land -.Am'lifiers such as those in com'uters and sound Kre'roducing systems are res'onsible for 222 an erratic in'ut signal. (A) strengthening (B) being strengthened (C) strengthen (%) to strengthen ..222 Dohn Aaron )ewis 'ioneered in the de$elo'ment of Ethird stream music Fa blend of 0a99 and classical music. (A) A com'oser who was (B) 3e was a com'oser (C) As a com'oser (%) *hen a com'oser he ,.6n reorgani9ing the curriculum of >t. 3olyo#e College in the late 1,884s "li9abeth >ead laid the foundation 222 the modern college rests. (A) is which (B) on which (C) which is on (%) on it 5.@esearch into the dynamics of storms is directed toward im'ro$ing the ability to 'redict these e$ents 222 to minimi9e damage and a$oid loss of life. (A) and thus 36 (B) so (C) howe$er (%) because 18. 222 li$ed on the !orth 7as#atchewan @i$er long before the 3udson4s Bay Com'any built a fur trading 'ost there. (A) Cree 'eo'le (B) <or Cree 'eo'le (C) 6t was Cree 'eo'le (%) *here Cree 'eo'le 11. 222 has been a to'ic of continual geological research. (A) %id the continents originate (B) 3ow did the continents originate (C) 3a$e the continents originated (%) 3ow the continents originated 12. Because the 'a'aya grows readily from seed 222s'read from its home in Central America and now grows throughout the tro'ics. (A) to be (B) it (C) the (%) its 1&. The elimination of inflation would ensure that the amount of money used in re'aying a loan would ha$e 222as the amount of money borrowed. (A) as the same $alue (B) the same $alue (C) $alue as the same (%) the $alue is the same 1(. <uturism 222early twentieth2century mo$ement in art re0ected all traditions and attem'ted to glorify contem'orary life by em'hasi9ing the machine and motion. (A) an (B) was an (C) that it was an (%) that an 1/. All li$ing organisms constantly absorb carbon 1( 222their existence. (A) out (B) about (C) around (%) throughout 1-. =orcelain is not a single clay and a com'ound of #aolin ball clay felds'ar and silica. 1.. The bison #now for the hum' o$er its shoulders is usually called a buffalo in !orth America. 1,. =ers'iration the body4s built2in cooling mechanism occurs as a natural reaction to ner$ousness intense heat or $igorously exercise. 15. Because of the rising cost of fuel scientists are building automobile engines who will conser$e gasoline but still run smoothly. 37 28. The 'rimary function of a sonometer is to calculate and demonstrate the relations mathematical of melodious tones. 21. The most useful way of loo#ing at a ma' is not as a 'iece of 'a'ers but as a record of geogra'hically organi9ed information. 22. The most useful way of loo#ing at a ma' is not as a 'iece of 'a'ers but as a record of geogra'hically organi9ed information. 2&. Citamin A is essential to bone grow and to the healthiness of the s#in and mucous membranes. 2(. The >oon being much more nearer to the "arth than the 7un is the 'rinci'al cause of the tides. 2/. +ne of the wildest and most inaccessible 'arts of the ;nited 7tates are the "$erglades where wildlife is abundant and largely 'rotected. 2.. The founding of the Boston )ibrary in 1-/& demonstrate the early !orth American colonists interest in boo#s and libraries. 2,. =ublic recognition of Ben 7hahn as a ma0or American artistic began with a retros'ecti$e show of his wor# in 15(,. 25. The texture of soil is determined by the si9e of the grains or 'articles that ma#e u'. 25. To 'roduce one 'ound of honey a colony of bees must fly a distance e1uals to twice around the world. &8. The domestic dog considered to be the first tamed animal is coexisting with human beings since the days of the ca$e dwellers. &1. !ature not only ga$e the >iddle Atlantic region fine harbors howe$er endowed it with a first2class system of inland waterways. 38 &2. All matter resists any change in their condition of rest or of motion. &&. 7wans noted for graceful mo$ements in the water ha$e been the sub0ect of many 'oetry fairy tales legends and musical com'ositions. &(. 7ince 'each trees bloom $ery early in the season they are in danger for s'ring frosts. &/. )i#e some other running birds the sanderling lac#s a bac# toe and has a three2toed feet. &-. )ucretia >ott4s influence was too significant that she has been credited by some authorities as the originator of feminism in the ;nited 7tates. &.. )arge bodies of water and the 're$alence of moisture2bearing winds often 'roduce a condition of tall humidity affecting the local weather. &,. >anganese does not exist naturally in a 'ure state because it reacts so easily with other element. &5. 7cientists estimate that as many as hundred millions $isible meteors enter the "arth4s atmos'here e$ery day. (8. Although not abundant in nature 9inc is im'ortant for both the gal$ani9ation of iron and the 're'aration of alloys as such brass and ?erman sil$er. 39 1991 05 1. 222a bicameral or two2chamber 'arliament. (A) Canada has (B) 3a$ing Canada (C) Because Canada has (%) That Canada is ha$ing 2. 222time and labor cartoonists generally draw the hands of their characters with only three fingers and a thumb. (A) 7a$ed (B) 7a$es (C) To sa$e (%) The sa$ing &. The recent disco$ery of a no$el by 3arriet *ilson 'ublished in 1,/5 222a landmar# in Blac# American literature. (A) has brought to light (B) light to brought has (C) brought to light has (%) has light to brought (. 222telesco'es of the 1-884s magnified ob0ects thirty2three times their original si9e. (A) That the (B) The (C) This is the (%) Being where the /. Thyme 222 yields a medicinal oil containing thymol. (A) a fragrant garden herb (B) garden herb which is fragrant (C) fragrant garden herb (%) is an herb in a fragrant garden -. ;ntil the ninth century written words were not actually se'arated 222in some literary writing dots or 'oints were used to indicate di$isions. (A) in s'ite of (B) contrary (C) contrast to (%) but .. !utritionists 222goat mil# to be rich nourishing and readily digested. (A) consider (B) is considered (C) are considered (%) considering ,. 222con$entional blac# in# costs news'a'ers about thirty cents a 'ound most rub2resistant in#s add at least ten cents more 'er 'ound to the bill. (A) <urthermore (B) >eanwhile (C) >oreo$er (%) *hile 5. Dohn )one4s 'hysical grace and 222age sex and culture ma#e him an extraordinary 'erformer. (A) his ability to transcend (B) is able to transcend the 40 (C) the transcending ability (%) with his ability transcending 18. Before 222of synthetic dyes yarns were often colored by dyes obtained from natural $egetable and mineral matter. (A) introducing (B) introduction (C) the introduction (%) introducing that 11. %uc#s ha$e been domesticated for many centuries 222commercially for their meat and eggs. (A) raised (B) and are raised (C) raised as (%) are raised 12. >aggie )ena *al#er an insurance and ban#ing executi$e 222and s'ent her entire life in @ichmond Cirginia. (A) and was brought u' (B) brought u' with (C) who was brought u' (%) was brought u' 1&. The acti$ities of the international mar#eting researcher are fre1uently much broader than 222. (A) the domestic mar#eter has (B) the domestic mar#eter does (C) those of the domestic mar#eter (%) that which has the domestic mar#eter 1(. >ercury differs from other industrial metals 222it is a li1uid. (A) whereas (B) in that (C) because of (%) conse1uently 1/. 6n blac# $erse 222of ten syllables fi$e of which are accented. (A) line consists of each (B) consists of each line (C) each line consists (%) it consists of each line 1-. 7ome art historians ha$e say that too many artists ha$e tried only to imitate 're$ious 'ainting styles. 1.. 6n$entor ?ran$ille *oods recei$ed him first 'atent on Danuary & 15,( for a steam boiler furnace. 1,. Throughout history shoes ha$e been worn not only for 'rotection and also for decoration. 15. *or#er bees labor for the good of the hi$e by collecting food caring for the young and to ex'and the nest. 41 28. =athologists use their #nowing of body tissues and body fluids to aid other 'hysicians. 21. +b0ects falling freely n a $acuum ha$e the same rate of s'eed is regardless of differences in si9e and weight. 22. The construction of sundials was considered to be an acce'table 'art of a student4s educator as late as the se$enteenth century. 2&. 3istorians ha$e ne$er reached some general agreement about the 'recise causes of the Ci$il *ar in the ;nited 7tates. 2(. +f all the !ati$e Americans in the ;nited 7tates the !a$a0os from largest grou'. 2/.A neutron star forms when a star much more massi$e than the 7un dies and ex'loded. 2-.A thorough study of mythology re1uires familiarity for the 'ro'erties of 'ro'erties of 'lants and trees and the habits of wild birds and beasts. 2,.6n an adult human the s#in weighs about se$en 'ounds and co$ers it about thirty2six s1uare feet. 25.A leading Canadian feminist and author !ellie >cClung struggled relentlessly in the early twentieth century to win 'olitically and legal rights for Canadian women. &8.>etabolism consists of a com'licated series of chemicals reactions carried out by li$ing cells. &1.%u#e "llington was the first 'erson to com'ose extended 0a99 wor#s and gi$es regular 0a99 concerts. &2.7eismology has not reached yet the stage where earth1ua#es can be foretold with a great deal of accuracy. &&.The design of the ;ni$ersity of Cirginia came at the end of Thomas Defferson4s long career as theoretician statesman and architecture. 42 &(.At night the desert floor radiates heat bac# into the atmos'here and the tem'erature may be dro' to near free9ing. &/.Although they are in different countries *indsor +ntario and %etroit >ichigan are close neighbors and coo'erate on numerous matters of mutually interest. &-.<irst incor'orated in 1,.1 %allas Texas had become the se$enth largest cities in the ;nited 7tates by 15.-. &..*ill @ogers was widely recogni9ed for his daily news'a'er column in which he humorously critici9ed and commented in the 'olitics of his time. &,.The free sil$er mo$ement 'romoting unlimited sil$er coinage gained 'rominent in the late 1,884s. &5.The continental di$ide refers to an imaginary line in the !orth American @oc#ies that di$ides the waters flowing into the Atlantic +cean from it flowing into the =acific. (8.The =etrified <orest of eastern Ari9ona are made u' of tree trun#s that were buried in mud sand or $olcanic ash ages ago and ha$e turned to stone. 43 44 45 46 47 1991 10 1. 222 a lonely and rugged life far from home and family. (A) *here$er the early 'ros'ector li$ed (B) The early 'ros'ector li$ed (C) !ot only did the early 'ros'ector li$e (%) The early 'ros'ector li$ing 2. 3elium is 222 all gases to li1uefy and is im'ossible to solidify at normal air 'ressure. (A) more than difficult (B) the most difficult of (C) more difficult of (%) most difficult &. "$ery year Canadian 222 about ./ 'ercent of their ex'orts to the ;nited 7tates. (A) businesses that sell (B) selling businesses (C) businesses sell (%) that sell to businesses (. An inno$ator ballerina Augusta >aywood was 222 a tra$eling com'any. (A) to form the first (B) the first to form (C) who formed the first (%) forming the first /. *hen water free9es in the crac#s of roc#s 222 ex'ands causing the roc#s to brea# a'art. (A) it (B) but (C) then (%) and -. *ith x K ray microsco'es scientists can see through li$e insects 222 e$en through solid 'ieces of metal. (A) howe$er (B) ne$ertheless (C) or (%) yet .. As resident of !ew >exico %ennis Cha$e9 222 to the 3ouse of @e'resentati$es in 15&8 and to the 7enate in15&,. (A) when elected (B) elected (C) who was elected (%) was elected ,. 222 are not leached out of soil reclamation 'rocedures are needed to restore the land4s 'roducti$ity. (A) <or concentrations of salt (B) 7alt concentrations that (C) 6f salt concentrations (%) *ith concentrations of salt 5. 222 social crusade aroused "li9abeth *illiams4enthusiasm more than the ex'ansion of educational facilities for immigrants to the ;nited 7tates. (A) !o (B) !othing (C) !ot 48 (%) !one 18. 222 as 2/88 B.C. the "gy'tians used mirrors made of highly 'olished metal. (A) 6n early (B) As early (C) "arly (%) *as as early 11. The 1uantum theory states 222 such as light is gi$en off and absorbed in tiny definite units called 1uanta or 'hotons. (A) energy that (B) that it is energy (C) it is energy (%) that energy 12. Huails ty'ically ha$e short rounded wings that enable 222 s'ring into full flight instatly when disturbed in their hiding 'laces. (A) they (B) to their (C) its (%) them to 1&. ?eysers are found near ri$ers and la#es where water drains through the soil 222. (A) surface below the dee' (B) dee' below the surface (C) the dee' below surface (%) the dee' surface below 1(. Algebra generali9es certain basic laws 222the addition subtraction multi'lication and di$ision of all numbers. (A) go$ern (B) that go$ern (C) ha$e go$erned (%) which they go$ern 1/. "$en at low le$els 222. -. The culinary ex'ert <annie <armer taught dietetics #itchen management and to coo# at her famous Boston school. 1.. The ele'hant relies more on its sense of smell than for any other sense. 1,. A few naturally elements exist in such small amounts that they are #nown mainly from laboratory2 made sam'les. 15. 7ome insects hear ultrasonic sounds more than two octa$es than higher humans can. 49 28. To stay warm in cold weather cold2blooded animals must ex'ose itself to a source of warmth such as direct sunlight. 21. A se$ere illness where she was 0ust nineteen months old de'ri$ed 3elen Jeller of both her sight and hearing. 22. /. Christo'her =lummer is a Canadian actor who has starred in stage tele$ision and film 'roductions on both sides the Atlantic +cean. 2-. A micro'hone enables a soft tone to be am'lified thus ma#ing it 'ossible the gentle renditions of romantic lo$e songs in a large hall. 2.. Atro'hy is a decrease in si9e of a cell organ tissues or other 'art of the body such as a limb. 2,. The 'oetry of e.e. cummings illustrates the way in which some 'oets bend grammatical rules as they stri$e to ex'ression their insights. &8. Accounting is described as art of classifying recording and re'orting significant financial e$ents. &1. The de$elo'ment of the watch de'ended u'on the in$ent of the mains'ring. &&. =hysical fitness acti$ities can lead to an alarming $ariety of in0uries if 'artici'ants 'ush themsel$es greatly hard. &(. The structure or beha$ior of many 'roto9oans are ama9ingly com'lex for single2celled animals. 50 &/. Alas#a4s rough climate and terrain di$ide the state into isolated regions and the difficult of highway maintenance is a troublesome 'roblem. &-. <or hundreds of years sailors relied on echoes to warn them of another shi's icebergs or cliffs in foggy weather. &.. Although he is em'loyed in the scientific and technical fields the metric system is not generally utili9ed in the ;nited 7tates. &,. =rototy'ical oboes did a loud harsh tone but the modern oboe is a''reciated for its smooth and beautiful tone. &5. Beneath the dee' oceans that co$er two2thirds of the "arth tantali9ing secret of the 'lanet are concealed. (8. The 'ioneer Dohn Cha'man recei$ed the nic#name EDohnny A''leseedF because he 'lanted a''le seedlings during him tra$els in what are now +hio 6ndiana and "linois. 51 1992 01 1. 6n the textile industry the term EgunnyF refers to 222burla' that is not of the best 1uality. (A) not ex'ensi$e a (B) ex'ensi$e not (C) not an ex'ensi$e (%) an inex'ensi$e 2. The s#yscra'er 222 is an architectural form that originated in the ;nited 7tates. (A) is a tall commercial structure (B) a tall commercial structure (C) a tall commercial structure which (%) of which a tall commercial structure &. 222 were stones 'iled at inter$als. (A) The earliest road mar#ers (B) The earliest road mar#ers which (C) @oad mar#ers were the earliest (%) ;ntil the earliest road mar#ers (. 7ome 'rocedures used for laboratory analysis of archaeological s'ecimens are 222 'rocedures conducted in crime laboratories. (A) resemble (B) similar to (C) same as (%) ali#e /. The windmill which has been used for hundreds of years to 'um' water and grind grains 222 redesigned to 'roduce electricity. (A) it is now being (B) it now can (C) is now being (%) now being -. 6n 15&, when Benny ?oodman4s orchestra 'resented a concert at the 'restigious Carnegie 3all 222 was clear that 0a99 had at last been fully acce'ted. (A) There (B) *hich (C) And (%) 6t .. 222 a continuous mass of water on the "arth4s surface all continents are islands in the strictest sense of the word. (A) The form of the oceans (B) 7ince the oceans form (C) To form the oceans (%) That the oceans form ,. The s'iral threads of a s'ider4s web ha$e a stic#y substance on them 222 insects. (A) tra's (B) tra' its (C) which tra's (%) which it tra's 5. 222 in 1-&/ the Boston )atin 7chool is the oldest 'ublic school in the ;nited 7tates. (A) <ounded (B) <ounding 52 (C) To found (%) 3a$ing founded 18. According to anthro'ologists the earliest ancestors of humans that stood u'right resembled chim'an9ees 222 with slo'ing foreheads and 'rotruding brows. (A) facially (B) their faces (C) ha$ing facial (%) they had faces 11. The #ettledrum 'roduces different tones de'ending on whether 222 with stic#s that ha$e felt or s'onge heads. (A) to stri#e (B) when struc# (C) 6t is struc# (%) stri#ing it 12. 222 in the latter 'art of the fifteenth century as a substitute for richly embroidered ta'estries. (A) *all'a'er that originated (B) The origination of wall'a'er (C) +riginated the wall'a'er (%) *all'a'er originated 1&. 222 was the first fully successful transatlantic cable finally laid. (A) !ot until 1,-(B) ;ntil 1,-- 0ust (C) ;ntil 1,-(%) 6n 1,-- not until 1(. >any of the Muni 'eo'le in the southwestern ;nited 7tates earn their li$elihoods and achie$e 222 as 'rofessional artists. (A) considered them 'o'ular (B) considerably 'o'ular (C) considering their 'o'ularity (%) considerable 'o'ularity 1/. The flatter a hair a''ears under a microsco'e 222 wa$ier it is. (A) although (B) which (C) and (%) the 1.. A radio telesco'e is an instrument that collects and measured faint radio wa$es gi$en off by ob0ects in s'ace. 1,. The 'ri$ate satellite industry s'rang u' in the mid215-84s to relay not only tele$ision broadcasts but too 'hone calls and com'uter data. 15. Bosemite !ational =ar# it has many s'ectacular natural attractions including Bosemite <alls +ne of the world4s highest waterfalls. 53 28. %uring the Colonial days the 6ro1uois had an agricultural economy basing mainly on corn with su''lementary cro's of 'um'#ins beans and tobacco. 21. Before the retina of the eye can be examined the 'u'il must to be artificially dilated. 22. The most widely writer 'raised of the 15-84s in the ;nited 7tates was 'robably Doyce Carol +ates who 'ublished many no$els and short stories. 2&. ;nli#e animals such as cows or horses human beings are neither able to digest cellulose the fibrous carbohydrate found in grass. 2(. At the age of 5( com'oser conductor arranger and acting "$a Dessye led her choral grou' in the first 'roduction of the o'era =orgy and Bess written in 15&/. 2/. 6n 15,. the states of ice cream in the ;nited 7tates amounted to fifteen 1uarts 'er year for e$ery 'ersons in the country. 2-. The ty'e of 'reci'itation is affected by electrical conditions air tem'erature and the 'ercentage of humid in the air. 2.. Almost destroy by fire in 1,1( the *hite 3ouse was rebuilt and enlarged o$er the next three years. 2,. A flight recorder shows how aircraft systems beha$e by gi$ing information such as a 'lane4s high direction and rate of descent. 25. 6t is not unusual for ballet dancers wear out more than one 'air of toe shoes during an e$ening4s 'erformance. &8. A fable is usually a short tale featuring animals or inanimate ob0ects that can tal# and thin# ali#e humans. &1. The EashcanFschool in American art being a rebellion against traditional sub0ects and fa$ored the 'ainting of bac#2street scenes. 54 &&. 7usan 7ontag4s a$ersion to the traditional critical 'ractice of extracting morals meaning from art is reflected in her no$els. &(. Best #nown for his research in statistical mechanics and meson 'hysics Chen !ing Bang shared the !obel =ri9e in 15/. to another 'hysicist from the ;nited 7tates Tsung2dao )ee. &/. Those electrons most closely to the nucleus are held there by electromagnetic force. &-. 6ts tremendous out'ut of dairy 'roducts ha$e earned the state of *isconsin the title of America4s %airyland. &.. The early use of a com'lete steel frame for towering buildings a''eared in the first s#yscra'er built on Chicago in 1,,&. &,. 7ome cities ha$e a fire regulations that re1uires 'eo'le to 'ut smo#e detectors in their houses. &5. 7ince flounders ha$e mar#ings that blend with their surroundings it can lie camouflaged on the bottom of the ocean. (8. The determination of the 'ath of >ars4s orbit in1-85 became the unifying lin# among the two formerly se'arate realms of 'hysics and astronomy. 55 1992 05 1. 222 'rinci'al ty'es of accelerationL linear and angular. (A) There are tow (B) Two of them (C) The two (%) Two 2. "ast )i$er'ool +hio 222the 'ottery ca'ital of the ;nited 7tates. (A) and called (B) is called (C) calling (%) to call &. True hibernation ta#es 'lace only among 222animals. (A) whose blood is warm (B) blood warm (C) warm2blooded (%) they ha$e warm blood (. )i#e other women 222in the field of medicine 7ara >ayo found the beginning years difficult. (A) who they 'ioneered (B) they 'ioneered (C) who 'ioneered (%) 'ioneered /. 6n his writing Dohn Crowe @ansom describes what 222the s'iritual barrenness of society brought about by science and technology. (A) he considers (B) does he consider (C) considers (%) considers it -. ?reen 222ha$e the 'ower to ma#e food from substances found in the air and soil. (A) only 'lants (B) 'lants alone (C) the only 'lants (%) 'lants are alone .. Children with 'arents whose guidance is firm consistent and rational are inclined 222high le$els of self2confidence. (A) 'ossess (B) ha$e 'ossessed (C) to 'ossess (%) 'ossessing ,. *riting 'ens are made in 222of sha'es si9es and colors. (A) endless $ariety an almost (B) $ariety an almost endless (C) an almost endless $ariety (%) almost $ariety an endless 5. ;nder the guidance of choreogra'hers >artha ?raham and Derome @obbins American dance 222 new le$els of artistic achie$ement. (A) reaching (B) has reached (C) reach 56 (%) ha$e reached 18. Angios'erms inhabit relati$ely di$erse en$ironments and may be found 222 higher 'lants can sur$i$e. (A) there (B) where$er (C) somewhere (%) then 11. >agnesium has a s'ecific gra$ity of 1..( which means that 222 1..( times as much as an e1ual $olume of water. (A) it is weighed (B) weighing it (C) its weight (%) it weighs 12. =erha's the 'rimary 222 of adult education was industriali9ation which accelerated the 'ace of socioeconomic change. (A) causes growth (B) cause of the growth (C) cause was growing (%) caused the growing 1&. 222 Eas the census ta#er of the s#yFAnnie Dum' Cannon contributed considerably to the field of astronomy. (A) Jnown (B) Jnowing (C) To #now (%) Jnowledge 1(. %uring adolescence many young 'eo'le begin to 1uestion 222 held by their families. (A) $alues (B) of the $alues (C) the $alues are (%) are the $alues 1/. Coral reefs are 222 that teem with an abundance of exotic sea life. (A) when underwater landsca'es (B) landsca'es being underwater (C) underwater the landsca'es (%) underwater landsca'es 1-. Abraham )incoln deli$ery his most famous address at the dedication of the soldiers cemetery in ?ettysburg. 1.. 7talagmites are 'roduced when water to dro' directly to the floor of a ca$e. 1,. @egulation of 'ublic utilities in the ;nited 7tates is carried out by locally state and federal go$ernments. 15. The 'oet >arianne >oore was initially associated with the imagist mo$ement but later de$elo's her own rhyme 'atterns and $erse forms. 57 28. The most worst economic re$ersal of the twentieth century the ?reat %e'ression of the 15&84s began in the ;nited states and s'read abroad. 21. >any narcotic 'lants and its 'roducts such as nicotine are effecti$e in controlling insects. 22. 6n some occu'ations the com'uter has already re'laced the motor $ehicle as the 'rinci'al conser$e of time and laboring. 2&. <arming becomes more ex'ensi$e when farmers are forced to a''ly greater 1uantities of costly fertili9ers for to sustain yields. 2(. The meta'hors we use routinely are the means which by we describe our e$eryday ex'eriences. 2/. 7cientists finding out that the uni$erse is e$en larger and more com'lex than anyone has e$er imagined. 2-. Because their 'ro'erties differ from those of their constituents 'ro'er alloys can great increase the corrosion resistance of a metal. 2.. The ability to retain a mental record of earlier ex'eriences are referred to as EmemoryF. 2,. The aging 'rocess is not entirely determined by heredity but is influenced by different en$ironmental and social circumstances as good. 25. The waterwheel is a mechanism designed to harness energy from a source instead than animals. &8. 6f they are 're'ared s#illfully soybeans they can be a''eti9ing as well as nutritious. &1. 7tudies of either $ision and 'hysical o'tics began almost as early as ci$ili9ation itself. &2. Dames *hitcomb @iley the E3oosier =oet F wrote many of his wor# in standard "nglish but he wrote his most 'o'ular 'oems in the dialect of his home state 6ndiana. &&. The city of ?reen Bay established in 1.(/ was the first 'ermanent settler in *isconsin. 58 &(. *hiche$er they may differ widely in function all cells ha$e a surrounding membrane and an internal water2rich substance called cyto'lasm. &/. Boo#er T. *ashington an educational leader wor#ed throughout the lifetime to im'ro$e economic conditions for Blac# 'eo'le in the ;nited 7tates. &-. 6n the >iddle Ages boo#s called bestiaries were 're'ared in an attem't to describe animals real or imagine that exem'lified human traits. &.. =um's can o'erate under 'ressures ranging between a fraction of a 'ound to more than 18 888 'ounds 'er s1uare inch. &,. A''roximately fifty 'ercent of the 'ac#age utili9ed in the ;nited 7tates are for foods and be$erages. &5. *hether as statesman scientist and 'hiloso'her Ben0amin <ran#lin was destined to gain lasting honor throughout much of the world. (8. A traditional 3alloween decoration is a 0ac#2o2lantern which is a hollowed2out 'um'#in with a scary face cut into them. 59 1992 08 1. *ith affection and humor 'oet =hyllis >c?inley 222of ordinary life. (A) the $irtues were 'raised (B) 'raised the $irtues (C) she 'raised the $irtues (%) her 'raise of the $irtues 2. 7cientists thin# 222hel's some tree to conser$e water in the winter. (A) when losing lea$es (B) lea$es are lost (C) that losing lea$es (%) the lea$es losing &. The ancient 3o'ewell 'eo'le of !orth America 'robably culti$ated corn and 222cro's but hunting and gathering were still of critical im'ortance in their economy. (A) another (B) the other4s (C) other (%) other than (. )unar ecli'ses occur each time the "arth bloc#s the 7un4s light from the >oon 222 the >oon4s full 'hase. (A) during (B) whether (C) in which (%) whene$er /. 222 all data into electronic 'ulses. (A) The com'uter in'ut unit changes (B) Changing in'ut the com'uter unit (C) *hich changes the com'uter in'ut unit (%) Changes in the com'uter in'ut units -. @obert 7. %uncanson was considered a 'ainter of the 3udson @i$er school 222on scenes of America4s untamed wilderness. (A) which concentrated (B) which concentrated it (C) which it concentrated (%) and which concentrated .. 222 their senses many2celled animals 'ercei$e what is ha''ening in their en$ironment. (A) >eans of (B) By means of (C) +f the means by (%) By means ,. 6n central ?eorgia archaeological e$idence indicates that !ati$e Americans first inhabited the area 222. (A) since thirteen centuries (B) thirteen centuries ago (C) the 're$ious thirteen centuries (%) thirteen centuries were before 5. The large com'ound eyes of the dragonfly 222 to see mo$ing ob0ects almost eighteen feet away. (A) to enable it (B) enabling it 60 (C) it enables (%) enable it 18. ;sing many symbols ma#es 222 to 'ut a large amount of information on a single ma'. (A) 'ossible (B) it 'ossible (C) it is 'ossible (%) that 'ossible 11. Anarchism is a term describing a cluster of doctrines an attitudes 222 'rinci'al uniting feature is the belief that go$ernment is both harmful and unnecessary. (A) and (B) whose (C) since (%) for 12. After the great bli99ard of 1,,, in the northeastern ;nited 7tates it too# some 222 the snow away from their homes. (A) days to sho$el 'eo'le se$eral (B) 'eo'le se$eral days to sho$el (C) se$eral days 'eo'le to sho$el (%) 'eo'le to sho$el se$eral days 1&. =robably no man had more effect on the daily li$es of most 'eo'le in the ;nited 7tates 222 3enry <ord a 'ioneer in automobile 'roduction. (A) as was (B) than was (C) than did (%) as did 1(. 6n co''er engra$ings and etchings 222 caused by the edges of the 'late is clearly $isible on the 'a'er. (A) the im'ression is (B) if the im'ression (C) im'ressions (%) the im'ression 1/. Cora reefs ha$e always been 222 ha9ards to shi's sailing in tro'ical seas. (A) one of the greatest (B) the greatest ones (C) ones greatest (%) the greatest were. 1-. <or a long time cotton ran#ed first between Alabama4s cro's but today it accounts for only a fraction of the agricultural 'roduction. 1.. >argaret <uller was not acti$e in the women4s2rights mo$ement but she as#ing for a fair chance for women in her boo# *oman in the !ineteenth Century. 1,. >ost cities ma0or in the ;nited 7tates ha$e at least one daily news'a'er. 61 15. The sur$i$al of a forest de'ends not only on the amount of annual rainfall it recei$es and also on the seasonal distribution of the rain. 28. Dames <armer an American ci$il rights leader he hel'ed establish the Congress of @acial "1uality an organi9ation that is dedicated to the 'rinci'le of non$iolence. 21. A merger is a combination of two or more businesses down below a single management. 22. 6n its sim'lest form a transformer is com'osed of two coils of wire 'lace together without no wires actually in contact. 2&. The greatest natural resource of the state of !orth %a#ota is their fertile farmland. 2(. The doctrine of eminent domain is based the legal tradition that all real 'ro'erty is sub0ect to the control of the state. 2/. 6n a contro$ersial eating guide entitled Are Bou 3ungryG Dane 3irschmann and )ela Ma'hiro'olous argue that children instincti$ely #now what foods are good for sel$es. 2-. Bats rely to their hearing to na$igate and to find food at night. 2.. +nce an im'ortant 'ort of entry for immigrants to the ;nited 7tates "llis 6sland recent reo'ened its great hall as a museum of immigration. 2,. "$ery year Colorado is $isited by millions of tourists who come for a $ariety of reason. 25. The energy needed for animal grow is deri$ed 'rimarily from carbohydrates and fats. &8. Countries tend to s'eciali9e in the 'roduction and ex'ort of those goods and ser$ices that it can 'roduce relati$ely chea'ly. &1. Anti1ue auctions ha$e become 'o'ular in the ;nited 7tates because a steadily increasing awareness of the in$estment $alue of anti1ues. 62 &2. Ali#e an insect the crustacean is an arthro'od an animal with 0ointed legs and an exos#eleton a su''orti$e co$ering for its body. &&. Bric#s are made from clay that is 'rocessed into a wor#able consistency form to standard si9es and then fired in a #iln. &(. 3er s'eech at the *orld4s Columbian "x'osition in Chicago in 1,5& brought <annie Barrier *illiams local and nation recognition. &/. A 'aragra'h is a 'ortion of a text consists of one or more sentences related to the same idea. &-. A deficient of folic acid is rarely found in humans because the $itamin is contained in a wide $ariety of foods. &.. 6ndustry utili9e the gaseous element xenon when de$elo'ing s'eciali9ed flashlights and other 'owerful lam's. &,. 7ome ty'es of ferns resemble trees and some are too small that they loo# li#e moss. &5. >ade of seals#in stretched o$er a framewor# of whalebone or driftwood an "s#imo #aya# is com'leted enclosed exce't for the o'ening in which the 'addler sits. (8. +ur urge to classify different life forms and gi$e us names seems to be as old as the human race. 63 1992 10 1. %u#e "llington was a com'oser conductor and 'ianist 222 ran#ed as one of the greatest of all 0a99 figures. (A) him (B) although (C) or (%) who 2. 222 became a state in 1,.-. (A) *hen Colorado (B) Colorado (C) 6t was Colorado (%) Colorado which &. The fragrances of many natural substances come from oils 222 these oils may be used in manufacturing 'erfumes. (A) of (B) from (C) whether (%) and (. Because the saxo'hone is an excellent solo instrument 222 in some im'ortant orchestral wor#s. (A) it is featured (B) while featured (C) if featured (%) feature it /. Before ?eraldine <erraro was selected as the %emocratic =arty4s $ice 'residential candidate in 15,( no woman 222 run for national office in the ;nited 7tates on a ma0or 'arty tic#et. (A) e$er has (B) ne$er had (C) had e$er (%) ha$ing ne$er -. 222 reaches the cells of the body it is oxidi9ed or slowly burned. (A) As digested food (B) %igested food that (C) <ood is digested (%) *hy does digested food .. The 'osition of the larynx or $oice box in the nec# determines 222 swallows and $ocali9es. (A) an animal how does one breathe (B) how an animal breathes (C) an anima breathes how one (%) how does an anima breathe ,. The slide rule uses sliding scales with mar#s 222 numbers and their logarithms. (A) re'resenting (B) re'resented (C) are re'resented (%) they are re'resenting 5. 222 executi$e and administrati$e authority in the ;nited 7tates go$ernment rests with a =resident who is elected for a four2year term. (A) That the (B) The 64 (C) 6t is the (%) There is the 18.222 stereo'honic 'honogra'h records two recordings are made of the same musical 'erformance. (A) Creates (B) Created (C) The creating of (%) To create 11.?enes determine 222 the sha'e of a leaf and the sex height and hair color of a child. (A) such as features (B) such features as (C) as such features (%) features as such 12.California4s agricultural su'remacy dates from 15(. when its farm out'ut first 222 any other state. (A) that exceeded (B) exceeded that (C) exceeded that of (%) that exceeded of 1&.The use of well2chosen nonsense words ma#es 222 the testing of many basic hy'otheses in the field of language learning. (A) it is 'ossibly (B) its 'ossibility (C) them 'ossible (%) 'ossible 1(. !ot until 15&1 222 the official anthem of the ;nited 7tates. (A) EThe 7tar2s'angled BannerFdid become (B) when EThe 7tar2s'angled BannerFbecame (C) did EThe 7tar2s'angled BannerFbecome (%) became EThe 7tar2s'angled BannerF 1/.6n general the sim'ler 'lants a''eared on the "arth before those 222. (A) are structurally com'licated (B) more com'licated structure (C) ha$e a com'licated structure (%) their structure is com'licated 1-. @ebecca )atimer a 'olitical commentator and the author of se$eral boo# was the first woman to become a ;nited 7tates senator. 1.. 7urrealist artists 'ainted in such a manner that their 'ictures seem if as they came from the realm of dreams. 1,. >anure can be con$erted into methane gas by means the acti$ated2sludge 'rocess of sewage dis'osal. 15. !a$a0o !ational >onument in northern Ari9ona incor'orates three of the most large of all #nown cliff dwellings. 65 28. By studying geometry students can learn what to de$elo' logical arguments through dedecti$e reasoning. 21. The word EsagaF is often a''lication to any narration of e$ents of the 'ast whether mythical or historical in character. 22. The success of a na$al shi' is determined by its seaworthiness s'eedy and maneu$erability. 2&. Administrati$e assistants are often ex'ected to ma#e decisions su'er$ision staff delegate res'onsibility and wor# harmoniously with managers and fellow em'loyees. 2/. >any critics belie$e that Amy )owell4s most im'ortant wor# is not her 'oetry but his biogra'hy Dohn Jeats 'ublished the year of her death. 2-. @esearch on 'ain has been neglected although the mainly reason 'eo'le ta#e medicine is to relie$e 'ain. 2.. 7idney =oitier he is famous for his character 'ortrayals won an +scar for his 15-& 'erformance in )ilies of the <ield. 2,. The Carlsbad ca$erns located in !ew >exico ran# between the largest underground labyrinths in the world. 25. Commercial roc# wool is made by blowing steam through molten roc# such as limestone to create fine flexibility glassli#e fibers. &8. *illiam Taft begins his many years of ser$ice for the ;nited 7tates when =resident Ben0amin 3arrison a''ointed him solicitor general in 1,58. &1. A time 9one is a slightly irregular north2south belts that extends from 'ole to 'ole. &2. 3arriet >onroe4s $erse sur$i$e today as e$idence of her undiscouraged 9eal for the ad$ancement of modern 'oetry. 66 &&. E3ow does the human brain wor#GF remains one of the most 'rofound 1uestions confront modern science. &(. Cadence may be considered the rise and fall in intensified of sounds. &/. +ne out of e$ery ten 'ersons in the 15., ;nited 7tates labor force was a teenager com'ared by one out of fifteen in 15-8. &.. A goose4s nec# is a tiny longer than that of a duc# and not so gracefully cur$ed as a swan4s. &,. )i#e s1uirrels tree shrews are bearing well2de$elo'ed claws on their digits and are generally acti$e during daylight hours. &5. "$en many early leaders of the ;nited 7tates ha$e 'ro$ided names for towns only ?eorge *ashington is remembered in the name of a state. (8. !umerous insects s'ecial the butterfly ha$e wea# 'owers of flight. 67 1993 01 1. 222 that as both birds and mammals become larger their metabolic rates er unit of tissue decrease and they generally li$e longer. (A) The truth (B) 6f true (C) 6t is true (%) To be true 2. Asteroids are small and therefore $ery difficult to identify e$en when 222 to "arth. (A) 1uite closely (B) are being 1uite close (C) are they 1uite closely (%) they are 1uite close &. A number of modern scul'tors ha$e re0ected 222 of minimal and en$ironmental art and de$elo'ed a style of extreme realism. (A) which abstract 1ualities (B) there are abstract 1ualities (C) the abstract 1ualities (%) the 1ualities are abstract (. 222 tributaries of the >ississi''i @i$er system were na$igated by steamboats during the 'eriod before the outbrea# of the Ci$il *ar. (A) >ore than forty (B) >ore than forty were (C) <orty more than (%) There were more than forty /. >ary "li9a >c%owell4s introduction to social ser$ice came 222 when she assisted $ictims of the great Chicago <ire of 1,.1. (A) was sixteen years old (B) had sixteen years (C) at age sixteen (%) sixteen -. Boung herons are hel'less for a few wee#s 222 they learn to fly. (A) how (B) before (C) des'ite (%) since .. The history of 'ainting is a fascinating chain of e$ents that 'robably began with 222. (A) e$er made the $ery first 'ictures (B) the e$er made $ery first 'ictures (C) the $ery first e$er made 'ictures (%) the $ery first 'ictures e$er made ,. The center of gra$ity of the human body 222 behind the hi' 0oint. (A) locates (B) locating (C) to locate (%) is located 5. The lea$es and stems of the alfalfa 'lant are the only 'arts of the 'lant 222. (A) the uses for li$estoc# fees (B) for using li$estoc# feed 68 (C) used for li$estoc# feed (%) they are used for li$estoc# feed 18. 222 choose to li$e in or near metro'olitan areas sim'ly because they li#e the ra'id 'ace of city life. (A) 7o large numbers of 'eo'le to (B) There are large numbers of 'eo'le (C) )arge numbers of 'eo'le (%) )arge numbers of 'eo'le who 11. 222 to s'ace tra$elers is high acceleration or deceleration forces. (A) %anger can be (B) They can be dangerous (C) *hat can be dangerous (%) *hile danger 12. +rganic chemistry has made many new 'roducts222. (A) 'ossible (B) as 'ossible (C) are 'ossible (%) they are 'ossible 1&. =erfectly matched 'earls strung into a nec#lace 222 a far higher 'rice than the same 'earls sold indi$idually. (A) in order to bring (B) their bringing (C) bringing (%) bring 1(. 7ome metro'olitan news'a'ers would ma#e si9able $olumes 222 in boo# form. (A) than the 'rint (B) 'rint them (C) if 'rinted (%) they are 'rinted 1/. =ennsyl$ania ran#s high among the states 'o'ulation 222 many areas are s'arsely settled. (A) and yet (B) so e$en (C) if not (%) exce't for 1-. 7ince the beginning of this century the ;nited 7tates go$ernment has 'layed an role in the su'er$ision and use of the nation4s natural resources. 1.. Between 158- and 151. 'olitical acti$ist "mma ?oldma de$oted most of her efforts to writing tra$eling and lectured. 1,. 3eight 'owerful and s'eed are attributes that coaches often loo# for in bas#etball 'layers. 15. >any of society4s wealth is controlled by large cor'orations and go$ernment agencies. 69 28. =ieces of eighteenth2century 'orcelain they are fre1uently dug u' in exca$ations at williamsburg Cirginia. 21. A ma0or 'ur'ose of scientific analysis is to identify and examine causal connections between inde'endent and de'endence $ariables. 22. Caccines for some rare diseases are gi$en only to 'ersons which ris# ex'osure to the disease. 2&. @ecause it is a healthful way to exercise aerobic dancing is considered an excellent method for release tension. 2(. %o''ler radar can be used to determine the direction which in the 'articles of a cloud are mo$ing. 2/. A''lied research aims at some s'ecific ob0ecti$e such as the de$elo'ment of a new 'roduce 'rocess or material. 2-. >ost of the food what ele'hants eat is brought to their mouths by their trun#s. 2.. The highly res'ect 9oologist "rnest Dust 0oined the ruling board of the >arine Biological )aboratory in the 15&84s. 2,. Clementine 3unter4s 'rimiti$e 'aintings ha$e been exhibited at $arious galleries included one at the 7mithsonian 6nstitution in *ashington %.C. 25. Ali#e a chic#en the grouse has four toes with the hind one raised abo$e the ground. &8. >embershi' in labor unions in the ;nited 7tates reached its 'ea# of 1. millions members in 15-8. &1. The newer #inds of seeds 'roduce corn it has much greater food $alue than older #inds. &2. 6n meteorology either the formation of clouds and the 'reci'itation of dew rain and snow are #nown as condensation. &&. Carieties of yellow gra'es that ha$e tender s#in rich fla$or and high sugar content are es'ecially suited with ma#ing raisins. 70 &(. %es'ite resistance in some 'arts of Canada the con$ersion to metric measurement ha$e been said to be largely successful. &/. The most safest way to watch a solar ecli'se is for one to loo# at it in a mirror while wearing dar# glasses. &-. Chied Dose'h )a <lesche a $igorous +maha leader wor#ed hardly to ma#e his nation a 'roud and 'rogressi$e one. &.. The diamond is the only gemstone com'osed with 0ust one chemical element carbon. &,. 6n 15(1 +rson *elles 'roduced Citi9en Jane a film noted for its technical brilliant structural com'lexity and )iterate treatment of a contro$ersial biogra'hical sub0ect. &5. *ildlife conser$ationists say the co$er that foliage 'ro$ides for animals is e1ual in im'ortance to the food su''lying. (8. The )eyden 0ar was one of the earliest form of condensers in$ented to store an electrical charge. 71 1993 05 1. Before ,888 B. C. wheat did not grow as 'rolifically 222 it does today. (A) li#e (B) as (C) for (%) than 2. Both nic#el and iron are whitish metals 222. (A) that are attracted by magnets (B) that magnets are attracted by them (C) are attracted by magnets (%) magnets that attract them &. The bar# of some s'ecies of oa# trees yields a substance used in 222 leather. (A) treating (B) to treat (C) its treatment (%) it treats (. Although 'hos'horus is an essential constituent of all li$ing creatures 222is among the least abundant of the mineral nutrients. (A) what (B) it (C) still (%) howe$er /. 2222 angles of any triangle always add u' to 1,8 degrees. (A) 6f three (B) The three (C) Three of (%) Three are -. The gibbon ranges o$er 2222 other a'es do. (A) than an area wider (B) wider than the area (C) a wider area than (%) an area wider than are .. 7arah <rances *hiting o'ened the 222 of 'hysics in the ;nited 7tates in 1,.,. (A) undergraduate teaching was in a second laboratory (B) second teaching laboratory of undergraduate (C) undergraduate teaching laboratory was second (%) second undergraduate teaching laboratory ,. 222 some of the "arth4s interior heat esca'es to the surface. (A) A $olcano eru'ts (B) A $olcano whether eru'ts (C) A $olcano eru'ts it (%) 6f a $olcano eru'ts 5. 7andra %ay +4Connor the first woman member of the ;nited 7tates 7u'reme Court belie$ed that the courts should inter'ret the laws 222 legislate. (A) than attem't to rather (B) rather than attem't to (C) to attem't rather than (%) attem't rather than to 72 18. 222 of minerals which are chemical elements or com'ounds of $arying 'urity. (A) The consistency of roc#s (B) @oc#s consisting (C) @oc#s consist (%) *hereas roc#s consist 11. Boo#er T. *ashington acclaimed as a leading educator at the turn of the century 222 of a school that later became the Tus#egee 6nstitute. (A) ta#ing charge (B) too# charge (C) charges was ta#en (%) ta#en charge 12. 222 white ginger one scra'es and washes the roots before drying them. (A) 6f ma#es (B) *hen ma#ing (C) >ade (%) The ma#ing of 1&. By the time 222 !orman @oc#well had decided that he wanted to be an artist. (A) in his early teens (B) his early teens were (C) was his early teens (%) he was in his early teens 1(. %uring the eighteenth century )ittle Turtle was chief of the >iami tribe whose territory became 222 is now 6ndiana and +hio. (A) there (B) where (C) that (%) what 1/. =ansies can be culti$ated easily in home gardens but 222 'lenty of water and not too much sun. (A) to re1uire (B) they re1uire (C) re1uired (%) re1uiring 1-. <or ma#e adobe bric#s wor#ers mix sand and clay or mud with water and small 1uantities of straw grass or a similar material. 1.. A dictionary allows 1uic# access to the meaning of a word only if one #nows how s'ell the word. 1,. To simulate natural sounds in music com'osers often use the orchestral instrument that they feel most near a''roximates the sound in 1uestion. 15. 7odium is of one the few metals that will burn when heated in air. 28. Ali#e traditional harmony 0a99 'rogressions are based on triads but the s'ecial 0a99 sound is created by the 'iling u' of thirds abo$e a basic triad. 73 21. >aine4s abundant forests and ri$ers has made it a ha$en for many #inds of wildlife. 22. 6n feudal times the ran# of #nighthood carried no social distinction neither any man could be a #night. 2&. "thel 3ar$ey4s career illustrates some of the challenges encountered by women scientists of her generation as they sought su''ort for they wor#. 2(. Before the 'lains were settled 'rairie dog towns in many 'laces stretch as far as the eye could see. 2/. %irect mail ad$ertising ser$es to ac1uaint customers with 'roducts alert them to new o''ortunities and 'a$ing the way for other sales acti$ities. 2-. Animal life on =rince "dward 6sland is confined large to duc#s 'heasants and rabbits. 2.. Andrew *yeth is famous for his realistic and thoughtful 'aintings of 'erson and 'laces in rural =ennsyl$ania and >aine. 2,. 6t is common #nowledge that a flash of lightning is seen before a cla' of thunder heard. 25. *ild ele'hants are almost continuously wa$ing their trun#s both u' in the air and down aside the ground. &8. +riental rugs are considered $aluable and because their designs are intricate and the wea$ing 'rocess is time2consuming. &1. The >ontreal 6nternational "x'osition E"x'o -. F was a''lauded for dis'laying an degree of taste su'erior to that of similar ex'ositions. &2. A motion 'icture director for o$er twenty years )ois *eber stam'ed her films with herself style and 'ersonal con$iction. &&. According to astronomers the ty'e cloud found most fre1uently in outer s'ace consist of diffuse 'articles of dust and gas. 74 &(. Among almost se$en hundred s'ecies of bamboo some are fully grown at less than a foot high while other can grow three feet in twenty2four hours. &/. A foreign exchange rate is a 'rice that reflects the relati$e su''ly and demand of difference currencies. &-. @ecent studies ha$e shown that air into a house often has higher concentrations of contaminants than hea$ily 'olluted air outside. &.. @oc# decay or weathering is the results of reactions between elements in the atmos'here and the roc#4s constituents. &,. The 'hases of the >oon ha$e ser$ed as 'rimary di$isions of time for thousands of years ago. &5. The introduction of the 'ower loom enabled wea$ers to 'roduce yard goods faster more efficiently and less ex'ensi$e. (8. 6n the 1,,84s when ?eorge "astman first offered the Joda# camera and film 'hotogra'hy becoming a 'o'ular and indi$iduali9ed art. 75 1993 08 1. There is e$idence that 'rehistoric humans used fire 222 (88 888 B. C. (A) so early (B) the earliest (C) as early as (%) so early that 2. 6n the late 1,884s "llen @ichards began wor# in the new field of Esanitary scienceF which was concerned with waste remo$al water 'urification and 222. (A) to $entilate ade1uately (B) ade1uate $entilation (C) ade1uate $entilate (%) $entilation ade1uately &. 222 red clo$er high in 'rotein content is an extremely im'ortant leguminous hay and 'asture 'lant of the eastern ;nited 7tates. (A) The (B) There us the (C) 6t is the (%) That the (. The to'ology of >ars is more 222 than that of any other 'lanet. (A) li#e that of the "arth (B) the "arth4s li#e that of (C) li#e the "arth of that (%) that of the "arth4s li#e /. +striches are 222 of li$ing birds attaining a height from crown to foot of about 2.( meters and a weight of u' to 1&- #ilograms. (A) large strong (B) large and strong (C) larger and strong (%) the largest and strongest -. The glaciers that reached the =acific Coast were $alley glaciers and between those tongues of ice 222 that allowed the original forests to sur$i$e. (A) that many sanctuaries were (B) were many sanctuaries (C) were there many sanctuaries (%) there the many sanctuaries .. 222 orbits the 7un ;ranus rotates on its axis an imaginary line through its center. (A) <or it (B) 6t (C) As it (%) There is ,. 222 duties are 'laced on commodities according to their $alue. (A) +rdinarily tariff (B) +rdinary tariffs are (C) +n ordinary tariff (%) Tariffs are ordinarily 5. 222 about indi$iduals who really existed and things that actually ha''ened. (A) <ol#tales which sometimes tell stories (B) The stories of fol#tales sometimes telling 76 (C) 7tories sometimes told are when fol#tales (%) <ol#tales sometimes tell stories 18. 222 matter in one form is transmuted to another form a 'hase change is said to ha$e ta#en 'lace. (A) 7uch (B) Then (C) *hene$er (%) 7eldom 11. !oise in the technical sense im'lies a random chaotic disturbance 222. (A) usually does not want (B) usually is unwanted (C) that one does not usually want it (%) that is usually unwanted 12. %uring the late 1,/84s the 1uestion of the best route for the o$erland mail to California was 222 in the *est. (A) interest of a serious to'ic (B) a serious interest of to'ic (C) a to'ic of serious interest (%) serious interest of a to'ic 1&. 6n his boo# 7ocial Theory and 7ocial 7tructure sociologist @obert >erton ex'lored 222 in ways that society considers abnormal. (A) those indi$iduals whose beha$ior (B) why do indi$iduals whose beha$ior (C) why indi$iduals beha$e (%) the beha$ior of those indi$idual who 1(. 222 wooden buildings hel's to 'rotect them from damage due to weather. (A) =ainting (B) =ainted (C) The 'aint (%) By 'ainting 1/. Carbohydrates are the most abundant and 222 food sources of energy. (A) least cost (B) least costly (C) less cost (%) fewer costs 1-. The *right brother4s <lyer who they built and flew in 158& became world4s first successful air'lane. 1.. Astronauts circling the "arth may get to seen sixteen sunrises and sixteen sunsets e$ery EdayF. 1,. The clasmosaur a giant 'rehistoric sea re'tile with ;erce2loo#ing 0aws and fli''ers had a muscular nec# that accounted for much than half its length. 15. The sonometer is instrument used to study the mathematical relations of harmonic tones. 77 28. 6n the 1,884s daguerreoty'es were used a greatest deal es'ecially for 'ortraits. 22. The in$ention of a cotton gin by "it *hitney in 1.5& made cotton yarn more economy than linen yarn. 2&. 7cientists has found that the sali$a of the octo'us contains a substance that functions as a 'owerful heart stimulant. 2(. The #atydid a ty'e of grassho''er is acti$ely at night and rests motionless amid foliage during the day. 2/. 7oa' is used as a lubricant in ma#ing tiny wires for electrical a''liances such tele$ision sets and tele'hones. 2-. Although the art of sand 'ainting originated with neighboring =ueblo 6ndians the !a$a0o 6ndians ha$e refined and richly reinter'reted they symbology and execution. 2.. 6n 15-. Canada4s year centennial one and a 1uarter million 'eo'le from all o$er the world $isited =arliament 3ill in +ttawa. 2,. The ?eneral 7herman tree a giant se1uoia in California has grown to be the world4s largest 'lant at a''roximate 2.2 feet tall. 25. 7ince the turn of the century the number of !ati$e Americans li$ing in Canada is increased. &8. "leanor @oose$elt 'layed a leading 'art in women4s organi9ations and she was acti$e in encouraging youth mo$ements in 'romoting consumer welfare and to wor# for ci$il rights. &1. !utrients are substances neither occurring naturally or in synthetic form that are necessary for maintenance of the normal functioning of organisms. &2. "$en in an age of ex'erimentation and de'artures from con$ention the sonata form remain among the most $ital means of musical ex'ression. 78 &&. @esearchers ha$e found many ways of treating 'a'er so that it will be strong fire'roof and resistance to li1uids and acids. &(. Because its body is su''orted by water the blue whale can grow to a si9e considerable large than any land mammal ali$e today. &/. )angston 3ughes a 'rolific writer of the 15284s was concerned with the de'icting the ex'erience of urban Blac# 'eo'le in the ;nited 7tates. &-. %uring ecli'ses of the 7un the +0ibwa 6ndians of !orth America shot flaming arrows inside the s#y to re#indle the light. &.. <rom 1,52 to 1,5/ Alice "l$ira <recman was %ean of *omen at the newly foundation ;ni$ersity of Chicago. &,. 3istorical geology deals about data on the de$elo'ment of the "arth gathered from the study of roc#s which are analy9ed to determine their age and com'osition. &5. 3uman being ha$e thirty2thirty or thirty2four $ertebrae but a sna#e may ha$e as many as three hundred. 79 1993 10 1. A fuel is a substance used 222 light heat or energy. (A) generating (B) generates (C) to generate (%) it is generating 2. The state of >aine generally has cooler tem'eratures than 222. (A) there are most other states (B) most other state which ha$e (C) most other states ha$e (%) ha$ing most other states &. <ruit is one of the most abundant nutritious and 222 foods a 'erson can eat. (A) delicious (B) too delicious (C) is it delicious (%) tastes delicious (. =rescri'tions for correcti$e lenses that are 'ro$ided by an o'tometrist are often brought to an o'tician who 222 the lenses. (A) grinding (B) grinds (C) they grind (%) are ground /. )oganberries can be used in 0ams 222 their 0uice. (A) and for (B) while (C) too (%) in which -. <rom her early teens 222. (A) Blanche *illis 3oward4s determination to be an author (B) *as determined to be an author Blanche *illis 3oward (C) Blanche *illis 3oward was determined to be an author (%) An author Blanche *illis 3oward was determined to be .. Adhesi$e such as glue ta'e and gum $ary with the 'ur'ose 222 intended. (A) they were for (B) for they were (C) which were they (%) for which they were ,. Alas#an forests 222 fi$e or six miles inland from the =acific coast. (A) 'enetrate more rarely than (B) more rarely than 'enetrate (C) more 'enetrate than rarely (%) rarely 'enetrate more than 5. The colors of a rainbow 222 arranged in the same order. (A) which are always (B) and they are always (C) always (%) are always 80 18. 222 The Bearling won a =ulit9er =ri9e. (A) >ar0orie @awlings4 best wor# was (B) >ar0orie @awlings4 best wor# (C) 3er best wor# was >ar0orie @awlings4 (%) That >ar0orie @awlings4 best wor# 11. Dimmy Connors well2#nown tennis cham'ion is su''osed 222 that he did not want to 'artici'ate in all the tournaments once he had reached forty. (A) has said (B) he says (C) saying (%) to ha$e said 12. The month is not a suitable unit of measure for determining the seasons 222 the seasons are a solar not a lunar 'henomenon. (A) in order that (B) while (C) since (%) in $iew of 1&. The human s#eleton consists of more than two hundred bones 222 together by tough and relati$ely inelastic connecti$e tissues called ligaments. (A) are bound (B) to bind (C) bind them (%) bound 1(. !ot until about 28 888B. C. 222 executed. (A) were #nown of the oldest 'aintings (B) the oldest of #nown 'aintings were (C) the oldest #nown were 'aintings (%) were the oldest #nown 'aintings 1/. 6n 1.2. Ben0amin <ran#lin founded one of the first adult2education organi9ations 222 the Dunto. (A) has been called (B) which grou' called (C) to call (%) a grou' called 1-. At the future ban#s will be offering an increasingly broad s'ectrum of financial ser$ices. 1.. Considered one of America4s greatest 'laywrights "ugene +4!eill win the !o$el =ri9e for literature in 15&-. 1,. The density of a substance is calculus by di$iding its mass by its $olume. 15. The grou'er is an ocean fish that li$es in warm and tem'erate seas most around roc#y shores and coral reefs. 28. 6n the 15/84s aircraft were de$elo'ed that flew high they could hardly be seen from the ground. 81 21. =a'er is strong under tension instead crum'les easily under the stress of com'ression. 22. Tariffs are the taxes or customs duties le$ied against goods that are im'ort from another country. 2&. "ach 'erson in the ;nited 7tates consumes an a$erage of /-8 'ounds of dairy 'roducti$ity e$ery year. 2(. The $ascular system consist of the heart arteries $eins ca'illaries and lym'hatics. 2/. The 3o'i community of +raibi in northeastern Ari9ona is one of the oldest not if the oldest continuously occu'ied settlements north of >exico. 2-. *hen a cor'oration needs to raise large amounts of ca'ital common stoc# can be issued and sell in 'art to outside in$estors. 2.. The de$elo'ment of stratus clouds is extremely common o$er the cold seawater away the northwestern ;nited 7tates coast. 2,. Contem'orary management 'ractice ha$e been influenced by in$estigations in the beha$ioral sciences. 25. The Bu#on @i$er which flows into the Bering 7ea gi$es its name to a region of Alas#a and a territory of the Canada. &8. Although the ;nited 7tates ex'erienced ra'idly growth in the first half of the nineteenth century it was still 'redominately concerned with agriculture and forestry. &1. =orgy and Bess by ?eorge ?ershwin has called the first truly successful !orth American o'era. &2. +$er the 'ast two decades the 'o'ularity of the bicycle as a mean of trans'ortation and recreation has increased tremendously in the ;nited 7tates. &&. 3a$ing resided in !ew >exico for many years 'ainter ?eorgia +4Jeefe em'loys such as 7outhwestern motifs as bleached bones rolling hills and desert blooms. 82 &(. )ouisa >y Alcott4s most famous no$els )ittle *omen and one of the se1uels )ittle >en are considered classics for childrens. &/. *ea$ing was a function household in the first settlements in colonial America. &-. <ascination by the 'romise of the internal combustion engine and its a''lication to a self2 'ro'elled $ehicle 3enry <ord constructed a one2cylinder gasoline motor in1,52. &.. >arble has long been highly $alued for its beautiful strength and resistance to fire and erosion. &,. A ma0ority of the re'orts recei$ed from 'eo'le claiming to ha$e seen the legendary )och !ess >onster ha$e 'ro$en to be mista#es misconce'tions or they were being tric#ed. &5. <or con$enience it is common to s'ea# of 'lants as Eherbs F Eshrubs F and Etrees F but it is really no shar' distinctions among them. (8. The labor mo$ement de$elo'ed differently in the ;nited 7tates from the way did it in other countries. 83 1994 05 1. _____ limit to the extent which human beings may benefit from their own in$enti$e genius. (A) !ot any (B) 3as no (C) There is no (%) 6t not 2. The light from a laser differs _____ 'roduced by other sources such as electric bulbs fluorescent lam's and the sun. (A) from the light (B) and the light (C) the light that is (%) the light can be &. 6n addition to 'leasure _____ excitement challenge and relaxation. (A) the 'ro$iding of games (B) games if 'ro$iding (C) the games which 'ro$ide (%) games 'ro$ide (. !ot only can wal#ing fish li$e out of water _____ they can also tra$el short distances o$er land. (A) neither (B) and (C) but (%) if /. _____ "i0ah >cCoy4s in$ention of the lubricating cu' in the early 1,.84s machinery had to be sto''ed in order to be lubricated. (A) Before (B) *hen (C) *hile (%) )ately -. As >ercury mo$es in its solar orbit _____ its axis an imaginary line that runs through its center. (A) rotates it on (B) it rotates on (C) on rotates it (%) rotates on it .. The 3awthrone studies _____ the monotonous wor#ing conditions of factory 'ersonnel were a ma0or contribution to industrial 'sychology. (A) in which the in$estigation of (B) were they in$estigated (C) which were in$estigation (%) an in$estigation of ,. 6n 151( a bron9e tablet _____ 3arriet Tubman was 'laced at the entrance of the Cayuga Country Courthouse in Aubum !ew Bor#. (A) honored (B) for honor (C) in honor of (%) was honoring 5. 6t is unli#ely that a nation would choose war if its goals _____ 'eacefully. (A) meet (B) could be met 84 (C) ha$ing been met (%) would ha$e met 18. Their #een senses of hearing and smell ha$e made some ty'es of dogs _____ in hunting and trac#ing and as security guards. (A) as $aluable (B) of the $alue (C) are $alued (%) $aluable 11. ;sed only for wall surfaces that are ex'osed to $iew or re1uire a decorati$e effect _____. (A) the exactness in sha'e si9e and color of face bric# (B) face bric# must be exact in sha'e si9e and color (C) must be face bric# which is exact in sha'e si9e and color (%) the sha'e si9e and color must be exact of face bric# 12. _____ were first used in electrical 'ower 'roduction it was necessary to add su'er2heaters because turbines wor# best with high2'ressure steam. (A) 7team turbines (B) *hen steam turbines (C) <or steam turbines (%) The steam turbines which 1&. 7herwood Anderson4s no$el windy >c=lerson4s 7on _____ first a''eared in 151-. (A) a restless young man who stri$es for better things is concerned (B) is a concerned with a restless young man who stri$es for better things (C) concerned with a restless young man who stri$e for better things (%) why is concerned with a restless young man who stri$es for better things 1(. The redhead duc# builds a dee' nest of reeds _____ u' to a do9en egg are laid. (A) containing (B) which contains (C) in which (%) in it 1/. The dominant 'hiloso'hy of the Age of "nlightenment _____ in the uni$erse in terms of forces that could be detected by the human senses. (A) an ex'lanation for e$erything (B) attem'ted to ex'lain e$erything (C) e$erything was an attem't (%) ex'lained and attem'ted 1-. American sign language has its own distinct grammatical structure which must be mastered in the same way as that of another languages. 1.. Alas#s is the larger and most s'arsely 'o'ulated state of the ;nited 7tates. 1,. <ossil remains indicate that s1uidli#e creatures called betemnites swam in the sea who co$ered the !orth American continent .8 million years ago. 15. 6n 1551 singer Jathleen Battle is recei$ing the annual American Blac# Achie$ement Award for excellence in $ocal 'erformance. 85 28. 7cientists do not #now why did dinosaurs became extinct but some theories 'ostulate that changes in geogra'hy climate and sea le$els were res'onsible. 21. Anthro'ologists in$estigate the customs of different grou's of 'eo'le 'articularly that in isolated areas. 22. 3ydraulic machines lift hea$y load exertion large forces dri$e $ehicles and machine tools and control many #inds of motion. 2&. Although 7hirley Dac#son4s fiction often dealt with frightening ex'eriences she also wrote autobiogra'hical descri'tions humorous of her life in a small Cemor# town. 2(. *hen a nucleus is not di$iding it consisting of a nuclear membrane a nucleolus and e$enly distributed genetic material. 2/. >ost a1uatic animals breathe by means external res'iratory organs called gills. 2-. 6t is not #nown why only four of all the occurring naturally elements in the 'eriodic table are ferromagnetic. 2.. @ice has been a basically food for millions of 'eo'le for hundreds of years. 2,. 7ome linguists belie$e that the earliest language were no less com'lex as modern language. 25. The American artistic Dames Abbort >c!eill *histler 'romoted the idea of art for art4s sa#e insisting that 'ainting had no mission to fulfill. &8. +nce a teacher of <rench and 7'anish the writer >aya Angeiou remaining strongly committed to the goals of foreign language education. &1. "x'loitation of the 'owers of com'uters de'end on one4s ability to load information into them. &2. Animals usually 're'are for hibernation by eating large amounts of food to build out stored fat in their bodies. 86 &&. *illiam Denriings Bryan was a %emocratic nominee for the ;nited 7tates 'residency third times but he ne$er won. &(. The domestic architecture of the *estern world has res'onded to a number of cultural geogra'hy and social needs. &/. =eo'le ha$e always fascinated by the 'arrot4s colorful feathers and its ability to mimic human s'eech. &-. The American astronomer ?erard Jui'er disco$ered a satellite of ;ranus found Titan to ha$e an atmos'here and ad$anced theoretical of 'lanetary formation. &.. 7ome metal $ary in resilience at different tem'eratures becoming $ery brittle when cold. &,. The fritillaries one of the largest grou' of butterflies are found not only in this country but in many other 'arts of the world as well. &5. =receding the ;nited 7tated !a$al Academy was founded in 1,(/ sailors were trained at sea. (8. %uring her lifetime >argaret >ead was internationally #nown as an authority on $arious literate and illiterate culture. 87 1994 08 1. ?rou's of muscles in the head direct the actions necessary for _____. (A) chew and swallow (B) to chew and to swallow (C) being chewed and swallowing (%) chewing and swallowing 2. 6n the +sage tribe of +#lahoma beaded belts _____ who held a high social status. (A) only by women were fashioned (B) by women were fashioned only (C) were fashioned only by women (%) were by women fashioned only &. _____ commonly chosen as the first ste' to a career in 'ublic office. (A) *hy legal training is (B) )egal training is (C) )egal training that is (%) 6t is legal training (. 6n 1,/2 _____ one hundred 'iano2ma#ers in !ew Bor# alone. (A) were (B) had been (C) there were (%) being that there /. >ammals ha$e a larger more well2de$elo'ed brain _____ other animals. (A) than do (B) that are ha$ing (C) which ha$e (%) that do -. Astronomy de$elo'ed from the obser$ation _____ through regular cycles of motion. (A) going to hea$enly bodies (B) the hea$enly bodies going (C) hea$enly bodies that go (%) that the hea$enly bodies go .. _____ the arctic regions recei$e little sunlight the air there is too cold to hold much moisture. (A) Because (B) The reason that (C) Therefore (%) 6n conse1uence of ,. The wood of the holly tree close2grained and $ery hard _____ for musical instruments furniture and interior design. (A) is used (B) uses (C) used (%) is using 5. >any "nglish _____ were o''osed to the American @e$olution of 1..- mo$ed to Canada where they were #nown as ;nited "m'ire )oyalists. (A) settling there (B) they settled (C) who were settlers (%) settlers who 88 18. The wor#ing conditions of railroad em'loyees were _____ ha9ardous in the early days that 'ri$ate insurance com'anies refused to insure the wor#s. (A) so (B) $ery (C) 1uite (%) much 11. "lisha ?. +tis in$ented a safety de$ice designed to sto' the fall of an ele$ator _____ su''orting cable should brea#. (A) that which the (B) if its (C) might the (%) were its 12. 6n areas away from the 'oles the si9e of glaciers decreases in summer because the rising tem'eratures cause the lower 'arts _____. (A) melt (B) are melting (C) melted (%) to melt 1&. The final ste' in manufacturing cloth is ironing it between hea$y rollers _____ calendering. (A) which 'rocess called (B) 'rocess is being called (C) is calling that 'rocess (%) a 'rocess called 1(. The science of horticulture _____ the 'rimary concerns are maximum yield and su'erior 1uality utili9es information deri$ed from other sciences. (A) and which (B) in which (C) which is (%) which 1/. *hile holding no official or elected 'osition _____ as a statesman of great wisdom and acumen. (A) the res'ect of Boo#er T. *ashington (B) Boo#er T. *ashington being res'ected (C) Boo#er T. *ashington was res'ected by many (%) >any 'eo'le res'ected Boo#er T. *ashington 1-. A sym'hony orchestra conductor selects the re'ertoire inter'rets the music and directed the musicians during rehearsals. 1.. The rhinoceros is #nown for its distincti$e horns which continue to growing throughout the Animal4s lifetime. 1,. Before 1,88 only a few small 'ortable lam's had been ma#ing. 15. %reaming is a distinct and necessary 'art of slee'ing usually it characteri9ed by the occurrence of ra'id eye mo$ement (@">). 89 28. 7ea turtle hatchlings slee' afloat at the surface of the water not adults tend to slee' far below the surface. 21. !early all 1ualities in the 'hysical world can be ex'ressed in terms of four fundamentally measurementsL length mass time and electrical charge. 22. >usical chords generally consist of three or four notes which 'layed at the same time. 2&. The no$el or short story are the literary forms most ty'ically called fiction. 2(. "clecticism is the 'ractice of mixing elements dissimilar in style in single wor# of art. 2/. 7'eed refers only toward the rate of motion without s'ecifying any direction of motion. 2-. Turbines 'ro$ide 'ower for a $arious of machines including electric generators and water 'um's. 2.. %eciduous trees are those that shed all or nearly all of its lea$es each year. 2,. The same molecular orderliness that ma#es crystals so easy to analy9e mathematically ma#es them difficult using in the laboratory or the factory. 25. The =acific +cean constitutes about half of the "arth4s water surface and co$er about one2third of the total area of the globe. &8. The Tennessee Calley Authority has chartered by the ;nited 7tates Congress in 15&& to construct dams 'ower structures and flood2control wor#s along the Tennessee @i$er and its tributary streams. byN was chartered ! byN"#$%&' &1. The cost of 're'aring and har$esting an acre of field corn is extremely high e$en though in the best of weather. 90 &2. Dohn Audubon4s firsthand ac1uaintance with birds and his im'ressionistic artistic gi$e his drawings their high $alue and wide 'o'ularity. &&. +ne of =hillis *heatley4s earliest $erses com'osed in her teens celebrates learning redem'tion and $irtue three 'rinci'al themes of her wor# subse1uent. &(. The <lorida town of 7easide is laid out on its ,8 acres so no 'oint is more than a 182or 1/ minute wal#s from another. &/. 7tatistics show that there are only slightly fewer males than females in the teaching 'rofession yet it is 'o'ularly belie$ed that the $ast ma0ority of teacher are women. &-. Canadian scarlet2clad guards and mounties with horsebac# are 'art of the summer scene in +ttawa. &.. Bernese mountain dogs are hardy and loyalty and they ma#e excellent 'ets. &,. The basis conce'ts of systems engineering ha$e been in use for centuries. &5. 7ome of the most celebrated 'ublicity stunts while the history of radio were associated with ?racie Allen. (8. Aluminum is the most abundant metal in the crust of the "arth but the nonmetals oxygen and silicon are more still abundant. 91 1994 10 1. 7now aids farmers by #ee'ing heat in the lower ground le$els thereby _____ from free9ing. (A) to sa$e the seeds (B) sa$ing the seeds (C) which sa$es the seeds (%) the seeds sa$ed 2. _____ mineral content in the bones of $ery young children is low com'ared to that of adults. (A) 6f the (B) That is (C) The (%) 6t is the &. _____ the sil$ery2chec#ed hornbill chooses a hollow tree for a nest and seals herself in until her chic#s are grown. (A) =rotection for 'redators against (B) Against 'rotection 'redators for (C) <or 'rotection against 'redators (%) =redators against 'rotection for (. A flood'lain is an extension of a ri$er channel _____ not inundated exce't during a flood. (A) where is it (B) but it is (C) or is (%) in case it /. "$en though Dohn <. Jennedy failed to recei$e the %emocratic =arty4s $ice 'residential nomination in 15/- _____ won their nomination for =resident in 15-8. (A) he (B) who (C) and (%) but -. 7ince Tam'a has a mild winter climate _____ as a tourist resort. (A) 'o'ular it (B) that as 'o'ular (C) 'o'ular (%) it is 'o'ular .. Cosmetics rarely noted today for any dangerous 'ro'erties ha$e been _____ for serious health 'roblems in the 'ast. (A) res'onsibility (B) res'onsible (C) its res'onsibility (%) the res'onsible ,. The ;nited 7tates Congress made *ashington %.C. _____ in 1,88. (A) after the go$ernment center (B) of the go$ernment center (C) the center of go$ernment (%) then the center of go$ernment 5. Astronomer >aria >itchell was the first woman _____ to the American Academy of Arts and 7ciences. (A) to be elected (B) was elected 92 (C) which she was elected (%) for her to be elected 18. _____ of staging a 'lay that hel' the audience understand its structure and meaning. (A) 7'ecific as'ects (B) *hen s'ecific as'ects (C) 7'ecific as'ects are (%) There are s'ecific as'ects 11. 6llustrator !orman @oc#well s'eciali9ed in finely drawn richly anecdotal scenes _____. (A) of e$eryday small2town life (B) of which e$eryday life in a small town (C) were in a small town e$ery day (%) small2town life e$ery day 12. _____ de'ends on the density of both the ob0ect and the water. (A) An ob0ect floats whether or not (B) *hether or not an ob0ect floats (C) <loating an ob0ect whether or not (%) *hether or not a floating ob0ect 1&. 7turgeons are 'ri9ed for their blac#ish roe _____ when salted and ser$ed as an a''eti9er is called ca$iar. (A) which (B) such (C) therefore (%) while 1(. 6n !a$a0o society not only _____ for food and for woo but also as a means of 'ayment or exchange. (A) shee' were $aluable (B) to $alue the shee' (C) the shee'4s $alue (%) were shee' $alued 1/. The re'ertory of a concert band _____ traditionally included flourishes marches and music transcribed from other media. (A) is (B) which (C) of (%) has 1-. "ducated at home and re1uiring to wor# to su''ort her family )ouisa >ay Alcott recorded many of her life4s e$ents in her autobiogra'hical no$els. 1.. 6t was not until the latter 'art of the nineteenth century that the Adirondac# region of !ew Bor# 7tate was 'ro'er ma''ed. 1,. 7uch s'ecial ada'tations as lightweight bodies widely wings and unusually soft feathers allow owls to fly silently. 15. @esearch shows that em'loyees whose obtain satisfaction from their 0obs are more 'roducti$e. 93 28. As glaciers reach the sea huge chun#s of ice brea# away of them. 21. *ith en$ironmental regulations tightening many of California4s to' wine ma#ers are starting grow gra'es organically using no herbicides or 'esticides. 22. The 'anda becoming an endangered s'ecies because humans ha$e encroached on the wilderness that is essential to the animal4s sur$i$al. 2&. Ad$ocates of the art form Abstract "x'ressionism em'hasi9e free s'ontaneous and 'ersonality emotional ex'ression. 2(. =ollen grains contains half as many chromosomes as the 'arent 'lant. 2/. 6n August 1..( Dohn Adams left Boston and went to =hiladel'hia in a re'resentati$e to the <irst Continental Congress. 2-. >ary >c)eod Bethune was begun to teach in 1,5/ and by 152& had become 'resident of Bethune2Coo#man College in <lorida. 2.. The artist <rederic @emington created a large numbers of 'aintings of the western ;nited 7tates. 2,. *orldwide there are a''roximately 2.8 s'ecies of carni$orous birds that ma#e u' the order <alconiformes the scientifically name for haw#s. 25. <rom its innermost core to its corona the 7un has a structure ty'ical of most star of its #ind. &8. Although fre1uent melodramatic )illian 3ellman4s 'lays are mar#ed by insight and finesse. &1. @ubbing a glass rod with sil# will cause small 'ieces of dries 'a'er to 0um' to the rod and cling to it. &2. Tattooing is one of the oldest forms of creati$e ex'ression dating it bac# to at least ,888 B.C. 94 &&. Besides 'ro$iding clues to the nature of atoms mineral analysis allows to s'eculate geologists about the ancient "arth. &(. The first antibiotics were made from ali$e matter such as molds. &/. "$en the richest diamond de'osits tons of roc# must be mined and crushed to 'roduce one small diamond. &-. 7e$eral ancient cultures 'resented math in sentences form with little or no abbre$iation or symbolism. &.. 7ecretion by the 'ancreas into the bloodstream insulin affects metabolism by allowing cells throughout the body to use glucose as fuel. &,. >ost Algon1uin 6ndian tribes exce't those of the north were sedentary and carried on agriculture with $arying degrees of intense. &5. Although culti$ated in the new world for hundreds of years only within the last century the tomato has become recogni9ed as a $aluable food. (8. Though the different between any two languages in the world may a''ear to be great they seem to function e1ually well as means of communication. 95 96 97 1995 01 1. An underlying assum'tion of most mar#et research is that 'eo'le are continually _____ financial decisions based on their desire for goods that gi$e them the most satisfaction. (A) ma#ing (B) and ma#e (C) being made (%) ha$ing made 2. _____ tem'era 'aint the artist mixes dry 'igments with water until the mixture resembles a stiff 'aste. (A) 6n 're'aration (B) The 're'aring of (C) To 're'are (%) =re'ared &. *hen two straight lines meet _____ an angle. (A) it is formed (B) formed (C) they form (%) to form (. >adge >ac#lin 'romoted the ex'ansion of medical training to include genetics _____ su''orted the founding of genetics de'artments in !orth American medical schools. (A) nor (B) and (C) while (%) if /. _____ mammals ha$e hair at some time in their li$es though in certain whales it is 'resent only before birth. (A) >ost (B) The most (C) >ost of which (%) 6n most of the -. The digesti$e en9yme 'e'sin brea#s down 'roteins into com'onents _____ readily absorbed by the human body. (A) that can be (B) and are (C) which they (%) are to be .. _____ the 'recise 1ualities of the hero in literary wor#s may $ary o$er time the basic exem'lary function of the hero seems to remain constant. (A) *hate$er (B) "$en though (C) 6n s'ite of (%) @egardless ,. !ot until the dedication of Bellowstone =ar# in the late nineteenth century _____ a national 'ar#. (A) the ;nited 7tates had (B) did the ;nited 7tates ha$e (C) when the ;nited 7tates had (%) the ;nited 7tates ha$ing 5. %aniel Jen 6nouye 3awaii4s first Congressman was elected to the ;nited 7tates 7enate in 15-& 98 where _____ #nown for his unbiased $iews on ci$il issues. (A) being (B) it is he (C) he became (%) ha$ing become 18. Because caricature tends to em'hasi9e the 'eculiarities of a sub0ect _____ an effecti$e $ehicle for 'ictorial satire. (A) which is often (B) and often seen as (C) it is often (%) many of which are 11. 6n the nineteenth century 7amuel ?ridley 3owe founded the =e#ins 7chool for the Blind _____ for children in Boston >assachusetts. (A) that institutes (B) while instituted (C) was an institution (%) an institute 12. "arly forms of life on "arth _____ in the absence of oxygen re1uired elements such as sulfur instead. (A) which li$ed (B) whose life (C) li$ed (%) were li$ing 1&. =eo'le in 'rehistoric times created 'aints by grinding materials such as 'lants and clay into 'owder _____. (A) water to be added (B) for adding water then (C) and water added (%) and then adding water 1(. +ften $ery annoying weeds _____ and act as hosts to many insect 'ests. (A) that crowd out less hardy 'lants than goldenrods (B) crowding out less hardy 'lants by goldenrods (C) the goldenrod4s crowding out of less hardy 'lants (%) goldenrods crowd out less hardy 'lants 1/. 7tarting around .888 B. C. and for the next four thousand years much of the !orthern 3emis'here _____ tem'eratures warmer than at 'resent. (A) with ex'erience of (B) ex'erienced (C) ex'eriencing (%) ex'erience 1-. The chief goal of biochemistry is for to understand the structure and beha$ior of the carbon2 containing com'ounds that ma#e u' $arious com'onents of a li$ing cell. 1.. According to entomologists 'ollinating insects are attracted to flowers by scent else by color. 1,. The American writer Alex 3aley tra$eled more than a half million mile to authenticate his no$el @oots. 99 15. @esearch by 'hysician Alice 3amilton on industrially ailments and 'oisons led to greatly im'ro$ed health conditions for wor#ers in the early 15884s. 28. 6t was in the late 15&84s where %ixieland 0a99 was a''reciated by the general 'ublic for the first time. 21. 7ince 1528 women ha$e been able to 'artici'ate acti$ely in the go$ernment the ;nited 7tates. 22. The architectural floor 'lan for a building is 'rimarily a diagram of the location and function of area each of the building. area. 2&. Cloc#s not only measure and tell time but also ser$e as decorated in homes and other buildings. 2(. Commercial 'rices for gems are based in se$eral factors including beauty durability rarity and the current fashion. 2/. Candle are made by di''ing a wic# into wax to 'our wax into a mold containing a sus'ended *ic# or rolling wax around a wic#. 2-. A$alanches occur why 'articles of sand roc# or snow are dragged down a slo'e by gra$ity. 2.. The a$erage annual solar radiation recei$ed by the atmos'here $aries strongly with latitude it is four times great at the e1uator than at the 'oles. 2,. =eggy ?uggenheim was none so much attracted to contem'orary art itself as she was to the bohemian art world. 25. @adon2in$isible tasteless and has no odor2is released into the atmos'here from soil and roc#s. &8. 7'arrows small birds of the finch family ha$e stout bea#s ada'ted seed eating and are useful to farmers in destroying weed seeds. &1. The 'oems of 7ara Teasdale are noting for their sim'licity and 'urity of form. 100 &2. Charlotte =e#ins ?ilman was a leading intellectual in the women4s mo$ement while its early decades in the ;nited 7tates. &&. The Canadian 'ro$ince of !ewfoundland has a roc#y coast a moisture climate and 'robably the best cod2fishing areas in the world. &(. Among the fa$orite attractions at the !ational Air and 7'ace >useum in *ahington %. C. Are the film 'resented on the fi$e2story2tall screen. &/. Alchemists had the idea which by a''lying chemical $a'ors to base metals they could create gold. &-. The most often flour is made from wheat but it may also be made from the seeds of other cereal 'lants. &.. )acrosse the oldest organi9ed s'ort in !orth America originally 'layed by the 6ro1uois 6ndians throughout u''er !ew Bor# and lower +ntario. &,. Although most house 'lants are ac1uired already 'otted they also can be grown from seeds or leaf cuttings from mature 'lant. &5. The uni1ue ability of the horseshoe crab detected bacterial endotoxins was a chance disco$ery in the 15.84s at the >arine Biological )aboratory in *oods 3ole >assachusetts. (8. Although ex'erimental tele$ision had been a$ailable since the 15284s many 'eo'le in ;nited 7tates did not see a broadcast until was the !ew Bor# *orld4s <air of 15&5. 101 1995 05 1. _____ 3enry <ord first sought financial bac#ing for ma#ing cars the $ery notion of farmers and cler#s owning automobiles was considered ridiculous. (A) 3ow (B) "$en (C) *hen (%) %es'ite 2. The first 'resident of Cornell ;ni$ersity Andrew *hite _____ the conce't of a uni$ersity unaffiliated with any religious sect or 'olitical 'arty. (A) de$elo' (B) de$elo'ing (C) de$elo's (%) de$elo'ed &. 6n order for information to be easily communicated _____ must be organi9ed in an understandable way. (A) there (B) and (C) it (%) how (. Because of record snowfalls in the mountains surrounding ;tah4s ?reat 7alt )a#e there is more water in the la#e and its salt content is _____ it once was. (A) least as (B) much less than (C) the least what (%) less /. 3ome mo$ies began to become 'o'ular as a hobby in the ;nited 7tates during the 15284s _____ of low2cost film. (A) the in$ention followed (B) the in$ention to follow (C) following the in$ention (%) in$ention the following -. >ary "dmonia )ewis a scul'tor who studied at +berlin College was _____ by 3rriet ffosmer. (A) tutored in the neoclassical aesthetic (B) the neoclassical aesthetic tutored in (C) aesthetic in the neoclassical tutored (%) the aesthetic neoclassical tutored in .. "$en though rhubarb is a $egetable _____ as a dessert. (A) 'o'ular also (B) it is 'o'ular (C) but it is 'o'ular (%) which is 'o'ular ,. "li9abeth Cabot Agassi9 _____ of @adeliffe College had wor#ed as both an educator and a naturalist. (A) the first 'resident (B) was the first 'resident (C) she was the first 'resident (%) which she was the first 'resident 5. _____ e$er de$elo'ed was celluloid a combination of natural cam'hor and cellulose nitrate. 102 (A) The first 'lastic and (B) Being the first 'lastic (C) The first 'lastic (%) 6t was the first 'lastic 18. +ften the design of a scholarly in$estigation _____ by the 1uestion it is addressing. (A) to affect (B) affects (C) affected (%) will be affected 11. Though once 1uite large _____ 'o'ulation of the bald eagle across !orth America has drastically declined in the 'ast forty years. (A) it is the (B) there is the (C) as the (%) the 12. =lywood was originally manufactured from logs _____ for other 'ur'oses. (A) were not suitable (B) that were not suitable (C) which they were not suitable (%) and suitable were not 1&. Aerobic exercises create a _____ oxygen in the body without seriously disru'ting normal body functions. (A) demand (B) demanding (C) demanding of (%) demand for 1(. A 'rotagonist of a 'lay is _____ in tragedy as the suffering main character. (A) what #nown (B) #nown as (C) what it is #nown (%) what is #now 1/. The bea$er chews down trees to get food and material _____ its home. (A) builds (B) it can builds (C) that it builds (%) with which to build 1-. The architect rural style of >annerism used unbalanced 'ro'ortions nor arbitrary arrangements of decoration. 1.. The theater is 'erha's the most com'lex of the arts re1uiring a number large of 'eo'le for a 'lay4s 'erformance. 1,. 7ome comets are $isibly to the unaided eye but only for se$eral months when they 'ass closest to the 7un. 103 15. 7inger comedienne and creating of the radio character Baby 7noo#s <anny Buice had an engaging 'ersonality that delighted audiences for nearly half a century. 28. 7accharin is about &88 times as sweeter as table sugar but has no carbohydrates and no food $alue. 21. +ne of the s to the sur$i$al of any animal is its ability ada'ts to changes in the en$ironment. 22. The element bromine is not found in nature in the free state because of their strong tendency to ta#e u' electrons and form com'ounds. 2&. %uring di$es that may reach de'ths of almost / 888 feet an ele'hant seal can holds its breath for an hour or more. 2(. The de$elo'ment of the boiler is closely related to those of the steam engine to which it is a necessary ad0unct. 2/. The @odeo Association of America formed in 1525 set u' a system 'oints for determining the national rodeo cham'ions. 2-. As the late 15(84s Dac#son =olloc#4s art has been considered the 'i$otal manifestation of Abstract "x'ressionism as his form of it is #nown. 2.. 7tars differ fundamental from 'lanets in that they are self2luminous whereas 'lanets shine by reflected light. 2,. 6n 15.& and 15.( %r. 7yl$ia >ead was selected chief scientist and a1uanaut for di$ing 'ro0ects in$ol$ed the underwater laboratory 3ydrolab. &8. Almost all human acti$ity alters water 1uality somewhat but not necessity as a result of 'ollution by human materials. 104 &1. %uring 'eriods of hea$y rains a swam' can become a naturally flood controlling de$ice if excess runoff can be tem'orarily stored in its basin. &2. *ith the ad$ent of 'ower2dri$en machinery home industry began toward gi$e way to 'roduction in mills and factories. &&. )i1uefied natural gas is the most $olatile chemistry ex'losi$e in common use today. &(. 3istorian ha$e been able to calculate the dates of e$ents from long ago by tracing references to ecli'ses that too# 'lace at the same time. &/. 6n a small community beha$ioral norms are more uni$ersally understood and acce'ted and are therefore more li#ely being homogeneous than in a large city. &-. Anthro'ologists face com'lex 'roblems of analysis and synthesis when they go about the tas# of descri'tion the culture of a grou' of 'eo'le. &.. The guilds of the >iddle Ages began as associations in merchants established for the 'ur'ose of regulating the rules of commerce. &,. Boo#er T. *ashington $iewed as one of the ablest 'ublic s'ea#ers of his time. &5. The Alas#an wilderness is filled of wildlife including wol$es foxes and such waterfowl as wild geese. (8. 3istorically no artists ha$e 'resented clearer or the more com'lete records of the de$elo'ment of human culture than scul'tors ha$e. 105 1995 08 1 According to the third law of thermodynamics _____ 'ossible is K2.&.1- degrees centigrade. (A) that tem'erature is lowest (B) the tem'erature is lower (C) lowest tem'erature (%) the lowest tem'erature. 2 After the <irst *orld *ar the author Anais !in became interested in the art mo$ement #nown as 7urrealism and in 'sychoanalysis both _____ her no$els and shorts stories. (A) in which the influence (B) of which influenced (C) to ha$e influence (%) its influence in & >us#rats generally _____ close to the edge of a bog where their fa$orite 'lant foods grow 'lentifully. (A) staying (B) they are staying (C) stay (%) to stay there ( +li$er "llsworth _____ of the ;nited 7tates 7u'reme Court was the author of the bill that established the federal court system. (A) he was the third chief 0ustice (B) the third chief 0ustice was (C) who the third chief 0ustice (%) the third chief 0ustice / _____ Colonial 'eriod the great ma0ority of Connecticut4s settlers came from "ngland. (A) 7ince (B) The time (C) %uring the (%) 6t was - A 'olitician can ma#e a legislati$e 'ro'osal more _____ by gi$ing s'ecific exam'les of what its effect will be. (A) to understanding (B) understandably (C) understandable (%) when understood . =laying the trum'et with da99ling originality _____ dominated 0a99 for 28 years. (A) )ouis Armstrong (B) The influence of )ouis Armstrong (C) The music of )ouis Armstrong (%) )ouis Armstrong4s talent , Before e$ery 'residential election in the ;nited 7tates the statisticians try to guess the 'ro'ortion of the 'o'ulation that _____ for each candidate. (A) are $oted (B) $oting (C) to be $oted (%) will $ote 5 _____ at a ri$er ford on the %onner =ass route to California the city of @eno grew as bridges and railroad were built. 106 (A) 7ettle (B) To settle (C) 6t was settling (%) 3a$ing been settled 18 The air inside a house or office building often has higher concentrations of contaminants _____ hea$ily 'olluted outside air. (A) than does (B) more (C) as some that are (%) li#e of 11 The decimal numeral system is one of the _____ ways of ex'ressing numbers. (A) useful most world4s (B) world4s most useful (C) useful world4s most (%) most world4s useful 12 "mily %ic#inson4s garden was a 'lace _____ great ins'iration for her 'oems. (A) that she drew (B) by drawing her (C) from which she drew (%) drawn from which C () 1&. The mountains surrounding )os Angeles effecti$ely shield the city from the hot dry winds of the >o0a$e %esert _____ the circulation of air. (A) but they also 're$ent (B) also 're$ented by them (C) and also to 're$ent (%) and also 're$enting A () % *+ 1(. !ot only _____ to determine the de'th of the ocean floor but it is also used to locate oil. (A) to use seismology (B) is seismology used (C) seismology is used (%) using seismology A ,- B () 1/. !ebras#a has floods in some years _____. (A) in others drought (B) droughts are others (C) while other droughts (%) others in drought 1-. =o' Art was a mo$ement of the 15/84s and 15-84s whom imagery was based on readily recogni9ed American 'roducts and 'eo'le. 1.. Because the tachinid fly is a 'arasite of harmful insects much s'ecies ha$e been im'orted into the ;nited 7tates to combat insect 'ests. 1,. All almost the electricity for industrial use comes from large generators dri$en by steam turbines. 107 15. The "gy'tians first disco$ered that drying fruit 'reser$ed it made it sweeter and im'ro$ement its fla$or. 28. %uring his twel$e year there "llsi >arsalis turned the !ew +rleans Center for the Creati$e Arts into a rich training 'lace for future 0a99 stars. 21. Algebra is the branch of mathematics concerned with o'erations on sets of numbers or other elements that are often re'resented at symbols. 22. As her focus changed the lo$e 'oetry that "dna 7t. Cincent >illay 'roduced in the 15284s increasing ga$e way to 'oetry dealing with social in0ustice. 2&. *hen a 'earl is cut in half and examined under a microsco'e but its layers can be seen. 2(. A conductor uses signals and gesture to let the musicians to #now when to 'lay $arious 'arts of a com'osition. 2/. 6f a glass li9ard loses its tails a new one grows to re'lace it. 2-. >any of the recording instruments used in $ary branches of science are #ymogra'hs. 2.. 6t was near end of 'rehistoric times that the first wheeled $ehicles a''eared. 2,. >artin )uther Jing Dr.4s magnificent s'ea#ing ability enabling him to effecti$ely ex'ress the demands for social 0ustice for Blac# Americans. 25. %esigners of athletic footwear finely tune each category of shoe to its 'articularly acti$ity by studying human motion and 'hysiology. &8. ?othic @e$i$al architecture has se$eral basis characteristics that distinguish it from other nineteenth2century architectural styles. &1. 7ince rats are destructi$e and may carry disease therefore many cities try to exterminate them. 108 &2. 6n the ;nited 7tates among -8 'ercent of the s'ace on the 'ages of news'a'ers is reser$ed for ad$ertising. &&. @ecently in the automobile industry multinational com'anies ha$e de$elo'ed to the 'oint where such few cars can be described as ha$ing been made entirely in one country. &(. 7cientists belie$e that by altering the genetic com'osition of 'lants it is 'ossible to de$elo' s'ecimens that are resisting to disease and ha$e increased food $alue. &/. The 'ur'ose of tra$eler4s chec#s is to 'rotect tra$elers from theft and accidental lost of money. &-. The early 'eriods of a$iation in the ;nited 7tates was mar#ed by exhibition flights made by indi$idual fliers or by teams of 'erformers at country fairs. &.. The American anarchist "mma ?oldman infused her s'irited lectures 'ublishes and demonstrations with a 'assionate belief in the freedom of the indi$idual. &,. Being the biggest ex'anse of brac#ish water in the world the Baltic 7ea is of s'ecial interesting to scientists. &5. The main ad$ertising media include direct mail radio tele$ision maga9ines and news'a'er. (8. *hile studying the chemistry of human body %r. @osalyn Balow won a !obel =ri9e for the research she conducted on the role of hormones. 109 1995 10 1. _____ the demands of aeros'ace medicine and agriculture engineers are creating exotic new metallic substances. (A) >eet (B) Being met are (C) To meet (%) They are meeting B ./01 C 23 2. _____ Dames A. Bland ECarry >e Bac# to +ld CirginnyF was ada'ted as the state song of Cirginia in 15(8. (A) *as written by (B) 3is writing was (C) 3e wrote the (%) *ritten by A ./ was B *+ &. >ary ?arden _____ the early 15884s was considered one of the best singing actresses of her time. (A) a so'rano was 'o'ular (B) in a 'o'ular so'rano (C) was a 'o'ular so'rano (%) a 'o'ular so'rano in % *456 (. 6n the realm of 'sychological theory >argaret <. *ashburn was a dualist _____ that motor 'henomena ha$e an essential role in 'sychology. (A) who she belie$ed (B) who belie$ed (C) belie$ed (%) who did she belie$e Awho 7 she 89 B () %*A /. _____ no real boundary to the 'art of the ocean referred to as a Edee'F because of changing water le$els and mo$ement in the sea floor. (A) 6t is (B) To be (C) Being (%) There is -. ;nli#e moderate antisla$ery ad$ocates abolitionists _____ an immediate end to sla$ery. (A) demanded (B) they demand (C) that they demanded (%) in that they demand A () B .- % -0,: .. A few animals sometimes fool their enemies _____ to be dead. 110 (A) a''ear (B) to a''ear (C) by a''earing (%) to be a''earing C () % to be a''eared ,. _____ of the mourning do$e is made only by the male. (A) That the sad cooing call (B) The sad cooing call (C) 6s the sad cooing call (%) The cooing call is sad. Athat ;< B () % *C 5. The wor# of 'ainters in the ;nited 7tates during the early twentieth century is noted for _____ as well as telling stories. (A) it is re'resenting of images (B) which images re'resenting (C) the images re'resenting (%) re'resenting images % () 18. Abraham )incoln insisted that _____ not 0ust on mere o'inion but on moral 'ur'ose. (A) to base democracy (B) for democracy to be based (C) democracy be based (%) whene$er democracy is based B *+ C () % is => 11. *orld trade 'atterns are indicati$e of the im'ortant economic issues _____ confront the world today. (A) what (B) that (C) who (%) they B () C ?@ % ./- 12. 6n the sym'hony orchestra bass drums are not _____ #ettle drums. (A) as 're$alent (B) that 're$alent (C) so 're$alent as (%) 're$alent than A AB as C () % C more 1&. >ost natural 'orts are located where the shoreline is irregular and _____. (A) dee' water (B) is the water dee' (C) the water is dee' (%) there is the dee' water 111 A BD B *+ C () % =>E 1(. _____ to the re'roducti$e rates of other small mammals that of the bat is $ery low indeed. (A) Com'ared (B) 6t is com'ared (C) To be com'aring (%) 3a$e com'ared A () B .01 Cbe done 1/. _____ nati$e to "uro'e the daisy has now s'read throughout most of !orth America. (A) Although (B) 6f it were (C) 6n s'ite of (%) That it is A FG it is B -0HIJ % that ,#K 1-. +n "llesmere 6sland in the Arctic one fossil forest consists of a nearly hundred large stum's scattered on an ex'osed coal bed. 1.. The surface conditions on the 'lanet >ars are the more li#e the "arth4s than are those of any other 'lanet in the solar system. 1,. The midnight sun is a 'henomenon in which the 7un $isible remains in the s#y for twenty2four hours or longer. 15 The 3umber @i$er and its $alley form a ma0or salmon2fishing lumbering hunting and farmer region in western !ewfoundland Canada. 28 Among the 'arameters that determine whether an en$ironment is suitably for life as we #now it are tem'erature water a$ailability and oxygen content. 21. *hen eggs of some s'ecies of insects hatch the newly born insects loo# almost li#e its adult counter'arts. 22. Although there are more than 2 888 different $ariety of candy many of them are made from a basic boiled mixture of sugar water and corn syru'. 112 2&. The ca'ital of the ;nited 7tates originally !ew Bor# City was mo$ed to =hiladel'hia where stayed until 1,88. 2( >igration of animals may be initiated by 'hysiological stimuli such as re'roducti$e changes external 'ressures such as weather changes or a combination of either ty'es of changes. 2/. )awrence @obert Jlein recei$ed the 15,8 !obel =ri9e in economics for 'ioneering the useful of com'uters to forecast economic acti$ity. 2-. The strength si9e and surefootedness of the 3ama ma#e it as excellentcy beast of burden in mountainous regions today as it was in the 'ast. 2.. !uclear energy des'ite its early 'romise as a source of electrical 'ower is still insignificant in com'ared with older and safer energy sources. 2,. 3awaii4s eight ma0or islands and numerous islets form the only state in the ;nited 7tates that is not lie on the mainland of !orth America. 25. "stablished about 1&88 the Acoma 'ucblo in !ew >exico is belie$ed to be oldest continuously occu'ied settlement in the ;nited 7tates. &8. !octurnal creatures raccoons forage 'rimarily at night and s'end their days rest in their dens. &1. >arian Anderson in addition to gaining fame as a concert soloist also ser$ed as a ;nited 7tates delegates to the ;nited !ations. &2. ?ood dental hygiene and a 'ro'er diet are necessary for the maintain of sound teeth. &&. @ice ada't better than other grain cro's to areas with unfa$orable saline al#aline or acid sulfate soils. &(. Deanette @an#in 'acifist and lifetime crusader for social and electoral reform was the first woman to be a membershi' of the ;nited 7tates Congress. 113 &/. 6n the ;nited 7tates >aryland ran#s second only to Cirginia as a oyster2 'roducing state. &-. The social games of children hel' to 're'are themsel$es for their adult roles. &.. Algae ha$e been an extremely im'ortant lin# in the food chain after the beginning of life on "arth as we #now it. &,. The chorus 'lays a large 'art in any oratorio lin#ing areas were sung by soloists with segments of choral music. &5. Butte >ontana had built abo$e large de'osits of sil$er gold and co''er and became #nown as Ethe richest hill on "arth.F (8. @ealistic no$els in trying to 'resent life as it actually is ha$e written many wor#s that are notable for their artistry of style. 114 1996 01 1. 7ociologists ha$e long recogni9ed that social tension _____. (A) elements from grou' li$ing. (B) elements of a normal grou' life (C) li$ing are a grou' of elements. (%) are normal elements of grou' life 2. _____ ha$e a $ery #een sense of hearing although most do not hear sounds audible to the human ear. (A)*hile some insects do (B) 7ome insects which (C)7ome insects (%)That some insects. &. Although both 'olitical 'arties wanted %wight %. "isenhower as their 'residential nominee in 15/2 he became a @e'ublican candidate and _____. (A)=resident was electing (B) was elected =resident (C)to elect the =resident (%)being elected 'resident. (. 6f an act is rewarded many times immediately and with strong reinforces it will ra'idly become _____. (A)a habit (B) into a habit (C)that which a habit (%)a habit can be /. ?iant 'andas resemble bears in sha'e and in _____. (A)it is a slow clumsy way to wal# (B) the slow clumsy way they wal# (C)they wal# in a slow clumsy way (%)their slow wal# is clumsy. -. _____ tem'erature at which air holds as much water $a'or as it can is called the dew 'oint. (A)6t is the (B) 6s the (C)As the (%)The .. The earring is one of the oldest #nown ornaments and _____ 'ieces of stone bone or shell. (A)was from originally from (B) was made originally from (C)originally made was from (%)from originally made was ,. !o one #nows exactly _____. (A)how did s'eech begin (B) how s'eech began (C)how the beginning of s'eech (%)of how beginning s'eech. 5. _____ mechanical de$ice has e$er been in$ented that can satisfactorily re'lace teasel flower heads for raising the na' on cloth. (A)!o (B) !ot the 115 (C)!e$er has a (%)There is no 18. "$en as a girl _____ to be her life and theater audiences were to be her best teachers. (A)'erformances by <anny Brice were (B) it was #nown that <anny Brice4s 'erformances were (C)audiences #new that <anny Brice4s 'erformances were (%)<anny Brice #new that 'erforming was 11. _____ the diffusion of heat u'ward to the "arth4s surface the tem'erature within the "arth remains constant. (A)That (B) %es'ite (C)6f (%)*hen 12. !oise in a room may be reduced by car'eting dra'eries and u'holstered furniture _____ absorb sound. (A)which they all (B) of them all (C)all of which (%)of all which 1&. _____ de$ised to lessen the drudgery of washing clothes that origin of the washing machine is unclear. (A)*ere the in$entions so numerous (B) The in$entions so numerous (C)7o numerous were the in$entions (%)The in$entions that were so numerous 1(. +f the thousands of $arieties of bird s'ecies in !orth America _____ bright red 'lumage li#e the cardinal are most often designated as state bird. (A)those that ha$e (B) who ha$e (C)which ha$e (%)to ha$e their 1/. _____ as a territory in 1,/( and admitted as a state in 1,-1 Jansas is at the geogra'hical center of the ;nited 7tates. (A)By organi9ing (B) Because organi9ed (C)+rgani9ed (%)3e had organi9ed 1-. Before 'ioneers cleared the land for farms cities and road forests co$ered about (8 'ercent of what is now the state of 6llinois. 1.. The sea chantey a ty'e of fol# music not only described the 'leasures of stations4 li$es ashore also but the harsh conditions of life aboard shi'. 1,. >ount @ushmore !ational >emorial in 7outh %a#ota has a heads of four 'residents of the ;nited 7tates car$ed into its face. 116 15. !est building is much less commonly among mammals than among birds. 28. The Awa#ening a no$el by Jate Cho'in shoc#ed readers and cause a storm of criticism. 21. The Alas#an 3ighway was officially o'ened !o$ember 28 15(2 although much more wor# needed be done to com'lete it. 22. 7agebrush flourishes in the dry soil of the western 'lains where other many 'lants cannot grow. 2&. >odern directions of 7ha#es'eare are not longer inhibited by earlier traditions of realistic settings. 2(. 7ur$eys show that the ma0ority of 'assengers are 'leasing that an agreement has been reached to forbid smo#ing on commercial flights within the continental ;nited 7tates. 2/. 7na#es are ca'able of graceful motion throughout the entire long of their rubbery bodies. 2-. Tariffs 're$enting the most efficient use of the world4s resources by restricting di$ision of labor to national boundaries. 2.. The Aleuts in western Alas#a ha$e always de'ended of the sea for food. 2,. Atoms that ha$ing different atomic numbers generally beha$e differently. 25. +$er the 'ast few year many towns in the ;nited 7tates ha$e been 0oining with neighboring communities to share the costs of go$ernment. &8. *hat ma#es for human s#eleton hard and strong is the 'resence of the metallic element calcium. &1. >any of @obert Bly4s 'oems ex'lore solitude natural $igor and silent in an immediate and modern idiom. &2. To con$ert an angle measured in radians for an e1ui$alent angle measured in degrees multi'ly the number of radians by /..25-. 117 &&. 7er$ing as chief of the ;nited 7tates Children4s Bureau from 1521 to 15&(. ?race Abbott fought for the rights of women and children through the world. &(. To 'eo'le from tem'erate climates tro'ical butterflies may seem incredible big. &/. The first railroad in the ;nited 7tates were short wooden tramways connecting mines also 1uarries with nearby streams. &-. The league of *omen Coters of the ;nited 7tates identifies certain local state and nation issues for study and action. &.. <ibers can come from 'lants animals or mineral ores or they may be made from a $ariety chemical substances. &,. "dwin <ran#o ?oldman was the first bandmaster to encourage leading contem'orary com'ositions to write original wor#s for a band. &5. The ta'ir an odd2toed hoofed mammal feed on 'lants eating such things as grass lea$es fallen fruit and moss in large 1uantities. (8. <or thousands of years 'eo'le ha$e used some #ind of refrigeration cooling be$erages and 'reser$e edibles. 118 1996 05 1. *ind motion can be obser$ed in the mesos'here by _____ the trails of meteors 'assing through it. (A) to watch (B) watching (C) watched (%) watch 2. Thomas "dison4s first 'atented in$ention was a de$ice_____ in Congress. (A) $otes counted for (B) had been counting $otes (C) for counting $ote (%) be a counted $ote &. Clara Bow a 'o'ular actress in the 15284s retired _____ she was unable to ma#e the transition from silent films to sound films. (A) ne$ertheless (B) in s'ite of (C) because (%) and for (. Built in 1,,2 the Jin9ua Ciaduct in >c#ean County =ennsyl$ania is o'en only to those $isitors _____ are able to wal# its 2 8/, 2 foot length. (A) who (B) to whom (C) which they (%) that which /. A bridge must be strong enough to su''ort its own weight _____ the weight of the 'eo'le and $ehicles that use it. (A) as well (B) so well (C) as well as (%) so well as -. The swallows of Ca'istrano are famous _____ to the same nests in California each s'ring. (A) to return (B) who returned (C) they returned (%) for returning .. 6n the fourteenth century _____ that glass coated with sil$er nitrate would turn yellow when fired in an o$en. (A) the disco$ery (B) it was disco$ered (C) with the disco$ery (%) if it was disco$ered ,. _____ recurring fear is out of 'ro'ortion to any real danger it is called a 'hobia. (A) *hen (B) *hereas (C) *hich (%) *hether 5. >any modern 'hotogra'hers attem't to mani'ulate elements of 'hotogra'hy other _____ in their 'hotogra'hs. (A) than light is 119 (B) than light (C) being light (%) light 18. <or any adhesi$e to ma#e a really strong bond _____ to be glued must be absolutely clean and free from moisture or grease. (A) and surfaces (B) when surfaces (C) the surfaces (%) surfaces that 11. Although still underwater )oihi 7eamount the newest 3awaiian island _____ closer to the surface by fre1uent $olcanic eru'tions that add layers of la$a to the island. (A) brought (B) to be brought (C) being brought (%) is being brought 12. _____ unstable and ex'lodes as a su'erno$a is not #nown. (A) <or a star to become (B) 3ow a star becomes (C) A star becomes (%) That a star is becoming 1&. !ot until linoleum was in$ented in 1,-8 _____ hard 2 wearing easy 2 to 2 clean flooring. (A) any house did ha$e (B) did any house ha$e (C) house had any (%) any house had 1(. 3iram @e$els the first Blac# member of the ;nited 7tates 7enate ser$ed as senator from >ississi''i an office _____ he was elected in 1,.8. (A) which (B) to which (C) and which (%) being which 1/. +ceans continually lose by e$a'oration much of the ri$er water _____. (A) to constantly flow into them (B) is constantly flowing into them (C) constantly flows into them (%) constantly flowing into them 1-. Because of it consists only of a relati$ely short strand of %!A 'rotected by a shell of 'rotein a $irus cannot eat or re'roduce by itself. 1.. The oxygen in the air we breathe has no tasted smell or color. 1,. 6n 15.. Jathleen Battle was hired by the !ew Bor# >etro'olitan +'era *here her became the star so'rano. 15. The aard$ar# is a mammal that burrows into the ground to catches ants and termites. 120 28. Because of the a$ailability of truc#s and easy access to modern highways the locate of farms has become relati$ely unim'ortant with res'ect to their distance from mar#ets. 21. The homes created by the legendary architect <ran# )loyd *right are still $iewed as uni1uely inno$ati$e and $aluable. 22. ?eologists find it useful to identification fossils in a roc# sam'le because certain assemblages of s'ecies are characteristic of s'ecific geologic time 'eriods. 2&. >any 'oets enhance their wor# by creating a contrast among realism and symbolism in a gi$en 'oem. 2(. >ost countries de'end to few extent on cereal im'orts to augment their own cro's. 2/. The fragrant lea$es of the laurel 'lant to sell commercially as bay lea$es and are used for seasoning foods. 2-. *hen contented and occasionally when hunger cats fre1uently ma#e a 'urring sound. 2.. The e$olution of fishes is a history of constant ada'tation to new 'ossibilities and a refined of these ada'tations. 2,. 6n 1551 Antonia !o$ello the ;nited 7tates 7urgeon ?eneral launched se$eral 'rograms to address 'articular 'roblem that young 'eo'le ha$e. 25. 7ome 'sychologists belie$e that those who are encouraged to be inde'endent res'onsible and com'etent in childhood are li#ely more than others to become moti$ated to achie$e. &8. The central 'ur'ose of management is for ma#ing e$ery action or decision hel' achie$e a carefully chosen goal. &1. As a 'oetry !i##i ?io$anni ma#es effecti$e use of 0a99 and blues rhythms. 121 &2. ;nli#e wood 'a'er and fabric which tendency to disintegrate after being buried for many years ceramics and glassware although easily bro#en sur$i$e well in the ground. &&. >argaret >ead achie$ed world famous through her studies of child 2 rearing 'ersonality and culture. &(. The disco$ery of the antibiotic 'enicillin in 152, has not 'roduced antibiotics useful for the treatment of infectious diseases until 15(8. &/. 6n the ;nited 7tate the Cabinet consist of a grou' of ad$isers each of whom is chosen by the =resident to head an executi$e de'artment of the go$ernment. &-. Colleges in the newly formed ;nited 7tates in reco$ering from the ad$erse effects of the American @e$olution inaugurated a broad curriculum in res'onse of social demands. &.. 3umus is formed during soil microorganisms decom'ose animal and 'lant material into elements usable by 'lants. &,. +9one is an unstable faintly bluish gas that is the most chemical acti$e form of oxygen. &5. The de$elo'ment of 'rofessional s'orts in the ;nited 7tates dates bac# to nineteenth century. (8. )ong before his death Dohn %ewey saw his 'hiloso'hy ha$e a 'rofound influences on education and thought in the ;nited 7tates and elsewhere. 122 1996 08 1. A microsco'e can re$eal $astly _____ detail than is $isible to the na#ed eye. (A) than (B) than more (C) more than (%) more. 2. !arcissus bulbs _____ at least three inches a'art and co$ered with about four inches of well drained soil. (A) should be 'lanted (B) to 'lant (C) must 'lanting (%) should 'lant &. 6ndustriali9ation has been res'onsible for _____ most radical of the en$ironmental changes caused by humans. (A) a (B) the (C) some of which (%) which are the (. 6n many areas the slo'e and to'ogra'hy of the land _____ excess rainfall to run off into a natural outlet. (A) neither 'ermit (B) without 'ermitting (C) nor 'ermitting (%) do not 'ermit. /. Color and light ta#en together _____ the aesthetic im'act of the interior of a building. (A) $ery 'owerfully influence (B) $ery influence 'owerfully (C) 'owerfully $ery influence (%) influence 'owerfully $ery. -. _____ that @achel Carson4s 15-2 boo# 7ilent 7'ring was one of the chief sources of ins'iration for the de$elo'ment of nontoxic 'esticides. (A) There is li#ely (B) )i#ely to be (C) 6t is li#ely (%) )i#ely .. Total color blindness _____ is the result of a defect in the retina. (A) a rare condition that (B) a rare condition (C) that a rare condition (%) is a rare condition. ,. _____ no conclusi$e e$idence exists many ex'erts belie$e that the wheel was in$ented only once and then diffused to the rest of the world. (A) "$en (B) But (C) Although (%) 7o. 5. *here$er there is 'lenty of rain during the growing season life is _____ in $arious forms. (A) abundant 123 (B) the abundance (C) an abundant (%) it abundant 18. 6n her time 6sadora %uncan was _____ today a liberated woman. (A) calling what we would (B) who would be calling (C) what we would call (%) she would call it. 11. _____ around stones that are sun2warmed e$en the smallest of stones creates tiny currents of warm air. (A) The cool air (B) 6f the air is cool (C) That the air cools (%) The cooler the air. 12. %es'ite its wide range of styles and instrumentation country music has certain common features _____ its own s'ecial character. (A) gi$e it that (B) that gi$e it (C) gi$e that (%) that gi$es it to 1&. >ost of _____ archaeologists #now about 'rehistoric cultures is based on studies of material remains. (A) these (B) what (C) which (%) their 1(. According to some critics the no$els of *illiam Burroughs demonstrate the ma0or ha9ard of absurd literature _____ tendency toward o$er2embellishment and incoherence. (A) notwithstanding (B) besides (C) is a (%) its 1/. Coinciding with the de$elo'ment of 0a99 in !ew +rleans in the 15284s _____ in blues music. (A) was one of the greatest 'eriods. (B) one of the greatest 'eriods (C) was of the greatest 'eriods (%) the greatest 'eriods. 1-.?one *ith the *ind the e'ic no$el about life in 7outh during the Ci$il *ar 'eriod too# ten years write. 1.. !one two butterflies ha$e exactly the same design on their wings. 1,. To sa$e the California condor from extinction a grou' of federal local and 'ri$ately organi9ations initiated a rescue 'rogram. 124 15. A coral reef a intricate a1uatic community of 'lants and animals is found only in warm shallow sunlit seas. 28. Carnegie hall was the first building in !ew Bor# designed s'ecial for orchestral music. 21. 7ince it li$es in the desert the collared li9ard de'ends from insects for water as well as for food. 22. The Texas =anhandle region in the northwestern 'art of the state 'roduces more wheat cotton and grain sorghum than any of other area of Texas. 2&. )ight rays what enter the eye must be focused onto a 'oint on the retina in order for a clear $isual image to form. 2(. The orangutan4s hands and feet are designed for holding and gras'ing branches and its 'owerful immensely arms enable it to climb and swing in trees without difficulty. 2/. The extraordinary beautiful of orchids ma#es them the basis of a multimillion dollar floral industry. 2-. The Cermont "lememary 7cience =ro0ect according to its founders are designed to challenge some of the most widely held beliefs about teaching. 2.. The number ,./ is an exam'le of a Emixed numberF because it is com'osing of an integer and a fraction. 2,. 6f it is #e't dry a seed can still s'rout u' to forty years after their formation. 25. 6n The 7ociology of 7cience now considered a classic @obert >erton discusses cultural economy and social forces that contributed to the de$elo'ment of modern science. . &8.Bacteria li$ed in the soil 'lay a $ital role in recycling the carbon and nitrogen needed by 'lants. &1.7ome sna#es ha$e hollow teeth are called fangs that they use to 'oison their $ictims. &2.7tars deri$e their energy from thermonuclear reactions that ta#e 'lace in their heat interiors. 125 &&.Carrie Cha'man Call organi9ed the )eague of *omen Cotes after successfully cam'aign for the constitutional amendment that ga$e women the right to $ote. &(.Any grou' that conducting its meeting using 'arliamentary rules will encounter situations where 'rescribed 'rocedures cannot be a''lied. &/.The strongly 'atriotic character of Charles 7angster4s 'oetry is credited about greatly furthering the cause of confederation in Canada. &-.Dessamyn *est4s first and most famous no$el The friendly =ersuasion describes the life of a Hua#er farmed family in the mid21,884s. &.. +ne in$entor that Thomas "dison can ta#e credit for is the light bulb. &,."lectric motors range in si9e from the tiny mechanisms that o'erate sewing machine to the great engines in hea$y locomoti$es. &5.The nitrogen ma#es u' o$er ., 'ercent of the "arth4s atmos'here the gaseous mass surrounding the 'lanet. (8.The >ississi''i the longest ri$er in the ;nited 7tates begins as small clear stream in northwestern >innesota. 126 1996 10 1. Charlie =ar#er _____ was one of the creators of the music style called Ebo'.F (A) a great 0a99 im'ro$iser who (B) to im'ro$ise great 0a99 (C) a great 0a99 im'ro$iser (%) im'ro$ised great 0a99. 2. The world4s dee'est ca$e =ierre 7t. >artin in the =yrenees >ountains is almost three times as dee' _____. (A) as the "m'ire 7tate Building is high. (B) That the "m'ire 7tate Building is higher. (C) 6s higher than the "m'ire 7tate Building (%) And the "m'ire 7tate Building4s height. &. *hen Columbus reached the !ew *orld corn was the _____ in the Americas. (A) widely most grown 'lant. (B) >ost widely grown 'lant (C) >ost grown widely 'lant (%) =lant widely grown most. (. Because #aolin shrin#s in firing at a different rate than ordinary clay _____ when creating 'ottery using both ty'es of clay. (A) s'ecial handling is re1uired (B) s'ecial handling re1uired (C) a re1uirement of s'ecial handling (%) the re1uired s'ecial handling /. The ceremonial Chilcat blan#et of the !orthwest Tlingit 6ndians was generally _____ from cedar bar# wool and goats4 hair. (A) wo$e (B) to wea$e (C) wea$ing (%) wo$en -. _____ com'osed traditionally has been a sub0ect of debate among scholars. (A) *ere ballads how (B) Ballads were how they (C) 3ow ballads that were (%) 3ow ballads were .. Du'iter the closest of the giant 'lanets to "arth has _____ solid surface and is surrounded by 9ones of intense radiation. (A) not (B) nor (C) no (%) neither. ,. The blac#2billed cuc#oo has been #nown to steal eggs _____ to other birds. (A) belong (B) which belonging (C) which they belong (%) that belong C they 5. The 'ur'ose of 'honetics is _____ an in$entory and a descri'tion of the sounds found in s'eech. (A) to 'ro$ide (B) 'ro$ided 127 (C) which 'ro$ided (%) 'ro$iding that % that 18."arth1ua#es can damage a tree _____ $iolently and it can ta#e se$eral years for the tree to heal. (A) to cause sha#ing (B) when sha#ing it causes (C) by causing it to sha#e (%) to cause to sha#e it 11._____ bacteria in foods are #illed as they are during ba#ing or stewing decay is slowed down. (A) *hat (B) The (C) 6f (%) 7o 12.The colors and 'atterns of the wings of butterflies and moths hel' _____ the organism against 'redators. (A) 'rotect (B) being 'rotected (C) 'rotecting (%) 'rotection of 1&.6n 155& the )ibrary of Congress a''ointed author @ita %o$e _____ of the ;nited 7tates. (A) as was 'oet laureate (B) was 'oet laureate (C) 'oet laureate (%) and 'oet laureate 1(.At the 7outh =ole _____ the coldest and most desolate region on "arth. (A) Antarctica lies where (B) *here Antarctica lies (C) Antarctica lies and (%) )ies Antarctica 1/.Tornados 'owerful destructi$e wind storms occur most often in the s'ring when hot winds _____ o$er flat land encounter hea$y cold air. (A) which to rise. (B) that rising (C) are rising (%) rising 1-.>any exercises such as calisthenics running or to swim in$ol$e 'roducing muscle tension through a range of mo$ements that are called isotonics. 1,. The basic elements of 'ublic2o'inion research are inter$iewers 1uestionnaires tabulating e1ui'ment and to sam'le 'o'ulation. 15. Conser$ation organi9ations hel' for to 'reser$e the ecology of an area by #ee'ing trac# of endangered s'ecies. 128 28. ?wendolyn Broo#s which won a =ulit9er =ri9e for =oetry in 15/8 had ./ 'oems 'ublished by the time she was twenty. 21. + 3alifax is largest city and chief 'ort of !o$a 7cotia and is the eastern terminus of Canada4s two great railway systems. 22.T. 7. "liot recei$ed wide recognition after 'ublishes The *aste )and which fused 'oetic traditions with elements of modern music and language. 2&. !umerous ty'es of cells such as s#in cells and white blood cells ha$e the 'ower re'roduce asexually. 2(. The #nee is more li#ely to be damage than most other 0oints because it is sub0ect to tremendous forces during $igorous acti$ity. 2/.Although ferns lac# flowers they do ha$e lea$es stems and root. 2-. Cra9y 3orse is generally recogni9ed for his courageous and s#ill and he was re$ered by the 7ioux as their greatest leader. 2.. 6n medicine certain 'lastics ha$e im'ortant uses because they do not affected by chemicals in the body and they do not harm the body. 2,. 7ince a hos'ital is organi9ed to 'rotect and treat 'eo'le who are ill its goals structures and functions de'end on the currently state of medical science. 25. A change in direction of the monsoon winds result from the differences between the heating or cooling of landmasses and that of oceans. &8. 7mall distinctions among stam's unim'ortant to the 'erson a$erage would mean a great deal to the stam' collector. &1. >embers of a nation4s foreign ser$ice re'resent that country4s interests abroad and re'ort on the conditions trends and 'olicies of the country which they are stationed. 129 &2. Abraham )incoln4s boyhood home resembled those of many others mid2western 'ioneers with its dirt floor slee'ing loft and crude fire'lace. &&. %welling 'rimarily in the ice northern 'olar seas beluga whales are characteristically small white agile and elusi$e. &(.There is e$idence that the caribou originated into !orth America and crossed o$er al land bridge into Asia and e$ol$ed into the +ld *orld4s reindeer. &/.The bold way in which >argaret >ead defined the terms EfamilyF 2 based as much on choice as on biological relationshi' 2 is 'ossibly the most enduring of her legacies. &-. The 'lanet >ars is a free9ing barren deserts with huge dry canyons and towering $olcanoes. &.. +f the many machines in$ented in the late nineteenth century none had a great im'act on the ;nited 7tates economy than the automobile. &,. A number of the =acific 6slands are $olcanoes that ha$e 'ushed u' from the ocean floor others are the to's sun#en mountain ranges. &5. 6t has been re'orted that during any twenty2four hour 'eriod a minimal of three hundred !orth American women start their own businesses. (8. Archeological studies ha$e 'ro$ided e$idence that the use of 'lants for decoration as well as for food de$elo'ed early in the history. 130 1997 01 1. _____ a necessary dimension for measuring astronomical s'ace and the distance of hea$enly bodies from the "arth. (A) +nce in time (B) Time is (C) The time (%) 6t is time 2. Dac#ie Doyner2Jersee _____ the world record in the he'tathlon in the 15,, +lym'ics also won the long 0um' in the year. (A) whose setting (B) which she set (C) whoe$er set (%) who set (A) no more large (B) no larger than (C) not larger (%) which no larger (. ?orillas are 1uiet animals _____ they are ca'able of ma#ing about 28 different sounds. (A) whether (B) which (C) e$en though (%) as well as AL0#=M % =NO01 /. Although the "arth4s chemical com'osition had been studied for years only toward the end of the nineteenth century _____ as a disci'line in its own right. (A) when geochemistry was recogni9ed (B) was geochemistry as recogni9ed (C) then recogni9ed as geochemistry (%) as geochemistry was recogni9ed -. Because the wood of the dogwood tree is $ery hard _____ is used for ob0ects such as roller s#ate wheels in which hardness is desired. (A) and (B) it (C) what (%) thus .. 6n hot dry regions the 7un4s heat causes the outer layer of roc#s _____ a 'rocess called exfoliation. (A) are ex'anded and 'eeled away (B) to ex'and and 'eel away (C) ex'ands and 'eels away (%) they ex'and and 'eel away ,. The lower _____ in a room the more slowly our eyes focus. (A) the le$el of lighting (B) light le$el (C) le$eling of light (%) lighting is le$el 131 5. _____ 7arah +rne Dewett a nineteenth2century writer read widely in her family4s extensi$e library. (A) That she recei$ed little education formally (B) The little formal education that she recei$ed (C) )ittle formal education that was recei$ed by (%) Although she recei$ed little formal education 18. 6n the early twentieth century the E>odel TF automobile was mass2'roduced and sold at a 'rice _____ could afford. (A) the a$erage 'erson who (B) that the a$erage 'erson who (C) and the a$erage 'erson (%) the a$erage 'erson C afford PB: 11. !ot only _____ all the 'ositi$e charge of an atom it is also the site of the weight of e$ery atom. (A) does the nucleus hold (B) the nucleus holding (C) the nucleus does hold (%) holds the nucleus 12. The wind2ri''led sand at California4s Jelso %unes resembles _____. (A) to be an ocean floor (B) as an ocean floor (C) an ocean floor (%) being an ocean floor 1&. <ossil records indicate _____ existing in the 'ast ha$e become extinct. (A) that many s'ecies of organisms (B) many s'ecies of organisms that (C) many s'ecies of organisms are (%) there are many organisms 1(. "x'eriments related to the sense of smell are more easily _____ than those related to 'erce'tion of color. (A) setting them u' (B) to set u' (C) set u' (%) sets u' those 1/. The =ulit9er =ri9e has been _____ in American literature for more than se$enty years. (A) the award most 'restigious that (B) the most 'restigious award (C) a 'restigious award that most (%) most 'restigious award 1-. Those interested in co$ered bridges can find six of they between Jeene and *inchester !ew 3am'shire. 1.. The 7un4s energy is generated dee' in the solar core by the synthesis of helium from hydrogen through a se1uences of thermonuclear fusion reactions. 1,. ;sing carbon2dating techni1ues archaeologists can determine the age of many ancient ob0ects by measurement the amount of radioacti$e carbon they contain. 132 15. The e$olutionary ada'tation of a 'articular s'ecies of animal o$er time occurs in res'onse to en$ironmental conditions including others animals. 28. 7aturn is the second largest 'lanet after Du'iter with a diameter nearly ten times those of "arth. 21. +gden !ash often extended sentences o$er se$eral lines 'roduce sur'rising and comical rhymes. 22. By the second month of life most infant can turn their heads and mo$e their eyes to follow the mo$ements of 'eo'le and large ob0ects around them. 2&. "arly mo$ies had a''eal immediate and became a means to 'resent contem'orary attitudes fashions and e$ents. 2(. %r. >artin )uther Jing Dr. clergyman and ci$il rights leader won the 15-( !obel =eace =ri9e for his wor# toward racially e1uality in the ;nited 7tates. 2/. )eontyne =rice ran#s among the most celebration so'ranos of her time. 2-. Carrie Cha'man Call was instrumental in 'assing the !ineteenth Amendment to the ;nited 7tates Constitution gi$es women the right to $ote. 2.. %isco$ery in 1.,5 and isolated from other element in 1,(1 uranium is $alued as a source of atomic energy. 2,. ;lysses 7. Jay was among the ;nited 7tates com'osers $isited the 7o$iet ;nion in 15/, to 'artici'ate in a cultural exchange 'rogram. &8. True ferns ha$e undergone remar#ably little change during its long geological history which extends bac# to the %e$onian 'eriod. &1. %i'lomatic negotiations generally ta#e 'lace in embassies or in the foreign offices of the countries which in ambassadors are accredited. 133 &2. The no$elist 7hirley 3a99ard is noted for the insight 'oetic style and sensiti$e she demonstrates in her wor#s. &&. Com'are with the 0agged estuaries of the Atlantic coast the =acific coast seems almost uniformly straight. &(. Because of its low cholesterol content margarine is a widely used substitute from butter. &/. After the Boston Tea =arty in 1..& coffeehouses in the !orth American colonies became centers for gossi' gamble and 'olitical criticism. &-. 7tudies by B.<. 7#inner indicate that reward 'ositi$ely reinforces beha$ior and ma#es that beha$ior li#ely more to recur. &.. >athematical 'u99les are common into history because they ha$e been used a intelligence tests and amusements. &,. >ost authorities consider both dreaming while slee' and daydreaming to be forms of fantasy. &5. ?enetic engineering is hel'ing researchers unra$el the mysteries of 're$iously incurable diseases so that they can get to its root causes and find cures. (8. The >ontessori method of education stresses initiati$e and self2reliance to 'ermitting 'u'ils to 'ursue inde'endently whate$er interests them but within disci'lined limits. 134 1997 01 QR1. The 'ro$ince of !ewfoundland has ____ than any other region of !orth America in which the first language is "nglish. (A) its longer history (B) a longer history (C) the longer the history (%) the history is longer 2. Clinical 'sychologist wore (%) consists of (B) consisting of fi$e $owels (C) that consists o fi$e $owels (%) consists of fi$e $owels .. . 135 . The growth of 'sychobiology owes ____ to ma0or conce'tual ad$ances in the way 'eo'le thin# about the brain. (A) much (B) as much as (C) much which (%) there is so much 12. 6 tunnels re1uired to satisfy the needs of its inhabitants. (A) where exists the networ# (B) the existing networ# (C) the networ#4s existence (%) exists the networ# 1-. The anti1ue collector must be able to distinguish real anti1ues from later imitations which can be either re'roductions nor fa#es. 1,. A great a$iation 'ioneer Amelia "arhart was already famous when she sets out on her ill2fated attem't to circle the globe in 15&.. 136 15. Although a''les do not grow during the cold season a''le trees must ha$e a such season in order to flourish. 28. Two uni1ue features of the Arctic they are lac# of 'reci'itation and 'ermanently fro9en ground. 21. <aced with 'etroleum shortages a 0igsaw 'u99le de'ends the number of 'ieces their sha'es and shadings and the design of the 'icture. miles of trac# three21uarters of which it was east of the >ississi''i @i$er and north of the +hio @i$er. 2,. Ballads were early ty'es of 'oetry and may ha$e been among a first #inds of music. 25. The. &1. 3umus a substance found in soil is soft and s'ongy and enables 'lant roots to send out tiny hairs through that they absorb water and food. 137 &2. Although education 'olitics and religion )ewis >umford remained acti$e in city and regional 'lanning. &.. +scillation is a electronic function that changes direct current to the signal of desired fre1uency. &,. =a'ier2mache figures by 7te'hen 3ensen which they cheerfully de'icted life in the 6nformation Age were the focus of an exhibit at the >useum of American 3istory. &5. =harmacist fill drug 'rescri'tions #ee'ing records of the drugs their 'atients are ta#ing to ma#e sure that harmful combinations are not 'rescribed. (8. ?reat technical ad$ances in aerial and satellite 'hotogra'hy ha$e been made since end of the 7econd *orld *ar. 138 1997 05 1. The 'onderosa 'ine is _____ of most of the timber used by forest 'roduct firms in the Blac# 3ills of 7outh %a#ota. (A) the source (B) as source (C) the source which (%) because the source 2. Com'uters that once too# u' entire rooms are now _____ to 'ut on des#to's and into wristwatches. (A) small enough (B) smaller than (C) so small (%) as small as A SDTU01 &. According to some educator the goal of teaching is to hel' students learn what _____ to #now to li$e a well2ad0usted and successful life. (A) do they need (B) they need (C) they are needed (%) as they may need. % as ;< (. The sa''hire4s trans'arency to ultra$iolet and infrared radiation ma#es _____ in o'tical instruments. (A) it is of use (B) it uses (C) it a useful (%) it useful /. _____ initial recognition while still 1uite young. (A) >ost famous scientists achie$ed. (B) That most famous scientists achie$ed (C) >ost famous scientists who achie$ed (%) <or most famous scientists to achie$e. -. >ango trees _____ densely co$ered with glossy lea$es and bear small fragrant flowers grow ra'idly and can attain heights of u' to 58 feet. (A) whose (B) which are (C) are when (%) which .. _____ the Canadian com'oser Barbara =entland wrote four sym'honies three concertos and an o'era among other wor#s. (A) An artist who 'rolific (B) 6s a 'rolific artist (C) =rolific an artist (%) A 'rolific artist. ,. The Chisos >ountains in Big Bend !ational =ar# in Texas were created by $olcanic eru'tions that occurred _____. (A) the area in which dinosaurs roamed (B) when dinosaurs roamed the area (C) did dinosaurs roam the area 139 (%) dinosaurs roaming the area. 5. 6n bas2relief scul'ture a design 'ro0ects $ery slightly from its bac#ground _____ some coins. (A) as on (B) because (C) the way that (%) similarly. 18. Alas#a found the first years of its statehood costly because it had to ta#e o$er the ex'ense of ser$ices _____ 're$iously by the federal go$ernment. (A) To 'ro$ide (B) Be 'ro$ided (C) 'ro$iding (%) 'ro$ided 11. *ith age the mineral content of human bones decreases _____ them more fragile. (A) ma#e (B) and to ma#e (C) thereby ma#ing (%) which it ma#es. 12. !ot until Jentuc#y4s >ammoth Ca$e had been com'letely ex'lored in 15.2 _____. (A) when was its full extent reali9ed (B) that its full extent reali9ed (C) was its full extent reali9ed (%) the reali9ation of its full extent. 1&. The first ex'lorer _____ California by land was Dedediah 7trong 7mith a tra''er who crossed the southwestern deserts of the ;nited 7tates in 1,2-. (A) that he reached (B) reached (C) to reach (%) reaching it % V it ;< 1(. *ritten to be 'erformed on a _____ Thornton *ilder4s 'lay +ur Town de'icts life in a small !ew "ngland community. (A) stage scenery of bare (B) bare of stage scenery (C) scenery bare of stage (%) stage bare of scenery. 1/. _____ many co''er mines in the state of Ari9ona a fact which contributes significantly to the state4s economy. (A) They are (B) There are (C) +f the (%) The 1-. A food additi$e is any chemical that food manufactures intentional add to their 'roducts. 1.. >argaret >ead studied many different cultures and she was one of the first anthro'ologists to 'hotogra'h hers sub0ects. 1,. Talc a soft mineral with a $ariety of uses sold is in slabs or in 'owdered from. 140 15. %uring the 1,.84s iron wor#ers in Alabama 'ro$ed they could 'roduce iron by burning iron ore with co#e instead than with charcoal. 28. ?eologists at the 3awaiian Colcano +bser$atory rely on a number of instruments to studying the $olcanoes in 3awaii. 21. ;nderlying aerodynamics and all other branches of theoretical mechanics are the laws of motion who were de$elo'ed in the se$enteenth century. 22. *as o'ened in 151, the =hilli's Collection in *ashington %.C. was the first museum in the ;nited 7tates de$oted to modern art. 2&. A mortgage enables a 'erson to buy 'ro'erty without 'aying for it outright: thus more 'eo'le are able to en0oy to own a house. 2(. Ali#e ethnogra'hers ethnohistorians ma#e systematic obser$ations but they also gather data from documentary and oral sources. 2/. Basal body tem'erature refers to the most lowest tem'erature of a healthy indi$idual during wa#ing hours. 2-. @esearch in the ;nited 7tates on acu'uncture has focused on it use in 'ain relief and anesthesia. 2.. The >oon4s gra$itational field cannot #ee' atmos'heric gases from esca'e into s'ace. 2,. Although the 'ecan tree is chiefly $alue for its fruit its wood is used extensi$ely for flooring furniture boxed and crates. 25. Born in Texas in 1,58 Jatherine Anne =orter 'roduced three collection of short stories before 'ublishing her well2#nown no$el 7hi' of <ools in 15-2. &8. 6nsulation from cold 'rotect against dust and sand and camouflage are among the functions of hair for animals. &1.The notion that students are not sufficiently in$ol$ed in their education is one reason for the recently surge of su''ort for undergraduate research. 141 &2.As secretary of trans'ortation from 15./ to 15.. *illiam Coleman wor#ed to hel' the ban#ru't railroads in the northeastern ;nited 7tates sol$ed their financial 'roblems. &&. <aults in the "arth4s crust are most e$idently in sedimentary formations where they interru't 're$iously continuous layers. &(. >any flowering 'lants benefit of 'ollination by adult butterflies and moths. &/. A number of the American 6ndian languages s'o#en at the time of the "uro'ean arri$al in the !ew *orld in the late fifteen century ha$e become extinct. &-. ?eorge ?ershwin was an American com'oser whose concert wor#s 0oined the sounds of 0a99 with them of traditional orchestration. &.. +ne of the 'roblems of ;nited 7tates agriculture that has 'ersisted during the 15284s until the 'resent day is the tendency of farm income to lag behind the costs of 'roduction. &,. Colcanism occurs on "arth in se$eral geological setting most of which are associated with the boundaries of the enormous rigid 'lates that ma#e u' the lithos'here. &5. "arly "uro'ean settlers in !orth America used medicines they made from 'lants nati$e to treat colds 'neumonia and ague an illness similar to malaria. (8. 7ome insects bear a remar#able resemblance to dead twigs being long slenderness wingless and brownish in color. 142 1997 08 1. Associated with the %enishawn com'any from 151- until 152& >artha ?rahaim de$elo'ed a 'owerful _____ that was integral to the foundations of modern dance. (A) ex'ressi$ely stylish (B) a style ex'ressi$e (C) stylishly ex'ressi$e (%) ex'ressi$e style. 2. 7ome sna#es lay eggs but others _____ birth to li$e offs'ring. (A) gi$e (B) gi$ing (C) they gi$e (%) to ha$e gi$en &. Because it was so closely related to communication _____ art form to de$elo'. (A) drawing was 'robably the earliest (B) to draw early was 'robably (C) early drawing 'robably (%) the earliest draw. (. 3alley4s Comet had its first documented sighting in 2(8 B.C. in China and _____ it has been seen from the "arth 25 times. (A) after (B) because of (C) since then (%) that is /. _____ that managers commit in 'roblem sol$ing is 0um'ing to a conclusion about the cause of a gi$en 'roblem. (A) >a0or errors. (B) 7ince the ma0or error (C) The ma0or error (%) +f the ma0or errors. -. Algon#ian2s'ea#ing !ati$e Americans greeted the =ilgrims _____ settled on the eastern shores of what is now !ew "ngland. (A) to whom (B) of which (C) who (%) which .. The best #nown boo#s of @oss >acdonald _____ writer of detecti$e no$els feature the character )ew Archer a 'ri$ate detecti$e. (A) is the (B) is an (C) they are by (%) the ,. The first building to em'loy steel s#eleton construction _____. (A) Chicago 6llinois the home of the 3ome 6nsurance Com'any Building com'leted in 1,,/. (B) The 3ome 6nsurance Com'any Building in Chicago 6llinois was com'leted in 1,,/. (C) Because the 3ome 6nsurance Com'any Building in Chicago 6llinois was com'leted in 1,,/. (%) The 3ome 6nsurance Com'any Building in Chicago 6llinois in 1,,/. 143 5. %uring the course of its growth a frog undergoes a true metamor'hosis _____ with fishli#e lar$al stage. (A) begin (B) began (C) beginning (%) is begun. 18. >ahalia Dac#son _____ combined 'owerfully $itality with great dignity was one of the best #nown gos'el singers in the ;nited27tates. (A) it was her singing (B) which songs (C) who sang (%) whose singing 11. =recious metals gems and i$ory ha$e been used to ma#e buttons but most buttons are made of _____ wood glass or 'lastic. (A) such materials that (B) materials as such (C) such materials as (%) such materials. 12. +utside the bright 'rimary rainbow _____ much fainter secondary rainbow may be $isible. (A) so (B) a (C) since (%) still 1&. An critic teacher librarian or 'oet who ho'es to broaden 'oetry4s audience faces the difficult challenge of 'ersuading s#e'tical readers _____. (A) that 'oetry is im'ortant today (B) for 'oetry to be im'ortant today (C) to be im'ortant 'oetry today (%) 'oetry that is im'ortant today. 1(. <ollowing the guidelines for s'ea#ing and $oting established by the boo# @obert4s @ules of +rder _____ during meetings. (A) and a$oid large decision2ma#ing organi9ations4 'rocedural confusion (B) large decision2ma#ing organi9ations a$oid 'rocedural confusion (C) is 'rocedural confusion a$oided by large decision2ma#ing organi9ations (%) are a$oiding 'rocedural confusion in large decision2ma#ing organi9ations. 1/. 6ndigo is a $at color _____ called because it does not dissol$e in water. (A) which it (B) it is (C) but (%) so 1- According to most 'sychological studies body language ex'resses a s'ea#er4s emotions and attitudes and it also tends to affect the emotions and attitudes of the listen. 1.. The dachshund is a hardy alert dog with a well sense of smell. 1,. Huasars faint celestial ob0ects resembling stars are 'erha's the most distant ob0ects #now. 144 15. The im'ortance of en$ironmental stimuli in the de$elo'ment of coordination between sensory in'ut and motor res'onse $aries to s'ecies to s'ecies. 28. A smile can be obser$ed described and reliably identify it can also be elicited and mani'ulated under ex'erimental conditions. 21. A musical genius Dohn Cage is noted for his highly uncon$entional ideas and he res'ected for his unusual com'ositions and 'erformances. 22. Chocolate is 're'ared by a com'lexity 'rocess of cleaning blending and roasting cocoa beans which must be ground and mixed with sugar. 2&. 7e$eral million 'oints on the human body registers either cold heat 'ain or touch. 2(. 6n the 1,884s store owners sold e$erything from a needle to a 'low trust e$eryone and ne$er too# in$entory. 2/. Although they reflect a strong social conscience Arthur >iller4s stage wor#s are ty'ical more concerned with indi$iduals than with systems. 2-. *hile highly 'ri9ed for symboli9ing good luc# the four2leaf clo$er is rarity found in nature. 2. An in$oluntary reflex an yawn is almost im'ossible to sto' once the mouth muscles begin the stretching action. 2,. "lected to ser$e in the ;nited 7tates 3ouse of re'resentati$es in 15-, 7hirley Chisholm was #nown for ad$ocacy the interests of the urban 'oor. 25. A mirage is an atmos'heric o'tical illusion in what an obser$er sees a nonexistent body of water or an image of some ob0ect. &8. Tur1uoise which found in microsco'ic crystals is o'a1ue with a waxy luster $arying in color from greenish gray to s#y blue. 145 &1. 3omo erectus is the name commonly gi$en into the 'rimate s'ecies from which humans are belie$ed to ha$e e$ol$ed. &2. Today modern textile mills can manufacture as much fabrics in a few seconds as it once too# wor#ers wee#s to 'roduce by hand. &&. The 3o'i the westernmost tribe of =ueblo 6ndians ha$e traditionally li$e large. multile$el structures clustered in towns. &(. "x'loration of the 7olar 7ystem is continuing and at the 'resent rate of 'rogress all the 'lanets will ha$e been contacted with in the near /8 years. &/. 7ince their a''earance on farms in the ;nited 7tates between 151& and 1528 truc#s ha$e changed 'atterns of 'roduction and mar#et of farm 'roducts. &-. Anti1ue collection became a significant 'astime in the 1,884s when old ob0ect began to be a''reciated for their beauty as well as for their historical im'ortance. &.. American 'ainter ?eorgia +4Jeeffe is well #nown as her large 'aintings of flowers in which single blossoms are 'resented as if in close2u'. &,. %es'ite tele$ision is the dominant entertainment medium for ;nited 7tates households ?arrison Jeillor4s 7aturday night radio show of fol# songs and stories is heard by millions of 'eo'le. &5. The wor# which the 'oet "mma )a9arus is best #nown is EThe !ew ColossusF which is inscribed on the 'edestal of the 7tatue of )iberty. (8. 6n the !ew "ngland colonies Chi''endale designs were ada'ted to locally tastes and beautiful furniture resulted. 146 1997 10 1. =ortland >aine is _____ the 'oet 3enry *adsworth )ongfellow s'ent his early years. (A) where (B) it where (C) where is (%) which is where 2. As consumers4 res'onse to traditional ad$ertising techni1ues declines businesses are beginning _____ new methods of reaching customers. (A) the de$elo'ment that (B) it de$elo'ing (C) de$elo' (%) to de$elo' B it ;< &. The #nee is _____ most other 0oints in the body because it cannot twist without in0ury. (A) more li#ely to be damaged than (B) li#ely to be more than damaged (C) more than li#ely to be damaged (%) to be damaged more than li#ely (. The 1uince is an attracti$e shrub or small tree _____ closely related to the a''le and 'ear trees. (A) is (B) that is (C) that it is (%) is that which /. >any gases including the nitrogen and oxygen in air _____ color or odor. (A) ha$e no (B) which ha$e no (C) not ha$ing (%) they do not ha$e -. The American Academy of =oets _____ the 15&84s 'ro$ides financial assistance to su''ort wor#ing 'oets. (A) when it was founded (B) was founded (C) which was founded in (%) was founded in .. %uring the =leistocene glacial 'eriods _____ 'ortions of the "arth where 'lant and animal life flourished ma#ing it 'ossible for 'eo'le to subsist. (A) the (B) it was (C) there were (%) ha$e there been ,. The 'hotogra'hs of Carrie >ae *eems in which she often ma#es her family members _____ are an affectionate and incisi$e re'resentation of the African American ex'erience. (A) are her sub0ects (B) her sub0ects (C) are sub0ects (%) which her sub0ects. 5. 3ubble4s law states that the greater the distance between any two galaxies _____ is their relati$e s'eed of se'aration. 147 (A) the greatest (B) the greater (C) greater than (%) as great as 18. The onion is characteri9ed by an edible bulb com'osed of lea$es rich in sugar and a 'ungent oil _____ the $egetable4s strong taste. (A) which the source of (B) that the source is (C) the source of (%) of the source is 11. A regional writer with a gift for dialect _____ her fiction with the eccentric comic but $ital inhabitants of rural >ississi''i. (A) and "udora *elty is 'eo'ling (B) "udora *elty 'eo'les (C) because "udora *elty 'eo'les. (%) "udora *elty to 'eo'le. 12. @elati$e humidity is the amount of water $a'or the air contains at a certain tem'erature _____ with the amount it could hold at that tem'erature. (A) to com'are (B) com'ared (C) com'aring (%) com'ares 1&. 7cientists belie$e the first inhabitants of the Americans arri$ed by crossing the land bridge that connected 7iberia and _____ more than 18 888 years ago. (A) this is Alas#a now (B) Alas#a is now (C) is now Alas#a (%) what is now Alas#a. 1(. <ibers of hair and wool are not continuous and must normally be s'un into thread _____ wo$en into textile fabrics. (A) as are they (B) when to be (C) that they are (%) if they are to be 1/. >argaret Brent because of her s#ill in managing estates became _____ largest landholders in colonial >aryland. (A) what the (B) one of the (C) who the (%) the one that 1-. "leanor @oose$elt set the standard against which the wi$es of all ;nited 7tates =residents since ha$e e$aluated. 1.. The Armory 7how held in !ew Bor# in 151& was a im'ortant exhibition of modern "uro'ean art. 1,. @i'e fruit is often stored in a 'lace who contains much carbon dioxide so that the fruit will not decay too ra'idly. 148 15. 6n 1,/2 >assachusetts 'assed a law re1uiring all children from four to eighteen years of old to attend school. 28. The main 'ur'ose of classifying animals is to show the most 'robable e$olutionary relationshi' of the different s'ecies to each another. 21. >atthew C. =erry a ;nited 7tates na$al commander gained fame not in war and through di'lomacy. 22. +ne of the most im'ressi$e collections of nineteenth2century "uro'ean 'aintings in the ;nited 7tates can be found to the =hiladel'hia >useum of Art. 2&. Three of e$ery four migrating water birds in !orth America $isits the ?ulf of >exico4s winter wetlands. 2(. Charleston *est Cirginia was named for Charles Clendenin who son ?eorge ac1uired land at the 0unction of the "l# and Janawha ri$ers in 1.,.. 2/. <inancier Andrew >ellon donated most of his magnificent art collection to the !ational ?allery of Art where it is now locating. 2-. 7oil tem'eratures in %eath Calley California near the !e$ada border ha$e been #nown to reach 58 of degrees Celsius. 2.. *hen the 7un >oon and "arth are alignment and the >oon crosses the "arth4s orbital 'lane a solar ecli'se occurs. 2,. >ary Cassatt4s 'aintings of mothers and children are #nown for its fine linear rhythm sim'le modelings and harmonies of clear color. 25. =lants synthesi9e carbohydrates from water and carbon dioxide with the aid of energy is deri$ed from sunlight. &8. The best American 'o'ular music balances a 'owerful emotions of youth with tenderness grace and wit. 149 &1. 6n the nineteenth century women used 1uilts to inscribe their res'onses to social economic and 'olitics issues. &2. <ossils in /882million2year2old roc#s demonstrate that life forms in the Cambrian 'eriod were mostly marine animals ca'ability of secreting calcium to form shells. &&. @ainbows in the sha'e of com'lete circles are sometimes seen from air'lanes because they are not cutting off by the hori9on. &(. 3ot at the e1uator causes the air to ex'and rise and flow toward the 'oles. &/. Although research has been ongoing since 15&8 the existence of "7=2 'erce'tion and communication without the use of sight hear taste touch or smell 2 is still dis'uted. &-. As many as /8 'ercent of the income from motion 'ictures 'roduced in the ;nited 7tates comes from mar#eting the films abroad. &.. 7lee' is controlled by the brain and associated by characteristic breathing rhythms. &,. The walls around the city of Huebec which was originally a fort military still stand ma#ing Huebec the only walled city in !orth America. &5. The manufacture of automobile was extremely ex'ensi$e until assembly2line techni1ues made them chea'er to 'roduce. (8. The ballad is characteri9ed by informal diction by a narrati$e largely de'endent on action and dialogue by thematic intense and by stress on re'etition. 150 1997 12 QR1. The acting of >ary Ann %uff was characteri9ed by subdued dramatic force fidelity to ____ and a mar#ed unity of effect. (A) of each 'lay the structure (B) the structure of each 'lay (C) the 'lay each structure of (%) each 'lay the structure of 2. The coherent light of a laser ____ entirely of synchroni9ed wa$es of a single fre1uency that tra$el in the same direction. (A) it com'oses (B) to com'ose it (C) is com'osed (%) is com'osing it &. _____ that ornithischians 'lanteating dinosaurs li$ed about 22/ million years ago. (A) 7cientists belie$e (B) 7cientists belie$ing (C) 7cientists belie$e in (%) 7cientists4 belief (. _____ that boo# American art out of the fomanticism of the mid 1,884s and carried it to the most 'owerful heights of realism. (A) *inslow 3omer4s 'aintings (B) 6t was *inslow 3omer4s 'aintings (C) *hen *inslow 3omer4s 'aintings (%) =aintings of *inslow 3omer /. 7ettlers of the western ;nited 7tates had a sense of e1uality in the face of hardshi' ____ democratic 'olitical 'ractices. (A) led to (B) they had led (C) which led to (%) was leading them to -. The !ational >edal of 7cience is the ____ gi$en by the ;nited 7tates go$ernment. (A) highest science award (B) highest award for scientific (C) award that is the highest scientific (%) highest and awarding scientists .. =rehistoric 'eo'le made 'aints by grinding colored materials ____ into 'owder and adding water. (A) if $egetation and clay (B) that $egetation and clay are (C) how $egetation and clay (%) such as $egetation and clay ,. The conce't of tele$ision ____ images o$er distances had intrigued scientists e$en before the intention of mo$ing 'ictures or radio. (A) the transmission of (B) transmits to (C) for transmission (%) the transmitting 5. @ecent technology gi$es com'uters ____ ma#ing them multimedia machines with interacti$e 'otential. 151 (A) both audio and $ideo ca'ability (B) its ca'ability is both audio and $ideo (C) both audio and $ideo are ca'able (%) ca'able of both audio and $ideo 18. ____ at a music store was one of )il Armstong4s first 'rofessional 0obs as a young 'ianist when she came to Chicago in 151.. (A) %emonstration tunes (B) %emonstrating tunes (C) %emonstrate tunes (%) Tunes that demonstrated 11. The first 'eo'le to li$e in ____ 3awaii were the =olynesians who sailed there in large canoes from other =acific 6slands about 2 888 years ago. (A) now where is (B) what is now (C) it is now (%) now this is 12. The Alas#an blac#fish exhibits ____ to both extreme cold and low concentrations of oxygen under the ice. (A) remar#able and resistance (B) remar#able resistant (C) remar#ably resistant (%) remar#able resistance 1&. =enicillin acts both ____. (A) #illing bacteria and their growth being inhibited (B) and to #ill bacteria and to inhibit their growth (C) by #illing bacteria and by inhibiting their growth (%) #ills bacteria and inhibits their growth 1(. !ow until the 1,/84s ____ in !ew Bor# see# to rescue historic building from destruction or alteration. (A) some concerned citi9ens (B) did some concerned citi9ens (C) some citi9en concerned (%) when some concerned citi9ens did 1/. 6f a diamond is heated without oxygen it will turn to gra'hite a form of ____ that it Is used as lubricant. (A) carbon is so soft (B) is carbon so soft (C) carbon so soft (%) so soft the carbon 1-. ?old or sil$er bullions ser$e into commerce as mediums of exchange all o$er the world. 1.. Today4s farmers ha$e increased mil# 'roduction greatly through im'ro$ed methods of breeding feeding and manage dairy cattle. 1,. 3y'oglycemia is a condition in which a ra'idly dro' in blood sugar most often results from an o$ersecretion of insulin from 'ancreas. 152 15. !ewborn infants show a distinct 'reference for human $oices o$er other sounds and also 'refer her own mothers4 $oices to the $oices of strangers. 28. The chi''ewa and 7antee 7ioux of the ;''er >ississi''i @i$er regional ha$e used catlinite to 'roduce car$ings for almost 1/8 years. 21. Absolutely nothing that floats neither a cor#ed bottle nor a /8 8882ton shi's can esca'e the effects of water currents. 22. The *right Brothers were owner of a bicycle sho' and they used a number of bicycle 'arts to ma#e the original motori9ed air'lane. 2&. ?emstones are usually bright color o'a1ue or trans'arent minerals found in the roc#s of the "arth . 2(. The modern detecti$e story in which a detecti$e sol$es a crime by disco$ering and inter'retation e$idence is considered to ha$e originated with "dgar Allan =oe4s E The >urders in the @ue >orgueF in 1,(1. 2/. The su'erintendent of women nurse for the ;nion Army during the Ci$il *ar was %orothea %ix . 2-. 7low growth in the early 15884s lin#ed with rising unem'loyment less s'end and meager business in$estments led many ex'erts to declare a recession. 2.. +rchestrating musical wor#s re1uires a understanding of the range and characteristics of each instrument. 2,. The Canadian 'ro$ince of British columbia is rich of minerals and because o$er /8 'ercent of the land is co$ered with forests lumbering is its ma0or industry. 25. "ach ma0or styles of architecture emerged because new 'roblems in building or challenges in design a''eared for architects to resol$e. &8. >uch of the significant research related for the theory of numbers concerns the distribution of 'rime numbers. 153 &1. )auren Bacall made her film debut in To 3a$e and 3a$e !ot starting together 3um'hrey Bogart who later became her husband. &2. The blac# leo'ard is $ery dar# that its s'ots are difficult to see. &&. +n stee' hillsides tree roots bind to soil that might otherwise be washed away if hea$y rains. &(. Carson >ecullers was only 2& when she 'ublished her first no$el The 3eart 6s a )onely 3unter for what she recei$ed much acclaim. &-. The in$ention of fresh meta'hors today continues to ma#e it 'ossible the $i$id ex'ression of emotions. &.. =roteins are made u' of long folded irregularly chains the lin#s of which are amino acids. &,. Although most s'ecies of small birds gather in grou's at feeders 'ro$ided by bird2watchers the bright red cardinals usually a''ears alone or with its mate. &5. The astronomy is the oldest science but it continues to be at the forefront of scientific thought. (8. 3enry %a$id Thoreau was an American writer who is remembered for his faith in the religious significance of the nature. 154 1998 01 1. Between 1,.8 and 1,58 the total 'o'ulation of tile ;nited 7tates____. (A) that doubled (B) doubled (C) 6t doubled (%) when doubled 2. 6ntended to dis'lay the wor# of twentieth2century artists _____ in 1525. (A) the o'ening of the >useum of >odern Art (B) so the >useum of >odern Art o'ened (C) why tile >useum of >odern Art o'ened (%) the >useum of >odern Art o'ened U/01WX-0. YZ [(%). &. The "arth has a tremendous amount of water but____ in the ocean. (A) almost all of it is (B) it is almost all of (C) is of it almost all (%) all is of it almost (. ____ ha$e sense organs in a canal #nown as the lateral line which allows them to res'ond to changes in water 'ressure caused by nearby motion. (A) That tile fish (B) <ish (C) *hen fish (%) 6f tile fish P- YZ[(B) \]N^_`abcdeYfghi. /. %irect information on the chemical com'osition of the >oon became a$ailable in 15-5 ____ of the first A'ollo mission to land on the >oon. (A) with the return (B) returning (C) when returned (%) and the return jk(A).lmBn. opqrs. -. ____ com'letely harmless to the en$ironment is $ery difficult and usually economically unsound. (A) Cleaning 'roducts that (B) Cleaning 'roducts are (C) Cleaning 'roducts are made (%) >a#ing a cleaning 'roduct .. +ne of ;lysses 7. ?rant4s first acts as =resident of the ;nited 7tates was to name tile 7eneca chief %onehogawa ____ of 6ndian Affairs. (A) as was Commissioner (B) Commissioner (C) was Commissioner (%) him Commissioner tm%nV him u;< ,. +ne of the most ancient arts ____ in different 'arts of the world. (A) for wea$ing to de$elo' inde'endently (B) the inde'endent de$elo'ment of wea$ing 155 (C) wea$ing to de$elo' inde'endently (%) wea$ing de$elo'ed inde'endently 5. ____ classified as a carni$ore the !orth American gri99ly bear cats berries and e$en grass. (A) Dust as (B) Because of (C) Although (%) "ither 18. !ot only ____ much bigger than any 'lanet but unli#e the 'lanets it consists com'letely of gaseous material. (A) the 7un is (B) the 7un which is (C) is the 7un (%) that the 7un v[mCn 11. Collo1uialisms ____ of informal s'o#en language are often considered ina''ro'riate for more formal written language. (A) ex'ression which are characteristic (B) which characteristic ex'ressions (C) are ex'ressions characteristic (%) ex'ressions can be characteristic [mAn. ex'ressions w collo1uialisms *4 A which are...w ex'ressions 12. 3er wor# in genetics won ;nited 7tates scientist Barbara >cClintoc# ____22 in 15,&. (A) was the !obel =ri9e (B) the !obel =ri9e was (C) the !obel =ri9e (%) for the !obel =ri9e 1&. ____ usually thought to end in northern !ew >exico the @oc#y >ountains really extend southward to the frontier of >exico. (A) %es'ite (B) To be (C) *hile (%) 3owe$er mCn. while xyz{|} con0. 1(. The no$elist "dith *harton considered the *riter 3enry Dames_____. (A) that a strong influence on her wor# (B) as strong influence on her wor# (C) a strong influence on her wor# (%) was a strong influence on her wor# YZ[mCn 1/. 6ronically the 'oet 3enry *adsworth )ongfellow claimed he ne$er li#ed teaching although ____ a 'rofessor at 3ar$ard ;ni$ersity and taught for many years. (A) becoming (B) he became (C) had lie become (%) for him to become ~=. 1-. The hind leg of the gerbil are 'articularly well ada'ted to lea'ing across its desert habitat. 1.. "ducator 3elen >agill *hite was the first American woman to ha$e earn the =h.%. degree. 156 1,. The changes that occur in the life cycle of a butterfly or moth are 'robable the most stri#ing exam'les of metamor'hosis. 15. 6n the nineteenth century !orth American locomoti$es ran on hardwood fuel which was inex'ensi$e and 'lentiful in the time. . 28. >uch theories ha$e been de$elo'ed concerning how 'eo'le learn about cultures from the myths and legends 'assed down from one generation to another. V. 21. 7e$eral comet are disco$ered each year but $ery few of them are bright enough to be seen without the aid of magnification. 22. Charles >onroe 7chul94s comic stri' E=eanutsF is translated into 2- languages also has a''eared in o$er 2 &88 daily news'a'ers. YZ and 2&. 6n human beings the li$er is the biggest glandular organ of his digesti$e system. 2(. >any scientists contributed to the de$elo'ment of tele$ision whether no one 'erson can be said to ha$e in$ented it. 2/. !orthern Canada contains $ast areas treeless of low $egetation #nown as tundra. 2-. ?ordon =ar#s com'osed wrote and directed >artin the classical ballet who "xamines the meaning of the life of >artin )uther Jing. Dr. 2.. 6n 15-/ @odolfo ?on9ales has estab1ished an organi9ation called the Crusade <or Dustice in %en$er Colorado. 2,. )arge hea$y draft horses were commonly used for labor farm in the ;nited 7tates before the introduction of tractors. 25.3erads of migrating caribou members of the deer family are an im'ortant economically resource to 6nuits and other !ati$e Americans. 157 &8. 7ome nineteenth2century ad$ocates for the emanci'ation of women in the ;nited 7tates were also acti$ity in the ;nderground @ailroad hel'ing to sla$es esca'e. &1. <eathers not only 'rotect birds from in0ury and conser$e body heat but also function in flight. courtshi' camouflage and sensory 'erce'ti$e. &2. The radio telesco'e in$ented in 15&2 has ca'abilities beyond far those of o'tical telesco'es in trac#ing signals from galaxies. &&. @afting was an essential mean of trans'ortation from 'rehistoric times to the nineteenth century. &(. >any fortification ran# among the most functional and beautiful wor#s of architecture constructed in !orth America before the twentieth century. &/. Because her wor# was 'o'ular with "uro'ean royally 3arriet ?oodhue 3osmer became financial successful as a scul'tor in the mid2eighteen hundreds. &-. The actor Dames "arl Dones gained Broadway stardom in EThe ?reat *hite 3o'eF for his 'owerful 'ortrayal of 'ri9efighter. &.. %es'ite fats and oils arc nutritionally im'ortant as energy sources medical research indicates that saturated fats may contribute to hardening of the arteries. &,. )arge multicolored insects with four wings dragonflies 'lay a $ery im'ortant role in the ecosystem of humid area by controlling the 'o'ulation of mos1uitoes. &5. %uring early nineteenth2century Boston. the architect Charles Bulfinch eager to ma#e the city beautiful sometimes 'ro$ided free 'lans for 'eo'le building (8. 6n 1,,5 Dane Addams a social wor#er in Chicago founded hull house an institution de$oted to the im'ro$ement of community life in 'oor neighborhood. 158 1998 05 1. _____ a ma0or role in future 'lanetary ex'loration. (A) @obots will surely 'lay (B) @obots which will surely 'lay (C) Because robots will surely be 'laying (%) 7urely robots which will be 'laying 2. ;nli#e the owl bats cannot see $ery well but they do ha$e_____. (A) it hears $ery well (B) $ery good to hear (C) hearing $ery well (%) $ery good hearing &. Com'arati$ely few clues in the ;nited 7lates ha$e com'eting news'a'ers today a ma0or change from 1588 _____ more than two news'a'ers. (A) because then most large cities ha$ing (B) when did most large cities ha$e (C) then most large cities that had (%) when most large cities had (. *itch ha9el extract ____ distilled from the bar# and twigs of the witch ha9el shrub has been utili9ed in medicine. (A) is (B) when to be (C) which is (%) has been /. ____ touching in +. 3enry4s stories is the gallantry with which ordinary 'eo'le struggle to maintain their dignity. (A) >ost is (B) 6t mostly is (C) 6s it most (%) *hat is most -. The face of the >oon is changed by collisions with meteoroids ____ new craters to a''ear. (A) cause (B) causing (C) caused (%) ha$e cause .. 7ocial scientists belie$e that ____ from sounds such as grunts and bar#s made by early ancestors of human beings. (A) the $ery slow de$elo'ment of language (B) language de$elo'ed $ery slowly (C) language which was $ery slow to de$elo' (%) language $ery slowly de$elo'ing ,. ____ substances include $arious forms of silica 'umice and emery. (A) !atural abrasi$es occur (B) Abrasion occurs in natural (C) !aturally occurring abrasi$e (%) A natural occurrence of abrasion 5._____ in the u''er 'art of their long thin legs allow deer to run swiftly and 0um' far. (A) >uscles are 'owerful (B) There are 'owerful muscles 159 (C) The 'owerful muscles that (%) =owerful muscles 18. ?eo'hysicists ha$e collaborated with archaeologists and anthro'ologists to study the magnetic 'ro'erties of 'ottery and fire'laces at sites ____22 by early humans. (A) occu'ied (B) occu'ying (C) which occu'y (%) were occu'ied 11. ____ technically 'roficient: it also ex'lores 'sychological 1uestions. (A) !ot only is Barbara Astman4s artwor# (B) !ot only Barbara Astman4s artwor# (C) Barbara Astman4s artwor# which is not only (%) Barbara Astman4s artwor# not only 12.Although Canada4s =arliament can neither administer or enforce laws_____ initiate 'olicy it does ha$e the 'ower to ma#e laws and $ote on the allocation of funds. (A) not (B) nor (C) and (%) either 1&.*illa Cather considered her no$el of life in nineteenth2century !ebras#a >y Antonia ____ (A) was her best wor# (B) her best wor# (C) her best wor# it was (%) being her best wor# 1(.<irst designated in 15.8 "arth %ay has become an annual international e$ent ______ concerns about en$ironmental issues such as 'ollution. (A) dedicated to raising (B) dedicated raising (C) dedicates to raise (%) that dedicates to raising 1/.6n 1552 Albert ?ore Dr. the son of a former ;nited 7tates senator became _____ Cice =resident of the ;nited 7tates. (A) who was the forty2fifth (B) and the forty2fifth (C) the forty2fifth (") he was the forty2fifth 1-. Although Christo'her Columbus failed in his original goal the disco$eries he did ma#e were as 6m'ortant than the route to Asia he ex'ected to find. 1.. >artha ?raham a leading figure in modern dance made she debut in 1528 with the %enishawn 7chool. 1,. 6n the ;nited 7tates the federal go$ernment is res'onsible to regulating the wor#ing conditions in factories. 160 15. Du'iter is a gaseous 'lanet with. an atmos'here com'osed most of hydrogen and helium. 28. Throughout her career ?eorgia +4Jeeffe 'aid meticulous attention to her craft: her brushes were always clean her colors fresh and brightness. 21. 3ydrogen the nine most abundant element in the "arth4s crust is an odorless colorless and tasteless gas. 2&. 7team engines ha$e been re'laced in most cases by more economical and efficiency de$ices such as the electric motor. 2(. Traditionally the <ourth of Duly is celebrated in the ;nited 7tates with 'olitical s'eeches 'icnics and most im'ortant of all a dis'layed of firewor#s at night. 2/.The style of used in cartoon animation range from relati$ely realistic re'resentations of e$eryday life to the most romantic and im'ossible fantasy. 2-. +rdinary bea$er dams $ary in length from a few feet to a hundred feet or more than. 2.. 6n the ;nited 7tate 'residential elections are held once e$ery four year. 2,."xce't of the freehand toe the feet of the gull are fully webbed. 25. Teaching machines are de$ices that can store instructionally information 'resent dis'lays recei$e res'onses from a learner and act on those res'onses. &8. Challotte =er#ins ?ilman 6s #nown 'rimarily as an author of short stories but she also wrote an influential boo# argued for e1ual economic o''ortunities for women. &1.6n some areas of the ;nited 7tates unfa$orable climate or soil ma#e farming an im'ossible tas#. 161 &2. !aturalists ha$e identified at least four hundred of s'ecies of mammals and six hundred ty'es of birds in the state of California. &&. 6nstead of tooth the blue whale has a row of bony 'lates in its mouth that functions as a food2 collecting de$ice. &(. >urres are blac#2and2white dri$ing birds that mate e$ery fi$e or six years and lay only a single egg at time. &/. A bar code consists a 'attern of lines and bars that a com'uter can translate into information. &-. 3ummingbirds are the only birds that can fly to bac#wards. &.. <luorine a greenish2yellow gas that is slightly hea$y than air is 'oisonous and corrosi$e and has a 'enetrating and disagreeable odor. &,. The "$erglades a large swam' area is an uni1ue wilderness extending o$er much of southern <lorida. &5. "ach year millions of tons of fertile to'soil that could 'roduce good cro's washed away by rains. (8. 7ince the 15/84s fol#4 music has had a significant influence on many 'o'ular $ocal and instrumental music. 162 1998 08 1Because air is highly com'ressible ____ to define a clear u''er boundary of the atmos'here. (A) it is im'ossible (B) im'ossible is (C) so the im'ossibility (%) is the im'ossibility m 1n d$ A [ B. they ?= v => YZ[ C there be 0 .. A 'o'ular belief ____ radio and tele$ision ha$e homogeni9ed the language of the ;nited 7tates. (A) states that (B) that is stated (C) that states (%) stating that 163 ,. The astronomical unit is the a$erage distance of the "arth from the 7un ____ is the standard of distances in the 7olar 7ystem. (A) and (B) also (C) in addition (%) because xN B.P: %.D= A.[ v[ A 1&.The letters of Abigail Adams to her husband and future =resident Dohn ____ during the American @e$olution con$eyed a $i$id 'icture of the times 164 (A) were written (B) which written (C) written (%) written when %. during when =NOp. YZ[ C A [ B [ YZ A => [ B one ? image actually $iewed w . + -;. 1/. !ot only ____ as a coo#ed dish the world o$er but it is also used as the base of many other foods condiments and e$en be$erages. (A) eating rice (B) rice is eaten (C) 'eo'le eat rice (%) is rice eaten A P-. 1,. Because the diamond is the hardest naturally substance it is used in industry for to cut grinding and boring other hard materials. % 28. Being chemical com'ounds minerals ha$e characteristic sha'es and colors whereas do roc#s not. 165 21. 7ome of the first aerial 'hotogra'hs were ta#en from a balloon while the Ci$il *ar in the ;nited 7tates.. R /8 . 2,.>ost bats roost in cre$ices ca$es or building by day and are acti$e at night or twilight. 25hanges within the chemist structure of single genes may be induced by ex'osure to radiation and extreme tem'eratures. 166 &8. A landmar# famous the Broo#lyn Bridge in !ew Bol# was one of the first wo$en wire cable sus'ension bridges e$er constructed. &1 6ndustry4s need for more and minerals is a constant challenge to the mining industry to ma#e new disco$eries. . 'ro'osal P &2. The waters of 3anauma Bay in +ahu 3awaii are #nown for the color di$ersity and abundant of their tro'ical fish. &&.. &-."ntomologists scientists who study insects are often concerned with the fungus 'oisonous or $irus carried by a 'articular insect. &..The eight stri'es of red white and blue on state flag of 3awaii re'resent 3awaii4s eight ma0or islands. &,. Cool tem'eratures shade moist and the 'resence of dead organic material 'ro$ide the ideal li$ing conditions for mushrooms. &5. >etalwor#ers use the term Emachine toolF to refer to a 'iece of an e1ui'ment used for sha'ing metal. 167 (8. 6n 'ools goldfish are not 0ust ornamentalL since they feed on mos1uito lar$a they are also benefit. 168 1998 08 1Because air is highly com'ressible ____ to define a clear u''er boundary of the atmos'here. (A) it is im'ossible (B) im'ossible is (C) so the im'ossibility (%) is the im'ossibility .. A 'o'ular belief ____ radio and tele$ision ha$e homogeni9ed the language of the ;nited 7tates. (A) states that (B) that is stated (C) that states (%) stating that ,. The astronomical unit is the a$erage distance of the "arth from the 7un ____ is the standard of distances in the 7olar 7ystem. (A) and (B) also (C) in addition (%) because 169 1&.The letters of Abigail Adams to her husband and future =resident Dohn ____ during the American @e$olution con$eyed a $i$id 'icture of the times (A) were written (B) which written (C) written (%) written when 1/. !ot only ____ as a coo#ed dish the world o$er but it is also used as the base of many other foods condiments and e$en be$erages. (A) eating rice (B) rice is eaten (C) 'eo'le eat rice (%) is rice eaten. 170 1,. Because the diamond is the hardest naturally substance it is used in industry for to cut grinding and boring other hard materials. % 28. Being chemical com'ounds minerals ha$e characteristic sha'es and colors whereas do roc#s not.. 2,.>ost bats roost in cre$ices ca$es or building by day and are acti$e at night or twilight. 171 &&.. 172 1998 08 QR1 %airy farming is _____ leading agricultural acti$ity in the ;nites 7tates. (A) a (B) at (C) then (%) none 2 Although thunder and lightning are 'roduced at the same time light wa$es tra$el faster ____ so we see the lightning before we hear the under. (A) than sound wa$es do (B) than sound wa$es are (C) do sound wa$es (%) sound wa$es & Beef cattle ____ of all li$estoc# for economic growth in certain geogra'hic regions. (A) the most are im'ortant (B) are the most im'ortant (C) the most im'ortant are (%) that are the most im'ortant ( The disco$ery of the halftone 'rocess in 'hotogra'hy in 1,,1 made it ____ 'hotogra'hs in boo#s and news'a'ers. (A) the 'ossible re'roduction (B) 'ossible to re'roduce (C) the 'ossibility of re'roducing (%) 'ossibly re'roduced / <lag %ay is a legal holiday only in the state of =ennsyl$ania ____ Betsy @oss sewed the first American flag. (A) which (B) where (C) that (%) has - ____ $astness of the ?rand Canyon it is difficult to ca'ture it in a single 'hotogra'h. (A) *hile the (B) The (C) <or the (%) Because of the . 7'eciation ___ results when an animal 'o'ulation becomes isolated by some factor usually geogra'hic. (A) form biological s'ecies (B) biological s'ecies are formed (C) which forming biological s'ecies (%) the formation of biological s'ecies , 6n this 'ure state antimony has no im'ortant uses but ___ with other substances it is an extremely useful metal. (A) *hen combined 'hysically or chemically (B) combined when 'hysically or chemically (C) the 'hysical and chemical combination (%) it is combined 'hysically and chemically 5 The dawn redwood a''ears _____ some 188 million years ago in northern forests around the world. (A) was flourished 173 (B) ha$ing to flourish (C) to ha$e flourished (%) ha$e flourished 18 Beginning in the >iddle Ages com'osers of *estern music used a system of notating their com'ositions _____ be 'erformed by musicians. (A) will (B) that (C) and when to (%) so they could 11 Ci$il @ights are the freedoms and rights ____ as a member of a community state or nation. (A) may ha$e 'erson (B) may ha$e a 'erson who (C) a 'erson may ha$e (%) and a 'erson may ha$e 12 @ichard *right en0oyed success and influence ____ among Blac# American writers if his era. (A) were un'aralleled (B) are un'aralleled (C) un'aralleled (%) the un'aralleled 1& ____ of large mammals once dominated the !orth American 'rairies the American bison and the 'ronghorn antelo'e. (A) There are two s'ecies (B) *ith two s'ecies (C) Two s'ecies are (%) Two s'ecies 1( <ran#lin %. @oosewelt was ____ the great force of radio and the o''ortunity it 'ro$ided for ta#ing go$ernment 'olicies directly to the 'eo'le. (A) as the first =resident he understood fully (B) the first 'resident that to fully understand (C) the first =resident fully understood (%) the first =resident to understand fully 1/ %uring the late fifteenth century ____ of the nati$e societies of America had 'rofessions in the fields of arts and crafts. (A) only a few (B) a few but (C) few but only (%) a few only 1- The firstly na$al battle of the @e$olutionary *ar was fought off the coast of >achias >aine in Dune 1../. 1. The 'ublic ceremonies of the =lains 6ndians are lesser elaborate than those of the !a$a0o in the 7outhwest. 1, 6n some s'ecies of fish such the three2s'ined stic#lebac# the male not the female 'erforms the tas# of caring for the young. 174 15 *hen she retires in 7e'tember 15,5 tennis cham'ion Christine "$ert was the most famous woman athlete in the ;nites 7tates. 28 The ancient @omans used $essels e1ui''ed with sails and ban#s of oars to trans'orting their armies. 21 %inosaurs are traditionally classified as cold2blooded re'tiles but recent e$idence based on eating habits 'osture and s#eletal structural suggests some may ha$e been warm2blooded. 22 7ince the ?reat %e'ression of the 15&84s social 'rograms such as 7ocial 7ecurity ha$e been built into the economy to hel' a$ert se$erity business declines. 2& 6n the 15.84s consumer acti$ities succeeded in 'romoting laws that set safety standards for automobiles children4s clothing and a widely range of household 'roducts. 2( Moos in !ew +rleans 7an %iego %etroit and the Bronx ha$e become biological 'ar#s where animals roams free and 'eo'le watch from across a moat. 2/ 6n human beings as in other mammal hairs around the eyes and ears and in the nose 're$ent dust insects and other matter from entering these organs. 2- The @oc#y >ountains were ex'lored by fur traders during the early 1,884s in a decades 'receding the ;nited 7tates Ci$il *ar. 2. The wor#s of the author 3erman >el$ille are literary creations of a high order blending fact fiction ad$enture and subtle symbolic. 2, "ach chemical element is characteri9ed to the number of 'rotons that an atom of that element contains called its atomic number. 25 The body structure that de$elo'ed in birds o$er millions of years is well designed for flight being both lightly in weight and remar#ably strong. 175 &8 <rom 158/ to 1528 American no$elist "dith *harton was at the height of her writing career 'ublishing of her three most famous no$els. &1 6n the early twentieth century there was considerable interesting among sociologists in the fact that in the ;nited 7tates the family was losing its traditional roles. &2 Although 'ure diamond is colorless and trans'arent when contaminated with other material it may a''ear in $arious color ranging from 'astels to o'a1ue blac#. && Com'arati$e anatomy is concerned to the structural differences among animal forms. &( A seismogra'h records oscillation of the ground caused by seismic wa$es $ibrations that tra$el from its 'oint of origin through the "arth or along its surface. &/ "lectric lam's came into wides'read use during the early 15884s and ha$e re'laced other ty'e of fat gas or oil lam's for almost e$ery 'ur'ose. &- )ocated in Canada the Columbia 6ce field co$ers area of 128 s1uare miles and is & &8 feet thic# in some 'laces. &. Com'oser @ichard @odgers and lyricist +scar 3ammerstein brought to the musical +#lahomaQ extensi$e musical and theatrical bac#grounds as well as familiar with the traditional forms of o'eretta and musical comedy. &, Because of its $ast tracts of $irtually uninhabited northern forest Canada has one of the lowest 'o'ulation density in the world. &5 @ice which it still forms the sta'le diet of much of the world4s 'o'ulation grows best in hot wet lands. (8 ?o$ernment money a''ro'riated for art in the 15&84s made 'ossible hundreds of murals and statues still admiration in small towns all o$er the ;nites 7tates. 176 1998 10 1.The sociali9ation 'rocess ex'lains _____ of societies through successi$e generations but also the ability of a society4s members to ha$e meaningful interactions. (A) that continuity only not (B) continuity only not that (C) the only continuity not (%) not only the continuity 2.3eat transfer ta#es 'lace when _____ with a warmer substance. (A) is there a colder substance (B) a colder substance comes into contact (C) does the colder substance contact (%) contacts a colder substance &.<ormerly called natural 'hiloso'hy 'hysics has retained _____ of understanding the structure of the natural world and ex'laining natural 'henomena. (A) its original aim (B) it aimed originally (C) its original aim was (%) aiming originally (.7ome bird s'ecies ha$e a song that is totally uninfluenced _____ en$ironment during their de$elo'ment whereas other s'ecies learn from other birds while young. (A) the (B) yet the (C) since the (%) by the /.=rior to the eighteenth century _____ storms formed and died out at the same location. (A) a common belief that (B) that a common belief (C) it was commonly belie$ed that (%) because it was commonly belie$ed -.?rown widely in 6owa and 6llinois the soybean 'ro$ides one of the world4s _____ sources of 'rotein. (A) useful and chea'er mostly (B) chea'est and most useful (C) chea'est and useful mostly (%) most chea'ly and usefully ..Co''er _____ used by humans and is second only to iron in its utility through the ages. (A) the first metal (B) was the first metal (C) the first metal that (%) being the first metal ,._____ are inert outside li$ing cells but within the a''ro'riate cells they can re'licate causing $iral diseases in the host organism. (A) Ciruses (B) That Ciruses (C) Ciruses which (%) %es'ite $iruses 5.The ;nited 7tates Constitution 'ro$ides for a count of the 'o'ulation _____ a census e$ery ten years. 177 (A) that it is called (B) when called (C) called (%) as called 18.%igital recording has ma#e _____ a significantly wider dynamic range in recorded music. (A) for the 'ossibility (B) the 'ossibility is (C) it is 'ossible (%) 'ossible 11.!ot only _____ 'eo'le to send words music and codes to any 'art of the world it can also be used to communicate far into s'ace. (A) enabled by radio (B) radio enables (C) does radio enable (%) radio has enabled 12.Allegory is a literary de$ice _____ another le$el of meaning is concealed within what is usually a story. (A) which (B) by which (C) which is (%) which it is 1&.The fact that _____ was disco$ered in 152& by the astronomer "dwin 3ubble. (A) the ex'ansion of the uni$erse (B) the uni$erse is ex'anding (C) the uni$erse which is ex'anding (%) when the uni$erse ex'ands 1(.Today _____ little fossil i$ory remains comes from Alas#a. (A) what (B) which (C) there is (%) where 1/.Although most famous for her 'aintings of the 7outhwest desert _____ as well. (A) ?eorgia +4#eeffe 'ainted many urban scenes (B) the 'ainting of many urban scenes by ?eorgia 84#eeffe (C) were many urban scenes 'ainted by ?eorgia +4#eeffe (%) ?eorgia +4#eeffe4s 'aintings of many urban scenes 1-.6t was in the 15284s that the arched2to' guitar was first de$elo'ed commercially in the ;nited 7tates and use in dance bands. 1..The intensity of 'olitical struggles in the ;nited 7tates after 1,2( led to A the re$i$al of the two2 'arty system which had been inacti$e when 1,1.. 1,.<luids exert e1ual 'ressure in all directions ha$e identical 'ro'erties throughout their $olume and theoretically offering no resistance to flow in any direction. 178 15.@eading has come to be regarded as an integrated 'art of language study than rather an isolated s#ill to be 'racticed out of context. 28. 6t has been estimated that during e$ery second of our life 18 888 888 red blood cells died and are re'laced by new ones. 21.=eriodic fires commonly s'read across grasslands and 'lays an im'ortant role in the maintenance and character of these ecosystems. 22.The 'lots of *illiam ?addis4s no$els allow am'le o''ortunity for 'hiloso'hical theological and society digression. 2&.6n additionally to being >ississi''i4s ca'ital and largest city Dac#son is also the state4s financial and medical center. 2(.<easts and festi$als among many !ati$e American tribes in the ;nited 7tates celebration agricultural and lunar e$ents. 2/.!euro'sychologist >arilyn Albert is loo#ing beyond brain functions for answers the 1uestion E3ow do emotions and attitudes affect the 2-.6ncor'orated in 1,2, )ouisbille Jentuc#y was named from Jing )ouis RC6 of <rance in recognition of his hel' during the @e$olutionary *ar. 2,.Alas#a the larges state of the ;nited states in area is more than twice the si9e than Texas. 25.>eridians of longitude and 'arallels of latitude form grid that can be used to locate the 'osition of any 'oint on the "arth4s surface. &8.>ercury and Cenus are the only 'lanets in the solar system where do not ha$e moons. &1.Carbohydrates which include cellulose sugary and starches are the most abundant class of organic substances found in nature. 179 &2.%uring the 're2@e$olutionary 'eriod the 'ress in Britain4s !orth American colonies was sub0ect to licensing laws similar to them of ?reat Britain itself. &&.6n its 'ure state aluminum is a wea# metal but when combined with e elements such as co''er or magnesium it is formed alloys of great strength. &(.7'ecially bred $arieties of lettuce can be grown in water containing dissol$e nutritious rather than in soil. &/.Throughout the 15&84s ;nited 7tates go$ernment 'atronage the arts was concentrated in the section of the *or#s =rogress Administration #nown as <ederal +ne. &-. "ssential a nineteenth2century instrument the callio'e was usually 'layed outdoors and was a 'art of fairs holiday gatherings and other such acti$ities. &..*inter broccoli has large white heads similar to those of cauliflower whereas s'routing broccoli 'roduces numerous small 'ur'lish green or white clum'. &,.?reen'eace an international organi9ation of en$ironmental acti$ists founded by Canadians uses non$iolent means to 'rotest and bloc# acti$ities it considers en$ironmentally harm. &5.Be$erly 7ills was a child radio star who became one of the world4s most dramatically gifted o'era singer ma#ing her debut at se$enteen. (8. 6n the 'ractice of ?estalt thera'y many attention is gi$en to non$erbal as'ects of beha$ior. 180 1999 01 1. Among the first 'lants to grow on the land regions of the "arth _____ which in 'rehistoric times grew to immense si9e (A) were horsetail rushes (B) horsetail rushes (C) horsetail rushes were (%) and horsetail rushes 2. ;nli#e fossil fuels which can be used only once wind and solar 'ower _____of energy. (A) for renewable sources (B) the sources are renewable (C) are renewable sources (%) renewable sources &. _____ that the first cheese was 'robably made more than ( 888 years ago by nomadic tribes in Asia. (A) The belief (B) Although they belie$e (C) 6t is belie$ed (%) Belie$ing (. Today _____ of the "arth li$e on a $ery small 'ercentage of the "arth4s land surface. (A) about two2thirds 'o'ulated (B) the 'o'ulation is about two2thirds (C) about two2thirds of the 'o'ulation (%) of about two2thirds the 'o'ulation is /. 6t was in the year 1.52 _____ (A) that the !ew Bor# 7toc# "xchange was founded (B) founding the !ew Bor# 7toc# "xchange (C) which year the !ew Bor# 7toc# "xchange was founded (%) the !ew Bor# 7toc# "xchange founded -. >any small birds use new sites for each nesting _____ large birds often reuse the same nest. (A) by (B) how (C) within (%) whereas .. =lateaus are often referred to as tablelands _____ essentially flat2to''ed and stand cons'icuously abo$e an ad0acent land area. (A) because are (B) because they are (C) because of their (%) which because they are ,. Although many contem'orary craft ob0ects are not _____ they generally ha$e their roots in function. (A) function (B) functionally (C) as function (%) functional 5. _____ hearing aid was a tube called the ear trum'et a flared tube held u' to the ear. (A) <irst 181 (B) *hen the first (C) 6t was the first (%) The first 18. >ost lea$es are coated with a water'roof _____ or cuticle. (A) that the co$ering (B) and is co$ering (C) co$ering (%) by co$ering 11. The first glass factory _____ the !orth American continent was started in Damestown Cirginia in 1-8.. (A) established on (B) being established (C) was established on (%) that established it 12. _____ in the desert is mainly due to the limited su''ly of desert water. (A) =lants are widely s'aced (B) The s'acing of 'lants is wide (C) =lants to be s'aced widely (%) The wide s'acing of 'lants 1&. 6n addition to 'ainting highly acclaimed 'ortraits >ary Cassatt was _____ to se$eral ma0or art collectors. (A) to ad$ise (B) an ad$iser (C) ad$ised (%) ad$ising 1(. 7'ringwater is _____ clean since it has been filtered through 'ermeable roc#s but all s'ring water contains some dissol$ed minerals. (A) generally fair (B) generally fairly (C) in general fair (%) general and fair 1/. All eels s'awn in the sea the eggs hatching into trans'arent ribbon2li#e lar$ae _____ feeding until they metamor'hose into small eels. (A) that drift about (B) drift about (C) about drifting (%) drift about them 1-. Citrus fruits thri$e in 1uite $ery tro'ical climates. 1..Carson >cCullers was fame for her no$els about life in the small owns of the southern ;nited 7tates. #ilometers 'er hour are re1uired to raised dust 'articles during dust storms. 182 28. The as'halt de'osits of )a Brea Tar =it in California ha$e yielded fossils of numerous animal of the =leistocene e'och including the giant ground sloth. 21. )ocated in the center of the continental ;nited 7tates and #nown for its endless wheat fields Jansas is one of the nation4s leading agriculturally states. 22. An intrinsic 'art of the sound structure of 'oet the re'etition of a consonant sound or sounds may also be exhibited in 'rose. 2&. =eo'le feel uncomfortable when the humidity rises o$er -8 'ercent because 'ers'iration cannot e$a'orate 1uic#ly enough for the body to rid themsel$es of excess heat. 2/. The =ulit9er =ri9es are annual awards for excellence in ;nited 7tates 0ournalism literature and musical. 2.. 7cience fiction is any fiction dealing with the future or with so imaginati$e sub0ects as interstellar tra$el life on other 'lanets or time tra$el. such as used when gi$ing an exam'le of something formal used in com'arisons to say that something or someone has less of a 'articular 1uality than another 'erson or thing 2,. The wings'read of $arious s'ecies of bats range from o$er fi$e feet to less than two inches. 25. The harmonica4s tones are made by the $ibrations of the feeds created by the blowing and suction to the 'layer. &8. The constitution of 1,5. under which %elaware is now go$erned is fourth constitution in the history of the state. &1. Because most 'hotogra'hic filters wor# by subtract 'ortions of $isible light from the sub0ect they decrease the intensity of light that reaches the film. 183 &2. 6n a $acuum discharge tube at ordinary $oltages and currents neon glows reddish2 orange and is the mostly intense of all the rare gases. &&. Although ".". Cummings studied art in =aris but his writings attracted much more interest than his 'aintings. &(. Because material organic decays slowly in 'eat the remains of 'rehistoric animals are often found in the de'ths of 'eat hogs. &/. ;sually an atom ha$ing one two or three electrons in its $alence band readily contributes electrons to and recei$e electrons from neighboring atoms. &-. A symbol of freedom the 7tatue of )iberty re'resents a woman has 0ust esca'ed from the chains of sla$ery which lie at her feet. &.. The southwestern 'ortion of the ;nited 7tates is a land of little rain and 'arts of it are too dry that they are called deserts. &,. 7eneca chief Corn2'lanter hel'ed arrange treaties between many ;nited 7tates settler and !ati$e American tribes in western =ennsyl$ania after the American @e$olutionary *ar. &5. >ercury is so much close to the 7un that it is usually in$isible in the glare of the 7un4s rays. (8. =ollen can be transferred by the wind or by birds that comes into contact with flowers. 184 1999 05 1. Classical logic is characteri9ed by a concern for the structure and elements of argument____ that thought language and reality are interrelated. (A) based on the belief (B) on the belief based (C) belief based on the (%) the based belief on 2. Adult fleas_____ only blood and are external 'arasites of mammals and birds. (A) eat (B) ha$ing eaten (C) that eat (%) to eat &. 3eat energy may be absorbed or released when_____ while wor# is done on or by the system. (A) changes in the internal energy of a system (B) by changing the internal energy of a system. (C) the internal energy of a system that changes (%) the internal energy of a system changes (. >etheods of measuring mass time and distance are _____ of human culture. (A) among the oldest s#ills (B) they are among the oldest s#ills (C) what among the oldest s#ills (%) the s#ills that among the oldest /. ______ they sometimes swim alone dol'hins usually congregate in large grou's often numbering in the hundreds. (A) *hy (B) Although (C) "$en (%) !e$ertheless -. ______ 'lays an im'ortant 'art in commercial art illustrating ad$ertisements textboo#sbrochures and articles in maga9ines and 'eriodicals. (A) %rawing and (B) Because drawing (C) %rawing which (%) %rawing .. ?oldfinches build com'act _______ nests which they line with soft $egetable down. (A) sha'ed li#e a cu' (B) cu'2sha'ed 185 (C) cu' sha'es (%) sha'e of a cu' ,. )ouisa >ay Alcott 'ublished her first boo# <lower <ables _____ of fairy tales in 1,/(. (A) which a collection (B) a collection was (C) a collection (%) in which a collection 5. ______ understanding of weather and its $ariability it has been difficult to 'ro$e that weather can be controlled. (A) 7ince incom'lete (B) Because of incom'lete (C) 6ncom'lete (%) *hy is incom'lete 18. <ran#lin @oose$elt4s !ew %eal =rogram included ______ designed to 'ro$ide relief and counteract the effects of the economic de'ression that had begun in 1525. (A) measures were tem'orary (B) in tem'orary measures (C) tem'orary and measures (%) tem'orary measures 11. Current health guidelines recommend that 'eo'le restrict their consum'tion_______. (A) foods of high in fat (B) of foods in fat high (C) of foods high in fat (%) in foods high of fat 12. *alt *hitman originated a distincti$e form of free $erse that sets his wor# a'art from_____ of all other 'oets. (A) what (B) that (C) how (%) it 1&. _____ economic change by in$estigating the fluctuations in the relationshi' between wor#ers4 wages and their buying 'ower. (A) "conomists gauging (B) "conomists gauge how (C) "conomists gauge (%) *hene$er economists gauge 1(. Although the many hours of summer sunshine in Canada4s Jlondi#e region 'roduce good $egetable cro's the long winters rarely 'ermit ______. 186 (A) grain cro's ri'en (B) grain cro's are ri'e (C) the ri'ening of grain cro's (%) to ri'en grain cro's 1/. Tools a wor#sho' and some storage s'ace were ______ for early ex'eriments in a$iation. (A) re1uired all that (B) all that was re1uired (C) all the re1uirements that (%) such that all the re1uirements 1-. A ma0or railroad 0unction in 6llinois %ecatur has became an im'ortant commercial hub for the region4s farm 'roducts and li$estoc#. 1.. =eo'le use muscles to ma#e $arious mo$ements such as wal# 0um'ing or throwing. 1,. "mily %ic#inson unmista#enly fixed her own highly indi$idually and re$olutionary 'ersonality in her elli'tical and 'ro$ocati$e 'oems. 15. The human s#eleton is made u' of 28- bones of difference si9e and sha'es. 28. +ne of the earliest stri#e in ;nited 7tates history occurred in 1.(8 when ba#ers refused to wor# until their wages were increased. 21. Count Basie4s distincti$e 'iano style and band arrangements of the late 15&84s earned his an im'ortant 'lace in 0a99 history. 22. The wide range of ele$ations in the southern A''alachian >ountains allows for the great di$erse of 'lant life found there. 2&. <our huge shield $olcanoes ha$e been obser$ed on >ars as well as a great number of small ones li#e found those on the "arth. 2(. The 1,5. disco$er of gold in the Jlondi#e hastened the commercial de$elo'ment of *ashington 7tate as did the increasing trade with =acific 6slands. 2/. The 7aint )awrence @i$er is young relati$ely by geological standards as it was founded during the last ice age. 187 2-. *ith the ability 'roduce and control fire early humans could ma#e heat and light and could coo# foods that were difficult to eat raw. 2.. +nly the female and the wor#er was's are e1ui''ed with a sting which they use it to attac# their 'rey or to 'rotect themsel$es against enemies. 2,. Com'ared with another breeds 1uarter horses can start more 1uic#ly turn more shar'ly and run faster o$er short courses. 25. 7tars emit radio wa$es which they may be detected and studied using radio telesco'es. &8. A glider is a ty'e of aircraft resembling an air'lane but often ha$ing not means of 'ro'ulsion at all. &1. A 'atrilineal extended family consists of core grou' of males their wi$es and their unmarried daughters. &2. 3erons inhabit marshy areas of the shores along fresh or salt water which they find fishes frogs crustaceans and other a1uatic animals to eat. &&. A com'uter 'rogram that communicates with the user solely by choices 'ro$iding from interlin#ed menus is said to be menu2dri$en. &(. 6n the 15&84s few ma0or orchestras in the ;nited 7tates hired woman so many chose to 'erform in amateur musical grou's as an alternati$e. &/. Com'lex s'acecraft are characteri9ed by a $arious of su''orting systems including communications guidance and na$igation altitude control and in some cases life2su''ort systems. &-. *hen a 'iano board is substituted for buttons on right side of an accordion the instrument is #nown as a 'iano accordion. &.. Today4s lunar and solar ecli'ses can be 'redicted to within seconds of its occurrences and interest in them is scientific as well as aesthetic. 188 &,. The windowless inner rooms of the =ueblo Bontio in !ew >exico ser$ed for the storage of su''lies while the brighter outer rooms were using for li$ing 1uarters. &5. ;ltrasonic is concerned with sound $ibrates or wa$es of a fre1uency abo$e 28 888 cycles 'er second the u''er range audible to the human ear. (8. <reesia 'lants reach a height of two and one2half feet and thri$e best at tem'erature of /8 degrees to -8 degrees <ahrenheit. 189 1999 08 1. 6n 1,-( !e$ada enter the ;nited 7tates as _______ thirty2sixth state. (A) in the (B) to be the (C) was the (%) the 2. Bob 7te'henson a biologist in Alas#a who studies the Canadian lynx a ty'e of wildcat has learned ______ from studying their trac#s in the snow. (A) how lynx hunt (B) lynx hunt how (C) how hunt lynx (%) lynx how hunt &. ______ lay eggs but some gi$e birth to li$e young. (A) Although most insects (B) >ost insects (C) %es'ite most insects (%) >ost insects that (. Author 7raah Dewett established her literary re'utation with %ee'ha$en a collection of s#etches ______. (A) with rural >aine life (B) that life in rural >aine (C) about life in rural >aine (%) life in rural >aine /. By means of $arious ty'es of wind tunnels ______ simulate most of the flight conditions to which an air'lane is sub0ected. (A) which aeronautical engineers can (B) aeronautical engineers can (C) the ability of aeronautical engineers to (%) aeronautical engineers being able to -. ______ 'lanes in flight between air'orts air traffic controllers rely on radar. (A) Trac#ed (B) Trac# of (C) To trac# (%) +f trac#ing .. The o'erating 'rinci'les of the tele'hone are ______ they were in the nineteenth century. 190 (A) the same as today (B) the same today (C) the same today as (%) today what the same. ,. 7teel magnate Andrew Carnegie used 'art of his wealth _______ more than 2 /88 'ublic libraries in "nglish2s'ea#ing countries between 1,,1 and 1515. (A) hel'ed in building (B) hel'ed him to building (C) to hel' build (%) his hel' in building 5. !ot until 15(5 _______ Canada4s tenth 'ro$ince. (A) became !ewfoundland (B) did !ewfoundland become (C) !ewfoundland did become (%) !ewfoundland became 18. =aul 7amuelson re$olutioni9ed _____ by 'resenting his students with the most ad$anced economic thin#ing at an introductory le$el. (A) to teach economics (B) the teaching of economics (C) teaching that economics is (%) economics is taught 11. The term bell2letters is used to denote literary forms that contain _____ such as drama 'oetry essays and no$els. (A) artistic creati$e writing (B) writing that artistic creati$e (C) artistic creati$e and writing (%) them is artistic creati$e writing 12. +'en2'it mining follows the same se1uence of o'erations ______ miningL drilling blasting and loading and remo$ing waste and ore. (A) where underground (B) that underground (C) underground (%) as underground 1&. ______ in cases where s'ecial oxidants are used fires are the result of a fuel ra'idly combining with the oxygen in the air. (A) There are (B) "$en though (C) 3ow (%) "xce't 191 1(. >aya Angelou4s widely acclaimed autobiogra'hy 6 #now why the Caged Bird sings is a mo$ing and ______ of her childhood in segregated Ar#ansas. (A) an account that is often humorous (B) often humorous as an account (C) often humorous the account (%) often humorous account 1/. ______ to study element 18( because only a few atoms of his substance can be isolated at one time. (A) The difficulty (B) *hy it is difficult (C) 6t is difficult (%) "$en though difficult 1-. Common salt occurs naturally in 'ure solidly form as the mineral halite and in widely distributed de'osits of roc# or mineral salts. 1.. The term EmetabolismF refers to the chemical changes which by li$ing things transform food into energy. 1,. >aterials that of clay are among the most ancient manufactured articles and ha$e 'layed a $ital role in human ci$ili9ation. 15. Bogurt contains a higher 'ercentage of lactic acid than another fermented mil#s and it is rich in B2 com'lex $itamins. 28. Canada is made u' of ten 'ro$inces and two territories with go$ernmental 'owers being di$ided between the federal go$ernment or the 'ro$inces. 21. Before the formation of labor unions indi$idual wor#ers had almost not $oice in determining their wages hours or wor#ing conditions. % 2&. "ach stan9a of a 'oem has a re'eatable 'attern of meter and rhyme and is normally di$ision from the following stan9a by a blan# line. 192 2(. %e'ending on many factors including climate mineral content of the soil and the 'ermanency of surface water wetlands may be mossy grassy or co$ering with shrubs or trees. 2/. 6n many areas of the world 'eo'le need clothing for 'rotection the weather. 2-. 3oocer %am in !e$ada is a multi'ur'ose structure that 'ro$ides flood control hydroelectric 'owerful and drin#ing and irrigation water. 2.. =hysiologically the 'eriod of adolescence is mar#ed by acti$e growth es'ecially in the s#eletal and muscular systems and in a certain $ascular tissues. 2,. <ree nitrogen is chemically inert and combines with other elements only since $ery high tem'eratures or 'ressures. 25. 7awfish are shar#2li#e fish ha$e EsawsF of cartilage set with two rows of teeth on their snouts. &8. The decade of the 15284s was significant in ?eorgia4s history because of the ra'idity with what agriculture declined in the state. &1. Although usually li$ing on or under roc#s or on coral reefs marine snails ha$e been obser$ed in a great $arious of habitats. &2. 6n the field of acting theory contro$ersy arises o$er the 1uestion of whether is acting a beha$ioral or a mental 'rocess. &&. 7hort2wa$e radios that can recei$e and transmit signals are used by 'ilots the 'olice and amateur o'erator. &(. Because sil# is the strongest of all natural fibers ran#ing in strong with the synthetic fiber nylon its delicate loo# and fell are dece'ti$e. &/. The @ed @i$er so named because of the red2colored sediment it carries it is one of the main branches of the >ississi''i. 193 &-. <loyd Bennett was a 'ilot for two of the Arctic ex'edition of the 15284s and the first 'ilot to fly o$er the north 'ole. &.. To those who fa$orite free trade the re$i$al of barter can suggest nothing less than a disaster. &,. 6n the ;nited 7tates about ./ 'ercent of the total tomatoes cro' is 'rocessed into 0uice caned tomatoes sauces 'astes and #etchu'. &5. Today4s nuclear fission fuels are the remnants of which used to be a much more acti$e mixture of radioacti$e and fissionable materials two billion years ago and earlier. (8. =etrogra'hy concerns 'rimarily with the detailed descri'tion and classification of roc#s whereas 'etrology deals 'rimarily with roc# formation. 194 1999 10 1. <inger'rints form an unchangeable signature and ______ for identification des'ite changes in the indi$idual4s a''earance or age. (A) the use of finger'rint records (B) with the use of finger'rint records (C) when finger'rint records are used (%) finger'rint records can be used 2. Animals obtain their energy from _______ . (A) eat their food (B) their food to eat (C) the food they eat (%) they eat the food &. )i1uid water has fewer hydrogen bonds than ice: so more molecules can occu'y the same s'ace ma#ing li1uid water ______ than ice. (A) more dense (B) is more dense (C) more than dense (%) as more dense (. 6t is difficult for 'resent2day readers ______7ister Carrie was withdrawn from circulation at the turn of the century. (A) to understand the no$el why (B) why to understand the no$el (C) the no$el to understand why (%) to understand why the no$el /. 3istorical linguists study ______ o$er time. (A) languages e$ol$e (B) whether languages e$olution (C) how languages e$ol$e (%) e$olution that languages -. Tennis star Chris "$ert who retired from the game after eighteen years 'erha's _____ more than anyone to ma#e women4s 'rofessional tennis a widely res'ected career. (A) who did (B) has done (C) and doing (%) to do .. The daytime _____ bright because the "arth4s atmos'here scatters sunlight. (A) while s#y is (B) has a s#y (C) s#y is (%) for the s#y ,. "dward 3o''er4s 'aintings 'ortray the loneliness and isolation of the indi$iduals _____. (A) is in an urbani9ed society 195 (B) in society is urbani9ed (C) who in an urbani9ed society (%) in an urbani9ed society 5. Braille _____ 'rinting reading materials for use by 'eo'le who are blind consists of a system of raised 'oints or dots that are read by touch. (A) is a method of (B) a method of (C) which a method of (%) a method is of 18. The art of landsca'e architecture is almost as old ______ of architecture itself. (A) as that (B) than (C) as (%) than that 11. The de$elo'ment of synthetic fibers after 15(8 led to the 'roduction of new ty'es of fabrics _____ more durable and easier to care for. (A) that they were (B) that were (C) were (%) and were 12. ;ntil the eighteenth century charcoal was _____ used in blast furnaces as well as in glassma#ing blac#smithing and metalwor#ing. (A) what the chief fuel (B) the chief fuel that (C) the chief fuel was (%) the chief fuel 1&. =ure iron cannot be hardened by heating and cooling as _____ because iron lac#s the necessary carbon. (A) steel it can (B) can steel (C) with steel can (%) so can steel 1(. @a'ids and waterfalls ______ along $irtually all >assachusetts waterways 'ro$ided 'ower in colonial times for grist and saw mills and later for textile mills. (A) common (B) were common (C) which being common (%) being common were 1/. Airsic#ness is 'roduced by a disturbance of the inner car ______ 'sychogenic factors such as fear also 'lay a 'art. (A) in s'ite of (B) neither (C) nor (%) although 196 1-. A large collections of materials focused on )ouisiana4s history and culture is 'ro$ided by the *illiams @eseach Center in !ew +rleans. 1.. >ary Austin4s first boo# The )and of little @ain a descri'tion of desert life in the western ;nited 7tates won she immediate fame in 158&. 1,. The most abundant 'hos'hate mineral a'atite includes se$eral ty'e that $ary in their content of fluorine chlorine or hydroxyl ions. 15.3a$ing gained a re'utation as a daring intre'id 0ournalist !ellie Bly became the first female re'ort assigned to the "astern front during the <irst *orld *ar. 28. 6n 1,-2 Abraham )incoln signed the 3omestead Act allows settlers 1-8 acres of free land after they had wor#ed it for fi$e years. 21. Alone with the other 'hysical sciences meteorology has de$elo'ed in the 'ast three centuries from myth and fol#lore to rigorous obser$ation com'utation analy9e. 22. 6n 15.& the ;nited 7tates armed forces were 'laced on an all2$olunteer basis for a first time since 15,(. 2&. Because lions do not ha$e exce'tional s'eedy they must rely on the element of sur'rise for the hunt. 2(. The 'osition of the earth4s magnetic 'oles is not constant but shows an a''reciable change after year to year. 2/. ?rassland $egetation reduces com'etition for water among s'ecies by concentrates roots at different le$els. 2-. )i#e the giant re'tiles most lineages of organisms ha$e e$entually become extinct: still some exist that ha$e changed $ery little in millions of year. 2.. %emonstrations 'ublic are an effecti$e means by which ad$ocacy grou's can bring ine1ualities to the attention of local state and federal officials. 197 2,. >ethods used in 're'aring articles for an encyclo'edia differs de'ending on the length of the article. 25. 7ince the ad$ent of roc# music in the 15/84s the 'o'ular music of the ;nited 7tates has become a significant musical influence around world. &8. Cloud dro'lets and ice crystals first form on certain ty'es of small 'articles of dust or another airborne materials. &1. >ale fiddler crabs ha$e huge claws that mo$e bac# and forth similar $iolinists mo$e their arms when 'laying the $iolin. &&. Almost e$ery fruits and $egetables contain ribofla$in: the richest sources are leafy green $egetables such as s'inach #ale or turni' greens. &(. ?old lends itself to the ma#ing of decorati$e articles because of its great resistant to corrosion and tarnish and its ease of wor#ing. &/. "thics is the branch of 'hiloso'hy that deals with the $alues of life in a coherent systematic and science manner. &-. 6ndiscriminately dum'ing of waste materials and inade1uate sewage treatment are two serious causes of en$ironmental 'ollution. &.. The builders of the $ariety ancient cliff ruins scattered throughout the canyons and mesas of the arid 7outhwest of the ;nited 7tates are #nown as the cliff dwellers. &,. A fragrant 'lant has tiny sacs that ma#es and stores the substances that gi$e it a 'leasant odor. &5. !omadic hunter and gatherer societies ha$e access to only a limited amount of food in an area and mo$ed on when they ha$e exhausted each locality. (8. Collagen a strong rubbery 'rotein su''orts the earfla's and the ti' of nose in humans. 198 2000 01 1. Amanda *ay4s career as a social reformer____ in 1,/1 when at an antisla$ery meeting in 6ndiana she called for a state woman4s rights con$ention. (A) begin (B) began (C) ha$e begun (%) to ha$e begun 2. The celesta an orchestral 'ercussion instrument resembles___ (A) a small u'right 'iano (B) how a small u'right 'iano (C) a small u'right 'iano is (%) as a small u'right 'iano &. Thomas =aine _____ wrote Common 7ense a 'am'hlet that identified the American colonies with the cause of liberty. (A) writer of elo1uent (B) whose elo1uent writing (C) an elo1uent writer (%) writing elo1uent (. Although bea$ers rarely remain submerged for more than two minutes they can stay underwater ___fifteen minutes before ha$ing to surface for air. (A) as long (B) as long as (C) so long (%) so long that /. =rotein digestion begins in the stomach ____ends in the small intestine. (A) while (B) and (C) how (%) because -. *hen natural gas burns its___ into atoms of carbon and hydrogen. (A) hydrocarbon molecules brea#ing u' (B) bro#e u' by hydrocarbon molecules (C) hydrocarbon molecules brea# u' (%) bro#en u' hydrocarbon molecules .. _____ ballet dancers learn fi$e basic 'ositions for the arms and feet. (A) All of (B) +f e$ery (C) All (%) "$ery ,. 7ome colonies of bryo9oans small marine animals form ___with trailing stems. (A) cree'ing colonies (B) which colonies cree' (C) cree'ing colonies are (%) colonies cree' 5. @uth Bader ?insburg argued six women4s rights cases before the ;nited 7tates 7u'reme Court in the 15.84s ____ (A) of fi$e winning them (B) fi$e winning of them 199 (C) of them fi$e winning (%) winning fi$e of them 18. !atural selection is defined as the 'rocess ___the course of e$olution by 'reser$ing those traits best ada'ted for an organism4s sur$i$al. (A) to which directs (B) of which directs it (C) directs it (%) that directs 11. ____ &-& miles between the cities of Albany and Buffalo in !ew Bor# 7tate the "ric Canal hel'ed lin# the Atlantic +cean with the ?reat )a#es. (A) The extension of (B) The extension (C) "xtending (%) "xtends 12.The chief sources of B12 a water2soluble $itamin ____ stored in the body include meat mil# and eggs. (A) is not (B) that is not (C) not that is (%) that not 1&. ____ is rooted in ex'eriments in iron and steel conducted in the nineteenth century. (A) *hile the history of twentieth2century architecture (B) The history of twentieth2century architecture (C) That the history of twentieth2century architecture (%) Both twentieth2century architecture and its history 1(.The 'rimary source of energy for tro'ical cyclones is the latent heat released when ____ (A) does water $a'or condense (B) condensed water $a'or (C) water $a'or condenses (%) the condensation of water $a'or 1/. >aufacturing is Canada4s most im'ortant economic acti$ity ____1. 'ercent of the wor#force. (A) engages (B) and to engage (C) that it engage (%) engaging 1-. The outer layer of the heart called the 'ericardium forms a sac in what the heart lies. 1.. *ood from the ash tree becomes extremely flexibly when it is ex'osed to steam. 1,. The ability to tal# is one of the s#ill that ma#e humans different from the rest of the animal world. 15. 6n 'lane geometry the sum of the internal angles of any triangle has always e1ual to 1,8 degrees. 28. =olar bears are bowlegged and 'igeon2toed ada'tations that enable this massi$e animals to maintain their balance as they wal#. 200 21. Ca$es are formed by the chemical or action mechanical of water on soluble roc# by $olcanic acti$ity and by earth1ua#es. 22. Celery an edible 'lant is ha$ing long stal#s to''ed with feathery lea$es grows best in cool weather. 2&. The first fiction writer in the ;nited 7tates to achie$e international fame was *ashington 6r$ing who wrote many stories included E @i' Can *in#leF and EThe )egend of 7lee'y 3ollowF. 2(. Three fundamental as'ects of forest con$ersation are the 'rotection of immature trees the use of 'ro'er har$esting methods and 'ro$ide for an en$ironment that su''orts re'roduction. 2/. <or each en9yme reaction there is an o'timum tem'erature which maximum efficiency is achie$ed. 2-. Adolescence is a transitional stage in human de$elo'ment from the beginning of 'uberty to the attainment of the emotion social and 'hysical maturity of adulthood. 2.. The 'eo'le nati$e to the northwest coast of !orth American ha$e long be #nown for wood car$ings of stunning beauty and extraordinary 1uality. 2,. Colonial efforts to manufacture glass at Damestown2222 and later attem'ts near =hiladel'hia and Boston222failed des'ite the abundant of fuel and good raw materials. &8. Chicago is the third largest 'ublishing center in the ;nited 7tates exceeding only by !ew Bor# City and 7an <rancisco. &1. !orth American bison differ from domestic cattle in ha$e 1( rather than 1& 'airs of ribs. 201 &2. <emale sea turtles before laying her eggs swim as much as 2 888 #ilometers to return to the beaches where they themsel$es were hatched. &&. *ater is the only substance that occur at ordinary tem'eratures in all three states of matterL solid li1uid and gas. &(. %es'ite the growth of manufacturing and other industries the economy of the state of Texas has remained hea$ily de'endence on oil and gas. &/. )yndon B. Dohnson was the only ;nited 7tates =resident who oath of office was administered by a woman Dudge 7arah Tilghman 3ughes. &-. 6t too# more than fourteen years to car$e the faces of four ;nited 7tates =residents into the granite cliffs to >ount @ushmore 7outh %a#ota. &..Charles Bullfinch was the architect who design the original red bric# core of the 7tate 3ouse in Boston. &,.@arely has a technological de$elo'ment had as great an im'act on as much as'ects of social economic and cultural de$elo'ment as the growth of electronics. &5. )owell >assachusetts #nown as the E7'indle CityF since 1,22 when its first textile mills were built attracted worldwide attention as textile center. (8.7trange Cictory 7ara Teas dale4s smallest and most 'erfect collection of 'oems a''ear in 'rint in 15&&. 202 2000 05 1.<rom 15(5 onward the artist ?eorgia +4 Jeeffe made !ew >exico ______. (A) her 'ermanent residence was (B) where her 'ermanent residence (C) 'ermanent residence for her (%) her 'ermanent residence 2. Dust as remote2controlled satellites can be em'loyed to ex'lore outer s'ace _______em'loyed to in$estigate the dee' sea. (A) can be robots (B) robots can be (C) can robots (%) can robots that are &. 6n ______ 'eo'le the areas of the brain that control s'eech are located in the left hemis'here. (A) mostly of (B) most (C) almost the (%) the most of (. 7tars shine because of _______ 'roduced by the nuclear reactions ta#ing 'lace within them. (A) the amount of light and heat is (B) which the amount of light and heat (C) the amount of light and heat that it is (%) the amount of light and heat /. ________ is not clear to researchers. (A) *hy dinosaurs ha$ing become extinct (B) *hy dinosaurs became extinct (C) %id dinosaurs become extinct (%) %inosaurs became extinct -.Although many 'eo'le use the word Emil#F to refer cow4s mil# _______ to mil# from any animal including human mil# and goat4s mil#. (A) a''lying it also (B) a''lies also (C) it also a''lies (%) but it also a''lies .. The first transatlantic tele'hone cable system was not established _______ 15/-. (A) while (B) until (C) on (%) when 203 ,. _______ no two 'eo'le thin# exactly ali#e there will always be disagreement but disagreement should not always be a$oided: it can be healthy if handled creati$ely. (A) There are (B) *hy (C) That (%) Because 5.%rin#ing water ________ excessi$e amounts of fluorides may lea$e a stained or mottled effect on the enamel of teeth. (A) containing (B) in which containing (C) contains (%) that contain C *B 18. 6n the 1,284s 'hysical education became_______ of the curriculum of 3ar$ard and Bale ;ni$ersities. (A) to be 'art (B) which was 'art (C) was 'art (%) 'art A = =Nwy 11. =ewter _______ for eating and drin#ing utensils in colonial America is about ninety 'ercent tin which co''er or bismuth added for hardness. (A) was widely used (B) widely used it (C) widely used (%) which widely used 12.A moth 'ossesses two 'airs of wings _____ as single 'air and are co$ered with dustli#e scales. (A) function (B) are functioning (C) that function (%) but functions 1&.7oa' o'eras a ty'e of tele$ision drama series are so called because at first they were ________. (A) often which soa' manufacturers s'onsored (B) s'onsored often soa' manufacturers (C) often s'onsored by soa' manufacturers (%) soa' manufacturers often s'onsored them 1(.The *oolworth Building in !ew Bor# was the highest in America when _______ in 15(& and was famous for its use of ?othic decorati$e detail. (A) built (B) it built (C) was built 204 (%) built it 1/.3umans ________ interact through communicati$e beha$ior by means of signs or symbols used con$entionally. (A) li#e other animals (B) how other animals (C) other animals that (%) do other animals 1-.>ore and 58 'ercent of the calcium in the human body is in the s#eleton. 1.. =erha's the most 'o'ular film in mo$ie history 7tar *ars was written and direction by ?eorge )ucas. 1,. 7ome animal acti$ities such as mating migration and hibernate ha$e a yearly cycle. 15. ?eogra'hers were once concerned largely with ex'loring areas un#nown to them and from describing distincti$e features of indi$idual 'laces. 28. 6n his animated films *alt %isney created animals that tal# and act li#e 'eo'le while retaining its animal traits. 21. The first city in the ;nited 7tates that 'ut into effect ma0or 'lan for the clustering of go$ernment buildings was *ashington %.C. 22. 6n a microwa$e o$en radiation 'enetrates food and is then absorbed 'rimarily by water molecules caused heat to s'read through the food. 2&.The cultures early of the genus 3omo were generally distinguished by regular use of stone tools and by a hunting and gathering economy. 2(. %ol'hins are slee# and 'owerful swimmers that found in all seas and unli#e 'or'oises ha$e well defined bea#li#e snouts and conical teeth. 2/. The $elocity of a ri$er is controlled by the slo'e the de'th and the tough of the ri$erbed. 205 2-. The 'honogra'h record was the first successful medium for ca'turing 'reser$ation and re'roducing sound. 2.. ?enerally the 'attern of o'en s'ace in urban areas has sha'ed by commercial systems go$ernmental actions and cultural traditions. 2,. A li1uid that might be a 'oor conductor when 'ure is often used to ma#e solutions that readily transmits electricity. 25.The initial disco$ery by humans almost 18 888 years ago that they could ex'loit metallic mineral de'osits was an im'ortant milestone in the de$elo'ment ci$ili9ation. &8. 6n 15,5 Tillie <owler a @e'ublican became the first member of her 'arty to ser$ing as 'resident of the city council of Dac#son$ille <lorida. &1. ?eneral anesthesia which is usually used for ma0or surgery in$ol$es a com'lete loss of consciousness and a relaxed of the muscles. &2. After first establishment subsistence farms along the Atlantic seaboard "uro'ean settlers in !orth America de$elo'ed a maritime and shi'building industry. &&.The legs of a roadrunner are enough strong that it can run u' to 2( #ilometers 'er hour to catch li9ards and small rodents. &(. <or the immune system of a newborn mammal to de$elo' 'ro'erly the 'resence of the thymus gland is essentially. &/. =hysicians wor#ing in the field of 'ublic health are mainly concerned with the en$ironmental causes of ill and how to eliminate them. &-.By 1,/8 immigration from distance shores as well as migration from the countryside had caused !ew Bor# City4s 'o'ulation to swell. &..By identifying similar words or structures in different languages we find e$idence that those languages are related and may be deri$ed from same ancestor. 206 &,. Astronomers use 'hotogra'hy and sighting telesco'es to study the motions of all of the bright stars and many of the faint one. &5.6n the nineteenth century a number of !ati$e American tribe such as the Comanche li$ed a nomadic existence hunting buffalo. (8. The a$erage ele$ation of *est Cirginia is about 1 /88 foot abo$e sea le$el. 207 2000 08 1. The gray scale a 'rogressi$e series of shades ranging from blac# to white is used in com'uter gra'hics _____ detail to gra'hical images. (A) added (B) to add (C) are added (%) and add 2. By _____ excluding com'etition from an industry go$ernments ha$e often created 'ublic ser$ice mono'olies. (A) they ado't laws (B) laws are ado'ted (C) ado'ting laws (%) ha$ing laws ado't &. _____ s#eleton of an insect is on the outside of its body. (A) 6ts (B) That the (C) There is a (%) The (. )enses _____ are used to correct im'erfection in eyesight. (A) are the forms of glasses and contact lenses (B) in the form of glasses and contact lenses (C) glasses and contact lenses which form (%) glasses and contact lenses may be formed /. 6n eighteenth2century !orth American 'rinted engra$ings 'ro$ided____ rococo style. (A) the most manifestation wides'read (B) manifestation wides'read the most (C) the wides'read manifestation most (%) the most wides'read manifestation -. 6n the Arctic tundra ice fog may form under clear s#ies in winter ____ coastal fogs or low stratus clouds are common in summer. (A) because of (B) whereas (C) des'ite (%) that .. +n attaining maximum si9e ___ by drawing itself out and di$iding into two daughter amoebas each recei$ing identical nuclear materials. (A) the re'roduction of the amoeba (B) the amoeba which re'roduces (C) re'roducing the amoeba (%) the amoeba re'roduced ,. <or the ad$ertiser one of the greatest a''eals of radio is ____ an audience all day long. (A) that it has 208 (B) that to ha$e (C) to ha$e it (%) ha$ing it 5. Charles 7chul94s comic stri' E=eanuts F features children who ma#e ____ about life. (A) funny wise statement that (B) which funny wise statements (C) statements are funny but wise (%) funny but wise statements 18. +ne of the ma0or ri$ers of the western ;nited 7tates ____ flows for some 1 /888 miles from Colorado to northwestern >exico. (A) it is the Colorado @i$er (B) the Colorado @i$er which (C) and the Colorado @i$er (%) the Colorado @i$er 11. 6n art the tendency of gouache colors to lighten on drying ma#es ___ a wide range of 'early or 'aste2li#e effects. (A) it is 'ossible (B) 'ossible (C) 'ossible to be (%) it 'ossible the 12. 6sabel Bisho' was one of many American artists ___ by the go$ernment during the %e'ression years on $arious federal art 'ro0ects. (A) em'loyed (B) whose em'loyment (C) to em'loy (%) had been em'loyed 1&. +utbrea#s of diseases in trees commonly occur _____ stressed because of drought or other en$ironmental factors. (A) as forests that become (B) in forests become (C) that become forests (%) when forests become 1(. To brea# thic# ice an icebrea#er boat mo$es fast enough to ride u' on the ice ____ under its weight. (A) so then brea#s (B) when brea#s it (C) which then brea#s (%) for which then brea#s 1/. Cholesterol is 'resent in large 1uantities in the ner$ous system where ____ com'ound of myelin. (A) it a (B) a 209 (C) being (%) it is a 1-. =ainters of the early twentieth century who were #nown 'rimarily for they colorful landsca'es the ?rou' of 7e$en changed is name to the Canadian ?rou' of =ainters in 15&&. 1.. >ost animals ha$e ner$ous systems sense organs and s'eciali9ed modes of locomotion and are ca'able of securing ingesting and to digest food. 1,. The cor# oa# tree has a layer of cor# se$eral inches thic#ness that can be stri''ed e$ery ten years. 15. 6nflation interest rates and o$erall economic acti$e can be go$erned by the ;nited 7tates <ederal @eser$e4s decision to ad0ust the su''ly of money to the economy. 28. <ree radicals of oxygen which common by2'roducts of metabolic 'rocesses in the body are ca'able of causing tissue damage. 21. By 1,&8 the glass industry in the ;nited 7tates had become too well established that the country no longer needed to de'end on im'orted glass. 22. <ree land chea'ly trans'ortation and 'owerfully 'ersuasi$e railroad ad$ertising all hel'ed flood the western 'art of the ;nited 7tates with farmers in the nineteenth century. 2&. Coral formations ha$e #nown as fringing reefs are located close to shore se'arated from land only by shallow water. 2(. <or a seagoing cargo2carrying sailing $essels the cli''er shi' was remar#ably fast. 2/. Cisibly only through large telesco'es =luto has a yellowish color which indicates that there is $ery little atmos'here. 2-. %iamond is the hardest #nown substance so diamonds can be cut only by another diamonds. 210 2.. The 6nternational >onetary <und was created in a effort to stabili9e exchange rates without interfering with the healthy growth of trade. 2,. Butterflies and moths undergo com'lete metamor'hosis them changing from cater'illar to adult $ia one intermediate stage the 'u'a. 25. Thousands of meteorite hit "arth each year but most fall into the sea or in remote areas and are ne$er reco$ered. &8. Alas#a become the forty2ninth state in 15/5 and 3awaii became the fiftieth state lately that year. &1. A s'onge feeds itself by drawing water through tiny 'ores on its surface filtering out food 'articles and then ex'el the water through larger $ents. &2. Toward the end of his life Dohn 7inger 7argent returned to the 'ainting of landsca'es and the use of watercolors of which he excelled. &&. =ythons differ than most other sna#es by ha$ing two well de$elo'ed lungs rather than a much smaller left lung or no left lung at all. &(. *eighing among two to fi$e #ilograms in adults the s#in is the largest organ of the human body. &/. @odents dwell in $arious habitat some s'ecies being a1uatic some terrestrial. &-. The nectar of flowers are ingested by wor#er bees and con$erted to honey in s'ecial sacs in their digesti$e systems. &.. )ucid dreaming the ability dreamers to become aware of and to control their dreams while dreaming is the focus of some current 'sychological research. &,. The sensation of sound is 'roduced how $ibrations transmitted through the air stri#e the eardrum. &5. The musical tone of an electric guitar is created not by the resonance of the body of the guitar but by electronically am'lification. 211 (8. Considered one of the most beautiful of the fine art ballet is a combination of dance and mime 'erformed to music. 212 2000 10 1The role of the ear is ____ acoustic disturbances into neural signals suitable for transmission to the brain. (A) to code (B) so that coded (C) coded (%) it coding 2. The imagist mo$ement in 'oetry arose during the second decade of the twentieth century ____against romanticism. (A) when a re$olt (B) as a re$olt (C) a re$olt was (%) that a re$olt &. Cirtually ____ s'ecies ha$e biological cloc#s that regulate their metabolism o$er a 2(2hour 'eriod. (A) all there are (B) all (C) all are (%) they all (. According to ;nited 7tates criminal law insanity may relie$e a 'erson from the usual legal conse1uences____. (A) what his or her acts ha$e (B) of his or her acts are (c ) of his or her acts (%) what of his or her acts /. 6n addition to ____a 'lace where business deals are made a stoc# exchange collects statistics 'ublishes 'rices 1uotations and sets rules and standards for trading. (A) being (B) it is (C ) that which (%) where is -. The first inhabitants of the territories ____Canada came across the Bering 7trait and along the edge of the Arctic ice. (A) ma#e u' that now (B) ma#e u' now that (C ) that ma#e u' now (%) that now ma#e u' ..____ need for new schools following the 7econd *orld *ar that 'ro$ided the sustained thrust for the architectural 'rogram in Columbus 6ndiana. (A) 7ince the (B) To be the (C ) The (%) 6t was the ,. The soybean contains $itamins essential minerals ____high 'ercentage of 'rotein. (A) a (B) and a (C ) since a (%) of which a 5. 3ail is formed when a dro' of rain is carried by an u'draft to an altitude where ____ to free9e it. 213 (A) is the air cold enough (B) the air cold enough (C ) the cold enough air (%) the air is cold enough 18. ?eometrically the hy'erbolic functions are related to the hy'erbola ____ the trigonometric functions are related to the circle. (A) 0ust as (B) same (c ) similar to (%) and similar 11. ____ Jilauea is one of the world4s most acti$e $olcanoes ha$ing eru'ted do9ens of times since 15/2. (A) The big island of 3awaii4s location (B) )ocates the big island of 3awaii (C ) )ocated on the big island of 3awaii (%) +n the big island of 3awaii4s location 12. !ot until the eighteenth century ____ the com'lex chemistry of metallurgy. (A) when scientists began to a''reciate (B) did scientists begin to a''reciate (C )scientists who were beginning to a''reciate (%) the a''reciation of scientists began 1&. ____ 1,18 water2'owered textile manufacturing arri$ed in !ew 3am'shire with the founding of a com'any in >anchester that manufactured cotton and wool. (A) "arly (B) 6n the early (C ) As early as (%) *hen early 1(. The settings of "udora *elty4s stories may be rather limited but ____about human nature is 1uite broad. (A) ex'oses (B) ex'oses that (C ) she ex'oses (%) what she ex'oses 1/. )ichens grow extremely well in $ery cold 'arts of the world ____'lants can sur$i$e. (A) where few other (B) few others (C ) where do few others (%) there are few others 1-The 'ear tree has sim'le o$al lea$es that are smoother and shinier than them of the a''le. 1.6n the orbit of a 'lanet around the 7un the 'oint closest to the 7un is called it the 'erihelion. 1,6n the early 15884s @oy 3arris created and 'romoted a distinctly American style of classical music and greatly influenced a number of com'oser in the ;nited 7tates. 214 15The eighteenth century witnessed the emergence of !orth American 'orts 'articular Boston !ew Bor# and =hiladel'hia as ma0or commercial centers within the British em'ire. 28?uitarli#e instruments ha$e exist since ancient times but the first written mention of the guitar itself is from the fourteenth century. 21The law of biogenesis is the 'rinci'le what all li$ing organisms are deri$ed from a 'arent or 'arents. 22+nyx is a mineral that can be recogni9ed its regular and straight 'arallel bands of white blac# or brown. 2&There are as many as 288 million insects for e$ery human beings and in fact their total number exceeds that of all other animals ta#en together. 2(!ati$e to 7outh America and culti$ated there for thousands of years the 'eanut is said to ha$e introduced to !orth America by early ex'lorers. 2/+riginally canoes were made by the hollowing out of logs and used were for combat as well as trans'ort. 2-Among the sym'toms of measles which ta#es about twel$e days to incubate are a high fe$er swelling of glands in the nec# a cough and sensiti$e to light. 2.6ce crystals in a glacier tends to melt and recrystalli9e within a brief moment of tra$el on a downhill glide. 2,=hotogra'h was re$olutioni9ed in 1,/1 by the introduction of the collodion 'rocess for ma#ing glass negati$es. 25The 'iano is a stringed musical instrument in which the strings are stri#e by felt2co$ered hammers controlled by a board. 215 &8The sounds used in human languages to create meaning consist of small $ariation in air 'ressure can be sensed by the ear. &1The mountains es'ecially the @oc#y >ountains formerly constituted a seriously barrier to east2 west trade in British Columbia. &2Telesco'e are fre1uently used in astronomy to collect light from a celestial ob0ect bring the light into focus and 'roducing a magnified image. &&%iamond is the hardest #nown substance so diamond can be cut only by another diamonds. &(There are about &/8 s'ecies and subs'ecies of birds in danger of become extinct with a large number of them 11. in all found on oceanic islands. &/The nineteenth2century romantic mo$ement in art was 'artially a reaction to what was 'ercei$ed as o$erem'hasis on reasonable and order in neoclassicism. &-)i#e triglycerides cholesterol is a ty'e of fat that is both consumed in the diet but manufactured by the body. &.Both the ;nited 7tates sil$er dollar and half2dollar first minted in 1.5( had a figure of )iberty on one side and a eagle on the re$erse side. &,<or an ad$ertisement to be effecti$e its 'roduction and 'lacement must to be based on a #nowledge of human nature and a s#illed use of the media. &5*hile 'hotosynthesis in green 'lants light energy is ca'tured and used to con$ert water carbon dioxide and minerals into oxygen and energy2rich organic com'ounds. (8The %emocratic =arty the most oldest existing 'olitical 'arty in the ;nited 7tates has 'layed a $ital role in the nation4s history. 216 2001 01 1. A three2foot octo'us can crawl through a hole 222222 in diameter. (A) than one inch less (B) less than one inch (C) one less inch than (%) than less one inch 2. 222222ado'ted the decimal system of coinage in 1,-.. (A) Canada (B) *hen Canada (C) Canada which (%) There was Canada &. ?enerally the re'resentati$es 222222 a legislature are constitutionally elected by a broad s'ectrum of the 'o'ulation. (A) who they com'ose (B) who com'ose (C) and com'ose (%) com'ose (. The Actor4s 7tudio a 'rofessional actors4 wor#sho' in !ew Bor# City 'ro$ides 222222where actors can wor# together without the 'ressure of commercial 'roduction. (A) a 'lace and (B) a 'lace (C) so that a 'lace (%) a 'lace is /. 222222 that life began billions of years ago in the water. (A) 6t is belie$ed (B) 6n the belief (C) The belief (%) Belie$ing -. By 1,.2 the ;nited 7tates had .8 engineering colleges 222222 astonishing ex'ansion credited largely to the >orrill Act of 1,-2. (A) because (B) an (C) to which (%) was .. The artist @omare Bcarden was 222222 whose yellows dee' blues and fuchsias contrasted strongly with 'hotogra'hic gray in his bright collages. (A) with a gift for color (B) a gifted colorist (C) a gift with colorful (%) gifted with coloring (A) with a gift for color K ,. The most im'ortant chemical catalyst on this 'lanet is chloro'hyll 2222222carbon dioxide and water react to form carbohydrates. (A) whose 'resence (B) which is 'resent (C) 'resenting (%) in the 'resence of which 5. +ne theory of the origin of the uni$erse is 2222222from the ex'losion of a tiny extremely dense fireball 217 se$eral billion years ago. (A)because what formed (B)the formation that (C) that it formed (%) when forming 18. @oads in the ;nited 7tates remained crude 2222222 with gra$ed or wood 'lan#s until the beginning of the twentieth century. (A) were unsurefaced or they co$ered them (B) which unsureface or co$ered (C) unsurfaced or co$ered them (%) unsurfaced or co$ered 11. =ortrait 'rints were the first re'roductions of American 'aintings 2222222 widely distributed in the ;nited 7tates. (A) were (B) that which (C) that being (%) to be 12. Abigail Adams was 'rodigious letter writer 2222222 many editions of her letters ha$e been 'ublished. (A) who (B) and (C) in addition to (%) due to 1&. 6n geometry an elli'se may be defined as the locus of all 'oints 2222222distances from two fixed 'oints is constant. (A) which as the sum of (B) of the sum which (C) the sum of whose (%) whose sum that the 1(.2222222at the site of a fort established by the !orthwest >ounted =olice Calgary is now one of Canada4s fastest growing cities. (A) Built (B) 6t is built (C) To build (%) 3a$ing built 1/. An image on a national flag can symboli9e 'olitical ideals that 2222222ex'ress. (A) ta#e many words to otherwise would. (B) would ta#e to many otherwise words (C) many words to ta#e would otherwise m%nwould otherwise ta#e many words to (A) (B) (C) 1-. A $ariation of collodion 'hotogra'hy was the tinty'e which ca'tured images on a blac# or dar# brown metal 'late instead from on glass. 1.. 6n cases of minor in0ury to the brain. Amnesia is li#ely to be a tem'orarily condition. 1,. The system of chemical symbols first de$ised about 1,88. gi$es a concise and instantly recogni9able descri'tion of a element or com'ound. 218 15. The fact that white light is light com'osed of $arious wa$elengths may be demonstrating by dis'ersing a beam of such light through a 'rism. 28. +$er the course of history much ci$ili9ations de$elo'ed their own !umber systems. 21. 6n the ;nited 7tates during the 7econd *orld *ar each trade unions and em'loyers a$oided federal limits on wages by offering em'loyees !ontaxable medical benefits. 22. =hiloso'hy is the study of the nature of reality #nowledge existent and ethics by means of rational in1uiry. 2&. =oems $ary in length from brief lyric 'oems to narrati$e or e'ic 'oems *hich can be as broad in sco'e than a no$el. 2(. The 'o'ulation of California more than doubled during the 'eriod 15(8215-8 creating 'roblems in road2building and 'ro$ide water for its arid southern section. 2/. Although based it on feudal models the colony of =ennsyl$ania de$elo'ed a re'utation for a 'rogressi$e 'olitical and social outloo#. 2-. 3ard and resistant to corrosion bron9e is traditionally used in bell casting and is the material used widely most for metal scul'ture. 2.. The A''alachian >ountains formation a natural barrier between the eastern seaboard and the $ast lowlands of the continental interior of !orth America. 2,. The ;nited 7tates census for 15.8 showed that the <rench2s'ea#ing residents of )ouisiana were one of the country4s most com'act regional linguistic minority. 25. *hen used as food additi$es antioxidants 're$ent fats and oils from become rancid when ex'osed to air and thus extend their shelf life. 219 &1. Co''er was the first metallic used by humans and is second only to iron in its utility through the ages. &2. %es'ite the fact that lemurs are general nocturnal the ring2tailed lemur tra$els by day in bands of four to twel$e indi$iduals. &&. The *estern world is beset with the range of 'roblem that characteri9e mature 'ostindustrial societies. &(. Acrylic 'aints are either a''lied using a #nife or diluted and s'reading with a 'aintbrush. &/. 7ome marine in$ertebrates such as the sea urchin and the starfish migrates from dee' water to shallow during s'ring and early summer to s'awn. &-. >arshes wetland areas characteri9ed by 'lant grassy growth are distinguished from swam's wetlands where trees grow. &.. *am'um beads used as a form of exchange by some !ati$e Americans was made of bits of seashells cut drill and strung into belts. &,. Jangaroos use their long and 'owerful tails for balance themsel$es when sitting u'right or 0um'ing. &5. =ro'er city 'lanning 'ro$ides for the distribution of 'ublic utilities 'ublic buildings 'ar#s and recreation centers and for ade1uate and the inex'ensi$e housing. (8. >ost traditional dances are made u' of a 'rearranged series of ste's and mo$ements but modern dancers are generally free to mo$e as they choice. 220 2001 05 1. The giant ragweed or buffalo weed grows _____. (A) 1, feet u' to high (B) to high 1, feet u' (C) u' to 1, feet high (%) 1, feet high u' to 2. !e'tune is _____ any 'lanet exce't =luto. (A) to be far from the 7un (B) far from the 7un being (C) farther than the 7un is (%) farther from the 7un than &. 7ince 'rehistoric times artists ha$e arranged 'aint on surfaces in ways _____ their ideas about 'eo'le and the world. (A) ex'ress (B) that their ex'ression of (C) which ex'ressing (%) that ex'ress (. "xce't for certain microorganisms _____ need oxygen to sur$i$e. (A) of all li$ing things (B) all li$ing things (C) all are li$ing things (%) are all li$ing things /. %ubbing is used in filmma#ing _____ a new sound trac# to a motion 'icture. (A) which to add (B) to add (C) is adding that (%) to add while -. _____ of green lumber may come from moisture in the wood. (A) >ore weight than half (B) +f the weight more than half (C) The weight is more than half (%) >ore than half of the weight .. Archaeologists study _____ to trace ancient trade routes because such tools are relati$ely rare and each occurrence has a slightly different chemical com'osition. (A) which obsidian tools (B) obsidian tools (C) how obsidian tools (%) obsidian tools are ,. _____ the hamster4s basic diet is $egetarian some hamsters also eat insects. (A) %es'ite (B) Although (C) @egardless of (%) Conse1uently 5. The !a$a0o 6ndians of the southwestern ;nited 7tates _____ for their sand 'ainting also called dry 'ainting. (A) noted (B) are noted (C) to be noted 221 (%) ha$e noted 18. 6n 1.,( the leaders of what would later become the state of Cirginia ga$e u'_____ to the territory that later became fi$e different >idwestern states. (A) any claim (B) when the claim (C) to claim (%) would claim 11. _____ one after another 'arallel com'uters 'erform grou's of o'erations at the same time. (A) Con$entional com'uters by handling tas#s (B) 7ince tas#s being handled by con$entional com'uters (C) *hereas con$entional com'uters handle tas#s (%) *hile tas#s handled by con$entional com'uters 12. The )iberty Bell formerly housed in 6nde'endence 3all _____ in =hiladel'hia was mo$ed to a se'arate glass 'a$ilion in 15.-. (A) which a historic building (B) a historic building which (C) was a historic building (%) a historic building 1&. <ossils traces of dead organisms found in the roc#s of "arth4s crust re$eal _____ at the time the roc#s were formed. (A) what was li#e (B) was li#e life (C) what life was li#e (%) life was li#e 1(. Although the huge ice masses _____ glaciers mo$e slowly they are a 'owerful erosi$e force in nature. (A) call them (B) are called (C) to call (%) called 1/. The soybean contains $itamins essential minerals _____ high 'ercentage of 'rotein. (A) a (B) and a (C) since a (%) of which a 1-. A gene is a biological unit of information who directs the acti$ity of a cell or organism during its lifetime. 1.. The flowering of African American talent in literature music and art in the 15284s in !ew Bor# City became to #now as the 3arlem @enaissance. 1,. The sym'toms of neumonia a lung infection include high fe$er chest 'ain breathing difficult and coughing. 222 15. The ra'id grow of Boston during the mid2nineteenth century coincided with a large influx of "uro'ean immigrants. 28. 6n 158, +li$e Cam'bell started writing down fol# songs by rural 'eo'le in the southern A''alachian mountains near hers home. 21. The thirteen stri'es of the ;nited 7tates flag re'resent the original thirteen states of the ;nion which they all were once colonies of Britain. 22.6n 1,-8 more as 58 'ercent of the 'eo'le of 6ndiana li$ed rural areas with only a few cities ha$ing a 'o'ulation exceeding 18 888. 2&.?ra$itation #ee's the >oon in orbit around "arth and the 'lanets other of the solar system in orbit around the 7un. 2(.=hotogra'h was re$olutioni9ed in 1,&1 by the introduction of the collodion 'rocess for ma#ing glass negati$es. 2/. After flax is washed dry beaten and combed fibers are obtained for use in ma#ing fabric. 2-. A fe$er is caused which blood cells release 'roteins called 'yrogens raising the body4s tem'erature. 2.. Because of $arious gift2gi$ing holidays most stores clothing in the ;nited 7ates do almost as much business in !o$ember and %ecember as they do in the other ten months combined. 2,. The ;nited 7tates !ational )abor @elations Board is authori9ed to in$estigation allegations of unfair labor 'ractices on the 'art of either em'loyers or em'loyees. 25. The ?reat =otato <amine in 6reland in the 1,(84s caused an un'recedented numbers of 'eo'le from 6reland to immigrate to the ;nited 7tates. 223 &8.The 'articles com'rising a gi$en cloud are continually changing as new ones are added while others are ta#ing away by mo$ing air. &1. =olitical 'arties in the ;nited 7tates hel' to coordinate the cam'aigns of their members and organi9es the statewide and nationa con$entions that mar# election years. &2. The lemur is an unusual animal belonging to the same order than mon4s and a'es. &&. Cheese may be hard or soft de'ending on the amount of water left into it and the character of the cuting. &(. The carbon2are lam' a $ery bright electric lam' used for s'otlights consists of two carbon electrodes with a high2current arc 'assing between it. &/. At first the 'oems of ".". Cummings gained notoriety to their idiosyncratic 'unctuation and ty'ogra'hy but they ha$e gradually been recogni9ed for their lyric 'ower as well. &-. The mechanism of human thought and recall a sub0ect only 'artly understood by scientists is extraordinary com'licated. &.. *hile the 'rocess of 'hotosynthesis in green 'lants light energy is ca'tured and used to con$ert water carbon dioxide and minerals into oxygen and organic com'ounds. &,.The globe articho#e was #nown as a delicacy at least 2 /88 years ago and records of its culti$ation date from fifteenth century. &5. 3umans do not constitute the only s'ecies endowed with intelligenceL the higher animals also ha$e considerably 'roblem2sol$ing abilities. (8. >any of s'ecies of mil#weed are among the most dangerous of 'oisonous 'lants while others ha$e little if any toxicity. L7ome cleaned the windows others mo''ed the floor. X X 224 2001 08 1. ?eothermal energy is a 'otentially inexhaustible energy source ______been ta''ed by humans for centuries but until recent years only on a small scale. (A) has it (B) has (C) that has (%) that it has 2. The im'ortance of the hand and more generally of the body in children4s ac1uisition of arithmetic_____. (A) can hardly be exaggerated (B) hardly exaggerated can be (C) can be exaggerate hardly (%) exaggerated can be hardly &. ______ is 'resent in the body in greater amounts than any other mineral. (A) Calcium (B) There is calcium (C) Calcium which (%) 6t is calcium m%n*B (. _______ the e$idence is inconclusi$e it is thought that at least some seals ha$e an echolocation system a#in to that of bats 'or'oises and shrews. (A) @ather (B) %es'ite (C) Although (%) *hy /. The total mass of all asteroids in the solar system is much less ______ mass of "arth4s >oon. (A) than that is the (B) than the (C) the (%) is the -. )i#e bacteria 'roto9oans _______by s'litting in two. (A) re'roducing (B) re'roduce (C) to re'roduce (%) re'roduction .. ______main 'rocesses in$ol$ed in $irtually all manufacturingL extraction assembly and alteration. (A) There are three (B) Three (C) The three (%) Three of the 225 ,. >ost documentary filmma#ers use neither actors _______studio setting. (A) or else (B) but not (C) nor (%) and 5. 7alamanders are sometime confused with li9ards but unli#e li9ards ________no scales or claws. (A) that they ha$e (B) to ha$e (C) they ha$e (%) are ha$ing 18. The 'ro$ince of Alberta lies along three of the ma0or !orth American flyways ;sed by birds _______between their winter and summer homes. (A) the migration (B) migrating (C) migrate (%) and migrate 11. Astronomers estimate ______called the =leiades in the constellation Taurus is (1/ light2years away from "arth. (A) that a loose cluster of stars (B) a loose cluster of stars is (C) that is a loose cluster of stars (%) there is a loose cluster of stars 12. =earl 7ydenstric#er Buc# _____ the !obel =ri9e for )iterature in 15&, is Best #nown for her no$els about China. (A) won (B) winner of (C) to win (%) who the winner of 1&. 7tage 'roducers Jlaw and "rlanger were the first to eliminate arguments among leading 'erformers _______in order of a''earance instead of 'rominence. (A) of whom list the 'rogram (B) the 'rogram listing (C) for them the 'rogram listed (%) by listing them on the 'rogram 1(. %uring the decades after the ;nited 7tates Ci$il *ar a host of technical ad$ances made 'ossible ______and uniformity of railroad ser$ice. (A) a new integration (B) for a new integration (C) that a new integration (%) and a new integration 1/. <orests stabili9e _____and retain 'reci'itation thereby hel'ing to 're$ent erosion and regulate 226 the flow of streams. (A) to the soil (B) the soil (C) where the soil (%) the soil is 1-. >odern societies are such com'lex that they could not exist without a well2de$elo'ed system of law. 1,. The bathysca'he a free2mo$ing $essel designed for underwater ex'loration consists of a <lotation com'artment with a obser$ation ca'sule attached underneath it. 15. *ater constitutes almost 5- 'ercent of the body weight of a 0ellyfish so if a 0ellyfish were to dry out in the sun it would $irtually disa''eared. 28. The most im'ortant 'arameters affecting a roc#et4s maximum flight $elocity is the relationshi' between the $ehicle4s mass and the amount 21.There were once only eight ma0or la#es or reser$oirs in Texas but today there are o$er 1,8 many built to storing water against 'eriodic droughts. 22. All harmoni9ed music that is not contra'untal de'ends from the relationshi' of chords which are either consonant or dissonant. 2&. "x'ressionist drama often shows the influence of modern 'sychology by reflecting the frustrations inner of the dramatist. 2(. 6t is the number #ind and arrange of teeth that determine whether a mammal is classified as a carni$ore not the food that the animal actually eats. 2/. The sea otter is well ada'ted at its marine existence with ears and nostrils that can be closed under water. 2-. =etroleum which currently ma#es u' about four2tenths of the world4s energy 'roduction su''lies more commercial energy than any another source. 227 2.. 7omeone may refuse to recogni9e the seriousness of an emotionally threatening situation and 'ercei$e as less threatening. 2,. Through ex'eriments with marine organisms marine biologists can increase our #nowledge of human re'roducti$e and de$elo'ment as well as our understanding of the ner$ous system. 25. *hen swollen by melting snow or hea$y rain some ri$ers routinely o$erflow its ban#s. &8. 6n 1,,( Bel$a )oc#wood a lawyer who had a''eared before the 7u'reme Court became the first woman was nominated for =resident of the ;nited 7tates. &2. =hysicists ha$e #nown since the early nineteenth century that all matter is made u' of tiny extremely 'articles called atoms. &&. @ain is slight acidic e$en in un'olluted air because carbon dioxide in the atmos'here and other natural acid2forming gases dissol$e in the water. &(. 6n a stoc# com'any a trou'e of actors 'erforms in a 'articular theater 'resenting 'lays from its re'ertory of 're'are 'roductions. &/. "stablished in 1,-8 the ?o$ernment =rinting +ffice 'rints and binds documents for all de'artment of the ;nited 7tates go$ernment. &-. "thnology usually considered a branch of cultural anthro'ology is often defined as the scientifically study of the origin and functioning &.. The one2fluid theory of electricity was 'ro'osing by Ben0amin <ran#lin a man famous for his wide interests and great attainments. &,. =robably not s'eech of so few words has e$er been as celebrated as )incoln4s ?ettysburg Address. 228 &5. ?enerally Abstract "x'ressionist art is without recogni9able images and does not adhere the )imits of con$entional form. (8. Although com'lete 'aralysis is rare with neuritis some degree of muscle wea#ness common. 229 2001 10 1.>ost geologists belie$e __from the remains of tiny marine 'lants and animals that died millions of years ago. (A) what was formed 'etroleum (B) that 'etroleum was formed (C) when 'etroleum formed (%) 'etroleum that formed learn mean #now 2.The seat of <rance4s !orth American holdings in the eighteenth century was Huebec and the <rench heritage __dominant there. (A)to remain (B)remaining (C)by remaining (%)has remained &.6f "arth did not rotate differences in air 'ressure would be __ with winds blowing from high2'ressure to low2'ressure areas. (A)'rimary air flow to cause (B)the 'rimary cause of air flow (C)they 'rimarily cause air flow (%)air flow has a 'rimary cause (.A mobile is a scul'ture constructed of 'arts so delicately connected and balanced __the entire sus'ended structure may be mo$ed by $ibration or manual mani'ulation. (A)in order (B)ma#ing (C)with (%)that /.The ice or a glacier that reaches the sea brea#s off__ (A)and forming icebergs (B)to form icebergs (C)icebergs ha$e2formed (%)when the formation of icebergs [ B -.>igraine headaches are more fre1uent among women __among men. (A)than (B)howe$er (C)exce't for (%)as are ..7outh American flamingos can sur$i$e in tem'eratures __abo$e the free9ing 'oint. (A)that fewer degrees (B)if few degrees (C)only a few degrees (%)when fewer degrees ,.>ade of hard wood the boomerang is roughly C2sha'ed with arms __s#ewed. (A)of slightly (B)are slightly (C)slightly (%)that those are slightly 5.!ot until the late nineteenth and early twentieth centuries __as a unified science. (A)did ecology emerge 230 (B)when ecology emerged (C)ecology emerged (%)when did ecology emerge only....but also neither nor seldom hardly rarely scarcely in no way on no account under no 18.The ancient "gy'tian water cloc# re1uired so'histicated calibration since water dri''ed faster from its bowl when __and the 'ressure was greater. (A)the full bowl (B)was the bowl full (C)bowl full (%)the bowl was full 11."nid +#lahoma __a sto''ing 'lace on the Chisholm Trail in the 1,884s is now the site of the fourth largest wheat storage s'ace in the world. (A)originally (B)which originally (C)was originally (%)originally where 12.The common barn owl one of ten s'ecies of barn owls found in !orth America is also called the mon2faced owl because its heart2sha'ed face loo#s __of a mon. (A)li#e much that (B)li#e that much (C)much li#e that (%)that much li#e 1&.All the 'lanets in the solar system exce't >ercury and Cenus ha$e natural satellites __ob0ects that re$ol$e around the 'lanets. (A)which (B)which are (C)of which (%)and which 1(.7ome subsistence acti$ities such as hunting large animals or netting fish re1uire __to wor# together. (A)grou's are (B)grou's which (C)grou's (%)that grou's 1/.The "x'ressionistic artist was concerned not with the reality of the sub0ect matter but with __inner nature and the emotions that it aroused. (A)it has (B)its (C)what its (%)is it whether 1-By the end of the nineteenth century organic chemistry had de$elo' new methods for the synthesis of dyes 'erfumes ex'losi$es and medicines. 1.The %inee a !ati$e American 'eo'le of the southwestern ;nited 7tates were once seminomadic hunters who 'racticed a few agriculture. 1,The earliest successful sewing machines were 'owered by turn a hand cran#. 231 15"arly signs characteristic of the acute 'hase of $iral he'atitis in adults are abdominal 'ain nausea and fe$erish often accom'anied by chills. 28The ?uggenheim >useum in !ew Bor# City is one of the ma0or center for the collection and dis'lay of wor#s of abstract art in the ;nited 7tate. 21*ith the disco$ery of gold in the Jlondi#e in Canada4s Bu#on Territory in 1,5- 'eo'le floc#ed soon there from all 'arts of the world. 22The right side of the brain is mostly concerned with 'ictorial intuiti$e musically and s'atial ablilities. 2&A uniform mingling of molecules which it occurs in homogeneous chemical com'ounds results from the chemical constituents melting dissol$ing or diffusing into one another. 2(>any dinosaurs were so much hea$y that they s'ent most of their li$es in swam's and shallow la#es where water could su''ort them. 2/*ith little nor no mass and no electric charge neutrinos can 'enetrate a solid ob0ect such as the "arth as if it were not there. 2-?eorgia +4Jeeffe is #nown for hers use of organic abstract forms 'ainted in clear strong colors. 2.;ntil the ?eorge *ashington Bridge was built modern sus'ension bridges were stiffened with steel trusses and beams to limited their motion in traffic and wind. 2,<irst re'orted by 7'anish ex'lorers in 1.5- the as'halt in California4s )a Brea Tar =it was mined commercial for many years. 256nde'endence 'olitical of news'a'ers became a common feature of 0ournalism in the ;nited 7tates of the 1,(84s and 1,/84s. 232 &8Transistors exhibit a high am'lification factor o'erate without distorted o$er a wide fre1uency range and can be made extremely small. &16n most cases of e'ile'sy cerebral electrical acti$ity also #nown as brain wa$es demonstrates a characteristically abnormal rhythms. &2!ew Bor# City4s theatrical district was concentrated the Bowery from 1,-8 to 1,./ and around 1588 the a$enue became a center for the Biddish theater. &&>ost female li9ards lay eggs but the females of a number of li9ard s'ecies bear her young ali$e. &(@ecently archaeologists ha$e stri$ed to de$elo' theories based on archaeological e$ident that ex'lain societal changes such as the de$elo'ment of farming.. &/+ne of the most im'ressi$e cultural achie$ements of the ;nited 7tate during the 15284s was a $astly out'ouring of serious literature. &-The chemical element chlorine is a corrosi$e greenish2yellow gas that has shar' odor and has 21S2 times hea$ier than air. &.3air grows more 1uic#ly in summer than in winter and more slowly at the night than during the day. &,%ifferent fourteen cro's were being grown , -88 years ago by some of the world4s earliest farmers. &5Between 158/ and 158. floodwaters from the Colorado @i$er 'oured into a salt2co$ered de'ression and creating the 7alton 7ea. (87aturn ta#es almost &8 "arth years to ma#e one tri' around the 7un during Du'iter ta#es about twel$e "arth years to com'lete one solar re$olution. 233 2002 01 1.*hen __ from mil# the remainder is called s#im mil#. (A)all the butterfat is remo$ed (B)remo$ing all the butterfat that (C)is all the butterfat remo$ed (%)the remo$al of all the butterfat 2.The Buffalo @i$er in Ar#ansas was designated __ in 15.2. (A)a national ri$er and (B)which a national ri$er (C)a national ri$er (%)being a national ri$er &.>uch of northern Canada lies within the Arctic Circle and __ ice or the s'arse $egetation #nown as tundra. (A)it is 'ermanently co$ered by (B)by 'ermanently it is co$ered (C)is 'ermanently co$ered by it (%)it is co$ered by 'ermanently (.>ani'ulation of the s'inal column massage and dietary ad0ustments __ used in chiro'ractic thera'y. (A)the 'rinci'al methods are (B)are the 'rinci'al methods (C)how are the 'rinci'al methods (%)are there the 'rinci'al methods /.?iant cor'orations __ to dominate the ;nited 7tates economy in the late nineteenth century grew steadily larger during the 1528T. (A)which began (B)in which began (C)they began (%)which they began -.The tradition of the bowhead whale hunt __ bac# a thousand years and is a $ital 'art of 6nuit culture. (A)goes (B)if it goes (C)gone (%)that went ..__ the son of an im'o$erished farmer was born on )ong 6sland. (A)The 'oet was *alt *hitman (B)*hen the 'oet *alt *hitman (C)The 'oet *alt *hitman (%)That the 'oet *alt *hitman ,.The 'rimary digesti$e function of the throat and eso'hagus is __ swallowed materials from the mouth to the stomach. (A)to trans'ort (B)trans'orted 234 (C)for trans'ortation (%)that trans'orted 5.6nsulin is manufactured by s'eciali9ed cells in the 'ancreas and released __ glucose reaches a certain concentration in the bloodstream. (A)which (B)whene$er (C)how (%)during 18.+ne of the basic 'rinci'les of wildlife conser$ation in$ol$es __ ade1uate natural food and shelter to maintain 'o'ulations of each s'ecies in a gi$en habitat. (A)the 'ro$ision (B)that 'ro$ision (C)to 'ro$ide (%)'ro$iding 11.6n 15.( the s'ace 'robe >ariner 18 disco$ered __ >ercury4s surface is cratered by meteorite im'acts. (A)that the 'lanet (B)of the 'lanet (C)the 'lanet that (%)which 'lanet is 12.6n the diurnal ty'e of tidal oscillation the alternate rise and fall of sea le$el a single high water and a single low water occur __ tidal day. (A)each (B)each of (C)each of the (%)of each (B)ha$e im'ortant decisions (C)that im'ortant decisions (%)concerning im'ortant decisions 1(.By focusing on the interesting __ the significant the 'enny 'ress news'a'ers of the 1,&84s hel'ed to change the conce't of news. (A)which does not necessarily (B)not necessarily (C)was not necessarily (%)nor necessarily being 1/.%ocumentary e$idence su''orts claims that __ the !ew *orld about A% 1888. (A)reached the Ci#ings (B)the Ci#ings reached (C)reaching the Ci#ings (%)the Ci#ings that reached 1-.<og and mist li#e clouds can formed only in the 'resence of dust 'articles. 235 1..The 7'anish claiming title to all of !orth America and established the oldest city in the ;nited 7tates 7t. Augustine <lorida in 1/-/. 15.6t may be argued that genetics the study of heredity and $ariation underwent the most ra'id de$elo'ment of any science biological in the twentieth century. 28.>usic in$ol$es the interaction of three elementsL rhythm melodic and harmony. 21.The >edicare 'rogram was established in 15-/ to hel'ing elderly ;nited 7tates citi9ens 'ay the increasing cost of health care. 22.@esearchers ha$e found subtle neurological differences between the brains of men and women either in 'hysical structure and in the waythey function. 2&.7cientists ha$e traditionally classified 'lants by grou'ing them according to similarities in their o$erall a''ear their internal structure and the form of their re'roducti$e organs. 2(.?eometric figures first a''eared more than 1/ 888 years ago in both 'ractically and decorati$e forms such as sha'es of buildings ca$e 'aintings and decorations on 'ottery. 2/.6n the early nineteenth century the Chero#ee nation of American 6ndians was ado'ted a written constitution based on that of the ;nited 7tates. 2-.The able of writers to 'recisely record obser$ations made about others enables them to include in their wor# a great deal of material outside their own ex'erience. 2..6n Connecticut hundreds of houses dating from the se$enteenth and eighteenth centuries are 'reser$ed by more as 188 local or national historical societies. 2,.6n 1,55 >ary "li9abeth Brown donated hers collection of o$er 288 musical instruments to the >etro'olitan >useum of art. 236 25. <our different ty'es of remembering are ordinarily distinguished by 'sychologistsL recollection recall recogni9e and relearning. &8.3arbors are 'rotected areas of water that can be used the transfer of 'assengers and cargo between shi's shore. &1.<ossil remains re$eal that the farther bac# in time an animal li$ed the smaller than was its brain in 'ro'ortion to the si9e of its s#ull. &2. As do all insects a butterfly has a hard outer co$ering called it an exos#eleton that both su''orts and 'rotects the body. &&.6n the early 15884s =ennsyl$ania4s industries grew ra'idly a growth sometimes accom'anied by dis'utes labor. &(.Also #nown as a mo$ie or a film the motion 'icture is one of the most 'o'ular form of art and entertainment throughout the world. &/.The soil in which coffee is grown must be rich moisture and absorbent enough to acce't water readily but sufficiently loose to allow ra'id drainage. &-.A merger is achie$ed when a com'any 'urchased the 'ro'erty of other firms thus absorbing them into one cor'orate structure that retain its original identity. &..;nder the certain conditions a rainbow a''ears at the end of a rain shower in the 1uarter of the s#y o''osite the 7un. &,. %uring the nineteenth century the molecular theory of matter was de$elo'ed which considered all matter to be com'osed of tiny indi$isible entity called molecules. &5. A cardinal role for 'layers of the lute a stringed instrument are that e$ery note is sustained for as long as 'ossible. (8. 6t was the s'lit of ele$en southern states from the ;nion in 1,-1 that leading to the Ci$il *ar in the ;nited 7tates. 237 2002 05 1.__of pottery is dependent on the dur bi!ity of "! y fter firing. (#)$o % &e (')$he % &ing (())hen to % &e (D)*t is % &ing 2.+ig iron, -rought iron, nd stee! "ont in iron " rbides % de up of __ of " rbon. (#) %ounts re different (')different %ounts th t (()different %ounts (D)-hi"h %ounts re different 3.$he #r"ti" fo. is found throughout the #r"ti", usu !!y on tundr or %ount ins __ the se . (#)by -hi"h ne r (')ne r of (()be" use ne r (D)ne r 4.$he %idge __ to ny of se/er ! spe"ies of s% !! f!ies, refers to %os0uito1!i&e inse"t -ith s!ender -ings nd body, !ong !egs, nd ntenn e. (#)-hi"h ter% pp!ied (') ter% pp!ied (()is ter% pp!ied (D) pp!ied ter% 5. $he f "e is the %ost __ of hu% n being. (#)p rt is distin"t!y (')distin"tion in p rt (()distin"ti/e p rt (D)p rt of distin"tion 6.$he "he%i" ! f "ts __ s by1produ"t of their se r"h for go!d be" %e the b sis for %ode% "he%istry. (#)th t h d been ""u%u! ted by !"he%ists (')-ere ""u%u! ted by !"he%ists (() !"he%ists ""u%u! ting the% (D)h d been ""u%u! ted by !"he%ists 7.$he f!uoros"ope % &es __ for %edi" ! do"tors to /ie- si!houette of the bones nd intern ! org ns of p tient2s body. (#)being possib!e (')possib!y (()it is possib!e (D)it possib!e 238 8.$he se"ond1o!dest "ontinuous!y o""upied go/ernor2s % nsion in the 3nited 4t tes __ 5 "&son, 6ississippi. (#)the !o" tion in (')is the !o" tion (()is !o" ted in (D)!o" ted in 9.# te!e/ision " %er produ"es n i% ge by "on/ening __ re"ei/es into series of bright nd d r& dots. (#) nd it (')it (()-h t it (D)th t it 10.*n so1" !!ed nonfi"tion no/e!s, do"u%ent ry sty!e is "o%bined -ith fi"tion ! te"hni0ues __ "tu ! e/ents nd peop!e. (#)th t they des"ribe (')to des"ribe (() nd in des"ribing (D) re des"ribing 11.6 n gers often re"ei/e "onsider b!e tr ining in the 7te"hni" !8 spe"ts of their 9obs __ /ery !itt!e in the 7peop!e % n ge%ent8 spe"ts. (#)so (')9ust s (()yet (D) nd th t 12.#re s of ferti!e soi! " !!ed de!t s, usu !!y __ re for%ed by %ud deposited t the %outh of ri/er. (#)tri ngu! r in sh pe (')their sh pe is tri ngu! r (()they h /e tri ngu! r sh pe (D)tri ngu! r sh pe 13.$hough respe"ted edu" tor, #!e. nder :r h % 'e!! __ the in/entor of the te!ephone. (#) s is best &no-n (')best &no-n s is (()is best &no-n s (D)best is &no-n s 14. ;ot unti! the <irst )or!d ) r __ to i%pro/e the ro d syste% in the 3nited 4t tes. (#) deter%ined effort - s % de (')% de deter%ined effort (()-hen deter%ined effort - s % de (D)- s deter%ined effort % de 15. =ften in/isib!e, !- ys in %otion, g s is __ of % tter. (#)the st te is %ost energeti" 239 (')st ting the %ost energeti" (()the %ost energeti" st te (D)the st te th t %ost energeti"1-. 7ome fish ha$e whis#ers which are sensory organs used for touching and tasting and which are hel'ful when are they searching for food in sand and mud. 1..Cement is 'roduced commercially by to heat a mixture of limestone and clay in a large slowly rotating cylindrical furnace. 1,.6n addition to a''ro'riating the sub0ect matter of mass culture the 'o' art mo$ement of the 15/84s utili9ed $arious techni1ue of mass 'roduction. 15. =ractical 'roblems limit the ability of astronomers to determine the mass of asteroids who are small 'lanetary bodied orbiting the 7un. 28.An accom'lished saxo'honist and com'oser Dohn Coltrane begun his career 'laying in the big bands of the early 15/84s. 21.Bacteria and similar one2celled organisms re'roduce by cell di$ision each of the daughter cell then beginning a new life as a distinct organism. 22.>any s'ecies of birds that breed in tem'erate latitudes often show 'articular 'atterns of migration while the year. 2&.Huebec the most oldest city in Canada lies on the north ban# of the 7t. )awrence @i$er. 2(.Because of the need to maintain the correct balance of salts and minerals in the water #ee'ing saltwater fish in a1uariums re1uires more wor# that #ee'ing freshwater fish. 2/. Addressing themes that were uni1ue American the 'oet *alt *hitman celebrated the li$es of ordinary 'eo'le. 2-.>any museums ha$e been founded by 'ri$ate benefactors and a few ha$e recei$ed endowments that hel' to su''ort theirs routine o'erations. 240 2..The Bessemer 'rocess for con$erting iron to steel was in$ention of enormous im'ortance because it led to many significant changes in industrial 'rocesses. 2,. =ainters ha$e been 'ortraying the sea for centuries and in the ;nited 7tates a rich tradition of marine 'ainting been de$elo'ed during the nineteenth century. 25.The city of >em'his Tennessee was a im'ortant Confederate military center during the American Ci$il *ar and ser$ed as the tem'orary state ca'ital in 1,-2. &8. Although all sedimentary roc#s contain iron but the de'osits that are richest in iron consist 'redominantly of minerals such as iron oxides carbonates silicates and sulfides. &1.6n the ;nited 7tates the attorney general is a cabinet member in charge with the administration of the %e'artment of Dustice. &2.The Atlantic cable which began to o'erating in 1,-- lin#ed the ;nited 7tates to )ondon and to another cable stretching eastward to 6ndia and beyond. &&. >any fol# songs were originated to accom'any manual wor# or to mar# a s'ecific ceremonies. &(.The shell of the abalone a marine snail is es'ecially suited by its hardness and $arious of colors for the manufacture of 0ewelry. &/.?eraldine <arrar who debuted as an o'era singer in 1581 later a''eared both on stage and in se$eral silent film. &-.The migration of African Americans from the rural 7outh to the industrial !orth in the early 15884s were the biggest internal migration in American history. &..7earching for alternate forms of energy does not necessary mean the abandonment of fossil fuels as an energy source. &,. The flamingo constructs a cylindrical mud nest for its egg which both 'arents care for it. 241 &5. %ue to 'ersistent inbreeding self2'ollinating 'lants ha$e genetically more uniform than cross2 'ollinated 'lants which harbor more genetic $ariability. (8. >eta'hysical 'hiloso'hy is concerned with the 'rinci'les structures and meaningful that underlie all obser$able reality. 242 2002 10 1. Among the (/8 artwor#s in the *hite 3ouse art collection __ (A) as is >ary Cassatt4s Boung >other and Two Children (B) is >ary Cassatt4s Boung >other and Two Children (C) which is >ary Cassatt4s Boung >other and Two Children (%) >ary Cassatt4s Boung >other and Two Children 2. An unconsolidated aggregate of silt 'articles is also termed silt __ a consolidated aggregate is called siltstone. (A) which (B) why (C) whereas (%) whether &. 6n 1,-( the American 7ha#es'earean actor "dwin Booth gained critical acclaim when he __ 3amlet at the *inter ?arden Theatre in !ew Bor# City. (A) 'erform (B) 'erformed (C) had been 'erforming (%) ha$ing 'erformed (. 22 are chiefly deri$ed from 'etroleum. (A) =lastics today (B) There are 'lastics today (C) Because today 'lastics today (%) %ue to 'lastics today /. >ost tangerine trees and their flowers and fruits resemble __ the orange although tangerines are generally smaller. (A) of those (B) which of those (C) those of (%) which are of -. +hio. the center of __ the 3o'ewen culture has the greatest concentration of ancient burial mounds in the ;nited 7tates. (A) called (B) what is called (C) that is called (%) is called .. __ such as 0a99 are often 'layed from memory rather than from a written score. (A) +f some ty'es music (B) >usic some of ty'es (C) 7ome ty'es of music (%) Ty'es of music some ,. %uring the 1,/84 reform mo$ements __ tem'erance and the abolition of sla$ery gained strength in the ;nited 7tates. (A) ad$ocating (B) they had ad$ocated (C) to ad$ocating (%) to ad$ocate when 243 5. >any meteorites are thought to ha$e originated from __ that once existed between the orbits of >ars and Du'iter. (A) where a 'lanet or 'lanets (B) a 'lanet or 'lanets so (C) which a 'lanet or 'lanets (%) a 'lanet or 'lanets 18.The modem automobile is a __ com'osed of more than 1( 888 'arts. (A) com'lex technical system (B) system of com'lex technical (C) com'lex technical system that (%) system is technically com'lex system !" com'osed of more than 1( 888 'arts #$ %&' 11. __ o$er 188 years since the in$ention of the s1uare2bottomed 'a'er bag. (A) !ow is (B) !ow it has (C) There is now (%) 6t is now 12.The no$elist Dohn %os =assos de$elo'ed a style of fiction incor'orating se$eral documentary de$ices __ to his wor#s. (A) lent realism (B) that lending realism (C) to lend realism (%) of whose realism lent 1&.6n "arth4s infancy its surface was warm enough for life __ the young 7un was fainter than it is today. (A) in s'ite of (B) whether (C) neither of which (%) e$en though 1(.The in$ention of the com'ound microsco'e (which allowed much higher magnification through multi'le lenses) made __ the great strides in life sciences. (A) it 'ossible (B) 'ossibly (C) 'ossible (%) it was 'ossible 1/.3ares generally ha$e longer ears and hind legs than rabbits and mo$e by 0um'ing __ running (A) rather to be (B) rather than (C) are rather (%) as rather 1-. )a#e trout fish usually finding in dee' cool la#es are greenish gray and are co$ered with 'ale s'ots. 1.. %uring the first 28 years of the s'ace age the ;nited 7tates s'ent more than 58 billion dollars onto its ci$ilian and military s'ace 'rograms. 244 1,. Citamin A and C and most of the B $itamins are retain in foods that ha$e been canned. 15. "lla Ba#er s'ent her adult life wor#ing for social change by lecturing writing teacher and organi9ing adult literacy 'rograms. 28. ?old can combined with sil$er in any 'ro'ortion but alloys with /8 to -8 'ercent sil$er are the strongest. 21. The camera obscure a lensless 'recursor of the 'hotogra'hic camera consists of a dar#ened chamber with light 'ass into it through a single tiny hole. 22. )umber 'roduction was the main industry in >ichigan until the early 1588Us which the automobile industry was established in %etroit. 2&. Twenty minutes of $igorous exercise e$ery day is $ery effect in hel'ing a 'erson to maintain 'hysical fitness. 2(. 6t was not until after "mily %ic#enson4 s death in 1,,- that hidden away in her bureau o$erly one thousand un'ublished 'oems were disco$ered. 2/. @oc#s form within "arth are called intrusi$e or 'lutonic roc#s because the magma form which they form often intrudes into neighboring roc#. 2-. >ost fish swim by mo$ing their tails from side to side with little relati$ely body undulation. 2.. 6n its life ex'ectancy although in most other things the 7un is a ty'ical star. 2,. >achines need energy to function whether it is animal or human muscle wind or waters currents or heat2generated energy such as steam. The modern $iolin the smallest and $ersatile instrument in the $iolin family is tuned in fifths and 'roduces tones ranging o$er four and a half octa$es. &8 !orman @oc#well was a meticulous artist who 'aintings 'ortrayed family incidents and well2 defined characters with a wealth of su''orting details. 245 &1 By the late twel$e century stained glass had emerged in "uro'e as an integral 'art of ?othic architecture. &2 The ;nited 7tates a nation with a highly di$ersified economy is a ma0or ex'orter of grain fruit chemical aircraft and cars. && Canada began culti$ation wheat intensi$ely in 1518 which led to a demand for tools machines housing and building su''lies. &( >agnesium has little structural strength and must be alloyed with another metals such as aluminum and 9inc when it is to be sub0ected to stress. &/ +rchid seeds ta#e u' to eighteen months to mature before they s'rout and the young 'lants may need another two years to reach at the flowering stage. &- The oldest 'ublic edifice in *ashington %.C the *hite 3ouse was originally constructed in the 1.58Us also has been rebuilt or extensi$ely remodeled three times since. &. >itosis is the normal 'rocess by which a cell di$ides each new cell ending u' wich a same number of chromosomes as the 'arent cell. &,.There are a series of large2scale wind 'atterns all o$er "arth are called 're$ailing winds that ha$e a direct effect on weather and climate. &5.6n Dune 1,(- near 7acramento California a number of new settlers rebelled in the Bear <lag @e$olt and 'roclaiming California an inde'endent re'ublic. (8.A mutation is result of a definite biochemical change in a gene that causes the offs'ring to $ary in some characteristic from the 'arents. 246 2002 08 1. +$er the centuries ____ that try to ex'lain the origins of the uni$ersity. (A) although many theories (B) many theories (C) ha$e many theories been (%) there ha$e been many theories 2. The 'lanet Cenus is almost exactly the same si9e and mass _____ "arth with a similar interior including a nic#el2iron core. (A) to (B) as (C) is (%) than &. ?eorge *ashington Car$er ____ international fame for re$olutioni9ing agriculture research in the southern ;nited 7tates during the early twentieth century. (A) won (B) winning (C) who has won (%) the winner of (. Constituting one of the earliest engineering techni1ues ______ in =aleolithic time was done in order to extend natural ca$es. (A) tunnels were built (B) which built tunnels (C) the building of tunnels (%) tunnels whose building /. The tuli' tree is nati$e to the eastern ;nited 7tates _____ the tallest and largest broadleaf tree. (A) where (B) where it is (C) it is where (%) is where -. "lementary schools in the ;nited states 'ro$ide formal education ______ arithmetic science social science and communication s#ills that including reading writing s'elling and s'ea#ing. (A) such sub0ects as basic in (B) as basic sub0ects in such (C) in such basic sub0ects as (%) as in such basic sub0ects (()* + , -) .. ______ land and money enabled construction of the ;nion =acific railroad to begin from Council Bluffs 6owa in 1,-/. (A) By the go$ernment granting of (B) ?o$ernment grants of (C) <or the go$ernment to grant (%) ?o$ernment grants so that 247 ,. A''ointments to the ;nited 7tates 7u'reme Court and all lower federal courts ____ by the =resident with the ad$ice and consent of the 7enate. (A) ma#ing (B) to ma#e (C) are made (%) ha$e made 5. The name Es1uirrelF is commonly used for those forms of the family 7ciuridae that li$e in trees _____ it is e1ually accurate for ground dwelling ty'es. (A) whether (B) that (C) although (%) in s'ite of 7ciuridae ./. 18. ?reen 'lants combine _____ with water and carbon dioxide to ma#e food. (A) energy deri$ed from light (B) energy deri$ed it from light (C) energy is deri$ed from light (%) from light and energy deri$ed 11. <rom the archeologist4s 'ers'ecti$e understanding the 'ast is $itally im'ortant and re1uires ______ of earlier cultures. (A) the ruins examined (B) examining the ruins (C) of the ruins to be examined (%) that the examined ruins 12. The Texas )egislature selected Cassar >iller _____ in 15,2 and again in 15,,. (A) was the state4s 'oet laureate (B) as the state4s 'oet laureate (C) the state4s 'oet laureate (%) become the state4s 'oet laureate 1&. The distinguishing feature of a fluid in contrast to a solid is the ease _____ . (A) that a deformed fluid (B) to deform a fluid (C) when a fluid that is deformed (%) with which a fluid may be deformed 1(. +xygen and nutrients reach the body4s tissues ____ from the blood through the ca'illary wall. (A) 'ass (B) by 'assing (C) to be 'assing (%) ha$e 'assed 1/. _____ im'ortant de$elo'ment of the !eolithic age was not in the manufacture of stone tools but in the 'roduction of food. (A) The most (B) >ost (C) >ost of (%) +f the most 1-. By 1,55 @ansom olds had establish in %etroit >ichigan the first factory in the ;nited 7tates for the manufacture of automobiles. 248 1.. The 'rogressi$e >o$ement is an umbrella tern refer to a number of reform efforts that emerged in the early 15884s. 1,. The 'elican is a water bird with a large 'ouch attached to its bill which it uses as a scoo' for catch small fish. 15. The in$ention of reinforced concrete 'late glass and steel in the mid21,884s 28. Acoustics the study of sounds is one of the oldest of the 'hysically sciences. 21."ach of functions of the body e$en thin#ing re1uires the ex'enditure of energy. 22.?ourds were introduced to what is now the southwestern ;nited 7tates by earliest 'eo'les who migrated north from >esoamerica about .888 years ago. 2&. The economic heart of Canada +ntario accounts for more than (8 'ercentage of the nation4s 'roducti$e ca'acity. 2(. Cirtually all 'arts mo$ing of an automobile need to be lubricated because without lubrication friction would increase 'ower consum'tion and damage the 'arts. 2/. @arely has a technological de$elo'ment had as great an im'act on society as the ra'id grow of electronics. 2-. The !orth American @e$iew a maga9ine was first 'ublished in 1,1/ was one of the leading literary 0ournals of the 'ast woe centuries. 2.. <uel is any substance or material that reacts chemically with another substance or material to 'roduce hot. 2,. ?lint was a fa$ored material of 'rehistoric humans which used it to ma#e tools and wea'ons because it would chi' into sha'es with shar' edges. 25. >utiny of a shi'4s crew against the ca'tain signifies the brea#down of the obedience and disci'line re1uired to deal effecti$ely to 'erils at eat. 249 &8. +f all the art2related reference and research library in !orth America that of the >etro'olitan >useum of a Art in !ew Bor# City is among the largest and most com'lete. -0L 12345678. 9:;<. &1. Acclimati9ation is the 'rocess by which an organism ad0usts to li$ing in an en$ironment to which it normally unsuited. &2. ?laciers mass of ice that flow outward from ice ca's co$er about one2tenth of earth4s land area. &&. 7ome s'ecies of bacteria and fungi thri$e on such sim'ly com'ounds as alcohol. &(. 6n 152& Alice =aul began cam'aign to 'romote the ado'tion of an amendment to the ;nited 7tates Constitution mandating e1ual rights for women. &/. =erha's more than any other ;nited 7tates city 7an <rancisco is a collection of neighborhood. &-. Almost e$ery the hereditary material of an indi$idual organism resides in the chromosomes. &.. +nly with early se$enteenth2century obser$ers did the music of the original inhabitants of the ;nited 7tates and Canada entered recorded history. &,. =erha's the most distincti$e features of shar#s and undoubtedly one of the most im'ortant reasons for their success is their well2de$elo'ed sensory system. &5. The ma0or economic acti$ities of Cheyenne *yoming include trans'ortation chemicals tourism but go$ernmental acti$ities. (8. The fiction writer 'oetry and critic "dgar Allan =oe is among the most familiar of American writers and one of the most enigmatic. 2002 09 1. >any scientists belie$e _____ as a result of a collision between the newly formed "arth and a large asteroid. A. that the >oon was formed 250 B. in that the >oon was formed C. that the >oon formed was %. when the >oon was formed 2. The organ2'i'e cactus is _____ in the ;nited 7tates. A. @are that B. 6t rare C. so that rare %. rare &. *illa Cather _____ gained recognition for her boo#s concerning the American frontier. A. a no$elist and =ulit9er 'ri9ewinning B.a =ulit9er 'ri9ewinning no$elist C.a =ulit9er 'ri9ewinning no$elist who %.was a =;lit9er 'ri9ewinning no$elist (. The a$erage wa$elength of $isible light is 2 888 times _____ the diameter of an atom. A. much as B. as great C. greater than %. more than that /. _____ ants li$e in nests which may be located in the ground under a roc# or built abo$e ground and may be made of twigs sand or gra$el. A. >ost B. The most of C. >ost of %. +f the most -. The ban#ing systems of the world ha$e many similarities _____ they also differ sometimes in 1uite material res'ects. A. of which B. in s'ite of C. but %.how .. )earning that ta#es 'lace in infancy 'ro$ides the____ for the e$entual transformation of a child into an adult. A. foundation is necessary B. necessary foundation is C. necessary in the foundation %. foundation necessary ,. 6n the late 15&84s and early 15(84s Dacob )awrence created many 'aintings _____ the li$es of famous African American acti$ists. A. 'ortayed B. 'ortrayed them C. that they 'ortrayed %. that 'ortrayed 5. The Centennial "x'osition _____ in =hiladel'hia =ennsyl$ania in 1,.- celebrated the one2 hundredth anni$ersary of the %eclaration of 6nde'endence. A. was held B. to be held C. held %. by holding 18. 6n the dar# abyss of the dee' sea _____ is 'roduced by luminescent fish. A. because the only light 251 B. the only light C. the only light that %. is the only light 11. classic American no$el >oby %ic#____ an account of the conflict between human beings and their fate. A. may be regarded as B. as may be regarded C. regarded as may be %.regarded may as be 12. 6n the metals industry hydrogen is used to 're$ent metals from tarnishing while undergoing_____. A. treated by heat B. heat treatments C. by heat treatments %. heat2treated 1&. =>?@ 1(. =>?@ 1/. =>?@ 1-.The "xecuti$e >ansion constructed in the 1.584s and now 'o'ularly called the *hite 3ouse is oldest 'ublic edifice in *ashington %.C. 1.. 6n$entor "lisha ?ra$es +tis designed the first ele$ator that it incor'orated an automatic bra#e which in turn led to the de$elo'ment of the s#yscra'er. 1,. Although the term EcorrosionF a''lies mostly to metals and 'articularly to their reaction to oxygen all material are sub0ect to surface deterioration. 15. The chief commercial source of bromine is ocean water from what the element is extracted by means of chemical re'lacement by chlorine. 21. All li$ing things are made u' of one or more cells and each of these cells were 'roduced by an already existing cell. 22. 6t is belie$ed that some dinosaurs were intelligent ability to 'erform com'lex acti$ities and 'erha's e$en ca'able of social beha$ior. 2&. ;ni1ue among bi$al$es scallo's swim extremely well 'ro'elled by 0ets of water ex'elled while sna''ed the shell shut. 252 2(. 6n the 'eriod between 151, and 15&5 $arious 'olitical economic and geogra'hic factors combined in determine the extent to which a country de$elo'ed ci$il a$iation. 2/. The main attracti$e at 7e1uoia !ational =ar# is thirty2fi$e gro$es of giant se1uoias the largest li$ing things in the world. 2-. 6n films o'tical 'rinting can be combined with blue2screen 'hotogra'hy for 'roduce such s'ecial effects as characters seeming to fly through the air. 2.. The de$elo'ed coutries of the world are using u' $aluable resources at a rate un'recedented human history. 2,. An acti$ist for women4s rights )eonora +4@eilly 'romoted women4s $ocational training besides fought for increased wages for garment wor#ers. 6ncreased ad0. 25. Cameras of one ty'e or another ha$e been using for more than a hundred years. &8. "lectricity is the 'henomenon associated with 'ositi$ely and negati$ely 'articles charged of matter at rest and in motion either indi$idually or in great numbers. &1. Air which it is a mixture of elements oxygen and nitrogen and com'ounds water and carbon dioxide also contains small 1uantities of many other substances. &2. The 'lanets far from the 7un are so remote from any heat source that their tem'eratures are thought to be much near absolute 9ero. &&. 7ome claim that $egetarian diets may to be more healthful than a diet that includes meat since they generally contain less fat and more fiber. &(A(8 >? 2003 01 1. _____crumbles readily when ex'osed to a moist acid atmos'here but the stone is durable in a dry atmos'here. (A) The surface of marble is (B) The surface of marble which 253 (C) Although the surface of marble (%) The surface of marble 2. By using their trun#s ele'hants can tell the sha'e of an ob0ect and _____ is rough or smooth or hot or cold. (A) it (B) whether it (C) how (%) since it &. 6n 15,5 Carret 3ongo was chosen as _____ for the =ulit9er =ri9e in 'oetry. (A) his being one of the finalists (B) to be one of the finalists (C) one of the finalists (%) the one finalist who (. The >oon is much closer to "arth _____ is the 7un and thus it had greater influence on the tides. (A) unli#e (B) than (C) but (%) where /. The brain of an a$erage adult is one of the largest organs of the body _____about three 'ounds. (A) weighs (B) is weighed (C) weighing (%) to weigh it -. Throughout history _____different re'resentations for numbers and for the basic 'rocess of counting. (A) ha$e been many (B) there ha$e been many (C) many (%) when many .. %emocratic go$ernments constantly face the 'roblem of balancing _____ the indi$idual with the needs of society. (A) the rights of (B) to the rights for (C) for the rights to (%) with the rights by ,. Connecticut was the fifth of the original thirteen states _____ the Constitution of the ;nited7tates. (A) ratified (B) ratify (C) to ratify (%) ha$e ratified 5. The chemical com'osition of sandstone is the same as _____ (A) that of sand (B) that sand is (C) sand is that (%) what of sand 18. 3ydrofoils can exceed ./ miles 'er hour as com'ared with con$entional watercraft whose maximum s'eeds _____ a''roach /8 miles 'er hour. (A) are rarely (B) rarely (C) of rarely (%) they rarely 254 11. 6t was no$elist and 'oet _____ in 15-, founded Dac#son 7tate ;ni$ersity4s 6nstitute for the 7tudy of the 3istory )ife and Culture of Blac# =eo'le. (A) >argaret *al#er did (B) >argaret *al#er (C) >argaret *al#er who (%) >argaret *al#er and 12. Before the "uro'eans arri$ed American 6ndians were using $irgin co''er _____ into ornaments #ni$es and other artifacts. (A) *hich was hammering (B) which hammered (C) was hammered (%) hammered 1&. 6n western !orth America _____ form the ?reat %i$ide which se'arates the areas from which waters flow either eastward to the Atlantic or westward to the =acific. (A) the @oc#y >ountains (B) where the @oc#y >ountains (C) the @oc#y >ountains in which (%) there are the @oc#y >ountains 1(. 7ome ecologists belie$e _____ more than /8 'ercent of existing s'ecies will be lost in the next 188 years. (A) because (B) that (C) while there is (%) that there are 1/. Almost _____ substances ex'and in $olume when heated and contract when cooled. (A) all (B) they all (C) all of (%) all are 1-. A children4s librarian often conducts story hours and other acti$ities to hel' children en0oy herself while de$elo'ing an interest in reading and the library4s resources. 1.. Titanium has the strength of steel but weighs half only as much hence its ad$antage for use in aircraft. 1,. =rotecti$e beha$iors of am'hibians include hiding in the 'resence of danger and ha$ing coloration such closely matching the en$ironment that the animal is not ob$ious. 15. As the highest2'aid star of the silent screen earning a re'utedly income of O28 888 a wee# ?loria 7wanson e'itomi9ed the glamour of 3ollywood in the 15284s. 28. Candles may be made by re'eatedly di''ing wic#s in tallow by molding nor by 'ouring melted wax o$er the wic#s and rolling them into sha'e. 255 21. *hile models of automobiles date bac# as far as the late 1-884s the 1,,84s seen the first commercial interest in the $ehicle. 22. The conce'tual of musical harmony is generally traced to the ninth century because it is first mentioned in treatises of that 'eriod. 2&. =aleontologists ha$e examined fossil embryos and hatchlings from three ty'e of duc#2billed dinosaurs to figure out how they matured. 2(. )ightning tends to stri#e the nearest good conductor and hence often stri#es in same 'lace more than once. 2/. *hen study different cultures and societies anthro'ologists often focus on marriage as a contractual agreement between different 'arties. 2-. The first 'iloted balloon flight across the Atlantic +cean too# 'lace at 15.,. 2.. The Arts and Crafts >o$ement of the late nineteenth century stro$e to re$itali9ing handicrafts and a''lied arts during an era of increasing mass 'roduction. 2,. *hen canned using 'ro'er methods food suffers no loss in $itamins or another nutriti$e elements. 25. 3eat exhaustion is causing by excessi$e loss of body fluids and body salts. &8. =rimiti$e humans 'robably did not deliberately coo# food until long after they had learned to use fire for light and warm. &1. The 'oor condition of 'risoners are what concerned %orothea %ix an American social wor#er and director of a school in Boston. &2. <ound in the shells of lobsters shrim' and crabs glucosamine is also 'resent in human cartilage which co$ering the bones in 0oints. 256 &&. Between 1,.1 until 1,51 the 'o'ulation of Toronto more than tri'led increasing from /- 888 to 1,1 888. &(. 6n the nineteenth century >ontreal grew into an im'ortant trans'ortation and industrial center aided by its many natural resources and an abundant of hydroelectric 'ower. &/. 6n the initial 'lanning for theaters auditoriums but any room intended 'rimarily for listening acoustics is a ma0or consideration. &-. The 'ulse that may be felt where$er an artery 'asses o$er a solid structure such as a bone or cartilage. &.. Through his essays 'oems and lectures @al'h *aldo "merson established himself as a ma0or thin#er of his time and as a figure leading of American literature. &,. The EmethodF which is both a style of acting a system of training for the actor stresses inner moti$ation and 'sychological truth. &5. +n 7e'tember - 155- ci$il rights acti$ist @osa =ar#s was awarded the =residential >edal of <reedom the highest honor the ;nited 7tates go$ernment gi$es to ci$ilian. (8. Basalt which com'oses most of the ocean floor is a dar#2grey roc# rich in iron and magnesium than most surface roc#s. 257 1996 12 QR1The 'ro$ince of !ewfoundland has ________ than any other region of !orth American in which the first language is "nglish. (A) its longer history (B) a longer history (C) the longer the history (%) the history is longer 2Clinical 'sychologists were (%) consist of (B) consisting of fi$e $owels (C) that consists of fi$e $owels (%) consists of fi$e $owels 258 .The growth of 'sychobiology owes ________ to ma0or conce'tual ad$ances in the way 'eo'le thin# about the brain. (A) much (B) as much as (C) much which (%) there is so much 126 259 the tunnels re1uired to satisfy the needs of its inhabitants. (A) where exists the networ# (B) the existing networ# (C) the networ#4s existence (%) exists the networ# 1-The anti1ue collectors must be able to distinguish real anti1ues from later imitations which can be either re'roductions nor fa#es. 1,A great a$iation 'ioneer Amelia "arthart was already famous when she sets out on her ill2fated attem't to circle the globe in 15&.. 15Although a''les do not grow during the cold seasons a''le trees must ha$e a such season in order to flourish. 28Tow uni1ue features of the Arctic they are lac# of 'reci'itation and 'ermanently fro9en ground. 21<aced with 'etroleum shortage 0igsaw 'u99le de'ends the number of 'ieces their sha'es and shadings and the design of the 'icture. 260miles of trac# three 1uarters of which it was east of the >ississi''i @i$er and north of the +hio @i$er. 2,Ballads were early ty'es of 'oetry and may ha$e been among a first #inds of music. 25The. &13umus a substance found in soil is soft and s'ongy and enables 'lant roots to send out tiny hairs through that they absorb water and food. &2Although educations 'olitics and religion )ewis >umford remained acti$e in city and regional 'lanning. 261 &.+scillation is a electronic function that changes direct current to the signal of desired fre1uency. &,=a'ier2mVchW figures by 7te'hen 3ensen which they cheerfully de'icted life in the 6nformation Age were the focus of an exhibit at the >useum of American 3istory. &5=harmacist fill drug 'rescri'tions #ee'ing recordings of the drugs their 'atients are ta#ing to ma#e sure that harmful combinations are not 'rescribed. (8?reat technical ad$ances in aerial and satellite 'hotogra'hy ha$e been made since end of the 7econd *orld *ar. 262 2003 8 16n 1.5- in$estigations into the chemical nature of diamond concluded _________ a form of 'ure carbon. (A) that it (B) is it (C) that it is (%) is that 2The "nglish coloni9ation of Cirginia was de$ised in 1-8- by a grou' of merchants _________ the Cirginia Com'any of )ondon. (A) who formed (B) formed who they formed they formed &The hourglass an instrument used _________ usually consists of two bulbs united by a narrow nec#. (A) measures time (B) time is measured (C) for measuring time (%) the time for measuring (A master is an electronic a''aratus that _________ radio and light wa$es. (A) generated and was am'lified (B) generating and am'lifying (C) generates and am'lifies (%) to generate and am'lify /The human s#in forms _________ against the action of 'hysical chemical and bacterial agents on the dee'er tissues. (A) how 'rotecti$e a barrier is (B) a 'rotecti$e barrier (C) a barrier 'rotects (%) and which a barrier 'rotects ->edical research at the cellular le$el _________ research on the immune system has been made 'ossible through twentieth2century ad$ances in techni1ues of genetic research. (A) which (B) whereas (C) such as (%) is also .)i$ing organisms contain more water _________ substance. 263 (A) than do any other (B) does than any other (C) other than do they any (%) than they do any other ,The twentieth century has been a 'eriod of enormous growth in mathematical research and in the number of mathematicians and fields _________ them. (A) they re1uire (B) re1uiring (C) re1uire (%) as re1uired 5Columbia ;ni$ersity4s 7chool of =ublic 3ealth is _________ a handful of schools of 'ublic health in the ;nited 7tates. (A) one that (B) the one (C) one of (%) one 18The ;nited 7tates %e'artment of the interior designated the Broo#lyn bridge _________ in 15-(. (A) was a national historic landmar# (B) a national historic landmar# (C) which a national historic landmar# (%) a national historic landmar# which 116n 0a99 music a riff is a sim'le melodic figure _________ and re'eated se$eral times. (A) usually one or two measures lasted (B) lasted one measure or two usually (C) is lasting one or two measures usually (%) usually lasting one or two measures 12At its center the sun has a density of o$er a hundred times _________ and a tem'erature of 18 to 28 million degrees centigrade. (A) that of water (B) of water (C) than that of water (%) water 1&The ;nited 7tates Congress a''ro'riates some four million dollars _________ the u'#ee' of the *hite 3ouse grounds. (A) year for a (B) for a year (C) a year for (%) a for year 264 1(The sea horse uses _________ to cling to the seaweed and other 'lants. (A) it has a tail (B) a tail with which it (C) its tail (%) as its tail 1/6n the years ahead health 'rofessionals will be able to enhance or restore health far better _________ at 'resent. (A) whereas (B) they can (C) than (%) that are 1-. The constitution of !ew 3am'shire a second oldest among those of the fifty states was ado'ted in 1.,(. 1.. "linor *ylie4s writings consist of eight boo#s222four no$els and four $olumes of 'oem222in which she dis'layed a #nowledge of both history and literature. 1,. 6n addition to their usefulness as sca$engers birds are of enormous $alue to humans because of they eat insects and control the s'read of weeds. 15. *hen 'reci'itation occurs some of it e$a'orates some runs off the surface it stri#es and some sin#ing into the ground. 28. The astronauts chosen for fly the first ;nited 7tates s'acecraft were selected from military test 'ilots. 21. Tarantulas in0ect a 'araly9ing $enom into 'rey or with their large fangs. 22. Born in !ew Bor# City in 1,51 =reston %ic#inson was one of the 'ioneers of modern artistic in the ;nited 7tates. 2&. The water of the Atlantic =acific and 6ndian +ceans ma#e u' .8., 'ercent to the "arth4s surface. 2(. The three main tele$ision networ#s in the ;nited 7tates account for more ad$ertising dollars than any others medium. 2/. 6n 151& when he was only 1, year old )eo 7owerby4s $iolin concerto was 'erformed by the Chicago 7ym'hony. 265 2-. <ossil records su''ort the assum'tion which microorganisms were the first forms of life. 2.. The 7t. )ouis =ost2%is'atch was founded in 1,., and by 1,,1 had become the most largest e$ening news'a'er in the city. 2,. 6n artifacts from as early as the 7tone Age mathematics and art can be seen to ha$e fused in the geometric 'atterns decorate 'ottery wea$ing and car'entry. 25. %es'ite their common heritage bac#ground and homogeneity the original ;nited 7tates consisted of 1& distinct 'olitical entities each commanding considerable loyal from its citi9enry. &8. The choreogra'her ?eorge Balanchine created more than 1/8 wor#s for the !ew Bor# City Ballet that which he was a founder. &1. 7ome ways in which li9ards different from sna#e are in ha$ing ear o'enings mo$eable eyelids and less flexible 0aws. &2. >uch of the wor# of the anthro'ologist >argaret >ead was de$oting to a study of 'atterns of child rearing in $arious cultures. &&. The feathers of birds not only 'rotect their s#in from in0ury and conser$e body heat but also function in flight courtshi' camouflage and sensory 'erce'ti$e. &(. +f the many mushroom s'ecies growing wild the common field mushroom is the one that is most fre1uently gather for human consum'tion. &/. Carl @oger4s client2centered thera'y is now widely em'loyed and is among the most influential techni1ue in modern ;nited 7tates clinical 'sychology. &-. <emale horseflies transmit a few diseases but their main significance as 'ests is in sting of their bite. &.. %es'ite a lac# of na$igably waterways >adison *isconsin de$elo'ed into a manufacturing center as well as a ma0or trade nucleus during the 1,884s. 266 &,. The food and water that 'eo'le consume them come from the en$ironment 'ro$ided either by nature or through the wor# of farmers and other 'roducers. &5. Communal dance as a 'owerful symbol of mutual regard and coo'eration grou' underlies enduring traditions in fol# dancing. (8. >ore than ,88 ma0or oil com'any ha$e 'lants and offices in Tulsa +#lahoma the site of the international 'etroleum ex'osition. 267 2003 10 1. The musical comedy +#lahoma did much to ex'and the 'otential of the musical stage and it encouraged others to attem't_________ (A) (B) (C) (%) original themes to original themes that were original themes how original themes 2. %es'ite its fishli#e form the whale is_________ and will drown if submerged too long. (A) (B) (C) (%) an animal breathes air that an animal that breathes air an animal breathes air that an animal breathes air &. The saguaro found in desert regions in the southwestern ;nited 7tates _______ cactus in the world. (A) (B) (C) (%) is the largest the largest that is the largest the largest that is a (. 6t is said that ;nited 7tales literature _________ indi$iduality and identity in the twentieth century after long imitation of "uro'ean models. (A) (B) (C) (%) was achie$ed achie$ed to achie$e achie$ing /. )ucy 7tone __________first feminists in the ;nited 7tates hel'ed organi9e the American *oman 7uffrage Association in 1,-5. (A) (B) (C) (%) the one who was the another one of the -. __________ including climate mineral content and the 'ermanency of surface water wetlands may be mossy grassy scrubby or wooded. (A) (B) (C) (%) %e'ending on many factors >any factors de'ending on <actors de'ending on many +n many factors de'ending .. %u#e "llington4s orchestra __________his own often com'lex com'ositions made many inno$ations in 0a99. 268 ,. The term Eice ageF refers to any of se$eral 'eriods of time when glaciers co$ered considerably more of "arth4s surface__________. (A) (B) (C) (%) as is today than today is than they do today that today 5. <rom colonial times ;nited 7tates 'ro'erty owners agreed to tax themsel$es on the theory__________ directly from ser$ices that the go$ernment could 'ro$ide. (A) (B) (C) (%) 'ro'erty owners benefited so that why 'ro'erty owners benefited that if 'ro'erty owners benefited that 'ro'erty owners benefited 18. 3elium is not flammable and next to hydrogen is__________. (A) (B) (C) #nown the lightest gas lightest the #nown gas the lightest gas #nown the #nown gas lightest (D) 11. *ild eagles that sur$i$e to adulthood are belie$ed __________ from 28 to &8 years. (A) (B) (C) (%) li$e to li$e they li$e their li$ing 12. =ortland __________ is located 'rimarily on two hilly 'eninsulas o$erloo#ing Casco Bay and its many islands. (A) (B) (C) (%) which >aine4s largest city >aine4s largest city where is >aine4s largest city >aine4s largest city 1&. _________ widely used in the chemical industry sodium carbonate is 'rinci'ally consumed by the glass industry. (A) (B) (C) (%) %es'ite *hether Though "xce't for 269 1(. Cells first identified by the early microsco'ists began to be considered _________ in the nineteenth century. (A) (B) (C) them as microcosm of li$ing organisms the microcosm of li$ing organisms the microcosm of li$ing organisms to be as which the microcosm of li$ing organisms 1/. )i#e Du'iter 7aturn is a large gaseous 'lanet com'osed _________ of hydrogen and helium. (A) (B) (C) (%) it is mostly mostly almost both are almost 1-Bacterial cultures are used commercially in the 're'aration of food 'roducts such that yogurt sour cream and $inegar. 1.. Anyone with absolute or 'erfect 'itch are able to identify by ear any note at some standard 'itch or to sing a s'ecified note at will. 1,. 7ea horses usually li$e along the shore among seaweed and other 'lants to which they cling to by their tails. 15. Babies ha$e soft s'ots between the bones of their s#ulls which allowing for further growth. 28. T.7."lot who a 'oet 'laywright literary critic and editor was a leader of the >odemist mo$ement in 'oetry. 21.The =acific +cean com'rises almost the entire boundary western of !orth and 7outh America. 22"stablished in 15(, the 7tate ;ni$ersity of !ew Bor# is the singly largest uni$ersity system in the ;nited 7tates. 2&.=hotogra'hy disseminates information about humanity and nature records the $isible world and extension human #nowledge into areas the eye cannot 'enetrate. 2(.Because of their ra'idly changing economically fortunes many frontier towns of the American *est underwent s'ectacular fluctuations in 'o'ulation in the nineteenth century. 270 2/.Cirtually no disease exists today for which there is no drug that can be gi$en neither to cure the disease or to alle$iate its sym'toms. 2-.Calcium is essential for blood clotting for the action of certain en9ymes and for the normal contraction and relax of muscles. 2..The large collection of the *illiams College >useum of Art includes ancient and medie$al art but much exhibits are modern or contem'orary. 2,.The techni1ue of s'ectrosco'y allows analyst of incoming light after it has been se'arated into its com'onent wa$elengths by 'assage through a 'rism. 25. Today fifty years after its construction the Alas#a 3ighway con$eys (8 888 $ehicles in normal year. &8.7ince 'rehistoric times artists ha$e been arranged colors on surfaces in ways that ex'ress their ideas about 'eo'le the world and religion. &1. <ew substances loo# less ali#e than coal and diamonds yet both are fashioned from same elemental carbon. &2.>eteorologists can 'rogram their com'utes to scan for a s'ecific set of weather criteria such as falling barometric 'ressure increase cloud co$er and rising humidity. &&.+bsidian is formed when siliceous la$a cools too ra'idly to crystalli9ed into roc#2forming minerals. &(."uro'ean settlers in !orth America mo$ed from the Atlantic coast across & 888 miles forests grasslands deserts and mountains until they reached the =acific +cean. &/.=hiloso'hy tries to disco$er the nature of true and #nowledge and to find what is of basic $alue and im'ortance in life. &-.6n this world of high technology it is easy to forget that the most im'ortant tools e$er de$elo'ed for learning is still the boo#. 271 &..The element 'otassium ma#es u' less than one half 'ercentage of the human body. &,.Twenty thousand years ago a sheet of ice a thousand meters thic# co$ered the coastal region which the cities of Cancou$er and Duneau now are located. &5.The Crow Blac#foot and 7ioux tribes traditionally adorned they dwellings and costumes with colorful and highly $alued beaded decorations. (8. 6n the late 1,884s ;nited 7tates 'ainter Thomas "a#ins de$elo' a broad 'owerful @ealist style that became almost ex'ressionistic in his later years. 272 2004 01 1. The ancestors of the horse li$ed _________ and were about half a meter tall. (A) years ago -8 million (B) -8 million years ago (C) ago -8 million years (%) million years ago -8 2. The museum on "llis 6sland a former immigration station contains documents and artifacts_________ to four centuries of ;nited 7tates immigration. (A) related them (B) related (C) related that (%) be related &. _________ 'articularly the oxides of sulfur greatly increases the rate at which rust forms. (A) The 'resence of air 'ollutants (B) Air 'ollutants are 'resent (C) Because the 'resence of air 'ollutants (%) Air 'ollutants whose 'resence (. The 7un the >oon and "arth ha$e magnetic fields and_________ e$idence that the stellar that extend through $ast regions galaxies ha$e fields of s'ace. (A) which is (B) is (C) because (%) There is /. The Econfederation schoolF 'oets of nineteenth2century Canada were 'rimarily nature 'oets _________ a wealth of eulogies to Canadian rural life. (A) and 'roducing (B) who they 'roduced (C) 'roducing (%) whose 'roduction of -. 7ince 'rehistoric 'eo'le first a''lied natural 'igments to ca$e walls _________ ha$e 'ainted to ex'ress themsel$es. (A) when artists (B) artists (C) artists who (%) that artists .. About (2 million bushels of oats are used annually _________ manufacture of brea#fast foods in die ;nited 7tates. 273 (A) the (B) is the (C) in the (%) to ,. Any acid can in 'rinci'le neutrali9e any base although _________ between some of the more reacti$e com'ounds. (A) side reactions can occur (B) the occurrence of side reactions can (C) can side reactions occur (%) side reactions that can occur 5. Dust o$er two2thirds of "arth4s surface is co$ered by wafer _________ more than 5, 'ercent of this water is contained in the oceans. (A) with (B) which (C) and (%) resulting l8. =leasing to loo# at and touch beads come in sha'es colors and materials _________.to handle and to sort them. (A) that almost com'el one (B) one com'els (C) that com'el almost (%) one is almost com'elled 11. 6n 15., the united 7tates !ational Air and 7'ace Administration selected 7ally @ide _________.the first woman astronaut. (A) who being (B) to be (C) and being (%) was 12. Adhesions are _________ formed within the body in res'onse to inflammation or in0ury. (A) that thin bands of scar tissue (B) they thin bands of scar tissue when (C) thin bands of scar tissue (%) thin bands of scar tissue able to 1&. The 'lanet !e'tune is about &8 times _________ from the 7un as "arth is. (A) far (B) as far (C) more far (%) far that 1(. !ot until the 1,/84s _________ a few 'ublic2s'irited citi9ens and state legislatures see# to rescue historic buildings in the ;nited 7tates from destruction or alteration. 274 (A) both (B) came (C) did (%) when 1/. 22222 288 bones forming the framewor# or s#eleton of the human body. (A) Being o$er (B) There are o$er (C) *here o$er (%) +$er 1-. The world4s water balance is regulated by the constant circulation of water in )i1uid and $a'or tom among the oceans the atmos'heric and the land. 1.. The ma0or 'ur'ose of the ;nited 7tates %e'artment of "ducation are to ensure e1ual educational o''ortunity for all and to im'ro$e the 1uality of education. 1,. >assi$e gains in com'uter s'eed 'ower and reliably ha$e been largely due to ad$ances in silicon technologies and manufacturing 'rocesses. 15. The sunflower the official state flower of Jansas and is wides'read in the 'rairies of the western ;nited 7tates. 28. )a#e 7u'erior 'art of the ;nited 7tates2Canadian boundary is a largest freshwater la#e in the world. 21. The sna''er a large2headed fish with a long dorsal fin is named to its characteristic way of suddenly shutting its mouth. 2&. >odern digital synthesi9ers based on micro'rocessors are $irtually unlimited in the number and range of musical sounds it can 'roduce. 2(. %uring the years he com'osed Charles 6$es was isolation from the music world: none of his ma0or wor#s was 'ublicly 'erformed. 2/. =sychoanalysis is a form of thera'y that attem'ts to eliminate conflict by alter the 'ersonality in a 'ositi$e way. 275 2-. ?lobally the 15584s stood out as the warmest decade for what we ha$e weather records. 2.. 7ilicon chi's are reliable and chea' to 'roduce in large numbers and are used them in com'uters calculators 'rogrammed household a''liances and most electronic a''lications. 2,. Because its 'itch cannot easily be altered the oboe ser$es as the standard which by the sym'hony orchestra is tuned. 25. Bursae are fluid2filled sacs that form cushions between tendons and bones and 'rotect them while mo$ement. &8. 6n 151- ;nited 7tates suffragist Alice =aul founded the !ational *oman4s =arty a 'olitical 'arty dedicate to establishing e1ual rights for women. &1. The s'ice cinnamon and the drugs cascara and 1uinine all come from bar# the 'rotecti$e out layer of stems and roots of woody 'lants. &2. Tunas migrate long distances o$er all the world4s oceans and occu'y tro'ical tem'erate and e$en some the cooler waters. &&. Taste buds small sensory organ located on the tongue and 'alate recogni9e four 'rimary tastesL sweet sour salty and bitter. &(. Astronauts recei$e extensi$e training to 're'are themsel$es both 'hysically and 'sychologically for com'lexity and rigor of a s'ace mission. &/. By 1588 se$eral 'rominent technical institutions including the >assachusetts 6nstitute of Technology fashioned its own educational offerings to meet the industrial needs of the ;nited 7tates. &-. 7ome of the earliest mechanical de$ices were designed to raise water from streams for the irrigate of cro's. 276 &.. The )ouisiana =urchase of 1,8& increased the territory of the ;nited 7tates by a''roximate ,(- 888 s1uare miles 'ractically doubling the area of the ;nited 7tates. &,. A most useful tool for analy9ing the elemental com'osition of fossils is the electron 'robe a modify electron microsco'e. &5. <ew substance on "arth e1ual the beauty of gemstones such as twin#ling diamonds green emeralds red rubies blue sa''hires and multicolored o'als. (8. <or the 'ur'oses of the fine and decorati$e arts metals ha$e been used either in their sim'le state and in uncom'licated alloys. 277 288( 5 d chasedream - li#ui 9houshao \-(tDd chasedream YXz}x $( 1.6n the late 15.84s and early 15,84s the ;nited 7tates de$elo'ed the reusable s'ace shuttle ________to s'ace chea'er and easier. A. to ma#e access B. and ma#ing access C. which made accessible %. and made accessible. 2. ?enetically the chim'an9ee is more similar to humans _______. A. are than any other animal B. than is any other animal C. any other animal is %. and any other animal is &._______more than -/ 888 described s'ecies of 'roto9oa of which more than half are fossils. A. Being that there are B. There being C. Are there %. There are (.The 7herman Antitrust Act of 1,58 ___ nearly unanimously through the ;nited 7tates Congress. A. 'assed B. in 'assage C. ha$ing 'assed %. 'assing /.>odern s#yscra'ers ha$e a steel s#eleton of beams and columns ___a three2dimensional grid. A. forms B. from which forming C. and forming %. that forms -.The a$erage le$el of ;nited 7tates 'rices grew $ery little from 15/& until the mid215-84s when ____________. A. did inflation begin B. inflation began C. the beginning of inflation %. did the beginning of inflation ..The basis 'remise behind all agricultural 'roduction is _____a$ailable the riches of the soil for human consum'tion. A. to be made B. the ma#ing C. ma#ing is %. to ma#e ,.___to the united states 3ouse of @e'resentati$es in 1.51 !athaniel >acon remained in office until 1,1/. A. "lection B. *hy he was elected C. "lected %. *ho was elected 5.________ of classical ballet in the united states began around 1,&8. A. To teach B. 6s teaching 278 C. 6t was taught %. The teaching 18.The uni$erse is estimated ___between 18 billion and 28 billion years old. A. being B. to be C. which is %. is. 11. A situation in which an economic mar#et is dominated by a ____ is #nown as a mono'oly. A. single of a 'roduct seller B. 'roduct single of a seller C. seller of a 'roduct single %. single seller of a 'roduct 12.____ freshwater s'ecies of fish build nests of stic#s stones or scoo'ed2out sand.. A. As the many B. +f the many C. >any %. >any of them are 1&.!ews'a'er 'ublishers in the united states ha$e estimated ___________reads a news'a'er e$ery day. A. nearly ,8 'ercent of the adult 'o'ulation who B. it is nearly ,8 'ercent of the adult 'o'ulation C. that nearly ,8 'ercent of the adult 'o'ulation who %. that nearly ,8 'ercent of the adult 'o'ulation 1(. The foundation of all other branches of mathematics is arithmetic _ science of calculating with numbers. A. is the B. the C. which the %. because the 1/.!ylon was ___the human2made fibers. A. the first of which B. what the first of C. it the first of %. the first of 1-.The male cicada sound is made by s'eciali9ed structures on the abdomen and which a''arently ser$es to attract females. 1..Tele$isions are now an e$eryday feature of most households in the ;nited 7tates and tele$ision $iewing is the number one acti$ity leisure. 1,.Bacteria are one of the most abundant life forms on "arth growing on and inside another li$ing things in e$ery ty'e of en$ironment. 15.<luorine is a greenish gas too acti$e that e$en water and glass burn in it. 28.6n general no$els are thought of extended wor#s of 'rose fiction de'icting the inner and outer li$es of their characters. 21.>etabolism is the inclusi$e term for the chemical reactions by which the cells of an organism transforms energy maintain their identity and re'roduce. 279 22.Although most 'etroleum is 'roduced from underground reser$oirs 'etroleum occurs in a $arieties of forms at the surface. 2&.A musical organ can ha$e 'i'es of two #indsL flue 'i'es that wor# li#e a flute and reed 'i'es that o'erate on same 'rinci'le as a clarinet. 2(.The )and +rdinance of 1.,( di$ided the western lands belonging to the ;nited 7tates into territories each to be go$ern tem'orarily by its settlers. 2/.6f there is too much 'ituitary hormone of too few insulin the amount of sugar in the blood rises abnormally 'roducing a condition called. 3y'erglycemia. 2-.The care of children during their years of relati$e hel'lessness a''ears to ha$e being the chief incenti$e for the e$olution of family structures. 2..6t was not until the 15284s that 'ollution came to be $iewed by many as a threat to the health of li$e on "arth. 2,.=latelets are tiny blood cells that hel' trans'ort hormones and other chemicals throughout the body and it 'lay a role in clotting blood. 25. ;ntil the twentieth century 'endulum cloc#s were calibrated against the rotation of earth by ta#ing astronomically measurements. &8.The ra'id growth of the world4s 'o'ulation o$er the 'ast 188 years ha$e led to a great increase in the acreage of land under culti$ation. &1.6n the eighteenth century the =awnees descendants of the !ebras#a culture li$ed in $illages si9eable on the )ou' and =latte ri$ers in central !ebras#a. &2.The attraction of o''osite charges is one of the force that #ee' electrons in orbit around of nucleus of an atom. &&.+f e$ery the ma0or traditions of wood car$ing the one that is closest in structure to the tree is the crest 'ole made by the !ati$e Americans of the !orthwest coast. &(.>any of the fine2grained $arieties of sedimentary roc#s #nown as shales yield oil when distilled by hot. &/.6n 1,28 there were only -/ daily news'a'ers in the united states which total daily circulation of 'erha's 188 888. &-.The >il#y *ay galaxy includes the 7un its 'lanets and rest of the solar system along with billions of stars and other ob0ects. &..7ome of shar'shooter Annie +a#ley4s ex'loits with a gun are almost unbelie$able when it comes to accuracy s'eed of firing and endure. &,."$idence from ancient fossils indicates the scor'ion may had been among the first land animals. 280 &5.Detties 'iers designed to aid in marine na$igation are constructed 'rimary of wood stone concrete or combinations of these materials. (8.The Barnes <oundation in >erion =ennsyl$ania was chartered in 1522 to 'romotion art education by 'ro$iding art classes and by establishing a 'ublishing 'rogram. 281 282 2004 08 16n tile 'hiloso'hical school of 'ragmatism 22222certainty and there are no absolutes. (A) there is no (B) is there not (C) neither (%) no 2. The femur or thighbone is 2222222in the human body. (A) the bone is longest (B) the longest bone that (C) the longest bone (%) that of which the longest bone &.2222222 different #inds of beans are culti$ated throughout the world. (A) >any (B) +f the many (C) There are many (%) >any are the (. A ma0or source of roc# salt is domes 222222of roc# salt embedded in surrounding layers of earth. (A) are that $ertical cylinders (B) that $ertical cylinders (C) cylinders are $ertical (%) $ertical cylinders /. 3ot s'rings are one of the most characteristic features of areas of recent $olcanic acti$ity although22222 in other areas less abundantly. (A) also to ha$e occurred (B) their occurrence also (C) also occur (%) they do also occur -. 7oa' o'eras a ty'e of tele$ision drama series are so called because at first they were 222such as soa' manufacturers. (A) commercial com'anies by s'onsored (B) com'anies commercial by s'onsored (C) s'onsored by commercial com'anies 283 (%) com'anies commercial s'onsored by .. 6n the early 1588Xs Albert "instein showed222 under s'ecial circumstances matter and energy can be con$erted into one another. (A) in which (B) that (C) what (%) there are ,.222222in the ;nited 7tates began in the eighteenth century when indi$iduals merchants and colonial go$ernments loaned money to one another. (A) Ban#ing (B) *hen ban#ing (C) 6t was ban#ing (%) Ban#ing was 5. By 'erforming s'ecific motions forager honeybees are able to recruit 222222222to gather at a recently disco$ered food source. (A) while their nestmates (B) so that their nestmates (C) their nestmates (%) their nestmates are 18. Although the chemical elements niobium and tantalum are not 1uite 22222222229irconium and hafnium the differences between them are slight (A) as similar (B) as similar as (C) similar than (%) that similar 11. 222222both safety and reliability ha$e always been 'rimary goals of the railway mechanical engineer. (A) @ailroad history (B) @ailroad history includes (C) Throughout railroad history (%) 6n railroad history there are 12. The trum'et is22222of most dance and 0a99 bands. (A) a 'art is im'ortant (B) 'artly im'ortant (C) what 'art is im'ortant 284 (%) an im'ortant 'art 1&. >ost whole mil# undergoes homogeni9ation 2222222hot mil# is 'um'ed through $al$es to brea# u' and 'ermanently dis'erse the fat globules. (A) a 'rocess (B) which 'rocess (C) a 'rocess in which (%) which is a 'rocess 1(. A lingua franca is any auxiliary language 2222222a rudimentary #ind used as a medium of communication between 'eo'le who s'ea# different languages. (A) of which usually (B) which usually of (C) is usually of (%) usually of 1/. 6n 1,-/ the astronomer >aria >itchell became 2222a''ointed to the faculty of Cassar College. (A) as the first woman (B) the first woman was (C) the first woman (%) being the first woman 1-. @e'tiles are found on land and in water but they cannot ali$e in frigid climates because they need the 7unXs warmth to gi$e them energy_ 1.. 7tone tools began to be re'laced around - 888 years ago by metal tools who were used to build instruments and sim'le machines. 1,. +ne of the most famous structures in the world the 7tatue of )iberty is widely considered a ins'iring symbol of ho'e and freedom. 15. Buses were de$elo'ed at the beginning of the twentieth century to com'ete with streetcars by 'ro$iding flexibility greater in routes. 28. Abundant rainfall or irrigation is necessary during the early grow 'eriod of coffee but dry conditions during ri'ening 'roduce beans with the best fla$or. 21. There was at least 2 888 years ago that inhabitants of the !orthwest Coast of !orth America first established trade mutes for obsidian. 22. The sim'lest 'olymers are created when 'ressure or heat causes small molecules alter slightly and lin# together in a long chain. 285 2&. A Canadian =rime >inister must ha$e the su''orti$e of a ma0ority of the members of the 3ouseof Commons to remain in office. 2(. The Ashcan school of 'ainting concentrated on ordinary 22e$en ugly22city scenes rendering they in straightforward con$entional styles that bordered occasionally on illustration. 2/. By the end of the 15/8Ys the suburban 'o'ulation of the ;nited 7tates totaled -8 million a''roximately e1ui$alence to the urban areas of the country. 2-. Because it is often de'endent of the conditions of crystalli9ation the com'osition of the minerals in a roc# can be im'ortant in determining the roc#Xs geologic history. 2.. "ndemic diseases are diseases that habitual infect only those 'ersons li$ing within certain geogra'hical limits. 2,. @egional geogra'hy examines on a regional basis the ways in which the 'eo'le local interact with the en$ironment of the area where they li$e. 25. The >obile @i$er and its tributaries which flow south to the ?ulf of >exico form most im'ortant ri$er system in Alabama. &8. Beneath the surface of the ocean there lies a hidden world inhabit by 'lants and animals we rarely see. &1. Ad$ertisingXs 'rimary ob0ecti$e is to 'resell a 'roduct that is to con$ince consumers to 'urchase an item before they are actually see and ins'ect it. &2. <ats and fixed oils are greasy or waxy substance that ill their 'ure state are normally tasteless colorless and odorless.X &&. +f all the elements in the "arthXs crust oxygen is #nown to be the more common. &(. 6n micro'hotogra'hy 'rocesses 'hotogra'hic are used to re'roduce text or illustrations on film in si9es re1uiring magnification for reading or $iewing them. &/. The round hard2shelled nuts of the macadamia tree grow in clusters and are co$ered with hus#s what s'lit when the nuts are ri'e. &-. The ;nited 7tates 7ocial 7ecurity Act enacted in 15&/ contained three ma0or 'rograms a retirement fund unem'loyment insurance and welfare grants for local distribute. &.. The light 'roduced by lasers is in general far more monochromatic 'owerfully and coherent than that from any other light source. 286 &,. !ineteenth2century ;nited 7tates artist Dohn )a <arge was the 'remier interior designer of his time recei$ing commissions for church interiors 'ri$ate houses and mural. &5. %uring first ten years of the 7'ace Age which began in 15/. more than /88 artificial satellites were roc#eted into orbit around the "arth. (8. 7ettlers streamed into Connecticut @i$er towns in so large numbers between 1.-/ and 1.58 that they nearly doubled the 'o'ulation of 3am'shire County >assachusetts. 287 2004 10 1. 6nertial na$igation 2222 a $ital role in s'ace ex'loration em'loys de$ices called accelerometers to measure accelerations of s'acecraft. (A) it 'lays (B) which 'lays (C) which it 'lays (%) in which 'lays 2. 22222 they rely on external sources of warmth am'hibians in cool regions hibernate through the *inter (A) Because (B) By reason of (C) %ue to (%) 7ince that &. 6n 1,(- 222 agreed u'on the boundaries se'arating what would become *ashington and British Columbia. (A) when the Canadian and ;nited 7tates go$ernments (B) the Canadian and ;nited 7tates go$ernments which (C) with the Canadian and ;nited 7tates go$ernments (%) the Canadian and the ;nited 7tates go$ernments (. =ri9ed for centuries for their beauty roses are 'robably the worldXs 222 'lants. (A) culti$ated ornamental most widely (B) ornamental widely culti$ated most (C) most widely culti$ated ornamental (%) widely ornamental most culti$ated /. 6n area >ontana is the fourth largest state in the ;nited 7tates 2222 it ran#s forty2fourth in 'o'ulation. (A) nor (B) in s'ite of (C) how (%) but -. )arch and s'ruce trees 2222 in bogs and wet areas of the northern ;nited 7tates. (A) found 288 (B) are found (C) ha$e found (%) finding .. +strich eggs are larger 2222of any +ther li$ing animal: they may be 1/8 mm long and 12. mm wide and ha$e a shell 1.5. mm thic#. (A) than those (B) of those (C) those that (%) than ,. Although rain falls throughout most of the world in Antarctica and in a few other 'laces 2222222 'reci'itation occurs as ice and snow. (A) and all (B) all (C) where all (%) it is all 5. 2222 to learn about human origins and e$olution the 'hysical anthro'ologist studies fossil remains and obser$es the beha$ior of other 'rimates. (A) Because trying (B) %o they try (C) There is trying (%) 6n trying 18. 2222 where the American craft mo$ement seems to ha$e flourished most $igorously 'artly through its association with the =rairie 7chool of Architecture. (A) *as the >idwest (B) The >idwest as (C) 6t was the >idwest (%) The >idwest beingQ 11. 2222 as taste is really a com'osite sense made u' of both taste and smell. (A)To which we refer (B)*hat do we refer to (C)That we refer to it (%) *hat we refer to 12. )orraine 3ansberryXs 'lay A @aisin in the 7un was 2222 to be 'roduced on Broadway. (A) the first drama that all African American woman 289 (B)an African American woman whose first drama (C)an African American womanXs drama that first (%) the first drama by an African American woman 1&. *hen changes in the tilt of the "arth relati$e to the 7un shift the location of 7outh AmericaXs warmest 9one 2222 with it. (A) the rains go (B) as go the rains (C)which the rains to go (%) and the rains going 1(. The ;nited 7tates go$ernment shares go$ernmental 'owers with the states under the federal system.2222 by the ;nited 7tates Constitution. (A) established it (B) which established (C) and established (%) established 1/. A challenging new area in inorganic chemistry is 2222 the role of transition metals in the biochemical catalysts called en9ymes. (A) that of understanding (B) to ha$e understanding (C) the understanding (%) understanding that 1-. The hermit crab a crustacean that uses an em'ty shell as a 'ortable refuge to co$er its soft abdomen changes shells as grows. 1.. 6n the mid215-8Xs many artists began to wor#ing outdoors on a large scale ma#ing the landsca'e rather than the studio their arena. 1,. "lectoral 'olitics in the ;nited 7tates has been dominated by two 'olitical 'arties since the administer of ?eorge *ashington. 15. Art %eed a style of design 'o'ular in the 1528Xs and 15&8Xs was used 'rimarily in furniture 0ewel textiles and interior decoration. 28. 6nitially introduced in 1,/2 the gyrosco'e consists a s'inning de$ice usually in the form of a wheel that exhibits strong angular momentum. 21. The membrane surrounding a single2celled animal or 'lant or any indi$idual cell in a multicellular organism is im'ortant in the res'iratory and nutritionally 'rocesses of that cell. 290 22. 6n the nineteenth century mo$ing from crowded Britain to relati$ely s'arsely 'o'ulated !orth America were seen by many British as an act of 'atriotism. 2&. The <ourth Amendment to the Constitution of the ;nited 7tates regulates the right of the go$ernment to search a citi9enXs 'ersonal and 'ro'erty. 2(. The color and 'ageantry #een ri$alry and high le$el of com'etition both contribute to the great worldwide interest in the +lym'ic ?ames. 2/. Although ha$e there been better singers and actresses than "thel *aters none ty'ifies the rise from rags to riches more dramatically than she. 2-. The college that became 3ar$ard ;ni$ersity the oldest institution of higher learning at the ;nited 7tates was founded in Cambridge >assachusetts in 1-&-. 2.. 6n a ecli'se of the 7un the regions of umbra ex'erience total ecli'se and those of 'enumbra 'artial ecli'se. 2,. =aleoanthro'ologists examine fossil remains of extinct 'rimates while 'hysical anthro'ologists concern with ethnology study the beha$ior of 'rimates in their natural settings. 25. >ost ocean wa$es are generated by wind current that agitate the waterXs surface. &8. 7ome seeds are $iable or ca'able of growing into healthy 'lants for only a few days after fall from the 'arent tree. &1. 7tatistics indicate that a''roximate e$ery 22 years22within a range of & to ( years22a ma0or drought occurs in the ;nited 7tates. &2. The wor# of 7arah +arne Dewet care2nineteenth2century writer reflects a concern in the alienating conse1uence of condustriali9ation and urbani9ation. &&. 7eismic wa$es generated by an earth1ua#e or large ex'losion can be recorded thousands of #ilometer from their source. &(. After the ;nited 7tates became inde'endent the cure of more fertile lands drew steadily !ew "nglanders into the +hio Calley and the British colony of ;''er Canada. &/. <ound in all oceans the $arious s'ecies of electric rays use the charge they can generate for both stunning 'rey or warding off 'redators. &-. Barium is a soft hea$y sil$ery white metallic element that readily reacts with another elements to form useful com'ounds. 291 &.. Among the most com'lex crystals are that of silicon dioxide which has se$en different structures at $arious tem'eratures and 'ressures the most common being 1uart9. &,. Animals ha$e to co'e with and control 'hysical and chemical 'rocesses that do not necessarily act to benefit of the animal. &5. By 1,18 the 2& towns of 3am'shire County >assachusetts had reached a remar#able uniform of economic de$elo'ment as well as 'o'ulation density. (8. *ith more than half the worldXs annual yield of /8 million tons of soy beans an im'ortant source of 'rotein is grown in the ;nited 7tates. X#l]2V (h seDre % http>??foru%."h sedre %."o% $=@<A http>??foru%."h sedre %."o%?!ist. spBbo rdidC58 292 2005 01 1-. 6n the eighteenth century 1uilting became a common techni1ue in the American colonies for ma#e of co$erlets sewed in floral and geometric designs. 1.. The com'uter4s com'lex circuitry is miniaturi9ed inside silicon chi's wafer2thin silicon crystals with circuits electronic etched onto them. 1,. Centrifuges are widely use to se'arate li1uids ha$ing different densities or to se'arate solids from li1uids. 15. There is am'le e$idence of that about .88 million years ago glaciers reached well into what are now tro'ical regions. 28. >athematics is a tool that can hel' sol$e 'roblems and lead to new de$elo'ments in other fields such as s'ace flight medical and architecture. 21. The meter of the "nglish 'oetry is determined by accented syllables rather by the 1uantities of $owels. 22. 6n the nineteenth2century ;nited 7tates it was assumed that growth change and 'rogressi$e deri$ed mainly from indi$idual effort and com'etition. 2&. 7welling of the mucous membranes cause by irritants allergies or infections may bloc# the nasal 'assages ma#ing breathing difficult. 2(. The s'earmint 'lant which grows to about three feet height has stal#less lea$es and lax ta'ering s'i#es of flowers that are usually 'in# or lilac. 2/. ?erm theory defined 'recisely how diseases affect tissues and described their 'assage from one li$ing creature to other. 293 2-. The rings of the 'lanet ;ranus consists 'rimary of boulder2si9ed chun#s of dar# matter a$eraging about one meter in diameter. 2.. ?eorge 6nness4 rending of distance and atmos'here raised his art abo$e the ordinarily realism of nineteenth2century American landsca'e 'ainting. 2,. !ot much is it #nown about the details of the de$elo'ment and the ac1uisition of 'rimate communication es'ecially in the wild. 25. Although Alas#a is the state in the ;nited 7tates with the largest area Texas is the one that is di$ide(di$ided) into the largest number of countries. &8. >uch of the early "uro'ean colonist in !orth America remar#ed on the 'rofusion of birds animals and fish. &1. The dancer and choreogra'her Twyla Thar' grew u' in )os Angeles California and hers childhood included com'rehensi$e training in music and dance. &2. Telecommunication systems in$ol$e the transmission of sound 'ictures words and other ty'es of information by electronic means include radio signals and satellite relays. &&. 6n addition to being the state ca'ital Albany is a focal 'oint of trade shi' and commerce in u'state !ew Bor#. &(. )i#e bats dol'hins use echolocation222'ulses of high2fre1uency sound222both to find 'rey and for ex'lore their en$ironment. &/. The American 9oologist %ian <ossey conducted field studies of wild gorillas that dis'ro$ed old beliefs that gorillas were $iolence and aggressi$e. 294 &-. %elaware is the only state which the legislature can amend the state constitution without the a''ro$al of the $oters. &.. The subcutis layer of the s#in contains fat and muscle that insulate internal organ and act as an energy reser$oir for the body X#l]2V (h seDre % http>??foru%."h sedre %."o% (h seDre % $=@<A http>??foru%."h sedre %."o%?!ist. spBbo rdidC58 295 PP Test 1 Test 1 1[1(& 1. >ost doctors of the Colonial 'eriod belie$ed _______ was caused by an imbalance of humors in the body. A. in disease B. that disease C. of disease %. about disease 2. 6n 15.- 7arah Caldwell became _________ at the >etro'olitan +'era 3ouse in !ew Bor# City. A. she was the first woman to conduct B. the first woman conductor C. the woman was first conducting %. the woman conducts first &. +n Danuary . 15// >arian Anderson became _________ to sing a ma0or role at !ew Bor# City4s >etro'olitan +'era 3ouse. A. the first African American B. the first African American was C. she was the first African American %. when the first African American (. =erha's the most significant 'ostwar trend was the decentrali9ation of cities throughout the ;nited 7tates _________ when massi$e highway2building 'rograms 'ermitted greater suburban growth. A. and accelerated a 'henomenon B. a 'henomenon that accelerated C. accelerating a 'henomenon which %. the acceleration of which 'henomenon /. @onald @eagan had ser$ed two terms as go$ernor of California before _________ =resident. A. he became B. when becoming C. became %. did he become -. _________ domesticated gra'es grow in clusters range in color from 'ale green to blac# and contain sugar in $arying 1uantities. A. Their botanical classification as berries B. Although their botanical classification as berries C. Because berries being their botanical classification %. Classified botanically as berries 296 .. The cymbal is ________ in the military band and is also fre1uently used in modern orchestral music. A. a basic instrument B. basic instrument C. how basic an instrument it is %. as an instrument is basic ,. 6n instrumentalist 'hiloso'hy ideas and #nowledge are exclusi$ely functional 'rocessesL they are of significance only _________ instrumental in the de$elo'ment of ex'erience. A. as they are B. are they C. there are %. are 5. _________ either by cooling or by de'ri$ing the fire of oxygen and most do both. A. *or#ing fire extinguishers B. <ire extinguishers that wor# C. <ire extinguishers wor# %. The wor# of fire extinguishers 18. The introduction of mass2'roduction methods enabled many 'eo'le _________ and ga$e them an un'recedented amount of mobility. A. to 'urchase their own automobiles B. their own to 'urchase automobiles C. to their own 'urchase automobiles %. own their automobiles to 'urchase 11. <rances =er#ins _________ of the ;nited 7tates cabinet ser$ed in the cabinet as secretary of labor from 15&& to 15(/. A. the first female member B. was the first female member C. the first female member who %. of whom the first female member 12. *hen _________ to dough and heated carbon dioxide is released causing the dough to rise. A. is added ba#ing 'owder B. added ba#ing 'owder is C. is ba#ing 'owder added %. ba#ing 'owder is added 1&. _________ the 'ercentage of indi$iduals with similar traits in succeeding generations geneticists use the theory of 'robability. A. The calculation of B. To calculate C. 6s calculating 297 %. Calculated 1(. Big2band 0a99 relies on fixed arrangements where _________ than one instrument 'laying some of the 'arts rather than on im'ro$isation. A. is more B. whene$er more C. there is more %. more 1/. Because of _________ di$ersity se$en se'arate grou'ings or di$isions of algae ha$e been established by botanists. A. them B. so that C. those %. their 1-. Chromosomes are regarded today as the ma0or carriers of genetic material _________ of %!A and $arious ty'es of 'rotein. A. consisting B. as to consist C. consist %. which consisting 1.. The leo'ard seal is the only 'inni'ed _________ 'reys on 'enguins and other seals. A. that normally B. of which it normally C. normally %. that it normally 1,. _________ Eno$aF means new no$as are actually stars that ha$e existed for a long time and suddenly flare into brilliance. A. That B. *hy C. Although %. 6t is 15. Because >ars is farther from the 7un than _________ >ars ta#es longer to com'lete a re$olution. A. "arth is B. is from "arth C. what is "arth %. is it "arth 28. A social system is _________ of social relations that draws the beha$ior of its members toward the core $alues of the grou'. 298 A. a com'lex networ# B. how a com'lex networ# C. a com'lex networ# and %. a networ# that is com'lex 21. Bubbles flaws and other irregularities diffuse the light that 'asses through stained glass _________ the glass s'ar#le. A. which ma#ing B. and ma#ing C. ma#ing %. to ma#ing 22. <og is common near _________ inland bodies of water and along coasts in tem'erate 9ones. A. there are large B. large C. either large %. where large 2&. The 'ortrayal of e$eryday life in the ob0ects of fol# art ma#es it _________ $aluable source of history. A. and a B. so that a C. a %. is a 2(. _______ by the ;nited 7tates go$ernment4s Bureau of )abor 7tatistics the Consumer =rice 6ndex com'ares current costs of goods and ser$ices with 'ast costs. A. To 're'are B. As it 're'ared C. *hen 're'aration %. =re'ared 2/. _________ carries the genes which determine the hereditary characteristics of the cell or organism. A. The chromosome B. The chromosome that C. *hereas the chromosome %. There is a chromosome 2-. _________ directly with most metals to form com'ounds called carbides. A. Carbon reacting B. Carbon reacts C. The reaction of carbon %. *hen carbon reacts 2.. >eteorites are slowed down by "arth4s atmos'here but if they are mo$ing _________ they can form a crater on im'act. 299 A. enough fast B. fast enough C. so fast enough % enough are fast 2,. )ocated at the u''er end of each________ an adrenal gland an integral 'art of the endocrine system. A. #idney which is B. #idney is C. #idney being %. #idney 25. About ./ 'ercent of all cadmium is used for cadmium 'lating of _________ such as iron and steel. A. easily corroded metals B. metals are easily corroded C. corroded metals that easily %. how easily metals corroded &8. An atom is a basic structural unit of matter the smallest 'article of an element _________ into chemical combination. A. that can enter B. can it enter C. when entering it can %. that enters can &1. All the ma0or cities of the ;nited 7tates ________ the cities of the ?reat )a#es and the ?ulf of >exico began as centers of trade. A. and to include B. which including C. included %. including &2. 7ettled by "nglish =uritans in 1-&8 Boston became _________ . A. the ca'ital of the >assachusetts Bay Colony B. the >assachusetts Bay Colony its ca'ital C. it was the ca'ital of the >assachusetts Bay Colony %. so that the ca'ital of the >assachusetts Bay Colony &&. !a$igators on shi's and aircraft use a com'ass to determine _________ they are heading. A. the direction in which B. to where the direction C. that direction of which %. where the direction &(. A condenser is a heat exchanger _________ steam or $a'or loses heat and returns to li1uid form. A. what B. in which 300 C. in whose %. that &/. =ublished in 15/. Dohn Chee$er4s first no$el The *a'shot Chronicle earned _________ the !ational Boo# Award. A. that he had B. him C. was his %. to him &-. As seen from the "arth at night _________ 'lanet Du'iter ran#s third among the 'lanets and stars in maximum brightness after Cenus and >ars. A. when the B. in which the C. the %. and the &.. _________ 'roduces a crimson glow in a $acuum tube and is used extensi$ely in ad$ertising dis'lays. A. !eon that B. *hen neon C. !eon %. There is neon &,. Cha'arral consists of _________ stunted by short wet winters followed by long dry summers. A. are trees and shrubs B. how trees and shrubs C. trees and shrubs ha$e %. trees and shrubs &5. The >onroe %octrine of 1,2& was _________ of ;nited 7tates 'olicy concerning the acti$ities and rights of "uro'ean 'owers in !orth and 7outh America. A. when a statement B. as a statement C. a statement %. to a statement (8. _________ to stand in a warm 'lace it sours because of the 'resence of bacteria that con$ert mil# sugar into acid. A. *hen mil# is allowed B. *hen is mil# allowed C. >il# when allowed %. *hen mil# allowed (1. *hile 'lay is im'ortant at all le$els of human de$elo'ment _________ ta#es on 'articular significance when children are fi$e and six years old. 301 A. it B. and C. which %. because it (2. %uring the second and third years of life children gain _________ o$er their bodies. A. control increasing B. increasing to control C. control is increasing %. increasing control (&. All brass instruments use a mouth'iece _________ into a long cone2sha'ed tube. A. is inserted B. that inserted C. that is inserted %. and inserted ((. _________ as children that most 'eo'le first come in contact with myths. A. *hen B. 6t is C. There are %. That is (/. By the mid2twentieth century ;nited 7tates 'residential staffs _________ had numbered fewer than ten a century earlier numbered in the hundreds. A. as B. that they C. which %. and (-. 6n 15-- only -8 'ercent of all fi$e year olds in the ;nited 7tates attended #indergarten _________ in 15,/ almost ,2 'ercent did so. A. with B. which C. whether %. while (.. _________ industries in$entions and communal endea$ors of the 7ha#ers the best #nown is their fine furniture. A. +f the many B. Their many C. Are the many %. >any of the (,. >ost fishes and many re'tiles ha$e ribs along most of the s'ine but in mammals _________ only in the chest area. 302 A. they are found B. finding them C. in which they are found %. are found (5. Although the habitat of the American beech tree is now confined to the eastern ;nited 7tates and southeastern Canada _________ extended as far west as California. A. where it once B. once C. it once %. and once /8. >ost of !orth America recei$es _________ some form of continuous 'lant co$er exce't in the arid and semiarid 7outhwest. A. moisture to sustain sufficient B. sufficient moisture to sustain C. to sustain sufficient moisture %. sufficient to sustain moisture /1. _________ denotes currency in circulation 'lus ban# de'osits. A. The term Emoney su''lyF B. The term is Emoney su''lyF C. *hen the term Emoney su''lyF %. E>oney su''lyF is the term /2. The <ran#lin sto$e in$ented around 1.(2 ________ originally with a 'artially o'en front and was designed to fit into a fire'lace. A. was made of cast iron B. cast iron was made of C. cast of iron was made %. was of iron made cast /&. A few s'ecies of mushrooms cause death or serious illness _________. A. ha$ing eaten B. that they are eaten C. are eaten %. when eaten /(. 7ome critics maintain _________ the mystery no$el is a symbolic ritual of guilt and retribution. A. is that B. that there is C. it is %. that //. _________ all cherry trees are $ery attracti$e when in bloom some s'ecies with inferior fruit are culti$ated es'ecially for their flowers. 303 A. Although B. There are C. 6t is %. That /-. ;sually 'itched in the of C _________ may be tuned to B flat by means of a slide. A. the bugle B. because of the bugle C. the bugle that %. but the bugle /.. *ith _________ formal art training and largely self2educated Anna >ary >oses #nown as ?randma >oses began to 'aint rural scenes at the age of se$enty2eight. A. not B. no C. neither %. ne$er /,. A bloc# and tac#le is a _________ of 'ulley bloc#s and ro'es used for 'ulling or hoisting large ob0ects. A. mechanical set s'ecial B. set s'ecial mechanical C. s'ecial mechanical set %. s'ecial set mechanical /5. Although _________ instant critical acclaim in 15/2 he ne$er com'leted a second no$el 'ublishing many short wor#s instead. A. 6n$isible >an was the first no$el by @al'h "llison recei$ed B. first recei$ed by @al'h "llison the no$el 6n$isible >an was C. @al'h "llison4s first no$el 6n$isible >an recei$ed %. @al'h "llison4s first no$el 6n$isible >an was recei$ed -8. 7auro'ods had _________ smallest brains relati$e to body weight of any grou' of dinosaurs yet they were among the most successful of all dinosaurs in e$olutionary terms. A. what was a B. when a C. of the %. the -1. At the time of Columbus4 $oyages !ati$e Americans used an astounding di$ersity of languages ________ the di$ersity used by "uro'eans. A. the greatest by far B. by far than greater C. by far the greatest %. greater by far than 304 -2. %uring the 3arlem @enaissance of the 15284s much African American writers artists and musicians came to 3arlem in !ew Bor# City creating a cultural center there. -&. 6n Concord >assachusetts there is a museum commemorating the life of )ouisa >ay Alcott the author the nineteenth2century no$el )ittle *omen. -(. )actose a sugar 'resent in mil# is one of sim'le sugars used in food 're'arations for infants. -/. Dac#son >ichigan a city who was settled in 1,25 was named for Andrew Dac#son the se$enth =resident of the ;nited 7tates. --. Boulder Colorado is only city in the ;nited 7tates that deri$es its water su''ly from a glacier. -.. Construction of first s#yscra'er began in Chicago in 1,,& with the ten2story 3ome 6nsurance Building. -,. The >ississi''i ri$erboat which e$ol$ed from sim'ler steamshi' of the early 1,884s became the dominant form of 'assenger trans'ort on the >ississi''i @i$er. -5. >odern stringed instruments com'rise both instruments of ancient origin such as the har' and the de$elo'ed recently family of bowed instruments that includes the $iolin. .8. 7tars 'ro$ided early astronomer with a reference system for measuring the motions of 'lanets the >oon and the 7un. .1. The coal industry is im'ortant to e$ery industrial nations because most other industries are directly or indirectly de'endent on it. .2. The brightly colored #ingfisher that 'erches until it sights a fish then di$es into the water to catch its 'rey. .&. !e'tune circles the 7un once e$ery 1-(., "arth years and its day 222 one rotation its axis 222 is 1/., hours. 305 .(. +bser$able comets are occasionally attracted toward the inner 7olar 7ystem by the fields gra$itational of nearby stars and giant molecular clouds. ./. A single bacterium has the 'otential to 'roduce 1- million co'ies of themsel$es in a day. .-. Atoms are held together by the electrical forces of attraction between each negati$e electron and a 'ositi$e 'rotons within the nucleus. .,. 6cebergs are usually white blue or green e$en although some are blac# due to roc# material incor'orated in them . .5. Both adult ladybugs and their lar$ae are $oracious eaters of a'hids scale insects and another 'lant 'ests. ,8. "arly "nglish burles1ue often ridiculed celebrated literary wor#s and sentimentally drama. ,1. The American cli''er shi' era was of duration short extending from about 1,(/ to 1,/5. ,2. Crystals of 'ure 1uart9 usually called roc# crystal are coarseness colorless and trans'arent. ,&. +f 128 minerals #nown to ha$e been used as gemstones only about 2/ are in common use in today 0ewelry. ,(. +ne of the thirteen original state of the ;nited 7tates !orth Carolina lies on the Atlantic coast midway between !ew Bor# and <lorida. ,/. The $arious 'eo'les who de$elo'ed !orth America ha$e made it a world leader economic . ,-. The >il#y *ay is a flat s'iral galaxy who contains an estimated 188 billion stars including the 7un. ,.. The 'iano as it is #nown today re'resents a long series of ex'eriments extend bac# to the year 1.11 or 'erha's e$en earlier. 306 ,,. Climate is the 'rimarily force that distinguishes one biome or ma0or terrestrial region from another. ,5. =rehistoric $illagers tended to wor# harder suffer from more diseases and eat the 'oorer diet than nomadic hunters did. 58. A ma0or Canadian city >ontreal is second only to =aris as the most largest <rench2s'ea#ing city in the world. 51. Archaeological and geological exca$ations indicate which a 'rimiti$e ty'e of corn was used as food in !orth America at least . 888 years ago. 52. The ma0or com'onent of the sedimentary roc# called shale is clay an earthy fine2grained material consisting 'rimary of a 'articular grou' of crystalline minerals. 5&. Co''er was the first metal used by humans and is second only to iron into its utility through the ages. 5(. The mineral chalco'yrite usually is found in com'act masses or in mixtures with $arious other mineral as o'a1ue brass2yellow tetragonal crystals. 5/. Because the study of chemistry encom'asses the entire material uni$erse it is central to the understand of other sciences. 5-. Cyclamates were introduced in the early 15/84s as alternati$e sweeteners for use by indi$iduals who needed reducing their sugar inta#e for medical reasons. 5.. The 'ericardium a double2layered sac it surrounds the heart and the large $essels entering and lea$ing the heart. 5,. The 3o'i descendants of the 'rehistoric Anasa9i 'eo'le are a =ueblo 'eo'le who of the southwestern ;nited 7tates. 307 55. A storyteller exercises close control o$er the storytelling ex'erience by the choice of words their arrangement and their effecti$e. 188. 6ron is one of the basic element of which the world is made. 181. The 'resident and $ice 'resident are the only 'ublic officials in the ;nited 7tates choose in a nationwide election which ta#es 'lace e$ery four years. 182. %eri$ed from the conce't of natural law is the theoretical that indi$iduals 'ossess inalienable natural rights as stated in the ;nited 7tates %eclaration of 6nde'endence. 18&. The ;nited 7tates national debt was relati$ely small until the 7econd *orld *ar during when it grew from O(& billion to O2/5 billion in 0ust fi$e years. 18(. Brass is stronger than either the co''er and 9inc of which it is com'osed. 18/. 6n the traditional sense a molecule is smallest 'article of a chemical substance ca'able of inde'endent existence while retaining all of its chemical 'ro'erties. 18-. The able of a clarinet to blend and contrast with other instruments ma#es it 'o'ular for chamber music and as a solo instrument. 18.. =henoty'ic traits such as si9e or s#in color result to the interaction between an organism4s genetic ma#eu' and the en$ironment in which the organism de$elo's. 18,. To classical scholar rhetoric was im'ortant in three s'heres of human interactionL in law courts in legislati$e assemblies and in 'ublic forums. 185. The star# boxy forms of "uro'ean modernist architectural dominated ;nited 7tates citysca'es in the building boom following the 7econd *orld *ar. 118. 7ub0ects of Cecilia Beaux4s 'aintings included 'rominent figures in go$ernment the arts and financial but her strongest wor#s are 'ortraits of family members and friends. 308 111. By 1528 the area of the ;nited 7tates under culti$ation had more than doubled in 0ust /8 years and the national 'o'ulation that sur'assed 188 million. 112. 7ome areas of the dee' sea are $ulnerable fre1uent natural disturbances ta#ing the form of intense currents mud slum's low oxygen and u'wellings. 11&. 6n the ;nited 7tates the first roads were 'a$ed in colonial times first with logs latest with cobblestones or bric# de'ending on the region. 11(. 6n 'hysics sound is considered to be the wa$es of $ibratory motion nether or not they are heard by the human ear. 11/. +$er one thousand mineral are #nown most of which are characteri9ed by definite chemical com'osition crystalline structure and 'hysical 'ro'erties. 11-. The layers of an ele'hant4s tus# are de'osited from the 'ul' yet that the innermost layer is the newest. 11,. *hen ex'elled from the nucleus of an atom a neutron is unstable and decay to form a 'roton and an electron. The monument is decaying after years of neglect 128. Automobile insurance com'ensates only not for fire and theft but also for damage caused by a collision and for in0ury to $ictims of an accident. 121. 6m'ortance as foods carbohydrates su''ly energy and are used to ma#e fats. 122. Because banana 'lants yield only one bunch of fruit each 'lant is cut down after 'roduces bananas. 12&. <lash 'hotogra'hy is widely used for ta#ing 'ictures when the natural light is insufficient such as outdoors at night and indoors most of time. 309 12(. The s'ecific 'ur'ose ser$ed by a storage dam will influence its design and determined the amount of reser$oir storage needed. 12/. 6n 1,,5 Dane Addams founded 3ull 3ouse an institution in Chicago where she and other socially reformers li$ed and wor#ed to im'ro$e urban li$ing conditions. 12-. "arly ;nited 7tates re$olutionaries sha'ed an orderly 'rocesses by which frontier territories would mo$e from colonial status to statehood. 12.. 6n music caco'hony is discordant sounds false harmony or noisily and inharmonious combinations of sounds. 12,. 7mall to medium2si9ed marsh birds similar in body sha'e by cranes rails are found throughout the world exce't in the 'olar regions. 125. The com'letion of the first transcontinental railroad in 1,-5 ga$e California its first direct rail connection with a rest of the ;nited 7tates. 1&8. *hilhelmina Cole 3olladay she was the founder and first 'resident of the !ational >useum of *omen in the Arts in *ashington %C. 1&1. As sweeteners there is $ery small difference between honey and sucrose although the former does contain minimal 1uantities of $itamins minerals and amino acids. 1&2. Culti$ated for salad since ancient times lettuce is har$esting before its flower stem shoots u' to bear its small yellow flowers. 1&&. =honological structure encodes s'ea# sounds as a se1uence of $ocal tract configurations 222 successi$e 'ositions of the larynx 0aw li's tongue and $elum. 1&(. The steamshi' contributed of the de$elo'ment of fast news2gathering during the nineteenth century. 1&/. The 1,,84s saw not only the creation of the curtain wall and wind2braced iron frame also the architectural mastery of these structural de$ices. 310 1&-. A century ago women made 1uilts only not to #ee' their families warm but also to ex'ress their artistic abilities. 1&.. The building #new as the Ca'itol is situated on Ca'itol 3ill in *ashington %.C. and it houses the legislati$e branch of the ;nited 7tates go$ernment. 1&,. A 'erson or business with more debts than assets for meeting debt 'ayment may to declare legal ban#ru'tcy. 1&5. The first stethosco'e222the #ind of instrument what has come to symboli9e medicine around the world 222was constructed in 1,1-. 1(8. 6t is said that no 'otential frontier has such fired the imagination or challenged the ingenuity of human#ind as has s'ace. 1(1. The Congress of the ;nited 7tates can initiate legislation and significantly amend or re0ection =residential legislati$e 'ro'osals. 1(2. Through his 'aintings "dward 3o''er de'icted the isolation lonely and lac# of $ariety of the daily life of small2town America. 1(&. The chief editorial concern in maga9ine 'ublishing is 'resenting a mix of news information and entertain all targeted at the audience the maga9ine see#s to reach. 311 PP Test 2 Test 2 1[1(& 1. 7and is formed by the weathering and decom'osition of all ty'es of roc# _________ most abundant mineral constituent being 1uart9. A. and its B. since its C. its %. it is 2. _________ in the daytime for most of the year the groundhog hibernates in a burrow during winter. A. 6s acti$e B. That it is acti$e C. Acti$e %. *hile is acti$e &. The wood of elm trees is used in shi'building and in _________ barrels furniture flooring and s'orting goods. A. to ma#e B. as made C. ma#ing %. to ha$e made (. 6n 1,-. @ussia sold Alas#a to the ;nited 7tates and in 15/, _________ the forty2ninth state. A. Alas#a4s becoming B. Alas#a became C. when Alas#a became %. Alas#a to become /. Almost _________ countries use the decimal system. A. all B. all of C. all of which %. of all -. _______ allows the s#in and thus the body to be cooled. A. 7weat e$a'orates B. *hen sweat e$a'orates C. 7weat the e$a'oration of which %. The e$a'oration of sweat 312 .. Acti$ities such as writing down notes will generally lead to faster learning _________0ust listening to or reading facts. A. than B. than is C. whereas %. in that ,. The %allas Ci$ic +'era has earned _________ since its initial 'roduction debuted in 15/.. A. an international re'utation and B. an international re'utation was C. what an international re'utation %. an international re'utation 5. Born in A#ron +hio in 1,(- 3enry "ugene Abbey became the ________ of the >etro'olitan +'era 3ouse in !ew Bor# City in 1,,&. A. first manager was B. first manager C. manager who first %. manager was the first 18. A co$ered bridge is built of wooden timbers _________ su''orting trusses and a floor and are 'rotected from weather by a roof. A. when form B. so form C. form %. that form 11. Although _________ with herons or stor#s cranes are distinguished from these birds by bare red areas or ornamental 'lumes on their heads. A. they are often confused B. how often they are confused C. that they are confused often %. are they confused often 12. >ore battles were fought in 7outh Carolina _________ in any other state during the American @e$olution. A. as B. although C. than %. but 1&. Cotton is grown throughout the world and _________ year about /8 million bales weighing nearly /88 'ounds a'iece are 'roduced. A. each B. a C. by a 313 %. in which 1(. Based on a de$ice used in na$al $essels the automatic 'ilot contains gyrosco'es _________ references for an air'lane4s course. A. 'ro$ides B. that 'ro$ide C. that 'ro$iding %. and to 'ro$ide 1/. American 7ign )anguage contains o$er ( 888 signs _________ is used by o$er half a million 'eo'le. A. and B. although C. whene$er %. also 1-. _________ founded the American @ed Cross in 1,,1 and ser$ed as its 'resident until 158(. A. Clara Barton who B. Although Clara Barton C. 6t was Clara Barton %. Clara Barton 1.. _________ two air masses with different characteristics meet an area called a EfrontF de$elo's. A. *hat B. There are C. *hen %. Being 1,. Today4s farmers use irrigation fertili9ers large machines and other technology _________ high cro' yields. A. in the 'roduction B. for 'roduction C. to 'roduce %. 'roduce 15. ________ ser$ed as secretary of war under the Articles of Confederation and also in ?eorge *ashington4s administration under the ;nited 7tates Constitution. A. *hen 3enry Jnox B. 6t was 3enry Jnox C. 3enry Jnox %. 3enry Jnox who 28. The course of the >issouri @i$er mar#s the ________ of continental glaciation. A. a''roximate southern limit B. limited a''roximately southern C. southern limit and a''roximately 314 %. limit that a''roximately southern 21. About three21uarters of the state of 6ndiana is co$ered by _________. A. which farmland B. such farmland is there C. farmland %. it is farmland 22. Also called the 'ainted cu' the 6ndian 'aintbrush gi$es forth tiny flowers that are mostly green while ________ brightly colored. A. its lea$es B. it lea$es being C. are its lea$es %. its lea$es are 2&. _________ .8 s'ecies of coc#roaches in the ;nited 7tates. A. 7ince about B. Are about C. About %. There are about 2(. ______ difficult to achie$e centrifugal forces thousands of times as great as the force of gra$ity. A. There is not B. *hile not C. *hat is not %. 6t is not 2/. 6n the early nineteenth century a Conestoga wagon on a 'oor road could economically _________ light fairly high2$alue goods o$er short distances. A. only while carrying B. carry only C. it was only to carry %. only carrying its 2-. The solid2bodied electric guitar mixes and am'lifies $ibrations from micro'hone contacts at different 'oints _________ a range of tone 1ualities. A. 'roduce B. to 'roduce C. a 'roduction %. and 'roducing 2.. *hile the term EharmonyF suggests a 'leasant or agreeable sound it is a''lied to any combination of notes _________ consonant or dissonant. A. which B. such C. neither %. whether 315 2,. >ost meteorites are thought to be fragments from asteroids _________ some may be 'ieces from the heads of comets. A. des'ite B. either C. although %. but if 25. =enicillin ________ #ills a broad s'ectrum of bacteria many of which cause disease in humans. A. the first antibiotic to be disco$ered B. when the first antibiotic to be disco$ered C. the first antibiotic that disco$ered %. was the first antibiotic to be disco$ered &8. Action 'ainting em'hasi9es the 'hysical act of a''lying 'aint to can$as rather _________ 'icture as a finished wor# of art. A. the B. from the C. than the %. is the &1. Contrary to 'o'ular belief the basic instruments of the old 0a99 bands were not saxo'hones _________ cornets and trum'ets. A. or not B. but C. instead %. neither &2. _____ $ary greatly in sha'e and form de'ending u'on both the growth 'attern and the arrangement of 'oly's within the colony. A. 7ince coral colonies B. Coral colonies that C. Coral colonies although they %. Coral colonies &&. The transition element cadmium is 'laced below 9inc and abo$e mercury in the 'eriodic table _______ many 'ro'erties in common with these elements. A. and its B. and ha$ing C. and it has %. and &(. The co$ered wagons #nown as Conestogas were 'rimarily used _________ of freight across the 'rairies of the ;nited 7tates. A. hea$y loads were carried B. to carry hea$y loads C. the carrying of hea$y loads 316 %. in hea$y loads carrying &/. The outstanding feature of co''er and the other metals of ?rou' 6B in the =eriodic Table is _________ chemical attac#. A. resists B. to resisting C. their resistance to %. by resistance &-. *hen _______ with atmos'heric 'articles they create many ty'es of secondary 'articles including 'ositrons mesons and hy'erons. A. the collision of 'rimary cosmic rays B. 'rimary cosmic rays collide C. 'rimary cosmic rays colliding %. do 'rimary cosmic rays collide &.. A common way to 'roduce x2rays is _________ electrons into a co''er target. A. fires B. fired C. by firing %. how to fire &,. _________ in 1,88 >iddlebury College is the oldest college in Cermont. A. +'ened B. +'ened it C. The o'ening %. There was o'en &5. )i9ette *oodworth @eese4s best2#nown 'oem is the sonnet ETears F _________ in 1,55 in 7cribner4s >aga9ine. A. to 'ublish B. 'ublished C. to 'ublish it %. was 'ublished (8. %uring the @e$olutionary *ar )ancaster =ennsyl$ania was the ca'ital of the ;nited 7tates for one day in 1... _________ there. A. was when the Continental Congress sto''ed B. when did the Continental Congress sto' C. the Continental Congress when it sto''ed %. when the Continental Congress sto''ed (1. 6n a barter economy a 'erson ha$ing something to trade must ma#e contact with another 'erson ________ and has something acce'table to offer in exchange. A. and who wants it B. wants it 317 C. who wants it %. who does it want (2. The chief 0ustice of the ;nited 7tates is the country4s _________ and is a''ointed by the =resident with the a''ro$al of the 7enate. A. 0udicial officer highest B. officer 0udicial highest C. officer highest 0udicial %. highest 0udicial officer (&. 6ncluding land and water the state of Alas#a ________ an area of 1 /&8 .88 s1uare #ilometers e1ual to about one2sixth of the si9e of the ;nited 7tates. A. ha$ing B. where there is C. which is %. has ((. _________ until the twelfth century that the magnetic com'ass was used for na$igation. A. 6ts not being B. 6t was not C. !ot %. *as not (/. Although she wrote only two short no$els and 15 stories during her brief career <lannery +4Connor made _________ to ;nited 7tates fiction. A. a contribution is im'ortant B. an im'ortant contribution C. a contribution and im'ortant %. is an im'ortant contribution (-. The !ew Bor# City Ballet has been _________ of ;nited 7tates classical ballet com'anies since its ince'tion in 15(-. A. the consistently creati$e most B. consistently creati$e the most C. most creati$e the consistently %. the most consistently creati$e (.. *hen condensation occurs close to the ground _________ results in fog or dew. A. or B. the C. it %. then (,. %es#to' 'ublishing systems are ca'able of _________ camera2ready 'ages made u' of text and gra'hics with text set in different ty'efaces and si9es. A. when 'roducing 318 B. 'roduce C. to 'roduce %. 'roducing (5. The femur is the _________ in the body. A. bone is the largest and longest B. largest and the longest bone that C. largest and longest bone %. bone largest and longest and /8. 7'urred by the 'henomenal growth of the city of Chicago after the Ci$il *ar 6llinois became ________. A. that a ma0or industrial state B. to a ma0or industrial state C. a ma0or industrial state %. to be a ma0or industrial state /1. _________ from the Caribbean islands ex'lored the area now #nown as Texas and !ew >exico as early as the sixteenth century. A. 7'aniards who B. As 7'aniards C. *hen 7'aniards %. 7'aniards /2. 6f $olcanoes eru't ex'losi$ely and cast fluid la$a high into the air _________ dis'ersed by the wind gi$es rise to 'articles of $arious si9es. A. the la$a B. and la$a C. when la$a %. which la$a is /&. !orth America dis'lays more ________ than any other continent exce't Asia: only a true tro'ical en$ironment is absent. A. $ary climate B. climate $aried C. climatically $aried %. climatic $ariation /(. !eurobiologists belie$e _________ endor'hins and other neurochemicals may control our hunger for certain #inds of foods. A. whose B. that if C. that %. of those 319 //. A feature of Carlsbad Ca$erns in !ew >exico is the nightly emergence exce't during the winter hibernation 'eriod of _________. A. se$eral bats million B. bats million se$eral C. se$eral million bats %. million se$eral bats /-. _________ -&5 named muscles in the human anatomy. A. As are B. There are C. +f the %. That are /.. _________ or striated muscles are sub0ect to the will and control of the body and are attached to the s#eleton by tendons. A. The $oluntary are B. There are $oluntary C. That the $oluntary %. The $oluntary /,. +rchestra conductor >ichael >organ became interested in classical music as a high school student when _________ rehearsals of the !ational 7ym'hony in *ashington %.C. A. beginning his attending B. did he begin attending C. he began attending %. began attending his /5. Cirtually the same array of mammals _________ in the hills surrounding )os Angeles today occu'ied this area in the late =leistocene era. A. that they li$e B. li$es C. that li$es %. that li$ing -8. *ood has been the _________ for furniture since anti1uity. A. commonly most material used B. used material commonly most C. commonly material used most %. most commonly used material -1. Because of the com'lexity of modern society it is not _________ that many of the games ordinary 'eo'le 'lay are solitary games. A. sur'rises B. sur'rised at C. sur'rising %. sur'rise 320 -2. Cartogra'hy the science and art of designing drafting and create ma's and charts is older than the art of writing. -&. 6t seems 'robable that 'rehistoric 'eo'le who disco$ered by trial and error which 'lants were 'oisonous and which had some medicinal $alue. -(. %e$elo'ed from the medie$al mandola the modern mandolin has four 'airs of string tuned to $iolin 'itch and 'roduces a clear bright tone. -/. =hotogra'her "dward 7teichen constantly ex'erimented new techni1ues and materials in his 1uest to ha$e 'hotogra'hy acce'ted as a creati$e art. --. >aine is almost as large than the fi$e other !ew "ngland states combined but contains only about 5 'ercent of !ew "ngland4s 'o'ulation. -.. The area of the ;nited 7tates was doubled as a result of the )ouisiana =urchase which made in 1,8&. -,. +a# trees furnish more timber annually in the ;nited 7tates than any of other broad2lea$ed tree and are second only to conifers in total lumber 'roduction. -5. Although months or e$en years may 'ass without rainfall in 'arts of some deserts they are ne$er com'lete dry. .8. "ducation in the ;nited 7tates is o$erseen by local school districts which follow regulations mandated by their res'ecti$e state go$ernment. .1. ;' to &8 'ercent of the blood 'um'ed with each heartbeats goes directly to the li$er. .2. 6f atoms are 'ush together by high 'ressure or sub0ected to high tem'erature they can rearrange themsel$es within minerals without changing their o$erall com'osition. .&. )ight from the 7un can 'enetrate only a few hundred meters below surface of the ocean. 321 .(. The surface of Cenus is obscured by the 'lanet4s thic# clouds yet so is in$isible to o'tical instruments. ./. The Andromeda galaxy li#e the >il#y *ay is orbited by se$eral com'anion galaxies but contains about as twice many stars. .-. 6n art caricature is a 'ictorial re'resentation which the 'hysical features of a 'erson or ob0ect ha$e been grossly exaggerated for comic effect. ... =hiloso'hy has much as'ects and different manifestations according to the 'roblems in$ol$ed and the method of a''roach used by the indi$idual 'hiloso'her. .,. <ound in wild woods and stony 'laces the Canterbury bell ne$er flowering until the second (and final) summer of its life. .5. )a#e >ead one of the largest artificial la#e in the world in ca'acity is formed by 3oo$er %am. ,8. The alligator sna''ing turtle weighing u' to -, #ilograms is one of the largest freshwater turtle. ,1. Cli''er shi's were designed for maximum s'eedy and were used for trans'ortation to and from the gold rush regions of California and Australia. ,2. As the centrally control organ of the body the brain go$erns the functioning of the body4s other organs. ,&. The 6nuit 'robable first came to !orth America by crossing the Bering 7trait landbridge from Asia about ( 888 years ago. ,(. =reci'itation in mountainous regions that collects in a number of small $alleys that are called rills and gullies. ,/. 7uction dis#s along the body of the sea cucumber 'ro$ides locomotion and tentacles around its mouth are used to catch food. 322 ,-. The numerous Cro2>agnon burial sites that been found re$eal that these early humans li#e the 'receding !eanderthalers engaged in $arious ritual acti$ities. ,.. <rom the 1,,84s on artist >ary Cassatt increasingly de$oted herself to the theme of mother and child in oils 'astels etchings and engra$ed. ,,. ?laciers hel'ed creation the thousands of la#es for which the state of >innesota is famous. ,5. Al'ha rhythm a brain wa$e fre1uency of moderate $oltage is characteristic of a 'erson when is awa#e but relaxed. 58. The amount of money generated by a nation in a year in the forms of wages rents interest and 'rofits is #nown the national income. 51. 6n !orth America the name chameleon is 'o'ularly gi$en to se$eral li9ards ca'able of change color. 52. !aturally occurring ca$es are formed in $arious way but chiefly by the sol$ent action of water and com'ounds in it. 5&. Clouds 'erform a $ery im'ortant function in modifying the distribute of solar heat o$er "arth4s surface and within the atmos'here. 5(. @agtime is a musical form de$elo'ed and brought to maturation between 1,58 and 1518 which is rooted in se$eral musical tradition. 5/. The 'eccary an American mammal is closely related to the swine family and fills an ecological similar role. 5-. The teaching of literary and com'osition has figured 'rominently in the formation of educational curriculums in the ;nited 7tates at all le$els. 5.. The s'ice 'lants what yield the 'ungent and fragrant substances used all o$er the world as condiments are almost all nati$es of tro'ical regions. 323 5,. ;ltrasonic wa$es $ibrate such ra'idly that they 'roduce sounds that are too high for the human ear to detect. 55. Contem'orary election 'ractices in the ;nited 7tates ha$e their roots in British and colonial American laws and customary. 188. The degree of 'hysical fitness that anyone can de$elo' is go$erned by age sex 'hysi1ue and other natural factor. 181. The migration route of the first humans to occu'y !orth America too# them across a land bridge that once was connected Asia with what is now Alas#a. 182. 7ociali9ation which begins in child is a 'rocess by which 'eo'le become members of a society learning its norms customs laws and ways of li$ing. 18&. =oet Amy )owell began her career by 'ublishing the con$entional $olume A %ome of >any2 Coloured ?lass des'ite e$entually succeeded "9ra =ound as leader of the 'rogressi$e 6magists. 18(. The towns of >iddlebury and Cornwall both in Cermont was united into the single town of >iddlebury in 1.5-. 18-. *hile the late nineteenth century most laborers in the ;nited 7tates wor#ed six days a wee# often ten or more hours a day. 18.. Chordo'hones are musical instruments with strings that can be set in motion by mo$ing a bow 'luc#ing a string or stri#ing . 18,. The 'ro'ortion of ;nited 7tates households owning tele$ision recei$ers rose from 8.( 'ercent in 15(, of 2&./ 'ercent in 15/1. 185. The chief character or hero of 'iece of fiction or drama is #nown as the 'rotagonist. 118. A drought is a 'eriod of dry weather that lasts too long enough to cause a serious imbalance in the water cycle. 324 111. Cotton cro' failures and a 'lague of boll wee$ils at the beginning of the twentieth century forced the di$ersification of Alabama4s the agriculture. 112. Although absolute 9ero cannot actually be reached a''roximations of less than 8.881 degrees Celsius abo$e absolute 9ero ha$e been created the laboratory. 11&. That brought about the wides'read extinction of the dinosaurs is un#nown: it must howe$er ha$e in$ol$ed ma0or changes in the en$ironment. 11(. 7tructuralism and it deri$ati$e theories es'ecially deconstructionism ha$e 'ro'osed to alter drastically the direction of literary studies during the last thirty or thirty2fi$e years. 11/. The northwest coast of !orth America was originally settled by a series of tribal with extremely di$erse linguistic affiliations. 11-. After the *ar of 1,12 immigrants from Britain and 6reland swelled the 'o'ulate of Canada. 11.. The ra'idly ad$ancement of modern anthro'ology since the end of the nineteenth century has been the most im'ortant single influence on the growth of myth criticism. 11,. Although 7'aniards had ex'lored u''er California much earlier they did not attem't to settle there until the latter 'art the eighteenth century. 115. Although co''er was hammered into tools and ornaments by some early inhabitants of !orth America the smelting and casting of co''er were un#nown between them. 128. As moist air in a warm front ascends the retreating wedge of cold air it cools to 'roduce cloudy and fre1uently causes 'reci'itation. 121. Choreogra'her >artha ?raham4s 'ioneering techni1ue designed to ex'ress inner emotion through dance forms re'resentati$e the first real alternati$e to classical ballet. 122. A in#20et 'rinter wor#s by s1uirting $ery fine streams of 1uic#2drying in# onto 'a'er. 325 12&. The 'ro'erties of coca are similar to those of o'ium but coca is not such strong a narcotic. 12(. 6dentical twins are always of the same sex resemblance one another $ery closely and ha$e similar finger'rints and blood grou's. 12/. The great bul# of business transactions in the ;nited 7tates is handled by means of credit instruments rather currency. 12-. The outstanding feature in the e$ol$e of the central ner$ous system in humans has been the growth of the brain. 12.. +n )ong 6sland4s >ontau# =oint are located a stone lighthouse 1-, feet high e1ui''ed with a flashing light white and a ;nited 7tates lifesa$ing station. 12,. )oons migratory a1uatic birds are ex'ert swimming and di$ers but wal# on land with difficulty. 125. ;sually only the males grassho''ers 'roduce a song but both sexes 'ossess auditory organs. 1&8. 6ntricate choreogra'her em'hasi9ed the beauty and $irtuosity of the nineteenth2century 'rima ballerina while the male dancer functioned only as her 'artner until the twentieth century. 1&1. %ol'hins can held their breath for u' to se$eral minutes and are ca'able of ra'id and dee' di$es of more than &88 meters. 1&2. The conce't of fol# music though generally understood by most 'eo'le has not sim'le widely acce'ted definition. 1&&. The two steel towers of the ?olden ?ate Bridge in California are the tallest bridge towers in the world each measuring 22. meters in high. 1&(. 6nde'endence 3all in =hiladel'hia =ennsyl$ania is where the %eclaration of 6nde'endence also the ;nited 7tates Constitution were signed. 1&/. <rom 1,52 to 15/( "llis 6sland was an immigration station through which some 28 million immigrant entered the ;nited 7tates. 326 1&-. 6nterstellar matter interce'ts some of the $isibly light emitted by distant stars so that obser$ers on "arth cannot $iew in detail distant 'arts of the >il#y *ay. 1&.. *or#ing by chemical reaction and being inde'endence of atmos'heric oxygen roc#ets are used to 'ower inter'lanetary s'ace $ehicles. 1&,. *ind and oceans currents may mo$e icebergs thousands of #ilometers from their resource. 1&5. )ocomotion of the body is 'roduced through the coo'eration of s#eletal muscles and another systems including the s#eletal ner$ous and circulatory systems. 1(8. +n 1,(, the first organi9ed meeting for women4s rights in the ;nited 7tates too# 'ace in 7eneca <alls !ew Bor#. 1(1. The word EfableF fre1uently denotes a brief tale in whose animals or inanimate ob0ects s'ea# and beha$e li#e humans usually to ad$ance a moral 'oint. 1(2. 6n his boo# @oots Alex 3aley combines fact and fiction as he describes his family4s history begins in the mid21.884s in Africa. 1(&. The 'oet ?wendolyn Broo#s had she first 'oem 'ublished when she was thirteen years old. !" 1 1. 7im'le 'hotogra'hic lenses cannot _____ shar' undistorted images o$er a wide field. (A) to form (B) are formed (C) forming (%) form 2. +f all the factors affecting agricultural yields weather is the one ____ the most. (A) it influences farmers (B) that influences farmers (C) farmers that it influences (%) why farmers influence it &. Be$erly 7ills ______ assumed directorshi' of the !ew Bor# City +'era in 15.5. (A) be a star so'rano (B) was a star so'rano 327 (C) a star so'rano and (%) a star so'rano (. ______ of tissues is #nown as histology. (A) 7tudying scientific (B) The scientific study (C) To study scientifically (%) That is scientific studying /. *ith the exe'tion of mercury ______ at standard tem'erature and 'ressure. (A) the metallic elements are solid (B) which is a solid metallic element (C) metallic elements being solid (%) since the metallic elements are solid -. =otential dehydration is ____ that a land animal faces. (A) the often greatest ha9ard (B) the greatest often ha9ard (C) often the greatest ha9ard (%) often the ha9ard greatest .. By trac#ing the eye of a hurricane forecasters can determine the s'eed at which ____. (A) is a storm mo$ing (B) a storm is mo$ing (C) is mo$ing a storm (%) a mo$ing storm ,. The gra'es of *rath a no$el about the %e'ression years of the 15&84s is one of Dohn 7teinbec#4s _____ boo#s. (A) most famous (B) the most famous (C) are most famous (%) and most famous 5. Technology will 'lay a role in _____ future life2styles. (A) to sha'e (B) sha'ing (C) sha'e of (%) sha'ed 18The com'uter has dramatically affected _____ 'hotogra'hic lenses are constructed. (A) is the way (B) that the way (C) which way do (%) the way 11. The early railroads were _____ the existing arteries of trans'ortationL roads turn'i#es canals and other waterways. (A) those short lines connected (B) short lines that connected (C) connected by short lines (%) short connecting lines 12. ______ as a master'iece a wor# of art must transcend the ideals of the 'eriod 328 in which it was created. (A) @an#s (B) The ran#ing (C) To be ran#ed (%) <or being ran#ed 1&. Dac#ie @obinson ______ to 'lay baseball in the ma0or leagues 0oined the Broo#lyn %odgers in 15(.. (A) the Blac# American who first (B) the first Blac# American (C) was the first Blac# American (%) the first and a Blac# American who 1(. %uring the flood of 152. the @ed Cross _____ out of emergency head1uarters in ississi''i set u' tem'orary shelters for the homeless. (A) o'erates (B) is o'erating (C) has o'erated (%) o'erating 1/. 6n bacteria and in other organisms ______ is the nucleic acid %!A that 'ro$ides the genetic information. (A) both (B) which (C) and (%) it 1-. Twenty to thirty year after a mature forest is cleared away a nearly im'enetrable thic#et of trees and shrubs de$elo's. 1.. The first national 'ar# in world Bellowstone !ational =ar# was established in 1,.2. 1,. Because it does not ha$e a blood su''ly the cornea ta#es their oxygen directly from the air. 15. >agnificent mountains and coastal scenery is British Columbia4s chief tourist attractions. 28. 7cientists at uni$ersities are often more in$ol$ed in theoretical research than in 'ractically research. 21. Dohn @osamond Dohnson he com'osed numerous songs including )ife "$ery Coice and 7ing for which his brother Dames *eldon Dohnson wrote the words. 22. !ylon a synthetic done from a combination of water air and a by2'roduct of coal was first introduced in 15,&. 329 2&+rnithology the study of birds is one of the ma0or scientific fields in which amateurs 'lay a role in accumulating researching and 'ublish data. 2(. Animation is a techni1ue for creati$ity the illusion of life in inanimate things. 2/. The non$iolent 'rotest ad$ocated by %r. >artin )uther Jing 'ro$ing highly effecti$e in an age of ex'anding tele$ision news co$erage. 2-. +n %ecember . 1.,. %elaware became a first state to ratify the Constitution. 2.. !utritionists belie$e what diet affects how one feels 'hysically and emotionally. 2,. >ealii Jalama creator of o$er (88 3awaiian 1uilts was granted a !ational 3eritage <ellowshi' in 15,/ for herself contributions to fol# and art. 25. A 0etty ser$es to define and dee'en a channel im'ro$e na$igate or 'rotect a harbor. &8. >inoru Bamasa#i is an American architect which wor#s de'arted from the austerity fre1uently associated with architecture in the ;nited 7tates after the 7econd *orld *ar. &1. Chemical research 'ro$ides information that is useful when the textile industry in the creation of synthetic fabrics. &2. Dane Addams social wor#er author and s'o#eswoman for the 'eace and women4s suffrage mo$ements she recei$ed the !obel =eace =ri9e in 15&1 for her humanitarian achie$ements. &&. Bromyrite crystals ha$e a diamond2li#e luster and are usually colorless but they dar# to brown when ex'osed to light. &(. 7tars in our uni$erse $ary in tem'erature color bright si9e and mass. &-. The 15,& !obel =ri9e in >edicine was awarded to Barbara >cClintoc# for her ex'eriments with mai9e and her disco$eries regardless the nature of %!A. 330 &.. 6n 1,-- to 1,,& the bison 'o'ulation in !orth American was reduced from an estimated 1& million to a few hundred. &,. >ost of the damage 'ro'erty attributed to the 7an <rancisco earth1ua#e of 158- resulted from the fire that followed. &5. Dames Baldwin4s 'lays and short stories which are to some degree autobiogra'hical established them as a leading figure in the ;nited 7tates ci$il rights mo$ement. (8. Thunder can be listened from a maximum distance of about ten miles exce't ;nder unusual atmos'heric conditions. 331 !" 2 1. 3elium is _____ all gases to li1uefy and is im'ossible to solidify at normal air 'ressure. (A) more than difficult (B) the most difficult of (C) more difficult of (%) most difficult 2. "$ery year Canadian ______ about ./ 'ercent of their ex'orts to the ;nited 7tates. (A) businesses that sell (B) selling businesses (C) businesses sell (%) that sell to businesses &. An inno$ator ballerina Augusta >aywood was ___ a tra$eling com'any. (A) to form the first (B) the first to form (C) who formed the first (%) forming the first (. *hen water free9es in the crac#s of roc#s _____ ex'ands causing the roc#s to brea# a'art. (A) it (B) but (C) then (%) and /. *ith x2ray microsco'es scientists can see through li$e insects ___ e$en through solid 'ieces of metal. (A) howe$er (B) ne$ertheless (C) or (%) yet -. %ennis Cha$e9 of !ew >exico _____ to the 3ouse of @e'resentati$es in 15&8 and to the 7enate in 15&,. (A) when elected (B) elected (C) who was elected (%) was elected .. _______ are not leached out of soil reclamation 'rocedures are needed to restore the land4s 'roducti$ity. (A) <or concentration of salt (B) 7alt concentrations that (C) 6f salt concentrations (%) *ith concentrations of salt ,. ______ social crusade aroused "li9abeth *illiams4 enthusiasm more than the ex'ansion of educational facilities for immigrants to the ;nited 7tates. (A) !o (B) !othing 332 5. ______ as 2/88 B.C. the "gy'tians used mirrors made of highly 'olished metal. (A) 6n early (B) As early (C) "arly (%) *as as early 18. The 1uantum theory states ______ such as light is gi$en off and absorbed in tiny definite units called 1uanta or 'hotons. (A) energy that (B) that it is energy (C) it is energy (%) that energy 11. Huails ty'ically ha$e short rounded wings that enable _______ s'ring into full flight instantly when disturbed in their hiding 'laces. (A) they (B) to their (C) its (%) them to 12. ?eysers are found near ri$ers and la#es where water drains through the soil ______. (A) surface below the dee' (B) dee' below the surface (C) the dee' below surface (%) the dee' surface below 1&. Algebra generali9es certain basic laws _____ the addition subtraction multi'lication and di$ision of all numbers. (A) go$ern (B) that go$ern (C) ha$e go$erned (%) which they go$ern 1(. "$en at low le$els ______ /. _____ a lonely and rugged life far from home and family. (A) 3owe$er the early gold 'ros'ector often li$ed (B) The early gold 'ros'ector often li$ed (C) !ot only did the early gold 'ros'ector often li$e (%) The early gold 'ros'ector often li$ing 333 1-. The culinary ex'ert <annie <armer taught dietetics #itchen management and to coo# at her famous Boston school. 1.. A few of the naturally elements exist in such small amounts that they are #nown mainly from laboratory2made sam'les. 15. 7ome insects hear ultrasonic sounds more than two octa$es than higher humans can. 28. Because of its larger si9e the ;nited 7tates 3ouse of @e'resentati$es is more im'ersonal hierarchical and s'eciali9ation than the 7enate. 21. To stay warm in cold weather cold2blooded animals must ex'ose itself to a source of warmth such as direct sunlight. 22. A se$ere illness where she was 0ust nineteen months old de'ri$ed the well2#nown writer and lecturer 3elen Jeller of both her sight and her hearing. 2&. /. !otorious as a host for wheat rust the barberry bush has been banned from many area. 2-. Christo'her =lummer is a Canadian actor who has starred in stage tele$ision and film 'roductions on both sides the Atlantic +cean. 2.. A micro'hone enables musical tones to be am'lified thus ma#ing it 'ossible the gentle renditions of soft songs in large halls. 334 25. 6n the wild tea 'lants become trees of a''roximately thirty feet in high. &2. The ordeal of the Chero#ee 6ndians who were forcible mo$ed from their homeland in the 1,&84s is remembered as the ETrail of Tears.F &(. The structure but beha$ior of many 'roto9oans are ama9ingly com'lex for single2celled animals. &/. Alas#a4s rough climate and terrain di$ide the state into isolated regions ma#ing highway maintenance difficulty. &5. Beneath the dee' oceans that co$er two2thirds of the "arth intriguing secret of the 'lanet are concealed. (8. The 'ioneer Dohn Cha'man recei$ed the EDohnny A''leseedF because he 'lanted a''le seedlings during him tra$els in what are now +hio 6ndiana and 6llinois. 335 !" 3 1. Cobalt resembles iron and nic#el in tensile strength a''earance 222. (A) is hard (B) although hard (C) has hardness (%) and hardness 2. 222 who was the first Blac# woman to run for the office of =resident of the ;nited 7tates in15.2. (A) 7hirley 7. Chisholm (B) 6t was 7hirley 7. Chisholm (C) 7hirley 7. Chisholm was (%) *hen 7hirley 7. Chisholm &. 222 $ersatile 'erformer so'rano Jathleen Battle has often concluded a 'rogram of art songs and arias with selections from ragtime or 'o'ular music. (A) A (B) *hich (C) 7o (%) Because (. Before starting on a sea $oyage 'rudent na$igators learn the sea charts 222 and memori9e lighthouse locations to 're'are themsel$es for any conditions they might encounter. (A) sailing directions are studied (B) study the sailing directions (C) to direct sailing studies (%) studies direct sailing /. 222 social nesting birds that build their nests in trees and on cliffs. (A) The most stor#s (B) >ost are stor#s (C) >ost stor#s are (%) 7tor#s most -. =lan#ton 222 is the basic foodstuff for e$erything that li$es in the ocean. (A) com'rise both minute marine animals and 'lants (B) is the name gi$en to minute marine animals and 'lants (C) the collecti$e name for minute marine animals and 'lants (%) minute marine animals and 'lants collecti$ely that .. The best2#nown diffuse nebula is the great +rion !ebula 222 can be seen by the na#ed eye. (A) one (B) it (C) which (%) who ,. +f all the economically im'ortant 'lants 'alms ha$e been 222 . (A) the least studied (B) study the least (C) study less and less (%) to study the less 5. >ost am'hibians hatch from eggs laid in water or moist ground and begin life 222 water2dwelling lar$ae. (A) such (B) as (C) to be 336 (%) are 18. At the 7e$enth 6nternational Ballet Com'etitions <ernando Bu0ones won the first gold medal e$er 222 to a ;nited 7tates male dancer. (A) to be awarded (B) to award (C) that awards (%) should be awarding 11. <ounded around 18./ the Acoma 'ueblo is considered 222 settlement in the ;nited 7tates. (A) the oldest continuously occu'ied (B) occu'ied continuously the oldest (C) the oldest occu'ied continuously (%) continuously the oldest occu'ied 12. +n >arch 1 1,-. 222 to the ;nion when =resident Andrew Dohnson4s $eto was o$erridden. (A) since the state of !ebras#a had been admitted (B) admitted that the state of !ebras#a (C) the admission of the state of !ebras#a (%) the state of !ebras#a was admitted 1&. The best #nown of all the Arctic birds 222 . (A) birdwatchers fa$or 'tarmigans (B) being 'tarmigans and birdwatchers4 fa$orites (C) fa$ored by both 'tarmigans and birdwatchers (%) 'tarmigans are a fa$orite of birdwatchers 1(. !early all trees contain a mix of 'olymers that can burn li#e 'etroleum 222 'ro'erly extracted. (A) after (B) if (C) when it (%) is 1/. Acute hearing hel's most animals sense the a''roach of thunderstorms long before 'eo'le 222 . (A) do (B) hear (C) do them (%) hearing it 1-. "mily %ic#inson one of the greatest 'oets of the ;nited 7tates was entirely almost un#nown to the 'eo'le of her own time. 1,. Abstract "x'ressionism was a mo$ement in American 'ainting that flourished from the mid215(84s and mid 15/84s. 15. The !ational Cowboy 3all of <ame in +#lahoma City 'ay tribute to e$eryone associated with what Americans call the E+ld *est.F 337 21. The +bie Awards ha$e been gi$en annually for 15/- to outstanding artists in off2Broadway theater. 2&. Because geo'hysics embraces the conce'ts data and methods of $ariety other sciences it is $ery board in sco'e and its boundaries are hard to define. 2(. A white oa# at @utgers ;ni$ersity is said to had been the ins'iration for Doyce Jilmer4s 'oem ETreesF. 2/. 7tarfish mo$e feed and breathes with their tube feet. 2-. The *hitney >useum continues to reflect the di$ersity of the art of the ;nited 7tated in all of it ac1uisitions. 2,. %es'ite the broad acclaim of him no$els Dames Baldwin is most highly res'ected as an essayist and social critic. 25. Along the "ast Coast American 6ndia women4s councils could $ote a declaration of war at refusing to su''ly moccasins and field rations. &8. 6n 'ro'ortion to its si9e the hungriest animal is the shrew which must consume se$eral times their own weight e$ery day. &2. !orth America has eight time 9one ranging from !ewfoundland on the "ast Coast to Alas#a on the *est Coast. &&. 3istorians belie$e that some forms of an ad$ertising must be as old as barter and trade. &(. Although fluorine tests and x2ray analyses archaeologists can 'ro$e the $alidity of artifacts. 338 &/. %ams are used to control flooding 'ro$ide water for irrigation and generating electricity for the surrounding area. &-. The de$elo'ment of 'hotogra'hic techni1ues and e1ui'ment 'ro$ided an im'ortant aid to industry medical and research. &.. ;nited 7tates tennis cham'ionshi' =ancho ?on9ales gained international acclaim for his strong ser$e. &,. >any tele$ision newscasters ma#e the 'ublic an eyewitness to the news by means of on2the2s'ot ali$e re'orts. &5. Certain 9oologists regard crows and ra$ens are the most intelligent of birds. (8. *hile the twentieth century the field of dentistry has de$elo'ed braches that s'eciali9e in the treatment of indi$idual dental 'roblems 339 !" 4 1 .3anya 3olm is a doctor choreogra'her and 222. mAndance that she teaches mBnher teaching of dance mCnto teach dancing m%ndance teacher 2. %uring an ecli'se of the 7un 222 in the shadow of the >oon. mAnthe "arth lies mBnthe "arth when lying mCnthat the "arth lies m%nthe lying "arth &. ;nder the influence of "9ra =ound 3ilda %oolittle became associated with the 6magists and 222 into one of the most original 'oets of the grou'. mAnde$elo'ed mBnto be de$elo'ed mCnwho de$elo'ing m%nde$elo'ing it (. 222 all rainwater falling from a cloud reaches the ground: some of it is lost through e$a'oration. mAn!owhere mBn!ot mCn!o m%n!one /. 6n an area first ex'lored by 7amuel de Cham'lain 222 . mAnestablishment of the city of 3alifax in 1.(5 mBnin 1.(5 the city of 3alifax established mCnin 1.(5 establishing the city of 3alifax m%nthe city of 3alifax was established in 1.(5 -. A nation4s merchant marine is made u' of its commercial shi's and the 'eo'le 222 them. mAnthey o'erate mBnwho o'erate mCnthey o'erate of m%ndo they o'erate .. 22 !at Turner who led a re$olt against sla$ery in Cirginia in 1,&1. mAn*here was mBn6t was mCn3e was m%nThat he was ,. The most elaborate of all bird nests 222 domed communal structure built by social wea$erbirds. mAnlarger mBnlargely is mCnthe large m%nis the large 5. *illiam *al#er4s mural E *all of @es'ectF 222 an outdoor wall in Chicago deals 340 with social issues. mAnco$ers mBnco$ers it mCnwhich co$ers m%nwhich it co$ers 18. 7tudies of the gra$ity field of the "arth indicate 222 yield when unusual weight is 'laced on them. mAnalthough its crust and mantle mBnits crust and mantle to mCnthat its crust and mantle m%nfor its crust and mantle to 11. The columbine flower 222 to nearly all of the ;nited 7tates can be raised from seed in almost any garden. mAnnati$e mBnhow nati$e is mCnhow nati$e is it m%nis nati$e 12. The 'hoto'eriodic res'onse of algae actually de'ends on the duration of dar#ness 222 . mAnthe light is not on mBnand not on light mCnbut is not on the light m%nis not on light 1&. 222 the first Blac# denomination in the ;nited 7tates. (A) @ichard Allen founded the African >ethodist "'isco'al Church (B) @ichard Allen who founded the African >ethodist "'isco'al Church (C) The African >ethodist "'isco'al Church founded by @ichard Allen (%) The foundation of the African >ethodist "'isco'al Church by @ichard Allen 1(. The annual worth of ;tah4s manufacturing is greater than 222 . (A) that of its mining and farming combined (B) mining and farming combination (C) that mining and farming combined (%) of its combination mining and farming 1/. The wallflower 222 because its wea# stems often grow on walls and along stony cliffs for su''ort. (A) so called is (B) so is called (C) is so called (%) called is so 1- The tongue is ca'able of many motions and configurations and 'lays a $ital role in chewing swallowed and s'ea#ing. 1.. 6nstead of being housed in one central ban# in *ashington %.C the <ederal @eser$e system is di$ision into twel$e districts. 1,. =hilodendrons of $arious #inds are culti$ated for their beautifully foliage. 341 15. Jiwi birds mainly eat insects worms and snails and to search for their food by 'robing the ground with their long bills. 28. *illiam =enn founded the city of =hiladel'hia in 1-,2 and he 1uic#ly grew to be the largest city in colonial America. 21. <ewer 'eo'le reside in !ewfoundland than in other any Canadian 'ro$ince exce't =rince "dward 6sland. 22. %r. >ary >c)eod Bethune the founder of Bethune2Coo#man college ser$ed as ad$ice to both <ran#lin %elano @oose$elt and 3arry Truman. 2&. 7ome 'lant 'roduce irritating 'oisons that can affect a 'erson e$en if he or she merely brushes against them. 2(. The rotation of the "arth on its axis is res'onsible the alternation of 'eriods of light and dar#ness. 2/. Anne "li9abeth >c%owell is best remembered for a wee#ly 0ournal *oman4s Ad$ocate who she launched in Danuary 1,//. 2-. 6n e$ery society there are norms that say indi$iduals how they are su''osed to beha$e. 2.. An eru'ting $olcano or an earth1ua#es sometimes affected the featured of the surrounding region and can e$en cause la#es to disa''ear. 2,. >ost tree frogs change color to harmoni9e with its bac#ground. 25. %ue to the refraction of light rays this is im'ossible for the na#ed eye to determine the exact location of a star close to hori9on. &8. >odern 'oets ha$e ex'erimented with 'oetic de$ices such alliteration and assonance. 342 &2. 7ocial reformer <rederic# %ouglass dedicated his life to wor#ing for the abolish of sla$ery and the fight for ci$il rights. &&. >ount "dith Ca$ell a 'ea# in the Canadian @oc#ies is named after a famous nurses. &(. Ranthines ha$e both good and bad effect on the body and these effects are generally determined on the si9e and regularity of dosage. &/. *hen a se$ere an#le in0ury forced herself to gi$e u' re'orting in 152- >argaret >itchell began writing her no$el ?one with the wind. &-. +ne of the most difficult 'roblems in understanding slee' is determining what the functions of slee' is. &.. The >illicent @ogers >useum houses fi$e thousands 'ieces of 3is'anic and American 6ndia 0ewelry textiles and other ob0ects documenting the $ibrancy of these cultures. &,. 7e$en of 'lanets rotate in the same direction as their orbital motions while Cenus and ;ranus rotate in the o''osite direction. &5. 6n the ;nited 7tates $oters election re'resentati$es to the national legislature which consists of the 3ouse of @e'resentati$es and 7enate. (8 6t is the interaction between 'eo'le rather than the e$ents that occur in their li$es that are the main focus of social 'sychology. 343.
https://ru.scribd.com/document/211583022/TOEFL-Structure-Bank
CC-MAIN-2020-34
refinedweb
82,663
64.41
How Flex Flex: Flex Flex Tip: Convert XML to ArrayCollection This is one of those things that took me much longer than I thought it would have. I needed to convert a file containing XML data to an ArrayCollection. My XML file looked like this: <rows> <row> <col1>some value</col1> <col2>another value</col2> ... </row> ... </rows> I wanted to convert this into an ArrayCollection with each row as an object (and I didn’t want to have to loop through each item in the list). Here’s the solution I’m using. import mx.utils.ArrayUtil; import mx.rpc.xml.SimpleXMLDecoder; import mx.collections.ArrayCollection; private function convertXmlToArrayCollection( file:String ):ArrayCollection { var xml:XMLDocument = new XMLDocument( file ); var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(); var data:Object = decoder.decodeXML( xml ); var array:Array = ArrayUtil.toArray( data.rows.row ); return new ArrayCollection( array ); } I’m not thrilled with this approach because I’ve needed to hard code the XML structure (’rows.row’) into the function. If anyone has a better solution I’d love to see it. Best,
https://hillelcoren.com/2008/09/
CC-MAIN-2017-13
refinedweb
176
50.43
It’s just data I wonder if Ben's picked his RDF parser yet? The TrackBack RDF isn't RDF in any practical sense, being constrained to something that exactly matches a regex and mostly being inaccessible to parsers, hidden away in comments, but I don't think foaf:Person will be so easy to corral.Posted by Phil Ringnalda at Pingback from TIG's Cornerat Phil, I agree sticking the trackback RDF in comments is a pretty ugly approach (I'm not sure it's tied to a specific regex anywhere, is it?), but putting FOAF into RSS is a different issue - if RSS 1.0 is used, then RDF syntax can be used. Any RDF parser will do - take your pick. The current status of FOAF in RSS 2.0 is "can't be done" - is that better? (it can be done, e.g. using SSR, but the RSS 2.0 folks just seem too scared of RDF to even contemplate this)Posted by Danny Ayers at I've spread myself too thin. Inspired by Tantek's "What to do with things to do", I have decided to prune.... [more] Trackback from dive into mark MT's autodiscovery is a regex looking for strings like trackback:ping, not for triples. A carefully crafted comment that isn't even XML would work just fine, absolutely any perfectly valid in RDF change will fail. So unless you are willing to not be autodiscovered by MT (or anything else, I'd bet), it isn't RDF, it's just a string that happens to also be RDF. Because Ben controls the spec, and the reference implementation, that's fine: if you want to play with TrackBack, you will use the prefix "trackback" for the TrackBack namespace, and that's that. However, FOAF seems to be the main RDF playground, and I think whatever he does with it, in whatever version of RSS, he'll find that he can't corral FOAF kittens as well, and will have to use an RDF parser to look for known triples, rather than a regex to look for known strings.Posted by Phil Ringnalda at I agree with what your saying Phil. Certainly this is a shortcoming in the current reference implementation (and MT) that needs to be addressed in the future. I suspect that the regex parser of TrackBack data is not because of a lack of understanding or disregard for RDF and namespaces. I think its more likely that it is due to the fact most MT users (and presumably others) do not have a RDF parser installed and are equally as likely not to have the expertise or ability to install one . This is only a well educated guess. Having developed the RSS Feed plugin for MT I can tell you XML::Parser availability is quite an issue. I made a concerted and painful effort to provide a fallback option using XML::Parser::Lite and hacking some semblance of namespace support on top of that. I wish it weren't true, but its what we have. Providing alternate means of communicating TrackBack services for auto-discovery I think needs to be explored. The SixApart folks seem open to the idea.Posted by Timothy Appnel at Phil--my XML::FOAF module uses the RDF::Core RDF parser. You're right that, in the case of FOAF being included in RSS, we can't just rely on regex. The inclusion of the TrackBack RDF inside a comment is just a hack, as you know, to get around validation issues. At some point we'd like to move beyond that. :)Posted by Ben at Phil, Danny, is it just me or are you both talking a bit past each other -- and I don't say this to cause offense. True, I'd be amazed to see FOAF in RSS 2.0. In fact, help of other technology or not, this is really bad idea to even consider. But this is a completely different beastie than the fact that the Trackback RDF is embedded in HTML. FOAF just won't embed with Trackback RDF in an (X)HTML page. Time to drop that idea right from the start. As Danny has so correctly pointed out to me recently, FOAF is RDF playground, including recent additions of ontology language, and a couple of associated inference rules. (Though none of this is required). However, am I missing something here? Any reason that FOAF can't be a separate RDF file and then just linked in? Either in the (X)HTML page or the RSS file? Seems to me this is what Ben's talking about. Isn't it? Interesting conversation on RSS lately (always conversation on RSS lately): RSS just for weblogs -- does this have a subtitle of "The neverending story"?Posted by Burningbird at Ben: sorry for the slam - I even knew about XML:FOAF, just forgot. I should have gone to bed earlier. Fixing autodiscovery: you can only do it with a major discontinuity. Otherwise producers just have to support two methods to deal with recalcitrant consumers, and consumers have to support two methods to avoid being less useful than their competitors. If you decide to go with a discontinuity, I'd appreciate it if you did it in July, when I'm going offline for several weeks. Danny and I talking past each other: I have high hopes that he and I will end up like an old married couple, only needing a few code words to bring up whole long arguments. I think mine will be "show me the app".Posted by Phil Ringnalda at Heh, talking past indeed. Like one of that old married couple, I'm still rambling on about an attribute that went missing 50 years before... As it happens, I was mis-remembering trackback pretty badly (I've only really skimmed the material, not tried building anything). Ah well. Re. corralling FOAF (/embed foaf:Person into RSS) - I can't say I feel comfortable with the idea, but I'm sure this could be done fairly cleanly to target an XML level parser in an RSS 2.0-like format. Yes, it would be better to use full RDF/XML, linked in as Shelley suggests (there could be other stuff in the file too). But if we're only talking about producing one or two triples, somehow inlined in an RSS profile then perhaps just the odd XML element could do it.Posted by Danny at I never had your attribute! Two ways to go, depending on what you want: if you want to trigger a separate RDF parser based FOAF explorer, then linking makes perfect sense. If what you want is an element that means name, rather than RFC822 email address with name in a comment, and an element that means homepage (or the newly added weblog), then, as Danny says, why not borrow them from FOAF and put them in XML-based RSS? I was a little uneasy with the idea of borrowing elements/namespaces from the RDF-XMLization of something without bringing the whole RDF baggage along, when Sam was talking about using the RSS 1.0 namespace just for embedding generic RSS elements in SOAP, but with danbri saying "why not?", I say "why not grab elements from his baby?"Posted by Phil Ringnalda at I've been embedding my FOAF info in my feeds for quite awhile: look under the dc:creator element. --EricPosted by Eric at at
http://www.intertwingly.net/blog/1395.html
crawl-002
refinedweb
1,253
69.92
lvmlockd (8) - Linux Man Pages lvmlockd: LVM locking daemon NAMElvmlockd --- LVM locking daemon DESCRIPTIONLVM commands use lvmlockd to coordinate access to shared storage. When LVM is used on devices shared by multiple hosts, locks will: • coordinate reading and writing of LVM metadata • validate caching of LVM metadata • prevent concurrent activation of logical volumes lvmlockd uses an external lock manager to perform basic locking. Lock manager (lock type) options are: • sanlock: places locks on disk within LVM storage. • dlm: uses network communication and a cluster manager. OPTIONS lvmlockd [options] For default settings, see lvmlockd -h. --help | -h Show this help information. --version | -V Show version of lvmlockd. --test | -T Test mode, do not call lock manager. --foreground | -f Don't fork. --daemon-debug | -D Don't fork and print debugging to stdout. --pid-file | -p path Set path to the pid file. --socket-path | -s path Set path to the socket to listen on. --syslog-priority | -S err|warning|debug Write log messages from this level up to syslog. --gl-type | -g sanlock|dlm Set global lock type to be sanlock or dlm. --host-id | -i num Set the local sanlock host id. --host-id-file | -F path A file containing the local sanlock host_id. --sanlock-timeout | -o seconds Override the default sanlock I/O timeout. --adopt | -A 0|1 Adopt locks from a previous instance of lvmlockd. USAGE Initial set up Using LVM with lvmlockd for the first time includes some one-time set up steps: 1. choose a lock manager dlm If dlm (or corosync) are already being used by other cluster software, then select dlm. dlm uses corosync which requires additional configuration beyond the scope of this document. See corosync and dlm documentation for instructions on configuration, setup and usage. sanlock Choose sanlock if dlm/corosync are not otherwise required. sanlock does not depend on any clustering software or configuration. 2. configure hosts to use lvmlockd On all hosts running lvmlockd, configure lvm.conf: locking_type = 1 use_lvmlockd = 1 sanlock Assign each host a unique host_id in the range 1-2000 by setting /etc/lvm/lvmlocal.conf local/host_id 3. start lvmlockd Use a service/init file if available, or just run "lvmlockd". 4. start lock manager sanlock systemctl start wdmd sanlock dlm Follow external clustering documentation when applicable, otherwise: systemctl start corosync dlm 5. create VG on shared devices vgcreate --shared <vgname> <devices> The shared option sets the VG lock type to sanlock or dlm depending on which lock manager is running. LVM commands will perform locking for the VG using lvmlockd. lvmlockd will use the chosen lock manager. 6. start VG on all hosts vgchange --lock-start lvmlockd requires shared VGs to be started before they are used. This is a lock manager operation to start (join) the VG lockspace, and it may take some time. Until the start completes, locks for the VG are not available. LVM commands are allowed to read the VG while start is in progress. (An init/unit file can also be used to start VGs.) 7. create and activate LVs Standard lvcreate and lvchange commands are used to create and activate LVs in a shared VG. An LV activated exclusively on one host cannot be activated on another. When multiple hosts need to use the same LV concurrently, the LV can be activated with a shared lock (see lvchange options -aey vs -asy.) (Shared locks are disallowed for certain LV types that cannot be used from multiple hosts.) Normal start up and shut down After initial set up, start up and shut down include the following general steps. They can be performed manually or using the system service manager. • start lvmetad • start lvmlockd • start lock manager • vgchange --lock-start • activate LVs in shared VGs The shut down sequence is the reverse: • deactivate LVs in shared VGs • vgchange --lock-stop • stop lock manager • stop lvmlockd • stop lvmetad TOPICS VG access control The following terms are used to describe different forms of VG access control. lockd VG A "lockd VG" is a shared VG that has a "lock type" of dlm or sanlock. Using it requires lvmlockd. These VGs exist on shared storage that is visible to multiple hosts. LVM commands use lvmlockd to perform locking for these VGs when they are used. If the lock manager for the lock type is not available (e.g. not started or failed), lvmlockd is unable to acquire locks for LVM commands. LVM commands that only read the VG will generally be allowed to continue without locks in this case (with a warning). Commands to modify or activate the VG will fail without the necessary locks. local VG A "local VG" is meant to be used by a single host. It has no lock type or lock type "none". LVM commands and lvmlockd do not perform locking for these VGs. A local VG typically exists on local (non-shared) devices and cannot be used concurrently from different hosts. If a local VG does exist on shared devices, it should be owned by a single host by having its system ID set, see lvmsystemid(7). Only the host with a matching system ID can use the local VG. A VG with no lock type and no system ID should be excluded from all but one host using lvm.conf filters. Without any of these protections, a local VG on shared devices can be easily damaged or destroyed. clvm VG A "clvm VG" is a VG on shared storage (like a lockd VG) that requires clvmd for clustering. See below for converting a clvm VG to a lockd VG. lockd VGs from hosts not using lvmlockd Only hosts that use lockd VGs should be configured to run lvmlockd. However, shared devices used by lockd VGs may be visible from hosts not using lvmlockd. From a host not using lvmlockd, visible lockd VGs are ignored in the same way as foreign VGs (see lvmsystemid(7).) The --shared option for reporting and display commands causes lockd VGs to be displayed on a host not using lvmlockd, like the --foreign option does for foreign VGs. vgcreate comparison The type of VG access control is specified in the vgcreate command. See vgcreate(8) for all vgcreate options. vgcreate <vgname> <devices> - • - Creates a local VG with the local system ID when neither lvmlockd nor clvm are configured. - • - Creates a local VG with the local system ID when lvmlockd is configured. - • - Creates a clvm VG when clvm is configured. vgcreate --shared <vgname> <devices> - • - Requires lvmlockd to be configured and running. - • - Creates a lockd VG with lock type sanlock|dlm depending on which lock manager is running. - • - LVM commands request locks from lvmlockd to use the VG. - • - lvmlockd obtains locks from the selected lock manager. vgcreate -c|--clustered y <vgname> <devices> - • - Requires clvm to be configured and running. - • - Creates a clvm VG with the "clustered" flag. - • - LVM commands request locks from clvmd to use the VG. creating the first sanlock VG Creating the first sanlock VG is not protected by locking and requires special attention. This is because sanlock locks exist within the VG, so they are not available until the VG exists. The first sanlock VG will contain the "global lock". - • - The first vgcreate command needs to be given the path to a device that has not yet been initialized with pvcreate. The pvcreate initialization will be done by vgcreate. This is because the pvcreate command requires the global lock, which will not be available until after the first sanlock VG is created. - • - While running vgcreate for the first sanlock VG, ensure that the device being used is not used by another LVM command. Allocation of shared devices is usually protected by the global lock, but this cannot be done for the first sanlock VG which will hold the global lock. - • - While running vgcreate for the first sanlock VG, ensure that the VG name being used is not used by another LVM command. Uniqueness of VG names is usually ensured by the global lock. - • - Because the first sanlock VG will contain the global lock, this VG needs to be accessible to all hosts that will use sanlock shared VGs. All hosts will need to use the global lock from the first sanlock VG. See below for more information about managing the sanlock global lock. using lockd VGs There are some special considerations when using lockd VGs. When use_lvmlockd is first enabled in lvm.conf, and before the first lockd VG is created, no global lock will exist. In this initial state, LVM commands try and fail to acquire the global lock, producing a warning, and some commands are disallowed. Once the first lockd VG is created, the global lock will be available, and LVM will be fully operational. When a new lockd VG is created, its lockspace is automatically started on the host that creates it. Other hosts need to run 'vgchange --lock-start' to start the new VG before they can use it. From the 'vgs' command, lockd VGs are indicated by "s" (for shared) in the sixth attr field. The specific lock type and lock args for a lockd VG can be displayed with 'vgs -o+locktype,lockargs'. lockd VGs need to be "started" and "stopped", unlike other types of VGs. See the following section for a full description of starting and stopping. vgremove of a lockd VG will fail if other hosts have the VG started. Run vgchange --lock-stop <vgname> on all other hosts before vgremove. (It may take several seconds before vgremove recognizes that all hosts have stopped a sanlock VG.) starting and stopping VGs Starting a lockd VG (vgchange --lock-start) causes the lock manager to start (join) the lockspace for the VG on the host where it is run. This makes locks for the VG available to LVM commands on the host. Before a VG is started, only LVM commands that read/display the VG are allowed to continue without locks (and with a warning). Stopping a lockd VG (vgchange --lock-stop) causes the lock manager to stop (leave) the lockspace for the VG on the host where it is run. This makes locks for the VG inaccessible to the host. A VG cannot be stopped while it has active LVs. When using the lock type sanlock, starting a VG can take a long time (potentially minutes if the host was previously shut down without cleanly stopping the VG.) A lockd VG can be started after all the following are true: • lvmlockd is running • the lock manager is running • the VG is visible to the system A lockd VG can be stopped if all LVs are deactivated. All lockd VGs can be started/stopped using: vgchange --lock-start vgchange --lock-stop Individual VGs can be started/stopped using: vgchange --lock-start <vgname> ... vgchange --lock-stop <vgname> ... To make vgchange not wait for start to complete: vgchange --lock-start --lock-opt nowait ... lvmlockd can be asked directly to stop all lockspaces: lvmlockctl --stop-lockspaces To start only selected lockd VGs, use the lvm.conf activation/lock_start_list. When defined, only VG names in this list are started by vgchange. If the list is not defined (the default), all visible lockd VGs are started. To start only "vg1", use the following lvm.conf configuration: activation { lock_start_list = [ "vg1" ] ... } automatic starting and automatic activation Scripts or programs on a host that automatically start VGs will use the "auto" option to indicate that the command is being run automatically by the system: vgchange --lock-start --lock-opt auto [<vgname> ...] Without any additional configuration, including the "auto" option has no effect; all VGs are started unless restricted by lock_start_list. However, when the lvm.conf activation/auto_lock_start_list is defined, the auto start command performs an additional filtering phase to all VGs being started, testing each VG name against the auto_lock_start_list. The auto_lock_start_list defines lockd VGs that will be started by the auto start command. Visible lockd VGs not included in the list are ignored by the auto start command. If the list is undefined, all VG names pass this filter. (The lock_start_list is also still used to filter all VGs.) The auto_lock_start_list allows a user to select certain lockd VGs that should be automatically started by the system (or indirectly, those that should not). To use auto activation of lockd LVs (see auto_activation_volume_list), auto starting of the corresponding lockd VGs is necessary. internal command locking To optimize the use of LVM with lvmlockd, be aware of the three kinds of locks and when they are used: GL lock The global lock (GL lock) is associated with global information, which is information not isolated to a single VG. This includes: • The global VG namespace. • The set of orphan PVs and unused devices. • The properties of orphan PVs, e.g. PV size. The global lock is used in shared mode by commands that read this information, or in exclusive mode by commands that change it. The command 'vgs' acquires the global lock in shared mode because it reports the list of all VG names. The vgcreate command acquires the global lock in exclusive mode because it creates a new VG name, and it takes a PV from the list of unused PVs. When an LVM command is given a tag argument, or uses select, it must read all VGs to match the tag or selection, which causes the global lock to be acquired. VG lock A VG lock is associated with each VG. The VG lock is acquired in shared mode to read the VG and in exclusive mode to change the VG (modify the VG metadata or activate LVs). This lock serializes access to a VG with all other LVM commands accessing the VG from all hosts. The command 'vgs' will not only acquire the GL lock to read the list of all VG names, but will acquire the VG lock for each VG prior to reading it. The command 'vgs <vgname>' does not acquire the GL lock (it does not need the list of all VG names), but will acquire the VG lock on each VG name argument. LV lock An LV lock is acquired before the LV is activated, and is released after the LV is deactivated. If the LV lock cannot be acquired, the LV is not activated. LV locks are persistent and remain in place after the activation command is done. GL and VG locks are transient, and are held only while an LVM command is running. lock retries If a request for a GL or VG lock fails due to a lock conflict with another host, lvmlockd automatically retries for a short time before returning a failure to the LVM command. If those retries are insufficient, the LVM command will retry the entire lock request a number of times specified by global/lvmlockd_lock_retries before failing. If a request for an LV lock fails due to a lock conflict, the command fails immediately. managing the global lock in sanlock VGs The global lock exists in one of the sanlock VGs. The first sanlock VG created will contain the global lock. Subsequent sanlock VGs will each contain disabled global locks that can be enabled later if necessary. The VG containing the global lock must be visible to all hosts using sanlock VGs. This can be a reason to create a small sanlock VG, visible to all hosts, and dedicated to just holding the global lock. While not required, this strategy can help to avoid difficulty in the future if VGs are moved or removed. The vgcreate command typically acquires the global lock, but in the case of the first sanlock VG, there will be no global lock to acquire until the first vgcreate is complete. So, creating the first sanlock VG is a special case that skips the global lock. vgcreate for a sanlock VG determines it is the first one to exist if no other sanlock VGs are visible. It is possible that other sanlock VGs do exist but are not visible on the host running vgcreate. In this case, vgcreate would create a new sanlock VG with the global lock enabled. When the other VG containing a global lock appears, lvmlockd will see more than one VG with a global lock enabled, and LVM commands will report that there are duplicate global locks. If the situation arises where more than one sanlock VG contains a global lock, the global lock should be manually disabled in all but one of them with the command: lvmlockctl --gl-disable <vgname> (The one VG with the global lock enabled must be visible to all hosts.) An opposite problem can occur if the VG holding the global lock is removed. In this case, no global lock will exist following the vgremove, and subsequent LVM commands will fail to acquire it. In this case, the global lock needs to be manually enabled in one of the remaining sanlock VGs with the command: lvmlockctl --gl-enable <vgname> A small sanlock VG dedicated to holding the global lock can avoid the case where the GL lock must be manually enabled after a vgremove. internal lvmlock LV A sanlock VG contains a hidden LV called "lvmlock" that holds the sanlock locks. vgreduce cannot yet remove the PV holding the lvmlock LV. To remove this PV, change the VG lock type to "none", run vgreduce, then change the VG lock type back to "sanlock". Similarly, pvmove cannot be used on a PV used by the lvmlock LV. To place the lvmlock LV on a specific device, create the VG with only that device, then use vgextend to add other devices. shared LVs When an LV is used concurrently from multiple hosts (e.g. by a multi-host/cluster application or file system), the LV can be activated on multiple hosts concurrently using a shared lock. To activate the LV with a shared lock: lvchange -asy vg/lv. With lvmlockd, an unspecified activation mode is always exclusive, i.e. -ay defaults to -aey. If the LV type does not allow the LV to be used concurrently from multiple hosts, then a shared activation lock is not allowed and the lvchange command will report an error. LV types that cannot be used concurrently from multiple hosts include thin, cache, raid, mirror, and snapshot. lvextend on LV with shared locks is not yet allowed. The LV must be deactivated, or activated exclusively to run lvextend. recover from lost PV holding sanlock locks The general approach is to change the VG lock type to "none", and then change the lock type back to "sanlock". This recreates the internal lvmlock LV and the necessary locks on it. Additional steps may be required to deal with the missing PV. locking system failures lvmlockd failure If lvmlockd fails or is killed while holding locks, the locks are orphaned in the lock manager. lvmlockd can be restarted with an option to adopt locks in the lock manager that had been held by the previous instance. dlm/corosync failure If dlm or corosync fail, the clustering system will fence the host using a method configured within the dlm/corosync clustering environment.. After some time, the lease will expire, and locks that the host owns in the VG can be acquired by other hosts. The VG must be forcibly deactivated on the host with the expiring lease before other hosts can acquire its locks. When the sanlock daemon detects that the lease storage is lost, it runs the command lvmlockctl --kill <vgname>. This command emits a syslog message stating that lease storage is lost for the VG and LVs must be immediately deactivated. If no LVs are active in the VG, then the lockspace with an expiring lease will be removed, and errors will be reported when trying to use the VG. Use the lvmlockctl --drop command to clear the stale lockspace from lvmlockd. If the VG has active LVs when the lock storage is lost, the LVs must be quickly deactivated before the lockspace lease expires. After all LVs are deactivated, run lvmlockctl --drop <vgname> to clear the expiring lockspace from lvmlockd. If all LVs in the VG are not deactivated within about 40 seconds, sanlock will reset the host using the local watchdog. The machine reset is effectively a severe form of "deactivating" LVs before they can be activated on other hosts. The reset is considered a better alternative than having LVs used by multiple hosts at once, which could easily damage or destroy their content. In the future, the lvmlockctl kill command may automatically attempt to forcibly deactivate LVs before the sanlock lease expires. Until then, the user must notice the syslog message and manually deactivate the VG before sanlock resets the machine. sanlock daemon failure If the sanlock daemon fails or exits while a lockspace is started, the local watchdog will reset the host. This is necessary to protect any application resources that depend on sanlock leases which will be lost without sanlock running. changing dlm cluster name When a dlm VG is created, the cluster name is saved in the VG metadata. To use the VG, a host must be in the named dlm cluster. If the dlm cluster name changes, or the VG is moved to a new cluster, the dlm cluster name saved in the VG must also be changed. To see the dlm cluster name saved in the VG, use the command: vgs -o+locktype,lockargs <vgname> To change the dlm cluster name in the VG when the VG is still used by the original cluster: - • - Stop the VG on all hosts: vgchange --lock-stop <vgname> - • - Change the VG lock type to none: vgchange --lock-type none <vgname> - • - Change the dlm cluster name on the host or move the VG to the new cluster. The new dlm cluster must now be active on the host. Verify the new name by: cat /sys/kernel/config/dlm/cluster/cluster_name - • - Change the VG lock type back to dlm which sets the new cluster name: vgchange --lock-type dlm <vgname> - • - Start the VG on hosts to use it: vgchange --lock-start <vgname> To change the dlm cluster name in the VG when the dlm cluster name has already changed, or the VG has already moved to a different cluster: - • - Ensure the VG is not being used by any hosts. - • - The new dlm cluster must be active on the host making the change. The current dlm cluster name can be seen by: cat /sys/kernel/config/dlm/cluster/cluster_name - • - Change the VG lock type to none: vgchange --lock-type none --force <vgname> - • - Change the VG lock type back to dlm which sets the new cluster name: vgchange --lock-type dlm <vgname> - • - Start the VG on hosts to use it: vgchange --lock-start <vgname> changing a local VG to a lockd VG All LVs must be inactive to change the lock type. lvmlockd must be configured and running as described in USAGE. Change a local VG to a lockd VG with the command: vgchange --lock-type sanlock|dlm <vgname> Start the VG on hosts to use it: vgchange --lock-start <vgname> changing a lockd VG to a local VG Stop the lockd VG on all hosts, then run: vgchange --lock-type none <vgname> To change a VG from one lockd type to another (i.e. between sanlock and dlm), first change it to a local VG, then to the new type. changing a clvm VG to a lockd VG All LVs must be inactive to change the lock type. First change the clvm VG to a local VG. Within a running clvm cluster, change a clvm VG to a local VG with the command: vgchange -cn <vgname> If the clvm cluster is no longer running on any nodes, then extra options can be used to forcibly make the VG local. Caution: this is only safe if all nodes have stopped using the VG: vgchange --config 'global/locking_type=0 global/use_lvmlockd=0' - -cn <vgname> After the VG is local, follow the steps described in "changing a local VG to a lockd VG". limitations of lockd VGs Things that do not yet work in lockd VGs: • creating a new thin pool and a new thin LV in a single command • using lvcreate to create cache pools or cache LVs (use lvconvert) • using external origins for thin LVs • splitting mirrors and snapshots from LVs • vgsplit • vgmerge • resizing an LV that is active in the shared mode on multiple hosts lvmlockd changes from clvmd (See above for converting an existing clvm VG to a lockd VG.) While lvmlockd and clvmd are entirely different systems, LVM command usage remains similar. Differences are more notable when using lvmlockd's sanlock option. Visible usage differences between lockd VGs with lvmlockd and clvm VGs with clvmd: - • - lvm.conf must be configured to use either lvmlockd (use_lvmlockd=1) or clvmd (locking_type=3), but not both. - • - vgcreate --shared creates a lockd VG, and vgcreate --clustered y creates a clvm VG. - • - lvmlockd adds the option of using sanlock for locking, avoiding the need for network clustering. - • - lvmlockd defaults to the exclusive activation mode whenever the activation mode is unspecified, i.e. -ay means -aey, not -asy. - • - lvmlockd commands always apply to the local host, and never have an effect on a remote host. (The activation option 'l' is not used.) - • - lvmlockd works with thin and cache pools and LVs. - • - lvmlockd works with lvmetad. - • - lvmlockd saves the cluster name for a lockd VG using dlm. Only hosts in the matching cluster can use the VG. - • - lvmlockd requires starting/stopping lockd VGs with vgchange --lock-start and --lock-stop. - • - vgremove of a sanlock VG may fail indicating that all hosts have not stopped the VG lockspace. Stop the VG on all hosts using vgchange --lock-stop. - • - vgreduce or pvmove of a PV in a sanlock VG will fail if it holds the internal "lvmlock" LV that holds the sanlock locks. - • - lvmlockd uses lock retries instead of lock queueing, so high lock contention may require increasing global/lvmlockd_lock_retries to avoid transient lock failures. - • - lvmlockd includes VG reporting options lock_type and lock_args, and LV reporting option lock_args to view the corresponding metadata fields. - • - In the 'vgs' command's sixth VG attr field, "s" for "shared" is displayed for lockd VGs. - • - If lvmlockd fails or is killed while in use, locks it held remain but are orphaned in the lock manager. lvmlockd can be restarted with an option to adopt the orphan locks from the previous instance of lvmlockd. Linux man pages generated by: SysTutorials
https://www.systutorials.com/docs/linux/man/8-lvmlockd/
CC-MAIN-2019-43
refinedweb
4,410
70.33
Rechercher une page de manuel mayavi2 Langue: en Version: 333231 (ubuntu - 24/10/10) Section: 1 (Commandes utilisateur) NAMEmayavi2 - A scientific visualization package for 2-D and 3-D data SYNOPSISmayavi2 [options] [args] Where arg1, arg2 etc. are optional file names that correspond to saved Mayavi2 visualizations (filename.mv2), Mayavi2 scripts (filename.py) and any data file formats that Mayavi supports. DESCRIPTION Mayavi2 is a tool for 2-D and 3-D scientific visualization. Features of Mayavi2 include: - * - Visualization of scalar and vector data in 2 and 3 dimensions - * - Easy scriptability using Python - * - Easy extendability via sources, components, modules, and data filters - * - Reading several file formats: VTK (legacy and XML), PLOT3D, etc. - * - Saving of visualizations - * - Saving rendered visualization in a variety of image formats. OPTIONS -h This prints all the available command line options and exits. Also available through --help. -V This prints the Mayavi version on the command line and exits. Also available through --version. -z filename.mv2 This loads a previously saved Mayavi2 visualization. Also available through --viz filename.mv2 or --visualization filename.mv2. -d datafile.* Opens any of the supported data file formats or a non-file related data source. This includes VTK file formats (*.vtk, *.xml, *.vt[i,p,r,s,u], *.pvt[i,p,r,s,u]), VRML2 (*.wrl), 3D Studio (*.3ds), PLOT3D (*.xyz), STL, BYU, RAW, PLY, PDB, SLC, FACET, OBJ, AVSUCD (*.inp), GAMBIT (*.neu), Exodus (*.exii), PNG, JPEG, BMP, PNM, DCM, DEM, MHA, MHD, MINC, XIMG, TIFF, and various others that are supported. datafile.* can also be a source object not associated with a file, for example ParametricSurface or PointLoad will load the corresponding data sources into Mayavi. Also available through --data. -m module-name A module is an object that actually visualizes the data. The given module-name is loaded in the current ModuleManager. The module name must be a valid one if not you will get an error message. If a module is specified as 'package.sub.module.SomeModule' then the module (SomeModule) is imported from 'package.sub.module'. Standard modules provided with mayavi2 do not need the full path specification. For example: - mayavi2 -d data.vtk -m Outline -m m2_user_modules.TestModule In this example 'Outline' is a standard module and 'm2_user_modules.TestModule' is some user defined module. See MAYAVI2 MODULES section below for an exhaustive list of available modules. Also available through --module. -f filter-name A filter is an object that filters out the data in some way or the other. The given filter-name is loaded with respect to the current source/filter object. The filter name must be a valid one if not you will get an error message. If the filter is specified as 'package.sub.filter.SomeFilter' then the filter (`SomeFilter`) is imported from 'package.sub.filter'. Standard modules provided with mayavi2 do not need the full path specification. For example: - mayavi2 -d data.vtk -f ExtractVectorNorm -f m2_user_filters.TestFilter In this example 'ExtractVectorNorm' is a standard filter and 'm2_user_filters.TestFilter' is some user defined filter. See MAYAVI2 FILTERS section below for an exhaustive list of available filters. Also available through --filter. -M Starts up a new module manager on the Mayavi pipeline. Also available through --module-mgr. -n Creates a new window/scene. Any options passed after this will apply to this newly created scene. Also available through --new-window. -t Runs the mayavi2 test suite and exits. If run as such, this runs both the TVTK and Mayavi2 unittests. If any additional arguments are passed they are passed along to the test runner. So this may be used to run other tests as well. For example: - mayavi2 -t enthought.persistence This will run just the tests inside the enthought.persistence package. You can also specify a directory with test files to run with this, for example: - mayavi2 -t relative_path_to/integrationtests/mayavi will run the integration tests from the mayavi sources. Also available through --test. -x script-file This executes the given script in a namespace where we guarantee that the name 'mayavi' is Mayavi's script instance -- just like in the embedded Python interpreter. Also available through --exec WARNING: Note that this uses `execfile`, so please note that this can be dangerous if the script does something nasty! -s python-expression Execute the expression on the last created object. For example, if the previous object was a module, and we want to set the color of that object one can do -s "actor.property.color = (1,0,0)". One should use quotes for the expression. Also available with --set. For example: mayavi2 -d ParametricSurface -m Outline \ -s "actor.property.color = (1,0,0)" \ -s "scene.save('test.png', size=(800, 800))" WARNING: Note that this uses `exec`, so please note that this can be dangerous! MAYAVI2 MODULES - Axes - Draws simple axes. - ContourGridPlane - A contour grid plane module. This module lets one take a slice of input grid data and view contours of the data. - CustomGridPlane - A custom grid plane with a lot more flexibility than GridPlane module. - DataSetClipper - This filter clips the dataset in a area. The area can be defined interactively as a box, a sphere... - Glyph - Displays different types of glyphs oriented and colored as per scalar or vector data at the input points. - GridPlane - A simple grid plane module. - HyperStreamline - A module. Hyperstreamlines are used to visualize tensor fields. - ImageActor - A simple module to view image data efficiently. - ImagePlaneWidget - A simple module to view image data. - IsoSurface - A module that allows the user to make contours of input point data. - Labels - Allows a user to label the current dataset or the current actor of the active module. - OrientationAxes - Creates a small axes on the side that indicates the position of the co-ordinate axes and thereby marks the orientation of the scene. Requires VTK-4.5 and above. - Outline - A. - TensorGlyph - Displays tensor glyphs oriented and colored as per scalar or vector data at the input points. -. - WarpVectorCutPlane - Takes an arbitrary slice of the input data using an implicit cut plane and warps it according to the vector field data. The scalars are displayed on the warped surface as colors. MAYAVI2 FILTERS - CellDerivatives - Computes derivatives from input point scalar and vector data and produces cell data on the gradients. Can be used to approximately calcuate the vorticity for example. - CellToPointData - Transforms cell attribute data to point data by averaging the cell data from the cells at the point. - Contour - A contour filter that wraps around the Contour component to generate iso-surfaces on any input dataset. - CutPlane - This class represents a cut plane that can be used to slice through any dataset. It also provides a 3D widget interface to position and move the slice interactively. - ElevationFilter - Creates scalar data corresponding to the elevation of the points along a line. - Delaunay2D - Performs a 2D Delaunay triangulation. - Delaunay3D - Performs a 3D Delaunay triangulation. - ExtractEdges - This filter extracts cell edges from any input data. - ExtractGrid - Allows a user to select a part of a structured grid. - ExtractTensorComponents - Wraps the TVTK ExtractTensorComponents filter to extract components from a tensor field. -. - ExtractVectorComponents - Wraps the TVTK ExtractVectorComponents filter to extract components of a vector. This is useful for analysing individual components of a vector data. - GaussianSplatter - This filter splat points into a volume with an elliptical, Gaussian distribution. - MaskPoints - Selectively passes the input points downstream. This can be used to subsample the input points. Note that this does not pass geometry data, this means all grid information is lost. - GreedyTerrainDecimation - Approximates a height field (image data) with a triangle mesh, keeping the number of triangles minimum. - ImageChangeInformation - A filter that can be used to change the origin, spacing and extents of an input image dataset without changing the data itself. - ImageDataProbe - A filter that can be used to probe any dataset using a Structured Points dataset. The filter also allows one to convert the scalar data to an unsigned short array so that the scalars can be used for volume visualization. -). - QuadricDecimation - Reduce triangles in a mesh, forming a good approximation of the original mesh. - SelectOutput - A filter that allows a user to select one among several of the outputs of a given input. This is typically very useful for a multi-block data source. - SetActiveAttribute - This filter lets a user set the active data attribute (scalars, vectors and tensors) on a VTK dataset. This is particularly useful if you need to do something like compute contours of one scalar on the contour of another scalar. - Stripper - Create triangle strips and/or poly-lines. Useful for regularizing broken up surfaces, such as those created by the Tube filter. . - Threshold - A simple filter that thresholds on input data. - TransformData - Performs a linear transformation to input data. - TriangleFilter - Converts input polygons and triangle strips to triangles using the tvtk.TriangleFilter class. This is useful when you have a downstream filter that only processes triangles. - Tube - Turns lines into tubes. - UserDefined - This filter lets the user define their own filter dynamically/interactively. It is like FilterBase but allows a user to specify the class without writing any code. - Vorticity - This filter computes the vorticity of an input vector field. For convenience, the filter allows one to optionally pass-through the given input vector field. The filter also allows the user to show the component of the vorticity along a particular cartesian co-ordinate axes. It produces point data on output which is ready to visualize. -. EXAMPLES - mayavi2 -d heart.vtk -m Axes -m Outline -m GridPlane -m ContourGridPlane -m IsoSurface mayavi2 -d fire_ug.vtu -m Axes -m Outline -m VectorCutPlane -f MaskPoints -m Glyph In the above examples, heart.vti and fire_ug.vtu VTK files can be found in /usr/share/doc/mayavi2/examples/data. The examples directory (/usr/share/doc/mayavi2/examples/ on Debian) provides several useful examples. AUTHOR Mayavi was originally developed by Prabhu Ramachandran. Many people have later contributed to it. More information on Mayavi2 can be obtained from qui va convaincre les décideurs que linux est un produit mature 21:25 Je suis un décideur, et après etre venu sur DLFP, je me suis décidé à ne pas installer Linux. Contenus ©2006-2018 Benjamin Poulain Design ©2006-2018 Maxime Vantorre
http://www.linuxcertif.com/man/1/mayavi2/
CC-MAIN-2018-30
refinedweb
1,696
51.04
KIO #include <kicondialog.h> Detailed Description Icon canvas for KIconDialog. Definition at line 30 of file kicondialog.h. Constructor & Destructor Documentation Creates a new icon canvas. - Parameters - Definition at line 132 of file kicondialog.cpp. Destroys the icon canvas. Definition at line 149 of file kicondialog.cpp. Member Function Documentation This signal is emitted when the loading of the icons has been finished. Returns the current icon. Definition at line 258 of file kicondialog.cpp. Load icons into the canvas. Definition at line 156 of file kicondialog.cpp. Emitted when the current icon has changed. This signal is emitted whenever an icon has been loaded. - Parameters - This signal is emitted when the loading of the icons has started. - Parameters - Call this slot to stop the loading of the icons. Definition at line 265 of file kicondialog.
https://api.kde.org/4.x-api/kdelibs-apidocs/kio/html/classKIconCanvas.html
CC-MAIN-2020-05
refinedweb
136
55.3
Re: 88 5.0 failed emmisions. - From: "JohnV@nn" <jmvannoy@xxxxxxxxx> - Date: 4 Aug 2006 16:21:03 -0700 Pinched this from a usenet post, may be helpful. - John V ==================================== Emission (smog) test problems. ============================== What to look for when any of CO, HC, NOx too high. CO: rich fuel mixture HC: incomplete combustion NOx: hot combustion and rich fuel mixture CO, HC, and NOx: incomplete exhaust conversion 80%-85% of vehicles pass emissions tests. an in-tune well-maintained vehicle should pass. allowances are made for the age of the vehicle. for the rest some details are provded below. note that both CO and HC rise in the absence of O2 (oxygen) in combustion and in exhaust, and that NOx rises in the abscence of O2 at high combustion temperature. HC also rises when there is too much O2 in combustion. 1. CO (carbon monoxide) too high. --------------------------------- causes: a) not enough air (oxygen) in air/fuel mixture to make carbon dioxide (CO2) so get carbon monoxide (CO) instead (mixture too rich). can be too little air or too much fuel in mixture. b) not enough air (oxygen) in exhaust system to convert CO to CO2 c) faulty catalytic converter. look for: a) too little air - dirty air filter, stuck choke, plugged or sticking PCV or EGR system, plugged carbuettor or injector air passage b) too much fuel - carburettor or fuel injection system supplying too much fuel c) too little air or too much fuel - engine control system - vacuum hoses, sensors (eg exhaust oxygen, temperature, air flow), computer, actuators (eg fuel metering solenoid, air metering solenoids), wires and connections (control system voltages are so low that small resistances from dirty or loose connections make a big difference), the computer uses the input from the sensors to send signals to the actuators to keep the air/fuel mixture at the optimum for power, fuel efficiency, and low emissions. d) too little air in exhaust system - restricted outside air feed to converter (eg air pump or pulse air system - hoses, electrical connections, valve, pump, drive belt, sensors) 2. HC (hydrocarbons, ie unburned fuel) too high. ------------------------------------------------ causes: a) not enough oxygen in combustion to burn all the fuel, or too much fuel (mixture too rich), so excess fuel blows out exhaust. b) too much oxygen in combustion or too little fuel (mixture too lean) for uninterrupted combustion (engine misses), so unburned fuel blows out exhaust. c) sparkplugs not firing properly to ignite air/fuel mixture (ignition system), so unburned fuel blows out exhaust. d) combustion chamber too cold for complete combustion, so unburned fuel blows out exhaust. e) combustion chamber hot spots preventing complete combustion, so unburned fuel blows out exhaust. f) not enough air (oxygen) in exhaust system to convert HC to H2O and CO2. g) faulty catalytic converter. note that HC in exhaust can combine with S (sulphur) from fuel to produce rotten egg smell. look for: --------- a) mixture too rich - see a,b,c in CO section above. note that if HC is too high but CO is okay then the problem is not a rich mixture. b) too much oxygen in combustion - leaks of air (hoses, gaskets) and routing of hoses into intake manifold, leaks in EGR and PCV valves c) too little fuel - dirt in fuel/filtre/tank/lines, leaks in fuel lines or connections, weak fuel pump, - mechnical problems in carburettor (dirty valves or passages or linkages, worn parts or gaskets) or fuel injection system d) too much air or too little fuel - computer not mixing air and fuel properly (see c in CO section above) d) ignition system - sparkplugs fouled (type of fouling may indicate problem), poor contact or insulation in high voltage ignition wires or in distributor (cap, rotor), poor contact in coil wires, low voltage in charging system (alternator, regulator), faulty transistorized ignition control module e) combustion chamber too cold - sticking EGR valve or sitcking cylinder exhaust valve or bad cylinder valve timming letting "cooler" exhaust gas into the combustion chamber. f) combustion chamber hot spots - bits of junk (dirt, carbon) or nicked or burned metal parts glowing red hot in combustion chamber and igniting air/fuel mixture (engine misses) - can use chemical cleaner in combustion chamber or take engine out on the highway or both to burn off junk - overhaul engine to remove nicked or burned metal parts or hardened junk g) too little air in exhaust system - see d in CO section above. 3. NOx (oxides of nitrogen) too high: ------------------------------------- causes: a) too much heat in combustion chamber - air contains about 78% N2 (nitrogen gas) which becomes chemically unstable above 2500 def F and combines with O2 (oxygen, making up about 21% of air) to form NO which, released into the atmosphere, forms NO2 which in the presence of sunlight combines with HC (hydrocarbons) to form smog. note that NOx only happens when engine is under load (car at crusing speed on road or rollers). b) too much CO in exhaust (CO enhances the conversion of NO to NO2). look for: a) too much heat in combustion chamber - the EGR system or the valve timing is used to bring exhaust gas back into the combustion chamber to cool it off when the engine is hot under load at cruising speed - check the EGR system valves, solenoids, wiring, hoses - if the car does not have an EGR system check valve timing - (engine cooling (water) and lubricating (oil) systems may have some effect on combustion chamber temperature?) b) computerized engine control system - adjusts engine operation to minimize emissions (see c in CO section above). ---------------------------------------------------------------- sources: "Automechanics" (Prentice-Hall, 1988) "Import Car Manual 1983-1990" (Chilton, 1989) ------------------------------------------------------------------ Cameron wrote: Hey all! You probably have been seeing all my recent posts about the use 88 5.0 with t-tops that I just bought. I took it today to get the emmisions tested and failed (Tennessee). HC: 1446 (max allowable 220) CO: 2.35 (max allowable 1.20) I emailed the guy I bought it from and asked him if he had done any mods or disconnected anything that might cause me to be dumping so much gas. I'm getting about 30-40miles for half a tank. He said he "put a 160 degree t-stat in it for more power. That keeps it in openloop at idle which is a very rich condition. Try putting in a 180 or 190." Would just the thermostat cause it to dump hat much fuel and get readings that bad? What is the stock thermostat rated for and I'll pick one of those up at autozone? I have been driving it out in the hot sun with the AC on and I haven't notice it running any hotter than my other mustang. If the t-stat woldnt cause this much of a bad reading then I can take it to the local BP shop and for $70 they said they can debug the vehicle and tell me exactly whats wrong that is causing me to fail. Thanks! --Cameron . - Follow-Ups: - Re: 88 5.0 failed emmisions. - From: Cameron - References: - 88 5.0 failed emmisions. - From: Cameron - Prev by Date: Re: Cooland Temperature Sensor location? - Next by Date: Re: 88 5.0 failed emmisions. - Previous by thread: Re: 88 5.0 failed emmisions. - Next by thread: Re: 88 5.0 failed emmisions. - Index(es):
http://newsgroups.derkeiler.com/Archive/Rec/rec.autos.makers.ford.mustang/2006-08/msg00157.html
crawl-002
refinedweb
1,226
60.14
Adding. system.web/pages/controls However, there is another option – Namespaces. Simply add an entry in the same location with values for the namespace, tagPrefix and assembly values and your control becomes ‘available’! namespace tagPrefix assembly <configuration> <!--<span class="code-comment"> snip --></span> <system.web> <pages> <controls> <!--<span class="code-comment"> the assembly should be the same name as the name generated by the application --></span> your to the page and you'll see that the inline control works fine. It appears that you need that ’src’ attribute before this works. AppRelativeVirtualPath null At this point, we could give up and move on or we could get a little creative in our solution. [Source Code] Normally, I'd drop a giant block of code in my post right here but from now on, I'm going to start using github for my snippets. You can download the whole snippet at gist on github. So to summarize our situation…. ascx Application_Start. .ascx UserControl controls tagPrefix of the web.config entry of the matching namespace. UserControl So below is a good example of what to expect: <!--<span class="code-comment"> Before" /> </controls> <!--<span class="code-comment">After request.
http://www.codeproject.com/Articles/70703/Making-UserControls-And-Namespaces-Work.aspx
CC-MAIN-2015-22
refinedweb
196
60.11
This tutorial is an introduction to the OpenCV library. Learn how to convert color channels, resize, blend, blur, and threshold images in Python. The OpenCV [1] library contains most of the functions we need for working with images. Handling images in programming requires a different intuition than handling text data. An image is made up of pixels. It looks like a spreadsheet full of cells with numerical values when zoomed in. Each pixel usually contains a value ranging between 0 to 255. The value indicates the degree of brightness for the color it is assigned to. So, how do we work with images in Python? We first need to load them as NumPy arrays, converting all image pixels into numerical values. Only then we can use different computer vision techniques to manipulate them. In this article, we are going to get our hands dirty experimenting with images using OpenCV. We will look at techniques like color conversion, resizing, blending, blurring, and thresholding. Getting your image data right is a half-way success for a useful machine learning model. Intrigued? Let’s get started. Install and Import Required Modules For this tutorial, we need to install the OpenCV, NumPy, and Matplotlib modules. NumPy is used to manipulate image arrays. Matplotlib is used to display images for comparing the “before and after”. Feel free to clone the GitHub repo of this tutorial. First, create a virtual environment for this project. Then, install the mentioned modules in a Jupyter notebook: !pip install opencv-python !pip install numpy !pip install matplotlib No surprise here — the installation should be straightforward and fast. Now execute the following lines of code in your notebook: import cv2 import numpy as np import matplotlib.pyplot as plt %matplotlib inline Note that the %matplotlib inline magic command is exclusive for Jupyter notebooks. It is not required in a Python script. It sets the backend of the Matplotlib module to display figures inline and not on a separate window. Done! Get your favorite photos ready — it’s time for experiments! Load Image and Convert Color Channels To load an image in the notebook, we use the imread method of the OpenCV module. By default, the method loads an image in color. To load a greyscale image, we need to supply a second parameter of “0’” to the method: img_greyscale = cv2.imread('./photo.jpg', 0) img_greyscale.shape img = cv2.imread('./photo.jpg') img.shape Note that the images are loaded as NumPy arrays – one greyscale and another one in color. The shape method returns (5563, 3709) for the variable img_greyscale and (5563, 3709, 3) for img. The method returns information in the form of (height, width, channel). Both the variables have the same height and width values. But img_greyscale consists of only one channel (one color) while img has three. By default, the imread method loads an image with a color order of blue, green, red. It is not the usual red, green, blue. In case you ever wonder why your images look weird in OpenCV, it is that. To display an image, use the imshow method of the Matplotlib module as follows: plt.imshow(img) Figure 1 shows how different an image can look when its color channels are mixed up.. We will use the RGB image as an example in the latter sections. But using RGB images is not a requisite — feel free to use the BGR image if you prefer. Make sure to pick the correct channels in operation. Resize Image Quiz time: which OpenCV method should you use to resize an image? You guessed it — the resize method. It takes an image and an image dimension as parameters. The following code resizes the image to be half its original size: width = int(img_RGB.shape[1] / 2) height = int(img_RGB.shape[0] / 2) img_RGB_smaller = cv2.resize(src=img_RGB, dsize=(width, height)) img_RGB_smaller.shape Note that you can supply any positive integer values to the dsize parameter of the resize method. Yet, it is a good practice to use a scale factor to keep the original aspect ratio of the image. The code shown takes the width and height values of the original image and divides them by two. The output of the img_RGB_smaller.shape is (2781, 1854, 3), which is 50% smaller than its original size, (5563, 3709, 3). You can also make the image larger by multiplying its width and height by two, as follows: width = int(img_RGB.shape[1] * 2) height = int(img_RGB.shape[0] * 2) img_RGB_bigger = cv2.resize(src=img_RGB, dsize=(width, height)) img_RGB_bigger.shape That creates an image of size (11126, 7418, 3). Feel free to be creative with the image dimension definitions. Figure 2 shows the resized images. Both look the same because their aspect ratios are retained. Note the differences in their width and height axes instead. Blend Images Image blending means combining two images with shared transparency. We want two images to “blend into” each other as one image. For this, we need to load another image to our notebook: img_overlay = cv2.imread('./photo-overlay.jpg') img_overlay.shape All images used in this code project can be found at Unsplash.com. The second image is loaded as variable img_overlay with dimensions (2000, 1800, 3). Images must have the same size for image blending. As img_overlay is of a different size than the first image, we need to resize it to match the size of the first image: img_overlay = cv2.resize(img_overlay, (img_RGB.shape[1], img_RGB.shape[0])) img_overlay.shape Note that the dsize parameter takes a value in the form of (width, height), not (height, width). Thus, we enter (img_RGB.shape[1], img_RGB.shape[0]) as the parameter instead of the other way round. Now, the output of img_overlay.shape should show the same size as img_RGB, which is (5563, 3709, 3). Enter the following code to blend both the images together: blended = cv2.addWeighted(src1=img_RGB, alpha=0.3, src2=img_overlay, beta=0.7, gamma=0) The addWeighted method of OpenCV combines the images with a “transparency weightage”. The src1 parameter takes the background image and the src2 the foreground image. The alpha parameter sets the transparency of src1 and the beta of src2. Both alpha and beta can take values ranging from 0 to 1 and should both add up to 1. A value closer to 0 indicates more transparency. A value closer to 1 indicates more opaqueness. The gamma parameter sets the brightness of the output image. Figure 3 shows the before and after of the image blending operation. Blur Image Here, we crop out a smaller section of an image to better notice the image blurring operation. Taking img_RGB, we copy its bottom right part as img_small using NumPy array slicing: img_small = img_RGB[4000:, 2000:] That will create a smaller image of size (1563, 1709, 3). There are various image blurring functions in the OpenCV module. For example, average blurring, median blurring, and Gaussian blurring. They differ in their mathematical operations and outcomes. For the sake of simplicity, we use the basic average blurring function in this tutorial. Enter the following line of code in your notebook: blurred = cv2.blur(src=img_small, ksize=(100, 100)) You must have familiarized yourselves with the OpenCV parameters by now. Otherwise, press the SHIFT + TAB buttons to view any function description. The ksize parameter of the blur method defines the dimensions of the filter kernel. A kernel is like a paintbrush or sponge that you use to “smudge” the original image and make it blurry. The ksize parameter is the width and height of the sponge that you want to use – in this case, 100 x 100. Figure 4 shows the cropped image with its blurred after effect. Threshold Image Image thresholding turns a greyscale image into either black or white pixels. You might be asking: what’s the need for blurring and thresholding images? The answer is: so that computational models can perceive image data better. Take edge detection as an example: we want to blur or smooth object edges so that there will be less noise. And we want to threshold images so object boundaries can be defined better. For thresholding, we use img_greyscale instead of the coloured image. Enter the following one-liner in your notebook: ret, thresh1 = cv2.threshold(src=img_greyscale, thresh=127, maxval=255, type=cv2.THRESH_BINARY) The threshold method takes a greyscale image as its src parameter. The thresh parameter is the cutting-point for the black/white pixel decision. Any pixel value lower than the thresh value will be assigned 0. Any pixel value above the thresh value will be assigned 1. That creates the black-or-white contrast. As the image has its values ranged from 0 to 255, we assign the maxval (largest value) parameter as 255. The type parameter defines the kind of threshold we want. THRESH_BINARY converts all shades of grey in the image into either black or white. Figure 5 shows a greyscale image with its outcome after the thresholding operation. You have just learned five useful techniques in computer vision. Well done! Conclusion This article elaborates on five basic image processing techniques of OpenCV. They include color conversion, resizing, blending, blurring, and thresholding. It is a step-by-step introductory tutorial to perform computer vision operations in Python. References [1]
https://blog.finxter.com/five-useful-image-processing-techniques-in-python-using-opencv/
CC-MAIN-2021-43
refinedweb
1,551
67.96
I wanted to use PostgreSQL‘s array_agg function from Django to help bound the number of queries a complex page makes. array_agg I managed to make it work, but it was a bit painful. I’d love to hear from anyone else that’s managed to make it work, especially if you didn’t have to hack as hard as me First, let’s define some models for us to play with: from django.db import models class Location(models.Model): name = models.CharField(max_length=1024) class Hurricane(models.Model): year = models.IntegerField() name = models.CharField(max_length=1024) location = models.ForeignKey(Location) The problem I want to solve is: for a given Location, show the hurricanes that occurred for the last ten years in which there were hurricanes. Location In this simplified case, this is probably quite easy to solve without being as fancy as I am about to be, but the thing that makes it non-trivial is the bit at the end: displaying from the last ten years is easy (“WHERE YEAR > 2002“) but there may be years where there were not hurricanes. The trick I want to use is to GROUP ON year, use array_agg to collect the ids of the hurricanes for each year, and use LIMIT to ensure I only get 10 years worth. Then I can gather the Hurricane ids up in Python code and issue another query to fetch them all in a single query. I’m aiming for something like this: WHERE YEAR > 2002 GROUP ON LIMIT Hurricane hurr=> SELECT year, array_agg(id) FROM hurr_hurricane hurr-> WHERE hurr_hurricane.location_id = 1 hurr-> GROUP BY year ORDER BY year LIMIT 10; year | array_agg ------+----------- 2004 | {2,1} 2006 | {3} 2007 | {4} (3 rows) I’ve never quite gotten my head around Django’s support for aggregates, but it’s not hard to get Django to emit a query of the right shape: >>> qs = Hurricane.objects.filter( ... location=loc).values('year').annotate(Sum('id'))[:10] >>> print qs.query SELECT "hurr_hurricane"."year", SUM("hurr_hurricane"."id") AS "id__sum" FROM "hurr_hurricane" WHERE "hurr_hurricane"."location_id" = 1 GROUP BY "hurr_hurricane"."year", "hurr_hurricane"."year" ORDER BY "hurr_hurricane"."year" LIMIT 10 >>> pprint(list(qs)) [{'id__sum': 3, 'year': 2004}, {'id__sum': 3, 'year': 2006}, {'id__sum': 4, 'year': 2007}] We don’t want to SUM though, we want to array_agg. I don’t really know to what extent it’s actually supported, but googling can find enough of a clue on how to use custom aggregates with Django. Culting the approprate cargo leads to: SUM from django.db.models.sql.aggregates import Aggregate as SQLAggregate from django.db.models import Aggregate class SQLArrayAgg(SQLAggregate): sql_function = 'array_agg' class ArrayAgg(Aggregate): name = 'ArrayAgg' def add_to_query(self, query, alias, col, source, is_summary): klass = SQLArrayAgg aggregate = klass( col, source=source, is_summary=is_summary, **self.extra) query.aggregates[alias] = aggregate and then: >>> qs = Hurricane.objects.filter( ... location=loc).values('year').annotate(ArrayAgg('id')).order_by('year')[:10] >>> print qs.query SELECT "hurr_hurricane"."year", array_agg("hurr_hurricane"."id") AS "id__arrayagg" FROM "hurr_hurricane" WHERE "hurr_hurricane"."location_id" = 1 GROUP BY "hurr_hurricane"."year", "hurr_hurricane"."year" ORDER BY "hurr_hurricane"."year" ASC LIMIT 10 Yay! Except: >>> list(qs) [] Huh? This sent me around the houses for ages and ages, but it turns out that there is an easy way of seeing the problem: >>> for hurricane in qs: ... print hurricane Traceback (most recent call last): ... ... File "/srv/lava/.cache/eggs/Django-1.4.1-py2.7.egg/django/db/models/sql/query.py", line 316, in convert_values return connection.ops.convert_values(value, field) File "/srv/lava/.cache/eggs/Django-1.4.1-py2.7.egg/django/db/backends/__init__.py", line 843, in convert_values return int(value) TypeError: int() argument must be a string or a number, not 'list' (Something in executing list(qs) is swallowing the exception – I presume this is a bug, I’ll file it soon if it’s unreported.) So let’s look at where the exception comes from (django/db/backends/__init__.py, Django version 1.4.1 below): django/db/backends/__init__.py) Django appears to assume that all aggregates return numeric types. This is a bit annoying (another bug to file?), but there is a slimy hack we can pull: DecimalFields are assumed to be the correct type already and do not get converted. So here’s the final, working, array_agg support: from django.db.models import DecimalField class SQLArrayAgg(SQLAggregate): sql_function = 'array_agg' class ArrayAgg(Aggregate): name = 'ArrayAgg' def add_to_query(self, query, alias, col, source, is_summary): klass = SQLArrayAgg aggregate = klass( col, source=source, is_summary=is_summary, **self.extra) aggregate.field = DecimalField() # vomit query.aggregates[alias] = aggregate And to prove it works: >>> pprint(list(qs)) [{'id__arrayagg': [2, 1], 'year': 2004}, {'id__arrayagg': [3], 'year': 2006}, {'id__arrayagg': [4], 'year': 2007}] Yay! Now: does it really have to be this hard? The Ubuntu developers and, because Linaro started out with a fork of Ubuntu’s processes, the Linaro developers track much of their work in blueprints on Launchpad and work items in those blueprints. We’ve even built a fairly sophisticated web site that tracks work item completion in a manager friendly way. Editing these work items is a fairly tedious job however. The syntax is fairly simple but still easy to get wrong, and fiddling around in a textarea just to change one work item to DONE is not very friendly. So, after a challenge laid down by James, I’ve built a Greasemonkey script that adds a button to blueprint pages which opens an editor that lets you easily change the status or and add work items to the blueprint. In action, it looks like this (it uses the LP JavaScript widgets, so it almost feels like a native part of Launchpad): There are probably a few bugs, and certainly things it doesn’t do (off the top of my head: track the milestone a work item is allocated to, let you delete or reorder work items or allow you to change the assignee of a workitem with a nice person picker) but I think it will save us all a bit of time every day even in its current state. The script is now part of the launchpad-gm-scripts project on Launchpad. I don’t really know the best way of installing greasemonkey scripts yet. Grabbing the branch, opening it in Nautilus and dragging it into a firefox window worked for me. Chrome/chromium has a similar extension, but it hasn’t been tested there. If you do, I’d love to know if it works Please submit bug reports or merge proposals on LP if you find problems! It seems like it’s taken a long time to get all the pieces hooked up, but I’m very happy to report that finally you can see the results of testing an android build in LAVA directly in the build page! If you go to a build page for a build that is automatically tested such as (after a little while for some ajax to happen), you should see a table listing the test runs we ran and the summary of the pass/fail counts: It may not seem all that earth shattering, but there have been many bits and pieces that needed to be put together to get this to work: So I think I’m justified in being happy to have this finally working in production Of course, it’s just a start: we want to build similar facilities for the other working groups to use, if nothing else. We’ve just deployed the 2011.08 release of the LAVA components to. It feels like we’re getting to the point where we can start working on the really interesting features now, which is nice after what feels like months of building infrastructure. While the official release highlights are a good list of what happened, here is a summary from my point of view of the changes from what was previously deployed: lava-dashboard lava-dispatcher lava-scheduler lava-server lava-test What’s on for next month? Well from my side, it’s likely to be still around ‘joining the dots’, starting with enabling the android team to see the results of a test run on the build page. I think other likely developments are to be making our story for running tests on android a bit clearer, refactoring the way configuraton is done for the dispatcher (and making debian packages for it), supporting more hardware in the lab, putting the final pieces together to allow daily testing of the kernel working group output, documentation, email notifications of various things, and I’m sure various things that I’ve forgotten or haven’t cropped up yet. It’s going to be another busy month! A There was a lot of hacking and a lot talking. These are some things I remember: I’m sure there was lots of other stuff, but this should give some impression of how much went on! This.). This is easy stuff — and not at all ARM specific — but I never remember this sort of thing. I set up my user account with: # adduser mwh # adduser mwh sudo Then I made a ssh key, added it to my account on Launchpad and put the ssh key from my laptop into .ssh/authorized_keys. Setting up networking on the Beagle xM is a bit of a pain. The ethernet port is wired up in some weird way via the USB subsystem (so the interface ends up being called “usb0″) and there’s no MAC address in the EEPROM on the card, so it gets a random MAC address every time you bring the interface up, which makes making DHCP do what you want something of a chore. What follows is what I’ve done. It may well not be anything like optimal, but it seems to work. I access the internet here at the office via wifi, and wanted to share the connection to the xM via my laptop’s ethernet port. There’s a wiki page about this but for whatever reason the network manager method of connection sharing didn’t work at all for me. 1. Choose a name for the board (I chose “bitty” for some reason). 2. Configure dhclient on the board to send this as its hostname when asking for a lease by adding “send host-name “bitty”;” to /etc/dhcp3/dhclient.conf 3. On the laptop, use Network Manager to give the ethernet port a static address of 10.0.0.1. 4. Install dnsmasq. This is a DNS + DHCP server. 5. Configure dnsmasq. Predictably, I can’t remember all the things I’ve changed in here. I think I added “interface=eth0″, “dhcp-range=10.0.0.50,10.0.0.100″ and “dhcp-host=bitty,10.0.0.45,1h” to respectively answer dhcp on the wired ethernet port, do dhcp at all and to assign a particular address to the machine that calls itself “bitty”. 6. I then followed the iptables and other instructions from the “Gateway set up” section of the aforementioned wiki page. 7. Restarted dnsmasq. 10. Added “10.0.0.45 bitty” to /etc/hosts on the laptop 11. Run “dhclient usb0″ as root on the board (via the serial console). You should now have network! So you can run “apt-get update” and so on like a good citizen. Looking at the above list of instructions, I don’t know why I bothered with DHCP and didn’t just configure everything statically on the board, especially as the above has the following problem: when you restart the board and run dhclient the board has a new MAC address, but as the dhcp server thinks that 10.0.0.45 is still leased to the address the board had before the reboot it doesn’t hand out the desired. The fix for this is “sudo rm /var/lib/misc/dnsmasq.leases” “sudo /etc/init.d/dnsmasq restart” but that seems like an utter hack. That’s enough for one post, next will be a brief reminder (mostly for myself) on how to set up users from the command line and then I’ll talk about more me-specific things like setting up a caching proxy to make debootstrap go much faster. After I’d unpacked and booted my xM, I wanted to install a Linaro daily build on it. This was actually fairly complicated for me because of a few bugs I ran into on the way, but as they’re all fixed now I’ll describe the way it’s meant to work Basically, the instructions on the wiki are what you want. You can download the latest snapshot from (which is what I’d recommend at this point; I can state that the 20100915-1 build works for me) or you can navigate your way to a more official release from (but don’t use the Linaro 10.11 Beta — it has a not very serious kernel bug that makes upgrades harder than needed on xMs). Once you’ve downloaded the file (using dlimage or just boringly) and run linaro-media-create with a command line like sudo linaro-media-create --dev beagle --rootfs ext3 --mmc /dev/sdb \ --binary ~/Downloads/linaro-m-headless-tar-20100915-1.tar.gz (make sure you get the –mmc bit right!), pop the card into your board, power it up and with the serial console connected run “screen /dev/ttyUSB0 115200″ again. The Linaro image is slightly different to the one that comes with the board in that you get a root prompt directly on the serial console, no need to log in. As an aside, when I want to boot on a different card, I usually type ‘poweroff’ on the serial console, pull the card out, pop the new one in and press the reset button. I don’t know if this is the best process There is a kernel bug that prevents clean shutdown after the card has been on for a while, but it happens late enough in the shutdown process that I ignore it. Next up, I’ll talk about how I set up my cards for networking and general user-level hackery. About Canonical About Ubuntu Enterprise services Engineering services Consumer services Further information © 2010 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.
http://voices.canonical.com/michael.hudson/
CC-MAIN-2013-20
refinedweb
2,390
60.45
0 I am writing a program that is supposed to count the number of vowels in an inputted (by the user) body of text. import java.util.*; public class Vowels{ public static void main(String[] args){ Scanner console = new Scanner(System.in); int counter= 0; System.out.println("\nInput a sequence of characters"); String text = console.nextLine(); text = text.toLowerCase(); for (int loop = 0; loop < text.length(); loop++){ char lett = text.charAt(loop); if (lett=='a' || lett=='e' || lett=='i' || lett=='o' || lett=='u') { counter++; } } System.out.println("There are " + counter + " vowels in the inputted text."); } } Whenever I run this code, there's no input box for the user to input text. If I change the "String text = console.nextLine();" to "String text = console.next();" then only the first word is taken into account.
https://www.daniweb.com/programming/software-development/threads/322351/nextline-skipping
CC-MAIN-2016-50
refinedweb
134
71.31
In this example we are going to show how easy it is to filter results from a Collection. This example again shows the old way vs. the new way. import java.util.*; import java.util.stream.*; public class UserFilterTest {() { List<User> olderUsers = new ArrayList<User>(); for (User u : users) { if (u.age > 30) { olderUsers.add(u); } } printListNewWay("Old way older users", olderUsers); } private static void newJavaWay() { List<User> olderUsers = users.stream().filter(u -> u.age > 30).collect(Collectors.toList()); printListNewWay("New way older users", olderUsers); } private static void printListNewWay(String type, List<User> users) { System.out.println(type + ":"); users.forEach(u -> System.out.println("\t" + u)); System.out.println(); } } This example uses the User class from the previous section. Again we create our list of users and this time we want to get a list of only the users older 30 years. This is simple to do in java, here's how we do it with the old method: List<User> olderUsers = new ArrayList<User>(); for (User u : users) { if (u.age > 30) { olderUsers.add(u); } } That's easy enough, but look how easy it is with lambda expressions: List<User> olderUsers = users.stream().filter(u -> u.age > 30).collect(Collectors.toList()); That's a lot less boilerplate code and we don't have to use any specific List implementation. We could also make our filter more complex by checking more than one variable: List<User> olderUsers = users.stream().filter(u -> u.age > 30 || u.lastName.startsWith("S")).collect(Collectors.toList()); With this filter we check both age being over 30 and if the last name starts with an "S". In the next section we will learn how to pass a function as a parameter to another function. Prev (Comparator) | Next (Functions As Parameters)
http://www.dreamsyssoft.com/java-8-lambda-tutorial/filter-tutorial.php
CC-MAIN-2019-09
refinedweb
294
58.89
and running Java programs from command line. Java SE has a Java Development Kit (JDK) which contains a Java Virtual Machine (JVM), the runtime environment (JRE) for running Java programs, and the compiler (javac). Create and Run a Hello World Program Create a working directory, for example: /projects/jtwilio. Before trying a Twilio request program, create and run the Hello World program, hello.java. This will confirm your environment is setup and working. public class hello { public static void main(String[] args) { System.out.println("Hello world."); } } Compile the file into bytecode using the javac command. $ javac hello.java $ ls -l total 17968 -rw-r--r-- 1 dthurston 410487729 416 Oct 26 15:13 hello.class -rw-r--r-- 1 dthurston 410487729 118 Oct 26 15:13 hello.java ... Run the program using the JVM. The JVM is an interpreter that reads and runs the hello.class file. $ java hello Hello world. You now have a tested, working Java environment to compile and run Java programs. Next, is to integrate the Twilio Java helper library into your compilations and run the programs using the helper library. Create and Run a Twilio API Request Java Program Download the Twilio helper library JAR file into your working directory. JAR stands for Java ARchive file. Essentially a JAR file is an archive zip file. Go to the repository directory and download the recent helper JAR file. At the time of writing the most recent JAR file is 7.29.0. Create a program to list your Twilio account phone numbers: listAccNums.java. import com.twilio.Twilio; import com.twilio.base.ResourceSet; import com.twilio.rest.api.v2010.account.IncomingPhoneNumber; public class listAccNums { public static void main(String[] args) { Twilio.init("ACXXXXXX","YYYYYYYY"); System.out.println("+ List account numbers:"); ResourceSet<IncomingPhoneNumber> accnumbers = IncomingPhoneNumber.reader().read(); for (IncomingPhoneNumber number : accnumbers) { System.out.println( "++ " + number.getPhoneNumber() + " " + number.getDateCreated() + " " + number.getFriendlyName() ); } } } You can view the contents of a JAR file using the jar command. You could rename the JAR file to have the extension, “.zip” and unzip the file to see the contents. But the jar command is much easier. $ jar -tf twilio-7.29.0-jar-with-dependencies.jar META-INF/ META-INF/MANIFEST.MF META-INF/maven/ ... org/apache/http/client/methods/RequestBuilder.class org/apache/http/client/methods/HttpGet.class ... com/twilio/rest/api/v2010/account/IncomingPhoneNumberReader.class ... com/twilio/rest/api/v2010/account/IncomingPhoneNumber.class ... com/twilio/rest/taskrouter/ ... com/twilio/rest/trunking/ ... com/twilio/rest/accounts/ ... com/twilio/rest/voice/ ... com/twilio/rest/wireless/ ... Note, in the above listing, is the file: IncomingPhoneNumberReader.class, which is imported into the sample program: listAccNums.java. Compile the program. List the class file program. Run the program. $ javac -cp twilio-7.29.0-jar-with-dependencies.jar listAccNums.java $ ls -l -rw-r--r-- 1 dthurston 410487729 416 Oct 26 15:13 hello.class -rw-r--r-- 1 dthurston 410487729 118 Oct 26 15:13 hello.java -rw-r--r-- 1 dthurston 410487729 1707 Oct 26 15:22 listAccNums.class -rw-r--r-- 1 dthurston 410487729 1072 Oct 26 15:22 listAccNums.java -rw-r--r--@ 1 dthurston 410487729 9185399 Oct 25 18:36 twilio-7.29.0-jar-with-dependencies.jar $ java -cp .:twilio-7.29.0-jar-with-dependencies.jar listAccNums + List account numbers: ++ +16505551111 2017-11-20T19:04:46.000Z (650) 555-1111 ++ +16505552222 2018-10-25T19:32:20.000Z (650) 555-2222 ... The compile command includes the Twilio helper library JAR file. The run command includes the Twilio helper JAR file, and the current directory: “.” which his where the class file listAccNums.class is located. “-cp” is the short form for “-classpath”. Optionally, create a scripts for compiling and running your Twilio Java programs. Put script in your PATH for ease of execution. Following are my UNIX script examples: jc for compiling, jr for running. $ cat /usr/local/bin/jc javac -cp twilio-7.29.0-jar-with-dependencies.jar $1.java $ chmod u+x usr/local/bin/jc $ cat /usr/local/bin/jr java -cp .:twilio-7.29.0-jar-with-dependencies.jar $1 $ chmod u+x usr/local/bin/jr Test the scripts by re-compiling the account phone number list program and re-running it. $ jc listAccNums $ jr listAccNums + List account numbers: + List account numbers: ++ +16505551111 2017-11-20T19:04:46.000Z (650) 555-1111 ++ +16505552222 2018-10-25T19:32:20.000Z (650) 555-2222 ... With jc and jr, you have an easy way to compile and run Twilio Java programs. If you are using an IDE, and you need a quick method to add the Twilio Java library, without using Gradle or Maven, you can download the library JAR file and include it in your IDE’s project. The following screen print shows the JAR file included in my NetBeans project. The same approach will work with Eclipse. Summary There you have it, a quick methods of running Java programs that use the Twilio Java helper library to make Twilio REST API requests, using a minimum amount of setup. This is handy for quick testing and managing programs on remote computers where command line is the only option. To help you get started writing Twilio Java programs, take a look at these set of programs I recently created based on the Twilio documentation.
https://www.twilio.com/blog/call-twilio-api-java-programs-commandline
CC-MAIN-2018-51
refinedweb
886
52.56
This thread has now been closed to direct all further updates about this service release onto the new Beta release thread: For anyone who has been commenting on this thread, feel free to continue the conversation in that new thread. Released versions: Windows Mac Reason for release: Bug fixes for the 3.11.445 29628 - [XamarinVS] [iOS] Breakpoints in Portable Class Libraries do not work because the .mdb symbol files are not copied properly. Related warning in the "Output -> Debug" window: "Symbol file ... doesn't match image". Workaround: force the .mdb files to be copied properly:. 29839 - [XamarinVS] [iOS] "Native linking error: warning: directory not found" when linking a static library into an iOS app using ${ProjectDir} in the "Additional mtouch arguments". Workaround: Replace ${ProjectDir} with ${TargetDir}/../../../. See for an example. 28918 - [iOS] "Unexpected error ... Failed to resolve System.Security.Permissions.SecurityPermissionFlag". Workaround:. Bug 29263 - [Android] Classes that are referenced by files in the "Resources/xml/" folder will currently all need [Register] attributes, even if the "XML element name" syntax is used. Non-public Bug 29170 - [Android] Profiling via log:sample causes the app to crash at startup. Bug 29822 - [XamarinVS] [iOS] Setting "Build" number different from "Version" number causes IPA not to be copied to Windows, resulting in 0 KB .ipa file. Bug 29703 - [XamarinVS] [iOS] "Show IPA File In Build Server" fails if "Build" number is different from "Version" number.. Non-public Bug 28995 - [Android] On certain devices apps crash rarely due to "System.ExecutionEngineException: SIGILL". Bug 29731 - [Android] Android.Bluetooth.BluetoothAdapter.Enable is incorrectly marked as [Obsolete("deprecated")] for API level 20 and higher. Bug 28027 - [XamarinVS] [iOS] The debugger sometimes fails to connect properly after the app launches. This means breakpoints will not be hit, and pressing the "stop debugging" button will cause VS to pause for about 2 minutes before showing an error message (you can cancel that 2 minute pause if you manually quit the app on device). This problem has existed since at least XamarinVS 3.9.483, but has apparently gotten worse for several users in this new Alpha version. To make a reasonable guess, the problem might be caused by a race condition. Based on that guess, the new Alpha version might have changed some timings and increased the probability of hitting the issue on a wider range of system configurations. The XamarinVS team is investigating. Bug 29897 - [XamarinVS] [iOS] Breakpoints sometimes don't work when debugging on iOS device. Based on the observed behavior of this problem, it appears to have the same underlying cause as Bug 28027. 15: Mention that XamarinVS.iOS bug 28027 is more common on Alpha. EDIT May 19: Close this Alpha thread and a link to the new Beta thread. @BrendanZagaeski I'm still facing this issue after moving to the Alpha channel. Xamarin: 3.11.507.0 Xamarin.Android: 5.1.0.127 I'm unsure if this is exactly the same issue or something different due to the privacy. Is there a reason it's classified as private? Thanks for the quick update, @BrendanZagaeski . I see from the lists above that Bug 29568 ([Android] "No resource found that matches the given name") isn't fixed yet, and I've also noticed that the 3.11.445 update is having trouble with overriding resources inherited from libraries in general**, not just from AppCompat. Is this part of the same problem, or is there another bug to do with library resource overriding that needs fixing? Thanks again, Philip ** If an app has style resources of the same name as those defined in a library (in order to override them) they seem to be ignored. Previous builds work the same as Android Studio in Java land in this respect; it's only the 3.11.445 update that broke library resources. 3.11.507 has the same problem with resource overrides, too. @BrendanZagaeski I have upated to the alpha and notice that it has stopped compiling the asset catalog for my iOS project in visual studio and any assets that are within doesn't get moved into the App bundle and when starting up it causes the App to crash. Update I have been browsing the build host build folder and found within the actool build folder I found the asset-manifest.plist and within it had the following error message: description - Failed to read file attributes for "/Users/steventsang/Library/Caches/Resources/Images.xcassets" reason - No such file or directory The folder should of been "/Users/steventsang/Library/Caches/Xamarin/mtbs/builds/"projectname"/"guid"/Resources/Images.xcassets" Update2 As a workaround I have placed the asset catalog file that contains the images into the directory the actool is looking to compile the asset catalog and seems to be working for now. Update3 I think I have fix the problem by running clean build on VS and deleting the build host folder on the mac and it seems to be working fine now. I will continue to monitor and update if I have any further issues. I've been using the alpha version whilst doing a couple of XamU classes and Android seems to be working fine. Not pushed it hard, but for a forms class and a 'droid class I've had no issues at all with Android. There seems to be a regression with iOS that you have to set the bundle and provisioning profile for a simulator build. @BrendanZagaeski - Is there a bug raised already for this? if not, I'll raise one. @JimBennett, that sounds like it might be a side-effect of the new, more strictly correct behavior related to entitlements:. If you manually clear the <CodesignEntitlements>property in the .csprojfile for the iPhoneSimulator configuration (assuming that element is present in that configuration), are you able to build without setting the bundle and provisioning profile? @I_am_a_duck, I the fix for Bug 29568 should indeed help with resource references for many libraries, not just the AppCompat library. The new build just published today (3.11.546) now includes the fix for Bug 29568, so feel free to test that out and verify that it does indeed solve the problem in your projects. Thanks for the report! @deckertron9000, as it turns out, there is a second bug that is specific to the graphical Xamarin Profiler. If by chance you are using the graphical Xamarin Profiler, then that second bug is most likely the cause of the problem. I have just added that second bug to the list in the first post in the thread to make the status publicly visible: There's not really any "serious" reason for either the original bug or this second bug. I think the rough explanation is just that they were filed by the QA team, and the QA team files private bugs by default because most of the time those bugs get fixed before they are released. In these particular cases it could have been helpful to keep the bugs public since they did end up in a release. I will discuss with some of the folks here about how bugs are marked and sorted during releases. So hopefully user-facing regressions will become a bit easier to track in the near future. @BrendanZagaeski Sorry - had a busy weekend, will try tonight. It was on a brand new project created in XS - so whilst I agree that not letting it be set for the simulator is a good thing the projects defaults should make sure it's blanked out. Is there a bug raised already for this, or shall I raise one? @BrendanZagaeski Thanks, I was indeed using the graphical profiler. It's nice to have some insight on the way bugs are handled. I agree that in some cases it would be useful to have more transparency on some of these bugs, but I understand the usefulness of not having every bug public facing all the time, especially if it's going to be fixed in the next release. Thanks as well for your activity in the forums. It's nice to be able to interface with the Xamarin team like this and know that our issues are being addressed. @JimBennett, good point. After a little bit of experimentation and searching, I found that there is currently one bug filed for that issue here:. I will add that bug to the list of known issues for both Stable and Alpha. Bug 29849 indicates that the problem is specific to Xamarin.iOS projects within the Xamarin.Forms templates. If you've noticed it in any of the other templates, that would indeed make an excellent additional bug report. I am experiencing bug 29133 too. But not only on the XAP, on my physical Samsung Galaxy Tab 4 too! This is really annoying. When will the fix for this bug be released to stable? @BCT, May 20th is the tentative Stable Channel release date for the service release that is currently in Alpha. That date might need to be pushed later to allow more time for fixes if QA determines that the release candidates for the service release contain one or more bugs that are worse than the regressions in the current Stable Channel. @BrendanZagaeski Ok, thanks for the information. Will try to install the Alpha release then! Breakpoints still not triggering in Android in the latest Alpha release for existing projects. it works for new blank template projects. Surely there has to be a workaround? It seems the most common cause of failed breakpoints on the new Alpha versions is a different problem than the issue on the Stable Channel where XamarinVS was failing to copy .mdbfiles for PCL projects. The new problem seems to be that Bug 28027 has become more common on the Alpha channel. The issue is under investigation. I have updated the first post in the thread with a few additional details. I have been seeing this problem with recent builds under Android: Sometimes I update XAML files and run the app but it does not appear to have been updated. Anyone else seeing something like this? I can't find a related bug report. For those running into breakpoints not being hit issues, one thing that helped me was to Delete the .vs folder, .sln.ide folder, manually clear out the bin and obj folders for each project and delete all the .user files. Hope this helps someone. Hi @BrendanZagaeski, The fix for Bug 29568 did indeed resolve my library resource override issue. However, I have found another apparent regression in all builds of 3.11 I've tried (445/6, 558 and 570). The simplest example code I have is: var stackBuilder = TaskStackBuilder.Create (this); stackBuilder.AddParentStack (Class.FromType (mActivityType)); // (mActivityType is a System.Type of any Activity-based class) The above works in 3.9 as expected: Class.FromType()returns a Java.Lang.Classinstance which AddParentStack()happily accepts. However, in all 3.11 builds, the call to AddParentStack()throws an exception: android.content.pm.PackageManager$NameNotFoundException: ComponentInfo{... The activity in question is correctly defined in the app manifest (otherwise the above wouldn't work in 3.9 either), so this is definitely a change of behaviour introduced in 3.11. Interestingly, the Java.Lang.Classreturned by Class.FromType()in 3.9 has a clear text namespace prefix in its name property, e.g. Name: "example.app.namespace.ExampleClass"as viewed in the debugger, but in 3.11 it has a mangled namespace prefix, e.g. Name: "md5e6e383b03eea42faa32711371720f95e.ExampleClass". Is this perhaps a new feature of 3.11 that I've missed? Sorry if this is a known issue but I couldn't find any reference to this error in Bugzilla. HTH, Philip @I_am_a_duck, no worries. The change you're seeing in the name returned by Class.FromType()is indeed due to an intentional modification in the "name mangling scheme for Android Callable Wrappers" introduced in Xamarin.Android 5.1 to solve some tricky bugs (Bug 15205, Bug 16826, Bug 21147). See also the corresponding section of the release notes. But your particular example looks like it might be an edge case where something goes wrong with this new name mangling. For comparison, the "Notifications" sample from the "xamarin/mobile-samples" repository uses AddParentStack()and Class.FromType()in a very similar way: And that sample runs correctly for me on Xamarin.Android 5.1.2 (and XamarinVS 3.11.570). Next steps Since the "Notifications" sample behaves correctly, the question becomes "what is unique about your app compared to that sample?" Perhaps the mActivityTypein your app is from a Xamarin.Android library project that was built against an older version of Xamarin.Android? I haven't had a chance to try that scenario specifically, so there's a chance something behaves unexpectedly in that case. Maybe the mActivityTypein your app is a native Java class that is bound to C# using a Xamarin.Android Java binding project? I haven't had a chance to try that either. Maybe the exact classes and names in your app expose a bug in the new name mangling scheme that is unrelated to #1 or #2. If you get a chance, the most direct way forward would probably be to zip up and attach a self-contained,.) You can paste a link to the bug report back in this thread once it's ready. Thanks! I updated to XamarinVS 3.11.570 and now I can't get my app get to work on iPhoneSimulator. When I look in the cache folder on my Mac I can see System.Threading.Taskgot copied onto the Mac. With the stable XamarinVS I didn't had this problem. It seems that I have 2 options right now: First is to use the stable release and live with hanging VS 80% of the time or use Alpha release and can't test the iOS version. And btw: XamarinVS still blocks PCL's that have changed. I always have to close VS and delete bin and obj when I change something in our WebService PCL. I'll post the exception stack trace here: @RaphaelSchindler, that is a variation on the following issue from the first post in the thread: I should in fact update this text to be more general. The problem can happen with several different assemblies when they are used via PCLs. I will take care of that update shortly. In the particular case of System.Threading.Tasks, you would add the following under "Additional mtouch arguments" as a workaround: () I am now closing this thread to direct all further updates about this release onto the new Beta release thread: For anyone who has been commenting on this thread, feel free to continue the conversation in that new thread. It appears that the android searchbar breaks in the latest release with the following: System.MissingMethodException: Method 'SearchView.get_InputType' not found. 05-20 02:22:50.694 I/MonoDroid( 776): at Xamarin.Forms.Platform.Android.VisualElementRenderer 1<Xamarin.Forms.SearchBar>.SetElement (Xamarin.Forms.SearchBar) <0x007fb> 05-20 02:22:50.704 I/MonoDroid( 776): at Xamarin.Forms.Platform.Android.VisualElementRenderer1<Xamarin.Forms.SearchBar>.Xamarin.Forms.Platform.Android.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <0x0012b>
https://forums.xamarin.com/discussion/comment/124686/
CC-MAIN-2019-18
refinedweb
2,534
57.06
Variables I would suggest seperate subnets for LAN preformance, but the direct answer would be it depends, and probly you are fine. Lots of varibles here though. Seperating the LAN will require distribution of some some network resources that you may now have in only one place. Whats the network infrstructure? Future growth requirements etc. Do you have multiple AD Servers, DNS , DHCP etc? If so then you may be fine. Still, what is the client OS base? Is your network using internal DNS? Are you using DHCP and if so what is the node type? What types are services or resources are being used? Based on the OS, the types of applications used, and the node type etc., the workstations my be checking your DNS or WINS server and getting access to resources without a broadcast. A lot will also of course depend on those services being configured properly. As you suggest, subnets or vlans could be used to seperate traffic by dept. or building based on the need. It COULD improve preformance and should be implemented BEFORE you need it, not after. Pitfalls if you change? Make sure that key services are available in all subnets or vlans, and across routers. AD, DHCP, DNS and the like that is. I am still running NT (1 PDC and 1 BDC), but plan on upgrading to AD before 2005. The PDC and BDC run WINS and the PDC is my DHCP server, node type is hybrid. I have a NT member server running and forward requests to my ISP. Most clients are 2000 and XP. But I do have some 98 still out there, but are in the process of phasing them out. My servers and routers are 10.1.1.x My printer are 10.1.5.x My DHCP range is 10.1.100.1-10.1.101.254 I have my gateway cisco router and managed HP switches throughout the campus with a gigabit fiber backbone. Are you saying just subnet one building, VLAN it back to my computer room and have a separate DHCP & DNS for it? So based on this what would the recommendation be? Why do not upgradre right now? If you are planning to migrate to AD, this is a good moment to do it. If you install AD on both server (PDC and BDC) you can creat two separate nets (installing diferents DHCP &DNS), and you can install the NAT service to have access between the two nets. Probably, you'll need one extra server for replication. Anyway, subnet your network is the best solution for you, besides to migrate all you 9x PCs to 2000 or XP to avoid WINS and to save traffic. Upgrade Now First off I agree with the others that you should upgrade now. There are other thoughts too. SUBNETS The seperation of the LAN could be done by subnets per DEPT. or Building. (In a campus it is usually the same anyway) Your future AD design could follow that as well with OU's. You mentioned you do have a router infrastructure so however you seperate is fine. Use custom ip subnets would work. You however only mentioned one DHCP server. That is not good. You should have redundency here. In fact woth 500 clients I am suprised that the server going down has not caused issues. DHCP is based on a broadcast for the initial request by the way. WINS is fine to run but are you running DNS internaly? An upgrade now would put DNS in place. It would support dynamic updates. The clients or DHCP could register ip's in DNS. Any locating of a resource such as a domain controller or workstation etc. would be faster as it would all be DNS. You would not need seperate DNS domains, but you should have multiple DNS servers. The idea of subnets would be to limit broadcast traffic. it would not cross routers. So, if a WIN(* machine in DEPT A broadcast an election packet for browse master, the other subnets would not have to be bothered with it. Odd example but the first I though of. Now, If you really want to go nuts each dept could be a subdomain. So, the domain may be HOSPITAL.LOCAL and then you have PEDS.HOSPITAL.LOCAL, EMRGCY.HOSPITAL.LOCAL , ORTHO.HOSPITAL.LOCAL ect. This would require carfull planning is most likely way overboard for your needs but it is an option. Decide based on future growth. One giant domain does not grow as well and clear as the more granular design. AD UPGRADE OK, now before someone else says it...The main factor in the upgrade part here is going to you. If you are the whole IT dept. then the design must also take in to account the lack of bodies for troubleshooting issues. Be redundent and design it to easily recovered. Good backups, Anti-virus etc. Plan the AD, DNS layout on paper or in VISIO first and really be sure about it. The decide on upgrading existing servers or new servers. If an upgrade then study the difference between upgrade and fresh install to know any possible pitfalls. Install a test server with the latest SP and make sure there are no issues with your software etc. Plan the DNS namespace. DO NOT use .dom if the LAN is not public. Use .local or .int or the like. Wow I am still typing...sorry about that. Hope it helps ya. razz Subnet Mask This conversation is currently closed to new comments.
https://www.techrepublic.com/forums/discussions/subnet-mask/
CC-MAIN-2019-47
refinedweb
929
85.69
Interview: Allan Davis, nbPython Developer Allan Davis recently posted a screencast of something called "nbPython", here, over on NetBeans.tv. Later, the screencast was reposted here on NetBeans Zone. Python is one of the handful of hot languages that is still missing support in NetBeans IDE and, now that the NetBeans language APIs are growing in versatility, the time is right for support being created for Scala and Groovy, for example, as well as, now, Python. So let's meet Allan and find out what nbPython is all about and look under the hood at some of the API magic... Can you tell us a bit about yourself, who you are and where and what you do? Sure, my name is Allan Davis. I have been working in Software development for about 15 years. I started learning and using Java in 1998, gaining my SCJP in 2003. I began working with NetBeans in 2002, utilizing version 3.3. I have jumped around to different IDE's (JDeveloper, Eclipse, JBuilder, to name a few), always coming back to NetBeans, every time. Recently, I have built 3 different RCP applications. Currently, I am working as a GIS/Java developer for General Dynamics. We are developing a web-based JSF map editor. What's nbPython? NbPython is an extension of the NetBeans IDE to provide support for the Python programming language. How did it get started and why? After having to do some GIS scripting with Python and pydev, I thought it would to be cool if I could use NetBeans. About the same time, NetBeans 6.0 was released with Ruby support. I realized that a Python extension would be a perfect fit. Recently, our office has started a switch from Eclipse to NetBeans as well, so, the needs keep growing for this development. What does it aim to provide? NbPython aims to provide first-class support for the Python language in NetBeans. This includes a full editor, interactive console, a Python platform manager, and Django support. The full editor includes syntax highlighting, code completion, editor hints, and numerous other features. What does it provide right now? Right now nbPython provides syntax highlighting, a basic Python project template, and basic execution of any Python script You must have been using quite a few NetBeans APIs. Which ones and how has the experience been? There have been a lot of changes to the API since I started working with NetBeans. For this project, one of my favorites has been GSF. GSF, or Generic Scripting Framework, is used to provide support for scripting languages such as Ruby, Python, and PHP. It has eased some of the load of coding requirements, allowing for easier coding milestones. The prime example of this is the Editor window itself: The only items I have to define are the Lexer and a language file that extends DefaultLanguageConfig. I then create a link to GSF in the layer.xml, as per the examples below: public class PythonLanguage extends DefaultLanguageConfig { @Override public String getLineCommentPrefix() { return "#"; //NOI18N } public Language getLexerLanguage() { return PythonTokenId.language(); } public String getDisplayName() { return "Python"; } @Override public String getPreferredExtension() { return "py"; } @Override public Parser getParser() { return new PythonParser(); } @Override @SuppressWarnings("deprecation") public boolean hasStructureScanner() { return true; } @Override public StructureScanner getStructureScanner() { return new PythonStructureScanner(); } } <folder name="GsfPlugins"> <folder name="text"> <folder name="x-python"> <file name="language.instance"> <attr name="instanceOf" stringvalue="org.netbeans.modules.gsf.api.GsfLanguage"/> <attr name="instanceClass" stringvalue="net.java.dev.nbpython.editor.PythonLanguage"/> </file> <file name="structure.instance"> <attr name="instanceClass" stringvalue="net.java.dev.nbpython.editor.PythonStructureScanner"/> </file> </folder> </folder> </folder> Another great API for NetBeans is extExecution. This API allows for easing the creation of external execution processes in NetBeans. We use it for execution to both Jython and Cpython. // Setup process Information ExternalProcessBuilder processBuilder = new ExternalProcessBuilder(command); processBuilder.pwd(new File(workingDirectory)); processBuilder.addArgument(commandArgs); processBuilder.addArgument(script); processBuilder.addArgument(scriptArgs); processBuilder.addEnvironmentVariable("PYTHONPATH", path); ... //build Service ExecutionService service = ExecutionService.newService( (Callable<Process>) processBuilder.create(), execBuilder.create(), displayName); // Start Service service.run(); The experience using these APIs has been very good. I can't complain about a thing. Do you have tips to share with others doing similar things? One of the biggest tips I can suggest is to utilize the mailing lists. Everyone is willing to share what they have done. Also, examples are posted and check out the "contrib" module, as well as "trunk". When I first began developing the Lexer module and trying to use ANTLR for grammar processing, I searched for an example on how to make this work. The one I found linked to the NetBeans 6.0 Lexer. This page pointed to code from the CVS Server that did not migrate to Mercurial. I posted a question to the development mailing list and was pointed to the javafx.editor module that was doing the same thing I was. After studying their code I was able to create the Lexer with no problem. Is it just you or are there others working on it? Can others join in? There is no way I could do this alone. The project is open, so anyone can join. I started out building a team from friends at work. We work on this project in our off-time. Interest in the project has been incredible. Not two days after posting the project pages on java.net, I started receiving feature requests. Stuff like that really fuels me. I have also had a lot of interest from Sun, Tor Norbye (Ruby) and Martin Adamek (Groovy) have been indispensable in helping to getting me going with GSF. If you want to join, go to the project page (). Request membership to the project, and while you are there sign up for the development mailing list (). What's the timeline from here on? How often and what will you be publishing next? We are targeting to be in sync with the 6.5 release of NetBeans, with milestone releases about every 2 to 3 weeks. We want everyone to be able to see how the project progresses. In the next milestone release, there will be some editor enhancements and the Python platform manager. How do I get started using it? To start using the program, you can just download the bits from the project page under "Documents & files". There you will find archived downloads of all milestone files including the source code at that time. Or, if you are so inclined, you can check out the source code from Subversion. Then open up the project within the latest development build of NetBeans IDE and then... simply click "Run"! - Login or register to post comments - 5510 reads - Printer-friendly version (Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)
http://netbeans.dzone.com/news/interview-allan-davis-nbpython
crawl-002
refinedweb
1,136
58.69
At 01:52 AM 6/28/2008, wesley chun wrote: > > Sorry to be dense, but how, in what way, is a1's l1 different from a2's > > l1"? Both are [1,2,3]*100 . > >dick, > >alan and everyone else are correct, but let me just put it as simply as this: > >- in a1(), you're accessing l1 as a global variable >- in a2(), you're making l1 a local variable but trying to get its >value before you've assigned anything to it. > >i can see what you're trying to do however... a noble effort: answer >the question of whether list concatenation is really slower than using >the extend() method. And in fact, list concatenation seems a bit faster. >anyway, if you make alan's tweak and slip "global l1" as the 1st line >in a2(), it should work better and be a more equivalent comparison. It does work. BTW I see that your book has what seems to be a thorough discussion of namespaces and variable scopes in chapter 12. Thanks, Dick
https://mail.python.org/pipermail/tutor/2008-June/062643.html
CC-MAIN-2018-26
refinedweb
174
78.69
. in the controller you an instance variable @story but you are referencing it as @stories, have you tried to reference it as @story in he view as the controller is not passing any @stories to the view therefor "nil.size" Let me know if you solved it Sure, I will post it here: class StoriesController < ApplicationController before_filter :login_required, :only => [ :new, :create] def index @story = Story.find :all, :order => 'id DESC', :conditions => 'votes_count >= 5' end def new @story = Story.new end def create @story = @current_user.stories.build params[:story] @story = Story.new(params[:story]) if @story.save flash[:notice] = 'Story submission succeeded' redirect_to stories_path else render :action => 'new' end end def show @story = Story.find(params[:id]) end end The only thing that I can see would create the nil object is the condition on the find method. You are limiting the result set to stories with at least five votes. Try either lowering the condition to just one vote or going to the console to make sure you have at least one story that meets the five vote minimum. Kelp, the problem may actually be in your controller. The instance variable @stories seems to be nil, or none existant when the view goes to reference it. Can you show me the code in your stories controller?
http://community.sitepoint.com/t/i-have-a-nil-object-when-i-didnt-expect-it/59375
CC-MAIN-2015-14
refinedweb
216
64.2
04 October 2012 20:39 [Source: ICIS news] HOUSTON (ICIS)--The joint venture Braskem Idesa has signed a $2.7bn (€2.1bn) engineering, procurement and construction (EPC) contract for its Ethylene XXI project in Mexico, the company said on Thursday. The EPC contract was awarded to a joint venture made up of Odebrecht (40%), Technip (40%) and ICA Fluor (20%), Braskem Idesa said. Located in the Nanchital region of ?xml:namespace> Planned downstream production includes two high density polyethylene (HDPE) plants with capacities of 350,000 tonnes/year and 400,000 tonnes/year and one 300,000 tonne/year low density polyethylene (LDPE) plant. INEOS is providing the HDPE technology, while LyondellBasell is providing the LDPE technology. Ethylene XXI will receive feedstock ethane from Pemex-Gas through a 20-year long-term contract, based on Mont Belvieu reference prices, Braskem said. The project intends to meet growing Mexican demand for PE, which now stands at 1.9m tonnes, Braskem said. Of that total, 70% is met by imports. Ethylene XXI should begin operations in June 2015, Braskem Idesa said. Brazil-based Braskem has a 65% stake in the Ethylene XXI project, with Mexico-based Idesa holding the remainder. (
http://www.icis.com/Articles/2012/10/04/9601239/braskem-idesa-sign-2.7bn-contract-for-mexico-ethylene-xxi.html
CC-MAIN-2015-22
refinedweb
198
64.61
If words like “C++”, “12 inch rotary debugger”, “dangling pointers” (phhwwoooarr!), “caffeine drip” and “early grey hair” are baffling, confusing or frightening to you, it’s probably best that you skip this post. It’s all technical, boring and generally an opportunity for me to document a mistake that I’ve made in the hope that writing about it will embed it so far in my brain that I will never make it again. C++ is a cracking computer language with a simple philosophy: it’s all YOUR problem. Allocation of memory? Your problem. Freeing resources? Your problem. Knowing what everything is, where everything is and what state it is in? Your problem. C++ and its cousins, C and Objective C, are relatively straightfoward because they do nothing behind your back. They’re completely faithful. Indeed, you could send student C++ out for the evening wearing a shockingly short skirt to get completely plastered and be 100% sure that she’d behave like the perfect lady. For high-performance, real-time simulation software, games, firmware and an endless bundle of other things it’s a fastastic choice – there’s nothing sneaky going on and you’re in complete control. The down side, though, is that you have to remember to handle the whole caboodle yourself. Memory management, pointers to objects, etc., all become the programmer’s problem. This can be great, as everything behaves logically and as it should, but it is also an incredible source of bugs and issues for novice and experienced programmers alike. Those that have been doing it for a fair while develop strategies to avoid making common errors and build libraries of their own to help ensure that some of the lowest level crapola can be farmed off to well tried and tested code. Some of my list, for example, you can find here. And then there’s STL – the Standard Template Library. It’s part of the C++ standard and it adds some truly fantastic higher-level functionality to C++: the kind of functionality that users of almost all other computer languages (except, perhaps, CECIL and assembly language) take for granted. With this handy help, though, comes a cost. C++: never does anything behind your back, or indeed, anything at all unless you command it. STL, though, does all sorts of things without you knowing but is better at parties and drinks like a fish. STL is like C++’s naughty cousin. You can rest assured that if C++ comes home in a police car or ends up in hospital, it’s STL’s fault. She’s the sort of person that is a walking temptation machine: “Here, C++, try these pills, they’ll make you feel great!”.The reason for this is quite simple: STL does do things behind your back in the name of giving you a hand: “Here, I’ll hold the door open for you.” strollstrollstroll “That’ll be a dollar”. It is, though, a price that generally we’re all happy to pay. Fine, there’s a time and a place and sometimes STL’s box of goodies isn’t appropriate but it’s a fantastic time saver and allows the developer to concentrate on solving the problem at hand rather than reinventing wheels themselves. One of the features that we get in STL are the “Standard Containers”. These are, put simply, variable size arrays. Containers of things that expand and shrink all by themselves or at your command. You can delete items, add items, loop through them and all sorts. One of the most popular is the std::vector. Here’s a simple example: std::vector vecIntegers; vecIntegers.push_back(10); vecIntegers.push_back(11); vecIntegers.push_back(12); We now have a list of three integers: the numbers 10, 11 and 12. We can do this: vecIntegers.erase(vecIntegers.begin()); … and pop! The first one has gone (the experienced STL users are currently frothing and steaming saying “hey, you should be using a deque for that, because vectors are designed for adding and removing at the end only, doofus”. I know, but one likes to keep examples simple without having to introduce the whole of STL, so forgive me. Here’s another example where we use a vector to store a more complex object: one that has names and ages: // Declare a structure we'll use to group name and age: struct NameAndAge { // This, the string type, is also an STL goodie: C++ has no string type as a // basic type: std::string name; // Hahaha! See here for the reason that the C99/C++0x type is used: uint16_t age; // Age can't be negative.. or CAN IT? // Object constructors to help us: NameAndAge() { return; } NameAndAge(const std::string& name_, const uint16_t age_) : name(name_), age(age_) { return; } NameAndAge(const NameAndAge& rhs) : name(rhs.name), age(rhs.age) { return; } // Assignment operator so that we don't cock up the strings as bitwise copies // of this object using = will go tits up depending on the std::basic_string // implementation: NameAndAge& operator = (const NameAndAge& rhs) { name = rhs.name; age = rhs.age; return (*this); } }; // Declare a vector type of NameAndAges: typedef std::vector<NameAndAge> VecNameAndAge; VecNameAndAge vecNamesAndAges; // Add some: vecNamesAndAges.push_back(NameAndAge("Rattlesnake", 10)); vecNamesAndAges.push_back(NameAndAge("The Germs", 2)); vecNamesAndAges.push_back(NameAndAge("Irregular Pigeon", 85)); vecNamesAndAges.push_back(NameAndAge("Giraffe family", 22)); Even if you’re not a programmer, hopefully you can get the gist of that. We end up with a vector containing four objects for four people: Rattlesnake, The Germs, Irregular Pigeon and the Giraffe Gamily. So much wonderful stuff that would normally be your problem has been handled by the vector: it has allocated the memory for you, it has copied the objects across, it has resized itself when it ran out of room… oh, the joy! The joy. Now, I’m going to start on the road to the bug that took me the best part of a day to track down because I’d made an assumption and not documented that assumption adequately (see item 8 on my list). Here’s another brief snippet that goes in after the above one: typedef std::vector<NameAndAge*> VecPointersToNameAndAge; VecPointersToNameAndAge vecPointersToNameAndAges; // Create another vector of POINTERS TO the items on the first one: for (VecNameAndAge::iterator itNameAndAge = vecNamesAndAges.begin(); itNameAndage != vecNamesAndAges.end(); ++itNameAndAge) { NameAndAge& thisNameAndAge = *itNameAndAge; vecPointersToNameAndAges.push_back(&thisNameAndAge); } Danger! Danger! Danger! Wooo-woooo-woooo-woooo! Frankly, if I was doing something like this, alarm bells should have gone off like mad but I had a special case (aren’t they all?) and it was a really, really good way of getting around the problem I had: many objects of different types, all of which inherited a serialisation base class, all of which needed to be serialised… so, after creating all the objects (which were constant, created once at load time and they never changed after that) I simply dumped pointers to them (pointers are the ‘address of’ an object) onto another vector. Then, when it came to data-save-time, I could whizz through the whole lot dead quick and serialise ’em. And, do you know what, I would have got away with it, too, if it wasn’t for for the unchangable changing. When you write an application which has a long life-span (many releases over many years) then eventually, regardless of any clairvoyant planning, it will end up doing things that you never imagined. In my case, the bold bit a couple of paragraphs up changed. I had a new feature and it would save me an enormous amount of time if I just inherited an existing object, made a couple of changes to it through overloading and then dumped it onto the array of that object type. Bingo, it all worked fine. For a few hours. Then I had a crash. That’s odd, it was in the serialisation code. I’d not touched the serialisation code in months so what the flying flock of pigeons was going on? Ok, tried a different configuration file (this particular application changes into different applications depending on its configuration – it’s a doppelapplicationgänger) and it worked OK. Right, back to the configuration I was working on, all seems OK… can’t have fixed itself, but I figured I’d wait until the next crash. The data was inconclusive last time (by inconclusive, I mean “I refused to believe it”). Ah yes, crash number 2. Ok, breakpoints and started stepping through the serialisation code. For some odd reason, one of the objects that was being written was corrupted. So I looked at the list of objects: they were all fine, but the one that was on the serialisation list wasn’t there. How’s that possible? I put the pointer to it on at load-time, I don’t remove anything from the main object list so how could that pointer become invalid? The C++ standard is quite clear on all this (see 23.2.4.2 and more) and much has been said on the subject elsewhere, I just forgot some of the inner workings of a very complex application. I’d not commented the pointer-vector adequately with warnings and I’d not commented the object-vectors that they were to be treated as constants after loads. I could have controlled the reallocations to avoid this by using vector::reserve()to pre-reserve space before allocations would occur, because, as the standard notes: Reallocation invalidates all the references, pointers, and iterators referring to the elements in the sequence. It is guaranteed that no reallocation takes place during insertions that happen after a call to reserve() until the time when an insertion would make the size of the vector greater than the size specified in the most recent call to reserve(). … but, well, I’d forget I’d done that and one day the application would have more objects than I’d reserved and cryptically crash again. Then I’d lose another couple of days as a result of mixing and matching the way things had been done. No matter how much care you take, there is a cost of doing things in a hurry. There is an even bigger cost of not documenting why you did things the way you did them. In this case, I solved it properly: took a couple of days out of the main schedule to fix it under the hood, and fix it good so that I could not be baffled by this again. I also wrote this blog post in case I do make this mistake again. Hopefully it’ll pop up on google and I can save myself spending a wonderful sunny spring day with bloodshot eyes staring at the debugger mumbling “that simply can’t be possible. It can’t be possible, it just can’t be possible…” – PS: If you’re a C++ programmer and you don’t have these books, then may I suggest you order them now. They’re incredibly helpful and help you develop good defensive strategies that will ensure you avoid precisely the kind of issue I just had PPS: I have not actually compiled any of the code in this article, so if it fails, meh, you get what you pay for 🙂 Pingback: Stop the universe, someone knows everything | Cobras Cobras
http://cobrascobras.com/2011/03/29/in-soviet-russia-pointers-dangle-you/
CC-MAIN-2021-25
refinedweb
1,886
60.04
Re: What is the differences between tkinter in windows and Tkinter inthe other platform? Discussion in 'Python' started by Hidekazu IWAKI, Dec 15, 2009. Want to reply to this thread or ask your own question?It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum. - Similar Threads Implementation of recursion in different languages: what happens inthe background ?Sébastien de Mapias, Feb 12, 2008, in forum: C Programming - Replies: - 16 - Views: - 565 - Army1987 - Feb 14, 2008 How to write an XML schema that specifies an optional namespace inthe XML docs?Jethrie-JDuprez in the news, Apr 14, 2009, in forum: XML - Replies: - 4 - Views: - 2,012 - Mayeul - Apr 26, 2009 What is the differences between tkinter in windows and Tkinter in theother platform?Hidekazu IWAKI, Dec 14, 2009, in forum: Python - Replies: - 1 - Views: - 489 - Peter Otten - Dec 14, 2009 How do I get the email address of the person who clicked the link inthe email?Zeynel, Dec 5, 2010, in forum: Python - Replies: - 1 - Views: - 642 - alex23 - Dec 6, 2010 Re: An interesting beginner question: why we need colon at all inthe python language?Thomas Jollans, Jul 11, 2011, in forum: Python - Replies: - 15 - Views: - 506 - Steven D'Aprano - Jul 16, 2011
http://www.thecodingforums.com/threads/re-what-is-the-differences-between-tkinter-in-windows-and-tkinter-inthe-other-platform.708764/
CC-MAIN-2015-32
refinedweb
225
76.96
I've just started learning about TDD and am trying to write a simple project that way. I'm using Eclipse and JUnit, and every time I make a change I run all the tests in the relevant package. But then I'm very surprised to see in the package explorer that one of my test cases has a big red cross indicating a compiler problem... Annoyed I figured that I got my eclipse shortcuts mixed up and haven't been running all the tests, as they are all passing. But when I start fiddling about, I realise that it seems Eclipse + JUnit will run and pass tests even if there are compiler errors... The JUnit test case: import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; public class ATestCase { private Command command; private Invoker invoker; @Before public void setUp() throws Exception { command = new Command() { public void methodA(){}; //haven't implemented methodB() }; invoker = new Invoker(command); } @Test public void test(){ invoker.invoke(); } } interface Command{ void methodA(); void methodB(); } The Invoker class: class Invoker{ private Command command; public Invoker(Command command) { this.command = command; //if I invoke methodB() I get UnresolvedCompilationError } public void invoke(){ command.methodA(); //only if I call methodB here //do I get Unresolved compilation problem // command.methodB(); } } The command object I create in setUp in the test case only implements one of the interface's methods. This of course causes a compilation error warning in Eclipse. However unless I actually call that method in the test case, the test passes. If I do call the method, then the test fails with 'unresolved compilation error'. Can anyone explain to me what exactly is going on? ******EDIT****** I'm not sure why this was closed as a duplicate. Apparently I'm supposed to edit this question to make the difference clear: What are the possible causes of a "java.lang.Error: Unresolved compilation problem"? Why/how does JUnit pass tests with compiler errors? As in how can code which shouldn't compile be run by JUnit without causing errors? I fully understand the causes of the Unresolved Compilation Error, it's the obvious unresolved compilation error in my code. What I don't understand is how the error doesn't always occur (it only occurs when I specifically call an unimplemented method) and how the tests pass?! It may be that these issues are related, but unless there is a specific answer explaining how they are related I fail to see how they are in any way duplicate questions... When a class fails to implement an interface method, the Java compiler does not reject the code but instead emits bytecode for the method that will raise the runtime error seen. This explains why JUnit is able to run the tests and why the test passes if you don't call methodB - the runtime error does not get raised. Per this page, this does not occur by default but requires that you have the Java -> Debug 'Suspend execution on compilation errors' setting enabled. I'm assuming that is by design: to allow for testing specific methods without having to worry about whether other dependencies which the compiler would pick up on anyway are resolved or not. i.e. we shouldn't be using JUnit to tell us whether our entire project can compile or not.
http://www.dlxedu.com/askdetail/3/aa3a4328f17daf858966e7f944d941e3.html
CC-MAIN-2018-22
refinedweb
558
61.46
[SOLVED] Build failure : undefined reference to `gluPerspective' Hello everbody, I have a build error when I try to build my Qt project with QtCreator. "undefined reference to `gluPerspective'". My .pro file is : @SOURCES += main.cpp monwidgetopengl.cpp mafenetre.cpp HEADERS += monwidgetopengl.h mafenetre.h QT+= opengl QT+= widgets@ My mafenetre.cpp file (the error comes from this file): @#include "mafenetre.h" #include <GL/glu.h> // ... // ... void MaFenetre::resizeGL(int width, int height) { //... gluPerspective(45.0f, (GLfloat)width/(GLfloat)height, 0.1f, 100.0f); //... }@ I don't understand why I have this error when I try to build my project. I have included the <GL/glu.h>, link opengl lib to my project... If someone has an idea... Thanks! Hi, You need to provide more information: What OS ? What compiler ? What Qt version ? Ubuntu 12.10 with Qt 5.0.1 on QtCreator and g++. IIRC gluPerspective comes from the glut (freeglut ?) library. Are you linking against the glut library ? I tried using gluPerspective with SDL a few weeks ago and it works with the #include <GL/glu.h>... Why don't you try glFrustum() instead ? Including glu.h has nothing to do with linking the library. Did you check that your program is linked with glut ? What version of OpenGL are you using ? IIRC gluPerspective has been removed since OpenGL 3.0. You can also find an implementation called qgluPerspective in the Boxes example I know for the gluPerspective removal since OpenGL 3.x. It's the OpenGL's version I have but as I said glPerspective works with another project with the SDL Library (and same compiler, OpenGL 3.x...) ; that's weird I know... if the glPerspective has been removed... I'm going to check if my QtCreator is linked with glut ASAP... but it's GLU, not GLUT, I think. If it was GLUT my function should be glutPerspective, no? @john_god, what's the difference between this function and gluPerspective? It's GLUT (GLUT stands for OpenGL Utility Toolkit) gluPerspective does some mathematic for you and then uses glFrustrum. Either search for the implementation on google, or grep qgluPerspective in your Qt 5 sources. [quote author="Zikkee13" date="1365005409"]@john_god, what's the difference between this function and gluPerspective?[/quote] I'm too lazy to check the specs right now but I think they are the same, the diference is that gluPerspective adds GLUT dependency to your project, glFrustum() is OpenGL native. Go check it out on google :) Edit: Ok I just check them, they are no the same, please check glOrtho(). Basically all this functions do is to setup diferent math perspectives / projections to your world. I have added GLU .so file (/usr/lib/i386-linux-gnu/libGLU.so) to my project and it works. GLUT is not installed on my laptop and it works without it. Thanks for your help. Solved. Edit : @john_god, OK thanks! Hello, I have same problem compiling a project in qt5, @ undefined reference to gluPerspective@ @undefined reference to gluLookAt@ i'm on Debian Wheezy 64bit .. I had the same problem as gaia and solved it by adding @LIBS += -lglut -lGLU@ to the .pro file of my project
https://forum.qt.io/topic/25846/solved-build-failure-undefined-reference-to-gluperspective/?page=1
CC-MAIN-2019-43
refinedweb
526
78.35
wildcard notation import java.awt.*; Importing classes can lead to ambiguities. A class name is ambiguous if it occurs in two packages that are imported by wildcards. wildcards for imports is somewhat dangerous. However, importing each class. One time-honored solution of checking import lists is to comment out one line at a time until compiler errors go away. Naturally, that is tedious. Another solution is to stop using import lists altogether and referencing the full class names at all times. Naturally, that too is tedious. Several compilers emit lists of classes that they load as they compile a program. For example, if you run the compiler in the Sun J2SE SDK 1.4 with the -verbose option, you get a list such as [checking SegmentedLineEdge] It would be an easy matter to write a script that transforms this output into a set of import statements. However, the output contains classes that don't actually need to be imported (such as CharSequence and AttributedCharacterIterator). These classes are loaded because some of the loaded classes depend on them. It is not clear (at least to me) how one can weed out the unneeded classes. I used a different approach. I wrote a utility that harvests the class file. Unlike source files, class files never contain shortened class files. Even standard classes such as java.lang.String are referenced by their full names. Class files contain the names of classes as well as field and method descriptors that contain class names (in an odd format, such as Ljava/lang/String; ). To harvest the class names, one must know the layout of the constant pool and the field and method descriptors. The class file format is well-documented--see the references at the end of this document--and only moderately complex. The ImportCleaner program parses one or more class files, harvests the class names, removes the unnecessary ones, sorts the remaining ones, and prints out a list of import statements to System.out. Since ImportCleaner parses class files, your source file must first be compiled (presumably with a less-than-optimal import statement set). Then run ImportCleaner on the class file, capture the output, and paste the import lines into your source file. For example, to run ImportCleaner on its own class files, you use java -jar import_cleaner.jar ImportCleaner (You can find the ImportCleaner class files by unzipping import_cleaner.jar). The result is this list of imports, printed to System.out: import java.io.DataInput; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FilenameFilter; import java.io.IOException; import java.io.PrintStream; import java.util.Iterator; import java.util.Set; import java.util.TreeSet; Typically, your next step is to capture that list of imports and paste it into your source file. If your source file contains multiple top-level classes, then you need to list all of them on the command line. For example, java -jar import_cleaner.jar MyClass MyHelperClassThatIsDefinedInTheSameFile However, inner classes are located automatically. You can supply the name of a class in any of the following forms: The ImportCleaner program strips off the suffixes and then looks for the file MyClass.class and all files of the form MyClass$*.class (for inner classes). If your class file is located in a package, you need to invoke ImportCleaner from the base directory. For example, if you use the package com.mycompany.myproject , invoke ImportCleaner from the directory that contains the com directory. You can supply the package name in either of the following forms: Capturing the output is very easy if you use the shell mode in Emacs. Other good programming editors have similar features. Alternatively, you can redirect the output to a file: java -jar import_cleaner.jar class(es) > outputfile The program takes the following options: DataInputStream in = new DataInputStream(new FileInputStream(file));Harvesting the method call yields the spurious import java.io.InputStream . Such spurious imports are generally harmless but unsightly. The program is distributed under the GNU General Public License . Source code and a copy of the license are contained in the JAR file. Unfortunately, constants are not included in the class files, so this utility will miss them. Typical examples are: BorderLayout.NORTH Color.red Also, the types of local variables are not included in the class file. This sounds like a big problem, but fortunately, the same class or interface name is often used in a method or field descriptor as well. To illustrate the issue, consider this code: public void draw(Graphics2D g2) { Stroke oldStroke = g2.getStroke(); g2.setStroke(new BasicStroke()); . . . g2.setStroke(oldStroke); } ImportCleaner includes java.awt.Graphics2D because it appears in the method signature of the processed class. It includes java.awt.BasicStroke because of the constructor call. But by default it won't include java.awt.Stroke since there is no guaranteed reference for it in the source file. A remedy is to recompile after pasting in the ImportCleaner output. Then look at the error messages and manually insert the missing imports. It sounds bad, but in actual practice it doesn't seem to be all that bothersome. Another remedy would be to use fully qualified class names in this situation. You may also wish to use the -usecalls option. That option harvests method calls. In our example, that option finds the java.awt.Stroke class from the ()Ljava/awt/Stroke; method descriptor of the Graphics2D.getStroke method. Harvesting method descriptors is not the default because it can lead to spurious imports. (See the description of the -usecalls option for more information.)
http://www.horstmann.com/articles/ImportCleaner.html
crawl-001
refinedweb
929
60.21
Here are my responses to some questions posed on slashdot last week. They make a good beginning for our FAQ. Eric ---------------------------------------------------------------- > 1) Hardware requirements (Score:5, Interesting) > by wowbagger on 2002.09.09 13:58 (#4222011) > > The GNU radio page is a little thin on the hardware requirements to run > the code - could you spell them out? > > I realize this might be complex, and that the answer might be of the form: > > "to demodulate a 16QAM signal at 115.2kBaud, you would need an XYZ > digitizer card reading the 455 kHz IF and a AAA GHz Athlon CPU. To > recover standard multplex FM, you would need a 123 digitizer reading the > 455 kHz IF and a BBB GHz Athlon. To decode GSM you need a FFF digitizer > reading the 10.7 MHz IF and a quad Athlon." > > But as both a ham and one who designs SDRs, I'd like to know where this > resides on the Home Hacking Scale.... There are two basic paths down the software radio path. One I'll call "narrow band", and this corresponds to most of what you're seeing sold as "DSP enhanced" transceivers. The TAPR DSP-10 kit would fall in this category (). In effect, these are conventional radios which are down converting to baseband, or near baseband, and have an IF bandwidth in the 20 kHz range. For narrow band work with GNU Radio, you'll need kind of RF tuner/transverter. Someone pointed out that in one of the latest issues of QEX magazine there's an article about a kit that is designed to be the RF front end for a software radio that connects to a sound card. I haven't seen the article so I can't comment. The TAPR DSP-10 would also work. Just leave out the Analog Devices DSP and plug the kit into your sound card. You could wiggle the control lines using the parallel port. To summarize, for narrow band software radio work, you'll need your sound card and some kind of RF front end. Pretty much any contemporary Pentium/Athlon machine will have plenty of horse power. The other path I'll call "wide band". This is personally the area that I find most interesting because it is with wide band that you are able to do things that you can't do with a conventional radio. Chief among these is the ability to concurrently receive (or transmit) multiple channels/stations/frequencies. In the examples directory of the GNU Radio code, you'll find an example that receives and demodulates 2 FM broadcast stations and puts one out the left channel and one out the right. Matt Ettus, another GNU Radio developer, has built a demo that receives 4 narrow band FM channels concurrently. These demos run fine on a 1800+ Athlon, or 1.7 GHz P4. For the wide band stuff our "standard configuration" is a TV tuner module designed for cable modems that tunes from 50MHz to 890MHz with an IF of 5.75 MHz. The module is a Microtune 4937 DI5. We connect the output of the tuner directly to a 20M sample/second 12-bit A/D converter. The converter we're using is the Measurement Computing PCI DAS4020/12. It'll do 4 channels at 10M sample/sec or 2 channels at 20M sample/second. From the hobbyist's point of view, it's not cheap, about $1300, but it is the cheapest, fastest off the shelf solution that we found. With our "standard configuration" we ought to be able to handle IS-136. GSM would be possible if our RF front end would cover the 1.9 GHz range. Vanu, Inc has a GSM receiver running on a 1GHz pentium laptop, so we know it's possible. > 2) Re:Hardware requirements (Score:4, Insightful) > by d.valued (ripco bang acerx) on 2002.09.09 20:27 (#4224566) > > Tangential to this.. is there any talk amongst the GNU Radio folks on > building a piece of hardware that complements this software project, or > is supposed to work with whatever devices the user has on hand/will build? This question comes up frequently. Mostly we've got our hands full with the software and are hoping that some other folks will chip in on the hardware. From our software point of view, we'll talk to any hardware that you can provide a driver for. Fundamentally all we need is a way to get samples into and out of memory. We do have some ideas about our ideal harware. See The key items are: 14-bit A/D converter 40-100 Msamples/sec (e.g., AD6645 or AD9244) 14-bit D/A converter 40-100 Msampels/sec FPGA (digital downconverter / upconverter / bus interface) some kind of bus interface, either 64-bit PCI or USB-2 For flexibility, we keep the RF to IF conversion on a separate board. There are also a few threads in the mailing list archives about ideal hardware. > 3) Sounds familiar (Score:4, Interesting) > by FreshMeat-BWG on 2002.09.09 13:58 (#4222017) > > As in WinModems doing the modulation/demodulation. These devices were a > nightmare. After trying several I went back to a good old > hardware-based-modulation modem. > > Are there parallels to this technology? and if so, how will GNU Radio > avoid those pitfalls? Part of the problem with WinModems is the "Win" part of the equation. Modems place pretty substantial hard real time demands on the OS. It's not necessarily the total amount of CPU that's a problem. It's that it the code needs to be run on time or it's no good at all. So far most of our work has been receive only, and we dodge the bullet by using the Measurement Computing A/D card which combined with the driver I wrote DMAs directly into user space. Given say, 16 MB of buffer, you can cover all sorts of non-real time problems. The driver is written so that it only needs service about once every 10ms, no problem on today's hardware, and will sustain 80 MB / second across the PCI bus. When we attempt a TDMA transceiver, we may need hardware that will support time stamps so that we can synchronize our input and output streams. See above for ideal hardware with FPGA. > 4) What external hardware? (Score:4, Interesting) > by Consul on 2002.09.09 13:59 (#4222020) > > I read through the GNU Radio website, and even though I found it > informative in terms of the basic idea and examples, I couldn't find > anything relating to what extra hardware is needed. (Maybe I just didn't > look long enough?) > > What extra hardware is needed in addition to a computer? Are we talking > DSP chips and boards, or something a little more exotic? > > Thank you for a potentially exciting project, though. This makes me want > to renew my ham radio license.:o) See above. No DSP chips or boards. Today's commodity PC hardware kicks ass on just about all DSPs as long as you're not worried about power consumption. You'll need some kind of RF to IF transverter and A/D & D/A converters (either a sound card, or something with more bandwidth, depending on your interest and budget.) > > 5) Describe your dream hardware for a software radio (Score:4, > Interesting) > by geirt on 2002.09.09 14:18 (#4222170) > > I want a feature list containing all the geeky details: > > Frequency range. 30 MHz up to about 2.5 GHz. Coverage in the 5 GHz unlicensed band would be nice too. > Bandwidth (do you want to sample the whole FM band (or GSM/GPS/CB/ham > bands), or just a single channel/station). Whole swaths of the RF spectrum! 12.5 MHz would be nice. > Sample frequency and depth (ie, fast and few bits, and do decimation in > software or slow and many bits with less CPU overhead) For 12.5 MHz we'll need about 31M samples/sec, call it 40M samples/sec. 14-bits. More is better. > Necessary spurious free dynamic range, or some other dynamic range > specification. More is better. The best part I know of is the AD6645, and they're claiming 100 dB mulitone SFDR. > Interface to the PC (PCI, firewire, USB...). 64-bit PCI would work, but it's a lousy interface for a laptop. Maybe USB-2. Firewire would be OK, but I think it's got more hair on both ends. We've also thought about Gig ethernet. > Antenna connector (OK, I know that one: BNC) BNC. > Radio design is about trading features against each other, eg. if you > want a large frequency range, you will usually end up with noisy > oscillators giving you poor large signal handling, and low selectivity > (ability to listen to weak stations close (in frequency) to a strong one. > If you want good sensitivity, you loose large signal handling. If you > want narrow filters, you get lower sensitivity (ok, this is a software > radio, so you can do extra filtering in software, so this might not > apply). You get the idea. Always compromises. > > > 6) Convergence Devices (Score:4, Insightful) > by Nomad7674 on 2002.09.09 14:24 (#4222214) > > This technology sounds like the kind of thing which could greatly add to > the convergence of devices that clutter the electronic life. You could > extend convergence not only as a Smartphone but have in one device > (though perhaps not simultaneously): > 1. Cell phone > 2. Computing power (PDA) > 3. FRS radio device > 4. 802.11x network device > 5. Police scanner > 6. Television reciever > 7. etc. I believe that convergence is ultimately where we're headed. We're a way off, mostly with respect to power consumption, but I believe that that will take care of itself eventually. The MIPS/Watt of programmable hardware is unlikely to beat that of dedicated ASICs, but ultimately, if my universal reconfigable communication device runs all day on a single charge, who cares? > Have you been approached by police departments, FedEx, etc. to develop > devices to allow their people to do more stuff in fewer packages? We haven't. I can see a scenario where somebody else is building the hardware and we're providing the software. > 7) As a college student, how do I get involved? (Score:4, Insightful) > by McCart42 on 2002.09.09 15:44 (#4222498) > > If I'm interested in doing research in this field someday, and I'm > currently a computer engineering major, what are some good electives that > I might take? Aside from general programming necessities, what sort of > signal processing courses are necessary to understand the underlying > aspects of software-defined radio? * DSP fundamentals, filtering, FFT, freq-vs-time domain, etc. * Basic RF might be useful; you don't need to be a specialist * Digital comms. Builds on the DSP stuff, but adds specifics for communications. Coding theory, ideal receiver design, channel capacity, phase lock loops, etc. * Anything about protocols in general. Once you get up above the raw bits, software radios don't look that much different than any other layered communication protocol. > > 8) FCC vs. Software Radio (Score:3, Interesting) > by minddog on 2002.09.09 13:57 (#4222004) > > I was recently at H2K2 and heard this forum which right away made me > ecstatic(sp?). An issue that was brought up was how this can impact the > DMCA, FCC, and the big corps. You guys were saying Sony, and the other > conglomerates were forming a committee that would do a digital signature > to say what was allowed to be copied, and not through a dual channel > checking...My question is what is the status of digital radio and its > rights in the present world? To my understanding you can have a very high > number of digital channels inside a single band which makes licensed > analog frequencies just a waste of money to corporations if they use > GNURadio as a means to transmit data long distances. Anyways, looking > forward to some feedback and goodwork, I'll be joining this revolution > soon, just got the dual server built;) Here are three subtopics under the "FCC vs Software Radio" flag: (1) General prohibition on receiving certain signals The FCC, throwing a bone to cell phone operators, banned the reception of certain frequency bands used by cellular phones. In addition, the Electronic Communication Privacy Act (ECPA) expanded the ban to include other communications such as pagers. These provisions have been called by others "The Foreign Intelligence Empowerment Act". That is, they ban the interception of signals that are trivially interceptable, as if making it illegal would "keep the customers safe". In fact, this same sham extends into the world of digital cellular, where the signals are still effectively in the clear, and are vulnerable to eavesdropping. Free software has no problem complying with such regulations as the code below illustrates: #ifdef IM_IN_THE_USA if (freq >= 825e6 && freq <= 850e6) throw "Forbidden Frequency"; #endif (2) ATSC Digital TV "Broadcast Flag" MPAA/CPTWG/BPDG Alphabet soup: ATSC: Advanced Television Standards Committee (digital broadcast TV) MPAA: Motion Picture Association of America (Disney, Fox, et al) CPTWG: Copy Protection Technology Working Group () BPDG: Broadcast Protection Discussion Group. Short form: Certain content providers (MPAA) want TV broadcasters to set a bit, called the "Broadcast Flag", in the MPEG transport stream that TV stations are broadcasting in the clear (i.e., no crypto). The flag is intended to mean "Don't copy me". The MPAA/CPTWG/BPDG folks are then trying to convince the consumer electronics manufacturers that it is in their best interest to build crippled devices that honor the bit, and finally, since it's not obvious than any consumer would buy such a damaged device, they want to ban non-compliant receivers. After conversations with MPAA/CPTWG/BPDG, we have been unable to find any solution where open source or free software can comply with their proposed "Robustness Requirements". Hence, open source and free software implementations of ATSC receivers, VSB demodulators and VSB modulators would be banned under their proposals. Several fundamental issues are at stake: freedom of choice, freedom to innovate, and software as protected first ammendment speech. The FCC has issued a "Notice of Proposed Rule Making" about the Broadcast Flag. In addition, it is rumored that a bill is being drafted in case the FCC won't play along. The EFF has a wonderful blog covering this topic in detail. Please see (3) SDR upgrades and FCC Recognizing the importance of SDR, the FCC, in its First Report and Order dated September 14, 2001, created a new class of equipment and associated authorization procedures. In its Report the Commission stated, "We anticipate that software defined radio technology will allow manufacturers to develop reconfigurable transmitters or transceivers that can be multi-service, multi-standard and multi-band." Continuing, the FCC stated, "These changes will facilitate the deployment and use of this promising new technology, which we believe will facilitate more efficient use of the spectrum." >From the free software point of view, what remains to be seen is what kind of "authorization procedures" will be approved. What is envisioned is some kind of digitally signed configuration or executable that can be loaded into the existing hardware. In an free software/hardware world with no clear administrative hierarchy, it's not evident who gets to say what signatures the hardware will accept. This looks like a ruling that "software radio is OK for the encumbents", but doesn't really spell out what the situation is for the free software / open source / open spectrum point of view. > > 9) Re:Interference (Score:2) > by Louis_Wu (address@hidden) on 2002.09.09 14:40 (#4222326) > > "This is one project where hacking the code can kill people or land you > in jail. Don't broadcast on the wrong frequency! > > Keep this away from radio telescopes!" OK. > That brings up a good question. Are there going to be some software > restrictions on which frequencies you can use? Would those restrictions > be in the source or options you can change on the fly? Ultimately the frequency range that can be transmitted depends on the RF hardware, not the software. The vast majority (all?) of the code in a software radio has no idea of the final RF frequency. It's doing its processing at some IF frequency, which is ultimately up converted once the samples leave the CPU. > It seems like a good idea to put at least one barrier between users and > transmitting on police frequencies. But what kind of barrier? Should any > restrictions prevent listening as well? What about military > transmissions? Or air traffic control frequencies? Or the band the Secret > Service uses? In general, my philosophy is that if people don't want their communications listened to they should encrypt them. This has been standard practice for thousands of years (see Kahn, "The Codebreakers"). I agree the that hardware should be designed such that accidents are minimized. One possible route for hobbyists would be to design the RF hardware such that it would only transmit on one of the unlicensed bands. There are still requirements about transmitted power, and these requirments vary depending on the band and the modulation strategy, but that would at least reduce the chances of accidental interference. Note however, if you're building a software radio that bridges between different public safety networks, you'd certainly want to be able to transmit. > Where should the line be drawn? What does the law say? Do no evil? The law of what land? For another perspective on "interference" and who "owns" spectrum, I heartily recommend the "Open Spectrum Resource Page" > Louis Wu > > > 10) Hardware patents? (Score:3, Interesting) > by cornice on 2002.09.09 17:01 (#4223177) > > Up until now, free software has mostly threatened closed commercial > software. GNU Radio, however, might make some hardware manufacturers > squirm a bit. If I can use a generic device along with GNU Radio to > emulate a range of devices how will this impact the makers of those > devices and are you (or users of GNU Radio) possibly violating patents > for some of those devices? It seems that GNU Radio will stir up more mud > in the IP and DRM debates. What are your thoughts on this? Since the hardware manufacturers make their money selling hardware, and we want to buy hardware I don't really see a problem. I'd just like them to build some nice, inexpensive, fully documented hardware on which I can run my free software. Yes, we will be able to emulate a bunch of devices, and it might cause some heart burn for certain folks. For example, I don't generally want to be carrying around a GPS receiver, but in the moment that I want to know where I am, it would be handy for my universal communication device to configure itself as one and figure out where we are. I'm not sure of the patent specifics on that particular application, but I understand your point nevertheless. I think the mud will be stirred far and wide. I think that this is a good thing. General purpose hardware keeps getting more useful and powerful, and hence valuable to the end user. At the same time, in certain situations, dedicated devices clearly win over the general purpose in areas of convenience, size and ease of use. I think this tension is good, and better products will emerge from it. > 11) Plans for UWB (Score:2) > by wfrp01 on 2002.09.09 14:41 (#4222337) > > Will GNU Radio support Ultra Wide Band? Soon, someday, never? > > Great project. Thanks. We currently don't support Ultra Wide Band. GNU Radio is a signal processing toolbox. If you had the appropriate UWB RF front end, you could use GNU Radio for the signal processing. See for background info on ultra-wideband technology.
http://lists.gnu.org/archive/html/discuss-gnuradio/2002-09/msg00025.html
CC-MAIN-2015-11
refinedweb
3,319
64.41
: Sure I agree about the namespace pollution. However, I believe unlike python, I think it is less of a problem in Jython. May be because I haven't done any big project in Jython. The biggest I have done is write a mailserver (smtp server + client and pop server + client) for mail in a small organisation. The complete thing was about 1200 lines. This is something I wrote to learn Jython. Since most network examples in Python use select() and I did not see equivalent in Jython I have used the Java IO library a lot. Another reason is not having to specify the buffer size when doing socket io! Also, as I had not learnt to use threading.Thread I used java.lang.Thread. Not difficult to convert though. Anyone interested with the code? I can mail it to you. I confess, it has more Java feel than Python. What I observed is most Jython apps rely on the Java API and have very few jython files. Since you don't have a namespace problem in Java part and the only part I could have the problem consists of few files, I just don't worry about the namespace problem. This could be because I haven't build any big jython libraries. I just feel if it is worth making into a library, may be it is just as worth rewriting it in Java. Anyway, it have worked with Jython only for a few of months. Ashish Shrestha Jabber Id: axhixh@... View entire thread
https://sourceforge.net/p/jython/mailman/message/9130206/
CC-MAIN-2018-17
refinedweb
255
84.88
Publishing F2F, 2nd day — Minutes Date: 2018-10-23 See also the Agenda and the IRC Log Attendees Present: Joshua Pyle, Leonard Rosenthol, Juan Corona, Garth Conboy, Ivan Herman, Avneesh Singh, Ralph Swick, Karen Myers, Bobby Tung, Wolfgang Schindler, Charles LaPierre, Wendy Reid, Gregorio Pellegrino, George Kerscher, Rachel Comerford, Dave Cramer, Toshiaki Koike, Romain Deltour, Brady Duga, Luc Audrain, Reinaldo Ferraz, Liisa McCloy-Kelley, Jun Gamou, Marisa DeMeglio, Tzviya Siegman, Hadrien Gardeur, Benjamin Young, Laurent Le Meur, Daniel Weck Regrets: Guests: Kazuyuki Ashimura, Judy Brewer, Jeff Jaffe, Judy, Naomi Yoshizawa, Guillaume Sire, Janina Sajka, Lloyd Rasmussen Chair: Garth Conboy, Tzviya Siegman, Wendy Reid Scribe(s): Karen Myers, Dave Cramer, Romain Deltour, George Kerscher, Daniel Weck, Brady Duga, Garth Conboy, Juan Corona, Laurent Le Meur Content: - 1. Joint BG/WG meeting - 2. Synced media - 3. EPUB4 - 4. Next F2F and other meetings’ schedule proposal - 5. Audiobooks - 6. Resolutions Ralph Swick: -> previous minutes 22 Oct Ivan Herman: 1. Joint BG/WG meeting Ivan Herman: (This session is chaired by Liisa McCloy-Kelley and Luc Audrain, BG chairs) 1.1. what does the WG want from the BG on priorities? What about EPUB 3.2? Liisa McCloy-Kelley: let’s talk about what direction the WG wants from the BG Garth Conboy: from yesterday, we spent the whole day focusing on where the group has been heading with WP … a methodology to define a publications and its bounds so it can live on the web … that seems interesting to the education and journals space … less interesting to trade publishers … we’ve just “finished” EPUB 3.2 … which is significant for the classic EPUB market, especially as epubcheck gets updated … I think it’s helpful to have the latest version of EPUB actually being used … I’m concerned about EPUB 4 stepping on the tail of EPUB 3.2 … I don’t want to derail EPUB 3.2 … perhaps by focusing on audio books … what do you think of priorities? 3.2 vs 4 … this WG operates independently by W3C process … but the WG can take input from the business group and the publishing community Gregorio Pellegrino: for priorities… … we need some clarifications about web publications, portable WP, and EPUB 4 … what are the differences? … we have to explain in a clear way what will be the differences … in Italy we had a big problem moving from EPUB 2 to EPUB 3 … so it might be harder to move to EPUB 4 or WP … we want an infographic that’s simple and easy to understand Romain Deltour: garth said the question of conflict between 3.2 and 4 … the conflict already happened between EPUB 3.2 and WP … I don’t see the business case for web publications … we want to be webby, but the browsers aren’t involved … I don’t think the publishing industry won’t migrate easily and quickly … we say that if WPUB is adopted, it will attract interest from browsers … but I don’t see forces that will lead to broad adoption Benjamin Young: I work for a publisher. Ww have a business case for WPUB, but not for the existing spec … we don’t use EPUB for journals … I have not understood how WPUB ended up being part of the EPUB lineage … I want to see WP shaped by web publishers … but we don’t want to have the constraints of EPUB … I want to split these things–EPUB and WPUB on separate paths Garth Conboy: I view WP as not so much fighting with EPUB 3.2, as they are different animals … one on web, one packaged … those can progress at the same time without conflict … WP getting traction, and moving core content to be OWP technologies, and figuring out how to package that… seems to work … I view “putting books in EPUB 4” would be solving a problem that doesn’t exist yet Rachel Comerford: if I understand what you’re saying, I disagree … going into WPUB, we’re trying to solve a problem we haven’t defined yet. That’s our biggest challenge as a WG … we declared a solution to a problem we didn’t define … so now we’re stuck where we resolve problems two ways–at the high level, by not looking at the details … or we get stuck bike shedding, and don’t see the forest for the trees … it doesn’t feel like we’re getting closer to an implementable specification … it’s been frustrating for me … we have so many tools available to us in terms of progress and product development, but we’re not using them … and there’s a lot of infighting over individual solutions Garth Conboy: I don’t think we disagree … I don’t view WP as in the same space in EPUB … it’s a different problem set Tzviya Siegman: focusing on question of priorities for BG to WG … I very much agree with Rachel … we have lost our way, and getting feedback from the BG is good … we started off with a vision of WPUB … but we haven’t gotten to a great place with that … if the BG wants us to focus on EPUB, maybe could do that … right now Wiley produces articles as HTML … so things of interest to us are … AMP, packaging, identifiers, addressability … annotators, selectors, web components … we haven’t solved these problems, and our spec doesn’t address them … maybe we want to focus on EPUB in the WG Avneesh Singh: touching on many things that have been discussed … we should market the best product for each segment … we are trying to keep the products near each other … the benefit the consumer is to use the browser … so trying to keep things close to EPUB does not help Joshua Pyle: +1 to Avneesh Avneesh Singh: we should have WPUB go along the web direction, working in the browser … and for the publishing industry, follow the EPUB path … there’s no benefit to keep these two things similar Benjamin Young: +1 to Avneesh Romain Deltour: +1 Luc Audrain: I would like to emphasize that the work on EPUB is important for us … especially as EPUB 3.2 now has a better relationship with HTML and CSS, using the latest versions … we have momentum now to help us to start the traditional publishing industry to produce good modern content … our problem today is that HTML and CSS doesn’t work everywhere … we want to improve the reading experience for a11y, layout, etc … EPUB 3.2 is the best EPUB ever … I understand WP is important for journals … I’m concerned, like Garth, that we might disturb the momentum of EPUB 3.2 with EPUB 4 … except for audio books, which we could prototype EPUB 4 for the market Ralph Swick: I’ve talked to some of you … I’m hearing a new message that w3c didn’t appreciate two years ago … our original proposal was to make epub a native part of the web, viewing them in web browsers … we had a few ideas … some starting points … but we didn’t survey every touchpoint … we proposed to start the WG … what we didn’t fully appreciate was the degree to which the industry was moving from EPUB 2 to EPUB 3 … EPUB 3.2 is a significant improvement, as it updates the relationship to HTML and CSS … that does remove some of the message about what the new working group objectives were … it reemphasizes the need to say EPUB 3.2 is a big step ahead, and a step on the road to more integration … I see that the BG can help make people know that this a step to the future … this is an intermediate step … I’ve heard different emphasizes… the spec is good enough and we should market it more, for example … and a suggestion that there’s more work to do around interop … what are the next steps you want to happen with 3.2 … and are there resources to do any of this work? … we need to be careful about the messaging around both these things … we’d like a clear message on what you want the next steps for 3.2 to be … as well as working on the future … we need guidance from the BG on how we balance these things Hadrien Gardeur: there’s no solution for audio books right now … we get bad stuff from publishers … both EPUB 4 and WP are really relevant for audio books … EPUB 4 is relevant as an ingestion format … WP is relevant as a delivery format, sent to users … the same thing is true for comics … those publications can be huge … we don’t want to send 100s of MB to a user … the ability to stream resources is incredibly interesting … there are massive markets around audio and comics Brady Duga: I agree with Rachel’s summary of the WG issues … specs work best when two or more groups come together to make something interoperable … when people just blue-sky things it doesn’t work … it’s not about the quality of the spec … you can write a crappy spec like EPUB 2, but it actually solves a problem … audio books is a place where we have a problem, and there’s not a good solution … it’s interesting we split EPUB4 and WP … there is a difference with streamed vs packaged audio George Kerscher: I like WP, the concept … the fundamental is that web browsers are the most accessible interface … and for journals that are one document, I can see it working … we have a disaster on the web right now with publications being out there … for example WHO (world health) has lots of information that’s completely inaccessible … getting those moved to WP would be a great service to society in general Tzviya Siegman: if we shift our focus to EPUB … the work on audio books could be standalone Luc Audrain: re: audio, WP and EPUB 4 are important as Hadrien said … I would suggest we don’t call this EPUB 4, … we should have audiobooks … this message would focus on something we need now: AudioPub … with EPUB 3 we have the best with HTML and CSS … I don’t know if we have to shift the wg for this … I think we should keep momentum on EPUB 3.2, to reassure the industry … but use audio books question to promote WP, but call it AudioPub Benjamin Young: I think we modeled the group upside down … we created specs from whole cloth, which should have been done in CG … and EPUB should be done in a WG … and move audio and web pubs to CG to explore and experiment … and then make specs out of the overlap, and then come back to the WG … that we put the specs in a place where exploration is encouraged, and experimentation is fine … then come back to the WG … the actual spec is 3.2, the experiment is WPUB, the dream is EPUB 4 Tzviya Siegman: Publishing CG Garth Conboy: I agree with all y’all … I’m sensitive to the 3.2 is important, we don’t want to do EPUB 4 for ebooks right now … we could use AudioPub as a way to learn about the future of WPUB … and we could work on comics Charles LaPierre: +1 well said BY Garth Conboy: that could be done now but not dilute 3.2 and not confuse the market Avneesh Singh: re: segmentation … this group should sustain WP in more webby way … to have WP working in browser–this is one segment … the confusion is EPUB 3 vs EPUB 4 … maybe continue with EPUB 3 … and using a profile for AudioPUB with new tech … traditional publishers continue to use EPUB 3.2 … and audio books which is direct outcome of new work … 1. WP for web … 2. EPUB 3.2 for traditional publishing … 3. AudioPub as a profile of WP … .those are the three segments Gregorio Pellegrino: +1 for Avneesh Ivan Herman: my problem is, regardless of what we do where… … whether we follow Benjaminjamin’s model … or continue this group … our problem is limited resources to do the technical work … we could reach out and say we’ll do 3.2 and WP at the same time … but we don’t have the people to do the technical work … 3.2 will require a lot of work … the spec work is done, but we need to do test cases, figure out interop … we lack the personpower we need … if we can’t get new members, new engineers that can do the work, then all of this is just a dream Benjamin Young: +1 to ivan’s concerns Marisa DeMeglio: I hear lots about traditional publishers vs web publishers … why are these separate islands Tzviya Siegman: traditional in this group means trade Marisa DeMeglio: trade publishers don’t want to be on the web Marisa DeMeglio: I find that WP, PWP, EPUB4, etc to be really confusing Laurent Le Meur: we could remove one, PWP Charles LaPierre: when we released 3.1, the problem was we didn’t have epubcheck … I know DAISY is working on 3.2 epubcheck Tzviya Siegman: Tzviya Siegman: WE NEED DONATIONS. GIVE US ALL YOUR MONEY NOW. Garth Conboy: epubcheck is getting the focus it deserves Benjamin Young: re ivan’s concern about peoplepower … by using a CG you open the doors to engineers to participate in a more familiar environment … there’s not a membership obligation … early-stage startups aren’t in a position to be members, do calls Juan Corona: +1 bigbluehat Benjamin Young: but they can write scripts to prove or disprove a point … and perhaps if their work pans out, get in a position to join w3c … CG works for small operators … when there’s some momentum, larger companies may become interested … to marisa’s point … pay attention to verifiable claims, identity stuff, all that kind of thing Brady Duga: re: ivan’s comment on developers … developers are not interested in implementing WP … I’m not interested because I sell ebooks … the technical details are uninteresting to me … but in the EPUB 3, I was involved and these things mattered to me … I attend the audiobooks calls, because it matters to me and what I’m doing … perhaps the lack of interest in implementation is keeping people away Ivan Herman: which should mean more members … it’s easy for you because you’re a member … the problem is twofold–both membership, and getting engineers from members Avneesh Singh: Maybe we are trying to solve all the problems together … good to separate; one bucket is WP … have CG kind of thing … one practical thing, this WG is more than half way through … rolling everything back is a huge overhead; maybe we move innovation along … other bucket is EPUB3.2 … to Ivan’s point on manpower … maybe we don’t rush to put EPUB3.2 onto the rec track; see what industry does … maybe look at how market reacts … Third segment is audio books; we can work soon and start pushing George Kerscher: would 3.2 on rec track change publishers’ perspective Garth Conboy: I think coming out of CG, in my view is seen as an established work Wendy Reid: When I go to my engineers, this is latest update … there is no work happening until we get publishers interested … cannot get people interested until I get publishers ready to support Liisa McCloy-Kelley: if we support EPUB3.2, I’ll ask you what you need to support it Wendy Reid: We are happy to take that Benjamin Young: we buy scholarly … loads of vendors at ebookcraft, Toronto, March … most won’t be in WGs but would like to have some say … and do development to be future of what is being done; would like to see their involvement in a CG Leonard Rosenthol: I would like to comment on Ivan’s comment … my perspective on this … this group and the work that this group has been doing is excellent … a lot of great potential with WP and audio and the like … this group is 90% publishers, or people from publishing industry coming from IDPF … that is great; we have leverage that experience to build the work we have done … the reason you are not seeing other folks come in, that’s because it’s that type of focus … You have heard me say, my focus is that Web Publications encompass more … work we have done helps to accomplish that … while we have some of the other things in this group … it does give folks that opinion outside of here and other standards bodies meetings … they just don’t here a place for them here … Making WP a separate piece of work from the ebook work is good … will help drive toward Ivan’s desire to see new blood come in … provide a place to build separate from the ebook community Liisa McCloy-Kelley: summarize what I think you all said … Everyone agrees 3.2 is good, it’s out there … question is whether EPUB3.2 as good as it is, or do we need a rec track … and does that mean anything to the BG or a bigger group of people … figure out if that should be prioritized … Flip things for CG to incubate thing … then move to BG for input, then move to WG to work on … supported pretty good … Then there is a question of Audio and whether that is a priority … and if WP is a priority … should they run simultaneously … requirements… … does that sound right? Wendy Reid: We don’t have feedback from the industry … just Brady and my experience … Would love to know what audio industry wants; what problem we are trying to solve Liisa McCloy-Kelley: and what will it take to implement and get broad support across reading systems and from publishers worldwide … One thing somebody brought up, not sure where it fits … idea that comics and audio could both work in same time frame, or same chunk of the puzzle Luc Audrain: that is a good transition Luc Audrain: I think about Tokyo workshop Garth Conboy: shall we close the queue? Ivan Herman: I think it’s important to realize the BG … putting 3.2 on rec track … personally I think it would improve the spec … by creating the test suites and test environment … which leads to adjusting text to make it more precise … at end of process … we come out at W3C will be of a higher quality Karen Myers: ..and will lead to better interop and compliance with reading systems Ivan Herman: a bit technical, that should be part of the decisions … not just putting standards stamp on 3.2 … downside there is still work to do … I think this is work that would be highly beneficial Liisa McCloy-Kelley: What do we mean by compliant reading systems and how would you test for that … when majority of reading systems don’t @ Ivan Herman: good question; don’t have answer there … but goal is not to have to test reading systems on 15 reading systems … try to avoid the “best viewed on” issue George Kerscher: companies have been ingesting from 3.2 Ivan Herman: I cannot answer details, this is part of job Luc Audrain: 3.2 is not a web publication … I am concerned … 3.2 is ok … for publishing and not rewrite Ivan Herman: not rewrite … 3.2; maybe some minor details … I am not saying at all to change it … speaking here with guidance of [Dave C] … no testing environment; rec track would force us to do that Laurent Le Meur: rec track maybe would include that Ivan Herman: It’s not implemented; why not there Karen Myers: Liisa; We can dream of a future that includes JScript Karen Myers: Ivan; what implementation means Ivan Herman: if MathML is in MathJax… … whole thing is useless if not implemented Jeff Jaffe: If rec is that the WG picks up 3.2 or Audio Pub … we are not chartered today … we would need to recharter Tzviya Siegman: Was going to say what Jeff said … turn to Dave to speak about 3.2 Dave Cramer: I feel like we are confusing means and ends … 3.2 is not our goal … our fundamental problem with EPUB today is interoperability … EPUB3.2 is not significantly different from 3.0.1 … tech changes are quite small … except for core of HTML and CSS … in some context we got that for free before … a lot of reading systems are based on browser engines … not like reading systems will unblock certain features from happening; they never filtered on it anyway … not changing what’s possible in EPUB … if 3.2 goes on rec track … what is point of making a first spec … go over a hundred times … but learn from experience of doing tests … why go down that path … make this more interoperable … what does reading system X or Y do or not do … or unimplementable because it was not tested … use this as a tool rather than an end in itself 1.2. Tokyo workshop and its results Ivan Herman: Report of the workshop: Luc Audrain: reflowable issues … also books with complex layouts … too sorts: graphic arts; manga, bandes dessinées … and those with complex layout … today EPUB is solving with fixed layout EPUB … layout is preserved using open web technologies … for manga, it’s an image of the page, fixed by a capture by the page in print PDF … for other books it uses absolute positioning with page as viewpoint … put text and image on the page … it breaks solutions … put on market mangas and fixed layout text for text books or cookbooks … there is a market for it … market is very strange … for fixed market there is 50% market in Japan for manga … if we change things here, we have to pay attention … also success in Korea using web technologies … these two approaches were exposed in Tokyo workshop … two ways to solve this … Idea is to have a better issue in digital books for this fixed layout … for manga and bandes dessinées; understand what is expected by the author … describe page with a specific taxonomy … some work was exposed … some thought it was good and wanted to join this work … also a W3C CG was created … for international work on this … how things are expressed by the author in this taxonomy … bring two together in future … CG is one outcome … second kind of group … make more accessible text books, express as author wanted as a page … also be better on small screens … we had good presentations on capacities of CSS … there could be a layout system for HTML … it was interesting for trade publishers … use InDesign … lay out important, meaningful layouts … layout means something … some people working on this … to try to figure out different part of the layout and make it available in a reflowable manner … at end of day … we had reflection about two ways to make this complex layout more reflowable … one as Dave explained is to compose on HTML and CSS … with CSS we may have books created with complex layout directly … means a lot of work to be done in web browsers where layout is built … not as sophisticated as what we can do now … Other way is to express perfect job … in complex layout in HTML and CSS; some kind of conversion … need to understand … could be expressed as dutifully as an InDesign page … and on smaller pages, more free … the two directions we identified … We need more input from publishers in CSS WG … and what has been specified needs to be implemented in browsers … First, on long long-term … it would help us to go a step further than fixed layout … help us to do some important business in manga … Go to another step in the future when we have this for complex layout in HTML and CSS … we hope the whole publishing industry will contribute to this evolution of CSS … Others who attended Tokyo workshop, anything to add? Ivan Herman: one more thing that did come up … which is not necessary a job for this group … evolution of CSS is … for many things, how we use CSS for various layouts, much based on frankly hacks … old days we used tables … then told not to do that … situation where we throw out everything from CSS an start over again … flexbox and grid and combination of the two create a new rich, clean environment … but more difficult for those who have to carry the past … would need a lot of education and outreach … try to get this kind of outreach for users might be important … I realized I may have to relearn things Laurent Le Meur: There is a lack of tools coming from a fixed page from InDesign … to interactive … also importance to lack of EPUB3 for lack of handling manga … but complained as images … they don’t have @ they would like … segueway to what we would want manga group to do … not move to 3.3. but use W3C techniques and implement another way Leonard Rosenthol: I agree, Laurent, there is a lack of tools because it’s really, really hard … not a shock to say we have invested hundreds or thousands of dev manhours to solve that problem … nobody likes what we have come up … with; when it comes to responsive design … you cannot guess things … you either put in manual controls; put in break points and the like … that is too complex for public, although matches CSS model … or we go to heuristics and machine learning … great for average user but developer complains … it is a really hard problem … if you want response design, you have to start with responsive design in mind … that is very difficult … what does authoring in a responsive environment look like? That is a difficult problem to solve … we agree … and why CSS WG chair works for Adobe Laurent Le Meur: 90 percent of designers are not developers Leonard Rosenthol: right but those designers turn their work over to developers … people want to add these same things into their web sites … how do you produce content that delivers all those results … as we look at it … just putting it into context Ralph Swick: [to Leonard’s point, one of the many things I want publishers to teach the Web is how to bring the centuries of knowledge in book design to web tooling] Ivan Herman: one more thing came up in the workshop that has a general message … there has always been a strong reluctance … to consider using JavaScript for anything in the Publishing world … there are accessibility and security issues … I think that is a general reaction to look at a again and reconsider … we have to accept that layout effects are done in JS … some examples in the workshop, Rachel @ … we know about Houdini project in CSS work … that gives you environment to plug in CSS … have to incorporate in our thoughts … publishing world may need to do active scripting … active push away from scripting is not tenable for long Luc Audrain: Luc Audrain: Add on irc … one to the report that the chairs have written Luc Audrain: Luc Audrain: and the second is an EDRLab report on this subject … Laurent has three-part report … links to all the presentations are in the full report … way to have messages from this Garth Conboy: time for a break … sounds like you have some homework, Liisa … you will go back to BG and come back to us Liisa McCloy-Kelley: thank you everyone Ivan Herman: —- BREAK —- 2. Synced media Marisa DeMeglio: let’s talk about sync media and publications CG … what our findings are, what are the next step … what’s the technology selection process … we want a way to sync pre-recorded audio clips with text in a web publication … we don’t want to interfere with the Web Pub itself, but have an overlay with audio clips … at last TPAC we showed what that could look like … so you have the text of your book displayed, some chunks highlighted, and at the same time you hear the audio for that chunk … the playback follows the highlight … in order to do this we looked at the preexisting tech Marisa DeMeglio: Daniel Weck: Community Group: Marisa DeMeglio: Marisa DeMeglio: it started at TPAC last year, and we looked at what was out there … the 1st thing we considered is SMIL, which is used successfully in EPUB 3 … it can contain a pointer to the text document and a pointer to the audio clip … unfortunately it’s not very active as a standard, and has no browser support Liisa McCloy-Kelley: it works for picture books Marisa DeMeglio: yes, but it’s not the most developer friendly format … next is TTML2, but there’s no way to point to a text HTML document Dave Cramer: TTML = Timed Text Markup Language Marisa DeMeglio: you could hack it, but it’s not convenient … Web VTT does have browser support … but then you can’t have nested, like you got in Media Overlays … so you can’t have different granularity (read by paragraphs, then read by words) … Web Animations, is a cool spec but has no declarative syntax … WebAnnotations has the right degree of pointers (text and audio) but has no processing model (can’t play it from start to end) … recently we were pointed at multidevice support and timingsrc … but no processing model either … next thing we want to look at is to roll our own Leonard Rosenthol: did the group evaluate the possibility of going to TTML or WebVTT WG and asking for the necessary changes? Marisa DeMeglio: yes, I spoke to them … having the text format in TTML just doesn’t work for us … ad they suggested to transform the content on the fly to HTML, but it’s not realistic Daniel Weck: TTML is more advanced, it has its own layout and rendering model Ivan Herman: what was the goal of TTML? Daniel Weck: settop boxes, captions Daniel Weck: Daniel Weck: we’re gonna look at the various additions we can make about the manifest … and examples of JSON serialization for the model we’re proposing … not deviating much from EPUB 3 MO … but conceptual extensions Romain Deltour: [looking at the doc linked in IRC] Daniel Weck: we now that schema.org defines an audio book type, as an extension of book … how we deal with Web Pub manifest when we want to enable a union of features from the book type and audiobook type … do we want to explicitly refer to both type? Ivan Herman: no Daniel Weck: we want to rely on the audiobook type as it gives us additional properties … one of them is the ‘readBy’ property … I’m skipping intentionally the discussion about the video book type … we’ve discussed the syntax for the values of the duration … s/duration/duration property/ … we propose various syntaxes … we can align with the Media Fragment syntax Ivan Herman: I’m wondering if the discussion we had with danbri is related to this … I don’t think schema.org would want to exclude the ISO syntax, but we could also extend to a simplified syntax Daniel Weck: if we want RS to support the spec, they’d have to implement support for these different syntaxes … the onus is on the RS developers, we have to be mindful of that … I’m not sure what it means in terms of process Tzviya Siegman: we can comment and follow up Daniel Weck: the duration property applies to the whole publication … but can also be applied to individual links in the reading order … in the case of a regular publication, audio files can appear in the resources and the duration property can apply there too … these links are currently of type publicationLink … but we could use the schema.org link role to make it more extensible … about the properties specific to sync media … in EPUB 3, when the text fragment is actively narrated, we set a color highlight with a CSS class … there’s a default CSS class and RS which support MO will inject that class in the doc … since then, the CSS Selectors Level 4 introduced a new pseudo class called ‘:current’ … and two other called ‘:passed’ and ‘:future’ … the stated use case is TTS read aloud, but it doesn’t exclude our use case … we don’t know what’s the state of this pseudo-class in the CSS WG / specification process Ivan Herman: how do they define what “current” means? Daniel Weck: to me it’s still very much unclear, let’s keep an eye on what’s going on there Dave Cramer: Ivan Herman: eventually they will have to define some sort of processing model and we’ll have to see if it works for us Daniel Weck: correct Ivan Herman: shouldn’t we talk to them right now when it’s still very open? Daniel Weck: yes, we just discovered this very recently Tzviya Siegman: is it the same thing as aria-active? Daniel Weck: it intersects … what we’re trying to achieve is to have enough in the mainstream manifest so we can use it for sync media … we need a number of hooks in the Web Pub manifest format … one of the issues we’ll have is whether we want to group them under a namespace? … important: we need to associate an HTML doc in the reading order (or resource list) with a synced media overlay … we want to reference the overlay with a link … we’re proposing an additional property called “sync-media” which is a nested publication link … it’s implemented in Readium 2 (with a slightly different syntax) … so we now it’s implementable … that link would point to something equivalent to EPUB 3 MO, but simplified and using a JSON syntax … we propose a media type for that JSON format “application/vnd.wp-sync-media+json” … registration to IANA to be discussed … it offers RS a way to discover the synced media overlays in the manifest, rather than checking for the extension or file content … we discussed whether the duration should be attached to the main text document or to the JSON overlay … we propose to attach it to the overlay … Issue 6: one proposal is to have synced media resources in addition to resources and reading order … having them grouped for ease of processing George Kerscher: so if I understand you have a regular Web Publication, and an audio publication, then a synced media that connects them both? Marisa DeMeglio: I think that references one of our overarching principle … MO should be able to be packaged separately Daniel Weck: and you don’t mean a ZIP file, but a way to define the resources together Marisa DeMeglio: yes, and we want to be compatible withe Audio Book TF Brady Duga: does this proposal still requires IDs on all elements that we want to highlight? Marisa DeMeglio: great question, we have to figure this out Daniel Weck: the grouping of resources is not specific to synced media, it can be a good use case for mainstream publications as well … it can organize a very long list of resources Ivan Herman: I understand the intention, but as we defined yesterday the boundaries of the Pub, we’d have to add up all these resources to the definition … I’m a little bit worried about this kind of effect Daniel Weck: the meat of this proposal is a new format, the JSON media overlay Marisa DeMeglio: Daniel Weck: it’s based on the concept of the EPUB 3 MO, i.e. a tree that more or less maps to the HTML tree … and define mappings between document fragments and audio chunks … fragments are defined with fragment identifiers … there is no industry standard to reference character ranges except CFI … in this proposal we mention fragment IDs and CFIs … it’s designed to align with the OWP … not using clipBegin/clipEnd in an XML syntax, but using the media fragment syntax … the clock syntax is seconds.milliseconds … the way we represent pairs of text/audio is to use JSON properties “text” and “audio” … see the full example at the end of Ivan Herman: having played with SMIL, what surprises me is that we have to somehow reinvent the wheel, or at least redesign it … it’s a Web thing, it’s not particular to Web Publications Daniel Weck: it’s a CG, it’s not tied to Web Pub Benjamin Young: +1 to targeting the Web for these things Ivan Herman: yes, but you formulate it with the Web Publications use case … we have to be careful, we don’t want people to think we’re forking the Web … we have to put it at the Web level Marisa DeMeglio: I think long range, having something like that on the Web is great … but our personpower is very limited and our use case is very concrete Ivan Herman: I’m almost sure that if we go with that as part of the recommendation then we’ll create a tempest … we can’t avoid that to come at some point Hadrien Gardeur: Hadrien Gardeur: I pasted a link of a basic experiment of an audio book … as a Web Pub, and your position is saved using local storage … a demo of what we worked on, where WebPub is directly applicable … creating something that works for this on the Web is easy … if you’re interested, reach out … it shows that audio books is a low hanging fruit George Kerscher: using pure audio and not sync media? Hadrien Gardeur: right Benjamin Young: Benjamin Young: I wanted to +1 what ivan was saying that synced media is a general Web problem … so we have to phrase it carefully … the link I pasted was one such synced media format, using essentially timed-text like expressions in HTML … a fork is somewhat active Daniel Weck: Another implementation example (there are several): Daniel Weck: :) Benjamin Young: I would suggest engaging with these people … there are possibly still people at Mozilla who care about this project … this was the Web-focused vision of it a few years ago Daniel Weck: Also: Marisa DeMeglio: yes, it would be interesting to find out why they’re not pursuing this Avneesh Singh: yes, it’s not a Web Pub-specific thing, sure. … but the main use case is for the publishing world … we want to have audio overlays without having to change a Web Publication glazou: I know TimeSheets, kaze did it glazou: loooong ago glazou: obsolete IIRC Avneesh Singh: we don’t need to put it as a Web Pub thing, but we need it and don’t want to get lost by broadening the scope Daniel Weck: Also: Avneesh Singh: we should focus on handling this use case first … to address the issue of having it as part of the Web Pub specification, we can work in the CG Daniel Weck: going back to Benjamin’s mention of popcorn.js … I’m familiar with this, also a couple other initiatives like timesheets … more recently timingobject, which creates building blocks … I completely align with Avneesh’s comment there … the main use case is sync media text/audio books now Hadrien Gardeur: you kinda a need to alter the text for this to work, because we’re missing a good text fragment identifier … for audio you can use media fragments … for text currently you need IDs, which is less than ideal … this goes way way beyond than synced media: bookmarks, annotations Leonard Rosenthol: not to mention, web annotation selectors Hadrien Gardeur: I’m wondering if that’s not an example of sth that our group can work on and make a difference Ivan Herman: Web Annotations has two different parts, one is the annotation itself (data structure), and one is the addressing part … the addressing part goes beyond what the Web Annotation need, we had these discussions there too … the other thing is that I don’t think I disagree with Avneesh … it’s all a question of presentation … if I just talk about “Web page” instead of “Web Publication” then there’s no binding to this WG specifically … it may be more politically acceptable … the technology can be the same, defined in the CG … my preference would then be to publish that as an independent specification Daniel Weck: I agree with you Ivan … half of the proposal is glued to Web Pub, but the other half is generic and can be split Tzviya Siegman: what’s the next step? how do we promote this? janina: we were really concerned early-on about these dragons mentioned by Ivan … we heard Marisa yesterday, and it needs to be very clear that the existing technologies don’t meet the requirements … we would need an explainer Marisa DeMeglio: yes, these documents are recent and we want to make it an explainer … what we would need is admnistrative guidance on where this work should happen Ivan Herman: for the time being, doing what you do is fine, in the CG … when you have a draft specification, we can see where to publish that George Kerscher: it wouldn’t be included in Web Publications? Ivan Herman: it could be… … the core of it for me is this “mini-SMIL” has to be specified separately … and then how this integrates in the Web Pub manifest is a different thing Tzviya Siegman: I will follow up with Marisa and Daniel in the PWG … it will be on the agenda in a few weeks Romain Deltour: — LUNCH — Garth Conboy: scribenick George 3. EPUB4 Garth Conboy: We have EPUB 4 followed by Audio books.. … Garth has some notes for this topic. EPUB 4 as a concept has more relevance to many of the members of the WG. … We talked about this this morning in the business session. … Because of the status of EPUB 3.2 ,, we are unclear about what EPUB4 should do. … Before the discussion at business, EPUB4 was going to be a packaging of the WebPub. … The boundary is special in web publications. If you are making an EPUB4 from a web pub, it must be bounded. The packaged version would have the right stuff. … The resources in EPUB 3.2 is a feature, but other people see it as redundant. … If we are thinking of EPUB 4 as having bounds, the question of resource list is interesting. … Perhaps EPUB4 is not bring a lot; however if we look at what is lacking, the aubio book space is it. … What is being received for distribution is all over the planet and it is ugly. … Most of what we did from whole cloth was not adopted. … If we look at audio books, we have an opportunity to spec it without retooling, they could ingest that content. … Question is will the publishers adopt what we spec out. Garth Conboy: suggestion is to explore we keep a package of what we have like EPUB 3.2 for audio books. Dave Cramer: What sort of things should be called EPUB versus something else. … Technically EPUB is the content, metadata, packaging. If we replace the OCF with something else is it still EPUB, probably. … There is a more fundamental issue. There is the web model and this EPUB model. … In EPUB, you take this content and bundle it and hand it to somebody for distribution. Tzviya Siegman: +1000 to dauwhe Dave Cramer: Benjamin Young: +1 to dauwhe Dave Cramer: Our description of WP falls between the cracks. We have WP and do what they do on the web. … I wonder what we are doing with this distinction. Are we just bundling up to send to somebody? Garth Conboy: if we change the manifest to JSON and bundle it up, it is still EPUB. … We can correctly use the term EPUB for stuff that is packaged upp and sent out. Where WP is a web hosted thing. Dave Cramer: web packaging may change that model. It is a potential bridge between the WP and EPUB. … We as publishers want to use more of those web Hadrien Gardeur: We see people using EPUB and it is not really meant for them. … With EPUB there is a lot of baggage. Things that do not make a whole lot of sense. … We could start from scratch and design for what we need. Liisa McCloy-Kelley: … I struggle to understand how we can resolve problems. The audio book is very timeley. We can solve problems for this fast growing area that has no standards. Avneesh Singh: If I look from outside, it will be difficult to explain EPUB 3.2 and EPUB 4. Benjamin Young: +1 to Avneesh Avneesh Singh: Perhaps put EPUB 4 in a freezer and wait for a better time. Garth Conboy: +1 to Avneesh Avneesh Singh: Some markets will find WP to be very important to their segment. … We can make an informed decision in a few years. Garth Conboy: ? Avneesh Singh: Audio books we can move forward on. We should have an audio book community group. George Kerscher: … Great idea for the audio book CG. Tzviya Siegman: We need to move forward with an audio book spec. … Iceboxing of EPUB 4. … WP we don’t exactly know what the path forward is. Garth Conboy: … WP could continue in this WG or in a CG. It should continue in some way. Tzviya Siegman: … WP as it is today I will not implement. Luc Audrain: EPUB 3.2 on a rec track will be proposed to the PBG. What will happen to EPUB 3.2 would come from the BG. Hadrien Gardeur: Tech specs can take a long time. Implementations can take longer. … I don’t know that iceboxing is the right approach. … From a tech spec perspective, this not does not make sence. Garth Conboy: EPUB 4 moving forward creates market confusion. Ivan Herman: Let’s continue with WPub and eventually EPUB 4 would make sense. WPub may be appealing in the future. … Audio books could be published directly, which would be a good thing. … WP gives us a framework to work on a number of things. Garth Conboy: WP continuing, epub 3.2 rec track possibly, and audio books as a special case of WP. Garth Conboy: a? Garth Conboy: q George Kerscher: audio spec: rec track? Garth Conboy: possibly an ouput of this group Leonard Rosenthol: core responsibility bring pub-specifica aspects to the web … help the web evolve, things special to publications, we want into core web platform Avneesh Singh: working group, innovations in WP, such as audio books, gather feedback, leads to specification work … rec track for EPUB 3.2: no need to fix all details now, need open view on what will be tested / implemented, etc. Romain Deltour: can someone clarify re-chartering? Ivan Herman: process-wise, replace current charter with new+removed work items etc. … first this community needs consensus, then other members to support it (W3C -wide) Dave Cramer: re-chartering opportunity to get objections to recharter again … Combining IDPF into W3C: EPUB 3.2 not “exactly” a web thing … make heritage of EPUB “web things” Tzvia: ISO relevant too? Karen Myers: conversations / outreach to broader community Brady Duga: differences between adopters / stakeholders for EPUB vs. WP (audiobook market, etc.) … audiobook closer to EPUB than WP Ivan Herman: EPUB3.2 requires technical changes to support audio books? Ivan Herman: EPUB 3.2 needs interoperability testing, etc. Brady Duga: focus should be on packaged audio book … starting from unpackageed (WP) to packageed (EPUB) causes production problems … (challenges) … business need: packaged audio book, no need to address online / web audio book … (Brady’s view) Garth Conboy: leverage work in WP audio books (not Web Packaging packaged yet / zipped), let’s not open can of worms of modifying EPUB to support this George Kerscher: trademark audiopub book would be good (communication / marketing) to outreach to industry people who have this specific need George Kerscher: incentivize other market segments to join the broader group George Kerscher: EPUB3 Media Overlays already supports audio, but too complicated Dave Cramer: open question about evolutionary potential of EPUB 3.x … audio file MP3 could be spine item … (e.g.) Dave Cramer: EPUB 3.2 currently draft community group report, so can be changed … if compeling reason that can be done without current framework, then let’s do it Hadrien Gardeur: there is definitely a need for audiobook in WP … stream audio books (not just public domain) … commercial audio book market, no need for DRM, just need manifest to handle that part of the user experience Brady Duga: I do not disagree … There are two uses: WP and packaged, two different things / market needs Avneesh Singh: charter scope broad, do we need to broaden? … WP Charter would need removing EPUB4 removal, that’s all (need to re-charter?) Ivan Herman: we could create separate working group for 3.2 … convince W3C management that charter interpretation is correct Luc Audrain: +1 Ivan Herman: not a clean way of doing it … keep one Working Group Avneesh Singh: EPUB3.2 and WP different objectives, target audiences … if we decide rec track for EPU3.2 for existing publishers … WP different charter possible Lisa: audio podcasts, not just “audio books” … another community to reach out ot Avneesh Singh: +1 Luc Luc Audrain: I don’t see how for EPUB 3.2 this would make sense Daniel Weck: (rec track) Garth Conboy: it would be a recharter so that the group can work formally on WP and EPUB3.x Ivan Herman: for example Web Architecture works on several rec tracks in parallel / work items … maybe separate WP and EPUB concalls / task forces … it is up to us to see how we proceed Garth Conboy: a? Avneesh Singh: agree. WP = more involvement of web community, dissociated from the EPUB work … EPUB 3.2 to meet the needs of publishing world Garth Conboy: this group is umbrella vs. some other organisation is a detail Laurent Le Meur: EPUB 3.2 to rec track is not interesting for publishing business, and it is a can of worms … audio books need package format, so why would zip be less interesting than Web Packaging format … (short term) Garth Conboy: Web Packaging is a long way off, right now we can use zip Tzviya Siegman: if we split WP EPUB groups we will isolate brains … lots of us work in ebooks, … we need to talk to other groups (web people) … e.g. benefits of Service Workers, etc. … lots of technical overlap … they will do work with us, but we need to present a EPUB evolution message … stop thinking as business model driving factor for technology Romain Deltour: +1 Luc Audrain: concern - how to sell this to the publishing industry … EPUB 3.2 to rec track at the condition that this does not modify significantly the technical underpinnings (heavy investment cost) Dave Cramer: fix reading system bugs in ecosystem … talking to the rest of the web: TAG, etc. people interested want to help, but we need advice on high arch level, need to figure out how to communicate our needs … solutions likely to come from them … create an environment where they will want to help us … system design / integration, EPUB so far from the web, need their help to get closer … communicate what we want without implying we have a solution (can come across off-putting) George Kerscher: can we engage them about rechartering? Dave Cramer: interesting to have converstation about that Ivan Herman: now convinced better keep group as single task force … publishing community still seen by rest of web community as strange, so better preserve existing weight of working group to influence … let’s avoid breaking down / splitting the group … if there was EPU3.2 -specific group there would be increased isolation Laurent Le Meur: my point was Business Group to study EPUB 3.2 on rec track … not to advocate splitting Ivan Herman: some want ISO … transition from Community Group to ISO is horrible. Better through W3C rec track … more effective Liisa McCloy-Kelley: minimal viable product, for as long as we’ve had EPUB, this is baseline level of support (fonts, pagination, etc.) functional scope figured-out by reading system implementators Ivan Herman: take EPUB features, demonstrate in reading systems … show it is not doable on the web Avneesh Singh: single group more difficult to manage, but better for integration … EPUB3.2 rec track too early to make decisions … kind of research project (ISO, etc.) … too premature to make decisions now about rec track Tzviya Siegman: IG had many task forces / “working groups” … CSS has many documents at the same time … idea of sticking to separating working group seems very expensive … (management costs, time, overhead) Luc Audrain: decision by end of november feasible? 4. Next F2F and other meetings’ schedule proposal Ivan Herman: need to timetable next year’s meetings … Laurent EDRLab Digital Publishing Summit … and workshop on archival of web content … PWG F2F meeting tentatively begin of May 6-7 Mon-Tues most probably Cambridge MA … think about it :) … week of June 3rd … in Paris for workshop + symposium … Cambridge MA maybe Google, Hachette, MIT … Paris maybe BNF national library … Cambridge MA is for FTF (not workshop + symposium) … Boston marathon is week after Daniel Weck: —- BREAK —- 5. Audiobooks Wendy Reid: Last session … woo hoo! … update on AUdioBooks (AB) task force. … Current state: AB TF formed in May … Focus has been on WP (not EPUB 4, to be named later) Garth Conboy: — Working sample of audio-only AB Wendy Reid: on Web and Android … A couple of issues … Hurdle to resolutions: lack of use cases; have worked recently on these Daniel Weck: Wendy Reid: Audio WP has a player than move forward/back, can play, provide metadata, change playback speed, retain position … online, offline, streamable. … AB WP open-able useable in non-WP-aware browser. Daniel Weck: Ivan Herman: on non WP browsers, the term is fuzzy … JS usage these days makes this hard to address Juan Corona: .. WPs with JS bridges problems on browsers.. but what category is this? Hadrien Gardeur: yes, but you can listen to tracks and skip around … but we need more than that, we need JS to do more Wendy Reid: we have some posted issues, for use cases, here they are: Juan Corona: Hadrien’s demo too Hadrien Gardeur: Wendy Reid: Wendy Reid: schema.org issues with duration, you need the total pub for the whole pub Wendy Reid: Wendy Reid: individual elements too, to let the user know the progression at the chapter Juan Corona: Second issue: bitrate, format Wendy Reid: thanks to the discussions yesterday, hopefully we can come to a resolution … so let’s close some issues and continue 5.1. Duration of an audiobook #307 Juan Corona: (chatter among the group) technical details Daniel Weck: Media Fragment URI uses NPT Normal Play Time Ivan Herman: let’s stick to what we have now, because we ran out of time for the draft Benjamin Young: latest Normal Play Time (NPT) RFC Daniel Weck: … ISO 8601 not suitable, hoping duration from Schema.org will be ammended (affects totalTime too from Schema) Ivan Herman: introducing our own element now is not viable Wendy Reid: let’s close this issue George Kerscher: not sure if we need the duration for each chapter … there’s the use case but people just want to know the book duration … everything else could be calculated along, from the files Wendy Reid: but there’s a track, we do get them as individual files, sometimes. but we get them as tracks instead most of the time … it’s to get the best UX … I want to know I’m 5 mins into a 25 min chapter for ex. George Kerscher: so you get them as tracks.. you process them.. but what do you need? Wendy Reid: it’s more complicated than that though Juan Corona: it’s not 1:1 Brady Duga: my question is like george’s, wendy is this reflecting what’s current now? … duration in the metadata is one form for us, but it’s not accurate. It’s concerning to have it like this Wendy Reid: let’s talk about it, how does a pub look like when it’s packaged Daniel Weck: bigbluehat RFC 2326 is referenced normatively by Media Fragment URI, do you suggest we explicitly reference RFC 7826 instead? Wendy Reid: duration is on the chopping block I know, but we need it for the UX Brady Duga: ToC, chapters mapped to the range of the chapters/tracks… you need to know how to calculate it. Benjamin Young: DanielWeck: RFC 2326 states it’s obsoleted by RFC 7826, so I’d link to the newer one George Kerscher: audio file sequence, you have a pointer to the beginning or the offset. Brady Duga: if you have the info before hand you can calc it. but in the web you don’t know this info until you download it all Romain Deltour: its a metadata issue, not a playback issue Brady Duga: george you are right you can calc it, but it’s hard when you are streaming it Wendy Reid: we need to know where in the chapter you are, with knowing the duration and offsets mixed with aggregation of the chapters or not Lloyd Rasmussen: do we need to have an API and the player to coordinate this Brady Duga: would the publishers give us this detailed ToC information? Wendy Reid: the spec won’t eliminate this missing data, or bad data, but we can validate it and provide feedback Daniel Weck: there are different ways to organize the files, theres a case theres a chapter with a title, … or more sophisticated with a ToC, and files contain more than one chapter … have the information on the manifest, along with the link … any objections to this? Wendy Reid: close issue with duration, use npt, until we get a new direction Daniel Weck: media fragments has a different reference Benjamin Young: there is a new one Leonard Rosenthol: is it compatible with media fragments? Benjamin Young: depends on what you are using, if npt> link,, to reference the new rfc coordinate with that group. Wendy Reid: media fragments for now then Resolution #1: Close issue #307 (duration) after discussion with schema, we will use NPT (Media Fragments) until they confirm or inform us otherwise research needs to be done Benjamin Young: general question, not on the TF sorry. … it’s not essential for pkg, its for navigation … why is it in the manifest? … it looks like annotation Juan Corona: .. could it be on its own Benjamin Young: someone could share this info like an annotation … I feel like this content is not essential to the manifest, it could be tripped on Wendy Reid: this is in the proper context though, this is out leading solution for now Benjamin Young: there’s too much going on on many spaces … a track in HTML5 is something else … HTML wants a playlist system, it’s missing … this is a good use case, to converge with. Daniel Weck: this is the reading order … page-list, audio streams Wendy Reid: any objections to close this? Daniel Weck: who edited the draft? Ivan Herman: this is not for me, tbd in a PR 5.2. Alternate formats or bitrate for an audiobook 308 Wendy Reid: Wendy Reid: issue 308 bitrate, alt formats Wendy Reid: no normative statement about which format MUST be used … but we need a way to indicate what format is referenced (for streaming etc.) for reading systems / player implementations … make decisions about what to download / cache … use case for different qualities … content creator to communicate bitrate, at the very least Brady Duga: should this group handle this issue … what about formats that have multiple bitrates etc Ivan Herman: agree, should not discuss here. Laurent Le Meur: alternative renditions of same content, DASH better because bundles multiple alternatives … user agent to choose alt based on metadata expressed in manifest Garth Conboy: what is the real-world use case … in trade world Wendy Reid: Audible does it, but not at distribution stage Marisa DeMeglio: what’s special about audio books is that HTML mechanisms cannot be used in manifest Hadrien Gardeur: only works for formats on audio and video (HTML) … we have to address this issue if we want a solution that works everywhere Brady Duga: if we allow this, we then need a fallback mechanism … this is complicated … create multiple version of the book instead of bundling / declaring the alternatives inside a single publication George Kerscher: what about ingestion? Wendy Reid: ingestion, we would be checking the files Daniel Weck: Benjamin’: HTML audio video do not include bitrate, selection based on format Wendy Reid: EPUB vs. WP audience, but I realized audiobook work predates all of this, venturing into solving problems that are solved at different level on web Hadrien Gardeur: content negociation not likely to happen for audio files … content management backend not smart enough … some other group will have to deal with this, if this group / we don’t do it Benjamin Young: Benjamin Young: not asking about content negociation, just the HTML media source spec Romain Deltour: responsive image community group … user agent to negociate, HTML picture element source media … new HTML element + extended source element to allow for content negociation … we could reuse constructs semantics , but would need to define processing model Benjamin Young: this is the crux of the issue (processing model HTML vs. Web Pub manifest Ivan Herman: -> Picture element Wendy Reid: 308 need more thinking 5.3. Mixed media in audiobook linear reading order #322 Wendy Reid: Wendy Reid: issue 322 mixed media … audiobook readers don’t support supplemental content (sc) Laurent Le Meur: WP can help supporting sc Wendy Reid: the topic is important for the WG as a whole … publisher will probably mix content in WP even if this is not stated good practice. … an ad could be insterd in the middle of an audiobook Hadrien Gardeur: my concern is that we won’t be able to easily identifiy such supplemental content … the UA will discover it when it tries to fetch it. Brady Duga: maybe not too bad. Some annoying cases will arise. And there is no processing model defined. … A use case may be show a picture of a character + play the corresponding audio … but without processing model, we don’t know what to do. Juan: why don’t specify a duration with an image? George Kerscher: we could put the image in the ToC. … but it’s going in the sync media model Ivan Herman: I don’t understand. Each item in the reading order has a media-type. … the media-type may be wrong but specification wise, this is a fact. Hadrien Gardeur: therefore for an audiobook it”s a requirement to add a media-type. I’m ok. Marisa DeMeglio: this sounds like a case for sync-media. Pure audiobook and sync-media should have proper overlap so that audiobooks can get such bells and whistles. Garth Conboy: the generic case is a business book with tables, and a pdf. George Kerscher: we could do it with a ToC. Wendy Reid: it conrresponds to a use case in which the ToC has images. Ivan Herman: in fact in the current spec there is no default, I was wrong. Maybe we should say that a resource should be an html (by default), if no media type is given. In an audiobook each item would therefore require a media-type. Hadrien Gardeur: the problem is only when there is mixed content. It would be reasonable that if a WP is typed “audiobook”, it should contain only audio files. Proposed resolution: if a string appears in readingOrder/resources/links, the canonical manifest should include a Publication link for that URL signaled as text/html (Ivan Herman) Wendy Reid: or if all resources are audio files the UA sees it as an audiobook and treat it differently than a generic ebook. Avneesh Singh: Audio book may be a profile, which allows to say that it is recommended to have audio content in default reading order Proposed resolution: if a string, or a PublicaitonLink without encoding format, appears in readingOrder/resources/links, the canonical manifest should include a Publication link for that URL signaled as text/html (Ivan Herman) Brady Duga: you say that by default, even for an “audiobook”, the content is html. This would make a stupid format. Ivan Herman: how to be sure the content is an audio file only from its media type? Daniel Weck: we’re deviating from the web, where the media-type triggers behaviour in the UA Ivan Herman: previous proposal resjected ;-) George Kerscher: does epubcheck goes through an confirms the media type of content? Ivan Herman: if there is no explicit media type there is no checking. Daniel Weck: the same remarks we made about mixing content applies to comics also. Benjamin Young: this discussion is not great for web browsers Benjamin Young: to DanielWeck’s point: {"@context": "", "@id": "", "@type": "AudioBook"}is correct (but rather insane) JSON-LD Daniel Weck: where to I get the information of book vs audiobook? the audiobook type in the manifest just states the schema.org schema will validate some metadata. Laurent Le Meur: the meaning of “audiobook” should be stronger than that and indicate also that it contains audio Daniel Weck: for sync-media we use “audiobook” with html content. … I’ll open an issue. Hadrien Gardeur: hint should not be trusted. You should prepare for fallback when something goes wrong. 5.4. relationship to minimal viable wpub Ivan Herman: general question: we discussed about a minimum viable WP. Today we described a minimal viable audiobook. does it mean that we have a different minimal ebook vs audiobook reader? Wendy Reid: the minimum features are the same. Ivan Herman: the MVbook there is no notion that I know where I am. Hadrien Gardeur: that was more about non WP-aware UA. Garth Conboy: we have 2 or 3 must fo WP UA, seems they apply on audiobooks. Daniel Weck: filed new issue: 5.5. next steps Wendy Reid: next steps = draft sections that we do have, we have a working example. … I want to talk to the industry, talk to the audiobook publishers. Hadrien Gardeur: publishers will rather create the packaged version of audiobooks. Wendy Reid: which package system, which metadata, these are the questions. … they might have requirements that we didn’t see until now. … after 5 months, we’ve gone far and it’s cool. Ivan Herman: who will do the fist editing? related to duration etc. Hadrien Gardeur: if the package format is for audiobooks, we may choose a specific extension and medi-type. Garth Conboy: I think we should not use the token “epub4” at least for the moment. Leonard Rosenthol: why not .pwp? Ivan Herman: then we would have different flavor for comics etc. Is it good? George Kerscher: if we go to audiobook people without talking about packaging, they won’t have a clue. 6. Resolutions - Resolution #1: Close issue #307 (duration) after discussion with schema, we will use NPT (Media Fragments) until they confirm or inform us otherwise research needs to be done
https://www.w3.org/publishing/groups/publ-wg/Meetings/Minutes/2018/2018-10-23-pwg
CC-MAIN-2019-39
refinedweb
11,264
51.45
Hi, I have got a utility "sock" which is C executable (under linux) on my machine. It acts like a server or client based on the arguments passed at the command line. I want to run it through a python script. I am using the subprocess call function to execute the C executable. I am making the call as follows: import subprocess as sp sp.call("python "+str, shell = True) [icode] where str = "/root/sock_dir/sock-0.3.2/src/sock" But the python script is not compiling and it is giving the following error: str = /root/sock_dir/sock-0.3.2/src/sock -u -s 5555 File "/root/sock_dir/sock-0.3.2/src/sock", line 1 SyntaxError: Non-ASCII character '\xb1' in file /root/sock_dir/sock-0.3.2/src/sock on line 2, but no encoding declared; see details here Could any one please tell me how to run this C utility in Python? Regards, Prashanth
https://www.daniweb.com/programming/software-development/threads/291776/unable-to-run-c-utility-from-python-script
CC-MAIN-2020-24
refinedweb
159
66.94
On 08/07/2012 09:47 AM, Daniel P. Berrange wrote: > On Fri, Aug 03, 2012 at 02:36:02PM +0800, Hu Tao wrote: >> This series is a merge of >> >> 1) "Support hypervisor-threads-pin in vcpupin" >> () >> 2) "support to set cpu bandwidth for hypervisor threads" >> () >> >> to make life easier because of the two share some patches. > > This series is really focusing on pinning threads associated > with the <emulator> element, rather than the hypervisor. The > hypervisor is a separate entity that is shared. > > So I'm thinking that this entire patch series could replace > 'hypervisor' with 'emulator' everywhere. Any one has agree > or disagree ? I definitely agree - when I hear 'hypervisor', I think 'qemu:///system', which is the technology used to run multiple guests, but when I hear 'emulator', I think of a subset of a domain, namely the specific qemu pid_t running a given guest. Also, we're not pinning all of the hypervisor's threads, but just the threads that are associated with emulation but not a specific vcpu. That is, marking up your comment in 1/17: cgroup mount point +--libvirt <= setting up a namespace (*) +--qemu <= hypervisor level +--domain name <= domain level +--vcpu0 <= vcpu level ... +--vcpuN +--"hypervisor" <= emulator so a domain really is made up of an 'emulator' and 'vcpu' threads, and a 'hypervisor' contains domains, rather than making up a portion of a domain. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library Attachment: signature.asc Description: OpenPGP digital signature
https://www.redhat.com/archives/libvir-list/2012-August/msg00449.html
CC-MAIN-2015-40
refinedweb
247
51.89
Knative Serving is a scale-to-zero and request-driven compute runtime environment built on Kubernetes and Istio to support the deployment and serving of serverless applications and functions. Knative Serving aims to provide Kubernetes extensions for deploying and running serverless workloads. This post describes how to quickly build Knative Serving and implement automatic scaling with Alibaba Cloud Container Service for Kubernetes. Alibaba Cloud Container Service for Kubernetes version 1.11.5 is now available. You can use the console to quickly and easily create a Kubernetes cluster. To learn more, see Create a Kubernetes cluster. Knative Serving runs on Istio. Currently, Alibaba Cloud Container Service for Kubernetes allows you to quickly install and configure Istio in just one click. If you're unsure how to do this, see Deploy Istio. Log on to the Container Service - Kubernetes console. In the left-side navigation pane, choose Cluster, then Cluster again to go to the Clusters page. Then, you'll want to select a cluster and choose More, then Deploy Istio in the Actions column. You'll need to set the parameters that appear on the Deploy Istio page, and then click Deploy Istio once you're done. After several seconds to a minute or so, the Istio environment will be deployed. You can confirm that it is indeed deployed by checking the pod status in the console. You'll see a screen similar to the one below. For this step, log on to the Container Service - Kubernetes console. In the left-side navigation pane, choose Marketplace and then App Catalog. On the page that appears, find and click ack-istio-ingressgateway. It's the one in a red square below. Click the Parameters tab. The default configuration of Istio Ingress Gateway is provided. Modify these parameters based on your specific requirements, and then click Create. View the pod list in the istio-system namespace to check the running status. It should look something like what you see below. Log on to the Container Service - Kubernetes console. In the left-side navigation pane, choose Marketplace and then choose App Catalog. On the page that appears, find and click ack-knative-init. Click Create to install the content required for Knative initialization, including Custom Resource Definitions (CRDs). Log on to the Container Service - Kubernetes console. In the left-side navigation pane, choose Marketplace and then App Catalog. On the page that appears, find and click ack-knative-serving. Next, click the Parameters tab. Default configuration of Istio Ingress Gateway is provided. Modify these parameters on demand, and then click Create. Now, the four Helm charts required for installing Knative Serving have been installed. This should be confirmed on the console. For this first step, run the following command to deploy Knative Service for a sample autoscale app: kubectl create -f autoscale.yaml The content of the autoscale.yaml file is as follows: apiVersion: serving.knative.dev/v1alpha1 kind: Service metadata: name: autoscale-go namespace: default spec: runLatest: configuration: revisionTemplate: metadata: annotations: # Target 10 in-flight-requests per pod. autoscaling.knative.dev/target: "10" autoscaling.knative.dev/class: kpa.autoscaling.knative.dev spec: container: image: registry.cn-beijing.aliyuncs.com/wangxining/autoscale-go:0.1 For this step, locate the entry host name and IP address and export them as environment variables. export IP_ADDRESS=`kubectl get svc istio-ingressgateway --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"` Send a request to the autoscale app and check the resource consumption. curl --header "Host: autoscale-go.default.{domain.name}" "{IP_ADDRESS?}?sleep=100&prime=10000&bloat=5" Note: You'll want to replace {domain.name} with your domain name suffix. In the default example, the suffix is aliyun.com. curl --header "Host: autoscale-go.default.aliyun.com" "{IP_ADDRESS?}?sleep=100&prime=10000&bloat=5" Allocated 5 Mb of memory. The largest prime less than 10000 is 9973. Slept for 100.16 milliseconds. Run the following command to install the load generator: go get -u github.com/rakyll/hey Maintain 50 concurrent requests and send traffic for 30 seconds. hey -z 30s -c 50 \ -host "autoscale-go.default.aliyun.com" \ "{IP_ADDRESS?}?sleep=100&prime=10000&bloat=5" \ && kubectl get pods Within the 30 seconds, you can see that the Knative Service automatically scales up as the number of requests increases. Summary: Total: 30.1126 secs Slowest: 2.8528 secs Fastest: 0.1066 secs Average: 0.1216 secs Requests/sec: 410.3270 Total data: 1235134 bytes Size/request: 99 bytes Response time histogram: 0.107 [1] | 0.381 [12305] |° 0.656 [0] | 0.930 [0] | 1.205 [0] | 1.480 [0] | 1.754 [0] | 2.029 [0] | 2.304 [0] | 2.578 [27] | 2.853 [23] | Latency distribution: 10% in 0.1089 secs 25% in 0.1096 secs 50% in 0.1107 secs 75% in 0.1122 secs 90% in 0.1148 secs 95% in 0.1178 secs 99% in 0.1318 secs Details (average, fastest, slowest): DNS+dialup: 0.0001 secs, 0.1066 secs, 2.8528 secs DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0000 secs req write: 0.0000 secs, 0.0000 secs, 0.0023 secs resp wait: 0.1214 secs, 0.1065 secs, 2.8356 secs resp read: 0.0001 secs, 0.0000 secs, 0.0012 secs Status code distribution: [200] 12356 responses NAME READY STATUS RESTARTS AGE autoscale-go-00001-deployment-5fb497488b-2r76v 2/2 Running 0 29s autoscale-go-00001-deployment-5fb497488b-6bshv 2/2 Running 0 2m autoscale-go-00001-deployment-5fb497488b-fb2vb 2/2 Running 0 29s autoscale-go-00001-deployment-5fb497488b-kbmmk 2/2 Running 0 29s autoscale-go-00001-deployment-5fb497488b-l4j9q 1/2 Terminating 0 4m autoscale-go-00001-deployment-5fb497488b-xfv8v 2/2 Running 0 29s As shown in this post, you can quickly build Knative Serving and implement automatic scaling based on Alibaba Cloud's Container Service for Kubernetes. We invite you to use Alibaba Cloud Container Service to quickly build Knative Serving and easily integrate it into your project development. Traffic Management with Istio (5): Deploy Custom Gateway and Manage Its Certificates with cert-manager What Is Alibaba Cloud Service Mesh (ASM)? 32 posts | 8 followersFollow Alibaba Container Service - June 16, 2020 Alibaba Container Service - July 22, 2021 Alibaba Developer - September 7, 2020 Alibaba Container Service - February 7, 2020 Alibaba Container Service - January 27, 2022 Alibaba Developer - March 3, 2020 32 posts | 8 followersFollow Accelerate software development and delivery by integrating DevOps with the cloudLearn More A secure image hosting platform providing containerized image lifecycle managementLearn More
https://www.alibabacloud.com/blog/experience-knative-on-alibaba-cloud_596005
CC-MAIN-2022-33
refinedweb
1,085
53.88
Hi matplotlib basemap users, I am doing a lot of plots of the same area but for different vertical levels, time steps and parameters. I am therefore trying to reuse my basemap instance (which in some cases is quite time consuming to setup). I am doing this by making a deepcopy of a basemap instance created by this simple function (where mapresolution is a function giving the different map resolutions for different areas): def getbasemap(area): """Returns basemap instance for a given area.""" from matplotlib.toolkits import basemap mapres = mapresolution(area) m = basemap.Basemap(area[0], area[1], area[2], area[3], resolution=mapres) return m The deepcopy operation takes almost as much time as creating a new basemap instance. If the basemap instance was unchanged by my plotting I would of course be able to avoid doing this and simply use a basemap instance without copying it. Am I right in asserting that this is not the case? Any suggestions on how to avoid deepcopying it? Cheers, Jesper
https://discourse.matplotlib.org/t/reusing-basemap-instance/7228
CC-MAIN-2022-21
refinedweb
169
59.74
0 Hey guys, i'm a bit of a new programmer taking a class.So in my code what im trying to do is to select three random numbers, and see if it matches with the numbers that the lottery throws out. The problem is where the 1st number and 3rd number selected randomly show up fine, but i have no idea on how to get the 2nd number to show up. I know my error is right here at lotteryDigit2 int lotteryDigit1 = lottery / 100; int lotteryDigit2 = lottery * 1; int lotteryDigit3 = lottery % 10; int guessDigit1 = guess / 100; int guessDigit2 = guess * 1; int guessDigit3 = guess % 10; What equation do i do to get the 2nd number correct? Any help would be apprieciated. (I also read something about arrays, but he haven't learned those in our class yet) Here is my complete code import java.util.Scanner; public class LotteryFixed { public static void main(String[] args) { int lottery = (int)(Math.random() * 1000); Scanner input = new Scanner(System.in); System.out.print("Enter your lottery pick (three digits): "); int guess = input.nextInt(); int lotteryDigit1 = lottery / 100; int lotteryDigit2 = lottery * 1; int lotteryDigit3 = lottery % 10; int guessDigit1 = guess / 100; int guessDigit2 = guess * 1; int guessDigit3 = guess % 10; System.out.println("The lottery number is " + lottery); if (guess == lottery) System.out.println("Exact match: you win 10,000"); else if (guessDigit2 == lotteryDigit1 && guessDigit2 == lotteryDigit3 && guessDigit1 == lotteryDigit2 && guessDigit1 == lotteryDigit3 && guessDigit3 == lotteryDigit2 && guessDigit3 == lotteryDigit"); } } Edited by IchibanXD: grammar again
https://www.daniweb.com/programming/software-development/threads/480446/help-with-my-simple-lottery-program
CC-MAIN-2017-26
refinedweb
243
52.7
java multithreading - Java Beginners { Multithreading th; Consumer(Multithreading th) { this.th = th; new Thread...java multithreading can i please get the program code for "producer... the following code: class Multithreading { int val; boolean value = false Multithreading in Java Multithreading in Java  ... thread. Lets us know about the concept of multithreading and learn... of another thread. Advantages of multithreading over multitasking :   Java Multithreading  ... at the same time. In case of Multithreading, if more than one thread... object. Read more at: http:/ Describe synchronization in respect to multithreading. Describe synchronization in respect to multithreading. Hi, Describe synchronization in respect to multithreading. thanks, Are you eager the search related to Java programming query. Let us check Multithreading Java Tutorial for Beginners Multithreading in Java means two or more parts of program run simultaneously. Every single part is called thread. Running them simultaneously saves time. Different threads run in simultaneous mode. Multithreading Java tutorials wap for multithreading { Multithreading th; Producer(Multithreading th) { this.th = th; new Thread...(Multithreading th) { this.th = th; new Thread(this, "Consumer").start(); } public void...wap for multithreading wap for multithreading Hi Friend How do servlets work? Instantiation, session variables and multithreading How do servlets work? Instantiation, session variables and multithreading How do servlets work? Instantiation, session variables and multithreading - Java Interview Questions Java Wat is use of multithreading concept in java Hi Friend, Please visit the following links: Java Thread and Runnable Java Thread and Runnable What's the difference between Thread and Runnable types Java thread state Java thread state what is Static binding how to destroy java thread how to destroy java thread how to destroy java thread? This will help .. Shutting Down the Java Thread Create Thread by Extending Thread Create Thread by Extending Thread This section explain how to create thread by extending Thread class in java. Extending Thread : You can create thread by extending Thread class and then by creating instance of that class you can JAVA THREAD - Java Beginners JAVA THREAD hii i wrote a pgm to print the numbers from 0 to 9 in 2...); } public void fgh(int i,int p) { int sum; new Thread(public void run... Thread { private static int sums; public static int getSums Thread scheduling Thread scheduling What is the algorithm used in Thread scheduling? Java uses fixed-priority scheduling algorithms to decide which thread... is started, Java makes the lower priority thread wait if more than one thread exists Threading in Java is very important in Java Programing language. A thread is a sequential path... Priorities and Scheduler In Java, thread scheduler can use the thread... threads are executing Thread Synchronization in Java When two Daemon thread - Java Beginners information, visit the following link: thread Hi, What is a daemon thread? Please provide me... thread which run in background. like garbadge collection thread. Thanks  Demon thread Demon thread What is demon thread? why we need Demon thread?  ... there are daemon thread by killing them abruptly.Any thread can be a daemon thread. For more information, visit the following link: java thread - Java Beginners Java Thread What is thread in Java? and how can i write a Java thread program?Thanks in advance!! Hi friend,import javax.swing.*;import...(a); } private JPanel canvas;}class Ball extends Thread { public Ball(JPanel Java Thread Java Thread A java... sequential flow of control within a program. Programmer may use java thread mechanism...:/ java thread - Java Beginners java thread PROJECT WORK: Create a application using thread to implement the application. The application should consist of the following classes... . AccountManager.java The AccountManager class demonstrates creation of Thread objects using Extending thread - Java Beginners visit to : Thanks...Extending thread what is a thread & give me the programm of exeucte the thread Hi friend, Thread : A thread is a lightweight Java Sleep Thread Java Thread sleep() is a static method. It sleeps the thread for the given time in milliseconds. It is used to delay the thread. It is used in Applet or GUI programming for animation Java Sleep Thread Example public class setPriority Example Java :Thread setPriority Example In this tutorial you will learn how to set thread priority in java thread. Thread set thread runtime process thread runtime process Java thread runtime process Java Thread Context Thread Context The Thread Context is required by the current thread from the group of threads to execute. In java this is achieved through the ThreadContext class Thread : toString() method Java Thread : toString() method In this section we are going to describe toString() method with example in java thread. toString() method : If you want to display string representation of thread you can use thread.toString Java multi-threading Java multi-threading How does multithreading take place on a computer with a single CPU a java program through the link may, this will be helpful for you Thanks...a java program Write a java program that accepts positive numbers Java Thread : isAlive() method Java Thread : isAlive() method In this tutorial you will learn how to use isAlive() method in java thread. isAlive() method : When you are running many threads ,java take long periods switching between threads , may be one Thread Priorities Thread Priorities In Java, thread scheduler can use the thread priorities... a Java thread is created, it inherits its priority from the thread Java :Thread Methods Java :Thread Methods This section explains methods of Thread class. Thread Methods : Thread class provides many method to handle different thread... number of active threads in your current thread group. in java Overview of Threads Threading in Java Thread Creation...A thread is a lightweight process which exist within a program and executed... with a single process. Thus a process that has only one thread is referred Thread - Java Beginners Thread Priorities Thread Priorities In Java, thread scheduler can use the thread...; When a Java thread is created, it inherits its priority from the thread
http://www.roseindia.net/tutorialhelp/comment/80637
CC-MAIN-2014-42
refinedweb
976
57.98
2 replies on 1 page. Most recent reply: Sep 17, 2007 8:57 PM by Eric Armstrong I recently had occasion to write a JRuby script that used Java APIs in the XDocs CMS. I found most of the information I needed scattered around the web (the URLs are listed in the Resources section at the end). I decided to collect the relevant stuff in one place, leaving out the stuff that seemed extraneous, and adding the additional little bits that turned out to be necessary. This post contains the results. (But things may well change, so let me know if there are errors or it needs to be brought up to date!) Note: The original of this article (along with any updates) is here: First, of course, it's necessary to bring in the module that provides the bridge to the JVM: include Java Some things to note: include 'java' require 'java' include include_class require The program then needed to require every jar file that the program eventually used, even if it wasn't directly referenced in the JRuby script. Many of the jar files I wound up requiring were implicit. Given a code sample like this: x = someMethod().someOtherMethod.aThirdMethod() then every intermediate class had to be required into the code. (Since I was converting a Groovy script, I often didn't know what those classes were.) But even when those objects accessed classes internally, those classes had to be required into the program so the JVM knew where to find them. So I kept running the program, getting a missing class error, looking for it in the 30 or 40 jar files that make up the CMS, and then adding a new require statement when I found it. I eventually wrote a script to search the jars. But it was an interesting lesson. The API documents tell me what package a class is in, but it would be delightful if there were a cross-reference to the JAR it's contained in.) As a side-note, wildcards in the CLASSPATH setting would be cool. But the requirestatements, at least, should allow for wildcards. Something like that would have saved me a lot of trouble: CLASSPATH require "some/path*.jar" A lot of the time, requiring the jar files is pretty much all you need to do. JRuby can generally figure out what the type is by inspection (the return value from a method, say), so you don't have to explicitly include those classes. But there are times when you do need to specify the class name in the code (for example, to access a static method). In those cases, you need to add an include_class statement to your code. When including classes, and when referencing classes in the code, package names that start with java, javax, org, and com are "magic". You can use those package prefixes as you would any other variable. Other packages referenced in the code need to be prefixed with Java::() So far, so good. But somehow I couldn't find quite enough information on the web to access 3rd party classes. After examining the writeups listed in the Resources and doing a lot of experimenting, I was able to make things work by doing the following: 1. Tell JRuby where to find the JAR files. Options: $RUBY_HOME/lib JRUBY_EXTRA_CLASSPATH -I<directory> AND 2. Require each jar by name, specifying the full path if the directory it's in hasn't been specified on the command line, as in Step #1. To my surprise, the CLASSPATH setting in the environment wasn't picked up when the JRuby script was running on Solaris. So this worked: require "/some/path/MyStuff.jar" But not this: require "MyStuff.jar" Without the -I entries on the command line, the latter fails with "no such file to load". -I 3. Do an include_class on each class that needs to be named in the code, using a fully qualified package name. Specify the Java:: prefix if the package name doesn't start with one of the "magic" packages. So if a static method returns a Foo object, the code will look like this: Foo include_class Java::some.package.MyClass ... x = MyClass.staticGetMethod() Note that Foo does not need an include_class statement, since it is not explicitly named in the code.) As per the Nabble page (), include interfaces into the class as though they were modules: class SomeClass include java.lang.Runnable include java.lang.Comparable def run ... end ... Or group them together into a single module and include that: module RunCompare include java.lang.Runnable include java.lang.Comparable end class SomeClass include RunCompare def run ... end ... Headius: Sun: Nabble: Rob Di Marco's post at Innovation on the Run:
http://www.artima.com/forums/flat.jsp?forum=106&thread=214719
CC-MAIN-2013-48
refinedweb
792
71.75
24113/account-account-variable-argument-cloudwatch-actions-python I am using python boto3 to create a CloudWatch alarm for a sub account (not a root account). I have stored the account id of that sub account in a variable called accnum . I need to stop an ec2 instance in that sub account once it exceeds a CPU % of 10. Going by the boto3 docs, we need to pass the arn value in the AlarmActions to start/stop/terminate an EC2 instance. For root account, it is like this: AlarmActions=[ 'arn:aws:swf:us-east-2:{CUSTOMER_ACCOUNT}:action/actions/AWS_EC2.InstanceId.Stop/1.0' ], How can I do the same for a sub account. I tried passing the accnum variable in the AlarmActions but it throws a syntax error. I tried like this : AlarmActions=[ 'arn:aws:swf:us-east-2:',accnum,':action/actions/AWS_EC2.InstanceId.Stop/1.0' ], But a syntax error is thrown like this : botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the PutMetricAlarm operation: Invalid arn syntax: arn:aws:swf:us-east-2: How can I pass the accnum as a variable ? Or is there any other way to pass Alarm Actions to stop an ec2 instance ? Or is there an equivalent for sub account like {CUSTOMER_ACCOUNT} is for root account ?:" + str(acccnum) + ":action/actions/AWS_EC2.InstanceId.Stop/1.0") arn:aws:swf:us-east-2:12312312312312:action/actions/AWS_EC2.InstanceId.Stop/1.0 You can try these steps to put ...READ MORE You can use method of creating object ...READ MORE You can delete the folder by using ...READ MORE There is a particular format that works ...READ MORE Using AWS Cli Configure your IAM user then ...READ MORE Instead of backslashes, use forward slashes C:\Users\jino>aws s3 ...READ MORE You need to mention the path completely. ...READ MORE This is not the correct form of ...READ MORE import boto3 ec2 = boto3.resource('ec2') instance = ec2.create_instances( ...READ MORE delete_login_profile is the one you should use if ...READ MORE OR At least 1 upper-case and 1 lower-case letter Minimum 8 characters and Maximum 50 characters Already have an account? Sign in.
https://www.edureka.co/community/24113/account-account-variable-argument-cloudwatch-actions-python?show=24114
CC-MAIN-2022-40
refinedweb
359
50.84
Relevant information: -Language: Python 3.2.3 -Simpson's rule: -Error: Here is my code, where limits is a list of two floats with the limits of integration, dx is the step(b-a)/n as a float, intervals is the number of subinvtervals used in simpsons rule, and func is the parsed equation def simpsonsApprox(dx, limits, intervals, func): x = limits[0] summation = float(eval(func)) for i in range(1,intervals,2): x = limits[0] + (dx*i) summation += 4*float(eval(func)) for i in range(2,intervals-1,2): x = limits[0] + (dx*i) summation += 2*float(eval(func)) x = limits[1] summation += float(eval(func)) summation = dx * summation / 3 return summation My concern is as follows: According to the error formula above for the equation 'sqrt(1-x^2)-x' to reach precision of 14 digits(E_s = 10^-14) you must use around 737 subintervals. The integral of sqrt(1-x^2)-x from 0 to 1/sqrt(2) is exactly pi/8. In my tests using ~737 intervals I can only get 12 digits of pi/8 when according to my calculations I should be getting 14. I did research and found that a python float is the same as a C double, with precision of 53 bits which should be around 16 digits. I'm not trying to get 16 digits or beyond so I'm confused as to why I'm not getting my anticipated results. I found that using more subintervals, something around 1400, I could get 14 digits. But, this does not follow the formula above. The questions I pose: Is the rounding error at the calculation of each subinterval the reason for this result? Is this due to a logical flaw in my code?(Although it seems to work fine) Could the use of the eval() function be at fault? I was told that a float should work fine for this, and I wouldn't need to use anything more precise e.g. Decimal Any input on this matter would be greatly appreciated, I hope that I explained the problem well enough that it's not necessary to understand the whole calculus part. Regards, NEM
http://www.dreamincode.net/forums/topic/295569-numeric-integrationsimpsons-rule/
CC-MAIN-2017-47
refinedweb
365
55.37
IRC log of grddl-wg on 2007-03-28 Timestamps are in UTC. 15:06:59 [RRSAgent] RRSAgent has joined #grddl-wg 15:06:59 [RRSAgent] logging to 15:07:13 [HarryH] Jeremy, harry, and john-l have made it to the phone. 15:07:39 [HarryH] Now chime has made it to the phone. 15:07:50 [HarryH] I recommend people try again. 15:09:32 [jjc-scribe] roll call: jeremy, chime, dan, john-l, harry 15:09:36 [HarryH] Meeting: GRDDL Working Group 15:09:41 [HarryH] Chair: Harry Halpin 15:09:46 [HarryH] Agenda: 15:09:52 [HarryH] Scribe: jjc 15:10:03 [HarryH] Anyone want to be on the phone who can't make it? 15:10:05 [HarryH] Brian? 15:10:08 [briansuda] i am here 15:10:17 [jjc-scribe] brian on the phone 15:10:28 [HarryH] Zakim, next item 15:10:28 [Zakim] agendum 1. "Convene GRDDL WG meeting of 2007-03-21T11:00-0400" taken up 15:10:38 [DanC] except that today's the 28th 15:10:58 [HarryH] Hmmm...maybe that wasn't checked into CVS. 15:11:00 [HarryH] PROPOSED: to approve GRDDL WG Weekly -- 21 March 2007 as a true record 15:11:08 [HarryH] 15:11:29 [HarryH] 15:12:58 [HarryH] At least BrianS, jjc, HarryH, DanC, simone, rreck and Chime were there. 15:13:37 [HarryH] ACTION: jjc to correct the minutes from 21 March 2007 to get full list of attendees. 15:14:23 [HarryH] RESOLVED: to approve pending jjc's corrections to attendee list. 15:14:41 [HarryH] # 15:14:41 [HarryH] * PROPOSED: to meet again Wed, 4 April 11:00-0500. scribe volunteer? 15:14:41 [HarryH] # Patent Policy 15:14:54 [HarryH] PROPOSED: to meet again Wed, 4 April 11:00-0500. scribe volunteer? 15:15:05 [HarryH] John-l will scribe. 15:15:11 [HarryH] Zakim, next item 15:15:11 [Zakim] agendum 2. "Patent Policy" taken up 15:16:00 [HarryH] Samsung and Citigroup hadn't filled out the web-form. 15:17:53 [HarryH] ACTION: To communicate to Ian and Steve to figure out if Citigroup and Samsung not being in good standing. 15:18:23 [HarryH] agendum 3. "W3C Fellows Program" 15:20:54 [HarryH] We may have more resources thanks to W3C Fellows Program. 15:21:11 [HarryH] agendum 4. GRDDL Spec: Last Call 15:21:37 [DanC] WITHDRAWN: ACTION: Ian to clarify profileTransformation for JJC 15:22:02 [HarryH] 15:22:08 [DanC] -> Web architecture best practices, media-types, and #issue-output-formats 15:23:25 [iand] iand has joined #grddl-wg 15:25:11 [jjc-scribe] q+ to offer my suggestion 15:26:53 [jjc-scribe] 15:27:09 [jjc-scribe] > [[ 15:27:09 [jjc-scribe] > The transformation property relates the XPath document nodes 15:27:09 [jjc-scribe] > to an RDF graph. These need not use RDF/XML as an intermediate 15:27:09 [jjc-scribe] > stage. To give an XSLT example, see testlist1#atomttl1, in which 15:27:09 [jjc-scribe] > the attribute-value media-type="text/rdf+n3" on the xsl:output 15:27:10 [jjc-scribe] > element indicates a different media type, from the default 15:27:12 [jjc-scribe] > value, within GRDDL, of "application/rdf+xml". GRDDL agents 15:27:14 [jjc-scribe] > that can process such a media type, can then produce an RDF graph 15:27:16 [jjc-scribe] > in accordance with the media type. Non-XSLT transforms may 15:27:18 [jjc-scribe] > indicate the RDF graph in some other, unspecified, fashion. 15:27:20 [jjc-scribe] > ]] 15:27:22 [jjc-scribe] > 15:28:36 [HarryH] ACTION: DanC to look at:. 15:28:50 [HarryH] Chime believes jjc's text addresses as his concerns. 15:29:22 [jjc-scribe] 15:29:40 [DanC] 1.239 has a raw paste of the text in 0079, with a @@todo 15:29:45 [jjc-scribe] 15:31:03 [HarryH] Jeremy's previous non-normative suggestions on GRDDL Spec re validation and caching 15:31:18 [HarryH] 15:33:56 [HarryH] I could see some informative text suggesting that you really try to minimize access to DTDs, namespace docs, etc. 15:34:39 [jjc-scribe] q+ to say html dtd needed 15:36:00 [HarryH] ack jjc-scribe 15:36:48 [HarryH] DanC: Stick the namespace in your document explicitly and not rely on DTD 15:36:56 [HarryH] Chime: Does this address entity reference concern? 15:36:59 [DanC] I'm OK to to take an action around "stick the namespace in your document ; don't rely on getting it from the DTD" 15:37:07 [HarryH] jjc: Something will go wrong if you don't have DTD in there. 15:37:13 [HarryH] DanC: This would show up at GRDDL level. 15:37:42 [jjc-scribe] jjc: entity in html gets transformed into rdf content 15:38:59 [HarryH] Zakim, who's on the phone? 15:39:07 [HarryH] I don't understand "who's on the phone" 15:40:53 [HarryH] ACTION: jjc to take action to draft text to "don't write transforms that depend on whether or not its validated" 15:41:18 [HarryH] Validation is not explicitly required by GRDDL. 15:42:27 [HarryH] My suggestion is that we add an explicit sentence in Faithful Infoset saying that "Validation is not explicitly required by GRDDL." 15:42:34 [jjc-scribe] text at end of section 6 in spec 15:42:42 [jjc-scribe] 15:42:53 [chimezie] I think commentary on entity issues should be placed after the faithful infoset section 15:43:32 [jjc-scribe] ACTION: jjc to draft test cases on validation 15:44:33 [HarryH] ACTION: Chime send out "We're still thinking about your comments, Stefano" 15:46:19 [HarryH] 15:46:33 [HarryH] 15:46:46 [HarryH] jjc: I've added Jena tests to the pending list. 15:46:54 [DanC] "are you satisfied?" msg to ERH: 15:47:03 [jjc-scribe] 15:47:46 [HarryH] ACTION: jjc to update Elliotte with the fact that the tests that address his concerns are in pending. 15:47:54 [HarryH] 15:48:24 [HarryH] Tony did say: "Best close it out here. :) 15:48:24 [HarryH] " 15:49:22 [HarryH] Chime: thinks the informative rules help here. 15:50:08 [chimezie] ?RDFXML gspec:rdfParse ?G. 15:50:10 [chimezie] in particular 15:52:21 [DanC] "If an information resource IR is represented by a conforming RDF/XML document[RDFX], then the RDF graph represented by that document is a GRDDL result of IR." 15:55:32 [chimezie] " * Whenever the RDF/XML spec says that an RDF/XML document with root node ROOT represents a graph G, we have ?ROOT gspec:rdfParse ?G. 15:55:33 [chimezie] Some from XPath and XSLT:" 15:58:48 [jjc-scribe] 15:58:50 [HarryH] ACTION: DanC to respond to Tony Hammond 15:59:06 [HarryH] ACTION: Chime to make a visual representation of RDF graph and RDF/XML difference, HarryH to check in when done. 15:59:12 [HarryH] ACTION: Chime to make a visual representation of RDF graph and RDF/XML difference, HarryH to check in when done for Primer 15:59:14 [jjc-scribe] jeremy says that the above picture in primer seems to suffer the problem 15:59:33 [DanC] (the diagrams in the primer were made with MS ppt, I believe. I wonder if chime's diagram will look funky by comparison) 16:03:36 [jjc-scribe] discussion of oracle and product shipping 16:03:50 [HarryH] ACTION: Ask Susie about GRDDL and Oracle deployment plans, and possible comments on spec if they actually read spec.. 16:07:28 [DanC] 1.240 <p class="ed">@@<a href=" ">27 March from jjc</a></p> 16:08:25 [jjc-scribe] 16:08:41 [DanC] (if I haven't ack'd a comment by updating in some way, please assume I forgot your comment and send it again next week) 16:13:14 [chimezie] The test case should call out to the spec about the right of the agent to follow a policy that doesn't allow GRDDL mechanism loops 16:13:25 [DanC] right 16:13:50 [HarryH] ACTION: jjc to modify #loopx to relate to discussion about SHOULD. 16:14:08 [HarryH] Zakim, magically go to Test Cases as Rec agendum. 16:14:09 [Zakim] Zakim has joined #grddl-wg 16:14:20 [DanC] Zakim, this is grddl 16:14:20 [Zakim] sorry, DanC, I do not see a conference named 'grddl' in progress or scheduled at this time 16:14:21 [chimezie] where is harry's wand? 16:14:21 [HarryH] agendum 7. Test Cases as Rec? 16:14:34 [DanC] (Zakim has not regained all of his marbles) 16:14:49 [HarryH] Should we Rec Test-Cases or not? 16:15:28 [HarryH] Agendum 9. Test-Cases 16:15:33 [HarryH] ACTION: Chime to fix the relative URL problem 16:16:10 [HarryH] Chime: A test-documet with internal anchors that are full URIs to test items. 16:16:13 [DanC] (I was trying to figure out who has the ball on test cases publication. Harry, I recommend you track the critical path much more clearly, at least in weekly agendas) 16:16:16 [jjc-scribe] chime - test doc has anchor to sections 16:16:26 [jjc-scribe] has links to test material to test directory 16:16:43 [chimezie] 1) A test document 16:16:50 [jjc-scribe] also has URIs for test instances that will be in GRDDL results 16:16:53 [HarryH] (I thought it was pretty clear and the working draft had been published.) 16:16:54 [chimezie] with it's own uri and fragments to test section 16:17:20 [chimezie] 16:17:48 [chimezie] 16:18:03 [chimezie] 16:18:06 [DanC] (eek. I advise against minting ; if it's been minted, I advise against further investment in it) 16:18:20 [DanC] (eek. I advise against too) 16:18:20 [chimezie] 16:18:50 [DanC] just keep 16:20:23 [chimezie] so the test material should always be the uri in the test 'repository' - grddl-wg/td/... 16:24:21 [jjc-scribe] Danc suggests dropping fragments in munging of testlist1 into TR space 16:24:53 [jjc-scribe] in order to avoid having multiple uris for same resource 16:28:42 [HarryH] Chime: I feel like we have consensus on test material. 16:28:43 [jjc-scribe] 16:29:01 [HarryH] Chime: Feels strongly that we unify URIs for human and machine-readable purposes. 16:29:02 [jjc-scribe] Description: (informative) <I4.6/Manifest003#test> 16:29:04 [john-l] <.w3.org/TR/grddl-tests/#atomttl1> a < >; rdfs:sameAs < > ? 16:29:22 [jjc-scribe] links explicitly to 16:30:27 [jjc-scribe] for the earl ouput chime is ambivalent about which uri to use? 16:30:38 [DanC] (I look forward to progress on: ACTION: jjc to produce EARL for his implementation, and then sort out multiple test passing in his EARL. ) 16:32:14 [john-l] < > a < > ? 16:32:42 [HarryH] We've published: 16:32:46 [DanC] q+ to ask that somebody announce 16:33:05 [jjc-scribe] 16:33:06 [HarryH] Now we need to fix the relative URI in the next publication of test cases. 16:35:50 [DanC] options are 404 (NO), 410 (maybe), 303 ... 16:36:04 [DanC] 301 moved permanently works for me 16:36:51 [HarryH] ACTION: jjc to manufacture .htaccess file for test cases using 301 "Moved Permanently" and e-mail Jean Gui. 16:37:20 [DanC] the action is not just to email jean-gui; it's to get the redirect installed, with jean-gui's help 16:37:54 [HarryH] ACTION: Chime to announce to semantic-web@w3.org that GRDDL Test Cases is a WD. 16:39:50 [DanC] ADJOURN 16:39:53 [HarryH] Meeting Adjourned 16:40:02 [DanC] RRSAgent, draft minutes 16:40:02 [RRSAgent] I have made the request to generate DanC 16:40:11 [DanC] RRSAgent, make logs world-access 16:40:16 [iand] iand has left #grddl-wg 16:57:08 [HarryH] Ack, just lost you. 16:57:11 [DanC] oh well, harry; I'll tell you the story another time 16:57:13 [HarryH] Anyways, I forwarded the e-mail. 16:57:16 [DanC] thansk 16:57:20 [HarryH] There's another one, wait a sec. 16:57:26 [HarryH] The last thing to mention is re HASTAC. 16:57:37 [HarryH] Are you happy giving a W3C Recruiting talk on Thursday. 16:57:37 [DanC] oh. call me back re hastac? 16:57:46 [DanC] RRSAgent, stop
http://www.w3.org/2007/03/28-grddl-wg-irc
CC-MAIN-2016-40
refinedweb
2,124
68.1
On Fri, Nov 28, 2003 at 08:39:26PM +0100, Philippe Blain wrote: > >From Philippe Blain, Bordeaux, France. > My computer: P133 - 8,4 Go - 32 Mo Red Hat Linux 7.0 > > Corrections for ncurses-5.3-20031122+ ... > * Recursion problems between napms() and _nc_timed_wait() when not > having nanosleep(). in lib_twait.c, currently I have #if PRECISE_GETTIME && HAVE_NANOSLEEP /* * If the timeout hasn't expired, and we've gotten no data, * this is probably a system where 'select()' needs to be left * alone so that it can complete. Make this process sleep, * then come back for more. */ if (result == 0 && milliseconds > 100) { napms(100); /* FIXME: this won't be right if I recur! */ milliseconds -= 100; goto retry; } #endif so there is no recursion problem that I see. (I agree it would be nice to redesign the whole thing, but not in the near-term, since I'm interested mainly in tying off loose ends for 5.4). -- Thomas E. Dickey <address@hidden>
http://lists.gnu.org/archive/html/bug-ncurses/2003-11/msg00017.html
CC-MAIN-2016-44
refinedweb
159
72.26
This example reads a dictionary file containing one word per line, constructs a Bloom filter with a 1% false positive rate, and spellchecks its standard input. Like the Unix spell command, it prints each word that it does not recognize. import Data.BloomFilter.Easy (easyList, elemB) main = do filt <- (easyList 0.01 . words) `fmap` readFile "usrsharedictwords" let check word | elemB word filt = "" | otherwise = word ++ "\n" interact (concat . map check . lines) Suggest a good combination of filter size and number of hash functions for a Bloom filter, based on its expected maximum capacity and a desired false positive rate. The false positive rate is the rate at which queries against the filter should return True when an element is not actually present. It should be a fraction between 0 and 1, so a 1% false positive rate is represented by 0.01.
http://hackage.haskell.org/package/bloomfilter-1.2.6.4/docs/Data-BloomFilter-Easy.html
CC-MAIN-2013-48
refinedweb
141
60.04
#include <stdio.h> int main (void) { printf("Hello World!"); return(0); } It’s been quiet. Too quiet. Sorry for that. While I did say I was going on holidays and would be on a hiatus, I didn’t expect it to be a complete blackout. Thanks to my concerned readers checking in on me from time to time. Don’t worry – I’m still alive … but not quite the same person I used to be. Which is a good thing. This post will elaborate a little on the circumstances, before hopping back into the random technical juiciness that regular readers might appreciate more. Holiday Reflections After spending nine years at UNSW completing my undergraduate and postgraduate programs, I promised myself a reward of (at least) a year of travelling. With an understanding that this would be the best time to do such a thing as I was not under the pressures of employment, mortgages, or family, I had saved enough from my scholarships and part-time employment with the uni to enjoy myself comfortably. By late September 2016, the tickets for my first journey were already booked and paid for. The prospect of cheap airfares really solidified the desire to just leave everything and go. At the end of January, I embarked on a ten-week holiday to Hong Kong, Taiwan and South Korea. This was a milestone in my life, as the time spent in South Korea was my first solo trip overseas and a chance to broaden my horizons. Above: Sai Kung Pier, waiting for a bus to visit East Dam (Hong Kong Global Geopark of China). While in Hong Kong, I had the opportunity to meet and stay with my relatives, eat some good food, and celebrate my graduation. Chances to go out and explore were not as numerous as I had expected due to the sheer amount of events planned by my extended family. However, I did feel a bit of sadness in seeing the state of the sky in Hong Kong – mostly filled with a mix of fog and smog that wasn’t quite as dense when I visited prior in 2014. Photos of the harbour were pretty pointless given the conditions. Above: Night market in Taiwan, the first night’s dinner location. The trip to Taiwan was a one-week country-wide circuit with a Hong Kong-based tour guide with my uncle and aunt on my father’s side. It was a bit of a scouting trip, that resulted in a short stay in each region, punctuated with many moderately long bus rides. It proved to be a good chance to visit some of the attractions in areas which would have been difficult to visit as a solo traveller, and despite being a bit of a “whirlwind”, was still fairly enjoyable. The downside was the sales tactics employed by the tour guide to make up the difference in the advertised tour price and the actual cost of providing the service. While the guide was frank about their business model, some of the red herrings and anecdotes are just a longwinded advertisement in disguise which made things a little less pleasant. Some of the members of the tour group also didn’t help … Above: APEC House (Nurimaru) near Haeundae, Busan, South Korea – one of my favourite photographs I’ve taken on this trip thus far. But by far the highlight of the trip was my time alone in South Korea. I really enjoyed travelling on my own, setting my own itinerary, taking my time to appreciate places, using public transport, seeing the locals and at times even attempting to communicate with them. I had many new feelings and experiences – as a person educated in Australia, I’ve never really felt the frustration that comes about from not being able to express one-self because of a language barrier. At one stage, I used my “survival” Korean, a little Chinese (both Cantonese and Manderin) and English to get things done. I also learnt just how funny and problematic translator apps can be, and how useful gestures and actions can be. I was also able to observe history in the making, with the impeachment of former-president Park Geun-Hye, and the protests of the citizens. I appreciated the convenience of decent unlimited LTE connectivity, the various subway networks, a number of driverless subway and monorail systems and their high-speed KTX train to travel between major cities. When I arrived, Korea felt like a foreign place to me. Despite being an avid K-pop and Korean TV watcher, I wasn’t convinced that it would be easy. After visiting Seoul, Incheon, Busan, Daegu, Daejeon and Gwangju, I’ve learned that Seoul is full of many sorts of attractions and is very well set-up to cater for tourists. As you get further away from the large cities, the difficulty level increases, but even then I was able to manage (to my surprise). But instead of going into details about the holiday in this post, I’ll save it for when I make the detailed in-depth posts about each section of the trip. This will/might happen when time permits. Instead, I’m still shaking off the “post-holiday hangover” that happens when you return home. While I was on holiday, I was a completely different person. I ate differently, I lost 6kg, I walked a lot (for me anyway) including uphill treks. I improved my fitness overall, although this has somewhat been lost after being at home. I put in effort to go visit places – almost every day was spent outside from the hotel room, and a lot of time was spent looking at maps and searching for attractions. For once, I slept well and almost on a regular time schedule. I didn’t miss blogging so much, or even catching up on news online, repairing things or even the test equipment at home. The worries of home mostly faded away, with the exception of when the ADSL2+ link at home failed, which cut me off from my machines at home. I did miss the computing power of my desktop machine, as the laptop I had on holidays wasn’t really quite as fast as I’d like, and the screen on it is terrible. But I probably discovered the biggest asset of all – the fact that I am more flexible and adaptable than I thought myself to be. I didn’t really feel homesick in any way, and I gained a new confidence in that respect. I also began to appreciate architecture, art, history, culture and language more as a result. I became more emotionally connected. When I returned home, I felt the familiarity of home, but also the disappointment of having returned home. It was an odd feeling, riding the train from the airport in Sydney. I felt less safe and less at home compared to when I was in South Korea. I frequently caught myself staying to the wrong side of footpaths, stairs and escalators (keep left here, keep right in most other places). But soon after, the whole routine thing started to kick in, and I felt a desire to do technical things and post blogs again. The problem was that I couldn’t. Not yet. Because I had a mountain (18,000+) of photos to look through, process, and a whopping 11Tb of recorded data that I bought home with me that deserves attention. It also wouldn’t be me if I didn’t return home to a pile of technical problems that needed attention as well. I also have some further commitments with the uni as well, and other things to look after. These competing things all served to delay my return to blogging, and even as of now, I’m trying to get many different things done at the same time. Some people’s idea of holiday is relaxing … my idea is completely different. My idea of blogging while on holiday? Completely dashed by the fact I was so worn out after each day that I couldn’t think straight. On another note, I’m now starting to think in Korean. Daebak. At least I can read Hangul now. As a result, while a number of milestones had passed, I wasn’t able to blog about them – the closure of Optus’ GSM network, the move of SBS to H.264 encoding for HD channels, my birthday, etc. In fact, for some of these things, I had collected the necessary data but still haven’t found the time to perform the analysis. While my viewership has fallen about 25%, oddly enough, whenever I don’t post, the brains at Alexa seem to think my site gets more popular. That just goes to show how “great” big data is (… not very). Happy Birthday to Me (Really?) Above: Photo of a Cat from Daegu Arboretum, captioned and posted to Facebook on the day of my birthday. Another year, another birthday. What’s new? Well, as customary, it’s good to take stock of how the numbers on Facebook are stacking up. This year shows a decline in the number of messages compared to last year, equalling that of 2015. As usual, most of the messages (except two) are “canned” messages which … may not have required much effort on the senders’ behalf to lodge as engagement. However, if we look at it as a percentage of the number of friends I have, this year is marginally worse than all years on record. This is due to the increase in number of friends, and decrease in the number of friends that are sending such messages even though the majority are somewhat insincere. The demise of Facebook? Well, it didn’t quite happen as I expected, because the trends weren’t linear (it was a joke anyway). But the demise of interaction on Facebook is definitely happening. You can see the desperation that Facebook has in trying to “grab” users to open their app and/or do something. Now they’re even reminding me multiple times that I haven’t updated my profile in four weeks and they’re telling me when someone else posts just because they haven’t posted in a while. They also like to tell me about events some of my friends go to, even though I’m not invited. I’m almost certain that if I were to update my profile, it would at least generate a box in some of my friends timelines that says “Gough Lui just added x to the profile” or something similar. Maybe they’ll even get a notification about it. In other words, they’re trying to inspire a seed of interaction which will have a multiplicative effect on their engagement numbers. But the truth is probably that most people are tired of it anyway – they know who they want to pay attention to, and that’s about it. The novelty of updates every 5 minutes has worn off. As a result, I even get the “you’ll see more stories on your timeline if you add more friends” message from time to time. Was that all? Nope. This year, I celebrated my birthday with Taronga Zoo (again). Last year proved to be a fruitful adventure despite a bit of rain, so this year, I went again. I was feeling fairly tired since I wasn’t able to sleep well that night. The weather wasn’t predicted to be good, but there was a massive cruise liner at the terminal at Circular Quay, which was an impressive sight. Some of the planned renovations I saw last year have already been completed, with a new theatre opened. However, some of the other areas are still in-progress it seems. This particular lizard was spotted basking in the open, as if it had somehow escaped … The giraffes are always a good sight. They were enjoying their time, leisurely visiting each of the food baskets in turn. The chimps were interesting as well, since there’s a young one. It’s a bit of a handful, and it seems that the other chimps are having fun too – biting its finger for some odd reason and keeping a careful watch. I also got a chance to snap a few more shots – the first time I managed one of the meerkats through glass. The elephant was feeding, although the viewing platform was under renovation this time around. Unfortunately, I ended up leaving the zoo a lot earlier than anticipated as the downpour was quite significant and I was pretty tired. Definitely a good way to spend the morning. Even the fish are showing off … As a bonus, it looks like the Opal single-fare ticket machines don’t have enough ticket stock within them for high-patronage stations … CeBIT Australia Another annual event is CeBIT Australia, a trade exhibition that comes to Sydney around May. I’ve been visiting it on a yearly basis almost religiously, so it was only right for me to visit again as I was in Sydney. That morning, I decided to train into the city via Yagoona station, which treated me to this unexpected sight of track-workers digging up some ballast on a “live” section of track that’s running commuter services every 15-minutes. Good to see the high-vis and the horn signal of the driver, acknowledging the presence of workers near the track and to slow down. This year was unlike the last two in the sense that it is held at ICC Sydney. CeBIT had to move to Sydney Olympic Park as the old Sydney Convention and Exhibition Center was demolished for redevelopment. The ICC had been opened for some time, but I haven’t had a chance to visit until now. Coming in via the light-rail stop, I was greeted by a long wall covered in an LED display panel simulating digital bitstreams flying across the wall with a faux kilobyte counter. It’s definitely a little interesting. However, the way around the ICC seems a little convoluted, involving escalators up and down. The showfloor also seemed a little smaller than in the old Sydney Convention and Exhibition Center days … maybe it’s a bit of a sign of where the Australian market is heading. There were a number of Vloggers on the show-floor taking their time interviewing people and filming videos, so I’m sure I don’t need to go into much detail, but the feeling this year is that the number of large companies represented at CeBIT AU is reducing. Instead, a larger fraction of the stands seem to be dominated by start-up businesses and young businesses – some with purely “software” platform offerings, others with a little hardware to go along with it. However, most perplexing is the sheer amount of space taken by educational institutions this year – every major Sydney university had representation at CeBIT this year, which is (probably) a first. There was also a number of “innovations” on display which felt a little less ready for market as prototypes or mock-ups without preliminary data. I’m not sure this lines-up with the primary audience of CeBIT, which are probably business IT decisionmakers looking for technologies that can be deployed imminently, rather than technologies which are yet to be proven or yet to exist. Instead, it feels a bit more like a pitch-fest of companies looking for capital. That being said, I did manage to have a chat with a number of friends in companies that have had long-time representation at CeBIT (e.g. myNetFone, Multitech, Congatec, Interactcard, Icom), some of which have returned after a hiatus (RFI) and newly exhibiting majors (e.g. Maxo, Crestron). It was also interesting to see some Taiwanese product representation for Lian Li, Aver (formerly AverMedia), Edimax, and more. On the whole, however, the number of exciting things seemed relatively numbered. On the one hand, there was a display from VicHyper about their Hyperloop research which they are quite optimistic about. However, there wasn’t really that much to see except a static prototype vehicle. Crestron’s networked video solution was particularly interesting for a number of reasons: For once, it supports 4k at 60Hz. Another is that it doesn’t chroma sub-sample. And it supports HDR, all over a GbE link. Pretty amazing, but also pretty expensive, as I’m assured. But even more interesting is what powers it – the Intel Arrira 10. This is the first Intel chip that has been produced with FPGA logic and ARM CPU cores in the one package, something predicted by analysts after their acquisition of Altera but not really seen. It gets my interest because of its bleeding edge capabilities, and the solution that powers it. Another interesting thing was at the Congatec stand, where they are now starting to ship embedded/industrial boards with Optane memory support as well. While I thought Intel had just about killed off the Atom, there are actually newer generations being made, just that consumer devices now rarely adopt it. As a bonus, the chip on this board has Intel Confidential marked on it – that caught my eye. Aside from that, as expected, battery based energy storage seems to be the next battleground, with a number of LiFePO4 based solutions on display. Despite this, having proper intelligent integration with solar inverters is a necessary step, and one hopefully the industry will be able to solve. The promise of these batteries are quite significant – the traditional flooded/sealed lead acid variety are well “understood” but have lots of cost, maintenance, lifetime and logistics issues. The newer batteries are much lighter for the same stored energy and do not suffer such depth-of-discharge penalties, making it much more attractive. Maintenance requirements are also generally less, but lifetime and safety are only assured by having a sophisticated battery management system. So yes, another year, another CeBIT. I can’t help but leave feeling a little deflated, as it seems the show has gotten less focused and less exciting over the years. Maybe next year will be better. From the Sink Accident Investigation Bureau (SAIB)* * not a real investigation bureau Two days prior to the accident, a puddle of liquid of unknown origin was observed pooling near the rear doormat of the garage area. The liquid was clear, odourless and suspected to have leaked from a nearby container, although conclusive evidence was not available. All nearby containers were drained of liquid and/or relocated and the situation was monitored. Further monitoring a day prior to the accident revealed that the liquid did not completely evaporate, and the ground remained damp although less wet than before. On the morning of the accident, the mat in front of the kitchen sink was found wet. Upon later hand-washing dishes, water was found issuing from gaps in the cabinetry underneath the sink. Opening the door revealed the lower cupboard completely waterlogged, with water leaking from behind a duct-taped inspection eyelet. After removing all items in the cupboard and removing any visible traces of liquid, the U-bend trap was disassembled and cleaned. Copious amounts of hair-like material with a green-black mould were observed, along with a pair of complete chopsticks. It was determined that the eyelet cover was missing and improperly substituted with duct-tape contrary to manufacturers’ instructions. The trap was reinstalled, with a whittled cork bottle stopper as a replacement eyelet cover, wrapped with a vinyl glove finger and rubber band as a secondary line of defense. The most probable sequence of events are as follows: - Prior occupants may have had an under-sink water dripping incident, which was caused due to obstructions accumulating within the U-bend trap causing the inlet water level to rise above that of the inspection eyelet especially under heavy flow. - The whereabouts of the eyelet cover were not able to be determined, but it is presumed that it may have been blown out due to static pressure of the water column and lost. - Instead of clearing the cause of the leakage, the prior occupants performed an unauthorized repair involving the use of duct tape to stem the flow of water. - While initially effective at forming a seal, the adhesive failed through over time. A slow leak formed, however, due to the accumulation of matter within the eyelet, the flow rate was limited. - Liquid flowed through the gaps in the lower shelf made for plumbing and wastewater thus entered the slab and migrated to the wall facing the garage, where water slowly permeated through to the floor at the garage due to its lower level. - Due to the slow rate of the leak, this was not noticed until the leak grew in intensity due to the increasing level of blockage within the U-bend trap. To improve the safety of sinks, it is recommended to: - Inspect under-sink areas to confirm the absence of water, and any inspection eyelet covers are correctly fitted and sealed. - Periodically clean any U-bend traps which exhibit symptoms of clogging. Report signed Gough Lui for the SAIB*. To Upgrade or Not to Upgrade We seem to be in a particularly interesting time for computing, as it seems to have been one of the longest periods of time I have gone without an upgrade to my day-to-day machine. It seems the sufficient capabilities of many older machines, coupled with more reliable components and better utilization methods have resulted in the ability for many consumers to defer their upgrades significantly. In the past, upgrading every 2-4 years was considered normal. This year, the core of my AMD Phenom II X6 1090T which I got second-hand from a friend who wanted something better has turned seven years old. In the five or so years I’ve been running it, it has been pushed to 3.9Ghz (formerly 4Ghz, but it failed to maintain stability after 2 years of operation) and never skipped a beat. Even the monitors I’m using are 16:10 aspect ratio (a since extinct aspect ratio) of a TN LCD panel with CCFL backlighting, all no-yonger than about 7-10 years since manufacture. All of them have rolled over their service menu time counters in some way, but my BenQ G2000W has just registered over 3 years of screen-on time. That’s pretty amazing. Not to be outdone, I have my Samsung F4 2Tb hard drive that was used as a file-store drive that survived several servers. It has just ticked over 51k hours (5.9 years of continuous operation), with still mostly-healthy SMART vital signs and no signs of any data loss. I’ve always been rather careful with my money, so I have a tendency not to replace equipment until it truly fails – and by that I mean beyond reasonable repair or work-around. My mouse, for example, has a broken scroll-click button which has gone intermittent. As a result, I’ve remapped it to the thumb back-forward buttons, and developed a new habit rather than replacing the mouse. The problem is – at some stage, it makes sense to replace things purely from a technological performance perspective. For example, 4k IPS monitors are common enough – even though they’re not cheap, I’m sure I’d enjoy editing my photos a lot more with them. The new AMD Ryzen (and soon, Threadripper) CPUs are going to give me about 4x the performance (or more) of what I have now – so chances are I won’t have to wait for Lightroom or Handbrake as often as I do now. Support for 64Gb of RAM means less swapping-out to SSD, as I only have 16Gb now as the maximum supported by the motherboard. PCIe M.2 NVMe SSDs offer data rates about 5x as fast as any SATA3 based SSD, with comparable capacities as well. The temptation is real. After all, Ryzen is pretty amazing. The expense is real too, sadly. If I were to satiate every desire, I could probably afford a small car. After all, my present machine is not particularly “light” on hardware – having every SATA port occupied by a drive of some description is normal, and getting some new ones purely for reliability reasons wouldn’t be unusual. So what am I to do? Well, for now, the answer is just not to upgrade and live with it. It’s not the best machine, but it’s still enough. The biggest issue with upgrading is being forced to Windows 10. Don’t run Windows 10 and you’ll need to resort to a sketchy hack to maintain your Windows Updates, and still have to deal with a loss of USB performance thanks to no UASP support, and a loss in graphics performance for gaming due to the lack of support for the latest DirectX. A loss of legacy interfaces and software support is also annoying. But I figured I could make my life a little better – the Gigabyte 890FXA-UD7 that I’m running on has a 16Gb RAM limitation according to Gigabyte. As a result, many years back, I bought 4x4Gb DDR3 1600Mhz sticks to fulfill its potential. However, I noticed some people running 32Gb RAM somehow. As a result, I pilfered two 8Gb DDR3 sticks from two systems and swapped out two of the 4Gb sticks instead to give 24Gb total. The results were interesting. With two 8Gb sticks in slots 1 and 2, and two 4Gb sticks in slots 3 and 4, the board reported 32Gb RAM, 24Gb available (under Windows). With the 8Gb sticks in slots 1 and 3, and the 4Gb sticks in slots 2 and 4, we got 28Gb RAM with 24Gb available. The trick was to put the two 4Gb sticks in slots 1 and 2, and the two 8Gb sticks in slots 3 and 4. Then it came up as 24Gb total/usable. This suggests there is a bug in the BIOS where depending on how the RAM is installed, it is presented not contiguous in address space, with the “holes” marked as hardware reserved instead (or similar). Unfortunately, as before, the Phenom II x6 1090T cannot run all four sticks at 1600Mhz, so I had to settle for 1333Mhz thanks to the weak memory controller. I did tweak the timings a bit, but then got into trouble when I tightened them a little too much. Thus I needed to do a CMOS reset, but then the board was stuck with the debug LED at 25 and refused to boot. After fiddling about, it almost seemed that my PCI sound card (a Soundblaster XFi Xtrememusic) had “fried”. Remove the card, system boots. Put the card in, system fails to boot. Except for that was not the right conclusion. Instead, I discovered another quirk of the F.5f BIOS – on reset of CMOS, the default graphics initialization is PCI slot first. It should have looked at the PCI slot, realized it was not a graphic card (as it would have had its function type as multimedia, subtype as sound) and moved onto the PCIe slot. If you boot first, set the graphics to initialize PEG first, then shove the card back in, it’s all fine again. Cost me a bit of time to work that one out. But at least now, I have an unsupported memory configuration that works, has passed stability testing and makes life a little more tolerable. Will I make it 32Gb? Probably not. Not because I don’t need it – but because it seems silly to invest in DDR3 when DDR4 is already mid-life. Just not good value for money. Conclusion In true random-post fashion, it’s been a bit of a catch-up of sorts. While I did want to post while away, that never happened. Finding the time to do so when home is not easy either. The problems still keep coming in, and the solutions also keep rolling out – the time to document them is what is missing. I hope there’s something for everyone to enjoy – I’m definitely still alive and kicking. Hopefully, in the future, once I have my act together, detailed postings with holiday photos will start to surface. But before then, there are a few different technical posts to come as well, so stay tuned. There’s also the Vivid Sydney light festival, which I should probably visit and take some photos of. However, also be prepared for another period of blackout, as I have an 11-week holiday that has been booked and paid for, starting in just under two-months time which will see me visiting Singapore, Japan (Tokyo, Osaka, Kyoto) and Hong Kong. I hope it will be just as exciting and interesting as my first journey. Thanks for the pics & the SAIB report. I’d have to disagree with you on the DDR3 memory – memory is still pretty cheap (in the US, anyway), especially used memory. However, if you’re on holiday, you won’t be using it anyway. I suppose cheap is relative. 8Gb DDR3 sticks are rare to find, especially used, since most people never really opted to max-out their machines. For a nice set of 4x8Gb sticks, it’s probably going to set me back close to AU$300 (or US$225-or-thereabouts). When you factor that’s about half the cost of a new Ryzen 7 CPU or indeed the whole cost for my present smartphone, it seems “expensive” in that sense. Considering I probably won’t get that much use out of it (seeing as the board itself is 7-years old and could fail at any time), I’d rather put the money towards some more modern machine in the future (or even DDR4 RAM if I had any use for it, since it has a chance that a future upgrade could re-use it). It has been rather surprising just how reliable my present-day machine is … the Phenom II x6 1090T at 3.9Ghz really pulls about 160W through the VRMs – moving to 4.1Ghz causes the VRM overcurrent to trip. I didn’t expect it to last even four years at the “edge” but here we are. – Gough Nice to see you back. I look forward to seeing the holiday photos. I’m also running old hardware on my main desktop, although it’s a bit older (about 10 years old now). I’m running Debian Linux at the moment to extend its life a little more (using wine for windows apps). I’ve held out on an upgrade for ages for similar reasons to yourself, basically my machine has been adequate for my needs for quite some time. I’ve been reluctant to decide on a new machine, but the new Ryzen systems are quite tempting. It’s good to see AMD starting to make more competitive chips again. I’m not sure whether I’ll go with windows 10, I use it on a work machine and it seems fine, but backwards compatibility could be a problem if I want to play my older games (which I’m still very fond of) the alternatives are linux which has compatibility issues of its own and simply maintaining an older machine like I do for DOS games. I don’t have any win7 or 8 licenses so I don’t have them as an option. I don’t think the Crestron gear uses GBe strictly speaking (although it does use the same cables with the same termination) It’s a standard known as DM which stands for Digital Media. It is used to interconnect their devices including things like video matrices. It is better than using HDMI/DP as you can have longer cable runs, you can send stuff like serial through it as well, and it integrates well with their other equipment as it is used as a standard for all of them. I have a bunch of their gear installed at work, and it generally works very well. I didn’t mind the black out, you should after all be enjoying your holiday. Sparcie Nice to see you again too :). Indeed, Windows 10 might seem okay at first, but the more the updates change things, the more I get frustrated with it. At times, after major updates, application preferences are reset to defaults. I’ve had a few apps really play up and refuse to properly run under Windows 10, but I think the privacy implications and enforced updating are a big reason for my dislike. I am very much an AMD supporter – I hope this brings a new era of innovation and competitiveness, as Intel certainly haven’t been bringing much to the table on a generation-by-generation basis. Older Crestron gear were not all real IP over Ethernet – but this one apparently is as it does support 802.11x authentication/encryption, and I was assured it uses IP Multicast, rather than just using the relevant cables with their own signalling or Ethernet but not IP. The way it works (apparently) is that they use JPEG2000 frame-by-frame encoding, so it’s not as bandwidth-efficient but much better on latency and supports 4:4:4 60fps HDR as a result. It’s a bit of a computing power to storage trade-off that is so common, but apparently, having the FPGA section of the Arrira 10 was the “saving grace” that made it all possible. Of course, expensive premium gear not meant for the average home consumer, but always nice to drool over the “real” industrial stuff. I’m hoping to have a few moments to shove up a few more posts of short reviews, various findings, etc. Sadly, right now, I’m battling the flu (again)! Aside from that, I’m also battling occasional (10-20 minute) outages a day thanks to all the crawlers hammering the site at the same time (e.g. BingBot, GoogleBot, Yandex, etc) resulting in something crazy (50+ requests per second). But short of emptying my pockets for what is admittedly, a hobby site, there isn’t much I can do. I’ve already spent enough time .htaccess blocking some smaller ill-behaved bots, and leveraged several tiers of caching … as long as it doesn’t go down while I’m writing a post, I’ll be satisfied :). – Gough That’s interesting with the Crestron stuff. The gear I have is probably about a year old now, so it’s fairly young, but it still uses DM. Not that switching to gigabit ethernet is bad, it’s a great idea as it will be more inter operable and can co-exist with existing network infrastructure. Providing they can make it secure enough. Sounds like it needs a bunch more compute power though. It seems like it is that season, I’ve got a bit of the flu as well. Not much fun. Probably not much more you can do about the crawlers, I thought cloud flare might have taken more of the load off. Sparcie I suspect they will still maintain their “other” system in parallel, as there are places where the lower cost is attractive and whether it uses Ethernet+IP is not a big issue. As for CloudFlare – it’s doing a pretty decent job in keeping things afloat, but it’s not particularly easy when you’re doing 400+Gb a month of served content from bottom tier shared hosting. I can’t say I expected more than this, but at least now I have a decent 500 ErrorDocument so that users understand the situation better along with CloudFlare’s “Always Online”, so the page will be served from their cache (if available). Unfortunately, despite careful setting of expiry times/Etags on resources, CloudFlare doesn’t seem to cache as well as I would have liked lately – very likely as paid customers are probably prioritized and their caches may be under pressure resulting in my content being evicted sooner than in the past. Still miles better than nothing though. – Gough
http://goughlui.com/2017/05/29/random-birthday-reflections-taronga-cebit-the-kitchen-sink/
CC-MAIN-2018-26
refinedweb
6,045
68.2
2012-07-02 libraries and namespaces 6.14: adda/library/authors include system, app, client: . Python has 2 libraries to choose from: standard and local . . Ada has one library with any number of modules, including standard.package . . instead of ada's one library, there should be 3 libraries, one for each author: system-authored -- the standard modules; app-authored -- the software developer; client-authored -- the user of the app . . libraries can be specified by the app author, (system is adda/aModule, local is ~/aModule ) but specifying this is not necessary because the app's local library is always checked first; ie, if an app author wants to use a system module they simply abstain from giving any local modules the same name as the needed system module . . module providers can define what other authors they want used and in what order . . notice that while many commercial wares are arranged by author, many openwares are arranged by project; ie, each project represents an author collective; but these collectives then have branches which might represent either author subsets or target-specific variations; so, the typical explicit local path will be: ~/myProject/myBranch/myModule . 6.15: . the client's library can have subfolders for each of the authors: system and each app . . the compiler always gives the client the final say, so that if the users want to modify (system/x.pkg) they write their own in (client/system/x.pkg). . if the author requires that they not be modified then a commercial version of the compiler would alert the user that their modification is being ignored due to contractual obligations . . in the open-only version of the compiler, the user would be unable to install commercial wares . 6.18: adda/library/hierarchical librarians: . we could also have the idea of hierarchical librarians; ie, just as the typical librarian is local to the file system, rather than applying to the entire local network or to the entire internet, so also, a librarian could be local to a folder . 6.19: x : dir-name/type-name . what was the library structure defined by ? ... 6.14: adda/type/record expressions vs literals: . being required to statically type vars is not a loss of freedom because we can declare a var to be tall.type, which means it may include any type (tall typings are like tall tales, leading t'all sorts of things ...). . what should the import syntax be? my first idea was that explicit importing was mostly unneeded, because by typing var's, we implicitly import that type's module; but there are other types of modules to reuse . . think of the orthogality: when defining var's in a name space, these are actually fields in a record literal; . just as data types may define both literal values and expressions that return values; so too we should be able to define record structures with either literals or expressions . . ada uses {with, use} for expressing this . . a situation similar to importing is inheritance so importing should have the same syntax . . a recent proposal for such syntax was (3.23: adda/oop/syntax/sections for use, is, has). . it suggested 3 new keywords: # use: . for an interface to import a module; they may refer to types other than self that are not in the top-level library . [6.15: . here's all the places a type's name can get reused: app's pkg, pkg's of other authors being imported wanting a system type even though app has redefined that type name in one of its own local modules .] # is: . for supertypes, establishing type compatibility . # has: . for listing the type's known subtypes; eg, number.type has all of these subtypes: int, real, quotient, complex, modular . . I thought a good word for "(import) was "(has), but if possible I should make sure that the keywords have similar meanings when used by inheritance and namespace definition . 7.2: todo: . I need to show the diff's and similarities of inheritance to namespace definitions . 6.15: adda/library/anonymous record declarations: . why not do imports by declaring records globally, and then instantiating records? and instead of (with; use), do an anonymous instantiation; ie, instead of (x.myrec), say (.myrec)? but if we have multiple anonymous record declarations with conflicting component names, we have no way to resolve the conflict because we have no root name to specify . [6.19: . we could use the type name as a root, and use either record instances or rec'types . . rename is done like this (x: mypkg) while using original name is (: mypkg) and if conflict use (mypkg.component). . anything on the right side of colon must be a library item, either an instance or a type . . might be easier on the reader's eye if we always required renaming when importing rec'instance . . should we always have an implicit ada'use in force for if a naming contention exists ? here's the reason ada'use is optional: it is filling the name space; and, these included names can't be redefined now; better to use ada'use the way ada uses it .] . Ada's packages are like record instances -- in contrast to record types; Ada'with(package) allows the instance to be visible to the current scope . . packages in the Ada library may include variables (this is how Ada can define global variables). . by being instances instead of record types, the included variables are being shared by every process that includes such a package, ie, a global record instance . . subrograms are types not instances; when we have a pointer to a function what we have is a constant template which can be shared by numerous function activation records, just as numerous record instances share the metadata of a record type that is in control of record instance formatting . . thus, a function activation requires a pair: (the name of the subprogram providing the template, and the address of an activation record); when we speak of a process, this pair is what we're refering to; (6.17: but when concurrency is considered, then a process implies a triple: the 3rd component of this triple is a thread of execution: either the id of the processor it is using, or a task mgt record for controlling a slice of the processor's time ). . global variable instances can be confusingly shared by many authors' processes; so, a global variable should be registering which processes are using it, and be able to tell us which processes have been involved; likewise, any subprogram that can spawn tasks which can share its local var's, creates a situation where processes share a var but this is not so confusing because it doesn't involve sharing among various authors . [6.16: . the way globals are shared by various authors can also be happening locally, if we can import a package that expects the eviron to provide a sharable var . [6.18: . but maybe this should not be happening; if you want an import to use your locals it should exist as parameterized record type, so then a parameter used during record instantiation is passed the address of locals it can use . ... or how about this: . when a type is instantiated by a client, in addition to allocating an instance, it also gets some sharing space in client which the type mgt can use for keeping meta info or parameters that are relevant to just a particular client's set of a particular type's instances . . this new space would be similar to class var's, except that instead of being shared by all members of the class, they would be shared only by those members that were owned by a particular client ie, contained in a particular subprogram activation record or a declare block . . so then, if type mgt's can do this, instantiated records could also .] . other confusions with what's global include # the internet is the top-most global, # one's local network is global to a file system . . we can think of global var's as implicitely inheriting from registering (no process can access the registering type without getting registered). . if we want registering behavior for a local we must explicitly have it inherit from registering . . my initial concern with vars being shared could only happen because the author put the var there, but there could still be surprises among an author's subprograms because the author's client can choose to run more than one of the author's sub's at a time . . an imported sub' should be able to declare a non-local var as a dependency in order to have symmetry with the idea that subs can access non-local vars; and, that feature should be orthogonal to the feature of a sub being reusable .]
http://amerdreamdocs.blogspot.com/2012/07/libraries-and-namespaces.html
CC-MAIN-2017-26
refinedweb
1,465
58.11
Flyweight Design Pattern is a Structural Design Pattern that concerned with space optimization. It is a technique to minimizes memory footprint by sharing or avoiding redundancy as much as possible with other similar objects. Flyweight Design Pattern in Modern C++ is often used in a situation where object count is higher which uses an unacceptable amount of memory. Often some parts of these objects can be shared & kept in common data structures that can be used by multiple objects. /!\: This article has been originally published on my blog. If you are interested in receiving my latest articles, please sign up to my newsletter. avoid redundancy when storing data. - Flyway Design Pattern is quite simply a space optimization technique. That allows you to use less memory by storing some of the common data to several items or several objects. - We store it externally and simply refer(by reference, pointer or any other mechanism) to it when we actually need it. Flyweight Design Pattern Example in C++ - Well, the one thing that we want to do if we're storing lots of data is to avoid any redundancy. It's like compression in images or films if you have the same block repeating over and over again. You probably want to actually avoid having that block take up memory. But instead, you just write it and say how many times it repeats. - For example, let say you are designing a game. You're going to have lots of users with identical first and/or last names. You are going to have lots of people called John Smith. But you're also going to have lots of people called Johnand lots of people whose last name is Smith. - And there are no point in actually storing the same first & last name combinations over & over again. Because you are simply wasting memory. So what you would do instead is you would store a list of names somewhere else. And then you would keep the pointers to those names. // Note: You can try following code at. #include <boost/bimap.hpp> struct User { User(string f, string l) : m_first_name{add(f)}, m_last_name{add(l)} { } string get_first_name() {return names.left.find(m_first_name)->second;} string get_last_name() {return names.left.find(m_last_name)->second;} friend ostream& operator<<(ostream& os, User& obj) { return os << obj.get_first_name() << "(id=" << obj.m_first_name << "), " << obj.get_last_name() << "(id=" << obj.m_last_name << ")" ; } protected: using key = uint32_t; static boost::bimap<key, string> names; static key seed; static key add(string s) { auto it = names.right.find(s); if (it == names.right.end()) { names.insert({++seed, s}); return seed; } return it->second; } key m_first_name, m_last_name; }; User::key User::seed = 0; boost::bimap<User::key, string> User::names{}; int main() { User john_doe {"John","Doe"}; User jane_doe {"Jane","Doe"}; cout << "John Details: " << john_doe << endl; cout << "Jane Details: " << jane_doe << endl; return EXIT_SUCCESS; } /* John Details: John(id=1), Doe(id=2) Jane Details: Jane(id=3), Doe(id=2) */ - If you see the essence from above flyweight implementation, it just storing data in the static qualified data structure by taking care of redundancy. So that it can be reusable between multiple objects of the same type. Implementing Flyweight Design Pattern using Boost - The Flyweight Design Pattern isn't exactly new. And this approach of caching information is something that people have already packaged into different libraries for you to use. - So instead of building all these wonderful by maps and whatnot what you can do is just use a library solution. #include <boost/flyweight.hpp> struct User { boost::flyweight<string> m_first_name, m_last_name; User(string f, string l) : m_first_name(f), m_last_name(l) { } }; int main() { User john_doe{ "John", "Doe" }; User jane_doe{ "Jane", "Doe" }; cout<<boolalpha ; cout<<(&jane_doe.m_first_name.get() == &john_doe.m_first_name.get())<<endl; // False cout<<(&jane_doe.m_last_name.get() == &john_doe.m_last_name.get())<<endl; // True return EXIT_SUCCESS; } // Try @. - As you can see, we are comparing the address of John's last name & Jane's last name in the main()function which prints out to be true if you run the above code suggesting that redundancy is perfectly taken cared by boost::flyweight<>. Benefits of Flyweight Design Pattern - Facilitates the reuse of many fine-grained objects, making the utilization of large numbers of objects more efficient. -- verbatim GoF. - Improves data caching for higher response time. - Data caching intern increases performance due to a lesser number of heavy objects - Provide a centralized mechanism to control the states/common-attributes objects. Summary by FAQs When to use a Flyweight Design Pattern? -- In need of a large number of objects. -- When there is a repetitive creation of heavy objects which can be replaced by a few shared objects Difference between Singleton and Flyweight Design Pattern? -- In Singleton Design Pattern, you cannot create more than one object. You need to reuse the existing object in all parts of the application. -- While in Flyweight Design Pattern you can have a large number of similar objects which can share a common single resource. Drawbacks of Flyweight Design Pattern? As similar to Singleton Design Pattern, concurrency is also a headache in the Flyweight Design Pattern. Without appropriate measures, if you create Flyweight objects in a concurrent environment, you may end up having multiple instances of the same object which is not desirable. Discussion (0)
https://practicaldev-herokuapp-com.global.ssl.fastly.net/visheshpatel/flyweight-design-pattern-in-modern-c-15j3
CC-MAIN-2021-49
refinedweb
867
55.84
The .NET framework offers us the Help class and the HelpProvider component to seamlessly integrate a Help system into our applications. Surprisingly, integrating the regular done-to-death Help techniques into your application with the use of the HelpProvider component in .NET is insufficiently illustrated in the VS.NET documentation. However, learning on your own, turns out to be anything but difficult. HelpProvider With VB6, I should admit that Help was perhaps the last feature I was inclined to incorporate into an application. Even providing pop up context-sensitive help windows required garnering Win32 API support (getting enough info was tough by itself). With .NET, this tendency of mine (and that of anybody else who can be just as lazy) has begun to disappear. It is so easy to provide the pop-up window support now, that I use them right from the start of UI construction. .NET immediately allows your help system to be based on a pop-up-window or/and online/offline HTML approach. The .CHM file approach is my favorite, simply for the Keyword Indexing feature, if not for anything else. Let's face it. No approach is without pitfalls. An online help would make maintainability sleek and accurate, but not many applications warrant the need for a user to connect to the Internet to get some assistance. This article will demonstrate how to include each approach using the leverage .NET offers. Note that the ToolTip and background information on how to create Help files using HTML Help Workshop will not be discussed. "Provides pop-up or online Help for controls. ……Each instance of HelpProvider maintains a collection of references to controls associated with it."-MSDN "Provides pop-up or online Help for controls. ……Each instance of HelpProvider maintains a collection of references to controls associated with it."-MSDN The HelpProvider component implements the very special IExtenderProvider interface, whereby it becomes capable of providing extra properties to other components. MSDN gives a decent description about the interface, so I suggest that the insatiable reader look it up. IExtenderProvider The HelpProvider component can be dragged on to your Windows Form from the Toolbox. It will likely be automatically named HelpProvider1. I normally change it to something like hlpPrvMain or anything more appropriate and on the mark. The only really relevant property you need to set at design-time is the HelpNamespace property, which holds a string value representing the path to the HTMLl Help source file. The source file may be any .htm or .chm file. However, I later found that it could be used to point to even a .txt file or any file for that matter, only that it serves very little purpose. Alas! HelpProvider1 hlpPrvMain HelpNamespace The HelpProvider component associates itself very neatly with your form and all the controls on it without ado. You can make sure of this fact by checking for HelpXXX properties that come out of nowhere for every control in the Properties window. I have read somewhere that the component maintains a separate hashtable for each property it provides to all external objects. The properties added include the following: - HelpXXX HelpButton This property takes a boolean value and determines whether the Help symbol (?) appears on your form in the control box. The button will however appear only if the MaximizeBox and MinimizeBox properties for the form are also set to false. Hence, the Help button is a feature normally seen only on Dialog forms. MaximizeBox MinimizeBox HelpNavigator Specifies a constant indicating which elements of the Help file to display. It can be any one of the values in the Enum HelpNavigator (as listed in MSDN): - Enum AssociateIndex Find Index KeywordIndex TableOfContents Topic HelpKeyword The Help keyword provides the key information to retrieve the help associated with this control from the Help file specified by HelpNamespace. It takes a string value that means different things for different values of the HelpNavigator property. Refer to table 2 below. HelpString The HelpString value represents the help message of the pop-up help windows that appear when the user requests for Help using the Help button or by pressing F1. At design-time, you can associate an instance of HelpProvider with only one Help source. Your Help source can be set through the HelpNamespace property which accepts a string value representing the path to your .htm or .chm file. This property is the only useful property exposed in the component. It is used to contain the name of the help file, which may be an .htm or .chm file (there is nothing stopping you from providing a path to a text file or even a .exe file, but doing so is not really useful). Additionally, it exposes quite a few useful methods: - SetHelpKeyword Specifies the keyword used to retrieve Help when the user invokes Help for the specified control. Overridable Public Sub SetHelpKeyword (ByVal ctl As Control, _ ByVal keyword As String) This string value is used to find the specific help section in the help file that pertains to the specified control. SetHelpNavigator Specifies the Help command to use when retrieving Help from the Help file for the specified control. Overridable Public Sub SetHelpNavigator (ByVal ctl As Control, _ ByVal navigator As HelpNavigator) This method determines which element of the Help File to Display. SetHelpString Specifies the Help string associated with the specified control. Overridable Public Sub SetHelpString (ByVal ctl As Control, _ ByVal helpString As String) This method sets the Help string, but does not display the pop-up message. The pop-up will appear the next time the user presses F1 on the control. SetShowHelp Specifies whether Help is displayed for the specified control. Overridable Public Sub SetShowHelp (ByVal ctl As Control, _ ByVal value As Boolean) This method is used to override the flag that determines whether the Help for a control will be displayed or not. The above-mentioned SetXXX methods have related GetXXX methods as well, as listed below:- SetXXX GetXXX GetHelpKeyword GetHelpNavigator GetHelpString GetShowHelp The HelpProvider also registers event handlers on each control's HelpRequested and QueryAccessibilityHelp events. HelpRequested QueryAccessibilityHelp This is another class that has very little documentation. Look it up on MSDN, here's what you will be told - "This member supports the .NET Framework infrastructure and is not intended to be used directly from your code". Regardless, note that it is found in the System.Windows.Forms namespace, and used to explicitly display Help files from your code. It exposes two useful shared/static methods for our consumption:- System.Windows.Forms ShowHelp Displays the contents of a help file. To display the contents of the Help file at the specified URL: Overloads Public Shared Sub ShowHelp(ByVal parent As Control, _ ByVal url As String) To display the contents of the Help file found at the specified URL for a specific topic: Overloads Public Shared Sub ShowHelp(ByVal parent As Control, _ ByVal url As String, ByVal navigator As HelpNavigator) To display the contents of the Help file found at the specified URL for a specific keyword: Overloads Public Shared Sub ShowHelp(ByVal parent As Control, _ ByVal url As String,ByVal keyword As String) To display the contents of the Help file located at the URL supplied by the user: Overloads Public Shared Sub ShowHelp(ByVal parent As Control, _ ByVal url As String, ByVal navigator As HelpNavigator, _ ByVal param As Object) I learnt a very interesting thing about this method. It will open just about any URL you provide to it. The URL can point to any local or remote resource. It was a pleasant surprise to know that it could even run an EXE file. Very interesting indeed! In overloaded versions that require extra parameters, pass in Nothing and you will infer that those parameter values are ignored, or at least they don't interfere with running the file. Nothing ShowHelpIndex Displays the index or search window of a help file. Public Shared Sub ShowHelpIndex(ByVal parent As Control, _ ByVal url As String) ShowPopUp Displays pop-up help at chosen location on screen. Public Shared Sub ShowPopup( ByVal parent As Control, _ ByVal caption As String, ByVal location As Point) Pop-up help involves providing context-sensitive information for a control or a form. The help message or information is embedded in your code. The context-specific pop-up help message will be displayed when a user presses F1 on the control that has the focus. Once the HelpProvider component has been added to the Form, we can set the HelpString for every control on the form we intend to provide Help. Depending upon the number of HelpProvider components you have made use of, you will find an equal number of HelpString properties for very control, pertaining to each HelpProvider instance. Set the value of the HelpString property (of the HelpProvider you want to use to provide pop-up help) to a useful message for each control. Make sure the ShowHelp property (pertaining to the same HelpProvider instance) is set to true for the concerned controls. It would be advisable to use a single HelpProvider to provide pop-up help on the same form just to make maintenance a lot easier. Once these two properties are set at design time, our work is done! None of the other newly available properties need to be configured. Form The same design-time configuration can be done by code as well. However, the properties that we set at design-time for each control using the Properties window are not available at runtime. Instead, we make use of the SetHelpString method of the HelpProvider component, or the Shared Help.ShowPopUp method as illustrated below. Shared Help.ShowPopUp Help.ShowPopup(Me, _ "Enter Phone number here. Valid input characters are 0-9,space,'-','(', and ')'", _ Cursor.Position) OR 'Setting the help string automatically enables 'the pop-up display for the control. hlpPopUp.SetHelpString(txtCity, _ "You pressed F1 on the City field. How can I help you?") 'The following invocation is not necessary if you intend 'to keep the pop-up enabled. 'However, the Pop-up display can be disabled for the control 'if the second argument to this method takes a boolean False value. hlpPopUp.SetShowHelp(txtCity, True) See the Pop-up Demo in the code that comes with this article. The Help button (appears with '?' as its text.) occurs on the RHS of your title bar as shown in the picture below (the images come from some quick demo apps I put together for the article). You can enable this button for your form by setting its boolean HelpButton property to True. The catch in using this button in your forms is that you have to do away with the Maximize and Minimize boxes in the title bar. So, go ahead and set the MaximizeBox and MinimizeBox properties to False. True Maximize Minimize False Clicking the Help button at runtime will change your cursor to show "?". With the new cursor displayed, click on the field for which you may have set the HelpString property and the pop-up Help should now get displayed. Every control, including the form, raises its own HelpRequested event in response to a user pressing the F1 button. We are rightly advised to do our Help invocation implementation here if we want to exercise greater control over the process. Example: Private Sub txtPhone_HelpRequested(ByVal sender As Object, _ ByVal hlpevent As System.Windows.Forms.HelpEventArgs) _ Handles txtPhone.HelpRequested Help.ShowPopup(Me, _ "Enter Phone number here. Valid input characters are 0-9", _ hlpevent.MousePos) End Sub However, it is possible to respond to a user's help request from the KeyDown or one of the other key-related events as well, simply by screening for the KeyCode value and performing the necessary action if it evaluates to the F1 button. Note that the HelpRequested event will fire regardless after key-based events. KeyDown KeyCode 'E.g., Private Sub txtPhone_KeyDown(ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtPhone.KeyDown If e.KeyCode = Keys.F1 Then Help.ShowPopup(Me, _ "Enter Phone number here. Valid input characters are 0-9",Cursor.Position) e.Handled = True End If End Sub The first step would be to set the HelpNamespace property to a valid URL. The URL will be a local path for an offline web page or a remote URL (e.g., "") for an online web page. At design-time, you can hard code the path to your help resource in the HelpNamespace property of the HelpProvider component. This much will suffice to get the page to display in your default browser when the user presses F1. You don't really have to change any other properties. To use the same HelpProvider component to display different web pages for different contexts, you have to programmatically change the HelpNamespace property value to the appropriate Help resource. You can do the change in the HelpRequested event. 'E.g., Private Sub lnkOpenHtmHelpIndex_HelpRequested(ByVal sender As Object, _ ByVal hlpevent As System.Windows.Forms.HelpEventArgs) _ Handles lnkOpenHtmHelpIndex.HelpRequested hlpPopUpAndHtm.HelpNamespace = IO.Path.GetDirectoryName(.HelpNamespace) & _ "\help_on_city.htm" End Sub It is also easy to open your help web page in response to other user events, like say a click event. Take a look below: 'E.g., Private Sub lnkOpenHtmHelpIndex_LinkClicked(ByVal sender As System.Object, _ ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) _ Handles lnkOpenHtmHelpIndex.LinkClicked hlpPopUpAndHtm.HelpNamespace = IO.Path.GetDirectoryName(.HelpNamespace) & _ "\help_on_city.htm" 'To send F1 keystroke to the active application and 'get the help file displayed. SendKeys.Send("{F1}") End Sub See the Help File Demo in the code that comes with this article. Just in case, you wish to use the System.Windows.Forms.Help class for the same, then we have to do something like this:- System.Windows.Forms.Help E.g., Help.ShowHelp(Me, "")'A fab site Or Help.ShowHelp(Me, "\Help\index.htm") 'a path local to the client App. Associating the HelpProvider component with a .chm file is the most preferred way of going about designing and integrating a help system for a WinForms application from what I hear, and not without obvious reasons. Compiled help files provide table of contents, index, search, and keyword links in pages. So first things first! Set the HelpNamespace property of the component to a valid URL that points to your .chm help file. The .chm file is normally located at an address local to the client, but there may be needs for the file to be located on a remote location on a LAN or the Internet. Regardless, the property value should pay heed to your need. With that done, set the "ShowHelp On HelpProvider" for the control (for which you want to associate with the Help file's contents) to true. Choose an appropriate HelpNavigator Enum value so that the desired section of the help file will be opened and queried using your HelpKeyword value. The latter should hold a context-specific keyword that you had included in the Help file before compilation. It could be an index entry, a search value or the name of a file that is part of the compilation. In each case, the value of the HelpNavigator has to be set to specific values as explained in table 2 presented earlier in this article. That's all there is to be done at design time. If you want to change the HelpKeyword and/or the HelpNavigator properties of a control at runtime, use the SetHelpKeyword and/or the SetHelpNavigator methods of the HelpProvider component. The Help class can be used during runtime to display the contents of your .chm file as well. To show the table of contents, do something like this: Help.ShowHelp(Me, "Help\VB.chm", HelpNavigator.TableOfContents) Change the HelpNavigator Enum value to show other sections of the help file. If you want to show the Index section, either one of the two statements should do the job: Help.ShowHelpIndex(Me, "Help\VB.chm") Help.ShowHelp(Me, "Help\VB.chm", HelpNavigator.KeywordIndex) To display a particular file in the compiled help source, try the following: Help.ShowHelp(Me, "Help\VB.chm", "help_on_name.htm") It is not entirely necessary to associate Help with the F1 key alone. It's real easy to launch help using any other key or combination, but you have to provide code for that end. Private Sub txtName_KeyDown(ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyEventArgs) _ Handles txtName.KeyDown If e.KeyCode = Keys.F1 And e.Alt Then Help.ShowPopup(txtName, "This is an alternative help message", _ New Point(Me.Location.X + txtName.Location.X, _ Me.Location.Y + txtName.Location.Y)) End If End Sub It would be interesting to know that when you invoke a web page (whether local or remote) using the Help.ShowHelp method, you are opening your browser window in an external process. This means that when your client application process dies, the browser process holds its ground unless you had earlier closed it yourself. It can be embarrassing if your Help file hangs around after the application that called it has shut down. However, it does not happen with .chm files that are opened with the HelpProvider component. Help.ShowHelp As a work around, I suppose we could use an instance of the Process class found in the System.Diagnostics namespace. Here's a quick snap class I devised solely for demonstrating my idea. It could and should rightly be bettered before it's actually used. Process System.Diagnostics Namespace KingLeon Public Class Help Public Shared Function ShowHelp(ByVal url As String) _ As System.Diagnostics.Process Dim startInfo As New Diagnostics.ProcessStartInfo() With startInfo . FileName = url .WindowStyle = ProcessWindowStyle.Normal End With Return System.Diagnostics.Process.Start(startInfo) End Function Public Shared Sub CloseHelp(ByVal proc As System.Diagnostics.Process) If Not proc Is Nothing Then If Not proc.HasExited Then proc.Kill() End If End Sub End Class End Namespace The method KingLeon.Help.ShowHelp is a function that returns a Process object. This Process object can be stored in a collection in the calling application for later reference in case the application decides to shut down. In which case, we will have to iterate through each Process object in the collection and call the KingLeon.Help.CloseHelp method, which takes a Process object as a parameter. The collection I used was the ArrayList, which I simply rate as one of the best things .NET provides. KingLeon.Help.ShowHelp KingLeon.Help.CloseHelp ArrayList 'E.g., 'Declare the collection to hold the process objects Private procList As New ArrayList() ........ ........ ........ Private Sub mnuItmOnlineHelp_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles mnuItmOnlineHelp.Click procList.Add(KingLeon.Help.ShowHelp("")) End Sub ........ ........ ........ Private Sub frmHelpFile_Closing(ByVal sender As Object, _ ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing If Not procList Is Nothing Then Dim i As Integer For i = 0 To procList.Count - 1 KingLeon.Help.CloseHelp(CType(procList(i), Diagnostics.Process)) End If End Sub The code with this article gives simple demonstrations on how what we have discussed in this article can possibly be used. The two main classes of interest are frmHelpFile.vb and frmPopUp.vb. The former illustrates how to interact with a file-based Help System, while the latter shows how pop-up based Help can prove useful. Fair.
http://www.codeproject.com/Articles/6661/Integrate-Help-Into-Your-NET-Apps?msg=1041698
CC-MAIN-2017-17
refinedweb
3,241
56.55
CGI::Builder - Framework to build simple or complex web-apps Included in CGI-Builder 1.36 distribution. The latest versions changes are reported in the Changes file in this distribution. Perl version >= 5.6.1 OOTools >= 2.1 IO::Util >= 1.46 perl -MCPAN -e 'install CGI::Builder' # define your build use CGI::Builder qw| CGI::Builder::AnyExtension AnySuperClass |; This is the starting point of the documentation of the CGI Builder Framework (CBF). You should read this documentation before any other documentation in any other module that extends the CBF. The CBF is growing quickly, likewise its features, documentation and resources: if you use it and you have not subscribed the cgi-builder-announce mailing list, you should remember to check at least monthly for new releases and ALWAYS read the Changes file. The CBF has 3 mailing lists which may be very useful for developement: If you use the CBF, you should definitively subscribe this list, since it has a very low traffic (about 1-2 message per month) but informs you about new releases, improvements and fixes which you must not miss. This list is the CBF support mailing list, with a searchable archive full of examples and practical topics. You need to subscribe this list just if you need or give free support to/from other users. (see also "SUPPORT") Note: You could also search in the old CBF mailing list archive for previous posts (). This is the list reserved to the developers of the CBF and its Extensions: you must ask to be subscribed to this list, although you can browse the archive if you are interested in knowing what will come next in the CBF. A simple and useful navigation system between the various CBF Extensions (and other modules used by the CBF) is available at this URL: If you are interested in being hired as a developer for any commercial project, and if you have a good knowledge of the CBF, please send me a message with your CV including you usual hourly and monthly rate. If you realize any interesting application by using the CBF and you want to share its link to increment your traffic, please send me a message. I am planning to publish a list of real world applications to show as successful CBF examples to the users. This will be a place where to show also information about your skills and other useful data about your work. Important Note: If you are familiar with the API of these two modules, you will appreciate the CGI::Builder::CgiAppAPI which supplies an API compatible with those modules. It supplies also very useful hints which will suggest you what to change in your old code and what to read in the documentation in order to smoothly trasform your old cgiapp into a CGI::Builder application or simply learn this framework faster. the CGI::Builder framework the CGI::Builder application a CGI::Builder build (i.e. the application module that uses the CBF and eventually includes any extension) the CGI::Builder module the CGI::Builder::foo extension (i.e. a module that will add some capability to the standard CBF) means Overrun Handler means Page Handler means Switch Handler Definition: A "framework" in object-oriented systems, is a set of classes that embodies an abstract design for solutions to a number of related problems. In simpler and more specific words, CBF is a set of modules providing the structure, the features and the solutions you need to easily write scalable, expandable, reusable and easy to maintain web applications (sometime called just 'CGI script' :-). In even simpler words: if you invest a few hours in learning this documentation, you will save a lot of hours writing your future CGI scripts ;-). You inherit an efficient and flexible pre-built structure, a lot of useful, pre-configured and ready to use objects which will allow you to produce very compact, simple to write and maintain code. The CBF handler approach make it easy the design of both simple and complex CGI applications with minimum programming effort. (see "Handlers") The CBF implements a pre-structured and customizable CGI process, subdivided in phases to allow maximum process resolution and control. (see "Process Phases") The whole CGI::Builder module is written in just 210 lines of code, very fast to load, very small footprint and very easy to maintain ;-). (see "Internal Structure") The programmer has just to learn the features of a couple of accessors (property and property group) to be able to use dozens of different accessors with the same friendly and consistent interface. (see "PROPERTY ACCESSORS" and "PROPERTY GROUP ACCESSORS") When using OOTools, adding lots of new custom properties accessors or accessors added by extensions will practically not increase neither the loading time nor the memory reqirements. (see "Function Templates" in the perlref manpage) The default of this framework are usually smart enough to do the right job for you even without any specific assignation, anyway you can always easily override everything with your own code. (see "Overriding" and "ADVANCED FEATURES") The CBF extension system allows "Inheritance, Overriding and Overrunning" which greatly simplify the development and the use of any super class or extension. Your application can take the advantage of a broad "Extensions List" already covering most needed tasks (and hopefully growing with the contribution of many authors). The internal structure mirrors the public interface, so no mistakes about public or private methods and keys which often cause conflict in other frameworks. (see "Internal Structure") The CBF clearly states the conventions and the guide lines to use in your code or in extensions, making it very simple to avoid clashes and inconsistency even with future extensions. (see "HOW TO...") In a (very simplified) web client-server transaction, when a client requests a static html page to the server, the server sends that page to the client; when the object of the request is a CGI script, that script is supposed to somehow create the 'page' to be sent to the client. Note: In the CBF metaphor, the page concept is not strictly related with the HTML file concept: 'page' is just the most used name of the entity that is the object of the request/response transaction, and so we use it as a simple synonym of requested/served entity. The CBF metaphor is constructed around this simple concept: the web application using the CBF is interfaced with the client through 'pages'. A page (page_name) is requested by the client and a page (page_content) is sent to the client as the response; what happens in between is a totally customizable application process that your application inherits from the CBF. The application process is segmented into "Process Phases" which will call specific "Handlers" to allow your application to execute code at specific time during the process. Note: You will find this technique very familiar if you have some knowledge about mod_perl handlers. As for most CGI frameworks, a complete CGI application is usually composed by 2 parts: The Instance Script and CGI Builder Build (CBB). The instance script is used as the CGI script that manage the client's request: it is usually a very short script that just creates a new instance of your application class, and executes the process() method. This is a complete typical instance script needed to use e.g. the 'My::WebApp' CBB: #!/usr/bin/perl -w use My::WebApp ; $webapp = My::WebApp->new() ; $webapp->process() ; Note: This script could be completely eliminated by the use of the Apache::CGI::Builder extension (usable under mod_perl) which transparently executes the process. This is the part of your application that implements the CBF features. Note: In this documentation we call the package that uses C::B (and that eventually includes any extension and super class) a "CGI Builder Build" or simply CBB for shortness. The CBB is not intended to be used as a CGI script by itself, but as a class defining the methods, properties and handlers needed to integrates the CBF capability to generates the pages with your very specific needs. Your application will inherit the CBF capability by simply using the base module CGI::Builder: package My::WebApp; use CGI::Builder; It can inherit from more extensions or super classes including them in the 'use' statement: package My::WebApp; use CGI::Builder qw| CGI::Builder::SomeExtension My::SuperClass ... |; WARNING: Don't use the statement 'use base 'CGI::Builder;'. You must just 'use' C::B because the CGI::Builder::import sub has to setup the overruning methods and will internally update @ISA on its own (see details in the "import" advanced method). A complete CBB module is usually as simple as this one: package My::WebApp ; # your class name # CBB definition use CGI::Builder qw| CGI::Builder::SomeExtension My::SuperClass ... |; # optional instance initialization executed for each request sub OH_init { ... } # optional Pre Process Handler executed for each request sub OH_pre_process { ... } # Switch Handler executed only when page_name is 'foo' sub SH_foo { ... } # Page Handler executed only when page_name is 'foo' sub PH_foo { ... } # Page Handler executed only when page_name is 'bar' sub PH_bar { ... } # optional Fixup Handler executed for each request sub OH_fixup { ... } # optional Cleanup Handler executed for each request sub OH_cleanup { ... } 1; The CBF uses properties and property groups accessors to store and retrieve all the internal data into and from the object. The accessors to the internal data object are provided by the OOTools pragmas, which are very efficient function templates that the CBF imports at compile time. "This technique saves on both compile time and memory use, and is less error-prone as well, since syntax checks happen at compile time." (quoted from "Function Templates" in the perlref manpage). With just 2 imported methods (property and property group) the CBF can handle dozens of different properties in just a few lines, with the same memory and the same friendly and consistent interface. Another benefit that comes from the use of OOTools is that the internal hash structure always mirrors the public interface. This is very important specially for a module like C::B that is supposed to be used as a base class. In the C::B and its extensions there are no dirty statements like $self->{__SOME_INTERNAL_STUFF} = 'something' that may introduce an undocumented and possibly conflicting key and/or bypass the accessors. This practice allows to avoid the conflict between extensions and allows any subclass to override anything with the warranty to have it changed across the whole classes included in the CBB. Besides, there are no mistakes about the internal structure of the object: when you write your super class or any special extension, you don't need to go through all the source to see if any key has already been used for internal purpose, because ALL the used key are documented, just because all have a consistent public accessor that uses the same identifier. # this accessor $s->some_property # will always refer to $$s{some_property} # and will never refer to any inconsistent $$s{__SOME_PROPERTY} Note: In order to make your code forward/backward compatible, you should always use the provided accessors. The CBF makes available to your sub class a pre-structured and very flexible process that your application will use to do what it need to do and produce the requested 'pages' with minimum programming effort. This process is composed by the following phases, internally handled by the CBF. Each phase provides one or more hooks to allow your application to execute code at specific phases of the process and to customize the process itself. Important Note: Remember that your CBB does not need to use each and all these hooks, in most cases it probably will use just a couple of them, so don't be afraid of the apparent complexity of the following table. It is just a simple time line with many hooks: you can attach your code to the hook in the right position in the time line. +-------------------+ | Instance Creation | Creation of the new object |-------------------| usually done by the Instance Script | - new() | or by the Apache::CGI::Builder extension. +-------------------+ | | +---------------+ +-->| CB_INIT phase | Optional initializing hook e.g. used to set any |---------------| property or to start a DB connection. Overrides | - OH_init() | defaults and values passed with new(). +---------------+ +-------------+ | Process | Start of the process phases |-------------| usually done by the Instance Script | - process() | or by the Apache::CGI::Builder extension. +-------------+ | | +-------------------+ |-->| GET_PAGE phase | This phase provides to get the requested | |-------------------| page_name. It is internally handled so no need | | - get_page_name() | to use its method unless you need overriding. | +-------------------+ | | +--------------------+ |-->| PRE_PROCESS phase | This optional hook will be called just after | |--------------------| the GET_PAGE Phase. Used to check access and | | - OH_pre_process() | authorizations and eventually switching to | +--------------------+ another page. | |-------+ | | | +======================+ | SWITCH_HANDLER phase | Per Page Handler. E.g. If defined, the P |======================| 'SH_foo' will be executed when the 'foo' A | - SH_foo | page will be requested; the 'SH_bar' when G | - SH_bar | the 'bar' page... E.g. used to check the E | - SH_baz | input, and eventually switching to another | - ...... | page. S +======================+ W | I +-----------------+ T | PRE_PAGE phase | Overrun Handler called each time a Page C |-----------------| Handler is about to be executed. E.g. used H | - OH_pre_page() | to centrally handle errors. I +-----------------+ N | G +====================+ | PAGE_HANDLER phase | Per Page Handler. E.g. If defined, the C |====================| 'PH_foo' will be executed when the 'foo' Y | - PH_foo | page will be requested; the 'PH_bar' when C | - PH_bar | the 'bar' page... If defined and if no other L | - PH_baz | Page Handler has been found, the optional E | - ...... | 'PH_AUTOLOAD' will be executed instead | - PH_AUTOLOAD | unless the page has some content already | +====================+ | | |-------+ | | +--------------+ |-->| FIXUP phase | This optional hook is called after the | |--------------| PAGE_HANDLER Phase. Used as last hook just | | - OH_fixup() | before the RESPONSE Phase. | +--------------+ | | +------------------------+ |-->| RESPONSE phase | This phase provides to generate the response. | |------------------------| It is internally handled so no need to | | - page_content_check() | use the methods in your applications unless | | - send_header() | you really need severe overriding | | - send_content() | | +------------------------+ | | +----------------+ +-->| CLEANUP phase | This optional hook is called at the end of |----------------| the process to allow cleanup. E.g used to | - OH_cleanup() | disconnect from a DB, or for log operations. +----------------+ Your application can execute some optional code at each phase of the process. To do so it has just to define the handlers that will be automatically called during that phase of the process. (see "Handlers") If your CBB doesn't include any template integration extension, the only mandatory requirement for your application will be setting the "page_content" property to some content (i.e. SCALAR, SCALAR ref or CODE ref) before the RESPONSE Phase; if your CBB includes some integration like CGI::Builder::Magic even setting the page_content property will become unnecessary. All the fatal errors (even those originated by other used modules) are trapped and wrapped with the indication of the Phase name which was running and the page name defined at the moment of the error. (see "die_handler") Known Issue: At the moment, if you don't use a 5.8.x perl version, a fatal error might trace also the CGI::Builder internal packages instead of just the line that generates it in your own code. Besides, under certain circumstances and for certain handlers, the error line number might refer to the original call in the Instance Script instead to the statement in the CBB; in this case, the phase name shown in the error message should however point you to the handler that generated the error. Since the CBF 1.1, an empty page_content does not produce a fatal error. It just produce a "204 No Content" http status header or - if you are using the Apache::CGI::Builder integration - a "404 Not Found" http status header, if no other status has been set until the RESPONSE phase. This means that if your application doesn't implement some system to handle unknown page_names on its own (i.e. page names that don't produce any page conent), the CBF will handle them automatically. (see also the "page_content_check" advanced method) An extension is a CPAN module that extends the capability of the CBF with some documented features which can extend the capability of any CBB. (see " Extensions List") A super class is usually a 'private' module containing some application specific capability, used as the base class for one or more CBB. Both - extensions and super classes - use and benefit from the same extension system capabilities; the differences between them are just scope differences, being aimed to generic/public use, or to specific/private use. A CBB can include both extensions and super classes by just adding them to the build list: # define your application build use CGI::Builder qw| CGI::Builder::SomeExtension SomeSuperClass |; The CBF implements 3 main features in your CBB: the classical Inheritance and Overriding, plus a CBF exclusive Overrunning. The inheritance allows your CBB to inherit the structure, methods, and properties of the CBF, so your methods can set and retrieve properties and call methods defined by C::B or any other extensions you may include in your build. Inheritance is provided by the simply 'use' of C::B, that will also update the @ISA array of your sub class with the base classes it inherits from. The overriding allows a class to override methods or properties defined by some base class (i.e. C::B or any other extensions). Your sub class can override a method by just defining the same method in its package, or can override the default of a property, by just setting another value. In the CBB next entry will override previous entries: package My::WebApp; # the effect on @ISA of this build definition use CGI::Builder qw| My::SuperClassA My::SuperClassB My::SuperClassC |; # is equal to this @My::WebApp::ISA = qw| My::SuperClassC My::SuperClassB My::SuperClassA CGI::Builder |; Methods with the same identifier defined in class My::SuperClassC will override those of class My::SuperClassB which override those of My::SuperClassA, which override those in CGI::Builder itself. The overrunning allows multiple base classes to 'overrun' the same method, that is: runnig the 'foo' method of each base class that defines a 'foo' method (sort of multiple stacked execution). This is a very useful feature that adds more power and flexibility to the extension system, allowing extensions and super classes to have automatically executed some code at specific phases of the process. All the 'OH_*' handlers are Overrun Handlers so they ALWAYS will have their code executed at the proper phase time (i.e. they will not override each other). This tecnique is particularly useful to use super classes as plug-ins in multiple CBBs. Simple methods could be skipped (not executed) if the base class that use the super class would define that same method, while Overrun Handlers are always executed (unless your CBB explicitly use the overrun_handler_map() class accessor to skip them). (see "overrun_handler_map") Important Note: A DB super class, could define an OH_init() and an OH_cleanup() that would be called at the correct time to connect and disconnect to/from a DB. Another super class could use the same handlers (defined in its own package) to do something competely different, and (with automatic overrunnig) your CBBs would have just to include them in the build definition, and each handler of each super class will be called at the correct time, so everything would work as expected. Framework to build simple or complex web-apps Add user editable configuration files to your WebApp Adds some testing methods to your build Deprecated CGI::Builder and Apache/mod_perl (1 and 2) integration CGI::Builder and Apache/mod_perl2 (new namespace) integration Integrated logging system for CGI::Builder (Vincent Veselosky) Adds user authentication and authorization to the CBF (Vincent Veselosky) CGI::Builder and Template::Magic integration CGI::Builder and Data::FormValidator integration CGI::Builder and CGI::Session integration CGI::Builder and Apache::SessionManager integration (Enrico Sorcinelli) Use CGI::Application API with CGI::Builder CGI::Builder and HTML::Template integration CGI::Builder and Template::Toolkit integration (Stefano Rodighiero) The new() method construct a new instance of your application. It accepts and sets any known object property, storing any unknow property as a new param. Use this feature to set the default of the properties of the new object before any other method calls. For example you could install just one CBB on your server but use it in different domains, and you want to give the possibility to the webmasters that use it to pass different parameters to your CBB. This feature just adds a flexible possibility to configure your application from the cgi script that uses it instead from the usual CBB OH_init: # not always useful here, but possible $webapp = WebApp->new( page_name => 'mySpecialPage', cgi_page_param => 'pp', page_handler_map => { start => \&myPH } , myParam => 'myDATA',# sets param ... more here... ); Note: This feature is fully utilized by Apache::CGI::Builder, which internally initialize the object with some defaults. The process method starts the pre-structured CBF process (see "Process Phases"). You usually will use this in the Instance Script without any argument. If you need to temporarly force the application to send a particular page, you can add it as an argument (e.g. useful when testing a particular Page Handler): $webapp->process('mySpecialPage'); This method will switch the process to a page_name, e.g. useful when validating some condition in any handler. This cause a sort of internal redirect: use the "redirect( url )" method to make the client do a new request. sub PH_myPage { my $s = shift; some_condition || return $s->switch_to('myOtherPage', @optional_arg) ... } The arguments passed to this method are optional and not needed by the CBF itself; they are just passed to your other handlers, just in case you need to keep track of something, or whatever you need to do. This is an example, to show a possible use of the arguments: sub SH_any_handler { my $s = shift; if (any_condition) { return switch_to("other_page", $my_argument) } } sub SH_other_page { my ($s, $my_argument) = @_ ; if ( $my_argument eq "something" ){ do_something } else { do_something_else } } sub PH_other_page { my ($s, $my_argument) = @_ ; $s->page_content = $my_argument ? "You requested "any_page"" : "You requested "other_page"" } Note: You can use this method from the PRE_PROCESS phase until the FIXUP phase. This method will redirect the client to the url, bypassing all the remaining phases until the CLEANUP phase that will be executed as usual after the client has been redirect to the url. You can use this method from the GET_PAGE phase until the RESPONSE phase. return $s->redirect(''); Note: This method will add the url to the header, and will use the CGI::redirect() method to redirect the client, passing it also the whole header hash you set so far (see also header() method). This method is internally used by the cgi property in order to create a new CGI object. You can also use this method if you need to create a CGI object with your own param (e.g. useful to fill a form with HTML::FillInForm). Override it if you want to use any CGI object different than the canonical CGI.pm (e.g. CGI::Simple). This method should return an object which implements at least: param, header, redirect and cookie, which are methods the CBF and its Extension use. A CBF property is a lvalue accessor to an object value. 'lvalue' means that you can create a reference to it, assign to it and apply a regex to it (see also "KNOWN ISSUE"). Besides, a property can have a default value, some validation entry rules, etc. and you can use them as an argument to the new() method as well. # 'page_content' is a property accessor $webapp = WebApp->new(page_content => 'dummy default') ; $pc = \ $s->page_content ; $s->page_content = 'some content ' ; $s->page_content .= 'some more content' ; $s->page_content =~ s/some/SOME/ ; # old debugger-safe way still works $s->page_content('some content') $pageContent = $s->page_content There are several CBF standard properties and each extensions can add some other specific property to the set of the CBF. You can see a description for each property used by an extension in its own POD. Note: The properties in this section are ordered by importance/frequency of use, listing first the most frequently used and needed, and last the properties that you might probably ignore for the rest of your life :-). This property allows you to access and set the cgi object. The default for this property is a CGI.pm object, but you can override this default if you redefine the cgi_new() method. If you use the default you have just to use the cgi property which will return the current CGI object without the need to create it by yourself. # in any handler $my_query_param = $s->cgi->param('any_query_parameter') If, for any reason, you want to use your own cgi object, you can pass this property to the new() method, or you can also directly set it at some point in the process. $cbb = WebAppClass ->new( cgi => CGI->new({myOwnQuery => 'something'}) ) $s->cgi = CGI->new({myOwnQuery => 'something'}) ; This property allows you to access and set the page name. The default for this property is 'index'. This means that the 'index' page will be requested if no other page has been explicitly requested. Set the page_name to redefine the default page_name. This default will be used whenever the value of the CGI form parameter specified by the cgi_page_param property is not defined. $current_page_name = $s->page_name # override default page name in OH_init $s->page_name = 'myStart' ; This property holds the original requested page name. Read only. This property allows you to access and set the content of the page (or a reference to it) to send to the client. The default for this property is the empty string '' so be aware that it is always defined even if you don't set it. During the process the page_content property will be set to some page content, to a reference to it or to a CODE reference that will print the output on its own. In this case the refereced code will be called after the printing of the header. sub PH_myPage { ...do_something_useful... $s->page_content = 'something' $s->page_content .= 'something more' } sub PH_myOtherPage { ...do_something_useful... $s->page_content = \&print_the_content } The main advantage to set this property to a CODE reference is that you avoid to charge the memory with the whole (and sometime huge) output and print it while it is produced. This feature is fully utilized in CGI::Builder::Magic, but you can also use it with your own subroutines. This property allows you to access and set the name of the query parameter used to retrieve the page_name. The default for this property is 'p'. This property allows you to access and set the path of the page (e.g used to address a template or a web directory). The default for this property is './tm' (relative to the Instance Script), but your code or other extensions may set it otherwise. This property allows you to access and set the suffix string used by some template extension to compose the page file path. The default for this property is the empty string '' so be aware that it is always defined even if you don't set it, anyway your code or other extensions may set it otherwise. A property group accessor is simply an accessor which can handle multiple data (or properties) of a same group. With all the property group accessors you can set, add, retrieve, delete, check for existance with only one method. You can use them as an argument to the new() method as well. See the param() method to learn the feature of the group accessors (remember that all the property group accessors use the same interface). This accessor handles the parameters of your application # pass a parameter to the new object $webapp = WebApp->new(param => {myParam => 'myD'}) # sets or adds several params $s->param(myParam1=>'myDATA1', myParam2=>'myDATA2') ; # sets or adds several params $s->param(\%other_param) ; # retrieve a value $myParam1 = $s->param('myParam1') # retrieve a slice of values (requires OOTools >= 1.77) @slice = $s->param(['myParam1', 'myParam3']) # retrieve the reference to the param hash $param_ref = $s->param ; while ( my ($p, $v) = each %$param_ref ) { do_something_useful } # retrieve the keys of the param hash (new OOTools recommendation) @param_keys = keys %{$s->param} ; # copying he whole hash (requires OOTools >= 1.8) %param = $s->param # check if exists any param exists $s->param->{myParam} ; # delete any param delete $s->param->{myParam} ; A special feature only for the param() accessor, is the automatic loading and retrieving using the parameter key as it was a defined property or method. This feature uses the "AUTOLOAD" method: # with the automatic AUTOLOAD of param, these statements $webapp = WebApp->new(param => {myParam => 'myD'}) ; $s->param( myParam=>'myD') ; $p = $s->param('myParam') ; # can be written simply as $webapp = WebApp->new(myParam => 'myD') ; $s->myParam = 'myD'; $p = $s->myParam ; Important Note: If you use the AUTOLOAD feature, and if you want to write code that will accessor works for header exactly like param() works for param. You can use it to change the header that your application will use in the RESPONSE phase. Note: The keys/values pairs you are setting as the headers will be internally passed to the CGI::header() method at the correct time, so you should always use the leading '-' character as you do for CGI::header (please, refer also to the documentation of the header() method in CGI.pm, or other module if you have overridden the cgi_new() method in order to return a different CGI object). You can use this property group accessor to store and retrieve page errors. You can add key value pairs each time you find an error, and retrieve the whole hash later, e.g. to show a feedback of the errors: $s->page_error(email_field => 'Not a valid address') unless email_condition ; $s->page_error(other_field => 'Bad parameter') unless otherfield_condition ; ... exists $s->page_error->{email_field} ; Note: It is automatically set by CGI::Builder::DFVCheck. The CBF provides several optional handlers that will be called at specific phases during the process: your CBB has just to define the specific handler of the specific phase. E.g. if your application needs to check the authorization for a user at the start of the process, it should define a OH_pre_process method and put the needed code in that handler. All the handlers are optional; this means that your CBB should define just the handlers that it need. Note: Here they are ordered by category and not by execution time, see "Process Phases" to have them ordered by execution time. The handlers in this category - if defined in your CBB - are executed at each request at the specific Phase time and for each base class that defines them. (see "Overrunning") This handler is executed in the CB_INIT Phase (i.e. just after the creation of the new object) and it is internally called by the new() method. You can use it to initialize some properties or param of your application, or to connect with a DB. Note: The OH_init() handlers defined in different classes are executed with the same order as the CBB inclusion order. This handler is executed in the PRE_PROCESS Phase (i.e. at the very start of the process). You can use it to control AAA (Authentication and Authorization, and Access) and eventually switch_to() another page on failure. Note: The OH_pre_process() handlers defined in different classes are executed with the same order as the CBB inclusion order. This handler is executed in the PAGE_PROCESS Phase (i.e. after the SWITCH_HANDLER Phase, and just before the PAGE_HANDLER Phase) at each switching cycle. This is the only Overrun Handler that may be executed multiple times in the same process (i.e. each time the switch_to() method is internally or explicitly called and no Switch Handler has been set). You can use it e.g. to centrally handle page errors with a single handler. Note: The OH_pre_page() handlers defined in different classes are executed with the same order as the CBB inclusion order. This handler is executed in the FIXUP Phase (i.e. after the PAGE_HANDLER Phase, and just before the RESPONSE Phase). It gives the last chance to do things before the response is generated (e.g. modify the header or the page_content just before they are sent to the client). Note: The OH_fixup() handlers defined in different classes are executed with a reversed CBB inclusion order. This handler is executed in the CLEANUP Phase (i.e. after the RESPONSE Phase). At this Phase, the page has already been sent to the client, and you can use it to cleanup e.g. closing some opened DB connection or logging execution. Note: The OH_cleanup() handlers defined in different classes are executed with a reversed CBB inclusion order. These are the handlers called on a per page basis, i.e. each per Page Handler is called ONLY for a certain requested page. This handlers are prefixed by 'SH_' (i.e. Switch Handler). (e.g. If defined, the 'SH_foo' will be executed when the 'foo' page will be requested). You can use this handlers to check some condition just before the PRE_PAGE Phase so giving you the possibility to switch to another page before the execution of that phase. This handlers are prefixed by 'PH_' (i.e. Page Handler). (e.g. If defined, the 'PH_foo' will be executed when the 'foo' page will be requested). You can use this handlers to do something specific for different pages, such as e.g. executing some specific code just for that specific request (or creating the specific page content when your handler don't use any automagic template integration) This is a special Page Handler which will be called IF defined and IF there are no other defined page handler for the specific requested page and UNLESS the page_content_check() return true (i.e. there is no page content so far). The main purpose of this handler is giving you one more option to generate the page_content if no other handler has generated it so far, so you can use it e.g. as the last chance to redirect the client or switch_to your special 'Not found' page during the PAGE_HANDLER phase. You can also use the page_handler_map advanced accessor to map the AUTOLOAD handler to any method you prefer. Note: The execution of this handler is skipped by the presence of: If you need a wider solution you should use an OH_pre_page or an OH_fixup handler instead, which get always called without any restriction. In this section you can find all the most advanced or less used features that document all the details of the CBF. In most cases you don't need to use them, anyway, knowing them will not hurt. These constant are used to set and check the Process Phase. They return just a progressive integer: CB_INIT 0 GET_PAGE 1 PRE_PROCESS 2 SWITCH_HANDLER 3 PRE_PAGE 4 PAGE_HANDLER 5 FIXUP 6 RESPONSE 7 REDIR 8 CLEANUP 9 If you are using mod_perl, you should know the "Global Variables Persistence" issue: this is something that you must consider when your CBB is running under mod_perl, even when your CBB doesn't use Apache::CGI::Builder. More explicitly you should know that the CBF and its extensions may use Global Variables to store certain data which are class scoped (i.e. used for all the processes of your CBB class), thus caching the data and saving some processing. The Global Variables that the CBF uses are always accessed by an OOTool accessor, they are just Class Accessors instead of Object Accessors: the behaviour of a Class accessors (property or group) is the same, but the underlaying accessed variable is a Global Variable, and so it will behave under mod_perl. (See OOTools documentation if you want more details about the differences). Examples of Class Accessors are the "Class Property Group Accessors" of this module, or the tm, tm_new_args and tm_lookups_package accessors of the CGI::Builder::Magic extension (which creates the Template::Magic object just once -the first time it is accessed- and uses the same object for all the successive requests that involve template processing). Note: You should clearly distinguish the class accessors among the others because this particular feature is usually written in bold at the start of the accessor doc. This method executes the CODE (which can be a method name or a CODE ref) and returns a ref to the captured output, so allowing you to eventually test your sub classes, or doing something with the output (e.g. in a OH_fixup() when the page content is a CODE reference). $captured_output = $webapp->capture('process'); if ( $$captured_output =~ /something to test/ ){ print 'ÍT WORKS!' } sub OH_fixup { my $s = shift ; if (ref $s->page_content eq 'CODE') { # executes the referenced CODE and capture the output $s->page_content = $s->capture($s->page_content) } # do something with $s->page_content as usual } This method returs the current phase name or the name of the passed phase_number argument. You don't need to directly use any of these methods because they are used internally but you might need to override them in very special cases, so they are documented here. Used internally to set the page_name to the value of the cgi_page_param query parameter at the very start of the process. (e.g. this query parameter ?p=myPage will set the page_name to 'myPage') If you don't want to pass the page parameter as a query parameter, or if you have any other custom need you can override this method which should set the page_name as you need. Used internally to send the header to the client. This accessor is backed by the header() CGI function, so IF (and only if) you implement a different query object not based on CGI.pm, AND the object you use 'can' not "header", THEN you cannot use this method, so you need to override it. Used internally to send the page_content to the client. This method (not to be confused with the 'PH_AUTOLOAD' Page Handler) implements an handy param accessor. You can store or retrieve some param as it was an object property: # instead of do this $s->param(my_Param => 'some init value') # you can do this directly $s->my_Param = 'some init value' ; # same thing with the new() method $webapp = WebApp->new(my_Param => 'some init value') # or with the explicit assignation $webapp = WebApp->new(param => {my_Param => 'some init value', my_OtherParam => 'some data' } ) # and to retrieve it $p = $s->my_Param Note: If you don't like this feature, just override the AUTOLOAD method. If your application implements its own AUTOLOAD sub and you want to keep this possibility just fall back on the SUPER method when needed. Important Note: If you use this feature, and if you want to write code that does method is called at the very start of the RESPONSE phase. It checks if the page_content contains some content to be sent. A true returned value will send the page_content, while a false returned value will prevent the sending of the page_content, and will set the -status header to the value of the no_page_content_status property if no status header has ben set yet. The page_content_check() method is overridden by other extensions such as CGI::Builder::Magic, that checks also if the template file exists before using its template print method. This method is used also to handle the AUTOLOAD page handler, which will not be called unless there is no page_content so far. Used internally to implement a localized $SIG{__DIE__}. This method adds useful informations to the error messages (even to those generated by other used modules). It adds the page name and the phase at the moment of the error plus a Data::Dumper::Dumper() of the object itself if the CGI::Builder::Test is included in the build. If you need to implement your own $SIG{__DIE__} you should override this handler in your own CBB. The C::B module use the import() method to setup inheritance and overrunning of your CBB, and undefines the import() method in your CBB (to avoid inheritance and overrunning propagation). If for any very exotic reason you need to define an import method in your own CBB, you should define it BEFORE the definition of the build, or it will not work. Set to a true value, this property will prevent the sending of the header. Undefined by default. This Class property is used to supply the default -status header that the CBF send in the RESPONSE phase when the page_content is empty, but ONLY if the status header is not defined yet. The default of this property is '204 No Content', but other extensions (such as Apache::CGI::Builder) could set it otherwise. Internal read only property used to control the process and the exceptions. Don't override it unless you know exactly what you are doing!. The accessors in this section are Class Accessors, which are accessors to package variables (i.e. not instance variables) which are class scoped. Usually you sould use them at the start of the CBB code (and out of any handler or method). With this Class Accessor you can map some page name to a specific Page Handler: __PACKAGE__->page_handler_map ( thisPage => \&special_Phandler, thatPage => 'other_special_Phandler' ); With this Class Accessor you can map some page name to a specific Switch Handler: __PACKAGE__->switch_handler_map ( thisPage => \&special_Shandler, thatPage => 'other_special_Shandler' ); The purpose of this Class Accessor is giving you the possibility to override the automatic overrunning of CBF if you want to change the order (or skip) any Overrun Handler defined by some extension or super class. Consider this CBB: package My::WebApp; use CGI::Builder qw| My::SuperClassA # defines its own OH_init() and OH_cleanup() My::SuperClassB # defines its own OH_init() and OH_cleanup() My::SuperClassC # defines its own OH_init() and OH_cleanup() |; sub OH_init { ... } sub OH_cleanup { ... } In the CB_INIT Phase the following handlers will be automatically executed with this order: 1 My::SuperClassA::OH_init 2 | My::SuperClassB::OH_init 3 | | My::SuperClassC::OH_init 4 | | | My::WebApp::OH_init | | | | 5 | | | My::WebApp::OH_cleanup 6 | | My::SuperClassC::OH_cleanup 7 | My::SuperClassB::OH_cleanup 8 My::SuperClassA::OH_cleanup As you can see the OH_init() handlers are executed with the same order of the CBB inclusion order, while the OH_cleanup() execution order is reversed. This way it is created a sort of nested execution so that the class that first inits is the last that ends/destroys. See each handler description to know the execution order. If you want to change the execution order of the Overrun Handlers, you can use this class accessor to change that order: __PACKAGE__->overrun_handler_map ( init => [ 'My::SuperClassC', 'My::SuperClassB', 'My::WebApp', 'My::SuperClassA'] ); After that change the execution order of the handlers will be: My::SuperClassC::OH_init My::SuperClassB::OH_init My::WebApp::OH_init My::SuperClassA::OH_init Remember also that you can change the order of all the Overrun Handlers in a single step: __PACKAGE__->overrun_handler_map ( init => [ 'My::SuperClassC', 'My::SuperClassB', 'My::SuperClassA'], fixup => [ 'My::SuperClassB', 'My::SuperClassA']); Important Note: The keys of this accessor are the handler identifier WITHOUT the 'OH_' overrun handler constant prefix. All the examples in this section will use the following Instance Script that use a WebApp.pm CBB (differently organized in each example). In this example the script is supposed to be available at the url: #!/usr/bin/perl -w use My::WebApp ; $webapp = My::WebApp->new() ; $webapp->process() ; This is the classical example of a minimal output, that will produce a page content with just the "Hello world!" string in it (not a valid HTML page, but it's ok for our purpose). Obviously, without the CBF you could write the same script with less effort, but the usefulness of CBF comes up when the application become more complex: package My::WebApp; # your class name use CGI::Builder; # defines a build with no other extension sub PH_AUTOLOAD { # called for all requested pages (no other PH_*) my $s = shift; $s->page_content = "Hello world!" # defines the page content } 1; As you see in the CBB, it defines just the PH_AUTOLOAD, the special Page Handler that is automatically called when no other Page Handlers are found for the requested page (see "PH_AUTOLOAD"). All we have to do in that handler is set the 'page_content' property to the content we want to send to the client, and the CBF will manage automatically all the process. Suppose that we want to send the "hello world!" content just for the specific "Hello" page, while for each other page eventually requested, we want to redirect the client to another url: package My::WebApp; # your class name use CGI::Builder; # defines a build with no other extension sub PH_Hello { # called ONLY for page_name 'Hello' my $s = shift; $s->page_content = "Hello world!" # defines the page content } # first alternative # check the requested page in PRE_PROCESS Phase # redirect if page_name is not "Hello" sub OH_pre_process { my $s = shift; if ($s->page_name ne 'Hello') { return $s->redirect('') } } # second alternative # check the defined page content in FIXUP Phase # redirect if page_content has not been set yet (by any handler) sub OH_fixup { my $s = shift; return $s->redirect('') unless $s->page_content_check; } # third alternative sub PH_AUTOLOAD { my $s = shift; $s->redirect(''); } 1; As you see, we have changed the PH_AUTOLOAD with the PH_Hello that will be called only when the page_name is 'Hello', then, we have a few alternatives to choose for the redirection. The first alternative is very specific, and checks exactly for the 'Hello' page_name, so if we will add another Page Handler in the future, we have to modify accordingly the condition to avoid redirection. The second alternative is more flexible because it checks for the content of the page in the FIXUP Phase, after the PAGE_HANDLER Phase has been tried, redirecting only if no Page Handlers has set the page_content so far, so if we will add a new Page Handler in the future it will work without any changes. The third alternative is simpler since it uses the way the PH_AUTOLOAD get called, and just redirect without checking any condition (the conditions are internally checked BEFORE calling the PH_AUTOLOAD). Note: To request the page "Hello" the client should point to. Any other requested page as (e.g. ?p=myTry) will cause a redirection to. To add another page we just add another Page Handler:! :-)" } sub PH_AUTOLOAD { my $s = shift; return $s->redirect('') } 1; Note: To request the page "NiceHello" the client should point to. If instead of a client redirection we want to send a specific page internally generated, we could add a new Page Handler for that page, and/or change a little the OH_fixup:! :-)" } # first alternative sub PH_no_page { # internally called by the OH_fixup my $s = shift; $s->page_content = "The page you requested is not available!" } sub PH_AUTOLOAD { my $s = shift; $s->switch_to('no_page') # switches to the no_page Page Handler } # second alternative # you can eliminate the PH_no_Page Handler # and set the page_content directly from the PH_AUTOLOAD sub PH_AUTOLOAD { my $s = shift; $s->page_content = "The page you have requested is not available!" } 1; Note: Any requested page that does not produce any page_content as e.g. ?p=myTry, will print "The page you requested is not available!". Imagine a simple application that addresses 2 pages: a 'ShowForm' page that contains a form with just a field, and a 'Submitted' page that will show just a message confirming the submission. The form action of the ShowForm page is set to 'IScript.cgi?p=Submitted'. Note: We don't handle the error for this simple example, we just want to check whether the 'email' field is not empty, so showing the Submitted page, or re-send the ShowForm page in case the 'email' field is empty. package My::WebApp; use CGI::Builder; # this is the Page Handler that produce the form sub PH_ShowForm { my $s = shift; ... generates the form $s->page_content = $generated_page_with_form; } # add a Switch Handler for the Submitted page # that checks the 'email' query param and switches on failure sub SH_Submitted { my $s = shift; $s->cgi->param('email') or switch_to('ShowForm'); } # this is the Page Handler that confirms the submission sub PH_Submitted { my $s = shift ; $s->page_content = 'Thank you for filling the form'; } The 'SH_Submitted' handler will be automatically called when the page_name is 'Submitted' and just before calling the 'PH_Submitted' handler, so giving you the possibility to check some condition (i.e. the not empty 'email' field). The process will switch to the 'ShowForm' page on failure (so executing the PH_ShowForm'), or will execute the PH_Submitted on success. You could do the same by avoiding the use of the 'SH_Submitted' handler, by moving the switch condition inside the Page Handler itself. In this example it might appear that the elimination of the SH_Submitted method could produce a more clear code, but in real world jobs I find this is less clear, specially because sometimes a handler may contain a lot of conditions and mixing checking with page production is more confusing, anyway... in your applications this is up to you :-). package My::WebApp; use CGI::Builder; # this is the Page Handler that produce the form sub PH_ShowForm { my $s = shift; ... generates the form $s->page_content = $generated_page_with_form; } # this is the Page Handler that confirms the submission sub PH_Submitted { my $s = shift ; $s->cgi->param('email') or return switch_to('ShowForm') ; $s->page_content = 'Thank you for filling the form'; } In this case, notice the return switch_to() to return from the handler on switching. Note: You should consider to use the CGI::Builder::DFVCheck extension that integrates C::B and the Data::FormValidator module. You can find more examples in the mailing list archive and in the CBF_examples dir included in this distribution. Note: While you are experimenting with the CBF, you are probably creating examples that could be useful to other users. Please submit them to the mailing list, and I will add them to the next CBF release, giving you the credit of your code. Thank you in advance for your collaboration. As general guide, you should keep in mind the "Process Phases": almost all your code should go into some handlers, so decide when (in what Phase) you want it to be executed and define the specific handler you need. Also consider these points as a more detailed guide: OH_init()method that is executed even before the start of the process(), just after the creation of the new object # just assign to a new param $s->myNewParam = 'something' ; # without the need of doing this $s->param(myNewParam => ' something') ; OH_pre_process()that will switch_to()a login or similar page on failure switch_to()another page on failure. page_contentproperty inside it. page_contentproperty because it will be magically filled for you, so define just the Page Handlers that have something special to do (e.g. update some data in a DB) OH_fixup()as the last hook before the RESPONSE phase (when the page will be sent to the client). The page_contentproperty should already contain the content of the page and you can have the last chance to transform it or to change the header in some way. cleanup_handler()as the last hook of the process, to do cleanup after the page has been sent (e.g. close DB connection, log, etc.) Since this framework is implemented by inheritance of possibly many extensions, conflicting keys, methods and properties could become a real problem unless you follow some simple conventions. If you want to write forward/backward compatible CBF code please, consider this: paramaccessor to hold the param of your application. (Note: you have just to set some property and it will be added as a new param even without using the param accessor explicitly. See "AUTOLOAD" method) page_contentvalue to send the page to the client. Instead of print, just assign to header()and to page_name, page_pathand page_suffixunless you need to change the default in CBF_INIT Phase. Use switch_to to switch to another page. Writing an extension is usually simpler than what you might expect. Since extensions are included in the CBB as base classes, an extension could contain just a simple method of just a few line of code so you don't need to be a guru in order to contribute. The only real requirement is following this simple guide lines: # don't do this in your extension package sub _private_method { ... } # do this instead # ( it is overridable but 'private_method' will never clash ) sub Your::Package::_::private_method { ... } # if you want an alias to save typing my $private_method = \&Your::Package::_::private_method ; ... # use it as usual $s->$private_method() ; require Foo::Bar ; $res = Foo::Bar::special_function(@args) ; fooproperty, a foo_new_args()property group accessor and eventually a foo_new()method to allow overriding. With OOTools it is very simple: # this creates a property group accessor for foo_new_args # already containing some default arguments which can be overridden use Object::groups ( { name => 'foo_new_args', # default can be an HASH ref # or a sub returning an HASH ref default => { arg1 => 'some value', arg2 => 'some other value' } } ) ; # this will create a foo property that will # call the foo_new to initialize the object, # just before using the object and only if the object # has not been created yet use Object::props ( { name => 'foo', default => sub{ shift()->foo_new(@_) } } ) ; # this creates the object and allows to override the method sub foo_new { my $s = shift; return Foo->new( $s->foo_new_args ) } $s->isa('Apache::CGI::Builder'); checking $ENV{MOD_PERL}or $mod_perl::VERSIONwould tell you just that mod_perl is running. $Carp::Internal{+__PACKAGE__}++ ; No exception will blame your module and your user will have always a meaningful feedback indicating a line of his CBB. Due to the perl bug #17663 (Perl 5 Debugger doesn't handle properly lvalue sub assignment), you must know that under the -d switch the lvalue sub assignment will not work, so your program will not run as you expect. Since version 1.33 the CBF and its extensions don't internally use any lvalue sub assignment although they are fully supported if you decide to use them in your code.. You can obtain free support, by using the cgi-builder-users mailing list. Before posting, please: © 2004 by Domizio Demichelis () All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as perl itself. Thanks to these people which - in very different ways - have been somehow helpful with their feedback, suggestions or criticism:
http://search.cpan.org/dist/CGI-Builder/lib/CGI/Builder.pm
crawl-003
refinedweb
9,005
56.49
I've been looking for a way to open a text file with a text editor I made with python, and assumed it had something to do with system arguments, so made a simple application which would write the arguments sent by the system to a text window, and used "open with" on the text file and application, but the only argument was the path of the application. Many questions similar to mine have been answered on here but none of the answers have worked for me. How would I do this? Thanks for any responses. (I'm using OS X 10.9.5, with python 2.7) Tried code: from Tkinter import * import sys, time root = Tk() root.geometry('300x200') text = Text(root) text.pack(side=TOP, fill="both", expand=True) text.insert(END, sys.argv) for x in xrange(len(sys.argv)): text.insert(END,sys.argv[x]) root.mainloop() If I understand your question correctly, you are talking about opening a file with the Finder's Open with context menu when clicking on a file. If so, it's probably a duplicate of MacOSX - File extension associate with application - Programatically. The standard way is to create an OS X app bundle (for Python programs, you can use py2app to do that) and then set proper key type in its Info.plist. That's assuming your text editor is a true GUI app (uses Tkinter or Cocoa or whatever) and not just a program that runs in a shell terminal window (in Terminal.app for example). In that case, you might be able to create a simple wrapper app (even using AppleScript or Automator and modifying its Info.plist as above) to launch your Python program in a terminal window and pass in the file name from the open event. To properly handle multiple files opened at different times would require more work. UPDATE: as you have clarified, you are using Python Tkinter and a real GUI app. The native OS X Tk implementation provides an Apple Event handler to allow you to process Apple Events like Open Document. The support is described in tcl terms in the Tcl/Tk documentation so you need to translate it to Python but it's very straightforward. Python's IDLE app has an example of one, see, for instance, addOpenEventSupport in macosxSupport.py. For simple apps using py2app, you could instead use py2app's argv emulation.
https://codedump.io/share/3rmvLWuxuQWZ/1/using-quotopen-withquot-on-a-text-file-with-a-python-application
CC-MAIN-2018-26
refinedweb
405
63.7
This is your resource to discuss support topics with your peers, and learn from each other. 01-05-2013 05:43 PM Hi everyone, I have an issue I'm getting on both my VM bb10 and Dev Alpha (upgraded with the recent OS upgrade in late november: Autoload-DevAlpha-10.0.09.1103.exe). Based on the fact I am trying to create 2 seperate versions of a hopefully awesome app I'm developing just for Blackberry, I did what someone in another thread mentioned to do (sorry I forget the person's name) and I am using direct library links and not including SDK automatically based on platform so I can develop variations of a BB10 and PB version at roughly the same time. I am using FB 4.6 as part of CS6. I tried to go with 4.7 but I gave up because 4.6 is still working just fine for me. This approach worked outstanding for my previous PB app that I published and allowed me to still have a seperate project that work (at least initially) properly with BB10. However, the second I change to the BB10 sdk 3.0 libraries and referrence those files it fails for me with this: TypeError: Error #1007: Instantiation attempted on a non-constructor. at qnx.fuse.ui.theme::ThemeWhite/createCSS()[E:\hudso n\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnn\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\qn x\fuse\ui\theme\ThemeWhite.as:25] at qnx.fuse.ui.theme::ThemeWhite()[E:\hudson\workspacx\fuse\ui\theme\ThemeWhite.as:25] at qnx.fuse.ui.theme::ThemeWhite()[E:\hudson\workspac e\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\e\BB10_0_04-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\ theme\ThemeWhite.as:20] at qnx.fuse.ui.theme::ThemeGlobals$/getTheme()[E:\hudtheme\ThemeWhite.as:20] at qnx.fuse.ui.theme::ThemeGlobals$/getTheme()[E:\hud son\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\son\workspace\BB10_0_04-AIR_SDK_API\src\qnxui\src\ qnx\fuse\ui\theme\ThemeGlobals.as:246] at qnx.fuse.ui.theme::ThemeGlobals$/lookupStyle()[E:\qnx\fuse\ui\theme\ThemeGlobals.as:246] at qnx.fuse.ui.theme::ThemeGlobals$/lookupStyle():189] at qnx.fuse.ui.theme::ThemeGlobals$/lookupValue()[E:\rc\qnx\fuse\ui\theme\ThemeGlobals.as:189] at qnx.fuse.ui.theme::ThemeGlobals$/lookupValue():201]rc\qnx\fuse\ui\theme\ThemeGlobals.as:201] This has happened to 2 seperate very simple applications I have tried to use. One where the said code below in question was placed on a Sprite and another where it was placed on a Container control. As background, here are the other important settings: Libraries included: Flex 4.6.0 *Air Global.swc *core.swc *osmf.swc *textLayout.swc *servicemonitor.swc Referenced Libraries *qnx-air.swc - C:\Program Files (x86)\Research In Motion\blackberry-tablet-sdk-3.0.0\frameworks\libs *blackberry.swc - C:\Program Files (x86)\Research In Motion\blackberry-tablet-sdk-3.0.0\frameworks\libs *qnxmedia.swc - C:\Program Files (x86)\Research In Motion\blackberry-tablet-sdk-3.0.0\frameworks\libs *qnxui.swc - C:\Program Files (x86)\Research In Motion\blackberry-tablet-sdk-3.0.0\frameworks\libs *QNXSkins.ane - C:\Program Files (x86)\Research In Motion\blackberry-tablet-sdk-3.0.0\frameworks\libs I also have included the other 3 ANE files and have made sure they are included with a checkbox for the build. Here is the includes: (Rest of .ane files in qnx ane folder are also loaded with same path) And here is the base code I'm taking from the examples: Includes: import qnx.fuse.ui.buttons.Button; import qnx.fuse.ui.buttons.LabelButton; import qnx.fuse.ui.buttons.SegmentedControl; import qnx.ui.data.DataProvider; import qnx.fuse.ui.text.TextFormat; import flash.text.TextFormatAlign; import qnx.fuse.ui.skins.SkinStates; And code that actually fails when trying to generate this: var buttonArray:Array=[]; buttonArray.push({label:"AM"}); buttonArray.push({label:"FM"}); buttonArray.push({label:"HD"}); // create a segemented control var mySegment:SegmentedControl = new SegmentedControl(); mySegment.x = 200; mySegment.y = 200; mySegment.width = 200; //); This fails with either control commented out but does not fail when both are commented. Do I need to still include some of the SDK 2.1 files? Am I just missing something mega obvious? Hopefully I am. Thanks for any help! 01-05-2013 06:03 PM 01-05-2013 06:17 PM - edited 01-05-2013 06:18 PM No I do not have any of the SDK 2.1 libraries in this case. I luckily learned my lesson a while back for not having the following code there to prevent null stage: <main app class> { ..... addEventListener(Event.ADDED_TO_STAGE,handleAddedT oStage); } private function handleAddedToStage(e:Event):void { removeEventListener(Event.ADDED_TO_STAGE,handleAddoStage); } private function handleAddedToStage(e:Event):void { removeEventListener(Event.ADDED_TO_STAGE,handleAdd edToStage); // stage is avail, we can now listen for real events initializeUI(); }edToStage); // stage is avail, we can now listen for real events initializeUI(); } If anything I may have to just settle for 2.1 dev for now and just forget about trying to be a "good" app that will fall under the 10k and other numerous benefits that BB has put out for us. 01-05-2013 07:35 PM Oh sorry I didn't answer the last part. I did some more research. It looks like it's crashing even when I simply declare a variable as say a segmented control. So my guess is, it's failing when it loads the SDK libraries because if I gather correctly from everything, flash only includes/loads libraries when it's actually used (such as a variable etc). 01-05-2013 08:21 PM 01-05-2013 09:27 PM First, before I answer, thanks a lot helping me try to work this through. As for the project, it's completely 100% new. Create project, add SDK 3.0 referrences when creating the project and adding those small snippets of code. I had the same issue with another project i had earlier so I decided to start completely new in case i'm doing something wrong. But followed everything according to everything i've read and it still fails. Maybe this is ok for now, can you tell me how much improved 3.0 is vs 2.1? Thanks again. 01-06-2013 09:36 AM 01-06-2013 09:51 AM The following worked fine: package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import qnx.fuse.ui.buttons.LabelButton; import qnx.fuse.ui.buttons.SegmentedControl; import qnx.ui.data.DataProvider; public class SampleApp extends Sprite { public function SampleApp() { super(); // support autoOrients stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; this.addEventListener(Event.ADDED_TO_STAGE, handleAddedToStage ); } private function handleAddedToStage(e:Event):void { this.removeEventListener(Event.ADDED_TO_STAGE, handleAddedToStage); this.initUI(); } private function initUI() : void { var buttonArray:Array=[]; buttonArray.push({label:"AM"}); buttonArray.push({label:"FM"}); buttonArray.push({label:"HD"}); // create a segemented control var mySegment:SegmentedControl = new SegmentedControl(); mySegment.setPosition( 200, 200 ); mySegment.width = 400; //); } } } Personally, All UI elements should go into a "page" and pages added and removed to the root display and not the stage. Above code the addChild(...) calls should use "this" instead of "stage" so the elements are being added to the root sprite and not directly to the stage. 01-06-2013 09:52 AM 01-07-2013 02:44 AM Yeah, I just didn't really take notice on the simulator. I launched 2.1 on the dev alpha and wow, this is going to cause problems. I couldn't even really use it it's so small. I am going to look into a full reinstall of flash and the SDK's with completely new projects (only my RIM keys will be kept). Hopefully this works, and if I cannot fix this and/or resize the controls for the different resolution, I may have to end up making my own controls for certain things. It's the weekend, but was hoping one of the RIM genies could shed some light on it. Thanks again jtegen, you have helped a lot of the people i have noticed on these forums.
https://supportforums.blackberry.com/t5/Adobe-AIR-Development/BB10-Air-Dev-Alpa-and-VM-Run-Time-Error-with-SDK-3-0/m-p/2077351
CC-MAIN-2017-04
refinedweb
1,362
52.36
I am totally new to python and I already struggle with a fairly small task. I have a wordlist, in which I want to count the (duplicate) words, show the top "n" words and in case of a tie, order them alphabetically. For the first two parts I wrote this: def count_words(s, n): # TODO: Count the number of occurences of each word in s wordlist = s.split() #Count words counts = Counter(wordlist) #Get top n words top_n = counts.most_common(n) return top_n print count_words("cat bat mat cat cat mat mat mat bat bat cat", 3) [('mat', 4), ('cat', 4), ('bat', 3)] [('cat', 4), ('mat', 4), ('bat', 3)] Try top_n.sort(key=lambda x: (-x[1], x[0])) right before the return. It sorts by the first element of the key, then, if there's a tie, by the second. Since it sorts from smallest to biggest, the first value is multiplied by -1.
https://codedump.io/share/Y2tp1mRz6Z2h/1/order-list-by-occurance-and-alphabetical-if-tied
CC-MAIN-2018-26
refinedweb
155
78.69
I have a generic Id<T: HasId> string T Id<T> T const i :Id<Car> = p.id declare interface HasId { id: string, }; type Id<T: HasId> = string; type Person = { id: Id<Person>, name: string, }; type Car = { id: Id<Car>, make: string, model: string, }; const p :Person = { id: '1234', name: 'me' } const c :Car = p; // Causes a Flow error, good! const c :Id<Car> = p.id; // I want this to cause a Flow error, // but currently it doesn't. type Vehicle = | Car | Motorcycle ; const t :Car = { id: '5678', make: 'Toyota', model: 'Prius' }; const v :Id<Vehicle> = c.id; // Currently does not cause Flow // error; I want to keep it that way. I did some experimentation and found a way to do what I specified in the question based on the system shown in this GitHub issue comment and the one following it. You can use a class (with a generic type parameter T) which Flow treats an opaque type, and use casting to any in order to convert between string and ID. Here are some utilities that enable this: // @flow import { v4 } from 'node-uuid'; // Performs a "type-cast" from string to Id<T> as far as Flow is concerned, // but this is a no-op function export function stringToId<T>(s :string):Id<T> { return (s :any); } // Use this when you want to treat the ID as a string without a Flow error export function idToString(i :Id<*>):string { return (i :any); } export function createId<T>():Id<T> { return stringToId('1234'); } // Even though all IDs are strings, this type distinguishes between IDs that // can point to different objects. export class Id<T> {}; With these utilities, the following code (similar to the original code in my question) will result in a Flow error, like I wanted. // @flow const p :Id<Person> = createId<Person>(); // note: Even though p is Id<Person> in Flow, its actual runtime type is string. const c :Id<Car> = p; // this causes Flow errors. Yay! // Also works without an explicit annotation for `p`: const pp = createId<Person>(); const cc :Id<Car> = pp; // also causes Flow errors. Yay! The Flow output is unfortunately quite verbose, since type errors like this trigger multiple Flow errors. Even though the output isn't ideal, at least it behaves correctly in that making an error causes Flow to report an error. Another issue is that with this solution, you have to explicitly convert from ID to string in cases such as object/map keys where Flow is not expecting an Id<*>, like this example: // @flow type People = { [key :string]: Person }; const people :People = {}; const p :Id<Person> = createId<Person>(); people[p] = createPerson(); // causes Flow error // Unfortunately you always have to do this: people[idToString(p)] = createPerson(); // no Flow error These type conversion functions are just no-ops at runtime since all the Flow types are stripped out, so there may be a performance penalty if you call them a lot. See the GitHub issue I linked in this answer for some more discussion. Note: I'm using Flow v0.30.0.
https://codedump.io/share/LUKwPBKEwjEG/1/flowtype-generic-idlttgt-type-with-similar-constraints-to-the-type-argument-passed-in
CC-MAIN-2016-50
refinedweb
509
53.75
What is Code-Behind in ASP.net By: Dan Hurwitz and Jesse Liberty Printer Friendly Format. This new class derives from the class identified in the inherits keyword, which in turn derives from System.Web.UI.Page. Now the only question is, "How does the compiler know where to find this code-behind file class to derive from?" The answer depends on whether or not you are working in the Visual Studio .NET (VS.NET) IDE or using a text editor to work directly with the source files. If you're working in the VS.NET IDE, then the development environment will automatically pre-compile the class in the code-behind file and use the inherits attribute to point to that class. The .dll file that is created is placed in the \bin subdirectory in the application virtual directory. You will notice that VS.NET also puts a codebehind attribute in the Page directive, which points to the code-behind file. The codebehind attribute is used to keep track of the code-behind file so that as you make changes to the page, VS.NET can make the appropriate changes to the code-behind file. Using VS.NET will be covered in more detail later in this chapter. If you are not using a development environment such as VS.NET, but rather editing the files directly in a text editor, then you need to include the src attribute in the Page directive to identify the file containing the class specified in the inherits attribute for the JIT compiler: <%@ Page inherits="CodeBehindDemo" src="CodeBehind.cs" %> If the src string does not include a fully qualified path, then the compiler assumes that the file is in the same directory as the .aspx file. If the src attribute is missing, then the compiler will look in the \bin subdirectory of the application virtual directory for a .dll that contains the class marked with the inherits attribute. In order to convert an .aspx file from in-line code to code-behind, you need to make modifications both to the .aspx file as well as to the code-behind file, as follows: - Modifications to the .aspx file The .aspx file needs to have its Page directive modified to include the inherits attribute. Optionally, the Page directive must be modified to include the src attribute. - Modifications to the code-behind file The code-behind file does not automatically inherit the common namespaces used in web forms. The code-behind file itself must tell the compiler which namespaces it needs with the using keyword in C# and the Imports keyword in VB.NET. The class you create must inherit from the System.Web.UI.Page class. Every control in the .aspx file referred to by name (id) in the code-behind file must have an accessible variable (declared using either the public or protected access modifier) defined in the code-behind class. The variable type must be the same as the control type, and the variable name must match the control name. All methods in the code-behind class that are called directly from the .aspx file must be declared as either public or protected methods (that is, using the public or protected access modifiers).. quite simle to understand. thanks for your explana View Tutorial By: tapan at 2011-09-29 05:49:48
https://java-samples.com/showtutorial.php?tutorialid=1084
CC-MAIN-2020-29
refinedweb
557
56.45
I am trying to do a very simple calculation on a raster. I have done this kind of work many times, but I can't figure out what has gone wrong this time around. import arcpy, numpy from arcpy import env from arcpy.sa import * import time start_time = time.time() arcpy.CheckOutExtension("Spatial") env.overwriteOutput = True env.workspace = "G:/GIS Data/DMSPOLSRC/Radiance_Calibrated" arcpy.env.scratchWorkspace="G:/GIS Data/scratch" #1996 inRaster1 = arcpy.Raster("F12_19960316-19970212/F12_19960316-19970212_rad_v4.avg_vis.tif") outRaster="rescaled/f1296rsc" tempRaster=0.915*inRaster1 outCon = Con((inRaster1 ==0), 0 , 4.336+tempRaster) outCon.save(outRaster) print time.time() - start_time, "seconds, f121996completed" Python returns the following error message Traceback (most recent call last): File "G:\GIS Data\DMSPOLSRC\Radiance_Calibrated\rescaling.py", line 16, in <module> outCon.save(outRaster) RuntimeError: ERROR 999998: Unexpected Error. In other words something is going wrong when it tries to save the raster. I cant figure out for the life of me whats happening. I should note the following a) If I comment out the problematic line, it moves on and prints the time taken. In other words, it seems like there i no problem with the raster calculation itself. b) If I go into ArcMap and use the raster calculator there, there is no problem if I save the outRaster to an existing geodatabase folder. However, it will return the following error when I try to save it to the target folder above: Messages Executing: RasterCalculator Con("F12_19960316-19970212_rad_v4.avg_vis.tif"==0,0, 4.336+0.915 * "F12_19960316-19970212_rad_v4.avg_vis.tif") "G:\GIS Data\DMSPOLSRC\Radiance_Calibrated\rescaled\f121996rsc" Start Time: Fri Jun 22 11:26:13 2018 Con(Raster(r"F12_19960316-19970212_rad_v4.avg_vis.tif")==0,0, 4.336+0.915 * Raster(r"F12_19960316-19970212_rad_v4.avg_vis.tif")) ERROR 000539: Error running expression: rcexec() Traceback (most recent call last): File "<expression>", line 1, in <module> File "<string>", line 8, in rcexec RuntimeError: ERROR 999998: Unexpected Error. Failed to create raster dataset Failed to execute (RasterCalculator). Failed at Fri Jun 22 11:26:14 2018 (Elapsed Time: 0.85 seconds) I am running ArcGis Desktop 10.6 and the python version is 2.7.14 (which comes with ArcGis). Thanks spaces, dots, dashes and slashes I suspect. It is not clear from your workspace setting whether "F12_19960316-19970212/F12_19960316-19970212_rad_v4.avg_vis.tif") is a folder within a folder within the workspace, it has a slash, a dash and a double dot (the last is needed but 4.avg isn't Try a simpler workspace on a local drive with simpler names
https://community.esri.com/thread/216877-error-999998-when-saving-a-raster-after-con
CC-MAIN-2019-13
refinedweb
425
60.11
There has been substantial progress in the development of myrrh since the previous blog article. Development has focused primarily on the implementation of myrrh’s support for Remote Procedure Calls (RPC) which can be issued by external applications. Some of myrrh’s new features are listed below: - myrrh currently contains both a JSON decoder and encoder, which are both nearly fully compliant to the JSON standard. JSON support enables external applications to encode their request in a JSON object and send it through the established TCP/IP connection - A VNC server has been implemented (so as to void the necessity of having one run myrrh on his or hers local system in order to see the screen output) - There are many more remote procedure calls available to the client (thus enabling the client to exercise even more freedom over the emulated system) - Breakpoints can now be grouped in combinations - Full support for requesting register values of both before and after hitting a breakpoint - The phasing out of myrrh’s internal debugging console has commenced while having added an implementation of a similar console written entirely in Python has been added to the project’s design goals. Eventually myrrh will work as a “headless” emulation server. I will now focus on several Python scripts for interaction with myrrh that I have written. These examples focus on the dynamic or runtime analysis of binary code. A script to generate control-flow graphs I’ll start out with this assembly language program: global main main: mov cx, 5 first: push cx mov cx, 10 second: loop second pop cx loop first jmp main function: nop ret I compile it and save it to program.bin. Now, consider the following Python script: import myrrh import json import matplotlib.pyplot as plt import networkx as nx def create_edge_data(previous): if previous == False: address = m.get_absolute_address() else: address = m.get_absolute_address_p() datastr = hex(address) disasm = json.loads(m.disassemble(address, 1))["ReturnValues"]["1"] datastr = datastr + " (" + disasm + ")" return datastr G = nx.Graph() # Create a class instance m = myrrh.myrrh() # Connect to the myrrh server m.connect("localhost", 5000) # Configure (do not load bioses and ROM Basic) print m.configure(m.EXEC_FLAG_NONE) print m.start() # Load the binary at absolute address 0 print m.load_binary(0x0000, "program.bin") # Let CS:IP point to absolute address 0 print m.set_register_value(m.R_CS, 0x0000) print m.set_register_value(m.R_EIP, 0x0000) # Set a breakpoint on every type of branch m.set_breakpoint_branch(m.BRANCH_FLAG_ALL) print "Collecting branch node data, please wait.." # Encounter a branch 1000 times for x in range(0, 1000): # Retrieve the current CS and EIP fromtotal = create_edge_data(False) # Run until a breakpoint is encountered m.run() # Breakpoint encountered; we want to know the CS and EIP values # of before the branch, hence CS_p(revious)() and EIP_(previous)() tototal = create_edge_data(True) print str(x) + "|" + fromtotal + " - " + tototal # Add it to the graph G.add_edge(fromtotal, tototal) # Now graph a line from the previous position to the current position # (ie. the position where the branch jumped to) fromtotal = tototal tototal = create_edge_data(False) G.add_edge(fromtotal, tototal) print "Done" # Call the exit function of myrrh to make it halt m.exit() # Draw the graph pos=nx.spring_layout(G, scale=3) # nodes nx.draw_networkx_nodes(G,pos,node_size=60) # edges nx.draw_networkx_edges(G,pos, width=1) # labels nx.draw_networkx_labels(G,pos,font_size=35,font_family='sans-serif') plt.axis('off') plt.savefig("myrrh_code_path.png") # save as png plt.show() # display As you can see the script above puts a breakpoint on every type of branch. A branch can be JMP, CALL, RET and so forth: anything that alters (E)IP. Within the block of code that is looped a thousand times, it gathers the location of the code (CS:IP) of when before the running was started and the location of the code right before it branched. These two points are added using add_edge. Then the points from right before the code branched to the current CS:IP (where it branched to) are recorded. This way we get a nice graph of the code’s code paths: Let’s modify the assembly language program slightly: [assembly] global main main: mov cx, 5 first: push cx mov cx, 10 second: call function loop second pop cx loop first jmp main function: nop ret [/assembly] As you can see a call to ‘function’ was added in the inner loop of the program. When we run the script now, the image it produces is as follows: Although this is a simple Python script that uses a very basic assembly language program, it does show the power of scripting the emulator: it enables one to yield data and produce interesting results with very few lines of code. Runtime detection of self-modifying code Now for a more advanced example. Consider the following program: [assembly] global main org 0x1000 main: mov cx, 5 first: push cx mov cx, 10 second: mov byte [thenop], 0x90 call function loop second pop cx loop first inc byte [abyte] jmp main abyte db 0 function: thenop db 0 ret [/assembly] And consider the following Python script: import myrrh import json def format_current_instruction(previous = False): if previous == False: addr = m.get_absolute_address() else: addr = m.get_absolute_address_p() disasm = m.disassemble(addr, 1) line = hex(addr) + " - " + json.loads(disasm)["ReturnValues"]["1"].lower() return line def load_program(): m.reboot() # Load the binary at absolute address 0 m.load_binary(0x1000, "program.bin") # Let CS:IP point to absolute address 0 m.set_register_value(m.R_CS, 0x0000) m.set_register_value(m.R_EIP, 0x1000) def find_code_bytes(): load_program() code_bytes = () for x in range(1000): addr = m.get_absolute_address() code_bytes = code_bytes + (addr, ) m.run(1) code_bytes = tuple(set(code_bytes)) return code_bytes def has_self_modifying_code(code_bytes): load_program() for code_byte in code_bytes: m.set_breakpoint_memory_write(code_byte, code_byte) self_modifying_instructions = () found = False for x in range(1, 100): runreturn = json.loads(m.run(1000)) if "ReturnValues" in runreturn: self_modifying_instructions = self_modifying_instructions + (format_current_instruction(True), ) found = True self_modifying_instructions = tuple(set(self_modifying_instructions)) return (found, self_modifying_instructions) def find_reads_writes(): load_program() m.set_breakpoint_memory_read(0x00000, 0xFFFFF) m.set_breakpoint_memory_write(0x00000, 0xFFFFF) reads = [] writes = [] for x in range(0, 1000): X = json.loads(m.run()) line = format_current_instruction(True) if X["ReturnValues"]["1"] == 1: reads.append(line) else: writes.append(line) reads = list(set(reads)) writes = list(set(writes)) m.delete_breakpoint(1) m.delete_breakpoint(2) return (reads, writes) m = myrrh.myrrh() m.connect("localhost", 5000) m.configure(0) m.start() reads, writes = find_reads_writes() print "Reads occurred from these addresses:" print for X in reads: print X print print "Writes occurred from these addresses:" print for X in writes: print X print code_bytes = find_code_bytes() contains, disasm = has_self_modifying_code(code_bytes) if contains == True: print "Contains self-modifying code:" print for line in disasm: print line else: print "Does not contain self-modifying code" m.exit() I will now explain its functioning. First, after a connection with the myrrh server has been established, the script gathers a list of addresses from which reads and another list from which writes occurred. This is accomplished by putting both a memory read breakpoint and a memory write breakpoint on the entire emulated memory. Using a loop, the code is run a thousand times, and each time a breakpoint is hit it is recorded whether either a read or a write occurred. These lists are returned to the caller and its contents is output to the screen. Then a list of addresses which contain code that is actually executed during the program’s lifetime is gathered. This is done by stepping (running a single instruction) a thousand times and recording the CS:IP each time. The resulting list is purged from duplicates and returned to the caller. The function has_self_modifying_code() will then put a write breakpoint on all the code bytes. If the program should try to modify its own code, the breakpoint is triggered. Finally a list of instructions that cause the modification of code is returned to the caller. If I compile the assembly language program listed above to program.bin and run the Python script above, the following output is displayed: Reads occurred from these addresses: 0x101c - ret 0x1011 - pop cx Writes occurred from these addresses: 0x100c - call 000c 0x1014 - inc [101a] 0x1003 - push cx 0x1007 - mov [101b], 90 Contains self-modifying code: 0x1007 - mov [101b], 90 Notice that: [assembly] inc byte [abyte] [/assembly] is not flagged as being code-modifying code since abyte is never executed. Again, this Python script again demonstrates the ease (and conciseness of the script) with which dynamic analysis on binaries can be performed, a goal that would likely result in a much more tedious effort using other methods or software. P.S. I am aware of the fact that the code above does not detect code that modifies code bytes that are not the first byte of an instruction, but it would be easy to modify for such a purpose and the script above serves only as a proof of concept.
https://guidovranken.com/2013/03/01/dynamic-binary-analysis-using-myrrh/
CC-MAIN-2021-25
refinedweb
1,476
53.92
I am using Reportlab to create some graphs in my PDF reports. I was creating an Area Line Plot and got stuck at a point where I am not able to understand why am I not getting the output I would like to see. Here is the code I had written for my output: def standardLinePlot(data, width=200, height=200): d = Drawing(width, height) lp = AreaLinePlot() lp.data=data lp.width, lp.height = width, height lp.xValueAxis.valueMin = 0 lp.xValueAxis.valueMax =36 lp.xValueAxis.valueSteps = [0,6,12,18,24,30,36] lp.yValueAxis.valueMin = 0 lp.yValueAxis.valueMax =100 lp.strokeColor=colors.black lp.fillColor=colors.grey lp.reversePlotOrder = False lp.joinedLines=1 d.add(lp) return d To define the color for the lines it seems you need to access... well, the lines :). So, lp.lines[0].strokeColor = colors.grey instead of lp.strokeColor = colors.grey, as that one goes for the plot background color! The question about the labels is a bit more tricky, though... ScatterPlot includes functionality to set labels for X and Y axis, but that's not the case for AreaLinePlot. Of course, you could derive a class from AreaLinePlot copying that functionality, if you're going to use it often.
https://codedump.io/share/UU52gJOVZUWY/1/area-line-plot-in-python-using-report-lab
CC-MAIN-2017-04
refinedweb
209
53.07
Top React Hooks —File Drop, Audio and Clicks Hooks contains our logic code in our React app. We can create our own hooks and use hooks provided by other people. In this article, we’ll look at some useful React hooks. react-use The react-use library is a big library with many handy hooks. The useAudio hook creates an audio element. It tracks the state and exposes playback controls. For instance, we can write: import React from "react"; import { useAudio } from "react-use";export default function App() { const [audio, state, controls, ref] = useAudio({ src: "", autoPlay: true }); return ( <> {audio} <pre>{JSON.stringify(state, null, 2)}</pre> <button onClick={controls.pause}>Pause</button> <button onClick={controls.play}>Play</button> <button onClick={controls.mute}>Mute</button> <button onClick={controls.unmute}>Un-mute</button> <button onClick={() => controls.volume(0.1)}>Volume: 10%</button> <button onClick={() => controls.volume(0.5)}>Volume: 50%</button> <button onClick={() => controls.volume(1)}>Volume: 100%</button> <button onClick={() => controls.seek(state.time - 5)}>-5 sec</button> <button onClick={() => controls.seek(state.time + 5)}>+5 sec</button> </> ); } to use the useAudio hook. The argument is the object with the audio URL and autoPlay option. controls has the methods to control the audio playback. state has the audio playing state. The state includes the time, duration, paused, muted, and volume. The useClickAway hook lets us trigger a callback when the user clicks outside the target element. For example, we can write: import React from "react"; import { useClickAway } from "react-use";export default function App() { const ref = React.useRef(null); useClickAway(ref, () => { console.log("clicked outside"); }); return ( <div ref={ref} style={{ width: 200, height: 200, background: "green" }} /> ); } to use the hook. useClickAway takes a ref for the element to watch ad a callback that runs some code when we click outside that element. We also pass in the ref to the element we want to watch the clicks outside so that we can watch for clicks outside. The useCss hook lets us change CSS dynamically in our app. To use it, we can write: import React from "react"; import { useCss } from "react-use";export default function App() { const className = useCss({ color: "green", border: "1px solid green", "&:hover": { color: "blue" } }); return <div className={className}>Hover me</div>; } Then useCss hook takes an object with some styles in it. It returns the className which we can use to style our component. We can use the useDrop hook to get the file that’s dropped into the container. For instance, we can write: import React from "react"; import { useDrop } from "react-use";export default function App() { const state = useDrop({ onFiles: files => console.log("files", files), onUri: uri => console.log("uri", uri), onText: text => console.log("text", text) }); return ( <div style={{ width: 200, height: 200, background: "orange" }}> Drop file here </div> ); } The useDrop hook takes an object with some properties. onFiles has the files object as the parameter and we can do things with it. files has the files that have been dropped into the element. onUri runs when we drop a URL and onText runs when we drop some text in there. Conclusion The react-use package has hooks to let us create audio elements, listen to clicks outside, and listen to file drops.
https://hohanga.medium.com/top-react-hooks-file-drop-audio-and-clicks-e5fdeb91bcd7
CC-MAIN-2021-25
refinedweb
539
59.4
import "golang.org/x/net/http2/h2c" Package h2c implements the unencrypted "h2c" form of HTTP/2. The h2c protocol is the non-TLS version of HTTP/2 which is not available from net/http or golang.org/x/net/http2. NewHandler returns an http.Handler that wraps h, intercepting any h2c traffic. If a request is an h2c connection, it's hijacked and redirected to s.ServeConn. Otherwise the returned Handler just forwards requests to h. This works because h2c is designed to be parseable as valid HTTP/1, but ignored by any HTTP server that does not handle h2c. Therefore we leverage the HTTP/1 compatible parts of the Go http library to parse and recognize h2c requests. Once a request is recognized as h2c, we hijack the connection and convert it to an HTTP/2 connection which is understandable to s.ServeConn. (s.ServeConn understands HTTP/2 except for the h2c part of it.) Package h2c imports 16 packages (graph) and is imported by 29 packages. Updated 2019-08-14. Refresh now. Tools for package owners.
https://godoc.org/golang.org/x/net/http2/h2c
CC-MAIN-2019-35
refinedweb
179
66.84
0 digiguy 7 Years Ago hello all; i'm having a problem with my output. the program that i'm writing is supposed to take a number input than display the output as asterisks. so if the input is 4 the output should be: * ** *** **** however, i'm just getting a single column of asterisks. i know its late and i'm probably making a mental err. thanks for the help: #include <iostream> #include <iomanip> using namespace std; int main() { int input_1; int count; input_1 = 0; count = 0; cout<< "Enter any positive number : "; cin>>input_1; cout<< input_1 << endl; //this is to test the input only //need to verify for a positive number and make sure that letters are not used for (count = 0; count < input_1; count++) { for (count = 0; count < input_1; count++) cout<< " * " <<endl; } return 0; } c++ Edited 7 Years Ago by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
https://www.daniweb.com/programming/software-development/threads/263561/help-with-output
CC-MAIN-2017-26
refinedweb
158
57.34
#include <Bridge.h>#include <Process.h>const int int1Pin = 2; // interrupt line goes here// A variable changing within an interrupt must be declared as volatile.volatile int cnt;int cnt_old;void setup() { Serial.begin(9600); pinMode(int1Pin, INPUT); attachInterrupt(1, incC, RISING); Bridge.begin();}void loop() { Process p; if (cnt_old != cnt) { cnt_old = cnt; p.begin("python"); p.addParameter("/root/udp_cli.py"); p.addParameter(String(cnt)); p.run(); /* p.runAsynchronously(); while (p.running()); // required otherwise it does not work */ }}void incC(){ cnt++; Serial.println(cnt);} attachInterrupt(1, incC, RISING); // attach int0 Code: [Select] attachInterrupt(1, incC, RISING); // attach int0Is the code or the useless comment correct?When you run the command asynchronously, you need to periodically check to see if the process is done. How do you propose to do that when the Process variable is local to loop(), and goes out of scope when loop ends? Even if you make it global, how will you know when the process is done? - The process variable is local to loop() but loop runs indefinitely so how does the process variable go out of scope? The loop() should continue where it left before the interrupt. void main(){ setup(); // call setup once while (true) { loop(); // call loop over and over, forever }} The code WILL continue when the interrupt returns. However, loop() does not RUN indefinitely, it is CALLED indefinitely. There is a difference that doesn't always matter, but in this case it does. What's really happening behind the scenes is that there is a hidden main() function that essentially does this:Code: [Select]void main(){ setup(); // call setup once while (true) { loop(); // call loop over and over, forever }}Each time loop is called, a new Process instance is created. Sometimes (when the counter didn't change) loop quickly exits and the Process instance is destroyed. Other times, the counter has changed, so the process is started, and then almost immediately it is destroyed when loop() returns. It's getting called over and over, but the Process variable is indeed going out of scope on each iteration. You could move the Process declaration outside to make it global, or you could keep it in loop() but make it static so that it isn't allocated and released on each iteration. Or you could add your own infinite loop inside of loop() so that loop() never returns. You could move the Process declaration outside to make it global, or you could keep it in loop() but make it static so that it isn't allocated and released on each iteration. Or you could add your own infinite loop inside of loop() so that loop() never returns. ShapeShifter's first suggestion is what I do, which is to declare the process before void setup() so that the process isn't destroyed each time that void loop() finishes a cycle. So does the problem only present itself when loop() finishes before the runAsynchronously() process is done running?
http://forum.arduino.cc/index.php?PHPSESSID=1ci5lqbnodr112jsuqjrcbk2c1&topic=286841.msg3560086
CC-MAIN-2019-04
refinedweb
491
62.38
On Sat, Aug 26, 2017 at 2:34 AM, Nathaniel Smith <njs at pobox.com> wrote: > On Fri, Aug 25, 2017 at 3:32 PM, Yury Selivanov <yselivanov.ml at gmail.com> wrote: >>()) > > I think this change is a bad idea. I think that generally, an async > call like 'await async_sub()' should have the equivalent semantics to > a synchronous call like 'sync_sub()', except for the part where the > former is able to contain yields. That exception is why the semantics cannot be equivalent. > Giving every coroutine an LC breaks > that equivalence. It also makes it so in async code, you can't > necessarily refactor by moving code in and out of subroutines. I'll cover the refactoring argument later in this email. [..] > It also adds non-trivial overhead, because now lookup() is O(depth of > async callstack), instead of O(depth of (async) generator nesting), > which is generally much smaller. I don't think it's non-trivial though: First, we have a cache in ContextVar which makes lookup O(1) for any tight code that uses libraries like decimal and numpy. Second, most of the LCs in the chain will be empty, so even the uncached lookup will still be fast. Third, you will usually have your "with my_context()" block right around your code (or within a few awaits distance), otherwise it will be hard to reason what's the context. And if, occasionally, you have a one single "var.lookup()" call that won't be cached, the cost of it will still be measured in microseconds. Finally, the easy to follow semantics is the main argument for the change (even at the cost of making "get()" a bit slower in corner cases). > > I think I see the motivation: you want to make > > await sub() > > and > > await ensure_future(sub()) > > have the same semantics, right? Yes. > And the latter has to create a Task > and split it off into a new execution context, so you want the former > to do so as well? But to me this is like saying that we want > > sync_sub() > > and > > thread_pool_executor.submit(sync_sub).result() This example is very similar to: await sub() and await create_task(sub()) So it's really about making the semantics for coroutines be predictable. > (And fwiw I'm still not convinced we should give up on 'yield from' as > a mechanism for refactoring generators.) I don't get this "refactoring generators" and "refactoring coroutines" argument. Suppose you have this code: def gen(): i = 0 for _ in range(3): i += 1 yield i for _ in range(5): i += 1 yield i You can't refactor gen() by simply copying/pasting parts of its body into a separate generator: def count3(): for _ in range(3): i += 1 yield def gen(): i = 0 yield from count3() for _ in range(5): i += 1 yield i The above won't work for some obvious reasons: 'i' is a nonlocal variable for 'count3' block of code. Almost exactly the same thing will happen with the current PEP 550 specification, which is a *good* thing. 'yield from' and 'await' are not about refactoring. They can be used for splitting large generators/coroutines into a set of smaller ones, sure. But there's *no* magical, always working, refactoring mechanism that allows to do that blindly. > >>()``. > > I found this example confusing -- you talk about sub() and main() > running concurrently, but ``wait_for`` blocks main() until sub() has > finished running, right? Right. Before we continue, let me make sure we are on the same page here: await asyncio.wait_for(sub(), timeout=2) can be refactored into: task = asyncio.wait_for(sub(), timeout=2) # sub() is scheduled now, and a "loop.call_soon" call has been # made to advance it soon. await task Now, if we look at the following example (1): async def foo(): await bar() The "bar()" coroutine will execute within "foo()". If we add a timeout logic (2): async def foo(): await wait_for(bar() ,1) The "bar()" coroutine will execute outside of "foo()", and "foo()" will only wait for the result of that execution. Now, Async Tasks capture the context when they are created -- that's the only sane option they have. If coroutines don't have their own LC, "bar()" in examples (1) and (2) would interact with the execution context differently! And this is something that we can't let happen, as it would force asyncio users to think about the EC every time they want to wrap a coroutine into a task. [..] >> The ``sys.run_with_logical_context()`` function performs the following >> steps: >> >> 1. Push *lc* onto the current execution context stack. >> 2. Run ``func(*args, **kwargs)``. >> 3. Pop *lc* from the execution context stack. >> 4. Return or raise the ``func()`` result. > > It occurs to me that both this and the way generator/coroutines expose > their logic context means that logical context objects are > semantically mutable. This could create weird effects if someone > attaches the same LC to two different generators, or tries to use it > simultaneously in two different threads, etc. We should have a little > interlock like generator's ag_running, where an LC keeps track of > whether it's currently in use and if you try to push the same LC onto > two ECs simultaneously then it errors out. Correct. Both LC (and EC) objects will be both wrapped into "shell" objects before being exposed to the end user. run_with_logical_context() will mutate the user-visible LC object (keeping the underlying LC immutable, of course). Ideally, we would want run_with_logical_context to have the following signature: result, updated_lc = run_with_logical_context(lc, callable) But because "callable" can raise an exception this would not work. > >>. > > I'm pretty sure you need to also invalidate on context push/pop. Consider: > > def gen(): > var.set("gen") > var.lookup() # cache now holds "gen" > yield > print(var.lookup()) > > def main(): > var.set("main") > g = gen() > next(g) > # This should print "main", but it's the same thread and the last > call to set() was > # the one inside gen(), so we get the cached "gen" instead > print(var.lookup()) > var.set("no really main") > var.lookup() # cache now holds "no really main" > next(g) # should print "gen" but instead prints "no really main" Yeah, you're right. Thanks! > >> The cache is then implemented as follows:: >> >> class ContextVar: >> >> def set(self, value): >> ... # implementation >> self.version += 1 >> >> >> def get(self): > > I think you missed a s/get/lookup/ here :-) Fixed! Yury
https://mail.python.org/pipermail/python-dev/2017-August/148975.html
CC-MAIN-2017-43
refinedweb
1,063
62.38
Ok Guys got to the bottom of this. Things were happening that way because no one had told me the archive recovery system incorporates a script (written by someone without any documentation!!!) that automatically recovered the .svn files and re-inserted them from a second archive when it expanded and imported the primary archive (from which the svn files had been removed)!!! When I looked at the script source I found it could be run with a "--no-svn" parameter to get the archive recovered cleanly without the versioning. There was clearly more to it than I or anyone else could have possibly realized. My apologies for being so ***** off __> All I can say is that there are over 6.000 files in the archive and their recovery (after the fire) was critical - the stress was getting to me. Once the script was run correctly there were no further problems in the import routine. Apologies david Mark Phippard-3 wrote: > > On 8/23/07, vizion <david@atf4.com> wrote: >> Mark Phippard-3 wrote: >> > >> > On 8/23/07, vizion <david@atf4.com> wrote: >> >> >> >> I have a back up of thousands of files which we need to import into a >> >> current >> >> project. The files were orginally held on a server destroyed in a >> fire. >> >> The >> >> back up copies were created by a process that removed the tmp/.svn >> files. >> >> If >> >> I import them into a project (using eclipse radrails) the files still >> >> have >> >> versioning properties that confict with the versioning properties for >> the >> >> current project in the current repository (which is held on a local >> >> freebsd >> >> server using apache& mod_dav_svn). >> > >> > I do not understand what you mean. If the .svn files do not exist, >> > then essentially it is like you have an exported copy of your >> > repository. There is no versioning information. What exactly do you >> > want to do? If you still have your repository, why do you need the >> > files? Do they have modifications to them? >> > >> > You might be better off asking on the Subversion users@ list. More >> > people to reach. >> > >> > I think you should try to phrase your problem better though so that >> > you get the right help. Perhaps talk about what you have tried to do >> > and what did not work. >> >> When files have been versioned they have properties which include the >> version # and the name of the committer. So an attempt to include those >> files in a different repository fails if the versioning properties. In >> thsi >> instance following an importing of the files into the project an attempt >> to >> commit those files to the depository fails with an error stating that the >> .svm/tmp files could not be found. I am not exactly certain how this >> works >> but I believe the expected path to the .svn/tmp is part of the property >> metadata. I thought anyone who was likely to know the answer would >> understand the question rather than suggest I could explain the problem >> better. It sounds like you blame me vecause you do not know the answer. > > Wow! Good luck. > > -- > Thanks > > Mark Phippard > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org > For additional commands, e-mail: users-help@subclipse.tigris.org > > > --.
http://svn.haxx.se/subusers/archive-2007-08/0129.shtml
CC-MAIN-2014-42
refinedweb
527
73.88
Let me begin by saying this might just as well have been posted in meditations, for I have meditated on it for a little while now, but I need your wisdom on it, so I posted it right here. I received word yesterday that my request for a CPAN-ID has been approved *cheer* -- I obviously requested this ID because I have something I want to put up there. I am working on a module that does all the things modules like Class::Struct, Class::MethodMaker and Class::Accessor do but with a nicer syntax and some xtra other features. The work-name for this thing is AccessorMaker, so I was thinking about requesting Class::AccessorMaker as my namespace, but was wondering wheter or not you monks find this to confusing or clashing with other modules out there... Thanks in advance for your wise answerings Class::AccessorMaker seems like a reasonable name, though given your description, Class::AllDancing or Class::BellsAndWhistles seems perhaps more approprate (that's humor, not criticisim, BTW)... I'm also fond of Class::AutoAccessor, but just because I coined it (the term, that is) (or at least came up with it independently) for a perl6 RFC.wy Have you considered posting the code in Code Catacombs or on your scratchpad? It'd be nice to see what you're doing even if you're not asking for naming help. __SIG__ printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B:: +svref_2object(sub{})->OUTSIDE [download]] The AccesorMaker takes in, at use-time, a hash-reference and an extra keyword. It uses the keys of the hash-reference to create accessor-methods in the namespace of the caller. The values that are given to the keys are the default value of the accessor. Class::AccessorMaker will create a constructor (called "new()") by default. This constructor will be able to take that nice and shiny hash-like structure as you can see in the first example. If you want your constructor to run your objects "init()" routine you can specify the keyword "new_init". If you want to write your own "new()" routine you can use "no_new". [download] This module is still under some sort of development, and I am expecting to release things like ReadOnly / WriteOnce accessor methods in the near future. I alredy have Class::AccessorMaker::Private out there for you, which could prove to be very usefull for you. [download] Please do not put those perl-reserved names in there like DESTROY, import, AUTOLOAD, and so on. It will hurt you badly. Q: "But why do you not filter those?" A: "This is perl baby, you can do whatever you like..." And besides, there is going to be someone out there who is actualy going to put it to good use... [download] Hartog 'Sinister' de Mik <hartog@2organize.com> [download] Hell yes! Definitely not I guess so I guess not Results (49 votes), past polls
http://www.perlmonks.org/index.pl?node_id=203584
CC-MAIN-2014-52
refinedweb
491
62.58
The official blog of the Live Search team at Microsoft We want to answer the most common questions that have appeared in the comments section in response to yesterday's post about Friday's cashback outage (Black Friday cashback blackout). How do I receive credit for an order that is not showing the correct rebate in my Live Search cashback account?. I placed an order directly through the store's website. Will I be able to receive cashback? Orders placed directly at the store's website are not eligible for the Microsoft Live Search cashback program and terms. Orders must have been placed through Live Search to qualify. We are unable to give credit for purchases outside of our system. Will the HP deal be restarted soon? We're working actively to determine next steps for any specific HP promotions.. "If your account is showing a 3% rebate or not displaying any rebate for an eligible order, please contact customer support with your Live Search cashback ID and order number to receive your full rebate" PLEASE let us know when this "backlog" of processing will be completed (again). At least most of you can get into your cashback account. I got in once after I made my first purchase and haven't been able to access it since. What a mess. I got email from live.com saying that they would credit all cashback by December 2nd. I have not got any confirmation email :( . Rajat, please do something to resolve this issue.. please... How to determine whether an order is "ELIGIBLE" or not.. You only agreed that you site was down and not working "properly". How can you say whether the someone placed the order through live.com or directly at hpshopping.com? What to do if Microsoft denies cashback saying that I made the purchase directly at hpshopping.com not through live.com? where actually I went through live.com and made the purchase... Please clarify on how you are going to determine who is "eligibile"? Rajat, I AM SERIOUSLY FRUSTRATED WITH THIS ISSUE.. MICROSOFT IS GOOD FOR NOTHING.. IF I DON'T HEAR ABOUT MY 40% CASHBACK BY TOMORROW I AM GOING TO CLAIM MY CREDIT CARD CHARGE AS FRAUD.. Not only have you wasted our time by asking your customers to put together information to email that you should already have, but you've also wasted our energy worrying over this issue. How many hours have been wasted on the slickdeals forums trying to find information about this fiasco that your customer service agents won't give us? I got an email today telling me to wait another three days. I leave the country on Friday and after that I won't be able to cancel my order until it's too late at HP. Thanks a lot for backing me into a corner, along with everyone else who can't spend hours a day babysitting you so that you don't rip us off. Why don't you have a phone number to call so that we can at least speak to someone? Its pretty easy to guess why they don’t have a phone number… They’d actually have to staff “real” employees instead of the robots that answer the e-mails. Are we even sure Rajat is a real human? Or a robot programmed by Microsoft legal. 1. Microsoft promised a repeat of the promotion. 2. Microsoft promised everyone who successfully completed an order would be credited. 3. Microsoft claims to have answered our questions. Keep lying, and we'll keep hounding you until you make this right! First you say you'll redo the 40% offer "within a day or so", now you lie and take that back? How can we ever trust Microsoft??????? It seems as though the answers to the first and second question are contradictory. If you know those who followed the live.com why don't they have their cashback already? I find it hard to believe that on business day number 3 of this fiasco that you are still unaware if a large subgroup of people actually used your search engine or not. Additionally, the idea that we should continue to use live.com to other great shopping deals is laughable. For those of us who have received no cashback as of yet, how are we supposed to have faith in the system? For those of us who have received 3 or 25% cashback, how are we supposed to believe that the current 20% at eBay won't turn into 6% once the transaction is completed? Please rectify this situation soon as I need to let HP know to cancel my order before it ships. I'd hate to put HP out shipping both ways (per their return policy) because you dragged your feet on a resolution. It's now the third day since you promised to restart the HP 40% promotion. Another lie, perhaps? Call it LIE search- be HONEST. Great news guys, I just received my 40% cash back! The patience paid off :) I sent email on Nov 30, got a reply to wait until Dec 2nd. Replied the email on Dec 2nd saying I didn't receive 40% Got cash back today :) A QUOTE from a Microsoft SPOKESPERSON ." Well, make good on your promises, Microsoft!! I just want this to be over. Either give the discount or tell everyone you aren't going to do it. At the very least follow up on the emails that we followed up on as instructed in your generic email replys to our first email. I can not believe I'm actually losing sleep over this but I am. My indecision over canceling the orders or sticking it out is overwhelming. Just canceled my HP order and I am ordering a Mac. This was the final straw, Microsoft. Goodbye. Hi Rajat, Like thousands of others I am waiting for SOME sign you will honor your cashback promotion. I receive the same canned e-mails as others, no response is ever given. Lucky for me I did receive your survey today. Let me share one answer...consider it my Christmas gift to you in the form of "Free Consultation" How would you rate the overall quality of Live Search cashback? Gosh….I only have an MBA but I would start by having it actually work. I would do a little research and maybe have ample servers when I advertise the sale of the year. Maybe I would actually credit people with the cash back I promised instead of canned e-mails. Lastly I would invest in a telephone, no contact sends a message you have something to hide…..in this case you do! In your intro you say How about a timeline for credit? i contacted CS by email (the only option I could find) 8 days ago regarding issues with cashback account, have not received any response! 3-5 days is too long to wait for a reply, but over 5 days is piss poor service! Just received the cashback in pending status, think MS will solve all the problem in a few days. Good luck! Weihus - How much did you receive? Did you receive 40% for a HP purchase? I made a purchase on Thangs giving through live.com and still haven't receive any notification on my 40% cash back. I got a response to my mail to cashbk@microsoft.com saying i didnt purchase through the below login ID. I do not have screen shot of my transaction or anything to prove that i did go through live.com. I spent almost 5-6 hrs trying to get through and feel really bad being denied. I just think i will have to cancel the order to ASDF: Yes, it's HP 40% off by MS Live Cashback, so just keep calm and wait :) "Yes, it's HP 40% off by MS Live Cashback, so just keep calm and wait :)" Or better yet, buy something that doesn't have a garbage OS from a company that actually seems to care about their customers. Rajat...I have your solution! Award an extra one% off for every day a customer goes without getting cash back. Now we will be upset when the money hits our account as opposed to being mad when we see all zeros day after day... Your thoughts- This is a way to say sorry and reward those who wait! If not, what are your ideas? Please answer I really would like to know your view! In Massachusetts, small claims court can award triple damages for deceptive advertising claims (Chapter 93A). $800 order, should have been $320 cashback, should become $960 in small claims court. Maybe this will be worth it. But this was quite the introduction to Live Search. I'd never heard of it before Friday, and now I'll actively avoid it. Like so many others I had nothing, not even the 3% to prove that I went through the Live process. I just know I did. I wonder how many returns HP will get because of this. Don't forget, HP has free return shipping. Make them use it. For those of you that are counting on Microsoft to pay your rebates- don't hold your breath. Once you get to the point I am at, you begin to realize that this entire program is grossly under/mismanaged. Microsoft is in over their head and won't admit it. The "cashback" department can't seem to get five transactions that I made over four months ago straight. Five legitimate ebay buy it now transactions made over a period of two days are sitting in limbo. Based on what has happened so far, I don't expect to ever see the rebates. Chats (when they had them)- unresponsive bbb complaint- unresponsive I wonder if the marketing departments of live.com advertisers know what a mess this promotion is? Hi everyone- my readers on Notebooks.com are up in arms about his issue as well. While this isn't the best answer MS could offer, at least they're on the record stating that everyone will get the 40% Cash Back eventually. HP tracks the sources of each visit/sale. I imagine MS has access to this data and they are working together towards a resolution. Where do you want to go today? Well I got an email from Joel of cashback department telling that he will active resolve the 405 live.com cashback issue. He asked for my HP order email which I sent just now. Lets see what happens. The same problem occurred with a lot of people purchasing from Circuit City. Live.com advertised 20% cashback on Nov. 26, and a lot of people who purchased big ticket items like HDTVs (>$1000) got only 5% cashback. I wanted to purchase a TV at Sears because it was cheaper without the cashback, but ended up buying it at Circuit City because of this cashback. I now see only 5% cashback credited to my account, meaning that the TV actually was much more costlier to me and I lost out on all other deals because I purchased one from Circuit City. On contacting live.com, I was told that the issue would be resolved by Tuesday, which has come and gone. I contacted them again and was told to wait 5 more days. This is basically false advertising. Because of this fiasco, I not only lost money on this TV, but also lost out on other good deals. Microsoft needs to correct this issue and post correct cashback amounts to everyone ASAP. I've had the same problem with the Circuit City crediting only 5% when it clearly stated 20% for purchases made around Black Friday. After emailing cashback support numerous times and waiting patiently, the only responses I'm receiving is the generic: "Hello, Thank you for contacting Live Search cashback Customer Care. We are aware of the issue and we are working diligently to resolve this problem. Thank you for your patience while we fix this issue. Live Search cashback Customer Support" This is ridiculous. It SHOULD NOT take so long to resolve such simple issues. I have heard cases where others were requested to forward their receipts to cashback to get credited. I do not see a point in this since each cashback account lists each transaction including the amount and place purchased. It all seems they are just wasting our time and prolonging the situation. ^ Well, the longer they prolong this, the less chance you'll have to return your items since HP and CircuitCity will not accept returns on electronics after (usually) 15 days. I'm still trying to get live.com to respond to my missing 20% cashback from circuit city. I'm losing my confidence in this process. Just received this email from live.com. Seems like a step in the right direction: Hello, Thank you for using Live Search and for your recent cashback purchase on. Microsoft regrets that you experienced difficulties placing your order due to our limited site availability on November 28th and apologizes for any inconvenience that this caused. Your purchase (order number ----------) received a 3% cashback reward because it was completed after the end of the limited time 40% cashback promotion. However because of the issues with site availability earlier in the day, Microsoft will honor the 40% cashback reward for your purchase eligible transactions. Within a week, your cashback account rebate will be corrected. You will see a cancellation for the original 3% cashback followed by a new purchase with a 40% cashback reward. At that point, your purchase will be processed in the same way as all normal cashback sales and will stay in “pending” status for a period of up to 60 days, to account for returns. After this, all eligible purchases will be marked as "available" in your account and the associated rewards will be available for redemption. To view the details for this purchase or your other Live Search cashback transactions, sign into your Live Search cashback account. Please refer to complete program terms and conditions located here. We appreciate your patience as we resolve this issue. If you have other questions about cashback, please visit our FAQ. You’ll also find a Help link on the FAQ page to contact support. Thanks, Angus Cunningham Sr. Director Live Search cashback Operations You promised to offer the promo within "a day or so"- it's been that timeframe. So many people spent all day trying to get an order placed. Make good on that promise! ac, I received the same e-mail. Too late, I already canceled my HP and ordered a Macbook Pro. MS botched this entire promotion, and I have no faith that when it comes time for my refund that they'll do the right thing. I can't afford to take that chance. Microsoft needs to downsize in a big way to be an effective company. Allow me to make a contribution by taking my business elsewhere. Well, I waited another day and surprise, nothing has happened. All sarcasm aside, I do feel for the CSRs that are stuck trying to fix this mess. Something tells me that HP is going to be getting a bunch of hardware back from many folks. Somewhere Steve Jobs is laughing... I'm also waiting for any sign that Microsoft intends to credit me the 20% cashback from Circuit City which I'm entitled to. I took plenty of screenshots proving the existence of the offer in anticipation of Microsoft pulling a fast one on me. I love the TV that I bought, but it was purchased with the idea that I'd be getting back $260 of the total price. Without the cashback, there's no deal. Circuit City's gonna love me when I show up wanting to return the open-box TV (thank gawd there's no restocking fee). Microsoft needs to pull they sheeit together. Honestly, unlike almost everyone I know, I've always paid the retail price for MS software... knowing that I could have easily visited the pirates and gotten it for.... aaarrrgghh, I don't know... FREE?! How about you return the favor and actually follow through with your advertised promotion? So I buy during the timeframe, through live search, through the cashback link, signed in etc. No 40% back for me. Now I'm seeing on all these other forums that there are people that acknowledge they ordered after 7pm PST, got 3%, then sent in a work ticket, and now have received an e-mail stating they would be credited with the full 40%. I haven't received not one freakin reply since my initial work ticket was opened on the second. These people sent one in after and had it resolved before. I'm so mad I can't stand it. I too bought a TV from circuitcity.com thinking i am getting a 20% cashback, but I got an email for 5%. I have saved the screenshots while I was doing this. Sent couple of emails, but all i get is the standard message that everyone is getting. I hope this is resolved as soon as possible, else Circuit City will end up with lots of open box items. I also received the "wait 2 days before contacting us again"...so I waited, replied to the email, and haven't had a response back in the last 2 days. Very frustrating. Please o please increase it to 35% or 40%. I was just waiting for Christmas but it the discount seems to have peaked around Black Friday instead. I for one would like to be informed by MS when we can avail of maximum discount at sites like eBay. It keeps changing every 2 days. I lost out on the deal and think that MS should have had a working system for the deal to be meaningful. But this discussion here is filled with irony. MS has said that it intends on bumping folks who got 3% cashback to 40%. So, my humble suggestion might be to wait. This is a MS hosted blog and any promises here would probably hold water in any court. If you don't trust, then stop crying and return your laptops! But, I know that you won't do it because deep down u know that you will get the money and you WANT that money! Free money for which u did nothing! MS seems to be paying the cashback from its pockets and doing us shoppers a benefit. We seem to ask for promo reruns, etc as if it is our constitutional right and demand that the promotion be turned back on. I am sure it costs a ton of money to give back 40% on the price of a laptop. The cashback site states that any deals could be turned off anytime... BTW, do u have any alternatives? Is anyone else giving you 20% cashback on EBay? I don't think cashback is helping MS's search query, so at this time all this is free money! So, eat it while it lasts and stop crying! I'm another person who was supposed to get? AT this rate Microsoft is going to have to rename Cashback program to some other name to avoid the stink.. Thanks for the listing of the most common questions in FAQ. That helps a lot and saves the time for us. Day four- still don't see a repeat of the failed promo. People, the lesson here is to use real cashback sites like Fatwallet.com, Ebates.com and Purchance.com. Moral of the story is if it sounds too good to be true, then it probably is. I know that won't be fooled again. I realize now there isn't anything 'live' about 'live cashback.' Yesterday I received by Live Cashback for only 25%. I went through the Live site on the 28th during the promotion window (It took me 6 + hours). So I write back to Live telling them the amount was wrong and I should have received 40% cashback. So later inthe day I get an email saying I cancelled my order (Which I did not do) and they took back the 25% so now I'm back to nothing. What is going on here! How difficult is this to get right. I tried to reply to the e-mail and the mailbox is full!!!!! This is crazy. Microsoft at least send me an e-mail with my order number on it and the correct dollar amount. This way you can take a week to fix it and I'll have something to hold on to. --Rocco-- While it is true that it is not our constitutional right to have sales and deals whenever we want it, when a company advertises a promotion, induces people to make a purchase based on that promotion (most of us factored in the Cashback amount to decide if the purchase we were going to make was the best value), and then the company refuses to pay, that is a basic example of fraud. I have sent numerous e-mails to Cashback, and received the standard reply "We want to assure you that your issue is very important to us. Our agents respond to all service requests in the order in which they are received." I have faxed my e-mails to Microsoft's corporate office, and have yet received a reply. This weekend, I will escalate the issue to the BBB, FTC and Washington State Attorney General's Office. I would recommend that others do the same. Just a quick Google search (a reliable search engine) reveals hundreds of websites with people who have been cheated by Microsoft's cashback program. Sad, but all we can do is keep pushing to get back what has been offered to us. While some have said this is "free" money, a contract is a contract. If you read the business deal that Microsoft has with their clickthru partners, you can see that Microsoft makes some money on each of our clicks. Whether the server problems (designed by Dell) were intentional or unintentional (negligent?), each person who was offered a cashback incentive, and then accepted that incentive by clicking on the link and making a purchase - a contract was formed. Microsoft needs to fulfill their part of the bargain. In the meantime, join me in calling Attorney General Rob McKenna at 1-800-551-4636, or contacting Microsoft at the number in my previous posting. This entire charade is designed to string customers along until past the return period, past the credit card chargeback period, past when we can do anything about this cashback scam. MS and HP are hoping you're too stupid to realize that. I've started returning my HP order today. One item at a time, one each day. All the finger-pointing between MS and HP is a distraction from the reality that this was a joint promotion by both companies. HP paid for overnight shipping to get the items here, and they're paying for each item to come back on separate labels. I've lost a bunch of time, HP has lost a bunch of money, and MS has lost a reputation (and probably a bunch of money once HP totals up their losses and has a little chat with MS). Too bad MS and HP didn't want a better solution. I'm typing this on my new MacBook, and in my other browser window I'm searching for a new non-HP laser printer for my office. No more MS and HP in my office as long as I'm in charge of purchasing. It's just not worth being treated this way. I am so sorry that I didn't get any cashback on my laptop. If I can't get it, I want to cancel my order. I have sent three emails to your customers, but I didn't get any reply on it. So could you give me any reply as soon as possible! What about the Circuit City 20%? I've sent several emails, received the automated reply and yet to hear. When are you going to correct the Circuit City fiasco? I can't wait to see how many open box Sony TV's Circuit City winds up getting from all the people who are going to return TVs. I am also on the circuitcity.com fiasco-boat. Like most, I wouldn't have ordered my item if it had not been for the 20% savings, I made the purchase on the morning quoted 20% drove 35 miles to the nearest CC picked it up later that day (through rush hour traffic, mind you) returning to find that I would only be credited 5% the following morning. Fix this or I, and many others will pleasantly leave an open box hdtv on CC's front door. I'm sure they'll love that. I was trying to complete my order most of the day Friday for the 40% off promotion, which didn't happen and I am concerned with how this is going to be resolved. If this online services business is supposed to be "building trust" with the customer and "delighting" them one experience at a time, then they need to reissue the 40% off promotion once they correct the amounts credited to customers who already made a purchase. The idea of them just thinking this will go away or not be on every news channel is not the smartest move. This is killing their combined ad spending this half to gain goodwill and enable trust and show percieved value in their search engine. Also, the amount they will need to credit HP for their ad buys/cashback promotion and the impact that will have with their long standing partnership alone should have motivated a more substantial and resolute response. Anything short of fully honoring and rerunning this promotion as promised earlier this week and credited all purchases made on Friday with the 40% is sure to not only spurn consumers but business partners as well when weighing upcoming opportunities to partner and/or contine long standing arrangements given the decreased brand value of live search and the online services businesses at Microsoft. Got my 40% cashback just this afternoon. I hope you all get it soon. I believe MSFT should have given something extra to placate the customers for handling this crisis in such unprofessional way. I am in no rush here - if MS does not keep its end of the bargain, I will return the product to HP - I am sure HP will not want this and will make sure MS does its end and neither will MS as they will loose out on booking a whole bunch of revenue. Good luck! I am another one of the MANY who spent many frustrating hours because of this promotion and have absolutely nothing to show for it. If this is not resolved (ideally with either a 40% coupon for those who tried but weren't able to access the website, or with another day of this promotion) I will be spreading the word that both Microsoft Live and HP are apparently in the business of bait and switch tactics and enjoy wasting their customer's time. Unfortunately most people who were affected similarly won't read or post here, but there are most certainly thousands of angry customers. Im on the same boat with all of you folks. I haven't received any cashback and I'm e-mailing MS every day, and even trying to call them. Still no luck, I think they're even tired of sending automated e-mails at this point. I really don't know what to do besides return my product at this point. I was an HP shopper on Black Friday who went through all the necessary steps for 40% off, yet nothing showed in my cashback account. After sending the Cashback team an e-mail on Dec. 2nd with all the information they requested, I received a canned response. I sent another on the 4th, and received the same canned response. This morning I received an e-mail that I was credited with my 40% cashback. Patience goes a long way. Although I believe the Cashback team could have handled this better, they did come through on their promise...at least in my case. If you legitimately qualified for cashback, just be patient. And good luck. Nice Clinton impression, Rajat. You need to stop all this mumbo jumbo doublespeak and make good on what was offered -- even for those frustrated F5ers who spent their day off with Live, all to no avail. In my case, I got to the greenlights twice, but couldn't get past the captcha. Though interestingly enough, your system had no problem offering me the chance to complete the Live registration process. There is only one correct and acceptable response here: RERUN THE 40% OFFER. Anything short of that is BULLoney!! Although I was skeptical at first, I just received an email saying that I got my 40%. The delay was frustrating but in the end, MS came through. Thanks to Rajat and his team for making good (at least for my situation). i have been email them for the past 1 week and there is no response... is there a way reaching the MS people directly instead of thro CSR?? I have waited patiently after my initial email on Saturday that said that i need to wait till Dec 2nd. Despite waiting till 2nd and since then sending a bunch of email, i have not got a single response that addressed to me that made me feel that some one was actually looking at my email. I am so disappointed with not seeing the Cash Back. Spending more than 6 hours on Friday without having fun and in the end not seeing Cash back is so disappointing. Without the Cash back i would have gotten better deals from other vendors for the laptop and i missed those opportunities too. Whos to blame? is there any chance of ms responding to the emails i have sent? i placed an order at 4:50 pm pst on friday nov 28 through the live.com link and i still haven't seen my cashback nor is microsoft replying to my emails despite them telling me to email them on the 2nd if my issue was not resolved. my order has shipped as well, and i want to return it if they aren't going to honor their promotion. I got my order in before 7:00 pm on Black Friday, cashback account doesn't show it. Sent at least 5 emails to MS, no response yet other than unattended mail response. It seems that MS is helping the people got 3% cashback first. It is so unfair that MS helps them ahead of the people like me who made the purchase in time. I am so mad. Rerun the 40% cash back for hp shopping ASAP as promised, you will not get away with just correcting the few people's cash back amounts who got through in the few minutes of the 12 hour promotion that it actually worked. YOU NEED TO RUN THE 40% PROMOTION AGAIN for the amount of time advertised and actually have it work. Anything less than that is not truthful and a horrible blow to any goodwill you might have had with the end user. I just read on live search's blog "we have now reached out to all affected customers whose email addresses and purchase details we have on file." .... is this TRUEEE...!!!!! Please tell me that is not true that you have reached all the affected customers! I have sent 7 emails with no responses after a week of constantly checking my email! I don't know what's up with you will receive a response to your feedback in 3-5 days but maybe it should be changed to you may receive a response and then again you may not. Patient only goes so far. If you offer a promotion than you should honor it! There was a mistake on your company's end. If you need to bring in extra staff to correct the people and respond to people. That is what you should do. Customer service and satisfaction should be number 1. Please resolve this situation so we know if we need to return the products that are on their way! I am so frustrated with the lack of responses from MS. This sediment seems to be spreading through the forums that I visit. If MS doesn't get a handle on this soon, customers will stop using the service. Why would you use it if you can't trust it and never get I purchased a laptop from Hp, through your cashback referral follwoing the procedure to the boot, within the time frame the 40% cashaback was allowed on Black Friday. I can not afford a full priced item. Cashback was was shwon for a couple of days, and then upon writing emails, I was approved a cash back of 5% for a computer configuration I didnot purchase on a date I didnot purchase; where as they have denied the real 40% cashback today, saying that they have no records of my going through their referral program! They have a record of a purchase I did not make! ROFL. I sent them the order confirmations ane the details showing of my order but I still do not get the cashback! I am utterly disappointed and it is hurting my wallet. Please make the situation good. Thanks Emailed twice, both time automated replies telling me to wait in line and they will get to me in the order the email was received. It has been 9 days since I sent my first email and so far absolutely no response from MS. Does anyone know how long it will take MS to get through all the cashback issues, or are they effectively done and those who haven't heard back are screwed? I guess I have until Christmas to make the call on a return (i.e. if no cashback refund, then HP computer, printer, and accessories all get sent back to HP). What a shame that customers who got through on this deal are still being left in the dark. What is your service request number ackmiller? On 11/28 I ordered ~$1,000 worth of computer, monitor & accessories through the 40% off Live Cashback link. Nothing showed up in my account. Waited 2 business days (per MS's website instructions) still nothing, then I emailed cust. service. Waited 5 business days, per the instructions in the automated email response, still nothing. Day 5, also got a survey requesting feedback on the customer service I never received. Resent my request, referencing my CS request number, only to get another automated response with another CS request number. Day ?, still waiting for any kind of response, and wondering just how long I can wait before I am forced to return everything to HP. What is going on with live.com customer support? I have emailed them numerous times regarding the cashback that is still shows as processing in my account for a month and half. I opened atleast a dozen tickets, no reply to any of them. Is the BBB only way to talk to them? I SURE WOULD LIKE TO SPEAK TO SOMEONE AT LIVVE SEARCH. HOWEVER, I QUALIFIED FOR A $60 REWARD NOV 2 AND SUBMITTED MY REQUEST. I HAVE STILL NOT RRECEIVED IT. I HAD BEEN IN CONTAAAACT WITH BEN VIA EMAIL MANY TIMES AND GET MANY EXCUSES AND PROMISES AND NOW AM BEING TOTALLY IGNORED. CAN ANYONE HELP ME? I SURE WOULD LIKE TO SPEAK TO SOMEONE AT LIVE SEARCH. HOWEVER, I QUALIFIED FOR A $60 REWARD NOV 2 AND SUBMITTED MY REQUEST. I HAVE STILL NOT RECEIVED IT. I HAD BEEN IN CONTACT WITH BEN VIA EMAIL MANY TIMES AND GET MANY EXCUSES AND PROMISES AND NOW AM BEING TOTALLY IGNORED. CAN ANYONE HELP ME? STANLEY LEVINE RERBELSTAN@PEOPLEPC.COM 910 794 1505 Well, I had three orders that had CB issues and all denied. No rebuttal, all final. Email to them have no responses. It's been 5 days and no replies. CB is a hoax. Another way for MS to stick it to us again. This is getting bad. They use us to drive business to live and they get all the benefits. FAKE I am a very dissatisfied Microsoft customer! I purchased a laptop on Black Friday after trying to get on the site all day, making 5 calls to HP about being able to purchase, and trying to contact Microsoft. I clicked on the cashback icon that showed 40% cashback for a set period of time. I went into the live.com site, set up a cashback account and purchased my product. I was sent an email finally last week. It stated that I clicked in the wrong place to make my purchase. I think that is really crappy of Microsoft! I clicked where it said 40% cashback, on Microsofts gold dollar sign icon! If I did click the wrong place I think it was very misleading and that I should still get my 40% cashback! I made every effort all day to take advantage of the promotion. Now I can not even get an email response from Microsoft. I need to know if I need to be contacting HP to pick up my products. I think it is unbelieveable how long it is taking for their customer service to get back to people. I tried to be very understanding at first because of all the people they had to contact but now after telling me I did not click the right place and not replying to my e-mail to resolve me issue in almost 3 weeks is just too much. If I don't get a response from them in the next couple of days I will have to contact HP to return my item and will never purchase another Microsoft product again! Microsoft CashBack Program is a fraud. I have lost $350 in cashback bonus. FRAUD and I still get no contact after 5 months from Live.com representatives!! I guess you are right. I thought they would want to please their customers so they would have return customers but it looks like they are going to lose many customers over this black friday mess! I had made an HP purchase via the Live cashback link on Nov 25. By Nov 26th I had seen the note about the newer 40% cashback (even made a screen print of the promo). I had contacted HP to try and get a credit for the difference between the 2 cashback amounts but was told it is a MS problem. So, all day on Black Friday between 7 AM PST and 7 PM PST I tried unsucessfully to access HP thru the Live site. I was going to re-buy the same item at 40% cashback and return, or cancel, the identical HP item I purchased the day prior. Since then I've sent numerous emails to HP and Live Cashback support with no resolution. My situation is no different than what people do when they purchase something at one price, then see it at a lower price the next day and go back to the merchant for a price adjustment. It happens all the time and I've done it many times. I wish I had a postal address of someone in MS Cashback that I can send all of my documentation to. Does anyone have that information? I made a purchase and was upposed to have been issued a check on November 7, 2008. Still not recieved it. Customer service has not been helpful at all. Sent them numnerous complaints with ho update. It really sucks as they have no live support. I would not recommend anybody to go with Microsoft cashback If they do not contact me I am also going to tell everyone I know not to use live.com or cashback! I opened an account to make a purchase. I could see my account balance ($0 at the time). I was able to access my account (n fact, I seemed to be always logged on). Then, one day later, I made my purchase. I received an email regarding my cashback. Yet, I cannot log in into my account! The support center keeps responding to my queries in an unhelpful, basically automated way. The told me: your ID is not a valid ID. That's exactly the problem; do something about it! There is (was?) money for me, and, if by mistake or glitch or whatever, Microsoft messed up my access to my account, the money should still be mine (if nothing else given Microsoft's email telling that I had earned that amount). I asked the live.com support people to reinstate my account with the $ credit on it. I'll doubt they will do it: they will probably send me the 6th automated message. If anyone can give a MAILING ADDRESS, I'd prefer to write them a letter at this point. Others may also find it helpful, I am sure. Thanks! Why is it that I cant get on the Misrosoft Cashback account site to view my cashback? Did I just get screwd? I only had a couple of days left to get close to 500.00 in cash back and now I can't even access the web site. Does anyone know whats going on? This is a warning to stay far away from this shady service. At the beginning of this week, I had nearly $150 is my Live cashback account. Today I have ZERO. Not only that, I don't have any account history. It as if like my account never existed. What a disappointment. I was looking forward to having a couple extra bucks at the beginning of year. As a summary, STAY AWAY FROM THIS SERVICE. If it sounds too good to be true, it is!
http://blogs.msdn.com/livesearch/archive/2008/12/02/answers-to-your-comments-about-the-cashback-blackout.aspx
crawl-002
refinedweb
7,094
73.17
Note: This article was originally published on developer.salesforce.com in May 2014. I’ve recently been asked to share the motivation and vision that emerged around an open source package I’ve been developing over the last year or so. It all started with a bunch of code and an API looking for a problem to solve, to be honest! Here I will take you through the journey that led to the Declarative Rollup Summary Tool being born and ended up helping to fill a six-year-old platform feature itch. By the way, relating to the desire to roll up values between records related via standard Lookup fields and not just Master-Detail (where platform support already exists), the related Salesforce Idea has over 20k upvotes! The reality is this gap is being filled through Apex developers writing specific Apex Trigger code for the desired objects and fields utilizing SOQL Aggregate queries (ideally) to grab and recalculate the summarized values as the child records are updated. Then cracking open the same Apex Trigger code to repeat the process for other objects and/or making subsequent changes to the fields or criteria as requirements change. So the traditional approach to this problem carries some overhead in terms of skills and process and does not allow for easy adaption of the implementation once its in place, compared to the way editing a standard roll up summary would declaratively. As I have discovered through FinancialForce.com’s utilization of its ClickLink package, putting more declarative power into the hands of not just developers, but business process owners, solution architects, admins and consultants makes for a better collaboration and resulting solution. Such an approach empowers more people to not only define the requirements, but be part of creating the solutions! The idea of applications that enable this beyond the declarative capabilities of the platform is something I’ve shared before here, Declarative Thinking: Apps to Build Apps. So you’re probably wondering at this point, how did I manage to do something declaratively that Salesforce has not done so far for six years? Well first of all, I’d like come clean and say, I doubt that you went through 200+ comments on that idea — all requirements would be possible with this package. However, so far, it’s had a pretty good success rate! So functional caveats aside, I must now let you into a secret as to how it’s done behind-the-scenes. So they say there is no escaping reality and sure enough, as per the current workaround to this platform gap, code is indeed involved! So the little secret here is that clicks not code requires code! In this case, code that leverages an excellent open source library by fellow MVP Abhinav Gupta, who back in 2012, had realized the same gap and provided a great Apex library for helping developers write Apex Trigger code to implement roll ups. His library wraps the use of SOQL Aggregate queries to allow the Trigger developer to more easily express a rollup requirement in a similar way as to the standard roll ups available on master-detail relationships, but of course in code. Since learning about this, I had been itching to give the LREngine (Lookup Relationship Engine) library a go. The following is an example that rolls up Opportunity Amount into Annual Revenue on Account. What happens in the LREngine.rollup method is the use of Dynamic SOQL, or more specifically, Dynamic SOQL Aggregate queries. The above code results in the creation and execution of the following SOQL. The method then returns the master (Account) records with the updated rolled up values within it. The caller is responsible for updating. “So hold on a second!” I hear you say! Are we not back to coding here? What happened to “clicks, not code”? The above requires a developer to make use of this Apex library, write the Apex Trigger code and Apex test code, then deploy everything using Changesets, Eclipse, Ant etc into my production organization. Then do the same next time I have a new requirement. How can we turn this around to something that is made more generic and accessible via clicks? The magic moment for me was when I started to break ground on another open source project, the Apex Metadata API. For those of you not familiar, there exists a Salesforce-provided SOAP API called the Metadata API. It is basically a programmatic means of accomplishing most of what you see under the Setup menu and some things you can not, such as deploying code into a production org. It is used by a number of tools such as Force.com IDE and Migration Toolkit (Ant). It is normally not available via Apex, however I had managed to get it working reliably from Apex with some added bits and pieces. So by making the Metadata API available through Apex, it could be utilized by a Visualforce page controller in the package through which the required Apex Trigger code and accompanying Apex test code could be automatically generated and deployed for the user without any need for a sandbox, change sets or development tools. It’s one click and they are done! To remove the Apex Trigger the same page is used and the option to remove is displayed (of course it can also be removed using conventional means as well). This page is accessed via a Custom Button on a custom object used to configure the rollups (more on this later). You can view the full source code of the Visualforce page mangetrigger and controller RollupController from the repository to understand how this is accomplished, as well as more general demonstration of using the Metadata API deploy operation from Apex in the README for the library. As a byproduct of developing this, I also created a native Zip and Unzip Visualforce Component (since the deploy operation takes the metadata to deploy in the form of a zip file) — see apex-zip. Before calling the Metadata API’s deploy operation to push the code into the org, the Manage Child Trigger button displays a confirmation page, which previews the generated code. I felt this was appropriate as even though its being generated it is important for the user to see what is going into their production org, even though it’s quite small. It would also allow developers to copy and paste it if they wanted to edit it or add it to existing Apex Triggers (a mode the package also supports). Once the user is happy they just press Deploy and wait for the confirmation the code has been deployed. The name of the Apex Trigger and Apex test class are prefixed with the package namespace, to avoid colliding with others that might exist in the org already. The other thing you will notice in the above screenshot is the Apex Trigger is very small, covers all the events and passes no parameters to the triggerHandler method. Yet if you review the code required to invoke the LREngine library it requires passing the configuration of the roll-up, the parent and child objects, the relationship fields and the fields to aggregate etc. This is more than one line of code, still small and very elegant actually, but more than that, I wanted to include in each and every Apex Trigger deployed through this page. Plus I had another place for this rollup configuration in mind. The generated Apex Trigger code immediately delegates to the dlrs.RollupService.triggerHandler Apex method included in the package. This packaged code does not need to worry about code coverage or tests within the production org, as this has already been dealt with during package creation and upload. Finally, note that the generated Apex test is most definitely best practice, but does the trick in terms of permitting the trigger to be deployed. As per the comment included, there is no real behavior to be tested in the generated trigger anyway. While Abhinav has done a great job at making the LREngine Library easy to configure, it still requires coding skills. So once I confirmed Apex Triggers could be automated and deployed, I set about expressing the configuration of the roll-up in the form of a Custom Object, which is the closest I could get to in terms of Setup style configuration. Conceptually, this is not your typical record data as in Accounts, Invoices or Opportunities. It’s a kind of “custom metadata” stored in Custom Objects. What would be ideal at this stage is a way for us to create custom metadata on the platform. Maybe one day… The screenshot below shows the Lookup Rollup Summary custom object and its various fields that allow the user to create a given rollup between a parent object and a child object. There are required fields to define the relationship field, the field to aggregate and target field on the parent to store the calculated value. Optionally it offers a field to express criteria to filter the rollup calculation based on child object fields. The original blog announcing the tool goes into these fields. The benefit of storing the rollup configuration in a Custom Object record like this, is not only is it more accessible than editing Apex code or some kind of other text-based expression — it also doesn’t require the Apex Trigger to be touched ever again after initial deployment nor as new improvements are made to the underlying engine within the package, making upgrades a simple matter of installing a new version of the package. Basically I wanted to keep the Apex Trigger as dumb as possible and I think I succeeded! The result is the user is free now to effectively edit or create as many roll ups around the child object as they like and have the results take effect immediately. Note that they can only activate the rollup if the related Apex Trigger has been deployed (via the Manage Child Trigger button as described above). Let’s take a deeper look at what the one line Apex Trigger above is doing behind the scenes. Let’s see how it resolves the appropriate rollup contexts that need to be passed to the LREngine and some of the additional smarts used to group multiple rollups into a single call and also analyze the records and fields being changed to avoid needles calls and SOQL queries. This tool utilizes Apex Enterprise Patterns, hence those familiar with these patterns will recognize service, domain and selector classes in the code and UML diagram below (generated by Apex UML) showing the main Apex classes in the solution. The RollupService is the heart of the tool and is wrapping the LREngine, the service class exposes some entry points permitting Apex Triggers and the tools various Batch Apex and Schedule jobs to invoke the engine also. The first thing the triggerHandler entry point does is use the Id.getSObjectType method on the first entry in applicable Trigger.old or Trigger.new lists. Once it knows the SObjectType, it proceeds to query the Lookup Rollup Summary object for one or more rollups defined by the user. That’s right, it will handle multiple rollups from one Trigger — no need to deploy multiple Apex Triggers for each roll up. The next thing it does, before calling LREngine, is for Trigger.isUpdate events to scan the childRecords list to determine if any of the fields being aggregated or one of the fields used in the lookup criteria have actually changed. If not, there is no point calling the LREngine and wasting CPU and SOQL query resources, so it exits immediately. Once it has been determined there has been a change to the child records that requires the rollup to be calculated, the LREngine contexts are created and the engine called. As final optimization, the code will try to minimize the number of calls to the LREngine. For example, if two rollup summary definitions have been found and both have the same filter criteria (or none), one call will be made, resulting in a single SOQL Aggregate query. However if the filter criteria differs, this effectively means a different WHERE clause and as such, separate engine invocations are needed and thus separate SOQL Aggregate queries. The result is the most efficient use of Aggregate SOQL possible! Though at the end of the day the Apex 50k limit of rows still applies, which is shared between multiple rollup executions if you have multiple ones configured and are not sharing the same SOQL Aggregate query, as above. For this reason and query performance in some cases, I introduced a Scheduled mode to help process each rollup with the maximum amount of resources possible, albeit at the expense of real-time mode. If you are interested in learning more about some of the other features of this tool, such as the Scheduled or Developer modes it supports, take a look at the documentation section of README file. This project is a great example of the compound benefits of open source and social coding: taking an existing library, repurposing it and combining it within another open source initiative. I have also made some improvements to the LREngine, which are available in the tools repo and which I have now submitted back to the original repo. Lately I was very pleased to see another community member engage with the project and provide a usability boost to the creation and editing of the rollup definitions, through an excellent Visualforce page that allows the user to pick objects and fields based on their label name from pre-filtered dropdown boxes. Wes has also started sharing his ideas on improving the usability of the roll up filter criteria (currently a text box) here. I’m personally very proud to be part of such a community and cannot wait to see where things go next! Apex, SOQL and SOSL are powerful tools, while not all use cases they are involved in can be generalized in the way I’ve done with this tool. I hope this article has helped inspire such other tools to be created. While thinking about your next “Declarative Salesforce App,” keep in mind the Metadata API provides a lot more automation and management potential than just Apex code. It can create Custom Objects, Fields, and Visualforce pages, as well as update things like Picklists and Layouts. Talk to the admins in the community and find out what areas of the platform they are feeling pain points in, if they can and/or have already been solved by Apex code, and if they could be generalized, maybe you can create a more declarative solution for them!
https://developer.salesforce.com/blogs/2018/07/a-declarative-rollup-summary-tool-for-force-com-lookup-relationships.html
CC-MAIN-2018-51
refinedweb
2,461
56.39
Did you build that what you set up? :) Printable View Did you build that what you set up? :) yes it built successfully the GUI program i am trying to run is a visual basic program yes and i got this error:yes and i got this error:Quote: Did you test the Igor's sample? [SC] StartService FAILED 2: The system cannot find the file specified. It only means you set a wrong path/name! Fix it! the only line that has a path in it is this: and that is the correct path to the exe file so i don't know where the problem isand that is the correct path to the exe file so i don't know where the problem isCode: CString path = GetExeFolderName() + TEXT("C:\\testService\\Debug\\testService.exe"); contents of what? i don't understandcontents of what? i don't understandQuote: What do you expect path to contain after this statement? Have you examined its contents? The contents of path. Have you looked at it in the debuuger or shown it on screen to be sure it's what you are expecting as you are concatenating the result of GetExeFolderName() with the TEXT string? As the TEXT string contains both a drive letter and folder names I'm not sure what you are trying to achieve by concatenating this TEXT string with the result of GetExeFolderName(). ok so i entered the wrong path name? if GetExeFolderName() gets the folder, then the path should just be testService.exe? Have you checked what GetExeFolderName is actually returning? As you are hardcoding the full path to your testservice.exe, you probably don't need GetExeFolderName at all at the moment whilst you are testing. this is the code for GetExeFolderName so if i don't need that should i just call the path like this:so if i don't need that should i just call the path like this:Code: CString GetExeFolderName() { TCHAR path[MAX_PATH] = {0}; GetModuleFileName(GetModuleHandle(NULL), path, MAX_PATH); LPTSTR p = _tcsrchr(path, _T('\\')); if (p) { *p = TEXT('\0'); return path; } return (LPCTSTR)NULL; } CString path = TEXT("C:\\testService\\Debug\\testService.exe"); Yes. What debugging of the program have you done - as this should have been picked up by using the debugger.Yes. What debugging of the program have you done - as this should have been picked up by using the debugger.Quote: so if i don't need that should i just call the path like this: CString path = TEXT("C:\\testService\\Debug\\testService.exe"); can't debug a service program and i can't test the service because of this error the service installed fine but it won't start
http://forums.codeguru.com/printthread.php?t=536447&pp=15&page=4
CC-MAIN-2016-26
refinedweb
448
70.53
Ok so its 2009 just around the corner! Are you ready to take the leap into being serious in the blackhat world ? Are you ready to get access to more information? Are you ready to be a donor? Did you know that the donors here eventually get access to more tools to learn from? Its probably a well known fact that the donors here earn more than a standard user! Are you ready to leap over and share your tricks with the rest of the crew? Are you big enough to spare the little cash that allows you access? Are you ready? If not i dont think your serious in this business! Prove me wrong! Hit the Donate button! And ill hopefully see you on the other side! Please note Being a donor doesnt instantly give you access to the Jnr Vip sections but a little posting your methods will certainly make it quicker! Hit the donate button and start your 2009 With A bang of cash and knowledge! Become a DONOR! Sign below if you just donated! Code: #include <iostream> using namespace std; void main() { cout << "Hello BlackhatWorld!" << endl; cout << "IM A DONOR" << endl; }
https://www.blackhatworld.com/seo/its-nearly-2009-are-your-ready-to-take-the-leap.44609/
CC-MAIN-2018-39
refinedweb
195
86.4
An Introduction to Aspect-Oriented programming with JBoss AOP JBoss Application Server ships with support for aspect-oriented programming, so you can use AOP in your applications deployed in JBoss AS. JBoss AS 5, which is currently available as a community release, has AOP built into its core. However, JBoss AOP is also available as a standalone framework for use in your other applications. This article will take a simple example, and use JBoss AOP to add to its behaviour, while explaining some of the core functionality of JBoss AOP. We will look at encapsulating cross-cutting concerns into aspects, have a look at around advices vs the new lightweight advices in the upcoming JBoss AOP 2.0 release, and also look at using interface-introductions and mixins to add interfaces to your classes. Table of Contents Our Core ApplicationThe application we will look at is is a simple banking application. It has a BankAccount class: package bank; public class BankAccount { int accountNumber; int balance; public BankAccount(int accountNumber) { System.out.println("*** Bank Account constructor"); this.accountNumber = accountNumber; } public int getAccountNumber() { return accountNumber; } public int getBalance() { return balance; } public void debit(int amount) { System.out.println("*** BankAccount.debit()"); balance -= amount; } public void credit(int amount) { System.out.println("*** BankAccount.credit()"); balance += amount; } } In addition it has a main Bank class: package bank; import java.util.HashMap; import java.util.Map; public class Bank { static Map bankAccounts = new HashMap(); public static void transfer(BankAccount from, BankAccount to, int amount) { from.debit(amount); to.credit(amount); } public static void main(String[] args) { System.out.println("*** Creating account 1"); BankAccount acc1 = new BankAccount(1); acc1.credit(150); bankAccounts.put(acc1.getAccountNumber(), acc1); System.out.println("*** Creating account 2"); BankAccount acc2 = new BankAccount(2); acc2.credit(230); bankAccounts.put(acc2.getAccountNumber(), acc2); System.out.println("*** Balance acount 1: " + acc1.getBalance()); System.out.println("*** Balance acount 2: " + acc2.getBalance()); //Transfer some money System.out.println("*** Transfer 50 from account 1 to account 2"); transfer(acc1, acc2, 50); System.out.println("*** Balance acount 1: " + acc1.getBalance()); System.out.println("*** Balance acount 2: " + acc2.getBalance()); } } As you can see, we create two bank accounts with their account numbers, set the initial balances, and then transfer 50 from account1 to account 2. Running this simple example we get the following expected output: *** Creating account 1 *** Bank Account constructor *** BankAccount.credit() *** Creating account 2 *** Bank Account constructor *** BankAccount.credit() *** Balance acount 1: 150 *** Balance acount 2: 230 *** Transfer 50 from account 1 to account 2 *** BankAccount.debit() *** BankAccount.credit() *** Balance acount 1: 100 *** Balance acount 2: 280 The code for this example can be found in the listing1/ folder of the download bundle. - Login or register to post comments - 16137 reads - Printer-friendly version (Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.) Joshua Partogi replied on Fri, 2008/08/29 - 10:05pm jaikiran replied on Sat, 2008/08/30 - 3:52am Good article, Kabir. I have a question. Is the aspect code allowed to change the value that is being passed to the joinpoint? I mean, if the credi(int amount) method was being passed a value of 200, can the code in the aspect change this value to 100 before the credit method is invoked? If yes, is there any way to secure such access? Kabir Khan replied on Mon, 2008/09/01 - 5:06am Joshua, Yes annotations can be used instead.An example can be found here and the containing directory contains more examples. If using annotations, instead of passing in the path of a jboss-aop.xml file with -Djboss.aop.path, you point JBoss AOP to a directory containing your annotated aspects using -Djboss.aop.class.path. The tutorial examples that come with the download will show how in more detail. Kabir Khan replied on Mon, 2008/09/01 - 5:13am Jaikiran, The aspect code can modify the values that are passed in. There is currently no way to stop this, if that is what you mean by securing it. If this feature is important to you please ask for it on our user forums, and we will take it into consideration. gsowji replied on Tue, 2009/02/10 - 11:37pm gsowji replied on Wed, 2009/02/11 - 1:18am daveeeed replied on Fri, 2009/06/05 - 2:54am warrenty replied on Mon, 2009/06/08 - 1:40am modthoa replied on Wed, 2009/06/17 - 10:51am emad964 replied on Mon, 2009/06/29 - 4:14pm jiji530 replied on Mon, 2009/06/29 - 9:42pm sam2009 replied on Thu, 2009/07/02 - 9:24am
http://java.dzone.com/news/an-introduction-aspect-oriente
crawl-002
refinedweb
773
56.76
Timeline 01/22/08: - 23:32 Changeset [5299] by websites/coderepos.org/trac/share/js/TracUtils.js: Not Found ... - 22:46 Changeset [5298] by dotfiles/screen/mrkn-screenrc: for xterm-256color. - 22:46 Changeset [5297] by dotfiles/bash/mrkn-bashrc: replace 'xterm-color' to 'xterm*'. - 22:34 Changeset [5296] by make-*-ucm.pl を make-sjis-ucm.pl にまとめた - 22:16 Changeset [5295] by initial import of POE-Component-Client-Nowa and WebService?-Nowa - 22:16 Changeset [5294] by lang/javascript/jsruby: functional tests ( 29 OK out of 46 tests ) - 21:43 Changeset [5293] by platform/tdiary/spec/opensearch_ad_spec.rb: initial release. - 21:27 Changeset [5292] by platform/tdiary/plugin/opensearch_ad.rb: refactoring, based openid.rb - 20:25 Changeset [5291] by dotfiles/emacs/mrkn/: color-theme-6.6.0, and auctex. - 19:57 Changeset [5290] by platform/tdiary/Rakefile: pattern の既定値と完全に同一で重複しているため spec_files ... - 19:51 Changeset [5289] by platform/tdiary/Rakefile: 序盤にまとめました。 - 19:45 Changeset [5288] by platform/tdiary/Rakefile: - 他の既定値に合わせて desc の先頭を大文字にしました。 - test_files ... - 18:38 Changeset [5287] by platform/tdiary/Rakefile: use rake/testtask. - 18:17 Changeset [5286] by updated todo - 17:21 Changeset [5285] by lang/make/misc/kana/.Makefile.deploy.swp: * Remove unnecessary file. - 17:19 Changeset [5284] by lang/make/misc/kana/Makefile.deploy: * Initial import. - 17:19 Changeset [5283] by Directory for svk import. - 17:17 Changeset [5282] by platform/tdiary/Rakefile: modify test task. - 17:05 Changeset [5281] by lang/javascript/jsruby: deleted experimental code and files - 16:43 Changeset [5280] by platform/tdiary/spec/title_anchor_spec.rb: initial release. - 16:43 Changeset [5279] by platform/tdiary/spec/spec_helper.rb: add @index,@html_title. - 16:42 Changeset [5278] by platform/tdiary/spec/account_ad_spec.rb: add ... - 16:40 Changeset [5277] by SSL のときに utf8 だともじばけるから x-sjis-kddi-auto つかったほうがよさげ。 - 16:38 Changeset [5276] by platform/tdiary/spec/spec_helper.rb: add anchor method, and @date - 16:35 Changeset [5275] by lang/perl/OAuth-Lite: added functionality for OAuth Discovery 1.0 and ... - 16:14 FlickrToBlog edited by - (diff) - 16:11 FlickrToBlog edited by - (diff) - 16:10 Changeset [5274] by lang/javascript/flickr2blog: add zip package - 16:05 Changeset [5273] by platform/tdiary/plugin/image_gps.rb: removed an unnecessary prop ... - 16:03 Changeset [5272] by lang/javascript/flickr2blog/Rakefile: using rake/packagetask - 16:00 Changeset [5271] by platform/tdiary/Rakefile: とりあえず LOAD_PATH に加えてみたものの微妙な感じ…… - 15:58 Changeset [5270] by lang/javascript/bokuscheme: created bokuscheme - 15:50 Changeset [5269] by lang/javascript/userscripts/crossbooksearch.user.js: - Y!J ... - 15:14 Changeset [5268] by import Mail::Address::MobileJp? - 15:13 Changeset [5267] by Directory for svk import. - 15:13 Changeset [5266] by /lang/python/scheme/impl0 古典的マクロとConsListの実装 - 15:12 Changeset [5265] by mkdir - 15:00 Changeset [5264] by auto-convert-sjis-pictgramがmergeされて x-sjis-kddi-cp932 <=> ... - 14:59 Changeset [5263] by /lang/python/scheme/impl0 scheme impl. for learning - 14:58 Changeset [5262] by Created folder remotely: impl. by nishio - 14:58 Changeset [5261] by lang/ruby/said: change Kernel#system - 14:57 Changeset [5260] by Created folder remotely: scheme impl. for learning scheme - 14:56 Changeset [5259] by FULLWIDTH TILDE をよしなにはからう。 x-sjis-*, x-utf8-* で U+301C を encode 可能にした。 - 14:53 Changeset [5258] by x-sjis-airh-raw.ucm 復活!!!! - 14:39 Changeset [5257] by oops, x-sjis-kddi-auto's [!] is EF59 - 14:32 Changeset [5256] by x-sjis-kddi-cp932 not convert pictgram - 14:16 Changeset [5255] by fix documentation bug. - 12:44 Changeset [5254] by lang/javascript/userscripts/shinseiwand.user.js: そもそも @include ... - 12:42 Changeset [5253] by lang/javascript/userscripts/flickralwaysshowexif.user.js: fixed ... - 12:40 Changeset [5252] by lang/javascript/userscripts/hackldrapi_fx3.user.js: ついでにバージョンも上げておきます。 - 12:34 Changeset [5251] by lang/c/rbtree/branches/bst_inherit_impl/test_bstree.c (dfs_index): correct ... - 12:32 Ticket #66 (bstree_node_bfs_foreach を実装する) created by - bstree_node_bfs_foreach を実装する - 12:32 Ticket #65 (bstree_node_dfs_foreach を実装する) created by - bstree_node_dfs_foreach を実装する - 12:27 Ticket #64 (bstree_node_foreach_range を実装する) created by - bstree_node_foreach_range を実装する - 12:26 Ticket #63 (bstree_node_foreach を実装する) created by - bstree_node_foreach を実装する - 12:25 Ticket #62 (bstree_node_lookup_upper_bound を実装する) created by - bstree_node_lookup_upper_bound を実装する - 12:25 Ticket #61 (bstree_node_lookup_lower_bound を実装する) created by - bstree_node_lookup_lower_bound を実装する - 12:19 Changeset [5250] by lang/javascript/userscripts/autopagerizehatenastar.usre.js: ... - 12:18 Changeset [5249] by lang/c/rbtree/branches/bst_inherit_impl/test_bstree.c ... - 12:07 Changeset [5248] by x-sjis-docomo-raw.ucm をつかうようにもどした。 - 11:48 Changeset [5247] by Caféがもじばけてるので修正。 - 11:40 Changeset [5246] by always get english name from docomo - 11:37 Changeset [5245] by lang/c/rbtree/branches/bst_inherit_impl/{bstree.h, test_bstree.c}: add ... - 11:17 Changeset [5244] by userscripts/hackldrapi_fx3.user.js: 最新版GMのセキュリティ強化によるAPI変更に対応 - 10:01 Changeset [5243] by 2コマ系絵文字の相互変換に対応。2コマ分の bytes を ucm に定義。以前は、最初の1コマをひろっていた。 see. ... - 09:21 Changeset [5242] by lang/perl/Cache-Memcached-LibMemcached?; fix memory leak for get()/mget(). ... - 08:32 Committers/mokehehe edited by - (diff) - 08:16 Changeset [5241] by - - 08:15 Changeset [5240] by document updated - 08:08 Changeset [5239] by change views - 08:06 Changeset [5238] by fix timezone - 08:05 Changeset [5237] by - - 08:04 Changeset [5236] by add feeds counter to lists - 08:04 Changeset [5235] by Created folder remotely - 07:54 Changeset [5234] by r5471@skinny (orig r5211): tokuhirom | 2008-01-22 07:53:03 +0900 ... - 07:53 Changeset [5233] by r5460@skinny (orig r5200): tokuhirom | 2008-01-22 01:10:30 +0900 ... - 07:53 Changeset [5232] by r5459@skinny (orig r5199): chiba | 2008-01-22 01:06:57 +0900 remove ... - 07:53 Changeset [5231] by r5458@skinny (orig r5198): chiba | 2008-01-22 01:00:22 +0900 ... - 07:53 Changeset [5230] by r5456@skinny (orig r5196): tokuhirom | 2008-01-22 00:51:43 +0900 a bit ... - 07:53 Changeset [5229] by r5455@skinny (orig r5195): tokuhirom | 2008-01-22 00:48:55 +0900 ... - 07:53 Changeset [5228] by r5454@skinny (orig r5194): tokuhirom | 2008-01-22 00:30:47 +0900 ... - 07:53 Changeset [5227] by r5453@skinny (orig r5193): tokuhirom | 2008-01-22 00:30:25 +0900 ... - 07:53 Changeset [5226] by r5451@skinny (orig r5191): tokuhirom | 2008-01-21 22:43:46 +0900 ... - 07:53 Changeset [5225] by r5450@skinny (orig r5190): tokuhirom | 2008-01-21 22:43:21 +0900 -raw ... - 07:53 Changeset [5224] by r5446@skinny (orig r5186): chiba | 2008-01-21 21:57:50 +0900 ... - 07:53 Changeset [5223] by r5445@skinny (orig r5185): chiba | 2008-01-21 21:56:39 +0900 typo fix ... - 07:53 Changeset [5222] by r5444@skinny (orig r5184): tokuhirom | 2008-01-21 21:37:26 +0900 ... - 07:53 Changeset [5221] by r5443@skinny (orig r5183): chiba | 2008-01-21 20:47:48 +0900 add "-raw" ... - 07:53 Changeset [5220] by r5442@skinny (orig r5182): chiba | 2008-01-21 20:18:15 +0900 ... - 07:53 Changeset [5219] by r5440@skinny (orig r5180): tokuhirom | 2008-01-21 20:09:37 +0900 ... - 07:53 Changeset [5218] by r5439@skinny (orig r5179): tokuhirom | 2008-01-21 19:57:40 +0900 ... - 07:53 Changeset [5217] by r5437@skinny (orig r5177): tokuhirom | 2008-01-21 19:02:13 +0900 ... - 07:53 Changeset [5216] by r5436@skinny (orig r5176): chiba | 2008-01-21 18:55:15 +0900 - ... - 07:53 Changeset [5215] by r5430@skinny (orig r5170): tokuhirom | 2008-01-21 17:16:17 +0900 ... - 07:53 Changeset [5214] by r5429@skinny (orig r5169): tokuhirom | 2008-01-21 17:09:00 +0900 added ... - 07:53 Changeset [5213] by r5428@skinny (orig r5168): tokuhirom | 2008-01-21 17:01:22 +0900 ... - 07:53 Changeset [5212] by r5427@skinny (orig r5167): tokuhirom | 2008-01-21 16:54:47 +0900 rename ... - 07:53 Changeset [5211] by r5426@skinny (orig r5166): chiba | 2008-01-21 16:28:48 +0900 add ... - 06:23 Changeset [5210] by lang/java/lib2chj: junit-addonsのscopeをtestにしてbuild時のexcludesを削除 - 02:23 Changeset [5209] by lang/ruby/misc/twitter2voice: regexplist update - 01:56 Changeset [5208] by 変換マップをちゃんと utf8 でやる件。今度こそ大丈夫。 - 01:41 Changeset [5207] by lang/ruby/misc/yhara: fix interactive-dictation mode a little - 01:35 Changeset [5206] by lang/javascript/userscripts/autopagerizehatenastar.user.js: added - 01:35 Changeset [5205] by oops. revert. - 01:27 Changeset [5204] by 1文字の絵文字のときだけ 16 進数でダンプされてるのが一貫性がないので、全部 utf8 bytes にした。 - 01:24 Changeset [5203] by lang/javascript/jsruby: deleted branched files (branched experimental ... - 01:23 Changeset [5202] by lang/javascript/jsruby: branched experimental asynchronous JSRuby - 01:19 Changeset [5201] by r5392@skinny (orig r5132): tokuhirom | 2008-01-21 00:41:46 +0900 update ... - 01:10 Changeset [5200] by なにやらもじばけてたので修正。 - 01:06 Changeset [5199] by remove debug line - 01:00 Changeset [5198] by softbank-scrape-autosjisの役割を dat/softbank-unicode2sjis_auto.yaml を作るだけとした。 ... - 00:59 Changeset [5197] by platform/tdiary: check whether nkf is command exist in Rakefile to_euc ... - 00:51 Changeset [5196] by a bit rule change. - 00:48 Changeset [5195] by unicode2sjis_auto のマップは別ファイルとしてあらかじめつくっておく。unicode2sjis_auto ... - 00:30 Changeset [5194] by ほぼできあがった。 - 00:30 Changeset [5193] by overwrite the YAML. - 00:10 Ticket #60 (+ が消えてしまう問題) created by - URIがescapeされてしまってるぽい。 01/21/08: - 23:35 Changeset [5192] by docs/m-takagi/CodeGen_PECL: updated translation. - 22:43 Changeset [5191] by refactoring - 22:43 Changeset [5190] by -raw つけわすれの予感。 - 22:36 Changeset [5189] by docs/m-takagi/CodeGen_PECL: updated translation. - 22:28 Changeset [5188] by platform/tdiary/Rakefile: add test task. - 22:16 Changeset [5187] by lang/javascript/userscripts/niconicodougaanalytics.user.js: ... - 21:57 Changeset [5186] by x-sjis-kddi(-cp932) support encode at [5180] - 21:56 Changeset [5185] by typo fix - 21:37 Changeset [5184] by x-sjis-kddi-(auto|cp932)-raw から |1 を削除。 - 20:47 Changeset [5183] by add "-raw" for autogenerated ucm - 20:18 Changeset [5182] by [5180]をうけてx-sjis-kddiをConvertPictgramSJISから除去 aliasも整理 - 20:15 Changeset [5181] by platform/tdiary/Rakefile: add rspec task. - 20:09 Changeset [5180] by x-sjis-kddi-raw を x-sjis-kddi-cp932-raw に rename. x-sjis-kddi, ... - 19:57 Changeset [5179] by x-sjis-kddi, x-sjis-ezweb は x-sjis-kddi-raw の alias とする。 x-sjis-kddi は、単に ... - 19:18 Changeset [5178] by platform/tdiary/*/account_ad*: fix typo. - 19:02 Changeset [5177] by perltidy - 18:55 Changeset [5176] by * x-sjis-*の名前をx-sjis-*-rawに変更 * x-sjis-*-convert_pictgram ... - 18:54 Changeset [5175] by platform/tdiary/spec/account_ad_spec.rb: initial release. - 18:42 Changeset [5174] by platform/tdiary/plugin/account_ad.rb: fix service url. - 18:41 Changeset [5173] by lang/perl/Sledge-Plugin-FormValidator?-Lazy : FormValidator::Lazy for ... - 18:38 Changeset [5172] by platform/tdiary/doc/antirefspam.*: move directory. - 18:36 Changeset [5171] by platform/tdiary/spec/spec_helper.rb: add Config class. - 17:16 Changeset [5170] by regenerate by tools/make-kddi-ucm.pl. - 17:09 Changeset [5169] by added x-airh-convert_pictogram. - 17:01 Changeset [5168] by x-sjis-docomo is alias of cp932.if you want to convert, you should use ... - 16:54 Changeset [5167] by rename to better name. - 16:28 Changeset [5166] by add x-sjis-*-convert_picgram and delete imode <=> kddi ucm based convert - 15:38 Changeset [5165] by create auto convert x-sjis-* pictgrams idea - 14:47 Changeset [5164] by change view feed list - 12:38 Changeset [5163] by docs/m-takagi/CodeGen_PECL: updated translation. - 12:31 Changeset [5162] by skip tests if ucmlint is not available - 11:53 Changeset [5161] by remove jsky/vodafone pictograms. - 11:44 Changeset [5160] by document updated. see. ... - 11:06 Changeset [5159] by lang/javascript/userscripts/gen1986.addacountinfo.user.js: More ... - 11:00 Ticket #59 (lang/ruby/misc/tumblr_auto_follow: Ajaxから取得中に503される件) created by - ユーザID取得中に503されるので、Ajax部分からちゃんとユーザIDを拾えるように対応する。 - 10:54 Changeset [5158] by fix test num - 10:50 Changeset [5157] by F0AA and F0AB はマッピングされてないっぽい。 - 10:44 Changeset [5156] by lang/javascript/userscripts/gen1986.addacountinfo.user.js: Replace ... - 10:23 Changeset [5155] by added test cases - 10:13 Changeset [5154] by platform/rabbit/theme/devsummit2006: import devsummit2006 theme. - 10:11 Changeset [5153] by platform/rabbit/theme: create theme directory. - 10:09 Changeset [5152] by platform/rabbit: Rabbit is a presentation software for ... - 10:06 Changeset [5151] by added more test case. - 07:49 Changeset [5150] by lang/ruby/D4R: add DirectSound? binding - 06:39 Changeset [5149] by platform/tdiary/Rakefile: また間違えた。がーん。 - 06:32 Changeset [5148] by platform/tdiary/Rakefile: 正規表現の小さなミス。 - 06:28 Changeset [5147] by platform/tdiary/Rakefile: 変換後のファイル修正日時を変換元ファイルで touch するようにしました。ほか、整理。 - 05:57 Changeset [5146] by lang/javascript/userscripts/gen1986.addacountinfo.user.js: Link to ... - 05:52 Changeset [5145] by lang/javascript/userscripts/gen1986.addacountinfo.user.js: Add - 05:37 Changeset [5144] by lang/javascript/userscripts/niconicodougaanalytics.user.js: ... - 05:21 Changeset [5143] by lang/ruby/twitter2voice:create files. - 02:37 Changeset [5142] by Encode-JP-Mobile/branches/emulate-carrier-filter: ucmに変換表の内容を入れる - 02:30 Changeset [5141] by lang/javascript/jsruby: fixed some bugs (experimentally) - 02:11 Changeset [5140] by platform/tdiary/Rakefile: clean タスクとリビジョンを追加してみました。現状の nkf オプションでは変換後の ... - 02:10 Changeset [5139] by lang/javascript/userscripts/niconicodougaanalytics.user.js: Comment, ... - 02:06 Changeset [5138] by platform/tdiary/plugin/openid.rb: pound よりも URL として使われえない記号に。 - 01:59 Changeset [5137] by platform/tdiary/doc/ja/comment_key.ja.html ... - 01:56 Changeset [5136] by platform/tdiary/doc/antirefspam.txt: remove a prop svn:executable. - 01:29 Changeset [5135] by websites/coderepos.org/trac/share/js/TracUtils.js: add id:nihen ... - 01:19 Committers/chiba created by - create mypage - 00:47 Changeset [5134] by dat/convert-map-utf8.yaml にキャリアの変換表の情報を盛り込む版 - 00:44 Changeset [5133] by add x-sjis-softbank-auto.ucm build - 00:41 Changeset [5132] by update TODO - 00:40 Changeset [5131] by lang/perl/Encode-JP-Mobile: branche for キャリアの行う絵文字変換をどう取り込むか - 00:36 Changeset [5130] by lang/javascript/userscripts/shinseiwand.user.js: フィッシング対策 - 00:32 Changeset [5129] by update todo - 00:30 Changeset [5128] by platform/tdiary-plugins: propset svn:ignore package - 00:22 WikiStart edited by - change the order. (diff) - 00:22 Changeset [5127] by platform/tdiary/Rakefile: add to_euc task for packaging - 00:19 Changeset [5126] by platform/tdiary/Rakefile: use rake/packagetask for packaging task - 00:15 Changeset [5125] by chiba さん作の x-sjis-softbank-auto を生成するスクリプトにちょっと手を加えてコミット。 - 00:15 Changeset [5124] by lang/perl/Encode-JP-Mobile: update TO -
http://coderepos.org/share/timeline?from=2008-01-22T12%3A18%3A03Z%2B0900&precision=second
CC-MAIN-2014-52
refinedweb
2,294
51.75
This post kind of doesn't fit in with some of my other posts however, I had this question, and when I searched for answers on this, the answers I found were either incomplete, inneficient or outdated. So to make it easy for everyone, I'm writing this complete and up to date blog post (well as of this date any way!). This post was written using .NET Framework 4.0 and storing my data in SQL Server 2008. Let's take a look at the problem I had at hand. I needed to be able to store Key\Value pairs from a C# application into SQL. Since I did not know how many key value pairs I might end up with I decided to use the Dictionary object in c#. The problem is, both the Dictionary and Hashtable classes or not serializabe because they implement the IDictionary interface. Here's the error that you will get if you try to serialize one of the classes: System.NotSupportedException was unhandled Message=The type System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] is not supported because it implements IDictionary. Source=System.Xml StackTrace:) ... The reason the System.NotSupportedException is thrown is because the IDictionary class implements the IXmlSerializable interface.The IXmlSerializable interface makes us overide the following methods: GetSchema, ReadXml and WriteXml. We can do this, but since we have to write a class to overide these functions anyway, it's easier to just write a generic class and use that for serialization. Let's take a look. What we are going to do is make a stub class that will be serializbe that mimics the Dictionary or Hashtable DictionaryItem or KeyValuePair<string, string>. We want this class to be a simple a possible: public class DataItem { public string Key; public string Value; public DataItem(string key, string value) { Key = key; Value = value; } Now we will use the System.Generics.List to mimic the dictionary or hashtable classes: List<DataItem> tempdataitems = new List<DataItem>(myDictionary.Count); Since this is now serializable, we can jjust foreach through our Dictionary or Hashtable objects and build our tempdataitmes class to serialize. foreach (string key in myDictionary.Keys) { tempdataitems.Add(new DataItem(key, myDictionary[key].ToString())); } The last thing I need to do is serialize this to a string so I can now store it in my SQL database with the column type of XML. private string SerializeJobData() { List<DataItem> tempdataitems = new List<DataItem>(myDictionary.Count); foreach (string key in dataitems.Keys) { tempdataitems.Add(new DataItem(key, dataitems[key].ToString())); } XmlSerializer serializer = new XmlSerializer(typeof(List<DataItem>)); StringWriter sw = new StringWriter(); XmlSerializerNamespaces ns = new XmlSerializerNamespaces(); ns.Add("",""); serializer.Serialize(sw, tempdataitems,ns); return sw.ToString(); } In this example I am using the .net 4 StringWriter class from the System.IO namespace. This makes working with the stream needed for xml serialization simple because it hanldes the stream needed for xml serialization. In addtion you can see that I didn't want the default .net namespace in my xml so I set the namespace of the xmlsericalizer to "". If you want more control over your xml be sure to include your custom namespace. Here's what the data looks like in SQL: <ArrayOfDataItem> <DataItem> <Key>Vera</Key> <Value>Vera</Value> </DataItem> <DataItem> <Key>David</Key> <Value>David</Value> </DataItem> <DataItem> <Key>Susan</Key> <Value>Susan</Value> </DataItem> <DataItem> <Key>FakeParam</Key> <Value>FakeParam</Value> </DataItem> </ArrayOfDataItem> As you can see this is nice and clean. The last thing we would need to tacke is deserializing back to a Dictionary<string, string> object. I'm going to again use the StringWriter class to help me. private void DeserializeData(string RawData) { Dictionary<string, string> myDictionary = new Dictionary<string, string>(); XmlSerializer xs = new XmlSerializer(typeof(List<DataItem>)); StringReader sr = new StringReader(RawData); List<DataItem> templist = (List<DataItem>)xs.Deserialize(sr); foreach (DataItem di in templist) { myDictionary.Add(di.Key, di.Value); } } Super simple! I hope this helps you quicly get through this task and answers all questions regarding serializing and deserialize the .net 4 Dictionary and Hashtable classes. Good Solution, I was googling for simple solution finally got. Now I am trying to implement. Thank you for sharing. Example is missing. You must have created a sample. Plz share anjumrizwi@gmail.com make sure to add a parameterless constuctor to the dataitem class else it wont compile (not shown in code above) you could alternatively use a keyedcollection. So to make the question and answer short: How do I serialize a dictionary or hashtable? Answer: Make your own serializable dictionary or hash table. There must be a better way… Hi, I tried serializing my dictionary your way. I am having string and list as KeyValuePair<string,list>. When i am seriailizing, the <key>…</key> <value>…</value> nodes are not coming. Some steps are missing with your code or i am misleading somewhere. Can someone please help it on? This is simple and brilliant. Far better than creating a serializable dictionary that implements IXmlSerializable Worked like a charm! this is amazing.. .thank you What is working like a charm? The code is not complete. Couple of people said that already. If you care please share the complete code. Simple, but very effective idea to serialize the class having Dictionary types!
https://blogs.msdn.microsoft.com/adam/2010/09/10/how-to-serialize-a-dictionary-or-hashtable-in-c/
CC-MAIN-2019-22
refinedweb
901
51.24
How to read files? I am new to python. I am taking the coursera course on python in which they have given a .txt file. I have to find all the numerical values in that text file and compute their sum. How can I do this in Pythonista? I have the code ready. I want to run my code on my file. Please paste your code here like this so we have something to start with. ```python Your code here... ``` First, you need to share the txt file to pythonista, or use iCloud, etc to copy it into the same folder where your python script lives. Then, you can use normal methods for reading files on python ... read, readline, for line in file, various methods for reading csv, or other formatted files, ... with open('your_filename') as f: data=read(f) data=read(f) Shouldn't it be f.read()? I have to find all the numerical values in that text file and compute their sum. How can I do this in Pythonista? Assuming each line has exactly one numerical value: def read_ints_from_file(filepath): """ Read integers from file path filepath. """ values = [] # open file read-only with open(filepath, "r") as fin: # read file line by line for line in fin: # remove any leading/trailing whitespace characters and convert to integer v = int(line.strip()) values.append(v) return values # example usage. sum() calculates the sum of the argument(s) print(sum(read_ints_from_file("path/to/textfile.txt"))) If the file contains text other than the numbers, you should look into regular expressions (using re) to find the values. - GamesBx2020 This post is deleted!last edited by
https://forum.omz-software.com/topic/6494/how-to-read-files
CC-MAIN-2022-05
refinedweb
274
76.82
The Seven Stages of SVG I'm writing this because I've been asked quite a lot recently about how to get into SVG, where to start and what's the best way to learn. I've finished the post now and I'm writing this paragraph and putting it at the top and I've realised I don't think this post answers any of those questions really. Sorry about that. I first started messing around with SVG not that long ago at all. It seemed so impenetrable and weird and alien when I first saw the SVG syntax and code that I very nearly didn't even bother. "I'm using Greensock to create shapes in CSS/HTML and animate them, why would I possibly want or need to learn something new, especially something that actually looks sort-of-really old" This is what my defensive, frightened brain would whisper to me. In fact SVG is really old in the context of the age of the Internet. A new challenge The reason I decided to give it a try was partly because I wanted a change and a challenge but mostly because I love vectors - as a seasoned Flash designer I cut my teeth with vectors in Flash 2 - I lived and breathed vectors for 15 years in the SWF format and life was sweet (and crisp and scalable). Get drawing again I love drawing and I used to draw everything in Flash - I found its drawing tools were so familiar that I could draw pretty much anything in half the time than in any other software. I could also spit out pretty much any file format from Flash including SVG in later versions and it was this ability that piqued my interest in SVG. I'd create some graphics in Flash, spit out an SVG file and open it up in SublimeText, then quickly close it again and hyperventilate for a while. Every time I created an SVG file it would have an Adobe Illustrator icon (I use Windows and SVG defaulted to being opened in Illustrator), so I started messing around in Illustrator, software that I had only ever really used to open client work in and panic at all the weird clipped paths and strange groupings and compound this and that. Pretty soon I was only opening Illustrator, creating a really simple shape, saving it and opening that up in SublimeText to see what a circle looked like in SVG. Then I'd move it on the stage (sorry, artboard), save it again and see what changed in the code. I could be be here for a while In a pretty short space of time I realised that SVG consists of only about six or seven raw shapes, most of which, when viewed in a file on their own, were pretty simple to understand. Then I discovered it has filters like blur - then I discovered Illustrator's Warp and Distort filters - then GSAP (Greensock Animation Platform) started focussing heavily on SVG animation and given I've been using GSAP for longer than I can remember it was then that the power of SVG dawned on me and I realised that I could be here for a while. Ok Flash was useful I can't deny my Flash background has helped me to progress quickly (animation has rules no matter how you do it) and knowing ActionScript has really helped with the JavaScript (I heartily recommend animating SVG with JavaScript, specifically GSAP) but the fact is, SVG is not that difficult to grasp once you've got over some of the classic hurdles like understanding the pesky viewport and viewBox and some other attributes that just need to be learnt. It can be daunting and I nearly bailed on several occasions - I have sticky notes on my PC with things like 'xlink:href' written on them which is the syntax for defining a link to a resource (like an image or URL) in various SVG tags because I simply couldn't remember them and between you and me, the whole namespace thing is still a bit of a mystery to me. SVG Filter WTF Some (most) of the SVG filters are also extremely complicated - you need a PHD in Overcoming Boredom just to understand what they do; documentation and online examples of SVG filters are dry and lifeless blocks of incomprehensible code that often generate a horrible effect that nobody in their right mind would ever use and often they seem so sensitive that copying the code and tweaking it makes all your graphics either disappear or stay exactly the same. SVG filters seem to be a game of extremes that I'm still trying to work out how to play (most of the time I sit at the sidelines swearing into a cup). I've had some success but there's lots more to learn. Tooling The tooling is pretty awful too - creating graphics in Adobe Illustrator (or Sketch or Inkscape) is one thing - getting them successfully into a web page and animating them is entirely another. You are somewhat at the mercy of the software you use and the crap it generates in the code. I made a video that explains my own workflow from Illustrator to CodePen (with SublimeText in between). Still, maybe the tooling and usability will improve across the board with SVG 2.0 and future releases of drawing software - who knows. Right now I'm having loads of fun with it (important!) and so there's so much you can do with SVG, even if you only use a fraction of what it can do. Do it - then do it again The way I learn is by doing the same things over and over again until they become second nature. Some things I have to force myself to do again and again because my stupid brain refuses to learn them (like the xlink:href thing). But you might be different - I hope so. It's only been about seven or eight months since I cracked open a proper SVG file and I feel like I've come a long way in a pretty short space of time. The main thing to do is to... Stay focused So if you're thinking about getting into SVG (which I know a lot of people are now) then I say do it. Sign up to CodePen if you haven't already (one of the many great things about CodePen is that you can get going with an idea or an experiment in seconds). Get yourself Illustrator or Sketch or Inkscape and start playing around. And stay focused. The road will be rocky for a few weeks, you will go through The Seven Stages of SVG while you reorient yourself. They are Curiosity, Experimentation, Failure, Frustration, Self-Loathing, Lightbulb Moment, Beautiful Indescribable Happiness - just stick with it, never stray too far from stages 1 and 2, ignore stages 3-5 (they'll pass) and soon you'll be speeding your way to stages 6 and 7. Where to start A good place to start and the site I go back to time and time again because it has clear, simple SVG examples is Jenkov.com/svg Once you're up and running check out some of my YouTube videos and come and say hi on Twitter Article and demos are so inspiring! : ) @yoksel Nice to hear cheers! a nice read.. just skimmed it.. but I'll carefully read it tonight. caught a few spots that told me :" read more of me" I've never really cared for svg but after reading this, I feel compelled to dive right in. Thanks for the inspiration! @Arnique Thanks - I'm glad it's inspired you! Good article, great work! Its great to hear about your evolving workflow. Makes the SVG path ahead of me seem less scary. I am wondering, what about Edge Animate? Have you stopped using it? @waynes Thanks Wayne. No I'm still using Edge Animate for plenty of client work (where it's appropriate). Designing and animating raw SVG is a real pleasure and a challenge for me right now so that's where I'm spending all my time and energy. Great article! I also love your works with SVG which makes me want to learn it more. Wish me luck! :) @balapa Good luck! Awesome! I've been debating getting into SVG for a while, and this just pushed be over the edge. Thanks! @pixelacorn Glad to hear you're jumping in :) This post is everything! Great article. @nicolasjengler @coinoperatedgoi Thank you 🙂
http://codepen.io/chrisgannon/post/seven-stages-of-svg
CC-MAIN-2017-04
refinedweb
1,440
74.02
It was pointed out that your method for init (custom derivations and default initializer) would look like this for the class Circle... @interface Circle : SomeOtherClass { double radius; // should be NSNumber IMHO } - initWithRadius: (double)r; @end @implementation Circle - initWithRadius: (double)r { radius = r; } @end In reality, this could and likely will be troublesome. It assumes there is no additional initialization done by the parent class... Bad assumption, really bad. The correct way to define a default initializer method is more like - init { return ( [self initWithX: defaultValueForX ] ); } // This is the designated init method for this class - initWithX: valueHolderForX { [super init]; // us the default initializer for the super class, init can be assumed, yet it would help to know your parent implementation since indeed you are inheriting functionality from it, makes sense to know it. There may be specific default initializers that are more useful and appropriate for your use. // set your iVars here x = valueHolderForX; [ ... maybe private iVars are set here ... ] } Hope this helps. .
http://archive.oreilly.com/cs/user/view/cs_msg/3830
CC-MAIN-2017-43
refinedweb
162
53.41
Odoo Help This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers. Hi Maniganda you can like below import some class in your .py file from ftplib import FTP objec=FTP("yourIP") objec.login("youruser","passs") objec.storbinary('STOR yourfile.txt', open('yourexixtingfile.txt', 'rb')) objec.close() After successfull login use properties of objec object such as upload reload ,read file from etc...... hope this is help you just see the objec FTP's method you can it easily Thanks Sandeep you can use the built-in ftp library ( text) or you can avoid using ftp and trying via xml-rpc that's a more stable solution IMO. If you need to understand how to deal with xml-rpc, you can look at the official docs here:. do not forget that XML-RPC cannot manage binary files as-is, you'll have to read the content and convert it into a base64!
https://www.odoo.com/forum/help-1/question/how-to-upload-binary-file-to-ftp-from-python-18239
CC-MAIN-2016-50
refinedweb
172
62.78
Proposed features/motorcycle friendly Contents Proposal motorcycle_friendly=yes (according to the current documentation, see motorcycle_friendly=*) for accommodations which offer - secure parking (not necessarily a garage) - tools for minor repairs - drying room (for wet clothes) - tour tips and informations about motorcycle-related POIs in the region. motorcycle_friendly=customary Every other which is "motorcycle friendly", but has less or no special offers, will be tagged as "customary". motorcycle_friendly=no Those who don't accept motorcyclists at all Alternative / additional Proposal (See discussion tab - Assessment of tag) As some mentioned the "yes" option described above would be too subjective, and to make it possible to filter on any of the details. - motorcycle:tools=yes/no - motorcycle:parking=garage/shelter/court/no (For the tourism=* - tag, similar to outdoor_seating=yes. Enables frontends to filter this) - motorcycle:tours=guided/info (either guided tours or information material) - motorcycle:theme=yes for amenities (restaurant/pub/bar) in case motorcycle_friendly won't be approved (again) in the 2nd voting. (also see "Additional keys" in shop=bicycle) - drying:room=yes/heated/no , drying:compartment=yes/no/heated , drying:dryer=convection/inertised/microwave (New key Proposed_features/drying necessary ? As the same accommodation may offer this also for bicycle/skiing a.s.o., it's kept sport-neutral) Rationale There are many websites / databases offering an "overview" of motorbike- friendly accommodation, but there should be a non-proprietary definition within OSM, as several of them don't have criteria for "motorcycle friendly" and just list any hotel. A worldwide "reference" isn't available, anyway. Examples Tagging motorcycle_friendly=yes/no/customary AND motorcycle:*=* Applies to - tourism=camp_site - tourism=hotel - tourism=hostel - tourism=motel - tourism=guest_house - amenity=restaurant/pub/bar (there are some specialized, see Wikipedia:Biker_bar) Rendering - Usage as GPX POIs on Garmin devices - Usage in navigation apps Features/Pages affected - kurviger.de is about to implement it - OsmAnd is currently implementing motorcycle POIs - Unterkunftskarte.de will rebuild the page and possibly refer to it External Discussions Please comment on the discussion page. Voting There has been a voting before which has certainly been announced to the mailing list : Betreff: Feature Proposal - Voting - tag "motorcycle friendly" for accomodations Datum: Tue, 17 Jan 2017 00:46:19 +0100 An: tagging@openstreetmap.org There were one week of RFC state and three weeks of voting (instead of 2/2). As some consider this as formally wrong, the process is restarted. - For some reason this message was not sent from the list: [1] --Dieterdreist (talk) 15:41, 5 March 2017 (UTC) It turned out the process didn't work according to the automatic message's text that was sent in this case (review or reply) rtfm Rtfm (talk) 00:58, 12 March 2017 (UTC) Details : First voting I approve this proposal. --JP-ADV990R (talk) 20:21, 20 January 2017 (UTC) I approve this proposal. --Quietus (talk) 11:01, 17 January 2017 (UTC) I approve this proposal. --Gvinci (talk) 11:08, 17 January 2017 (UTC) I approve this proposal. --Maxticli (talk) 11:13, 17 January 2017 (UTC) I approve this proposal. --Landex (talk) 13:02, 17 January 2017 (UTC) I approve this proposal. --Mk-1-ADV (talk) 14:01, 17 January 2017 (UTC) I approve this proposal. --Harald2000 (talk) 14:08, 17 January 2017 (UTC) I approve this proposal. --Ktm-pilot (talk) 22:37, 17 January 2017 (UTC) I approve this proposal. --TG (talk) 01:28, 18 January 2017 (UTC) I approve this proposal. --JayHay (talk) 14:36, 18 January 2017 (UTC) I approve this proposal. --Wonkyconk (talk) 17:21, 18 January 2017 (UTC) I oppose this proposal. It is a lonely key, there more categories that could use a friendly version, see dicussion page, I like to vote for a more common used version --AllroadsNL (talk) 13:24, 19 January 2017 (UTC) I approve this proposal. --Slamper (talk) 22:34, 19 January 2017 (UTC) I oppose this proposal. I agree with AllroadsNL, but why you start voting after 7 days? For me this looks like a "let me push a new key into OSM in under 30 days" --Luschi (talk) 16:13, 20 January 2017 (UTC) I approve this proposal, a similar tag may be proposed for the bicycle friendliness.. --erkinalp 16:05, 28 January 2017 (UTC) I oppose this proposal, I think a subkey approach like AllroadsNL suggested would be better. --Gileri (talk) 21:21, 30 January 2017 (UTC) Second voting I oppose this proposal. Establishing a "friendly:" namespace is a very bad precedent and will encourage subjectivity. If you want to tag secure parking, tools, and drying rooms, do those independently. A drying room is useful for hikers and cyclists as well, and should therefore be tagged as `drying_room=yes` rather than with a motorbike-specific tag. --Richard (talk) 18:53, 5 March 2017 (UTC) - I agree that it is better to tag several properties with the relevant features rather than only an aggregated property and we should encourage anyway to add available detail like the mentioned drying room. Still there have been examples on the mailing list which were specifically about the "friendly" part, like the laundromat which prohibited use for hikers or the accomodation that stated "hikers welcome" on a sign. --Dieterdreist (talk) 19:12, 5 March 2017 (UTC) As discussion is taking place now .. and discussion should be open untill at least 19th March, voting should not be open yet? Your comments could be made either in the discussion page or on the tagging list. Warin61 (talk) 22:04, 5 March 2017 (UTC) I suppose that anyone with good ideas like a new key "drying_room=yes" should create a separate RFC and just leave a comment here to be considered (instead of just voting "no" unless the voting didn't even start yet). rtfm Rtfm (talk) 20:30, 6 March 2017 (UTC) Generally, in the history of this RFC, there were a couple of non-consrtuctive comments such as "think wider" or "much too vague" (without any proposal what they imagined instead). There should IMHO be a "code of conduct" regarding RFCs to which should be linked to in the "proposal process" as well as from the RFC form. rtfm Rtfm (talk) 20:30, 6 March 2017 (UTC) I approve this proposal, again, it is absurd that vote has been cancelled for insufficent timeouts. Vote count was already established.. Pro ignore all rules. Erkin Alp Güney (talk) Erkin Alp Güney (talk) 15:07, 11 March 2017 (UTC)
http://wiki.openstreetmap.org/wiki/Proposed_features/motorcycle_friendly
CC-MAIN-2017-22
refinedweb
1,067
51.07
#include <vector> #include <set> #include <base_struct.h> #include <class_am_param.h> Go to the source code of this file. Definition at line 154 of file class_aperture_macro.h. Type APERTURE_MACRO_SET is a sorted collection of APERTURE_MACROS whose key is the name field in the APERTURE_MACRO. Definition at line 236 of file class_aperture_macro.h. Definition at line 237 of file class_aperture_macro.h. Enum AM_PRIMITIVE_ID is the set of all "aperture macro primitives" (primitive numbers). See Table 3 in aperture macro primitives are basic shapes which can be combined to create a complex shape This complex shape is flashed. Definition at line 70 of file class_aperture_macro.h.
http://docs.kicad-pcb.org/doxygen/class__aperture__macro_8h.html
CC-MAIN-2017-30
refinedweb
103
70.09
NetApp has been making waves recently with its clustered Data ONTAP® operating system, which offers a long list of features and groundbreaking benefits such as nondisruptive operations, lower total cost of ownership, and seamless scalability. However, there's been a lot of FUD out there about the complexity of clustered Data ONTAP. Most of those rumors come from people who don't know the product well or who don't have much hands-on experience. As one of the first 50 clustered Data ONTAP Partner Professional Services and Systems Engineering Specialists, I've spent a lot of time with both Data ONTAP 7-Mode and clustered Data ONTAP. I've done roughly 50 Data ONTAP installations since I joined Zumasys three years ago, with a significant increase in the number of clustered Data ONTAP installations in recent months. What this means to you is that—if you haven't already done so—it's time to get up to speed with this product. Clustered Data ONTAP is different from 7-Mode, but added capabilities such as nondisruptive operations make it well worth using. In this article, I provide a few tips for familiarizing yourself with clustered Data ONTAP. I slant my discussion toward those who are already familiar with 7-Mode, but, even if you're new to Data ONTAP, you can still benefit. Tip #1: Practice on the Clustered Data ONTAP Simulator The NetApp® simulator—Simulate ONTAP 8—is by far the best tool you can use to hone your clustered Data ONTAP skills. The simulator will prepare you for all aspects of configuring and operating a cluster and will also help you understand best practices for AutoSupport™ settings, job scheduling, alerts, network failover groups, and more. Practice makes perfect. The simulator lets you run through all aspects of a design and, when you're done, destroy your cluster and start over until you figure out how everything works and what will work best for your situation. You can download Simulate ONTAP 8 from the NetApp Support site. (A NetApp login is required and available only for download by Data ONTAP customers and select partners.) To run the simulator, all you need is a dual-core laptop or desktop with at least 2GB of memory and 40GB of free disk space. Windows® systems require VMware® Workstation software and Mac® systems require VMware Fusion. (The latest version requirements are shown on the site.) Choose the version of the simulator that corresponds with the version of clustered Data ONTAP you will run. Tip #2: Learn the New Command-Line Interface One of the first things you may want to do with the simulator is learn the clustered Data ONTAP command-line interface (CLI). Clustered Data ONTAP includes graphical management tools that allow you to accomplish pretty much all configuration and management functions, but I still find there's no replacement for the command line when it comes to power and flexibility. If you are a hard-core command-line junkie like I am, familiarize yourself with the new CLI hierarchy structure. One of my favorite new CLI features is tab completion. You'll find that you miss tab completion when you go back to 7-Mode. The CLI is structured into a hierarchy of commands. No longer do you just type a question mark and see every command available to you. Commands are grouped together in a folderlike structure that includes networking, QoS, SnapMirror® technology, volumes, and so on. Once you enter into the first level of the hierarchy you can get more specific. For instance, if you go into "network" you have options such as ping, traceroute, port management, and interface management. Getting to know the structure may take a little learning, but if you know 7-Mode CLI and think about what you want to configure at the top level of the hierarchy you'll find yourself navigating quickly in no time. My advice is to familiarize yourself with the new CLI on the simulator before you dive in on the real thing. Tip #3: Make Full Use of Storage Virtual Machines In clustered Data ONTAP, all data access goes through a logical construct called a storage virtual machine (SVM). (This was previously referred to as a Vserver, and you'll notice that the CLI still uses the older term.) As a result, the physical resources used by an SVM can change without necessitating any client-side or host-side changes or disruptions. An SVM is a secure, virtualized storage container that includes its own administration security, IP addresses, and namespace. An SVM can include volumes residing on any node in the cluster, and you can have from one to hundreds of SVMs in a single cluster. Each SVM enables one or more SAN (FC, FCoE, iSCSI) and/or NAS (NFS, pNFS, CIFS) access protocols and contains at least one volume and at least one logical interface, or LIF. (See the following section for more on LIFs.) Figure 1) Clustered Data ONTAP uses storage virtual machines to separate logical entities from physical hardware and provide secure multi-tenancy. You can have multiple SVMs within a cluster to serve different purposes. For instance, a service provider might use a separate SVM for each client on a cluster. SVMs are an import factor to consider when designing clustered Data ONTAP systems even if the environment they are going into isn't inherently multi-tenant. For instance, I prefer to keep storage volumes used by servers on one SVM and user share volumes on a separate SVM. I usually create all of my iSCSI/FC LUNs and NFS datastores/mounts in one SVM. I create CIFS shares in a separate SVM. This provides extra flexibility in case of disaster, similar to what you may be used to with the vFiler® unit dr command in 7-Mode. Here are some other considerations when setting up SVMs. - QoS policies can be applied directly to an SVM. This can be extremely useful in service provider scenarios. However, be aware that you lose granularity in your QoS structure when you apply it at the SVM level. If you apply QoS to an SVM, you cannot apply a QoS policy on a particular volume within that SVM, so it may not be the best way to use QoS in every case. - You can separate departments within a company, keeping data completely separate from other departments. - Chargeback can be greatly simplified. You can easily tell how much each SVM utilizes. - You can use separate SVMs for administrative purposes. You can give different groups or departments administrative rights to manage their own data without compromising other SVMs. Tip #4: Understand Logical Interfaces Logical interfaces (LIFs) may be the most important point to grasp for a full understanding of how clustered Data ONTAP works. This became apparent after I spent some time talking with other NetApp system engineers last October at NetApp Insight. (See the sidebar for information on this year's upcoming event.) LIFs are essential to nondisruptive operations within clustered Data ONTAP, so it's important to know what a LIF is, how LIFs work, and how to design systems using LIFs. If you can get this down, you will be way ahead of the people who just have a "good idea" of what a LIF is. Now brace yourselves, because here comes the technical introduction. Similar to the way hypervisors abstract networking with virtual switches, NetApp LIFs abstract physical networking for your NetApp cluster. A LIF is a logical network interface that virtualizes your SAN and NAS network connections. This allows the cluster to expand, shrink, or even replace nodes without any network outages.. Figure 2) Clustered Data ONTAP uses logical interfaces (LIFs) to virtualize network connections. This is an important enabler of nondisruptive operations. Each cluster node can support a maximum of 256 LIFs, 6 of which are reserved for management and cluster functions (leaving you with a usable maximum of 250). 125 or fewer. That way, if an HA failover occurs, the limit on the partner node won't be exceeded even if it takes over all LIFs from the failing node. You can learn more about LIFs and LIF migrate in this Tech OnTap article on nondisruptive operations. To find out more about clustered Data ONTAP networking topics, including failover groups, load balancing, and more, check out TR-4182: Best Practices for Clustered Data ONTAP Network Configurations and the Clustered Data ONTAP 8.2: Network Management Guide. You should also check out the NetApp Support Site (login required) and NetApp University for the latest resources. Tip #5: Be Prepared to Use More VLANs and IP Addresses You almost certainly already know what VLANs are, but the thing you have to keep in mind is that a typical clustered Data ONTAP system uses more VLANs and IP addresses than 7-Mode. Where a 7-Mode storage system might have three VLANs (production, iSCSI, and NFS), a clustered Data ONTAP installation will have five VLANs (management, production, iSCSI, NFS, and SnapMirror). With clustered Data ONTAP, the management VLAN is required, and keeping your management on a separate VLAN helps you communicate with all cluster nodes in the event you have network problems. Most network engineers agree that keeping broadcast domains to a minimum is ideal. By separating different traffic types into VLANs you keep down chatter to unintended recipients. It also helps keep your data secure from prying eyes. It is possible to create a CIDR 20 network and run NFS, iSCSI, and CIFS on the same subnet, but this is just asking for trouble. Most engineers, myself included, create different VLANs for each protocol to keep broadcast domains small and improve security. Personally, keeping things consistent is very important to me. Using separate VLANs for different protocols also helps keep the IP address scheme easy to remember. For instance, when possible I like to have all IP addresses on the same node end in the same octet. You'll use a lot more IP addresses with clustered Data ONTAP than with 7-Mode systems, so be prepared. Each SVM requires a management IP address as well as block (iSCSI) and/or file (CIFS, NFS) IP addresses. For example, a 7-Mode system with a service processor running CIFS, iSCSI, and NFS will have five IP addresses per controller. A similar setup requires about 14 IP addresses with clustered Data ONTAP. Making sure you have enough IP addresses in a block is extremely helpful during deployment. Tip #6: Update Your Naming Conventions With the new features of clustered Data ONTAP, having a well-thought-out naming convention is more important than ever. For example, a logical interface group (LIF) could be named n01_svm01_nfs. This allows you to quickly see that the LIF is on Node01, for SVM01, and is used for NFS. Additionally, a volume could be named svm01_ds01, denoting a volume that lives on SVM01 named ds01. It's less important what your naming convention is than that you have one. If a particular named object is tied to a node or an SVM, make note of it in the naming convention. On the flip side, if an object can float around it is probably best to remove the reference to the SVM or node. There is no perfect recipe, but consistency is the key. Do yourself a favor and create a naming convention before you do your first deployment—it will make your life much easier. Tip #7: Create or Update Checklists If you're a 7-Mode administrator or systems engineer, you may have checklists for installations and other procedures that you've developed and documented over the years. Creating or updating these checklists for clustered Data ONTAP may seem like an obvious step, but it's easily overlooked. If you don't already have a checklist on paper, start by asking yourself how you would perform a given procedure such as setting up a 7-Mode system and use that as a starting point. Now take that checklist and perform the same process on clustered Data ONTAP using the simulator. You'll find that some of the steps for 7-Mode may be completely different to perform on clustered Data ONTAP, but the same general concepts still apply. Some steps are node specific while others are clusterwide. Once you complete this walk-through successfully, make yourself a new or updated checklist.
http://community.netapp.com/t5/Tech-OnTap-Articles/Seven-Tips-to-Get-Started-with-Clustered-Data-ONTAP/ta-p/85573
CC-MAIN-2016-22
refinedweb
2,069
52.29
Lagged Indicator (eg. SMA) - albertoburchi last edited by Dear all, I would like to build an indicator with lagged data. For example, get the SMA not today's close, but yesterday's or 2 days behind. Is there such a possibility in Backtrader or do I have to build an indicator by myself? Below I tried a lagged SMA of 7 days but I can't define the method next. Will you help me? class LaggedSMA_7(bt.Indicator): lines = ('laggedsma1',) params = (('period', 14), ('lag', 7)) def next (self): datasum = math.fsum(self.data.get(size=self.p.period)) self.lines.sma[0] = datasum / self.p.period @albertoburchi The simplist way, IIUYC, would be to create the indicator as normal, then when using it, just reference the value n bars ago. def __init__(self): self.sma = bt.ind.SMA(period=self.p.period) # then... def next(self): # Use the indicator like this for say, 5 bars ago ago = 5 # Use the indicator in your algo like... self.sma[-ago] # do whatever. @albertoburchi You can also use self.lagged_sma = self.sma(-7) in your __init__method to pre-define it and then just access it as any other data property. I think the function call operator ()is referred to as the "ago" operator on a line.
https://community.backtrader.com/topic/3753/lagged-indicator-eg-sma/1
CC-MAIN-2021-25
refinedweb
213
59.3
briqueabraque: > >>> Do you understand very well a C library and would like > >>> Haskell to have a binding for it? (...) If you are > >>> willing to help me with questions about your favorite C > >>> library, like compile options I should be carefull about > >>> or differences I may find between systems, I'll be glad to > >>> write a low level binding to it. > > >> I think "bindings" is an unfortunate choice of name for > >> this package, as it doesn't tell us anything about what > >> it contains. (...) > > It's not important what it contains, but how. Well, it does > contain bindings, as many as possible. The important thing is > that any new binding can be added following strictly the same > guidelines used for others. 'Bindings.Sqlite3' is just an > example on how this will be done. > > Suppose that 5 people want to write 5 different USB high-level > modules. The beneficts are: > > - they all can use the low-level binding in this package for > OpenUSB (which is not available now, until some expert on > that library helps me do it). No need for testing, debugging, > checking for portability or proper initialization, as all that > has been taken into account. > > - no need to read documentation. Guidelines in 'bindings' > ensures that the documentation for the original package (in > this case, the C documentation for OpenUSB) is valid for Haskell > binding. If you know OpenUSB in C, you can use Bindings.OpenUSB > almost without even looking at the documentation for that module. > > - if a bug is discovered in Bindings.OpenUSB, it's solved there. > Those 5 high-level modules won't need to check for the same > error. > > - those writing the high-level modules have no need to learn > about 'foreign import'. > > - if high-level coders fell unsafe about the behavior of the > API, they can write an HUnit test that will be added to the > test code in 'bindings'. (This is stated in the documentation. > If you write a test and it does apply, it will be added to the > test code.) All five high level modules benefict from that. > > > For example, the StandardC module would seem to duplicate the > > 'cmath' > package: (...) While the Sqlite3 module duplicates: > > (...)sqlite > > This package came from my need to use sqlite3. If 'sqlite' > existed before, it probably would not exist. But this is not > important. > > What is important is: if 'sqlite', and all other many sqlite3 > packages, removed their low-level ("foreign import .*" etc.) > and instead added 'bindings' as a dependency, they could all > count on "Many eyes make all bugs shallow" to the low level > code. And everybody could expend more time with the high level > stuff, which I'm sure everybody likes the most. > > I would like this package to be a repository where we could find > any good portable C (and other languages, when FFI support that) > package. If that happens (and the maintainer will probably > have to be someone better than me) I think a new module space is > worthwhile. Maybe 'Foreign.Bindings.*' instead of 'Bindings.*'. > > Sorry for the long post, but it took me a lot of time to get the > proper design for this package, specially for the guidelines. > If it doesn't work (i.e., nobody gets interested), it's dead > for good. Could you perhaps then summarise what design rules you're using? For example, why did you pick the new 'Bindings' namespace? What are you doing that's different to having standalone small packages? One risk I see is that 'bindings' will depend on a large number of C libraries -- i.e. if i just want to use cmath, I will also need sqlite3 on my machine for bindings to build. That seems problematic. Maybe this is a better discussion for libraries@? -- Don
http://www.haskell.org/pipermail/haskell-cafe/2009-April/060721.html
CC-MAIN-2014-35
refinedweb
622
74.19
In the previous article covering type inference we’ve reviewed the following cases: - Type Inference for local variables - Detecting forindex variable type - Understanding true, falseand nil But there’s more, much more… Let’s see more intelligence RubyMine shows when editing Ruby code. Unknown Method Calls If in your code you make a method call or reference an attribute that RubyMine for some reason cannot resolve, you will be notified about it by the appropriate inspection but only once for this particular method and current variable. And your code will not look all red. If you press Ctrl+B/⌘ B on such method call it will resolve to the first occurrence where inspection error is shown. Custom Error Types RubyMine correctly resolves your custom exceptions and their methods when you want to handle errors in your code. [code=’ruby’] class MyError err err.foo end [/code] Code completion shows the methods and attributes of custom error class MyError. Block Variables Type Using yield and blocks is one of the many things that make the Ruby language interesting. RubyMine understands that and can see the type of block variables used within block calls. [code=’ruby’] def my_iterate(count) i = 0 while i <= count do yield i i+=1 end end my_iterate(5) do |i| puts("Current: " + i.to_s) end [/code] So code completion only shows the relevant items. Guessing Return Type from Method Comment For RubyMine even the comments you write in your code are important and it uses them to help you in your work. RubyMine can get the type of method return value from method comment and then use it for more precise code completion. These are some of the basic code editing and code completion features that help being more productive. Stay tuned for lots more like this. We’ll cover Ruby on Rails related features next time.
https://blog.jetbrains.com/ruby/2008/11/more-type-intelligence-in-rubymine/
CC-MAIN-2017-30
refinedweb
312
69.52
NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab. Microcontroller Programming » LED Array Kit - Costum Solution (Not working) Hey guys, my LED Array kit has been in my drawer for a long while, but now I have decided to finish this Project. I have been through the tutorial and had everything up and running on my breadboard. Then I thought I should create a custom PCB and put it in a nice Frame. Now I have soldered my custom PCB and used the same Controller of the Breadboard. (Same Code as well) It is the running snake code for testing purpose. This was running great on the breadboard. But now on the PCB all LEDs which are connected to PCx are making Problems. In Detail the colums which are connected to PC0,PC1,PC2,PC3,PC4,PC5 have an issue. In more detail only the LEDs which the Anode leg. The issue is that the LEDs are lighting for one second, then they get dark. LEDs on PDx are working fine. I marked with red colour on the last photo which columns and LED leg are making Problems. Any ideas why it acts like that? I think I would need to see a picture (or a circuit diagram or both) and some code to help with this. Oh of course you will get the code. I thought every Nerdkit member has also bought the LED Array kit. :-) So this is the official Nerdkit Code which I got when I bought the LED Array kit. I hope it is okay to post it here. Which Pictures do you mean? In my post is the Eagle-Schematic, Eagle-PCB, Front Foam and Back Foam. What else do you Code: // ledarray.c // for NerdKits with ATmega168 // mrobbins@mit.edu #include <stdio.h> #include <avr/io.h> #include <avr/interrupt.h> #include <avr/pgmspace.h> #include <inttypes.h> #include "../libnerdkits/delay.h" #include "../libnerdkits/uart.h" //#include "font.h" // PIN DEFINITIONS: // // PB1-5 ROW DRIVERS (0-4) // PC0-5,PD2-7: COLUMN DRIVERS (0-11) #define F_CPU 14745600 #define ROWS 5 #define COLS 24 volatile uint8_t la_row, real_row; volatile uint8_t la_data[COLS]; inline uint8_t ledarray_get(uint8_t i, uint8_t j) { if(i < ROWS && j < COLS) { if((la_data[j] & (1<<i)) != 0) { return 1; } else { return 0; } } else { return 0; } } inline void ledarray_set(uint8_t i, uint8_t j, uint8_t onoff) { if(i < ROWS && j < COLS) { if(onoff) { la_data[j] |= (1<<i); } else { la_data[j] &= ~(1<<i); } } } //sense variable indicates direction of LED: sense == 1 indicates COL wire must be //hight for LED to turn on. sense == 0, COL wire must be low to turn LED on inline void ledarray_set_columndriver(uint8_t j, uint8_t onoff, uint8_t sense) { // cols 0-5: PC0-5 // cols 6-11: PD2-7 if(j < 6) { if(onoff){ //led on DDRC |= (1 << (PC0 + j)); if(sense) { PORTC |= (1 << (PC0 + j)); } else { PORTC &= ~(1<< (PC0 + j)); } } else { // led off, pins to high impedance DDRC &= ~(1 << (PC0 + j)); PORTC &= ~(1 << (PC0 + j)); } } else { if(onoff){ //led on DDRD |= (1 << (PD2 + (j-6))); if(sense) { PORTD |= (1 << (PD2 + (j-6))); } else { PORTD &= ~(1 << (PD2 + (j-6))); } } else { // led off, pins to high impedance DDRC &= ~(1 << (PC0 + j)); DDRC &= ~(1 << (PC0 + j)); } } } inline void ledarray_all_off() { // turn off all row drivers DDRB &= ~( (1<<PB1)|(1<<PB2)|(1<<PB3)|(1<<PB4)|(1<<PB5) ); PORTB &= ~( (1<<PB1)|(1<<PB2)|(1<<PB3)|(1<<PB4)|(1<<PB5) ); // turn off all column drivers DDRC &= ~( (1<<PC0) | (1<<PC1) | (1<<PC2) | (1<<PC3) | (1<<PC4) | (1<<PC5) ); PORTC &= ~( (1<<PC0) | (1<<PC1) | (1<<PC2) | (1<<PC3) | (1<<PC4) | (1<<PC5) ); DDRD &= ~( (1<<PD2) | (1<<PD3) | (1<<PD4) | (1<<PD5) | (1<<PD6) | (1<<PD7) ); PORTD &= ~( (1<<PD2) | (1<<PD3) | (1<<PD4) | (1<<PD5) | (1<<PD6) | (1<<PD7) ); } SIGNAL(SIG_OVERFLOW0) { // turn off old row driver DDRB &= ~(1 << (PB1 + real_row)); PORTB &= ~(1 << (PB1 + real_row)); ledarray_all_off(); // increment row number if(++la_row == 2*ROWS) la_row = 0; // set column drivers appropriately uint8_t j; if(la_row%2 == 0) { // even la_row number: fill even columns real_row = la_row / 2; for(j=0; j<COLS/2; j++) { ledarray_set_columndriver(j, ledarray_get(real_row, 2*j), 1); } // activate row driver SINK PORTB &= ~(1 << (PB1 + real_row)); DDRB |= (1 << (PB1 + real_row)); } else { // odd la_row number: fill odd columns real_row = (la_row-1)/2; for(j=0; j<COLS/2; j++) { ledarray_set_columndriver(j, ledarray_get(real_row, 2*j + 1), 0); } // activate row driver SOURCE PORTB |= (1 << (PB1 + real_row)); DDRB |= (1 << (PB1 + real_row)); } } void ledarray_init() { // Timer0 CK/64 (900Hz) TCCR0B = (1<<CS01) | (1<<CS00); TIMSK0 = (1<<TOIE0); // outputs (set row drivers high for off) DDRC &= ~( (1<<PC0) | (1<<PC1) | (1<<PC2) | (1<<PC3) | (1<<PC4) | (1<<PC5) ); DDRD &= ~( (1<<PD2) | (1<<PD3) | (1<<PD4) | (1<<PD5) | (1<<PD6) | (1<<PD7) ); DDRB &= ~( (1<<PB1)|(1<<PB2)|(1<<PB3)|(1<<PB4)|(1<<PB5) ); } void ledarray_left_shift() { // shift everything one position left uint8_t i, j; for(i=0; i<ROWS; i++) { for(j=0; j<COLS-1; j++) { ledarray_set(i,j, ledarray_get(i, j+1)); } } } void ledarray_blank() { uint8_t i, j; for(i=0; i<ROWS; i++) { for(j=0; j<COLS; j++) { ledarray_set(i,j,0); } } } void ledarray_testpattern() { uint8_t i, j; ledarray_blank(); for(i=0;i<ROWS;i++) { for(j=0;j<COLS;j++) { ledarray_set(i,j, 1 - ledarray_get(i,j)); delay_ms(30); } } for(i=0;i<ROWS;i++) { for(j=0;j<COLS;j++) { ledarray_set(i,j, 1 - ledarray_get(i,j)); delay_ms(30); } } } int main() { ledarray_init(); // activate interrupts sei(); // init serial port uart_init(); FILE uart_stream = FDEV_SETUP_STREAM(uart_putchar, uart_getchar, _FDEV_SETUP_RW); stdin = stdout = &uart_stream; while(1) { ledarray_testpattern(); } return 0; } It appears from you pictures and description that the LED on the C port are lighting up with one off the LED polarities but not the other. I think that is an indication that the pins on the C port are either not being energized when they should or possibly not sinking any current when they should. Without knowing the orientation of the LEDs on the display board I cannot determine which set of LEDs is not working. This is a bit of a wild guess on my part but I would start by grounding Pin 22 on the micro. It appears to be not connected to anything on your PC board. Grounding that pin cannot cause any issues and there may be a possibility that the pins on the C port used that ground to sink current. On the data sheet that I have it is not clear what that pin 22 GND may be responsible for. This does not explain why they are on for a second then go out but I would eliminate the possibility that the pins have no internal GND connection to sink current. Following the recommended practice in the data sheet (Pin 20) AVCC should be connected to the VCC supply even if you are not using the ADC. I would solder a couple of pieces of wire between pins on the back of your PC board to see if there is any change in the operation of the setup. Let use know if you find a solution. Darryl lnino, nice to see you. sorry I just viewed your post. If you have not got this straighten out I would restore your breadboard setup which you said you had working! Possible/hopefully you will see the error if it works. I would go by the Nerdkit instructions, do not reference any of your work. Hi Darryl and scootergarrett nice to see you also. I have been doing some posting over at Rick's forum. Ralph Thank you so much guys. Today I had the time to try your suggestions with my solder iron. The only differences between the breadboard and my PCB was the missing VREF, AVCC and AGND. I soldered some wires at the back of the PCB and now it works like charm. :-) Thanks for sask55 for pointing out the mistake. Now I can go forward building the frame. :-) I will keep you updated about the progress. Your welcome I think your PC board could likely come in handy for any project that may have a permanent or semi permanent set up. It would be a relatively simple change to include the connections to the AVCC AGND on the Eagle PCB board schematic. Since you now have a unused wire connection terminal on the PC board now I would also make use of it for one more possible micro pin connection maybe pin 21 (Vref) would be handy. By making these changes to the schematic if you ever have more boards printed the new boards could have potential for any long term use type projects without having to solder any wires on the back. Glad to here things are working Please log in to post a reply.
http://www.nerdkits.com/forum/thread/2939/
CC-MAIN-2019-18
refinedweb
1,451
67.89
Requirements: Linux Distribution (obviously) A text editor : Vim, Emacs, gedit, kate, atom A Compiler : gcc or clang A Shell: bash, xterm, sh My setup for this tutorial: Debian GNU/Linux 9.4 Atom (Text editor) gcc version 6.3.0-18+deb9u1 (Debian’s Release version for Debian 9.1) bash Preface: First I would like to say, this tutorial series will teach you how to navigate using the shell you are using, as well as writing efficient C code and learning to analyze it. C was designed in 1972 by Dennis Richie, and developed by him and Bell Labs. It was used to develop the Unix Operating System, and since, has become one of the most widely used programming languages of all times. It is an imperative procedural language that is pretty straight forward. It was designed to be compiled using a relatively straight forward compiler, to provide low level access to memory. First Steps: 1. Open up your Shell and create a project folder. [sourcecode language=’bash’] clim@clim:~/Desktop$ mkdir IntroToC clim@clim:~/Desktop$ cd IntroToC clim@clim:~/Desktop/IntroToC$ touch main.c [/sourcecode] For those who dont know, mkdir will create a project folder in the specified directory you are currently in. I then use the cd command to change directories and then the touch command to create the file. If you want, you could use the command of a text editor to do the same, for example: [sourcecode language=’bash’] clim@clim:~/Desktop/IntroToC$ gedit main.c [/sourcecode] This will open up main.c and you can start from there. Now type the following: [sourcecode language=’cpp’] #include <stdio.h> int main(int argc,char * argv[]){ printf(“Hello World!\n”); return 0; } [/sourcecode] Lets dissect this line by line: [sourcecode language=’cpp’] #include <stdio.h> [/sourcecode] This is a preprocessor macro that tells the compiler to “Take this header file and place it at the start of this source code”. When you are using system header files (such as stdio.h, which is in your C Runtime Library’s header folder), you always want to use the less-then and greater-then signs to encapsulate the file you want to include, but when you are including your own header files (ones that you write yourself), you need to use quotations like such: [sourcecode language=’cpp’] #include “foo.h” [/sourcecode] [sourcecode language=’cpp’] int main(int argc, char * argv[]) [/sourcecode] This is a function definition of main. There are certain standards to go by when writing a C Program. The C Standard has a chapter for declaring main: 5.1.2.2.1 Program startup The function called at program startup is named main. The implementation declares no prototype for this function. It shall be defined; You may see other programs and tutorials with the use of void main(), however this is a terrible programming practice and should not be done, unless you are working in a freestanding environment (which i may go over later in this series). [sourcecode language=’cpp’] printf(“Hello World!\n”) [/sourcecode] Printf is the most known way of printing formatted data, it takes in a string of characters, and can take in variables that need to be printed. This prints Hello World! on the screen. I use 1 formatting specifier in this example, the ‘\n’ character is the new-line operator and is used to skip to the next line of the terminal. This is to stop the shell from returning on that line, i will show you what i mean later in this tutorial. [sourcecode language=’cpp’] return 0; [/sourcecode] When your function ends, if it is of a specific type, it must return something. In this case, your just exiting the program normally, so you return 0 Now that you have finished typing that, save it and go back to your folder in your shell. Then run the following : [sourcecode language=’bash’] clim@clim:~/Desktop/IntroToC$ gcc main.c -o test1 [/sourcecode] What you are doing here is telling gcc to compile main.c into object code, and then link it to the C Runtime as test1. After this you can run the ./test1 program to get: [sourcecode language=’bash’] clim@clim:~/Desktop/IntroToC$ ./test1 Hello World! clim@clim:~/Desktop/IntroToC$ [/sourcecode] See, if i didnt include the newline character and just used printf(“Hello World!”) The result would look like this: [sourcecode language=’bash’] clim@clim:~/Desktop/IntroToC$ ./test1 Hello World!clim@clim:~/Desktop/IntroToC$ [/sourcecode] That ends the Introduction to C .
https://csprogramming.center/2018/03/23/an-introduction-to-c-with-linux/
CC-MAIN-2021-25
refinedweb
754
64.81
Fennel takes a lot of inspiration from Clojure. If you already know Clojure, then you'll have a good head start on Fennel. However, there are still a lot of differences! This document will guide you thru those differences and get you up to speed from the perspective of someone who already knows Clojure. Fennel and Lua are minimalist languages, and Clojure is not. So it may take some getting used to when you make assumptions about what should be included in a language and find that it's not. There's almost always still a good way to do what you want; you just need to get used to looking somewhere different. With that said, Fennel is easier to learn since the conceptual surface area is much smaller. Clojure and Fennel are both languages which have very close integration with their host runtime. In the case of Clojure it's Java, and in the case of Fennel it's Lua. However, Fennel's integration goes beyond that of Clojure. In Clojure, every function implements the interfaces needed to be callable from Java, but Clojure functions are distinct from Java methods. Clojure namespaces are related to Java packages, but namespaces still exist as a distinct concept from packages. In Fennel you don't have such distinctions. Every Fennel function is indistinguishable from a Lua function, and every Fennel module is indistinguishable from a Lua module. Clojure runs on the JVM, but it also has its own standard library: the clojure.core namespace as well as supplemental ones like clojure.set or clojure.java.io provide more functions. In Fennel, there are no functions whatsoever provided by the language; it only provides macros and special forms. Since the Lua standard library is quite minimal, it's common to pull in 3rd-party things like Lume, LuaFun, or Penlight for things you might expect to be built-in to the language, like reduce or keys. There's also an experimental Cljlib library, that implements a lot of functions from clojure.core namespace, and has a set of macros to make writing code more familiar to Clojure programmers, like adding syntax for defining multi-arity functions, or multimethods, also providing deep comparison semantics, sequence abstraction, and some addition data structures, like sets. In Clojure it's typical to bring in libraries using a tool like Leiningen. In Fennel you can use LuaRocks for dependencies, but it's often overkill. Usually it's better to just check your dependencies into your source repository. Deep dependency trees are very rare in Fennel and Lua. Even tho Lua's standard library is very small, adding a single file for a 3rd-party library into your repo is very cheap. Deploying Clojure usually means creating an uberjar that you launch using an existing JVM installation, because the JVM is a pretty large piece of software. Fennel deployments are much more varied; you can easily create self-contained standalone executables that are under a megabyte, or you can create scripts which rely on an existing Lua install, or code which gets embedded inside a larger application. Clojure has two types of scoping: lexical (for locals) and dynamic (for vars). Fennel only has lexical scope. (Globals exist, but they're mostly used for debugging and repl purposes; you don't use them in normal code.) This means that the "unit of reloading" is not the clojure.lang.Var, but the module. Fennel's repl includes a ,reload module-name command for this. Inside functions, let is used to introduce new locals just like in Clojure. But at the top-level, local is used, which declares a local which is valid for the entire remaining chunk instead of just for the body of the let. Like Clojure, Fennel uses the fn form to create functions. However, giving it a name will also declare it as a local rather than having the name be purely internal. Functions declared with fn have no arity checking; you can call them with any number of arguments. To have arity checking, declare with lambda instead, and it will throw an exception if you provide too few arguments. Fennel supports destructuring similarly to Clojure. The main difference is that rather than using :keys Fennel has a notation where a bare : is followed by a symbol naming the key. ;; clojure (defn my-function [{:keys [msg abc def]}] (println msg) (+ abc def)) (my-function {:msg "have a cola and smile" :abc 99 :def 523}) ;; fennel (fn my-function [{: msg : abc : def}] (print msg) (+ abc def)) (my-function {:msg "have a cola and smile" :abc 99 :def 523}) Like Clojure, normal locals cannot be given new values. However, Fennel has a special var form that will allow you to declare a special kind of local which can be given a new value with set. Fennel also uses #(foo) notation as shorthand for anonymous functions. There are two main differences; the first is that it uses $1, $2, etc instead of %1, %2 for arguments. Secondly while Clojure requires parens in this shorthand, Fennel does not. #5 in Fennel is the equivalent of Clojure's (constantly 5). ;; clojure (def handler #(my-other-function %1 %3)) (def handler2 (constantly "abc")) ;; fennel (local handler #(my-other-function $1 $3)) (local handler2 #"abc") Fennel does not have apply; instead you unpack arguments into function call forms: ;; clojure (apply add [1 2 3]) ;; fennel (add (table.unpack [1 2 3])) ; unpack instead of table.unpack in older Lua In Clojure, you have access to scoping information at compile time using the undocumented &env map. In Fennel and Lua, environments are first-class at runtime. Clojure ships with a rich selection of data structures for all kinds of situations. Lua (and thus Fennel) has exactly one data structure: the table. Under the hood, tables with sequential integer keys are of course implemented using arrays for performance reasons, but the table itself does not "know" whether it's a sequence table or a map-like table. It's up to you when you iterate thru the table to decide; you iterate on sequence tables using ipairs and map-like tables using pairs. Note that you can use pairs on sequences just fine; you just won't get the results in order. The other big difference is that tables are mutable. It's possible to use metatables to implement immutable data structures on the Lua runtime, but there's a significant performance overhead beyond just the normal immutability penalty. Using the LuaFun library can get you immutable operations on mutable tables without as much overhead. However, note that generational garbage collection is still a very recent development on the Lua runtime, so purely-functional approaches that generate a lot of garbage may not be a good choice for libraries which need to run on a wide range of versions. Like Clojure, any value can serve as a key. However, since tables are mutable data, two tables with identical values will not be = to each other as per Baker and thus will act as distinct keys. Clojure's :keyword notation is used in Fennel as a syntax for certain kinds of strings; there is no distinct type for keywords. Note that nil in Fennel is rather different from Clojure; in Clojure it has many different meanings, ("nil punning") but in Fennel it always represents the absence of a value. As such, tables cannot contain nil. Attempting to put nil in a table is equivalent to removing the value from the table, and you never have to worry about the difference between "the table does not contain this key" vs "the table contains a nil value at this key". And setting key to a nil in a sequential table will not shift all other elements, and will leave a "hole" in the table. Use table.remove instead on sequences to avoid these holes. Tables cannot be called like functions, (unless you set up a special metatable) nor can :keyword style strings. If a string key is statically known, you can use tbl.key notation; if it's not, you use the . form in cases where you can't destructure: (. tbl key). ;; clojure (dissoc my-map :abc) (when-not (contains? my-other-map some-key) (println "no abc")) ;; fennel (set my-map.abc nil) (when (= nil (. my-other-map some-key)) (print "no abc")) As was mentioned previously, Clojure has two types of scoping: lexical and dynamic. Clojure vars can be declared in the dynamic scope with the special metadata attribute, supported by def and its derivatives, to be later altered with the binding macro: ;; clojure (def ^:dynamic *foo* 32) (defn bar [x] (println (+ x *foo*))) (println (bar 10)) ;; => 42 (binding [*foo* 17] (println (bar 10))) ;; => 27 (println (bar 10)) ;; => 42 Fennel doesn't have dynamic scope. Instead we can use table mutability to alter values held, to be later dynamically looked up: ;; fennel (local dynamic {:foo 32}) (fn bar [x] (print (+ dynamic.foo x))) (print (bar 10)) ;; => 42 (set dynamic.foo 17) (print (bar 10)) ;; => 27 In contrast to Clojure's binding, which only binds var to a given value in the scope created by the binding macro, the modification of the table here is permanent, and table value have to be restored manually. In Clojure, similarly to variables, dynamic functions can be defined: ;; clojure (defn ^:dynamic *fred* [] "Hi, I'm Fred!") (defn greet [] (println (*fred*))) (greet) ;; prints: Hi, I'm Fred! (binding [*fred* (fn [] "I'm no longer Fred!")] (greet)) ;; prints: I'm no longer Fred! In Fennel we can simply define a function as part of the table, either by assigning anonymous function to a table key, as done in the variable example above, or by separating function name and table name with a dot in the fn special: ;; fennel (local dynamic {}) (fn dynamic.fred [] "Hi, I'm Fred!") (fn greet [] (print (dynamic.fred))) (greet) ;; prints: Hi, I'm Fred! (set dynamic.fred (fn [] "I'm no longer Fred!")) (greet) ;; prints: I'm no longer Fred! Another alternative is to use the var special. We can define a variable holding nil, use it in some function, and later set it to some other value: ;; fennel (var foo nil) (fn bar [] (foo)) (set foo #(print "foo!")) (bar) ;; prints: foo! (set foo #(print "baz!")) (bar) ;; prints: baz! This can also be used for forward declarations like Clojure's declare. In Clojure, we have this idea that "everything is a seq". Lua and Fennel, not being explicitly functional, have instead "everything is an iterator". The book Programming in Lua has a detailed explanation of iterators. The each special form consumes iterators and steps thru them similarly to how doseq does. ;; clojure (doseq [[k v] {:key "value" :other-key "SHINY"}] (println k "is" v)) ;; fennel (each [k v (pairs {:key "value" :other-key "SHINY"})] (print k "is" v)) When iterating thru maps, Clojure has you pull apart the key/value pair thru destructuring, but in Fennel the iterators provide you with them as separate values. Since Fennel has no functions, it relies on macros to do things like map and filter. Similarly to Clojure's for, Fennel has a pair of macros that operate on iterators and produce tables. icollect walks thru an iterator and allows the body to return a value that's put in a sequential table to return. The collect macro is similar in that it returns a table, except the body should return two values, and the returned table is key/value rather than sequential. The body of either macro allows you to return nil to filter out that entry from the result table. ;; clojure (for [x [1 2 3 4 5 6] :when (= 0 (% x 2))] x) ; => (2 4 6) (into {} (for [[k v] {:key "value" :other-key "SHINY"}] [k (str "prefix:" v)])) ; => {:key "prefix:value" :other-key "prefix:SHINY"} ;; fennel (icollect [i x (ipairs [1 2 3 4 5 6])] (if (= 0 (% x 2)) x)) ; => [2 4 6] (collect [k v (pairs {:key "value" :other-key "SHINY"})] (values k (.. "prefix:" v))) ; => {:key "prefix:value" :other-key "prefix:SHINY"} Note that filtering values out using icollect does not result in a table with gaps in it; each value gets added to the end of the table. All these forms accept iterators. Though the table-based pairs and ipairs are the most common iterators, other iterators like string.gmatch or io.lines or even custom ones work just as well. Tables cannot be lazy (again other than thru metatable cleverness) so to some degree iterators take on the role of laziness. If you want the sequence abstraction from Clojure, the Cljlib library provides Clojure's mapv, filter, and other functions that work using a similar seq abstraction implemented for ordinary tables with linear runtime cost of converting tables to a sequential ones. In practice, using Cljlib allows porting most Clojure data transformations almost directly to Fennel. Tragically Clojure does not have pattern matching as part of the language. Fennel fixes this problem by implementing the match macro. Refer to the reference for details. Since if-let just an anemic form of pattern matching, Fennel omits it in favor of match. ;; clojure (if-let [result (calculate-thingy)] (println "Got" result) (println "Couldn't get any results")) ;; fennel (match (calculate-thingy) result (print "Got" result) _ (println "Couldn't get any results")) Modules in Fennel are first-class; that is, they are nothing more than tables with a specific mechanism for loading them. This is different from namespaces in Clojure which have some map-like properties but are not really data structures in the same way. In Clojure, vars are public by default. In Fennel, all definitions are local to the file, but including a local in a table that is placed at the end of the file will cause it to be exported so other code can use it. This makes it easy to look in one place to see a list of everything that a module exports. ;; clojure (ns my.namespace) (def ^:private x 13) (defn add-x [y] (+ x y)) ;; fennel (local x 13) (fn add-x [y] (+ x y)) {: add-x} Modules are loaded by require and are typically bound using local, but they are also frequently destructured at the point of binding. ;; clojure (require '[clojure.pprint :as pp]) (require '[my.namespace :refer [add-x]]) (defn show-something [] (pp/pprint {:a 1 :b (add-x 13)})) ;; fennel (local fennel (require :fennel)) (local {: add-x} (require :my.module)) (fn show-something [] (print (fennel.view {:a 1 :b (add-x 13)}))) In any lisp, a macro is a function which takes an input form and returns another form to be compiled in its place. Fennel makes this even more explicit; macros are loaded as functions from special macro modules which are loaded in compile scope. They are brought in using import-macros: ;; macros.fnl {:flip (fn [arg1 arg2] `(values ,arg2 ,arg1))} ;; otherfile.fnl (import-macros {: flip} :macros) (print (flip :abc :def)) Instead of using ~ for unquote, Fennel uses the more traditional ,. At the end of a quoted form you can use table.unpack or unpack in place of ~@. You can also define macros inline without creating a separate macro module using macro, but these macros cannot be exported from the module as they do not exist at runtime; also they cannot interact with other macros. Lists and symbols are strictly compile-time concepts in Fennel. There are two kinds of ways to represent failure in Lua and Fennel. The error function works a bit like throwing an ex-info in Clojure, except instead of try and catch we have pcall and xpcall to call a function in "protected" state which will prevent errors from bringing down the process. These can't be chained in the same way as Exceptions on the JVM are. See the tutorial for details. There is no cond in Fennel because if behaves exactly the same as cond if given more than three arguments. Functions can return multiple values. This can result in surprising behavior, but it's outside the scope of this document to describe. You can use the values form in a tail position to return multiple values. Operators like + and or, etc are special forms which must have the number of arguments fixed at compile time. This means you cannot do things like (apply + [1 2 3]) or call (* ((fn [] (values 4 5 6)))), though the latter would work for functions rather than special forms.
https://git.sr.ht/~technomancy/fennel/tree/main/item/from-clojure.md
CC-MAIN-2021-25
refinedweb
2,745
62.48
Dan Horák wrote: > Hello, > > I want to unify the spec files for TinyERP, because they are (only a > bit) different between FC < 5 and FC >=5 due the change in Xorg > packaging. > > Now I have in the spec for FC < 5 > > BuildRequires: xorg-x11-Xvfb > > and for FC >= 5 I need > > BuildRequires: xorg-x11-server-Xvfb, xorg-x11-fonts-base > > and there is also a difference between calling the Xvfb server > (/usr/X11/bin/Xvfb vs. /usr/bin/Xvfb). > > Should I check the value of "%fedora" so it would look like > > %if "%fedora" < 5 > BuildRequires: xorg-x11-Xvfb > %else > BuildRequires: xorg-x11-server-Xvfb, xorg-x11-fonts-base > %endif > > or should I use "%dist" for the checks? I was probably already mentioned > on this list, but I not able to find it. The former (use %%fedora). It's easier for less than, greater than checks. -- Rex
https://www.redhat.com/archives/fedora-extras-list/2006-May/msg00676.html
CC-MAIN-2015-11
refinedweb
146
75.84
Pumpkin Pi Introduction: Pumpkin Pi Got this idea after making my first autonomous robot with arduino and ultrasonic sensor. With Halloween coming up and my fascination with raspberry pi I put my new found knowledge of the distance sensor to good use. I had all parts already except the pumpkin so i'll do my best to list all parts and provide links where possible. Entered in the Halloween decoration contest please vote me up I want a shirt lol. Step 1: Parts and Tools Parts: - Raspberry Pi(I used 2B, I'm sure the 3 or others would work as well.) - HC-SR04 Ultrasonic Sensor(I bought the 5 pack for past projects and had a couple left over) - Resistors - (330Ω and 470Ω), jumper wires, breadboard - Bluetooth Transmitter - (Optional. First iteration I used a cable but didn't like the limitations) - Bluetooth Speaker - (Again the Bluetooth part is optional) - Micro USB cable - Pumpkin (plastic) or whatever you want to put it in Tools: - Box cutter (something to cut open the pumpkin) Step 2: Lets Start With Hardware The set up is pretty simple I got the diagram above from tutorials-raspberrypi.com so you can read over their explanation for the need for resistors. As shown find the correct GPIO pins you want to use and the appropriate ones for your pi model. Make all connections as shown and that's it for connecting pi to sensor. Plug in the Bluetooth transmitter (audio cable) into the pi's audio out and set aside for testing (I always test things out before putting in the case (pumpkin)). I also powered the Bluetooth transmitter from the pi its self. Step 3: Software Programs: You should have all necessary programs if you install the latest version of RASPBIAN JESSIE for pi. Just in case run these commands to ensure. I used python 3 to run the app its just a matter of syntax change mostly but found this version to run the code better in its current state. sudo apt-get update && sudo apt-get upgrade sudo apt-get install python3 sudo apt-get install python3-rpi.gpio sudo apt-get install mpg321 Files and directories: To keep all files together I made a folder to hold the mp3 files and the .py code. Name your file what you want and keep all mp3 files in the same folder as your code. From the "/home/pi" directory mkdir halloween touch halloween.py Code: The python file is attached to this instructable. Most of the code isn't mine thank you raspberrypi-spy,I simply changed the GPIO numbers to my own and wrote the loop that will play the sound clips when a certain distance is detected. The code is very well commented so I won't go over it all but here are some of the high points and parts you may need to change. Set up: Import the necessary libraries. import time import os import random import RPi.GPIO as GPIO Assign the correct pins that you connected the Trigg and Echo from the sensor to: # Use BCM GPIO references instead of physical pin numbers GPIO.setmode(GPIO.BCM) # Define GPIO to use on Pi Make sure to change this to your own pins if they are different GPIO_TRIGGER = 18 GPIO_ECHO = 24 The loop: Here I edited the loop to play a random sound clip whenever the sensor picks up a distance shorter than the constant (discussed in later step). while True: distance = measure_average() # In ordger to play a random clip each # time this variable will change with every # loop iteration could also be placed in the if block randomNumber = random.randint(1,12) print ("Distance : %.1f" % distance) # Choose a distance that works for you the 0 accounts # for an echo that was never returned this could be # constantly 0 if not placed in front of an object/wall if(distance == 0 or distance < 124): #play mp3 if(randomNumber ==1): os.system('mpg321 /home/pi/halloween/candy.mp3') if(randomNumber ==2): os.system('mpg321 /home/pi/halloween/gameover.mp3') # Time between loop iterations time.sleep(.25) Step 4: Sound Clips I found clips at numerous sites just make sure they're mp3 if not you can convert them. I also made a couple of my own with a voice changing app you could find some in either app store and you can make custom creepy greetings. Some sites with sound clips:... This site has compiled a bunch of sites for you as well:... I personally wanted to use movie sound clips but my wife preferred some generic ghost/howling/creepy laugh noises. I did manage to sneak in the jaws theme and some other classics that got her approval. Step 5: Starting Script Remotely So there's multiple options here but I have two preferred methods. - XRDP into the pi from laptop/computer on the network. This is nice if you prefer a gui,but when all you need to do is get in and start a script its not necessary. once deployed this method may be preferred for adding, placing and renaming the mp3 files. - Serverauditor - ssh client (android app) from tablet I like this app. I run it from my tablet and kick off the script from here. It was convenient when testing outside. You could also set the script to run at boot up and it'll run automatically what ever your preference. To launch your code enter the command: cd /home/pi/halloween sudo python3 halloween.py Step 6: Finding the Right Distance After launching the code for the first time watch the output. The code provided will constantly print out the distance the sensor is receiving. This is good for testing purposes you can remove that portion once deployed but I left it for monitoring purposes. Place the sensor in the desired location (I have it hitting a wall at my entry way which is nice to find a consistent distance). Once you have that control distance use that to determine at what distance you want to trigger the sound. I have it set at anything shorter than the constant by 2 (cm I believe) will trigger a sound clip. So if my constant is 125 then I set my 'if' statement to (distance == 0 or distance < 123) to account for any inconsistencies and no one is sneaking past within that 2 cm gap. If its not set correctly your sounds may be triggered constantly and ruin the whole point of a sensor. Step 7: Putting It Together I placed the pi and sensor in the small pumpkin by cutting a large flap in the back ( I taped shut afterwards as it'll be dark and wasn't to concerned for looks on this part) and a smaller whole to thread cords through. I also kept the bluetooth transmitter on the outside (taped) in order to turn it on or off and in case I need to reconnect to a different speaker. The speaker is housed in the large Skull placed by the door so the sound plays just as they're about to knock. Step 8: And You're Done Place it at your door step and scare all the kids that stop by. Please send feedback or ask any questions I'll try my best to answer. First instructable so I probably forgot something or could enhance the tutorial a little more. This is a very fun, easy, cheap, and simple project that many people can implement. Good Job. Thanks G This is a fun option for lighting pumpkins :)
http://www.instructables.com/id/Pumpkin-Pi-1/
CC-MAIN-2017-47
refinedweb
1,266
68.7
How to wake up thread which is in sleep mode (1 messages) Hi, I've thread program which continuesly run in background as shown below: [code] public class Counter implements Runnable { int Count; public Counter() { Count=0; } public Counter(int x) { Count=x; } public void run() { while(true) { Count++; System.out.println("Counter="+getCount()); for(int i=1;i<100000;i++) { for(int j=1;j<10000;j++) { // } } try { System.out.println("Sleeping"); Thread.sleep(60000); } catch(InterruptedException e){} } } public int getCount() { return Count; } public static void main(String[] args) { Counter c = new Counter(); Thread t = new Thread(c); t.start(); } } [/code] The above program sleeps for 60sec after certan intervals. However, during some times, when it is asleep, I need to wake it up. I've a front end pages developed in JSP. And if I click Submit, I need to wake this thread if its asleep. Can anyone tell me how to do this? I'll appreciate if u can provide some sample test program. Thanks! - Posted by: Ffasfds Fdsfs - Posted on: May 07 2009 02:56 EDT Threaded Messages (1) - Re: How to wake up thread which is in sleep mode by Tribikram Sahoo on May 07 2009 08:20 EDT Re: How to wake up thread which is in sleep mode[ Go to top ] Have a reference to your thread object. You can cache it some where when you start the thread. Thread t = new Thread(c); Cache the reference to "t". On submit of your JSP, get this reference and call t.interrupt(); - Posted by: Tribikram Sahoo - Posted on: May 07 2009 08:20 EDT - in response to Ffasfds Fdsfs
http://www.theserverside.com/discussions/thread.tss?thread_id=54523
CC-MAIN-2016-18
refinedweb
275
79.5