text:
Electronics/Diagnostic Equipment

=Diagnostic and Testing Equipment=

There is a wide array of devices used to test and diagnose electronic equipment. This chapter will attempt to explain the differences and different types of equipment used by electronics technicians and engineers.

Ammeter
An ammeter measures current.Current in electronics is usually measured in mA which are called milliamperes, which are 1/1000s of an ampere. . The ammeter's terminals must be in series with the current being measured. Ammeters have a small resistance (typically 50 ohms) so that they only have a small effect on the current.

 * 0 Polímero GFDL.jpg

Basically an ammeter consists of a coil that can rotate inside a magnet, but a spring is trying to push the coil back to zero. The larger the current that flows through the coil, the larger the angle of rotation, the torque (= a rotary force) created by the current being counteracted by the return torque of the spring. . Usually ammeters are connected in parallel with various switched resistors that can extend the range of currents that can be measured. Assume, for example, that the basic ammeter is "1000 ohms per volt", which means that to get the full-scale deflection of the pointer a current of 1 mA is needed (1 volt divided by 1000 ohms is 1 mA - see "Ohm's Law"). . To use that ammeter to read 10 mA full-scale it is shunted with another resistance, so that when 10 mA flows, 9 mA will flow through the shunt, and only 1 mA will flow through the meter. Similarly, to extend the range of the ammeter to 100 mA the shunt will carry 99 mA, and the meter only 1 mA.

Ohmmeter
An ohmmeter measures resistance.The two terminals of ohmmeter are each placed on a terminal of the resistance being measured. This resistance should be isolated from other effects. (It should be taken out of a circuit, if it is in one.)

Ohmmeters are basically ammeters that are connected to an internal battery, with a suitable resistance in series. Assume that the basic ammeter is "1000 ohms per volt", meaning that 1 mA is needed for full-scale deflection. When the external resistance that is connected to its terminals is zero (the leads are connected together at first for calibration), then the internal, variable, resistor in series with the ammeter is adjusted so that 1 mA will flow; that will depend on the voltage of the battery, and as the battery runs down that setting will change. The full scale point is marked as zero resistance. If an external resistance is then connected to the terminals that causes only half of the current to flow (0.5 mA in this example), then the external resistance will equal the internal resistance, and the scale is marked accordingly. When no current flows, the scale will read infinity resistance. The scale of an ohmmeter is NOT linear.Ohmmeters are usually usuful in cheking the short circuit and open circuit in boards.

Voltmeter
A voltmeter measures voltage.The voltmeter's terminals must be in parallel with the voltage being measured. Voltmeters have a large resistance (typically 1 megaohm), so that they only have a small effect on the voltage.
 * Fluke 87 III True RMS Multimeter.jpg

Multimeter

 * Digital Multimeter Aka.jpg

A multimeter is a combination device, (usually) capable of measuring current, resistance, or voltage. Most modern models measure all three, and include other features such as a diode tester, which can be used to measure continuity in circuits (emitting a loud 'beep' if there is a short).

Oscilloscope
An oscilloscope, commonly called a 'scope' by technicians, is used to display a voltage waveform on a screen, usually graphing voltage as a function of time.
 * Tektronix 465 oscilloscope.png

Spectrum Analyzer
Spectrum analyzer shows voltage (or power) densities as function of frequency on radio frequency spectrum. Spectrum analyzer can use analog frequency scanning principle (like radio receiver always changing frequency and measuring receiving amplitude) or digital sampling and FFT (Fast Fourier Transformation).
 * Spektrumanalysator FSL von Rohde & Schwarz.jpg

Logic analyzer
A logic analyzer is, in effect, a specialised oscilloscope. The key difference between an analyzer and an oscilloscope is that the analyzer can only display a digital (on/off) waveform, whereas an oscilloscope can display any voltage (depending on the type of probe connected). The other difference is that logic analyzers tend to have many more signal inputs than oscilloscopes - usually 32 or 64, versus the two channels most oscilloscopes provide. Logic analyzers can be very useful for debugging complex logic circuits, where one signal's state may be affected by many other signals.
 * [[File:Logic probe new.jpg]]

Frequency counter
A frequency counter is a relatively simple instrument used to measure the frequency of a signal in Hertz (cycles per second). Most counters work by counting the number of signal cycles that occur in a given time period (usually one second). This count is the frequency of the signal in Hertz, which is displayed on the counter's display.
 * Frequency counter.JPG

Electrometer
A voltmeter with extremely high input resistance capable of measuring electrical charge with minimal influence to that charge. Ubiquitous in nucleonics, physics and bio-medical disciplines. Enables the direct verification of charge measured in coulombs according to Q=CV. Additionally, electrometers can generally measure current flows in the femtoampere range, i.e. .000000000000001 ampere.

Signal Generator

 * Leader LSG-15 signal generator.jpg

title: Electronics/Diagnostic Equipment


text: File:Mohrscircle Solid Mechanics.png

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: File:Mohrscircle Solid Mechanics.png


text: File:Tresca Solid Mechanics.png

title: File:Tresca Solid Mechanics.png


text: File:Mohrs tensile Solid Mechanics.png

title: File:Mohrs tensile Solid Mechanics.png


text: File:Mohrs liquid Solid Mechanics.png

title: File:Mohrs liquid Solid Mechanics.png


text:
Talk:Electronics/Expanded Edition

This is the second part of the Electronics book. It deals with topics that are related to Electronics but don't quite fit into an Electronics book. As this is the second part editors can stop showing restraint towards math. Long live Greek.

A lot of the physics is covered in the physics textbooks.. Eh, I don't really know.

It is true that these subjects are covered elsewhere, but this part of the book talks about them in terms of Electricity and Magnetism. A good example is Optics. Normally when people talk about Optics they talk about visible light. My question is how optics works throughout the entire electromagnetic spectrum. For instance at higher frequencies light will destroy mirrors rather than being reflected by it. (At higher POWERS - at higher frequencies it may not be reflected particularly efficiently, or perhaps not even reach the mirror).

 * Yes, at high enough power, visible light will heat up and melt a mirror.
 * But also, at high enough frequencies (X rays), a single photon carries enough energy to knock an electron completely out of a mirror, or break the bond between one atom and the next.
 * Either one will destroy a mirror.
 * --DavidCary 02:26, 27 September 2006 (UTC)

See, I was hoping to make more of a practical book about electronics and about the subject. Now it seems this book has become practically everything but? Hoped to cover things like design and understanding of electrical circuits and systems, etc. Your thoughts?

<Narrow the focus. There's a proposed physics with calculus that can cover the wider shores of EM. For this book, just stick to circuits; without much maths in the first half, with maths in the expanded section: resistance, capacitance, inductance, batteries and electrolysis, generators and motors, and semiconductors. Don't explain how semiconductors work, or details about magnetism; stick to what's need for studying circuits. Possibly a final chapter saying, without maths, 'This is how circuits fit into EM and beyond. Now go and read these other books'>

I agree with person. If we concentrate more on the field of ELECTRONICS and less on the field of ELECTRICITY, we should fare well with a good textbook. If a reader can design a radio transmitter or digital circuit by the end of the book, we can give our selves a pat on the back. However, learning how electron spin and the function of n-doped semiconductor materials only gets you so far.

Quote "Semiconductor are always made of silicon"
 * No semiconductors can be made of Gallium Arsenide or any group 3 and group 5 compound.

''Please Be bold in updating pages and fix any errors you see, rather than commenting on them. Thank you. --DavidCary 02:26, 27 September 2006 (UTC)''

title: Talk:Electronics/Expanded Edition


text:
Robotics/Components/Actuation Devices/Air muscle

The concept of a fully autonomous, mission capable, legged robot has for years been a Holy Grail of roboticists. Development of such machines has been hampered by actuators and power technology and control schemes that cannot hope to compete with even some of the “simplest” systems found in the natural world.

Biomimetics
Faced with such a daunting task, it is not surprising that more and more researchers are beginning to look toward biological mechanisms for inspiration.

Biology provides a wealth of inspiration for robot design. There are millions of species of animals that have evolved efficient solutions to locomotion and locomotion control.

Legs, wheels, treads
Insects in particular are well known not only for their speed and agility but also for their ability to traverse some of the most difficult terrains imaginable; insects can be found navigating rocky ground, walking upside down, climbing vertical surfaces, or even walking on water. Furthermore, insects almost instantly respond to injury or removal of legs by altering stance and stepping pattern to maintain efficient locomotion with a reduced number of legs [1]. Given the ultimate goal of autonomy, this ability to reconfigure locomotion strategies will be crucial to the robustness of autonomous robots [2].

There are of course other mechanisms capable of producing locomotion, most notably wheels and caterpillar treads. While these devices are admittedly much easier to design and implement, they carry with them a set of disadvantages that inhibits their use in military or exploratory applications. Primary amongst these limitations is the simple fact that wheels, and to a lesser extent treads, are not capable of traversing terrain nearly as complex as that which a legged vehicle is capable of maneuvering over [2]. Even wheeled and tracked vehicles designed specifically for harsh terrains cannot maneuver over an obstacle significantly shorter than the vehicle itself; a legged vehicle on the other hand could be expected to climb an obstacle up to twice its own height, much like a cockroach can. This limitation on mobility alone means that in any environment without fairly flat, continuous terrain, a walking vehicle is far preferable to a wheeled or tracked one. Legged vehicles are also inherently more robust than those dependent on wheels or tracks. The loss of a single leg on a hexapod will result in only minimal loss in maneuverability; on a wheeled vehicle a damaged wheel could spell the end of mobility, and a damaged caterpillar tread almost always results in catastrophic failure. Finally, legged vehicles are far more capable of navigating an intermittent substrate—such as a slatted surface—than wheeled vehicles [3].

