100+ results for 'php time'

Not the results you expected?

migration_tables_core_538.php (https://bitbucket.org/blackriver/openx.git) PHP · 318 lines

1 <?php

2

3 /*

23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |

24 +---------------------------------------------------------------------------+

25 $Id: migration_tables_core_538.php 81772 2012-09-11 00:07:29Z chris.nutting $

26 */

27

79

80

81 $this->aObjectMap['data_intermediate_ad']['date_time'] = array('fromTable'=>'data_intermediate_ad', 'fromField'=>'date_time');

82 $this->aObjectMap['data_summary_ad_hourly']['date_time'] = array('fromTable'=>'data_summary_ad_hourly', 'fromField'=>'date_time');

301

302 if ($this->oDBH->dbsyntax == 'pgsql') {

303 $query = "UPDATE {$tableName} SET date_time = {$tableName}.day::timestamp + ({$tableName}.hour || ' hours')::interval";

304 } else {

305 $query = "UPDATE {$tableName} SET date_time = DATE_ADD({$tableName}.day, interval {$tableName}.hour hour)";

Entry.php (https://bitbucket.org/skudatech/azure-sdk-for-php.git) PHP · 630 lines

1 <?php

2

3 /**

13 * limitations under the License.

14 *

15 * PHP version 5

16 *

17 * @category Microsoft

18 * @package WindowsAzure\Common\Internal\Atom

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

20 * @copyright 2012 Microsoft Corporation

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

33 * @category Microsoft

34 * @package WindowsAzure\Common\Internal\Atom

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

36 * @copyright 2012 Microsoft Corporation

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

migration_tables_core_538.php (https://github.com/skynet/OpenX-2.8.7.git) PHP · 318 lines

1 <?php

2

3 /*

23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |

24 +---------------------------------------------------------------------------+

25 $Id: migration_tables_core_538.php 62345 2010-09-14 21:16:38Z chris.nutting $

26 */

27

79

80

81 $this->aObjectMap['data_intermediate_ad']['date_time'] = array('fromTable'=>'data_intermediate_ad', 'fromField'=>'date_time');

82 $this->aObjectMap['data_summary_ad_hourly']['date_time'] = array('fromTable'=>'data_summary_ad_hourly', 'fromField'=>'date_time');

301

302 if ($this->oDBH->dbsyntax == 'pgsql') {

303 $query = "UPDATE {$tableName} SET date_time = {$tableName}.day::timestamp + ({$tableName}.hour || ' hours')::interval";

304 } else {

305 $query = "UPDATE {$tableName} SET date_time = DATE_ADD({$tableName}.day, interval {$tableName}.hour hour)";

apb_dualtimer.c (https://github.com/adamgreen/gcc4mbed.git) C · 413 lines

69 DualTimers[timer].dualtimer2 = CMSDK_DUALTIMER2;

70 DualTimers[timer].dualtimerIRQn = DUALTIMER_IRQn;

71 DualTimers[timer].dualtimer1Reload = reload;

125 (DualTimers[timer].dualtimer1)->TimerControl = dualtimerControl;

126 (DualTimers[timer].dualtimer2)->TimerControl = dualtimerControl;

127 /* Enable Counter */

128 (DualTimers[timer].dualtimer1)->TimerControl |=

147 /* Timer has to be already initialized and enabled */

148 if (DualTimers[timer].state == (DUALTIMER_INITIALIZED | DUALTIMER_ENABLED)) {

149 /* Disable Timer */

153 (DualTimers[timer].dualtimer2)->TimerControl = 0x0;

154 break;

155 case 1: (DualTimers[timer].dualtimer1)->TimerControl = 0x0;

156 break;

157 case 2: (DualTimers[timer].dualtimer2)->TimerControl = 0x0;

AssemblyInfo.cs (http://google-gdata.googlecode.com/svn/trunk/) text · 0 lines

14 */

15 using System.Reflection;

16 using System.Runtime.CompilerServices;

17

18

vec.c (https://github.com/llucax/dmd.git) C · 656 lines

12

13 static int vec_count; /* # of vectors allocated */

14 static int vec_initcount = 0; /* # of times package is initialized */

15

16 #define VECMAX 20

JCacheTest.php (https://github.com/mathc/joomla-cms.git) PHP · 632 lines

264 * @param string cache handler

265 * @param array options for cache handler

266 * @param integer lifetime of cache to be set

267 *

268 * @return void

269 * @dataProvider casesSetLifetime

270 */

271 public function testSetLifeTime( $handler, $options, $lifetime)

272 {

273 $this->object = JCache::getInstance($handler, $options);

274 $this->object->setLifeTime($lifetime);

275 $this->assertThat(

276 $this->object->options['lifetime'],

yosen.c (https://github.com/tsukud-y/estiva.git) C · 872 lines

92 double a[NZMAX];

93 int ja[NZMAX], i, mat_size;

94 double b, resmax, max_r = 0.0, l_time;

95

96 genmat(-1, ja, a, &b);

lmi_helper.c (https://github.com/mstsirkin/qemu.git) C · 745 lines

1 /*

2 * Loongson Multimedia Instruction emulation helpers for QEMU.

3 *

4 * Copyright (c) 2011 Richard Henderson <rth@twiddle.net>

InstallSchema.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 407 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

18 /**

19 * {@inheritdoc}

20 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)

21 */

22 public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)

322 )->addColumn(

323 'updated_at',

324 \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,

325 null,

326 ['nullable' => true, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_UPDATE],

327 'Last Update Timestamp'

328 )->addIndex(

329 $installer->getIdxName('layout_update', ['handle']),

Advertiser.php (https://bitbucket.org/blackriver/openx.git) PHP · 371 lines

1 <?php

2

3 /*

34

35 // Required classes

36 require_once MAX_PATH . '/lib/OA/Dal/Statistics.php';

37

38 /**

76 SUM(s.requests) AS requests,

77 SUM(s.total_revenue) AS revenue,

78 DATE_FORMAT(s.date_time, '%Y-%m-%d') AS day,

79 HOUR(s.date_time) AS hour

Filesystem.php (https://gitlab.com/Laolballs/cbtapp) PHP · 573 lines

1 <?php

2

3 namespace League\Flysystem;

390

391 /**

392 * Get a file's timestamp.

393 *

394 * @param string $path path to file

396 * @throws FileNotFoundException

397 *

398 * @return string|false timestamp or FALSE when fails

399 * to fetch timestamp from existing file

400 */

401 public function getTimestamp($path)

402 {

403 $path = Util::normalizePath($path);

mavlink_msg_hil_controls.h (https://github.com/flixr/mavlink-ivy-interface.git) C Header · 364 lines

26 "HIL_CONTROLS", \

27 11, \

28 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_controls_t, time_usec) }, \

29 { "roll_ailerons", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_hil_controls_t, roll_ailerons) }, \

30 { "pitch_elevator", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_controls_t, pitch_elevator) }, \

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

48 *

49 * @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)

50 * @param roll_ailerons Control output -1 .. 1

51 * @param pitch_elevator Control output -1 .. 1

139 #else

140 mavlink_hil_controls_t packet;

141 packet.time_usec = time_usec;

142 packet.roll_ailerons = roll_ailerons;

143 packet.pitch_elevator = pitch_elevator;

index-webarte.php (https://github.com/ccaballero/yachay.git) PHP · 176 lines

6

7 <div>

8 <?php if ($this->subject->amModerator()) { ?><input type="button" name="new" value="Agregar" onclick="location.href='<?php echo $this->url(array('subject' => $this->subject->url), 'subjects_subject_assign_new') ?>'" /><input type="submit" name="unlock" value="Habilitar" /><input type="submit" name="lock" value="Deshabilitar" /><input type="submit" name="delete" value="Retirar" /><input type="button" name="import" value="Importar" onclick="location.href='<?php echo $this->url(array('subject' => $this->subject->url), 'subjects_subject_assign_import') ?>'" /><input type="button" name="export" value="Exportar" onclick="location.href='<?php echo $this->url(array('subject' => $this->subject->url), 'subjects_subject_assign_export') ?>'" /><?php } ?>

9 </div>

10

21 <?php if ($this->acl('users', 'view')) { ?>

22 <a href="<?php echo $this->url(array('user' => $teacher->url), 'users_user_view') ?>"><img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_small/' . $teacher->getAvatar() ?>" alt="<?php echo $teacher->getFullName() ?>" title="<?php echo $teacher->getFullName() ?>" /></a>

23 <?php } else { ?>

24 <img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_medium/' . $teacher->getAvatar() ?>" alt="<?php echo $teacher->getFullName() ?>" title="<?php echo $teacher->getFullName() ?>" />

25 <?php } ?>

61 <?php if ($this->acl('users', 'view')) { ?>

62 <a href="<?php echo $this->url(array('user' => $auxiliar->url), 'users_user_view') ?>"><img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_small/' . $auxiliar->getAvatar() ?>" alt="<?php echo $auxiliar->getFullName() ?>" title="<?php echo $auxiliar->getFullName() ?>" /></a>

63 <?php } else { ?>

101 <?php if ($this->acl('users', 'view')) { ?>

102 <a href="<?php echo $this->url(array('user' => $student->url), 'users_user_view') ?>"><img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_small/' . $student->getAvatar() ?>" alt="<?php echo $student->getFullName() ?>" title="<?php echo $student->getFullName() ?>" /></a>

103 <?php } else { ?>

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

1 <?php

2 /**

3 * File containing the eZISBN10To13Converter class.

228 $sortArray = array( 'id' => 'asc' );

229

230 // Only fetch some objects each time to avoid memory problems.

231 while ( true )

232 {

pp_payflow_iframe.tpl (https://gitlab.com/reclamare/mao) Smarty Template · 212 lines

6 <button type="submit" form="form-pp-payflow-iframe" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>

7 <a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a></div>

8 <h1><?php echo $heading_title; ?></h1>

45 </div>

46 <div class="form-group required">

47 <label class="col-sm-2 control-label" for="entry-password"><span data-toggle="tooltip" title="<?php echo $help_password; ?>"><?php echo $entry_password; ?></span></label>

48 <div class="col-sm-10">

49 <input type="text" name="pp_payflow_iframe_password" value="<?php echo $pp_payflow_iframe_password; ?>" placeholder="<?php echo $entry_password; ?>" id="entry-password" class="form-control"/>

141 <label class="col-sm-2 control-label" for="input-sort-order"><?php echo $entry_sort_order; ?></label>

142 <div class="col-sm-10">

143 <input type="text" name="pp_payflow_iframe_sort_order" value="<?php echo $pp_payflow_iframe_sort_order; ?>" placeholder="<?php echo $entry_sort_order; ?>" id="input-sort-order" class="form-control" />

144 </div>

145 </div>

152 <?php if ($geo_zone['geo_zone_id'] == $pp_payflow_iframe_geo_zone_id) { ?>

153 <option value="<?php echo $geo_zone['geo_zone_id']; ?>" selected="selected"><?php echo $geo_zone['name']; ?></option>

154 <?php } else { ?>

155 <option value="<?php echo $geo_zone['geo_zone_id']; ?>"><?php echo $geo_zone['name']; ?></option>

156 <?php } ?>

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

This C++ header file provides a class mpi_process_group for managing parallel computations using MPI (Message Passing Interface). It allows for sending and receiving data between processes, handling outgoing messages, and serializing data for transmission. The code is part of the Boost library, providing a framework for distributed computing in parallel environments.

106 * @todo Evaluate whether we should use a deque instance, which

107 * would reduce could reduce the cost of "sending" messages but

108 * increases the time spent in the synchronization step.

109 */

110 struct outgoing_messages {

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

This Java code implements a search bar for an editor application. It provides features like incremental searching, highlighting matches, and support for regular expressions. The search bar can be toggled on and off, and its behavior can be customized through options like ignoring case and using regexps. The code also handles keyboard events to navigate the search results.

86 //{{{ Create the timer used by incremental search

87 timer = new Timer(0,new ActionListener()

88 {

89 public void actionPerformed(ActionEvent evt)

155 private HistoryTextField find;

156 private JCheckBox ignoreCase, regexp, hyperSearch;

157 private Timer timer;

158

159 // close button only there if 'temp' is true

168 private void find(boolean reverse)

169 {

170 timer.stop();

171

172 String text = find.getText();

272 this.searchReverse = reverse;

273

274 timer.stop();

275 timer.setRepeats(false);

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

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

67 }

68

69 public void addAnimationFrame(SpriteImage image, long timer) {

70 animation.addFrame(image, timer);

71 }

72

73 public void addAnimationFrame(String fileName, long timer) {

74 animation.addFrame(fileName, timer);

75 }

76

77 public void addAnimationFrame(LImage image, long timer) {

78 animation.addFrame(image, timer);

119 }

120

121 public void update(long elapsedTime) {

122 if (visible) {

123 super.update(elapsedTime);

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

This HTML code is a documentation page for a C++ struct, color_converted_view_type, generated by Doxygen. It displays information about the struct’s template parameters, public types, and detailed description, along with links to related files and a copyright notice. The page includes metadata, styling, and formatting to present the documentation in a readable format.

50 struct boost::gil::color_converted_view_type&lt; any_image_view&lt; ViewTypes &gt;, DstP, CC &gt;</h3>

51

52 Returns the type of a runtime-specified view, color-converted to a given <a class="el" href="g_i_l_0599.html" title="Represents a pixel value (a container of channels). Models: HomogeneousColorBaseValueConcept...">pixel</a> type with user specified color converter. <table border="0" cellpadding="0" cellspacing="0">

53 <tr><td></td></tr>

54 <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>

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

53 { "maxDecibels", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsRealtimeAnalyserNodeMaxDecibels), (intptr_t)setJSRealtimeAnalyserNodeMaxDecibels THUNK_GENERATOR(0) },

54 { "smoothingTimeConstant", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsRealtimeAnalyserNodeSmoothingTimeConstant), (intptr_t)setJSRealtimeAnalyserNodeSmoothingTimeConstant THUNK_GENERATOR(0) },

55 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsRealtimeAnalyserNodeConstructor), (intptr_t)0 THUNK_GENERATOR(0) },

119 { "getByteFrequencyData", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsRealtimeAnalyserNodePrototypeFunctionGetByteFrequencyData), (intptr_t)1 THUNK_GENERATOR(0) },

120 { "getByteTimeDomainData", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsRealtimeAnalyserNodePrototypeFunctionGetByteTimeDomainData), (intptr_t)1 THUNK_GENERATOR(0) },

121 { 0, 0, 0, 0 THUNK_GENERATOR(0) }

122 };

125 static JSC_CONST_HASHTABLE HashTable JSRealtimeAnalyserNodePrototypeTable = { 8, 7, JSRealtimeAnalyserNodePrototypeTableValues, 0 };

126 const ClassInfo JSRealtimeAnalyserNodePrototype::s_info = { "RealtimeAnalyserNodePrototype", &JSC::JSObjectWithGlobalObject::s_info, &JSRealtimeAnalyserNodePrototypeTable, 0 };

127

128 JSObject* JSRealtimeAnalyserNodePrototype::self(ExecState* exec, JSGlobalObject* globalObject)

143 const ClassInfo JSRealtimeAnalyserNode::s_info = { "RealtimeAnalyserNode", &JSAudioNode::s_info, &JSRealtimeAnalyserNodeTable, 0 };

144

145 JSRealtimeAnalyserNode::JSRealtimeAnalyserNode(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<RealtimeAnalyserNode> impl)

146 : JSAudioNode(structure, globalObject, impl)

147 {

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

27 #include "SVGAnimatedNumber.h"

28 #include "SVGElement.h"

29 #include <runtime/JSGlobalObject.h>

30 #include <runtime/JSObjectWithGlobalObject.h>

31 #include <runtime/ObjectPrototype.h>

32

33 namespace WebCore {

gtest_unittest.cc (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 6718 lines

47 || testing::GTEST_FLAG(list_tests)

48 || testing::GTEST_FLAG(output) != "unknown"

49 || testing::GTEST_FLAG(print_time)

50 || testing::GTEST_FLAG(random_seed)

51 || testing::GTEST_FLAG(repeat) > 0

70 #include <limits.h> // For INT_MAX.

71 #include <stdlib.h>

72 #include <time.h>

73

74 #include <map>

120 using testing::GTEST_FLAG(list_tests);

121 using testing::GTEST_FLAG(output);

122 using testing::GTEST_FLAG(print_time);

123 using testing::GTEST_FLAG(random_seed);

124 using testing::GTEST_FLAG(repeat);

v3.4beta028.html (https://bitbucket.org/ultra_iter/qt-vtl.git) HTML · 146 lines

25 <I>previous</I> and <I>current</I> versions (see above).

26 If you don't find something listed here, then it was not done in this

27 timeframe, or it was not considered important enough to be mentioned.

28 The following information is located here:

29 <UL>

77 files

78 <LI>support was added for three new fax-related tags registered to

79 SGI: FaxRecvParams, FaxRecvTime, and FaxSubAddress

80 <LI>the bit order of image data read and written can now be controlled

81 on a per-file basis through a mode parameter supplied when opening

startup.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 135 lines

99 /*{{{ Workaround for buggy international key handling */

100

101 /* If international keys do not work in the text area, sometimes it is possible

102 * to workaround the problem by adding translation mappings: */

103

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

The dir class is a BASH-like command that displays information about the current directory and its contents. It prints a table with file permissions, last modified date, length, and name for each file in the directory, sorted alphabetically. The output includes a fixed-length field for file length and formatting to align columns.

58 Date d = new Date(f.lastModified());

59 GregorianCalendar c = new GregorianCalendar();

60 c.setTime(d);

61 int day = c.get(Calendar.DAY_OF_MONTH);

62 sb.append( months[ c.get(Calendar.MONTH) ] + " " + day );

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

184 QTextStream tw(&wrapperStreamBuffer);

185

186 QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate);

187

188 // Header info

541 t << "// ============================================================================" << endl;

542 t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";

543 t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;

544 t << "// * This file is generated by qmake and should not be modified by the" << endl;

545 t << "// * user." << endl;

614 t << "// ============================================================================" << endl;

615 t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";

616 t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;

617 t << "// * This file is generated by qmake and should not be modified by the" << endl;

618 t << "// * user." << endl;

html2man.in (https://bitbucket.org/freebsd/freebsd-head/) Unknown · 173 lines

24 'ntpdate' => ['ntpdate', 8, 'ntpd(8)'],

25 'ntpdc' => ['ntpdc', 8, 'ntpd(8)'],

26 'ntptime' => ['ntpdtime', 8, 'ntpd(8), ntpdate(8)'],

27 'ntptrace' => ['ntptrace', 8, 'ntpd(8)'],

28 'keygen' => ['ntp-keygen', 8, 'ntpd(8), ntp_auth(5)'],

phonon.4.6.0.linux-gcc-amd64.txt (https://bitbucket.org/ultra_iter/qt-vtl.git) Plain Text · 1980 lines

227 56 QObject::event

228 64 QObject::eventFilter

229 72 QObject::timerEvent

230 80 QObject::childEvent

231 88 QObject::customEvent

263 56 QObject::event

264 64 QObject::eventFilter

265 72 QObject::timerEvent

266 80 QObject::childEvent

267 88 QObject::customEvent

452 wait (0x7f37b9a781c0) 0

453

454 Class timespec

455 size=16 align=8

456 base size=16 base align=8

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

1 Subject: Tags plugin (0.3) available

2

3 I recently left XEmacs for JEdit, but before I could make the full time switch

4 I needed tagging. This plugin will provide tagging around source files.

5

exception.i (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 9 lines

2

3

4 %insert("runtime") {

5 %define_as(SWIG_exception(code, msg),

6 %block(switch (code) {case SWIG_IndexError: return Rf_ScalarLogical(NA_LOGICAL); default: %error(code, msg); SWIG_fail;} ))

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

391 <para>

392 When executing a command using a shortcut, you may notice

393 that sometimes no action is performed and an error message

394 appears in the status bar. This means that the action is not

395 available for the current selection in the tree. To check

471 <para>

472 Ask to import new files: if "Always" is selected,

473 every time you save a file located below the active

474 project's root, and the file is not yet part of the

475 project, you'll be asked whether you want to import

476 it. Selecting "Once per session" will ask only one

477 time during the time the current project stays

478 active. "Never" will disable this feature. "Auto

479 import" will automatically add to the project any

animation(kas).html (http://rgdengine.googlecode.com/svn/trunk/) HTML · 131 lines ✨ Summary

This is a code snippet from an animation controller class for a game engine. It defines a class called CFrameAnimationController that can be attached to a frame object in the game world. The class has methods to load and update the animation, as well as setters and getters for various properties such as rate and animation time.

74 &lt;node name = <span class="literal">"Box01"</span>>

75 &lt;animation> <span class="comment">// or &lt;animation file = "cube_anim.xml" />

76 </span> &lt;key time=<span class="literal">"0"</span>>

77 &lt;translation x=<span class="literal">"-20.579"</span> y=<span class="literal">"32.154"</span> z=<span class="literal">"0."</span> />

78 &lt;rotation x=<span class="literal">"0."</span> y=<span class="literal">"0."</span> z=<span class="literal">"0."</span> />

79 &lt;scale x=<span class="literal">"1."</span> y=<span class="literal">"1."</span> z=<span class="literal">"1."</span> />

80 &lt;/key>

81 &lt;key time=<span class="literal">"12960"</span>> <span class="comment">// vremya budet v sekundah

82 </span> &lt;translation x=<span class="literal">"-33.04"</span> y=<span class="literal">"25.41"</span> z=<span class="literal">"0."</span> />

83 &lt;rotation x=<span class="literal">"0."</span> y=<span class="literal">"0."</span> z=<span class="literal">"1.4516"</span> />

103 <span class="keyword">float</span> getRate();

104 &nbsp;

105 <span class="keyword">void</span> setAnimationTime(<span class="keyword">float</span> rate);

106 <span class="keyword">float</span> getAnimationTime();

120 &nbsp;

121 <span class="keyword">private</span>:

122 <span class="keyword">float</span> m_fAnimationTime;

123 <span class="keyword">float</span> m_fAnimationRate;

124 &nbsp;

TRUECOLO.DOC (git://github.com/AnimatorPro/Animator-Pro.git) Unknown · 226 lines

21

22 For an Animator style program to be effective we must first

23 develop real-time decompression algorithms. Delta compression

24 will always work when not too much of the screen is moving, in

25 the worst case the speed of animation is determined by how fast

64 Though in truth PJ does not keep up with Autodesk Animator

65 frame rates in the high resolutions, it does come close. We

66 achieved this by sending data to the video card 16 bits at a time

67 instead of 8. In the time between the Animator release and PJ's

80 and often embarrassingly jerky. One reason is disk speed has

81 not advanced at the rate that memory speed has, also the faster

82 disks already had 16 bit data paths at the time of the Animator.

83 Though personally I'd rather see a breakthrough in mass storage

84 technology, and EISA controllers with 32 bit interfaces,

85 hardware image compression and decompression devices provide

86 another solution that at the moment looks a bit more likely in

87 our time frame.

88

89 I know of several hardware image compression efforts in

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

This HTML code outputs a documentation page for an interval container library, providing information on its implementation details, including time complexities and performance characteristics. It includes explanations of algorithms used in adding intervals to containers, as well as copyright and licensing information. The content is presented in a structured format with links to related pages.

51 For large intervals however time consumption of operations on interval containers

52 may be worse, because most or all intervals of a container may have to be

53 visited. As an example, time complexity of <a class="link" href="../function_reference/addition.html" title="Addition"><span class="emphasis"><em><span class="bold"><strong>Addition</strong></span></em></span></a> on interval containers

54 is briefly discussed.

55 </p>

61 <a name="boost_icl.implementation.complexity.time_complexity_of_addition"></a><h6>

62 <a name="id1127141"></a>

63 <a class="link" href="complexity.html#boost_icl.implementation.complexity.time_complexity_of_addition">Time

64 Complexity of Addition</a>

65 </h6>

66 <p>

67 The next table gives the time complexities for the overloaded <code class="computeroutput"><span class="keyword">operator</span> <span class="special">+=</span></code>

68 on interval containers. The instance types of <code class="computeroutput"><span class="identifier">T</span></code>

69 are given as column headers. Instances of type parameter <code class="computeroutput"><span class="identifier">P</span></code>

73 </p>

74 <div class="table">

75 <a name="id1127189"></a><p class="title"><b>Table&#160;1.15.&#160;Time Complexity of Addition:</b></p>

76 <div class="table-contents"><table class="table" summary="Time Complexity of Addition:">

blocks.py (https://bitbucket.org/brandon/foundations-of-python-network-programming/) Python · 57 lines ✨ Summary

This Python script establishes a connection between two endpoints, either a server and client or vice versa, to send messages over a network stream. It uses a block-based approach, where each message is sent in chunks of up to 4GB (2^32 - 1 bytes) in length. The script can be run as both a server and client, with the host address specified as an argument.

1 #!/usr/bin/env python

2 # Foundations of Python Network Programming - Chapter 5 - blocks.py

3 # Sending data one block at a time.

4

5 import socket, struct, sys

ignore_parameter_runme.java (https://swig.svn.sourceforge.net/svnroot/swig) Java · 37 lines ✨ Summary

This Java code tests the functionality of a generated library using SWIG, which is used to interface with C/C++ code from Java. It checks if various functions and constructors are working correctly by comparing their return values with expected results. If any function or constructor returns an incorrect value, it prints an error message indicating a runtime error in that function.

1 // Runtime test checking the %typemap(ignore) macro

2

3 import ignore_parameter.*;

17 // Compilation will ensure the number of arguments and type are correct.

18 // Then check the return value is the same as the value given to the ignored parameter.

19 if (!ignore_parameter.jaguar(200, 0.0).equals("hello")) { System.err.println("Runtime Error in jaguar()");}

20 if (ignore_parameter.lotus("fast", 0.0) != 101) { System.err.println("Runtime Error in lotus()");}

21 if (ignore_parameter.tvr("fast", 200) != 8.8) { System.err.println("Runtime Error in tvr()");}

22 if (ignore_parameter.ferrari() != 101) { System.err.println("Runtime Error in ferrari()");}

23

24 SportsCars sc = new SportsCars();

25 if (!sc.daimler(200, 0.0).equals("hello")) { System.err.println("Runtime Error in daimler()");}

26 if (sc.astonmartin("fast", 0.0) != 101) { System.err.println("Runtime Error in astonmartin()");}

27 if (sc.bugatti("fast", 200) != 8.8) { System.err.println("Runtime Error in bugatti()");}

28 if (sc.lamborghini() != 101) { System.err.println("Runtime Error in lamborghini()");}

PAS-10-Test01.xlf (http://okapi.googlecode.com/svn/trunk/) Unknown · 521 lines

79 </trans-unit>

80 <trans-unit id='12' restype='menuentry' ts='1'>

81 <source >Time/&amp;Date F5</source>

82 </trans-unit>

83 <trans-unit id='1' restype='menupopup' style='0x10' ts='0'>

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

35 class Node;

36

37 // Runtime object support code for JSHTMLAppletElement, JSHTMLEmbedElement and JSHTMLObjectElement.

38 JSC::Bindings::Instance* pluginInstance(Node*);

39 JSC::JSObject* pluginScriptObject(JSC::ExecState* exec, JSHTMLElement* jsHTMLElement);

40

41 JSC::JSValue runtimeObjectPropertyGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);

42 bool runtimeObjectCustomGetOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&, JSHTMLElement*);

43 bool runtimeObjectCustomGetOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&, JSHTMLElement*);

44 bool runtimeObjectCustomPut(JSC::ExecState*, const JSC::Identifier&, JSC::JSValue, JSHTMLElement*, JSC::PutPropertySlot&);

45 JSC::CallType runtimeObjectGetCallData(JSHTMLElement*, JSC::CallData&);

46

47 } // namespace WebCore

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

This Java class, ArchiveDirectoryCache, caches remote directories to improve performance by storing their listings in a temporary file and storing the file path in a hash table for efficient lookup. It provides methods to cache, retrieve, and clear cached directory listings, as well as manage its internal state and settings directory.

92 // filename generation algorithm is really simple...

93 tmpFileCount++;

94 long time = System.currentTimeMillis();

95 String path = MiscUtilities.constructPath(cacheDirectory,

96 "cache-" + tmpFileCount + "-" + time + ".tmp");

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

This Java code implements a BeanShell interpreter, a JavaScript-like scripting language for Java applications. It provides an interface to interact with a Java application’s UI components and perform operations on them using JavaScript-like syntax. The code includes classes for managing class loaders, handling exceptions, and creating an interpreter instance.

497 /**

498 * Runs a cached block of code in the specified namespace. Faster than

499 * evaluating the block each time.

500 * @param method The method instance returned by cacheBlock()

501 * @param view The view

709 /**

710 * This extracts an exception from a 'wrapping' exception, as BeanShell

711 * sometimes throws. This gives the user a more accurate error traceback

712 */

713 private static void unwrapException(Exception e) throws Exception

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

This Java code is part of a text editor application, managing views and user interactions. It handles view creation, closing, and switching between views. It also manages settings, garbage collection, and memory usage. The code provides methods for getting and setting various properties, such as the number of open views, the currently active view, and whether jEdit is running in background mode.

311 Log.log(Log.NOTICE,jEdit.class,"This probably means that"

312 + " jEdit crashed and/or exited abnormally");

313 Log.log(Log.NOTICE,jEdit.class,"the last time it was run.");

314 Log.log(Log.NOTICE,jEdit.class,"If you don't"

315 + " know what this means, don't worry.");

iwl-debugfs.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 1758 lines ✨ Summary

This C code is part of a Linux kernel module that provides a debug interface for a wireless networking device. It creates and manages a directory in the Linux file system where various debug-related files and directories are stored, allowing users to access and manipulate settings such as sleep levels, thermal throttling, and sensitivity calculations. The code also handles removal of these files and directories when the module is unloaded.

691 priv->last_blink_rate);

692 pos += scnprintf(buf + pos, bufsz - pos,

693 "Last blink time: %lu\n",

694 priv->last_blink_time);

843 "flags: %#.2x\n", le16_to_cpu(cmd->flags));

844 pos += scnprintf(buf + pos, bufsz - pos,

845 "RX/TX timeout: %d/%d usec\n",

846 le32_to_cpu(cmd->rx_data_timeout),

847 le32_to_cpu(cmd->tx_data_timeout));

848 for (i = 0; i < IWL_POWER_VEC_SIZE; i++)

849 pos += scnprintf(buf + pos, bufsz - pos,

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

This Java code is part of a text editor’s plugin that provides features like syntax highlighting, auto-completion, and parsing. It creates a background thread to parse buffers in real-time, updates the UI with parsed data, and manages toolbars and caret handlers for editing. The code also handles buffer parsing, parsing cancellation, and cleanup of resources when the view is stopped or removed.

270 buffer.setStringProperty(PARSER_PROPERTY, parserName);

271 }

272 else throw new RuntimeException("Unknown parser: " + parserName);

273 }

274

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

This Java code is a test suite for an XML plugin, specifically testing the CopyXPath action. It opens various XML files and verifies that the action correctly copies XPath expressions from the file’s content. The tests cover different scenarios, including files with and without prefixes, as well as text and HTML files.

15

16 // {{{ jUnit imports

17 import java.util.concurrent.TimeUnit;

18

19 import org.junit.*;

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

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

295 switch (attribute.inputType & EditorInfo.TYPE_MASK_CLASS) {

296 case EditorInfo.TYPE_CLASS_NUMBER:

297 case EditorInfo.TYPE_CLASS_DATETIME:

298 case EditorInfo.TYPE_CLASS_PHONE:

299 mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_PHONE,

621

622 if (mKeyboardSwitcher.isCurrentKeyboardPhysical()) {

623 // sometimes, the physical keyboard will delete input, and then

624 // add some.

625 // we'll try to make it nice

799 if (mInputView != null && mInputView.isShown()

800 && mInputView.isShifted()) {

801 event = new KeyEvent(event.getDownTime(), event.getEventTime(),

802 event.getAction(), event.getKeyCode(), event

803 .getRepeatCount(), event.getDeviceId(), event

if_cscop.txt (https://code.google.com/p/msysgit/) Unknown · 491 lines

62

63 Cscope answers these questions from a symbol database that it builds the

64 first time it is used on the source files. On a subsequent call, cscope

65 rebuilds the database only if a source file has changed or the list of

66 source files is different. When the database is rebuilt the data for the

mxc-ssi.c (http://photon-android.googlecode.com/svn/) C · 861 lines ✨ Summary

This C code implements an Audio Software Development Kit (ASoC) driver for the i.MX SoC family of microcontrollers. It provides a set of APIs and data structures to interact with I2S audio interfaces, allowing users to configure and use these interfaces in Linux-based systems. The code defines a set of dai (digital audio interface) operations and registers them with the Linux kernel.

414 struct snd_soc_dai *dai)

415 {

416 struct snd_soc_pcm_runtime *rtd = substream->private_data;

417 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;

418

503 struct snd_pcm_hw_params *params)

504 {

505 struct snd_soc_pcm_runtime *rtd = substream->private_data;

506 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;

507 u32 stccr, stcr, sier;

555 struct snd_pcm_hw_params *params)

556 {

557 struct snd_soc_pcm_runtime *rtd = substream->private_data;

558 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;

559 u32 srccr, srcr, sier;

Polygon.cs (http://bwapi-mono-bridge.googlecode.com/svn/trunk/) C# · 140 lines ✨ Summary

This is a C# class that represents a polygon in BWTA, which is a library for analyzing the geometry of a map in StarCraft. The class has several methods to calculate various properties of the polygon, such as its area and perimeter, as well as whether a given position is inside or outside the polygon. It also has a property called “holes” that allows you to access the holes within the polygon.

11 // defaults

12 using System;

13 using System.Runtime.InteropServices;

14 // BWAPI

15 using BWAPI;

buffer.c (https://bitbucket.org/ultra_iter/vim-qt.git) C · 5722 lines

204 }

205

206 /* if first time loading this buffer, init b_chartab[] */

207 if (curbuf->b_flags & BF_NEVERLOADED)

208 (void)buf_init_chartab(curbuf, FALSE);

ex_end_of_month_day.xml (http://hadesmem.googlecode.com/svn/trunk/) XML · 0 lines

8 -->

9

10 <section id="date_time.examples.end_of_month_day">

11 <title>End of the Months</title>

12

21 */

22

23 #include "boost/date_time/gregorian/gregorian.hpp"

24 #include <iostream>

25

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

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

130 * after the commit interval expires

131 */

132 setup_timer(&journal->j_commit_timer, commit_timeout,

133 (unsigned long)current);

134

156 jbd_debug(1, "OK, requests differ\n");

157 spin_unlock(&journal->j_state_lock);

158 del_timer_sync(&journal->j_commit_timer);

159 jbd2_journal_commit_transaction(journal);

160 spin_lock(&journal->j_state_lock);

213 end_loop:

214 spin_unlock(&journal->j_state_lock);

215 del_timer_sync(&journal->j_commit_timer);

216 journal->j_task = NULL;

217 wake_up(&journal->j_wait_done_commit);

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

This Java class represents a tile set in a TMX (Tiled Map eXchange) file format, used for creating maps in games. It loads and parses the tile set data from an XML file, storing information such as tile dimensions, spacing, and properties. The class provides methods to access and manipulate this data, including getting tile coordinates and checking if a given GID (global ID) is within the tile set’s range.

64

65 public TMXTileSet(TMXTiledMap map, Element element, boolean loadImage)

66 throws RuntimeException {

67 this.map = map;

68 name = element.getAttribute("name");

82

83 } catch (Exception e) {

84 throw new RuntimeException(this.map.tilesLocation + "/"

85 + source);

86 }

89 String tileHeightString = element.getAttribute("tileheight");

90 if (tileWidthString.length() == 0 || tileHeightString.length() == 0) {

91 throw new RuntimeException(

92 "tileWidthString.length == 0 || tileHeightString.length == 0");

93 }

flagship_notification_rollupbusinessrpt.xslt (git://github.com/hpcc-systems/HPCC-Platform.git) Extensible Stylesheet Language Transformations · 176 lines

38 <script language = "JavaScript">

39 var now = new Date();

40 var timestring = now.toLocaleString();

41 var startpos = timestring.indexOf(" ");

42 document.write("Saved Search Update Report: " + timestring.substr(startpos + 1));

43 </script>

44 </div>

assembly-parrot.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 139 lines

126 <KEYWORD1>tan</KEYWORD1>

127 <KEYWORD1>tanh</KEYWORD1>

128 <KEYWORD1>time</KEYWORD1>

129 <KEYWORD1>trace</KEYWORD1>

130 <KEYWORD1>typeof</KEYWORD1>

htaccess.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 564 lines

59 <KEYWORD1>AuthDigestGroupFile</KEYWORD1>

60 <KEYWORD1>AuthDigestNonceFormat</KEYWORD1>

61 <KEYWORD1>AuthDigestNonceLifetime</KEYWORD1>

62 <KEYWORD1>AuthDigestQop</KEYWORD1>

63 <KEYWORD1>AuthGroupFile</KEYWORD1>

160 <KEYWORD1>SetOutputFilter</KEYWORD1>

161 <KEYWORD1>SSIErrorMsg</KEYWORD1>

162 <KEYWORD1>SSITimeFormat</KEYWORD1>

163 <KEYWORD1>SSLCipherSuite</KEYWORD1>

164 <KEYWORD1>SSLOptions</KEYWORD1>

243 <KEYWORD2>AuthDigestNcCheck</KEYWORD2>

244 <KEYWORD2>AuthDigestNonceFormat</KEYWORD2>

245 <KEYWORD2>AuthDigestNonceLifetime</KEYWORD2>

246 <KEYWORD2>AuthDigestQop</KEYWORD2>

247 <KEYWORD2>AuthDigestShmemSize</KEYWORD2>

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

This Java code defines a class called Capabilities that checks for the availability of certain features and packages in the runtime environment, such as Swing and accessibility. It uses a cache to store results of previous checks and throws an exception if a capability is not available. The class also provides methods to set accessibility and test for class existence.

37

38 /**

39 The map of extended features supported by the runtime in which we live.

40 <p>

41

66 the optional bsh package to use it.

67 Note that even if both are true it does not necessarily mean that we

68 have runtime permission to access the fields... Java security has

69 a say in it.

70 @see bsh.ReflectManager

115 An attempt was made to use an unavailable capability supported by

116 an optional package. The normal operation is to test before attempting

117 to use these packages... so this is runtime exception.

118 */

119 public static class Unavailable extends UtilEvalError

painting.pri (https://bitbucket.org/ultra_iter/qt-vtl.git) Unknown · 277 lines

128 HEADERS += \

129 painting/qgraphicssystem_raster_p.h \

130 painting/qgraphicssystem_runtime_p.h \

131 painting/qgraphicssystemfactory_p.h \

132 painting/qgraphicssystemplugin_p.h \

135 SOURCES += \

136 painting/qgraphicssystem_raster.cpp \

137 painting/qgraphicssystem_runtime.cpp \

138 painting/qgraphicssystemfactory.cpp \

139 painting/qgraphicssystemplugin.cpp \

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

25

26 #include "JSDOMBinding.h"

27 #include <runtime/JSGlobalObject.h>

28 #include <runtime/JSObjectWithGlobalObject.h>

29 #include <runtime/ObjectPrototype.h>

30

31 namespace WebCore {

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

26 #include "JSSVGElement.h"

27 #include "SVGElement.h"

28 #include <runtime/JSObjectWithGlobalObject.h>

29

30 namespace WebCore {

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

This C++ header file appears to be part of a virtual machine (VM) implementation, specifically for the Self programming language. It provides functionality for managing processes, stacks, and memory allocation within the VM. The code includes functions for switching between different stack modes, handling preemption, and executing continuation functions on the VM stack.

43 enum ProcessState {

44 initialized, // ready, but has no stack yet and hasn't run Self code

45 ready, // could continue at any time, or is currently running

46 stopped, // stopped because of error; cannot continue but

47 // still has a stack which can be inspected

54

55 class Process: public CHeapObj {

56 char* suspendedSP; // process state - saved in runtime_(sparc_mac_ppc).s

57 char* suspendedPC;

58

qUI2Events.self (git://github.com/ticking/self.git) Unknown · 284 lines

13 qUI2Events = bootstrap define: bootstrap stub -> 'globals' -> 'modules' -> 'qUI2Events' -> () ToBe: bootstrap addSlotsTo: (

14 bootstrap remove: 'directory' From:

15 bootstrap remove: 'fileInTimeString' From:

16 bootstrap remove: 'myComment' From:

17 bootstrap remove: 'postFileIn' From:

23 CopyDowns:

24 globals modules init. copy

25 SlotsToOmit: directory fileInTimeString myComment postFileIn revision subpartNames.

26

27 \x7fIsComplete: '.

38 'ModuleInfo: Module: qUI2Events InitialContents: InitializeToExpression: (_CurrentTimeString)\x7fVisibility: public'

39

40 fileInTimeString <- _CurrentTimeString.

41 } | )

42

184 isOKToUseMyTimeStampForMenus = ( |

185 |

186 "single machine, so event time compares to popUpTime"

187 "And slow implementation, so need to use event time"

FileEntryTest.java (https://bitbucket.org/nbargnesi/idea.git) Java · 146 lines

45 assertEquals("name", copy.getName());

46 assertContent("content", copy.getContent());

47 assertEquals(123L, copy.getTimestamp());

48 assertTrue(copy.isReadOnly());

49 }

linux.c (https://libusb.svn.sourceforge.net/svnroot/libusb) C · 734 lines ✨ Summary

This C code is part of a USB device driver implementation for Linux. It initializes and manages USB devices, including finding the virtual filesystem path, initializing the root device, and providing functions to interact with USB devices such as resetting endpoints, clearing halts, and detaching kernel drivers. The code also handles errors and provides debugging information.

148

149 ctrl.data = bytes;

150 ctrl.timeout = timeout;

151

152 ret = ioctl(dev->fd, IOCTL_USB_CONTROL, &ctrl);

179

180 /*

181 * Get actual time, and add the timeout value. The result is the absolute

182 * time where we have to quit waiting for an message.

227 if (timeout) {

228 /* compare with actual time, as the select timeout is not that precise */

229 gettimeofday(&tv_now, NULL);

257

258 if (!waiting)

259 rc = -ETIMEDOUT;

260 else

261 rc = urb.status;

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

This HTML code snippet provides instructions on how to recover deleted lines of code by pressing a specific keyboard shortcut: C+e C+y. It opens a dialog box listing the 20 most recently deleted runs of text, allowing users to easily retrieve their lost changes.

1 <html><body>Suppose you delete a few lines of code, make some further changes, then realize you want the lines of code back. While you just could copy your changes to the clipboard, undo a bunch of times, and paste, there is an easier way. Simply press <b>C+e C+y</b> which will open a dialog box listing the 20 most recently deleted runs of text.</body></html>

2

build.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 121 lines

64 debug="on"

65 deprecation="on"

66 includeJavaRuntime="yes"

67 >

68 <classpath refid="project.class.path"/>

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

This Java code is part of a Tar ( Tape Archive) file parser. It defines classes and methods to parse, create, and manipulate TarHeader information, which represents metadata about files in a Tar archive. The code handles various aspects of Tar file structure, including file names, permissions, ownership, timestamps, and checksums.

323 */

324 public void

325 setModTime( long time )

326 {

327 this.header.modTime = time / 1000;

331 * Set this entry's modification time.

332 *

333 * @param time This entry's new modification time.

334 */

335 public void

336 setModTime( Date time )

337 {

338 this.header.modTime = time.getTime() / 1000;

339 }

340

shtml.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 117 lines

95 <KEYWORD2>file</KEYWORD2>

96 <KEYWORD2>sizefmt</KEYWORD2>

97 <KEYWORD2>timefmt</KEYWORD2>

98 <KEYWORD2>var</KEYWORD2>

99 <KEYWORD2>cmd</KEYWORD2>

Insert_Buffer_Properties.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 251 lines

133 }

134

135 checkNextTime = new StringBuffer();

136 buff = new StringBuffer();

137 names = checkBox.getCheckedValues();

139 {

140 if(i > 0)

141 checkNextTime.append(",");

142 checkNextTime.append(name);

190

191 jEdit.setProperty("macro.insert-buffer-properties." + mode,

192 checkNextTime.toString());

193

194 if(buff.length() > 0)

example21.output (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines

2 Running 2 test cases...

3 Testing initialization :

4 Current time:0

5 Testing update :

6 Update Volume with 100

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.

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

319 one element for each key. Otherwise, it supports equivalent keys.

400 of <a class="reference" href="reference.html#class-nullable">boost::nullable</a>.</p>

401 <p>The primary reason to avoid null-pointers

402 is that you have to check for null-pointers every time the container is

403 used. This extra checking is easy to forget, and it is somewhat contradictory to

404 the spirit of OO where you replace special cases with dynamic dispatch.</p>

QtSql.4.0.0.linux-gcc-ppc32.txt (https://bitbucket.org/ultra_iter/qt-vtl.git) Plain Text · 1875 lines

587 28 QSettings::event

588 32 QObject::eventFilter

589 36 QObject::timerEvent

590 40 QObject::childEvent

591 44 QObject::customEvent

970 Vtable for QTimerEvent

971 QTimerEvent::_ZTV11QTimerEvent: 4u entries

972 0 (int (*)(...))0

973 4 (int (*)(...))(& _ZTI11QTimerEvent)

974 8 QTimerEvent::~QTimerEvent

975 12 QTimerEvent::~QTimerEvent

976

977 Class QTimerEvent

980 QTimerEvent (0x311ac400) 0

981 vptr=((& QTimerEvent::_ZTV11QTimerEvent) + 8u)

982 QEvent (0x315cb850) 0

983 primary-for QTimerEvent (0x311ac400)

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

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

27

28 # Copy only _changed files_ from MIRROR to TMPDIR, without copying

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

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

31 # necessary to validate the commit.

pxa2xx-pcm.h (http://omnia2droid.googlecode.com/svn/trunk/) C++ Header · 31 lines ✨ Summary

This C header file defines an interface for ALSA (Advanced Linux Sound Architecture) PCM (Pulse Code Modulation) on Intel PXA2xx chipsets. It provides structures and functions for managing DMA (Direct Memory Access) operations, playback, capture, and startup/shutdown of PCM devices. The code is part of the Linux kernel’s sound system.

12 #include <mach/dma.h>

13

14 struct pxa2xx_runtime_data {

15 int dma_ch;

16 struct pxa2xx_pcm_dma_params *params;

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

This Java code defines a set of constants for parsing CSS3 syntax. It provides integer values to represent different elements, such as comments, strings, and selectors, as well as special characters like @ and |. These constants are used in a parser to identify the structure and meaning of CSS code.

62 int EXS = 56;

63 int ANGLE = 57;

64 int TIME = 58;

65 int FREQ = 59;

66 int RESOLUTION = 60;

164 "<EXS>",

165 "<ANGLE>",

166 "<TIME>",

167 "<FREQ>",

168 "<RESOLUTION>",

kn01-berr.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 202 lines ✨ Summary

This C code handles bus error events on DECstation/DECsystem 3100 and 2100 systems with parity error detection logic. It intercepts and processes bus errors, printing alerts and potentially killing affected processes. The code initializes the system’s Control Register cache and enables parity error detection before handling incoming bus errors.

74 static const char readstr[] = "read";

75 static const char writestr[] = "write";

76 static const char timestr[] = "timeout";

77 static const char paritystr[] = "parity error";

78

133 } else {

134 cycle = invoker ? writestr : readstr;

135 event = timestr;

136 }

137

_msg.rhtml (http://rorptm.googlecode.com/svn/trunk/) Ruby HTML · 9 lines

1 <%=time_ago_in_words(msg.created_on)%>

2 <% if(msg.owner_jid==session['login'])%>

3 <b>me:</b>

lgpl.html (http://rorptm.googlecode.com/svn/trunk/) HTML · 435 lines ✨ Summary

This HTML code outputs a license agreement for the Lesser General Public License (LGPL). It outlines the terms and conditions under which the software can be used, distributed, and modified. The license grants permission to use, modify, and distribute the software, but also imposes restrictions on patent infringement and liability for damages.

282 </P>

283 <P>b) Use a suitable shared library mechanism for linking with the Library. A

284 suitable mechanism is one that (1) uses at run time a copy of the library

285 already present on the user's computer system, rather than copying library

286 functions into the executable, and (2) will operate properly with a modified

344 distributing or modifying the Library or works based on it.

345 </P>

346 <P><STRONG>10.</STRONG> Each time you redistribute the Library (or any work based

347 on the Library), the recipient automatically receives a license from the

348 original licensor to copy, distribute, link with or modify the Library subject

389 </P>

390 <P><STRONG>13.</STRONG> The Free Software Foundation may publish revised and/or new

391 versions of the Lesser General Public License from time to time. Such new

392 versions will be similar in spirit to the present version, but may differ in

393 detail to address new problems or concerns.</P>

xprt.c (http://photon-android.googlecode.com/svn/) C · 1160 lines ✨ Summary

This C code implements a transport layer for RPC (Remote Procedure Call) communications. It manages a pool of slots to handle incoming requests, prioritizes them based on their priority, and ensures that resources are released when no longer needed. The code also handles creation, destruction, and reference management of the transport instance.

540 task->tk_timeout <<= rpc_ntimeo(rtt, timer) + req->rq_retries;

541 if (task->tk_timeout > max_timeout || task->tk_timeout == 0)

542 task->tk_timeout = max_timeout;

559

560 /**

561 * xprt_adjust_timeout - adjust timeout values for next retransmit

562 * @req: RPC request containing parameters to use for the adjustment

563 *

707 task->tk_rqstp->rq_bytes_sent = 0;

708

709 task->tk_timeout = xprt->connect_timeout;

710 rpc_sleep_on(&xprt->pending, task, xprt_connect_status);

711 xprt->stat.connect_start = jiffies;

896 xprt_reset_majortimeo(req);

897 /* Turn off autodisconnect */

898 del_singleshot_timer_sync(&xprt->timer);

899 }

900 } else if (!req->rq_bytes_sent)

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

This Java code defines a custom exception class InvalidHeaderException that extends the built-in IOException. It provides two constructors: one with no message and another with a specified error message, both of which call the superclass constructor to set the error message. This exception is intended to be used when there’s an issue with a TAR archive header.

1 /*

2 ** Authored by Timothy Gerard Endres

3 ** <mailto:time@gjt.org> <http://www.trustice.com>

4 **

5 ** This work has been placed into the public domain.

vm.rst (git://github.com/clawpack/clawpack-4.x.git) ReStructuredText · 251 lines ✨ Summary

This text provides instructions on how to set up and use a virtual machine (VM) for running a Linux environment, specifically XUbuntu 9.10. It covers topics such as installing guest additions, capturing the mouse pointer, resizing the VM window, setting the host key, and troubleshooting issues. The goal is to provide a step-by-step guide for users to set up and use the virtual machine for their needs.

33 configuring it, but it is recommended that you give it at least 512

34 MB; since your computer must host your own operating system at the

35 same time, it is recommended that you have at least 1 GB of total RAM.

36

37 Setting up the VM in VirtualBox

81 Once you have configured the VM in VirtualBox, you can start it by

82 double-clicking it in the list of VM's on your system. The virtual

83 machine will take a little time to start up; as it does, VirtualBox

84 will display a few messages explaining about mouse pointer and

85 keyboard capturing, which you should read.

107 screen), or by clicking the quick-launch icons next to the menu

108 button. By default, you will have quick-launch icons for a terminal

109 window and a web browser. After logging in for the first time, you should start

110 the web browser to make sure your network connection is working.

111

StatefulAgent.java (http://jplurk.googlecode.com/svn/trunk/) Java · 243 lines ✨ Summary

The Java code is a stateful HTTP client implementation for interacting with the Plurk social network. It creates an agent that can execute HTTP requests, including login, timeline retrieval, and file uploads. The agent maintains cookies and session information across requests, allowing for persistent behavior. It also logs debug information and handles exceptions.

226 System.out.println(result);

227

228 result = agent.executePost("/TimeLine/getPlurks",

229 new HashMap<String, String>() {

230 {

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

This Java code is for a graphical user interface (GUI) dialog box that allows users to manage and download macros from a database. It provides features such as sorting, searching, and selecting macros to download. The GUI includes buttons, text fields, and lists to display the available macros and their properties.

76 JLabel label = new JLabel(jEdit.getProperty("install-macros.caption"));

77 infoPanel.add(label);

78 dateLabel = new JLabel(jEdit.getProperty("install-macros.refresh") + " " + MacroList.timestamp);

79 infoPanel.add(dateLabel);

80 refreshList = new JButton(jEdit.getProperty("install-macros.refreshList"));

467 macros.getSelectionModel().addListSelectionListener(new ListHandler());

468 macros.getModel().addTableModelListener(new TableModelHandler());

469 dateLabel.setText(jEdit.getProperty("install-macros.refresh") + " " + MacroList.timestamp);

470 } //}}}

471

cwmain.asp (git://github.com/zhaowe/bc.git) ASP · 409 lines ✨ Summary

This ASP code generates a web page displaying a table of data, likely related to financial records. The table has columns for various fields such as department, year, payment method, and notes. Each row represents a single record, with buttons for editing, viewing details, and going back to the previous page. The page also includes copyright information and a brief message at the bottom.

38 .content4{FONT-SIZE:10PT; LINE-HEIGHT:9PT;}

39 .contentindex{font-family: "ËÎÌå";FONT-SIZE:9pt; LINE-HEIGHT:11pt;}

40 .enter {COLOR: #FFAF02; FONT-FAMILY: "����", "Arial", "Times New Roman"; FONT-SIZE: 11pt; TEXT-DECORATION: none ;font-weight: bold}

41 .head1{FONT-SIZE:11pt; LINE-HEIGHT:18pt; font-weight: bold; }

42 .head2{FONT-SIZE:10pt; LINE-HEIGHT:14pt; font-weight: bold; }

357 <td ><input type="button" value="ÐÞ¸Ä" onclick="javascript: edit(<%=obj("record_id")%>)" id=button1 name=button1></td>

358 <td ><font class="px12" color="black"><%=obj("mnydepm")%></font></td>

359 <td ><font class="px12" color="black"><%=obj("mnyyear")%>��<%=month(obj("mnytime"))%>��</font></td>

360 <td ><font class="px12" color="black"><%=obj("payway")%></font></td>

361 <td ><font class="px12" color="black"><%=obj("mnykm")%></font></td>

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

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

174 /* (returned on Negotiate */

175 int capabilities; /* allow selective disabling of caps by smb sess */

176 int timeAdj; /* Adjust for difference in server time zone in sec */

177 __u16 CurrentMid; /* multiplex id - rotating counter */

178 char cryptKey[CIFS_CRYPTO_KEY_SIZE];

284 unsigned long long time_renames;

285 unsigned long long time_t2renames;

286 unsigned long long time_ffirst;

496 unsigned int cf_nlink;

497 unsigned int cf_dtype;

498 struct timespec cf_atime;

499 struct timespec cf_mtime;

500 struct timespec cf_ctime;

501 };

502

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

This Java code defines a text area component with various features, including folding, popup menus, and caret management. It handles user interactions such as right-clicking, scrolling, and keyboard input to provide a customizable editing experience. The code also integrates with other plugins and services, allowing for advanced functionality like syntax highlighting and code completion.

580 else

581 {

582 // Rebuild popup menu every time the menu is requested.

583 createPopupMenu(evt);

584

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.

384 //always try and exit.

385

386 } catch (RuntimeException e) {

387

388 if ( ! (e instanceof SecurityException) ) {

389

390 System.err.println(

391 "ERROR: Sun's javac just threw a runtime exceptions. " +

392 "Please report this to the current JCompiler maintainer." );

393

438 return false;

439 }

440 long srcTime = srcFile.lastModified();

441 long clsTime = clazzFile.lastModified();

442 if (srcTime >= clsTime)

443 {

444 return true;

QuickNotepad.props (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 68 lines

2 # $Id: QuickNotepad.props 6876 2006-09-02 20:39:49Z jchoyt $

3

4 # jEdit only needs to load the plugin the first time the user accesses it

5 # the presence of this property also tells jEdit the plugin is using the new API

6 plugin.QuickNotepadPlugin.activate=defer

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

14 there is a variable which strictly preserves the name

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.

20

21 There is no need for any runtime test here, since if the

22 code is not functioning properly it will fail to compile.

23 */

pyenum.swg (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 53 lines

40 "$input = from_meth($1_name);";

41 %typemap(throws,fragment=pyfrag) enum SWIGTYPE

42 "PyErr_SetObject(PyExc_RuntimeError, from_meth($1));

43 SWIG_fail;";

44 %enddef

bibliography.collection.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 105 lines

23 <refsection><info><title>Description</title></info>

24

25 <para>Maintaining bibliography entries across a set of documents is tedious, time

26 consuming, and error prone. It makes much more sense, usually, to store all of

27 the bibliography entries in a single place and simply <quote>extract</quote>

Makefile.in.in (https://freespeech.svn.sourceforge.net/svnroot/freespeech) Unknown · 250 lines

103 mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \

104 fi

105 cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id

106

107

LoadLibraryWithNonConstantStringInspection.java (https://bitbucket.org/nbargnesi/idea.git) Java · 95 lines

44 @Override

45 public BaseInspectionVisitor buildVisitor() {

46 return new RuntimeExecVisitor();

47 }

48

49 private static class RuntimeExecVisitor extends BaseInspectionVisitor {

50

51 @Override

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

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

19 //{{{ Imports

20 import javax.swing.event.*;

21 import javax.swing.Timer;

22 import java.awt.event.*;

23 import java.awt.*;

41 caretHandler = new CaretHandler();

42

43 timer = new Timer(0,new ActionListener()

44 {

45 public void actionPerformed(ActionEvent evt)

140 private static boolean tagHighlightEnabled;

141

142 private Timer timer;

143

144 private BufferHandler bufferHandler;

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

This HTML code displays a message explaining how to use abbreviations in an editor, specifically highlighting the shortcut C+; for defining and expanding abbreviations. It provides step-by-step instructions on entering shorthand strings and their expansions, allowing users to save time by using shortcuts. The text is presented in plain text format within an HTML structure.

1 <html><body>Using abbreviations saves a lot of time, by letting you

2 enter long strings using a shorthand notation. To define an

3 abbreviation, enter the desired shorthand string and press <b>C+;</b>.

word_count_functor.flex (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines

5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

6

7 #include <boost/timer.hpp>

8 #if defined(_WIN32)

9 #include <io.h>

42 }

43

44 boost::timer tim;

45 do {

46 tok = yylex();

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

72

73 #if defined Q_OS_HPUX && defined Q_CC_GNU

74 // This error is delivered every time we try to use the fluke CA

75 // certificate. For now we work around this bug. Task 202317.

76 #define QSSLSOCKET_CERTUNTRUSTED_WORKAROUND

109 }

110

111 static bool timeout()

112 {

113 return QTestEventLoop::instance().timeout();

748 QCOMPARE(socket->mode(), QSslSocket::UnencryptedMode);

749 QVERIFY(socket->peerCertificateChain().isEmpty());

750 QVERIFY2(socket->waitForConnected(10000), "Network timeout");

751

752 socket->startClientEncryption();

mipspro.jam (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines

114 flags mipspro.link FINDLIBS-SA <threading>multi : pthread ;

115 flags mipspro.link LIBRARIES <library-file> ;

116 flags mipspro.link LINK-RUNTIME <runtime-link>static : static ;

117 flags mipspro.link LINK-RUNTIME <runtime-link>shared : dynamic ;

125 actions link bind LIBRARIES

126 {

127 "$(CONFIG_COMMAND)" -FE:template_in_elf_section -ptused $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME) -lm

128 }

129

136 actions link.dll bind LIBRARIES

137 {

138 "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -R"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Bdynamic -l$(FINDLIBS-SA) -Bstatic -l$(FINDLIBS-ST) -B$(LINK-RUNTIME)

139 }

140

bf5xx-ac97-pcm.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 469 lines ✨ Summary

This C code implements a DMA (Direct Memory Access) module for ADI Blackfin audio processors, specifically for the AC97 codec. It provides a platform for the Linux kernel to interact with the Blackfin’s DMA capabilities, allowing for efficient audio data transfer between the processor and external memory. The code defines various functions for managing DMA buffers, allocating memory, and registering the platform with the Linux kernel.

57 snd_pcm_uframes_t count)

58 {

59 struct snd_pcm_runtime *runtime = substream->runtime;

60 struct sport_device *sport = runtime->private_data;

244 static int bf5xx_pcm_open(struct snd_pcm_substream *substream)

245 {

246 struct snd_pcm_runtime *runtime = substream->runtime;

247 int ret;

248

271 struct vm_area_struct *vma)

272 {

273 struct snd_pcm_runtime *runtime = substream->runtime;

274 size_t size = vma->vm_end - vma->vm_start;

275 vma->vm_start = (unsigned long)runtime->dma_area;

283 void __user *buf, snd_pcm_uframes_t count)

284 {

285 struct snd_pcm_runtime *runtime = substream->runtime;

286 unsigned int chan_mask = ac97_chan_mask[runtime->channels - 1];

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

This C code implements a driver for the SiS7019 audio accelerator chip, which is used in some older motherboards. It provides a Linux kernel module that allows the chip to be recognized and used by the operating system. The code handles various aspects of the chip’s functionality, including interrupt handling, DMA management, and audio processing.

496 {

497 struct sis7019 *sis = snd_pcm_substream_chip(substream);

498 struct snd_pcm_runtime *runtime = substream->runtime;

499 struct voice *voice = runtime->private_data;

664 {

665 struct sis7019 *sis = snd_pcm_substream_chip(substream);

666 struct snd_pcm_runtime *runtime = substream->runtime;

667 struct voice *voice = &sis->capture_voice;

668 unsigned long flags;

720 {

721 struct sis7019 *sis = snd_pcm_substream_chip(substream);

722 struct snd_pcm_runtime *runtime = substream->runtime;

723 struct voice *timing = voice->timing;

724 void __iomem *play_base = timing->ctrl_base;

821 static int sis_pcm_capture_prepare(struct snd_pcm_substream *substream)

822 {

823 struct snd_pcm_runtime *runtime = substream->runtime;

824 struct voice *voice = runtime->private_data;

verilog.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 220 lines

112 <KEYWORD2>`else</KEYWORD2>

113 <KEYWORD2>`endif</KEYWORD2>

114 <KEYWORD2>`timescale</KEYWORD2>

115 <KEYWORD2>`resetall</KEYWORD2>

116 <KEYWORD2>`signed</KEYWORD2>

136 <KEYWORD3>integer</KEYWORD3>

137 <KEYWORD3>reg</KEYWORD3>

138 <KEYWORD3>time</KEYWORD3>

139 <KEYWORD3>realtime</KEYWORD3>

174 <FUNCTION>$stop</FUNCTION>

175 <FUNCTION>$finish</FUNCTION>

176 <FUNCTION>$time</FUNCTION>

177 <FUNCTION>$stime</FUNCTION>

178 <FUNCTION>$realtime</FUNCTION>

179 <FUNCTION>$settrace</FUNCTION>

180 <FUNCTION>$cleartrace</FUNCTION>

bluepill.conf.erb (git://github.com/37signals/37s_cookbooks.git) Ruby HTML · 15 lines ✨ Summary

This Ruby code defines a Memcached process using Bluepill, a process manager for Ruby applications. It sets up the process to start with a specific command, stop with a kill command, and runs with specified user and group permissions. The process also has configured start and restart times, as well as checks for flapping connections.

7 process.gid = "<%= @group %>"

8

9 process.start_grace_time = 10.seconds

10 process.start_grace_time = 5.seconds

11 process.restart_grace_time = 10.seconds

12

13 process.checks :flapping, :times => 2, :within => 30.seconds, :retry_in => 7.seconds

datetime.d (git://github.com/AlexeyProkhin/phobos.git) D · 7722 lines ✨ Summary

This D code defines a class SysTime that represents a time point with fractional seconds, allowing for precise timing calculations. It provides methods to set and get the time components, as well as convert between different representations (e.g., seconds, fractional seconds). The code also includes tests to verify its functionality under various scenarios.

42 $(D Date) (if they want dates but don't care about time), $(D DateTime)

43 (if they want dates and times but don't care about time zones), $(D SysTime)

44 (if they want the date and time from the OS and/or do care about time

354 if it fails to get the time of day.

355 +/

356 static SysTime currTime(immutable TimeZone tz = LocalTime())

357 {

358 return SysTime(currStdTime, tz);

367 immutable unixTimeD = currTime().toUnixTime();

368 immutable unixTimeC = core.stdc.time.time(null);

369 immutable diff = unixTimeC - unixTimeD;

392 FILETIME fileTime;

393

394 GetSystemTimeAsFileTime(&fileTime);

395

396 ulong tempHNSecs = fileTime.dwHighDateTime;

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

357 }

358

359 bool ThreadCondition::timedWait(Mutex& mutex, double absoluteTime)

360 {

361 if (absoluteTime < currentTime())

369 int timeSeconds = static_cast<int>(absoluteTime);

370 int timeNanoseconds = static_cast<int>((absoluteTime - timeSeconds) * 1E9);

371

372 timespec targetTime;

373 targetTime.tv_sec = timeSeconds;

374 targetTime.tv_nsec = timeNanoseconds;

375

376 return pthread_cond_timedwait(&m_condition, &mutex.impl(), &targetTime) == 0;

377 }

378

ipsec_barf.8.html (https://bitbucket.org/__wp__/mb-linux-msli.git) HTML · 133 lines

128 <A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,

129 using the manual pages.<BR>

130 Time: 05:09:31 GMT, June 19, 2001

131 </BODY>

132 </HTML>

gtk.m4 (git://github.com/xbmc/xbmc.git) m4 · 195 lines ✨ Summary

This M4 code checks if a GTK library is installed and configured correctly on the system. It runs a test program to verify that the correct version of GTK is being used, and provides error messages if the installation is incorrect or missing. If the installation is correct, it substitutes the GTK CFLAGS and LIBS into the build process, allowing the build to use the correct libraries.

132 printf("*** correct copy of gtk-config. (In this case, you will have to\n");

133 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");

134 printf("*** so that the correct libraries are found at run-time))\n");

135 }

136 }

164 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],

165 [ echo "*** The test program compiled, but did not run. This usually means"

166 echo "*** that the run-time linker is not finding GTK or finding the wrong"

167 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"

168 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"

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.

413 your extension to rely upon other shared libraries on your machine. In

414 order for the extension to work, it needs to be able to find all of

415 these libraries at run-time. Otherwise, you may get an error such as

416 the following :</p>

417

436 <ul>

437 <li>Link your extension and explicitly tell the linker where the

438 required libraries are located. Often times, this can be done with a

439 special linker flag such as <tt>-R</tt>, <tt>-rpath</tt>, etc. This

440 is not implemented in a standard manner so read the man pages for your

443

444 <li>Put shared libraries in the same directory as the executable. This

445 technique is sometimes required for correct operation on non-Unix

446 platforms.

447

Unchained & Rovastar - Triptionary.milk (git://github.com/xbmc/xbmc.git) Unknown · 108 lines

101 per_frame_42=mv_b=wave_g;

102 per_frame_43=mv_g=wave_r;

103 per_frame_44=wave_x = 0.5+sin(2*time)/8;

104 per_frame_45=wave_y = 0.5-cos(3*time)/6;

105 per_frame_46=wave_mystery=q5;

106 per_pixel_1=zoom = 1- log(sqrt(2)-rad)/20 - 0.1*sin(rad)- 0.09*cos(1-rad);

107 per_pixel_2=rot = log(sqrt(2)-rad)/3- 0.1*cos(time+rad*0.123) - 0.08*sin(time-(1-rad));

108

alert_service_registry.rb (https://code.google.com/p/google-api-ads-ruby/) Ruby · 47 lines ✨ Summary

This Ruby code defines a class AlertServiceRegistry that manages a registry of alert services, including their methods, types, and namespaces. It provides methods to retrieve method signatures, type signatures, and namespace indices for specific services. The registry also handles exceptions, such as ApiException and ApiException::Error, which can be used to handle errors in the application.

13 class AlertServiceRegistry

14 ALERTSERVICE_METHODS = {:get=>{:input=>[{:name=>:selector, :type=>"AlertSelector", :min_occurs=>0, :max_occurs=>1}], :output=>{:name=>"get_response", :fields=>[{:name=>:rval, :type=>"AlertPage", :min_occurs=>0, :max_occurs=>1}]}}}

15 ALERTSERVICE_TYPES = {:AuthenticationError=>{:fields=>[{:name=>:reason, :type=>"AuthenticationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :AuthorizationError=>{:fields=>[{:name=>:reason, :type=>"AuthorizationError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ClientTermsError=>{:fields=>[{:name=>:reason, :type=>"ClientTermsError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DateError=>{:fields=>[{:name=>:reason, :type=>"DateError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :DistinctError=>{:fields=>[{:name=>:reason, :type=>"DistinctError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :InternalApiError=>{:fields=>[{:name=>:reason, :type=>"InternalApiError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :NotWhitelistedError=>{:fields=>[{:name=>:reason, :type=>"NotWhitelistedError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :Paging=>{:fields=>[{:name=>:start_index, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:number_results, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :QuotaCheckError=>{:fields=>[{:name=>:reason, :type=>"QuotaCheckError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RateExceededError=>{:fields=>[{:name=>:reason, :type=>"RateExceededError.Reason", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:rate_scope, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:retry_after_seconds, :type=>"int", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequestError=>{:fields=>[{:name=>:reason, :type=>"RequestError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :RequiredError=>{:fields=>[{:name=>:reason, :type=>"RequiredError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SizeLimitError=>{:fields=>[{:name=>:reason, :type=>"SizeLimitError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :SoapHeader=>{:fields=>[{:name=>:auth_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:developer_token, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:user_agent, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:validate_only, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}, {:name=>:partial_failure, :type=>"boolean", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :SoapResponseHeader=>{:fields=>[{:name=>:request_id, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:service_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:method_name, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:operations, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:response_time, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:units, :type=>"long", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :DatabaseError=>{:fields=>[{:name=>:reason, :type=>"DatabaseError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError", :ns=>0}, :ApiError=>{:fields=>[{:name=>:field_path, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:error_string, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:api_error_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :ApiException=>{:fields=>[{:name=>:errors, :type=>"ApiError", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"ApplicationException", :ns=>0}, :ApplicationException=>{:fields=>[{:name=>:message, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:application_exception_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :ns=>0}, :Page=>{:fields=>[{:name=>:total_num_entries, :type=>"int", :min_occurs=>0, :max_occurs=>1}, {:name=>:page_type, :type=>"string", :min_occurs=>0, :max_occurs=>1}], :abstract=>true, :ns=>0}, :"AuthenticationError.Reason"=>{:fields=>[], :ns=>0}, :"AuthorizationError.Reason"=>{:fields=>[], :ns=>0}, :"ClientTermsError.Reason"=>{:fields=>[], :ns=>0}, :"DatabaseError.Reason"=>{:fields=>[], :ns=>0}, :"DateError.Reason"=>{:fields=>[], :ns=>0}, :"DistinctError.Reason"=>{:fields=>[], :ns=>0}, :"InternalApiError.Reason"=>{:fields=>[], :ns=>0}, :"NotWhitelistedError.Reason"=>{:fields=>[], :ns=>0}, :"QuotaCheckError.Reason"=>{:fields=>[], :ns=>0}, :"RateExceededError.Reason"=>{:fields=>[], :ns=>0}, :"RequestError.Reason"=>{:fields=>[], :ns=>0}, :"RequiredError.Reason"=>{:fields=>[], :ns=>0}, :"SizeLimitError.Reason"=>{:fields=>[], :ns=>0}, :AlertError=>{:fields=>[{:name=>:reason, :type=>"AlertError.Reason", :min_occurs=>0, :max_occurs=>1}], :base=>"ApiError"}, :AlertQuery=>{:fields=>[{:name=>:client_spec, :type=>"ClientSpec", :min_occurs=>0, :max_occurs=>1}, {:name=>:filter_spec, :type=>"FilterSpec", :min_occurs=>0, :max_occurs=>1}, {:name=>:types, :type=>"AlertType", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:severities, :type=>"AlertSeverity", :min_occurs=>0, :max_occurs=>:unbounded}, {:name=>:trigger_time_spec, :type=>"TriggerTimeSpec", :min_occurs=>0, :max_occurs=>1}, {:name=>:trigger_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_ids, :type=>"long", :min_occurs=>0, :max_occurs=>:unbounded}]}, :AlertSelector=>{:fields=>[{:name=>:query, :type=>"AlertQuery", :min_occurs=>0, :max_occurs=>1}, {:name=>:paging, :type=>"Paging", :min_occurs=>0, :max_occurs=>1}]}, :Detail=>{:fields=>[{:name=>:trigger_time, :type=>"string", :min_occurs=>0, :max_occurs=>1}]}, :Alert=>{:fields=>[{:name=>:alert_severity, :type=>"AlertSeverity", :min_occurs=>0, :max_occurs=>1}, {:name=>:alert_type, :type=>"AlertType", :min_occurs=>0, :max_occurs=>1}, {:name=>:client_customer_id, :type=>"long", :min_occurs=>0, :max_occurs=>1}, {:name=>:details, :type=>"Detail", :min_occurs=>0, :max_occurs=>:unbounded}]}, :AlertPage=>{:fields=>[{:name=>:entries, :type=>"Alert", :min_occurs=>0, :max_occurs=>:unbounded}], :base=>"NoStatsPage"}, :NoStatsPage=>{:fields=>[], :abstract=>true, :base=>"Page"}, :"AlertError.Reason"=>{:fields=>[]}, :AlertSeverity=>{:fields=>[]}, :AlertType=>{:fields=>[]}, :ClientSpec=>{:fields=>[]}, :FilterSpec=>{:fields=>[]}, :TriggerTimeSpec=>{:fields=>[]}}

16 ALERTSERVICE_NAMESPACES = ["https://adwords.google.com/api/adwords/cm/v201109"]

17

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

This Java code defines a custom annotation @None that represents no scope. It is annotated with @Retention(RUNTIME) to make it available at runtime, and @Target({METHOD}) to limit its usage to methods. The @ScopeAnnotation(Scopes.None.class) attribute specifies the scope of this annotation as none, indicating that it does not affect the scope of a method.

30 * @author Mathieu Carbou (mathieu.carbou@gmail.com)

31 */

32 @Retention(RetentionPolicy.RUNTIME)

33 @Target({ElementType.METHOD})

34 @ScopeAnnotation(Scopes.None.class)

template_ns4_runme.py (https://swig.svn.sourceforge.net/svnroot/swig) Python · 6 lines

3 d = make_Class_DD();

4 if d.test() != "test":

5 raise RuntimeError

6

ImageGetter.resx (http://lidgren-network-gen3.googlecode.com/svn/trunk/) Unknown · 120 lines

47 mimetype: application/x-microsoft.net.object.binary.base64

48 value : The object must be serialized with

49 : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter

50 : and then encoded with base64 encoding.

51

52 mimetype: application/x-microsoft.net.object.soap.base64

53 value : The object must be serialized with

54 : System.Runtime.Serialization.Formatters.Soap.SoapFormatter

55 : and then encoded with base64 encoding.

56

iriap.c (http://photon-android.googlecode.com/svn/) C · 1094 lines ✨ Summary

This C code implements a Linux kernel module that provides a file system interface to interact with LM-IAS (Logical Management Interface for Application Server) objects and their attributes. It allows users to list, read, and manipulate LM-IAS objects and their attributes using a sequence-based file system interface. The code also includes watchdog timer functionality to abort queries that take too long.

83 int timeout)

84 {

85 irda_start_timer(&self->watchdog_timer, timeout, self,

86 iriap_watchdog_timer_expired);

196 self->max_header_size = LMP_MAX_HEADER;

197

198 init_timer(&self->watchdog_timer);

199

200 hashbin_insert(iriap, (irda_queue_t *) self, (long) self, NULL);

223 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);

224

225 del_timer(&self->watchdog_timer);

226

227 if (self->request_skb)

307 IRDA_ASSERT(iriap != NULL, return;);

308

309 del_timer(&self->watchdog_timer);

310

311 /* Not needed */

ccs_gscxy_bmcx.asp (git://github.com/zhaowe/bc.git) ASP · 18 lines ✨ Summary

This is a metadata dump from an old ASP website, likely created by Microsoft Visual Studio 6.0. It contains information about the file’s creation and modification dates, author, generator, and other technical details. The output provides a snapshot of the file’s history and properties at the time it was last modified.

2 vti_author:SR|SZX-KFB\\sharpbird

3 vti_modifiedby:SR|SZX-KFB\\sharpbird

4 vti_timecreated:TR|31 Mar 2009 01:56:50 -0000

5 vti_timelastmodified:TR|08 Apr 2009 03:33:27 -0000

9 vti_extenderversion:SR|4.0.2.7802

10 vti_backlinkinfo:VX|

11 vti_nexttolasttimemodified:TR|31 Mar 2009 01:56:50 -0000

12 vti_cacheddtm:TX|31 Mar 2009 01:56:50 -0000

13 vti_cachedlinkinfo:VX|

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

176 SET post:10343 &quot;$owner_id|$time|I'm having fun with Retwis&quot;

177 </pre>As you can se the user id and time of the post are stored directly inside the string, we don't need to lookup by time or user id in the example application so it is better to compact everything inside the post string.<br/><br/>After we create a post we obtain the post id. We need to LPUSH this post id in every user that's following the author of the post, and of course in the list of posts of the author. This is the file update.php that shows how this is performed:<br/><br/><pre class="codeblock python python python python python python python python python python python python python python python python python python python python python" name="code">

178 include(&quot;retwis.php&quot;);

en_ZW.xml (git://github.com/landgraf/matreshka.git) XML · 141 lines

33 </dateFormatLength>

34 </dateFormats>

35 <dateTimeFormats>

36 <intervalFormats>

37 <intervalFormatFallback draft="unconfirmed">{0} - {1}</intervalFormatFallback>

111 </intervalFormatItem>

112 </intervalFormats>

113 </dateTimeFormats>

114 </calendar>

115 </calendars>

116 <timeZoneNames>

117 <metazone type="Africa_Central">

118 <commonlyUsed>true</commonlyUsed>

test__semaphore.py (https://code.google.com/p/gevent/) Python · 27 lines ✨ Summary

This Python code tests the functionality of a Semaphore class from the gevent library, which is used for synchronization and concurrency control. It checks if acquiring a semaphore with a timeout returns False when the timeout is reached, and verifies that releasing a semaphore twice in quick succession still allows subsequent releases to succeed. The test cases ensure the correct behavior of the Semaphore class under different scenarios.

4

5

6 class TestTimeoutAcquire(greentest.TestCase):

7

8 # issue 39

9 def test_acquire_returns_false_after_timeout(self):

10 s = Semaphore(value=0)

11 result = s.acquire(timeout=0.01)