100+ results for 'php stat'

Not the results you expected?

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

34

35 // Required classes

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

37

38 /**

39 * The Data Abstraction Layer (DAL) class for statistics for Advertiser.

40 */

41 class OA_Dal_Statistics_Advertiser extends OA_Dal_Statistics

42 {

43 /**

160

161 /**

162 * This method returns statistics for a given advertiser, broken down by banner.

163 *

164 * @access public

Location.js (https://github.com/stephaneerard/qooxdoo.git) JavaScript · 406 lines

243 '<div id="absolute1" style="position: absolute; top: 300px; left: 400px; margin: 5px; border: 2px solid #000; padding: 3px; width: 100px; height: 100px;">' +

244 ' <div id="relative1" style="position: relative; top: 50px; left: 50px; margin: 5px; border: 2px solid #000; padding: 3px; width: 300px; height: 300px;">' +

245 ' <div id="static1" style="overflow: hidden; position: static; margin: 5px; border: 2px solid #000; padding: 3px; width: 250px; height: 250px;">' +

246 ' <div id="relative2" style="overflow: auto; position: relative; top: 10px; left: 10px; margin: 5px; border: 2px solid #000; padding: 3px; width: 200px; height: 200px;">' +

247 ' <div id="absolute2" style="position: absolute; top: 30px; left: -90px; margin: 5px; border: 2px solid #000; padding: 3px; width: 200px; height: 200px;">' +

248 ' <div id="static2" style="position: static; margin: 10px; border: 2px solid #000; padding: 3px; width: 250px; height: 250px;">' +

249 ' </div>' +

250 ' </div>' +

273 }

274

275 var static1 = document.getElementById("static1");

276 var pos = qx.bom.element.Location.get(static1);

300 }

301

302 var static2 = document.getElementById("static2");

303 var pos = qx.bom.element.Location.get(static2);

mavlink_msg_sensor_offsets.h (https://github.com/pchickey/purple-ardupilot-mega.git) C Header · 386 lines

63 * @return length of the message in bytes (excluding serial stream start sign)

64 */

65 static inline uint16_t mavlink_msg_sensor_offsets_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,

66 int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z, float mag_declination, int32_t raw_press, int32_t raw_temp, float gyro_cal_x, float gyro_cal_y, float gyro_cal_z, float accel_cal_x, float accel_cal_y, float accel_cal_z)

67 {

124 * @return length of the message in bytes (excluding serial stream start sign)

125 */

126 static inline uint16_t mavlink_msg_sensor_offsets_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,

127 mavlink_message_t* msg,

128 int16_t mag_ofs_x,int16_t mag_ofs_y,int16_t mag_ofs_z,float mag_declination,int32_t raw_press,int32_t raw_temp,float gyro_cal_x,float gyro_cal_y,float gyro_cal_z,float accel_cal_x,float accel_cal_y,float accel_cal_z)

174 * @param sensor_offsets C-struct to read the message contents from

175 */

176 static inline uint16_t mavlink_msg_sensor_offsets_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sensor_offsets_t* sensor_offsets)