Given the preceding argument for the use of legged locomotion in certain environments, one is left with the daunting task of actually designing an efficient legged robot. While such a task is difficult to say the least, nature has provided us—literally—with a world full of templates. Animals can be found that are capable of navigation over almost any surface, and it is from these natural solutions to locomotion problems that engineers are more and more often seeking inspiration.

Actuators
2. Actuator Selection The selection of actuators plays a pivotal role in any mobile robot design, as the shape, size, weight and strength of an actuator must all be taken into account, and the power source of the actuators often provides the greatest constraint on a robot’s potential abilities. Actuators perform like muscles and joints of a robot to bring about motion.

Muscle
Biological organisms have a great advantage over mechanical systems in that muscle, nature’s actuator of choice, has a favorable force-to-weight ratio and requires low levels of activation energy. Their tunable passive stiffness properties are also well suited for energy efficient legged locomotion. The most frequently used actuators, electric motors and pneumatic/hydraulic cylinders, are far from equivalent to their biological counterparts.

Electric motor
Electric motors are probably the most commonly used actuation and control devices in modern day robotics, and with good reason. Motors in a wide range of sizes are readily available and they are very easy to control. These devices are also fairly easy to implement, normally requiring just a few electrical connections. However, electric motors have several disadvantages. Most importantly, their force-to-weight ratio is far lower than that of pneumatic and hydraulic devices, and in a field such as legged robotics, where weight is of the utmost importance, this makes them unsuitable for many applications. Typically, electric systems have a power to weight ratio of 50-100 W/kg (including only motor and gear reducer, operating at rated power), whereas fluid systems produce 100-200 W/kg (including actuator and valve weights) [4] and biological muscle, which varies widely in properties, produces anywhere from 40-250 W/kg [5]. In addition, when trying to take advantage of an animal’s efficient biomechanical design, the drastic difference between the rotary motion of most electric motors and the linear motion of muscle can cause complications.

Pneumatic and hydraulic cylinder
Pneumatic and hydraulic cylinder systems eliminate some of the problems associated with electric motors [6]. As a general rule, they provide a significantly higher force-to-weight ratio than motors; an advantage that in itself often leads to their use, even given the increased complexity and weight of control valves and pressurized fluid lines required for operation. These actuators also produce linear motion, which makes them more suitable to serving a role equivalent to muscle. Unfortunately, air cylinders are better suited to “bang-bang” operation; that is, motion from one extreme to another with mechanical stops to halt motion. Smooth walking motion requires a much larger range of states, and the stiction present in most pressure cylinders makes even coarse position control difficult. Fluid pressure devices are still quite massive; for example, almost seventy-five percent of CWRU’s Robot III’s weight is composed of its actuators and valves [7].

Braided pneumatic actuator
Braided pneumatic actuators (BPAs) provide a number of advantages over conventional actuation devices, and share some important characteristics with biological muscle. These devices consist of two major components: an inflatable bladder around which is wrapped an expandable fiber mesh (Figure 1). The resulting actuator is significantly lighter than a standard air cylinder; however, the braided pneumatic actuator is actually capable of producing greater forces (and thus possesses a much higher force-to weight-ratio) than its heavier counterpart. When the bladder is filled with pressurized air, its volume tends to increase. Because of the constant length of the mesh fibers, this can only be accomplished by the actuator expanding radially while simultaneously contracting along its axis. The result is a muscle-like contraction that produces a force-length curve akin to the rising phase of actual muscle [8].

Figure 1: A placeholder An important property of BPA to note is that at maximum contraction (L/Lo≈0.69) the actuator is incapable of producing force; conversely, the maximum possible force is produced when the actuator is fully extended. Therefore, similar to muscle, the force output of these actuators is self-limited by nature. While an electric motor controller could conceivably become unstable and drive a system until failure of either the structure or the motor, a braided pneumatic actuator driven by an unstable controller is less likely to be driven to the point of damaging itself or the surrounding structure. Because of this property, braided pneumatic actuators are well suited for the implementation of positive load feedback, which is known to be used by animals including cockroaches, cats and humans [9].

BPAs are also known as McKibben artificial muscles [10], air muscles, and rubbertuators. They were patented in 1957 by Gaylord and used by McKibben in orthotic devices [11]. Like biological muscle, BPAs are pull-only devices. This means that they must be used in opposing pairs, or opposing some other antagonist. This property is of significant importance for useful application of these devices, for although it requires the use of two actuators or sets of actuators at each joint, it allows the muscle-like property of co-contraction, also known as stiffness control. If one considers a joint in the human body, such as the elbow or knee, it should be obvious that whatever position the joint is in the muscles that control that joint can be activated (flexed) without changing the joint angle. From an engineering standpoint, this is accomplished by increasing the force produced by each muscle in such a way that the net moment produced at the joint is zero. As a result, the joint angle remains the same but perturbations, such as the application of an outside force, result in less disturbance. From a practical standpoint, this means that the joint can be varied through a continuum of positions and compliances independently. The resulting joint can be stiff when needed, such as when bearing weight while walking, or compliant, as in cases of heel strike where compensation for uneven terrain may be needed.

The greatest impediment to widespread use of BPAs has been their relatively short fatigue life. Under operating conditions such as we desire, these devices are capable of a service life on the order of 10,000 cycles as they were originally designed. A significant improvement to these devices has been made by the Festo Corporation, which has recently introduced a new product called fluidic muscle. This operates on the same principles as a standard BPA, with the critical difference being that the fiber mesh is impregnated inside the expandable bladder. The resulting actuators have a demonstrated fatigue life on the order of 10,000,000 cycles at high pressure.

3. Previous Robots

Two previous robots developed at CWRU have provided significant insight and impetus for the design of Robot V. Both of these cockroach-based robots are non-autonomous, and rely on off board controllers and power supplies for operation.

Robot III was the first pneumatically powered robot built at CWRU, and relied on conventional pneumatic cylinders for actuation. This 15 kilogram robot was powerful, and was demonstrated to be capable of easily lifting payloads equivalent to its own weight. The fundamental failing of this robot was the difficulty inherent in the control of the pneumatic cylinders; although capable of maintaining stance robustly and cycling its legs in a cockroach manner, to date this robot has not demonstrated smooth locomotion [12].

Kinematically similar to its predecessor, Robot IV implemented braided pneumatic actuators in place of Robot III’s pneumatic cylinders. This robot was underpowered; it was barely able to lift itself, the valves were moved off-board for walking experiments. However, this robot was significantly easier to control, in large part because the valves allowed air to be trapped inside the actuators, so that joint stiffness could be varied as well as joint position. Using an open-loop controller, this robot was able to locomote [13]

4. Overview of Robot V

Design Case Western Reserve University’s most recent robot, Robot V (Ajax) like its predecessors Robot IV and Robot III is based on the death head cockroach Blaberus discoidalis. Although it is not feasible to capture the full range of motion exhibited by the insect—up to seven degrees of freedom per leg—analysis of leg motion during locomotion suggests that this is not necessary. This is because in many cases joints demonstrate only a small range of motion, while the majority of a leg’s movement is produced by a few joints. We have determined that three joints in the rear legs, four in the middle legs, and five in the front legs are sufficient to produce reasonable and robust walking [7] [14]. The different number of DOF in each set of limbs represents the task-oriented nature of each pair of legs. On the insect, the front legs are relatively small and weak, but highly dexterous (Figure 2), and are thus able to effectively manipulate objects or navigate difficult terrain. This dexterity is attained in the robot through three joints between the body and coxa. These joints are referred to (from most proximal to most distal) as γ, with an axis parallel to the intersection of the median and coronal planes (in the z direction); β, with an axis parallel to the median and transverse planes (in the y direction); and α, with

Figure 2: Schematic of front leg with axes of joint rotation

an axis parallel to the coronal and transverse planes (in the x direction). The two remaining joints are between the coxa and femur and the femur and tibia. The middle legs on the insect play an important role in weight support, and are critical for turning and climbing (rearing) functions; however they sacrifice some dexterity for power. On Robot V, the middle legs have only two degrees of freedom—α and β—between the body and coxa, and retain the single joint between the coxa and femur and the femur and tibia. Finally, the cockroach uses its rear legs primarily for locomotion, and although these limbs are not as agile as the others, they are larger and much more powerful; likewise, the rear legs of the robot have only one joint between each of the segments. The body-coxa joint uses of only the β joint. Although each leg has a unique design, one component they have in common is the tarsus, or foot, construction. This consists of a compliant member attached to the end of the tibia and a pair of claws. The compliant element is capable of bending to maintain contact with the ground, thus providing traction. The claws are angled differently on each leg to assist in its specific task; for example, the claws on the rear leg are angled backwards like spines, allowing the foot additional traction when propelling the robot forward.

4.1 Valves

Each joint is driven by two opposing sets of actuators, allowing for controlled motion in both directions (previous robots have used a single actuator set paired with a spring) [15]. Each actuator set is driven by two two-way valves; one for air inlet and one for air exhaust. This scheme doubles the number, and thus the weight, of valves as compared to Robot III; however, it allows for the implementation of stiffness control, or co-contraction. Because the pressures in opposing actuators can be independently varied, the same joint angle can be achieved using different combinations of actuator pressures; all that is required is that the moments on a given joint sum to zero at the desired position. As a result, a joint can be made very stiff by pressurizing both sets of actuators, or very compliant, by pressurizing one actuator only enough to overcome the mass properties of the limb to reach a desired position.

