100+ results for 'php idate'

Not the results you expected?

ezisbn10to13converter.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 355 lines

1 <?php

2 /**

3 * File containing the eZISBN10To13Converter class.

280 return true;

281 }

282 // Validate the ISBN number.

283 $digits = preg_replace( "/\-/", "", $isbnValue );

284

zone.php (https://bitbucket.org/sandeepbhaskar/inspiredliving.git) PHP · 441 lines

1 <?php

2 class ControllerLocalisationZone extends Controller {

3 private $error = array();

20 $this->load->model('localisation/zone');

21

22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

23 $this->model_localisation_zone->addZone($this->request->post);

24

52 $this->load->model('localisation/zone');

53

54 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

55 $this->model_localisation_zone->editZone($this->request->get['zone_id'], $this->request->post);

56

84 $this->load->model('localisation/zone');

85

86 if (isset($this->request->post['selected']) && $this->validateDelete()) {

87 foreach ($this->request->post['selected'] as $zone_id) {

88 $this->model_localisation_zone->deleteZone($zone_id);

customer_group.php (https://gitlab.com/hazelnuts23/unitedfoodstuff) PHP · 406 lines

1 <?php

2 class ControllerSaleCustomerGroup extends Controller {

3 private $error = array();

20 $this->load->model('sale/customer_group');

21

22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

23 $this->model_sale_customer_group->addCustomerGroup($this->request->post);

24

52 $this->load->model('sale/customer_group');

53

54 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

55 $this->model_sale_customer_group->editCustomerGroup($this->request->get['customer_group_id'], $this->request->post);

56

84 $this->load->model('sale/customer_group');

85

86 if (isset($this->request->post['selected']) && $this->validateDelete()) {

87 foreach ($this->request->post['selected'] as $customer_group_id) {

88 $this->model_sale_customer_group->deleteCustomerGroup($customer_group_id);

Mvc.php (https://bitbucket.org/saifshuvo/zf2.git) PHP · 528 lines

1 <?php

2 /**

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

63 * The use of this variable minimizes execution time when getHref() is

64 * called more than once during the lifetime of a request. If a property

65 * is updated, the cache is invalidated.

66 *

67 * @var string

local.php (https://gitlab.com/Svyrydov/test-project) PHP · 903 lines

1 <?php

2

3 class acf_local {

33 function get_field_groups( $field_groups ) {

34

35 // validate

36 if( !acf_have_local_field_groups() ) {

37

138 function add_field_group( $field_group ) {

139

140 // validate

141 $field_group = acf_get_valid_field_group($field_group);

142

153 if( empty($field_group['local']) ) {

154

155 $field_group['local'] = 'php';

156

157 }

GameLiftClient.php (https://github.com/trob/fabrik.git) PHP · 200 lines

1 <?php

2 namespace Aws\GameLift;

3

195 * @method \Aws\Result updateScript(array $args = [])

196 * @method \GuzzleHttp\Promise\Promise updateScriptAsync(array $args = [])

197 * @method \Aws\Result validateMatchmakingRuleSet(array $args = [])

198 * @method \GuzzleHttp\Promise\Promise validateMatchmakingRuleSetAsync(array $args = [])

sfValidatorDateTest.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.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);

21 $t->ok($v->clean(null) === null, '->clean() returns null if not required');

22

23 // validate strtotime formats

24 $t->diag('validate strtotime formats');

38 }

39

40 // validate timestamp

41 $t->diag('validate timestamp');

Cloud.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 410 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_Tag_Item

25 */

26 #require_once 'Zend/Tag/Item.php';

27

28 /**

142 public function setTags(array $tags)

143 {

144 // Validate and cleanup the tags

145 $itemList = $this->getItemList();

146

151 $itemList[] = new Zend_Tag_Item($tag);

152 } else {

153 #require_once 'Zend/Tag/Cloud/Exception.php';

154 throw new Zend_Tag_Cloud_Exception('Tag must be an instance of Zend_Tag_Taggable or an array');

155 }

testlib.php (https://github.com/viggof/moodle.git) PHP · 264 lines

1 <?php

2

3 // This file is part of Moodle - http://moodle.org/

28

29 // Include the code to test

30 require_once($CFG->dirroot . '/mod/workshop/locallib.php');

31 require_once($CFG->dirroot . '/mod/workshop/form/numerrors/lib.php');

95 // exercise SUT

96 $suggested = $this->strategy->calculate_peer_grade($grades);

97 // validate

98 $this->assertNull($suggested);

99 }

112 // exercise SUT

113 $suggested = $this->strategy->calculate_peer_grade($grades);

114 // validate

115 $this->assertEqual($suggested, 100.00000);

116 }

Base.php (https://github.com/ewandor/horde.git) PHP · 305 lines

1 <?php

2 /**

3 * Utilities for the various XML handlers.

4 *

5 * PHP version 5

6 *

7 * @category Kolab

237

238 /**

239 * Validate that the parameter array contains all required parameters.

240 *

241 * @param string $key The parameter name.

CollectionValidatorTest.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 412 lines

1 <?php

2

3 /*

20 use Symfony\Component\Validator\Constraints\CollectionValidator;

21

22 abstract class CollectionValidatorTest extends \PHPUnit_Framework_TestCase

23 {

24 protected $context;

49 ->method('addViolationAt');

50

51 $this->validator->validate(null, new Collection(array('fields' => array(

52 'foo' => new Range(array('min' => 4)),

53 ))));

61 ->method('addViolationAt');

62

63 $this->validator->validate($data, new Collection(array(

64 'foo' => new Range(array('min' => 4)),

65 )));

Cloud.php (https://github.com/devilsansclue/ZendFramework.git) PHP · 410 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_Tag_Item

25 */

26 require_once 'Zend/Tag/Item.php';

27

28 /**

142 public function setTags(array $tags)

143 {

144 // Validate and cleanup the tags

145 $itemList = $this->getItemList();

146

151 $itemList[] = new Zend_Tag_Item($tag);

152 } else {

153 require_once 'Zend/Tag/Cloud/Exception.php';

154 throw new Zend_Tag_Cloud_Exception('Tag must be an instance of Zend_Tag_Taggable or an array');

155 }

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

1 <?php

2

3 /*

240 private function loadFile($file)

241 {

242 return $this->validate(Yaml::parse($file), $file);

243 }

244

245 /**

246 * Validates a YAML file.

247 *

248 * @param mixed $content

253 * @throws \InvalidArgumentException When service file is not valid

254 */

255 private function validate($content, $file)

