100+ results for 'php ord'
Not the results you expected?
Entry.php (https://bitbucket.org/cesarmedrano/cesarmedrano.git) PHP · 630 lines
1 <?php
3 /**
13 * limitations under the License.
14 *
15 * PHP version 5
16 *
17 * @category Microsoft
18 * @package WindowsAzure\Common\Internal\Atom
19 * @author Azure PHP SDK <azurephpsdk@microsoft.com>
20 * @copyright 2012 Microsoft Corporation
21 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
33 * @category Microsoft
34 * @package WindowsAzure\Common\Internal\Atom
35 * @author Azure PHP SDK <azurephpsdk@microsoft.com>
36 * @copyright 2012 Microsoft Corporation
37 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
Advertiser.php (https://bitbucket.org/blackriver/openx.git) PHP · 371 lines
1 <?php
3 /*
35 // Required classes
36 require_once MAX_PATH . '/lib/OA/Dal/Statistics.php';
38 /**
110 * @param bool $localTZ Should stats be using the manager TZ or UTC?
111 *
112 * @return RecordSet
113 * <ul>
114 * <li><b>campaignID integer</b> The ID of the campaign
156 ";
158 return DBC::NewRecordSet($query);
159 }
FormErrors.php (https://github.com/bruisedlee/zf2.git) PHP · 466 lines
InstallSchema.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 407 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
18 /**
19 * {@inheritdoc}
20 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
21 */
22 public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
158 'Widget parameters'
159 )->addColumn(
160 'sort_order',
161 \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
162 null,
163 ['unsigned' => true, 'nullable' => false, 'default' => '0'],
164 'Sort order'
165 )->addForeignKey(
166 $installer->getFkName('widget_instance', 'theme_id', 'theme', 'theme_id'),
modules-defaults.php (https://gitlab.com/Magi1053/Extra) PHP · 250 lines
1 <?php
2 // Prevent file from being loaded directly
3 if ( ! defined( 'ABSPATH' ) ) {
57 'et_pb_posts-remove_drop_shadow' => 'off',
58 'et_pb_posts-border_radius' => '3px',
60 // Tabbed Posts
100 'et_pb_tabbed_posts-remove_drop_shadow' => 'off',
101 'et_pb_tabbed_posts-border_radius' => '3px',
103 // Posts Carousel
132 'et_pb_posts_carousel-remove_drop_shadow' => 'off',
133 'et_pb_posts_carousel-border_radius' => '3px',
135 // Featured Posts Slider
length_class.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 412 lines
33 if (isset($this->request->get['order'])) {
34 $url .= '&order=' . $this->request->get['order'];
35 }
138 if (isset($this->request->get['order'])) {
139 $url .= '&order=' . $this->request->get['order'];
140 }
255 $this->data['sort'] = $sort;
256 $this->data['order'] = $order;
258 $this->template = 'localisation/length_class_list.tpl';
301 if (isset($this->request->get['order'])) {
302 $url .= '&order=' . $this->request->get['order'];
303 }
Location.js (https://github.com/stephaneerard/qooxdoo.git) JavaScript · 406 lines
42 this.__top = this.__bodyStyles.top;
43 this.__position = this.__bodyStyles.position;
44 this.__border = this.__bodyStyles.border;
45 this.__padding = this.__bodyStyles.padding;
61 this.__bodyStyles.left = this.__left;
62 this.__bodyStyles.position = this.__position;
63 this.__bodyStyles.border = this.__border;
64 this.__bodyStyles.padding = this.__padding;
215 {
216 document.body.innerHTML =
217 '<div id="div1" style="position: absolute; top: 200px; left: 10px; margin: 5px; border: 2px solid #000; padding: 3px; width: 200px; height: 200px;">' +
218 '<div id="div2" style="position: absolute; top: -100px; left: -10px; margin: 5px; border: 2px solid #000; padding: 3px; width: 150px; height: 150px;">' +
362 testDivLocationMode : function()
363 {
364 document.body.innerHTML = '<div id="div" style="margin: 5px; padding: 10px; border: 3px solid green;"></div>';
366 var div = document.getElementById("div");
AssertionsTest.class.php (https://github.com/treuter/xp-framework.git) PHP · 617 lines
1 <?php
2 /* This class is part of the XP framework
3 *
158 /**
159 * Test hash order is not relevant
160 *
161 */
162 #[@test]
163 public function hashesOrderNotRelevant() {
164 $hash= array('&' => '&', '"' => '"');
165 $this->assertEquals($hash, array_reverse($hash, TRUE), xp::stringOf($hash));
os2.javainstall.html
(https://jedit.svn.sourceforge.net/svnroot/jedit)
HTML · 31 lines
✨ Summary
This HTML code outputs a text explaining how to install and run jEdit on OS/2, including installation commands and instructions for starting the application. It also provides information about running the installer in text-only mode. The output is formatted with paragraphs and pre tags to display code snippets and file paths.
This HTML code outputs a text explaining how to install and run jEdit on OS/2, including installation commands and instructions for starting the application. It also provides information about running the installer in text-only mode. The output is formatted with paragraphs and pre tags to display code snippets and file paths.
1 <!-- begin os2.javainstall.text -->
3 <!-- for jEdit: :mode=php:indentSize=2:tabSize=2:noTabs=true: -->
5 <p>To find out which Java virtual machine is best for running jEdit on OS/2,
6 see the <a href="index.php?page=compatibility">compatibility</a> page.</p>
8 <p>To install jEdit, open a command prompt and
class-cp-user-relationships.php (https://gitlab.com/dev73/clusterpress) PHP · 543 lines
373 * @param int|false $offset Specify the offset or false to get any.
374 * @param int|false $number Specify the number to limit results or false to get any.
375 * @param bool $desc Order ASC by ID if false. Order DESC by ID otherwise.
376 * @return array List of values
377 */
406 if ( $desc ) {
407 $sql['order'] = 'ORDER BY id DESC';
408 }
478 $sql['select'] = sprintf( 'SELECT DISTINCT %s, count( %s ) as count FROM %s', esc_sql( $group_by ), esc_sql( $column ), $this->table );
479 $sql['groupby'] = sprintf( 'GROUP BY %s', esc_sql( $group_by ) );
480 $sql['orderby'] = 'ORDER BY count DESC';
482 return $wpdb->get_results( join( ' ', $sql ), OBJECT_K );
sitemailer_.php (https://gitlab.com/nvtdn2006/azora) PHP · 384 lines
171 $this->msgBody .= "\r\n--PHP-alt-" . $this->randomHash . "--";*/
172 $this->msgBody = wordwrap($this->msgBody, $this->wordwrap);
173 }
342 $this->msgBody .= "--PHP-alt-" . $this->randomHash . "\r\n";*/
343 $this->msgBody = wordwrap($this->msgBody, $this->wordwrap);
344 }
361 $this->msgBody .= "--PHP-alt-" . $this->randomHash . "\r\n";*/
362 $this->msgBody = wordwrap($this->msgBody, $this->wordwrap);
363 }
380 $this->msgBody .= "--PHP-alt-" . $this->randomHash . "\r\n";*/
381 $this->msgBody = wordwrap($this->msgBody, $this->wordwrap);
382 }
383 }
ast_tree_output.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 550 lines
TargetCpaSimulationPoint.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 488 lines
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: google/ads/googleads/v9/common/simulation.proto
17 {
18 /**
19 * Projected required daily budget that the advertiser must set in order to
20 * receive the estimated traffic, in micros of advertiser currency.
21 *
81 *
82 * @type int|string $required_budget_amount_micros
83 * Projected required daily budget that the advertiser must set in order to
84 * receive the estimated traffic, in micros of advertiser currency.
85 * @type float $biddable_conversions
115 /**
116 * Projected required daily budget that the advertiser must set in order to
117 * receive the estimated traffic, in micros of advertiser currency.
118 *
zone.php (https://bitbucket.org/sandeepbhaskar/inspiredliving.git) PHP · 441 lines
33 if (isset($this->request->get['order'])) {
34 $url .= '&order=' . $this->request->get['order'];
35 }
138 if (isset($this->request->get['order'])) {
139 $url .= '&order=' . $this->request->get['order'];
140 }
255 $this->data['sort'] = $sort;
256 $this->data['order'] = $order;
258 $this->template = 'localisation/zone_list.tpl';
299 if (isset($this->request->get['order'])) {
300 $url .= '&order=' . $this->request->get['order'];
301 }
TaggableBehavior.php (https://github.com/mmonguilod/sfPropel15TaggableBehaviorPlugin.git) PHP · 304 lines
10 protected $parameters = array(
11 'tagging_table' => '%TABLE%_tagging',
12 'tagging_table_phpname' => '%PHPNAME%Tagging',
13 'tag_table' => 'taggable_tag',
14 'tag_table_phpname' => 'Tag',
91 $this->taggingTable = $database->addTable(array(
92 'name' => $taggingTableName,
93 'phpName' => $this->replaceTokens($this->parameters['tagging_table_phpname']),
94 'package' => $table->getPackage(),
95 'schema' => $table->getSchema(),
297 return strtr($string, array(
298 '%TABLE%' => $table->getName(),
299 '%PHPNAME%' => $table->getPhpName(),
300 ));
301 }
errors.php (https://github.com/greevex/mzz-framework-blank-application.git) PHP · 288 lines
1 <?php
2 /**
3 * base include file for SimpleTest
4 * @package SimpleTest
5 * @subpackage UnitTester
6 * @version $Id: errors.php 2460 2008-04-08 21:03:22Z mz $
7 */
9 /**
10 * @ignore - PHP5 compatibility fix.
11 */
12 if (! defined('E_STRICT')) {
17 * Includes SimpleTest files.
18 */
19 require_once dirname(__FILE__) . '/invoker.php';
20 require_once dirname(__FILE__) . '/test_case.php';
PU_test_dcp_role.php (https://github.com/CircleCode/dynacase-core.git) PHP · 432 lines
1 <?php
2 /*
3 * @author Anakeen
13 */
15 require_once 'PU_testcase_dcp_commonfamily.php';
17 class TestRole extends TestCaseDcpCommonFamily
36 $u = new \User(self::$dbaccess, "");
37 $u->login = "tst_jd1";
38 $u->password_new = 'a';
39 $err = $u->add();
40 $this->assertEmpty($err, "cannot create user");
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 */
23 * @see Zend_Feed_Writer_Extension_RendererAbstract
24 */
25 // require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';
27 /**
220 protected function _setKeywords(DOMDocument $dom, DOMElement $root)
221 {
222 $keywords = $this->getDataContainer()->getItunesKeywords();
223 if (!$keywords || empty($keywords)) {
ClassRegistry.php (https://github.com/a7medkamel/cakephp.git) PHP · 341 lines
1 <?php
2 /**
3 * Class collections.
7 * PHP 5
8 *
9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
10 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
11 *
14 *
15 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
16 * @link http://cakephp.org CakePHP(tm) Project
17 * @package Cake.Utility
18 * @since CakePHP(tm) v 0.9.2
19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
20 */
VersionableBehavior.php (https://github.com/esimionato/Propel2.git) PHP · 268 lines
1 <?php
3 /**
16 /**
17 * Keeps tracks of all the modifications in an ActiveRecord object
18 *
19 * @author Francois Zaninotto
41 $peerBuilderModifier;
43 protected $tableModificationOrder = 80;
45 public function modifyDatabase()
114 $versionTable = $database->addTable(array(
115 'name' => $versionTableName,
116 'phpName' => $this->getVersionTablePhpName(),
117 'package' => $table->getPackage(),
118 'schema' => $table->getSchema(),
developer_generates_method.feature (https://gitlab.com/kimting254/wbms) Gherkin Specification · 417 lines
2 As a Developer
3 I want to automate creating methods
4 In order to avoid repetitive tasks and interruptions in development flow
6 Scenario: Generating a method
7 Given the spec file "spec/CodeGeneration/MethodExample1/MarkdownSpec.php" contains:
8 """
9 <?php
11 namespace spec\CodeGeneration\MethodExample1;
13 use PhpSpec\ObjectBehavior;
14 use Prophecy\Argument;
test.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 305 lines
36 foreach (array('new', 'onhold', 'processing', 'complete', 'closed', 'cancelled', 'void') as $orderStatus) {
37 $this->getOrder()->setOrderStatus($orderStatus);
38 foreach (array('not_authorized', 'pending', 'authorized', 'partial', 'paid') as $paymentStatus) {
39 $this->getOrder()->setPaymentStatus($paymentStatus);
225 }
227 if ($this->matchOrderStatus('order', 'closed')) {
228 $actions['reorder'] = 1;
233 }
235 if ($this->matchOrderStatus('order', 'onhold')) {
236 $actions['unhold'] = 1;
237 return $actions;
264 }
266 if ($this->matchOrderStatus('order', 'void')) {
267 unset($actions['ship'], $actions['invoice'], $actions['ship'], $actions['hold']);
268 }
class-wc-report-taxes-by-date.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 264 lines
140 'query_type' => 'get_results',
141 'filter_range' => true,
142 'order_types' => array( 'shop_order_refund' ),
143 'parent_order_status' => array( 'refunded' ),
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>
228 <?php echo ( 'month' === $this->chart_groupby ) ? date_i18n( 'F', strtotime( $date . '01' ) ) : date_i18n( get_option( 'date_format' ), strtotime( $date ) ); ?>
229 </th>
230 <td class="total_row"><?php echo $tax_row->total_orders; ?></td>
231 <td class="total_row"><?php echo wc_price( $gross ); ?></td>
Csv.php (https://github.com/sbourget/moodle.git) PHP · 404 lines
1 <?php
3 namespace PhpOffice\PhpSpreadsheet\Writer;
5 use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
6 use PhpOffice\PhpSpreadsheet\Spreadsheet;
8 class Csv extends BaseWriter
9 {
10 /**
11 * PhpSpreadsheet object.
12 *
13 * @var Spreadsheet
34 * @var string
35 */
36 private $lineEnding = PHP_EOL;
38 /**
methodsTest.php (https://github.com/istos/DrupalRooms.git) PHP · 365 lines
1 <?php
2 require_once('../geoPHP.inc');
3 require_once('PHPUnit/Autoload.php');
5 class MethodsTests extends PHPUnit_Framework_TestCase {
15 $format = $parts[1];
16 $value = file_get_contents('./input/'.$file);
17 $geometry = geoPHP::load($value, $format);
19 $methods = array(
291 function _methods_tester_with_geos($geometry) {
292 // Cannot test methods if GEOS is not intstalled
293 if (!geoPHP::geosInstalled()) return;
295 $methods = array(
Touch.js (https://github.com/stephaneerard/qooxdoo.git) JavaScript · 280 lines
10 License:
11 LGPL: http://www.gnu.org/licenses/lgpl.html
12 EPL: http://www.eclipse.org/org/documents/epl-v10.php
13 See the LICENSE file in the project's top-level directory for details.
191 /**
192 * Get the horizontal coordinate at which the event occurred relative to
193 * the origin of the screen coordinate system.
203 /**
204 * Get the vertical coordinate at which the event occurred relative to
205 * the origin of the screen coordinate system.
215 /**
216 * Get the the horizontal coordinate at which the event occurred relative
217 * to the viewport.
218 *
qrsplit.php (https://bitbucket.org/Sinfin/pawtucket.git) PHP · 311 lines
1 <?php
2 /*
3 * PHP QR Code encoder
51 return false;
53 return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9')));
54 }
82 $word = (ord($c) << 8) | ord($d);
83 if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) {
84 return QR_MODE_KANJI;
85 }
285 $p += 2;
286 } else {
287 if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) {
288 $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32);
Feed.php (https://gitlab.com/gregtyka/SiberianCMS) 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 */
23 * @see Zend_Feed_Writer_Extension_RendererAbstract
24 */
25 require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';
27 /**
220 protected function _setKeywords(DOMDocument $dom, DOMElement $root)
221 {
222 $keywords = $this->getDataContainer()->getItunesKeywords();
223 if (!$keywords || empty($keywords)) {
planet_list.tpl (https://github.com/myrtus/SuperNova.git) Smarty Template · 176 lines
43 <!-- ENDIF -->
45 <div style="position: relative; height: {$DEUTERIUM_BAR}px; width: {$FRAME_WIDTH}px; border: 0px solid blue;">
46 <div style="position: absolute; height: {$PLANET_IMG_SIZE}px; width: {$PLANET_IMG_SIZE}px; border: 0px solid yellow; left: 0px;">
47 <span style="position: absolute; left: 0px; top: 0px; width: 100%; height: 100%">
48 <!-- IF planet.IMAGE -->
49 <a href="overview.php?cp={planet.ID}&re=0"><img style="border-style: none;" src="{dpath}planeten/{planet.IMAGE}.jpg" height="100%" width="100%"></a>
50 <!-- ELSE -->
51
55 <!-- IF planet.BUILDING -->
56 <span title="{planet.BUILDING_TIP}" style="position: absolute; top: 0px; left: 0px; width: 25%; height: 25%" class="icon_alpha">
57 <a href="buildings.php?cp={planet.ID}&re=0"><img src="{D_SN_ROOT_VIRTUAL}design/images/build_building.png" height="100%" width="100%"></a>
58 </span>
59 <!-- ENDIF -->
89 <!-- IF planet.MOON_ID -->
90 <div style="position: absolute; top: 0; right: 0; width: {$MOON_IMG_SIZE}; height: {$MOON_IMG_SIZE};">
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>
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'">
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 */
51 padding: 0;
52 margin: 0;
53 border: 0;
54 overflow: auto;
55 display: none;
81 overflow: hidden;
82 z-index: 500;
83 border: 0px solid #fff;
84 }
content.php (https://github.com/livinglab/openlab.git) PHP · 204 lines
1 <?php
2 if (!defined("ABSPATH")) {
3 exit();
8 <div>
9 <div class="ucm-inner">
10 <h3 style="padding:5px 10px 15px 10px; margin:0px; text-align:right; border-bottom:1px solid #ddd; margin:0px 0px 20px auto; font-weight:normal;max-width:60%;">Addon - User and Comment Mentioning</h3>
11 <p style="border: 1px dotted #07B290; padding: 15px; font-size: 14px; text-align: center; margin: 10px; background: #EFFFF5">
102 <tr valign="top">
103 <th scope="row" colspan="2" style="border-top:3px solid #ddd;">
104 <h3 style="padding-bottom:5px; padding-top:20px; font-weight:normal; margin:0px; text-align:right;"> Comment mentioning through #comment-id</h3>
105 <strong>Message to mentioned comment author</strong>
151 </tr>
152 <tr valign="top">
153 <th scope="row" colspan="2" style="border-top:3px solid #ddd;">
154 <h3 style="padding-bottom:5px; padding-top:20px; font-weight:normal; margin:0px; text-align:right;"> User mentioning through @username</h3>
155 <strong>Message to mentioned user</strong>
orderdocument.php (https://gitlab.com/neuser/bitrix-core) PHP · 621 lines
class-wp-customize-setting.php (https://gitlab.com/Gashler/dp) PHP · 439 lines
1 <?php
2 /**
3 * Customize Setting Class.
4 *
5 * @package WordPress
6 * @subpackage Customize
7 * @since 3.4.0
376 * Results should be properly handled using another setting or callback.
377 *
378 * @package WordPress
379 * @subpackage Customize
380 * @since 3.4.0
393 * Results should be properly handled using another setting or callback.
394 *
395 * @package WordPress
396 * @subpackage Customize
397 * @since 3.4.0
admin_selectTable.php (https://github.com/loboda/cs411.git) PHP · 571 lines
244 ?>
245 <td>
246 <button type="editButton" onclick="showEdit('group', '<?php print($row['GroupName'])?>', '<?php print($row['AssnID'])?>', '0' )">Edit</button>
247 </td>
337 ?>
338 <td>
339 <button type="editButton" onclick="showEdit('memberof', '<?php print($row['GroupName']); ?>', '<?php print($row['StudentID']); ?>', '<?php print($row['AssnID']); ?>' )">Edit</button>
340 </td>
342 <td>
343 <button type="deleteButton" onclick="showDelete('memberof', '<?php print($row['GroupName']); ?>', '<?php print($row['StudentID']); ?>', '<?php print($row['AssnID']); ?>' )">Delete</button>
344 </td>
345 <?php
ExceptionHandlerAsm.asm (https://gitlab.com/envieidoc/Clover) Assembly · 445 lines
4 ; are licensed and made available under the terms and conditions of the BSD License
5 ; which accompanies this distribution. The full text of the license may be found at
6 ; http://opensource.org/licenses/bsd-license.php.
7 ;
8 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
31 .data
33 EXTRN mErrorCodeFlag:DWORD ; Error code flags for exceptions
34 EXTRN mDoFarReturnFlag:DWORD ; Do far return flag
202 lea ecx, [ebp + 6 * 4]
203 push ecx ; ESP
204 push dword ptr [ebp] ; EBP
205 push esi
206 push edi
209 mov eax, ss
210 push eax
211 movzx eax, word ptr [ebp + 4 * 4]
212 push eax
213 mov eax, ds
ResetPasswordPostTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 307 lines
166 ->willReturnMap(
167 [
168 ['password', $password],
169 ['password_confirmation', $passwordConfirmation],
233 ['password', $password],
234 ['password_confirmation', $passwordConfirmation],
235 ]
236 );
238 $this->messageManagerMock->expects($this->once())
239 ->method('addError')
240 ->with(__('New Password and Confirm New Password values didn\'t match.'))
241 ->willReturnSelf();
280 ['password', $password],
281 ['password_confirmation', $passwordConfirmation],
282 ]
283 );
VersionableBehavior.php (https://github.com/fabienpomerol/Propel2.git) PHP · 276 lines
1 <?php
3 /**
16 /**
17 * Keeps tracks of all the modifications in an ActiveRecord object
18 *
19 * @author Francois Zaninotto
43 protected $peerBuilderModifier;
45 protected $tableModificationOrder = 80;
47 public function modifyDatabase()
116 $versionTable = $database->addTable(array(
117 'name' => $versionTableName,
118 'phpName' => $this->getVersionTablePhpName(),
119 'package' => $table->getPackage(),
120 'schema' => $table->getSchema(),
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 */
23 * @see Zend_Feed_Writer_Extension_RendererAbstract
24 */
25 require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';
27 /**
220 protected function _setKeywords(DOMDocument $dom, DOMElement $root)
221 {
222 $keywords = $this->getDataContainer()->getItunesKeywords();
223 if (!$keywords || empty($keywords)) {
sfValidatorDateTest.php (https://github.com/IDCI-Consulting/WebsiteEval.git) PHP · 246 lines
LockerTest.php (https://gitlab.com/imamul68e/137619_PHP31) PHP · 284 lines
1 <?php
3 /*
5 *
6 * (c) Nils Adermann <naderman@naderman.de>
7 * Jordi Boggiano <j.boggiano@seld.be>
8 *
9 * For the full copyright and license information, please view the LICENSE
16 use Composer\IO\NullIO;
18 class LockerTest extends \PHPUnit_Framework_TestCase
19 {
20 public function testIsLocked()
GeneralItemCollection.php (https://gitlab.com/laher01/factu40) PHP · 201 lines
36 'date_of_issue' => $resource['date_of_issue'],
37 'customer_name' => $resource['customer_name'],
38 'purchase_order' => $resource['purchase_order'],
39 'customer_number' => $resource['customer_number'],
40 'brand' => $row->relation_item->brand->name,
65 $resource = self::getDocument($record);
66 }
67 $purchase_unit_price = self::getIndividualPurchaseUnitPrice($record,$resource,$purchase_item) * $record->quantity;
68 if ($record->relation_item->is_set) {
168 $data['document_type_id'] = $document->document_type->id;
169 $data['currency_type_id'] = $document->currency_type_id;
170 $data['purchase_order'] = $document->purchase_order;
172 } else if ($row->purchase) {
193 $data['document_type_id'] = 80;
194 $data['currency_type_id'] = $document->currency_type_id;
195 $data['purchase_order'] = $document->purchase_order;
196 }
NestedTreeRootTest.php (https://github.com/easybib/DoctrineExtensions.git) PHP · 337 lines
1 <?php
3 namespace Gedmo\Tree;
14 * @package Gedmo.Tree
15 * @link http://www.gediminasm.org
16 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
17 */
18 class NestedTreeRootTest extends BaseTestCaseORM
37 $took = microtime(true) - $start;
38 $minutes = intval($took / 60); $seconds = $took % 60;
39 echo sprintf("%s --> %02d:%02d", $msg, $minutes, $seconds) . PHP_EOL;
40 };
41 $repo = $this->em->getRepository(self::CATEGORY);
Feed.php (https://bitbucket.org/sauron07/friend_social.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 */
23 * @see Zend_Feed_Writer_Extension_RendererAbstract
24 */
25 //require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';
27 /**
220 protected function _setKeywords(DOMDocument $dom, DOMElement $root)
221 {
222 $keywords = $this->getDataContainer()->getItunesKeywords();
223 if (!$keywords || empty($keywords)) {
PaymentMethodManagementTest.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 332 lines
29 /** @var \Magento\Quote\Model\Quote $quote */
30 $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class);
31 $quote->load('test_order_1_with_payment', 'reserved_order_id');
32 $cartId = $quote->getId();
161 /** @var \Magento\Quote\Model\Quote $quote */
162 $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class);
163 $quote->load('test_order_1', 'reserved_order_id');
164 $cartId = $quote->getId();
230 /** @var \Magento\Quote\Model\Quote $quote */
231 $quote = $this->objectManager->create(\Magento\Quote\Model\Quote::class);
232 $quote->load('test_order_1', 'reserved_order_id');
234 $serviceInfo = [
DelegatingValidator.php (https://github.com/xbojer/gfw.git) PHP · 259 lines
pageTranslations.php (https://gitlab.com/macitsimsek/fastsubtitle) PHP · 217 lines
17 'user_settings' => 'User Settings',
18 'username' => 'Username',
19 'password' => 'Password',
20 'again_password' => 'Password Again',
27 'user_login' => 'User Login',
28 'sign_up' => 'Sign Up',
29 'forgot_password' => 'Forgot Password',
30 'change_password' => 'Change Password',
31 'logout' => 'Logout',
32 'view_profile' => 'View Profile',
33 'please_enter_your_password_informations' => 'Please Enter Your Password Informations',
34 'last_password' => 'Last Password',
35 'new_password' => 'New Password',
36 'agree_to_terms' => 'I Agree to Terms',
37 'forgot_email_message' => 'Please Enter Your Sign Up E-mail. Reset Link Will Sent Your E-mail.',
favorite-articles.php (https://gitlab.com/fcupen/PHP) PHP · 479 lines
4 <meta charset="utf-8">
5 <title><?=$pages->title?></title>
6 <?php include('style.php');?>
7 <style type="text/css">
412 </head>
413 <body>
414 <?php include('menu.php');?>
416 <!-- MENU -->
458 <div id="side_bar">
459 <div style="background-color: #000;border-top-left-radius: 18px;border-top-right-radius: 18px;">
460 <div id="title" >RELATED LINKS</div></div>
461 <!-- SIDE BAR-->
Protection.php (https://gitlab.com/hoanghung.dev/aloads) PHP · 581 lines
22 * @package PHPExcel_Worksheet
23 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version ##VERSION##, ##DATE##
33 * @package PHPExcel_Worksheet
34 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
35 */
36 class PHPExcel_Worksheet_Protection
333 *
334 * @param boolean $pValue
335 * @return PHPExcel_Worksheet_Protection
336 */
337 public function setInsertColumns($pValue = false)
559 {
560 if (!$pAlreadyHashed) {
561 $pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue);
562 }
563 $this->password = $pValue;
Model.class.php (https://github.com/dzx0315/509.git) PHP · 295 lines
1 <?php
2 // +----------------------------------------------------------------------
3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4 // +----------------------------------------------------------------------
5 // | Copyright (c) 2010 http://thinkphp.cn All rights reserved.
6 // +----------------------------------------------------------------------
7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
13 /**
14 +------------------------------------------------------------------------------
15 * ThinkPHP 简洁模式Model模型类
16 * 只支持原生SQL操作 支持多数据库连接和切换
17 +------------------------------------------------------------------------------
DeleteComment.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 355 lines
1 <?php
3 /**
4 * Admin ajax functions to be tested
5 */
6 require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
8 /**
9 * Testing ajax comment functionality
10 *
11 * @package WordPress
12 * @subpackage UnitTests
13 * @since 3.4.0
70 $_POST['_per_page'] = 100;
71 $_POST['_page'] = 1;
72 $_POST['_url'] = admin_url( 'edit-comments.php' );
74 // Make the request
COLLADASaxFWLSource.h (https://bitbucket.org/ZhangJingGuo/opencollada.git) C Header · 291 lines
6 Licensed under the MIT Open Source License,
7 for details please see LICENSE file or the website
8 http://www.opensource.org/licenses/mit-license.php
9 */
94 * Flags, if the source element is already loaded into the framework. A source element
95 * can be referenced from the same input element in multiple primitive elements or from
96 * different input elements (NORMALS, COLOR, TEXCOORD, ...). It should be loaded only once
97 * from every input element.
98 */
127 * Returns true, if the input element was not already in the list and was successfully added.
128 * A source element can be referenced from the same input element in multiple primitive
129 * elements or from different input elements (NORMALS, COLOR, TEXCOORD, ...). It should be
130 * loaded only once from every input element.
131 */
ContentURI.java (https://github.com/jehc/MondocosmOS.git) Java · 332 lines
10 * License, Version 2 (the "License"); you may not use this file
11 * except in compliance with the License. A copy of the License is
12 * available at http://www.opensource.org/licenses/gpl-license.php.
13 *
14 * Sun designates this particular file as subject to the "Classpath"
27 * repository.
28 *
29 * @author Jordan Slott <jslott@dev.java.net>
30 */
31 @ExperimentalAPI
DictionaryLoader.php (https://github.com/gmimano/newd.git) PHP · 265 lines
1 <?php
2 /**
3 * Zend Framework
56 // $tiVersion = $tiiFile->readInt();
57 $tiVersion = ord($data[0]) << 24 | ord($data[1]) << 16 | ord($data[2]) << 8 | ord($data[3]);
58 $pos += 4;
59 if ($tiVersion != (int)0xFFFFFFFE /* pre-2.1 format */ &&
60 $tiVersion != (int)0xFFFFFFFD /* 2.1+ format */) {
61 require_once 'Zend/Search/Lucene/Exception.php';
62 throw new Zend_Search_Lucene_Exception('Wrong TermInfoIndexFile file format');
63 }
95 // $skipInterval = $tiiFile->readInt();
96 $skipInterval = ord($data[$pos]) << 24 | ord($data[$pos+1]) << 16 | ord($data[$pos+2]) << 8 | ord($data[$pos+3]);
97 $pos += 4;
98 if ($indexTermCount < 1) {
PlatformJobQueue.php (https://github.com/Exercise/zf2.git) PHP · 318 lines
1 <?php
2 /**
3 * Zend Framework
67 if (! isset($this->_options['daemonOptions'])) {
68 throw new Queue\Exception('Job Queue host and password should be provided');
69 }
74 throw new Queue\Exception('Platform Job Queue host should be provided');
75 }
76 if (!array_key_exists('password', $options)) {
77 throw new Queue\Exception('Platform Job Queue password should be provided');
83 throw new Queue\Exception('Platform Job Queue connection failed');
84 }
85 if (!$this->_zendQueue->login($options['password'])) {
86 throw new Queue\Exception('Job Queue login failed');
87 }
MassCancelTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 292 lines
180 ->disableOriginalConstructor()
181 ->getMock();
182 $orders = [$order1, $order2];
183 $countOrders = count($orders);
225 public function testExcludedCannotCancelOrders()
226 {
227 $order1 = $this->getMockBuilder('Magento\Sales\Model\Order')
228 ->disableOriginalConstructor()
229 ->getMock();
232 ->getMock();
234 $orders = [$order1, $order2];
235 $countOrders = count($orders);
237 $this->orderCollectionMock->expects($this->any())
238 ->method('getItems')
239 ->willReturn([$order1, $order2]);
241 $order1->expects($this->once())
MultishippingTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 271 lines
62 $this->checkoutSessionMock = $this->getMock('\Magento\Checkout\Model\Session', [], [], '', false);
63 $this->customerSessionMock = $this->getMock('\Magento\Customer\Model\Session', [], [], '', false);
64 $orderFactoryMock = $this->getMock('\Magento\Sales\Model\OrderFactory', [], [], '', false);
65 $eventManagerMock = $this->getMock('\Magento\Framework\Event\ManagerInterface', [], [], '', false);
66 $scopeConfigMock = $this->getMock('\Magento\Framework\App\Config\ScopeConfigInterface', [], [], '', false);
69 $toOrderMock = $this->getMock('\Magento\Quote\Model\Quote\Address\ToOrder', [], [], '', false);
70 $toOrderAddressMock = $this->getMock('\Magento\Quote\Model\Quote\Address\ToOrderAddress', [], [], '', false);
71 $toOrderPaymentMock = $this->getMock('\Magento\Quote\Model\Quote\Payment\ToOrderPayment', [], [], '', false);
72 $toOrderItemMock = $this->getMock('\Magento\Quote\Model\Quote\Item\ToOrderItem', [], [], '', false);
73 $storeManagerMock = $this->getMock('\Magento\Store\Model\StoreManagerInterface', [], [], '', false);
74 $paymentSpecMock = $this->getMock('\Magento\Payment\Model\Method\SpecificationInterface', [], [], '', false);
75 $this->helperMock = $this->getMock('\Magento\Multishipping\Helper\Data', [], [], '', false);
76 $orderSenderMock = $this->getMock('\Magento\Sales\Model\Order\Email\Sender\OrderSender', [], [], '', false);
77 $priceMock = $this->getMock('\Magento\Framework\Pricing\PriceCurrencyInterface', [], [], '', false);
78 $quoteRepositoryMock = $this->getMock('\Magento\Quote\Api\CartRepositoryInterface');
SetTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 295 lines
1 <?php
2 /**
3 *
10 use Magento\Eav\Model\ResourceModel\Entity\Attribute\Set;
12 class SetTest extends \PHPUnit_Framework_TestCase
13 {
14 /**
15 * @var \PHPUnit_Framework_MockObject_MockObject|Set
16 */
17 protected $model;
19 /**
20 * @var \PHPUnit_Framework_MockObject_MockObject
21 */
22 protected $eavConfigMock;
FilesystemTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 240 lines
1 <?php
3 /*
5 *
6 * (c) Nils Adermann <naderman@naderman.de>
7 * Jordi Boggiano <j.boggiano@seld.be>
8 *
9 * For the full copyright and license information, please view the LICENSE
119 * @group GH-1339
120 */
121 public function testRemoveDirectoryPhp()
122 {
123 $tmp = sys_get_temp_dir();
127 $fs = new Filesystem;
128 $this->assertTrue($fs->removeDirectoryPhp($tmp . "/composer_testdir"));
129 $this->assertFalse(file_exists($tmp . "/composer_testdir/level1/level2/hello.txt"));
130 }
MappingInfo.php (https://gitlab.com/cserobiul/BITM-LabMs-New) PHP · 517 lines
1 <?php
3 namespace Apps\MappingInfo;
16 public function __construct() {
17 if (session_status() == PHP_SESSION_NONE) {
18 session_start();
19 }
119 $qry = "SELECT * FROM course_trainer_lab_mapping
120 WHERE start_date <= :sd && ending_date >= :sd
121 ORDER BY start_time ASC";
122 $q = $this->conn->prepare($qry);
123 $q->execute(array(
315 public function getLabList() {
316 try {
317 $qry = "SELECT * FROM labinfo ORDER BY lab_no ASC";
318 $q = $this->conn->query($qry);
319 $rows = $q->rowCount();
mail.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 406 lines
1 <?php
2 class Mail {
3 protected $to;
11 public $hostname;
12 public $username;
13 public $password;
14 public $port = 25;
15 public $timeout = 5;
94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
95 $header .= 'Return-Path: ' . $this->from . $this->newline;
96 $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;
97 //$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
98 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
157 exit();
158 } else {
159 if (substr(PHP_OS, 0, 3) != 'WIN') {
160 socket_set_timeout($handle, $this->timeout, 0);
161 }
ezkeywordtype.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 291 lines
186 foreach ( $res as $record )
187 $keywordIDs[] = $record['keyword_id'];
188 $keywordIDString = implode( ', ', $keywordIDs );
192 FROM ezkeyword, ezkeyword_attribute_link
193 WHERE ezkeyword.id = ezkeyword_attribute_link.keyword_id
194 AND ezkeyword.id IN ($keywordIDString)
198 foreach ( $res as $record )
199 $unusedKeywordIDs[] = $record['keyword_id'];
200 $unusedKeywordIDString = implode( ', ', $unusedKeywordIDs );
265 $keyword->fetch( $objectAttribute );
266 $keyWordString = $keyword->keywordString();
267 $dom = $node->ownerDocument;
268 $keywordStringNode = $dom->createElement( 'keyword-string' );
278 $keyword = new eZKeyword();
279 $keyword->initializeKeyword( $keyWordString );
280 $objectAttribute->setContent( $keyword );
sale.php (https://bitbucket.org/deringer/opencart.git) PHP · 309 lines
3 public function getOrders($data = array()) {
4 $sql = "SELECT MIN(tmp.date_added) AS date_start, MAX(tmp.date_added) AS date_end, COUNT(tmp.order_id) AS `orders`, SUM(tmp.products) AS products, SUM(tmp.tax) AS tax, SUM(tmp.total) AS total FROM (SELECT o.order_id, (SELECT SUM(op.quantity) FROM `" . DB_PREFIX . "order_product` op WHERE op.order_id = o.order_id GROUP BY op.order_id) AS products, (SELECT SUM(ot.value) FROM `" . DB_PREFIX . "order_total` ot WHERE ot.order_id = o.order_id AND ot.code = 'tax' GROUP BY ot.order_id) AS tax, o.total, o.date_added FROM `" . DB_PREFIX . "order` o";
6 if (!empty($data['filter_order_status_id'])) {
105 public function getTaxes($data = array()) {
106 $sql = "SELECT MIN(o.date_added) AS date_start, MAX(o.date_added) AS date_end, ot.title, SUM(ot.value) AS total, COUNT(o.order_id) AS `orders` FROM `" . DB_PREFIX . "order_total` ot LEFT JOIN `" . DB_PREFIX . "order` o ON (ot.order_id = o.order_id) WHERE ot.code = 'tax'";
108 if (!empty($data['filter_order_status_id'])) {
207 public function getShipping($data = array()) {
208 $sql = "SELECT MIN(o.date_added) AS date_start, MAX(o.date_added) AS date_end, ot.title, SUM(ot.value) AS total, COUNT(o.order_id) AS `orders` FROM `" . DB_PREFIX . "order_total` ot LEFT JOIN `" . DB_PREFIX . "order` o ON (ot.order_id = o.order_id) WHERE ot.code = 'shipping'";
210 if (!empty($data['filter_order_status_id'])) {
263 public function getTotalShipping($data = array()) {
264 $sql = "SELECT COUNT(*) AS total FROM (SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order_total` ot LEFT JOIN `" . DB_PREFIX . "order` o ON (ot.order_id = o.order_id) WHERE ot.code = 'shipping'";
266 if (!empty($data['filter_order_status_id'])) {
Base.php (https://github.com/ewandor/horde.git) PHP · 305 lines
10 * @license http://www.horde.org/licenses/lgpl21 LGPL
11 * @link http://www.horde.org/libraries/Horde_Kolab_Format
12 */
15 * Utilities for the various XML handlers.
16 *
17 * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
18 *
19 * See the enclosed file COPYING for license information (LGPL). If you did not
28 * @license http://www.horde.org/licenses/lgpl21 LGPL
29 * @link http://www.horde.org/libraries/Horde_Kolab_Format
30 */
31 class Horde_Kolab_Format_Xml_Type_Base
88 */
89 public function load($name, &$attributes, $parent_node,
90 Horde_Kolab_Format_Xml_Helper $helper,
91 $params = array())
92 {
collator_test.php (https://github.com/vadimonus/moodle.git) PHP · 333 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
19 *
20 * @package core
21 * @category phpunit
22 * @copyright 2011 Sam Hemelryk
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
30 *
31 * @package core
32 * @category phpunit
33 * @copyright 2011 Sam Hemelryk
34 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
58 $this->error = 'Collation aware sorting not supported';
59 } else {
60 $this->error = 'Collation aware sorting not supported, PHP extension "intl" is not available.';
61 }
62 parent::setUp();
submissionsoap.class.php (https://github.com/danmarsden/moodle-plagiarism_turnitin.git) PHP · 236 lines
34 $tiiSubmission->setSubmissionId( $soap->resultRecord->sourcedGUID->sourcedId );
35 $tiiSubmission->setTitle( $soap->resultRecord->result->resultValue->label );
36 $tiiSubmission->setAssignmentId( $soap->resultRecord->result->lineItemSourcedId );
37 $tiiSubmission->setAuthorUserId( $soap->resultRecord->result->personSourcedId );
38 $tiiSubmission->setDate( $soap->resultRecord->result->date );
39 $tiiSubmission->setOverallSimilarity( $soap->resultRecord->result->resultScore->textString );
40 $soap->resultRecord->result->extension->extensionField = is_array( $soap->resultRecord->result->extension->extensionField )
41 ? $soap->resultRecord->result->extension->extensionField
64 if ( isset( $soap->resultRecordSet->resultRecord ) ) {
65 if ( !is_array( $soap->resultRecordSet->resultRecord ) ) $soap->resultRecordSet->resultRecord = array( $soap->resultRecordSet->resultRecord );
66 foreach ( $soap->resultRecordSet->resultRecord as $submission ) {
178 $request['resultRecord']['sourcedGUID']['sourcedId'] = '';
179 $request['resultRecord']['result']['personSourcedId'] = $submission->getAuthorUserId();
180 $request['resultRecord']['result']['lineItemSourcedId'] = $submission->getAssignmentId();
GifCreator.php (https://gitlab.com/billyprice1/mc-skintools) PHP · 349 lines
1 <?php
3 namespace GifCreator;
8 * @link https://github.com/Sybio/GifCreator
9 * @author Sybio (Clément Guillemain / @Sybio01)
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
11 * @copyright Clément Guillemain
12 * @modified by Max Korlaar
131 }
133 for ($j = (13 + 3 * (2 << (ord($this->frameSources[$i]{10}) & 0x07))), $k = true; $k; $j++) {
135 switch ($this->frameSources[$i]{$j}) {
185 $cmap = 0;
187 if (ord($this->frameSources[0]{10}) & 0x80) {
189 $cmap = 3 * (2 << (ord($this->frameSources[0]{10}) & 0x07));
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 */
23 * @see Zend_Feed_Writer_Extension_RendererAbstract
24 */
25 // require_once 'Zend/Feed/Writer/Extension/RendererAbstract.php';
27 /**
220 protected function _setKeywords(DOMDocument $dom, DOMElement $root)
221 {
222 $keywords = $this->getDataContainer()->getItunesKeywords();
223 if (!$keywords || empty($keywords)) {
class.swfshape.html (https://bitbucket.org/thncr/manuals.git) HTML · 251 lines
10 <div class="next" style="text-align: right; float: right;"><a href="swfshape.addfill.html">SWFShape::addFill</a></div>
11 <div class="up"><a href="book.ming.html">Ming</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
13 </div><hr /><div id="class.swfshape" class="reference">
14 <h1 class="title">The SWFShape class</h1>
85 ( <span class="methodparam"><span class="type">float</span> <code class="parameter">$controldx</code></span>
86 , <span class="methodparam"><span class="type">float</span> <code class="parameter">$controldy</code></span>
87 , <span class="methodparam"><span class="type">float</span> <code class="parameter">$anchordx</code></span>
88 , <span class="methodparam"><span class="type">float</span> <code class="parameter">$anchordy</code></span>
248 <div class="next" style="text-align: right; float: right;"><a href="swfshape.addfill.html">SWFShape::addFill</a></div>
249 <div class="up"><a href="book.ming.html">Ming</a></div>
250 <div class="home"><a href="index.html">PHP Manual</a></div>
251 </div></body></html>
UserController.php (https://gitlab.com/RonLab1987/YupePlusClear) PHP · 262 lines
1 <?php
2 namespace application\modules\social\controllers;
163 }
165 $password = Yii::app()->userManager->hasher->generateRandomPassword();
167 $form->setAttributes(
168 [
169 'password' => $password,
170 'cPassword' => $password,
251 } else {
253 $form->addError('hash', Yii::t('SocialModule.social', 'Wrong email or password!'));
255 Yii::app()->authenticationManager->setBadLoginCount(Yii::app()->getUser(), $badLoginCount + 1);
file_handling_over_ftp.php (https://github.com/ameximes/akelos.git) PHP · 291 lines
1 <?php
3 //
4 // In order to pass these tests you'll neet to have an ftp server configured at ftptesting.akelos.org
6 if(!defined('AK_UPLOAD_FILES_USING_FTP')){
7 if(!function_exists('ftp_connect')){
8 echo "PHP is not compiled with FTP support\n";
9 return;
10 }
20 }
22 require_once(dirname(__FILE__).'/../config.php');
24 class FileHandlingOverFtp_TestCase extends ActiveSupportUnitTest
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="<?php*" />
352 <KEYWORDS>
353 <KEYWORD1>true</KEYWORD1>
354 <KEYWORD1>false</KEYWORD1>
375 <KEYWORD4>domattribute</KEYWORD4>
376 <KEYWORD4>domcharacterdata</KEYWORD4>
377 <KEYWORD4>domdocument</KEYWORD4>
380 <KEYWORD4>domimplementation</KEYWORD4>
381 <KEYWORD4>domnamednodemap</KEYWORD4>
382 <KEYWORD4>domnode</KEYWORD4>
383 <KEYWORD4>domnodelist</KEYWORD4>
384 <KEYWORD4>domprocessinginstruction</KEYWORD4>
385 <KEYWORD4>domtext</KEYWORD4>
Thrift.php
(git://github.com/apache/thrift.git)
PHP · 821 lines
✨ Summary
This PHP code defines a Thrift protocol implementation for a TApplicationException class, which is an exception type used to handle application-level errors. It provides methods for reading and writing the exception’s message and code fields to a Thrift output stream. The code also includes Thrift-related classes and constants, setting up the global THRIFT_ROOT environment variable.
This PHP code defines a Thrift protocol implementation for a TApplicationException class, which is an exception type used to handle application-level errors. It provides methods for reading and writing the exception’s message and code fields to a Thrift output stream. The code also includes Thrift-related classes and constants, setting up the global THRIFT_ROOT environment variable.
1 <?php
2 /*
3 * Licensed to the Apache Software Foundation (ASF) under one
40 const MAP = 13;
41 const SET = 14;
42 const LST = 15; // N.B. cannot use LIST keyword in PHP!
43 const UTF8 = 16;
44 const UTF16 = 17;
60 * because we need to save CPU cycles and this is not yet in an extension.
61 * Ideally we'd multiply-inherit TException from both Exception and Base, but
62 * that's not possible in PHP and there are no modules either, so for now we
63 * apologetically take a trip to HackTown.
64 *
417 * cut back on the size of the generated code which is turning out to have a
418 * nontrivial cost just to load thanks to the wondrously abysmal implementation
419 * of PHP. Note that code is intentionally duplicated in here to avoid making
420 * function calls for every field or member of a container..
421 */
yaml.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 84 lines
28 <SEQ_REGEXP TYPE="KEYWORD1" DELEGATE="VALUES">[^:\[\]{},'"#]+:( |$)</SEQ_REGEXP>
29 <!-- Useful for Symfony configuration files -->
30 <SPAN TYPE="MARKUP" DELEGATE="php::PHP">
31 <BEGIN><?php</BEGIN>
68 <KEYWORDS>
69 <KEYWORD3>~</KEYWORD3>
70 <KEYWORD3>false</KEYWORD3>
72 <KEYWORD3>No</KEYWORD3>
73 <KEYWORD3>off</KEYWORD3>
74 <KEYWORD3>Y</KEYWORD3>
75 <KEYWORD3>true</KEYWORD3>
76 <KEYWORD3>Yes</KEYWORD3>
77 <KEYWORD3>ON</KEYWORD3>
78 </KEYWORDS>
IfStatement.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 184 lines
✨ Summary
This Java class represents an if statement in a PHP program, including its condition, statements to execute, and optional elseifs and else clauses. It provides methods for converting the if statement to a string, getting variables used by the statement, analyzing code, and retrieving expressions at specific locations. The class extends another Statement
class and uses other classes like Expression
, ElseIf
, and VariableUsage
.
This Java class represents an if statement in a PHP program, including its condition, statements to execute, and optional elseifs and else clauses. It provides methods for converting the if statement to a string, getting variables used by the statement, analyzing code, and retrieving expressions at specific locations. The class extends another Statement
class and uses other classes like Expression
, ElseIf
, and VariableUsage
.
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.
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;
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;
upload.php
(http://rorptm.googlecode.com/svn/trunk/)
PHP · 107 lines
✨ Summary
This PHP script is a file uploader for FCKeditor, a text editor for internet. It checks if the uploaded file meets certain criteria (e.g., valid type, allowed extension) and renames the file if another one with the same name already exists in the target directory. If successful, it sends a JavaScript notification to the parent window with the upload results.
This PHP script is a file uploader for FCKeditor, a text editor for internet. It checks if the uploaded file meets certain criteria (e.g., valid type, allowed extension) and renames the file if another one with the same name already exists in the target directory. If successful, it sends a JavaScript notification to the parent window with the upload results.
1 <?php
2 /*
3 * FCKeditor - The text editor for internet
5 *
6 * Licensed under the terms of the GNU Lesser General Public License:
7 * http://www.opensource.org/licenses/lgpl-license.php
8 *
9 * For further information visit:
12 * "Support Open Source software. What about a donation today?"
13 *
14 * File Name: upload.php
15 * This is the "File Uploader" for PHP.
33 // Check if this uploader has been enabled.
34 if ( !$Config['Enabled'] )
35 SendResults( '1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/upload/php/config.php" file' ) ;
37 // Check if the file has been correctly uploaded.
README (http://enginey.googlecode.com/svn/trunk/) Unknown · 42 lines
1 Using Amazon S3 with Dojo has the following prerequisites:
2 * You must be signed up to use Amazon S3. You can sign up for Amazon S3 at http://aws.amazon.com/s3.
3 * Use the provided proxy (/dojox/rpc/s3/proxy.php) with PHP 5.
4 * proxy.php requires the following modules:
9 To use S3 from Dojo, you need a proxy. You can use the provided proxy example file by renaming
10 proxy.example-php to proxy.php and then you must enter your Amazon access key and secret access key
11 into the proxy.php file on line 3 and 4:
20 var s3Buckets = new dojox.rpc.Service({
21 target:"http://s3.amazonaws.com/",
22 proxyUrl:"../s3/proxy.php", // the path to the proxy
23 transport:"REST",
24 envelope:"PROXIED-PATH",
htaccess.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 564 lines
44 <KEYWORD1>Allow</KEYWORD1>
45 <KEYWORD1>Anonymous</KEYWORD1>
46 <KEYWORD1>Anonymous_Authoritative</KEYWORD1>
65 <KEYWORD1>AuthLDAPBindDN</KEYWORD1>
66 <KEYWORD1>AuthLDAPBindPassword</KEYWORD1>
67 <KEYWORD1>AuthLDAPCompareDNOnServer</KEYWORD1>
73 <KEYWORD1>AuthLDAPRemoteUserIsDN</KEYWORD1>
74 <KEYWORD1>AuthLDAPUrl</KEYWORD1>
75 <KEYWORD1>AuthName</KEYWORD1>
98 <KEYWORD1>EnableSendfile</KEYWORD1>
99 <KEYWORD1>ErrorDocument</KEYWORD1>
100 <KEYWORD1>Example</KEYWORD1>
113 <KEYWORD1>IndexOptions</KEYWORD1>
114 <KEYWORD1>IndexOrderDefault</KEYWORD1>
115 <KEYWORD1>ISAPIAppendLogToErrors</KEYWORD1>
AndCondition.php (git://github.com/alexgorbatchev/SyntaxHighlighter.git) text · 0 lines
frame_9.svg (https://bitbucket.org/atchariya/nokia.git) SVG · 3078 lines
105 cd7plK/3PXdF+HEX/lky5nnif+4DX+sDazEOvCqdHJitNqFrnCMxLgR+t+/Z9co1L7ySCp9x45mS
106 Ghyceb0EXo0Lvh6cb6mywREpiMEfdJHjnPhicQwjuIMpOSZyXCAC62nHy75i1y3AnHU7gy9VSOog
107 9d+LVSXtwgrBUv2eR0wqpyMuCEpSp58mohQj6Yx7qEoqNcgFD5GxGFsH7wLPhp5rrqQ8MZeCSGDd
108 r1mlpspSw01AAyaKiSGe+bIbbxfhonOGUsfIYxKvEVnlwkeufHeh3BVl17D0ocFJjkMOTRUizEq9
109 MUV4EDp+RZVRhS9NueK/JaEaySaIGtGVqcxYKKzCkpwzOzNcCrigqrVj9qqeQpUsRpR6LCRrr0GE
110 GAVxreonrSqC4HVa611IZQYpxPMJFj3d4R7zZ17B33gPLRntuip3FatQgVIVXrF2likARDwqWbQq
111 VzTgaYZNIqcOHQYWh/sMV6+wGnpCNvz+Y9hu8FIoRDz0lBgoDVKbMZJY5bkQEsLoxgbYeC0aG4yR
112 WjAMofM2EnuDVKx2s6GyyowCoxhn5pxLYfKqPrqCs9DIAaE1DMKlQyrGZEaWgqsTVQlBkTljF5fY
113 NONRsYN9NmZ8nHZ8d555yxP3qGToVYNnHK5bxYDHxg+4CGuHK+YM7kwNqjoPsEU5EeUC4Y4rBw77
262 T4tSOxOpqqOnevsAvJwjn8M4TjOf4Pwfg3A/RNScTirEIW607T6IOE4ieGxB3okR4Q808uYy8nfn
263 zGsl4V55gG+IsLMdX7FAXq745jzxgRiHKG+Kcm0p/MhYc3M6d6JncuNk+uwQ4qebDlOpLs6o7QFR
264 Z2EjV2dlNay5rxOTJwarphpXIZvSDT1y+ybTlUOOvv09oDq283CALdYV700TW9vxSdkxW2alwtaF
265 Dc5PhTX/2Aa2+ZTvCdCtebVbsO+ZL6RMCZF/s+i4s+j5QYQuFWLJf6PJWRlnwvkW3VuxXHbkxRrW
266 E2F7Ua9jCOTYkYe6C0JjoFusWHRdk2smbmYDCSxjxZ77YuzMWMTInb7nqlQMus/VEPoaMKtyzYRy
LineChangeMarker.props (https://jedit.svn.sourceforge.net/svnroot/jedit) MSBuild · 35 lines
Token.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 84 lines
✨ Summary
This Java class represents a token in a parser, containing information such as its kind, position, and string image. It also has references to other tokens, including special tokens that occur before regular tokens. The class provides methods for accessing and manipulating this information, allowing it to be used in a parser’s lexical actions.
This Java class represents a token in a parser, containing information such as its kind, position, and string image. It also has references to other tokens, including special tokens that occur before regular tokens. The class provides methods for accessing and manipulating this information, allowing it to be used in a parser’s lexical actions.
VariableDeclaration.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 283 lines
✨ Summary
This Java class represents a variable declaration in a PHP program, including its initialization and type. It extends another Expression class and implements various methods for analyzing and displaying the variable’s information, such as its name, initialization, and usage. It also provides an icon representation of the variable.
This Java class represents a variable declaration in a PHP program, including its initialization and type. It extends another Expression class and implements various methods for analyzing and displaying the variable’s information, such as its name, initialization, and usage. It also provides an icon representation of the variable.
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20 package net.sourceforge.phpdt.internal.compiler.ast;
22 import net.sourceforge.phpdt.internal.compiler.ast.declarations.VariableUsage;
23 import net.sourceforge.phpdt.internal.compiler.parser.Outlineable;
25 import java.util.List;
27 import gatchan.phpparser.project.itemfinder.PHPItem;
28 import gatchan.phpparser.parser.PHPParser;
207 public int getItemType()
208 {
209 return PHPItem.VARIABLE;
210 }
PostfixedUnaryExpression.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 21 lines
✨ Summary
This Java class represents a postfix unary expression in an abstract syntax tree (AST). It extends the UnaryExpression
class and adds a specific implementation for postfix unary expressions. The class has a constructor that initializes its fields, including the operator, source end position, line number, and column number. The toStringExpression()
method returns a string representation of the expression by concatenating the original expression’s string with the operator’s string.
This Java class represents a postfix unary expression in an abstract syntax tree (AST). It extends the UnaryExpression
class and adds a specific implementation for postfix unary expressions. The class has a constructor that initializes its fields, including the operator, source end position, line number, and column number. The toStringExpression()
method returns a string representation of the expression by concatenating the original expression’s string with the operator’s string.
UnaryExpression.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 73 lines
✨ Summary
This Java class represents a unary expression in an abstract syntax tree (AST) for PHP programming language. It extends another class OperatorExpression
and contains an instance of Expression
. The class provides methods to get variables used, modified, and outside the expression, as well as analyze code with a given parser.
This Java class represents a unary expression in an abstract syntax tree (AST) for PHP programming language. It extends another class OperatorExpression
and contains an instance of Expression
. The class provides methods to get variables used, modified, and outside the expression, as well as analyze code with a given parser.
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.
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 }
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;
devel.html
(https://jedit.svn.sourceforge.net/svnroot/jedit)
HTML · 204 lines
✨ Summary
This is a documentation page for the jEdit project, written in HTML. It provides instructions on how to migrate plugins from CVS to Subversion, and explains the process of setting up a new plugin repository on SourceForge. The content includes step-by-step guides, technical details, and links to relevant resources.
This is a documentation page for the jEdit project, written in HTML. It provides instructions on how to migrate plugins from CVS to Subversion, and explains the process of setting up a new plugin repository on SourceForge. The content includes step-by-step guides, technical details, and links to relevant resources.
10 <ul>
12 <li><a href="index.php?page=feedback">Mailing list subscription</a>
13 </li>
14 <li> <a href="http://subversion.tigris.org">Subversion</a>: <a href="https://sourceforge.net/svn/?group_id=588">Help</a>, <a href="#migration">Migration</a>, <a href="http://jedit.svn.sourceforge.net/viewvc/jedit/">Browse SVN</a>, <a href="http://jedit.cvs.sourceforge.net/jedit/">Browse CVS</a> </li>
23 <a href="https://sourceforge.net/tracker/?group_id=588&atid=300588">Patches</a>, <a href="https://sourceforge.net/tracker/?group_id=588&atid=997936">Plugin Patches</a></li>
24 <li> <a href="#patches">Creating</a> and <a href="https://sourceforge.net/tracker/?group_id=588&atid=300588">Submitting</a> patches. </li>
25 <li> <a href="http://plugins.jedit.org/releasing.php">Releasing plugins</a></li>
26 <li> <a href="#help">Want to join us? Help wanted!</a> </li>
27 <li> <a href="http://jedit.wiki.sourceforge.net/Developers+zone">Developers Zone</a> - the Wiki community. </li>
72 <p>Inclusion in the jEdit "development team" is informal and open to anyone. You can "join" simply by <a
73 href="index.php?page=feedback">subscribing to the <tt>jEdit-devel</tt> and
74 <tt>jEdit-users</tt> mailing lists</a>. Your level and focus of involvement is entirely up to you. For active developers, it is also highly recommended you join <a href="http://lists.sourceforge.net/mailman/listinfo/jedit-cvs">jedit-commits</a> which includes commit logs on the subversion repository. Watching this list allows you to see clearly who are the active developers, and precisely what they are working on.
75 </p>
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.
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.
question44504-folding.html (https://bitbucket.org/shuangxinyu/emacspack.git) HTML · 29 lines
6 <tr>
7 <td width='50' colspan='1' class='men-met'>
8 <input type='button' value=' < ' onClick='goLastMonth(<?php echo date("t", strtotime("$year1-$month1-$day1")).", ".$month . ", " . $year.", ".date("w", strtotime("$year-$month-$day1")); ?>)' />
9 </td>
10 <td width='250' colspan='5' class='men-met'>
11 <span class='title'><?php echo $men . " " . $year; ?></span><br />
12 </td>
13 <td width='50' colspan='1' align='right' class='men-met'>
14 <input type='button' value=' > ' onClick='goNextMonth(1, <?php echo $month . ", " . $year.", ".date("w", strtotime("$year2-$month2-$day1")); ?>)' />
15 </td>
16 </tr>
enum_scope.i (https://swig.svn.sourceforge.net/svnroot/swig) Swig · 17 lines
ZipArchive.cs (https://bitbucket.org/jens13/cleanzip.git) C# · 34 lines
CSSDefinition.php
(http://0byte.googlecode.com/svn/trunk/)
PHP · 39 lines
✨ Summary
This is a custom HTMLPurifier_Printer class that extends the HTMLPurifierPrinter class and overrides its render() method to display information about the CSS definition in a table format. The class uses the getClass() function to extract the name of the AttrDef class from the object, which is then used as the definition for each property. The resulting output is a table with two columns: Property and Definition, where the former displays the name of each property and the latter shows the corresponding AttrDef_ class name.
This is a custom HTMLPurifier_Printer class that extends the HTMLPurifierPrinter class and overrides its render() method to display information about the CSS definition in a table format. The class uses the getClass() function to extract the name of the AttrDef class from the object, which is then used as the definition for each property. The resulting output is a table with two columns: Property and Definition, where the former displays the name of each property and the latter shows the corresponding AttrDef_ class name.
default.po (https://bitbucket.org/floresj/notetime.git) Portable Object · 26 lines
bp-core-options.php (https://bitbucket.org/simplemediacode/bptrunk.git) PHP · 538 lines
XmlReader.java
(http://btalk.googlecode.com/svn/)
Java · 240 lines
✨ Summary
This Java code implements an XML reader that parses and interprets XML documents. It reads input from an InputStream, identifies XML tags, attributes, and text content, and returns information about each element in a stack-based data structure. The reader can be used to parse and process XML files, and provides methods for accessing the parsed elements’ names, attributes, and text content.
This Java code implements an XML reader that parses and interprets XML documents. It reads input from an InputStream, identifies XML tags, attributes, and text content, and returns information about each element in a stack-based data structure. The reader can be used to parse and process XML files, and provides methods for accessing the parsed elements’ names, attributes, and text content.
gfortran.vim (https://bitbucket.org/ultra_iter/vim-qt.git) Vim Script · 27 lines
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.
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.
en-GB.plg_finder_weblinks.ini (https://bitbucket.org/kraymitchell/fcd.git) Unknown · 11 lines
i2c-ali1535 (http://photon-android.googlecode.com/svn/) Unknown · 43 lines
musicbrainz.php
(https://code.google.com/p/ontowiki/)
PHP · 435 lines
✨ Summary
This PHP code retrieves music metadata from MusicBrainz, a collaborative music database. It checks if the requested data is available in the cache and returns the result. If not, it sends an HTTP request to MusicBrainz, parses the response, and stores the result in the cache for future use. The code supports both album and track metadata retrieval.
This PHP code retrieves music metadata from MusicBrainz, a collaborative music database. It checks if the requested data is available in the cache and returns the result. If not, it sends an HTTP request to MusicBrainz, parses the response, and stores the result in the cache for future use. The code supports both album and track metadata retrieval.
1 <?php
2 require_once 'Erfurt/Wrapper.php';
11 * @author Thomas K??nig <koenig.thomas@googlemail.com>
12 * @copyright Copyright (c) 2009 {@link http://aksw.org aksw}
13 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
14 * @version ???
15 */
204 preg_match('|<mm:artistType rdf:resource="([^"]+)"/>|', $raw_data, $artistType);
205 preg_match('|<mm:albumList>(.+)</mm:albumList>|s', $raw_data, $albumRdf);
206 preg_match_all('|<rdf:li rdf:resource="(.+)"/>|', $albumRdf[1], $albumUrls, PREG_PATTERN_ORDER);
207 preg_match('|<dc:comment>(.+)</dc:comment>|', $raw_data, $comment);
283 preg_match('|<dc:title>([^"]+)</dc:title>|', $raw_data, $album);
284 preg_match('|<mm:releaseDateList>(.+)</mm:releaseDateList>|s', $raw_data, $releaseRdf);
285 preg_match_all('|<dc:date>(.+)</dc:date>|', $releaseRdf[1], $releaseDate, PREG_PATTERN_ORDER);
286 preg_match_all('|<mm:country>(.+)</mm:country>|', $releaseRdf[1], $releaseCountry, PREG_PATTERN_ORDER);
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.
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.
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.
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.
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 "antirez":<br/><br/><pre class="codeblock python python python python python python python python python python python python" name="code">
97 </pre>
98 <h2><a name="Authentication">Authentication</a></h2>
99 Ok we have more or less everything about the user, but authentication. We'll handle authentication in a simple but robust way: we don't want to use PHP sessions or other things like this, our system must be ready in order to be distributed among different servers, so we'll take the whole state in our Redis database. So all we need is a random string to set as the cookie of an authenticated user, and a key that will tell us what is the user ID of the client holding such a random string. We need two keys in order to make this thing working in a robust way:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python" name="code">
100 SET uid:1000:auth fea5e81ac8ca77622bed1c2132a021f9
101 SET auth:fea5e81ac8ca77622bed1c2132a021f9 1000
202 header("Location: index.php");
203 </pre>The core of the function is the <code name="code" class="python">foreach</code>. We get using SMEMBERS all the followers of the current user, then the loop will LPUSH the post against the uid:<code name="code" class="python"><userid></code>:posts of every follower.<br/><br/>Note that we also maintain a timeline with all the posts. In order to do so what is needed is just to LPUSH the post against global:timeline. Let's face it, do you start thinking it was a bit strange to have to sort things added in chronological order using ORDER BY with SQL? I think so indeed.
204 <h2><a name="Paginating updates">Paginating updates</a></h2>
205 Now it should be pretty clear how we can user LRANGE in order to get ranges of posts, and render this posts on the screen. The code is simple:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python python python python python python" name="code">