100+ results for 'php abs'

Not the results you expected?

FinderTest.php (https://github.com/Exercise/symfony.git) PHP · 333 lines

124 $finder = new Finder();

125 $this->assertSame($finder, $finder->exclude('foo'));

126 $this->assertIterator($this->toAbsolute(array('test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());

127 }

128

196 $finder = new Finder();

197 $this->assertSame($finder, $finder->filter(function (\SplFileInfo $f) { return preg_match('/test/', $f) > 0; }));

198 $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator());

199 }

200

223 $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();

224

225 $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator);

226 }

227

Advertiser.php (https://github.com/skynet/OpenX-2.8.7.git) PHP · 371 lines

1 <?php

2

3 /*

34

35 // Required classes

36 require_once MAX_PATH . '/lib/OA/Dal/Statistics.php';

37

38 /**

39 * The Data Abstraction Layer (DAL) class for statistics for Advertiser.

40 */

41 class OA_Dal_Statistics_Advertiser extends OA_Dal_Statistics

class-cp-user-relationships.php (https://gitlab.com/dev73/clusterpress) PHP · 543 lines

1 <?php

2 /**

3 * ClusterPress User Relationships.

10

11 // Exit if accessed directly.

12 defined( 'ABSPATH' ) || exit;

13

14 /**

MappingInfo.php (https://gitlab.com/cserobiul/BITM-LabMs-New) PHP · 517 lines

1 <?php

2

3 namespace Apps\MappingInfo;

15

16 public function __construct() {

17 if (session_status() == PHP_SESSION_NONE) {

18 session_start();

19 }

203

204 // Lab busy ?

205 public function labShedule(){

206 try{

207 $qry = "SELECT * FROM course_trainer_lab_mapping

Location.js (https://github.com/fastner/qooxdoo.git) JavaScript · 406 lines

241 {

242 document.body.innerHTML =

243 '<div id="absolute1" style="position: absolute; top: 300px; left: 400px; margin: 5px; border: 2px solid #000; padding: 3px; width: 100px; height: 100px;">' +

244 ' <div id="relative1" style="position: relative; top: 50px; left: 50px; margin: 5px; border: 2px solid #000; padding: 3px; width: 300px; height: 300px;">' +

245 ' <div id="static1" style="overflow: hidden; position: static; margin: 5px; border: 2px solid #000; padding: 3px; width: 250px; height: 250px;">' +

246 ' <div id="relative2" style="overflow: auto; position: relative; top: 10px; left: 10px; margin: 5px; border: 2px solid #000; padding: 3px; width: 200px; height: 200px;">' +

247 ' <div id="absolute2" style="position: absolute; top: 30px; left: -90px; margin: 5px; border: 2px solid #000; padding: 3px; width: 200px; height: 200px;">' +

248 ' <div id="static2" style="position: static; margin: 10px; border: 2px solid #000; padding: 3px; width: 250px; height: 250px;">' +

249 ' </div>' +

254 '</div>';

255

256 var absolute1 = document.getElementById("absolute1");

257 var pos = qx.bom.element.Location.get(absolute1);

291 }

292

293 var absolute2 = document.getElementById("absolute2");

294 var pos = qx.bom.element.Location.get(absolute2);

AclVoterTest.php (https://gitlab.com/TouirMohamedMarwen/Symfony2) PHP · 432 lines

1 <?php

2

3 /*

21 use Symfony\Component\Security\Acl\Voter\AclVoter;

22

23 class AclVoterTest extends \PHPUnit_Framework_TestCase

24 {

25 /**

96 ;

97

98 $this->assertSame(VoterInterface::ACCESS_ABSTAIN, $voter->vote($this->getToken(), null, array('VIEW', 'EDIT', 'DELETE')));

99 }

100

114 $vote = VoterInterface::ACCESS_GRANTED;

115 } else {

116 $vote = VoterInterface::ACCESS_ABSTAIN;

117 }

118

Conditional.js (https://github.com/Wkasel/qooxdoo.git) JavaScript · 463 lines

11 License:

12 LGPL: http://www.gnu.org/licenses/lgpl.html

13 EPL: http://www.eclipse.org/org/documents/epl-v10.php

14 See the LICENSE file in the project's top-level directory for details.

15

25 qx.Class.define("qx.ui.progressive.renderer.table.cell.Conditional",

26 {

27 extend : qx.ui.progressive.renderer.table.cell.Abstract,

28

29

299 *

300 * @param cellInfo {Map}

301 * The information about the cell. See {@link qx.ui.table.cellrenderer.Abstract#createDataCellHtml}.

302 *

303 * @return {Map}

Data.php (https://github.com/arush/desparation-deprecated.git) PHP · 309 lines

1 <?php

2 class Evogue_Customer_Helper_Data extends Mage_Core_Helper_Abstract {

ResponseHeader.php (https://github.com/Shreef/zf2.git) PHP · 395 lines

1 <?php

2 /**

3 * Zend Framework

15 * @category Zend

16 * @package Zend_Test

17 * @subpackage PHPUnit

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

23 * @namespace

24 */

25 namespace Zend\Test\PHPUnit\Constraint;

26 use Zend\Controller\Response;

27

28 /**

29 * Response header PHPUnit Constraint

30 *

31 * @uses PHPUnit_Framework_Constraint

schema_2.php (https://github.com/jaydson/Call-for-Papers.git) PHP · 139 lines

1 <?php

2 /* SVN FILE: $Id$ */

3 /* App schema generated on: 2010-09-12 14:09:00 : 1284314100*/

5 var $name = 'App';

6

7 var $file = 'schema_2.php';

8

9 function before($event = array()) {

80 'area_id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'key' => 'index'),

81 'title' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 155, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),

82 'abstract' => array('type' => 'string', 'null' => false, 'default' => NULL, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),

83 'description' => array('type' => 'text', 'null' => false, 'default' => NULL, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),

84 'after' => array('type' => 'text', 'null' => false, 'default' => NULL, 'collate' => 'utf8_general_ci', 'comment' => 'After the session, what will the attendee learn?', 'charset' => 'utf8'),

100 'lastName' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),

101 'rg' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),

102 'abstract' => array('type' => 'text', 'null' => false, 'default' => NULL, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),

103 'description' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),

104 'zip' => array('type' => 'string', 'null' => false, 'default' => NULL, 'length' => 45, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),

DeleteComment.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 355 lines

1 <?php

2

3 /**

4 * Admin ajax functions to be tested

5 */

6 require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );

7

8 /**

70 $_POST['_per_page'] = 100;

71 $_POST['_page'] = 1;

72 $_POST['_url'] = admin_url( 'edit-comments.php' );

73

74 // Make the request

127 $_POST['_per_page'] = 100;

128 $_POST['_page'] = 1;

129 $_POST['_url'] = admin_url( 'edit-comments.php' );

130

131 // Make the request

Barcode.php (https://github.com/leerbag/zf2.git) PHP · 323 lines

1 <?php

2 /**

3 * Zend Framework

46 *

47 * It's used by standard barcode objects derived from

48 * {@link Object\AbstractObject} class

49 * if corresponding constructor option is not provided.

50 *

SetTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 295 lines

1 <?php

2 /**

3 *

10 use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set;

11

12 class SetTest extends \PHPUnit_Framework_TestCase

13 {

14 /**

15 * @var \PHPUnit_Framework_MockObject_MockObject|Set

16 */

17 protected $model;

18

19 /**

20 * @var \PHPUnit_Framework_MockObject_MockObject

21 */

22 protected $eavConfigMock;