4.2 Stance bias

The actuators onboard a legged robot can generally be subdivided into two classes: those used to move the limb through the swing phase and those required to maintain stance and generate locomotion. One of the fundamental differences between these two types of actuators is the load that is required of them. The swing actuators need only provide the force necessary to overcome the weight and inertia of the limb, whereas the stance actuators must support not only a significant portion of the entire mass of the robot, but also provide the force necessary for locomotion. This disparity between operational demands can potentially lead to large, powerful stance actuators and small swing actuators (as can be seen in the human body with powerful quadriceps muscles which maintain stance, and the respectively weaker hamstring muscles, which are used for swing); however, because of limited options for robot actuator sizes, it is more often the case that the swing actuators are overpowered, whereas the stance actuators are either underpowered or just capable of meeting the demands placed on them. On Robot V this problem was resolved through the placement of torsion springs at some critical load bearing joints (specifically the coxa-femur and β joints) to provide a bias in the direction of stance. As a result, the forces required of the stance actuators are significantly reduced while the swing actuators must produce greater forces, but still remain within their operational range.

5. Initial Trials

Robot V, like Robot IV, was designed as an exoskeleton, where the structural members are placed outside and around the actuators. Not only did this allow a significant reduction in weight, but it also provided a limited protection for the actuators, which are susceptible to puncture and abrasion (Figure 3). The vast majority of the structural elements were made of 6061-T6 Aluminum, although axles and actuator mounting shafts were made of 1018 steel, and fasteners were made from stainless steel. All joint axles were mounted in nylon journal bearings.

Figure 3: Robot V (Ajax)

Whenever possible, actuators were directly mounted to both their insertion and their origin. This precluded the need for tendons, allowing the maximum possible length of actuator to be used. This in turn maximized the force and stroke available for each individual joint. The notable exception to this strategy was the β actuators, which were attached to a tendon and mounted parallel to the body. This was done to reduce the overall height of the robot. The first legs to be built were the middle legs. These were chosen for initial tests because they must be dexterous and forceful to maintain stance in a tripod gait. After completion of the first leg the range of motion (ROM) of each of its joints was measured and compared to the design values. These data are summarized below:

Joint ROM Desired ROM β 20° 30° α 25 40 c-f (coxa-femur) 40 50 f-t (femur-tibia) 75 75

These tests were performed at both 5.5 and 6.25 bar, with no significant difference between the results of the two, suggesting that at these pressures the actuators had reached their full contraction. Although the desired ROMs were not reached, the measured ROMs are in excess of those demonstrated by animal. The demonstrated ROM’s of the leg were deemed sufficient for walking and climbing. A gantry was constructed to support the middle legs for preliminary stance and motion tests. With only horizontal support—to prevent tipping—the legs were able to maintain stance while supporting their weight (three kilos) plus the weight of the valves for the actuators (one half kilo) and a gantry element (one kilo) without any pressurized air in the actuators. This capability, a result of the aforementioned stance bias, clearly demonstrates the ability of these legs to support not only the weight of the robot, but a significant payload as well. An open loop controller was then used to cycle the legs through “push-ups”; raising themselves from a minimum to a maximum height. In this fashion, the legs were able to lift the body approximately 6 cm. This process was repeated with additional payloads (beyond valve and gantry weight) of two and a half and five kilograms using 6 bar air. In both cases, the legs were able to attain the same height.

6. Ajax

Fully assembled—including valves—Robot V weighs 15 kilograms. Range of motion tests have been performed for all joints, and are summarized below. In many cases, specifically the femur-tibia joints of all legs, these ranges of motion are in excess of the desired ROM. In all cases, they are sufficient for walking and climbing.

JOINT ROM Front Leg γ 35° β 45 α 25 c-f 40 f-t 75 Middle Leg β 20 α 25 c-f 40 f-t 75 Rear Leg β 25 c-f 50 f-t 80

Ajax demonstrates a propensity to stand due to the preloads placed on the torsion springs; even without pressure in the actuators, the middle and rear

Figure 4: Robot V without activated actuators (top) and standing (bottom). Note that even when the actuators are un-pressurized, they maintain a near-stance position, with only the feet contacting the surface.

Legs maintain a near-stance position. Initial tests of the robot have shown that it is capable of supporting its weight in a standing position and of achieving stance both unloaded and with a five kilogram payload (Figure 4).

Further tests have shown that the robot is able to achieve a tripod stance and alternate between tripods, which is important for walking. These tasks were achieved using a simple open loop controller. Furthermore, the passive properties of the BPA’s are clearly highlighted in the robot’s ability to return to its desired position after suffering perturbations without the use of any form of active posture control. Using a feed forward controller with absolutely no feedback, the robot can produce reasonable forward locomotion. Although this is by no means the robust, agile walking that is the ultimate goal of this project, it is a clear demonstration of not only the robot’s capabilities, but also the advantages offered by the BPA’s. The ability to move using only an open loop controller is in large part a result of the passive properties of the actuators, which provide compensation for any instabilities in the controller itself and immediate response to perturbations without the need for controller intervention.

This can be contrasted with Robot III, which, even with kinematic and force feedback, was not able to walk. This failure of Robot III is attributed to the inability of both the pneumatic cylinders and posture controller to deal with the sudden changes in load associated with locomotion.

In short, the BPA’s act as filters, providing immediate response to perturbation; a task the controller is incapable of. This same process occurs in biological muscle, which responds nearly instantaneously to perturbation, but only slowly to neurological input [16]. With the addition of a biologically inspired closed loop controller in the future, Ajax is expected to display robust, insect-like locomotion.

7. Future Work

Although the mechanical aspects of this robot have been completed, the control system is still in its infancy. Because the mechanics of a system are inextricably linked to its control circuits, Ajax’s controller is expected to benefit from the close relationship between its design and that of the actual insect. This relationship is perhaps most prominent in the muscle-like nature of the braided pneumatic actuators.

Sensors will be added to provide not only joint position feedback, but force feedback as well. Joint angle can easily be determined with a potentiometer, as has been done on our previous robots. Force feedback will be attained through pressure measurements from the actuators, which, given actuator length, can be used to determine actuator force. Although strain gauges properly placed on the mounting elements of the actuators can produce sufficient force feedback, previous work has shown many desirable characteristics inherent in pressure transducers: they have much cleaner signals, do not require amplifiers, and do not exhibit cross talk; all disadvantages of strain gauges. In addition, strain gauges must be mounted directly adjacent to the actuator they are recording from; this requires more weight at distal points of the limb, (thusly increasing the moment of inertia of the limb) and generally reduces the usable available stroke of the actuator. We have demonstrated that a pressure transducer located down-line from an actuator produces a sufficient signal to determine actuator force.

An insect-inspired controller was developed for Robot III, and this will be modified for use on Robot V. It is a distributed hierarchical control system. The local to central progression includes circuits that control joint position and stiffness, inter-leg coordination and reflexes, intra-leg gait coordination, and body motion. The inter-leg coordination circuit solves the inverse kinematics problem for the legs and the centralized posture control system solves the force distribution problem.


text: File:Mohrs shear Solid Mechanics.png

title: File:Mohrs shear Solid Mechanics.png


text:
Geometry/Circles/Radii, Chords and Diameters

A circle is a set of all points in a plane that are equidistant from a single point; that single point is called the centre of the circle and the distance between any point on circle and the centre is called radius of the circle.

http://en.wikipedia.org/upload/d/dd/Circle-2.png

Chord

a chord is an internal segment of a circle that has both of its endpoints on the circumference of the circle.
 * the diameter of a circle is the largest chord possible

Secant

a secant of a circle is any line that intersects a circle in two places.
 * a secant contains any chord of the circle

Tangent

a tangent to a circle is a line that intersects a circle in exactly one point, called the point of tangency.
 * at the point of tangency the tangent line and the radius of the circle are perpendicular


text:
Personal Finance/Assets

Personal assets definition
Personal assets in simple terms can be described as things (at times virtual things like web-addresses, copyrights etc) that possess value. Additionally, an important feature of assets is that they generate personal income.

Types of assets
Personal assets can be broken down into different classes:

 * 1) /Cash/
 * 2) /Money Market/
 * 3) * Government money market
 * 4) * Taxable money market
 * 5) * Tax-free money market
 * 6) /Bonds/
 * 7) * /Government Bonds/
 * 8) * High-grade corporate bonds
 * 9) * /High Yield Bonds/
 * 10) * Global bonds
 * 11) * Convertible bonds
 * 12) /Stock/
 * 13) * Conservative domestic stocks
 * 14) * Aggressive (growth) domestic stocks
 * 15) * International stocks
 * 16) * Emerging market stocks
 * 17) * /Small Cap Stocks/
 * 18) * Mid cap stocks
 * 19) * Large cap stocks
 * 20) /Real Estate/
 * 21) /Intellectual Property/
 * 22) /Commodities/
 * 23) * Gold
 * 24) * Silver

title: Personal Finance/Assets


text:
Talk:Personal Finance/Assets