256 {

257 if (null === $content) {

assert_test.js (https://github.com/Khan/live-editor.git) JavaScript · 278 lines

41 code: userCode,

42 pass: false,

43 validate: basicTest,

44 errors: [{}]

45 });

51 code: userCode,

52 pass: false,

53 validate: basicTest,

54 fromTests: true,

55 reason: "You only have 1 row, add 2 more!",

63 code: userCode,

64 pass: false,

65 validate: basicTest,

66 fromTests: true,

67 reason: "Not enough rows!",

Entry.php (https://bitbucket.org/cesarmedrano/cesarmedrano.git) PHP · 630 lines

1 <?php

2

3 /**

13 * limitations under the License.

14 *

15 * PHP version 5

16 *

17 * @category Microsoft

18 * @package WindowsAzure\Common\Internal\Atom

19 * @author Azure PHP SDK <azurephpsdk@microsoft.com>

20 * @copyright 2012 Microsoft Corporation

21 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0

33 * @category Microsoft

34 * @package WindowsAzure\Common\Internal\Atom

35 * @author Azure PHP SDK <azurephpsdk@microsoft.com>

36 * @copyright 2012 Microsoft Corporation

37 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0

ProtectedUserFieldConstraintValidatorTest.php (https://gitlab.com/reasonat/test8) PHP · 309 lines

1 <?php

2

3 namespace Drupal\Tests\user\Unit\Plugin\Validation\Constraint;

39

40 /**

41 * @covers ::validate

42 *

43 * @dataProvider providerTestValidate

44 */

45 public function testValidate($items, $expected_violation, $name = FALSE) {

46 $constraint = new ProtectedUserFieldConstraint();

47

62 $validator = $this->createValidator();

63 $validator->initialize($context);

64 $validator->validate($items, $constraint);

65 }

66

length_class.php (https://bitbucket.org/elena_dyavolova/omf.git) PHP · 412 lines

1 <?php

2 class ControllerLocalisationLengthClass extends Controller {

3 private $error = array();

20 $this->load->model('localisation/length_class');

21

22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

23 $this->model_localisation_length_class->addLengthClass($this->request->post);

24

52 $this->load->model('localisation/length_class');

53

54 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

55 $this->model_localisation_length_class->editLengthClass($this->request->get['length_class_id'], $this->request->post);

56

84 $this->load->model('localisation/length_class');

85

86 if (isset($this->request->post['selected']) && $this->validateDelete()) {

87 foreach ($this->request->post['selected'] as $length_class_id) {

88 $this->model_localisation_length_class->deleteLengthClass($length_class_id);

sqlvalidator.class.php (https://github.com/BenBE/ispCP.git) PHP · 439 lines

1 <?php

2 /* vim: set expandtab sw=4 ts=4 sts=4: */

3 /**

4 * PHP interface to MimerSQL Validator

5 *

6 * Copyright 2002, 2003 Robin Johnson <robbat2@users.sourceforge.net>

8 *

9 * All data is transported over HTTP-SOAP

10 * And uses either the PEAR SOAP Module or PHP SOAP extension

11 *

12 * Install instructions for PEAR SOAP:

13 * Make sure you have a really recent PHP with PEAR support

14 * run this: "pear install Mail_Mime Net_DIME SOAP"

15 *

InternalApi.md (https://github.com/deribit/deribit-api-clients.git) Markdown · 458 lines

14 [**PublicGetFooterGet**](InternalApi.md#PublicGetFooterGet) | **GET** /public/get_footer | Get information to be displayed in the footer of the website.

15 [**PublicGetOptionMarkPricesGet**](InternalApi.md#PublicGetOptionMarkPricesGet) | **GET** /public/get_option_mark_prices | Retrives market prices and its implied volatility of options instruments

16 [**PublicValidateFieldGet**](InternalApi.md#PublicValidateFieldGet) | **GET** /public/validate_field | Method used to introduce the client software connected to Deribit platform over websocket. Provided data may have an impact on the maintained connection and will be collected for internal statistical purposes. In response, Deribit will also introduce itself.

17

18

412

413

414 # **PublicValidateFieldGet**

415 > object PublicValidateFieldGet(field, value, value2=var.value2)

421 library(openapi)

422

423 var.field <- 'field_example' # character | Name of the field to be validated, examples: postal_code, date_of_birth

424 var.value <- 'value_example' # character | Value to be checked

425 var.value2 <- 'value2_example' # character | Additional value to be compared with

430 api.instance$apiClient$username <- 'TODO_YOUR_USERNAME';

431 api.instance$apiClient$password <- 'TODO_YOUR_PASSWORD';

432 result <- api.instance$PublicValidateFieldGet(var.field, var.value, value2=var.value2)

433 dput(result)

434 ```

ValidationHooks.qunit.html (https://gitlab.com/crsr/openui5) HTML · 415 lines

64 equal(oEvent.getParameter("oldValue"), "hello", "old value");

65 equal(oEvent.getParameter("type"), oType, "type");

66 ok(oEvent.getParameter("exception") instanceof sap.ui.model.ValidateException, "exception instance");

67 equal(oEvent.getParameter("exception").violatedConstraints.length, 1, " violated constraints size");

68 equal(oEvent.getParameter("exception").violatedConstraints[0], "maxLength", "violated constraints check");

282 equal(oEvent.getParameter("oldValue"), "hello", "old value");

283 equal(oEvent.getParameter("type"), oType, "type");

284 ok(oEvent.getParameter("exception") instanceof sap.ui.model.ValidateException, "exception instance");

285 equal(oEvent.getParameter("exception").violatedConstraints.length, 1, " violated constraints size");

286 equal(oEvent.getParameter("exception").violatedConstraints[0], "maxLength", "violated constraints check");

316 equal(oEvent.getParameter("oldValue"), "hello", "old value");

317 equal(oEvent.getParameter("type"), oType, "type");

318 ok(oEvent.getParameter("exception") instanceof sap.ui.model.ValidateException, "exception instance");

319 equal(oEvent.getParameter("exception").violatedConstraints.length, 1, " violated constraints size");

320 equal(oEvent.getParameter("exception").violatedConstraints[0], "maxLength", "violated constraints check");

edit.php (https://github.com/sansanwawa/e-commerse.git) PHP · 337 lines

1 <?php

2 class ControllerAffiliateEdit extends Controller {

3 private $error = array();

16 $this->load->model('affiliate/affiliate');

17

18 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {

19 $this->model_affiliate_affiliate->editAffiliate($this->request->post);

20

260 }

261

262 private function validate() {

263 if ((strlen(utf8_decode($this->request->post['firstname'])) < 1) || (strlen(utf8_decode($this->request->post['firstname'])) > 32)) {

264 $this->error['firstname'] = $this->language->get('error_firstname');

event_profile_field_test.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 393 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

28 global $CFG;

29

30 require_once($CFG->dirroot . '/user/profile/definelib.php');

31

32 /**

68 $this->assertCount(1, $events);

69

70 // Validate that the event was correctly triggered.

71 $event = reset($events);

72 $this->assertInstanceOf('\core\event\user_info_category_created', $event);

103 $event2 = array_shift($events);

104

105 // Validate that the events were correctly triggered.

106 $this->assertInstanceOf('\core\event\user_info_category_updated', $event1);

107 $this->assertEquals($event1->objectid, $cat1->id);

attribute.php (https://bitbucket.org/jojoluzifer/gold-light-project.git) PHP · 446 lines

1 <?php

2 class ControllerCatalogAttribute extends Controller {

3 private $error = array();

20 $this->load->model('catalog/attribute');

21

22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

23 $this->model_catalog_attribute->addAttribute($this->request->post);

24

52 $this->load->model('catalog/attribute');

53

54 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

55 $this->model_catalog_attribute->editAttribute($this->request->get['attribute_id'], $this->request->post);

56

84 $this->load->model('catalog/attribute');

85

86 if (isset($this->request->post['selected']) && $this->validateDelete()) {

87 foreach ($this->request->post['selected'] as $attribute_id) {

88 $this->model_catalog_attribute->deleteAttribute($attribute_id);

Config.php (https://bitbucket.org/webpolis/liiv.git) PHP · 514 lines

1 <?php

2 /*

3 * CKFinder

21 * Include access control config class

22 */

23 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/AccessControlConfig.php";

24 /**

25 * Include resource type config class

26 */

27 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ResourceTypeConfig.php";

28 /**

29 * Include thumbnails config class

30 */

31 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ThumbnailsConfig.php";

32 /**

33 * Include thumbnails config class

ConfigurationController.php (https://gitlab.com/nitm/yii2-module) PHP · 330 lines

1 <?php

2

3 namespace nitm\controllers;

130 $this->setResponseFormat('json');

131

132 return \yii\widgets\ActiveForm::validate($this->model);

133 }

134

135 if ($this->model->validate()) {

136 switch ($this->model->getScenario()) {

137 case 'createContainer':

181 'class' => '',

182 ];

183 switch ($this->model->validate()) {

184 case true:

185 switch ($this->model->what) {

GetKillmailsKillmailIdKillmailHashOkVictim.php (https://gitlab.com/mglinski/php-esi-lib) PHP · 432 lines

1 <?php

2 /**

3 * GetKillmailsKillmailIdKillmailHashOkVictim

4 *

5 * PHP version 5

6 *

7 * @category Class

187

188 /**

189 * validate all the properties in the model

190 * return true if all passed

191 *

geo_zone.php (https://bitbucket.org/deringer/opencart.git) PHP · 436 lines

1 <?php

2 class ControllerLocalisationGeoZone extends Controller {

3 private $error = array();

20 $this->load->model('localisation/geo_zone');

21

22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

23 $this->model_localisation_geo_zone->addGeoZone($this->request->post);

24

52 $this->load->model('localisation/geo_zone');

53

54 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

55 $this->model_localisation_geo_zone->editGeoZone($this->request->get['geo_zone_id'], $this->request->post);

56

84 $this->load->model('localisation/geo_zone');

85

86 if (isset($this->request->post['selected']) && $this->validateDelete()) {

87 foreach ($this->request->post['selected'] as $geo_zone_id) {

88 $this->model_localisation_geo_zone->deleteGeoZone($geo_zone_id);

__init__.py (https://github.com/adamcik/mopidy.git) Python · 361 lines

1 from mopidy.models import fields

2 from mopidy.models.immutable import ImmutableObject, ValidatedImmutableObject

3 from mopidy.models.serialize import ModelJSONEncoder, model_json_decoder

4

15 "model_json_decoder",

16 "ModelJSONEncoder",

17 "ValidatedImmutableObject",

18 ]

19

20

21 class Ref(ValidatedImmutableObject):

22

23 """

91

92

93 class Image(ValidatedImmutableObject):

94

95 """

Files.php (https://github.com/jaws-project/jaws.git) PHP · 282 lines

1 <?php

2 /**

3 * Directory Gadget

53 try {

54 $loggedUser = (int)$this->app->session->user->id;

55 // Validate parent

56 if ($data['parent'] != 0) {

57 $parent = $this->gadget->model->load('Files')->GetFile($data['parent']);

DefaultOptions.php (https://github.com/Exercise/symfony.git) PHP · 320 lines

1 <?php

2

3 /*

18 * Helper for specifying and resolving inter-dependent options.

19 *

20 * Options are a common pattern for initializing classes in PHP. Avoiding the

21 * problems related to this approach is however a non-trivial task. Usually,

22 * both classes and subclasses should be able to set default option values.

233 public function addAllowedValues(array $allowedValues)

234 {

235 $this->validateOptionNames(array_keys($allowedValues));

236

237 $this->allowedValues = array_merge_recursive($this->allowedValues, $allowedValues);

257 $options = clone $this->options;

258

259 $this->validateOptionNames(array_keys($userOptions));

260

261 // Override options set by the user

SerpentEngine.java (https://gitlab.com/edgardo001/bc-java) Java · 296 lines

9 * <p>

10 * Serpent was designed by Ross Anderson, Eli Biham and Lars Knudsen as a

11 * candidate algorithm for the NIST AES Quest.

12 * <p>

13 * For full details see <a href="http://www.cl.cam.ac.uk/~rja14/serpent.html">The Serpent home page</a>

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

1 <?php

2 /**

3 * Interactions Cluster.

253 $args = array(

254 'id' => array(

255 'validate_callback' => function( $param, $request, $key ) {

256 return is_numeric( $param );

257 }

Api.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 287 lines

1 <?php

2 /**

3 * Magento Enterprise Edition

78 try {

79 // check if name is valid

80 $attributeSet->validate();

81 // copy parameters to new set from skeleton set

82 $attributeSet->save();

sfValidatorBaseTest.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 246 lines

1 <?php

2

3 /*

9 */

10

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

12

13 $t = new lime_test(47);

99 // ->clean()

100 $t->diag('->clean()');

101 $t->is($v->clean('foo'), 'foo', '->clean() returns a cleanup version of the data to validate');

102 try

103 {

104 $t->is($v->clean(''), '');

105 $t->fail('->clean() throws a sfValidatorError exception if the data does not validate');

106 $t->skip('', 1);

107 }

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

This C code is part of a file system implementation, specifically handling directory operations. It provides functions for removing blocks from directories, checking if a block is a leaf or not, and shrinking an inode by unmapping a block. The code ensures consistency and correctness in the file system’s internal data structures.

137

138 /*

139 * Validate a given inode number.

140 */

141 int

142 xfs_dir_ino_validate(

143 xfs_mount_t *mp,

144 xfs_ino_t ino)

160 ioff < (1 << mp->m_sb.sb_inopblog) &&

161 XFS_AGINO_TO_INO(mp, agno, agino) == ino;

162 if (unlikely(XFS_TEST_ERROR(!ino_ok, mp, XFS_ERRTAG_DIR_INO_VALIDATE,

163 XFS_RANDOM_DIR_INO_VALIDATE))) {

164 xfs_fs_cmn_err(CE_WARN, mp, "Invalid inode number 0x%Lx",

165 (unsigned long long) ino);

166 XFS_ERROR_REPORT("xfs_dir_ino_validate", XFS_ERRLEVEL_LOW, mp);

167 return XFS_ERROR(EFSCORRUPTED);

168 }

lib_test.php (https://github.com/markn86/moodle.git) PHP · 257 lines

1 <?php

2

3 // This file is part of Moodle - http://moodle.org/

20 *

21 * @package workshopform_numerrors

22 * @category phpunit

23 * @copyright 2009 David Mudrak <david.mudrak@gmail.com>

24 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

29 // Include the code to test

30 global $CFG;

31 require_once($CFG->dirroot . '/mod/workshop/locallib.php');

32 require_once($CFG->dirroot . '/mod/workshop/form/numerrors/lib.php');

68 // exercise SUT

69 $suggested = $this->strategy->calculate_peer_grade($grades);

70 // validate

71 $this->assertNull($suggested);

72 }

ParameterBagTest.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 224 lines

1 <?php

2

3 /*

14 use Symfony\Component\HttpFoundation\ParameterBag;

15

16 class ParameterBagTest extends \PHPUnit_Framework_TestCase

17 {

18 public function testConstructor()

171 $this->assertEquals('0123', $bag->filter('digits', '', false, FILTER_SANITIZE_NUMBER_INT), '->filter() gets a value of parameter as integer filtering out invalid characters');

172

173 $this->assertEquals('example@example.com', $bag->filter('email', '', false, FILTER_VALIDATE_EMAIL), '->filter() gets a value of parameter as email');

174

175 $this->assertEquals('http://example.com/foo', $bag->filter('url', '', false, FILTER_VALIDATE_URL, array('flags' => FILTER_FLAG_PATH_REQUIRED)), '->filter() gets a value of parameter as URL with a path');

176

177 // This test is repeated for code-coverage

178 $this->assertEquals('http://example.com/foo', $bag->filter('url', '', false, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED), '->filter() gets a value of parameter as URL with a path');

179

180 $this->assertFalse($bag->filter('dec', '', false, FILTER_VALIDATE_INT, array(

S3ControlClient.php (https://github.com/trob/fabrik.git) PHP · 206 lines

1 <?php

2 namespace Aws\S3Control;

3

156 $args['use_arn_region'] = $value;

157 } else {

158 // The Configuration class itself will validate other inputs

159 $args['use_arn_region'] = new Configuration($value);

160 }

rpc_gateway.h (https://github.com/adamgreen/gcc4mbed.git) C Header · 272 lines

28 * `gw_name` to perform a remote procedure call (RPC) to the target function

29 * given by `fn_name`. RPCs are assembled into a read-only flash structure that

30 * is read and validated by uVisor before performing the operation.

31 *

32 * Create function with following signature:

75 * `gw_name` to perform a remote procedure call (RPC) to the target function

76 * given by `fn_name`. RPCs are assembled into a read-only flash structure that

77 * is read and validated by uVisor before performing the operation.

78 *

79 * Create function with following signature:

PostSendFailed.php (https://gitlab.com/i-have-a-green/digitemis-v3) PHP · 427 lines

1 <?php

2 /**

3 * PostSendFailed

4 *

5 * PHP version 5

6 *

7 * @category Class

224

225 /**

226 * Validate all the properties in the model

227 * return true if all passed

228 *

udf-test-harness.h (https://gitlab.com/s9perween/Impala) C Header · 310 lines

52 static void CloseContext(FunctionContext* context);

53

54 // Template function to execute a UDF and validate the result. They should be

55 // used like:

56 // ValidateUdf(udf_fn, arg1, arg2, ..., expected_result);

59 // For variable argument udfs, the variable arguments should be passed as

60 // a std::vector:

61 // ValidateUdf(udf_fn, arg1, arg2, const vector<arg3>& args, expected_result);

62 template<typename RET>

63 static bool ValidateUdf(boost::function<RET(FunctionContext*)> fn,

71 RunCloseFn(close_fn, context.get());

72 CloseContext(context.get());

73 return Validate(context.get(), expected, ret);

74 }

75

NameIdValidatorTest.php (https://github.com/lightSAML/lightSAML.git) PHP · 438 lines

1 <?php

2

3 namespace LightSaml\Tests\Validator\Model\NameId;

16 $validator = new NameIdValidator();

17

18 $validator->validateNameId($nameId);

19

20 $this->assertTrue(true);

30 $validator = new NameIdValidator();

31

32 $validator->validateNameId($nameId);

33

34 $this->assertTrue(true);

43 $validator = new NameIdValidator();

44

45 $validator->validateNameId($nameId);

46

47 $this->assertTrue(true);

Users.php (https://gitlab.com/Sang240892/ecommerce) PHP · 132 lines

1 <?php

2

3 class Mandrill_Users {

89

90 /**

91 * Validate an API key and respond to a ping

92 * @return string the string "PONG!"

93 */

98

99 /**

100 * Validate an API key and respond to a ping (anal JSON parser version)

101 * @return struct a struct with one key "PING" with a static value "PONG!"

102 */

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

This Java class, LPaper, represents a graphical component in an Android game framework. It extends LContainer and provides functionality for rendering a paper-like background image with animations, handling touch events, and responding to user interactions such as clicks and drags.

155 }

156

157 protected void validateSize() {

158 super.validateSize();

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

1 <?php

2

3 /*

4 * $Id: MajoritySelector.php 123 2006-09-14 20:19:08Z mrook $

5 *

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

66 public function isSelected(PhingFile $basedir, $filename, PhingFile $file) {

67

68 $this->validate();

69

70 $yesvotes = 0;

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

804 <KEYWORD3>UPDATE</KEYWORD3>

805 <KEYWORD3>USER</KEYWORD3>

806 <KEYWORD3>VALIDATE</KEYWORD3>

807 <KEYWORD3>VALUES</KEYWORD3>

808 <KEYWORD3>VARCHAR</KEYWORD3>

PluginPropertyOnCompleteCommand.java (http://sagetv-addons.googlecode.com/svn/trunk/) Java · 46 lines ✨ Summary

This Java code defines a class PluginPropertyOnCompleteCommand that extends PluginPropertyServerPersisted. It creates a property on SageTV plugins to specify a command to execute when a download completes successfully, with validation to ensure the specified file exists on the SageTV server. The property is stored in a configuration file and can be set by users through the plugin’s interface.

36

37 @Override

38 public void validate(String prop, String val) throws Exception {

39 if(!"".equals(val) && !Utility.IsFilePath(val))

40 throw new IllegalArgumentException(String.format("Specified file does not exist on SageTV server! [%s]", val));

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

179 if (m_layerTreeHost) {

180 m_layerTreeHost->paint();

181 ::ValidateRect(m_hwnd, 0);

182 } else

183 #endif

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.

57 }

58

59 static void ext4_invalidatepage(struct page *page, unsigned long offset);

60

61 /*

455 goto failure;

456 }

457 /* validate block references */

458 if (ext4_check_indirect_blockref(inode, bh)) {

459 put_bh(bh);

EditorHistoryManager.java (https://bitbucket.org/nbargnesi/idea.git) Java · 365 lines

233 * Removes all entries that correspond to invalid files

234 */

235 private void validateEntries(){

236 for(int i=myEntriesList.size()-1; i>=0; i--){

237 final HistoryEntry entry = myEntriesList.get(i);

246 */

247 public VirtualFile[] getFiles(){

248 validateEntries();

249 final VirtualFile[] result = new VirtualFile[myEntriesList.size()];

250 for(int i=myEntriesList.size()-1; i>=0 ;i--){

276

277 public FileEditorState getState(final VirtualFile file, final FileEditorProvider provider) {

278 validateEntries();

279 final HistoryEntry entry = getEntry(file);

280 return entry != null ? entry.getState(provider) : null;

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

This C header file defines a data structure and functions for managing metadata pages in a journaling file system, specifically JFS (Journaling File System). It provides functions for initializing, exiting, and manipulating metapages, which store information about file system blocks and their contents. The code also handles synchronization and caching of page updates.

143

144 /*

145 * This routines invalidate all pages for an extent.

146 */

147 extern void __invalidate_metapages(struct inode *, s64, int);

148 #define invalidate_pxd_metapages(ip, pxd) \

149 __invalidate_metapages((ip), addressPXD(&(pxd)), lengthPXD(&(pxd)))

150 #define invalidate_dxd_metapages(ip, dxd) \

151 __invalidate_metapages((ip), addressDXD(&(dxd)), lengthDXD(&(dxd)))

152 #define invalidate_xad_metapages(ip, xad) \

153 __invalidate_metapages((ip), addressXAD(&(xad)), lengthXAD(&(xad)))

OverriddenMethod.Quadruple.cs (https://Silverlight.svn.codeplex.com/svn) C# · 101 lines ✨ Summary

This C# class OverriddenMethod is a test class for methods with 3 parameters, providing a base implementation that can be overridden by derived classes. It includes event handlers for pre-test and post-test actions, allowing developers to perform custom tests before and after the base implementation is invoked. The class also handles parameter validation and invocation of test actions.

66 DoInvariantTest();

67

68 ValidateParameters(parameters, 4);

69 T1 first = GetParameter<T1>(parameters, 0);

70 T2 second = GetParameter<T2>(parameters, 1);

pre-commit (git://github.com/jwiegley/ledger.git) Bash · 70 lines ✨ Summary

This Bash script is a pre-commit hook for Git repositories. It checks out a copy of the current index, removes unnecessary files, and copies changed files to a temporary build tree. It then regenerates Makefiles if necessary and rebuilds the proposed source tree using acprep or make check. The script exits with success if it’s run on a branch of interest, otherwise it exits with failure.

29 # timestamps. This includes copying over new files, and deleting

30 # removed ones. This way, "make check" will only rebuild what is

31 # necessary to validate the commit.

32 rsync -rlpgoDOc --delete --exclude-from=tools/excludes $MIRROR/ $TMPDIR/

33

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

This C code implements a caching system for file systems, known as FS-Cache. It allows multiple file systems to share cached data and reduces I/O operations by storing frequently accessed files in memory. The code provides functions to add, remove, and manage caches, as well as handle errors and withdraw caches from service.

42 up_read(&fscache_addremove_sem);

43

44 /* the tag does not exist - create a candidate */

45 xtag = kzalloc(sizeof(*xtag) + strlen(name) + 1, GFP_KERNEL);

46 if (!xtag)

amf-uml-states.ads (git://github.com/landgraf/matreshka.git) Ada · 320 lines ✨ Summary

This is an Ada implementation of a UML State Machine class. It defines a set of abstract operations and attributes for managing states, including entry and exit actions, state invariants, and relationships with other states and state machines. The class provides a framework for modeling complex state-based systems and allows for redefinition and extension of existing states.

102 -- Getter of State::deferrableTrigger.

103 --

104 -- A list of triggers that are candidates to be retained by the state

105 -- machine if they trigger no transitions out of the state (not consumed).

106 -- A deferred trigger is retained until the state machine reaches a state

WordComposer.java (http://softkeyboard.googlecode.com/svn/) Java · 142 lines ✨ Summary

This Java class, WordComposer, is used to store and manage a composing word on an Android keyboard. It tracks keystrokes, stores the typed word, and provides methods for deleting characters, checking capitalization preferences, and retrieving the preferred word. The class also allows for resetting the composition and storing a user-selected word before it’s committed to a text field.

30

31 /**

32 * The word chosen from the candidate list, until it is committed.

33 */

34 private String mPreferredWord;

propertyOptimize-4.js (git://github.com/zpao/v8monkey.git) JavaScript · 17 lines ✨ Summary

The code creates a new prototype Foo for the Bar function, which inherits properties from an object o. The o object defines a getter for the property y, but only if the updated flag is set to true. When a new instance of Bar is created, its y property is initially undefined, and setting it triggers the getter, updating the updated flag.

1 // Make sure new script properties can be invalidated on specialized prototype

2 // types while they are still being constructed.

3

TemplateSettings.java (https://bitbucket.org/nbargnesi/idea.git) Java · 747 lines

711 }

712

713 public List<TemplateImpl> collectMatchingCandidates(String key, Character shortcutChar, boolean hasArgument) {

714 final Collection<TemplateImpl> templates = getTemplates(key);

715 List<TemplateImpl> candidates = new ArrayList<TemplateImpl>();

727 continue;

728 }

729 candidates.add(template);

730 }

731 return candidates;

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

This Java code defines a SessionSwitcher class, which is a toolbar component for jEdit that allows users to switch between different sessions. It provides buttons for saving, reloading, and managing session properties, as well as updating the current session in a combo box dropdown menu. The toolbar also displays a title with customizable text.

234 title = new JLabel(jEdit.getProperty("sessions.switcher.title"));

235 add(title, 0);

236 revalidate();

237 }

238

244

245 remove(title);

246 revalidate();

247 title = null;

248 }

AnySoftKeyboard.java (http://softkeyboard.googlecode.com/svn/) Java · 2062 lines ✨ Summary

This Java code is part of a keyboard application, handling various user interactions such as inputting text, deleting characters, and displaying toast messages. It also manages shared preferences, handles low memory situations, and performs lengthy operations like loading settings and updating dictionaries. The code appears to be designed for an Android application, utilizing various Android APIs and classes.

88 private CandidateViewContainer mCandidateViewContainer;

89 private CandidateView mCandidateView;

90 private Suggest mSuggest;

91 private CompletionInfo[] mCompletions;

266 mCandidateViewContainer.initViews();

267 mCandidateView = (CandidateView) mCandidateViewContainer

268 .findViewById(R.id.candidates);

410 // clear whatever candidate text we have.

411 if (mComposing.length() > 0 && mPredicting

412 && (newSelStart != candidatesEnd || newSelEnd != candidatesEnd)) {

413 resetComposing();

414 } else if (!mPredicting

490 // or if the physical keyboard supports candidates

491 // (mPredictionLandscape)

492 super.setCandidatesViewShown(shouldCandidatesStripBeShown() && shown);

493 }

494

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

This Java class, CompletionRequest, is part of a CSS editor’s auto-completion feature. It analyzes user input and suggests possible completions based on CSS properties, units, and values. The class uses regular expressions to parse the input text and determine whether it matches certain patterns, allowing it to provide relevant suggestions for completion.

135

136 //{{{ addMatchedToCompletionList() method

137 private void addMatchedToCompletionList(ArrayList cantidateCompletions, String startsWith) {

138 Iterator it = cantidateCompletions.iterator();

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

This C header file defines a unified network-device I/O interface for Xen guest OSes, providing structures and types for transmitting and receiving packets over a network interface. It specifies packet formats, checksums, and flags, as well as response codes and ring structures for compatibility with different request-response scenarios.

36 #define NETTXF_csum_blank (1U<<_NETTXF_csum_blank)

37

38 /* Packet data has been validated against protocol checksum. */

39 #define _NETTXF_data_validated (1)

40 #define NETTXF_data_validated (1U<<_NETTXF_data_validated)

41

42 /* Packet continues in the next request descriptor. */

116 };

117

118 /* Packet data has been validated against protocol checksum. */

119 #define _NETRXF_data_validated (0)

120 #define NETRXF_data_validated (1U<<_NETRXF_data_validated)

121

122 /* Protocol checksum field is blank in the packet (hardware offload)? */

PP.html (git://github.com/shouldly/shouldly.git) HTML · 290 lines ✨ Summary

This HTML code is a documentation page for the Nokogiri::XML::PP class, likely part of the Ruby programming language. It displays information about the class, including its methods and attributes, in a structured format with headings, paragraphs, and links to related resources. The page also includes debugging information and validation badges.

280

281 <div id="validator-badges">

282 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>

283 <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish

284 Rdoc Generator</a> 1.1.6</small>.</p>

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

402 (the default), the \a name must correspond to a valid table or

403 view name in the database. Also, note that all references to the

404 cursor edit buffer become invalidated when fields are

405 auto-populated. See the Q3SqlCursor constructor documentation for

406 more information.

464 /*!

465 Append a copy of field \a fieldInfo to the end of the cursor. Note

466 that all references to the cursor edit buffer become invalidated.

467 */

468

476 /*!

477 Removes all fields from the cursor. Note that all references to

478 the cursor edit buffer become invalidated.

479 */

480 void Q3SqlCursor::clear()

cache-sh2a.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 130 lines ✨ Summary

This C code implements cache flushing functions for a SH2A processor. It provides three main flush functions: __flush_wback_region, __flush_purge_region, and __flush_invalidate_region. These functions handle write-back, purge, and invalidate cache operations, respectively, by manipulating cache control registers and sending commands to the cache controller. They are used to clear or update cached data in specific memory regions.

66 }

67

68 void __flush_invalidate_region(void *start, int size)

69 {

70 unsigned long v;

79

80 #ifdef CONFIG_CACHE_WRITEBACK

81 ctrl_outl(ctrl_inl(CCR) | CCR_OCACHE_INVALIDATE, CCR);

82 /* I-cache invalidate */

120 }

121 }

122 /* I-Cache invalidate */

123 ctrl_outl(addr,

124 CACHE_IC_ADDRESS_ARRAY | addr | 0x00000008);

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

This C code is part of a memory management system for a semiconductor device. It loads data from a BMS (Block Map Information) structure into a Reservoir block, which is used to manage memory allocation and deallocation in the device. The code checks for errors and ensures that the loaded data is valid before proceeding.

275 if (pstVol->nNumOfPlane > 1)

276 {

277 /* unlock unused reservoir candidate blocks */

278 for ( nNumOfRemainLockedRCB = pstBMI->nNumOfRCBs, nIdx = 0;

279 ( nNumOfRemainLockedRCB > 0 ) && ( nIdx < ( ( pstRsv->nNumOfRsvrInSLC + pstRsv->nNumOfRsvrInMLC ) / 2 ) );

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

150

151 private:

152 static inline bool isLangMatch(const QString &candidate, const QString &toMatch);

153 };

154

insertandretry.cs (http://google-gdata.googlecode.com/svn/trunk/) C# · 247 lines ✨ Summary

This C# code is part of a YouTube video uploader application. It manages a queue of video uploads, retrying failed attempts and parsing successful upload responses to extract video IDs. The code uses asynchronous operations and event handlers to handle upload progress, errors, and completion, with features like automatic retries and cancellation options.

165 // when an upload is completed successfully we parse the return stream

166 // to setup the videoid.

167 // also all retry counts will be reset to 0, as a successful upload incidates

168 // a restored network condition (e.g.).

169 private void ParseAndFinish(UserState u, Stream s) {

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

This C code is part of a Linux kernel module that provides debugging functionality for a distributed lock manager (DLM). It creates and manages debug files in the /sys/debugfs directory, allowing users to inspect various aspects of DLM operation, such as its state, locking behavior, and memory usage. The code uses the debugfs subsystem to create and manage these debug files.

212 [DLM_CVTUNGRANT] = "attempted to convert ungranted lock",

213 [DLM_BADPARAM] = "invalid lock mode specified",

214 [DLM_VALNOTVALID] = "value block has been invalidated",

215 [DLM_REJECTED] = "request rejected, unrecognized client",

216 [DLM_ABORT] = "blocked lock request cancelled",

VariableGridLayout.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 338 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.

224

225

226 public void invalidateLayout(Container container) {

227 int ncomponents = container.getComponentCount();

228 int old_nrows = nrows;

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

746 {

747 textArea.setFont(newFont);

748 textArea.invalidate();

749 }

750 }

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

This HTML code is a documentation page for a Java class called BrowserOptionPane. It displays information about the class, including its purpose, fields, methods, and nested classes. The page includes navigation links to related classes and a summary of the class’s contents. The output appears to be generated by a tool or framework that creates documentation pages from Java source code.

262 </TR>

263 <TR BGCOLOR="white" CLASS="TableRowColor">

264 <TD><CODE>addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update</CODE></TD>

265 </TR>

266 </TABLE>

271 </TR>

272 <TR BGCOLOR="white" CLASS="TableRowColor">

273 <TD><CODE>add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree</CODE></TD>

274 </TR>

275 </TABLE>

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

This Java code is a SVN blame tool, which displays the revision history of a file by showing the author and revision number for each line of code. It takes a LogData object as input, which contains information about the SVN repository, username, password, and paths to analyze. The output is displayed on the console.

58 SVNKit.setupLibrary();

59

60 // validate data values

61 if ( data.getPaths() == null ) {

62 return null; // nothing to do

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

This Java code defines a MouseHandler class that handles mouse events for a text area in a graphical user interface, specifically for the jEdit editor. It processes mouse clicks and releases to perform actions such as selecting text, copying, pasting, and dragging selections. The handler also updates the text area’s state and notifies other parts of the application about changes.

93

94 textArea.blink = true;

95 textArea.invalidateLine(textArea.getCaretLine());

96

97 clickCount = evt.getClickCount();

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

1 <!-- DTD used to validate the XML file pulled down from plugin central -->

2

3 <!ENTITY % att-bool '( TRUE | FALSE )' >

strings.xml (http://softkeyboard.googlecode.com/svn/) XML · 139 lines

103 <string name="auto_caps">Automatisk begynnelsebokstav</string>

104 <string name="grammer_group">Grammatik</string>

105 <string name="candidates_on">Visa förslag</string>

106 <string name="quick_fix">Snabbfixar</string>

107 <string name="quick_fix_summary">Rätta vanligt felskrivna ord</string>

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

This Java code defines a custom layout manager for a Swing application, specifically designed to arrange multiple components (e.g., text fields, buttons, and an edit pane) in a specific way. It handles component positioning, sizing, and alignment, as well as responding to changes in the container’s size or layout. The layout is optimized for a split-pane or multi-edit-pane interface.

465 } //}}}

466

467 //{{{ invalidateLayout() method

468 public void invalidateLayout(Container target) {}

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

This C code implements a timestamp-based congestion control algorithm for TCP-like protocols, specifically DCCP (Datagram Congestion Control Protocol). It manages a ring buffer to store timestamp and CCVal values, sampling RTT (Round-Trip Time) from these values to adjust congestion control parameters. The code provides functions for allocating and purging the ring buffer, as well as computing RTT samples based on timestamp and CCVal values.

449

450 if (delta_v < 1 || delta_v > 4) { /* unsuitable CCVal delta */

451 if (h->rtt_sample_prev == 2) { /* previous candidate stored */

452 sample = SUB16(tfrc_rx_hist_rtt_prev_s(h)->tfrchrx_ccval,

453 tfrc_rx_hist_rtt_last_s(h)->tfrchrx_ccval);

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

231 }

232

233 void ChromeClientWinCE::invalidateWindow(const IntRect&, bool)

234 {

235 notImplemented();

236 }

237

238 void ChromeClientWinCE::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)

239 {

240 RECT rect = updateRect;

241 InvalidateRect(m_webView->windowHandle(), &rect, FALSE);

242

243 if (immediate)

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

105 protected:

106 bool event(QEvent *event);

107 virtual QValidator::State validate(QString &input, int &pos) const;

108 virtual int valueFromText(const QString &text) const;

109 virtual QString textFromValue(int val) const;

163 void setDecimals(int prec);

164

165 virtual QValidator::State validate(QString &input, int &pos) const;

166 virtual double valueFromText(const QString &text) const;

167 virtual QString textFromValue(double val) const;

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)

tree.h (https://bitbucket.org/Tsiannian/cocos2d-x.git) C++ Header · 1253 lines

619 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)

620 XMLPUBFUN int XMLCALL

621 xmlValidateNCName (const xmlChar *value,

622 int space);

623 #endif

625 #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)

626 XMLPUBFUN int XMLCALL

627 xmlValidateQName (const xmlChar *value,

628 int space);

629 XMLPUBFUN int XMLCALL

630 xmlValidateName (const xmlChar *value,

631 int space);

632 XMLPUBFUN int XMLCALL

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

This Java code creates a splash screen for a graphical user interface (GUI) application, displaying an image and a progress bar with version information. It uses AWT APIs to create the GUI components and waits for the image to load before showing the splash screen. The advance() method updates the progress bar over time.

67 win.setLocation((screen.width - size.width) / 2,

68 (screen.height - size.height) / 2);

69 win.validate();

70 win.show();

71

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

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

88

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

90

91 - Updated Omnimark syntax highlighting (Lionel Fiol).

692 Mac OS X, C+h is always captured by the OS.

693

694 - Changing the wrap mode didn't invalidate screen line counts, this

695 could result in scrolling getting messed up.

696

892 modes.

893

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

895

896 }}}

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

This Java class, SettingsReloader, is a utility that reloads macros and modes when necessary. It listens for VFSUpdate messages from the JEdit editor and checks if the updated path starts with specific directories (e.g., macros or modes). If it does, it calls methods to reload the corresponding settings.

69 dirset.getDirectory());

70 if(path.startsWith(dir))

71 dirset.invalidateCachedList();

72 }

73

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

This Java code creates a graphical user interface (GUI) for editing and saving snippets of text, likely used in a programming context. It allows users to input snippet details, such as title, tags, language, and source code, and then save the snippet to a server using an XML-RPC service. The GUI also includes buttons for canceling and saving the snippet.

306 setSize(newSize);

307 }

308 validate();

309 } //}}}

310

ndis_events.c (https://bitbucket.org/freebsd/freebsd-head/) C · 809 lines ✨ Summary

This C code initializes a Windows-based network interface for receiving notifications about network events, such as packet arrival and error conditions. It creates an instance of a WMI (Windows Management Instrumentation) object sink, connects to a WMI server, and registers asynchronous notifications with the sink. The sink provides methods for querying, adding references, releasing, indicating, and setting the status of the notification.

604

605 /*

606 * Try to get even better candidate for matching with InstanceName

607 * from Win32_PnPEntity. This is needed at least for some USB cards

608 * that can change the InstanceName whenever being unplugged and

bsh.jjt (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 1381 lines

469 Gather modifiers for a class, method, or field.

470 I lookahead is true then we are being called as part of a lookahead and we

471 should not enforce any rules. Otherwise we validate based on context

472 (field, method, class)

473 */

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

268 {

269 // The following assertions are not quite valid here, since a subclass

270 // might override didReceiveData in a way that invalidates them. This

271 // happens with the steps listed in 3266216

272 // ASSERT(con == connection);

zone.hh (git://github.com/ticking/self.git) C++ Header · 270 lines ✨ Summary

This C++ header file defines a memory management system for a compiler, specifically for handling nmethods (optimized methods). It provides classes and functions for managing memory allocation, deallocation, and usage tracking, as well as features like LRU caching and frame chaining. The code is designed to be used in a compiler environment, with various zones (memory regions) and objects (nmethods) that interact with each other.

52 codeTable* debugTable;// same for nmethods with debugging code

53 nmln rememberLink; // list of nmethods with pointers to newspace

54 nmln replCandidates; // list of replacement candidates

55 nmln zombies; // list of zombie methods

56

95 void flushUnused();

96 void flush_inline_cache();

97 int32 findReplCandidates(int32 needed);

98

99 void nonCombiningMode() {

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

This Java code creates a configuration pane for managing available extensions in a project viewer application. It allows users to enable or disable extensions, and saves these settings when the user closes the pane. The extension list is displayed with checkboxes, which can be used to toggle their enabled state.

80 if (e.getStateChange() == ItemEvent.SELECTED) {

81 add(BorderLayout.CENTER, sd.list);

82 revalidate();

83 } else if (e.getStateChange() == ItemEvent.DESELECTED) {

84 remove(sd.list);

85 revalidate();

86 }

87 }

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

This C code initializes and manages a journaling system for Linux file systems, specifically ext4. It sets up various data structures, caches, and modules to handle journaling operations, including logging, caching, and device name mapping. The code also handles module initialization and cleanup, as well as error handling and debugging features.

83 EXPORT_SYMBOL(jbd2_journal_wipe);

84 EXPORT_SYMBOL(jbd2_journal_blocks_per_page);

85 EXPORT_SYMBOL(jbd2_journal_invalidatepage);

86 EXPORT_SYMBOL(jbd2_journal_try_to_free_buffers);

87 EXPORT_SYMBOL(jbd2_journal_force_commit);

WebEventFactory.mm (https://bitbucket.org/ultra_iter/qt-vtl.git) Objective C++ · 1149 lines

310

311 // "Accept"

312 // "AllCandidates"

313

314 // "Alt"

494

495 // "Play"

496 // "PreviousCandidate"

497

498 // "PrintScreen"

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

467 <listitem>

468 <para>You will be prompted with a MS-Office-like spell check dialog box for each

469 word that needs to be validated.</para>

470 </listitem>

471 <listitem>

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>.

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

This C code implements a Linux kernel module that provides a block device driver for creating virtual block devices, known as “loop devices”. It allows users to create and manage these devices, which can be used to emulate other block devices, such as CDs or hard drives. The module can be loaded at runtime, allowing users to dynamically add new loop devices without rebooting the system.

69 #include <linux/freezer.h>

70 #include <linux/writeback.h>

71 #include <linux/buffer_head.h> /* for invalidate_bdev() */

72 #include <linux/completion.h>

73 #include <linux/highmem.h>

856 lo->lo_flags = 0;

857 set_capacity(lo->lo_disk, 0);

858 invalidate_bdev(bdev);

859 bd_set_size(bdev, 0);

860 mapping_set_gfp_mask(mapping, lo->old_gfp_mask);

942 memset(lo->lo_file_name, 0, LO_NAME_SIZE);

943 if (bdev)

944 invalidate_bdev(bdev);

945 set_capacity(lo->lo_disk, 0);

946 if (bdev)

xmlschemas.h (https://bitbucket.org/Tsiannian/cocos2d-x.git) C++ Header · 219 lines

180 xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);

181 XMLPUBFUN int XMLCALL

182 xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,

183 xmlDocPtr instance);

184 XMLPUBFUN int XMLCALL

185 xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,

186 xmlNodePtr elem);

187 XMLPUBFUN int XMLCALL

188 xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,

189 xmlParserInputBufferPtr input,

190 xmlCharEncoding enc,

i4gl.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 665 lines

623 <KEYWORD1>USER</KEYWORD1>

624 <KEYWORD1>USING</KEYWORD1>

625 <KEYWORD1>VALIDATE</KEYWORD1>

626 <KEYWORD1>VALUE</KEYWORD1>

627 <KEYWORD1>VALUES</KEYWORD1>

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

This HTML code outputs a documentation page for a spell checking plugin for the Java-based text editor jEdit. It provides information on how to build and use the plugin, its features, current bugs and todo list, as well as release history. The content is written in a formal tone, suggesting that it is intended for technical users or developers who want to learn about the plugin’s functionality and development process.

20 <li>Configurable location of <a href="http://aspell.sourceforge.net/">Aspell</a>

21 executable</li>

22 <li>Spell check dialog to allow the user to validate each suspect word. The

23 dialog has buttons for: Cancel, Change, Change All, Ignore, and Ignore All.

24 It shows the suspect word, lists suggested replacements, and has a field

61 to hide this on Windows?)</li>

62 <li>You will be prompted with a MS-Office-like spell check dialog box for each

63 word that needs to be validated.</li>

64 <li>Below is more info on the dialog box.</li>

65 </ul>

ruby_xml_html_parser_context.c (git://github.com/shouldly/shouldly.git) C · 307 lines ✨ Summary

This C code defines a Ruby class cXMLHtmlParserContext that represents an XML parser context. It provides methods to create and configure parsers, such as parsing from strings, files, or input streams, and controlling options like CDATA handling and parser behavior. The class is initialized with various constants and methods for setting options and disabling CDATA nodes.

105 ctxt->vctxt.warning = xmlParserValidityWarning;

106 ctxt->record_info = 0;

107 ctxt->validate = 0;

108 ctxt->nbChars = 0;

109 ctxt->checkIndex = 0;

project.pbxproj (https://github.com/balintorosz/pubnub-api.git) Unknown · 323 lines

268 OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";

269 SDKROOT = iphoneos;

270 VALIDATE_PRODUCT = YES;

271 };

272 name = Release;

jquery.validate.min-vsdoc.js (https://cfx.svn.codeplex.com/svn) JavaScript · 1284 lines ✨ Summary

This JavaScript code extends jQuery’s functionality with additional features, including:

  • A validator plugin for form validation
  • An AJAX mode that aborts previous requests on the same port
  • Cross-browser focusin and focusout events
  • Event delegation and triggering of delegated events
  • A deprecated $.format method replaced by $.validator.format

It provides a set of utility functions to enhance jQuery’s functionality.

134

135 if ( $(this[0]).is('form')) {

136 return this.validate().form();

137 } else {

138 var valid = true;

388

389 if (this.settings.invalidHandler)

390 $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);

391 },

392

423 /// </summary>

424 /// <param name="element" type="Selector">

425 /// An element to validate, must be inside the validated form.

426 /// </param>

427 /// <returns type="Boolean" />

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

This C header file defines a software ring buffer implementation for industrial I/O devices. It provides functions for creating, initializing, and managing the ring buffer, as well as accessing its contents. The ring buffer is designed to be used in a data capture application where no user-space reads should interrupt the capture process.

86 * @count: number of datum's to try and read

87 * @data: where the data will be stored.

88 * @dead_offset: how much of the stored data was possibly invalidated by

89 * the end of the copy.

90 **/

index.cfm (git://github.com/mhenke/litepost.git) ColdFusion · 47 lines ✨ Summary

This ColdFusion code initializes and configures a Mach-II application. It sets encoding, configuration mode, app key, XML validation, and DTD path. The code also includes the mach-ii.cfm file and clears the object cache. If the URL contains an “init” parameter, it reloads the application; otherwise, it sets the configuration mode to dynamic.

38 <cfset MACHII_APP_KEY = GetFileFromPath(ExpandPath(".")) />

39 <!---

40 Whether or not to validate the XML configuration file before parsing.

41 Only works on CFMX7. Default to false.

42 --->

43 <cfset MACHII_VALIDATE_XML = false />

44 <!--- Set the path to the Mach-II's DTD file. Default to ./config/mach-ii_1_1.dtd. --->

45 <cfset MACHII_DTD_PATH = ExpandPath('./config/mach-ii_1_1.dtd') />