100+ results for 'php count'
Not the results you expected?
AggregateColumnBehaviorTest.php (https://github.com/1989gaurav/Propel.git) PHP · 255 lines
1 <?php
3 /*
4 * $Id: SoftDeleteBehaviorTest.php 1612 2010-03-16 22:56:21Z francois $
5 * This file is part of the Propel package.
6 * For the full copyright and license information, please view the LICENSE
10 */
12 require_once dirname(__FILE__) . '/../../../../tools/helpers/bookstore/BookstoreTestBase.php';
14 /**
25 {
26 $postTable = AggregatePostPeer::getTableMap();
27 $this->assertEquals(count($postTable->getColumns()), 2, 'AggregateColumn adds one column by default');
28 $this->assertTrue(method_exists('AggregatePost', 'getNbComments'));
29 }
AbstractRememberMeServicesTest.php (https://github.com/Exercise/symfony.git) PHP · 268 lines
1 <?php
3 /*
16 use Symfony\Component\HttpFoundation\Response;
18 class AbstractRememberMeServicesTest extends \PHPUnit_Framework_TestCase
19 {
20 protected function setUp()
116 $request = new Request;
117 $response = new Response;
118 $account = $this->getMock('Symfony\Component\Security\Core\User\UserInterface');
119 $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
120 $token
139 $request = new Request;
140 $response = new Response;
141 $account = $this->getMock('Symfony\Component\Security\Core\User\UserInterface');
142 $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
143 $token
RemoveUserRightsUtil.java (https://github.com/shroggle/Shroggle.git) Java · 193 lines
ChunkStream.cs (https://gitlab.com/OriumVR/websocket-sharp) C# · 360 lines
73 }
75 public ChunkStream (byte[] buffer, int offset, int count, WebHeaderCollection headers)
76 : this (headers)
77 {
113 var nread = 0;
115 var cnt = _chunks.Count;
116 for (var i = 0; i < cnt; i++) {
117 var chunk = _chunks[i];
330 }
332 internal int WriteAndReadBack (byte[] buffer, int offset, int writeCount, int readCount)
333 {
334 Write (buffer, offset, writeCount);
335 return Read (buffer, offset, readCount);
336 }
tables_sybase.sql (https://gitlab.com/essere.lab.public/qualitas.class-corpus) SQL · 326 lines
MoreLikeThis.php (https://gitlab.com/Blueprint-Marketing/solr-power) PHP · 341 lines
1 <?php
2 /**
3 * Copyright 2011 Bas de Nooijer. All rights reserved.
319 /**
320 * Set count option
321 *
322 * The number of similar documents to return for each result
323 *
324 * @param int $count
325 * @return self Provides fluent interface
326 */
327 public function setCount($count)
328 {
329 return $this->setOption('count', $count);
MiscUtilities.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1199 lines
✨ Summary
This Java code is a utility class that provides various helper methods for file system operations, permission parsing, and plugin management. It includes functions to check if a file exists, parse Unix-style permissions, load plugins, and resolve symlinks. The class also handles I/O errors and provides a way to add plugins to the JEdit editor.
This Java code is a utility class that provides various helper methods for file system operations, permission parsing, and plugin management. It includes functions to check if a file exists, parse Unix-style permissions, load plugins, and resolve symlinks. The class also handles I/O errors and provides a way to add plugins to the JEdit editor.
465 //{{{ getVirtualWidth() method
466 /**
467 * Returns the virtual column number (taking tabs into account) of the
468 * specified offset in the segment.
469 *
476 int virtualPosition = 0;
478 for (int i = 0; i < seg.count; i++)
479 {
480 char ch = seg.array[seg.offset + i];
497 /**
498 * Returns the array offset of a virtual column number (taking tabs
499 * into account) in the segment.
500 *
501 * @param seg The segment
webfont.php (https://github.com/PressCrew/infinity.git) PHP · 441 lines
1 <?php
2 /**
3 * ICE API: web fonts helper class file
319 // is array and has items?
320 if ( isset( $array['items'] ) && is_array( $array['items'] ) && count( $array['items'] ) ) {
321 // data to return
322 $data = array();
345 if (
346 ( isset( $item['family'] ) && strlen( $item['family'] ) ) &&
347 ( isset( $item['variants'] ) && is_array( $item['variants'] ) && count( $item['variants'] ) ) &&
348 ( isset( $item['subsets'] ) && is_array( $item['subsets'] ) && count( $item['subsets'] ) )
Sreg.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 300 lines
1 <?php
3 /**
24 * @see Zend_OpenId_Extension
25 */
26 // require_once "Zend/OpenId/Extension.php";
28 /**
106 "gender",
107 "postcode",
108 "country",
109 "language",
110 "timezone"
121 public function prepareRequest(&$params)
122 {
123 if (is_array($this->_props) && count($this->_props) > 0) {
124 foreach ($this->_props as $prop => $req) {
125 if ($req) {
EmpEmergencyContactServiceTest.php (https://github.com/orangehrm/OrangeHRM.git) PHP · 188 lines
1 <?php
2 /**
3 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures
72 $this->empEmergencyContactService->setEmpEmergencyContactDao($empEmergencyContactDao);
73 $empEmergencyContacts = $this->empEmergencyContactService->getEmployeeEmergencyContactList(1);
74 $this->assertCount(2, $empEmergencyContacts);
75 $this->assertEquals('Yasitha', $empEmergencyContacts[0]->getName());
76 $this->assertEquals('Rashmi', $empEmergencyContacts[1]->getName());
168 $this->empEmergencyContactService->setEmpEmergencyContactDao($empEmergencyContactDao);
169 $result = $this->empEmergencyContactService->searchEmployeeEmergencyContacts($empEmergencyContactSearchParams);
170 $this->assertCount(2, $result);
171 $this->assertTrue($result[0] instanceof EmpEmergencyContact);
172 }
174 public function testGetSearchEmployeeEmergencyContactsCount(): void
175 {
176 $empEmergencyContactSearchParams = new EmpEmergencyContactSearchFilterParams();
QOneLevelTreeModelTest.h (https://github.com/mantidproject/mantid.git) C Header · 252 lines
81 // One row
82 TS_ASSERT_EQUALS(model.rowCount(), 1);
83 // Two columns
84 TS_ASSERT_EQUALS(model.columnCount(), 2);
98 // Four rows
99 TS_ASSERT_EQUALS(model.rowCount(), 4);
100 // Two columns
101 TS_ASSERT_EQUALS(model.columnCount(), 2);
111 }
113 void testColumnCount() {
114 auto ws = oneRowTable();
115 QOneLevelTreeModel model(ws, m_whitelist);
template.php (https://gitlab.com/srueegger/1zu12bB) PHP · 290 lines
OneToManyBidirectionalAssociationTest.php (https://github.com/adrienbrault/doctrine2.git) PHP · 247 lines
1 <?php
3 declare(strict_types=1);
49 $this->em->flush();
51 self::assertCount(0, $this->product->getFeatures());
52 }
145 // This would trigger lazy-load
146 //self::assertEquals(2, $product->getFeatures()->count());
147 //self::assertTrue($product->getFeatures()->contains($features[0]));
148 //self::assertTrue($product->getFeatures()->contains($features[1]));
155 $query = $this->em->createQuery('select f,p from Doctrine\Tests\Models\ECommerce\ECommerceFeature f join f.product p');
156 $features = $query->getResult();
157 self::assertCount(0, $features);
158 }
AssetBundleTest.php (https://gitlab.com/brucealdridge/yii2) PHP · 273 lines
1 <?php
2 /**
3 *
44 $this->assertEmpty($view->assetBundles);
45 TestSimpleAsset::register($view);
46 $this->assertEquals(1, count($view->assetBundles));
47 $this->assertArrayHasKey('yiiunit\\framework\\web\\TestSimpleAsset', $view->assetBundles);
48 $this->assertTrue($view->assetBundles['yiiunit\\framework\\web\\TestSimpleAsset'] instanceof AssetBundle);
51 123<script src="/js/jquery.js"></script>4
52 EOF;
53 $this->assertEquals($expected, $view->renderFile('@yiiunit/data/views/rawlayout.php'));
54 }
60 $this->assertEmpty($view->assetBundles);
61 TestAssetBundle::register($view);
62 $this->assertEquals(3, count($view->assetBundles));
63 $this->assertArrayHasKey('yiiunit\\framework\\web\\TestAssetBundle', $view->assetBundles);
64 $this->assertArrayHasKey('yiiunit\\framework\\web\\TestJqueryAsset', $view->assetBundles);
DefaultIterator.php (https://github.com/jtai/zf2.git) PHP · 308 lines
1 <?php
2 /**
3 * Zend Framework
29 * using ext/ldap
30 *
31 * @uses Countable
32 * @uses Iterator
33 * @uses \Zend\Ldap\Exception
37 * @license http://framework.zend.com/license/new-bsd New BSD License
38 */
39 class DefaultIterator implements \Iterator, \Countable
40 {
41 const ATTRIBUTE_TO_LOWER = 1;
89 $this->_ldap = $ldap;
90 $this->_resultId = $resultId;
91 $this->_itemCount = @ldap_count_entries($ldap->getResource(), $resultId);
92 if ($this->_itemCount === false) {
Sreg.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 300 lines
1 <?php
3 /**
24 * @see Zend_OpenId_Extension
25 */
26 require_once "Zend/OpenId/Extension.php";
28 /**
106 "gender",
107 "postcode",
108 "country",
109 "language",
110 "timezone"
121 public function prepareRequest(&$params)
122 {
123 if (is_array($this->_props) && count($this->_props) > 0) {
124 foreach ($this->_props as $prop => $req) {
125 if ($req) {
Sreg.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 300 lines
1 <?php
3 /**
24 * @see Zend_OpenId_Extension
25 */
26 #require_once "Zend/OpenId/Extension.php";
28 /**
106 "gender",
107 "postcode",
108 "country",
109 "language",
110 "timezone"
121 public function prepareRequest(&$params)
122 {
123 if (is_array($this->_props) && count($this->_props) > 0) {
124 foreach ($this->_props as $prop => $req) {
125 if ($req) {
jobs.php (https://github.com/Paladin/joomla-platform.git) PHP · 372 lines
info.tpl (https://github.com/eeggenberger/ezpublish.git) Smarty Template · 283 lines
52 <label>{'Version'|i18n( 'design/admin/setup/info', 'PHP version' )}:</label>
53 {$php_version} (<a href={'/setup/info/php'|ezurl}>{'Details'|i18n( 'design/admin/setup/info', 'Detailed PHP information' )}</a>)
54 </div>
83 {'Maximum size of post data (text and files) is %1.'|i18n( 'design/admin/setup/info',, array( $php_ini.post_max_size ) )}<br/>
84 {if and( is_set( $php_ini.memory_limit ), $php_ini.memory_limit )}
85 {'Script memory limit is %1.'|i18n( 'design/admin/setup/info' ,,array( $php_ini.memory_limit ) )}<br/>
104 <label>{'Name'|i18n( 'design/admin/setup/info', 'PHP Accelerator name' )}:</label>
105 {if $php_accelerator.url}<a href="{$php_accelerator.url|wash}">{/if}{$php_accelerator.name|wash}{if $php_accelerator.url}</a>{/if}
106 </div>
238 <div class="block">
239 <label>{'Connection retry count'|i18n( 'design/admin/setup/info', 'Database retry count' )}:</label>
240 {$database_object.retry_count}
Element.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 265 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
226 * and current element has attributes in $namespace - different elements
227 */
228 // if (!count($attributes) && count($this->getAttributes($child, $namespace))) {
229 // foreach ($this->getAttributes($child, $namespace) as $attribute) {
230 // $elm = false;
242 * but current element has namespaces attributes - different elements
243 */
244 if (!count($extendElmAttributes) && count($this->getAttributes($child))) {
245 $elm = false;
246 }
BelongsTo.php (https://gitlab.com/ntphuc/FoodyBackend) PHP · 310 lines
1 <?php
3 namespace Illuminate\Database\Eloquent\Relations;
110 $query->select($columns);
112 $query->from($query->getModel()->getTable().' as '.$hash = $this->getRelationCountHash());
114 $query->getModel()->setTable($hash);
124 * @return string
125 */
126 public function getRelationCountHash()
127 {
128 return 'self_'.md5(microtime(true));
167 // it so the query doesn't fail, but will not return any results, which should
168 // be what this developer is expecting in a case where this happens to them.
169 if (count($keys) == 0) {
170 return [0];
171 }
S3.php (https://github.com/esimionato/magneto-s3.git) PHP · 346 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_Core
23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
187 $offset = ((int) $offset >= 0) ? (int) $offset : 0;
188 $count = ((int) $count >= 1) ? (int) $count : 1;
190 $result = $this->_getResource()->getFiles($offset, $count);
loadTopStats.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 257 lines
1 <?php
2 session_start();
4 error_reporting(E_ALL ^ E_NOTICE);
6 require("../XBTeam/functions.php");
7 require("../XBTeam/se7en.php");
54 ?>
55 <ul class="top-list">
56 <?php
57 $i = 0;
58 $sql_music_tuan = mysql_query("SELECT * FROM song WHERE sWeekView!=0 AND sStatus!=0 AND sStatus!=3 AND sType!='youtube' order by sWeekView DESC LIMIT 10 ");
76 <h3><a href="<?=$homelink?><?=CovertVn($sName)?>-s<?=$sID?>.html" title="<?=$sName?>"><?=$sName?></a></h3>
77 <div class="song-info">
78 <div class="song-count">Lượt nghe trong tuần: <span><?=$sView?></span></div>
79 </div>
80 </div>
form.php (https://github.com/livinglab/openlab.git) PHP · 205 lines
28 <?php foreach ( $product_posts as $product_post ) { ?>
29 <option value="<?php echo esc_attr( $product_post->ID ); ?>" <?php selected( (int) $instance['product_post_id'], $product_post->ID ); ?>>
30 <?php echo esc_attr( get_the_title( $product_post ) ); ?>
108 id="<?php echo esc_attr( $this->get_field_id( 'form_product_description' ) ); ?>"
109 name="<?php echo esc_attr( $this->get_field_name( 'form_product_description' ) ); ?>"><?php echo esc_textarea( $instance['form_product_description'] ); ?></textarea>
110 </p>
111 <p class="cost">
119 <?php foreach ( Jetpack_Simple_Payments_Widget::$supported_currency_list as $code => $currency ) { ?>
120 <option value="<?php echo esc_attr( $code ); ?>"<?php selected( $instance['form_product_currency'], $code ); ?>>
121 <?php echo esc_html( "$code $currency" ); ?>
158 wp_kses(
159 /* Translators: placeholders are a link to Paypal website and a target attribute. */
160 __( 'This is where PayPal will send your money. To claim a payment, you\'ll need a <a href="%1$s" %2$s>PayPal account</a> connected to a bank account.', 'jetpack' ),
161 array(
162 'a' => array(
Ldap.php (https://bitbucket.org/baruffaldi/cms-php-bfcms.git) PHP · 296 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Ldap.php 10171 2008-07-18 04:57:08Z miallen $
21 */
24 * @see Zend_Auth_Adapter_Interface
25 */
26 require_once 'Zend/Auth/Adapter/Interface.php';
28 /**
52 /**
53 * The username of the account being authenticated.
54 *
55 * @var string
MailFake.php (https://gitlab.com/madwanz64/laravel) PHP · 344 lines
7 use Illuminate\Contracts\Mail\MailQueue;
8 use Illuminate\Contracts\Queue\ShouldQueue;
9 use PHPUnit\Framework\Assert as PHPUnit;
11 class MailFake implements Mailer, MailQueue
61 PHPUnit::assertTrue(
62 ($count = $this->sent($mailable)->count()) === $times,
63 "The expected [{$mailable}] mailable was sent {$count} times instead of {$times} times."
91 })->join(', ');
93 PHPUnit::assertEmpty($this->mailables, 'The following mailables were sent unexpectedly: '.$mailableNames);
94 }
124 PHPUnit::assertTrue(
125 ($count = $this->queued($mailable)->count()) === $times,
126 "The expected [{$mailable}] mailable was queued {$count} times instead of {$times} times."
ArrayStorage.php (https://bitbucket.org/alexandretaz/maniac_divers.git) PHP · 348 lines
invoker_lvalue_pass.cpp (https://bitbucket.org/liflg/library-boost.git) C++ · 342 lines
54 BOOST_TEST(count == save_count + 2);
55 save_count = count;
56 }
57 #endif
59 // int i = 2;
60 // boost::detail::invoke<void>(f_void_1, i);
61 // BOOST_TEST(count == save_count + 2);
62 // save_count = count;
137 // BOOST_TEST(count == save_count+1);
138 // save_count = count;
139 // }
140 // const member function pointer
309 BOOST_TEST(count == save_count+5);
310 save_count = count;
311 #endif
312 // boost::detail::invoke<void>(f_void_2, i, j);
README.TXT (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 49 lines
27 * Download the NetRexxScript.jar file and the NetRexxC.jar file or download and unzip the zip file which contains both
28 * Copy both files to the user account's jEdit jars directory or the main jEdit jars directory.
30 On Windows XP the user's jEdit home directory could be C:\Documents and Settings\useracct\.jedit\jars (Where "useracct" is the actual userid.)
handle_workaround.hpp (https://github.com/VoltDB/voltdb.git) C++ Header · 262 lines
33 typedef struct _SYSTEM_HANDLE_INFORMATION_
34 {
35 ::boost::winapi::ULONG_ Count;
36 SYSTEM_HANDLE_ENTRY_ Handle[1];
37 } SYSTEM_HANDLE_INFORMATION_, *PSYSTEM_HANDLE_INFORMATION_;
63 ULONG ValidAccessMask;
64 BOOLEAN SecurityRequired;
65 BOOLEAN MaintainHandleCount;
66 UCHAR TypeIndex;
67 CHAR ReservedByte;
100 ::boost::winapi::ULONG_ Attributes;
101 ::boost::winapi::ACCESS_MASK_ GrantedAccess;
102 ::boost::winapi::ULONG_ HandleCount;
103 ::boost::winapi::ULONG_ PointerCount;
188 ::boost::winapi::ULONG_ ValidAccessMask;
189 ::boost::winapi::BOOLEAN_ SecurityRequired;
190 ::boost::winapi::BOOLEAN_ MaintainHandleCount;
191 ::boost::winapi::UCHAR_ TypeIndex;
192 ::boost::winapi::CHAR_ ReservedByte;
HeaderBag.php (https://gitlab.com/oytunistrator/92five) PHP · 350 lines
1 <?php
3 /*
19 * @api
20 */
21 class HeaderBag implements \IteratorAggregate, \Countable
22 {
23 protected $headers;
140 if ($first) {
141 return count($this->headers[$key]) ? $this->headers[$key][0] : $default;
142 }
307 * @return int The number of headers
308 */
309 public function count()
310 {
311 return count($this->headers);
Element.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 265 lines
1 <?php
2 /**
3 * Magento Enterprise Edition
223 foreach ($extendElmAttributes as $namespace => $attributes) {
224 /**
225 * if count of attributes of extend element is 0 in $namespace,
226 * and current element has attributes in $namespace - different elements
227 */
228 // if (!count($attributes) && count($this->getAttributes($child, $namespace))) {
229 // foreach ($this->getAttributes($child, $namespace) as $attribute) {
230 // $elm = false;
242 * but current element has namespaces attributes - different elements
243 */
244 if (!count($extendElmAttributes) && count($this->getAttributes($child))) {
245 $elm = false;
246 }
class-ms-rule-url-model.php (https://gitlab.com/najomie/fit-hippie) PHP · 391 lines
185 * @param bool $has_access_only Optional. Count rules for has_access status only.
186 * @return int $count The rule count result.
187 */
188 public function count_rules( $has_access_only = true ) {
189 $count = count( $this->rule_value );
191 return apply_filters(
198 /**
199 * Get the total content count.
200 * Used in Dashboard to display how many special pages are protected.
201 *
207 public function get_content_count( $args = null ) {
208 $count = count( $this->get_protected_urls() );
210 return apply_filters(
minicallib.php (https://gitlab.com/ElvisAns/tiki) PHP · 226 lines
1 <?php
3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
9 //this script may only be included - so its better to die if called directly.
10 if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
11 header("location: index.php");
12 exit;
13 }
79 $query = "select `isIcon`,`path`,`name`,`topicId` from `tiki_minical_topics` where `user`=? $mid order by " . $this->convertSortMode($sort_mode);
80 $query_cant = "select count(*) from `tiki_minical_topics` where `user`=? $mid";
81 $result = $this->query($query, $bindvars, $maxRecords, $offset);
82 $cant = $this->getOne($query_cant, $bindvars);
112 $query = "select * from `tiki_minical_events` where `user`=? $mid order by " . $this->convertSortMode($sort_mode);
113 $query_cant = "select count(*) from `tiki_minical_events` where `user`=? $mid";
114 $result = $this->query($query, $bindvars, $maxRecords, $offset);
115 $cant = $this->getOne($query_cant, $bindvars);
BinaryAuthorization.php (https://gitlab.com/Japang-Jawara/jawara-penilaian) PHP · 278 lines
guest_shipping.php (https://bitbucket.org/deringer/opencart.git) PHP · 198 lines
81 $this->load->model('localisation/country');
83 $this->data['countries'] = $this->model_localisation_country->getCountries();
85 if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/guest_shipping.tpl')) {
131 $this->load->model('localisation/country');
133 $country_info = $this->model_localisation_country->getCountry($this->request->post['country_id']);
135 if ($country_info && $country_info['postcode_required'] && (utf8_strlen($this->request->post['postcode']) < 2) || (utf8_strlen($this->request->post['postcode']) > 10)) {
159 $this->load->model('localisation/country');
161 $country_info = $this->model_localisation_country->getCountry($this->request->post['country_id']);
163 if ($country_info) {
KeywordSerDes.java (https://github.com/vilmospapp/liferay-portal.git) Java · 405 lines
133 }
135 if (keyword.getKeywordUsageCount() != null) {
136 if (sb.length() > 1) {
137 sb.append(", ");
138 }
140 sb.append("\"keywordUsageCount\": ");
142 sb.append(keyword.getKeywordUsageCount());
236 }
238 if (keyword.getKeywordUsageCount() == null) {
239 map.put("keywordUsageCount", null);
241 else {
242 map.put(
243 "keywordUsageCount",
244 String.valueOf(keyword.getKeywordUsageCount()));
OperatorSpacingSniff.php (https://github.com/r1zib/salesforce.git) PHP · 212 lines
13 * @version CVS: $Id: OperatorSpacingSniff.php 301632 2010-07-28 01:57:56Z squiz $
14 * @link http://pear.php.net/package/PHP_CodeSniffer
15 */
27 * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
28 * @version Release: 1.3.0RC1
29 * @link http://pear.php.net/package/PHP_CodeSniffer
30 */
31 class Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff implements PHP_CodeSniffer_Sniff
62 * Processes this sniff, when one of its tokens is encountered.
63 *
64 * @param PHP_CodeSniffer_File $phpcsFile The current file being checked.
65 * @param int $stackPtr The position of the current token in the
66 * stack passed in $tokens.
68 * @return void
69 */
70 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
71 {
72 $tokens = $phpcsFile->getTokens();
GEORoute.h (https://github.com/lechium/appletv-private-headers.git) C Header · 137 lines
58 @property(retain, nonatomic) NSString *name; // G=0x3670cf71; S=0x3670cf81; @synthesize=_name
59 @property(retain, nonatomic) NSString *phoneticName; // G=0x3670cfa5; S=0x3670cfb5; @synthesize=_phoneticName
60 @property(readonly, assign) unsigned pointCount; // G=0x367138fd;
61 @property(readonly, assign) XXStruct_zYrK5D *points; // G=0x367138dd;
62 @property(retain, nonatomic) NSMutableArray *steps; // G=0x3670cf3d; S=0x3670cf4d; @synthesize=_steps
63 @property(readonly, assign, nonatomic) long long *streetSegmentIDs; // G=0x3670bf11;
64 @property(readonly, assign, nonatomic) unsigned streetSegmentIDsCount; // G=0x3670befd;
65 @property(retain, nonatomic) NSString *transitCost; // G=0x3670cfd9; S=0x3670cfe9; @synthesize=_transitCost
66 @property(assign, nonatomic) int type; // G=0x3670cee9; S=0x3670cef9; @synthesize=_type
119 // declared property setter: - (void)setPhoneticName:(id)name; // 0x3670cfb5
120 // declared property setter: - (void)setSteps:(id)steps; // 0x3670cf4d
121 - (void)setStreetSegmentIDs:(long long *)ids count:(unsigned)count; // 0x3670bff5
122 // declared property setter: - (void)setTransitCost:(id)cost; // 0x3670cfe9
123 // declared property setter: - (void)setType:(int)type; // 0x3670cef9
StationData.php (https://github.com/jordidh/urvangreen-web.git) PHP · 382 lines
ConnectionTest.php (https://github.com/gimler/symfony.git) PHP · 228 lines
1 <?php
3 /*
12 namespace Symfony\Component\Messenger\Tests\Transport\AmqpExt;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Messenger\Transport\AmqpExt\AmqpFactory;
16 use Symfony\Component\Messenger\Transport\AmqpExt\Connection;
64 }
66 public function testOptionsAreTakenIntoAccountAndOverwrittenByDsn()
67 {
68 $this->assertEquals(
class-wc-payments-subscription-change-payment-method-handler.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 219 lines
1 <?php
2 /**
3 * Class WC_Payments_Subscription_Change_Payment_Method
23 // Override the pay for order link on the order to redirect to a change payment method page.
24 add_filter( 'woocommerce_my_account_my_orders_actions', [ $this, 'update_order_pay_button' ], 15, 2 );
26 // Filter elements/messaging on the "Change payment method" page to reflect updating a WCPay billing card.
37 * Replaces the default change payment method action for WC Pay subscriptions when the subscription needs a new payment method after a failed attempt.
38 *
39 * @param array $actions The My Account > View Subscription actions.
40 * @param WC_Subscription $subscription The subscription object.
41 *
56 /**
57 * Updates the 'Pay' link displayed on the My Account > Orders or from a subscriptions related orders table, to make sure customers are directed to update their card.
58 *
59 * @param array $actions Order actions.
PluginManagerProgress.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 275 lines
✨ Summary
This Java code creates a dialog window that displays progress bars for downloading and installing plugins. The PluginManagerProgress
class extends JDialog
and uses JProgressBar
to show the progress of plugin operations. It also includes buttons to stop the operation and display messages during the process. The dialog is designed to be used in an integrated development environment (IDE) for managing plugin downloads and installations.
This Java code creates a dialog window that displays progress bars for downloading and installing plugins. The PluginManagerProgress
class extends JDialog
and uses JProgressBar
to show the progress of plugin operations. It also includes buttons to stop the operation and display messages during the process. The dialog is designed to be used in an integrated development environment (IDE) for managing plugin downloads and installations.
53 + type + "-task"));
55 count = roster.getOperationCount();
57 globalProgress.setMaximum(count);
139 try
140 {
141 if(!ok || done == count)
142 {
143 SwingUtilities.invokeAndWait(new Runnable()
196 private JProgressBar globalProgress, localProgress;
197 private JButton stop;
198 private int count;
199 private int done = 1;
AboutHandler.inc.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 264 lines
1 <?php
3 /**
4 * AboutHandler.inc.php
5 *
6 * Copyright (c) 2003-2004 The Public Knowledge Project
11 * Handle requests for editor functions.
12 *
13 * $Id: AboutHandler.inc.php,v 1.19 2005/07/29 20:45:19 alec Exp $
14 */
181 $templateMgr = &TemplateManager::getManager();
182 $journalSettings = &$journalDao->getJournalSettings($journal->getJournalId());
183 if (isset($journalSettings['submissionChecklist']) && count($journalSettings['submissionChecklist']) > 0) {
184 ksort($journalSettings['submissionChecklist']);
185 reset($journalSettings['submissionChecklist']);
ClassCommentSniff.php (https://github.com/amumu/modev.git) PHP · 233 lines
46 * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
47 * @version Release: 1.2.0a1
48 * @link http://pear.php.net/package/PHP_CodeSniffer
49 */
50 class PEAR_Sniffs_Commenting_ClassCommentSniff extends PEAR_Sniffs_Commenting_FileCommentSniff
168 }
170 $newlineCount = (substr_count($short, $phpcsFile->eolChar) + 1);
172 // Exactly one blank line between short and long description.
190 $error = "There must be exactly one blank line before the tags in $type comments";
191 if ($long !== '') {
192 $newlineCount += (substr_count($long, $phpcsFile->eolChar) - $newlineSpan + 1);
193 }
ReviewFormElementDAO.inc.php (https://github.com/ojsde/pkp-lib.git) PHP · 318 lines
1 <?php
3 /**
4 * @file classes/reviewForm/ReviewFormElementDAO.inc.php
5 *
6 * Copyright (c) 2000-2012 John Willinsky
37 $returner = null;
38 if ($result->RecordCount() != 0) {
39 $returner =& $this->_returnReviewFormElementFromRow($result->GetRowAssoc(false));
40 }
265 */
266 function reviewFormElementExists($reviewFormElementId, $reviewFormId = null) {
267 $sql = 'SELECT COUNT(*) FROM review_form_elements WHERE review_form_element_id = ?';
268 $params = array($reviewFormElementId);
269 if ($reviewFormId !== null) {
paypal_admin_notification.php (https://github.com/ZenMagick/zc-base.git) PHP · 202 lines
1 <?php
2 /**
3 * admin subtemplate for Paypal Website Payments Standard payment method
8 * @copyright Portions Copyright 2004 DevosC.com
9 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
10 * @version $Id: paypal_admin_notification.php 15560 2010-02-22 07:50:28Z drbyte $
11 */
61 $output .= '</td></tr>'."\n";
62 $output .= '<tr><td class="main">'."\n";
63 $output .= MODULE_PAYMENT_PAYPAL_ENTRY_ADDRESS_COUNTRY."\n";
64 $output .= '</td><td class="main">'."\n";
65 $output .= $ipn->fields['address_country']."\n";
LineItem.php (https://github.com/michaelmcandrew/lbc.git) PHP · 311 lines
1 <?php
2 /*
3 +--------------------------------------------------------------------+
32 *
33 */
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
130 public $line_total;
131 /**
132 * Participant count for field
133 *
134 * @var int unsigned
135 */
136 public $participant_count;
137 /**
138 * Implicit FK to civicrm_option_value
structure.php (https://github.com/adamli/Garden.git) PHP · 216 lines
1 <?php if (!defined('APPLICATION')) exit();
3 if (!isset($Drop))
13 ->PrimaryKey('CategoryID')
14 ->Column('ParentCategoryID', 'int', TRUE)
15 ->Column('CountDiscussions', 'int', '0')
16 ->Column('AllowDiscussions', array('1','0'), '1')
17 ->Column('Name', 'varchar(30)')
37 ->Column('LastCommentID', 'int', TRUE, 'key')
38 ->Column('Name', 'varchar(100)', FALSE, 'fulltext')
39 ->Column('CountComments', 'int', '1')
40 ->Column('Closed', array('1', '0'), '0')
41 ->Column('Announce', array('1', '0'), '0')
52 ->Column('UserID', 'int', FALSE, 'primary')
53 ->Column('DiscussionID', 'int', FALSE, 'primary')
54 ->Column('CountComments', 'int', '0')
55 ->Column('DateLastViewed', 'datetime')
56 ->Column('Dismissed', 'varchar(1)', TRUE) // Relates to dismissed announcements
ezuserdiscountrule.php (https://github.com/zerustech/ezpublish.git) PHP · 220 lines
11 /*!
12 \class eZUserDiscountRule ezuserdiscountrule.php
13 \brief The class eZUserDiscountRule does
140 WHERE ezuser_discountrule.contentobject_id = $userId AND
141 ezuser_discountrule.discountrule_id = ezdiscountrule.id";
142 return $db->arrayQuery( $query );
143 }
159 ezuser_discountrule
160 WHERE $inString AND
161 ezuser_discountrule.discountrule_id = ezdiscountrule.id";
162 $ruleArray = $db->arrayQuery( $query );
202 $row = array(
203 "id" => null,
204 "discountrule_id" => $discountRuleID,
205 "contentobject_id" => $contentobjectID );
206 return new eZUserDiscountRule( $row );
stv06xx_pb0100.h
(http://photon-android.googlecode.com/svn/)
C Header · 150 lines
✨ Summary
This C header file defines a driver for a camera sensor, specifically the PB-0100 model. It provides functions for probing, initializing, starting, stopping, and dumping the sensor’s data, as well as controlling various settings such as gain, balance, exposure, and autogain. The code is part of the V4L2 (Video for Linux 2) framework, which allows for camera device management in Linux systems.
This C header file defines a driver for a camera sensor, specifically the PB-0100 model. It provides functions for probing, initializing, starting, stopping, and dumping the sensor’s data, as well as controlling various settings such as gain, balance, exposure, and autogain. The code is part of the V4L2 (Video for Linux 2) framework, which allows for camera device management in Linux systems.
44 #define PB_CWSIZE 0x04 /* Column Window Size */
45 #define PB_CFILLIN 0x05 /* Column Fill-In */
46 #define PB_VBL 0x06 /* Vertical Blank Count */
47 #define PB_CONTROL 0x07 /* Control Mode */
48 #define PB_FINTTIME 0x08 /* Integration Time/Frame Unit Count */
49 #define PB_RINTTIME 0x09 /* Integration Time/Row Unit Count */
50 #define PB_ROWSPEED 0x0a /* Row Speed Control */
51 #define PB_ABORTFRAME 0x0b /* Abort Frame */
105 #define PB_R65 0x41 /* Green 2/Green 1 Gain */
106 #define PB_R66 0x42 /* VREF_HI/LO */
107 #define PB_R67 0x43 /* Integration Time/Row Unit Count */
108 #define PB_R240 0xf0 /* ADC Test */
109 #define PB_R241 0xf1 /* Chip Enable */
PPMReader.cc
(https://freespeech.svn.sourceforge.net/svnroot/freespeech)
C++ · 101 lines
✨ Summary
This C++ code defines a class PPMReader
that reads image files in PPM format and outputs them as RGB24Image objects. It’s part of a larger system, likely a node-based graphics processing pipeline, where it can be used to read images from input files and produce output images. The class handles errors and exceptions, ensuring robustness and reliability in the image reading process.
This C++ code defines a class PPMReader
that reads image files in PPM format and outputs them as RGB24Image objects. It’s part of a larger system, likely a node-based graphics processing pipeline, where it can be used to read images from input files and produce output images. The class handles errors and exceptions, ensuring robustness and reliability in the image reading process.
49 }
51 ObjectRef PPMReader::getOutput (int output_id, int count) {
53 int i;
56 if (!hasOutput(output_id)) throw new NodeException (this, "Cannot getOutput id",__FILE__,__LINE__);
58 if (count != processCount) {
59 //We are updating our output only if needed
64 //getting all data from our inputs.
65 int OutputID = inputs[m_filenameID].outputID;
66 String fname = object_cast<String> (inputs[m_filenameID].node->getOutput(OutputID,count));
68 RGB24Image *im = new RGB24Image;
91 //updating processCount
92 processCount = count;
VariableGridLayout.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 343 lines
✨ Summary
This Java code implements a variable grid layout manager for Swing components. It dynamically adjusts the number of rows and columns based on the component’s size, and lays out the components within the grid according to their preferred sizes. The layout is updated when the component’s size changes.
This Java code implements a variable grid layout manager for Swing components. It dynamically adjusts the number of rows and columns based on the component’s size, and lays out the components within the grid according to their preferred sizes. The layout is updated when the component’s size changes.
170 public void layoutContainer(Container parent) {
171 synchronized (parent.getTreeLock()) {
172 int ncomponents = parent.getComponentCount();
174 if (ncomponents == 0) {
231 public void invalidateLayout(Container container) {
232 int ncomponents = container.getComponentCount();
233 int old_nrows = nrows;
234 int old_ncols = ncols;
276 private Dimension getLayoutSize(Container parent, int which) {
277 synchronized (parent.getTreeLock()){
278 int ncomponents = parent.getComponentCount();
279 int h = 0;
280 int w = 0;
pathToFile.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 11 lines
htaccess.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 564 lines
262 <KEYWORD2>AuthType</KEYWORD2>
263 <KEYWORD2>AuthUserFile</KEYWORD2>
264 <KEYWORD2>BS2000Account</KEYWORD2>
265 <KEYWORD2>BrowserMatch</KEYWORD2>
266 <KEYWORD2>BrowserMatchNoCase</KEYWORD2>
374 <KEYWORD2>LogFormat</KEYWORD2>
375 <KEYWORD2>LogLevel</KEYWORD2>
376 <KEYWORD2>MCacheMaxObjectCount</KEYWORD2>
377 <KEYWORD2>MCacheMaxObjectSize</KEYWORD2>
378 <KEYWORD2>MCacheMaxStreamingBuffer</KEYWORD2>
541 <KEYWORD3>PythonDebug</KEYWORD3>
543 <!-- mod_php -->
544 <KEYWORD3>php_value</KEYWORD3>
545 <!-- using 4 for apache 1.x vs 2.x -->
546 <KEYWORD4>php_flag</KEYWORD4>
548 <LITERAL2>All</LITERAL2>
cx231xx-cards.c
(http://photon-android.googlecode.com/svn/)
C · 915 lines
✨ Summary
This C code implements a USB driver for the cx231xx video capture card, providing support for various video modes and interfaces such as V4L2, USB, and ISOC. It handles device detection, configuration, and disconnection, as well as loading and unloading of required modules. The driver also manages resources, including memory allocation and deallocation, to ensure proper operation and minimize errors.
This C code implements a USB driver for the cx231xx video capture card, providing support for various video modes and interfaces such as V4L2, USB, and ISOC. It handles device detection, configuration, and disconnection, as well as loading and unloading of required modules. The driver also manages resources, including memory allocation and deallocation, to ensure proper operation and minimize errors.
165 },
166 };
167 const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards);
169 /* table of devices that work with this driver */
579 /* get maximum no.of IAD interfaces */
580 assoc_desc = udev->actconfig->intf_assoc[0];
581 dev->max_iad_interface_count = assoc_desc->bInterfaceCount;
583 /* init CIR module TBD */
662 usb_set_intfdata(lif, dev);
664 if ((dev->interface_count - 1) != dev->max_iad_interface_count)
665 return 0;
expected.log (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 340 lines
EditingOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 180 lines
✨ Summary
This Java code defines a custom options panel for editing settings in a text editor, such as JEdit. It displays various editing options, including default mode, tab size, indent size, word break characters, folding modes, and syntax highlighting. The user can select these options and save them to the application’s configuration.
This Java code defines a custom options panel for editing settings in a text editor, such as JEdit. It displays various editing options, including default mode, tab size, indent size, word break characters, folding modes, and syntax highlighting. The user can select these options and save them to the application’s configuration.
107 //{{{ Undo queue size
108 undoCount = new JTextField(jEdit.getProperty("buffer.undoCount"));
109 addComponent(jEdit.getProperty("options.editing.undoCount"),undoCount);
152 jEdit.setProperty("buffer.folding",(String)defaultFolding.getSelectedItem());
153 jEdit.setProperty("buffer.collapseFolds",defaultCollapseFolds.getText());
154 jEdit.setProperty("buffer.undoCount",undoCount.getText());
155 jEdit.setBooleanProperty("buffer.syntax",defaultSyntax.isSelected());
156 jEdit.setBooleanProperty("buffer.indentOnTab",defaultIndentOnTab
171 private JComboBox defaultFolding;
172 private JTextField defaultCollapseFolds;
173 private JTextField undoCount;
174 private JCheckBox defaultSyntax;
175 private JCheckBox defaultIndentOnTab;
serial_lh7a40x.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 683 lines
✨ Summary
This C code implements a Linux kernel module for a Sharp LH7A40X serial port driver. It registers multiple serial ports with the kernel, allowing them to be used by applications. The module provides basic functionality for serial communication, including setting baud rates and parity settings. It also initializes and exits the serial ports when the module is loaded or unloaded.
This C code implements a Linux kernel module for a Sharp LH7A40X serial port driver. It registers multiple serial ports with the kernel, allowing them to be used by applications. The module provides basic functionality for serial communication, including setting baud rates and parity settings. It also initializes and exits the serial ports when the module is loaded or unloaded.
147 data = UR (port, UART_R_DATA);
148 flag = TTY_NORMAL;
149 ++port->icount.rx;
151 if (unlikely(data & RxError)) {
152 if (data & RxBreak) {
153 data &= ~(RxFramingError | RxParityError);
154 ++port->icount.brk;
155 if (uart_handle_break (port))
156 continue;
157 }
158 else if (data & RxParityError)
159 ++port->icount.parity;
160 else if (data & RxFramingError)
161 ++port->icount.frame;
LICENSE (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 343 lines
166 If distribution of executable or object code is made by offering
167 access to copy from a designated place, then offering equivalent
168 access to copy the source code from the same place counts as
169 distribution of the source code, even though third parties are not
170 compelled to copy the source along with the object code.
229 8. If the distribution and/or use of the Program is restricted in
230 certain countries either by patents or by copyrighted interfaces, the
231 original copyright holder who places the Program under this License
232 may add an explicit geographical distribution limitation excluding
233 those countries, so that distribution is permitted only in or among
234 countries not thus excluded. In such case, this License incorporates
Java_File_Save.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 143 lines
52 // At most, check the first 250 lines - this sounds reasonable to me
53 int maxLine = Math.min(buffer.getLineCount(),250);
54 import java.util.regex.Pattern;
55 import java.util.regex.Matcher;
60 {
61 String txt = buffer.getLineText(i);
62 int count = 0;
63 // See if this line has a the start or finish of a multiline comment
64 while (txt.indexOf("/*")!=-1 || txt.indexOf("*/")!=-1)
65 {
66 // A little paranoia on my part
67 count++;
68 if (count==1000)
notebook.c
(git://github.com/mason-larobina/luakit.git)
C · 274 lines
✨ Summary
This C code defines a widget for a graphical user interface (GUI) that mimics the behavior of a notebook. It creates a gtk_notebook
widget and connects various signals to callback functions, which emit Lua signals when certain events occur, such as page additions, removals, or switching. The widget is designed to be used with a Lua scripting language, allowing for dynamic GUI interactions.
This C code defines a widget for a graphical user interface (GUI) that mimics the behavior of a notebook. It creates a gtk_notebook
widget and connects various signals to callback functions, which emit Lua signals when certain events occur, such as page additions, removals, or switching. The widget is designed to be used with a Lua scripting language, allowing for dynamic GUI interactions.
89 /* Return the number of widgets in the notebook */
90 static gint
91 luaH_notebook_count(lua_State *L)
92 {
93 widget_t *w = luaH_checkwidget(L, 1);
160 /* push class methods */
161 PF_CASE(COUNT, luaH_notebook_count)
162 PF_CASE(CURRENT, luaH_notebook_current)
163 PF_CASE(GET_TITLE, luaH_notebook_get_title)
Inflate.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 375 lines
✨ Summary
This Java code implements a decompression algorithm for ZIP files, specifically the DEFLATE compression format used by ZIP. It provides methods for inflating compressed data, setting dictionaries, and checking sync points to ensure proper decompression. The code is part of the Zlib library, which is widely used in various applications for compressing and decompressing data.
This Java code implements a decompression algorithm for ZIP files, specifically the DEFLATE compression format used by ZIP. It provides methods for inflating compressed data, setting dictionaries, and checking sync points to ensure proper decompression. The code is part of the Zlib library, which is widely used in various applications for compressing and decompressing data.
Kconfig (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 954 lines
stata.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2980 lines
427 <KEYWORD1>outreg</KEYWORD1>
428 <KEYWORD1>printf</KEYWORD1>
429 <KEYWORD1>count</KEYWORD1>
430 <KEYWORD1>describe</KEYWORD1>
431 <KEYWORD1>list</KEYWORD1>
634 <KEYWORD1>_frr_sztextbox_pnl</KEYWORD1>
635 <KEYWORD1>_gany</KEYWORD1>
636 <KEYWORD1>_ganycount</KEYWORD1>
637 <KEYWORD1>_ganymatch</KEYWORD1>
638 <KEYWORD1>_ganyvalue</KEYWORD1>
639 <KEYWORD1>_gconcat</KEYWORD1>
640 <KEYWORD1>_gcount</KEYWORD1>
641 <KEYWORD1>_gcut</KEYWORD1>
642 <KEYWORD1>_gdiff</KEYWORD1>
test_Iterator.html
(http://enginey.googlecode.com/svn/trunk/)
HTML · 78 lines
✨ Summary
This HTML code creates a test page for Dojox Iterator widgets, showcasing three different scenarios:
- A data store backed iterator that queries a JSON file.
- An array-backed iterator with a custom default value and data source.
- An array-property iterator that iterates over specific properties of an array.
This HTML code creates a test page for Dojox Iterator widgets, showcasing three different scenarios:
- A data store backed iterator that queries a JSON file.
- An array-backed iterator with a custom default value and data source.
- An array-property iterator that iterates over specific properties of an array.
bnx2i.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 772 lines
✨ Summary
This is a C++ header file that defines an interface for a network device driver, specifically for a Fibre Channel over Ethernet (FCoE) adapter. It provides functions and data structures for managing connections, commands, and queues related to FCoE communication. The code appears to be part of a Linux kernel module or a user-space application.
This is a C++ header file that defines an interface for a network device driver, specifically for a Fibre Channel over Ethernet (FCoE) adapter. It provides functions and data structures for managing connections, commands, and queues related to FCoE communication. The code appears to be part of a Linux kernel module or a user-space application.
311 * @pci_func: PCI function number in system pci tree
312 * @pci_devno: PCI device number in system pci tree
313 * @num_wqe_sent: statistic counter, total wqe's sent
314 * @num_cqe_rcvd: statistic counter, total cqe's received
315 * @num_intr_claimed: statistic counter, total interrupts claimed
316 * @link_changed_count: statistic counter, num of link change notifications
317 * received
318 * @ipaddr_changed_count: statistic counter, num times IP address changed while
319 * at least one connection is offloaded
320 * @num_sess_opened: statistic counter, total num sessions opened
321 * @num_conn_opened: statistic counter, total num conns opened on this hba
398 u32 num_cqe_rcvd;
399 u32 num_intr_claimed;
400 u32 link_changed_count;
401 u32 ipaddr_changed_count;
newobject2_runme.rb (https://swig.svn.sourceforge.net/svnroot/swig) Ruby · 16 lines
OffsetManager.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 723 lines
✨ Summary
This Java code implements a dynamic array of positions, used to track changes in a text document. It manages a list of PosBottomHalf
objects, which represent individual positions with an offset value. The class provides methods for inserting and removing positions, updating position offsets, and handling garbage collection. It also includes inner classes for PosTopHalf
and PosBottomHalf
.
This Java code implements a dynamic array of positions, used to track changes in a text document. It manages a list of PosBottomHalf
objects, which represent individual positions with an offset value. The class provides methods for inserting and removing positions, updating position offsets, and handling garbage collection. It also includes inner classes for PosTopHalf
and PosBottomHalf
.
78 //{{{ setVirtualLineCount() method
79 public final void setVirtualLineCount(int index, int lineCount)
80 {
81 virtualLineCounts[index] = lineCount;
187 //{{{ setScreenLineCount() method
188 public final void setScreenLineCount(int line, int count)
189 {
190 lineInfo[line] = ((lineInfo[line] & ~SCREEN_LINES_MASK)
277 if(foldLevel == 0)
278 {
279 newVirtualLineCount = lineCount;
281 for(int i = 0; i < lineCount; i++)
304 for(int i = 0; i < virtualLineCounts.length; i++)
305 {
306 virtualLineCounts[i] = newVirtualLineCount;
307 }
308 } //}}}
slex_iterator.hpp
(http://hadesmem.googlecode.com/svn/trunk/)
C++ Header · 0 lines
✨ Summary
This C++ header file defines a lexer iterator class slex_iterator
that allows for generic parsing of input streams using different lexer implementations. It provides an interface to interact with the lexer, including setting positions and checking include guards. The class is designed to be used in conjunction with Boost Spirit’s multi-pass policies to parse C++ preprocessor input streams.
This C++ header file defines a lexer iterator class slex_iterator
that allows for generic parsing of input streams using different lexer implementations. It provides an interface to interact with the lexer, including setting positions and checking include guards. The class is designed to be used in conjunction with Boost Spirit’s multi-pass policies to parse C++ preprocessor input streams.
ParseException.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 193 lines
✨ Summary
This Java code defines a custom exception class ParseException
that is used to handle parsing errors in an HTML parser generated by JavaCC. It provides constructors for creating exceptions with different information, such as the current token and expected tokens, and a method to generate a human-readable error message. The exception can be thrown when a parsing error occurs during the parsing process.
This Java code defines a custom exception class ParseException
that is used to handle parsing errors in an HTML parser generated by JavaCC. It provides constructors for creating exceptions with different information, such as the current token and expected tokens, and a method to generate a human-readable error message. The exception can be thrown when a parsing error occurs during the parsing process.
4 /**
5 * This exception is thrown when parse errors are encountered.
6 * You can explicitly create objects of this exception type by
7 * calling the method generateParseException in the generated
113 expected += eol + " ";
114 }
115 String retval = "Encountered \"";
116 Token tok = currentToken.next;
117 for (int i = 0; i < maxSize; i++) {
LogOn.cshtml (https://bitbucket.org/davidebbo/mvc3application.git) Razor · 48 lines
BestRowTable.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 139 lines
✨ Summary
This Java class, BestRowTable
, extends JTable to provide a custom layout for rows based on their preferred height. It calculates and sets the best height of the table by iterating through each row, determining its tallest cell’s preferred height, and adding it to the total height. The resulting height is used to set the preferred size of the table.
This Java class, BestRowTable
, extends JTable to provide a custom layout for rows based on their preferred height. It calculates and sets the best height of the table by iterating through each row, determining its tallest cell’s preferred height, and adding it to the total height. The resulting height is used to set the preferred size of the table.
84 // determine tallest cell in the row
85 for ( int column = 0; column < getColumnCount(); column++ ) {
86 TableCellRenderer renderer = getCellRenderer( row, column );
87 Component comp = prepareRenderer( renderer, row, column );
113 */
114 public void packRows( int margin ) {
115 packRows( 0, getRowCount(), margin );
116 }
124 public void packRows( int start, int end, int margin ) {
125 bestHeight = 0;
126 for ( int row = 0; row < getRowCount(); row++ ) {
127 int height = getPreferredRowHeight( row, margin );
128 setRowHeight( row, height );
AbstractTreeUpdater.java (https://bitbucket.org/nbargnesi/idea.git) Java · 439 lines
48 private final MergingUpdateQueue myUpdateQueue;
50 private long myUpdateCount;
51 private boolean myReleaseRequested;
160 }
162 long newUpdateCount = toAdd.getUpdateStamp() == -1 ? myUpdateCount : myUpdateCount + 1;
164 if (!toAdd.isExpired()) {
184 myTreeBuilder.getUi().addActivity();
186 myUpdateCount = newUpdateCount;
187 toAdd.setUpdateStamp(myUpdateCount);
387 @Override
388 public synchronized String toString() {
389 return "AbstractTreeUpdater updateCount=" + myUpdateCount + " queue=[" + myUpdateQueue.toString() + "] " + " nodeQueue=" + myNodeQueue;
390 }
Install.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 118 lines
✨ Summary
This Java code is a main class for an installer, written by Slava Pestov and placed into the public domain. It checks the Java version, handles command-line arguments, loads configuration properties from a file, and provides methods for copying files to a specified output location with progress tracking. It also includes error handling and usage instructions.
This Java code is a main class for an installer, written by Slava Pestov and placed into the public domain. It checks the Java version, handles command-line arguments, loads configuration properties from a file, and provides methods for copying files to a specified output location with progress tracking. It also includes error handling and usage instructions.
php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines
11 </PROPS>
12 <RULES IGNORE_CASE="TRUE">
13 <SPAN TYPE="MARKUP" DELEGATE="PHP">
14 <BEGIN><?php</BEGIN>
16 </SPAN>
18 <SPAN TYPE="MARKUP" DELEGATE="PHP">
19 <BEGIN><?</BEGIN>
20 <END>?></END>
21 </SPAN>
23 <SPAN TYPE="MARKUP" DELEGATE="PHP">
24 <BEGIN><%=</BEGIN>
25 <END>%></END>
65 <RULES SET="TAGS" DEFAULT="MARKUP">
66 <SPAN TYPE="MARKUP" DELEGATE="PHP">
67 <BEGIN><?php</BEGIN>
qdrawhelper_sse2.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 544 lines
236 }
238 void qt_memfill32_sse2(quint32 *dest, quint32 value, int count)
239 {
240 if (count < 7) {
252 const int align = (quintptr)(dest) & 0xf;
253 switch (align) {
254 case 4: *dest++ = value; --count;
255 case 8: *dest++ = value; --count;
257 }
259 int count128 = count / 4;
260 __m128i *dst128 = reinterpret_cast<__m128i*>(dest);
261 const __m128i value128 = _mm_set_epi32(value, value, value, value);
273 if (rest) {
274 switch (rest) {
275 case 3: dest[count - 3] = value;
276 case 2: dest[count - 2] = value;
CharIndexedSegment.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 97 lines
✨ Summary
This Java class, CharIndexedSegment
, provides a way to search within Segment
objects using regular expressions. It allows for searching in both forward and reverse directions, with methods to get the character at a specific index, check if an index is valid, reset the index, and move the index by a certain amount.
This Java class, CharIndexedSegment
, provides a way to search within Segment
objects using regular expressions. It allows for searching in both forward and reverse directions, with methods to get the character at a specific index, check if an index is valid, reset the index, and move the index by a certain amount.
53 {
54 this.seg = seg;
55 m_index = (reverse ? seg.count - 1 : 0);
56 this.reverse = reverse;
57 } //}}}
63 index = -index;
65 return ((m_index + index) < seg.count && m_index + index >= 0)
66 ? seg.array[seg.offset + m_index + index]
67 : CharIndexed.OUT_OF_BOUNDS;
71 public boolean isValid()
72 {
73 return (m_index >=0 && m_index < seg.count);
74 } //}}}
CurrentBufferSet.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 67 lines
✨ Summary
This Java class, CurrentBufferSet
, implements a file set for searching the current buffer in an editor. It provides methods to get the first, next, and all files in the set, as well as the total number of files and code associated with it. The class is designed to work within an editor’s search functionality, allowing users to search the contents of the currently open file.
This Java class, CurrentBufferSet
, implements a file set for searching the current buffer in an editor. It provides methods to get the first, next, and all files in the set, as well as the total number of files and code associated with it. The class is designed to work within an editor’s search functionality, allowing users to search the contents of the currently open file.
BshClassManager.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 353 lines
✨ Summary
This Java code defines a class called BshClassManager
that manages the loading of classes for a BeanShell scripting environment. It provides methods to add and remove listeners, reload classes, and set an external class loader. The class also maintains caches of loaded classes and provides methods to clear these caches.
This Java code defines a class called BshClassManager
that manages the loading of classes for a BeanShell scripting environment. It provides methods to add and remove listeners, reload classes, and set an external class loader. The class also maintains caches of loaded classes and provides methods to clear these caches.
76 Perhaps a simpler idea would be to have entities that reference cached
77 types always perform a light weight check with a counter / reference
78 value and use that to detect changes in the namespace. This puts the
79 burden on the consumer to check at appropriate times, but could eliminate
148 /**
149 Load the specified class by name, taking into account added classpath
150 and reloaded classes, etc.
151 @return the class or null
word_count_functor.flex (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines
20 %%
22 bool count(int tok, int* c, int* w, int* l)
23 {
24 switch (tok) {
36 int tok = EOF;
37 int c = 0, w = 0, l = 0;
38 yyin = fopen(1 == argc ? "word_count.input" : argv[1], "r");
39 if (NULL == yyin) {
40 fprintf(stderr, "Couldn't open input file!\n");
45 do {
46 tok = yylex();
47 if (!count(tok, &c, &w, &l))
48 break;
49 } while (EOF != tok);
qdesktopservices.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 312 lines
109 Many desktop environments provide services that can be used by applications to
110 perform common tasks, such as opening a web page, in a way that is both consistent
111 and takes into account the user's application preferences.
113 This class contains functions that provide simple interfaces to these services
Threshold.h
(https://freespeech.svn.sourceforge.net/svnroot/freespeech)
C++ Header · 47 lines
✨ Summary
This C++ header file defines a class Threshold
that inherits from Node
. It represents a node in a graphical processing pipeline, specifically for applying a threshold to an image. The class has a constructor, destructor, and a method to retrieve output data. It also includes copyright information and licensing details under the GNU General Public License.
This C++ header file defines a class Threshold
that inherits from Node
. It represents a node in a graphical processing pipeline, specifically for applying a threshold to an image. The class has a constructor, destructor, and a method to retrieve output data. It also includes copyright information and licensing details under the GNU General Public License.
LICENSE-2.0.txt (https://bitbucket.org/nbargnesi/idea.git) Plain Text · 202 lines
82 with the Work to which such Contribution(s) was submitted. If You
83 institute patent litigation against any entity (including a
84 cross-claim or counterclaim in a lawsuit) alleging that the Work
85 or a Contribution incorporated within the Work constitutes direct
86 or contributory patent infringement, then any patent licenses
ContextOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 381 lines
✨ Summary
This Java code creates a graphical user interface (GUI) for adding new actions to an editor. It allows users to select an action set, choose an action from that set, and add it to the editor’s context menu. The GUI includes options for customizing the action’s label and separator. When the “OK” button is clicked, the selected action is added to the editor’s context menu.
This Java code creates a graphical user interface (GUI) for adding new actions to an editor. It allows users to select an action set, choose an action from that set, and add it to the editor’s context menu. The GUI includes options for customizing the action’s label and separator. When the “OK” button is clicked, the selected action is added to the editor’s context menu.
Duplicate_Line.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 71 lines
BSHBinaryExpression.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 228 lines
✨ Summary
This Java class implements binary expressions for a scripting language, specifically handling instanceof and boolean operations. It evaluates the left-hand side of an expression, determines its type, and then performs the specified operation on the left-hand side and right-hand side based on their types. The result is returned as a Primitive object.
This Java class implements binary expressions for a scripting language, specifically handling instanceof and boolean operations. It evaluates the left-hand side of an expression, determines its type, and then performs the specified operation on the left-hand side and right-hand side based on their types. The result is returned as a Primitive object.
153 // (primitiveValue = not null, not void)
155 int primCount = 0;
156 if ( isPrimitiveValue( lhs ) )
157 ++primCount;
158 if ( isPrimitiveValue( rhs ) )
159 ++primCount;
161 if ( primCount > 1 )
163 throw new InterpreterError("should not be here");
164 else
165 if ( primCount == 1 )
166 // mixture of one and the other
167 throw new EvalError("Operator: '" + tokenImage[kind]
TMXTileSet.java
(http://loon-simple.googlecode.com/svn/trunk/)
Java · 191 lines
✨ Summary
This Java class represents a tile set in a TMX (Tiled Map eXchange) file format, used for creating maps in games. It loads and parses the tile set data from an XML file, storing information such as tile dimensions, spacing, and properties. The class provides methods to access and manipulate this data, including getting tile coordinates and checking if a given GID (global ID) is within the tile set’s range.
This Java class represents a tile set in a TMX (Tiled Map eXchange) file format, used for creating maps in games. It loads and parses the tile set data from an XML file, storing information such as tile dimensions, spacing, and properties. The class provides methods to access and manipulate this data, including getting tile coordinates and checking if a given GID (global ID) is within the tile set’s range.
Results.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 117 lines
✨ Summary
This Java class, Results
, is used to track and count different types of node types encountered during a parsing process. It provides methods to increment counters for classes, interfaces, methods, reference fields (non-primitive), and primitive fields. The class also includes a method to reset the counters to zero, allowing for a new parse to start counting from scratch.
This Java class, Results
, is used to track and count different types of node types encountered during a parsing process. It provides methods to increment counters for classes, interfaces, methods, reference fields (non-primitive), and primitive fields. The class also includes a method to reset the counters to zero, allowing for a new parse to start counting from scratch.
30 /**
31 * Accumulates the count of specific node types, that is, this keeps a count
32 * of the number of classed, interfaces, methods, and fields that the parser
33 * found.
39 private int methodCount = 0;
40 private int referenceFieldCount = 0; // count of fields that are some sort of Object, not a primitive
41 private int primitiveFieldCount = 0; // count of fields that are some sort of primitive, i.e. int, char, etc.
63 public void incClassCount() {
64 classCount++;
65 }
111 public String toString() {
112 return " Classes: " + classCount + ", Interfaces: " + interfaceCount + ", Methods: " + methodCount + ", Fields: " + (referenceFieldCount + primitiveFieldCount);
113 }
qdrawhelper_mmx.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 155 lines
IDBBackingStore.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 114 lines
32 #include "SQLiteDatabase.h"
33 #include <wtf/PassRefPtr.h>
34 #include <wtf/RefCounted.h>
35 #include <wtf/RefPtr.h>
36 #include <wtf/Vector.h>
43 class SecurityOrigin;
45 class IDBBackingStore : public RefCounted<IDBBackingStore> {
46 public:
47 virtual ~IDBBackingStore() {};
54 virtual void deleteObjectStore(int64_t databaseId, int64_t objectStoreId) = 0;
56 class ObjectStoreRecordIdentifier : public RefCounted<ObjectStoreRecordIdentifier> {
57 public:
58 virtual bool isValid() const = 0;
SQLTransaction.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 137 lines
35 #include <wtf/Deque.h>
36 #include <wtf/Forward.h>
37 #include <wtf/ThreadSafeRefCounted.h>
38 #include <wtf/Vector.h>
51 class VoidCallback;
53 class SQLTransactionWrapper : public ThreadSafeRefCounted<SQLTransactionWrapper> {
54 public:
55 virtual ~SQLTransactionWrapper() { }
60 };
62 class SQLTransaction : public ThreadSafeRefCounted<SQLTransaction> {
63 public:
64 static PassRefPtr<SQLTransaction> create(Database*, PassRefPtr<SQLTransactionCallback>, PassRefPtr<SQLTransactionErrorCallback>,
projection.py
(https://bitbucket.org/copelco/django-timepiece/)
Python · 288 lines
✨ Summary
This Python code is a test suite for a project management system, specifically testing various aspects of assignment and allocation logic. It creates assignments with different start and end dates, hours, and priority types, then tests how these are projected, allocated, and tracked over time, including unallocated hours, user allocations, and hour tracking.
This Python code is a test suite for a project management system, specifically testing various aspects of assignment and allocation logic. It creates assignments with different start and end dates, hours, and priority types, then tests how these are projected, allocated, and tracked over time, including unallocated hours, user allocations, and hour tracking.
56 end = datetime.date(2011, 1, 29)
57 weeks = utils.generate_weeks(start=start, end=end)
58 self.assertEqual(2, weeks.count())
59 # 3 weeks
60 start = datetime.date(2011, 1, 16)
61 end = datetime.date(2011, 1, 30)
62 weeks = utils.generate_weeks(start=start, end=end)
63 self.assertEqual(3, weeks.count())
64 # random weeks
65 num = random.randint(5, 20)
67 end = start + datetime.timedelta(weeks=num - 1)
68 weeks = utils.generate_weeks(start=start, end=end)
69 self.assertEqual(num, weeks.count())
71 def test_week_window(self):
FtpPlugin.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 169 lines
✨ Summary
This Java code defines a plugin for the JEdit text editor, specifically an FTP (File Transfer Protocol) plugin. It provides methods to open and save files from an FTP server, as well as initialize the SSH tools home directory with default configuration files. The plugin uses various utility classes and logging mechanisms to handle file operations and errors.
This Java code defines a plugin for the JEdit text editor, specifically an FTP (File Transfer Protocol) plugin. It provides methods to open and save files from an FTP server, as well as initialize the SSH tools home directory with default configuration files. The plugin uses various utility classes and logging mechanisms to handle file operations and errors.
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.
61 }
63 //http://discussion.forum.nokia.com/forum/showthread.php?t=76814
64 //by abirr
65 private int getNextCharacter() throws IOException {
72 t=-1;
73 }else if( b < 0x80 ){ // Check for UTF8 compliancy
74 throw new IOException("Bad UTF-8 Encoding encountered");
75 }else if((t|0xE0)==t) {
76 int c = is.read();
78 t=-1;
79 }else if( c < 0x80 ){ // Check for UTF8 compliancy
80 throw new IOException("Bad UTF-8 Encoding encountered");
81 }else
82 t=((a & 0x0F)<<12) | ((b & 0x3F)<<6) | (c & 0x3F);
query.php
(http://forceworkbench.googlecode.com/svn/trunk/workbench/)
PHP · 996 lines
✨ Summary
This PHP code is part of a Salesforce Workbench application, handling query-related functionality. It generates query results, exports data to CSV, and allows users to execute queries asynchronously. The code also handles errors, warnings, and export options, providing a user-friendly interface for interacting with Salesforce data.
This PHP code is part of a Salesforce Workbench application, handling query-related functionality. It generates query results, exports data to CSV, and allows users to execute queries asynchronously. The code also handles errors, warnings, and export options, providing a user-friendly interface for interacting with Salesforce data.
90 queryAsync($queryRequest);
91 } else if (isset($_POST['querySubmit']) && $_POST['querySubmit']=='Query' && $queryRequest->getSoqlQuery() != null && $queryRequest->getExportTo() == 'csv') {
92 if (!substr_count($_POST['soql_query'],"count()")) {
93 $records = query($queryRequest->getSoqlQuery(),$queryRequest->getQueryAction(),null,true);
94 exportQueryAsCsv($records,$queryRequest->getExportTo());
784 }
786 if (count($allColNames) == 0 || count($allRowNames) == 0) {
787 displayWarning("No records match matrix column and row selections.", false, true);
788 return;
937 if ($records) {
938 try {
939 $csvFile = fopen('php://output','w') or die("Error opening php://output");
940 $csvFilename = "export" . date('YmdHis') . ".csv";
941 header("Content-Type: application/csv");
neponset_defconfig (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 1143 lines
TemplateDir.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 229 lines
✨ Summary
This Java code defines a TemplateDir
class, which represents a directory within a templates hierarchy. It scans the templates directory, creates a tree of template files and directories, and generates a string representation of the hierarchy for debugging purposes. The class provides methods to access and manipulate the template directory structure, including adding menu items and retrieving child nodes.
This Java code defines a TemplateDir
class, which represents a directory within a templates hierarchy. It scans the templates directory, creates a tree of template files and directories, and generates a string representation of the hierarchy for debugging purposes. The class provides methods to access and manipulate the template directory structure, including adding menu items and retrieving child nodes.
Resolver.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 969 lines
✨ Summary
This Java code is part of a JEdit plugin that manages external resources, such as XML files. It handles caching, network modes, and resource updates. The code provides methods for adding, updating, and removing resources from the cache, as well as handling changes to the user’s settings and file system. It also includes a class for handling VFS (Virtual File System) updates.
This Java code is part of a JEdit plugin that manages external resources, such as XML files. It handles caching, network modes, and resource updates. The code provides methods for adding, updating, and removing resources from the cache, as well as handling changes to the user’s settings and file system. It also includes a class for handling VFS (Virtual File System) updates.
108 if(loadedCache)
109 {
110 int systemCount = 0;
111 int publicCount = 0;
121 if(entry.type == Entry.PUBLIC)
122 {
123 jEdit.setProperty("xml.cache.public-id." + publicCount,entry.id);
124 jEdit.setProperty("xml.cache.public-id." + publicCount
125 + ".uri",uri.toString());
126 publicCount++;
127 }
128 else
129 {
130 jEdit.setProperty("xml.cache.system-id." + systemCount,entry.id);
131 jEdit.setProperty("xml.cache.system-id." + systemCount
Folder.pm
(git://github.com/openmelody/melody.git)
Perl · 105 lines
✨ Summary
This Perl code defines a class MT::Folder
for managing folders in a blogging system, specifically Movable Type. It provides methods for removing folders and their associated pages, handling file deletion and rebuilding entries when necessary. The code is part of the Movable Type CMS and is distributed under the GNU General Public License.
This Perl code defines a class MT::Folder
for managing folders in a blogging system, specifically Movable Type. It provides methods for removing folders and their associated pages, handling file deletion and rebuilding entries when necessary. The code is part of the Movable Type CMS and is distributed under the GNU General Public License.
shared_ptr.cpp
(http://hadesmem.googlecode.com/svn/trunk/)
C++ · 0 lines
✨ Summary
This C++ code defines a Boost Python module named shared_ptr_ext
that provides a set of classes and functions for working with shared pointers in Python. It exposes various classes, including A
, X
, Y
, Z
, and Test
, along with their corresponding Python wrappers, allowing users to interact with them using Python. The code also defines several functions for manipulating shared pointers.
This C++ code defines a Boost Python module named shared_ptr_ext
that provides a set of classes and functions for working with shared pointers in Python. It exposes various classes, including A
, X
, Y
, Z
, and Test
, along with their corresponding Python wrappers, allowing users to interact with them using Python. The code also defines several functions for manipulating shared pointers.
HyperSearchRequest.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 218 lines
✨ Summary
This Java class, HyperSearchRequest
, is a work request that runs in an I/O thread to perform a hypersearch operation on a given text buffer. It searches for matches of a specified pattern within the buffer and updates a tree model with the results. The search can be performed on a single buffer or multiple buffers, depending on the selection provided.
This Java class, HyperSearchRequest
, is a work request that runs in an I/O thread to perform a hypersearch operation on a given text buffer. It searches for matches of a specified pattern within the buffer and updates a tree model with the results. The search can be performed on a single buffer or multiple buffers, depending on the selection provided.
78 bufferCount = 1;
79 resultCount += thisResultCount;
80 }
81 }
96 bufferCount++;
97 resultCount += thisResultCount;
98 }
99 }
117 final int _resultCount = resultCount;
118 final int _bufferCount = bufferCount;
119 VFSManager.runInAWTThread(new Runnable()
120 {
121 public void run()
122 {
123 results.searchDone(_resultCount,_bufferCount);
124 }
125 });
ellint_3.html
(http://hadesmem.googlecode.com/svn/trunk/)
HTML · 0 lines
✨ Summary
This HTML code outputs a documentation page for a mathematical function, specifically the elliptic integral of the third kind. It provides information on the function’s properties, usage, and implementation details, including its relation to Carlson’s integrals. The page includes equations, diagrams, and references to external resources, such as the Boost Software License.
This HTML code outputs a documentation page for a mathematical function, specifically the elliptic integral of the third kind. It provides information on the function’s properties, usage, and implementation details, including its relation to Carlson’s integrals. The page includes equations, diagrams, and references to external resources, such as the Boost Software License.
bsh.jjt (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 1381 lines
523 Token t = null;
524 Modifiers mods;
525 int count;
526 }
527 {
535 )
536 FormalParameters()
537 [ "throws" count=NameList() { jjtThis.numThrows=count; } ]
538 ( Block() | ";" )
539 }
676 { int count = 0; }
677 {
678 AmbiguousName() { ++count; } ( "," AmbiguousName() { ++count; } )*
679 { return count; }
LogViewer.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 257 lines
✨ Summary
This Java code implements a Log Viewer GUI component for an integrated development environment (IDE). It displays a list of log entries, allows users to toggle between showing only the most recent logs and all logs, and provides a copy function to extract selected log entries into a string buffer. The component also updates its display when the IDE’s settings change.
This Java code implements a Log Viewer GUI component for an integrated development environment (IDE). It displays a list of log entries, allows users to toggle between showing only the most recent logs and all logs, and provides a copy function to extract selected log entries into a string buffer. The component also updates its display when the IDE’s settings change.
AncestorToolBar.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 71 lines
✨ Summary
This Java code defines a custom toolbar component, AncestorToolBar
, which is used to display a list of ancestor files for a given buffer in an integrated development environment (IDE). It adds buttons representing these ancestors, with their enabled state determined by the number of ancestors displayed. The toolbar also includes a “glue” component to separate it from other toolbars.
This Java code defines a custom toolbar component, AncestorToolBar
, which is used to display a list of ancestor files for a given buffer in an integrated development environment (IDE). It adds buttons representing these ancestors, with their enabled state determined by the number of ancestors displayed. The toolbar also includes a “glue” component to separate it from other toolbars.
doh.h
(https://swig.svn.sourceforge.net/svnroot/swig)
C++ Header · 447 lines
✨ Summary
This is a C++ header file that provides a set of data structures and functions for working with objects, strings, files, and other data types. It defines classes and functions for managing memory, performing operations on data, and handling errors. The code appears to be part of a larger library or framework, providing a way to interact with various types of data in a consistent and efficient manner.
This is a C++ header file that provides a set of data structures and functions for working with objects, strings, files, and other data types. It defines classes and functions for managing memory, performing operations on data, and handling errors. The code appears to be part of a larger library or framework, providing a way to interact with various types of data in a consistent and efficient manner.
users-guide.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 711 lines
183 You can get it from <emphasis>Gnu</emphasis>: <uri>http://ftp.gnu.org/gnu/aspell/w32/</uri>.
184 The installer is <ulink url="http://ftp.gnu.org/gnu/aspell/w32/Aspell-0-50-3-3-Setup.exe">Aspell-0-50-3-3-Setup.exe</ulink>.
185 The dictionary for your language of choice comes by the two letter ISO code of the country, like
186 <ulink url="http://ftp.gnu.org/gnu/aspell/w32/aspell-fr-0.50-3-3.exe">Aspell-fr-0.50-3-3.exe</ulink> for French,
187 or <ulink url="http://ftp.gnu.org/gnu/aspell/w32/aspell-uk-0.50-3-3.exe">Aspell-uk-0.50-3-3.exe</ulink> for UK English.
592 text file. jEdit will pick <code>UTF-8</code> encoding. When you open the file,
593 any change in a dictionary will be persisted, so that you can review the latest
594 changes. On save, the user dictionary will be reloaded to take your changes into account.
595 </para>
596 <para>Otherwise, changed dictionaries are saved when the plugin has stopped.
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>.
stats3.q.out (https://svn.apache.org/repos/asf/incubator/hcatalog/) text · 0 lines
47 5 test_part test_Part
48 6 test_part test_Part
49 PREHOOK: query: select count(1) from hive_test_dst
50 PREHOOK: type: QUERY
51 PREHOOK: Input: default@hive_test_dst@pcol1=test_part/pcol2=test_Part
52 PREHOOK: Output: file:/tmp/krishnak/hive_2011-03-21_05-22-28_776_220190187790387003/-mr-10000
53 POSTHOOK: query: select count(1) from hive_test_dst
54 POSTHOOK: type: QUERY
55 POSTHOOK: Input: default@hive_test_dst@pcol1=test_part/pcol2=test_Part
75 POSTHOOK: Lineage: hive_test_dst PARTITION(pcol1=test_part,pcol2=test_Part).col1 SIMPLE [(hive_test_src)hive_test_src.FieldSchema(name:col1, type:string, comment:null), ]
76 POSTHOOK: Lineage: hive_test_dst PARTITION(pcol1=test_part,pcol2=test_Part).col1 SIMPLE [(hive_test_src)hive_test_src.FieldSchema(name:col1, type:string, comment:null), ]
77 PREHOOK: query: select count(1) from hive_test_dst
78 PREHOOK: type: QUERY
79 PREHOOK: Input: default@hive_test_dst@pcol1=test_part/pcol2=test_Part
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.
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 *
118 {"cons", IOV_CONS, 0, IOVT_BUFFER, 0 },
119 #endif
120 {"clearcounts", IOV_CLEARCOUNTS, 0, IOVT_VOID, 0 },
121 {"gpioob", IOV_GPIOOB, 0, IOVT_UINT32, 0 },
122 {"ioctl_timeout", IOV_IOCTLTIMEOUT, 0, IOVT_UINT32, 0 },
568 {WLC_E_SCAN_CONFIRM_IND, "SCAN_CONFIRM_IND"},
569 {WLC_E_PSK_SUP, "PSK_SUP"},
570 {WLC_E_COUNTRY_CODE_CHANGED, "COUNTRY_CODE_CHANGED"},
571 {WLC_E_EXCEEDED_MEDIUM_TIME, "EXCEEDED_MEDIUM_TIME"},
572 {WLC_E_ICV_ERROR, "ICV_ERROR"},
xfs_buf_item.h
(http://photon-android.googlecode.com/svn/)
C++ Header · 144 lines
✨ Summary
This C header file defines structures and constants for managing buffer logs in a file system, specifically XFS. It provides data types for logging item formats, flags, and recovery information, as well as functions for initializing, releasing, and manipulating log items. The code is part of the XFS kernel module and is used during file system operations such as logging and recovery.
This C header file defines structures and constants for managing buffer logs in a file system, specifically XFS. It provides data types for logging item formats, flags, and recovery information, as well as functions for initializing, releasing, and manipulating log items. The code is part of the XFS kernel module and is used during file system operations such as logging and recovery.
96 struct xfs_buf *bli_buf; /* real buffer pointer */
97 unsigned int bli_flags; /* misc flags */
98 unsigned int bli_recur; /* lock recursion count */
99 atomic_t bli_refcount; /* cnt of tp refs */
115 xfs_daddr_t bc_blkno;
116 uint bc_len;
117 int bc_refcount;
118 struct xfs_buf_cancel *bc_next;
119 } xfs_buf_cancel_t;
cwrpt_company1.asp
(git://github.com/zhaowe/bc.git)
ASP · 167 lines
✨ Summary
This ASP code generates a web page that displays flight information, including company, flight number, price, and agent fees, for a specified date range. It retrieves data from a database using ADO and formats the output into a table with colored headers and cells. If no data is found, it displays an error message with a link to another ASP page.
This ASP code generates a web page that displays flight information, including company, flight number, price, and agent fees, for a specified date range. It retrieves data from a database using ADO and formats the output into a table with colored headers and cells. If no data is found, it displays an error message with a link to another ASP page.
matroxfb_base.h
(http://photon-android.googlecode.com/svn/)
C++ Header · 734 lines
✨ Summary
This is a C++ header file that provides definitions and macros for interacting with a Matrox Millennium graphics card. It defines various registers, functions, and macros for reading and writing data to the card’s memory, as well as handling interrupts and synchronization. The code appears to be specific to the Matrox Millennium graphics card and is likely used in a Linux driver or firmware implementation.
This is a C++ header file that provides definitions and macros for interacting with a Matrox Millennium graphics card. It defines various registers, functions, and macros for reading and writing data to the card’s memory, as well as handling interrupts and synchronization. The code appears to be specific to the Matrox Millennium graphics card and is likely used in a Linux driver or firmware implementation.
361 int dead;
362 int initialized;
363 unsigned int usecount;
365 unsigned int userusecount;
405 struct matroxfb_driver* (drivers[MATROXFB_MAX_FB_DRIVERS]);
406 void* (drivers_data[MATROXFB_MAX_FB_DRIVERS]);
407 unsigned int drivers_count;
409 struct {
603 #define M_IEN 0x1E1C
605 #define M_VCOUNT 0x1E20
607 #define M_RESET 0x1E40
Date.dim (https://MSFTDBProdSamples.svn.codeplex.com/svn) Unknown · 722 lines
79 <Name>Fiscal Year</Name>
80 <Type>FiscalYears</Type>
81 <EstimatedCount>4</EstimatedCount>
82 <KeyColumns>
83 <KeyColumn dwd:design-time-name="524b4859-10ac-4407-a06d-eafb58c788f6">
113 <Type>Date</Type>
114 <Usage>Key</Usage>
115 <EstimatedCount>1158</EstimatedCount>
116 <KeyColumns>
117 <KeyColumn dwd:design-time-name="b0ba3f46-6faf-4689-8ea8-e83e99e795fb">
177 <Name>Calendar Quarter</Name>
178 <Type>Quarters</Type>
179 <EstimatedCount>13</EstimatedCount>
180 <KeyColumns>
181 <KeyColumn dwd:design-time-name="0b96d4d7-8f2d-4a03-b6a8-f33cb066dcc5">
lcnalloc.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 146 lines
✨ Summary
This C header file provides functions for managing clusters on an NTFS volume, including allocating and deallocating clusters from the file system’s runlist data structure. It allows for freeing of clusters in a specific range, handling locking and error checking to ensure thread safety and proper attribute search context management.
This C header file provides functions for managing clusters on an NTFS volume, including allocating and deallocating clusters from the file system’s runlist data structure. It allows for freeing of clusters in a specific range, handling locking and error checking to ensure thread safety and proper attribute search context management.
43 extern runlist_element *ntfs_cluster_alloc(ntfs_volume *vol,
44 const VCN start_vcn, const s64 count, const LCN start_lcn,
45 const NTFS_CLUSTER_ALLOCATION_ZONES zone,
46 const bool is_extension);
48 extern s64 __ntfs_cluster_free(ntfs_inode *ni, const VCN start_vcn,
49 s64 count, ntfs_attr_search_ctx *ctx, const bool is_rollback);
51 /**
53 * @ni: ntfs inode whose runlist describes the clusters to free
54 * @start_vcn: vcn in the runlist of @ni at which to start freeing clusters
55 * @count: number of clusters to free or -1 for all clusters
56 * @ctx: active attribute search context if present or NULL if not
57 *
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.
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);
287 preg_match('|<mm:trackList>(.+)</mm:trackList>|s', $raw_data, $trackRdf);
288 preg_match_all('|<rdf:li rdf:resource="(.+)"/>|', $trackRdf[1], $trackUrls, PREG_PATTERN_ORDER);
312 //looks like: [date] in [country], e.g. "2008-01-10 in GB"
313 if (count($releaseDate) >= 2)
314 {
315 $fullResult['add'][$uri]['http://www.w3.org/2000/01/rdf-schema#comment'] = array();
318 //release date and country
319 $rel_date = $releaseDate[1][$i];
320 $rel_country = $releaseCountry[1][$i];
322 //will be shown:
332 //country may be 0 or "" -> don't write to database
333 if (($rel_country != "0") && ($rel_country != ""))
334 {
335 $text .= "in $rel_country";