Somebody check over this and make sure that it makes sense .. I just went to see an American Express financial advisor and she was telling me about the "eighteen asset classes" but an internet search turned up very little on the keywords .. I adapted this from information I found there and dunno if it is accurate. --Karl Wick 21:26, 28 Apr 2004 (UTC)

I feel that when we are talking about personal finance we need not talk of lot of assets which might not make sence under the personal finance. Some of them are like brand equity or intellectual property. Though I have added few of them in the list. (Yndesai (talk) 10:49, 16 December 2010 (UTC))

title: Talk:Personal Finance/Assets


text:
User talk:Michael Hesselnberg

Michael, I got your hard copy in the mail today! I will get to scanning some of the pages and uploading them bit by bit. Maybe I can get a kid to help me with some of the grunt work .. keep watch over the space Psychologie de l'Enfant et de l'Adolescent and you should see parts starting to appear. --Karl Wick

title: User talk:Michael Hesselnberg


text:
User:Ldog187~enwikibooks

You can email me at ldog187@sbcglobal.net or AIM: ldog179 Nice Pictues, Man --Desertfox 59 00:50, 4 May 2004 (UTC)  Back to main page: http://wikibooks.org/wiki/AASFTactics

title: User:Ldog187~enwikibooks


text:
Guitar/Stringing the Guitar

Aside from the physical shape of the guitar body, strings are the most important thing for determining the sound of a guitar. New strings sound bright and full, while old strings tend to sound dull and dead. Many guitarists believe that strings should be changed regularly, not just when they break. This is because sweat and dirt corrode the strings, and over time this degrades their sound quality. Other guitarists believe that new strings sound much worse than old ones, feeling that a string's tonal quality only improves over time. Individual string quality may vary drastically from string to string.

When one breaks a string, all of the strings should be changed at once. This is especially true if the newer string is of a different brand or gauge. The string's manufacturing process, thickness and age all affect its tone, and one new string being played with a bunch of old strings can make your guitar sound strange. Players should be advised that guitars are usually set up for a particular gauge of string. The guitar will still function fine with a different gauge of strings, however for optimal sound, the guitar may need to be adjusted. See the chapter on adjusting the guitar for more details.

Because there are several different types of guitar, and each type is designed differently, each type has its own method of stringing. The type of strings you use mostly depends on what style of music you play and how long you've been playing. Thinner strings are generally preferred by beginners, but many experienced players prefer the feel of thin strings over thicker strings. Please see the guitar accessories section for details on different types of strings.

The first thing you always need to do when stringing a guitar is to take off the old strings. You should never just cut the strings of a tuned guitar in half, because the sudden release of tension on the neck can damage the guitar. Instead, always turn the tuning pegs to decrease tension, until the string is so loose that it doesn't produce a note when struck, then cut or unwind them. In most cases, the string is bent at the end where it was inserted, to insure that it would stay during tuning. Unbend the string, then pull it out of the peg hole. If the peg end of the string is too bent or curled from the winding, cut the string on a straight part of the string. This will make it easier to remove the string from the hole at the other end and reduce the risk of scratching the body or the bridge while trying to get it out. Slide the string out of the bridge at the bottom end of the guitar. Some people string one at a time to make sure the neck sustains tension, or they just take all of the strings off at the same time.

Stringing Acoustics
Standard guitars typically have a ball-head peg at the bridge section. This peg has a hollow shaft, with a groove that allows the string to come out from the peg.

Typically, the process is as follows:

Unwinding the string
 * 1) Pick one of the strings, usually either the first or sixth string, and begin loosening it. If you have a string winder, put the rectangular box over the tuning peg and unwind the string.

 * 1) Once the string is loose enough, pull the peg out of the bridge. If you have a string winder, it will have a notch that can fit underneath the head to pull it out.

Attaching the string
 * 1) The guitar string should have a ball (or cylinder) end. Put that into the bridge hole.
 * 2) Push the ball-head peg back in. as you do, pull on the string so that the peg can hold the string tightly on the bridge end.
 * 3) Find the hole on the winder, and place the string through it, leaving about 5cm out on the other side. For the thicker strings, it is recommended to bend it a bit.
 * 4) Use one hand to hold the string so that the section between this hand and the peg is tight. Wind one wound.
 * 5) Check the tightness again, and try to divert the string so that it wind UNDERNEATH the winder hole. Then wind it until you have the string encircle the machine head two to three times.
 * 6) Tune from here.

Twelve String Acoustic
It has the same principle to the sixth string. But every two strings were tuned with the same sound, one octave apart. *(RDT)

Classical Guitar
To unstring a classical guitar one method is:
 * 1) Loosen the string by turning the tuning peg
 * 2) Then at the bridge push the string back into the hole a little, this will loosen the "knot" enough to unknot and pull the string out of the hole.
 * 3) Then feed the string around the peg loop by loop until the last hoop which is inserted through the hole in the peg is available, push the string out of the loop, then pull the loop out of the hole.

To string a classical guitar one method is reverse of the unstringing
 * 1) Bend about an inch of string at one end to form an open loop, push that through the peg hole, wrap the other end of the string around the peg and through the loop, then pass it down the guitar body to the bridge and into the hole there.
 * 2) Loop back to the neck (about two or three inches) and twist back around the string, then you can put two or three twists in which should end up on top of the bridge, pull the string from the middle of the guitar to draw the twists taut.
 * 3) Then wind the peg to tighten the string. You should take it easy when tuning up for the first time to give the string time to "settle in", you may also find that the string may go out of tune easily for a day or two as it beds in.

Stringing Electrics
For the 6th string (the low E), take the string out of the package and insert the end through the bridge of the guitar. Pull it all the way through until the ball at the end of the string stops it from being pulled further. This is optional: Make a kink in the string to insure that it will not slip away from the turning of the peg, (usually about one or two inches from the peg). Wind the string around halfway and insert the end through the hole. Pull the string to add tension, so the string will stay around the peg during tuning. Turn the tuning peg to increase tension until the string is around the desired pitch, to make certain it will stay on properly. Check that the string is in the notch in the nut and the bridge, if it is not, decrease tension on the string until you can move it into the notch, tune it back up. Do this for the rest of your strings and you are done!

Another method:

String the low E and other strings as mentioned. Align the tuning peg's hole with the direction of the string and slip it through the peg in the direction of the headstock. Facing the guitar with the headstock to your right, pull the string taut with your left hand.

With your opposite thumb and forefinger, twist the string in an "s" at the twelfth fret so that it touches both sides of the twelfth fret. You will have to let some of the string out to do this. This method tells you the optimum length of the string to wind around the tuning peg.

Hold the string with your right hand below the tuning peg so that the pointy end is sticking out the other side. Slowly tighten the peg so that the string is winding on the INSIDE of the headstock -- inside right for E A D, and inside left for G B E. Allow the string to wind once underneath itself, and then wrap it over top of itself the rest of the way. Make sure you hold tight as you go so that there is little slippage later.

If possible, hold the string with your right thumb and middle finger while regulating the pressure on the string with your right index finger.

Tips

 * Note that taking off all strings at once is not recommended if you have:
 * 1) a floating tremolo system (e.g. Floyd Rose II), which can be difficult to get the tremolo angle back to the right level when restrung;
 * 2) a bridge which is not fixed (one that will just fall off when the strings are removed)

 * Try not to bend the string in the same place excessively otherwise the string will break at the bend

title: Guitar/Stringing the Guitar


text:
C Programming/String manipulation

A string in C is merely an array of characters. The length of a string is determined by a terminating null character:. So, a string with the contents, say,  has four characters: ,  ,  , and the terminating null  character.

The terminating null character has the value zero.

