Make your own eBooks

Use our Remix App to mix & match content. In minutes make your own course packs, training bundles, custom travel guides, you name it. Even add your own title & cover.


Slices & Articles Get by the slice or add to your own ebook

Medium 9780596516215

4. ActionScript

Chafic Kazoun Adobe Developer Library ePub

ActionScript is the programming language that you can use along with MXML to create sophisticated Flex applications. Although MXML is an important part of a Flex application, it is mostly used for creating the user interface, and it can go only so far in creating a complete application. For data models and sophisticated client-side business logic, youll need to use ActionScript as well.

Flex applications require ActionScript 3.0, which represents a significant maturation from earlier versions of the language. ActionScript 3.0 is compliant with the ECMA-262 specification and leverages parts of the pending ECMAScript Edition 4 specification. ActionScript 3.0 supports a wide range of features, including formalized classes, interfaces, packages, runtime exception handling, runtime data types, reflection, regular expressions, E4X (XML), and more.

ActionScript is a standards-based, object-oriented language. Because ActionScript is an object-oriented language, it can be viewed as a collection of APIs generally in the form of classes. There are three tiers of ActionScript APIs:

See All
Medium 9781449356811

7. Test-Driven Development with JavaScript

Yakov Fain O'Reilly Media ePub

To shorten the development cycle of your web application, you need to start testing it in the early stages of the project. It seems obvious, but many enterprise IT organizations haven’t adopted agile testing methodologies, which costs them dearly. JavaScript is a dynamically typed interpreted language—there is no compiler to help identify errors as is done in compiled languages such as Java. This means that a lot more time should be allocated for testing JavaScript web applications. Moreover, a programmer who doesn’t introduce testing techniques into his daily routine can’t be 100 percent sure that his code works properly.

The static code analysis and code quality tools such as Esprima and JSHint will help reduce the number of syntax errors and improve the quality of your code.

We demonstrate how to set up JSHint for your JavaScript project and automate the process of checking your code for syntax errors in Chapter 5.

To switch to a test-driven development mode, make testing part of your development process in its early stages rather than scheduling testing after the development cycle is complete. Introducing test-driven development can substantially improve your code quality. It is important to receive feedback about your code on a regular basis. That’s why tests must be automated and should run as soon as you’ve changed the code.

See All
Medium 9781782200703

Chapter Eight - Autonomic Nervous Systems I: Stress and Anxiety

Bernstein, W.M. Karnac Books ePub

Undeterred, if not emboldened, by my own ignorance and superstitions, I have diagnosed and treated thousands of people seeking help for psychological problems. My clinical experience, and no doubt that of others, suggests that many functional psychopathologies represent a condition in which sympathetic arousal systems are chronically over-excited. This may be a result of attempts to compensate for chronic parasympathetic over-braking. In other words, many patients come in with one foot pushing hard on the sympathetic accelerator and the other pushing hard on the parasympathetic brake.

Using the vagus only as a hard, chronic brake means it cannot realise its functional potential to dynamically control sympathetic arousal. The brain's competence is limited by strong mental habits to operate the brake in a restricted, static manner. I assume, like Freud (1923), that the chronically anxious person is engaged constantly in a largely unconscious, exhausting effort to control himself. He wants to approach something he expects will bring him pleasure such as a person, a place, or an idea in mind. At the same time, he expects that obtaining the pleasure puts him at risk of some terrible pain or punishment.

See All
Medium 9780596000455

13. Mobile Code II: Java, JavaScript, Flash, and Shockwave

Simson Garfinkel O'Reilly Media ePub

In the last chapter we examined the risks inherent in downloading and running plug-ins, ActiveX controls, and other kinds of machine code. We saw that while many of these programs are well behaved, they can occasionally be quite vicious. Once a downloaded program starts running, it inherits all of the privileges and access rights of the user who invoked it.

Java, JavaScript, Flash, and Shockwave are all attempts to allow web developers to realize many of the benefits of mobile code without assuming the corresponding dangers. Instead of downloading raw executable machine code, all of these systems download an intermediate language that is then interpreted on the users computer. In theory, these interpreted languages can provide additional security by simply not implementing dangerous functionality. For example, JavaScript has no built-in mechanism to read files on the local computers hard disk, so it should be impossible to write a JavaScript program that scans the users hard disk for interesting files and then uploads these files to a hostile web server.

See All
Medium 9780596521530

8. Sorting

Clay Breshears O'Reilly Media ePub

This chapter examines the operation of concurrent sorting. At times, sorting has been estimated to account for over 80% of all processing cycles. Presenting the results from database queries, compiling a list of business investments with associated risk-reward measures, and figuring the company payroll are all operations that require sorting. Even with the large amounts of processing time spent on graphical interfaces, visualization processing, and video games, sorting remains a vital part of computation. Every time you get a list of URLs from a search engine, the results have been sorted, typically by some measure of relevance to your original query.

In this chapter I will first consider compare-exchange sorts. These are sorting algorithms that use the results from comparing two keys to determine the relative order of the elements with those keys. Movement of data items will be based on those results and will be the exchange of the positions of the two items under consideration. The final algorithm considered is radix sort, which compares bits within keys to determine movement of data. Example codes presented in this chapter will use arrays of integers, but you can apply these techniques to structures with a key field to distinguish between elements.

See All

See All Slices