100+ results for 'php idate'
Not the results you expected?
ezisbn10to13converter.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 355 lines
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');
22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
23 $this->model_localisation_zone->addZone($this->request->post);
52 $this->load->model('localisation/zone');
54 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
55 $this->model_localisation_zone->editZone($this->request->get['zone_id'], $this->request->post);
84 $this->load->model('localisation/zone');
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');
22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
23 $this->model_sale_customer_group->addCustomerGroup($this->request->post);
52 $this->load->model('sale/customer_group');
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);
84 $this->load->model('sale/customer_group');
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
local.php (https://gitlab.com/Svyrydov/test-project) PHP · 903 lines
1 <?php
3 class acf_local {
33 function get_field_groups( $field_groups ) {
35 // validate
36 if( !acf_have_local_field_groups() ) {
138 function add_field_group( $field_group ) {
140 // validate
141 $field_group = acf_get_valid_field_group($field_group);
153 if( empty($field_group['local']) ) {
155 $field_group['local'] = 'php';
157 }
GameLiftClient.php (https://github.com/trob/fabrik.git) PHP · 200 lines
1 <?php
2 namespace Aws\GameLift;
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
3 /*
9 */
11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');
13 $t = new lime_test(52);
21 $t->ok($v->clean(null) === null, '->clean() returns null if not required');
23 // validate strtotime formats
24 $t->diag('validate strtotime formats');
38 }
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';
28 /**
142 public function setTags(array $tags)
143 {
144 // Validate and cleanup the tags
145 $itemList = $this->getItemList();
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
3 // This file is part of Moodle - http://moodle.org/
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
CollectionValidatorTest.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 412 lines
1 <?php
3 /*
20 use Symfony\Component\Validator\Constraints\CollectionValidator;
22 abstract class CollectionValidatorTest extends \PHPUnit_Framework_TestCase
23 {
24 protected $context;
49 ->method('addViolationAt');
51 $this->validator->validate(null, new Collection(array('fields' => array(
52 'foo' => new Range(array('min' => 4)),
53 ))));
61 ->method('addViolationAt');
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';
28 /**
142 public function setTags(array $tags)
143 {
144 // Validate and cleanup the tags
145 $itemList = $this->getItemList();
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
3 /*
240 private function loadFile($file)
241 {
242 return $this->validate(Yaml::parse($file), $file);
243 }
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
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
3 namespace Drupal\Tests\user\Unit\Plugin\Validation\Constraint;
40 /**
41 * @covers ::validate
42 *
43 * @dataProvider providerTestValidate
44 */
45 public function testValidate($items, $expected_violation, $name = FALSE) {
46 $constraint = new ProtectedUserFieldConstraint();
62 $validator = $this->createValidator();
63 $validator->initialize($context);
64 $validator->validate($items, $constraint);
65 }
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');
22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
23 $this->model_localisation_length_class->addLengthClass($this->request->post);
52 $this->load->model('localisation/length_class');
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);
84 $this->load->model('localisation/length_class');
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.
414 # **PublicValidateFieldGet**
415 > object PublicValidateFieldGet(field, value, value2=var.value2)
421 library(openapi)
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');
18 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
19 $this->model_affiliate_affiliate->editAffiliate($this->request->post);
260 }
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;
30 require_once($CFG->dirroot . '/user/profile/definelib.php');
32 /**
68 $this->assertCount(1, $events);
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);
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');
22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
23 $this->model_catalog_attribute->addAttribute($this->request->post);
52 $this->load->model('catalog/attribute');
54 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
55 $this->model_catalog_attribute->editAttribute($this->request->get['attribute_id'], $this->request->post);
84 $this->load->model('catalog/attribute');
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
3 namespace nitm\controllers;
130 $this->setResponseFormat('json');
132 return \yii\widgets\ActiveForm::validate($this->model);
133 }
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
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');
22 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
23 $this->model_localisation_geo_zone->addGeoZone($this->request->post);
52 $this->load->model('localisation/geo_zone');
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);
84 $this->load->model('localisation/geo_zone');
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
15 "model_json_decoder",
16 "ModelJSONEncoder",
17 "ValidatedImmutableObject",
18 ]
21 class Ref(ValidatedImmutableObject):
23 """
93 class Image(ValidatedImmutableObject):
95 """
Files.php (https://github.com/jaws-project/jaws.git) PHP · 282 lines
DefaultOptions.php (https://github.com/Exercise/symfony.git) PHP · 320 lines
1 <?php
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));
237 $this->allowedValues = array_merge_recursive($this->allowedValues, $allowedValues);
257 $options = clone $this->options;
259 $this->validateOptionNames(array_keys($userOptions));
261 // Override options set by the user
SerpentEngine.java (https://gitlab.com/edgardo001/bc-java) Java · 296 lines
class-cp-interactions-cluster.php (https://gitlab.com/dev73/clusterpress) PHP · 345 lines
Api.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 287 lines
sfValidatorBaseTest.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 246 lines
1 <?php
3 /*
9 */
11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');
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.
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.
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
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
3 /*
14 use Symfony\Component\HttpFoundation\ParameterBag;
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');
173 $this->assertEquals('example@example.com', $bag->filter('email', '', false, FILTER_VALIDATE_EMAIL), '->filter() gets a value of parameter as email');
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');
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');
180 $this->assertFalse($bag->filter('dec', '', false, FILTER_VALIDATE_INT, array(
S3ControlClient.php (https://github.com/trob/fabrik.git) PHP · 206 lines
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
udf-test-harness.h (https://gitlab.com/s9perween/Impala) C Header · 310 lines
52 static void CloseContext(FunctionContext* context);
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 }
NameIdValidatorTest.php (https://github.com/lightSAML/lightSAML.git) PHP · 438 lines
1 <?php
3 namespace LightSaml\Tests\Validator\Model\NameId;
16 $validator = new NameIdValidator();
18 $validator->validateNameId($nameId);
20 $this->assertTrue(true);
30 $validator = new NameIdValidator();
32 $validator->validateNameId($nameId);
34 $this->assertTrue(true);
43 $validator = new NameIdValidator();
45 $validator->validateNameId($nameId);
47 $this->assertTrue(true);
Users.php (https://gitlab.com/Sang240892/ecommerce) PHP · 132 lines
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.
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.
cobol.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 1002 lines
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.
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.
MediaPlayerPrivateFullscreenWindow.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 205 lines
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.
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.
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--){
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
TemplateSettings.java (https://bitbucket.org/nbargnesi/idea.git) Java · 747 lines
711 }
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.
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.
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.
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 }
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.
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.
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.
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)
38 /* Packet data has been validated against protocol checksum. */
39 #define _NETTXF_data_validated (1)
40 #define NETTXF_data_validated (1U<<_NETTXF_data_validated)
42 /* Packet continues in the next request descriptor. */
116 };
118 /* Packet data has been validated against protocol checksum. */
119 #define _NETRXF_data_validated (0)
120 #define NETRXF_data_validated (1U<<_NETRXF_data_validated)
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.
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.
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 */
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.
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 }
68 void __flush_invalidate_region(void *start, int size)
69 {
70 unsigned long v;
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.
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.
qnodefns_p.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 176 lines
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.
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.
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.
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.
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.
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.
plugin-implement.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 1233 lines
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.
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.
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.
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.
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.
plugins.dtd (https://jedit.svn.sourceforge.net/svnroot/jedit) Document Type Definition · 41 lines
strings.xml (http://softkeyboard.googlecode.com/svn/) XML · 139 lines
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.
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.
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.
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.
ChromeClientWinCE.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 403 lines
231 }
233 void ChromeClientWinCE::invalidateWindow(const IntRect&, bool)
234 {
235 notImplemented();
236 }
238 void ChromeClientWinCE::invalidateContentsAndWindow(const IntRect& updateRect, bool immediate)
239 {
240 RECT rect = updateRect;
241 InvalidateRect(m_webView->windowHandle(), &rect, FALSE);
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);
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.
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.
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.
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.
CHANGES.txt (https://jedit.svn.sourceforge.net/svnroot/jedit) Plain Text · 2241 lines
87 - Updated BibTeX and LaTeX syntax highlighting (Thomas Alspaugh).
89 - PHP mode now recognizes <script language="PHP">...</script>.
91 - Updated Omnimark syntax highlighting (Lionel Fiol).
692 Mac OS X, C+h is always captured by the OS.
694 - Changing the wrap mode didn't invalidate screen line counts, this
695 could result in scrolling getting messed up.
892 modes.
894 - SCRIPT tags in HTML files no longer recognize <?php ... ?>.
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.
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.
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.
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.
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.
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.
bsh.jjt (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 1381 lines
ResourceLoader.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 515 lines
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.
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
95 void flushUnused();
96 void flush_inline_cache();
97 int32 findReplCandidates(int32 needed);
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.
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.
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.
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.
WebEventFactory.mm (https://bitbucket.org/ultra_iter/qt-vtl.git) Objective C++ · 1149 lines
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.
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
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.
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.
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.
project.pbxproj (https://github.com/balintorosz/pubnub-api.git) Unknown · 323 lines
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.
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.
135 if ( $(this[0]).is('form')) {
136 return this.validate().form();
137 } else {
138 var valid = true;
389 if (this.settings.invalidHandler)
390 $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
391 },
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.
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.
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.
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') />