100+ results for 'php empty'
Not the results you expected?
QueryTestCase.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 328 lines
1 <?php
2 /*
3 * $Id$
17 * This software consists of voluntary contributions made by many individuals
18 * and is licensed under the LGPL. For more information, see
19 * <http://www.phpdoctrine.org>.
20 */
25 * @package Doctrine
26 * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
28 * @category Object Relational Mapping
29 * @link www.phpdoctrine.org
318 }
320 public function testSearchReturnsFalseForEmptyStrings()
321 {
322 $q = new Doctrine_Search_Query('SearchTestIndex');
AccessFlowStateMachineDao.php (https://github.com/orangehrm/OrangeHRM.git) PHP · 377 lines
1 <?php
2 /**
3 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures
49 $results = $q->getQuery()->execute();
50 return empty($results) ? null : $results;
51 } catch (Exception $ex) {
52 throw new DaoException($ex->getMessage());
130 $results = $q->getQuery()->execute();
131 return empty($results) ? null : $results;
132 } catch (Exception $ex) {
133 throw new DaoException($ex->getMessage());
200 $result = $q->getQuery()->execute();
201 return !empty($result);
202 } catch (Exception $e) {
203 throw new DaoException($e->getMessage());
shop_items_m.php (https://github.com/ekoisa/pyrocms-shop.git) PHP · 297 lines
validate.php (https://bitbucket.org/cisash/fananeen.git) PHP · 422 lines
1 <?php
2 require_once dirname(__FILE__) . '/validation-cakephp.php';
4 /**
62 $check = call_user_func_array(array('Wpcf_Validate', $method),
63 array($v, $value));
64 // Use CakePHP method
65 } else if ((isset(self::$_cake_aliases[$method])
66 && is_callable(array('Wpcf_Cake_Validation', self::$_cake_aliases[$method])))
106 // Set error
107 if (isset($check['error'])) {
108 // Don't return error if it's empty but not required
109 if ((!empty($value) && $method != 'required' && self::$_is_required)
110 || (empty($value) && $method == 'required')) {
111 $check['message'] = !empty($v['message']) ? $v['message'] : self::$messages[$method];
PropertyPathMapperTest.php (https://bitbucket.org/thxer/5netproba.git) PHP · 384 lines
1 <?php
3 /*
16 use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper;
18 class PropertyPathMapperTest extends \PHPUnit_Framework_TestCase
19 {
20 /**
25 /**
26 * @var \PHPUnit_Framework_MockObject_MockObject
27 */
28 private $dispatcher;
30 /**
31 * @var \PHPUnit_Framework_MockObject_MockObject
32 */
33 private $propertyAccessor;
StaticEventManagerTest.php (https://bitbucket.org/saifshuvo/zf2.git) PHP · 334 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
11 namespace ZendTest\EventManager;
13 use PHPUnit_Framework_TestCase as TestCase;
14 use stdClass;
15 use Zend\EventManager\EventManager;
63 $listeners = $events->getListeners('foo', 'bar');
64 $this->assertInstanceOf('Zend\Stdlib\PriorityQueue', $listeners);
65 $this->assertTrue(0 < count($listeners), 'Empty listeners!');
66 foreach ($listeners as $listener) {
67 if ($expected === $listener->getCallback()) {
84 $listeners = $events->getListeners('bar', $event);
85 $this->assertInstanceOf('Zend\Stdlib\PriorityQueue', $listeners);
86 $this->assertTrue(0 < count($listeners), 'Empty listeners!');
87 foreach ($listeners as $listener) {
88 if ($expected === $listener->getCallback()) {
PressureTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 406 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: PressureTest.php 20096 2010-01-06 02:05:09Z bkarwin $
21 */
25 * Zend_Measure_Pressure
26 */
27 require_once 'Zend/Measure/Pressure.php';
29 /**
30 * PHPUnit test case
31 */
32 require_once 'PHPUnit/Framework/TestCase.php';
34 /**
InteractsWithInput.php (https://gitlab.com/jjpa2018/dashboard) PHP · 540 lines
1 <?php
3 namespace Illuminate\Http\Concerns;
135 /**
136 * Determine if the request contains a non-empty value for an input item.
137 *
138 * @param string|array $key
145 foreach ($keys as $value) {
146 if ($this->isEmptyString($value)) {
147 return false;
148 }
154 /**
155 * Determine if the request contains an empty value for an input item.
156 *
157 * @param string|array $key
sgml06.xml (git://github.com/landgraf/matreshka.git) XML · 12 lines
FormErrors.php (https://github.com/jtai/zf2.git) PHP · 466 lines
Mvc.php (https://github.com/necrogami/zf2.git) PHP · 488 lines
length_class.php (https://bitbucket.org/elena_dyavolova/omf.git) PHP · 412 lines
1 <?php
2 class ControllerLocalisationLengthClass extends Controller {
3 private $error = array();
347 if (isset($this->request->post['value'])) {
348 $this->data['value'] = $this->request->post['value'];
349 } elseif (!empty($length_class_info)) {
350 $this->data['value'] = $length_class_info['value'];
351 } else {
basic_tests.cpp (https://bitbucket.org/prenaux/boost_1_53.git) C++ · 200 lines
43 TEST_REGEX_SEARCH("()", perl, "", match_default, make_array(0, 0, 0, 0, -2, -2));
44 TEST_INVALID_REGEX("(", perl);
45 TEST_INVALID_REGEX("", perl|no_empty_expressions);
46 TEST_REGEX_SEARCH("", perl, "abc", match_default, make_array(0, 0, -2, 1, 1, -2, 2, 2, -2, 3, 3, -2, -2));
47 TEST_INVALID_REGEX(")", perl);
ast_tree_output.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 550 lines
1 <?php
2 /**
3 * File containing the ezcTemplateAstNodeGenerator class
467 /**
468 * visitEmptyAstNode
469 *
470 * @param ezcTemplateEmptyAstNode $node
471 * @return void
472 */
473 public function visitEmptyAstNode( ezcTemplateEmptyAstNode $node )
474 {
475 $this->text .= $this->outputNode( $node );
phony-test.js (https://github.com/neocotic/phony.js.git) JavaScript · 467 lines
57 expect(alphabet).to.be.an(Object);
58 expect(alphabet.characters).to.be.an(Object);
59 expect(alphabet.characters).not.to.be.empty();
60 expect(alphabet.fallback).to.be('itu');
61 });
146 });
148 it('should return an empty string if the message is empty', function() {
149 expect(phony.from('')).to.be('');
150 expect(phony.from(' ')).to.be('');
296 });
298 it('should return an empty string if the message is empty', function() {
299 expect(phony.to('')).to.be('');
300 expect(phony.to(' ')).to.be('');
Words.cs
(https://Silverlight.svn.codeplex.com/svn)
C# · 3031 lines
✨ Summary
This C# code outputs a large string containing all lowercase English letters, numbers, and special characters. It appears to be a concatenation of various strings, possibly used as a test data source for a programming project. The output is a single, long string with no formatting or organization, simply containing the combined contents of multiple strings.
This C# code outputs a large string containing all lowercase English letters, numbers, and special characters. It appears to be a concatenation of various strings, possibly used as a test data source for a programming project. The output is a single, long string with no formatting or organization, simply containing the combined contents of multiple strings.
AssertionsTest.class.php (https://github.com/treuter/xp-framework.git) PHP · 617 lines
421 */
422 #[@test, @expect('unittest.AssertionFailedError')]
423 public function nonEmptyArrayEmpty() {
424 $this->assertEmpty(array(1));
427 /**
428 * Test assertNotEmpty() for a non-empty array
429 *
430 * @deprecated
437 /**
438 * Test assertNotEmpty() for an empty array
439 *
440 * @deprecated
441 */
442 #[@test, @expect('unittest.AssertionFailedError')]
443 public function emptyArrayNotEmpty() {
444 $this->assertNotEmpty(array());
PU_test_dcp_role.php (https://github.com/CircleCode/dynacase-core.git) PHP · 432 lines
1 <?php
2 /*
3 * @author Anakeen
13 */
15 require_once 'PU_testcase_dcp_commonfamily.php';
17 class TestRole extends TestCaseDcpCommonFamily
38 $u->password_new = 'a';
39 $err = $u->add();
40 $this->assertEmpty($err, "cannot create user");
41 $du = new_doc(self::$dbaccess, $u->fid);
42 $this->assertTrue($du->isAlive() , "cannot create user document");
48 $dg = new_doc(self::$dbaccess, $aGroupName);
49 $err = $dg->insertDocument($du->id);
50 $this->assertEmpty($err, "cannot add user to $aGroupName");
51 }
52 $u->setLoginName("tst_jd1");
deletion_test.cpp
(http://hadesmem.googlecode.com/svn/trunk/)
C++ · 0 lines
✨ Summary
The code tests various scenarios for removing connections from a signal in Boost.Signals2 library, including removing self-connections, prior connections, after connections, and disconnecting equal connections. It verifies that the output matches the expected values in each test case. The tests cover different edge cases to ensure the library’s functionality is correct.
The code tests various scenarios for removing connections from a signal in Boost.Signals2 library, including removing self-connections, prior connections, after connections, and disconnecting equal connections. It verifies that the output matches the expected values in each test case. The tests cover different edge cases to ensure the library’s functionality is correct.
60 s0.disconnect_all_slots();
61 BOOST_CHECK(s0.empty());
63 connections[0] = s0.connect(remove_connection(0));
96 s0.disconnect_all_slots();
97 BOOST_CHECK(s0.empty());
99 connections[0] = s0.connect(remove_connection(0, 0));
135 s0.disconnect_all_slots();
136 BOOST_CHECK(s0.empty());
138 connections[0] = s0.connect(remove_connection(0));
content_actionhandler.php (https://github.com/SylvainGuittard/ezlightbox.git) PHP · 364 lines
update.c
(https://bitbucket.org/freebsd/freebsd-head/)
C · 3050 lines
✨ Summary
This C code compares two files, rev1
and rev2
, to determine if they are identical. It checks for differences in file type, ownership, permissions, device numbers, and hard links. If any of these characteristics differ, it prints an error message and returns 1 (indicating a mismatch). Otherwise, it returns 0 (indicating no mismatch). The code also handles symbolic links separately.
This C code compares two files, rev1
and rev2
, to determine if they are identical. It checks for differences in file type, ownership, permissions, device numbers, and hard links. If any of these characteristics differ, it prints an error message and returns 1 (indicating a mismatch). Otherwise, it returns 0 (indicating no mismatch). The code also handles symbolic links separately.
119 " [-I ign] [-W spec] [files...]\n",
120 "\t-A\tReset any sticky tags/date/kopts.\n",
121 "\t-P\tPrune empty directories.\n",
122 "\t-C\tOverwrite locally modified files with clean repository copies.\n",
123 "\t-d\tBuild directories, like checkout does.\n",
566 }
568 /* Create a new, empty hardlink_info node. */
569 hlinfo = (struct hardlink_info *)
570 xmalloc (sizeof (struct hardlink_info));
ChoiceTypeTest.php (https://github.com/proclamo/txinbometro.git) PHP · 439 lines
358 }
360 public function testPassEmptyValueToViewIsEmpty()
361 {
362 $form = $this->factory->create('choice', null, array(
367 $view = $form->createView();
369 $this->assertEmpty($view->get('empty_value'));
370 }
373 * @dataProvider getOptionsWithEmptyValue
374 */
375 public function testPassEmptyValueToView($multiple, $expanded, $required, $emptyValue, $viewValue)
376 {
377 $form = $this->factory->create('choice', null, array(
class.wpcom-json-api-sharing-buttons-endpoint.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 385 lines
1 <?php
3 abstract class WPCOM_JSON_API_Sharing_Button_Endpoint extends WPCOM_JSON_API_Endpoint {
32 }
34 if ( ! empty( $button->genericon ) ) {
35 // Only pre-defined sharing buttons include genericon
36 $response['genericon'] = $button->genericon;
74 return ( isset( $button['custom'] ) && $button['custom'] ) ||
75 ( isset( $button['ID'] ) && 1 === preg_match( '/^custom-/', $button['ID'] ) ) ||
76 ! empty( $button['name'] ) || ! empty( $button['URL'] ) || ! empty( $button['icon'] );
77 }
79 protected function validate_button_input( $button, $is_new = false ) {
80 if ( ! empty( $button['visibility'] ) && ! in_array( $button['visibility'], self::$all_visibilities ) ) {
81 return new WP_Error( 'invalid_visibility', sprintf( 'The visibility field must be one of the following values: %s', implode( ', ', self::$all_visibilities ) ), 400 );
82 } else if ( $is_new && empty( $button['URL'] ) ) {
class-cp-user-relationships.php (https://gitlab.com/clusterpress/clusterpress) PHP · 543 lines
186 ) );
188 if ( empty( $r['user_id'] ) || empty( $r['primary_id'] ) || empty( $r['name'] ) ) {
189 return false;
190 }
242 ) );
244 if ( empty( $w['id'] ) && ( empty( $w['user_id'] ) || empty( $w['name'] ) ) && ( empty( $w['primary_id'] ) || empty( $w['name'] ) ) ) {
245 return false;
246 }
524 }
526 if ( empty( $r['user_id'] ) && empty( $r['primary_id'] ) && empty( $r['secondary_id'] ) ) {
527 return false;
528 }
Editor.php (https://github.com/lazenge/zf2.git) PHP · 601 lines
FileValidatorTest.php (https://github.com/Exercise/symfony.git) PHP · 324 lines
external_test.php (https://github.com/markn86/moodle.git) PHP · 200 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
29 global $CFG;
31 require_once($CFG->dirroot . '/webservice/tests/helpers.php');
32 use core_filters\external;
75 $result = external::get_available_in_context(array(array('contextlevel' => 'coursecat', 'instanceid' => $category->id)));
76 $result = external_api::clean_returnvalue(external::get_available_in_context_returns(), $result);
77 $this->assertEmpty($result['filters']); // No filters, all disabled.
78 $this->assertEmpty($result['warnings']);
85 $result = external::get_available_in_context(array(array('contextlevel' => 'coursecat', 'instanceid' => $category->id)));
86 $result = external_api::clean_returnvalue(external::get_available_in_context_returns(), $result);
87 $this->assertEmpty($result['warnings']);
88 $this->assertEquals($firstfilter, $result['filters'][0]['filter']); // OK, the filter is enabled.
89 $this->assertEquals(TEXTFILTER_INHERIT, $result['filters'][0]['localstate']); // Inherits the parent context status.
jquery-1.2.6.js
(http://fatal-error.googlecode.com/svn/trunk/)
JavaScript · 3550 lines
✨ Summary
This JavaScript code extends jQuery’s functionality, adding event handling and DOM manipulation capabilities to HTML elements. It provides methods for binding events, triggering events, toggling click handlers, and checking if the DOM is ready. The code also includes a ready
function that can be used to execute functions when the DOM is loaded.
This JavaScript code extends jQuery’s functionality, adding event handling and DOM manipulation capabilities to HTML elements. It provides methods for binding events, triggering events, toggling click handlers, and checking if the DOM is ready. The code also includes a ready
function that can be used to execute functions when the DOM is loaded.
sfValidatorBaseTest.php (https://github.com/IDCI-Consulting/WebsiteEval.git) PHP · 246 lines
1 <?php
3 /*
113 $t->is($v->clean(' foo '), ' foo ', '->clean() does not trim whitespaces by default');
115 // ->isEmpty()
116 $t->diag('->isEmpty()');
117 $t->is($v->testIsEmpty(null), true, 'null value isEmpty()');
118 $t->is($v->testIsEmpty(''), true, 'empty string value isEmpty()');
119 $t->is($v->testIsEmpty(array()), true, 'empty array value isEmpty()');
120 $t->is($v->testIsEmpty(false), false, 'false value not isEmpty()');
125 $v->setOption('empty_value', 'defaultnullvalue');
126 $t->is($v->clean(''), 'defaultnullvalue', '->getEmptyValue() returns the representation of an empty value for this validator');
127 $v->setOption('empty_value', null);
zone.php (https://bitbucket.org/sandeepbhaskar/inspiredliving.git) PHP · 441 lines
1 <?php
2 class ControllerLocalisationZone extends Controller {
3 private $error = array();
333 if (isset($this->request->post['status'])) {
334 $this->data['status'] = $this->request->post['status'];
335 } elseif (!empty($zone_info)) {
336 $this->data['status'] = $zone_info['status'];
337 } else {
341 if (isset($this->request->post['name'])) {
342 $this->data['name'] = $this->request->post['name'];
343 } elseif (!empty($zone_info)) {
344 $this->data['name'] = $zone_info['name'];
345 } else {
349 if (isset($this->request->post['code'])) {
350 $this->data['code'] = $this->request->post['code'];
351 } elseif (!empty($zone_info)) {
352 $this->data['code'] = $zone_info['code'];
353 } else {
Mail.php (https://github.com/shooray/oscommerce.git) PHP · 375 lines
136 if ( empty($this->_body) ) {
137 if ( !empty($this->_body_plain) && !empty($this->_body_html) ) {
138 $this->_boundary = '=_____MULTIPART_MIXED_BOUNDARY____';
139 $this->_related_boundary = '=_____MULTIPART_RELATED_BOUNDARY____';
188 $this->_body .= '--' . $this->_boundary . '--' . "\n\n";
189 } elseif ( !empty($this->_body_html) && !empty($this->_images) ) {
190 $this->_boundary = '=_____MULTIPART_MIXED_BOUNDARY____';
191 $this->_related_boundary = '=_____MULTIPART_RELATED_BOUNDARY____';
224 $this->_body .= '--' . $this->_boundary . '--' . "\n";
225 } elseif ( !empty($this->_attachments) ) {
226 $this->_boundary = '=_____MULTIPART_MIXED_BOUNDARY____';
227 $this->_related_boundary = '=_____MULTIPART_RELATED_BOUNDARY____';
321 }
323 if ( empty($this->_from['email_address']) || empty($to_email_addresses) ) {
324 return false;
325 }
SortedSet.php (https://github.com/netweaver/Rediska.git) PHP · 335 lines
1 <?php
3 // Require Rediska
4 require_once dirname(__FILE__) . '/../../Rediska.php';
6 /**
12 * @version @package_version@
13 * @link http://rediska.geometria-lab.net
14 * @license http://www.opensource.org/licenses/bsd-license.php
15 */
16 class Rediska_Key_SortedSet extends Rediska_Key_Abstract implements IteratorAggregate, ArrayAccess, Countable
293 $values = $this->getByScore($score, $score);
295 if (!empty($values)) {
296 return $values[0];
297 }
SequenceTest.php (https://bitbucket.org/mkjpryor/lazy-sequence.git) PHP · 369 lines
90 public function testIsEmpty() {
91 // Test that isEmpty returns false for a non-empty sequence
92 $this->assertFalse(S::isEmpty(S::create(5, 6, 7)));
94 // Test that isEmpty returns true for an empty sequence
95 $this->assertTrue(S::isEmpty(S::create()));
108 );
110 // Test that append joins an empty and a non-empty sequence correctly
111 $this->assertEquals(
112 [5, 6],
236 public function testReverse() {
237 // Test that the reverse of an empty sequence is the empty sequence
238 $this->assertEmpty(S::toArray(S::reverse(S::create())));
FSM.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 443 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: FSM.php 20096 2010-01-06 02:05:09Z bkarwin $
20 */
22 /** Zend_Search_Lucene_FSMAction */
23 // require_once 'Zend/Search/Lucene/FSMAction.php';
25 /**
115 * constructor treats fist list element as a sturt state (assignes it to $_current state).
116 * It may be reassigned by setState() call.
117 * States list may be empty and can be extended later by addState() or addStates() calls.
118 *
119 * $inputAphabet is the same as $states, but represents input alphabet
Indexer.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 448 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
16 /**
17 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18 */
19 class Indexer extends \Magento\Framework\DataObject implements IdxInterface
218 {
219 $indexer = $this->config->getIndexer($indexerId);
220 if (empty($indexer) || empty($indexer['indexer_id']) || $indexer['indexer_id'] != $indexerId) {
221 throw new \InvalidArgumentException("{$indexerId} indexer does not exist.");
222 }
commits.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 357 lines
1 <?php
2 /**
3 * @package Joomla.Platform
27 * @param string $tree SHA of the tree object this commit points to.
28 * @param array $parents Array of the SHAs of the commits that were the parents of this commit.
29 * If omitted or empty, the commit will be written as a root commit.
30 * For a single parent, an array of one SHA should be provided.
31 * For a merge commit, an array of more than one should be provided.
Input.php (https://gitlab.com/dleonov/my-framework-two) PHP · 419 lines
1 <?php
3 /**
169 *
170 * @param array $vars Associative array of keys and filter types to apply.
171 * If empty and datasource is null, all the input data will be returned
172 * but filtered using the filter given by the parameter defaultFilter in
173 * FilterInput::clean.
174 * @param mixed $datasource Array to retrieve data from, or null.
175 * @param string $defaultFilter Default filter used in FilterInput::clean if vars is empty and
176 * datasource is null. If 'unknown', the default case is used in
177 * FilterInput::clean.
190 *
191 * @param array $vars Associative array of keys and filter types to apply.
192 * If empty and datasource is null, all the input data will be returned
193 * but filtered using the filter given by the parameter defaultFilter in
194 * FilterInput::clean.
ClassMetadataTest.php (https://gitlab.com/freebird/WebApp) PHP · 280 lines
1 <?php
3 /*
19 use Symfony\Component\Validator\Tests\Fixtures\PropertyConstraint;
21 class ClassMetadataTest extends \PHPUnit_Framework_TestCase
22 {
23 const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity';
274 * https://github.com/symfony/symfony/issues/11604.
275 */
276 public function testGetPropertyMetadataReturnsEmptyArrayWithoutConfiguredMetadata()
277 {
278 $this->assertCount(0, $this->metadata->getPropertyMetadata('foo'), '->getPropertyMetadata() returns an empty collection if no metadata is configured for the given property');
FSM.php (https://github.com/grandison/budo16.git) PHP · 443 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: FSM.php 16971 2009-07-22 18:05:45Z mikaelkael $
20 */
22 /** Zend_Search_Lucene_FSMAction */
23 // require_once 'Zend/Search/Lucene/FSMAction.php';
25 /**
115 * constructor treats fist list element as a sturt state (assignes it to $_current state).
116 * It may be reassigned by setState() call.
117 * States list may be empty and can be extended later by addState() or addStates() calls.
118 *
119 * $inputAphabet is the same as $states, but represents input alphabet
query_builder.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 302 lines
bytearray-tests.js (https://github.com/jdeolive/ringojs.git) JavaScript · 322 lines
Abstract.php (https://github.com/frhumanes/PLM.git) PHP · 419 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
21 */
113 }
114 if (!class_exists($this->_rowClass)) {
115 require_once 'Zend/Loader.php';
116 Zend_Loader::loadClass($this->_rowClass);
117 }
222 /**
223 * Rewind the Iterator to the first element.
224 * Similar to the reset() function for arrays in PHP.
225 * Required by interface Iterator.
226 *
NullTest.php (https://github.com/sidealice/zf2.git) PHP · 329 lines
CakeValidationSetTest.php (https://gitlab.com/manuperazafa/elsartenbackend) PHP · 337 lines
102 */
103 public function testGetRules() {
104 $rules = array('notEmpty' => array('rule' => 'notEmpty', 'message' => 'Can not be empty'));
105 $Field = new CakeValidationSet('title', $rules);
116 */
117 public function testSetRule() {
118 $rules = array('notEmpty' => array('rule' => 'notEmpty', 'message' => 'Can not be empty'));
119 $Field = new CakeValidationSet('title', $rules);
120 $Rule = new CakeValidationRule($rules['notEmpty']);
149 */
150 public function testSetRules() {
151 $rule = array('notEmpty' => array('rule' => 'notEmpty', 'message' => 'Can not be empty'));
152 $Field = new CakeValidationSet('title', $rule);
153 $RuleEmpty = new CakeValidationRule($rule['notEmpty']);
image.scrbl
(git://github.com/gmarceau/PLT.git)
Racket · 315 lines
✨ Summary
This Racket code provides a set of functions for creating and manipulating images, including adding lines to scenes, converting between image formats, and extracting alpha-channel information. It also defines data structures such as alpha-color
and List-of-color
. The code is designed to be used in computer graphics applications, particularly with the 2htdp/universe and htdp/world teachpacks.
This Racket code provides a set of functions for creating and manipulating images, including adding lines to scenes, converting between image formats, and extracting alpha-channel information. It also defines data structures such as alpha-color
and List-of-color
. The code is designed to be used in computer graphics applications, particularly with the 2htdp/universe and htdp/world teachpacks.
236 @defproc[(scene? [x any/c]) boolean?]{Is @racket[x] an scene?}
238 @defproc[(empty-scene [width natural-number/c]
239 [height natural-number/c])
240 scene?]{
273 #reader scribble/comment-reader
274 (racketblock
275 ;; -- @racket[empty]
276 ;; -- @racket[(cons @#,tech{Color} List-of-color)]
277 ;; Interpretation: represents a list of colors.
Add_Prefix_and_Suffix.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 161 lines
50 dialog = new JDialog(view, title, false);
51 content = new JPanel(new BorderLayout());
52 content.setBorder(new EmptyBorder(12, 12, 12, 12));
53 dialog.setContentPane(content);
70 buttonPanel.setLayout(new BoxLayout(buttonPanel,
71 BoxLayout.X_AXIS));
72 buttonPanel.setBorder(new EmptyBorder(12, 50, 0, 50));
73 buttonPanel.add(Box.createGlue());
74 ok = new JButton("OK");
OptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 68 lines
✨ Summary
This Java code defines a custom option pane for an image viewer application, allowing users to toggle two settings: “Show images on mouse over in File System Browser” and “Show images on mouse over in ProjectViewer”. The options are stored in a configuration file and can be saved when the user closes the option pane.
This Java code defines a custom option pane for an image viewer application, allowing users to toggle two settings: “Show images on mouse over in File System Browser” and “Show images on mouse over in ProjectViewer”. The options are stored in a configuration file and can be saved when the user closes the option pane.
performance.html
(http://hadesmem.googlecode.com/svn/trunk/)
HTML · 0 lines
✨ Summary
This is a documentation page for a C++ library, specifically the Boost library. It provides an overview of the library’s features and performance characteristics, including memory usage and processor cycles. The page includes links to other resources, such as licensing information and contact details. It appears to be a generated HTML output from a documentation system.
This is a documentation page for a C++ library, specifically the Boost library. It provides an overview of the library’s features and performance characteristics, including memory usage and processor cycles. The page includes links to other resources, such as licensing information and contact details. It appears to be a generated HTML output from a documentation system.
358 <li>State and event objects need to store one pointer less, meaning that
359 in the best case the memory footprint of a state machine object could
360 shrink by 15% (an empty event is typically 30% smaller, what can be an
361 advantage when there are bursts of events rather than a steady flow).
362 However, on most platforms executable size grows when C++ RTTI is turned
382 <h3>Memory</h3>
384 <p>On a 32-bit box, one empty active state typically needs less than 50
385 bytes of memory. Even <b>very</b> complex machines will usually have less
386 than 20 simultaneously active states so just about every machine should run
javascript.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 560 lines
errors.hpp
(http://hadesmem.googlecode.com/svn/trunk/)
C++ Header · 0 lines
✨ Summary
This C++ header file defines a set of exception classes for handling errors and invalid inputs in command-line parsing, specifically for the Boost.ProgramOptions library. It provides various error types, such as syntax errors, ambiguous options, multiple values, and validation errors, to help handle different scenarios during program execution.
This C++ header file defines a set of exception classes for handling errors and invalid inputs in command-line parsing, specifically for the Boost.ProgramOptions library. It provides various error types, such as syntax errors, ambiguous options, multiple values, and validation errors, to help handle different scenarios during program execution.
TemplateSettings.java (https://bitbucket.org/nbargnesi/idea.git) Java · 747 lines
393 if (group != null) {
394 group.removeElement(existing);
395 if (group.isEmpty()) {
396 mySchemesManager.removeScheme(group);
397 }
430 if (group != null) {
431 group.removeElement((TemplateImpl)template);
432 if (group.isEmpty()) {
433 mySchemesManager.removeScheme(group);
434 }
579 if (registerTemplate) {
580 TemplateGroup existingScheme = mySchemesManager.findSchemeByName(result.getName());
581 if (existingScheme == null && !result.isEmpty()) {
582 mySchemesManager.addNewScheme(result, false);
583 }
atgrammar.g (http://ambienttalk.googlecode.com/svn/) Unknown · 629 lines
249 commalist: argument (COM! argument)*
250 { #commalist = #([AGTAB,"table"], #commalist); }
251 |! /* empty */ { #commalist = #([AGTAB,"table"], #([COM]));};
253 argument:! CAT exp:expression { #argument = #([AGSPL,"splice"], exp); }
256 // parses a list of variables that may act as formal parameters
257 parameterlist: parameter (COM! parameter)* { #parameterlist = #([AGTAB, "table"], #parameterlist); }
258 |! /* empty */ { #parameterlist = #([AGTAB,"table"], #([COM])); };
260 parameter: variable_or_quotation
618 LinkedList list = new LinkedList(); }
619 : #(AGTAB (expr=expression { list.add(expr); })* )
620 { tab = (list.isEmpty()) ? NATTable.EMPTY : new NATTable((ATObject[]) list.toArray(new ATObject[list.size()])); }
621 ;
local_date_time.hpp (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines
315 //! Returns name of associated time zone or "Coordinated Universal Time".
316 /*! Optional bool parameter will return time zone as an offset
317 * (ie "+07:00" extended iso format). Empty string is returned for
318 * classes that do not use a time_zone */
319 std::string zone_name(bool as_offset=false) const
349 //! Returns abbreviation of associated time zone or "UTC".
350 /*! Optional bool parameter will return time zone as an offset
351 * (ie "+0700" iso format). Empty string is returned for classes
352 * that do not use a time_zone */
353 std::string zone_abbrev(bool as_offset=false) const
AntClassLoader.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1173 lines
✨ Summary
This Java class is a custom class loader that loads classes from a specified path, including system classes and archives. It searches for classes in the specified path components, closes open archive files during cleanup, and provides methods to load classes from streams and resources. The class loader also handles security exceptions and IOExceptions when reading from streams or accessing resources.
This Java class is a custom class loader that loads classes from a specified path, including system classes and archives. It searches for classes in the specified path components, closes open archive files during cleanup, and provides methods to load classes from streams and resources. The class loader also handles security exceptions and IOExceptions when reading from streams or accessing resources.
293 /**
294 * Creates an empty class loader. The classloader should be configured
295 * with path elements to specify where the loader is to look for
296 * classes.
833 } else {
834 // ClassLoader.this.parent is already delegated to from ClassLoader.getResources, no need:
835 base = new CollectionUtils.EmptyEnumeration();
836 }
837 if (isParentFirst(name)) {
NavHistoryPopup.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 415 lines
✨ Summary
This Java code is part of a text editor’s navigator component, responsible for displaying line numbers and syntax highlighted code snippets. It uses a custom CellRenderer
to render each line in the navigator, which includes highlighting the line with proper syntax coloring based on the surrounding code. The renderer also displays additional information such as file paths and line numbers.
This Java code is part of a text editor’s navigator component, responsible for displaying line numbers and syntax highlighted code snippets. It uses a custom CellRenderer
to render each line in the navigator, which includes highlighting the line with proper syntax coloring based on the surrounding code. The renderer also displays additional information such as file paths and line numbers.
astyle.html
(https://jedit.svn.sourceforge.net/svnroot/jedit)
HTML · 1480 lines
✨ Summary
This HTML code outputs a manual page for Artistic Style, a source code formatter. It provides information on options and usage, including explanations of various flags and their effects. The output includes acknowledgments to contributors and beta-testers, as well as a call to action to enjoy the program. The text is formatted in a traditional manual page style, with sections and paragraphs that resemble those found in printed documentation.
This HTML code outputs a manual page for Artistic Style, a source code formatter. It provides information on options and usage, including explanations of various flags and their effects. The output includes acknowledgments to contributors and beta-testers, as well as a call to action to enjoy the program. The text is formatted in a traditional manual page style, with sections and paragraphs that resemble those found in printed documentation.
JEditTextArea.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 6057 lines
✨ Summary
This Java code defines a set of methods for navigating and manipulating text within a text editor, such as scrolling, selecting, and moving the caret (cursor) to specific positions in the document. The methods allow users to move up and down lines, pages, paragraphs, words, and screens, with options for selecting text and handling special cases like blank lines or multiple selections.
This Java code defines a set of methods for navigating and manipulating text within a text editor, such as scrolling, selecting, and moving the caret (cursor) to specific positions in the document. The methods allow users to move up and down lines, pages, paragraphs, words, and screens, with options for selecting text and handling special cases like blank lines or multiple selections.
keyexchange.cc
(git://github.com/OpenRTMFP/ArcusNode.git)
C++ · 222 lines
✨ Summary
This C++ code implements a Node.js module for cryptographic key exchange and encryption/decryption. It provides functions to generate public-private key pairs, compute shared secrets, and derive asymetric keys for RTMFP handshakes. The module exposes these functions as part of the Node.js ecosystem, allowing developers to use them in their JavaScript applications.
This C++ code implements a Node.js module for cryptographic key exchange and encryption/decryption. It provides functions to generate public-private key pairs, compute shared secrets, and derive asymetric keys for RTMFP handshakes. The module exposes these functions as part of the Node.js ecosystem, allowing developers to use them in their JavaScript applications.
BrowserColorsOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 346 lines
✨ Summary
This Java code creates a GUI component for managing browser colors. It allows users to add, remove, and edit color settings for different file types. The component displays a table with two columns: one for glob patterns and another for corresponding colors. Users can select new colors from a palette or enter custom values. The changes are saved when the user clicks “Save”.
This Java code creates a GUI component for managing browser colors. It allows users to add, remove, and edit color settings for different file types. The component displays a table with two columns: one for glob patterns and another for corresponding colors. Users can select new colors from a palette or enter custom values. The changes are saved when the user clicks “Save”.
25 //{{{ Imports
26 import javax.swing.border.EmptyBorder;
27 import javax.swing.event.*;
28 import javax.swing.table.*;
73 JPanel buttons = new JPanel();
74 buttons.setBorder(new EmptyBorder(3,0,0,0));
75 buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
76 ActionHandler actionHandler = new ActionHandler();
EmptyQuery.java (https://bitbucket.org/nbargnesi/idea.git) Java · 54 lines
27 public class EmptyQuery<R> implements Query<R> {
28 private static final EmptyQuery EMPTY_QUERY_INSTANCE = new EmptyQuery();
30 @NotNull
31 public Collection<R> findAll() {
32 return Collections.emptyList();
33 }
49 }
51 public static <T> Query<T> getEmptyQuery() {
52 return (Query<T>) EMPTY_QUERY_INSTANCE;
SqlPlugin.props (https://jedit.svn.sourceforge.net/svnroot/jedit) MSBuild · 172 lines
65 sql.options.common.label=Common
66 sql.options.popupSuccessfulEmptyUpdateMessages.label=Popup messages on successful 'empty' updates
68 sql.options.jdbc.classpath.label=Drivers' classpath
136 sql.illegalName=The name of the database configuration must be without white space
137 sql.emptyName=The name of the database configuration must be non-empty
138 sql.emptyType=You should choose the type of the database
Makefile.in.in (https://freespeech.svn.sourceforge.net/svnroot/freespeech) Unknown · 250 lines
ShortcutsOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 365 lines
✨ Summary
This Java code creates a graphical user interface (GUI) for managing shortcuts. It allows users to add, edit, and delete shortcuts with two different keys. The GUI displays the shortcut names, labels, and keys in a table. Users can select a shortcut from the table and modify its key or label. The changes are saved when the “OK” button is clicked.
This Java code creates a graphical user interface (GUI) for managing shortcuts. It allows users to add, edit, and delete shortcuts with two different keys. The GUI displays the shortcut names, labels, and keys in a table. Users can select a shortcut from the table and modify its key or label. The changes are saved when the “OK” button is clicked.
XmlParser.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 4382 lines
✨ Summary
This Java code is part of a XML parser and schema validator. It provides functionality for declaring, querying, and manipulating XML elements and attributes, including their types, default values, and allowed values. The code appears to be designed for use in validating XML documents against a predefined schema.
This Java code is part of a XML parser and schema validator. It provides functionality for declaring, querying, and manipulating XML elements and attributes, including their types, default values, and allowed values. The code appears to be designed for use in validating XML documents against a predefined schema.
206 /**
207 * Constant: the element has declared content of EMPTY.
208 * @see #getElementContentType
209 */
210 public final static int CONTENT_EMPTY = 2;
212 /**
872 * <pre>
873 * [33] STag ::= '<' Name (S Attribute)* S? '>' [WFC: unique Att spec]
874 * [38] element ::= EmptyElement | STag content ETag
875 * [39] EmptyElement ::= '<' Name (S Attribute)* S? '/>'
938 // Figure out if this is a start tag
939 // or an empty element, and dispatch an
940 // event accordingly.
941 c = readCh();
menulist.aspx.cs
(http://uniquestudiocms.googlecode.com/svn/trunk/)
C# · 106 lines
✨ Summary
This C# code is part of an ASP.NET application, specifically a web page for managing menus in an administrative interface. It allows users to view, create, and delete menus, with features such as data binding, error handling, and success messages. The code interacts with a MenuManager
class to perform these operations, using user input from forms and dropdowns.
This C# code is part of an ASP.NET application, specifically a web page for managing menus in an administrative interface. It allows users to view, create, and delete menus, with features such as data binding, error handling, and success messages. The code interacts with a MenuManager
class to perform these operations, using user input from forms and dropdowns.
IgnoreDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 172 lines
✨ Summary
This Java code creates a graphical user interface (GUI) dialog box for ignoring files and directories in a Subversion version control system. The dialog allows users to select whether to ignore specific files, directories, or patterns within directories, as well as enable recursive ignoring. It also includes options for canceling the operation and displaying the selected path, filename, pattern, and recursive status.
This Java code creates a graphical user interface (GUI) dialog box for ignoring files and directories in a Subversion version control system. The dialog allows users to select whether to ignore specific files, directories, or patterns within directories, as well as enable recursive ignoring. It also includes options for canceling the operation and displaying the selected path, filename, pattern, and recursive status.
interval_base_set.html (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines
82 <span class="keyword">void</span> <a class="link" href="interval_base_set.html#id653053-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="interval_base_set.html" title="Class template interval_base_set">interval_base_set</a> <span class="special">&</span><span class="special">)</span><span class="special">;</span>
83 <span class="keyword">void</span> <a class="link" href="interval_base_set.html#id653070-bb"><span class="identifier">clear</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
84 <span class="keyword">bool</span> <a class="link" href="interval_base_set.html#id653079-bb"><span class="identifier">empty</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
85 <span class="identifier">size_type</span> <a class="link" href="interval_base_set.html#id653089-bb"><span class="identifier">size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
86 <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="interval_base_set.html#id653099-bb"><span class="identifier">iterative_size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
139 <li>
140 <pre class="literallayout"><a name="id653545-bb"></a><span class="identifier">interval_base_set</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
141 <p>Default constructor for the empty object </p>
142 </li>
143 <li>
167 <li>
168 <pre class="literallayout"><span class="keyword">void</span> <a name="id653070-bb"></a><span class="identifier">clear</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
169 <p>sets the container empty </p>
170 </li>
171 <li>
NavigableDateSelector.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 188 lines
✨ Summary
This Java class, NavigableDateSelector
, wraps an existing DateSelector
component to add a navigation bar with buttons for moving forward and backward in time. It handles clicks on these buttons by calling methods on the wrapped DateSelector
. The navigation bar’s appearance can be customized through its background color.
This Java class, NavigableDateSelector
, wraps an existing DateSelector
component to add a navigation bar with buttons for moving forward and backward in time. It handles clicks on these buttons by calling methods on the wrapped DateSelector
. The navigation bar’s appearance can be customized through its background color.
dialog-macro.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 667 lines
76 dialog = new JDialog(view, title, false);
77 content = new JPanel(new BorderLayout());
78 content.setBorder(new EmptyBorder(12, 12, 12, 12));
79 content.setPreferredSize(new Dimension(320, 160));
80 dialog.setContentPane(content);
98 buttonPanel.setLayout(new BoxLayout(buttonPanel,
99 BoxLayout.X_AXIS));
100 buttonPanel.setBorder(new EmptyBorder(12, 50, 0, 50));
101 buttonPanel.add(Box.createGlue());
102 ok = new JButton(<quote>OK</quote>);
203 dialog = new JDialog(view, title, false);
204 content = new JPanel(new BorderLayout());
205 content.setBorder(new EmptyBorder(12, 12, 12, 12));
206 dialog.setContentPane(content);</programlisting></informalexample>
mainwindow.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 202 lines
65 {
66 QString fileName = QFileDialog::getOpenFileName(this);
67 if (!fileName.isEmpty()) {
68 QFile file(fileName);
69 if (!file.open(QFile::ReadOnly)) {
86 {
87 QString fileName = QFileDialog::getSaveFileName(this);
88 if (!fileName.isEmpty()) {
89 QFile file(fileName);
90 if (!file.open(QFile::WriteOnly | QFile::Text)) {
qmovie.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 1089 lines
357 QSize scaledSize = reader->scaledSize();
358 delete reader;
359 if (fileName.isEmpty())
360 reader = new QImageReader(device, format);
361 else
585 /*!
586 Constructs a QMovie object. QMovie will use read image data from \a
587 device, which it assumes is open and readable. If \a format is not empty,
588 QMovie will use the image format \a format for decoding the image
589 data. Otherwise, QMovie will attempt to guess the format.
602 /*!
603 Constructs a QMovie object. QMovie will use read image data from \a
604 fileName. If \a format is not empty, QMovie will use the image format \a
605 format for decoding the image data. Otherwise, QMovie will attempt to
606 guess the format.
qevent.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 4631 lines
871 Returns the Unicode text that this key generated. The text
872 returned can be an empty string in cases
873 where modifier keys, such as Shift, Control, Alt, and Meta,
874 are being pressed or released. In such cases key() will contain
988 Returns the number of keys involved in this event. If text()
989 is not empty, this is simply the length of the string.
991 \sa Qt::WA_KeyCompression
Insert_Buffer_Properties.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 251 lines
38 import javax.swing.JPanel;
39 import javax.swing.JScrollPane;
40 import javax.swing.border.EmptyBorder;
41 import org.gjt.sp.jedit.gui.JCheckBoxList;
74 dialog = new JDialog(view,"Insert Buffer Local Properties",true);
75 content = new JPanel(new BorderLayout());
76 content.setBorder(new EmptyBorder(10,10,10,10));
77 dialog.setContentPane(content);
78 content.add(new JLabel("Properties:"), BorderLayout.NORTH);
96 buttons = new JPanel();
97 buttons.setBorder(new EmptyBorder(12,50,0,50));
98 buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
99 buttons.add(Box.createGlue());
.cvsignore (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 336 lines
swsusp_asm64.S
(http://omnia2droid.googlecode.com/svn/trunk/)
Assembly · 185 lines
✨ Summary
This Assembly code implements a swsusp (Software Suspend) function for the S390 architecture, which is used to suspend and resume the execution of a process. It saves the current state of the process, suspends its execution, and then restores the saved state when resuming execution. The code handles both suspension and restoration of the process, including saving and restoring registers, stack pointers, and other relevant information.
This Assembly code implements a swsusp (Software Suspend) function for the S390 architecture, which is used to suspend and resume the execution of a process. It saves the current state of the process, suspends its execution, and then restores the saved state when resuming execution. The code handles both suspension and restoration of the process, including saving and restoring registers, stack pointers, and other relevant information.
32 /* Deactivate DAT */
33 stnsm __SF_EMPTY(%r15),0xfb
35 /* Store prefix register on stack */
36 stpx __SF_EMPTY(%r15)
38 /* Save prefix register contents for lowcore */
73 /* Set prefix page to zero */
74 xc __SF_EMPTY(4,%r15),__SF_EMPTY(%r15)
75 spx __SF_EMPTY(%r15)
113 /* Set prefix page to zero */
114 xc __SF_EMPTY(4,%r15),__SF_EMPTY(%r15)
115 spx __SF_EMPTY(%r15)
generator.py
(git://github.com/couchapp/couchapp.git)
Python · 368 lines
✨ Summary
This Python code generates a CouchApp using the couchapp
library. It takes three arguments: the path to the app directory, the type of app (either “view”, “list”, “show”, “filter”, “function”, “vendor”, “update”, or “spatial”), and the name of the app.
The code first checks if the couchapp
library is installed, and then it generates a new CouchApp using the specified type and name. It also saves the app’s ID to a file named _id
.
This Python code generates a CouchApp using the couchapp
library. It takes three arguments: the path to the app directory, the type of app (either “view”, “list”, “show”, “filter”, “function”, “vendor”, “update”, or “spatial”), and the name of the app.
The code first checks if the couchapp
library is installed, and then it generates a new CouchApp using the specified type and name. It also saves the app’s ID to a file named _id
.
52 .. versionadded:: 1.1
53 '''
54 setup_dir(path, require_empty=True)
55 setup_dirs(os.path.join(path, n) for n in DEFAULT_APP_TREE)
108 # construct basic dirs
109 setup_dirs((os.path.join(path, n) for n in DEFAULT_APP_TREE),
110 require_empty=False)
112 # add vendor
182 raise AppError('unrecognized function type "{0}"'.format(func_type))
184 setup_dir(dir_, require_empty=empty_dir)
186 for src, dest in file_list:
NavHistoryList.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 267 lines
✨ Summary
This Java code is part of a text editor’s functionality, specifically for displaying source code in a syntax highlighted manner. It uses an external tool called code2html
to perform syntax highlighting and formatting on the code. The code then displays the formatted code with line numbers, file paths, and other metadata in a graphical user interface.
This Java code is part of a text editor’s functionality, specifically for displaying source code in a syntax highlighted manner. It uses an external tool called code2html
to perform syntax highlighting and formatting on the code. The code then displays the formatted code with line numbers, file paths, and other metadata in a graphical user interface.
RELEASE.txt (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 50 lines
ContextOptionPane.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 432 lines
✨ Summary
This Java code creates a dialog for adding new actions to an editor’s context menu. It allows users to select either a separator or an action, and then choose from a list of available actions. The selected action is added to the context menu, and the dialog can be cancelled or confirmed with “OK”.
This Java code creates a dialog for adding new actions to an editor’s context menu. It allows users to select either a separator or an action, and then choose from a list of available actions. The selected action is added to the context menu, and the dialog can be cancelled or confirmed with “OK”.
46 import javax.swing.DefaultListModel;
47 import javax.swing.ListSelectionModel;
48 import javax.swing.border.EmptyBorder;
49 import javax.swing.event.ListSelectionEvent;
50 import javax.swing.event.ListSelectionListener;
126 JPanel buttons = new JPanel();
127 buttons.setBorder(new EmptyBorder(3,0,0,0));
128 buttons.setLayout(new BoxLayout(buttons,BoxLayout.X_AXIS));
129 ActionHandler actionHandler = new ActionHandler();
298 JPanel content = new JPanel(new BorderLayout());
299 content.setBorder(new EmptyBorder(12,12,12,12));
300 setContentPane(content);
CheckoutDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 268 lines
✨ Summary
This Java code creates a graphical user interface (GUI) for a checkout dialog box, likely used in a version control system like Subversion. It allows users to input their SVN credentials and repository information, such as URL and directory path, before checking out files from the repository. The GUI includes fields for username, password, and repository details, with buttons for canceling or confirming the operation.
This Java code creates a graphical user interface (GUI) for a checkout dialog box, likely used in a version control system like Subversion. It allows users to input their SVN credentials and repository information, such as URL and directory path, before checking out files from the repository. The GUI includes fields for username, password, and repository details, with buttons for canceling or confirming the operation.
33 import java.awt.event.*;
34 import javax.swing.*;
35 import javax.swing.border.EmptyBorder;
36 import org.gjt.sp.jedit.GUIUtilities;
37 import org.gjt.sp.jedit.jEdit;
78 protected void _init() {
79 JPanel panel = new JPanel( new KappaLayout() );
80 panel.setBorder( new EmptyBorder( 6, 6, 6, 6 ) );
81 String project_name = PVHelper.getProjectName(view);
118 dialog.setModal( true );
119 JPanel panel = new JPanel( new LambdaLayout() );
120 panel.setBorder( BorderFactory.createEmptyBorder( 6, 6, 6, 6 ) );
121 final BrowseRepositoryPanel burp = new BrowseRepositoryPanel( view, false );
122 panel.add( "0, 0, 1, 1, 0, wh, 3", burp );
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.
680 };
682 static void *jbd2_history_skip_empty(struct jbd2_stats_proc_session *s,
683 struct transaction_stats_s *ts,
684 int first)
707 if (l == 0)
708 return SEQ_START_TOKEN;
709 ts = jbd2_history_skip_empty(s, s->stats + s->start, 1);
710 if (!ts)
711 return NULL;
712 l--;
713 while (l) {
714 ts = jbd2_history_skip_empty(s, ++ts, 0);
715 if (!ts)
716 break;
CurveLink.java
(http://loon-simple.googlecode.com/svn/trunk/)
Java · 116 lines
✨ Summary
This Java class represents a link in a curve, used for rendering graphics. It contains information about the curve and its bounds (ytop and ybot), as well as an edge tag. The class provides methods to absorb other links into itself, check if it’s empty, retrieve the underlying curve and sub-curve, and set the next link in the chain.
This Java class represents a link in a curve, used for rendering graphics. It contains information about the curve and its bounds (ytop and ybot), as well as an edge tag. The class provides methods to absorb other links into itself, check if it’s empty, retrieve the underlying curve and sub-curve, and set the next link in the chain.
container.html
(http://hadesmem.googlecode.com/svn/trunk/)
HTML · 0 lines
✨ Summary
This HTML code displays a table of contents for a documentation page, likely related to the C++ Standard Template Library (STL). The table shows various algorithms and functions available in the STL, along with their descriptions and usage examples. It also includes links to navigate between sections and access additional information.
This HTML code displays a table of contents for a documentation page, likely related to the C++ Standard Template Library (STL). The table shows various algorithms and functions available in the STL, along with their descriptions and usage examples. It also includes links to navigate between sections and access additional information.
82 </li>
83 <li class="listitem">
84 empty
85 </li>
86 <li class="listitem">
323 <td>
324 <p>
325 <code class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
326 </p>
327 </td>
328 <td>
329 <p>
330 <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>
331 </p>
332 </td>
qgraphicsscene_bsp.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 296 lines
171 if (node->type == Node::Leaf) {
172 QRectF rect = rectForIndex(index);
173 if (!leaves[node->leafIndex].isEmpty()) {
174 tmp += QString::fromLatin1("[%1, %2, %3, %4] contains %5 items\n")
175 .arg(rect.left()).arg(rect.top())
237 void QGraphicsSceneBspTree::climbTree(QGraphicsSceneBspTreeVisitor *visitor, const QRectF &rect, int index) const
238 {
239 if (nodes.isEmpty())
240 return;
GalleryView.java (https://bitbucket.org/atchariya/nokia.git) Java · 290 lines
RenderText.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 1670 lines
147 // FIXME: It would be better to call this only if !m_text->containsOnlyWhitespace().
148 // But that might slow things down, and maybe should only be done if visuallyNonEmpty
149 // is still false. Not making any change for now, but should consider in the future.
150 view()->frameView()->setIsVisuallyNonEmpty();
342 unsigned realEnd = min(box->end() + 1, end);
343 IntRect r = box->selectionRect(0, 0, start, realEnd);
344 if (!r.isEmpty()) {
345 if (!useSelectionHeight) {
346 // change the height and y position because selectionRect uses selection-specific values
390 // Shorten the width of this text box if it ends in an ellipsis.
391 IntRect ellipsisRect = (option == ClipToEllipsis) ? ellipsisRectForBox(box, 0, textLength()) : IntRect();
392 if (!ellipsisRect.isEmpty()) {
393 if (style()->isHorizontalWritingMode())
394 boundaries.setWidth(ellipsisRect.maxX() - boundaries.x());
users-guide.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 356 lines
SearchBar.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 320 lines
✨ Summary
This Java code implements a search functionality for an editor, allowing users to find and highlight occurrences of a specified string within a document. It includes features such as incremental searching, highlighting, and beep notifications when no matches are found. The interface is customizable through checkboxes for ignoring case and using regular expressions.
This Java code implements a search functionality for an editor, allowing users to find and highlight occurrences of a specified string within a document. It includes features such as incremental searching, highlighting, and beep notifications when no matches are found. The interface is customizable through checkboxes for ignoring case and using regular expressions.
AddAbbrevDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 124 lines
✨ Summary
This Java code creates a dialog box for adding abbreviations to a text editor, specifically JEdit. The dialog allows users to input an abbreviation and its expansion, with options to apply the abbreviation globally or in a specific mode. It also includes buttons for canceling and expanding the abbreviation if it matches the one being edited.
This Java code creates a dialog box for adding abbreviations to a text editor, specifically JEdit. The dialog allows users to input an abbreviation and its expansion, with options to apply the abbreviation globally or in a specific mode. It also includes buttons for canceling and expanding the abbreviation if it matches the one being edited.
InstallMacrosDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 532 lines
✨ Summary
This Java code is for a graphical user interface (GUI) dialog box that allows users to manage and download macros from a database. It provides features such as sorting, searching, and selecting macros to download. The GUI includes buttons, text fields, and lists to display the available macros and their properties.
This Java code is for a graphical user interface (GUI) dialog box that allows users to manage and download macros from a database. It provides features such as sorting, searching, and selecting macros to download. The GUI includes buttons, text fields, and lists to display the available macros and their properties.
55 JPanel content = new JPanel(new BorderLayout(12,12));
56 content.setBorder(new EmptyBorder(12,12,12,12));
57 setContentPane(content);
73 JPanel infoPanel = new JPanel(new GridLayout(3,1,0,3));
74 infoPanel.setBorder(new EmptyBorder(0,0,3,0));
76 JLabel label = new JLabel(jEdit.getProperty("install-macros.caption"));
98 JPanel labelBox = new JPanel(new GridLayout(6,1,0,3));
99 labelBox.setBorder(new EmptyBorder(0,0,3,12));
100 labelBox.add(new JLabel(jEdit.getProperty("install-macros"
101 + ".info.name"),SwingConstants.RIGHT));
plugin-implement.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 1233 lines
ibm62n03.dtd (git://github.com/landgraf/matreshka.git) Document Type Definition · 9 lines
ff-static.pd (git://github.com/habibbr/EfeitosPuros.git) Unknown · 268 lines
147 #X obj 101 101 cnv 15 100 60 empty empty Static 10 50 0 28 -1 -203904
148 0;
149 #X obj 101 101 cnv 10 10 10 empty empty empty 20 12 0 14 -260097 -66577
150 0;
151 #X obj 101 151 cnv 10 10 10 empty empty empty 20 12 0 14 -260097 -66577
206 #X obj 116 123 hsl 64 8 0 1 0 0 empty empty empty -2 -8 0 10 -262144
207 -1 -1 0 1;
208 #X obj 124 133 hsl 64 8 0 1 0 0 empty empty empty -2 -8 0 10 -262144
209 -1 -1 0 1;
210 #X obj 147 101 cnv 10 10 10 empty empty empty 20 12 0 14 -260097 -66577
211 0;
212 #X obj 191 101 cnv 10 10 10 empty empty empty 20 12 0 14 -260097 -66577
213 0;
214 #X msg 300 55 35;
MavenImportingSettings.java (https://bitbucket.org/nbargnesi/idea.git) Java · 271 lines
51 private GeneratedSourcesFolder generatedSourcesFolder = GeneratedSourcesFolder.AUTODETECT;
53 private List<Listener> myListeners = ContainerUtil.createEmptyCOWList();
55 public enum GeneratedSourcesFolder {
228 try {
229 MavenImportingSettings result = (MavenImportingSettings)super.clone();
230 result.myListeners = ContainerUtil.createEmptyCOWList();
231 return result;
232 }
StyleEditor.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 236 lines
✨ Summary
This Java code defines a StyleEditor
class that creates a dialog for editing syntax styles in a text editor. It allows users to adjust font properties (italics, bold, foreground color, and background color) of specific token types. The changes are saved when the “OK” button is clicked, and the dialog closes.
This Java code defines a StyleEditor
class that creates a dialog for editing syntax styles in a text editor. It allows users to adjust font properties (italics, bold, foreground color, and background color) of specific token types. The changes are saved when the “OK” button is clicked, and the dialog closes.
Makefile
(http://omnia2droid.googlecode.com/svn/trunk/)
Makefile · 21 lines
✨ Summary
This Makefile defines a dependency for a module based on the value of CONFIG_SND_SEQUENCER
. It checks if CONFIG_SND_SEQUENCER
is defined, and if so, adds an object file to the build depending on its value. If it’s not defined, or has a specific value, it adds another object file. The result is a conditional dependency that can be used in the Makefile.
This Makefile defines a dependency for a module based on the value of CONFIG_SND_SEQUENCER
. It checks if CONFIG_SND_SEQUENCER
is defined, and if so, adds an object file to the build depending on its value. If it’s not defined, or has a specific value, it adds another object file. The result is a conditional dependency that can be used in the Makefile.
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.
CommandLineReader.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 108 lines
✨ Summary
This Java code creates a custom Reader
class called CommandLineReader
that modifies the behavior of the standard input stream when reading from the command line. It treats empty lines as ‘;\n’ to make the interpreter more user-friendly, but ignores this behavior when reading from files non-interactively.
This Java code creates a custom Reader
class called CommandLineReader
that modifies the behavior of the standard input stream when reading from the command line. It treats empty lines as ‘;\n’ to make the interpreter more user-friendly, but ignores this behavior when reading from files non-interactively.
InstallPanel.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1155 lines
✨ Summary
This Java code is part of a plugin manager for an IDE (Integrated Development Environment). It provides functionality to manage plugins, including sorting and filtering plugin information, displaying plugin details in a table, and handling keyboard and mouse events. The code also includes rendering and focus management for the plugin table.
This Java code is part of a plugin manager for an IDE (Integrated Development Environment). It provides functionality to manage plugins, including sorting and filtering plugin information, displaying plugin details in a table, and handling keyboard and mouse events. The code also includes rendering and focus management for the plugin table.
39 import javax.swing.*;
40 import javax.swing.border.EmptyBorder;
41 import javax.swing.event.ListSelectionEvent;
42 import javax.swing.event.ListSelectionListener;
85 this.updates = updates;
87 setBorder(new EmptyBorder(12,12,12,12));
89 final JSplitPane split = new JSplitPane(
532 public void saveSelection(Set<String> savedChecked, Set<String> savedSelection)
533 {
534 if (entries.isEmpty())
535 return;
536 for (int i=0, c=getRowCount() ; i<c ; i++)
MouseHandler.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 563 lines
✨ Summary
This Java code is part of a text editor’s mouse event handling mechanism. It handles various mouse events such as clicks, drags, and releases to manage selections, insertions, and deletions of text within the editor. The code ensures proper behavior for different mouse button combinations, including drag-and-drop functionality and quick copy/paste operations.
This Java code is part of a text editor’s mouse event handling mechanism. It handles various mouse events such as clicks, drags, and releases to manage selections, insertions, and deletions of text within the editor. The code ensures proper behavior for different mouse button combinations, including drag-and-drop functionality and quick copy/paste operations.
pdx7.adsr~.pd (git://github.com/pd-projects/pdx7.git) Unknown · 427 lines
16 #X msg 15 91 setsub \$1;
17 #X msg 249 184 svdir \$1;
18 #X obj 250 139 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
19 -1;
20 #X obj 250 163 savepanel;
73 #X connect 5 1 3 1;
74 #X restore 524 30 pd cnv.ctl;
75 #X obj 669 90 bng 15 250 50 0 \$0-copy empty copy 0 -6 0 8 -225271
76 -1 -1;
77 #X obj 669 118 bng 15 250 50 0 \$0-paste empty paste 0 -6 0 8 -257472
398 #X msg 476 170 d d a 3 9 0 3 3 6;
399 #X obj 50 255 unpack 0 0 0 0 0;
400 #X obj 13 34 bng 14 250 50 0 empty empty empty 0 -6 0 8 -158106 -155649
401 -228225;
402 #X msg 63 203 10 40 50 500 100;
object.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 20 lines
FileEntryTest.java (https://bitbucket.org/nbargnesi/idea.git) Java · 146 lines
simple-macros.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 720 lines
304 the text field is returned. Note that there are two forms of the
305 <function>input()</function> method; the first form with two parameters
306 displays an empty input field, the other forms lets you specify an initial,
307 default input value.
308 </para>
311 For those without Java experience, it is important to know that
312 <constant>null</constant> is <emphasis>not</emphasis> the same as an
313 empty, <quote>zero-length</quote> <classname>String</classname>. It is
314 Java's way of saying that there is no object associated with this
315 variable. Whenever you seek to use a return value from
535 <para>
536 A Java <classname>Date</classname> object is created using the
537 <function>new</function> keyword. The empty parenthesis after
538 <classname>Date</classname> signify a call on the <glossterm>
539 constructor method</glossterm> of <classname>Date</classname> having no
p08fail2.xml (git://github.com/landgraf/matreshka.git) XML · 10 lines
RegExBasedDataWriterProvider.cs
(git://github.com/hhariri/EasyHttp.git)
C# · 214 lines
✨ Summary
This C# code defines a custom data writer provider for JSONFX serialization, allowing for flexible and extensible handling of different content types and file extensions. It uses regular expressions to match and select writers based on provided headers and extension names. The provider can be used to serialize data in various formats, such as JSON, XML, or binary data, with customizable behavior.
This C# code defines a custom data writer provider for JSONFX serialization, allowing for flexible and extensible handling of different content types and file extensions. It uses regular expressions to match and select writers based on provided headers and extension names. The provider can be used to serialize data in various formats, such as JSON, XML, or binary data, with customizable behavior.
91 foreach (string contentType in writer.ContentType)
92 {
93 if (String.IsNullOrEmpty(contentType) ||
94 _writersByMime.ContainsKey(contentType))
95 {
102 foreach (string fileExt in writer.FileExtension)
103 {
104 if (String.IsNullOrEmpty(fileExt) ||
105 _writersByExt.ContainsKey(fileExt))
106 {
161 {
162 mime = DataProviderUtility.ParseMediaType(type);
163 if (!String.IsNullOrEmpty(mime))
164 {
165 yield return mime;
aclocal.m4
(https://bitbucket.org/freebsd/freebsd-head/)
m4 · 905 lines
✨ Summary
This M4 code is a collection of configuration and build scripts for a C library, likely the GNU Binutils. It sets up various macros and functions for building and testing the library, including support for different tar formats, gettext, and other dependencies. The script also includes several external M4 files that provide additional functionality.
This M4 code is a collection of configuration and build scripts for a C library, likely the GNU Binutils. It sets up various macros and functions for building and testing the library, including support for different tar formats, gettext, and other dependencies. The script also includes several external M4 files that provide additional functionality.
RE.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1357 lines
✨ Summary
This Java code is part of a regular expression compiler, responsible for parsing and compiling regular expressions into an internal representation. It handles various input types, including strings, character arrays, and streams, and provides methods for debugging and human-readable output. The compiled regular expression can be used to match patterns in text data.
This Java code is part of a regular expression compiler, responsible for parsing and compiling regular expressions into an internal representation. It handles various input types, including strings, character arrays, and streams, and provides methods for debugging and human-readable output. The compiled regular expression can be used to match patterns in text data.
358 throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,newIndex);
359 if ((currentToken.getMinimumLength() == 0) && (minMax.second == Integer.MAX_VALUE))
360 throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,newIndex);
361 index = newIndex;
362 currentToken = setRepeated(currentToken,minMax.first,minMax.second,index);
596 throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
597 if (currentToken.getMinimumLength() == 0)
598 throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index);
599 currentToken = setRepeated(currentToken,0,Integer.MAX_VALUE,index);
600 }
612 throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
613 if (currentToken.getMinimumLength() == 0)
614 throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index);
615 currentToken = setRepeated(currentToken,1,Integer.MAX_VALUE,index);
616 }
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.
76 <dt>Change</dt>
77 <dd>Replaces the word not in the <cite> Not in Dictionary</cite> text field with the word in the
78 <cite> Change to</cite> text field. If the <cite> Change to</cite> text field is empty,
79 the button name changes to <cite>Delete</cite>. To remove the selected word from the item, click
80 <cite>Delete</cite>.</dd>
82 <dd>Replaces all instances of the word not in the <cite> Not in Dictionary</cite>
83 text field with the word in the
84 <cite> Change to</cite> text field. If the <cite> Change to</cite> text field is empty,
85 the button name changes to <cite>Delete</cite>. To remove all instances of the selected word from the item, click
86 <cite>Delete</cite>.</dd>
closureArg2.test (https://bitbucket.org/nbargnesi/idea.git) Unknown · 25 lines
xprt.c
(http://photon-android.googlecode.com/svn/)
C · 1160 lines
✨ Summary
This C code implements a transport layer for RPC (Remote Procedure Call) communications. It manages a pool of slots to handle incoming requests, prioritizes them based on their priority, and ensures that resources are released when no longer needed. The code also handles creation, destruction, and reference management of the transport instance.
This C code implements a transport layer for RPC (Remote Procedure Call) communications. It manages a pool of slots to handle incoming requests, prioritizes them based on their priority, and ensures that resources are released when no longer needed. The code also handles creation, destruction, and reference management of the transport instance.
672 spin_lock(&xprt->transport_lock);
673 if (!list_empty(&xprt->recv) || xprt->shutdown)
674 goto out_abort;
675 if (test_and_set_bit(XPRT_LOCKED, &xprt->state))
884 if (!req->rq_reply_bytes_recvd) {
885 if (list_empty(&req->rq_list) && rpc_reply_expected(task)) {
886 /*
887 * Add to the list only if we're expecting a reply
938 if (task->tk_rqstp)
939 return;
940 if (!list_empty(&xprt->free)) {
941 struct rpc_rqst *req = list_entry(xprt->free.next, struct rpc_rqst, rq_list);
942 list_del_init(&req->rq_list);
CloseDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 244 lines
✨ Summary
This Java code creates a dialog window for closing all buffers in an integrated development environment (IDE). It displays a list of open buffers, allows users to select and save or discard them, and provides options to cancel or close all buffers. The dialog updates its buttons based on the selected buffer index.
This Java code creates a dialog window for closing all buffers in an integrated development environment (IDE). It displays a list of open buffers, allows users to select and save or discard them, and provides options to cancel or close all buffers. The dialog updates its buttons based on the selected buffer index.
fnmatch.h
(https://bitbucket.org/freebsd/freebsd-head/)
C++ Header · 57 lines
✨ Summary
This is a C header file that provides an interface for pattern matching functions. It defines constants and a function fnmatch
to perform case-insensitive string matching, allowing users to specify various options such as disabling backslash escaping and ignoring directory prefixes. The header is part of the FreeBSD operating system and is designed to be compatible with older compilers.
This is a C header file that provides an interface for pattern matching functions. It defines constants and a function fnmatch
to perform case-insensitive string matching, allowing users to specify various options such as disabling backslash escaping and ignoring directory prefixes. The header is part of the FreeBSD operating system and is designed to be compatible with older compilers.
director_string_runme.php
(https://swig.svn.sourceforge.net/svnroot/swig)
PHP · 35 lines
✨ Summary
This PHP code tests a set of functions, classes, and global variables to ensure they are working as expected. It creates an instance of class B, which extends class A, and calls various methods on it to verify their behavior. The test checks for equality with expected results, indicating that the code passes the tests successfully.
This PHP code tests a set of functions, classes, and global variables to ensure they are working as expected. It creates an instance of class B, which extends class A, and calls various methods on it to verify their behavior. The test checks for equality with expected results, indicating that the code passes the tests successfully.
1 <?php
3 require "tests.php";
4 require "director_string.php";
6 // No new functions
7 check::functions(array(a_get_first,a_call_get_first,a_string_length,a_process_text,a_call_process_func,stringvector_size,stringvector_is_empty,stringvector_clear,stringvector_push,stringvector_pop,stringvector_capacity,stringvector_reserve));
8 // No new classes
9 check::classes(array(A,StringVector));
ReduceSinkOperator.java
(https://svn.apache.org/repos/asf/incubator/hcatalog/)
Java · 0 lines
✨ Summary
This Java code implements a ReduceSink operator for Apache Hive, which is part of a MapReduce framework. It processes data from a Map phase and reduces it to a single output value based on a hash key generated by a set of partition columns. The reducer writes the output to an output collection and updates counters as necessary.
This Java code implements a ReduceSink operator for Apache Hive, which is part of a MapReduce framework. It processes data from a Map phase and reduces it to a single output value based on a hash key generated by a set of partition columns. The reducer writes the output to an output collection and updates counters as necessary.
history-restore.pl
(git://github.com/shabble/irssi-scripts.git)
Perl · 186 lines
✨ Summary
This Perl script is a template for an IRC bot that displays and restores a fake history of messages. It uses Irssi, a Perl IRC client library, to interact with the IRC server. The script initializes itself, binds commands to display and restore the history, and simulates typing and pressing keys on the keyboard.
This Perl script is a template for an IRC bot that displays and restores a fake history of messages. It uses Irssi, a Perl IRC client library, to interact with the IRC server. The script initializes itself, binds commands to display and restore the history, and simulates typing and pressing keys on the keyboard.
pom.xml (http://mycila.googlecode.com/svn/) XML · 131 lines
parse.js
(git://github.com/zpao/v8monkey.git)
JavaScript · 178 lines
✨ Summary
This JavaScript code tests the JSON parsing functionality of a specific implementation, verifying that it correctly handles various data types, including objects, arrays, numbers, strings, and special characters, as well as edge cases like nested objects and Unicode escapes. It asserts that the parsed values match the expected results.
This JavaScript code tests the JSON parsing functionality of a specific implementation, verifying that it correctly handles various data types, including objects, arrays, numbers, strings, and special characters, as well as edge cases like nested objects and Unicode escapes. It asserts that the parsed values match the expected results.
std_multiset.i (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 51 lines
aha1542.c
(http://photon-android.googlecode.com/svn/)
C · 1768 lines
✨ Summary
This C code implements a SCSI (Small Computer System Interface) driver for Adaptec 1542 disk controllers. It provides functions to detect, release, queue commands, and handle device resets for these controllers. The code also includes a template for the SCSI host interface and a BIOS parameter function to translate sector sizes.
This C code implements a SCSI (Small Computer System Interface) driver for Adaptec 1542 disk controllers. It provides functions to detect, release, queue commands, and handle device resets for these controllers. The code also includes a template for the SCSI host interface and a BIOS parameter function to translate sector sizes.
View.cpp
(https://jetpp.svn.sourceforge.net/svnroot/jetpp)
C++ · 1351 lines
✨ Summary
This C++ code is part of a 3D modeling and editing application, specifically a view class for displaying and interacting with 3D models. It handles user input, such as mouse clicks and keyboard events, to manipulate the model’s position, rotation, and scaling. The code also manages various modes, including zooming, panning, and selecting objects within the model.
This C++ code is part of a 3D modeling and editing application, specifically a view class for displaying and interacting with 3D models. It handles user input, such as mouse clicks and keyboard events, to manipulate the model’s position, rotation, and scaling. The code also manages various modes, including zooming, panning, and selecting objects within the model.
prettyprint.factor (git://github.com/x6j8x/factor.git) Unknown · 151 lines
blizzard.c
(http://photon-android.googlecode.com/svn/)
C · 1650 lines
✨ Summary
This C code implements a Linux driver for an LCD controller, specifically the BLIZZARD LCD controller used in some Samsung mobile devices. It provides functions for initializing and cleaning up the LCD controller, handling display updates, synchronization, and power management. The driver is part of the Linux kernel’s framebuffer subsystem and interacts with the device’s registers to control its behavior.
This C code implements a Linux driver for an LCD controller, specifically the BLIZZARD LCD controller used in some Samsung mobile devices. It provides functions for initializing and cleaning up the LCD controller, handling display updates, synchronization, and power management. The driver is part of the Linux kernel’s framebuffer subsystem and interacts with the device’s registers to control its behavior.
381 spin_lock_irqsave(&blizzard.req_lock, flags);
382 BUG_ON(list_empty(&blizzard.free_req_list));
383 req = list_entry(blizzard.free_req_list.next,
384 struct blizzard_request, entry);
412 spin_lock_irqsave(&blizzard.req_lock, flags);
414 while (!list_empty(&blizzard.pending_req_list)) {
415 struct blizzard_request *req;
416 void (*complete)(void *);
444 spin_lock_irqsave(&blizzard.req_lock, flags);
445 if (likely(!list_empty(&blizzard.pending_req_list)))
446 process = 0;
447 list_splice_init(head, blizzard.pending_req_list.prev);
compressor.rb
(git://github.com/documentcloud/jammit.git)
Ruby · 266 lines
✨ Summary
This Ruby code is a helper class for generating asset tags in a Rails application. It provides methods for constructing asset URLs, checking embeddability, and encoding asset contents. The class appears to be designed to work with CSS assets, handling issues like relative paths, cache-busting, and base64 encoding.
This Ruby code is a helper class for generating asset tags in a Rails application. It provides methods for constructing asset URLs, checking embeddability, and encoding asset contents. The class appears to be designed to work with CSS assets, handling issues like relative paths, cache-busting, and base64 encoding.
ibm32n06.dtd (git://github.com/landgraf/matreshka.git) Document Type Definition · 1 lines
1 <!ELEMENT animal EMPTY>