Syntax
In C, string constants (literals) are surrounded by double quotes ("), e.g. "Hello world!" and are compiled to an array of the specified char values with an additional null terminating character (0-valued) code to mark the end of the string. The type of a string constant is char [].

backslash escapes
String literals may not directly in the source code contain embedded newlines or other control characters, or some other characters of special meaning in string.

To include such characters in a string, the backslash escapes may be used, like this:

Wide character strings
C supports wide character strings, defined as arrays of the type wchar_t, 16-bit (at least) values. They are written with an L before the string like this
 * wchar_t *p = L"Hello world!";

This feature allows strings where more than 256 different possible characters are needed (although also variable length char strings can be used). They end with a zero-valued <tt>wchar_t</tt>. These strings are not supported by the <tt><string.h></tt> functions. Instead they have their own functions, declared in <tt><wchar.h></tt>.

Character encodings
What character encoding the <tt>char</tt> and <tt>wchar_t</tt> represent is not specified by the C standard, except that the value 0x00 and 0x0000 specify the end of the string and not a character. It is the input and output code which are directly affected by the character encoding. Other code should not be too affected. The editor should also be able to handle the encoding if strings shall be able to written in the source code.

There are three major types of encodings:
 * One byte per character. Normally based on ASCII. There is a limit of 255 different characters plus the zero termination character.
 * Variable length <tt>char</tt> strings, which allows many more than 255 different characters. Such strings are written as normal <tt>char</tt>-based arrays. These encodings are normally ASCII-based and examples are UTF-8 or Shift JIS.
 * Wide character strings. They are arrays of <tt>wchar_t</tt> values. UTF-16 is the most common such encoding, and it is also variable-length, meaning that a character can be two <tt>wchar_t</tt>.

The Standard Header
Because programmers find raw strings cumbersome to deal with, they wrote the code in the  library. It represents not a concerted design effort but rather the accretion of contributions made by various authors over a span of years.

First, three types of functions exist in the string library:

 * the  functions manipulate sequences of arbitrary characters without regard to the null character;
 * the  functions manipulate null-terminated sequences of characters;
 * the  functions manipulate sequences of non-null characters.

The more commonly-used string functions
The nine most commonly used functions in the string library are:

 * - concatenate two strings
 * - string scanning operation
 * - compare two strings
 * - copy a string
 * - get string length
 * - concatenate one string with part of another
 * - compare parts of two strings
 * - copy part of a string
 * - string scanning operation

Other functions, such as  (convert to lower case),   (return the string reversed), and   (convert to upper case) may be popular; however, they are neither specified by the C Standard nor the Single Unix Standard. It is also unspecified whether these functions return copies of the original strings or convert the strings in place.

The function
Some people recommend using  or   instead of strcat, in order to avoid buffer overflow.

The  function shall append a copy of the string pointed to by   (including the terminating null byte) to the end of the string pointed to by. The initial byte of  overwrites the null byte at the end of. If copying takes place between objects that overlap, the behavior is undefined. The function returns.

This function is used to attach one string to the end of another string. It is imperative that the first string have the space needed to store both strings.

Example:

Before calling, the destination must currently contain a null terminated string or the first character must have been initialized with the null character (e.g.  ).

The following is a public-domain implementation of :

The function
The  function shall locate the first occurrence of   (converted to a  ) in the string pointed to by. The terminating null byte is considered to be part of the string. The function returns the location of the found character, or a null pointer if the character was not found.

This function is used to find certain characters in strings.

At one point in history, this function was named. The  name, however cryptic, fits the general pattern for naming.

The following is a public-domain implementation of :

The function
A rudimentary form of string comparison is done with the strcmp function. It takes two strings as arguments and returns a value less than zero if the first is lexographically less than the second, a value greater than zero if the first is lexographically greater than the second, or zero if the two strings are equal. The comparison is done by comparing the coded (ascii) value of the characters, character by character.

This simple type of string comparison is nowadays generally considered unacceptable when sorting lists of strings. More advanced algorithms exist that are capable of producing lists in dictionary sorted order. They can also fix problems such as strcmp considering the string "Alpha2" greater than "Alpha12". (In the previous example, "Alpha2" compares greater than "Alpha12" because '2' comes after '1' in the character set.) What we're saying is, don't use this  alone for general string sorting in any commercial or professional code.

The  function shall compare the string pointed to by   to the string pointed to by. The sign of a non-zero return value shall be determined by the sign of the difference between the values of the first pair of bytes (both interpreted as type ) that differ in the strings being compared. Upon completion,  shall return an integer greater than, equal to, or less than 0, if the string pointed to by   is greater than, equal to, or less than the string pointed to by , respectively.

Since comparing pointers by themselves is not practically useful unless one is comparing pointers within the same array, this function lexically compares the strings that two pointers point to.

This function is useful in comparisons, e.g.

if (strcmp(s, "whatever") == 0) /* do something */ ;

The collating sequence used by  is equivalent to the machine's native character set. The only guarantee about the order is that the digits from <tt>'0'</tt> to <tt>'9'</tt> are in consecutive order.

The following is a public-domain implementation of :

The function
Some people recommend always using  instead of strcpy, to avoid buffer overflow.

The  function shall copy the C string pointed to by   (including the terminating null byte) into the array pointed to by. If copying takes place between objects that overlap, the behavior is undefined. The function returns. There is no value used to indicate an error: if the arguments to  are correct, and the destination buffer is large enough, the function will never fail.

Example:

Important: You must ensure that the destination buffer is able to contain all the characters in the source array, including the terminating null byte. Otherwise,  will overwrite memory past the end of the buffer, causing a buffer overflow, which can cause the program to crash, or can be exploited by hackers to compromise the security of the computer.

The following is a public-domain implementation of :

The function
The  function shall compute the number of bytes in the string to which   points, not including the terminating null byte. It returns the number of bytes in the string. No value is used to indicate an error.

The following is a public-domain implementation of :

Note how the line declares and initializes a pointer  to an integer constant, i.e.   cannot change the value it points to.

The function
The  function shall append not more than   bytes (a null byte and bytes that follow it are not appended) from the array pointed to by   to the end of the string pointed to by. The initial byte of  overwrites the null byte at the end of. A terminating null byte is always appended to the result. If copying takes place between objects that overlap, the behavior is undefined. The function returns.

The following is a public-domain implementation of :

The function
The  function shall compare not more than   bytes (bytes that follow a null byte are not compared) from the array pointed to by   to the array pointed to by. The sign of a non-zero return value is determined by the sign of the difference between the values of the first pair of bytes (both interpreted as type ) that differ in the strings being compared. See  for an explanation of the return value.

This function is useful in comparisons, as the  function is.

The following is a public-domain implementation of :

The function
The  function shall copy not more than   bytes (bytes that follow a null byte are not copied) from the array pointed to by   to the array pointed to by. If copying takes place between objects that overlap, the behavior is undefined. If the array pointed to by  is a string that is shorter than   bytes, null bytes shall be appended to the copy in the array pointed to by , until   bytes in all are written. The function shall return s1; no return value is reserved to indicate an error.

It is possible that the function will not return a null-terminated string, which happens if the  string is longer than   bytes.

The following is a public-domain version of :

The function
The  function is similar to the   function, except that   returns a pointer to the last occurrence of   within   instead of the first.

The  function shall locate the last occurrence of   (converted to a  ) in the string pointed to by. The terminating null byte is considered to be part of the string. Its return value is similar to 's return value.

At one point in history, this function was named. The  name, however cryptic, fits the general pattern for naming.

The following is a public-domain implementation of :

The less commonly-used string functions
The less-used functions are:

 * - Find a byte in memory
 * - Compare bytes in memory
 * - Copy bytes in memory
 * - Copy bytes in memory with overlapping areas
 * - Set bytes in memory
 * - Compare bytes according to a locale-specific collating sequence
 * - Get the length of a complementary substring
 * - Get error message
 * - Scan a string for a byte
 * - Get the length of a substring
 * - Find a substring
 * - Split a string into tokens
 * - Transform string

The function
The  function shall copy   bytes from the object pointed to by   into the object pointed to by. If copying takes place between objects that overlap, the behavior is undefined. The function returns.

Because the function does not have to worry about overlap, it can do the simplest copy it can.

The following is a public-domain implementation of :

The function
The  function shall copy   bytes from the object pointed to by   into the object pointed to by. Copying takes place as if the  bytes from the object pointed to by   are first copied into a temporary array of   bytes that does not overlap the objects pointed to by   and , and then the   bytes from the temporary array are copied into the object pointed to by. The function returns the value of.

The easy way to implement this without using a temporary array is to check for a condition that would prevent an ascending copy, and if found, do a descending copy.

The following is a public-domain, though not completely portable, implementation of :

The function
The  function shall compare the first   bytes (each interpreted as  ) of the object pointed to by   to the first   bytes of the object pointed to by. The sign of a non-zero return value shall be determined by the sign of the difference between the values of the first pair of bytes (both interpreted as type ) that differ in the objects being compared.

The following is a public-domain implementation of :

The and   functions
The ANSI C Standard specifies two locale-specific comparison functions.

The  function compares the string pointed to by   to the string pointed to by , both interpreted as appropriate to the   category of the current locale. The return value is similar to.

The  function transforms the string pointed to by   and places the resulting string into the array pointed to by. The transformation is such that if the  function is applied to the two transformed strings, it returns a value greater than, equal to, or less than zero, corresponding to the result of the   function applied to the same two original strings. No more than  characters are placed into the resulting array pointed to by , including the terminating null character. If  is zero,   is permitted to be a null pointer. If copying takes place between objects that overlap, the behavior is undefined. The function returns the length of the transformed string.

These functions are rarely used and nontrivial to code, so there is no code for this section.

The function
The  function shall locate the first occurrence of   (converted to an  ) in the initial   bytes (each interpreted as  ) of the object pointed to by. If  is not found,   returns a null pointer.

The following is a public-domain implementation of :

The,, and   functions
The  function computes the length of the maximum initial segment of the string pointed to by   which consists entirely of characters not from the string pointed to by.

The  function locates the first occurrence in the string pointed to by   of any character from the string pointed to by , returning a pointer to that character or a null pointer if not found.

The  function computes the length of the maximum initial segment of the string pointed to by   which consists entirely of characters from the string pointed to by.

All of these functions are similar except in the test and the return value.

The following are public-domain implementations of,  , and  :

The function
The  function shall locate the first occurrence in the string pointed to by   of the sequence of bytes (excluding the terminating null byte) in the string pointed to by. The function returns the pointer to the matching string in  or a null pointer if a match is not found. If  is an empty string, the function returns.

The following is a public-domain implementation of :

The function
A sequence of calls to  breaks the string pointed to by   into a sequence of tokens, each of which is delimited by a byte from the string pointed to by. The first call in the sequence has  as its first argument, and is followed by calls with a null pointer as their first argument. The separator string pointed to by  may be different from call to call.

The first call in the sequence searches the string pointed to by  for the first byte that is not contained in the current separator string pointed to by. If no such byte is found, then there are no tokens in the string pointed to by  and   shall return a null pointer. If such a byte is found, it is the start of the first token.

The  function then searches from there for a byte (or multiple, consecutive bytes) that is contained in the current separator string. If no such byte is found, the current token extends to the end of the string pointed to by, and subsequent searches for a token shall return a null pointer. If such a byte is found, it is overwritten by a null byte, which terminates the current token. The  function saves a pointer to the following byte, from which the next search for a token shall start.

Each subsequent call, with a null pointer as the value of the first argument, starts searching from the saved pointer and behaves as described above.

The  function need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe.

Because the  function must save state between calls, and you could not have two tokenizers going at the same time, the Single Unix Standard defined a similar function, , that does not need to save state. Its prototype is this:

The  function considers the null-terminated string   as a sequence of zero or more text tokens separated by spans of one or more characters from the separator string. The argument lasts points to a user-provided pointer which points to stored information necessary for  to continue scanning the same string.

In the first call to,   points to a null-terminated string,   to a null-terminated string of separator characters, and the value pointed to by   is ignored. The  function shall return a pointer to the first character of the first token, write a null character into   immediately following the returned token, and update the pointer to which   points.

In subsequent calls,  is a null pointer and   shall be unchanged from the previous call so that subsequent calls shall move through the string , returning successive tokens until no tokens remain. The separator string  may be different from call to call. When no token remains in, a NULL pointer shall be returned.

The following public-domain code for  and   codes the former as a special case of the latter:

Miscellaneous functions
These functions do not fit into one of the above categories.

The function
The  function converts   into , then stores the character into the first   bytes of memory pointed to by.

The following is a public-domain implementation of :

The function
This function returns a locale-specific error message corresponding to the parameter. Depending on the circumstances, this function could be trivial to implement, but this author will not do that as it varies.

The Single Unix System Version 3 has a variant,, with this prototype:

This function stores the message in, which has a length of size.

Examples
To determine the number of characters in a string, the  function is used:

Note that the amount of memory allocated for 'turkey' is one plus the sum of the lengths of the strings to be concatenated. This is for the terminating null character, which is not counted in the lengths of the strings.

Exercises

 * 1) The string functions use a lot of looping constructs. Is there some way to portably unravel the loops?
 * 2) What functions are possibly missing from the library as it stands now?

