100+ results for 'php range'

Not the results you expected?

PKPGiftDAO.inc.php (https://github.com/davekisly/pkp-lib.git) PHP · 497 lines

1 <?php

2

3 /**

4 * @file classes/gift/PKPGiftDAO.inc.php

5 *

6 * Copyright (c) 2000-2011 John Willinsky

253 * @return object DAOResultFactory containing matching Gifts

254 */

255 function &getGiftsByAssocId($assocType, $assocId, $rangeInfo = null) {

256 $result =& $this->retrieveRange(

260 ORDER BY gift_id DESC',

261 array($assocType, $assocId),

262 $rangeInfo

263 );

264

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

29 public function get_export_button() {

30

31 $current_range = ! empty( $_GET['range'] ) ? sanitize_text_field( $_GET['range'] ) : 'last_month';

32 ?>

33 <a

34 href="#"

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

36 class="export_csv"

37 data-export="table"

53 );

54

55 $current_range = ! empty( $_GET['range'] ) ? sanitize_text_field( $_GET['range'] ) : 'last_month';

56

57 if ( ! in_array( $current_range, array( 'custom', 'year', 'last_month', 'month', '7day' ) ) ) {

Csv.php (https://github.com/sbourget/moodle.git) PHP · 404 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Writer;

4

5 use PhpOffice\PhpSpreadsheet\Calculation\Calculation;

6 use PhpOffice\PhpSpreadsheet\Spreadsheet;

7

8 class Csv extends BaseWriter

9 {

10 /**

11 * PhpSpreadsheet object.

12 *

13 * @var Spreadsheet

34 * @var string

35 */

36 private $lineEnding = PHP_EOL;

37

38 /**

ConcurrencyFixture.cs (https://github.com/jlarsson/KiwiDB.git) C# · 163 lines

18 var allReadersActiveEvent = new ManualResetEvent(false);

19

20 var tasks = (from i in Enumerable.Range(0, readerCount)

21 select new Task(() => GetCollection().ExecuteRead(c =>

22 {

94 DatabaseFileProvider.Timeout = TimeSpan.FromSeconds(10);

95

96 var writers = from i in Enumerable.Range(0, 5) select new Task(() =>

97 {

98 while (!quitEvent.WaitOne(0))

121 }

122 );

123 var readers = from i in Enumerable.Range(0, 5)

124 select new Task(() =>

125 {

querying.cpp (https://gitlab.com/cdeclare/intcrypt) C++ · 293 lines

232 }

233

234 void equal_range_test()

235 {

236 using boost::phoenix::arg_names::arg1;

237 int array[] = {1,2,2,3};

238 const std::set<int> test_set(array, array + 4);

239 BOOST_TEST(boost::phoenix::equal_range(arg1, 2)(array).first ==

240 array + 1);

241 BOOST_TEST(boost::phoenix::equal_range(arg1, 2)(array).second ==

242 array + 3);

243

244 BOOST_TEST(boost::phoenix::equal_range(arg1, 2)(test_set).first ==

245 test_set.equal_range(2).first);

246 BOOST_TEST(boost::phoenix::equal_range(arg1, 2)(test_set).second ==

247 test_set.equal_range(2).second);

SequenceTest.php (https://bitbucket.org/mkjpryor/lazy-sequence.git) PHP · 369 lines

157

158 // Test that take can be used with an infinite sequence and returns

159 $this->assertEquals([1, 2, 3], S::toArray(S::take(S::range(1), 3)));

160 }

161

185

186 // Test that takeWhile can be used with an infinite sequence and returns

187 $this->assertEquals([1, 2], S::toArray(S::takeWhile(S::range(1), $lessThan3)));

188 }

189

324 $this->assertEquals([1], S::toArray(S::range(1, 1, 1)));

325 $this->assertEquals([1], S::toArray(S::range(1, 1, -1)));

326

327 // Test that range can create multi-element array with different +ve and -ve steps

334 $this->assertEquals([10, 8, 6, 4, 2, 0], S::toArray(S::range(10, 0, -2)));

335

336 // Check that range can create infinite sequences (i.e. the same range command

337 // can be used to create arrays of different sizes by taking more or less items)

338 $this->assertEquals([1, 3, 5], S::toArray(S::take(S::range(1, null, 2), 3)));

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

1 <?php

2

3 /**

9 * @copyright 2006

10 * @license BSD

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

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

66

67 /**

68 * Whether the parser should compile the unicode ranges

69 *

70 * @access private

GTMNSString+HTML.m (http://update-engine.googlecode.com/svn/trunk/) Objective C · 523 lines ✨ Summary

This Objective C code provides methods for manipulating HTML strings in an iOS application. It includes functions to escape HTML characters into a string, unescape them back into their original form, and handle specific types of HTML sequences such as decimal and hexadecimal codes. The code uses regular expressions and string manipulation techniques to achieve these tasks.

457 NSRange range = NSMakeRange(0, [self length]);

458 NSRange subrange = [self rangeOfString:@"&" options:NSBackwardsSearch range:range];

459

460 // if no ampersands, we've got a quick way out

462 NSMutableString *finalString = [NSMutableString stringWithString:self];

463 do {

464 NSRange semiColonRange = NSMakeRange(subrange.location, NSMaxRange(range) - subrange.location);

465 semiColonRange = [self rangeOfString:@";" options:0 range:semiColonRange];

469 continue;

470 }

471 NSRange escapeRange = NSMakeRange(subrange.location, semiColonRange.location - subrange.location + 1);

472 NSString *escapeString = [self substringWithRange:escapeRange];

514 }

515 }

516 } while ((subrange = [self rangeOfString:@"&" options:NSBackwardsSearch range:range]).length != 0);

517 return finalString;

518 } // gtm_stringByUnescapingHTML

Accounts.php (https://github.com/srsree/OurBank.git) PHP · 355 lines

1 <?php

2 /*

3 ############################################################################

20 ?>

21

22 <?php

23 class Loanaccount_Model_Accounts extends Zend_Db_Table {

24 protected $_name = 'ourbank_accounts';

260 $db->setFetchMode(Zend_Db::FETCH_OBJ);

261 $sql = "SELECT

262 period_ofrange_description ,

263 Interest

264 FROM

279 ourbank_interest_periods

280 WHERE

281 period_ofrange_monthfrom <= $interest AND

282 period_ofrange_monthto >= $interest AND

resizearray.fs (https://github.com/dmohl/fsharppowerpack_Net40.git) F# · 325 lines

30 if start2 < 0 then invalidArg "start2" "index must be positive"

31 if len < 0 then invalidArg "len" "length must be positive"

32 if start1 + len > length arr1 then invalidArg "start1" "(start1+len) out of range"

33 if start2 + len > length arr2 then invalidArg "start2" "(start2+len) out of range"

IGraphDS_API.cs (https://github.com/karsten-wolfert/sones.git) C# · 192 lines

152 [ServiceKnownType(typeof(ServicePropertyExpression))]

153 [ServiceKnownType(typeof(ServiceSingleLiteralExpression))]

154 [ServiceKnownType(typeof(ServiceRangeLiteralExpression))]

155 [ServiceKnownType(typeof(ServiceCollectionLiteralExpression))]

156 List<ServiceVertexInstance> GetVertices(SecurityToken mySecurityToken, Int64 myTransactionToken, ServiceBaseExpression myExpression);

180.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 52 lines

1 <?php

2

3 $ranges = array(

AnnotationLoaderTest.php (https://github.com/marphi/symfony.git) PHP · 223 lines

1 <?php

2

3 /*

13

14 use Doctrine\Common\Annotations\AnnotationReader;

15 use PHPUnit\Framework\TestCase;

16 use Symfony\Component\Validator\Constraints\All;

17 use Symfony\Component\Validator\Constraints\AtLeastOneOf;

25 use Symfony\Component\Validator\Constraints\NotNull;

26 use Symfony\Component\Validator\Constraints\Optional;

27 use Symfony\Component\Validator\Constraints\Range;

28 use Symfony\Component\Validator\Constraints\Required;

29 use Symfony\Component\Validator\Constraints\Sequentially;

73 $expected->addConstraint(new Callback('validateMeStatic'));

74 $expected->addPropertyConstraint('firstName', new NotNull());

75 $expected->addPropertyConstraint('firstName', new Range(['min' => 3]));

76 $expected->addPropertyConstraint('firstName', new All([new NotNull(), new Range(['min' => 3])]));

TouchTest.ap_.d (https://gitlab.com/gregtyka/Restaurant-Menu--Ionic) D · 129 lines

43 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\img\headline-bg.png \

44 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\img\non-veg-icon.png \

45 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\img\orange-star.png \

46 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\img\paneer_tikka.jpg \

47 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\img\rs-btn.png \

105 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_progress.scss \

106 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_radio.scss \

107 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_range.scss \

108 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_reset.scss \

109 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_scaffolding.scss \

lagrange_triangle.cpp (https://gitlab.com/philipclaude/avro2) C++ · 411 lines

6 //

7 // Licensed under The GNU Lesser General Public License, version 2.1

8 // See http://www.opensource.org/licenses/lgpl-2.1.php

9 //

10 #include "common/error.h"

35 template<>

36 void

37 Lagrange<Simplex,2,1>::eval( const real_t* x , real_t* phi ) {

38 real_t s = x[0];

39 real_t t = x[1];

47 template<>

48 void

49 Lagrange<Simplex,2,1>::grad( const real_t* x , real_t* phi ) {

50

51 real_t* phis = phi;

options-sanitize.php (https://gitlab.com/Blueprint-Marketing/interoccupy.net) PHP · 377 lines

1 <?php

2

3 /* Text */

293 *

294 * Returns an indexed array of all recognized font sizes.

295 * Values are integers and represent a range of sizes from

296 * smallest to largest.

297 *

300

301 function of_recognized_font_sizes() {

302 $sizes = range( 9, 71 );

303 $sizes = apply_filters( 'of_recognized_font_sizes', $sizes );

304 $sizes = array_map( 'absint', $sizes );

Column.php (https://gitlab.com/ptisky/API_prestashop) PHP · 394 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.9, 2013-06-02

33 * @package PHPExcel_Worksheet

34 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_AutoFilter_Column

178 * @return PHPExcel_Worksheet_AutoFilter_Column

179 */

180 public function setParent(PHPExcel_Worksheet_AutoFilter $pParent = NULL) {

181 $this->_parent = $pParent;

182

325 * @param PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule

326 * @param boolean $returnRule Flag indicating whether the rule object or the column object should be returned

327 * @return PHPExcel_Worksheet_AutoFilter_Column|PHPExcel_Worksheet_AutoFilter_Column_Rule

328 */

329 public function addRule(PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule, $returnRule=TRUE) {

161_mangos_spell_dbc.sql (https://github.com/Gengeru/mangos.git) SQL · 104 lines

21 `SpellLevel` tinyint(3) unsigned NOT NULL DEFAULT '0',

22 `DurationIndex` smallint(5) unsigned NOT NULL DEFAULT '0',

23 `RangeIndex` tinyint(3) unsigned NOT NULL DEFAULT '1',

24 `StackAmount` tinyint(3) unsigned NOT NULL DEFAULT '0',

25 `EquippedItemClass` int(11) NOT NULL DEFAULT '-1',

arch_port.c (https://github.com/Lafriks/mupdf.git) C · 486 lines

24 if (alpha != 255)

25 {

26 alpha += alpha>>7; /* alpha is now in the 0...256 range */

27 while (len--)

28 {

29 unsigned int ca, drb, dga, crb, cga;

30 cov += *src; *src++ = 0;

31 ca = cov + (cov>>7); /* ca is in 0...256 range */

32 ca = (ca*alpha)>>8; /* ca is is in 0...256 range */

53 unsigned int ca, drb, dga, crb, cga;

54 cov += *src; *src++ = 0;

55 ca = cov + (cov>>7); /* ca is in 0...256 range */

56 drb = *dst32++;

57 if (ca == 0)

96 if (alpha != 255)

97 {

98 alpha += alpha>>7; /* alpha is now in the 0...256 range */

99 while (h--)

100 {

MongoInt32Test.php (https://github.com/hghazal/mongo-php-driver.git) PHP · 352 lines

1 <?php

2 require_once 'PHPUnit/Framework.php';

3

4 class MongoInt32Test extends PHPUnit_Framework_TestCase

13 function setup()

14 {

15 if (PHP_INT_SIZE != 4) {

16 $this->markTestSkipped("Only for 32 bit platforms");

17 }

20

21 $m = new Mongo();

22 $this->object = $m->selectCollection("phpunit", "ints");

23 $this->object->drop();

24 }

84 $c->insert(array('int32' => new MongoInt32(1234567890123)));

85 $x = $c->findOne();

86 $this->assertSame(PHP_INT_MAX, $x['int32']);

87 }

88

test_compiler.py (git://github.com/IronLanguages/main.git) Python · 317 lines ✨ Summary

This is a Python script that uses the unittest module to run tests on the compiler module. The script defines a class called CompilerTest that inherits from unittest.TestCase. This class contains several test methods that use the assertEqual() method to check whether certain expressions evaluate to the expected values.

The script also imports the test_support module from the Python standard library, which provides additional testing functionality.

Overall, this script is used to test the behavior of the compiler module and ensure that it works as intended.

137

138 def testGenExp(self):

139 c = compiler.compile('list((i,j) for i in range(3) if i < 3'

140 ' for j in range(4) if j > 2)',

156

157 def testSetComp(self):

158 c = compiler.compile('{x for x in range(1, 4)}', '<string>', 'eval')

159 self.assertEqual(eval(c), {1, 2, 3})

160 c = compiler.compile('{x * y for x in range(3) if x != 0'

276 a, b = 2, 3

277 [c, d] = 5, 6

278 l = [(x, y) for x, y in zip(range(5), range(5,10))]

279 l[0]

280 l[3:4]

281 d = {'a': 2}

282 d = {}

283 d = {x: y for x, y in zip(range(5), range(5,10))}

284 s = {x for x in range(10)}

Column.php (https://gitlab.com/Zinnurain/destination_finder_beta) PHP · 394 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2014 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 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_AutoFilter_Column

178 * @return PHPExcel_Worksheet_AutoFilter_Column

179 */

180 public function setParent(PHPExcel_Worksheet_AutoFilter $pParent = NULL) {

181 $this->_parent = $pParent;

182

325 * @param PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule

326 * @param boolean $returnRule Flag indicating whether the rule object or the column object should be returned

327 * @return PHPExcel_Worksheet_AutoFilter_Column|PHPExcel_Worksheet_AutoFilter_Column_Rule

328 */

329 public function addRule(PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule, $returnRule=TRUE) {

message.php (https://github.com/4260/OpenPNE2.git) PHP · 1044 lines

1 <?php

2 /**

3 * @copyright 2005-2008 OpenPNE Project

4 * @license http://www.php.net/license/3_01.txt PHP License 3.01

5 */

6

70 * 受信メッセージリストを取得(年月日絞りに対応)

71 */

72 function db_message_c_message_received_list4c_member_id4range($c_member_id, $page, $page_size, $year = '', $month = '', $day = '')

73 {

74 $params = array();

127 * 送信メッセージリストを取得

128 */

129 function db_message_c_message_sent_list4c_member_id4range($c_member_id, $page, $page_size, $year = '', $month = '', $day = '')

130 {

131 $params = array(intval($c_member_id));

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

This C code initializes and configures the Netfilter Connection Tracking (NFCT) subsystem, which is used to track IP connections in Linux. It sets up various data structures, such as hash tables and caches, and registers functions for NAT offset calculation and connection tracking destruction. The code also handles initialization and cleanup of NFCT for both the main network namespace and individual networks.

491 EXPORT_SYMBOL_GPL(nf_conntrack_tuple_taken);

492

493 #define NF_CT_EVICTION_RANGE 8

494

495 /* There's a small race here where we may free a just-assured

517 !atomic_inc_not_zero(&ct->ct_general.use)))

518 ct = NULL;

519 if (ct || cnt >= NF_CT_EVICTION_RANGE)

520 break;

521

UserAttribute.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 346 lines

1 <?php

2 # Generated by the protocol buffer compiler. DO NOT EDIT!

3 # source: google/ads/googleads/v9/common/offline_user_data.proto

24 protected $lifetime_value_micros = null;

25 /**

26 * Advertiser defined lifetime value bucket for the user. The valid range for

27 * a lifetime value bucket is from 1 (low) to 10 (high), except for remove

28 * operation where 0 will also be accepted.

80 * Advertiser defined lifetime value for the user.

81 * @type int $lifetime_value_bucket

82 * Advertiser defined lifetime value bucket for the user. The valid range for

83 * a lifetime value bucket is from 1 (low) to 10 (high), except for remove

84 * operation where 0 will also be accepted.

146

147 /**

148 * Advertiser defined lifetime value bucket for the user. The valid range for

149 * a lifetime value bucket is from 1 (low) to 10 (high), except for remove

150 * operation where 0 will also be accepted.

mavlink_msg_manual_control.h (https://bitbucket.org/nikhil/qgc.git) C Header · 254 lines

5 typedef struct __mavlink_manual_control_t

6 {

7 int16_t x; ///< X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.

8 int16_t y; ///< Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.

9 int16_t z; ///< Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle.

10 int16_t r; ///< R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle.

38 *

39 * @param target The system to be controlled.

40 * @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.

41 * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.

42 * @param z Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle.

43 * @param r R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle.

81 * @param msg The MAVLink message to compress the data into

82 * @param target The system to be controlled.

83 * @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.

84 * @param y Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle.

CommitInfo.Designer.cs (https://github.com/yiketudou/gitextensions.git) C# · 235 lines

121 // commitInfoContextMenuStrip

122 //

123 this.commitInfoContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {

124 this.copyCommitInfoToolStripMenuItem,

125 this.toolStripSeparator1,

Column.php (https://github.com/Tassader/Spedicka.git) PHP · 394 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.8.0, 2014-03-02

33 * @package PHPExcel_Worksheet

34 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_AutoFilter_Column

178 * @return PHPExcel_Worksheet_AutoFilter_Column

179 */

180 public function setParent(PHPExcel_Worksheet_AutoFilter $pParent = NULL) {

181 $this->_parent = $pParent;

182

325 * @param PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule

326 * @param boolean $returnRule Flag indicating whether the rule object or the column object should be returned

327 * @return PHPExcel_Worksheet_AutoFilter_Column|PHPExcel_Worksheet_AutoFilter_Column_Rule

328 */

329 public function addRule(PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule, $returnRule=TRUE) {

class-wp-block-type.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 373 lines

1 <?php

2 /**

3 * Blocks API: WP_Block_Type class

43 /**

44 * Block type category classification, used in search interfaces

45 * to arrange block types by category.

46 *

47 * @since 5.5.0

219 * @type string $title Human-readable block type label.

220 * @type string|null $category Block type category classification, used in

221 * search interfaces to arrange block types by category.

222 * @type array|null $parent Setting parent lets a block require that it is only

223 * available when nested within the specified blocks.

FMVector3.h (https://bitbucket.org/barakianc/nvidia-physx-and-apex-in-gge.git) C Header · 253 lines

4 Copyright (C) 2005-2007 Sony Computer Entertainment America

5

6 MIT License: http://www.opensource.org/licenses/mit-license.php

7 */

8

140 /** Clamp each component of this FMVector by the corresponding components

141 in the specified min and max FMVector3.

142 Clamp refers to setting a value within a given range. If the value is

143 lower than the minimum of the range, it is set to the minimum; same for

Column.php (https://gitlab.com/alexandresgv/siteentec) PHP · 394 lines

22 * @package PHPExcel_Worksheet

23 * @copyright Copyright (c) 2006 - 2013 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 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

35 */

36 class PHPExcel_Worksheet_AutoFilter_Column

178 * @return PHPExcel_Worksheet_AutoFilter_Column

179 */

180 public function setParent(PHPExcel_Worksheet_AutoFilter $pParent = NULL) {

181 $this->_parent = $pParent;

182

325 * @param PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule

326 * @param boolean $returnRule Flag indicating whether the rule object or the column object should be returned

327 * @return PHPExcel_Worksheet_AutoFilter_Column|PHPExcel_Worksheet_AutoFilter_Column_Rule

328 */

329 public function addRule(PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule, $returnRule=TRUE) {

sfValidatorDateTest.php (https://github.com/makerlabs/Symfohub.git) PHP · 246 lines

1 <?php

2

3 /*

9 */

10

11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');

12

13 $t = new lime_test(52);

184 {

185 $v->clean('18 october 2004');

186 $t->fail('->clean() throws an exception if the date is not within the range provided by the min/max options');

187 }

188 catch (sfValidatorError $e)

189 {

190 $t->pass('->clean() throws an exception if the date is not within the range provided by the min/max options');

191 }

192 try

RTDAO.inc.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 605 lines

1 <?php

2

3 /**

4 * RTDAO.inc.php

5 *

6 * Copyright (c) 2003-2005 The Public Knowledge Project

11 * DAO operations for the OJS Reading Tools interface.

12 *

13 * $Id: RTDAO.inc.php,v 1.20 2005/07/16 03:52:02 alec Exp $

14 */

15

126 * Retrieve all RT versions for a journal.

127 * @param $journalId int

128 * @param $pagingInfo object DBResultRange (optional)

129 * @return array RTVersion

130 */

csharphead.swg (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 335 lines

105 SWIG_csharp_exceptions[SWIG_CSharpArithmeticException].callback = arithmeticCallback;

106 SWIG_csharp_exceptions[SWIG_CSharpDivideByZeroException].callback = divideByZeroCallback;

107 SWIG_csharp_exceptions[SWIG_CSharpIndexOutOfRangeException].callback = indexOutOfRangeCallback;

108 SWIG_csharp_exceptions[SWIG_CSharpInvalidCastException].callback = invalidCastCallback;

109 SWIG_csharp_exceptions[SWIG_CSharpInvalidOperationException].callback = invalidOperationCallback;

137 static ExceptionDelegate arithmeticDelegate = new ExceptionDelegate(SetPendingArithmeticException);

138 static ExceptionDelegate divideByZeroDelegate = new ExceptionDelegate(SetPendingDivideByZeroException);

139 static ExceptionDelegate indexOutOfRangeDelegate = new ExceptionDelegate(SetPendingIndexOutOfRangeException);

140 static ExceptionDelegate invalidCastDelegate = new ExceptionDelegate(SetPendingInvalidCastException);

141 static ExceptionDelegate invalidOperationDelegate = new ExceptionDelegate(SetPendingInvalidOperationException);

148 static ExceptionArgumentDelegate argumentDelegate = new ExceptionArgumentDelegate(SetPendingArgumentException);

149 static ExceptionArgumentDelegate argumentNullDelegate = new ExceptionArgumentDelegate(SetPendingArgumentNullException);

150 static ExceptionArgumentDelegate argumentOutOfRangeDelegate = new ExceptionArgumentDelegate(SetPendingArgumentOutOfRangeException);

151

152 [DllImport("$dllimport", EntryPoint="SWIGRegisterExceptionCallbacks_$module")]

SortedSetTest.cs (https://github.com/iainlane/mono.git) C# · 518 lines

176

177 [Test]

178 [ExpectedException (typeof (ArgumentOutOfRangeException))]

179 public void ViewAddOutOfRange ()

222

223 [Test]

224 [ExpectedException (typeof (ArgumentOutOfRangeException))]

225 public void ViewGetViewLowerOutOfRange ()

231

232 [Test]

233 [ExpectedException (typeof (ArgumentOutOfRangeException))]

234 public void ViewGetViewUpperOutOfRange ()

371 }

372

373 [Test, ExpectedException (typeof (ArgumentOutOfRangeException))]

374 public void ViewUnionWith_oor ()

375 {

WebPlatformStrategies.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 159 lines

148 virtual WTF::String validationMessagePatternMismatchText();

149 virtual WTF::String validationMessageTooLongText();

150 virtual WTF::String validationMessageRangeUnderflowText();

151 virtual WTF::String validationMessageRangeOverflowText();

idbindex_getAll.html (https://github.com/rillian/firefox.git) HTML · 232 lines

66 }

67

68 function createGetAllRequest(t, storeName, connection, range, maxCount) {

69 var transaction = connection.transaction(storeName, 'readonly');

70 var store = transaction.objectStore(storeName);

71 var index = store.index('test_idx');

72 var req = index.getAll(range, maxCount);

73 req.onerror = t.unreached_func('getAll request should succeed');

74 return req;

122 async_test(function(t) {

123 var req = createGetAllRequest(t, 'out-of-line', connection,

124 IDBKeyRange.bound('G', 'M'));

125 req.onsuccess = t.step_func(function(evt) {

126 var data = evt.target.result;

global-opts.html (https://jedit.svn.sourceforge.net/svnroot/jedit) HTML · 99 lines ✨ Summary

This HTML code outputs a user interface for configuring and customizing various aspects of the jEdit text editor, including settings such as syntax highlighting, font sizes, colors, toolbars, views, and file system browsers. It provides options to customize these settings and allows users to save their changes in a directory.

90 the tool bar, or disable it completely. See <a class="xref" href="views.html" title="Multiple Views">the section called &#8220;Multiple Views&#8221;</a>.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="view-pane"></a>The View Pane</h3></div></div></div><p>The <span class="guibutton"><strong>View</strong></span> option pane lets you change

91 various settings related to the editor window's appearance,

92 including the arrangement of dockable windows, and if the search bar

93 and buffer switcher should be visible. See <a class="xref" href="views.html" title="Multiple Views">the section called &#8220;Multiple Views&#8221;</a>.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="vfs-browser-pane"></a>The File System Browser Panes</h3></div></div></div><p>The <span class="guibutton"><strong>File System Browser</strong></span> group contains

94 two option panes, <span class="guibutton"><strong>General</strong></span> and

tests.php (https://github.com/pyrsmk/Chernozem.git) PHP · 515 lines

1 <?php

2

3 use Symfony\Component\ClassLoader\Psr4ClassLoader;

7 error_reporting(E_ALL);

8

9 require __DIR__.'/vendor/autoload.php';

10 require __DIR__.'/../vendor/autoload.php';

104 'strawberry' => 'red',

105 'lemon' => 'green',

106 'blood_orange' => 'red'

107 ];

108 $suite['chernozem'] = new Chernozem\Container($suite['fruits']);

124 $suite->expects('set/get : methods')

125 ->that(function($suite) {

126 return $suite['chernozem']->getBloodOrange();

127 })

128 ->equals('red');

en_US.php (https://github.com/NightJar/silverstripe-userforms.git) PHP · 291 lines

1 <?php

2

3 global $lang;

110 $lang['en_US']['EditableFormField.ss']['CUSTOMRULES'] = 'Custom Rules';

111 $lang['en_US']['EditableFormField.ss']['DELETE'] = 'Delete';

112 $lang['en_US']['EditableFormField.ss']['DRAG'] = 'Drag to rearrange order of fields';

113 $lang['en_US']['EditableFormField.ss']['FIELDCONFIGURATION'] = 'Field Configuration';

114 $lang['en_US']['EditableFormField.ss']['FIELDONDEFAULT'] = 'Field On Default';

182 );

183 $lang['en_US']['EditableOption.ss']['DELETE'] = 'Remove this option';

184 $lang['en_US']['EditableOption.ss']['DRAG'] = 'Drag to rearrange order of options';

185 $lang['en_US']['EditableOption.ss']['LOCKED'] = 'These fields cannot be modified';

186 $lang['en_US']['EditableRadioField']['PLURALNAME'] = array(

grid.php (https://github.com/tkahl/joomla-platform.git) PHP · 470 lines

1 <?php

2 /**

3 * JGrid class to dynamically generate HTML tables

165

166 /**

167 * Method to set a whole range of columns at once

168 * This can be used to re-order the columns, too

169 *

Fe.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 185 lines

1 <?php

2

3 if (class_exists('ParagonIE_Sodium_Core32_Curve25519_Fe', false)) {

37 $keys = array_keys($array);

38 } else {

39 $keys = range(0, $count - 1);

40 }

41 $array = array_values($array);

71 $keys = array_keys($array);

72 } else {

73 $keys = range(0, $count - 1);

74 }

75 $array = array_values($array);

VoteTest.php (https://github.com/omigeot-ccpo/SemanticScuttle-SSO.git) PHP · 536 lines

1 <?php

2 /**

3 * SemanticScuttle - your social bookmark manager.

4 *

5 * PHP version 5.

6 *

7 * @category Bookmarking

444 /**

445 * Verify that changing the vote from postitive to positive

446 * has no strange effects

447 *

448 * @return void

475 /**

476 * Verify that changing the vote from negative to negative

477 * has no strange effects

478 *

479 * @return void

DataRelationCollectionTest.cs (https://github.com/pruiz/mono.git) C# · 361 lines

136

137 [Test]

138 public void AddRange ()

139 {

140 DataRelationCollection drcol = _dataset.Relations;

145 , _dataset.Tables ["Item"].Columns ["itemid"]

146 , _dataset.Tables ["Order"].Columns ["custid"]);

147 drcol.AddRange (new DataRelation[] {dr1,dr2});

148

149 Assert.That (drcol [0].RelationName, Is.EqualTo ("CustOrder"), "test#1");

333 drcol.RemoveAt (-1);

334 Assert.Fail ("the index was out of bound: must have failed");

335 } catch (IndexOutOfRangeException e) {

336 }

337 try {

thunder-88xx.dtsi (https://github.com/KanjiMonster/bcm63xx.git) Device Tree · 415 lines

370 #address-cells = <2>;

371 #size-cells = <2>;

372 ranges;

373

374 refclk50mhz: refclk50mhz {

384 #address-cells = <2>;

385 #size-cells = <2>;

386 ranges;

387 interrupt-controller;

388 reg = <0x8010 0x00000000 0x0 0x010000>, /* GICD */

changes-3.2.0 (https://bitbucket.org/ultra_iter/qt-vtl.git) Unknown · 328 lines

61 all Windows versions except Windows 95 and Windows NT 4.0.

62

63 The print dialog now supports "selection" as a print range as well as

64 the possibility to enable/disable all different printer options

65 individually.

243

244 - QPrinter

245 Added the new functions: setPrintRange(), printRange(),

246 setOptionEnabled(), and optionEnabled(). For Windows only,

247 added the new function, setWinPageSize(), that allows setting

mvnDebug (https://bitbucket.org/nbargnesi/idea.git) Shell · 178 lines

137 if [ -n "$JAVA_HOME" ] ; then

138 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then

139 # IBM's JDK on AIX uses strange locations for the executables

140 JAVACMD="$JAVA_HOME/jre/sh/java"

141 else

GPL-license.txt (git://github.com/imakewebthings/deck.js.git) Unknown · 278 lines

218 integrity of the free software distribution system, which is

219 implemented by public license practices. Many people have made

220 generous contributions to the wide range of software distributed

221 through that system in reliance on consistent application of that

222 system; it is up to the author/donor to decide if he or she is willing

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

This Java interface defines a common interface for different types of source text, such as strings, buffers, and input streams. It provides methods to access characters at specific positions in the text, including moving the cursor position and checking if it’s valid. The interface also includes constants for handling out-of-range indices.

34 * Defines a constant (0xFFFF was somewhat arbitrarily chosen)

35 * that can be returned by the charAt() function indicating that

36 * the specified index is out of range.

37 */

38 char OUT_OF_BOUNDS = '\uFFFF';

mediaobject.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 686 lines

483 play();

484 } else {

485 setError(Phonon::NormalError, QLatin1String("seeking out of range"));

486 }

487 }

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

This Java code defines a ReferencePanel class that extends a default tool panel for a LaTeX editor. It displays a list of references and allows users to insert cross-references into their document. The panel also provides functionality to visit labels, expand folds, and set the current cursor position. It is designed to work with the jEdit text editor.

202 int lineStart = view.getTextArea().getLineStartOffset(line);

203 int lineEnd = view.getTextArea().getLineEndOffset(line);

204 Selection.Range sel = new Selection.Range(lineStart, lineEnd);

205 view.getTextArea().setSelection(sel);

206 }

webdefault.xml (http://keywatch.googlecode.com/svn/trunk/) XML · 211 lines

39 <!-- The following initParameters are supported: -->

40 <!-- -->

41 <!-- acceptRanges If true, range requests and responses are -->

42 <!-- supported -->

43 <!-- -->

55 <servlet-class>org.mortbay.jetty.servlet.Default</servlet-class>

56 <init-param>

57 <param-name>acceptRanges</param-name>

58 <param-value>true</param-value>

59 </init-param>

ftcache.h (http://angel-engine.googlecode.com/svn/trunk/) C++ Header · 1122 lines ✨ Summary

This is a C++ header file that defines various data structures and functions for font management, caching, and optimization. It provides classes and functions for managing fonts, faces, sizes, and bitmaps, as well as caching and lookup functionality. The code appears to be part of the FreeType library, which is used for rendering and manipulating fonts in graphics applications.

878 /* format :: The format of the glyph bitmap (monochrome or gray). */

879 /* */

880 /* max_grays :: Maximum gray level value (in the range 1 to~255). */

881 /* */

882 /* pitch :: The number of bytes per bitmap line. May be positive */

ttobjs.c (http://angel-engine.googlecode.com/svn/trunk/) C · 944 lines ✨ Summary

This C code is part of a FreeType library implementation for TrueType fonts. It provides functions and structures for initializing, finalizing, and managing font drivers, slots, and contexts. The code handles font scaling, transformation, and glyph loading, enabling the use of TrueType fonts in various applications.

441 /* disable CVT and glyph programs coderange */

442 TT_Clear_CodeRange( exec, tt_coderange_cvt );

443 TT_Clear_CodeRange( exec, tt_coderange_glyph );

445 if ( face->font_program_size > 0 )

446 {

447 error = TT_Goto_CodeRange( exec, tt_coderange_font, 0 );

448

449 if ( !error )

503 face->cvt_program_size );

504

505 TT_Clear_CodeRange( exec, tt_coderange_glyph );

506

507 if ( face->cvt_program_size > 0 )

508 {

509 error = TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );

510

511 if ( !error && !size->debug )

pl1.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 597 lines

289 <KEYWORD2>ptr</KEYWORD2>

290 <KEYWORD2>R</KEYWORD2>

291 <KEYWORD2>range</KEYWORD2>

292 <KEYWORD2>real</KEYWORD2>

293 <KEYWORD2>record</KEYWORD2>

311 <KEYWORD2>stream</KEYWORD2>

312 <KEYWORD2>strg</KEYWORD2>

313 <KEYWORD2>stringrange</KEYWORD2>

314 <KEYWORD2>strz</KEYWORD2>

315 <KEYWORD2>stringsize</KEYWORD2>

316 <KEYWORD2>subrg</KEYWORD2>

317 <KEYWORD2>subscriptrange</KEYWORD2>

318 <KEYWORD2>system</KEYWORD2>

319 <KEYWORD2>task</KEYWORD2>

lm75 (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 66 lines

41 the temperature falls below the Hysteresis value.

42 All temperatures are in degrees Celsius, and are guaranteed within a

43 range of -55 to +125 degrees.

44

45 The LM75 only updates its values each 1.5 seconds; reading it more often

Window1.xaml.cs (https://hg01.codeplex.com/d3future) C# · 115 lines ✨ Summary

This C# code creates a Windows application that displays a forest of trees with varying sizes and shapes, using a dynamic data display control. The forest is loaded from a CSV file containing tree measurements, and users can adjust the scale of the forest using a slider, causing all trees to change size proportionally.

42 speciesMappings["Acer.rubr"] = new TreeSpeciesInfo(Brushes.LimeGreen, TreeViews.Ellipse);

43 speciesMappings["Acer.sacc"] = new TreeSpeciesInfo(Brushes.SeaGreen, TreeViews.Ellipse);

44 speciesMappings["Betu.papy"] = new TreeSpeciesInfo(Brushes.DarkOrange, TreeViews.RoundTriangle);

45 speciesMappings["Popu.gran"] = new TreeSpeciesInfo(Brushes.Teal, TreeViews.Rectangle);

46 speciesMappings["Popu.trem"] = new TreeSpeciesInfo(Brushes.SeaGreen, TreeViews.Rectangle);

47 speciesMappings["Quer.rubr"] = new TreeSpeciesInfo(Brushes.DarkOrange, TreeViews.Triangle);

48 speciesMappings["Tili.amer"] = new TreeSpeciesInfo(Brushes.Teal, TreeViews.Triangle);

49

PathIterator.java (http://loon-simple.googlecode.com/svn/trunk/) Java · 203 lines ✨ Summary

The Java code defines an interface for a path iterator, which allows iterating over the coordinates of a path defined by a series of segments (e.g., lines, curves). The iterator provides methods to move to the next segment, check if iteration is complete, and retrieve the current segment’s type and coordinates.

89 * parametric curve to be drawn from the most recently specified point. The

90 * curve is interpolated by solving the parametric control equation in the

91 * range <code>(t=[0..1])</code> using the most recently specified (current)

92 * point (CP), the first control point (P1), and the final interpolated

93 * control point (P2). The parametric control equation for this curve is:

109 * parametric curve to be drawn from the most recently specified point. The

110 * curve is interpolated by solving the parametric control equation in the

111 * range <code>(t=[0..1])</code> using the most recently specified (current)

112 * point (CP), the first control point (P1), the second control point (P2),

113 * and the final interpolated control point (P3). The parametric control

OutOffRangeException.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 6 lines

1 package superabbrevs;

2

3 public class OutOffRangeException extends Exception {

4

5 }

WRECParser.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 643 lines

43 const char* Parser::ParenthesesNotSupported = ""; // Not a user-visible syntax error -- just signals a syntax that WREC doesn't support yet.

44 const char* Parser::CharacterClassUnmatched = "missing terminating ] for character class";

45 const char* Parser::CharacterClassOutOfOrder = "range out of order in character class";

46 const char* Parser::EscapeUnterminated = "\\ at end of pattern";

47

325 consume();

326

327 // lazily catch reversed ranges ([z-a])in character classes

328 if (constructor.isUpsideDown()) {

329 setError(CharacterClassOutOfOrder);

417 case '9': {

418 if (peekDigit() > m_numSubpatterns || inCharacterClass) {

419 // To match Firefox, we parse an invalid backreference in the range [1-7]

420 // as an octal escape.

421 return peekDigit() > 7 ? PatternCharacterEscape('\\') : PatternCharacterEscape(consumeOctal());

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

This C code is part of a file system implementation, specifically handling journaling and data corruption protection for a Linux file system. It provides functions to manage inodes, handle page faults, and ensure data integrity by writing changes to a journal before modifying the underlying storage. The code ensures that file system updates are atomic and consistent, preventing data corruption and ensuring system reliability.

312 * This function translates the block number into path in that tree -

313 * return value is the path length and @offsets[n] is the offset of

314 * pointer to (n+1)th node in the nth one. If @block is out of range

315 * (negative or too large) warning is printed and zero returned.

316 *

IDBBackingStore.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 114 lines

40 class IDBFactoryBackendImpl;

41 class IDBKey;

42 class IDBKeyRange;

43 class SecurityOrigin;

44

95 };

96

97 virtual PassRefPtr<Cursor> openObjectStoreCursor(int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IDBCursor::Direction) = 0;

98 virtual PassRefPtr<Cursor> openIndexKeyCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction) = 0;

99 virtual PassRefPtr<Cursor> openIndexCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction) = 0;

100

101 class Transaction : public RefCounted<Transaction> {

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

This Java code is part of a text editor’s mouse event handling mechanism. It handles various mouse events such as clicks, drags, and releases to manage selections, insertions, and deletions of text within the editor. The code ensures proper behavior for different mouse button combinations, including drag-and-drop functionality and quick copy/paste operations.

233

234 int lineStart = textArea.getLineStartOffset(dragStartLine);

235 Selection sel = new Selection.Range(

236 lineStart + wordStart,

237 lineStart + wordEnd);

256 newCaret--;

257

258 Selection sel = new Selection.Range(

259 textArea.getLineStartOffset(dragStartLine),

260 newCaret);

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

This Java class represents a parsing error with a message and location. It has two constructors, one that takes only a message and another that also specifies a location (a Range object). The class provides a toString method to return a string representation of the error, including its message and location. This can be used to send error messages to an ErrorList plugin.

36 public class ParseError {

37 public String message = "";

38 public Range range = null;

39

40 public ParseError(String message){

41 this(message, new Range());

42 }

43

44 public ParseError(String message, Range range) {

45 this.message = message;

46 this.range = range;

cifsglob.h (http://omnia2droid.googlecode.com/svn/trunk/) C Header · 711 lines ✨ Summary

This C header file defines various global variables and data structures for a CIFS (Common Internet File System) implementation, which is a protocol used to access Windows networks from Linux systems. It sets up locks and counters for managing SMB sessions, transactions, and buffers, as well as debug counters and miscellaneous settings.

348 struct inode *pInode; /* needed for oplock break */

349 struct mutex lock_mutex;

350 struct list_head llist; /* list of byte range locks we have. */

351 bool closePend:1; /* file is marked to close */

352 bool invalidHandle:1; /* file closed via session abend */

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

This C code defines a locale-independent, ASCII ctype (character type) table named sane_ctype. It maps each ASCII character to one of several categories: space (S), alpha (A), digit (D), glob special characters (G), regex special characters (R), and printable characters with extra properties (P). The table is used for string manipulation and validation.

28 P, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, /* 96..111 */

29 A, A, A, A, A, A, A, A, A, A, A, R, R, P, P, 0, /* 112..127 */

30 /* Nothing in the 128.. range */

31 };

32

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

This Java code is a part of an editor plugin that highlights matching XML tags in a text editor. It uses a combination of buffer changes and caret updates to detect when a tag is being edited, and then updates the highlighting accordingly. The plugin also handles cases where a tag is inserted or removed from the buffer.

258 && match.end <= buffer.getLength())

259 {

260 textArea.invalidateLineRange(

261 textArea.getLineOfOffset(match.start),

262 textArea.getLineOfOffset(match.end)

298 }

299

300 textArea.invalidateLineRange(

301 buffer.getLineOfOffset(match.start),

302 buffer.getLineOfOffset(match.end)

setupscript.rst (https://bitbucket.org/tarek/distutils2/) ReStructuredText · 687 lines ✨ Summary

This text explains how to use the setup function in Python’s Distutils library to create a package. It covers various options, such as specifying version information, classifiers, and license, and provides examples of valid values for each field. It also discusses debugging techniques, including setting the DISTUTILS_DEBUG environment variable to print detailed output.

478

479 For example, if a package should contain a subdirectory with several data files,

480 the files can be arranged like this in the source tree::

481

482 setup.py

as_literal.hpp (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines

107 as_literal( const Range& r )

108 {

109 return range_detail::make_range( r, range_detail::is_char_ptr(r) );

110 }

111

113 inline iterator_range<Char*> as_literal( Char (&arr)[sz] )

114 {

115 return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );

116 }

117

119 inline iterator_range<const Char*> as_literal( const Char (&arr)[sz] )

120 {

121 return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );

122 }

123 }

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

This C code implements a Netlink subsystem for the Linux kernel, specifically for managing conntrack and expect rules. It registers with nfnetlink to provide a way for userspace applications to interact with these rules. The code includes initialization and exit functions, as well as callback functions for handling different types of messages (e.g., new conntrack rules, get conntrack rules).

935 /* Be careful here, modifying NAT bits can screw up things,

936 * so don't let users modify them directly if they don't pass

937 * nf_nat_range. */

938 ct->status |= status & ~(IPS_NAT_DONE_MASK | IPS_NAT_MASK);

939 return 0;

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

This Java code is part of a text editor implementation, specifically handling buffer-local properties and indentation rules. It parses property strings to store values in a map, and uses these values to customize indentation settings based on the current line number and mode. The code also manages transactions and undo/redo functionality for editing operations.

544 //{{{ getText() methods

545 /**

546 * Returns the specified text range. This method is thread-safe.

547 * @param start The start offset

548 * @param length The number of characters to get

567

568 /**

569 * Returns the specified text range in a <code>Segment</code>.<p>

570 *

571 * Using a <classname>Segment</classname> is generally more

599 //{{{ getSegment() method

600 /**

601 * Returns the specified text range. This method is thread-safe.

602 *

603 * @param start The start offset

CodingStyle (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 825 lines

746 Functions whose return value is the actual result of a computation, rather

747 than an indication of whether the computation succeeded, are not subject to

748 this rule. Generally they indicate failure by returning some out-of-range

749 result. Typical examples would be functions that return pointers; they use

750 NULL or the ERR_PTR mechanism to report failure.

cobol.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 1002 lines

459

460 <KEYWORD1>RANDOM</KEYWORD1>

461 <KEYWORD1>RANGE</KEYWORD1>

462 <KEYWORD1>RD</KEYWORD1>

463 <KEYWORD1>READ</KEYWORD1>

675 <KEYWORD2>MEAN</KEYWORD2>

676 <KEYWORD2>MEDIAN</KEYWORD2>

677 <KEYWORD2>MIDRANGE</KEYWORD2>

678 <KEYWORD2>MIN</KEYWORD2>

679 <KEYWORD2>MOD</KEYWORD2>

685 <KEYWORD2>PRESENT-VALUE</KEYWORD2>

686 <KEYWORD2>RANDOM</KEYWORD2>

687 <KEYWORD2>RANGE</KEYWORD2>

688 <KEYWORD2>REM</KEYWORD2>

689 <KEYWORD2>REVERSE</KEYWORD2>

lgpl-2.1.txt (https://bitbucket.org/ultra_iter/qt-vtl.git) Plain Text · 504 lines

394 integrity of the free software distribution system which is

395 implemented by public license practices. Many people have made

396 generous contributions to the wide range of software distributed

397 through that system in reliance on consistent application of that

398 system; it is up to the author/donor to decide if he or she is willing

decay_array.hpp (http://hadesmem.googlecode.com/svn/trunk/) C++ Header · 0 lines ✨ Summary

This C++ header defines a metafunction decay_array that takes an array type as input and returns its corresponding pointer-to-element type. The function is used to decay arrays into pointers, allowing for more flexible use in template metaprogramming. It’s part of the Boost Phoenix library, providing a way to work with arrays in a more expressive and generic manner.

6 // http://www.boost.org/LICENSE_1_0.txt)

7 //

8 // Modeled after range_ex, Copyright 2004 Eric Niebler

9

10 #ifndef PHOENIX_ALGORITHM_DETAIL_DECAY_ARRAY_HPP

std_map.i (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 61 lines

35 void clear();

36 %extend {

37 const T& get(const K& key) throw (std::out_of_range) {

38 std::map<K,T >::iterator i = self->find(key);

39 if (i != self->end())

40 return i->second;

41 else

42 throw std::out_of_range("key not found");

43 }

44 void set(const K& key, const T& x) {

45 (*self)[key] = x;

46 }

47 void del(const K& key) throw (std::out_of_range) {

48 std::map<K,T >::iterator i = self->find(key);

49 if (i != self->end())

json.jj (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 763 lines

200 |

201 // a 'char' is any unicode character except " (double quote) or \ (backslash) or

202 // control character (unicode range 0000 - 001f). Certain special characters and

203 // certain control characters are allowed if escaped with \: ", \, /, b, f, n, r, t.

204 // Unicode characters are allowed using the \\u four-hex-digits notation, e.g.

demo_Events.html (http://enginey.googlecode.com/svn/trunk/) HTML · 46 lines ✨ Summary

This HTML code creates a simple web page with a button and an input field. When you type something into the input field and press enter, it checks if the item is already in the list. If not, it adds it; if so, it removes it. The items are displayed in an unordered list below the input field. It uses Dojo, a JavaScript framework, to create this functionality.

14 dojo.declare("Fruit", [dijit._Widget, dojox.dtl._HtmlTemplated], {

15 widgetsInTemplate: true,

16 items: ["apple", "banana", "orange"],

17 keyUp: function(e){

18 if((e.type == "click" || e.keyCode == dojo.keys.ENTER) && this.input.value){

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

This Java code is part of a plugin manager for an IDE (Integrated Development Environment). It provides functionality to manage plugins, including sorting and filtering plugin information, displaying plugin details in a table, and handling keyboard and mouse events. The code also includes rendering and focus management for the plugin table.

274 case 4:

275 case 5: return Object.class;

276 default: throw new Error("Column out of range");

277 }

278 } //}}}

296 case 4: return ' '+jEdit.getProperty("install-plugins.info.size");

297 case 5: return ' '+jEdit.getProperty("install-plugins.info.releaseDate");

298 default: throw new Error("Column out of range");

299 }

300 } //}}}

338 return entry.date;

339 default:

340 throw new Error("Column out of range");

341 }

342 }

plugin-intro.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 132 lines

96

97 <listitem>

98 <para>Plugins may provide a range of options that the user can

99 modify to alter their configuration.</para>

100

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

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

32

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

34

35 - Updated Omnimark syntax highlighting (Lionel Fiol).

197

198 - Fixed ArrayIndexOutOfBoundsException when invoking "Expand Fold"

199 outside of a narrowed range.

200

201 - Fixed problem where any dialogs boxes shown by the search and replace

836 modes.

837

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

839

840 }}}

globs.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 137 lines

50 <listitem>

51 <para><literal>[<replaceable>a-z</replaceable>]</literal> matches

52 any character in the range <replaceable>a</replaceable> to

53 <replaceable>z</replaceable>, inclusive. A leading or trailing dash

54 will be interpreted literally</para>

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.

89 Requires <span class="emphasis"><em>-1 &lt;= k &lt;= 1</em></span> and <span class="emphasis"><em>n &lt; 1/sin<sup>2</sup>(&#966;)</em></span>,

90 otherwise returns the result of <a class="link" href="../../main_overview/error_handling.html#domain_error">domain_error</a>

91 (outside this range the result would be complex).

92 </p>

93 <p>

112 Requires <span class="emphasis"><em>-1 &lt;= k &lt;= 1</em></span> and <span class="emphasis"><em>n &lt; 1</em></span>,

113 otherwise returns the result of <a class="link" href="../../main_overview/error_handling.html#domain_error">domain_error</a>

114 (outside this range the result would be complex).

115 </p>

116 <p>

267 </p>

268 <p>

269 are used to shift <span class="emphasis"><em>n</em></span> to the range [0, 1].

270 </p>

271 <p>

nc_t_dist.html (http://hadesmem.googlecode.com/svn/trunk/) HTML · 0 lines ✨ Summary

This HTML code outputs a documentation page for the noncentral Student’s t-distribution, providing information on its properties, formulas, and implementation details. It includes mathematical equations, references to external sources, and copyright information. The page is structured with navigation links at the bottom, allowing users to navigate between related pages or return to the main index.

126 <a class="link" href="../nmp.html#math.dist.sd">standard deviation</a>, <a class="link" href="../nmp.html#math.dist.skewness">skewness</a>,

127 <a class="link" href="../nmp.html#math.dist.kurtosis">kurtosis</a>, <a class="link" href="../nmp.html#math.dist.kurtosis_excess">kurtosis_excess</a>,

128 <a class="link" href="../nmp.html#math.dist.range">range</a> and <a class="link" href="../nmp.html#math.dist.support">support</a>.

129 </p>

130 <p>

emit.cxx (https://swig.svn.sourceforge.net/svnroot/swig) C++ · 525 lines ✨ Summary

This C++ code is part of a Python-to-C++ compiler, specifically responsible for generating wrapper code and exception handling for Python functions. It processes Python function definitions, including contracts (pre- and post-conditions), exceptions, and return types, to produce efficient C++ code that can be compiled into native binaries.

206 * Calculate the total number of arguments. This function is safe for use

207 * with multi-argument typemaps which may change the number of arguments in

208 * strange ways.

209 * ----------------------------------------------------------------------------- */

210

JavaI18nUtil.java (https://bitbucket.org/nbargnesi/idea.git) Java · 344 lines

28 import com.intellij.openapi.util.Pair;

29 import com.intellij.openapi.util.Ref;

30 import com.intellij.openapi.util.TextRange;

31 import com.intellij.psi.*;

32 import com.intellij.psi.scope.PsiScopeProcessor;

57

58 @Nullable

59 public static TextRange getSelectedRange(Editor editor, final PsiFile psiFile) {

60 if (editor == null) return null;

61 String selectedText = editor.getSelectionModel().getSelectedText();

62 if (selectedText != null) {

63 return new TextRange(editor.getSelectionModel().getSelectionStart(), editor.getSelectionModel().getSelectionEnd());

64 }

65 PsiElement psiElement = psiFile.findElementAt(editor.getCaretModel().getOffset());

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

This Java code defines an abstract class Selection that represents a portion of text in a buffer. It provides methods to get the start and end offsets, as well as line numbers, of the selection. The class also extends two concrete classes: Range for ordinary range selections and Rect for rectangular selections.

126 } //}}}

127

128 //{{{ Range class

129 /**

130 * An ordinary range selection.

131 * @since jEdit 3.2pre1

132 */

133 public static class Range extends Selection

134 {

135 //{{{ Range constructor

136 public Range()

137 {

138 super();

139 } //}}}

140

141 //{{{ Range constructor

142 public Range(Selection sel)

VolatileAttribute.java (https://bitbucket.org/nbargnesi/idea.git) Java · 55 lines

20 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

21 */

22 package com.wrq.rearranger.settings.atomicAttributes;

23

24 import org.jdom.Element;

jedit_keys.props (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 235 lines

85 copy-append.shortcut=C+e C+a

86 search-in-open-buffers.shortcut=C+e C+b

87 range-comment.shortcut=C+e C+c

88 search-in-directory.shortcut=C+e C+d

89 replace-and-find-next.shortcut=C+e C+g

91 scroll-to-current-line.shortcut=C+e C+j

92 line-comment.shortcut=C+e C+k

93 select-line-range.shortcut=C+e C+l

94 add-marker.shortcut=C+e C+m

95 center-caret.shortcut=C+e C+n

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

This Java code is part of a regular expression compiler, responsible for parsing and compiling regular expressions into an internal representation. It handles various input types, including strings, character arrays, and streams, and provides methods for debugging and human-readable output. The compiled regular expression can be used to match patterns in text data.

397 lastChar = '-';

398 } else {

399 options.addElement(new RETokenRange(subIndex,lastChar,ch,insens));

400 lastChar = 0;

401 index++;

ttsbit0.c (https://bitbucket.org/ultra_iter/qt-vtl.git) C · 969 lines

751 {

752 /*

753 * First, we find the correct strike range that applies to this

754 * glyph index.

755 */

757 FT_Byte* p = decoder->eblc_base + decoder->strike_index_array;

758 FT_Byte* p_limit = decoder->eblc_limit;

759 FT_ULong num_ranges = decoder->strike_index_count;

760 FT_UInt start, end, index_format, image_format;

761 FT_ULong image_start = 0, image_end = 0, image_offset;

762

763

764 for ( ; num_ranges > 0; num_ranges-- )

765 {

766 start = FT_NEXT_USHORT( p );

ColumnMap.java (http://androjena.googlecode.com/svn/trunk/) Java · 267 lines ✨ Summary

This Java class represents a column map, which is used to reorder characters in a string based on a specific mapping. It provides methods for compiling a mapping from domain and range strings, as well as uncompiled versions that take lists of domain and range elements. The class also includes methods for reordering words by the same rules as the column map.

70 int x = elements[i] ;

71 if ( x < 0 || x >= elements.length)

72 throw new IllegalArgumentException("Out of range: "+x) ;

73 // Checking

74 if ( insertOrder[i] != -1 || fetchOrder[x] != -1 )

150

151 /** Compile a mapping encoded as single charcaters e.g. "SPO", "POS" */

152 static int[] compileMapping(String domain, String range)

153 {

154 List<Character> input = StrUtils.toCharList(domain) ;

155 List<Character> output = StrUtils.toCharList(range) ;

156 return compileMapping(input, output) ;

157 }

redisLRange.Rd (git://github.com/bwlewis/rredis.git) Unknown · 42 lines

1 \name{redisLRange}

2 \alias{redisLRange}

6 }

7 \usage{

8 redisLRange(key, start, end, ...)

9 }

10 \arguments{

37 redisLPush('x',2)

38 redisLPush('x',3)

39 redisLRange('x',0,2)

40 }

41 }

jdct.h (git://github.com/PrimeSense/Sensor.git) C Header · 176 lines ✨ Summary

This C header file defines declarations and macros for the forward and inverse Discrete Cosine Transform (DCT) modules used in image compression. It provides function prototypes, data types, and arithmetic macros for fixed-point calculations, including scaling, rounding, and multiplication operations. The code is designed to be machine-dependent and optimized for performance.

19 * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT

20 * implementations use an array of type FAST_FLOAT, instead.)

21 * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE).

22 * The DCT outputs are returned scaled up by a factor of 8; they therefore

23 * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This

66

67 /*

68 * Each IDCT routine is responsible for range-limiting its results and

69 * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could

70 * be quite far out of range if the input data is corrupt, so a bulletproof

74 */

75

76 #define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE)

77

78 #define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */

DRVCOMN.ASM (git://github.com/AnimatorPro/Animator-Pro.git) Assembly · 676 lines ✨ Summary

This is a collection of functions for manipulating VGA color palettes on an IBM PC compatible computer. The code uses the Intel 80486 processor’s I/O ports to access the VGA hardware, and it assumes that the VGA hardware has been initialized and configured properly. The functions in this code are:

  • pj_vdrv_set_color: Sets a single color entry in the VGA palette.
  • pj_vdrv_get_color: Gets a single color entry from the VGA palette.
  • pj_vdrv_set_colors: Sets multiple color entries in the VGA palette.
  • pj_vdrv_get_colors: Gets multiple color entries from the VGA palette.
  • pj_vdrv_uncc256: Converts a 64-level color to a 256-level color.
  • pj_vdrv_uncc64: Converts a 64-level color to a 256-level color, but only if the input color is not already in the range [0, 63].

These functions are used by the PaintJill program to manipulate the VGA palette.

267 ; void pj_vdrv_set_colors(Raster *r, int start, int count, UBYTE *color_table)

268 ;

269 ; /* NOTE: the color table has values that range from 0 to 255,

270 ; so the colors must be divided by 4 so they'll fit into

271 ; VGA tables that only range from 0 to 63 */

ChannelMgmt.h (http://omnia2droid.googlecode.com/svn/trunk/) C++ Header · 321 lines ✨ Summary

This is a C header file that defines an interface for managing Virtual Machine Bus (VMBus) channels. It provides structures and functions for handling VMBus messages, including channel creation, management, and callback invocation. The code appears to be part of a hypervisor or virtualization system, allowing it to communicate with guest operating systems over the VMBus.

52 ChannelMessageUnload = 16,

53 #ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD

54 ChannelMessageViewRangeAdd = 17,

55 ChannelMessageViewRangeRemove = 18,

155 u32 ChildRelId;

156 u32 Gpadl;

157 u16 RangeBufLen;

158 u16 RangeCount;

159 struct gpa_range Range[0];

160 } __attribute__((packed));

161

187

188 #ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD

189 struct vmbus_channel_view_range_add {

190 struct vmbus_channel_message_header Header;

191 PHYSICAL_ADDRESS ViewRangeBase;

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

1 <?php

2

3 /**

15 * manually called and/or piggy-backed on top of other hooks if needed.

16 *

17 * @todo use anonymous functions when PHP minimun requirement allows (5.3)

18 */

19

77

78 // If the current user is being setup before the "init" action has fired,

79 // strange (and difficult to debug) role/capability issues will occur.

80 if ( ! did_action( 'after_setup_theme' ) ) {

81 _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'buddypress' ), '1.7' );

193 /**

194 * Piggy back action for BuddyPress sepecific theme actions before the theme has

195 * been setup and the theme's functions.php has loaded.

196 *

197 * @since BuddyPress (1.6)

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

This C header file defines a class Pickle that represents a serialized data structure. It provides methods for reading and writing data, including allocation and resizing of the buffer, alignment, and padding with null bytes. The class also includes functions for finding the end of the pickled data within a given range and updating iterators by a specified number of bytes.

257 }

258

259 // Find the end of the pickled data that starts at range_start. Returns NULL

260 // if the entire Pickle is not found in the given data range.

261 static const char* FindNext(uint32 header_size,

262 const char* range_start,

263 const char* range_end);

CSSParser.cpp (git://github.com/CyanogenMod/android_external_webkit.git) C++ · 5431 lines ✨ Summary

This C++ code is part of a web browser’s CSS parser, responsible for parsing and validating CSS properties. It checks the validity of individual CSS properties, such as background, border, and outline, by verifying their syntax, values, and relationships with other properties in shorthand declarations. The code returns true if the property is valid or false otherwise.

51 #include "CSSStyleRule.h"

52 #include "CSSStyleSheet.h"

53 #include "CSSUnicodeRangeValue.h"

54 #include "CSSValueKeywords.h"

55 #include "CSSValueList.h"

masterlist.txt (http://better-oblivion-sorting-software.googlecode.com/svn/) Plain Text · 5744 lines

106 Weapon Repair Kits - Final.esm

107

108 [DC RANGER ARSENAL v3 MASTER].esm

109 TAG: {{BASH: Deflst}}

110 CMRS.esm

476 REQ: CALIBR.esm

477 REQ: FOOK2 - Main.ESM

478 RangerHelmet.esp

479 SniperAimCorrected - nodemo.esp

480 SniperAimCorrected.esp

jupmoon.c (https://bitbucket.org/brandon/pyephem/) C · 369 lines ✨ Summary

This C code is part of a planetarium simulation, specifically for Jupiter and its moons. It calculates various astronomical parameters such as positions, distances, and visibility conditions for each moon, taking into account the Sun’s position and the Earth’s perspective. The output provides data for further processing in the simulation, including shadow calculations and transit detection.

131 int i;

132

133 /* check ranges and appropriate data file */

134 if (JD < 2451179.50000) /* Jan 1 1999 UTC */

135 return (-1);

198

199 *cmlI = degrad(268.28 + 877.8169088*(d - Del/173) + psi - B);

200 range (cmlI, 2*PI);

201 *cmlII = degrad(290.28 + 870.1869088*(d - Del/173) + psi - B);

202 range (cmlII, 2*PI);