Write a PHP regular expression for each of the following concepts.
a. | strings starting with a digit |
b. | strings containing only alphabetic letters |
a. | ^[0-9] |
b. | ^[a-z]*$ |
Write a PHP regular expression for each of the following concepts.
a. | strings containing only alphabetic letters and that start with the letter c |
b. | strings that containing only digits, but which don't start with 0 |
a. | ^c[a-zA-Z]*$ |
b. | ^[1-9][0-9]*$ |
Write a regular expression that describes strings containing
the lower-case letter e followed by a digit, with
possibly some intervening spaces. Examples include
3e8
,
the 100K
,
and e2
.
In 1709, the Statute of Anne changed English copyright policy from that formerly maintained by the Stationers' Company. What was the primary change in authority over copyrights?
The Statute of Anne gave the right to dictate copying terms to authors rather than to printers. Also, it established a time limit on the rights given to a particular work.
In 1976, the United States changed its copyright law to better match the international copyright standards encoded in the Berne Convention. Today, what is required for a literary work to receive a copyright?
It receives its copyright automatically as soon as it is
fixed
— basically, as soon as it is written down.
(Some proof of authorship would be needed to make
any legal claim to copyright, though.)
The Berne Convention was an international agreement begun in 1887, though the U S did not join until more than a century later, in 1989. In which ways is the Berne Convention most different from U S copyright law previous to 1976?
The biggest difference is that U S copyright law previous
to 1976 required an author to register the work with the
Copyright Office and to include a notice on a work in order to
receive copyright protection. By contrast, the Berne Convention
(and U S copyright law since 1976) grants the author
copyright protection as soon as the work is fixed,
with no registration or notice required.
Design a set of tables for a bank's database, which should maintain bank account information for its clients. Note that some clients have multiple accounts, but your database should contain each client's name and address only once. For each account, your design should store the account type (checking/saving/investment) and current balance. (You shouldn't attempt to account for accounts managed jointly by more than one person.)
Have two tables, Clients and Accounts. The Clients table will include fields named userid, name, and address. The Accounts table will include fields named userid, type, and balance.
Explain what a cookie is in the context of HTTP, and give an example of where a Web site might use a cookie.
A cookie is a named piece of data that a Web server requests a
browser to store and send back each with each subsequent request
that the browser sends to the server. An example where this
might be used is to maintain a shopping cart,
where the
cookie's value would be a list of what the user has currently
requested; this would be sent to the server with each subsequent page
request, so when the user clicks on finalize order, the
server will be able to compute the value of the items in the
cart.