title: C Programming/String manipulation


text:
Python Programming/Overview

Python is a high-level, structured, open-source programming language that can be used for a wide variety of programming tasks. Python was created by Guido Van Rossum in the early 1990s; its following has grown steadily and interest has increased markedly in the last few years or so. It is named after Monty Python's Flying Circus comedy program.

Python is used extensively for system administration (many vital components of Linux distributions are written in it); also, it is a great language to teach programming to novices. NASA has used Python for its software systems and has adopted it as the standard scripting language for its Integrated Planning System. Python is also extensively used by Google to implement many components of its Web Crawler and Search Engine & Yahoo! for managing its discussion groups.

Python within itself is an interpreted programming language that is automatically compiled into bytecode before execution (the bytecode is then normally saved to disk, just as automatically, so that compilation need not happen again until and unless the source gets changed). It is also a dynamically typed language that includes (but does not require one to use) object-oriented features and constructs.

The most unusual aspect of Python is that whitespace is significant; instead of block delimiters (braces → "{}" in the C family of languages), indentation is used to indicate where blocks begin and end.

For example, the following Python code can be interactively typed at an interpreter prompt, display the famous "Hello World!" on the user screen:

Another great feature of Python is its availability for all platforms. Python can run on Microsoft Windows, Macintosh and all Linux distributions with ease. This makes the programs very portable, as any program written for one platform can easily be used on another.

Python provides a powerful assortment of built-in types (e.g., lists, dictionaries and strings), a number of built-in functions, and a few constructs, mostly statements. For example, loop constructs that can iterate over items in a collection instead of being limited to a simple range of integer values. Python also comes with a powerful standard library, which includes hundreds of modules to provide routines for a wide variety of services including regular expressions and TCP/IP sessions.

Python is used and supported by a large Python Community that exists on the Internet. The mailing lists and news groups like the tutor list actively support and help new python programmers. While they discourage doing homework for you, they are quite helpful and are populated by the authors of many of the Python textbooks currently available on the market.

Python 2 vs. Python 3: Years ago, the Python developers made the decision to come up with a major new version of Python, which became the 3.x series of versions. The 3.x versions are backward-incompatible with Python 2.x: certain old features (like the handling of Unicode strings) were deemed to be too unwieldy or broken to be worth carrying forward. Instead, new, cleaner ways of achieving the same results were added. See also ../Python 2 vs. Python 3/ chapter.

title: Python Programming/Overview


text:
User:Flarelocke

I just wanted this place to look like it's here.

So far, I've only contributed to Programming:Python

title: User:Flarelocke


text:
Python Programming/Modules

Modules are a way to structure a program and create reusable libraries. A module is usually stored in and corresponds to a separate .py file. Many modules are available from the standard library. You can create your own modules. Python searches for modules in the current directory and other locations; the list of module search locations can be expanded by expanding PYTHONPATH environment variable and by other means.

Importing a Module
To use the functions and classes offered by a module, you have to import the module: The above imports the math standard module, making all of the functions in that module namespaced by the module name. It imports all functions and all classes, if any.

You can import the module under a different name:

You can import a single function, making it available without the module name namespace:

You can import a single function and make it available under a different name:

You can import multiple modules in a row:

You can make an import as late as in a function definition: Such an import only takes place when the function is called.

You can import all functions from the module without the module namespace, using an asterisk notation: However, if you do this inside a function, you get a warning in Python 2 and error in Python 3:

You can guard for a module not found:

Modules can be different kinds of things:
 * Python files
 * Shared Objects (under Unix and Linux) with the .so suffix
 * DLL's (under Windows) with the .pyd suffix
 * Directories

Modules are loaded in the order they're found, which is controlled by sys.path. The current directory is always on the path.

Directories should include a file in them called __init__.py, which should probably include the other files in the directory.

Creating a DLL that interfaces with Python is covered in another section.

Imported Check
You can check whether a module has been imported as follows:

Links:
 * 28.1. sys # sys.modules, docs.python.org

From a File
The easiest way to create a module is by having a file called mymod.py either in a directory recognized by the PYTHONPATH variable or (even easier) in the same directory where you are working. If you have the following file mymod.py

you can already import this "module" and create instances of the object Object1.

From a Directory
It is not feasible for larger projects to keep all classes in a single file. It is often easier to store all files in directories and load all files with one command. Each directory needs to have a  file which contains python commands that are executed upon loading the directory.

Suppose we have two more objects called  and   and we want to load all three objects with one command. We then create a directory called mymod and we store three files called,   and   in it. These files would then contain one object per file but this not required (although it adds clarity). We would then write the following  file:

The first three commands tell python what to do when somebody loads the module. The last statement defining __all__ tells python what to do when somebody executes from mymod import *. Usually we want to use parts of a module in other parts of a module, e.g. we want to use Object1 in Object2. We can do this easily with an ''from. import * command as the following file Object2.py'' shows:

We can now start python and import mymod as we have in the previous section.

Making a program usable as a module
In order to make a program usable both as a standalone program to be called from a command line and as a module, it is advisable that you place all code in functions and methods, designate one function as the main one, and call then main function when __name__ built-in equals '__main__'. The purpose of doing so is to make sure that the code you have placed in the main function is not called when your program is imported as a module; the code would be called upon import if it were placed outside of functions and methods.

Your program, stored in mymodule.py, can look as follows:

The uses of the above program can look as follows:

Links:
 * The Python Tutorial - 6.1.1. Executing modules as scripts, python.org

Extending Module Path
When import is requested, modules are searched in the directories (and zip files?) in the module path, accessible via sys.path, a Python list. The module path can be extended as follows:

Above, if ModuleFileName.py is located at /My/Path/To/Module/Directory and contains a definition of my_function, the 2nd line ensures the 3rd line actually works.

Links:
 * The Module Search Path at Python doc

Module Names
Module names seem to be limited to alphanumeric characters and underscore; dash cannot be used. While my-module.py can be created and run, importing my-module fails. The name of a module is the name of the module file minus the .py suffix.

Module names are case sensitive. If the module file is called MyModule.py, doing "import mymodule" fails while "import MyModule" is fine.

PEP 0008 recommends module names to be in all lowercase, with possible use of underscores.

Examples of module names from the standard library include math, sys, io, re, urllib, difflib, and unicodedata.

Links:
 * Package and Module Names at PEP 0008 -- Style Guide for Python Code
 * The Python Standard Library at docs.python.org

Built-in Modules
For a module to be built-in is not the same as to be part of the standard library. For instance, re is not a built-in module but rather a module written in Python. By contrast, _sre is a built-in module.

Obtaining a list of built-in module names:

print(sys.builtin_module_names) print("_sre" in sys.builtin_module_names) # True print("math" in sys.builtin_module_names) # True

Links:
 * 28.1. sys # sys.builtin_module_names, docs.python.org
 * The Python Standard Library, docs.python.org

title: Python Programming/Modules


text:
User:CzarnyZajaczek

Me on other projects (ewerywhere as CzarnyZajaczek): also on many other, but I'm often only on these 3
 * Wikibooks.PL
 * Wiktionary.PL
 * Wiktionary.FI

title: User:CzarnyZajaczek


text:
User:Daniel USURPED

Diggin' Wiki

title: User:Daniel USURPED


text:
Talk:Constructivist Theories in Education

Shouldn't this be in Psychology? --Daniel 10:59, 5 May 2004 (UTC)