BaseCcBackupQuery.php (https://github.com/DoghouseMedia/Airtime.git) PHP · 292 lines

1 <?php

2

3

40 * @package propel.generator.airtime.om

41 */

42 abstract class BaseCcBackupQuery extends ModelCriteria

43 {

44

47 *

48 * @param string $dbName The dabase name

49 * @param string $modelName The phpName of a model, e.g. 'Book'

50 * @param string $modelAlias The alias for the model in this query, e.g. 'b'

51 */

FileValidatorTest.php (https://github.com/Exercise/symfony.git) PHP · 324 lines

1 <?php

2

3 /*

17 use Symfony\Component\HttpFoundation\File\UploadedFile;

18

19 abstract class FileValidatorTest extends \PHPUnit_Framework_TestCase

20 {

21 protected $context;

321 }

322

323 abstract protected function getFile($filename);

324 }

325

YamlFileLoader.php (https://bitbucket.org/cryofrost/portal.git) PHP · 339 lines

1 <?php

2

3 /*

164 if (isset($service['abstract'])) {

165 $definition->setAbstract($service['abstract']);

166 }

167

Feed.php (https://github.com/quarkness/piwik.git) PHP · 320 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Feed.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

23 * @see Zend_Feed_Writer_Extension_RendererAbstract

24 */

25 // require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';

26

27 /**

32 */

33 class Zend_Feed_Writer_Extension_ITunes_Renderer_Feed

34 extends Zend_Feed_Writer_Extension_RendererAbstract

35 {

36

Module.php (https://bitbucket.org/buonaparte/zfalbum.git) PHP · 281 lines

1 <?php

2

3 namespace User;

35 use Zend\Mvc\Controller\ControllerManager;

36 use Zend\Mvc\MvcEvent;

37 use Zend\Navigation\Page\AbstractPage;

38 use Zend\ServiceManager\ServiceLocatorInterface;

39 use Zend\Session\Storage\SessionStorage;

57 public function getConfig()

58 {

59 return include __DIR__.'/../../config/module.config.php';

60 }

61

251 $sharedEventManager = $e->getApplication()->getEventManager()->getSharedManager();

252 $sharedEventManager->attach(

253 'Zend\View\Helper\Navigation\AbstractHelper',

254 'isAllowed',

255 array($this, 'isAllowed')

tabs_helper.php (https://github.com/rickogden/joind.in.git) PHP · 337 lines

109 }

110

111 public function setTabs(array $tabs) {

112 $this->_tabs = $tabs;

124 }

125

126 public function addTabs(array $tabs) {

127 if (count($this->_tabs) > 0) {

128 $this->_tabs = array_merge($this->_tabs, $tabs);

129 } else {

130 $this->_tabs = $tabs;

145 }

146 ?>

147 <div id="<?php echo $this->_containerName; ?>-tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">

148 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">

PageRepositoryTest.php (https://gitlab.com/svillegas/magento2) PHP · 282 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

8 use Magento\Cms\Api\Data\PageInterface;

9 use Magento\TestFramework\Helper\Bootstrap;

10 use Magento\TestFramework\TestCase\WebapiAbstract;

11

12 /**

13 * Tests for cms page service.

14 */

15 class PageRepositoryTest extends WebapiAbstract

16 {

17 const SERVICE_NAME = 'cmsPageRepositoryV1';

ConfigListener.php (https://bitbucket.org/zbahij/eprojets_app.git) PHP · 383 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

23 * Config listener

24 */

25 class ConfigListener extends AbstractListener implements

26 ConfigMergerInterface,

27 ListenerAggregateInterface

AdvertiserService.java (https://github.com/orchestra-io/sample-openx.git) Java · 358 lines

35 *

36 */

37 class AdvertiserService extends AbstractService {

38 private static final String ADVERTISER_SERVICE = "AdvertiserXmlRpcService.php";

60

61 /* (non-Javadoc)

62 * @see org.openads.proxy.AbstractService#getService()

63 */

64 @Override

AbstractTokenTest.php (https://gitlab.com/fabian.morales/marlon_becerra) PHP · 285 lines

56 }

57

58 class AbstractTokenTest extends \PHPUnit_Framework_TestCase

59 {

60 public function testGetUsername()

114

115 /**

116 * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::__construct

117 */

118 public function testConstructor()

281 protected function getToken(array $roles = array())

282 {

283 return $this->getMockForAbstractClass('Symfony\Component\Security\Core\Authentication\Token\AbstractToken', array($roles));

284 }

285 }

class-cp-interactions-cluster.php (https://gitlab.com/dev73/clusterpress) PHP · 345 lines

1 <?php

2 /**

3 * Interactions Cluster.

10

11 // Exit if accessed directly

12 defined( 'ABSPATH' ) || exit;

13

14 /**

SortedSet.php (https://github.com/netweaver/Rediska.git) PHP · 335 lines

1 <?php

2

3 // Require Rediska

4 require_once dirname(__FILE__) . '/../../Rediska.php';

5

6 /**

12 * @version @package_version@

13 * @link http://rediska.geometria-lab.net

14 * @license http://www.opensource.org/licenses/bsd-license.php

15 */

16 class Rediska_Key_SortedSet extends Rediska_Key_Abstract implements IteratorAggregate, ArrayAccess, Countable

style.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 262 lines

47 float: right;

48 position: relative;

49 <?php if($_GET['wrapper_border'] > 0) : ?>border: <?php echo $_GET['wrapper_border']; ?>px solid #e6e6e6;<?php endif; ?>

50 }

51

84 <?php if($_GET['text_block_position'] == 1) : ?>width: <?php echo $text_block_width; ?>px;<?php else : ?>width: <?php echo $_GET['slide_width'];?>px;<?php endif; ?>

85 <?php if($_GET['text_block_position'] == 1) : ?>height: <?php echo $_GET['slide_height']; ?>px;<?php else : ?>height: <?php echo $_GET['text_block_height']; ?>px;<?php endif; ?>

86 position: absolute;

88 <?php if($_GET['text_block_position'] == 0) : ?>bottom: <?php echo $_GET['module_height']-$_GET['slide_height']-$_GET['image_y'];?>px;<?php endif; ?>

89 <?php if($_GET['text_block_position'] == 1) : ?>left: <?php echo $_GET['text_block_margin']; ?>px;<?php else : ?>left: <?php echo $_GET['image_x']; ?>px;<?php endif; ?>

90 background-color: <?php echo $text_overlay_bgcolor;?>;

97 <?php if($_GET['text_block_position'] == 1) : ?>width: <?php echo $text_block_width-10; ?>px;<?php else : ?>width: 90%;margin: 0 5%;<?php endif; ?>

98 <?php if($_GET['text_block_position'] == 1) : ?>height: <?php echo $text_block_height-10; ?>px;<?php else : ?>height: <?php echo $_GET['text_block_height']; ?>px;<?php endif; ?>

99 <?php if($_GET['text_block_position'] == 1) : ?>left: <?php echo $_GET['text_block_margin']; ?>px;<?php endif; ?>

100 position: absolute;

101 <?php if($_GET['text_block_position'] == 1) : ?>top: <?php echo $text_block_top; ?>px;<?php else : ?>bottom: 0;<?php endif; ?>

102 }

103

Type.php (https://bitbucket.org/dnejedly/eaparts.git) PHP · 344 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Eav

23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

59 * @author Magento Core Team <core@magentocommerce.com>

60 */

61 class Mage_Eav_Model_Entity_Type extends Mage_Core_Model_Abstract

62 {

63 /**

ListenerOptions.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 396 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

11

12 use Traversable;

13 use Zend\Stdlib\AbstractOptions;

14

15 /**

16 * Listener options

17 */

18 class ListenerOptions extends AbstractOptions

19 {

20 /**

268 {

269 if ($this->getConfigCacheKey()) {

270 return $this->getCacheDir() . '/module-config-cache.' . $this->getConfigCacheKey().'.php';

271 }

272

LeadImportFieldType.php (https://gitlab.com/mautic-master/mautic) PHP · 290 lines

1 <?php

2 /**

3 * @package Mautic

11

12 use Mautic\CoreBundle\Factory\MauticFactory;

13 use Symfony\Component\Form\AbstractType;

14 use Symfony\Component\Form\FormBuilderInterface;

15 use Symfony\Component\OptionsResolver\OptionsResolverInterface;

20 * @package Mautic\LeadBundle\Form\Type

21 */

22 class LeadImportFieldType extends AbstractType

23 {

24

translated-object.php (https://gitlab.com/hop23typhu/bryepoxy) PHP · 272 lines

1 <?php

2

3 /**

6 * @since 1.8

7 */

8 abstract class PLL_Translated_Object {

9 public $model;

10 protected $object_type, $tax_language, $tax_translations, $tax_tt;

Atom.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 400 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Atom.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

23 * @see Zend_Feed_Reader

24 */

25 // // // // // // // // // // require_once 'Zend/Feed/Reader.php';

26

27 /**

33 * @see Zend_Feed_Reader_EntryAbstract

34 */

35 // // // // // // // // // // require_once 'Zend/Feed/Reader/EntryAbstract.php';

36

37 /**

IvrEntryAbstract.php (https://github.com/irontec/ivozprovider.git) PHP · 460 lines

1 <?php

2

3 namespace Ivoz\Provider\Domain\Model\IvrEntry;

9

10 /**

11 * IvrEntryAbstract

12 * @codeCoverageIgnore

13 */

14 abstract class IvrEntryAbstract

15 {

16 /**

72 }

73

74 abstract public function getId();

75

76 public function __toString()

FormErrors.php (https://github.com/leerbag/zf2.git) PHP · 466 lines

1 <?php

2 /**

3 * Zend Framework

35 * Any options passed will be used as HTML attributes of the ul tag for the errors.

36 *

37 * @uses \Zend\Form\Decorator\AbstractDecorator

38 * @category Zend

39 * @package Zend_Form

42 * @license http://framework.zend.com/license/new-bsd New BSD License

43 */

44 class FormErrors extends AbstractDecorator

45 {

46 /**

Task.php (https://github.com/pschuele/Tine-2.0-Open-Source-Groupware-and-CRM.git) PHP · 371 lines

1 <?php

2 /**

3 * Zend Framework

42 protected $_finalRun = '';

43

44 /** @var array Array of Zend_Scheduler_Task_Rule_Abstract objects */

45 protected $_rules = array();

46

47 /** @var array Array of Zend_Controller_Request_Abstract objects */

48 protected $_requests = array();

49

113 * controller or a request object.

114 *

115 * @param string|Zend_Controller_Request_Abstract $controller Controller name or request object

116 * @param string $action Action name

117 * @param array $parameters Request parameters

AbstractPaginator.php (https://gitlab.com/zan_zan/laravel_sample) PHP · 487 lines

1 <?php

2

3 namespace Illuminate\Pagination;

6 use ArrayIterator;

7

8 abstract class AbstractPaginator

9 {

10 /**

States.php (https://github.com/shafiqissani/ASTRA-College-Website.git) PHP · 287 lines

1 <?php

2 /* vim: set expandtab tabstop=4 shiftwidth=4: */

3 //

4 // +----------------------------------------------------------------------+

5 // | PHP Version 4 |

6 // +----------------------------------------------------------------------+

7 // | Copyright (c) 1997-2002 The PHP Group |

8 // +----------------------------------------------------------------------+

9 // | This source file is subject to version 2.02 of the PHP license, |

10 // | that is bundled with this package in the file LICENSE, and is |

11 // | available at through the world-wide-web at |

12 // | http://www.php.net/license/3_0.txt. |

13 // | If you did not receive a copy of the PHP license and are unable to |

param_values.php (https://github.com/F5/zetacomponents.git) PHP · 345 lines

1 <?php

2 /**

3 *

27

28 /**

29 * testing sql abstraction for common rdbms limits

30 *

31 * @package Database

92 public static function suite()

93 {

94 return new PHPUnit_Framework_TestSuite( 'ezcParamValuesTest' );

95 }

96

Collect.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 313 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

119

120 /**

121 * Grabs the collection items to get final counts

122 *

123 * @param array $moduleChanges

modules-defaults.php (https://gitlab.com/Magi1053/Extra) PHP · 250 lines

1 <?php

2 // Prevent file from being loaded directly

3 if ( ! defined( 'ABSPATH' ) ) {

AutoParagraphTest.php (https://gitlab.com/potion/librechan) PHP · 577 lines

1 <?php

2

3 class HTMLPurifier_Injector_AutoParagraphTest extends HTMLPurifier_InjectorHarness

299 }

300

301 public function testAbsorbExtraEndingPTag()

302 {

303 $this->assertResult(

311 }

312

313 public function testAbsorbExtraEndingDivTag()

314 {

315 $this->assertResult(

PropertyPathBuilder.php (https://github.com/gimler/symfony.git) PHP · 299 lines

1 <?php

2

3 /*

120 }

121

122 if ($offset < 0 && abs($offset) <= $this->getLength()) {

123 $offset = $this->getLength() + $offset;

124 } elseif (!isset($this->elements[$offset])) {

Feed.php (https://bitbucket.org/simukti/zf1.git) PHP · 320 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Feed.php 24593 2012-01-05 20:35:02Z matthew $

20 */

21

23 * @see Zend_Feed_Writer_Extension_RendererAbstract

24 */

25 require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';

26

27 /**

32 */

33 class Zend_Feed_Writer_Extension_ITunes_Renderer_Feed

34 extends Zend_Feed_Writer_Extension_RendererAbstract

35 {

36

class-wc-report-taxes-by-date.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 264 lines

33 <a

34 href="#"

35 download="report-<?php echo esc_attr( $current_range ); ?>-<?php echo date_i18n( 'Y-m-d', current_time( 'timestamp' ) ); ?>.csv"

36 class="export_csv"

37 data-export="table"

212 <th class="total_row"><?php _e( 'Number of orders', 'woocommerce' ); ?></th>

213 <th class="total_row"><?php _e( 'Total sales', 'woocommerce' ); ?> <?php echo wc_help_tip( __( "This is the sum of the 'Order total' field within your orders.", 'woocommerce' ) ); ?></th>

214 <th class="total_row"><?php _e( 'Total shipping', 'woocommerce' ); ?> <?php echo wc_help_tip( __( "This is the sum of the 'Shipping total' field within your orders.", 'woocommerce' ) ); ?></th>

215 <th class="total_row"><?php _e( 'Total tax', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the total tax for the rate (shipping tax + product tax).', 'woocommerce' ) ); ?></th>

216 <th class="total_row"><?php _e( 'Net profit', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Total sales minus shipping and tax.', 'woocommerce' ) ); ?></th>

217 </tr>

218 </thead>

230 <td class="total_row"><?php echo $tax_row->total_orders; ?></td>

231 <td class="total_row"><?php echo wc_price( $gross ); ?></td>

232 <td class="total_row"><?php echo wc_price( $tax_row->total_shipping ); ?></td>

wc-meta-box-functions.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 223 lines

1 <?php

2 /**

3 * WooCommerce Meta Box Functions

9 */

10

11 if ( ! defined( 'ABSPATH' ) ) {

12 exit; // Exit if accessed directly

13 }

County.java (https://github.com/sbower/kuali-rice-1.git) Java · 304 lines

6 * You may obtain a copy of the License at

7 *

8 * http://www.opensource.org/licenses/ecl2.php

9 *

10 * Unless required by applicable law or agreed to in writing, software

19 import org.apache.commons.lang.StringUtils;

20 import org.kuali.rice.core.api.CoreConstants;

21 import org.kuali.rice.core.api.mo.AbstractDataTransferObject;

22 import org.kuali.rice.core.api.mo.ModelBuilder;

23 import org.kuali.rice.shareddata.api.SharedDataConstants;

52 CoreConstants.CommonElements.FUTURE_ELEMENTS

53 })

54 public final class County extends AbstractDataTransferObject implements CountyContract {

55

56 private static final long serialVersionUID = 6097498602725305353L;

planet_list.tpl (https://github.com/myrtus/SuperNova.git) Smarty Template · 176 lines

71 <!-- ENDIF -->

72

73 <span style="position: absolute; bottom: 0; right: 0; cursor: pointer;" title="{L_flt_gather_all}" class="icon_alpha" onclick="document.location='fleet.php?fleet_page=5&cp={planet.ID}&re=0'">

74 <div class="icons icon-gather"></div>

75 </span>

76

77 <!-- IF planet.FLEET_OWN -->

78 <span style="position: absolute; top: 0px; left: 25%; width: 25%; height: 25%; cursor: pointer;" class="icon_alpha" onmouseover="fleet_dialog_show(this, '{planet.PLANET_FLEET_ID}')" onclick="document.location='fleet.php?cp={planet.ID}&re=0'">

79 <img src="{D_SN_ROOT_VIRTUAL}design/images/icon_fleet_own.png" height="100%" width="100%">

80 </span>

91 <a href="overview.php?cp={planet.MOON_ID}&re=0" title="{planet.MOON_NAME} [{planet.GALAXY}:{planet.SYSTEM}:{planet.PLANET}]"><img style="border-style: none;" src="{dpath}planeten/small/s_{planet.MOON_IMG}.jpg" height="100%" width="100%"></a>

92

93 <span style="position: absolute; bottom: 0; right: 0; cursor: pointer;" title="{L_flt_gather_all}" class="icon_alpha" onclick="document.location='fleet.php?fleet_page=5&cp={planet.MOON_ID}&re=0'">

94 <div class="icons icon-gather"></div>

95 </span>

jquery.fancybox-1.3.4.css (https://github.com/sbower/kuali-rice-1.git) CSS · 359 lines

12 *

13 * Dual licensed under the MIT and GPL licenses:

14 * http://www.opensource.org/licenses/mit-license.php

15 * http://www.gnu.org/licenses/gpl.html

16 */

31

32 #fancybox-loading div {

33 position: absolute;

34 top: 0;

35 left: 0;

40

41 #fancybox-overlay {

42 position: absolute;

43 top: 0;

44 left: 0;

content.php (https://github.com/livinglab/openlab.git) PHP · 204 lines

1 <?php

2 if (!defined("ABSPATH")) {

201 </div>

202 </div>

203 <?php

204 }

StopwordsTest.php (https://github.com/Gasol/solarium.git) PHP · 278 lines

1 <?php

2

3 namespace Solarium\Tests\QueryType\ManagedResources\RequestBuilder;

4

5 use PHPUnit\Framework\TestCase;

6 use Solarium\Core\Client\Request;

7 use Solarium\Exception\RuntimeException;

8 use Solarium\QueryType\ManagedResources\Query\AbstractCommand;

9 use Solarium\QueryType\ManagedResources\Query\Command\Config as ConfigCommand;

10 use Solarium\QueryType\ManagedResources\Query\Command\Delete as DeleteCommand;

237 }

238

239 class UnsupportedStopwordsCommand extends AbstractCommand

240 {

241 public function getType(): string

fpdi_pdf_parser.php (https://github.com/pauln/moodle.git) PHP · 347 lines

1 <?php

2 /**

3 * This file is part of FPDI

10

11 if (!class_exists('pdf_parser')) {

12 require_once('pdf_parser.php');

13 }

14

218 'x' => $b[0][1] / $k,

219 'y' => $b[1][1] / $k,

220 'w' => abs($b[0][1] - $b[2][1]) / $k,

221 'h' => abs($b[1][1] - $b[3][1]) / $k,

field_link_color.php (https://gitlab.com/eita/agencia-consumo-responsavel) PHP · 207 lines

1 <?php

2

3 /**

22

23 // Exit if accessed directly

24 if ( ! defined( 'ABSPATH' ) ) {

25 exit;

26 }

Feed.php (https://bitbucket.org/ksekar/campus.git) PHP · 320 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Feed.php 24594 2012-01-05 21:27:01Z matthew $

20 */

21

23 * @see Zend_Feed_Writer_Extension_RendererAbstract

24 */

25 require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';

26

27 /**

32 */

33 class Zend_Feed_Writer_Extension_ITunes_Renderer_Feed

34 extends Zend_Feed_Writer_Extension_RendererAbstract

35 {

36

AbstractStructureParser.php (https://github.com/RichardDownes/PHPCodeParser.git) PHP · 608 lines

17 */

18

19 use Meta\AbstractPHPStructure;

20 use Meta\DocBlock;

21

36 * @author Richard Downes <richard@sculpt.ie>

37 */

38 abstract class AbstractStructureParser extends AbstractParser

39 {

40

146 * Factory method to create the PHP structure

147 *

148 * @return \Meta\AbstractPHPStructure

149 */

150 protected abstract function createPHPStructure();

312 $parser->phpFunction()->setStatic($this->staticMember);

313 $parser->phpFunction()->setAbstract($this->abstractMember);

314 $parser->phpFunction()->setDocBlock($this->docBlock);

Feed.php (https://bitbucket.org/haichau59/manga.git) PHP · 320 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Feed.php 24594 2012-01-05 21:27:01Z matthew $

20 */

21

23 * @see Zend_Feed_Writer_Extension_RendererAbstract

24 */

25 //require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';

26

27 /**

32 */

33 class Zend_Feed_Writer_Extension_ITunes_Renderer_Feed

34 extends Zend_Feed_Writer_Extension_RendererAbstract

35 {

36

AdapterChainTest.php (https://gitlab.com/my-application.bjoernbartels.earth/ZfcUser) PHP · 311 lines

1 <?php

2

3 namespace ZfcUserTest\Authentication\Adapter;

7 use ZfcUser\Authentication\Adapter\AdapterChainEvent;

8

9 class AdapterChainTest extends \PHPUnit_Framework_TestCase

10 {

11 /**

92 ->method('clear');

93

94 $adapter = $this->getMock('ZfcUser\Authentication\Adapter\AbstractAdapter');

95 $adapter->expects($this->once())

96 ->method('getStorage')

Parser.php (https://bitbucket.org/icosplays/friendica.git) PHP · 349 lines

1 <?php

2

3 /**

9 * @copyright 2006

10 * @license BSD

11 * @version CVS: $Id: Parser.php 322327 2012-01-15 17:55:59Z cweiske $

12 * @link http://pear.php.net/package/Text_LanguageDetect/

345 }

346

347 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

348

349 ?>

move.php (https://github.com/MarxGames/E-Hobused.git) PHP · 328 lines

1 <?php

2 include_once 'models/game.php';

54 move : game_id , round , performed_at , type , object , subject , param1 , param2 , extra

55 */

56 abstract class Move {

57 // Don forget call parent::save($game)!

58 public function save(Game $game) {

62 }

63

64 abstract public function append_to_model(Game $game);

65 }

66

PlatformJobQueue.php (https://github.com/Exercise/zf2.git) PHP · 318 lines

1 <?php

2 /**

3 * Zend Framework

33 * @uses \ZendAPI_Queue

34 * @uses \ZendAPI_Job

35 * @uses \Zend\Queue\Adapter\AdapterAbstract

36 * @uses \Zend\Queue\Queue

37 * @uses \Zend\Queue\Exception

43 * @license http://framework.zend.com/license/new-bsd New BSD License

44 */

45 class PlatformJobQueue extends AbstractAdapter

46 {

47 /**

186 $zendApiJob = new $classname($message);

187

188 // Unfortunately, the Platform JQ API is PHP4-style...

189 $platformJob = $zendApiJob->getJob();

190

Feed.php (https://github.com/timglabisch/pimcore.git) PHP · 320 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Feed.php 24593 2012-01-05 20:35:02Z matthew $

20 */

21

23 * @see Zend_Feed_Writer_Extension_RendererAbstract

24 */

25 // require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';

26

27 /**

32 */

33 class Zend_Feed_Writer_Extension_ITunes_Renderer_Feed

34 extends Zend_Feed_Writer_Extension_RendererAbstract

35 {

36

Abstract.php (https://github.com/ronseigel/agent-ohm.git) PHP · 374 lines

33 * @author Magento Core Team <core@magentocommerce.com>

34 */

35 abstract class Mage_Core_Model_Abstract extends Varien_Object

36 {

37 /**

118 * Get resource instance

119 *

120 * @return Mage_Core_Model_Mysql4_Abstract

121 */

122 protected function _getResource()

206 *

207 * @param integer $id

208 * @return Mage_Core_Model_Abstract

209 */

210 public function load($id, $field=null)

AbstractWidgetViewHelperTest.php (https://github.com/arbyte/FLOW3-X-TYPO3.Fluid.git) PHP · 220 lines

1 <?php

2 namespace TYPO3\Fluid\Tests\Unit\Core\Widget;

3

13

14 /**

15 * Testcase for AbstractWidgetViewHelper

16 *

17 */

18 class AbstractWidgetViewHelperTest extends \TYPO3\FLOW3\Tests\UnitTestCase {

19

20 /**

21 * @var \TYPO3\Fluid\Core\Widget\AbstractWidgetViewHelper

22 */

23 protected $viewHelper;

ForStatement.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 233 lines ✨ Summary

This Java class represents a For statement in PHP programming language. It encapsulates the initialization, condition, increment, and action of the loop. The class provides methods to get variables used, modified, and outside the scope of the loop, as well as analyze the code for syntax errors. It also overrides some methods from its parent class to provide specific behavior for For statements.

1 package net.sourceforge.phpdt.internal.compiler.ast;

2

3 import gatchan.phpparser.parser.PHPParser;

4 import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;

51 public String toString(int tab)

52 {

53 StringBuilder buff = new StringBuilder(tabString(tab));

54 buff.append("for ("); //$NON-NLS-1$

55 //inits

211

212 @Override

213 public void analyzeCode(PHPParser parser)

214 {

215 if (initializations != null)

_dynamic.js (http://enginey.googlecode.com/svn/trunk/) JavaScript · 19 lines ✨ Summary

This JavaScript code checks if a specific resource is loaded and provides the Dojo toolkit with a reference to it. If not, it sets the resource as loaded and defines a new module named “dojox.highlight.languages._dynamic”. It then requires other languages (Python, Perl, PHP, Ruby) from the same module, making them available for use in the application.

13 dojo.require("dojox.highlight.languages.python");

14 // dojo.require("dojox.highlight.languages.perl");

15 // dojo.require("dojox.highlight.languages.php");

16 // dojo.require("dojox.highlight.languages.ruby");

17

AndCondition.php (git://github.com/alexgorbatchev/SyntaxHighlighter.git) text · 0 lines

1 <?php

2 /*

3 * $Id: AndCondition.php 43 2006-03-10 14:31:51Z mrook $

20 */

21

22 require_once 'phing/tasks/system/condition/ConditionBase.php';

23

24 /**

DefaultInputHandler.php (git://github.com/alexgorbatchev/SyntaxHighlighter.git) text · 0 lines

1 <?php

2

3 /*

4 * $Id: DefaultInputHandler.php 293 2007-11-04 16:51:45Z hans $

5 *

6 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

21 */

22

23 require_once 'phing/input/InputHandler.php';

24 include_once 'phing/system/io/ConsoleReader.php';

frame_9.svg (https://bitbucket.org/atchariya/nokia.git) SVG · 3078 lines

49 2Tnhsy+iyyWrZ59l++ghpaTWIBcmjNEcF+W5xQHPSUdAaqPtTvFE8syc59agJGbJ9T5yyGZciPFE

50 Ip8E5XFUimSOLfCyF17JxjUXrriw50Lv9fmi3f2DKL1rLQBer9cHoTbpL2ZjoD4r0WvDlDEigSPv

51 uJqdHJVTCqFNNJl6brs7aEARaOeIuuFiqGk9bMWRVlSiQzcbrAbseA+SE6dMjFYra5L2N5SC53qB

52 C0ZpnXU9hOq4W2EuoaBsHS4FLtVAAyuUz3rPMYElsMwTl11ikZyFO4HMhSp3NfBmH/ieCGdBmKkj

105 cd7plK/3PXdF+HEX/lky5nnif+4DX+sDazEOvCqdHJitNqFrnCMxLgR+t+/Z9co1L7ySCp9x45mS

106 Ghyceb0EXo0Lvh6cb6mywREpiMEfdJHjnPhicQwjuIMpOSZyXCAC62nHy75i1y3AnHU7gy9VSOog

107 9d+LVSXtwgrBUv2eR0wqpyMuCEpSp58mohQj6Yx7qEoqNcgFD5GxGFsH7wLPhp5rrqQ8MZeCSGDd

108 r1mlpspSw01AAyaKiSGe+bIbbxfhonOGUsfIYxKvEVnlwkeufHeh3BVl17D0ocFJjkMOTRUizEq9

109 MUV4EDp+RZVRhS9NueK/JaEaySaIGtGVqcxYKKzCkpwzOzNcCrigqrVj9qqeQpUsRpR6LCRrr0GE

262 T4tSOxOpqqOnevsAvJwjn8M4TjOf4Pwfg3A/RNScTirEIW607T6IOE4ieGxB3okR4Q808uYy8nfn

263 zGsl4V55gG+IsLMdX7FAXq745jzxgRiHKG+Kcm0p/MhYc3M6d6JncuNk+uwQ4qebDlOpLs6o7QFR

264 Z2EjV2dlNay5rxOTJwarphpXIZvSDT1y+ybTlUOOvv09oDq283CALdYV700TW9vxSdkxW2alwtaF

265 Dc5PhTX/2Aa2+ZTvCdCtebVbsO+ZL6RMCZF/s+i4s+j5QYQuFWLJf6PJWRlnwvkW3VuxXHbkxRrW

266 E2F7Ua9jCOTYkYe6C0JjoFusWHRdk2smbmYDCSxjxZ77YuzMWMTInb7nqlQMus/VEPoaMKtyzYRy

556 d1ozopWgoIVYLcSK5IR4SdlkUWx3D65cIx4ecen4hHz7fbI5lralOVIDU2m5QuJlG/g68EPJvBYa

557 vpgj/4X17IjwHs7faFr+JAd8zuBJ2nI2DKzHnicSGGoX+nNhwlwCpVNOWbqxIfPQRh7iRIl8Tju+

558 4WtUI/+6TPhpn/PusOZv64YvascfzsrcjNRpCT57QxxLeLWftNxXY7ldMfNarVylT3UnLBO2XOBj

559 wadsY8vBMJClxBMepBX5HPZnM5pYYJxNdm5N9rigkdPtkseeuS/CrheTy8oyUZVJrkSIWrUwTcKr

560 lOdkquV5QoxszqBK0oBX2vW1pmHtzn1PtWtIyChDKGReCYFrlST9Xq3PGCSQRWuGysGNA0JdvyMx

php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 4699 lines

6 <MODE NAME="php" FILE="php.xml"

7 FILE_NAME_GLOB="*.{php3,php4,php5,php,phtml}"

8 FIRST_LINE_GLOB="&lt;?php*" />

32

33 <RULES IGNORE_CASE="TRUE">

34 <!-- PHP -->

35 <SPAN TYPE="MARKUP" DELEGATE="PHP">

36 <BEGIN>&lt;?php</BEGIN>

37 <END>?&gt;</END>

38 </SPAN>

39

40 <SPAN TYPE="MARKUP" DELEGATE="PHP">

41 <BEGIN>&lt;?</BEGIN>

42 <END>?&gt;</END>

SimpleListModel.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 106 lines ✨ Summary

This Java class, SimpleListModel, extends AbstractListModel and provides a custom list model for displaying PHP items. It filters items based on a search string and mode settings, allowing users to narrow down results by type and name. The class uses a TreeSet to store the filtered items and updates the list when the filter or mode changes.

37 this.list.clear();

38 for (int i = 0; i < list.size(); i++) {

39 PHPItem phpItem = (PHPItem) list.get(i);

40 if (accept(phpItem, searchString)) {

53 Iterator iterator = list.iterator();

54 while (iterator.hasNext()) {

55 PHPItem phpItem = (PHPItem) iterator.next();

56 if (!accept(phpItem, searchString)) {

74 private boolean accept(PHPItem phpItem, String searchText) {

75 return (mode & phpItem.getItemType()) == phpItem.getItemType() && phpItem.getNameLowerCase().indexOf(searchText) != -1;

76 }

77

88 private static class SimpleComparator implements Comparator {

89 public int compare(Object o1, Object o2) {

90 PHPItem item1 = (PHPItem) o1;

91 PHPItem item2 = (PHPItem) o2;

ConditionalExpression.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 70 lines ✨ Summary

This Java class represents a ConditionalExpression, which is an operator expression that evaluates to true if a condition is met and false otherwise. It has three main components: a boolean condition, a value to return if true, and a value to return if false. The class provides methods for getting variables used in the expression, modified by it, and outside of it.

1 package net.sourceforge.phpdt.internal.compiler.ast;

2

3 import java.util.List;

PHPDocument.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 231 lines ✨ Summary

This Java class represents a PHP document, which is an outlineable object containing HTML and PHP nodes. It provides methods to analyze code, get statements at specific positions, and manage its structure, including adding and retrieving children (e.g., classes, methods). The class also implements the IAsset interface and has properties for its name, start and end positions, and nodes.

7 import net.sourceforge.phpdt.internal.compiler.parser.OutlineableWithChildren;

8 import gatchan.phpparser.project.itemfinder.PHPItem;

9 import gatchan.phpparser.parser.PHPParser;

14

15 /**

16 * It's a php document. This class is an outlineable object It will contains html and php

17 *

18 * @author Matthieu Casanova

109 * Analyze the code of a php document.

110 *

111 * @param phpParser the php parser

112 */

113 public void analyzeCode(PHPParser phpParser) {

155 for (int i = 0; i < children.size(); i++) {

156 Outlineable outlineable = (Outlineable) children.get(i);

157 if (outlineable.getItemType() == PHPItem.METHOD) {

158 MethodDeclaration methodDeclaration = (MethodDeclaration) outlineable;

159 if (line == methodDeclaration.getBodyLineStart() && column > methodDeclaration.getBodyColumnStart()) return methodDeclaration;

runme.php (https://swig.svn.sourceforge.net/svnroot/swig) PHP · 50 lines ✨ Summary

This PHP code demonstrates object creation, access to static members, and deletion of objects using references and a container. It creates two shapes (circle and square) and adds them to a container. The code then accesses a static member, deletes the old references, and verifies that the shapes remain in memory. Finally, it deletes the container, verifying that the shapes are truly deleted from memory.

1 <?php

2

3 # This file illustrates the low-level C++ interface

5 # get converted into function calls.

6

7 require("example.php");

8

9 # ----- Object creation -----

RestDataConnectionProvider.php (http://forceworkbench.googlecode.com/svn/trunk/workbench/) PHP · 24 lines ✨ Summary

This PHP code defines a class RestDataConnectionProvider that extends an abstract connection provider. It establishes a REST API connection using the RestApiClient class, setting various configuration options such as compression, user agent, logging, and proxy settings based on environment variables and configuration files. The endpoint type is set to “Soap/u”.

1 <?php

2 require_once "context/AbstractConnectionProvider.php";

3 require_once "restclient/RestClient.php";

4

5 class RestDataConnectionProvider extends AbstractConnectionProvider {

6 function establish(ConnectionConfiguration $connConfig) {

7 $restConnection = new RestApiClient($this->buildEndpoint($connConfig), $connConfig->getSessionId());

session.php (http://forceworkbench.googlecode.com/svn/trunk/workbench/) PHP · 106 lines ✨ Summary

This PHP code initializes and configures a Workbench application, setting up session management, error handling, and security measures to ensure a secure connection with Salesforce. It also checks for user authentication, validates CSRF tokens, and monitors user activity to prevent idle sessions from expiring prematurely.

9 require_once 'config.php';

10 if(is_file('configOverrides.php')) require_once 'configOverrides.php';

11

12 foreach ($config as $configKey => $configValue) {

49

50 //clear ResultsWithData and retrievedZips from session unless downloading them

51 if (isset($_SESSION['resultsWithData']) && basename($_SERVER['PHP_SELF']) != 'downloadResultsWithData.php') {

52 unset($_SESSION['resultsWithData']);

53 }

54

55 if (isset($_SESSION['retrievedZips']) && basename($_SERVER['PHP_SELF']) != 'metadataStatus.php') {

56 unset($_SESSION['retrievedZips']);

57 }

94 if (isLoggedIn()) {

95 // todo: should this be in the ctx?

96 if (!in_array(basename($_SERVER['PHP_SELF'], ".php"), array("login", "logout")) && isset($_SESSION['lastRequestTime'])) {

97 $idleTime = microtime(true) - $_SESSION['lastRequestTime'];

98 if ($idleTime > (getConfig("sessionIdleMinutes") * 60)) {

Makefile.old (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 16 lines

2 SWIG = $(TOP)/../swig

3 SRCS = example.c

4 TARGET = php_example

5 INTERFACE = example.i

6 SWIGOPT = -noproxy

8 all::

9 $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \

10 SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4

11

12 clean::

13 rm -f *_wrap* *.o core *~ *.so *.php php_example.h

14

15 check: all

BUILD.sh (https://swig.svn.sourceforge.net/svnroot/swig) Shell · 5 lines

1 #! /bin/sh -e

2

3 ${SWIG:=swig} -php4 -phpfull -c++ -noproxy -withcxx example.cxx example.i

4 phpize && ./configure && make clean && make

try.dtd (https://jedit.svn.sourceforge.net/svnroot/jedit) Document Type Definition · 24 lines

1 <!-- attached to bug #1083903 XML Insert element tree bug (imported DTD)

2 https://sourceforge.net/tracker/index.php?func=detail&aid=1083903&group_id=588&atid=565475

3 -->

4

CHANGES.txt (https://jedit.svn.sourceforge.net/svnroot/jedit) Plain Text · 2185 lines

31 - Updated BibTeX and LaTeX syntax highlighting (Thomas Alspaugh).

32

33 - PHP mode now recognizes <script language="PHP">...</script>.

34

35 - Updated Omnimark syntax highlighting (Lionel Fiol).

459 accumulate on OpenVMS.

460

461 - Fixed MiscUtilities.isAbsolutePath() on OpenVMS.

462

463 - It was not possible to bind an action to S+SPACE.

836 modes.

837

838 - SCRIPT tags in HTML files no longer recognize <?php ... ?>.

839

840 }}}

WInZipAesKeyStrength.cs (https://bitbucket.org/jens13/cleanzip.git) C# · 14 lines

2 // Distributed under the New BSD License.

3 // (See accompanying file notice.txt or at

4 // http://www.opensource.org/licenses/bsd-license.php)

5 // Source: https://bitbucket.org/jens13/cleanzip

6

jedit.1 (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 163 lines

157

158 .SH BUGS

159 See http://www.jEdit.org/index.php?page=feedback for bug reporting information.

160

161 .SH WEB

PHPParser.html (https://jedit.svn.sourceforge.net/svnroot/jedit) HTML · 303 lines ✨ Summary

This HTML code outputs a changelog for a PHP plugin for the jEdit editor. It lists version updates, features, and bug fixes, including known issues and feedback instructions. The format is similar to a traditional changelog, with version numbers, descriptions of changes, and notes on what’s still being worked on or has been reported as an issue.

20 <h2>Introduction</h2>

21

22 <p>In the beginning of 2003 I found the <b>phpeclipse</b> project, a plugin to do php in <b>Eclipse</b>.

23 I worked on it, and finaly wrote an alternative php parser for the project.

24 The matter is that I don't like SWT very much so when I discovered discovered jEdit

25 I loved it. So I decided to write a plugin using my php parser.

26 It uses ErrorList plugin to show the errors and Sidekick plugin to manage parser.

27 </p>

101 <li>1.3.0</li>

102 <ul>

103 <li><ul>Dropped specific php 4 support.</ul></li>

104 <li>Features

105 <ul>

192 <li>Missing '?>' is now reported as warning and can be deactivated in the options</li>

193 <li>Better code completion handling for interfaces</li>

194 <li>&lt;?xml token is now ignored (I think if you put such token, your php.ini config will only accept

195 &lt;?php for

catalog (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 546 lines

327 <MODE NAME="php" FILE="php.xml"

328 FILE_NAME_GLOB="*.{php3,php4,php,phtml,inc}"

329 FIRST_LINE_GLOB="{&lt;?php*,#!/*php*}" />

DateUtils.java (http://wogwt.googlecode.com/svn/trunk/) Java · 231 lines ✨ Summary

This Java class, DateUtils, provides utility methods for working with dates, including formatting and parsing date strings according to various formats (e.g., RFC 1123, W3C, etc.). It also includes comparison methods for dates and a method to get the time zone offset. The class is designed as a utility class, providing static methods that can be used without creating an instance of the class.

11 *

12 * You can obtain a copy of the LGPL 2.1 license at

13 * http://www.opensource.org/licenses/lgpl-2.1.php

14 *

15 * You can obtain a copy of the CDDL 1.0 license at

16 * http://www.opensource.org/licenses/cddl1.php

17 *

18 * You can obtain a copy of the EPL 1.0 license at

19 * http://www.opensource.org/licenses/eclipse-1.0.php

20 *

21 * See the Licenses for the specific language governing permissions and

RemotePagingSample.java.html (http://gwt-ext.googlecode.com/svn/trunk/) HTML · 207 lines ✨ Summary

This HTML code is for a GWT (Google Web Toolkit) application that displays a grid of topics with various details, such as title, author, and last post date. The grid has features like paging, sorting, and filtering. A toggle button allows the user to show or hide the excerpt of each topic. The code uses HTML, CSS, JavaScript, and GWT libraries to create the interactive grid.

73 public String render(Object value, CellMetadata cellMetadata, Record record,

74 int rowIndex, int colNum, Store store) {

75 return Format.format("<b><a href=\"http://extjs.com/forum/showthread.php?t={2}\"

76 target=\"_blank\">{0}</a></b>

77 <a href=\"http://extjs.com/forum/forumdisplay.php?f={3}\" target=\"_blank\">{1} Forum</a>",

98 panel.setPaddings(15);

99

100 DataProxy dataProxy = new ScriptTagProxy("http://extjs.com/forum/topics-browse-remote.php");

101

102 final RecordDef recordDef = new RecordDef(new FieldDef[]{

sidebar.php (https://bitbucket.org/jesseterry/myclientbase/) PHP · 14 lines ✨ Summary

This PHP code outputs a section of HTML content that displays a title and a list of links. The title is “system” in black, and the links are to various settings pages within an application, including system settings, user accounts, tax rates, invoice statuses, and modules. Each link is generated using the anchor function and includes a translated label from a language file.

1 <div class="section_wrapper">

2

3 <h3 class="title_black"><?php echo $this->lang->line('system'); ?></h3>

4

5 <ul class="quicklinks content toggle">

6 <li><?php echo anchor('settings', $this->lang->line('system_settings')); ?></li>

7 <li><?php echo anchor('users', $this->lang->line('user_accounts')); ?></li>

8 <li><?php echo anchor('tax_rates', $this->lang->line('tax_rates')); ?></li>

9 <li><?php echo anchor('invoice_statuses', $this->lang->line('invoice_statuses')); ?></li>

10 <li><?php echo anchor('invoices/invoice_groups', $this->lang->line('invoice_groups')); ?></li>

11 <li class="last"><?php echo anchor('mcb_modules', $this->lang->line('modules')); ?></li>

ezhttptool_regression.php (git://github.com/ezsystems/ezpublish.git) PHP · 49 lines ✨ Summary

This PHP code defines a test class eZHTTPToolRegression that tests the functionality of the ezpTestCase class and two functions from the eZHTTPTool class: sendHTTPRequest() and createRedirectUrl(). The tests verify that these functions behave correctly in different scenarios, including handling URLs with dashes and SSL reverse proxies.

1 <?php

2 /**

3 * File containing the eZHTTPToolRegression class

21 {

22 self::markTestSkipped( "Test disabled pending update." );

23 $url = 'http://php-og.mgdm.net/';

24

25 $this->assertInternalType(

26 PHPUnit_Framework_Constraint_IsType::TYPE_STRING,

27 eZHTTPTool::sendHTTPRequest( $url, 80, false, 'eZ Publish', false )

28 );

compil_modules1_1.com (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 133 lines

42 $ call make swig_root:[vms.o_alpha]perl5.obj -

43 "cxx ''cxxflags'" perl5.cxx

44 $ call make swig_root:[vms.o_alpha]php4.obj -

45 "cxx ''cxxflags'" php4.cxx

tip2.html (https://jedit.svn.sourceforge.net/svnroot/jedit) HTML · 18 lines ✨ Summary

This HTML code describes a basic code completion feature. It explains how pressing <b>C+b</b> searches for words starting with the input before the caret in the current buffer and mode’s keyword list, providing suggestions to auto-complete previously-declared identifier names, Javadoc tags, or PHP function names.

11 <li>When editing Javadoc comments in Java source code,

12 enter "@" then press <b>C+b</b> to get a list of Javadoc tags.

13 <li>In a PHP file, enter a few characters and press <b>C+b</b> to see

14 a list of functions whose names start with what you entered.

15 </ul>

bp-core-options.php (https://bitbucket.org/simplemediacode/bptrunk.git) PHP · 538 lines

1 <?php

2

3 /**

9

10 // Exit if accessed directly

11 if ( !defined( 'ABSPATH' ) ) exit;

12

13 /**

30

31 // Legacy bbPress config location

32 'bb-config-location' => ABSPATH . 'bb-config.php',

33

34 /** XProfile **********************************************************/

home.ctp (https://bitbucket.org/floresj/notetime.git) Unknown · 189 lines

169 <ul><li><?php echo __d('cake_dev', 'Promoting development related to CakePHP'); ?></li></ul></li>

170 <li><a href="http://www.cakephp.org"><?php echo __d('cake_dev', 'CakePHP'); ?> </a>

171 <ul><li><?php echo __d('cake_dev', 'The Rapid Development Framework'); ?></li></ul></li>

172 <li><a href="http://book.cakephp.org"><?php echo __d('cake_dev', 'CakePHP Documentation'); ?> </a>

173 <ul><li><?php echo __d('cake_dev', 'Your Rapid Development Cookbook'); ?></li></ul></li>

174 <li><a href="http://api20.cakephp.org"><?php echo __d('cake_dev', 'CakePHP API'); ?> </a>

175 <ul><li><?php echo __d('cake_dev', 'Quick Reference'); ?></li></ul></li>

183 <ul><li><?php echo __d('cake_dev', 'Live chat about CakePHP'); ?></li></ul></li>

184 <li><a href="http://github.com/cakephp/"><?php echo __d('cake_dev', 'CakePHP Code'); ?> </a>

185 <ul><li><?php echo __d('cake_dev', 'For the Development of CakePHP Git repository, Downloads'); ?></li></ul></li>

186 <li><a href="http://cakephp.lighthouseapp.com/"><?php echo __d('cake_dev', 'CakePHP Lighthouse'); ?> </a>

187 <ul><li><?php echo __d('cake_dev', 'CakePHP Tickets, Wiki pages, Roadmap'); ?></li></ul></li>

XModeHandler.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 767 lines ✨ Summary

This Java code defines a class TagDecl that represents a tag declaration in an XML parser. It stores information about the tag, such as its name, start and end positions, and attributes like default IDs and token IDs. The class also tracks various flags indicating whether certain conditions are met during parsing.

1 /*

2 * XModeHandler.java - XML handler for mode files

3 * :tabSize=8:indentSize=8:noTabs=false:

4 * :folding=explicit:collapseFolds=1:

5 *

42 * @version $Id: XModeHandler.java 16344 2009-10-14 10:31:01Z kpouer $

43 */

44 public abstract class XModeHandler extends DefaultHandler

45 {

46 //{{{ XModeHandler constructor

433 * @since jEdit 4.2pre1

434 */

435 protected abstract void error(String msg, Object subst);

436 //}}}

437

Code39JK.php (https://bitbucket.org/mstetson/obiblio/) PHP · 27 lines ✨ Summary

This PHP code defines a font for generating PDFs using the Code39JK font type. It sets various properties such as font name, description, character mapping, encoding, and file information. The code provides detailed specifications for the font’s appearance and behavior, allowing it to be used in PDF generation contexts.

1 <?php

2 $PDF_font['type']='Type1';

3 $PDF_font['name']='Code39JK';

users-guide.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 711 lines

5

6 <!-- jEdit buffer-local properties: -->

7 <!-- :tabSize=1:indentSize=1:noTabs=true:folding=sidekick: -->

8 <!-- $Id: users-guide.xml 12872 2008-06-22 07:53:52Z kerik-sf $ - $Revision: 12872 $ -->

9 <article xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

604 available from jedit repository. The documentation is generated using docbook xsl.

605 </para>

606 <para>Some tests are included. They are based upon <ulink url="http://fest.easytesting.org/swing/wiki/pmwiki.php">FEST-swing</ulink>

607 for GUI testing. Otherwise they are plain <ulink url="http://www.junit.org/">jUnit</ulink> tests.

608 To run the tests, <command>cd</command> to the plugin root directory and type <command>ant test</command>.

114.php (http://dotaopenstats.googlecode.com/svn/trunk/) PHP · 122 lines ✨ Summary

The PHP code defines an associative array $ranges containing country codes as keys and arrays of phone number ranges and corresponding countries as values. The output is not explicitly defined, but based on the structure, it appears to be a data storage for country-specific phone number ranges, potentially used for geolocation or routing purposes.

1 <?php

2 //-

3 $ranges=Array(

_normal.user.js (http://game-golem.googlecode.com/svn/trunk/) JavaScript · 33 lines ✨ Summary

This UserScript for Facebook’s Castle Age game automatically logs in and plays on behalf of the user, using a pre-existing script called GameGolem.js. It retrieves the necessary data from local storage and appends the script to the page’s head section, allowing it to automate gameplay without requiring manual input.

7 // @include http://apps.facebook.com/castle_age/*

8 // @include https://apps.facebook.com/castle_age/*

9 // @include http://web3.castleagegame.com/castle_ws/index.php

10 // @resource golem http://game-golem.googlecode.com/svn/trunk/GameGolem.js

11 // @resource stylesheet http://game-golem.googlecode.com/svn/trunk/golem.css

12 // ==/UserScript==

13 // @disabled-include http://apps.facebook.com/reqs.php

14 // @disabled-include https://apps.facebook.com/reqs.php

RoleVoter.php (git://github.com/symfony/symfony.git) PHP · 62 lines ✨ Summary

This PHP class, RoleVoter, implements a voter for Symfony’s security system. It checks if any attribute of an object starts with a given prefix (‘ROLE_’) and grants access if the role is present in the token’s roles. If the attribute is ‘ROLE_PREVIOUS_ADMIN’, it triggers deprecation warnings. The voter returns ACCESS_ABSTAIN by default, unless the attribute matches one of the token’s roles, in which case it returns ACCESS_GRANTED.

1 <?php

2

3 /*

33 public function vote(TokenInterface $token, $subject, array $attributes)

34 {

35 $result = VoterInterface::ACCESS_ABSTAIN;

36 $roles = $this->extractRoles($token);

37

director_string_runme.php (https://swig.svn.sourceforge.net/svnroot/swig) PHP · 35 lines ✨ Summary

This PHP code tests a set of functions, classes, and global variables to ensure they are working as expected. It creates an instance of class B, which extends class A, and calls various methods on it to verify their behavior. The test checks for equality with expected results, indicating that the code passes the tests successfully.

1 <?php

2

3 require "tests.php";

4 require "director_string.php";

5

6 // No new functions

Exception.php (http://typecho.googlecode.com/svn/trunk/) PHP · 20 lines ✨ Summary

This PHP code defines a custom exception class Typecho_Http_Client_Exception that extends Typecho’s built-in Exception class. It is part of the Typecho blog platform and provides a specific error handling mechanism for HTTP client-related issues, allowing for more targeted error messages and behavior in the application.

1 <?php

2 /**

3 * Typecho Blog Platform

5 * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org)

6 * @license GNU General Public License 2.0

7 * @version $Id: DbException.php 52 2008-03-18 08:04:01Z magike.net $

8 */

9

10 /** ???? */

11 require_once 'Typecho/Exception.php';

12

13 /**

en-GB.plg_finder_weblinks.ini (https://bitbucket.org/kraymitchell/fcd.git) Unknown · 11 lines

1 ; Joomla! Project

2 ; Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.

3 ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php

4 ; Note : All ini files need to be saved as UTF-8

5

dhd_common.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 1733 lines ✨ Summary

This C code snippet appears to be part of a wireless networking driver, specifically related to Wi-Fi scanning and management. It provides functions for requesting Wi-Fi scans, deleting BSS (Basic Service Set) entries, and retrieving partial scan results. The code also handles various error conditions and manages internal data structures, such as the iscan_chain buffer.

7 * agreement governing use of this software, this software is licensed to you

8 * under the terms of the GNU General Public License version 2 (the "GPL"),

9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the

10 * following added to such license:

11 *

nsIScriptGlobalObject.h (git://github.com/zpao/v8monkey.git) C Header · 172 lines ✨ Summary

This C++ header file defines a class nsIScriptGlobalObject that represents a global object for scripting languages, such as JavaScript. It provides methods for managing script contexts, handling errors, and enabling/disabling scripts. The class is designed to be used in a web browser context, likely Mozilla Firefox or its derivatives.

1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

2 /* vim: set ts=2 sw=2 et tw=80: */

3 /* ***** BEGIN LICENSE BLOCK *****

62 // attempted micro-optimization tried to avoid us going all the way to

63 // nsIProgrammingLanguage::MAX; however:

64 // * Someone is reportedly working on a PHP impl - that has value 9

65 // * nsGenericElement therefore allows 4 bits for the value.

66 // So there is no good reason for us to be more restrictive again...

eztemplateelementparser.php (git://github.com/ezsystems/ezpublish.git) PHP · 603 lines ✨ Summary

This is a PHP class that parses eZTemplate element definitions, which are used to define custom elements for an eZ Publish content management system. The class breaks down the definition into its constituent parts, such as identifiers, quotes, numbers, and whitespace, and returns their positions in the template string. It provides methods for accessing these positions and performing various operations on them.

1 <?php

2 /**

3 * File containing the eZTemplateElementParser class.

10

11 /*!

12 \class eZTemplateElementParser eztemplateelementparser.php

13 \brief The class eZTemplateElementParser does

14

Empty.php (http://sewebar-cms.googlecode.com/svn/trunk/) PHP · 139 lines ✨ Summary

This PHP class, Zend_Search_Lucene_Search_Query_Empty, represents an empty search query for a Lucene index. It provides methods to rewrite and optimize the query, create a weight implementation, execute the query, retrieve matched document IDs, score documents, and highlight matches. The class is designed to be used as a placeholder or default query when no actual query terms are provided.

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Empty.php 20096 2010-01-06 02:05:09Z bkarwin $

21 */

22

23

24 /** Zend_Search_Lucene_Search_Query */

25 require_once 'Zend/Search/Lucene/Search/Query.php';

26

27

66 public function createWeight(Zend_Search_Lucene_Interface $reader)

67 {

68 require_once 'Zend/Search/Lucene/Search/Weight/Empty.php';

69 return new Zend_Search_Lucene_Search_Weight_Empty();

70 }

cap_inline.h (http://photon-android.googlecode.com/svn/) C++ Header · 410 lines ✨ Summary

This C++ header file defines a set of functions for interacting with various components of a system, such as the ARM CPU, VPM, LCD, and others. It provides functions to check if certain features are present, retrieve maximum clock speeds, and determine LCD resolutions. The code is likely used in a low-level system or embedded device application.

5 * agreement governing use of this software, this software is licensed to you

6 * under the terms of the GNU General Public License version 2, available at

7 * http://www.broadcom.com/licenses/GPLv2.php (the "GPL").

8 *

9 * Notwithstanding the above, under no circumstances may you combine this

TwitterAlikeExample.html (http://redis.googlecode.com/svn/trunk/) HTML · 253 lines ✨ Summary

This HTML code outputs a blog post about Redis, a popular in-memory data store. The content explains how to implement a Twitter-like clone using Redis, including setting up followers and posting messages. It also discusses horizontal scaling of the system, including hashing keys, distributing user data across servers, and handling special cases like incrementing IDs and retrieving timeline data.

17 <div class="index">

18 <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->

19 <b>TwitterAlikeExample: Contents</b><br>&nbsp;&nbsp;<a href="#A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a><br>&nbsp;&nbsp;<a href="#Key-value stores basics">Key-value stores basics</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Atomic operations">Atomic operations</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Beyond key-value stores">Beyond key-value stores</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#The set data type">The set data type</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Prerequisites">Prerequisites</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Data layout">Data layout</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Following, followers and updates">Following, followers and updates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Authentication">Authentication</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Updates">Updates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Paginating updates">Paginating updates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Following users">Following users</a><br>&nbsp;&nbsp;<a href="#Making it horizontally scalable">Making it horizontally scalable</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Hashing the key">Hashing the key</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Special keys">Special keys</a>

20 </div>

21

27

28 <div class="narrow">

29 <h1><a name="A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a></h1>In this article I'll explain the design and the implementation of a <a href="http://retwis.antirez.com" target="_blank">simple clone of Twitter</a> written using PHP and <a href="http://code.google.com/p/redis/" target="_blank">Redis</a> as only database. The programming community uses to look at key-value stores like special databases that can't be used as drop in replacement for a relational database for the development of web applications. This article will try to prove the contrary.<br/><br/>Our Twitter clone, <a href="http://retwis.antirez.com" target="_blank">called Retwis</a>, is structurally simple, has very good performances, and can be distributed among N web servers and M Redis servers with very little efforts. You can find the source code <a href="http://code.google.com/p/redis/downloads/list" target="_blank">here</a>.<br/><br/>We use PHP for the example since it can be read by everybody. The same (or... much better) results can be obtained using Ruby, Python, Erlang, and so on.

30 <h1><a name="Key-value stores basics">Key-value stores basics</a></h1>

31 The essence of a key-value store is the ability to store some data, called <i>value</i>, inside a key. This data can later be retrieved only if we know the exact key used to store it. There is no way to search something by value. So for example I can use the command SET to store the value <b>bar</b> at key <b>foo</b>:<br/><br/><pre class="codeblock python" name="code">

79 </pre>Ok I think we are ready to start coding!

80 <h2><a name="Prerequisites">Prerequisites</a></h2>

81 If you didn't download it already please <a href="http://code.google.com/p/redis/wiki/README" target="_blank">grab the source code of Retwis</a>. It's a simple tar.gz file with a few of .php files inside. The implementation is very simple. You will find the PHP library client inside (redis.php) that is used to talk with the Redis server from PHP. This library was written by <a href="http://qix.it" target="_blank">Ludovico Magnocavallo</a> and you are free to reuse this in your own projects, but for updated version of the library please download the Redis distribution.<br/><br/>Another thing you probably want is a working Redis server. Just get the source, compile with make, and run with ./redis-server and you are done. No configuration is required at all in order to play with it or to run Retwis in your computer.

82 <h2><a name="Data layout">Data layout</a></h2>

83 Working with a relational database this is the stage were the database layout should be produced in form of tables, indexes, and so on. We don't have tables, so what should be designed? We need to identify what keys are needed to represent our objects and what kind of values this keys need to hold.<br/><br/>Let's start from Users. We need to represent this users of course, with the username, userid, password, followers and following users, and so on. The first question is, what should identify an user inside our system? The username can be a good idea since it is unique, but it is also too big, and we want to stay low on memory. So like if our DB was a relational one we can associate an unique ID to every user. Every other reference to this user will be done by id. That's very simple to do, because we have our atomic INCR operation! When we create a new user we can do something like this, assuming the user is callled &quot;antirez&quot;:<br/><br/><pre class="codeblock python python python python python python python python python python python python" name="code">