177 {

178 return mavlink_msg_sensor_offsets_pack(system_id, component_id, msg, sensor_offsets->mag_ofs_x, sensor_offsets->mag_ofs_y, sensor_offsets->mag_ofs_z, sensor_offsets->mag_declination, sensor_offsets->raw_press, sensor_offsets->raw_temp, sensor_offsets->gyro_cal_x, sensor_offsets->gyro_cal_y, sensor_offsets->gyro_cal_z, sensor_offsets->accel_cal_x, sensor_offsets->accel_cal_y, sensor_offsets->accel_cal_z);

deletion_test.cpp (http://hadesmem.googlecode.com/svn/trunk/) C++ · 0 lines ✨ Summary

The code tests various scenarios for removing connections from a signal in Boost.Signals2 library, including removing self-connections, prior connections, after connections, and disconnecting equal connections. It verifies that the output matches the expected values in each test case. The tests cover different edge cases to ensure the library’s functionality is correct.

14 #include <string>

15

16 static boost::signals2::connection connections[5];

17

18 static std::string test_output;

28 std::cout << value << " ";

29

30 test_output += static_cast<char>(value + '0');

31 }

32

38 { return x.value == y.value && x.idx == y.idx; }

39

40 static void

41 test_remove_self()

42 {

content_actionhandler.php (https://github.com/SylvainGuittard/ezlightbox.git) PHP · 364 lines

153 array( 'id' => $lightboxID )

154 );

155 if ( $operationResult['status'] == eZModuleOperationInfo::STATUS_CONTINUE )

156 {

157 $module->redirectTo( $http->sessionVariable( 'LastAccessesURI' ) );

179 array( 'id' => $lightboxID )

180 );

181 if ( $operationResult['status'] == eZModuleOperationInfo::STATUS_CONTINUE )

182 {

183 $redirectURI = $http->hasPostVariable( 'redirectAfterSelectionURI' ) ?

217 );

218

219 if ( $operationResult['status'] == eZModuleOperationInfo::STATUS_CONTINUE )

220 {

221 if ( $http->hasPostVariable( 'RedirectToSearchResult' ) &&

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

1 <?php

2 /**

3 * File containing the eZISBN10To13Converter class.

48

49 $classAttributeList = $db->arrayQuery( $sql );

50 $status = false;

51 if ( count( $classAttributeList ) > 0 )

52 {

60 {

61 $this->AttributeArray[$classAttributeID] = $classAttribute;

62 $status = true;

63 }

64 else

72 }

73

74 return $status;

75 }

76

TSqlMapGateway.php (https://bitbucket.org/volatileeight/prado.git) PHP · 259 lines

89 public function queryForList($statementName, $parameter=null, $result=null, $skip=-1, $max=-1)

90 {

91 $statement = $this->getSqlMapManager()->getMappedStatement($statementName);

92 return $statement->executeQueryForList($this->getDbConnection(),$parameter, $result, $skip, $max);

185 public function queryForMapWithRowDelegate($statementName, $delegate, $parameter=null, $keyProperty=null, $valueProperty=null, $skip=-1, $max=-1)

186 {

187 $statement = $this->getSqlMapManager()->getMappedStatement($statementName);

188 return $statement->executeQueryForMap($this->getDbConnection(), $parameter, $keyProperty, $valueProperty, $skip, $max, $delegate);

207 public function insert($statementName, $parameter=null)

208 {

209 $statement = $this->getSqlMapManager()->getMappedStatement($statementName);

210 return $statement->executeInsert($this->getDbConnection(), $parameter);

226 public function update($statementName, $parameter=null)

227 {

228 $statement = $this->getSqlMapManager()->getMappedStatement($statementName);

229 return $statement->executeUpdate($this->getDbConnection(), $parameter);

lr0.c (https://bitbucket.org/iorivur/freebsd-bhyve-with-suspend-resume.git) C · 599 lines

5 static core *new_state(int symbol);

6 static Value_t get_state(int symbol);

7 static void allocate_itemsets(void);

8 static void allocate_storage(void);

9 static void append_states(void);

10 static void free_storage(void);

11 static void generate_states(void);

12 static void initialize_states(void);

25 static core *this_state;

26 static core *last_state;

27 static shifts *last_shift;

240 p->items[i] = rrhs[start_derives[i]];

241

242 first_state = last_state = this_state = p;

243 nstates = 1;

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

1 <?php

2 class ControllerLocalisationZone extends Controller {

3 private $error = array();

268 $this->data['heading_title'] = $this->language->get('heading_title');

269

270 $this->data['entry_status'] = $this->language->get('entry_status');

271 $this->data['entry_name'] = $this->language->get('entry_name');

272 $this->data['entry_code'] = $this->language->get('entry_code');

333 if (isset($this->request->post['status'])) {

334 $this->data['status'] = $this->request->post['status'];

335 } elseif (!empty($zone_info)) {

336 $this->data['status'] = $zone_info['status'];

337 } else {

338 $this->data['status'] = '1';

339 }

340

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

41 class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy {

42 public:

43 static void initialize();

44

45 private:

139 virtual WTF::String unknownFileSizeText();

140 virtual WTF::String imageTitle(const WTF::String& filename, const WebCore::IntSize&);

141 virtual WTF::String mediaElementLoadingStateText();

142 virtual WTF::String mediaElementLiveBroadcastStateText();

fontif-err.php (https://bitbucket.org/shuangxinyu/emacspack.git) PHP · 340 lines

21 <!-- <dd> -->

22 <!-- <p> -->

23 <!-- <a href="nxhtml.html#php">PHP / nXhtml automatic mode switching</a> is affected: -->

24 <!-- </p> -->

25 <!-- <ul> -->

49 <!-- </ul> -->

50 <!-- </dd> -->

51 <dt id="new-mode-switching" style="margin-top:1em;">I have rewritten the PHP mode switching</dt>

52 <dd>

53 <p>

107 Glued together things so that editing PHP files works

108 as I intended. (This means that Emacs switches between

109 php-mode and nxhtml-part-mode automatically when

110 moving point. And that you can use completion.)

111 </li>

CommitMessage.java (https://bitbucket.org/nbargnesi/idea.git) Java · 179 lines

38 public class CommitMessage extends AbstractDataProviderPanel implements Disposable, CommitMessageI {

39

40 public static final Key<DataContext> DATA_CONTEXT_KEY = Key.create("commit message data context");

41 private final EditorTextField myEditorField;

42 private final Project myProject;

94 }

95

96 private static EditorTextField createEditorField(final Project project, final boolean checkSpelling) {

97 EditorTextField editorField = createCommitTextEditor(project, checkSpelling);

98 editorField.getDocument().putUserData(DATA_CONTEXT_KEY, DataManager.getInstance().getDataContext(editorField.getComponent()));

100 }

101

102 public static EditorTextField createCommitTextEditor(Project project, boolean checkSpelling) {

103 EditorTextFieldProvider service = ServiceManager.getService(project, EditorTextFieldProvider.class);

104 Set<EditorCustomization.Feature> enabledFeatures = EnumSet.of(EditorCustomization.Feature.SOFT_WRAP);

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

This Java code is a unit test for a GUI application called Trang Translator, which converts XML files to XSD files. The test class contains two tests: one that checks the conversion of a DTD file to an XSD file with inline attribute lists enabled and disabled, and another that tests changing the input format from XML to RNC.

18

19 import org.junit.*;

20 import static org.junit.Assert.*;

21 import static org.junit.Assume.*;

29 import org.fest.swing.core.matcher.JButtonMatcher;

30

31 import static org.fest.assertions.Assertions.*;

32

33 import org.gjt.sp.jedit.testframework.Log;

34

35 import static org.gjt.sp.jedit.testframework.TestUtils.*;

36 import static org.gjt.sp.jedit.testframework.EBFixture.*;

54 */

55 public class TrangGUITest{

56 private static File testData;

57

58 @BeforeClass

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

This Java code defines a custom option pane for a text editor, allowing users to configure various settings such as push away mode, layout, and animations. It uses a combination of JComboBox and JCheckBox components to provide a user-friendly interface for setting these options. The changes are saved when the “Save” button is clicked, updating the text editor’s properties accordingly.

11 public class OptionPane extends AbstractOptionPane {

12

13 private static final String PREFIX = "options.mydoggy.";

14 private static final String PUSH_AWAY_MODE_PROP = PREFIX + "pushAwayMode";

15 private static final String PUSH_AWAY_MODE_LABEL = PUSH_AWAY_MODE_PROP + ".label";

16 private static final String USE_ALTERNATE_LAYOUT_PROP = PREFIX + "useAlternateLayout";

17 private static final String USE_ALTERNATE_LAYOUT_LABEL = USE_ALTERNATE_LAYOUT_PROP + ".label";

18 private static final String FLOAT_ON_TOP_PROP = PREFIX + "floatOnTop";

19 private static final String FLOAT_ON_TOP_LABEL = FLOAT_ON_TOP_PROP + ".label";

20 private static final String FLOAT_OS_DECORATIONS_PROP = PREFIX + "floatOsDecorations";

21 private static final String FLOAT_OS_DECORATIONS_LABEL = FLOAT_OS_DECORATIONS_PROP + ".label";

22 private static final String FLOAT_ADD_TO_TASKBAR_PROP = PREFIX + "floatAddToTaskBar";

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

This Java code defines a class BSHPrimarySuffix that extends SimpleNode. It handles suffix operations on objects, such as accessing properties or fields with dot notation (e.g., .class, .length). The class uses reflection to perform these operations and throws exceptions if the operation is invalid.

44 class BSHPrimarySuffix extends SimpleNode

45 {

46 public static final int

47 CLASS = 0,

48 INDEX = 1,

93 Note: This construct is now necessary where the node may be

94 an ambiguous name. If this becomes common we might want to

95 make a static method nodeToObject() or something.

96 */

97 if ( obj instanceof SimpleNode )

WriteOutsideTemplateException.java (https://jedit.svn.sourceforge.net/svnroot/jedit) Java · 11 lines

7 }

8

9 private static final long serialVersionUID = -5750989922808590407L;

10 }

11

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

This is a function that takes two unsigned integers as input and returns an unsigned integer representing the OUI (Organizationally Unique Identifier) of the PHY device. The function first reverses the bits in the two input integers, then combines them into a single 32-bit value using bitwise OR operations. Finally, it reverses the bits again to produce the final output.

67 static miibus_readreg_t miibus_readreg;

68 static miibus_statchg_t miibus_statchg;

69 static miibus_writereg_t miibus_writereg;

90 DEVMETHOD(miibus_readreg, miibus_readreg),

91 DEVMETHOD(miibus_writereg, miibus_writereg),

92 DEVMETHOD(miibus_statchg, miibus_statchg),

93 DEVMETHOD(miibus_linkchg, miibus_linkchg),

94 DEVMETHOD(miibus_mediainit, miibus_mediainit),

327 link_state = LINK_STATE_UP;

328 else

329 link_state = LINK_STATE_DOWN;

330 } else

331 link_state = LINK_STATE_UNKNOWN;

332 if_link_state_change(mii->mii_ifp, link_state);

333 }

334

statistic_tests.cpp (http://hadesmem.googlecode.com/svn/trunk/) C++ · 0 lines ✨ Summary

This C++ code runs a series of tests on various random number generators (RNGs) to verify their correctness and statistical properties. It uses a test framework to execute tests for different RNGs, including uniform distributions, normal distribution, triangular distribution, Cauchy distribution, gamma distribution, exponential distribution, and lognormal distribution. The results are printed to the console.

1 /* statistic_tests.cpp file

2 *

3 * Copyright Jens Maurer 2000, 2002

6 * http://www.boost.org/LICENSE_1_0.txt)

7 *

8 * $Id: statistic_tests.cpp 60755 2010-03-22 00:45:06Z steven_watanabe $

9 *

10 * Revision history

33 #include <boost/math/distributions/lognormal.hpp>

34

35 #include "statistic_tests.hpp"

36 #include "integrate.hpp"

37

96 void run(RNG & rng, int n1, int n2)

97 {

98 boost::math::uniform ud(static_cast<double>((rng.min)()), static_cast<double>((rng.max)()));

99 run(rng, ud, n1, n2);

100 }

AssemblerX86X64.cpp (http://hadesmem.googlecode.com/svn/trunk/) C++ · 3106 lines ✨ Summary

This C++ code is a part of an x86 instruction emulator, specifically handling instructions related to memory and register operations. It processes various instruction types such as MMU (Memory Management Unit) instructions, which manage data transfer between registers and memory, and MOV instructions, which move data between registers or from/to memory. The code generates the necessary assembly code for these instructions based on their operands and operation codes.

69

70 // Write trampoline into code at address @a code that will jump to @a target.

71 static void writeTrampoline(uint8_t* code, void* target)

72 {

73 // Jmp.

210 // is cleared by calling @c setError(ERROR_NONE). If something caused an error

211 // while generating code it's probably fatal in all cases. You can't use

212 // generated code, because you are not sure about its status.

213 if (_error) return false;

214

226 void AssemblerCore::_emitSegmentPrefix(const Operand& rm) ASMJIT_NOTHROW

227 {

228 static const uint8_t segmentPrefixCode[6] =

229 {

230 0x26, // ES

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.

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

70 are denoted in the second column. The third column contains the specific

71 kind of complexity statement. If column three is empty <span class="emphasis"><em><span class="bold"><strong>worst case</strong></span></em></span> complexity is given in the related

72 row.

73 </p>

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

This Java class, LatexPlugin, extends a plugin for an editor (JEdit) and manages LaTeX-related functionality. It adds components to and removes them from an edit bus, which is used to manage components in the editor. The class also handles messages related to LaTeX editing, but currently does nothing with them.

31 extends SideKickPlugin {

32

33 private static List editBusList = new ArrayList();

34

35 //~ Methods ...............................................................

36

37 public static void addToEditBus(EBComponent component){

38 EditBus.addToBus(component);

39 editBusList.add(component);

40 }

41

42 public static void removeFromEditBus(EBComponent component){

43 EditBus.removeFromBus(component);

44 editBusList.remove(component);

SortedSequence.html (http://xbird.googlecode.com/svn/trunk/) HTML · 297 lines ✨ Summary

This is a rendered HTML page that displays the contents of a Java class file, specifically the KeyStrippingIterator class. The code shows the class’s constructor, methods, and fields, providing a detailed view of its implementation. It appears to be generated by a tool such as javadoc or a Java IDE.

46 <FONT color="green">043</FONT> */<a name="line.43"></a>

47 <FONT color="green">044</FONT> public final class SortedSequence extends AbstractSequence implements ISorted {<a name="line.44"></a>

48 <FONT color="green">045</FONT> private static final long serialVersionUID = 4609114921086601562L;<a name="line.45"></a>

49 <FONT color="green">046</FONT> <a name="line.46"></a>

50 <FONT color="green">047</FONT> private final List&lt;Comparable[]&gt; _items;<a name="line.47"></a>

104 <FONT color="green">101</FONT> <a name="line.101"></a>

105 <FONT color="green">102</FONT> private final class Sorter implements Serializable {<a name="line.102"></a>

106 <FONT color="green">103</FONT> private static final long serialVersionUID = -228335655168929136L;<a name="line.103"></a>

107 <FONT color="green">104</FONT> <a name="line.104"></a>

108 <FONT color="green">105</FONT> private boolean done = false;<a name="line.105"></a>

156 <FONT color="green">153</FONT> }<a name="line.153"></a>

157 <FONT color="green">154</FONT> <a name="line.154"></a>

158 <FONT color="green">155</FONT> private static final class KeyComparator implements Comparator&lt;Comparable[]&gt; {<a name="line.155"></a>

159 <FONT color="green">156</FONT> <a name="line.156"></a>

160 <FONT color="green">157</FONT> private final List&lt;OrderSpec&gt; orderSpecs;<a name="line.157"></a>

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

This Java code defines a text expansion system for a programming language. It allows users to define abbreviations with variables, which are replaced by actual values when expanded. The system supports backslashes, tabs, and positional parameters (e.g., $n for the nth parameter). The code provides classes for parsing and generating these expansions, as well as saving and loading them to/from files.

38 public class Abbrevs

39 {

40 public static final String ENCODING = "UTF8";

41

42 //{{{ getExpandOnInput() method

45 * user finishes typing a word.

46 */

47 public static boolean getExpandOnInput()

48 {

49 return expandOnInput;

57 * will automatically attempt to expand the current abbrev

58 */

59 public static void setExpandOnInput(boolean expandOnInput)

60 {

61 Abbrevs.expandOnInput = expandOnInput;

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

This C++ header file defines a class request for non-blocking communication in MPI (Message Passing Interface). It provides methods to wait, test, and cancel pending communications, as well as handle serialized receive operations. The class is designed to be used with the Boost MPI library and includes internal implementation details such as request handling and data storage.

20 namespace boost { namespace mpi {

21

22 class status;

23 class communicator;

24

72 */

73 template<typename T>

74 static optional<status>

75 handle_serialized_irecv(request* self, request_action action);

76

81 */

82 template<typename T>

83 static optional<status>

84 handle_serialized_array_irecv(request* self, request_action action);

85

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

This Java class appears to be a part of the Java Virtual Machine (JVM) implementation, specifically for handling primitive types and method invocation. It provides methods for computing the size of values of different types, adapting JVM instruction opcodes to these types, and determining the opcode for specific instructions like IALOAD or IREM.

38 */

39

40 public final static int VOID = 0;

41

42 /**

44 */

45

46 public final static int BOOLEAN = 1;

47

48 /**

50 */

51

52 public final static int CHAR = 2;

53

54 /**

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

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

396 which actions are available for the selected node(s), check

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

This Java code defines a plugin for the jEdit text editor, specifically a “Quick Open” feature that allows users to quickly open files from a list of recently edited files. The plugin updates its file list when the user selects a new directory or activates a view, and refreshes the list when a buffer is saved. It also provides an action menu entry for quick opening files.

41

42 /** */

43 public static final String NAME = "quickopen";

44

45 /** */

46 public static final String OPTION_PREFIX = "options.quickopen.";

47 private static final ConcurrentMap<View, QuickOpenFrame> frameMap = new ConcurrentHashMap<View, QuickOpenFrame>();

48 protected static final String PROP_EXCLUDE_DIR = "quickopen.exclude-directories";

49 protected static final String PROP_EXCLUDE_EXT = "quickopen.exclude-extensions";

50 protected static final String PROP_INCLUDE_HIDDEN = "quickopen.include-hidden";

51 protected static final String PROP_MAX_FILES = "quickopen.maximum-files";

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

This Java code defines an abstract class ArchiveCommand that provides a common interface for working with different types of archives (tar and zip). It includes methods to get directories from an archive, create input streams for archive paths, and a static method to determine the type of archive based on the input stream.

39

40

41 public static ArchiveCommand getCommand(InputStream in) {

42 if (in instanceof TarInputStream) {

43 return new TarCommand((TarInputStream) in);

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

88 private static final @NonNls String TO_SHORTEN_FQ_NAMES = "toShortenFQNames";

89 private static final @NonNls String USE_STATIC_IMPORT = "useStaticImport";

90

91 private static final @NonNls String DEFAULT_SHORTCUT = "defaultShortcut";

615 template.setDeactivated(Boolean.parseBoolean(element.getAttributeValue(DEACTIVATED)));

616

617 String useStaticImport = element.getAttributeValue(USE_STATIC_IMPORT);

618 if (useStaticImport != null) {

619 template.setValue(TemplateImpl.Property.USE_STATIC_IMPORT_IF_POSSIBLE, Boolean.parseBoolean(useStaticImport));

620 }

621

660 != Template.getDefaultValue(Template.Property.USE_STATIC_IMPORT_IF_POSSIBLE))

661 {

662 element.setAttribute(USE_STATIC_IMPORT, Boolean.toString(template.getValue(Template.Property.USE_STATIC_IMPORT_IF_POSSIBLE)));

663 }

664 if (template.isDeactivated()) {

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.

57 public class BeanShell

58 {

59 private static final String REQUIRED_VERSION = "2.0b1.1-jedit-1";

60

61 //{{{ evalSelection() method

64 * @since jEdit 2.7pre2

65 */

66 public static void evalSelection(View view, JEditTextArea textArea)

67 {

68 String command = textArea.getSelectedText();

82 * @since jEdit 2.7pre2

83 */

84 public static void showEvaluateDialog(View view)

85 {

86 String command = GUIUtilities.input(view,"beanshell-eval-input",null);

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

This HTML code is a Doxygen-generated documentation page for a C++ class template, boost::numeric::ublas::ublas_expression. It provides information about the class, its members, and its usage, with links to related pages and classes. The page includes a table of public types, a detailed description of the class, and a footer with metadata and copyright information.

30 <div class="contents">

31 <h1>boost::numeric::ublas::ublas_expression&lt; E &gt; Class Template Reference</h1><!-- doxytag: class="boost::numeric::ublas::ublas_expression" -->

32 <p>Base class for uBLAS staticaly derived expressions using the the Barton Nackman trick.

33 <a href="#_details">More...</a></p>

34

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

This Java class defines an action to close the InfoViewer application. When executed, it removes a dockable window named “infoviewer” from a View instance (if present) or disposes of the current frame. The action is part of the InfoViewer’s functionality and allows users to close the application.

34 *

35 */

36 private static final long serialVersionUID = -4424449640799402279L;

37

38

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

This C++ header file provides a set of metafunction templates for working with sequences, specifically for finding and manipulating elements at specific positions in a sequence. It includes two main template families: v_item and v_mask, which are used to access and manipulate elements in a sequence, respectively.

42 // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler

43 // breaks if using declaration comes _before_ the new overload

44 static aux::type_wrapper<T> item_(index_);

45 using Base::item_;

46 };

59 typedef v_item type;

60

61 static aux::type_wrapper<T> item_(index_);

62 using Base::item_;

63 };

77 typedef v_mask type;

78

79 static aux::type_wrapper<void_> item_(index_);

80 using Base::item_;

81 };

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

This Java code is part of an icon composer, responsible for managing icons and their states. It retrieves file states, gets error messages, and composes icons from images based on these states. The Helper class provides a way to access classes that may not be available in certain environments, allowing the icon composer to behave correctly.

93

94 try {

95 if(cache[vc_state][0][file_state][msg_state] == null) {

96 Icon tl = null; // vc_state

119 break;

120 }

121 cache[vc_state][0][file_state][msg_state] =

122 composeIcons(baseIcon, tl, tr, bl, br);

123 }

124 baseIcon = cache[vc_state][0][file_state][msg_state];

125 } catch(ArrayIndexOutOfBoundsException ex) {

126 Log.log(Log.WARNING, null, ex);

269 public static int getMessageState(String path) {

270 int msg_state = IconComposer.MSG_STATE_NONE;

271 ErrorSource[] sources = ErrorSource.getErrorSources();

272 for(int i = 0; i < sources.length; i++) {

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.

154 atomic_t num_waiters; /* blocked waiting to get in sendrecv */

155 #endif

156 enum statusEnum tcpStatus; /* what we think the status is */

157 struct mutex srv_mutex;

158 struct task_struct *tsk;

210 struct TCP_Server_Info *server; /* pointer to server info */

211 int ses_count; /* reference counter */

212 enum statusEnum status;

213 unsigned overrideSecFlg; /* if non-zero override global sec flags */

214 __u16 ipc_tid; /* special tid for connection to IPC share */

410 }

411

412 static inline void cifs_stats_bytes_read(struct cifsTconInfo *tcon,

413 unsigned int bytes)

414 {

GalleryView.java (https://bitbucket.org/atchariya/nokia.git) Java · 290 lines

31

32 // Gallery

33 private static final Image ROOT_IMAGE = ImageUtils.loadImage("/root.png");

34 private static final Image FOLDER_IMAGE = ImageUtils.loadImage("/folder.png");

35 private static final Image FILE_IMAGE = ImageUtils.loadImage("/file.png");

36

37 private final OperationsQueue queue;

40

41 // Operation value

42 private final static int OPRATION_INITIAL = 1;

43 private final static int OPRATION_OPEN = 2;

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

This Java code defines a class called BshClassManager that manages the loading of classes for a BeanShell scripting environment. It provides methods to add and remove listeners, reload classes, and set an external class loader. The class also maintains caches of loaded classes and provides methods to clear these caches.

85 {

86 /** Singleton class manager */

87 private static BshClassManager manager;

88 private static boolean checkedForManager;

89 // Use a hashtable as a Set...

90 private static Object NOVALUE = new Object();

91

92 /**

93 An external classloader supplied by the setClassLoader() command.

94 */

95 private static ClassLoader externalClassLoader;

96

97 /**

100 (as opposed to strong or Weak)

101 */

102 protected transient static Hashtable absoluteClassCache = new Hashtable();

103 /**

104 Global cache for things we know are *not* classes.

qeucjpcodec.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ Header · 107 lines

82 class QEucJpCodec : public QTextCodec {

83 public:

84 static QByteArray _name();

85 static QList<QByteArray> _aliases() { return QList<QByteArray>(); }

86 static int _mibEnum();

87

88 QByteArray name() const { return _name(); }

90 int mibEnum() const { return _mibEnum(); }

91

92 QString convertToUnicode(const char *, int, ConverterState *) const;

93 QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;

ManualMapper.cpp (http://hadesmem.googlecode.com/svn/trunk/) C++ · 186 lines ✨ Summary

This C++ code is a manual memory mapper for Windows, allowing users to map a DLL into a target process and execute its exports. It takes command-line arguments for the process ID, module path, and optional export name. The program outputs version information, copyright notice, and elapsed time, then maps the specified DLL into the target process and prints the mapped base address.

156 if (argc > 3)

157 {

158 Export = boost::lexical_cast<std::string>(static_cast<std::wstring>(

159 argv[3]));

160 }

161

162 // Open memory manager

163 HadesMem::MemoryMgr const MyMemory(ProcId == static_cast<DWORD>(-1) ?

164 GetCurrentProcessId() : ProcId);

165

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

This Java class, BufferSwitcher, is a part of an integrated development environment (IDE) for editing files. It creates a dropdown menu that displays a list of available buffers (files being edited). The user can select a buffer from this list and switch to it in the IDE. The class also updates the list of buffers when they change, ensuring the correct buffer is displayed.

1 /*

2 * BufferSwitcher.java - Status bar

3 * Copyright (C) 2000, 2004 Slava Pestov

4 *

cni.i (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 13 lines

2

3 %{

4 #undef STATIC

5 %}

6 %include <gcj/cni.i>

MavenImportingSettings.java (https://bitbucket.org/nbargnesi/idea.git) Java · 271 lines

23

24 public class MavenImportingSettings implements Cloneable {

25 private static final String PROCESS_RESOURCES_PHASE = "process-resources";

26 public static final String[] UPDATE_FOLDERS_PHASES = new String[]{

33 "generate-test-resources",

34 "process-test-resources"};

35 public static final String UPDATE_FOLDERS_DEFAULT_PHASE = PROCESS_RESOURCES_PHASE;

36

37 @NotNull private String dedicatedModuleDir = "";

gtkrc (http://gnome-colors.googlecode.com/svn/trunk/) Unknown · 555 lines

300 }

301

302 style "clearlooks-statusbar"

303 {

304 xthickness = 2

305 engine "clearlooks"

306 {

307 hint = "statusbar"

308 }

309 }

464 widget_class "*<GtkButton>" style "clearlooks-button"

465 widget_class "*<GtkNotebook>" style "clearlooks-notebook"

466 widget_class "*<GtkStatusbar>*" style "clearlooks-statusbar"

467

468 widget_class "*<GtkComboBoxEntry>*" style "clearlooks-comboboxentry"

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.

1 #!/bin/bash

2

3 # Exit with status 1 if any command below fails

4 set -e

5

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

69 #define QT_QWS_DEPTH16_RGB 565

70 #endif

71 static const int qt_rbits = (QT_QWS_DEPTH16_RGB/100);

72 static const int qt_gbits = (QT_QWS_DEPTH16_RGB/10%10);

73 static const int qt_bbits = (QT_QWS_DEPTH16_RGB%10);

74 static const int qt_red_shift = qt_bbits+qt_gbits-(8-qt_rbits);

75 static const int qt_green_shift = qt_bbits-(8-qt_gbits);

76 static const int qt_neg_blue_shift = 8-qt_bbits;

77 static const int qt_blue_mask = (1<<qt_bbits)-1;

78 static const int qt_green_mask = (1<<(qt_gbits+qt_bbits))-(1<<qt_bbits);

79 static const int qt_red_mask = (1<<(qt_rbits+qt_gbits+qt_bbits))-(1<<(qt_gbits+qt_bbits));

80

81 static const int qt_red_rounding_shift = qt_red_shift + qt_rbits;

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

This Java code defines a CommandoThread class that runs commando commands on a console application. It executes a series of commands, handling user input and output, and waits for each command to complete before moving on to the next one. The thread uses Swing utilities for GUI interactions and handles exceptions.

78 public void run()

79 {

80 //{{{ Get confirmation if bad exit status...

81 if(!returnValue[0])

82 {

83 if(GUIUtilities.confirm(view,

84 "commando.exit-status",

85 new String[] { lastCommand[0].command },

86 JOptionPane.YES_NO_OPTION,

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

This Java class represents a member of a Ruby file structure, such as a method or variable. It provides methods for accessing and manipulating its properties, such as name, namespace, and parent-child relationships. The class also implements the Comparable interface to compare members based on their display names.

29 public abstract class Member implements Comparable<Member> {

30

31 protected static final String SELF = "self";

32

33 private static final Member[] EMPTY_MEMBER_ARRAY = new Member[0];

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

This C++ header defines a metafunction sequence_not_equal_to that checks if two sequences are not equal. It uses recursion and template metaprogramming to compare elements of two sequences, returning true if they are equal and false otherwise. The function is designed to work with Boost Fusion’s sequence types.

23

24 template <typename I1, typename I2>

25 static bool

26 call(I1 const&, I2 const&, mpl::true_)

27 {

30

31 template <typename I1, typename I2>

32 static bool

33 call(I1 const& a, I2 const& b, mpl::false_)

34 {

38

39 template <typename I1, typename I2>

40 static bool

41 call(I1 const& a, I2 const& b)

42 {

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.

34 * @since jEdit 2.6pre2

35 */

36 public static VFS.DirectoryEntry[] getCachedDirectory(String url)

37 {

38 url = canon(url);

81 * @since jEdit 2.6pre2

82 */

83 public static void setCachedDirectory(String url, VFS.DirectoryEntry[] directory)

84 {

85 if(cacheDirectory == null)

134 * @since jEdit 2.6pre5

135 */

136 public static void clearCachedDirectory(String url)

137 {

138 url = canon(url);

ScriptingCore.cpp (https://bitbucket.org/Tsiannian/cocos2d-x.git) C++ · 882 lines

10 #include <stdio.h>

11 #include <stdlib.h>

12 #include <sys/stat.h>

13 #include <fcntl.h>

14 #include <vector>

35 std::vector<sc_register_sth> registrationList;

36

37 static void executeJSFunctionFromReservedSpot(JSContext *cx, JSObject *obj,

38 jsval &dataVal, jsval &retval) {

39

52 }

53

54 static void getTouchesFuncName(int eventType, std::string &funcName) {

55 switch(eventType) {

56 case CCTOUCHBEGAN:

CreateAssertPredicate.java (https://bitbucket.org/nbargnesi/idea.git) Java · 90 lines

28

29 public boolean satisfiedBy(PsiElement element) {

30 if (!(element instanceof PsiExpressionStatement)) {

31 return false;

32 }

33 final PsiExpressionStatement statement =

34 (PsiExpressionStatement)element;

35 final PsiExpression expression = statement.getExpression();

36 final PsiElement parent = expression.getParent();

37 if (!(parent instanceof PsiExpressionStatement)) {

47 }

48

49 private static boolean isTestMethod(PsiMethod method) {

50 if (method == null) {

51 return false;

year.hpp (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines

13

14 #include <boost/units/scaled_base_unit.hpp>

15 #include <boost/units/static_rational.hpp>

16 #include <boost/units/scale.hpp>

17 #include <boost/units/base_units/si/second.hpp>

23 namespace metric {

24

25 typedef scaled_base_unit<boost::units::si::second_base_unit, scale<31557600, static_rational<1> > > year_base_unit;

26

27 }

29 template<>

30 struct base_unit_info<metric::year_base_unit> {

31 static const char* name() { return("Julian year"); }

32 static const char* symbol() { return("yr"); }

sync_access_test.cpp (http://hadesmem.googlecode.com/svn/trunk/) C++ · 0 lines ✨ Summary

This C++ code tests the behavior of a memory barrier in a multi-threaded environment. It creates 100 threads that wait on a barrier, then attempt to assert an equality condition (1 == 0) while holding a mutex lock. The test expects this assertion to fail due to the memory barrier preventing concurrent access to shared resources.

11 namespace ut = boost::unit_test;

12

13 static boost::mutex m;

14

15 /// thread execution function

16 static void thread_function(boost::barrier& b)

17 {

18 b.wait(); /// wait until memory barrier allows the execution

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

215 <para>

216 To add an error source to the list of registered error sources, you must call

217 the static <function>registerErrorSource()</function> method of the

218 <classname>errorlist.ErrorSource</classname> class.

219 </para>

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

68

69 private slots:

70 void movieStateChanged(QMovie::MovieState state);

71 void frameChanged(int frame);

72 void setPosition(int frame);

catalog (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 546 lines

327 <MODE NAME="php" FILE="php.xml"

328 FILE_NAME_GLOB="*.{php3,php4,php,phtml,inc}"

329 FIRST_LINE_GLOB="{&lt;?php*,#!/*php*}" />

465 FILE_NAME_GLOB="squid.conf" />

466

467 <MODE NAME="stata_do" FILE="statado.xml"

468 FILE_NAME_GLOB="*.{do}" />

469

470 <MODE NAME="stata_ado" FILE="stataado.xml"

471 FILE_NAME_GLOB="*.{ado}" />

472

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

This Java code creates a graphical user interface (GUI) for adding new actions to an editor. It allows users to select an action set, choose an action from that set, and add it to the editor’s context menu. The GUI includes options for customizing the action’s label and separator. When the “OK” button is clicked, the selected action is added to the editor’s context menu.

101 }

102

103 static class MenuItemCompare implements MiscUtilities.Compare

104 {

105 public int compare(Object obj1, Object obj2)

139 }

140

141 static class MenuItem

142 {

143 String actionName;

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

This C code is part of a file system implementation, specifically for handling Unicode file names on Unix-like systems. It translates file names from a proprietary format to a standard format, replacing non-standard characters with marks and encoding special characters using hexadecimal codes. The code also handles file extensions and CRC (Cyclic Redundancy Check) values.

28 #include "udf_sb.h"

29

30 static int udf_translate_to_linux(uint8_t *, uint8_t *, int, uint8_t *, int);

31

32 static int udf_char_to_ustr(struct ustr *dest, const uint8_t *src, int strlen)

67 * udf_build_ustr_exact

68 */

69 static int udf_build_ustr_exact(struct ustr *dest, dstring *ptr, int exactsize)

70 {

71 if ((!dest) || (!ptr) || (!exactsize))

174 * Written, tested, and released.

175 */

176 static int udf_UTF8toCS0(dstring *ocu, struct ustr *utf, int length)

177 {

178 unsigned c, i, max_val, utf_char;

MethodOverridesPrivateMethodInspection.java (https://bitbucket.org/nbargnesi/idea.git) Java · 93 lines

60 }

61

62 private static class MethodOverridesPrivateMethodVisitor

63 extends BaseInspectionVisitor {

64

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

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

86 -- region with the submachine state. A connection point reference

87 -- references the corresponding definition of a connection point

88 -- pseudostate in the statemachine referenced by the submachinestate.

89

90 not overriding function Get_Connection_Point

186 -- Getter of State::isSimple.

187 --

188 -- A state with isSimple=true is said to be a simple state. A simple state

189 -- does not have any regions and it does not refer to any submachine state

234 -- Specifies conditions that are always true when this state is the

235 -- current state. In protocol state machines, state invariants are

236 -- additional conditions to the preconditions of the outgoing transitions,

237 -- and to the postcondition of the incoming transitions.

244 -- Specifies conditions that are always true when this state is the

245 -- current state. In protocol state machines, state invariants are

246 -- additional conditions to the preconditions of the outgoing transitions,

247 -- and to the postcondition of the incoming transitions.

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.

38 public class InstallMacrosDialog extends EnhancedDialog

39 {

40 static final int INSTALL = 0;

41 static final int UPDATE = 1;

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

This Java code creates a graphical user interface (GUI) dialog box for ignoring files and directories in a Subversion version control system. The dialog allows users to select whether to ignore specific files, directories, or patterns within directories, as well as enable recursive ignoring. It also includes options for canceling the operation and displaying the selected path, filename, pattern, and recursive status.

97 this_dir_pattern_btn.addChangeListener(

98 new ChangeListener() {

99 public void stateChanged( ChangeEvent ae ) {

100 AbstractButton btn = ( AbstractButton ) ae.getSource();

101 pattern_field.setEnabled( btn.isSelected() );

165 }

166

167 public static void main ( String[] args ) {

168 IgnoreDialog dialog = new IgnoreDialog( null, "/home/danson/tmp/test/FormatTest.java" );

169 dialog.setVisible( true );

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

This Java class implements a custom shell for the GDB debugger, specifically designed to work with the MI (Machine Interface) protocol. It extends the BaseShell class and overrides several methods to customize its behavior, including printing information messages and executing commands. The class is part of a larger plugin architecture for the jEdit text editor.

30

31 public class MIShell extends BaseShell {

32 static final String PREFIX = Plugin.OPTION_PREFIX;

33 static final String MI_SHELL_INFO_MSG_PROP = PREFIX + "mi_shell_info_msg";

34 public static final String NAME = "GDB/MI";

35

36 public MIShell() {

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

This C code implements a device driver framework for Linux, specifically designed to work with the Open Firmware (OF) protocol. It provides functions and macros for registering, unregistering, and managing OF-based devices, including probe, remove, suspend, resume, and shutdown operations. The code also defines a bus type that matches OF devices using a custom match function.

20 extern struct device_attribute of_platform_device_attrs[];

21

22 static int of_platform_bus_match(struct device *dev, struct device_driver *drv)

23 {

24 struct of_device *of_dev = to_of_device(dev);

32 }

33

34 static int of_platform_device_probe(struct device *dev)

35 {

36 int error = -ENODEV;

66 }

67

68 static int of_platform_device_suspend(struct device *dev, pm_message_t state)

69 {

70 struct of_device *of_dev = to_of_device(dev);

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.

126

127 //{{{ propertiesChanged() method

128 public static void propertiesChanged()

129 {

130 tagHighlightColor = jEdit.getColorProperty(

137

138 //{{{ Instance variables

139 private static Color tagHighlightColor;

140 private static boolean tagHighlightEnabled;

292 + textArea.getVisibleLines() - 1)

293 {

294 view.getStatus().setMessageAndClear(

295 jEdit.getProperty("view.status.bracket",

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

This C header file provides functionality for managing hardware interrupts on the MN10300 CPU, including tracking interrupt statistics and setting up exception vectors. It defines data structures to store interrupt information and functions to manipulate these structures, as well as a function to acknowledge bad interrupts. The code is part of the Linux kernel’s interrupt handling system.

1 /* MN10300 Hardware IRQ statistics and management

2 *

3 * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.

25 } ____cacheline_aligned irq_cpustat_t;

26

27 #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */

28

29 extern void ack_bad_irq(int irq);

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

This Java code defines a set of listener interfaces and event handlers for various GUI events, such as button clicks, key presses, and window changes. It also provides a method to update an image in a graphical application. The code uses a custom interpreter and call stack system to handle the event handling and method invocation.

126 public void editingStopped(ChangeEvent e) { event("editingStopped", e); }

127 public void editingCanceled(ChangeEvent e) { event("editingCanceled", e); }

128 public void stateChanged(ChangeEvent e) { event("stateChanged", e); }

129 public void insertUpdate(DocumentEvent e) { event("insertUpdate", e); }

130 public void removeUpdate(DocumentEvent e) { event("removeUpdate", e); }

183 public void focusGained(FocusEvent e) { event("focusGained", e); }

184 public void focusLost(FocusEvent e) { event("focusLost", e); }

185 public void itemStateChanged(ItemEvent e) { event("itemStateChanged", e); }

186 public void keyTyped(KeyEvent e) { event("keyTyped", e); }

187 public void keyPressed(KeyEvent e) { event("keyPressed", e); }

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

130

131 bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'ui2QuartzEvent' -> () From: ( | {

132 'Category: stateMaskCompatibility\x7fComment: This mask selects for a bit whose underlying

133 concept is foreign to MacOS; it is mapped to

134 a Mac relevant mask for portability.\x7fModuleInfo: Module: qUI2Events InitialContents: FollowSlot\x7fVisibility: public'

140

141 bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'ui2QuartzEvent' -> () From: ( | {

142 'Category: stateMasks\x7fComment: This mask selects for a bit whose underlying

143 concept is foreign to MacOS; it is mapped to

144 a Mac relevant mask for portability.\x7fModuleInfo: Module: qUI2Events InitialContents: FollowSlot\x7fVisibility: public'

150

151 bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'ui2QuartzEvent' -> () From: ( | {

152 'Category: stateMasks\x7fModuleInfo: Module: qUI2Events InitialContents: FollowSlot\x7fVisibility: public'

153

154 capsLockMask = ( |

Makefile (https://swig.svn.sourceforge.net/svnroot/swig) Makefile · 19 lines ✨ Summary

This Makefile generates a Ruby extension module from a C source file using SWIG. It creates a target called example and another called myruby, depending on whether you run make all or make static. The all target builds the standard example module, while the static target builds a statically linked version of myruby. The clean target removes generated files.

9 TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby

10

11 static::

12 $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \

13 TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static

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

This Java code defines an abstract class Selection that represents a portion of text in a buffer. It provides methods to get the start and end offsets, as well as line numbers, of the selection. The class also extends two concrete classes: Range for ordinary range selections and Rect for rectangular selections.

131 * @since jEdit 3.2pre1

132 */

133 public static class Range extends Selection

134 {

135 //{{{ Range constructor

175 * @since jEdit 3.2pre1

176 */

177 public static class Rect extends Selection

178 {

179 //{{{ Rect constructor

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

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

106 private String word;

107

108 // {{{ Static fields

109 private static ArrayList emptyArrayList = new ArrayList(0);

110

111 // patterns

112 private static Pattern CURR_PROP = Pattern.compile("([\\w-]+):[^:]*$");

113 private static Pattern GET_WORD = Pattern.compile("[^\\s:;{]*$");

114 private static Pattern CAN_COMPLETE = Pattern.compile("[{;][^}]*([\\w-]|:\\s+)$");

115 private static Pattern CAN_COMPLETE_VALUES = Pattern.compile(":[^;}]*$");

116 private static Pattern CAN_COMPLETE_UNITS = Pattern.compile("^\\d+[a-z]+$");

117 private static Pattern CAN_COMPLETE_ALL_UNITS = Pattern.compile("[;:{\\s.]\\d+$");

118 private static Pattern UNIT_START = Pattern.compile("[a-z]+$");

119 // }}}

120

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

This C code implements an Atari mouse driver for Linux, allowing users to interact with a mouse connected to an Atari system. It handles key events and reports relative movement of the mouse cursor to the operating system, providing basic input functionality. The driver is designed to work on Atari systems with specific hardware configurations.

58 MODULE_LICENSE("GPL");

59

60 static int mouse_threshold[2] = {2, 2};

61 module_param_array(mouse_threshold, int, NULL, 0);

62

65 #endif

66

67 static struct input_dev *atamouse_dev;

68

69 static void atamouse_interrupt(char *buf)

93 }

94

95 static int atamouse_open(struct input_dev *dev)

96 {

97 #ifdef FIXED_ATARI_JOYSTICK

xsize.h (https://bitbucket.org/freebsd/freebsd-head/) C++ Header · 111 lines ✨ Summary

This C header file provides functions and macros to safely compute sizes, preventing overflow errors that can cause memory allocation failures. It includes functions for summing and comparing sizes, as well as a macro for multiplying a count by an element size, all with overflow checks to ensure safe computations.

52

53 /* Sum of two sizes, with overflow check. */

54 static inline size_t

55 #if __GNUC__ >= 3

56 __attribute__ ((__pure__))

63

64 /* Sum of three sizes, with overflow check. */

65 static inline size_t

66 #if __GNUC__ >= 3

67 __attribute__ ((__pure__))

73

74 /* Sum of four sizes, with overflow check. */

75 static inline size_t

76 #if __GNUC__ >= 3

77 __attribute__ ((__pure__))

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

79

80 private:

81 static QString toString(const QtMsgType sev);

82

83 const ErrorHandler::Message m_message;

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

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

151 private Graphics offscreenGfx;

152 private int progress;

153 private static final int PROGRESS_HEIGHT = 20;

154 }

155

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

This Java class, CodeObjectType, represents a type of object in a database schema. It provides methods to retrieve text and statement purpose information about code objects, such as their creation prefix and purpose for loading object code. The class is part of a larger SQL plugin system.

61 * @param statementPurpose4List Description of Parameter

62 */

63 public CodeObjectType( String typeString, String statementPurpose4List )

64 {

65 this( typeString, statementPurpose4List, null );

71 *

72 * @param typeString Description of Parameter

73 * @param statementPurpose4Text Description of Parameter

74 * @param statementPurpose4List Description of Parameter

75 */

76 public CodeObjectType( String typeString, String statementPurpose4List, String statementPurpose4Text )

77 {

78 this.typeString = typeString;

79 this.statementPurpose4List = statementPurpose4List != null ? statementPurpose4List : "selectCodeObjectsInSchema";

80 this.statementPurpose4Text = statementPurpose4Text != null ? statementPurpose4Text : "selectCodeObjectLines";

81 }

82

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

47 }

48

49 private static class RuntimeExecVisitor extends BaseInspectionVisitor {

50

51 @Override

PublicStaticArrayFieldInspection.java (https://bitbucket.org/nbargnesi/idea.git) Java · 68 lines

26 import org.jetbrains.annotations.NotNull;

27

28 public class PublicStaticArrayFieldInspection extends BaseInspection {

29

30 @NotNull

31 public String getDisplayName() {

32 return InspectionGadgetsBundle.message(

33 "public.static.array.field.display.name");

34 }

35

44 }

45

46 private static class PublicStaticArrayFieldVisitor

47 extends BaseInspectionVisitor {

48

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

This Java code implements an FTP plugin for a text editor, providing functionality such as browsing and saving files on FTP servers, displaying login dialogs, and managing saved passwords. It integrates with the editor’s virtual file system (VFS) to allow users to interact with FTP servers within the editor.

53 }

54

55 public static void showOpenFTPDialog(View view)

56 {

57 String path = ((FtpVFS)VFSManager.getVFSForProtocol("ftp"))

76 }

77

78 public static void showSaveFTPDialog(View view)

79 {

80 String path = ((FtpVFS)VFSManager.getVFSForProtocol("ftp"))

100 * operation

101 */

102 public static boolean showLoginDialog(Object _session, Component comp)

103 {

104 VFSSession session = (VFSSession)_session;

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

29 used for any purpose.

30

31 A number of plugins are available for jEdit. Unless otherwise stated in

32 the plugin's documentation, each of the plugins is licensed for use and

33 redistribution under the terms of the GNU General Public License (either

soelim.cpp (https://bitbucket.org/freebsd/freebsd-head/) C++ · 309 lines ✨ Summary

This C++ code implements a command-line utility called soelim (short for “source elimination”) that processes input files containing special characters and expands them into equivalent text representations. It is part of the GNU groff package, used to format documentation and other text documents. The program reads input files line by line, replacing special characters with their corresponding text representations.

33

34 // The include search path initially contains only the current directory.

35 static search_path include_search_path(0, 0, 0, 1);

36

37 int compatible_flag = 0;

53 program_name = argv[0];

54 int opt;

55 static const struct option long_options[] = {

56 { "help", no_argument, 0, CHAR_MAX + 1 },

57 { "version", no_argument, 0, 'v' },

169 current_lineno = 1;

170 set_location();

171 enum { START, MIDDLE, HAD_DOT, HAD_s, HAD_so, HAD_l, HAD_lf } state = START;

172 for (;;) {

173 int c = getc(fp);

aclocal.m4 (https://bitbucket.org/freebsd/freebsd-head/) m4 · 905 lines ✨ Summary

This M4 code is a collection of configuration and build scripts for a C library, likely the GNU Binutils. It sets up various macros and functions for building and testing the library, including support for different tar formats, gettext, and other dependencies. The script also includes several external M4 files that provide additional functionality.

387 # test to see if srcdir already configured

388 if test "`cd $srcdir && pwd`" != "`pwd`" &&

389 test -f $srcdir/config.status; then

390 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])

391 fi

447

448

449 # When config.status generates a header, we must update the stamp-h file.

450 # This file resides in the same directory as the config header

451 # that is generated. The stamp files are numbered to have different names.

452

453 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the

454 # loop where config.status creates the headers, so we can generate

455 # our stamp files there.

456 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],

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.

136 public void reportMessage(String message){}

137

138 public void reportStatus(int progress, String message) {

139 Log.log( Log.DEBUG, "JCompiler", " reportProgress()" );

140 SwingUtilities.invokeLater(new BuildUpdater( progress, message ) );

168 }

169

170 public void sendStatus(int progress, String message) {

171

172 Log.log( Log.DEBUG, "JCompiler", " sendStatus()" );

174 //enumerate through all the BuildProgressListeners and report messages

175 for ( int i = 0; i < listeners.size(); ++i ) {

176 Log.log( Log.DEBUG, "JCompiler", " sending status of " + progress );

177 ( (BuildProgressListener)listeners.elementAt(i) ).reportStatus(progress, message);

358

359

360 this.sendStatus( 50, "Starting compiler" );

361

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

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

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

180

181

182 static ULONG STDMETHODCALLTYPE ndis_events_release(IWbemObjectSink *this)

183 {

184 struct ndis_events_data *events = (struct ndis_events_data *) this;

256 wpa_printf(MSG_DEBUG, "MSNdis_StatusMediaSpecificIndication");

257

258 /* This is the StatusBuffer from NdisMIndicateStatus() call */

259 hr = IWbemClassObject_Get(pObj, L"NdisStatusMediaSpecificIndication",

292

293

294 static void ndis_events_adapter_arrival(struct ndis_events_data *events)

295 {

296 wpa_printf(MSG_DEBUG, "MSNdis_NotifyAdapterArrival");

791 events->sink_vtbl.Release = ndis_events_release;

792 events->sink_vtbl.Indicate = ndis_events_indicate;

793 events->sink_vtbl.SetStatus = ndis_events_set_status;

794

795 if (register_async_notification(pSink, events->pSvc) < 0) {

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

170 virtual void reset();

171

172 static const ushort EndOfData;

173 static const ushort EndOfDocument;

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

14 * limitations under the License.

15 */

16 package com.intellij.execution.testframework.sm.runner.states;

17

18 import com.intellij.execution.testframework.CompositePrintable;

30 * @author Roman Chernyatchik

31 */

32 public class TestFailedState extends AbstractState {

33 private final List<String> myPresentationText;

34

35 public TestFailedState(@Nullable final String localizedMessage,

36 @Nullable final String stackTrace)

37 {

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.

52 public class SideKickPlugin extends EditPlugin

53 {

54 private static final String MARKER_SETS_PLUGIN = "marker.MarkerSetsPlugin";

55 private static final String SHOW_TOOL_BAR = "sidekick.showToolBar";

56

57 /** The name of the dockable */

58 public static final String NAME = "sidekick-tree";

59

60 //{{{ Some constants

61 public static final String PARSER_MODE_PROPERTY = "sidekick.parser-mode";

62 public static final String PARSER_PROPERTY = "sidekick.parser";

63 public static final String PARSED_DATA_PROPERTY = "sidekick.parsed-data";

64 public static final String PARSE_COUNT = "sidekick.parse-count";

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

This Java code defines a TemplateDir class, which represents a directory within a templates hierarchy. It scans the templates directory, creates a tree of template files and directories, and generates a string representation of the hierarchy for debugging purposes. The class provides methods to access and manipulate the template directory structure, including adding menu items and retrieving child nodes.

39 {

40 private Vector templateFiles;

41 private static RE backupFilter;

42

43 //Constructors

83 }

84

85 private static void createBackupFilter() throws gnu.regexp.REException {

86 String exp = jEdit.getProperty("backup.prefix") +

87 "\\S+" +

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

41 #endif

42

43 static const HashTableValue JSWebGLUniformLocationTableValues[2] =

44 {

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

48

49 #undef THUNK_GENERATOR

50 static JSC_CONST_HASHTABLE HashTable JSWebGLUniformLocationTable = { 2, 1, JSWebGLUniformLocationTableValues, 0 };

51 /* Hash table for constructor */

52 #if ENABLE(JIT)

56 #endif

57

58 static const HashTableValue JSWebGLUniformLocationConstructorTableValues[1] =

59 {

60 { 0, 0, 0, 0 THUNK_GENERATOR(0) }

TextEditorImpl.java (https://bitbucket.org/nbargnesi/idea.git) Java · 174 lines

91 @Override

92 @NotNull

93 public FileEditorState getState(@NotNull FileEditorStateLevel level) {

94 return myProvider.getStateImpl(myProject, getActiveEditor(), level);

96

97 @Override

98 public void setState(@NotNull final FileEditorState state) {

99 myProvider.setStateImpl(myProject, getActiveEditor(), (TextEditorState)state);

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

This Java code defines a class ASTContinueStatement that represents a continue statement in an ECMAScript parser. It extends SimpleNode and provides methods for accepting visitors, which allows the parser to traverse and analyze the parse tree. The class is part of a larger parsing framework, likely used for compiling or interpreting ECMAScript code.

1 /* Generated By:JJTree: Do not edit this line. ASTContinueStatement.java */

2

3 package sidekick.ecmascript.parser;

4

5 public class ASTContinueStatement extends SimpleNode {

6 public ASTContinueStatement(int id) {

8 }

9

10 public ASTContinueStatement(EcmaScript p, int id) {

11 super(p, id);

12 }

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

126 * type is xs:double(since the <tt>fn:number()</tt> call is in that case superflorous).

127 */

128 virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context,

129 const SequenceType::Ptr &reqType);

130

150

151 private:

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

153 };

154

166 * Infers its cardinality from the argument.

167 */

168 virtual SequenceType::Ptr staticType() const;

169 };

170 }

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

This Java class, CssSideKickPlugin, defines a plugin for CSS sidekick functionality. It contains constants for the plugin’s name and option prefix, which can be used to identify and configure the plugin in a larger application. The class provides no additional functionality beyond defining these constants.

23

24 public class CssSideKickPlugin {

25 public static final String NAME = "csssidekick";

26 public static final String OPTION_PREFIX = "options.csssidekick.";

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

37 @Override

38 public void processIntention(@NotNull PsiElement element) throws IncorrectOperationException {

39 final PsiForeachStatement statement = (PsiForeachStatement)element.getParent();

40 if (statement == null) {

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

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

66 final Project project = statement.getProject();

85 newStatement.append(");");

86 }

87 final PsiStatement body = statement.getBody();

88 if (body == null) {

89 return;

102 newStatement.append('}');

103 replaceStatementAndShorten(newStatement.toString(), statement);

104 }

105

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

45 RootObject* rootObject() const;

46

47 virtual void setValueAt(ExecState*, unsigned int index, JSValue) const;

48 virtual JSValue valueAt(ExecState*, unsigned int index) const;

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

52

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

54

55 private:

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

46 enum SocketStreamState { Connecting, Open, Closed };

47 virtual ~SocketStreamHandleBase() { }

48 SocketStreamState state() const;

49

50 bool send(const char* data, int length);

65 SocketStreamHandleClient* m_client;

66 Vector<char> m_buffer;

67 SocketStreamState m_state;

68 };

69

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

117 }

118

119 void ChromeClientWinCE::setStatusbarVisible(bool)

120 {

121 notImplemented();

122 }

123

124 bool ChromeClientWinCE::statusbarVisible()

125 {

126 notImplemented();

209 }

210

211 void ChromeClientWinCE::setStatusbarText(const String&)

212 {

213 notImplemented();

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

24 */

25

26 #ifndef TextCheckerState_h

27 #define TextCheckerState_h

31 namespace WebKit {

32

33 struct TextCheckerState {

34 bool isContinuousSpellCheckingEnabled;

35 bool isGrammarCheckingEnabled;

47

48 namespace CoreIPC {

49 template<> struct ArgumentCoder<WebKit::TextCheckerState> : SimpleArgumentCoder<WebKit::TextCheckerState> { };

50 };

51

52 #endif // TextCheckerState_h

53

Makefile (https://swig.svn.sourceforge.net/svnroot/swig) Makefile · 24 lines ✨ Summary

This Makefile defines a build system for generating OCaml bindings from C++ code using SWIG. It provides targets for building static and dynamic libraries, as well as cleaning up intermediate files. The all target is the default, which builds both static and dynamic versions of the library. The check target simply checks that all dependencies are met before proceeding with the build.

6 PROGFILE = runme.ml

7

8 all default:: static

9

10 static::

11 $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \

12 PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \

13 ocaml_static_cpp

14

15 dynamic::

icdozrhi.xpm (http://micropolis.googlecode.com/svn/trunk/) Unknown · 51 lines

1 /* XPM */

2 static char *noname[] = {

3 /* width height ncolors chars_per_pixel */

4 "34 34 9 1",

std_multiset.i (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 51 lines

21 template <class T>

22 struct traits_asptr<std::multiset<T> > {

23 static int asptr(VALUE obj, std::multiset<T> **m) {

24 return traits_asptr_stdseq<std::multiset<T> >::asptr(obj, m);

25 }

28 template <class T>

29 struct traits_from<std::multiset<T> > {

30 static VALUE from(const std::multiset<T>& vec) {

31 return traits_from_stdseq<std::multiset<T> >::from(vec);

32 }

testclosure.c (git://github.com/stevedekorte/io.git) C · 71 lines ✨ Summary

This C code tests a closure function that takes a struct as an argument and prints its fields to the console. It creates a struct, prepares a CIF (C Interface File) for the closure, allocates memory for the closure, and then calls the closure with the struct as an argument, verifying that the output matches the expected values.

23 }

24

25 static void

26 cls_struct_combined_gn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,

27 void** args, void* userdata __UNUSED__)

help-doc.html (https://svn.apache.org/repos/asf/incubator/droids/) text · 0 lines

152 <H3>

153 Constant Field Values</H3>

154 The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.

155 <P>

156 <FONT SIZE="-1">

libtasn1.h (git://github.com/xbmc/xbmc.git) C++ Header · 217 lines ✨ Summary

This is a C++ header file for the LIBTASN1 library, which provides functions and data structures for working with ASN.1 (Abstract Syntax Notation One) definitions. It defines constants, structures, and functions for parsing, encoding, and decoding ASN.1 data, including DER (Distinguished Encoding Rules) encoding and decoding.

123 #define ASN1_TYPE_EMPTY NULL

124

125 struct static_struct_asn

126 {

127 const char *name; /* Node name */

130 };

131

132 typedef struct static_struct_asn ASN1_ARRAY_TYPE;

133

134

gtkmm2.spec (git://github.com/repoforge/rpms.git) Unknown · 116 lines

34 can be freely combined to quickly create complex user interfaces.

35

36 The gtkmm devel package contains the static libraries and header files

37 needed for developing GTK+ (GIMP ToolKit) applications in C++.

38

43

44 %build

45 %configure --enable-static

46 %{__make} %{?_smp_mflags}

47

native.scala (git://github.com/greedy/scala-llvm.git) Scala · 23 lines ✨ Summary

This is a Scala annotation that marks a method as “native”, indicating it’s implemented in native code and should not be compiled to bytecode. The @native annotation allows for native methods, which are functions written in a language other than Scala (e.g., C or C++), to be used within the Scala API.

21 *

22 * @since 2.6 */

23 class native extends annotation.StaticAnnotation {}

24

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

This is a C++ header file that defines an interface for a spell checker. It provides methods for setting and getting documents, checking words, replacing words, ignoring words, adding and removing words from personal dictionaries, and managing supported dictionaries. The interface is designed to be used by other components of the Mozilla browser.

58 public:

59

60 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISPELLCHECKER_IID)

61

62 /**

155 };

156

157 NS_DEFINE_STATIC_IID_ACCESSOR(nsISpellChecker, NS_ISPELLCHECKER_IID)

158

159 #endif // nsISpellChecker_h__

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

This Java code tests a native library called “aggregate” by loading and verifying its functionality. It checks that the move() function returns the correct results for valid input directions (UP, DOWN, LEFT, RIGHT) and raises an exception when given invalid input (0). If any of these tests fail, it prints an error message and exits with a non-zero status code.

4 public class aggregate_runme {

5

6 static {

7 try {

8 System.loadLibrary("aggregate");

13 }

14

15 public static void main(String argv[]) {

16

17 // Confirm that move() returns correct results under normal use

HTTP.java (http://ftr-gwt-library.googlecode.com/svn/trunk/) Java · 167 lines ✨ Summary

This Java code converts between HTTP header strings and JSON objects. It can parse an HTTP header string into a JSON object, and vice versa. The toJSONObject method takes an HTTP header string and returns a JSON object containing its elements and attributes, while the toString method takes a JSON object and returns an equivalent HTTP header string.

38

39 /** Carriage return/line feed. */

40 public static final String CRLF = "\r\n";

41

42 /**

51 * <pre>{

52 * "HTTP-Version": "HTTP/1.1" (for example),

53 * "Status-Code": "200" (for example),

54 * "Reason-Phrase": "OK" (for example)

55 * }</pre>

72 * @throws JSONException

73 */

74 public static JSONObject toJSONObject(String string) throws JSONException {

75 JSONObject o = new JSONObject();

76 HTTPTokener x = new HTTPTokener(string);

CCMenu.h (git://github.com/kstenerud/ObjectAL-for-iPhone.git) C Header · 0 lines ✨ Summary

This is a C header file for a CCMenu class, which is part of the cocos2d framework for iPhone development. It defines a menu system that can be customized with various alignment options and has properties such as opacity and color. The class allows adding items dynamically and conforms to certain protocols.

31

32 typedef enum {

33 kMenuStateWaiting,

34 kMenuStateTrackingTouch

35 } MenuState;

36

37 /** A CCMenu

43 @interface CCMenu : CCLayer <CCRGBAProtocol>

44 {

45 MenuState state;

46 CCMenuItem *selectedItem;

47 GLubyte opacity_;

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

This is a C header file that defines various data structures and functions for managing multicast (multicast) functionality on a network device. It provides an interface for joining, leaving, and manipulating multicast groups, as well as handling incoming multicast packets. The code appears to be part of the Linux kernel’s networking subsystem.

132 #include <linux/in.h>

133

134 static inline struct igmphdr *igmp_hdr(const struct sk_buff *skb)

135 {

136 return (struct igmphdr *)skb_transport_header(skb);

137 }

138

139 static inline struct igmpv3_report *

140 igmpv3_report_hdr(const struct sk_buff *skb)

141 {

143 }

144

145 static inline struct igmpv3_query *

146 igmpv3_query_hdr(const struct sk_buff *skb)

147 {