Not unless it is a section on Educational Psychology. Typically, this topic is house in Schools of Education, which are housed in the Social Sciences. How does one vote to have a section moved - or does one, in a wiki environment? Should we just opt to move the page as we see fit? That would seem to fit in with the objective of a wiki environment, but I'm new to this and don't want to overstep my boundaries. - Jo Meyertons

How Humanity Learns
This module is correctly placed, in my opinion, in that the subject deals with learning as an empirical process based in a praxis of incremental mental growth. The Humanities take their queues from generations long passed. As learners and teachers, we merely ride upon a wave that is eternal...we didn't make it...it made us. JasperJenkins 08:01, 13 Oct 2004 (UTC)

Constructivist? or Constructionist?
The article uses the term 'constructivist' and also 'constructionist'. Was this a typo? Or are they interchangeable terms?

No, not interchangable, Constructionism builds on Constructivism, see Papert "Situating Constructionism"

Swami Centre Link
Delete as spam?


text:
Plato

This is an introduction to the works of Plato. Plato is regarded by many to be one of the West’s greatest ancient philosophers. The student of Socrates and teacher of Aristotle, he wrote many books in his life time and here you will find a brief summary of his works. To find the actual books themselves, look at our sister project Wikisource.

Plato was born into an Athenian aristocratic family around 427/428 BC. His father Ariston was said to be an ancestor of the last king of Athens, Crodus and his mother Perictione was a relation of the Greek politician Solon. There is not much external information about Plato's early life and most of what we know has come from his own writings. His father died when Plato was young and his mother was remarried to her uncle Pyrilampes. It is very likely that Plato knew Socrates from early childhood. Perictione's cousin Critias and her brother Charmides are known to have been friends with Socrates and they themselves were part of the oligarchic leadership of 404 BC. These connections should have led to a political career for Plato but at some stage he made a decision not to enter political life. The oligarchic leadership collapsed and democracy was restored and considering that Plato's family members had been part of the oligarchic terror must have meant that his position in Athenian society was under scrutiny. The condemning to death of Socrates by the democracy seems to have been the final political act of the state that forced Plato into exile at Megara. Plato is known to have taken refuge with Eucleides, founder of the Megarian school of philosophy and it is stated by later historians that during this period in his life he travelled extensively through Greece, Italy and Egypt. Whether these journeys took place is disputed but it is known that Plato did travel to Sicily where he met Dion, brother-in-law of the ruler of Syracuse, Dionysius I.

Socratic dialogue
The Socratic dialogue (Greek Σωκρατικὸς λόγος or Σωκρατικὸς διάλογος) is a literary prose genre, developed in Greece around 400 BC. The best known examples are the dialogues of Plato and the Socratic works of Xenophon. Typical of the genre are the dialogue form and the moral and philosophical issues that the characters discuss.

The protagonist of each dialogue, both in Plato's and Xenophon's work, usually is Socrates who by means of a kind of interrogation tries to find out more about the other person's understanding of the moral issues. In the dialogues Plato presents Socrates as a simple man who confesses that he has little knowledge. Plato uses the character of Socrates to state the aims of the inquiry at the outset of the dialogue. The outcome of the dialogue is that Socrates demonstrates that the other person's views are inconsistent. In this way Plato is using Socrates to show Plato's view of the way to real wisdom. One of his most famous statements in that regard is "The unexamined life is not worth living." This philosophical questioning is known as the Socratic method. In some dialogues Plato's main character is not Socrates but someone from outside of Athens. In Xenophon's 'Hiero' a certain Simonedes plays this role when Socrates is not the protagonist.

The ordering of the dialogues is based roughly on the standard division into tetralogies. Authorship in many cases is uncertain, as we only have Plato's works as handed down through many generations of translations, forgeries, etc. Please consult the following legend.

 * * It is generally agreed by scholars that Plato is not the author of this work.
 * ** It is not generally agreed by scholars whether Plato is the author of this work.
 * *** Consult chapter on this individual work for notes on authorship.

Works of Plato

 * /Euthyphro/
 * /Apology/
 * /Crito/
 * /Phaedo/
 * /Cratylus/
 * /Theaetetus/
 * /Sophist/
 * /Statesman/
 * /Parmenides/
 * /Philebus/
 * /Symposium/
 * /Phaedrus/
 * /Alcibiades/ **
 * /Second Alcibiades/ *
 * /Hipparchus/ *
 * /Rival Lovers/ *
 * /Theages/ *
 * /Charmides/
 * /Laches/
 * /Lysis/
 * /Euthydemus/
 * /Protagoras/
 * /Gorgias/
 * /Meno/
 * /Greater Hippias/ **
 * /Lesser Hippias/
 * /Ion/
 * /Menexenus/
 * /Clitophon/
 * /Republic/
 * /Timaeus/
 * /Critias/
 * /Minos/ *
 * /Laws/
 * /Epinomis/ *
 * /Letters/ ***
 * /Definitions/ *
 * /On Justice/ *
 * /On Virtue/ *
 * /Demodocus/ *
 * /Sisyphus/ *
 * /Halcyon/ *
 * /Eryxias/ *
 * /Axiochus/ *
 * /Epigrams/ ***

title: Plato


text: File:Vonmises Solid Mechanics.png

title: File:Vonmises Solid Mechanics.png


text:
Cookbook:Deep Fat Frying

| Frying

Deep frying involves fully immersing food in hot oil. It is an extremely fast cooking method, and, despite the use of liquid oil, is best classified as a dry cooking method because it does not involve liquid water.

With a deep fat fryer, deep frying is reasonably safe, but hot cooking oil is intrinsically dangerous, and one should be very careful so as to avoid fires and/or severe burns.

Method
Deep frying does not actually make the food greasy if it is done properly. The water in the food repels the oil. However, the hot oil also boils the water within the food, and steams the food from the inside out. As long as the oil is hot enough and the food is not immersed in the oil for too long, no oil will enter the food itself. If the food stays in the oil too long, the water will steam out and the oil will penetrate the food. If the oil is too cool, the food won't be done before this happens.

Most fried recipes rely on either a coating of batter or breading, or on foods that have or produce a natural skin around the food such as potatoes or whole poultry with the skin on. The effect of this is that the outside of the food becomes crispy and browned while the inside is tender, moist, and steamed, similar to searing. Of course, the batter can absorb huge amounts of fat and is usually consumed along with the food, causing the total fat content ingested to increase tremendously.

Chip pans
Chip pans can be dangerous and should only be used with caution and when continuously supervised, preferably with a thermometer; deep fryers are safer. Chip pans are the leading cause of house fires in the UK, and further, may spill hot oil, causing severe burns. If you have a chip pan, your local fire brigade may offer to trade it in for a deep fryer, or can otherwise advise about the dangers.

Safety tips
General cooking advice that particularly applies:
 * deep fryer, not pan: Deep fryers are less likely to tip than chip pans (avoiding scalding oil), and generally have thermometers to prevent overheating and fires. Familiarizing yourself with operation prior to use is also prudent.
 * no water in oil: Water in hot oil cause splatters and fires – it sinks (being denser than oil), then vaporizes, splattering hot oil and possibly scalding. If the oil is on fire, this can cause a chip pan fire – a fireball of burning oil ejects from the fryer, posing extreme hazard. In case of fire, do not use water; see below instead.
 * fire blanket or suitable extinguisher: Have a fire blanket immediately to hand, to smother fires, or a specialized fire extinguisher marked for cooking oil fires (class K in the US, class F in Europe).
 * proper oil: Some oil is not suited for deep frying, smoking at frying temperatures. Suitable oils include refined safflower oil, refined sunflower oils, refined peanut oil, coconut oil (South Asia), and rice bran oil (East Asia).
 * do not overheat: Oil is flammable and oil fires are extremely dangerous; before burning, oil will smoke, providing a warning. Most often, one deep fries between 175 and 190 °C (345–375 °F).
 * do not overfill: There must be space in the fryer for food to be added – use the recommended amount of oil, and small quantities of food. If there is too much oil or food, oil can flow over the sides, causing fire or burns. Further, small quantities of food cook better.
 * use utensils: Use metal utensils to manipulate food in a fryer – a wire cage is the main tool, and a spider or long-handled chopsticks can be used for additional manipulation.
 * metal range hood: Cook under a metal range hood: flames from burning hot oil can be 2 or 3 feet high, and can easily burn shelving.
 * cool after use: After use, allow the oil to cool for 2 hours before handling.
 * do not leave unattended:
 * do not drink alcohol:
 * no children present:
 * wear tight, thick clothes: Wear tight-fitting, long-sleeved, thick clothes to prevent burns from splatters, such as mechanics’ shirts and denim, rather than loose, thin clothes such as saris.

In case of smoke
When the oil starts to give off continuous smoke, you have it far too hot – it is at the smoke point, and the oil becomes carcinogenic at this point.
 * Turn off your deep fryer, and allow the oil to cool.
 * It is likely not acutely dangerous – the fire point and kindling point are generally significantly higher than the smoke point, so the oil will not ignite without further heating – but it is extremely hot, and smoke is a warning sign.
 * Next time, use a lower temperature setting or choose an oil with a higher smoke point.

In case of fire
In case of fire, call the fire department immediately.

