100+ results for 'php array'

Not the results you expected?

player_carrer.php (https://github.com/karlom/gameadmin.git) PHP · 605 lines

21 if($viewData[career_array]){

22 $career_array = $viewData[career_array];

23 }

24 $level_range = $viewData[level_range];

422 $smarty->assign('career_array', $career_array);

423 $smarty->assign('country_array', $country_array);

424 $smarty->assign('total_result', $total_result);

425 $smarty->display('module/player/player_carrer.tpl');

428 $data = array(

429 'type'=>3,

430 'country_array' => array(

431 1 => '蜀',

432 2 => '楚',

433 3 => '秦'

434 ),

435 'career_array' => array(

436 1 => '尚武',

437 2 => '逍遥',

TranslatorTest.php (https://github.com/Exercise/symfony.git) PHP · 248 lines

34 $translator->addResource('array', array('foo' => 'foofoo'), 'en');

35 $translator->addResource('array', array('bar' => 'foobar'), 'fr');

36

37 // force catalogue loading

45 {

46 $translator = new Translator('en', new MessageSelector());

47 $translator->addLoader('array', new ArrayLoader());

48 $translator->addResource('array', array('foo' => 'foo (en)'), 'en');

151 array('Symfony2 est awesome !', 'Symfony2 is %what%!', 'Symfony2 est %what% !', array('%what%' => 'awesome'), 'fr', ''),

152 array('Symfony2 est super !', new String('Symfony2 is great!'), 'Symfony2 est super !', array(), 'fr', ''),

153 );

154 }

188 array('Il y a 10 pommes', 'There is one apple|There is %count% apples', 'Il y a %count% pomme|Il y a %count% pommes', 10, array('%count%' => 10), 'fr', ''),

189

190 array('Il y a 0 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''),

191 array('Il y a 1 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''),

KalturaSystemPartnerClientPlugin.php (https://github.com/richhl/kalturaCE.git) PHP · 607 lines

1 <?php

2 /**

3 * @package External

4 * @subpackage Kaltura

5 */

6 require_once(dirname(__FILE__) . "/../KalturaClientBase.php");

7 require_once(dirname(__FILE__) . "/../KalturaEnums.php");

8 require_once(dirname(__FILE__) . "/../KalturaTypes.php");

9

10 /**

179 *

180 *

181 * @var array of KalturaSystemPartnerUsageItem

182 */

183 public $objects;

Tax.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 301 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Tax

23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

101 protected function _addTax($after='discount')

102 {

103 $taxTotal = new Varien_Object(array(

104 'code' => 'tax',

105 'block_name'=> $this->getNameInLayout()

Filesystem.php (https://gitlab.com/judielsm/Handora) PHP · 442 lines

1 <?php

2

3 namespace Illuminate\Filesystem;

113 * Delete the file at a given path.

114 *

115 * @param string|array $paths

116 * @return bool

117 */

118 public function delete($paths)

119 {

120 $paths = is_array($paths) ? $paths : func_get_args();

121

122 $success = true;

263 * @param string $pattern

264 * @param int $flags

265 * @return array

266 */

267 public function glob($pattern, $flags = 0)

TermsController.php (https://github.com/fahad19/croogo.git) PHP · 379 lines

1 <?php

2 /**

3 * Terms Controller

4 *

5 * PHP version 5

6 *

7 * @category Controller

9 * @version 1.0

10 * @author Fahad Ibnay Heylaal <contact@fahad19.com>

11 * @license http://www.opensource.org/licenses/mit-license.php The MIT License

12 * @link http://www.croogo.org

13 */

25 * Models used by the Controller

26 *

27 * @var array

28 * @access public

29 */

ezurlobjectlink.php (https://github.com/eeggenberger/ezpublish.git) PHP · 227 lines

28 static function definition()

29 {

30 static $definition = array( 'fields' => array( 'url_id' => array( 'name' => 'URLID',

31 'datatype' => 'integer',

32 'default' => 0,

47 'short_name' => 'contentobject_attr_version',

48 'required' => true ) ),

49 'keys' => array( 'url_id', 'contentobject_attribute_id', 'contentobject_attribute_version' ),

50 'sort' => array( 'url_id' => 'asc' ),

102 $parameters,

103 true );

104 $storedVersionList = array();

105 foreach ( $urlObjectLinkList as $urlObjectLink )

106 {

140 false,

141 false,

142 array( array( 'operation' => 'count( * )',

143 'name' => 'count' ) ) );

144 return $result[0]['count'];

filter.examples.validation.html (https://bitbucket.org/thncr/manuals.git) HTML · 77 lines

10 <div class="next" style="text-align: right; float: right;"><a href="filter.examples.sanitization.html">Sanitization</a></div>

11 <div class="up"><a href="filter.examples.html">范例</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

13 </div><hr /><div id="filter.examples.validation" class="section">

14 <h2 class="title">Validation</h2>

17 <p><strong>Example #1 Validating email addresses with <span class="function"><a href="function.filter-var.html" class="function">filter_var()</a></span></strong></p>

18 <div class="example-contents">

19 <div class="phpcode"><code><span style="color: #000000">

20 <span style="color: #0000BB">&lt;?php<br />$email_a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'joe@example.com'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$email_b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'bogus'</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$email_a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_EMAIL</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(email_a)&nbsp;email&nbsp;address&nbsp;is&nbsp;considered&nbsp;valid."</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$email_b</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_EMAIL</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(email_b)&nbsp;email&nbsp;address&nbsp;is&nbsp;considered&nbsp;valid."</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>

36 <p><strong>Example #2 Validating IP addresses with <span class="function"><a href="function.filter-var.html" class="function">filter_var()</a></span></strong></p>

37 <div class="example-contents">

38 <div class="phpcode"><code><span style="color: #000000">

39 <span style="color: #0000BB">&lt;?php<br />$ip_a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'127.0.0.1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$ip_b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'42.42'</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$ip_a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_IP</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(ip_a)&nbsp;IP&nbsp;address&nbsp;is&nbsp;considered&nbsp;valid."</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$ip_b</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_IP</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(ip_b)&nbsp;IP&nbsp;address&nbsp;is&nbsp;considered&nbsp;valid."</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>

57 <div class="phpcode"><code><span style="color: #000000">

58 <span style="color: #0000BB">&lt;?php<br />$int_a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$int_b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'-1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$int_c&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'4'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'options'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'min_range'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'max_range'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br />);<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(int_a)&nbsp;integer&nbsp;is&nbsp;considered&nbsp;valid&nbsp;(between&nbsp;0&nbsp;and&nbsp;3).\n"</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_b</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(int_b)&nbsp;integer&nbsp;is&nbsp;considered&nbsp;valid&nbsp;(between&nbsp;0&nbsp;and&nbsp;3).\n"</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_c</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(int_c)&nbsp;integer&nbsp;is&nbsp;considered&nbsp;valid&nbsp;(between&nbsp;0&nbsp;and&nbsp;3).\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">$options</span><span style="color: #007700">[</span><span style="color: #DD0000">'options'</span><span style="color: #007700">][</span><span style="color: #DD0000">'default'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br />if&nbsp;((</span><span style="color: #0000BB">$int_c&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_c</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">))&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(int_c)&nbsp;integer&nbsp;is&nbsp;considered&nbsp;valid&nbsp;(between&nbsp;0&nbsp;and&nbsp;3)&nbsp;and&nbsp;is&nbsp;</span><span style="color: #0000BB">$int_c</span><span style="color: #DD0000">."</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>

59 </span>

60 </code></div>

filter.examples.validation.html (https://github.com/cue-taro/emacs-setting-files.git) HTML · 77 lines

10 <div class="next" style="text-align: right; float: right;"><a href="filter.examples.sanitization.html">除去</a></div>

11 <div class="up"><a href="filter.examples.html">例</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

13 </div><hr /><div id="filter.examples.validation" class="section">

14 <h2 class="title">検証</h2>

17 <p><b>例1 <span class="function"><a href="function.filter-var.html" class="function">filter_var()</a></span> でのメールアドレスの検証</b></p>

18 <div class="example-contents">

19 <div class="phpcode"><code><span style="color: #000000">

20 <span style="color: #0000BB">&lt;?php<br />$email_a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'joe@example.com'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$email_b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'bogus'</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$email_a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_EMAIL</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"(email_a)&nbsp;はメールアドレスとして有効です。"</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$email_b</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_EMAIL</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"(email_b)&nbsp;はメールアドレスとして有効です。"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>

36 <p><b>例2 <span class="function"><a href="function.filter-var.html" class="function">filter_var()</a></span> での IP アドレスの検証</b></p>

37 <div class="example-contents">

38 <div class="phpcode"><code><span style="color: #000000">

39 <span style="color: #0000BB">&lt;?php<br />$ip_a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'127.0.0.1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$ip_b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'42.42'</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$ip_a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_IP</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"(ip_a)&nbsp;は&nbsp;IP&nbsp;アドレスとして有効です。"</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$ip_b</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_IP</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"(ip_b)&nbsp;は&nbsp;IP&nbsp;アドレスとして有効です。"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>

57 <div class="phpcode"><code><span style="color: #000000">

58 <span style="color: #0000BB">&lt;?php<br />$int_a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$int_b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'-1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$int_c&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'4'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'options'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'min_range'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'max_range'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br />);<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"整数値&nbsp;(int_a)&nbsp;は有効な値&nbsp;(0&nbsp;から&nbsp;3&nbsp;までの間)&nbsp;です。\n"</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_b</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"整数値&nbsp;(int_b)&nbsp;は有効な値&nbsp;(0&nbsp;から&nbsp;3&nbsp;までの間)&nbsp;です。\n"</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_c</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"整数値&nbsp;(int_c)&nbsp;は有効な値&nbsp;(0&nbsp;から&nbsp;3&nbsp;までの間)&nbsp;です。\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">$options</span><span style="color: #007700">[</span><span style="color: #DD0000">'options'</span><span style="color: #007700">][</span><span style="color: #DD0000">'default'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br />if&nbsp;((</span><span style="color: #0000BB">$int_c&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_c</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">))&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"整数値&nbsp;(int_c)&nbsp;は有効な値&nbsp;(0&nbsp;から&nbsp;3&nbsp;までの間)&nbsp;で、その値は&nbsp;</span><span style="color: #0000BB">$int_c</span><span style="color: #DD0000">&nbsp;です。"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>

59 </span>

60 </code></div>

Tax.php (https://github.com/apexure/BrandsInternational.git) PHP · 301 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Tax

23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

101 protected function _addTax($after='discount')

102 {

103 $taxTotal = new Varien_Object(array(

104 'code' => 'tax',

105 'block_name'=> $this->getNameInLayout()

ReclamacaoRepository.php (https://gitlab.com/fabiorf/reclameimovel) PHP · 298 lines

61 $visita = $oRec->getVisita() + 1;

62

63 $this->db->update('reclamacao', array('visita'=>$visita), array('id' => $id));

64 }

65 /**

166 // Provide a default orderBy.

167 if (!$orderBy) {

168 $orderBy = array('r.dt_cadastro' => 'DESC');

169 }

170

196 * @return array A collection of reclamacao, keyed by reclamacao id.

197 */

198 public function findReclamacaoEmpreendimento($limit, $offset = 0, $orderBy = array(),$ide=null)

199 {

200 // Provide a default orderBy.

Api.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 349 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Catalog

23 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

37 * Product link type mapping, used for references and validation

38 *

39 * @var array

40 */

41 protected $_typeMap = array(

Mvc.php (https://github.com/hectorbenitez/zf2.git) PHP · 409 lines

305 * @return \Zend\Navigation\Page\Mvc fluent interface, returns self

306 */

307 public function setParams(array $params = null)

308 {

309 if (null === $params) {

323 * @see getHref()

324 *

325 * @return array page params

326 */

327 public function getParams()

394 * Returns an array representation of the page

395 *

396 * @return array associative array containing all page properties

397 */

398 public function toArray()

Logger.php (https://github.com/flubbers/cloudFutbol.git) PHP · 393 lines

202 * @return Boolean Whether the record has been processed

203 */

204 public function addDebug($message, array $context = array())

205 {

206 return $this->addRecord(self::DEBUG, $message, $context);

373 * @return Boolean Whether the record has been processed

374 */

375 public function alert($message, array $context = array())

376 {

377 return $this->addRecord(self::ALERT, $message, $context);

387 * @return Boolean Whether the record has been processed

388 */

389 public function emerg($message, array $context = array())

390 {

391 return $this->addRecord(self::ALERT, $message, $context);

TableHelper.php (https://bitbucket.org/helfreire/tccwebservice.git) PHP · 459 lines

1 <?php

2

3 /*

28 * Table headers.

29 *

30 * @var array

31 */

32 private $headers = array();

35 * Table rows.

36 *

37 * @var array

38 */

39 private $rows = array();

52 * Column widths cache.

53 *

54 * @var array

55 */

56 private $columnWidths = array();

writer_database.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 334 lines

44 * // Write a log entry ( message, severity, source, category )

45 * $log->log( "File '/images/spacer.gif' does not exist.", ezcLog::WARNING,

46 * array( "source" => "Application", "category" => "Design" ) );

47 *

48 * // Write a log entry ( message, severity, source, category, file, line )

50 * array( "source" => "Application", "category" => "Design" ),

51 * array( "file" => "/index.php", "line" => 123 ) );

52 * </code>

53 *

88 * Holds the default column names in the log tables.

89 *

90 * @var array(string=>mixed)

91 */

92 private $defaultColumns = array();

95 * Holds additional column names in the log tables.

96 *

97 * @var array(string=>mixed)

98 */

99 private $additionalColumns = array();

OneToOneEagerLoadingTest.php (https://github.com/adrienbrault/doctrine2.git) PHP · 379 lines

1 <?php

2

3 declare(strict_types=1);

5 namespace Doctrine\Tests\ORM\Functional;

6

7 use Doctrine\Common\Collections\ArrayCollection;

8 use Doctrine\ORM\Annotation as ORM;

9 use Doctrine\ORM\Tools\SchemaTool;

268 public function __construct(TrainOwner $owner)

269 {

270 $this->waggons = new ArrayCollection();

271 $this->setOwner($owner);

272 }

ObjectManager.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 316 lines

32 * Class constructor

33 *

34 * @param \PHPUnit_Framework_TestCase $testObject

35 */

36 public function __construct(\PHPUnit_Framework_TestCase $testObject)

114 $translator = $this->_testObject->getMockBuilder($className)->disableOriginalConstructor()->getMock();

115 $translateCallback = function ($arguments) {

116 return is_array($arguments) ? vsprintf(array_shift($arguments), $arguments) : '';

117 };

118 $translator->expects(

148 *

149 * @param string $className

150 * @param array $arguments

151 * @return object

152 */

225 * @param array $arguments

226 * @return array

227 */

228 public function getConstructArguments($className, array $arguments = [])

ProxyBuilderTest.php (https://gitlab.com/reasonat/test8) PHP · 445 lines

1 <?php

2

3 /**

128 $result = $this->proxyBuilder->build($class);

129

130 // @todo Solve the silly linebreak for array()

131 $method_body = <<<'EOS'

132

134 * {@inheritdoc}

135 */

136 public function complexMethod($parameter, callable $function, \Drupal\Tests\Component\ProxyBuilder\TestServiceNoMethod $test_service = NULL, array &$elements = array (

137 ))

138 {

382 class TestServiceComplexMethod {

383

384 public function complexMethod($parameter, callable $function, TestServiceNoMethod $test_service = NULL, array &$elements = array()) {

385

386 }

mavlink_msg_named_value_int.h (https://gitlab.com/krucios/Astraeus_FW) C Header · 254 lines

59 _mav_put_uint32_t(buf, 0, time_boot_ms);

60 _mav_put_int32_t(buf, 4, value);

61 _mav_put_char_array(buf, 8, name, 10);

62 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);

63 #else

65 packet.time_boot_ms = time_boot_ms;

66 packet.value = value;

67 mav_array_memcpy(packet.name, name, sizeof(char)*10);

68 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);

69 #endif

92 _mav_put_uint32_t(buf, 0, time_boot_ms);

93 _mav_put_int32_t(buf, 4, value);

94 _mav_put_char_array(buf, 8, name, 10);

95 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_NAMED_VALUE_INT_LEN);

96 #else

CellQuery.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 417 lines

1 <?php

2

3 /**

19 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

20 * @license http://framework.zend.com/license/new-bsd New BSD License

21 * @version $Id: CellQuery.php 23805 2011-03-16 00:55:40Z tjohns $

22 */

23

25 * Zend_Gdata_App_util

26 */

27 // // // // // // // // require_once('Zend/Gdata/App/Util.php');

28

29 /**

30 * Zend_Gdata_Query

31 */

32 // // // // // // // // require_once('Zend/Gdata/Query.php');

33

34 /**

MongoAuth.php (https://bitbucket.org/paulscott56/c4-new.git) PHP · 336 lines

1 <?php

2

3 namespace C4\Library\Authentication\Adapter;

54 * $_authenticateResultInfo

55 *

56 * @var array

57 */

58 protected $_authenticateResultInfo = null;

61 * $_resultDoc - Results of database authentication query

62 *

63 * @var array

64 */

65 protected $_resultDoc = null;

228 * getResultDocObject() - Returns the result row as a stdClass object

229 *

230 * @param string|array $returnColumns

231 * @param string|array $omitColumns

ExportPlugin.class.php (https://gitlab.com/qbarbosa/klindev) PHP · 355 lines

94

95 /**

96 * The following methods are used in export.php or in db_operations.php,

97 * but they are not implemented by all export plugins

98 */

165 *

166 * @param string $db database being exported

167 * @param string|array $tables table(s) being exported

168 * @param array $metadataTypes types of metadata to export

169 * @param array $targetNames associative array of db and table names of

170 * target configuraton storage

171 *

328 * [Foreign Table] ([Foreign Field])

329 *

330 * @param array $res_rel the foreigners array

331 * @param string $field_name the field name

332 * @param string $db the field name

FieldDefinitionListenerTest.php (https://gitlab.com/geeta7/drupal) PHP · 275 lines

1 <?php

2

3 /**

81 *

82 * @param \Drupal\Core\Entity\EntityTypeInterface[]|\Prophecy\Prophecy\ProphecyInterface[] $definitions

83 * (optional) An array of entity type definitions.

84 */

85 protected function setUpEntityManager($definitions = array()) {

AdvertiserServiceImpl.php (https://bitbucket.org/valmy/openx.git) PHP · 353 lines

1 <?php

2

3 /*

33

34 // Require the base class, BaseLogonService

35 require_once MAX_PATH . '/www/api/v1/common/BaseServiceImpl.php';

36

37 // Require the advertiser Dll class.

38 require_once MAX_PATH . '/lib/OA/Dll/Advertiser.php';

39

40 /**

331 * @param string $sessionId

332 * @param integer $agencyId

333 * @param array &$aAdvertiserList Array of OA_Dll_AdvertiserInfo classes

334 *

335 * @return boolean

query_builder.php (https://github.com/F5/zetacomponents.git) PHP · 318 lines

45 * Keeps a list of where clauses per nested level

46 *

47 * @var array(array(string))

48 */

49 private $stack;

75 * @param ezcSearchQuery $query

76 * @param string $searchQuery

77 * @param array(string) $searchFields

78 */

79 public function parseSearchQuery( ezcSearchQuery $query, $searchQuery, $searchFields )

114 *

115 * @param string $searchQuery

116 * @return array(ezcSearchQueryToken)

117 */

118 static protected function tokenize( $searchQuery )

Conversion.php (https://gitlab.com/Japang-Jawara/jawara-penilaian) PHP · 617 lines

1 <?php

2 /*

3 * Copyright 2014 Google Inc.

78 public $currencyCode;

79 protected $customDimensionType = CustomDimension::class;

80 protected $customDimensionDataType = 'array';

81 protected $customMetricType = CustomMetric::class;

82 protected $customMetricDataType = 'array';

Tax.php (https://github.com/ticean/magento-mirror.git) PHP · 301 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Tax

23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

101 protected function _addTax($after='discount')

102 {

103 $taxTotal = new Varien_Object(array(

104 'code' => 'tax',

105 'block_name'=> $this->getNameInLayout()

ConcurrentArrayBlockingQueue.java (https://bitbucket.org/beginnerjyh/jetty.project.git) Java · 418 lines

11 //

12 // The Apache License v2.0 is available at

13 // http://www.opensource.org/licenses/apache2.0.php

14 //

15 // You may elect to redistribute this code under either of these licenses.

36 * @param <E>

37 */

38 public abstract class ConcurrentArrayBlockingQueue<E> extends ConcurrentArrayQueue<E> implements BlockingQueue<E>

39 {

40 private final Lock _lock = new ReentrantLock();

170 private static final int SIZE_RIGHT_OFFSET = SIZE_LEFT_OFFSET + MemoryUtils.getLongsPerCacheLine();

171

172 private final AtomicLongArray _sizes = new AtomicLongArray(SIZE_RIGHT_OFFSET+1);

173

174 public Unbounded()

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

58 Q_OBJECT

59 public slots:

60 void stream(QIODevice *file, QByteArray *buffer, bool *finished);

61 };

62

248 {

249 m_thread = new WorkerThread();

250 connect(this, SIGNAL(outOfData(QIODevice*,QByteArray*,bool*)), m_thread, SLOT(stream(QIODevice*,QByteArray*,bool*)));

251 m_thread->start();

252 m_soundBuffer1.waveHeader = new WAVEHDR;

259 {

260 stop();

261 disconnect(this, SIGNAL(outOfData(QIODevice*,QByteArray*,bool*)), m_thread, SLOT(stream(QIODevice*,QByteArray*,bool*)));

262 do { //The event loop of m_thread might not be started, yet

263 m_thread->quit(); //If the event loop is not started yet quit() does nothing

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

This Java class represents a desktop application’s UI component, managing its layout, components, and interactions. It handles events such as hover, selection, and modal windows, updating the UI accordingly. The class provides methods for getting and setting various properties, validating the UI, and retrieving specific components or layers within the UI.

1 package org.loon.framework.android.game.core.graphics;

2

3 import java.util.ArrayList;

4

5 import org.loon.framework.android.game.core.graphics.component.LPanel;

385 }

386

387 public ArrayList<LComponent> getComponents(Class<? extends LComponent> clazz) {

388 if (clazz == null) {

389 return null;

391 LComponent[] components = contentPane.getComponents();

392 int size = components.length;

393 ArrayList<LComponent> l = new ArrayList<LComponent>(size);

394 for (int i = size; i > 0; i--) {

395 LComponent comp = (LComponent) components[i - 1];

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

This Java code is part of an Integrated Development Environment (IDE) plugin for editing and viewing HTML files. It provides actions to open a new buffer file, open the current buffer file in the InfoViewer, and open a selected URL in the InfoViewer. The plugin uses a custom class called InfoViewer to display the contents of the opened URL.

156 /**

157 * converts the command string, which may contain "$u" as placeholders

158 * for an url, into an array of strings, tokenized at the space char.

159 * Characters in the command string may be escaped with '\\', which

160 * in the case of space prevents tokenization.

161 * @param command the command string.

162 * @param url the URL. Spaces in the URL are converted to "%20".

163 * @return the space separated parts of the command string, as array

164 * of Strings.

165 */

javascript.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 550 lines

144

145 <!-- Intrinsic Objects (Good idea not to use these names!!)-->

146 <KEYWORD3>Array</KEYWORD3>

147 <KEYWORD3>Boolean</KEYWORD3>

148 <KEYWORD3>Date</KEYWORD3>

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

This Java code is for a GLSurfaceView class, which manages an OpenGL ES context and renders graphics on a surface. It creates a thread that runs the rendering loop, handling events such as window resizing, surface creation, and pause/resume states. The thread also notifies listeners when these events occur, allowing them to react accordingly.

2

3 import java.io.Writer;

4 import java.util.ArrayList;

5 import java.util.concurrent.Semaphore;

6

593 private boolean mRequestRender;

594 private Renderer mRenderer;

595 private ArrayList<Runnable> mEventQueue = new ArrayList<Runnable>();

596 private EglHelper mEglHelper;

597 private boolean mSizeChanged;

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

This Java class represents a node in a HyperSearch operation, which is used to search for files based on a given string. It maintains a cache of result nodes and provides methods to restore flat nodes, cache result nodes, remove nodes from the cache, insert tree nodes, and get the search matcher and search string.

25 //{{{ Imports

26 import java.io.File;

27 import java.util.ArrayList;

28 import java.util.Enumeration;

29 import java.util.HashMap;

100 public void cacheResultNodes(DefaultMutableTreeNode operNode)

101 {

102 resultNodes = new ArrayList<DefaultMutableTreeNode>(operNode.getChildCount());

103 for (Enumeration e = operNode.children(); e.hasMoreElements();)

104 resultNodes.add((DefaultMutableTreeNode) e.nextElement());

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

This Java class provides a utility for calculating the MD5 sum of input streams, files, and strings. It uses the MessageDigest API to compute the MD5 hash and converts the result to a hexadecimal string using a custom toHex method. The class offers three methods to calculate the MD5 sum: one for an InputStream, one for a File, and one for a String.

43 */

44 public static String sum(String string) throws Exception {

45 return sum(new ByteArrayInputStream(string.getBytes()));

46 }

47

48 /**

49 * Converts the given byte array to a hex string.

50 * @param raw The byte array to convert.

51 * @return The byte array represented as a string.

52 */

53 public static String toHex(byte[] raw) throws UnsupportedEncodingException {

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

This Java class, CharIndexedSegment, provides a way to search within Segment objects using regular expressions from the gnu.regexp package. It allows for searching in both forward and reverse directions, with methods to get the character at a specific index, check if an index is valid, reset the index, and move the index by a certain amount.

65

66 return ((m_index + index) < seg.count && m_index + index >= 0)

67 ? seg.array[seg.offset + m_index + index]

68 : CharIndexed.OUT_OF_BOUNDS;

69 } //}}}

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

This Java code defines a class BSHArrayInitializer that extends SimpleNode. It is used to initialize arrays with multiple initializers in BeanShell, a JavaScript-like scripting language for Java. The class evaluates an array initializer syntax and creates an array of the specified type with the given dimensions and initializers.

35 package bsh;

36

37 import java.lang.reflect.Array;

38

39 class BSHArrayInitializer extends SimpleNode

40 {

41 BSHArrayInitializer(int id) { super(id); }

42

43 public Object eval( CallStack callstack, Interpreter interpreter )

44 throws EvalError

45 {

46 throw new EvalError( "Array initializer has no base type.",

47 this, callstack );

48 }

AnnotatedMembersSearcher.java (https://bitbucket.org/nbargnesi/idea.git) Java · 136 lines

37 import org.jetbrains.plugins.groovy.lang.psi.stubs.index.GrAnnotatedMemberIndex;

38

39 import java.util.ArrayList;

40 import java.util.Collection;

41 import java.util.Collections;

61 }

62

63 final ArrayList<PsiModifierListOwner> result = new ArrayList<PsiModifierListOwner>();

64 for (PsiElement element : members) {

65 if (element instanceof GroovyFile) {

93 candidates = getAnnotatedMemberCandidates(annClass, ((GlobalSearchScope)scope));

94 } else {

95 candidates = new ArrayList<PsiModifierListOwner>();

96 for (PsiElement element : ((LocalSearchScope)scope).getScope()) {

97 if (element instanceof GroovyPsiElement) {

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

This Java code defines an AddActor class that extends NodeActor. It handles a context menu action to execute an SVN add operation on selected nodes in ProjectViewer, prompting for credentials and adding files to the repository. The action is performed by creating an instance of AddAction, passing relevant parameters, and executing its actionPerformed method.

58 public void actionPerformed( ActionEvent ae ) {

59 if ( nodes != null && nodes.size() > 0 ) {

60 List<String> paths = new ArrayList<String>();

61 for ( VPTNode node : nodes ) {

62 if ( node != null ) {

coldfusion.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 358 lines

119

120 <KEYWORDS>

121 <KEYWORD2>ArrayAppend</KEYWORD2>

122 <KEYWORD2>ArrayAvg</KEYWORD2>

123 <KEYWORD2>ArrayClear</KEYWORD2>

124 <KEYWORD2>ArrayDeleteAt</KEYWORD2>

125 <KEYWORD2>ArrayInsertAt</KEYWORD2>

126 <KEYWORD2>ArrayIsEmpty</KEYWORD2>

127 <KEYWORD2>ArrayLen</KEYWORD2>

128 <KEYWORD2>ArrayMax</KEYWORD2>

129 <KEYWORD2>ArrayMin</KEYWORD2>

130 <KEYWORD2>ArrayNew</KEYWORD2>

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

This Java code implements a Boyer-Moore string searching algorithm, which efficiently searches for a substring within a larger text. It uses a skip table to determine how many characters can be skipped when a mismatch occurs during the search process, allowing it to quickly move past irrelevant parts of the text and focus on more promising regions.

44 public BoyerMooreSearchMatcher(String pattern, boolean ignoreCase)

45 {

46 this.pattern = pattern.toCharArray();

47 if(ignoreCase)

48 {

71 * @param reverse If true, searching will be performed in a backward

72 * direction.

73 * @return an array where the first element is the start offset

74 * of the match, and the second element is the end offset of

75 * the match

105 {

106 //{{{

107 // lazily create skip and suffix arrays for either the

108 // search pattern, or the reversed search pattern

109 int[] skip, suffix;

QtScript.4.6.0.linux-gcc-ia32.txt (https://bitbucket.org/ultra_iter/qt-vtl.git) Plain Text · 2811 lines

60 __locale_struct (0xb64a53fc) 0

61

62 Class QByteArray::Data

63 size=20 align=4

64 base size=20 base align=4

65 QByteArray::Data (0xb64a5870) 0

66

67 Class QByteArray

68 size=4 align=4

69 base size=4 base align=4

70 QByteArray (0xb64a5834) 0

71

72 Class QByteRef

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

75 }

76

77 QByteArray data = file.readAll();

78

79 previewForm->setEncodedData(data);

97

98 QAction *action = qobject_cast<QAction *>(sender());

99 QByteArray codecName = action->data().toByteArray();

100

101 QTextStream out(&file);

117

118 foreach (QAction *action, saveAsActs) {

119 QByteArray codecName = action->data().toByteArray();

120 QTextCodec *codec = QTextCodec::codecForName(codecName);

121 action->setVisible(codec && codec->canEncode(currentText));

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

96 #include "qimagewriter.h"

97

98 #include <qbytearray.h>

99 #include <qfile.h>

100 #include <qfileinfo.h>

136

137 static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,

138 const QByteArray &format)

139 {

140 QByteArray form = format.toLower();

141 QByteArray suffix;

142 QImageIOHandler *handler = 0;

143

164 }

165

166 QByteArray testFormat = !form.isEmpty() ? form : suffix;

167

168 #ifndef QT_NO_LIBRARY

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

This Java code implements a dynamic array of positions, used to track changes in a text document. It manages a list of PosBottomHalf objects, which represent individual positions with an offset value. The class provides methods for inserting and removing positions, updating position offsets, and handling garbage collection. It also includes inner classes for PosTopHalf and PosBottomHalf.

27 import org.gjt.sp.jedit.syntax.*;

28 import org.gjt.sp.jedit.Buffer;

29 import org.gjt.sp.util.IntegerArray;

30 import org.gjt.sp.util.Log;

31 //}}}

246 {

247 bh = new PosBottomHalf(offset);

248 growPositionArray();

249 System.arraycopy(positions,i,positions,i+1,

258 {

259 bh = new PosBottomHalf(offset);

260 growPositionArray();

261 positions[positionCount++] = bh;

262 }

310 //{{{ contentInserted() method

311 public void contentInserted(int startLine, int offset,

312 int numLines, int length, IntegerArray endOffsets)

313 {

314 int endLine = startLine + numLines;

lextype.i (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 52 lines

15 of the type. '$basetype' doesn't currently do this -

16 it sometimes contains 'Giraffe' and sometimes (specifically

17 the case of arrays) contains 'Animal'. Since existing

18 code may rely on that behaviour, we create a new variable

19 '$lextype' which does what we need.

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

This Java code is part of a text editor’s painting mechanism, responsible for rendering various visual elements such as lines of text, caret positions, and other UI components. It uses graphics APIs to draw these elements on the screen, taking into account factors like font styles, colors, and layout. The code appears to be part of a larger class hierarchy, with multiple subclasses handling specific painting tasks.

613 //{{{ getExtensions() method

614 /**

615 * Returns an array of registered text area extensions. Useful for

616 * debugging purposes.

617 * @since jEdit 4.1pre5

board-ap325rxa.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 567 lines ✨ Summary

This C code is a board-specific initialization and configuration for an embedded system, likely a SoC (System-on-Chip) based device. It sets up various peripherals such as GPIO pins, I2C, SPI, and CEU interfaces, and configures the boot mode pin settings. The code also defines a machine vector that identifies the specific hardware configuration of the AP-325RXA board.

55 .name = "smsc911x",

56 .id = -1,

57 .num_resources = ARRAY_SIZE(smsc9118_resources),

58 .resource = smsc9118_resources,

59 .dev = {

95 .width = 2,

96 .parts = ap325rxa_nor_flash_partitions,

97 .nr_parts = ARRAY_SIZE(ap325rxa_nor_flash_partitions),

98 };

99

110 .name = "physmap-flash",

111 .resource = ap325rxa_nor_flash_resources,

112 .num_resources = ARRAY_SIZE(ap325rxa_nor_flash_resources),

113 .dev = {

114 .platform_data = &ap325rxa_nor_flash_data,

TestFailedState.java (https://bitbucket.org/nbargnesi/idea.git) Java · 118 lines

24 import org.jetbrains.annotations.Nullable;

25

26 import java.util.Arrays;

27 import java.util.List;

28

36 @Nullable final String stackTrace)

37 {

38 myPresentationText = ContainerUtilRt.newArrayList(buildErrorPresentationText(localizedMessage, stackTrace));

39 }

40

44 myPresentationText.add(msg);

45 if (printer != null) {

46 printError(printer, Arrays.asList(msg), false);

47 }

48 }

SerializedStubTree.java (https://bitbucket.org/nbargnesi/idea.git) Java · 98 lines

21

22 import com.intellij.util.CompressionUtil;

23 import com.intellij.util.io.UnsyncByteArrayInputStream;

24 import org.jetbrains.annotations.Nullable;

25

57 if (willIndexStub) return stubElement;

58 }

59 return SerializationManagerEx.getInstanceEx().deserialize(new UnsyncByteArrayInputStream(myBytes));

60 }

61

JSONDecoder.as (http://flowplayer-core.googlecode.com/svn/) ActionScript · 225 lines ✨ Summary

This ActionScript code defines a JSONDecoder class that parses JSON strings into native objects. It uses a tokenizer to read the input string and then attempts to parse an array, object, or value based on the token type. The decoder returns the parsed object, which can be accessed through its getValue() method.

90 * Attempt to parse an array

91 */

92 private function parseArray():Array {

93 // create an array internally that we're going to attempt

94 // to parse from the tokenizer

95 var a:Array = new Array();

96

97 // grab the next token from the tokenizer to move

99 nextToken();

100

101 // check to see if we have an empty array

102 if ( token.type == JSONTokenType.RIGHT_BRACKET ) {

103 // we're done reading the array, so return it

105 }

106

107 // deal with elements of the array, and use an "infinite"

108 // loop because we could have any amount of elements

109 while ( true ) {

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

This C code is part of a network programming library, specifically for managing associations between hosts and ports. It provides functions to sort these associations in ascending order, print them in a human-readable format, and perform other tasks such as decoding and encoding various types of data (e.g., integers, strings, IP addresses). The code appears to be designed for use in a network debugging or monitoring tool.

110 #define OC 12 /* integer, print in octal */

111 #define MD 13 /* mode */

112 #define AR 14 /* array of times */

113 #define FX 15 /* test flags */

114 #define EOV 255 /* end of table */

116

117 /*

118 * System variable values. The array can be indexed by

119 * the variable index to find the textual name.

120 */

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.

30 import java.awt.Font;

31 import java.awt.event.*;

32 import java.util.ArrayList;

33 import java.util.Collection;

34 import java.util.Collections;

65 this.view = view;

66 initialPosition = currentPosition;

67 positions = new ArrayList<NavPosition>(positions);

68 Collections.reverse((List) positions); // it's actually a Stack, so need to reverse it

69

74 positions = groupByFile(positions);

75 }

76 list = new JList(positions.toArray());

77 list.setCellRenderer(new CellRenderer());

78 list.setVisibleRowCount(jEdit.getIntegerProperty("navigator.listSize", 10));

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

26 class SK_API SkDashPathEffect : public SkPathEffect {

27 public:

28 /** The intervals array must contain an even number of entries (>=2), with the even

29 indices specifying the "on" intervals, and the odd indices specifying the "off"

30 intervals. phase is an offset into the intervals array (mod the sum of all of the

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

This Java code defines a ReferencePanel class that extends an abstract tool panel. It displays a list of references from a LaTeX document and allows users to insert cross-references into their text. The panel can be used in a LaTeX editor, and it provides functionality for inserting and managing references.

25 import java.awt.event.MouseEvent;

26

27 import java.util.ArrayList;

28

29 import javax.swing.JList;

49 public static final String REFERENCE_EXP = "\\\\label\\{(.*?)\\}";

50 private ActionListener insert;

51 private ArrayList refEntries = new ArrayList();

52 private JList refList;

53 private boolean suppress = false;

139

140 LabelParser parser = new LabelParser(view, buffer);

141 Object[] be = parser.getLabelArray();

142 refList.setListData(be);

143

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.

88

89 // populate url field from existing svn info, if available

90 List<String> info_path = new ArrayList<String>();

91 info_path.add(PVHelper.getProjectRoot(view));

92 SVNData info_data = new SVNData();

259 cd.setUsername(username.getText());

260 cd.setPassword(PasswordHandler.encryptPassword(new String(password.getPassword())));

261 List<String> paths = new ArrayList<String>();

262 paths.add(path.getText());

263 cd.setPaths(paths);

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

This Java class, SimpleAntBridge, is an implementation of an Ant build utility plugin for jEdit. It provides a bridge between Ant and jEdit, allowing users to execute Ant targets within the jEdit editor. The class logs events and errors to an output stream, and can be configured with a specific build file.

118

119 /**

120 * Returns an array of target names.

121 *

122 *@return The Targets value

131 Map targets = project.getTargets();

132

133 List targetNames = new ArrayList(targets.size());

134

135 for (Iterator i = targets.keySet().iterator(); i.hasNext(); )

140 Collections.sort(targetNames);

141 String[] arr = new String[targetNames.size()];

142 return (String[]) targetNames.toArray(arr);

143 }

144

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

This HTML code outputs a documentation page for a C++ library, specifically a container class. It provides detailed information on how to use and implement the class, including best practices and common pitfalls. The content is organized into sections, with links to related resources and references. The output appears to be a technical manual or reference guide for developers using the library.

314 elements). <tt class="docutils literal"><span class="pre">ptr_deque</span></tt> is the data structure of choice when most insertions

315 and deletions take place at the beginning or at the end of the sequence.

316 The special container <tt class="docutils literal"><span class="pre">ptr_array</span></tt> may be used when the size of the container is invariant

317 and known at compile time.</p>

318 <p>An associative container supports unique keys if it may contain at most

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

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

126 zone->memory = memory;

127

128 if ( FT_NEW_ARRAY( zone->org, maxPoints ) ||

129 FT_NEW_ARRAY( zone->cur, maxPoints ) ||

130 FT_NEW_ARRAY( zone->orus, maxPoints ) ||

131 FT_NEW_ARRAY( zone->tags, maxPoints ) ||

132 FT_NEW_ARRAY( zone->contours, maxContours ) )

133 {

134 tt_glyphzone_done( zone );

616

617 /* allocate function defs, instruction defs, cvt, and storage area */

618 if ( FT_NEW_ARRAY( size->function_defs, size->max_function_defs ) ||

619 FT_NEW_ARRAY( size->instruction_defs, size->max_instruction_defs ) ||

PlayState.as (http://flowplayer-core.googlecode.com/svn/) ActionScript · 319 lines ✨ Summary

This is a PlayReady media player implementation in ActionScript, specifically designed for playing video content on a web page. It manages the playback of clips within a playlist, handling events such as clip completion, midroll, and next/previous navigation. The code also includes error checking and state management to ensure smooth playback.

188 }

189

190 protected function dispatchBeforeEvent(eventType:ClipEventType, params:Array = null, beforeEventInfo:Object = null):Boolean {

191 log.debug("dispatchBeforeEvent() " + eventType.name + ", current clip " + playList.current);

192 Assert.notNull(eventType, "eventType must be non-null");

205 }

206

207 protected function onEvent(eventType:ClipEventType, params:Array = null):void {

208 log.debug("calling onEvent(" + eventType.name + ") on media controller ");

209 getMediaController().onEvent(eventType, params);

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

319 mode.jhtml.sidekick.parser=html

320 mode.jsp.sidekick.parser=html

321 mode.php.sidekick.parser=html

322 mode.shtml.sidekick.parser=html

323 mode.sgml.sidekick.parser=html

409

410 <para>

411 The constructor for <literal>SideKickCompletion</literal> accepts a list (or array) of possible values, these are the values that are displayed in the dropdown.

412 This is an abstract class, so you'll need to derive a specific implementation. You may want to override the 'insert(int)' method to

413 support language specifics, like "dot" completion.

ComplexSchemaValidation19.xsd (https://bitbucket.org/nbargnesi/idea.git) XML Schema · 14453 lines

633 <xs:attribute name="columnWidths" type="xs:string">

634 <xs:annotation>

635 <xs:documentation>Type:Number[] - An array containing the widths of the columns.</xs:documentation>

636 </xs:annotation>

637 </xs:attribute>

638 <xs:attribute name="columnOrders" type="xs:string">

639 <xs:annotation>

640 <xs:documentation>Type:Number[] - An array containing the orders of the columns. A value of

641 [2, 0, 1] means that the third column should be displayed left most

642 and the second column right most.

646 <xs:attribute name="columnAligns" type="xs:string">

647 <xs:annotation>

648 <xs:documentation>Type:String[] - An array containing the text aligns for the columns.</xs:documentation>

649 </xs:annotation>

650 </xs:attribute>

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

53 GC3Dsizei getHeight() const;

54

55 // This should always be called before drawArray, drawElements, clear,

56 // readPixels, copyTexImage2D, copyTexSubImage2D if this framebuffer is

57 // currently bound.

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

This is a Java class that represents a node in an Abstract Syntax Tree (AST) for EcmaScript programming language. It provides methods to manipulate and analyze the tree, such as dumping its contents, transferring special tokens, and handling comments. The class also overrides standard Java methods like toString and dump to customize its output.

86 else if ( i >= children.length ) {

87 Node c[] = new Node[ i + 1 ];

88 System.arraycopy( children, 0, c, 0, children.length );

89 children = c;

90 }

109 public List getChildren() {

110 if (children != null)

111 return Arrays.asList( children );

112 else

113 return null;

193 Node c[] = new Node[ children.length + 1 ];

194 if ( i > 0 ) {

195 System.arraycopy( children, 0, c, 0, i );

196 }

197 c[ i ] = n;

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

234 object() <EOF>

235 |

236 array() <EOF>

237 )

238 {

394 // will be converted to strings, padded as appropriate, and added to the

395 // line buffer b. This is the "accumulator".

396 static ArrayList a = new ArrayList();

397

398 // where to write the completely beautified code.

565 // string literals. All extra spaces are removed from the output

566 // string, except that string literals are left as is.

567 ArrayList list = new ArrayList();

568 String s = new String("");

569 for (int i = 0; i < a.size(); i++) {

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

25 */

26

27 #ifndef JavaArrayJSC_h

28 #define JavaArrayJSC_h

38 namespace Bindings {

39

40 class JavaArray : public Array {

41 public:

42 JavaArray(jobject array, const char* type, PassRefPtr<RootObject>);

43 virtual ~JavaArray();

44

45 RootObject* rootObject() const;

49 virtual unsigned int getLength() const;

50

51 jobject javaArray() const { return m_array->m_instance; }

52

53 static JSValue convertJObjectToArray(ExecState*, jobject, const char* type, PassRefPtr<RootObject>);

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

This Java class implements a dynamic extension for extended reflection features, supporting JDK1.2 and greater. It provides a setAccessible method to make specific objects (fields, methods, constructors) accessible, allowing for more control over reflection operations. The implementation uses the AccessibleObject interface from the Java Reflection API.

48 {

49 /**

50 Set a java.lang.reflect Field, Method, Constructor, or Array of

51 accessible objects to accessible mode.

52 If the object is not an AccessibleObject then do nothing.

53 @return true if the object was accessible or false if it was not.

54 */

55 // Arrays incomplete... need to use the array setter

56 public boolean setAccessible( Object obj )

57 {

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

576

577 /*

578 this originally handled postfix array dimensions...

579

580 void VariableDeclaratorId() #VariableDeclaratorId :

589 {}

590 {

591 ArrayInitializer()

592 |

593 Expression()

594 }

595

596 void ArrayInitializer() #ArrayInitializer :

597 {}

598 {

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

68

69 private:

70 QByteArray m_format;

71 OwnPtr<QBuffer> m_buffer;

72 OwnPtr<QImageReader> m_reader;

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

This Java code is a compiler for Java programs. It takes a set of .java files, compiles them into bytecode, and then runs the resulting classes using Sun’s javac tool. The compiled output is displayed in a GUI window, allowing users to view the compilation process and any errors that occur.

228 PrintStream origOut = System.out;

229 PrintStream origErr = System.err;

230 ByteArrayOutputStream bytes = null;

231

232 /*

362 System.out.println( "JCompiler: compiling with arguments: " + getArgumentsAsString( arguments ) );

363

364 bytes = new ByteArrayOutputStream();

365 PrintStream ps = new PrintStream( bytes );

366

410

411

412 JCompilerPlugin.setCompilerOutput( view, titleStr , new String(bytes.toByteArray()) );

413 }

414

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

76 void tst_QHttpNetworkReply::parseHeader_data()

77 {

78 QTest::addColumn<QByteArray>("headers");

79 QTest::addColumn<QStringList>("fields");

80 QTest::addColumn<QStringList>("values");

81

82 QTest::newRow("empty-field") << QByteArray("Set-Cookie: \r\n")

83 << (QStringList() << "Set-Cookie")

84 << (QStringList() << "");

85 QTest::newRow("single-field") << QByteArray("Content-Type: text/html; charset=utf-8\r\n")

86 << (QStringList() << "Content-Type")

87 << (QStringList() << "text/html; charset=utf-8");

index.html (https://swig.svn.sourceforge.net/svnroot/swig) HTML · 95 lines ✨ Summary

This HTML code outputs a documentation page for SWIG, explaining how to wrap C global variables into Ruby variables. It covers topics such as variable linking, differences between C and Ruby variables, and directives like %immutable and %mutable. The page provides examples and explanations of how to use these features to manage global variables in a SWIG interface.

59 value is destroyed using <tt>free()</tt>.

60 <li><tt>signed char</tt> and <tt>unsigned char</tt> are handled as small 8-bit integers.

61 <li>String array variables such as '<tt>char name[256]</tt>' are managed as Ruby strings, but

62 when setting the value, the result is truncated to the maximum length of the array. Furthermore, the string is assumed to be null-terminated.

CachedRefs.java (https://bitbucket.org/nbargnesi/idea.git) Java · 154 lines

67

68 /*public List<Pair<SymbolicRefs.Kind, String>> getRefsForCommit(final GitCommit gitCommit) {

69 final List<Pair<SymbolicRefs.Kind, String>> result = new ArrayList<Pair<SymbolicRefs.Kind, String>>();

70 Collection<Pair<SymbolicRefs.Kind, String>> pairs = myRefsMap.get(gitCommit.getHash().getValue());

71 if (pairs != null) {

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

43 import javax.swing.*;

44 import java.awt.*;

45 import java.util.ArrayList;

46 import java.util.Arrays;

55 */

56 public class VcsChangeDetailsManager {

57 private final List<VcsChangeDetailsProvider> myProviders = new ArrayList<VcsChangeDetailsProvider>();

58 private final List<VcsChangeDetailsProvider> myDedicatedList;

59 private final Project myProject;

63 myProject = project;

64 myQueue = new BackgroundTaskQueue(myProject, "Loading change details");

65 myDedicatedList = new ArrayList<VcsChangeDetailsProvider>();

66

67 myDedicatedList.add(new BinaryDetailsProviderNew(project));

69

70 VcsChangeDetailsProvider[] extensions = Extensions.getExtensions(VcsChangeDetailsProvider.EP_NAME, myProject);

71 myProviders.addAll(Arrays.asList(extensions));

72

73 Disposer.register(project, new Disposable() {

Display_Actions.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 77 lines

28

29 actionSets = jEdit.getActionSets();

30 Arrays.sort(actionSets,new MiscUtilities.StringICaseCompare());

31

32 for(i = 0; i < actionSets.length; i++)

38

39 actions = actionSet.getActionNames();

40 Arrays.sort(actions,new MiscUtilities.StringICaseCompare());

41

42 for(j = 0; j < actions.length; j++)

ReplaceForEachLoopWithIndexedForLoopIntention.java (https://bitbucket.org/nbargnesi/idea.git) Java · 272 lines

52 return;

53 }

54 final boolean isArray = iteratedValueType instanceof PsiArrayType;

55 final PsiElement grandParent = statement.getParent();

56 final PsiStatement context;

63 @NonNls final StringBuilder newStatement = new StringBuilder();

64 final String indexText = createVariableName("i", PsiType.INT, statement);

65 createForLoopDeclaration(statement, iteratedValue, isArray, iteratedValueText, newStatement, indexText);

66 final Project project = statement.getProject();

67 final CodeStyleSettings codeStyleSettings =

162 else if (expression instanceof PsiArrayAccessExpression) {

163 final PsiArrayAccessExpression arrayAccessExpression =

164 (PsiArrayAccessExpression)expression;

165 final PsiExpression arrayExpression =

166 arrayAccessExpression.getArrayExpression();

167 return StringUtil.unpluralize(getVariableName(arrayExpression));

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

1 <?php

2

3 /**

16 * @since BuddyPress (1.6)

17 *

18 * @return array Filtered option names and values

19 */

20 function bp_get_default_options() {

21

22 // Default options

23 $options = array (

24

25 /** Components ********************************************************/

26

27 'bp-deactivated-components' => array(),

28

29 /** bbPress ***********************************************************/

GTMServiceManagement.c (http://update-engine.googlecode.com/svn/trunk/) C · 777 lines ✨ Summary

This C code provides a set of functions for interacting with the launchd system on macOS, which manages background processes and services. The functions allow users to create, copy, and retrieve dictionaries representing launchd jobs, as well as access launchd exports. It also handles errors and provides debugging information. The code appears to be part of a larger framework or library for working with launchd.

29 // In general if you create one, you are responsible for releasing it.

30 // However, if you add it to a collection (LAUNCH_DATA_DICTIONARY,

31 // LAUNCH_DATA_ARRAY), you no longer own it, and are no longer

32 // responsible for releasing it (you may be responsible for the array

202 } else if (cf_type == CFArrayGetTypeID()) {

203 CFIndex count = CFArrayGetCount(cf_type_ref);

204 result = launch_data_alloc(LAUNCH_DATA_ARRAY);

205 for (CFIndex i = 0; i < count; i++) {

206 CFTypeRef array_value = CFArrayGetValueAtIndex(cf_type_ref, i);

207 if (array_value) {

357 &local_error);

358 if (cf_sub_type) {

359 CFArrayAppendValue((CFMutableArrayRef)cf_type_ref, cf_sub_type);

360 CFRelease(cf_sub_type);

361 }

GppFunctionalTest.groovy (https://bitbucket.org/nbargnesi/idea.git) Groovy · 616 lines

41

42 public void testCastListToIterable() throws Exception {

43 myFixture.addClass("class X extends java.util.ArrayList<Integer> {}")

44 testAssignability """

45 X ints = [239, 4.2d]

326

327 def implementations = new GotoImplementationHandler().getSourceAndTargetElements(myFixture.editor, myFixture.file).targets

328 assertEquals Arrays.toString(implementations), 3, implementations.size()

329 }

330

340 }

341

342 public void testResolveToStdLibWithArrayQualifier() throws Exception {

343 configureGppScript """

344 Integer[] a = []

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

77 {

78 QObject *receiver;

79 QByteArray name;

80 };

81 typedef QHash<QString, Handler> HandlerHash;

SvnChangeProvider.java (https://bitbucket.org/nbargnesi/idea.git) Java · 332 lines

307 List<String> segments = StringUtil.split(file.getPath(), File.separator);

308 List<String> copyFromPathSegments = StringUtil.split(copyFromPath, "/");

309 List<String> resultSegments = new ArrayList<String>();

310 final int keepSegments = segments.size() - pathSegmentCount + ancestorSegmentCount;

311 for(int i=0; i< keepSegments; i++) {

328

329 public void doCleanup(final List<VirtualFile> files) {

330 new CleanupWorker(VfsUtil.toVirtualFileArray(files), myVcs.getProject(), "action.Subversion.cleanup.progress.title").execute();

331 }

332 }

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

This Java class, RFCPageFoldHandler, extends a fold handler for JEdit text editor. It determines the folding level of lines in an RFC (Request for Comments) document based on specific formatting rules, such as page breaks denoted by [PAGE]. The class provides methods to calculate the folding level and check if a segment is a page break.

70 return false;

71

72 char[] chars = seg.array;

73 if (chars[offset + count - 1] != ']')

74 return false;

n39.ps (https://bitbucket.org/embedded_software_group/rvtool.git) Unknown · 522 lines

12 /setupLatin1 {

13 mark

14 /EncodingVector 256 array def

15 EncodingVector 0

16

yab.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 319 lines

240

241 <!-- Built-in Functions -->

242 <!-- Array Handling -->

243 <KEYWORD2>arraydimension</KEYWORD2>

244 <KEYWORD2>arraydim</KEYWORD2>

245 <KEYWORD2>arraysize</KEYWORD2>

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

31 <string name="keyboard_layout_change_keys_size_summary">Val av tangentstorlek för byte av layout</string>

32 <string name="keyboard_layout_change_keys_size_dialog_title">Välj storlek</string>

33 <string-array name="keyboard_layout_change_methods">

34 <item>Ingen</item>

35 <item>Liten</item>

36 <item>Stor</item>

37 </string-array>

38

39 <string name="physical_keyboard_change_notification_title">Layout indikation</string>

40 <string name="physical_keyboard_change_notification_summary">Val av typ av indikation för aktiv layout</string>

41 <string name="physical_keyboard_change_notification_dialog_title">Välj indikationstyp</string>

42 <string-array name="physical_keyboard_change_notification_types">

43 <item>Visa alltid ikon för layout</item>

44 <item>När hĺrdvarutangentbordet ändras</item>

gnome-mime-text-x-credits.svg (git://github.com/tuquito/tuquito-artwork-gnome.git) SVG · 129 lines ✨ Summary

This SVG code generates a simple graphical representation of a house with various shapes and lines, likely used for illustration or design purposes. The house is composed of multiple paths, each defined by a series of coordinates that outline its shape. The use of gradients and colors adds visual interest to the design. The overall effect is a stylized and simplified representation of a house.

108 d="M 2.4999615,0.4999664 C 5.0206371,0.4999664 7.4205035,0.4999664 9.9411815,0.4999664 C 10.383361,0.6617599 12.879694,2.6328115 13.500013,3.9090875 C 13.500013,7.8153335 13.500039,11.593785 13.500039,15.500034 C 9.8333455,15.500034 6.1666541,15.500034 2.4999615,15.500034 C 2.4999615,10.500011 2.4999615,5.4999875 2.4999615,0.4999664 z"

109 id="path4160"

110 style="fill:url(#linearGradient2517);fill-opacity:1;stroke:url(#linearGradient2519);stroke-width:0.99992162;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline" />

111 <path

112 d="M 12.5,4.2150736 C 12.5,7.6004717 12.5,11.114602 12.5,14.500001 C 9.500001,14.500001 6.500001,14.500001 3.5000001,14.500001 C 3.5000001,10.166664 3.5000001,5.8333326 3.5000001,1.5 C 5.562357,1.5 7.6738997,1.5 9.7362577,1.5"

113 id="path2435"

114 style="opacity:0.6;fill:none;fill-opacity:1;stroke:url(#linearGradient2511);stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline" />

115 <path

116 d="M 9.2941205,0.8409023 C 10.142028,3.6448055 9,5.0341186 9,5.0341186 C 9,5.0341186 10.892807,3.7827125 13.171354,4.9318145 C 15.11421,5.9116229 13.207429,3.9237905 13.129895,3.8027685 C 12.586944,2.9552643 10.707454,1.1696619 10.025256,0.8725867 C 9.9696235,0.8483603 9.5814385,0.8409023 9.2941205,0.8409023 z"

Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.xml (https://hg01.codeplex.com/mvvmlight) XML · 3430 lines

266 </param>

267 <param name="parameters">

268 An array of parameters to use when formatting <paramref name="message"/>.

269 </param>

270 <exception cref="T:Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException">

307 </param>

308 <param name="parameters">

309 An array of parameters to use when formatting <paramref name="message"/>.

310 </param>

311 <exception cref="T:Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException">

348 </param>

349 <param name="parameters">

350 An array of parameters to use when formatting <paramref name="message"/>.

351 </param>

352 <exception cref="T:Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException">

allegrocl.swg (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 606 lines

138 SWIG_TYPECHECK_CHAR 130

139 SWIG_TYPECHECK_STRING 140

140 SWIG_TYPECHECK_BOOL_ARRAY 1015

141 SWIG_TYPECHECK_INT8_ARRAY 1025

142 SWIG_TYPECHECK_INT16_ARRAY 1035

143 SWIG_TYPECHECK_INT32_ARRAY 1045

144 SWIG_TYPECHECK_INT64_ARRAY 1055

145 SWIG_TYPECHECK_INT128_ARRAY 1065

146 SWIG_TYPECHECK_FLOAT_ARRAY 1080

147 SWIG_TYPECHECK_DOUBLE_ARRAY 1090

148 SWIG_TYPECHECK_CHAR_ARRAY 1130

149 SWIG_TYPECHECK_STRING_ARRAY 1140

KmlDataServlet.java (http://sigma-h.googlecode.com/svn/trunk/) Java · 262 lines ✨ Summary

This Java code serves a KML (Google Earth) file containing locations of activities visible to a user, authenticated using Basic HTTP authentication. It retrieves site data from the database based on the user’s permissions and generates a KML document with activity information, including location names, descriptions, and indicator values.

37 import java.io.PrintWriter;

38 import java.nio.charset.Charset;

39 import java.util.ArrayList;

40 import java.util.List;

41

229 private List<SiteData> querySites(User user, SchemaDTO schema) {

230

231 List<SiteOrder> order = new ArrayList<SiteOrder>();

232 order.add(SiteOrder.ascendingOn(SiteTableColumn.database_name.property()));

233 order.add(SiteOrder.ascendingOn(SiteTableColumn.activity_name.property()));

category.php (https://bitbucket.org/kraymitchell/fcd.git) PHP · 177 lines

32 * Constructor.

33 *

34 * @param array $config An optional associative array of configuration settings.

35 *

36 * @since 1.6

51 * Method to check if you can add a new record.

52 *

53 * @param array $data An array of input data.

54 *

55 * @return boolean

66 * Method to check if you can edit a record.

67 *

68 * @param array $data An array of input data.

69 * @param string $key The name of the key for the primary key.

70 *

filefn.cpp (git://github.com/xbmc/xbmc.git) C++ · 439 lines ✨ Summary

This C++ code provides functions for interacting with files and directories on various operating systems. It includes file name conversion, CRC calculation, renaming, deleting, and directory deletion. The code is designed to be platform-independent, using Windows-specific APIs where necessary, but also providing fallbacks for other operating systems.

386 SaveFilePos SavePos(*SrcFile);

387 const int BufSize=0x10000;

388 Array<byte> Data(BufSize);

389 Int64 BlockCount=0;

390 uint DataCRC=0xffffffff;

Scripting.html (https://swig.svn.sourceforge.net/svnroot/swig) HTML · 475 lines ✨ Summary

This HTML code outputs a documentation page for building scripting language extensions using SWIG. It provides instructions on how to create shared libraries, link with existing libraries, and statically link the interpreter. The page explains the process in detail, including platform-specific commands and linker flags, to help users build their own scripting language extensions.

67 languages can be used for rapid prototyping, interactive debugging,

68 scripting, and access to high-level data structures such associative

69 arrays. </p>

70

71 <H2><a name="Scripting_nn3"></a>4.2 How does a scripting language talk to C?</H2>

RadioButton.as (http://flash-ui-framework.googlecode.com/svn/trunk/) ActionScript · 513 lines ✨ Summary

This is a custom UI component written in ActionScript, specifically designed for a label button. It displays a circular shape with a tick mark and can be customized with various properties such as position, size, color, and visibility. The component also includes methods for layout, sizing, and positioning of child elements, making it a versatile tool for creating custom UI elements in a graphical user interface.

226 /**

227 * ?????????????????????????:[mc1,mc2,mc3,mc4],["mc1","mc2","mc3","mc4"]?0-4???????????????4?????????????4????????:[]

228 * @param value:Array

229 *

230 */

231 override public function set displayStates(value:Array):void{

232 if(this.displayStates==value) return;

233

240 * ??????,??????????????(?:["Skin1","Skin2"]),????????????????,??0?????????,

241 * ?skin???[]?null????

242 * @param value:Array

243 *

244 */

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

This C++ header file defines a class nsDownloadScanner that scans downloads for viruses and malware. It includes Windows-specific APIs, such as GUID definitions and COM interfaces, to interact with antivirus software. The class provides methods to initialize and scan downloads, check policy settings, and notify a watchdog thread when a timeout occurs.

22 #include "nsAutoPtr.h"

23 #include "nsThreadUtils.h"

24 #include "nsTArray.h"

25 #include "nsIObserver.h"

26 #include "nsIURI.h"

59 private:

60 bool mAESExists;

61 nsTArray<CLSID> mScanCLSID;

62 bool IsAESAvailable();

63 bool EnumerateOAVProviders();

Junit3FlowTest.java (http://mycila.googlecode.com/svn/) Java · 133 lines ✨ Summary

This Java code defines a test class Junit3FlowTest that extends MycilaJunit3Test. It uses Mycila plugins to manage test execution, including setup, teardown, and assertion verification. The test class includes methods for testing different scenarios, such as skipped tests, thrown exceptions, and expected failures.

28 import static com.mycila.testing.ea.ExtendedAssert.*;

29

30 import java.util.ArrayList;

31 import static java.util.Arrays.*;

42 }

43

44 List<String> flow = new ArrayList<String>();

45

46 @Override

GUITestRunner.java (http://fest.googlecode.com/svn/) Java · 162 lines ✨ Summary

This Java class, GUITestRunner, extends JUnit’s default test runner to capture screenshots of GUI tests that fail. It creates a custom test runner for GUI tests, validates methods, and runs tests while notifying listeners of failures. The runner uses reflection to access test classes and methods, and it provides a way to take screenshots of failing tests.

18 import java.lang.reflect.InvocationTargetException;

19 import java.lang.reflect.Method;

20 import java.util.ArrayList;

21 import java.util.List;

22

45 public class GUITestRunner extends Runner {

46

47 private static final List<RunListener> NO_LISTENERS = new ArrayList<RunListener>();

48

49 private final List<Method> testMethods;

prettyprint.factor (git://github.com/x6j8x/factor.git) Unknown · 151 lines

1 ! Copyright (C) 2003, 2010 Slava Pestov.

2 ! See http://factorcode.org/license.txt for BSD license.

3 USING: arrays accessors assocs classes colors combinators

4 continuations grouping io io.streams.string io.styles kernel

5 make math math.parser namespaces parser prettyprint.backend

123

124 : callstack. ( callstack -- )

125 callstack>array 3 <groups>

126 { { table-gap { 5 5 } } } [ [ callframe. ] each ] tabular-output nl ;

127

147

148 : object-table. ( obj alist -- )

149 [ [ nip first ] [ second call( obj -- str ) ] 2bi 2array ] with map

150 simple-table. ;

151

epiphany-icon.svg (git://github.com/tuquito/tuquito-artwork-gnome.git) SVG · 224 lines ✨ Summary

This SVG code represents a stylized map of the world, with various shapes and paths forming continents, oceans, and other geographical features. The map is rendered in a simplified style, with no labels or details. It appears to be a decorative element, possibly used as a background image or icon. Its purpose is unclear without additional context.

197 sodipodi:cx="62.625"

198 id="path2774"

199 style="opacity:0.56043958000000005;fill:url(#radialGradient3868);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999987999999995;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"

200 sodipodi:type="arc" />

201 <path

202 style="fill:url(#radialGradient6407);fill-opacity:1;stroke:#204a87;stroke-width:0.99994898000000021;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"

203 d="M 12.457962,1.499974 C 6.9388938,1.499974 2.4657908,5.973075 2.4657908,11.492145 C 2.4657908,17.011214 6.9388938,21.500027 12.457962,21.500026 C 17.97703,21.500026 22.46585,17.011214 22.46584,11.492145 C 22.46584,5.973075 17.97703,1.499974 12.457962,1.499974 z"

204 id="path2555" />

208 d="M 9.0535187,13.689733 L 8.7731331,13.134605 L 8.2478683,13.015803 L 7.9677239,12.263058 L 7.2674355,12.342114 L 6.6722669,11.906461 L 6.0415926,12.461156 L 6.0415926,12.548643 C 5.850815,12.493578 5.6162937,12.486063 5.4464245,12.381618 L 5.3062315,11.985469 L 5.3062315,11.549335 L 4.8860876,11.588838 C 4.9211597,11.31125 4.9559427,11.034143 4.991256,10.756603 L 4.7458947,10.756603 L 4.5010153,11.073696 L 4.255654,11.192256 L 3.9053651,10.994639 L 3.8702929,10.558505 L 3.9403892,10.082866 L 4.4658949,9.6867169 L 4.8860394,9.6867169 L 4.9558945,9.4486807 L 5.4811593,9.5672408 L 5.8664722,10.043361 L 5.9365685,9.2501483 L 6.6020263,8.6954532 L 6.8471467,8.1007726 L 7.3373869,7.902722 L 7.6175313,7.5065731 L 8.2477239,7.3870971 L 8.5631817,6.91194 C 8.2479651,6.91194 7.9327479,6.91194 7.6175313,6.91194 L 8.2128923,6.6343519 L 8.6327962,6.6343519 L 9.2283979,6.4358195 L 9.2984941,6.1986987 L 9.0882053,6.0001669 L 8.843085,5.9206769 L 8.9131812,5.6830743 L 8.7381571,5.3264775 L 8.3177721,5.484542 L 8.3878683,5.1676906 L 7.8976276,4.8901019 L 7.5125559,5.5635502 L 7.5473869,5.8015864 L 7.1623152,5.9606144 L 6.9169537,6.4757575 L 6.8120258,6.0001187 L 6.1465685,5.7225301 L 6.0414001,5.3659337 L 6.9169537,4.8503088 L 7.3022666,4.4937119 L 7.3373387,4.0578184 L 7.1272911,3.9387764 L 6.8471467,3.8990314 L 6.6721226,4.3351657 C 6.6721226,4.3351657 6.3792596,4.3925434 6.3039603,4.411139 C 5.3423158,5.2972828 3.3992745,7.2101963 2.9478638,10.821496 C 2.9657372,10.905225 3.2750764,11.39074 3.2750764,11.39074 L 4.0104373,11.826393 L 4.7457984,12.024925 L 5.061256,12.421508 L 5.5512556,12.778104 L 5.8314,12.7386 L 6.0414482,12.833169 L 6.0414482,12.897146 L 5.7614963,13.650133 L 5.5512075,13.967225 L 5.6213037,14.126253 L 5.4462796,14.719971 L 6.0767134,15.86978 L 6.7069055,16.424909 L 6.9872911,16.821058 L 6.9520259,17.653775 L 7.1623152,18.128932 L 6.9520259,19.040706 C 6.9520259,19.040706 6.9355495,19.035069 6.9623838,19.126314 C 6.9894587,19.217607 8.0844549,19.82544 8.1540694,19.7737 C 8.2234433,19.720995 8.282748,19.674891 8.282748,19.674891 L 8.2128923,19.477274 L 8.4928443,19.199686 L 8.5980127,18.922097 L 9.0534224,18.763069 L 9.4034701,17.890848 L 9.2985428,17.653727 L 9.5431808,17.29713 L 10.068687,17.177655 L 10.349072,16.54347 L 10.278976,15.75122 L 10.69912,15.156539 L 10.769216,14.561858 C 10.194282,14.276754 9.6240687,13.983172 9.0534224,13.689637M 13.625351,2.4984438 L 12.603128,2.0979608 L 11.424593,2.2312929 L 9.9699293,2.6315055 L 9.6948279,2.8986564 L 10.598802,3.5211973 L 10.598802,3.877074 L 10.245031,4.2329507 L 10.71705,5.1677885 L 11.030703,4.9893094 L 11.424593,4.3667691 C 12.031784,4.1790447 12.576202,3.9662864 13.153331,3.6993519 L 13.625351,2.4983897M 21.830149,10.036416 C 21.830149,10.166825 21.830149,10.036416 21.830149,10.036416 L 21.559649,10.342805 C 21.393843,10.147415 21.207685,9.9831006 21.018647,9.8114887 L 20.603687,9.8725485 L 20.224569,9.4439906 L 20.224569,9.9743637 L 20.549378,10.22014 L 20.765571,10.464974 L 21.054489,10.138231 C 21.127214,10.274449 21.198948,10.410666 21.271177,10.546883 L 21.271177,10.955088 L 20.945871,11.322536 L 20.350561,11.731188 L 19.899709,12.181092 L 19.610791,11.853356 L 19.75525,11.485908 L 19.466779,11.159165 L 18.97959,10.117829 L 18.56463,9.6485646 L 18.456012,9.7707332 L 18.618889,10.363159 L 18.925281,10.710254 C 19.10027,11.215409 19.273373,11.698226 19.503167,12.181092 C 19.859499,12.181092 20.195429,12.143265 20.549328,12.098686 L 20.549328,12.384723 L 20.116398,13.446661 L 19.719359,13.895572 L 19.394549,14.590755 C 19.394549,14.971806 19.394549,15.352857 19.394549,15.733858 L 19.503167,16.183762 L 19.322817,16.387393 L 18.925281,16.632673 L 18.510321,16.979768 L 18.853548,17.36762 L 18.384279,17.776768 L 18.47443,18.041458 L 17.770502,18.838458 L 17.30173,18.838458 L 16.904691,19.083738 L 16.651615,19.083738 L 16.651615,18.756996 L 16.54399,18.102518 C 16.404346,17.692377 16.258944,17.285165 16.111059,16.877953 C 16.111059,16.577372 16.12898,16.27972 16.14695,15.979188 L 16.327798,15.570983 L 16.074721,15.080373 L 16.093139,14.406535 L 15.749912,14.018683 L 15.921525,13.457284 L 15.642287,13.14047 L 15.154601,13.14047 L 14.992221,12.956746 L 14.505032,13.263383 L 14.306761,13.038207 L 13.855413,13.426258 C 13.549021,13.078914 13.242132,12.731818 12.935293,12.384723 L 12.574592,11.526664 L 12.899402,11.037047 L 12.719051,10.832969 L 13.115594,9.8929511 C 13.441396,9.4876756 13.781694,9.0988805 14.125913,8.7086462 L 14.739641,8.5452749 L 15.425152,8.4638126 L 15.894421,8.5864776 L 16.561961,9.2598193 L 16.796619,8.9946328 L 17.120932,8.9539265 L 17.73466,9.1580041 L 18.203929,9.1580041 L 18.528739,8.8719678 L 18.673198,8.6678902 L 18.347891,8.4638126 L 17.806393,8.4231063 C 17.656126,8.2146605 17.516483,7.9955411 17.338068,7.8103279 L 17.157221,7.8917897 L 17.084991,8.4231063 L 16.760182,8.0556574 L 16.688449,7.6465095 L 16.327748,7.3614664 L 16.182793,7.3614664 L 16.54394,7.7696708 L 16.399481,8.1371197 L 16.11101,8.2185821 L 16.29136,7.8511332 L 15.966054,7.6882582 L 15.678079,7.3615161 L 15.136085,7.4836843 L 15.064352,7.6465592 L 14.739542,7.8511332 L 14.559192,8.3005408 L 14.10834,8.5249712 L 13.909573,8.3005408 L 13.69338,8.3005408 L 13.69338,7.5651466 L 14.162649,7.3198664 L 14.52335,7.3198664 L 14.450624,7.0343269 L 14.162649,6.7482906 L 14.649392,6.6459785 L 14.919893,6.3400857 L 15.136085,5.9721404 L 15.53362,5.9721404 L 15.425003,5.686601 L 15.678079,5.5232297 L 15.678079,5.8499718 L 16.219081,5.9721404 L 16.760083,5.5232297 L 16.796421,5.3186558 L 17.265193,4.9921613 C 17.095516,5.0132593 16.925838,5.0287471 16.760033,5.0738719 L 16.760033,4.7059764 L 16.940383,4.2975232 L 16.760033,4.2975232 L 16.363689,4.6649721 L 16.255072,4.8692979 L 16.363689,5.1555824 L 16.182842,5.6451994 L 15.894371,5.4818281 L 15.642287,5.1962887 L 15.244752,5.4818281 L 15.100293,4.8285916 L 15.785803,4.3794322 L 15.785803,4.1341517 L 16.21918,3.8483638 L 16.904691,3.6847443 L 17.373959,3.8483638 L 18.239771,4.0117351 L 18.023578,4.2565688 L 17.55431,4.2565688 L 18.023578,4.7466827 L 18.384279,4.3384777 L 18.49384,4.1588733 C 18.49384,4.1588733 19.87742,5.3989265 20.668123,6.7553892 C 21.458825,8.1122992 21.830149,9.7116097 21.830149,10.036416 z" />

209 <path

210 style="opacity:0.40000000000000002;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient5158);stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"

211 d="M 21.473026,11.49968 C 21.473026,16.474499 17.440065,20.507415 12.465928,20.507415 C 7.4913391,20.507415 3.4586051,16.474454 3.4586051,11.49968 C 3.4586051,6.5250919 7.4913391,2.4925846 12.465928,2.4925846 C 17.440065,2.4925846 21.473026,6.5250919 21.473026,11.49968 L 21.473026,11.49968 z"

212 id="path8655" />

WinZipAesExtra.cs (https://bitbucket.org/jens13/cleanzip.git) C# · 46 lines

2 // Distributed under the New BSD License.

3 // (See accompanying file notice.txt or at

4 // http://www.opensource.org/licenses/bsd-license.php)

5 // Source: https://bitbucket.org/jens13/cleanzip

6

37 public WinZipAesKeyStrength KeyStrength { get { return (WinZipAesKeyStrength)_buffer[8]; } set { _buffer[8] = (byte)value; } }

38

39 public byte[] ToArray()

40 {

41 var buffer = new byte[11];

YouTubeSampleWindowController.m (http://update-engine.googlecode.com/svn/trunk/) Objective C · 908 lines ✨ Summary

This Objective C code is a part of a YouTube API client application. It handles various tasks such as fetching categories, entries, and uploading videos to YouTube. The code uses the Google Data Services framework to interact with the YouTube API. It also manages data feeds, tickets, and errors, providing a structured way to handle the API’s responses and errors.

122 // load the user feed types into the pop-up menu, and default to showing

123 // the feed of the user's uploads, as it's generally most interesting

124 NSArray *userFeedTypes = [NSArray arrayWithObjects:

125 kChannelsFeed,

126 kMostPopularFeed,

406 [openPanel setPrompt:@"Choose"];

407

408 NSArray *movieTypes = [NSArray arrayWithObjects:@"mov", @"mp4", nil];

409

410 [openPanel setAllowedFileTypes:movieTypes];

482 - (GDataEntryBase *)selectedEntry {

483

484 NSArray *entries = [mEntriesFeed entries];

485 int rowIndex = [mEntriesTable selectedRow];

486 if ([entries count] > 0 && rowIndex > -1) {

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

This C header file defines a platform-specific interface for SuperH SCI(F) serial ports, used by certain Linux platforms such as sh/sh64/h8300. It provides a common structure and constants for managing SCI(F) ports, including memory mapping, interrupt handling, and clock configuration. The file is designed to be compatible with the Linux serial core subsystem.

8 */

9

10 /* Offsets into the sci_port->irqs array */

11 enum {

12 SCIx_ERI_IRQ,

TwitterAlikeExample.html (http://redis.googlecode.com/svn/trunk/) HTML · 253 lines ✨ Summary

This HTML code outputs a blog post about Redis, a popular in-memory data store. The content explains how to implement a Twitter-like clone using Redis, including setting up followers and posting messages. It also discusses horizontal scaling of the system, including hashing keys, distributing user data across servers, and handling special cases like incrementing IDs and retrieving timeline data.

17 <div class="index">

18 <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->

19 <b>TwitterAlikeExample: Contents</b><br>&nbsp;&nbsp;<a href="#A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a><br>&nbsp;&nbsp;<a href="#Key-value stores basics">Key-value stores basics</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Atomic operations">Atomic operations</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Beyond key-value stores">Beyond key-value stores</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#The set data type">The set data type</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Prerequisites">Prerequisites</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Data layout">Data layout</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Following, followers and updates">Following, followers and updates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Authentication">Authentication</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Updates">Updates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Paginating updates">Paginating updates</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Following users">Following users</a><br>&nbsp;&nbsp;<a href="#Making it horizontally scalable">Making it horizontally scalable</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Hashing the key">Hashing the key</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Special keys">Special keys</a>

20 </div>

21

27

28 <div class="narrow">

29 <h1><a name="A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a></h1>In this article I'll explain the design and the implementation of a <a href="http://retwis.antirez.com" target="_blank">simple clone of Twitter</a> written using PHP and <a href="http://code.google.com/p/redis/" target="_blank">Redis</a> as only database. The programming community uses to look at key-value stores like special databases that can't be used as drop in replacement for a relational database for the development of web applications. This article will try to prove the contrary.<br/><br/>Our Twitter clone, <a href="http://retwis.antirez.com" target="_blank">called Retwis</a>, is structurally simple, has very good performances, and can be distributed among N web servers and M Redis servers with very little efforts. You can find the source code <a href="http://code.google.com/p/redis/downloads/list" target="_blank">here</a>.<br/><br/>We use PHP for the example since it can be read by everybody. The same (or... much better) results can be obtained using Ruby, Python, Erlang, and so on.

30 <h1><a name="Key-value stores basics">Key-value stores basics</a></h1>

31 The essence of a key-value store is the ability to store some data, called <i>value</i>, inside a key. This data can later be retrieved only if we know the exact key used to store it. There is no way to search something by value. So for example I can use the command SET to store the value <b>bar</b> at key <b>foo</b>:<br/><br/><pre class="codeblock python" name="code">

79 </pre>Ok I think we are ready to start coding!

80 <h2><a name="Prerequisites">Prerequisites</a></h2>

81 If you didn't download it already please <a href="http://code.google.com/p/redis/wiki/README" target="_blank">grab the source code of Retwis</a>. It's a simple tar.gz file with a few of .php files inside. The implementation is very simple. You will find the PHP library client inside (redis.php) that is used to talk with the Redis server from PHP. This library was written by <a href="http://qix.it" target="_blank">Ludovico Magnocavallo</a> and you are free to reuse this in your own projects, but for updated version of the library please download the Redis distribution.<br/><br/>Another thing you probably want is a working Redis server. Just get the source, compile with make, and run with ./redis-server and you are done. No configuration is required at all in order to play with it or to run Retwis in your computer.

82 <h2><a name="Data layout">Data layout</a></h2>

83 Working with a relational database this is the stage were the database layout should be produced in form of tables, indexes, and so on. We don't have tables, so what should be designed? We need to identify what keys are needed to represent our objects and what kind of values this keys need to hold.<br/><br/>Let's start from Users. We need to represent this users of course, with the username, userid, password, followers and following users, and so on. The first question is, what should identify an user inside our system? The username can be a good idea since it is unique, but it is also too big, and we want to stay low on memory. So like if our DB was a relational one we can associate an unique ID to every user. Every other reference to this user will be done by id. That's very simple to do, because we have our atomic INCR operation! When we create a new user we can do something like this, assuming the user is callled &quot;antirez&quot;:<br/><br/><pre class="codeblock python python python python python python python python python python python python" name="code">

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

This C code defines a Linux kernel module for the SMDK6400 SoC’s audio interface, specifically using the WM9713 codec. It sets up the audio device and registers it with the ALSA sound system, allowing users to access the audio functionality of the SMDK6400. The module is initialized and exited when loaded or unloaded from the kernel.

45 .name = "SMDK6400",

46 .dai_link = smdk6400_dai,

47 .num_links = ARRAY_SIZE(smdk6400_dai),

48 };

49