- Usado para extender as capacidades do servidor;
- Request-response;
- Geralmente utilizados para servidores Web mas podem responder quaisquer requisições.
Pacotes javax.servlet e javax.servlet.http com interfaces para programação com Servlets.
| /** | |
| * A companhia aérea recém chegada no mercado, necessita de um programa em C | |
| * para registrar e controlar a compra dos bilhetes de passagens aéreas. | |
| * Considerando uma única viagem, o programa tem os seguintes requisitos: | |
| * a) Mostrar tela inicial com o seguintes opções de menu : | |
| * 1 - Comprar passagem | |
| * O usuário informará o código do cliente que viajará e o assento | |
| * desejado. Só é permitida a compra de passagem aos clientes já | |
| * cadastrados. Não poderá ser vendida passagem para o mesmo | |
| * assento mais de uma vez. O sistema deverá avisar caso o assento |
| function slug($string) { | |
| $string = strtolower(str_replace(' ', '_', $string)); | |
| $pattern = "/[^a-zA-Z0-9_]/"; | |
| $string = preg_replace($pattern, '', $string); | |
| return $string; | |
| } |
| <?php | |
| $path = '/var/www/zend/library'; | |
| set_include_path(get_include_path() . PATH_SEPARATOR . $path); | |
| require_once 'Zend/Loader.php'; | |
| Zend_Loader::loadClass('Zend_Gdata_YouTube'); | |
| Zend_Loader::loadClass('Zend_Gdata_AuthSub'); | |
| Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); | |
| $email = 'xxx@gmail.com'; |
| <?php | |
| $yt = new Zend_Gdata_YouTube($httpClient); | |
| // create a new Zend_Gdata_YouTube_VideoEntry object | |
| $myVideoEntry = new Zend_Gdata_YouTube_VideoEntry(); | |
| // create a new Zend_Gdata_App_MediaFileSource object | |
| $filesource = $yt->newMediaFileSource('mytestmovie.mov'); | |
| $filesource->setContentType('video/quicktime'); | |
| // set slug header | |
| $filesource->setSlug('mytestmovie.mov'); |
| body { | |
| font: 11px/1.5em "Georgia"; | |
| } | |
| h1, h2, h3, h4, h5, h6 { | |
| font-family: georgia, times, sans-serif; | |
| font-weight: normal; | |
| } | |
| h1 { |
| <?php | |
| /** | |
| * SplClassLoader implementation that implements the technical interoperability | |
| * standards for PHP 5.3 namespaces and class names. | |
| * | |
| * http://groups.google.com/group/php-standards/web/final-proposal | |
| * | |
| * // Example which loads classes for the Doctrine Common package in the | |
| * // Doctrine\Common namespace. |
| <?xml version="1.0" encoding="iso-8859-1"?> | |
| <satellites> | |
| <sat name="Intelsat 11 (43.1W)" flags="0" position="-431"> | |
| <transponder frequency="3718000" symbol_rate="21600000" polarization="1" fec_inner="4" system="1" modulation="2"/> | |
| <transponder frequency="3736000" symbol_rate="29270000" polarization="0" fec_inner="5" system="0" modulation="1"/> | |
| <transponder frequency="3745000" symbol_rate="21610000" polarization="1" fec_inner="3" system="1" modulation="2"/> | |
| <transponder frequency="3768000" symbol_rate="6670000" polarization="1" fec_inner="4" system="1" modulation="2"/> | |
| <transponder frequency="3780000" symbol_rate="27690000" polarization="0" fec_inner="5" system="0" modulation="1"/> | |
| <transponder frequency="3789000" symbol_rate="30000000" polarization="1" fec_inner="4" system="1" modulation="2"/> | |
| <transponder frequency="3812000" symbol_rate="7234000" polarization="1" fec_inner="3" system="0" modulation="1"/> |
| <?php | |
| MIOLO::Import('extensions::cpaint.inc.php','cpaint'); | |
| class frmAJAX extends MForm | |
| { | |
| function __construct() | |
| { | |
| parent::__construct('AJAX Sample'); | |
| if (($f = $this->page->request('cpaint_function')) != "") | |
| { |