Cooking oil fires are extremely dangerous and hard to fight, requiring special measures: If no fire blanket or suitable extinguisher is available, and the fire is small and contained, try quickly adding baking soda as this can quench it (do not add any other substances, which may burn instead). However, in the case of a large cooking oil fire, leave the house and contact the fire department immediately, and do not try to fight it yourself – your efforts are liable to end in disaster.
 * Burning oil can only be adequately fought with a fire blanket, or specialized fire extinguisher (Class K in the US; Class F in Europe); these may not be available for residential use.
 * Water should never be used on an oil fire; neither should regular fire extinguishers.

Frying whole poultry
A whole turkey is sometimes deep fried during a regional holiday in the United States; one may also wish to deep fry a chicken or other bird. In general, cutting up the bird (or buying it pre-cut) and frying individual pieces is significantly easier and safer; it also makes service easier.

If you wish to deep fry a turkey, please contact your fire department before doing so, so that you do not need to contact them urgently after doing so.

The main advice is:
 * All usual advice, with extra care.
 * Use a specialized turkey fryer, because it is large.
 * Carefully measure oil required beforehand, with the actual bird, to ensure that the fryer is not over-filled.
 * Cook outside.
 * Thaw the bird before deep-frying; advice which deserves to be in bold or caps.

Tips for frying

 * Generally, cook small pieces briefly at high temperatures to get crisp but not greasy food.
 * Dry food before frying (to avoid splatters), especially soaked potatoes; remove ice crystals from frozen food.
 * Foods flavor the oil after use; thus, cook light-flavored food (vegetables) before heavy-flavored foods (fish, shrimp) – or alternatively, use separate fryers for different foods.
 * Starting with cold foods (good idea), generally frying temperatures are around 325–375 degrees Fahrenheit (160–190 degrees Celsius). It may be higher for small foods. If the oil is too hot, the outside will burn before the inside is done.
 * When starting with warm or hot foods, the oil can be much hotter. (this is why the egg roll recipe instructs you to use hot filling, and why the fried fish recipe instructs you to microwave the fish before breading and deep-fat frying it)
 * Don't add too much food at one time; it will cool the oil too much.
 * Do not use a basket with food which could stick to the wires. Alternatively, suspend food in oil with tongs for ten seconds before releasing.
 * Consider using deep frying as one step in cooking, to crisp the outside only – similar to broiling or pan-searing. For instance, rather than deep frying chicken from raw to cooked, first roast it, then only finish it in the fryer. Similarly, you may deep fry potatoes as one step in making roast potatoes – after parboiling, and either before or after roasting.

Breading
Adding too much food to the fryer not only cools the temperature of the oil, it also causes your food to start to produce steam from overcrowding the fryer, and lowers the temperature, this will result in soogy foods and breading falling off the product.
 * When breading with a dry powder, use an egg wash or viscous liquid (such as buttermilk) to make it stick to the food.
 * When breading with a moist batter, use cornmeal, cornstarch or flour to make it stick to the food, and make sure batter is sufficiently dry on adding.
 * Shake off excess batter or breading before frying; otherwise it will come off in the oil, requiring more frequent oil changes.
 * Some recommend refrigerating breaded food for a ½ hour before frying, so that the breading sticks better.

Re-using oil

 * Opinions differ regarding re-use of oil, and the storage of used frying oil.
 * Some say frying improves with repeated use of the oil and use one batch of oil for three to six fryings, while others claim used oils are hazardous either due to bacterial growth or due to the breakdown of the oil into harmful compounds.
 * Those who reuse oil disagree as to whether refrigeration is necessary, but generally agree that it is important to filter the oil and then store it tightly capped and away from light.
 * Discard reused oil when it becomes dark or begins to smell "off".
 * If reusing oil, add fresh oil for each use in order to extend its usefulness.
 * Filter your frying oil regularly, if your fryer has a filtering system.
 * Cooled oil can be filtered with a tea strainer, kitchen paper, muslin or coarse coffee machine filter paper.
 * Change the oil when it becomes extremely dark. If you don't, your food will all taste the same – fries will taste like fish, fish will taste like fries, and, in the end, everything will taste a bit rancid.
 * A rule of thumb is to change oil each week under heavy use, or every three weeks if it's only used for frying vegetables.
 * When using new oil in your fryer, add an extra 1.5 minutes to your frying time.
 * Oil can be purified by deep-frying parsley. The parsley absorbs the odors in the oil. Watch for spatters!

Oil disposal
At some point, oil must be disposed of. Suggestions include:
 * Re-use oil for non-deep frying (stores airtight in fridge for months; discard when rancid).
 * Dispose at local restaurant, after asking – they often will have cooking oil recycling (into biodiesel or other substances).
 * Store (after cooling!) in the original container, milk containers, beer or wine bottles, wide-mouth jars (yogurt, mayonnaise, pickles), and dispose of these, optionally wrapped.
 * Use solid fats (lard, coconut oil, Crisco) and allow it to solidify and cool.
 * There is a Japanese “oil solidifier” which will solidify oils, making disposal easier.
 * Check with local sanitation on proper disposal.

However, do not dispose down drain, this is illegal in some locations as it can clog pipes and sewers problems and ultimately contribute to decreases the performance of the water treatment plants.

Serving suggestions

 * Serve deep fried food immediately, or keep warm in oven (95°C, 200°F) in a pan (properly, a jelly roll pan – a raised edge)
 * Drain on paper
 * Salt immediately, while hot; optionally pepper or use other spices as well.
 * Dipping sauce is often desirable.
 * A wedge of lemon is also tasty.
 * Contrast textures – deep fried food (such as seafood or croûtons) on salad are a classic combination, and tempura in soup is common in Japan
 * Forks, chopsticks, and hands are generally the easiest way to eat (due to crust); provide napkins if hands are to be used.
 * Drinks-wise, beer, black tea, and soft drinks often pair well; big (tannic) red wines can also work.

Health
Some health concerns exist regarding deep frying; some are misconceptions, some are contentious, and some are well-founded. In brief, properly deep frying yields food that is crisp, not greasy, and is little different from other frying such as pan-frying. Ultimately, ingredients are fundamental: deep-fried leek is still leek, while a deep-fried Mars bar is still a Mars bar.

Tips

 * Use appropriate oil (high temperature oil), at appropriate temperature (well below smoke point).
 * Cook small pieces, briefly, at high heat.
 * If it stops making sound, it’s over-cooking.
 * Either filter oil or use new oil each time.

Criticism
The following are the general criticisms leveled at deep frying:
 * Fat is bad (and deep frying is fatty): The image of a vat of oil is shocking and disturbing to some, as though one is going to consume that oil; this fear is largely baseless.
 * The oil is used to heat, and very little is actually consumed. A simple test of this is to inspect the level of oil before and after cooking – it should be almost identical, reflecting that almost all the oil is still in the vat, not in the food. Simply, the hot oil heats the food and steams it from the inside (steaming is generally considered healthy cooking), as reflected in the sound of steam escaping during cooking; the steam keeps the fat out.
 * This is not the case for potatoes, where one intends fat to enter, and hence blanches the potatoes beforehand.
 * Pan-frying and stir-frying involve similar coatings of fat, but are less visually striking.
 * Further, the proposition that "fat is bad" is contentious, and rejected by many – compare low-fat and low-carb diets.
 * Lastly, the oils used in deep frying (mostly monounsaturated vegetable oils) are general highly praised.

 * Deep frying creates toxins: There is some basis for this concern – using unrefined oils or oils with low smoke points and raising them to the smoke point causes production of carcinogens via oxidation, as reflected in smoking. This is reduced, if not eliminated, by using refined oils with high smoke points. There are suggestions that toxins are produced below the smoke point, and particularly if oil is reused or kept hot for extended periods – this leads to the suggestion that oil not be reused. Further, pieces of food that fall into oil are themselves impurities and may oxidize on further cooking – this leads to the suggestion that reused oil be filtered.
 * Deep frying destroys nutrients: Deep frying is similar to other cooking in nutrient destruction, because the interior is not touched by oil, just heated (steamed, in fact). Cooking destroys some nutrients, while making others easier to digest.
 * Deep frying does not provide nutrients: There is some basis for this – Essential Fatty Acids (EFAs) are destroyed by deep frying, and must be obtained from other sources – deep fried food should not be one’s only source of fat.

Commonly deep fried foods
Virtually any food can in principle be deep fried. Certain classes of food are frequently deep fried: General categories include fritters and tempura.
 * Meat:
 * Seafood – shrimp, squid, clams, scallops, oysters
 * Poultry – chicken, turkey (as parts or whole)
 * White fish – fish & chips
 * Vegetables:
 * Potatoes – fries (chips), chips (crisps)
 * Allium (onion family) – onions, leeks
 * Green vegetables
 * Bread and dough:
 * Bread-wrapped – dumplings, egg rolls, empanadas, samosas
 * Dough – fried dough
 * Bread/starch – croutons, fried bread sticks, tortilla chips, fried noodles
 * Other:
 * Minced mixtures – croquettes, crab cakes
 * Fat – Cheese, Pork skin
 * Mushrooms

More unusually:
 * Candy bars – Twinkies, Mars Bars
 * Fast food – Hot dogs, Pizza
 * Icecream

Red meat (beef, lamb) and fatty fish (salmon) are generally not deep fried, however.

Deep frying recipes

 * Deep Fried Turkey
 * Egg Roll
 * Empanada
 * Fried chicken
 * Fried Corn
 * Fried Fish
 * Frog's Legs à la Parisienne
 * Jersey breakfast dog
 * Koeksisters
 * Modak
 * Mozzarella Sticks
 * Samosa
 * Tempura

title: Cookbook:Deep Fat Frying