100+ results for 'php print'
Not the results you expected?
ParseException.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 193 lines
✨ Summary
This Java code defines a custom exception class ParseException
that is used to handle parsing errors in a parser generated by JavaCC. It provides constructors for creating exceptions with different information, such as the current token and expected tokens, and a method to generate an error message based on this information. The exception can be thrown when a parsing error occurs during the execution of the parser.
This Java code defines a custom exception class ParseException
that is used to handle parsing errors in a parser generated by JavaCC. It provides constructors for creating exceptions with different information, such as the current token and expected tokens, and a method to generate an error message based on this information. The exception can be thrown when a parsing error occurs during the execution of the parser.
22 * This constructor calls its super class with the empty string
23 * to force the "toString" method of parent class "Throwable" to
24 * print the error message in the form:
25 * ParseException: <result of getMessage>
26 */
91 * error message and returns it. If this object has been created
92 * due to a parse error, and you do not catch it (it gets thrown
93 * from the parser), then this method is called during the printing
94 * of the final stack trace, and hence the correct error message
95 * gets displayed.
CommandLineReader.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 108 lines
✨ Summary
This Java code creates a CommandLineReader
class that extends FilterReader
. It reads input from the standard input stream, replacing empty lines with ;\n
, allowing for more pleasant interaction on the command line. The reader is tested in a simple main method that continuously prints the read characters.
This Java code creates a CommandLineReader
class that extends FilterReader
. It reads input from the standard input stream, replacing empty lines with ;\n
, allowing for more pleasant interaction on the command line. The reader is tested in a simple main method that continuously prints the read characters.
zone.php (https://bitbucket.org/sandeepbhaskar/inspiredliving.git) PHP · 441 lines
1 <?php
2 class ControllerLocalisationZone extends Controller {
3 private $error = array();
411 if ($store_total) {
412 $this->error['warning'] = sprintf($this->language->get('error_store'), $store_total);
413 }
417 if ($address_total) {
418 $this->error['warning'] = sprintf($this->language->get('error_address'), $address_total);
419 }
423 if ($affiliate_total) {
424 $this->error['warning'] = sprintf($this->language->get('error_affiliate'), $affiliate_total);
425 }
class-cp-user-relationships.php (https://gitlab.com/dev73/clusterpress) PHP · 543 lines
1 <?php
2 /**
3 * ClusterPress User Relationships.
401 $sql = array(
402 'select' => sprintf( 'SELECT %s FROM %s', esc_sql( $column ), $this->table ),
403 'where' => array(),
404 );
466 $sql = array(
467 'select' => sprintf( 'SELECT count( %s ) FROM %s', esc_sql( $column ), $this->table ),
468 'where' => array(),
469 );
477 if ( $group_by && in_array( $group_by, array( 'user_id', 'primary_id', 'secondary_id' ) ) ) {
478 $sql['select'] = sprintf( 'SELECT DISTINCT %s, count( %s ) as count FROM %s', esc_sql( $group_by ), esc_sql( $column ), $this->table );
479 $sql['groupby'] = sprintf( 'GROUP BY %s', esc_sql( $group_by ) );
DefaultOptions.php (https://github.com/Exercise/symfony.git) PHP · 320 lines
1 <?php
3 /*
18 * Helper for specifying and resolving inter-dependent options.
19 *
20 * Options are a common pattern for initializing classes in PHP. Avoiding the
21 * problems related to this approach is however a non-trivial task. Usually,
22 * both classes and subclasses should be able to set default option values.
294 if (count($diff) > 1) {
295 throw new InvalidOptionException(sprintf('The options "%s" do not exist. Known options are: "%s"', implode('", "', $diff), implode('", "', $knownOptions)));
296 }
298 if (count($diff) > 0) {
299 throw new InvalidOptionException(sprintf('The option "%s" does not exist. Known options are: "%s"', current($diff), implode('", "', $knownOptions)));
300 }
301 }
length_class.php (https://bitbucket.org/elena_dyavolova/omf.git) PHP · 412 lines
TestPortletManagementInterface.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 215 lines
46 fail("The given registration handle was incorrect");
47 } catch (RemoteException e) {
48 e.printStackTrace();
49 }
50 }
61 fail("The given portlet handle was incorrect");
62 } catch (RemoteException e) {
63 e.printStackTrace();
64 }
65 }
196 for (int i = 0; i < propArray.length; i++) {
197 property = propArray[i];
198 System.out.println("prop : "+property.getName());
199 if ("test-prop".equals(property.getName())) {
200 assertEquals("test-value", property.getStringValue());
JSONObject.cs (https://bitbucket.org/Werring/unity-indusim.git) C# · 343 lines
7 /*
8 * http://www.opensource.org/licenses/lgpl-2.1.php
9 * JSONObject class
10 * for use with Unity
204 }
205 public JSONObject Copy() {
206 return new JSONObject(print());
207 }
208 /*
233 }// else left.list.Add(right.list);
234 }
235 public string print() {
236 return print(0);
237 }
238 public string print(int depth) { //Convert the JSONObject into a stiring
239 if(depth++ > MAX_DEPTH) {
240 Debug.Log("reached max depth!");
BufferPrinter1_3.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 114 lines
✨ Summary
This Java class, BufferPrinter1_3
, controls printing from a JEdit buffer. It sets up print jobs with customizable options such as orientation, paper size, and font. The class provides methods to get the current print job, set up page formats, and print the contents of a buffer. It also handles user input for print settings through dialog boxes.
This Java class, BufferPrinter1_3
, controls printing from a JEdit buffer. It sets up print jobs with customizable options such as orientation, paper size, and font. The class provides methods to get the current print job, set up page formats, and print the contents of a buffer. It also handles user input for print settings through dialog boxes.
35 private static PrinterJob getPrintJob()
36 {
37 job = PrinterJob.getPrinterJob();
39 int orientation = jEdit.getIntegerProperty("print.orientation",PageFormat.PORTRAIT);
91 Font font = jEdit.getFontProperty("print.font");
93 BufferPrintable printable = new BufferPrintable(job,null,view,
94 buffer,font,header,footer,lineNumbers,color);
95 job.setPrintable(printable,format);
98 return;
100 printable.print();
101 } //}}}
ezbenchmarkrunner.php (https://github.com/GunioRobot/ezpublish.git) PHP · 293 lines
1 <?php
2 /**
3 * File containing the eZBenchmarkrunner class.
11 /*!
12 \class eZBenchmarkrunner ezbenchmarkrunner.php
13 \brief The class eZBenchmarkrunner does
193 \virtual
194 \protected
195 Called whenever a test is run, can be overriden to print out the test result immediately.
196 */
197 function display( $result, $repeatCount )
ext_zlib.php (https://github.com/tstarling/hiphop-php.git) PHP · 376 lines
1 <?hh
2 // @generated by docskel.php
4 /**
61 * library.
62 * @param int $encoding_mode - The encoding mode. Can be FORCE_GZIP (the
63 * default) or FORCE_DEFLATE. Prior to PHP 5.4.0, using FORCE_DEFLATE
64 * results in a standard zlib deflated string (inclusive zlib headers)
65 * after a gzip file header but without the trailing crc32 checksum. In
66 * PHP 5.4.0 and later, FORCE_DEFLATE generates RFC 1950 compliant
67 * output, consisting of a zlib header, the deflated data, and an Adler
68 * checksum.
298 * @return int - Returns the number of (uncompressed) bytes read from the
299 * file. If an error occurs, FALSE is returned and unless the function
300 * was called as @readgzfile, an error message is printed.
301 */
302 <<__Native>>
TextDataTest.php (https://gitlab.com/Iftekhar_ramim/stock_management) PHP · 365 lines
13 define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
14 }
15 require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
17 PHPExcel_Calculation_Functions::setCompatibilityMode(PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL);
169 $args = func_get_args();
170 $expectedResult = array_pop($args);
171 $result = call_user_func_array(array('PHPExcel_Calculation_TextData','STRINGLENGTH'),$args);
172 $this->assertEquals($expectedResult, $result);
173 }
265 $args = func_get_args();
266 $expectedResult = array_pop($args);
267 $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TRIMNONPRINTABLE'),$args);
268 $this->assertEquals($expectedResult, $result);
269 }
ast_tree_output.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 550 lines
1 <?php
2 /**
3 * File containing the ezcTemplateAstNodeGenerator class
434 /**
435 * visitPrintAstNode
436 *
437 * @param ezcTemplatePrintAstNode $node
438 * @return void
439 */
440 public function visitPrintAstNode( ezcTemplatePrintAstNode $node )
441 {
442 $this->text .= $this->outputNode( $node );
Route.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 594 lines
vec.c (https://github.com/llucax/dmd.git) C · 656 lines
58 if (vec_count != 0)
59 {
60 printf("vec_count = %d\n",vec_count);
61 assert(0);
62 }
120 vec_dim(v) = dim;
121 vec_numbits(v) = numbits;
122 /*printf("vec_calloc(%d): v = %p vec_numbits = %d vec_dim = %d\n",
123 numbits,v,vec_numbits(v),vec_dim(v));*/
124 vec_count++;
167 void vec_free(vec_t v)
168 {
169 /*printf("vec_free(%p)\n",v);*/
170 if (v)
171 { size_t dim = vec_dim(v);
ListenerOptions.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 396 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
89 if (!is_array($modulePaths) && !$modulePaths instanceof Traversable) {
90 throw new Exception\InvalidArgumentException(
91 sprintf(
92 'Argument passed to %s::%s() must be an array, '
93 . 'implement the Traversable interface, or be an '
135 if (!is_array($configGlobPaths) && !$configGlobPaths instanceof Traversable) {
136 throw new Exception\InvalidArgumentException(
137 sprintf(
138 'Argument passed to %s::%s() must be an array, '
139 . 'implement the Traversable interface, or be an '
161 if (!is_array($configStaticPaths) && !$configStaticPaths instanceof Traversable) {
162 throw new Exception\InvalidArgumentException(
163 sprintf(
164 'Argument passed to %s::%s() must be an array, '
165 . 'implement the Traversable interface, or be an '
voucher.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 263 lines
1 <?php
2 class ControllerAccountVoucher extends Controller {
3 private $error = array();
14 if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
15 $this->session->data['vouchers'][mt_rand()] = array(
16 'description' => sprintf($this->language->get('text_for'), $this->currency->format($this->currency->convert($this->request->post['amount'], $this->currency->getCode(), $this->config->get('config_currency'))), $this->request->post['to_name']),
17 'to_name' => $this->request->post['to_name'],
18 'to_email' => $this->request->post['to_email'],
58 $this->data['entry_theme'] = $this->language->get('entry_theme');
59 $this->data['entry_message'] = $this->language->get('entry_message');
60 $this->data['entry_amount'] = sprintf($this->language->get('entry_amount'), $this->currency->format($this->config->get('config_voucher_min')), $this->currency->format($this->config->get('config_voucher_max')));
62 $this->data['button_continue'] = $this->language->get('button_continue');
248 if (($this->currency->convert($this->request->post['amount'], $this->currency->getCode(), $this->config->get('config_currency')) < $this->config->get('config_voucher_min')) || ($this->currency->convert($this->request->post['amount'], $this->currency->getCode(), $this->config->get('config_currency')) > $this->config->get('config_voucher_max'))) {
249 $this->error['amount'] = sprintf($this->language->get('error_amount'), $this->currency->format($this->config->get('config_voucher_min')), $this->currency->format($this->config->get('config_voucher_max')) . ' ' . $this->currency->getCode());
250 }
xil_testcache.c (https://gitlab.com/21mece13/FreeRTOS) C · 371 lines
64 #include "xil_types.h"
66 extern void xil_printf(const char8 *ctrl1, ...);
68 #define DATA_LENGTH 128
96 INTPTR Value;
98 xil_printf("-- Cache Range Test --\n\r");
100 for (Index = 0; Index < DATA_LENGTH; Index++)
101 Data[Index] = 0xA0A00505;
103 xil_printf(" initialize Data done:\r\n");
105 Xil_DCacheFlushRange((INTPTR)Data, DATA_LENGTH * sizeof(INTPTR));
GetDeviceBrowserStats.php (https://gitlab.com/i-have-a-green/digitemis-v3) PHP · 403 lines
1 <?php
2 /**
3 * GetDeviceBrowserStats
4 *
5 * PHP version 5
6 *
7 * @category Class
390 public function __toString()
391 {
392 if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
393 return json_encode(
394 ObjectSerializer::sanitizeForSerialization($this),
395 JSON_PRETTY_PRINT
396 );
397 }
show2.php (https://gitlab.com/redwan4re/web-apps-php-26) PHP · 182 lines
13 <!-- /theme JS files -->
15 <?php include_once 'header.php'; ?>
16 <!-- Page container -->
17 <div class="page-container">
40 <!-- detached sidebar -->
41 <?php include_once 'sidebar.php'; ?>
42 <!-- /sidebar -->
59 <a type="button" class="btn bg-teal btn-labeled" href="edit.php?id=<?php echo $oneData['unique_id']; ?>"><b><i class="icon-pencil7"></i></b> Edit Course</a>
61 <a type="button" onclick="return checkDelete()" class="btn bg-teal btn-labeled" href="trash.php?id=<?php echo $oneData['unique_id']; ?>"><b><i class="icon-close2"></i></b> Disable Course</a>
63 </div>
180 </script>
182 <?php include_once 'footer.php'; ?>
xm_xpath_date_time_value.e (git://github.com/gobo-eiffel/gobo.git) Specman e · 428 lines
SqlServerGrammar.php (https://bitbucket.org/larryg/powerhut.git) PHP · 435 lines
40 * Compile a create table command.
41 *
42 * @param \Illuminate\Database\Schema\Blueprint $blueprint
43 * @param \Illuminate\Support\Fluent $command
44 * @return string
130 * Compile a drop column command.
131 *
132 * @param \Illuminate\Database\Schema\Blueprint $blueprint
133 * @param \Illuminate\Support\Fluent $command
134 * @return string
398 * @return string|null
399 */
400 protected function modifyNullable(Blueprint $blueprint, Fluent $column)
401 {
402 return $column->nullable ? ' null' : ' not null';
LogResultsPanel.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 389 lines
✨ Summary
This Java code creates a graphical user interface (GUI) for displaying and managing version control system (VCS) data, specifically for the Subversion (SVN) repository. It allows users to view and compare changes between different revisions of files, perform actions such as copying and undeleting deleted files, and display file differences. The GUI includes features like zooming and context menus with options for various actions.
This Java code creates a graphical user interface (GUI) for displaying and managing version control system (VCS) data, specifically for the Subversion (SVN) repository. It allows users to view and compare changes between different revisions of files, perform actions such as copying and undeleting deleted files, and display file differences. The GUI includes features like zooming and context menus with options for various actions.
CBRoot.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 304 lines
✨ Summary
This Java code is part of a CodeBrowser application, which parses ctags files to generate a tree-like structure representing file contents and their corresponding tags. It creates child nodes based on the parsed data and provides methods for expanding paths and sorting children in a JTree component. The class implements the TreeNode interface to provide access to its children and other properties.
This Java code is part of a CodeBrowser application, which parses ctags files to generate a tree-like structure representing file contents and their corresponding tags. It creates child nodes based on the parsed data and provides methods for expanding paths and sorting children in a JTree component. The class implements the TreeNode interface to provide access to its children and other properties.
71 public void parse(String path,String lang)
72 {
73 if(DEBUG) System.err.println("Parsing "+path);
74 children=new Vector();
75 //if(lang.equals("text")) return;
83 try
84 {
85 //System.err.println("Starting ctags...");
86 String[] args;
113 }
114 /*
115 System.err.println("Args: ");
116 for(int i=0;i<args.length;i++)
117 {
menu_button.cpp (git://pkgs.fedoraproject.org/pingus) C++ · 133 lines
71 gc.draw(surface_p,Vector2i(x_pos, y_pos));
72 gc.draw(highlight, Vector2i(x_pos, y_pos));
73 gc.print_center(font_large, Vector2i(x_pos, y_pos - 28), text);
74 }
75 else
76 {
77 gc.draw(surface_p, Vector2i(x_pos, y_pos));
78 gc.print_center(font_large, Vector2i(x_pos, y_pos - 28), text);
79 }
80 }
TokenMgrError.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 134 lines
✨ Summary
This Java code defines a custom exception class TokenMgrError
that extends the built-in Error
class. It provides constants for different types of errors, such as lexical errors and infinite loops in the token manager. The class also includes methods to customize error messages and constructors for creating instances of this exception with various parameters.
This Java code defines a custom exception class TokenMgrError
that extends the built-in Error
class. It provides constants for different types of errors, such as lexical errors and infinite loops in the token manager. The class also includes methods to customize error messages and constructors for creating instances of this exception with various parameters.
test10a.in (https://bitbucket.org/ultra_iter/vim-qt.git) Autoconf · 73 lines
postscript.ps (git://github.com/AdamHarte/hello-world.git) Unknown · 2 lines
LabelTableModel.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 93 lines
✨ Summary
This Java class, LabelTableModel
, extends AbstractTableModel
to provide a table model for displaying data related to LaTeX assets. It takes a list of LaTeXAsset
objects and provides methods for getting column names, row counts, and values at specific rows and columns. The table model is designed to display reference, section, and file information for each asset in the list.
This Java class, LabelTableModel
, extends AbstractTableModel
to provide a table model for displaying data related to LaTeX assets. It takes a list of LaTeXAsset
objects and provides methods for getting column names, row counts, and values at specific rows and columns. The table model is designed to display reference, section, and file information for each asset in the list.
acinclude.m4
(https://freespeech.svn.sourceforge.net/svnroot/freespeech)
m4 · 158 lines
✨ Summary
The M4 code defines several macros for handling module options, file searching, and library configuration. It checks for the presence of FFTW libraries and includes, and substitutes variables with the found values. The AC_MODULE_OPT
macro enables or disables a module based on user input, while AC_FIND_FILE
searches for files in multiple directories. The AC_LIBTOOL_ACC_KLUDGE
macro modifies libtool configuration to use aCC instead of ld.
The M4 code defines several macros for handling module options, file searching, and library configuration. It checks for the presence of FFTW libraries and includes, and substitutes variables with the found values. The AC_MODULE_OPT
macro enables or disables a module based on user input, while AC_FIND_FILE
searches for files in multiple directories. The AC_LIBTOOL_ACC_KLUDGE
macro modifies libtool configuration to use aCC instead of ld.
ParseException.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 304 lines
✨ Summary
This Java code defines a custom exception class ParseException
that extends the built-in Exception
class. It provides additional information about parsing errors, including the location in the source file where the error occurred and the expected input. The class overrides several methods to provide more detailed error messages and includes utility methods for escaping special characters and formatting line numbers.
This Java code defines a custom exception class ParseException
that extends the built-in Exception
class. It provides additional information about parsing errors, including the location in the source file where the error occurred and the expected input. The class overrides several methods to provide more detailed error messages and includes utility methods for escaping special characters and formatting line numbers.
17 setErrorSourceFile()
18 getErrorSourceFile()
19 - Modified getMessage() to print more tersely except on debug
20 (removed "Was expecting one of...)
21 - Added sourceFile info to getMessage()
72 * This constructor calls its super class with the empty string
73 * to force the "toString" method of parent class "Throwable" to
74 * print the error message in the form:
75 * ParseException: <result of getMessage>
76 */
154 * error message and returns it. If this object has been created
155 * due to a parse error, and you do not catch it (it gets thrown
156 * from the parser), then this method is called during the printing
157 * of the final stack trace, and hence the correct error message
158 * gets displayed.
saa7134-go7007.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 533 lines
✨ Summary
This C code implements a Linux driver for a SAA713X-based video capture card, specifically designed for the Voyager board. It provides interfaces for V4L2 and ALSA to interact with the device, handling tasks such as booting the encoder, registering the interface, and managing the video stream. The code also includes functions for initializing and cleaning up the driver.
This C code implements a Linux driver for a SAA713X-based video capture card, specifically designed for the Voyager board. It provides interfaces for V4L2 and ALSA to interact with the device, handling tasks such as booting the encoder, registering the interface, and managing the video stream. The code also includes functions for initializing and cleaning up the driver.
162 status = saa_readb(SAA7134_GPIO_GPSTATUS2);
163 /*printk(KERN_DEBUG "status is %s\n", status & 0x40 ? "OK" : "not OK"); */
165 /* enter command mode...(?) */
171 saa_setb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN);
172 status = saa_readb(SAA7134_GPIO_GPSTATUS2);
173 /*printk(KERN_INFO "gpio is %08x\n", saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2)); */
174 } while (--count > 0);
177 if (go7007_read_interrupt(go, &intr_val, &intr_data) < 0 ||
178 (intr_val & ~0x1) != 0x55aa) {
179 printk(KERN_ERR
180 "saa7134-go7007: unable to reset the GO7007\n");
181 return -1;
refcount_runme.rb (https://swig.svn.sourceforge.net/svnroot/swig) Ruby · 22 lines
state_switcher.hpp
(http://hadesmem.googlecode.com/svn/trunk/)
C++ Header · 0 lines
✨ Summary
This C++ header file provides a set of parsers and utilities for working with lexer states in Boost.Spirit, a parser generator library. It defines two main parsers: state_switcher
for switching between lexer states during parsing, and state_switcher_context
for executing embedded sub-parsers within a specific state. The code also includes utility functions for creating these parsers from terminal expressions.
This C++ header file provides a set of parsers and utilities for working with lexer states in Boost.Spirit, a parser generator library. It defines two main parsers: state_switcher
for switching between lexer states during parsing, and state_switcher_context
for executing embedded sub-parsers within a specific state. The code also includes utility functions for creating these parsers from terminal expressions.
v3.7.3.html (https://bitbucket.org/ultra_iter/qt-vtl.git) HTML · 230 lines
99 and YClipPathUnits tags.
101 <li> tif_dirinfo.c, tif_dir.h, tif_dir.c, tif_print.c: Make
102 DocumentName, Artist, HostComputer, ImageDescription, Make, Model,
103 Copyright, DateTime, PageName, TextureFormat, TextureWrapModes and
104 TargetPrinter tags custom.
106 <li> tif_jpeg.c: Cleanup the codec state depending on TIFF_CODERSETUP
112 http://bugzilla.remotesensing.org/show_bug.cgi?id=845</a>
114 <li> tif_dirinfo.c, tif_print.c: TIFFFetchByteArray() returns
115 uint16 array when fetching the BYTE and SBYTE fields, so we should
116 consider result as pointer to uint16 array and not as array of chars.
mdio-gpio.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 299 lines
✨ Summary
This C code implements a generic driver for an MDIO (Media Interface Bus) bus using GPIO (General Purpose Input/Output) pins on a Linux system. It provides a platform-independent way to emulate an MDIO bus, allowing it to be used with various devices that require an MDIO interface. The driver is designed to work with both non-OF and OF-based systems.
This C code implements a generic driver for an MDIO (Media Interface Bus) bus using GPIO (General Purpose Input/Output) pins on a Linux system. It provides a platform-independent way to emulate an MDIO bus, allowing it to be used with various devices that require an MDIO interface. The driver is designed to work with both non-OF and OF-based systems.
JCompilerShell.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 236 lines
✨ Summary
This Java code implements a shell for the JCompiler plugin, allowing users to interact with the compiler through a console interface. It handles commands such as compiling, rebuilding packages, and executing javac commands, while also providing error handling and output management. The shell is designed to work within the JEdit text editor environment.
This Java code implements a shell for the JCompiler plugin, allowing users to interact with the compiler through a console interface. It handles commands such as compiling, rebuilding packages, and executing javac commands, while also providing error handling and output management. The shell is designed to work within the JEdit text editor environment.
53 /**
54 * print an information message.
55 *
56 * @param output where to put the information
57 */
58 public void printInfoMessage(Output output)
59 {
60 output.print(null, jEdit.getProperty("jcompiler.msg.info"));
64 /**
65 * prints a prompt to the specified console.
66 *
67 * @param console the console.
Tiger.jj (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 4099 lines
malloc-private.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 170 lines
ant.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 95 lines
DownloadAnalysis.java
(http://alageospatialportal.googlecode.com/svn/trunk/)
Java · 105 lines
✨ Summary
This Java code analyzes a downloaded zip file, extracts its contents, and sends relevant data to an ALA Logger. It checks for a specific CSV file named “samples.csv” within the zip archive, reads its contents, and then uses a CitationService class to post information about the data resource to the logger.
This Java code analyzes a downloaded zip file, extracts its contents, and sends relevant data to an ALA Logger. It checks for a specific CSV file named “samples.csv” within the zip archive, reads its contents, and then uses a CitationService class to post information about the data resource to the logger.
47 ename = outputdir + ename;
49 System.out.println("File is csv: " + ename + " > " + (ename.endsWith(".csv")));
50 if (ename.equalsIgnoreCase("samples.csv")) {
52 System.out.println("outputdir: " + outputdir);
54 int len = 0;
91 } catch (Exception e) {
92 System.out.println("Unable to analyse zip file:");
93 e.printStackTrace(System.out);
test_igamma_inva.cpp
(http://hadesmem.googlecode.com/svn/trunk/)
C++ · 0 lines
✨ Summary
This C++ code runs a series of tests for the gamma function and its inverse, including incomplete gamma functions with varying sizes of input data. The tests verify that the functions produce accurate results for different types of floating-point numbers (float, double, long double) and concepts (real_concept). The output indicates whether each test passes or fails, providing a report on the accuracy of the implemented math functions.
This C++ code runs a series of tests for the gamma function and its inverse, including incomplete gamma functions with varying sizes of input data. The tests verify that the functions produce accurate results for different types of floating-point numbers (float, double, long double) and concepts (real_concept). The output indicates whether each test passes or fails, providing a report on the accuracy of the implemented math functions.
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.
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.
133 }
134 } catch ( ClassNotFoundException e ) {
135 //System.err.println("No class manager available.");
136 } catch ( Exception e ) {
137 System.err.println("Error loading classmanager: "+e);
347 public abstract void removeListener( Listener l );
349 public abstract void dump( PrintWriter pw );
351 protected abstract void classLoaderChanged();
ctype.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 32 lines
✨ Summary
This C code defines a locale-independent, ASCII ctype (character type) table named sane_ctype
. It maps each ASCII character to one of several categories: space (S
), alpha (A
), digit (D
), glob special characters (G
), regex special characters (R
), and printable characters with extra properties (P
). The table is used for string manipulation and validation.
This C code defines a locale-independent, ASCII ctype (character type) table named sane_ctype
. It maps each ASCII character to one of several categories: space (S
), alpha (A
), digit (D
), glob special characters (G
), regex special characters (R
), and printable characters with extra properties (P
). The table is used for string manipulation and validation.
jEditException.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 97 lines
✨ Summary
This Java code defines a custom exception class jEditException
that extends the built-in Exception
class. It provides additional functionality for printing stack traces, including nested exceptions, to standard error and various output streams. The class allows for more informative error messages and debugging capabilities in a jEdit plugin context.
This Java code defines a custom exception class jEditException
that extends the built-in Exception
class. It provides additional functionality for printing stack traces, including nested exceptions, to standard error and various output streams. The class allows for more informative error messages and debugging capabilities in a jEdit plugin context.
69 /**
70 * Prints the stack trace to the given <code>PrintWriter</code>.
71 *
72 * @param writer Description of Parameter
73 */
74 public void printStackTrace( PrintWriter writer )
75 {
76 super.printStackTrace( writer );
84 /**
85 * Prints this <code>Throwable</code> and its backtrace to a given <code>PrintStream</code>
86 * .
87 *
ComplexSchemaValidation19.xsd (https://bitbucket.org/nbargnesi/idea.git) XML Schema · 14453 lines
468 <xs:attribute name="labelColor" type="xs:string">
469 <xs:annotation>
470 <xs:documentation>Type:String - Color of the label printing the scale values</xs:documentation>
471 </xs:annotation>
472 </xs:attribute>
473 <xs:attribute name="labelSize" type="xs:string">
474 <xs:annotation>
475 <xs:documentation>Type:Number - Size of the label printing the scale values</xs:documentation>
476 </xs:annotation>
477 </xs:attribute>
493 <xs:attribute name="postString" type="xs:string">
494 <xs:annotation>
495 <xs:documentation>Type:Number - String that is printed before values.</xs:documentation>
496 </xs:annotation>
497 </xs:attribute>
dlmdebug.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 1056 lines
✨ Summary
This C code is part of a Linux kernel module that provides debugging functionality for a distributed lock manager (DLM). It creates and manages debug files in the /sys/debugfs
directory, allowing users to inspect various aspects of DLM operation, such as its state, locking behavior, and memory usage. The code uses the debugfs
subsystem to create and manage these debug files.
This C code is part of a Linux kernel module that provides debugging functionality for a distributed lock manager (DLM). It creates and manages debug files in the /sys/debugfs
directory, allowing users to inspect various aspects of DLM operation, such as its state, locking behavior, and memory usage. The code uses the debugfs
subsystem to create and manage these debug files.
ConsoleBeanShell.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 97 lines
✨ Summary
This Java code defines a ConsoleBeanShell
class that executes commands in jEdit’s BeanShell interpreter. It provides methods for printing information messages, executing commands, stopping the console, and waiting for user input. The class is designed to work with jEdit’s console interface, allowing users to interact with the BeanShell interpreter from within the editor.
This Java code defines a ConsoleBeanShell
class that executes commands in jEdit’s BeanShell interpreter. It provides methods for printing information messages, executing commands, stopping the console, and waiting for user input. The class is designed to work with jEdit’s console interface, allowing users to interact with the BeanShell interpreter from within the editor.
26 import bsh.EvalError;
27 import bsh.NameSpace;
28 import java.io.PrintWriter;
29 import java.io.StringWriter;
30 import org.gjt.sp.jedit.BeanShell;
42 } //}}}
44 //{{{ printInfoMessage() method
45 public void printInfoMessage(Output output)
46 {
47 output.print(null,jEdit.getProperty("console.beanshell.info"));
48 } //}}}
76 {
77 StringWriter s = new StringWriter();
78 e.printStackTrace(new PrintWriter(s));
79 error.print(console.getErrorColor(),s.toString());
SystemShell.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1202 lines
✨ Summary
This Java code defines a SystemShell class that provides functionality for interacting with the operating system, including navigating directories and executing commands. It uses a ConsoleState singleton to store information about the current process and directory stack. The code also includes methods for changing drives, setting the current directory, and handling errors.
This Java code defines a SystemShell class that provides functionality for interacting with the operating system, including navigating directories and executing commands. It uses a ConsoleState singleton to store information about the current process and directory stack. The code also includes methods for changing drives, setting the current directory, and handling errors.
106 } // }}}
108 // {{{ printInfoMessage() method
109 public void printInfoMessage(Output output)
110 {
111 if (jEdit.getBooleanProperty("console.shell.info.toggle"))
112 output.print(null, jEdit.getProperty("console.shell.info"));
113 } // }}}
115 // {{{ printPrompt()
116 /**
117 * Prints a prompt to the specified console.
120 * The output
121 */
122 public void printPrompt(Console console, Output output)
123 {
124 ConsoleState cstate = getConsoleState(console);
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.
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.
114 if (cmp_id != 8 && cmp_id != 16) {
115 memset(utf_o, 0, sizeof(struct ustr));
116 printk(KERN_ERR "udf: unknown compression code (%d) stri=%s\n",
117 cmp_id, ocu_i->u_name);
118 return 0;
242 error_out:
243 ocu[++u_len] = '?';
244 printk(KERN_DEBUG "udf: bad UTF-8 character\n");
245 }
267 if (cmp_id != 8 && cmp_id != 16) {
268 memset(utf_o, 0, sizeof(struct ustr));
269 printk(KERN_ERR "udf: unknown compression code (%d) stri=%s\n",
270 cmp_id, ocu_i->u_name);
271 return 0;
ModeConfig.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 160 lines
✨ Summary
This Java class, ModeConfig
, represents a configuration for a text editor mode. It stores and manages settings such as enabled status, line size preference, strip on 0 indent, and multiple strip configurations. The class provides methods to add, remove, move, and evaluate strip configurations, as well as store and load the configuration from properties files.
This Java class, ModeConfig
, represents a configuration for a text editor mode. It stores and manages settings such as enabled status, line size preference, strip on 0 indent, and multiple strip configurations. The class provides methods to add, remove, move, and evaluate strip configurations, as well as store and load the configuration from properties files.
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.
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.
42 }
44 public void printInfoMessage (Output output) {
45 output.print(getConsole().getPlainColor(),
47 }
49 public void printPrompt(Console console, Output output)
50 {
51 // No prompt - prompt given by gdb/mi itself
55 if (s.endsWith("\n"))
56 s = s.substring(0, s.length() - 1);
57 print(s);
58 }
59 @Override
pl-sql.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 503 lines
201 <KEYWORD1>NOAUDIT</KEYWORD1>
202 <KEYWORD1>NOCOMPRESS</KEYWORD1>
203 <KEYWORD1>NOPRINT</KEYWORD1>
204 <KEYWORD1>NOWAIT</KEYWORD1>
205 <KEYWORD1>NULL</KEYWORD1>
226 <KEYWORD1>POSITIVEN</KEYWORD1>
227 <KEYWORD1>PRAGMA</KEYWORD1>
228 <KEYWORD1>PRINT</KEYWORD1>
229 <KEYWORD1>PRIMARY</KEYWORD1>
230 <KEYWORD1>PRIOR</KEYWORD1>
TemplateFile.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 217 lines
✨ Summary
This Java class represents a file within the templates directory hierarchy, providing information about the template and its label. It acts as a proxy for a Template object, allowing access to the template’s properties and behavior. The class implements the TreeNode interface, enabling it to be used in a tree-like data structure.
This Java class represents a file within the templates directory hierarchy, providing information about the template and its label. It acts as a proxy for a Template object, allowing access to the template’s properties and behavior. The class implements the TreeNode interface, enabling it to be used in a tree-like data structure.
XInsertHandler.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 146 lines
✨ Summary
This Java code is a parser for XML-insert files, specifically designed to handle Jext files. It processes the XML file and extracts data from it, storing it in an XTree object. The parser handles various elements such as MENU, VARIABLE, ITEM, and others, and stores their corresponding values in the XTree object.
This Java code is a parser for XML-insert files, specifically designed to handle Jext files. It processes the XML file and extracts data from it, storing it in an XTree object. The parser handles various elements such as MENU, VARIABLE, ITEM, and others, and stores their corresponding values in the XTree object.
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.
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.
TigerLabeler.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 787 lines
✨ Summary
This Java code is part of a class that generates HTML labels for Java syntax elements, such as methods, fields, and classes. It takes into account various options to customize the appearance of these labels, including icons, formatting, and alignment. The output is an HTML string that can be used in a graphical user interface or other application.
This Java code is part of a class that generates HTML labels for Java syntax elements, such as methods, fields, and classes. It takes into account various options to customize the appearance of these labels, including icons, formatting, and alignment. The output is an HTML string that can be used in a graphical user interface or other application.
sh7763rdp_defconfig (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 1237 lines
ver.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 44 lines
✨ Summary
This C code defines a Linux kernel module that prints its version string to the console when requested. It includes copyright and licensing information, and provides a description of the module’s functionality. The ocfs2_print_version
function is called by the MODULE_DESCRIPTION
macro, which also specifies the module’s version as defined in the OCFS2_BUILD_VERSION
constant.
This C code defines a Linux kernel module that prints its version string to the console when requested. It includes copyright and licensing information, and provides a description of the module’s functionality. The ocfs2_print_version
function is called by the MODULE_DESCRIPTION
macro, which also specifies the module’s version as defined in the OCFS2_BUILD_VERSION
constant.
LICENSE-2.0.txt (https://bitbucket.org/nbargnesi/idea.git) Plain Text · 202 lines
malloc.c (https://bitbucket.org/ultra_iter/qt-vtl.git) C · 5515 lines
268 ABORT default: defined as abort()
269 Defines how to abort on failed checks. On most systems, a failed
270 check cannot die with an "assert" or even print an informative
271 message, because the underlying print routines in turn call malloc,
744 #define dlmalloc_stats malloc_stats
745 #define dlmalloc_usable_size malloc_usable_size
746 #define dlmalloc_footprint malloc_footprint
747 #define dlmalloc_max_footprint malloc_max_footprint
851 /*
852 malloc_footprint();
853 Returns the number of bytes obtained from the system. The total
854 number of bytes allocated by malloc, realloc etc., is less than this
858 so results might not be up to date.
859 */
860 size_t dlmalloc_footprint(void);
862 /*
awk.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 116 lines
SystemShellBuiltIn.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 732 lines
✨ Summary
This Java code defines a set of shell commands for a console plugin, including cd
, pwd
, pushd
, popd
, and others. It provides basic directory navigation functionality, allowing users to change directories, print their current working directory, and manage aliases and variables. The commands are designed to work within the context of a text editor or IDE, likely for a Java-based project.
This Java code defines a set of shell commands for a console plugin, including cd
, pwd
, pushd
, popd
, and others. It provides basic directory navigation functionality, allowing users to change directories, print their current working directory, and manage aliases and variables. The commands are designed to work within the context of a text editor or IDE, likely for a Java-based project.
105 else if(arg.equals("--help"))
106 {
107 error.print(null,help);
108 return;
109 } //}}}
140 {
141 String[] pp = { longName };
142 error.print(console.getErrorColor(),
143 jEdit.getProperty("console.shell.bad-opt-long",pp));
144 return;
150 {
151 String[] pp = { longName };
152 error.print(console.getErrorColor(),
153 jEdit.getProperty("console.shell.no-arg-long",pp));
154 return;
painting.pri (https://bitbucket.org/ultra_iter/qt-vtl.git) Unknown · 277 lines
31 painting/qpolygon.h \
32 painting/qpolygonclipper_p.h \
33 painting/qprintengine.h \
34 painting/qprintengine_pdf_p.h \
35 painting/qprintengine_ps_p.h \
36 painting/qprinter.h \
37 painting/qprinter_p.h \
38 painting/qprinterinfo.h \
39 painting/qprinterinfo_p.h \
40 painting/qrasterizer_p.h \
41 painting/qregion.h \
75 painting/qpen.cpp \
76 painting/qpolygon.cpp \
77 painting/qprintengine_pdf.cpp \
78 painting/qprintengine_ps.cpp \
SVNData.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 275 lines
✨ Summary
This Java class, SVNData, is a base class for containing data to pass to subversion commands. It provides getter and setter methods for various parameters such as output streams, paths, username, password, recursive mode, force, dry run, and remote repository. The class also includes serialization and deserialization capabilities, allowing it to be stored or transmitted.
This Java class, SVNData, is a base class for containing data to pass to subversion commands. It provides getter and setter methods for various parameters such as output streams, paths, username, password, recursive mode, force, dry run, and remote repository. The class also includes serialization and deserialization capabilities, allowing it to be stored or transmitted.
32 import java.lang.reflect.Field;
33 import java.util.*;
34 import ise.plugin.svn.io.ConsolePrintStream;
35 import ise.plugin.svn.library.PasswordHandler;
36 import ise.plugin.svn.library.PrivilegedAccessor;
43 private static final long serialVersionUID = 42L;
45 private transient ConsolePrintStream out;
46 private transient ConsolePrintStream err;
56 public SVNData() {}
58 public SVNData( ConsolePrintStream out,
59 ConsolePrintStream err,
73 * Returns the value of out.
74 */
75 public ConsolePrintStream getOut() {
76 return out;
77 }
MyDoggyWindowManager.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 605 lines
✨ Summary
This Java code implements a docking area manager for a graphical user interface (GUI). It manages tool windows, which are floating panels that can be docked to specific areas of the GUI. The code provides methods for showing and hiding tool windows, managing their visibility and activation, and updating their properties based on user preferences.
This Java code implements a docking area manager for a graphical user interface (GUI). It manages tool windows, which are floating panels that can be docked to specific areas of the GUI. The code provides methods for showing and hiding tool windows, managing their visibility and activation, and updating their properties based on user preferences.
CopyAction.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 325 lines
✨ Summary
This Java code implements a “Copy” action for an integrated development environment (IDE). It allows users to copy files from one location to another, either within the same repository or between different repositories. The action creates a new process that performs the copy operation and displays the results in the IDE’s UI.
This Java code implements a “Copy” action for an integrated development environment (IDE). It allows users to copy files from one location to another, either within the same repository or between different repositories. The action creates a new process that performs the copy operation and displays the results in the IDE’s UI.
38 import ise.plugin.svn.gui.CopyResultsPanel;
39 import ise.plugin.svn.gui.ErrorPanel;
40 import ise.plugin.svn.io.ConsolePrintStream;
41 import ise.plugin.svn.library.swingworker.*;
102 data.setPassword( getPassword() );
104 data.setOut( new ConsolePrintStream( getView() ) );
106 getView().getDockableWindowManager().showDockableWindow( "subversion" );
237 catch ( Exception e ) {
238 errorMessage = e.getMessage();
239 data.getOut().printError( errorMessage );
240 e.printStackTrace();
250 boolean cancelled = super.cancel( mayInterruptIfRunning );
251 if ( cancelled ) {
252 data.getOut().printError( "Stopped 'Copy' action." );
253 data.getOut().close();
254 }
CommandManager.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 157 lines
✨ Summary
This Java code implements a command manager for a Perl debugger. It manages a queue of commands to be executed by the debugger, allowing for both immediate execution and queued execution. The CommandManager
class runs in its own thread, waiting for new commands to be added and executing them as they become available.
This Java code implements a command manager for a Perl debugger. It manages a queue of commands to be executed by the debugger, allowing for both immediate execution and queued execution. The CommandManager
class runs in its own thread, waiting for new commands to be added and executing them as they become available.
59 parser.addResultHandler(wrapper);
60 try {
61 //System.err.println("CommandManager: " + cmd);
62 Debugger.getInstance().commandRecord(cmd + "\n");
63 process.getGdbInputWriter().write(cmd + "\n");
64 } catch (IOException e) {
65 // TODO Auto-generated catch block
66 e.printStackTrace();
67 }
68 // Wait for result
73 } catch (InterruptedException e) {
74 // TODO Auto-generated catch block
75 e.printStackTrace();
76 }
77 }
WKView.h (https://bitbucket.org/ultra_iter/qt-vtl.git) C Header · 50 lines
BibTeXParser.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 258 lines
✨ Summary
This Java code is a BibTeX parser for LaTeX documents. It analyzes the document’s bibliography section to extract and parse bibliographic entries, including author, title, journal, and reference information. The parsed data is stored in an ArrayList of BibEntry objects, which can be accessed through various methods.
This Java code is a BibTeX parser for LaTeX documents. It analyzes the document’s bibliography section to extract and parse bibliographic entries, including author, title, journal, and reference information. The parsed data is stored in an ArrayList of BibEntry objects, which can be accessed through various methods.
TestFailedState.java (https://bitbucket.org/nbargnesi/idea.git) Java · 118 lines
58 }
60 public static void printError(@NotNull final Printer printer,
61 @NotNull final List<String> errorPresentationText)
62 {
64 }
66 private static void printError(@NotNull final Printer printer,
67 @NotNull final List<String> errorPresentationText,
68 final boolean setMark)
71 for (final String errorText : errorPresentationText) {
72 if (errorText != null) {
73 printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
74 if (addMark) {
75 printer.mark();
83 @Override
84 public void printOn(final Printer printer) {
85 super.printOn(printer);
fcompiler.hh
(git://github.com/ticking/self.git)
C++ Header · 70 lines
✨ Summary
This C++ header file defines a class FCompiler
that represents the global state associated with the current non-inlining compiler (NIC) compilation. It provides methods for compiling code, generating debug information, and managing scope descriptions. The class is part of a larger system for compiling and optimizing Java bytecode, likely as part of the HotSpot JVM.
This C++ header file defines a class FCompiler
that represents the global state associated with the current non-inlining compiler (NIC) compilation. It provides methods for compiling code, generating debug information, and managing scope descriptions. The class is part of a larger system for compiling and optimizing Java bytecode, likely as part of the HotSpot JVM.
HistoryModel.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 320 lines
✨ Summary
This Java class, HistoryModel
, is a list model for storing and managing a history of text input. It allows multiple instances to be created with unique names, and provides methods for adding, retrieving, and saving entries in the history. The data is stored in a vector and can be loaded from a file when the application starts.
This Java class, HistoryModel
, is a list model for storing and managing a history of text input. It allows multiple instances to be created with unique names, and provides methods for adding, retrieving, and saving entries in the history. The data is stored in a vector and can be loaded from a file when the application starts.
ChromeClientWinCE.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 403 lines
anonymousFromMap.groovy (https://bitbucket.org/nbargnesi/idea.git) Groovy · 2 lines
journal.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 2456 lines
✨ Summary
This C code initializes and manages a journaling system for Linux file systems, specifically ext4. It sets up various data structures, caches, and modules to handle journaling operations, including logging, caching, and device name mapping. The code also handles module initialization and cleanup, as well as error handling and debugging features.
This C code initializes and manages a journaling system for Linux file systems, specifically ext4. It sets up various data structures, caches, and modules to handle journaling operations, including logging, caching, and device name mapping. The code also handles module initialization and cleanup, as well as error handling and debugging features.
137 wake_up(&journal->j_wait_done_commit);
139 printk(KERN_INFO "kjournald2 starting: pid %d, dev %s, "
140 "commit interval %ld seconds\n", current->pid,
141 journal->j_devname, journal->j_commit_interval / HZ);
566 spin_lock(&journal->j_state_lock);
567 if (!tid_geq(journal->j_commit_request, tid)) {
568 printk(KERN_EMERG
569 "%s: error: j_commit_request=%d, tid=%d\n",
570 __func__, journal->j_commit_request, tid);
586 if (unlikely(is_journal_aborted(journal))) {
587 printk(KERN_EMERG "journal commit I/O error\n");
588 err = -EIO;
589 }
kcomedilib_main.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 561 lines
✨ Summary
This C code implements a device driver for a generic serial interface, providing a framework for managing multiple devices and handling various ioctl operations such as locking, canceling, polling, mapping, and unmapping. It provides a flexible way to register callback functions and handle asynchronous operations. The code is designed to be portable across different platforms.
This C code implements a device driver for a generic serial interface, providing a framework for managing multiple devices and handling various ioctl operations such as locking, canceling, polling, mapping, and unmapping. It provides a flexible way to register callback functions and handle asynchronous operations. The code is designed to be portable across different platforms.
106 void comedi_perror(const char *message)
107 {
108 printk("%s: unknown error\n", message);
109 }
214 }
215 if (insn->subdev >= dev->n_subdevices) {
216 printk("%d not usable subdevice\n",
217 insn->subdev);
218 ret = -EINVAL;
221 s = dev->subdevices + insn->subdev;
222 if (!s->async) {
223 printk("no async\n");
224 ret = -EINVAL;
225 break;
cd.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 21 lines
JEditTextArea.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 6364 lines
✨ Summary
This Java code appears to be part of a text editor’s functionality, specifically related to cursor movement and selection. It provides methods for moving the cursor to different positions on the screen, such as the beginning or end of a line, and selecting text based on the current cursor position. The code also includes some macro recording functionality.
This Java code appears to be part of a text editor’s functionality, specifically related to cursor movement and selection. It provides methods for moving the cursor to different positions on the screen, such as the beginning or end of a line, and selecting text based on the current cursor position. The code also includes some macro recording functionality.
811 ChunkCache.LineInfo lineInfo = chunkCache.getLineInfo(line);
812 if(!lineInfo.chunksValid)
813 System.err.println("xy to offset: not valid");
815 if(lineInfo.physicalLine == -1)
871 ChunkCache.LineInfo info = chunkCache.getLineInfo(screenLine);
872 if(!info.chunksValid)
873 System.err.println("offset to xy: not valid");
875 retVal.x = (int)(horizontalOffset + chunkCache.offsetToX(
957 //if(startLine != endLine)
958 // System.err.println(startLine + ":" + endLine);
960 invalidateScreenLineRange(startLine,endLine);
PropertyParser.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 150 lines
✨ Summary
This Java code defines a PropertyParser
class that extends SideKickParser
. It parses properties from a given buffer and converts them to a tree data structure, which can be used in a text editor. The parser handles errors and sends error messages to an ErrorSource
object. It uses regular expressions to extract location information from exception messages.
This Java code defines a PropertyParser
class that extends SideKickParser
. It parses properties from a given buffer and converts them to a tree data structure, which can be used in a text editor. The parser handles errors and sends error messages to an ErrorSource
object. It uses regular expressions to extract location information from exception messages.
jfs_imap.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 3189 lines
✨ Summary
This C code appears to be part of a JFS (Journaling File System) implementation, specifically handling inode operations. It provides functions for copying data between in-memory and disk-based inode structures, as well as updating inode metadata such as permissions, timestamps, and device numbers. The code seems to be focused on ensuring consistency and accuracy when working with JFS file system data.
This C code appears to be part of a JFS (Journaling File System) implementation, specifically handling inode operations. It provides functions for copying data between in-memory and disk-based inode structures, as well as updating inode metadata such as permissions, timestamps, and device numbers. The code seems to be focused on ensuring consistency and accuracy when working with JFS file system data.
ParserConstants.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 254 lines
✨ Summary
This Java code defines a set of constants for a parser, specifically for a programming language. It provides integer values and corresponding string representations for various keywords, literals, operators, and symbols in the language. These constants can be used to identify tokens during parsing and lexical analysis.
This Java code defines a set of constants for a parser, specifically for a programming language. It provides integer values and corresponding string representations for various keywords, literals, operators, and symbols in the language. These constants can be used to identify tokens during parsing and lexical analysis.
AntClassLoader.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1173 lines
✨ Summary
This Java class is a custom class loader that loads classes from a specified path, including system classes and archives. It searches for classes in the specified path components, closes open archive files during cleanup, and provides methods to load classes from streams and resources. The class loader also handles security exceptions and IOExceptions when reading from streams or accessing resources.
This Java class is a custom class loader that loads classes from a specified path, including system classes and archives. It searches for classes in the specified path components, closes open archive files during cleanup, and provides methods to load classes from streams and resources. The class loader also handles security exceptions and IOExceptions when reading from streams or accessing resources.
nodeGen.cpp
(git://github.com/ticking/self.git)
C++ · 469 lines
✨ Summary
This C++ code is part of a compiler implementation, specifically responsible for generating branch instructions (if-else statements) in machine code. It creates nodes and merges them to represent conditional branches, allowing the compiler to decide which path to take based on the program’s logic. The generated code is optimized for performance and minimizes unnecessary operations.
This C++ code is part of a compiler implementation, specifically responsible for generating branch instructions (if-else statements) in machine code. It creates nodes and merges them to represent conditional branches, allowing the compiler to decide which path to take based on the program’s logic. The generated code is optimized for performance and minimizes unnecessary operations.
mv64x60_edac.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 891 lines
✨ Summary
This C code implements a driver for Marvell MV64x60 EDAC (Error Detection and Correction) devices, which are used to detect and report errors in memory-based systems. The driver registers itself with the Linux kernel and provides functionality for error reporting, including interrupt-based reporting and polling. It also includes support for different error reporting states and is designed to work with various types of memory-based systems.
This C code implements a driver for Marvell MV64x60 EDAC (Error Detection and Correction) devices, which are used to detect and report errors in memory-based systems. The driver registers itself with the Linux kernel and provides functionality for error reporting, including interrupt-based reporting and polling. It also includes support for different error reporting states and is designed to work with various types of memory-based systems.
38 return;
40 printk(KERN_ERR "Error in PCI %d Interface\n", pdata->pci_hose);
41 printk(KERN_ERR "Cause register: 0x%08x\n", cause);
42 printk(KERN_ERR "Address Low: 0x%08x\n",
43 in_le32(pdata->pci_vbase + MV64X60_PCI_ERROR_ADDR_LO));
44 printk(KERN_ERR "Address High: 0x%08x\n",
45 in_le32(pdata->pci_vbase + MV64X60_PCI_ERROR_ADDR_HI));
46 printk(KERN_ERR "Attribute: 0x%08x\n",
47 in_le32(pdata->pci_vbase + MV64X60_PCI_ERROR_ATTR));
48 printk(KERN_ERR "Command: 0x%08x\n",
86 r = platform_get_resource(pdev, IORESOURCE_MEM, 1);
87 if (!r) {
88 printk(KERN_ERR "%s: Unable to get resource for "
89 "PCI err regs\n", __func__);
90 return -ENOENT;
javap.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 63 lines
1 /**
2 Print the public fields and methods of the specified class (output similar
3 to the JDK javap command).
4 <p/>
7 class, the class is used. If the argument is a class identifier, the class
8 identified by the class identifier will be used. e.g. If the argument is
9 the empty string an error will be printed.
10 <p/>
11 <pre>
42 clas = o.getClass();
44 print( "Class "+clas+" extends " +clas.getSuperclass() );
46 this.dmethods=clas.getDeclaredMethods();
47 //print("------------- Methods ----------------");
48 for(int i=0; i<dmethods.length; i++) {
49 this.m = dmethods[i];
zone.hh
(git://github.com/ticking/self.git)
C++ Header · 270 lines
✨ Summary
This C++ header file defines a memory management system for a compiler, specifically for handling nmethods (optimized methods). It provides classes and functions for managing memory allocation, deallocation, and usage tracking, as well as features like LRU caching and frame chaining. The code is designed to be used in a compiler environment, with various zones (memory regions) and objects (nmethods) that interact with each other.
This C++ header file defines a memory management system for a compiler, specifically for handling nmethods (optimized methods). It provides classes and functions for managing memory allocation, deallocation, and usage tracking, as well as features like LRU caching and frame chaining. The code is designed to be used in a compiler environment, with various zones (memory regions) and objects (nmethods) that interact with each other.
12 oop PrintDebugSize_prim(oop rcvr);
13 oop findNMethods_prim(oop rcvr, oop map, oop sel);
14 oop printNMethodCode_prim(oop rcvr);
138 void relocate_nmln(nmln*);
139 void fixup();
140 void print();
141 void print_stats();
143 void print_nmethod_histogram(fint size);
145 nmethod* first_nm() { return (nmethod*)(iZone->firstUsed()); }
158 protected:
159 void print_helper(bool stats);
160 void adjustPolicy();
161 int32 flushNextMethod(int32 needed);
ali5451.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 2379 lines
✨ Summary
This C code implements a PCI driver for an ALI 5451 sound card. It initializes and configures the sound card, sets up mixer and PCM channels, and registers the device with the ALSA sound system. The code also handles power management and suspend/resume operations. When loaded, it registers the driver with the kernel and provides a way to interact with the sound card.
This C code implements a PCI driver for an ALI 5451 sound card. It initializes and configures the sound card, sets up mixer and PCM channels, and registers the device with the ALSA sound system. The code also handles power management and suspend/resume operations. When loaded, it registers the driver with the kernel and provides a way to interact with the sound card.
73 #ifdef ALI_DEBUG
74 #define snd_ali_printk(format, args...) printk(KERN_DEBUG format, ##args);
75 #else
76 #define snd_ali_printk(format, args...)
318 } while (time_after_eq(end_time, jiffies));
319 snd_ali_5451_poke(codec, port, res & ~0x8000);
320 snd_printdd("ali_codec_ready: codec is not ready.\n ");
321 return -EIO;
322 }
337 schedule_timeout_uninterruptible(1);
338 } while (time_after_eq(end_time, jiffies));
339 snd_printk(KERN_ERR "ali_stimer_read: stimer is not ready.\n");
340 return -EIO;
341 }
keycodes.xml (http://keymapper.googlecode.com/svn/trunk/) XML · 1237 lines
test.c
(git://github.com/gmarceau/PLT.git)
C · 127 lines
✨ Summary
The code creates a memory leak by repeatedly allocating and deallocating memory using GC_malloc
and GC_gcollect
. It then tests for memory leaks by creating a cycle of linked lists with varying sizes, checking if the data is correctly allocated and accessed. If a mismatch is found, it prints an error message and exits. The code also sets up roots for garbage collection to track the allocated memory.
The code creates a memory leak by repeatedly allocating and deallocating memory using GC_malloc
and GC_gcollect
. It then tests for memory leaks by creating a cycle of linked lists with varying sizes, checking if the data is correctly allocated and accessed. If a mismatch is found, it prints an error message and exits. The code also sets up roots for garbage collection to track the allocated memory.
57 #endif
59 printf("chains at %lx\n", (long)chains);
61 for (l = NUM_REPEATS; l--; ) {
62 printf("cycle: %d\n", NUM_REPEATS - l);
64 for (i = 0; i < MAX_C_SIZE; i++)
104 for (j = 0; j < i; j++)
105 if (c->data[j] != i) {
106 printf("broken: %d[%d][%d] = %d\n", i, (CHAIN_DEPTH - k), j, c->data[j]);
107 if (!(broken--))
108 return;
CatalogManager.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 640 lines
✨ Summary
This Java code manages XML catalogs and resources for a text editor, specifically JEdit. It loads and parses catalog files, handles resource downloads, and updates the catalog when the user changes a file on disk. The code uses a custom Entry
class to represent XML entries and a VFSUpdateHandler
component to reload catalogs when files are modified.
This Java code manages XML catalogs and resources for a text editor, specifically JEdit. It loads and parses catalog files, handles resource downloads, and updates the catalog when the user changes a file on disk. The code uses a custom Entry
class to represent XML entries and a VFSUpdateHandler
component to reload catalogs when files are modified.
506 }
507 catch(Exception ex2)
508 { ex2.printStackTrace();
509 Log.log(Log.ERROR,CatalogManager.class,ex2);
510 }
524 catch(Exception ex2)
525 {
526 ex2.printStackTrace();
527 Log.log(Log.ERROR,CatalogManager.class,ex2);
528 }
569 catch(Exception ex2)
570 {
571 ex2.printStackTrace();
572 Log.log(Log.ERROR,CatalogManager.class,ex2);
573 }
xprt.c
(http://photon-android.googlecode.com/svn/)
C · 1160 lines
✨ Summary
This C code implements a transport layer for RPC (Remote Procedure Call) communications. It manages a pool of slots to handle incoming requests, prioritizes them based on their priority, and ensures that resources are released when no longer needed. The code also handles creation, destruction, and reference management of the transport instance.
This C code implements a transport layer for RPC (Remote Procedure Call) communications. It manages a pool of slots to handle incoming requests, prioritizes them based on their priority, and ensures that resources are released when no longer needed. The code also handles creation, destruction, and reference management of the transport instance.
114 list_add_tail(&transport->list, &xprt_list);
115 printk(KERN_INFO "RPC: Registered %s transport module.\n",
116 transport->name);
117 result = 0;
140 list_for_each_entry(t, &xprt_list, list) {
141 if (t == transport) {
142 printk(KERN_INFO
143 "RPC: Unregistered %s transport module.\n",
144 transport->name);
215 out_sleep:
216 dprintk("RPC: %5u failed to lock transport %p\n",
217 task->tk_pid, xprt);
218 task->tk_timeout = 0;
jedit_keys.props (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 235 lines
mk_filelist.sh
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Shell · 75 lines
✨ Summary
This shell script creates a set of archives for a jEdit distribution, including Windows, macOS, and Linux versions. It gathers files from various directories, calculates their sizes, and prints them to the console. The script then compresses each archive using bzip2 and removes the original files. The output shows the size of each file in bytes and kilobytes.
This shell script creates a set of archives for a jEdit distribution, including Windows, macOS, and Linux versions. It gathers files from various directories, calculates their sizes, and prints them to the console. The script then compresses each archive using bzip2 and removes the original files. The output shows the size of each file in bytes and kilobytes.
1 #!/bin/sh
3 function print_size() {
4 echo -n "$1: "
5 ls -l `cat installer/$1` | awk 'BEGIN { size=0 } { disk_size+=(int($5/4096+1)*4); size+=$5/1024 } END { print disk_size " " size }'
22 echo doc/welcome.html >> installer/jedit-program
24 print_size jedit-program
26 # jedit-macros fileset
27 find macros -name \*.bsh > installer/jedit-macros
29 print_size jedit-macros
31 # jedit-api fileset
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.
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.
79 } catch (gnu.regexp.REException ree) {
80 Log.log(Log.ERROR,this,jEdit.getProperty("plugin.TemplatesPlugin.error.bad-backup-filter"));
81 // System.out.println("Templates: Bad RegExp creating backup filter.");
82 }
83 }
161 * directory and filename on a separate line.
162 */
163 public String printDir() {
164 String newLine = System.getProperty("line.separator");
165 StringBuffer retStr = new StringBuffer("Dir: " + this.getLabel() + newLine);
168 TemplateFile f = (TemplateFile) kids.nextElement();
169 if (f.isDirectory()) {
170 retStr.append(((TemplateDir)f).printDir());
171 } else {
172 retStr.append(f.getRelativePath() + newLine);
assembly-parrot.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 139 lines
ves1820.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 447 lines
✨ Summary
This C code implements a DVB-C demodulator driver for the VLSI VES1820 chip. It provides functions to initialize, sleep, and read status of the demodulator, as well as set and get parameters such as frequency and inversion settings. The driver is designed to work with the Linux kernel and uses I2C communication to interact with the chip. It also includes debugging features for printing AFC offsets after tuning.
This C code implements a DVB-C demodulator driver for the VLSI VES1820 chip. It provides functions to initialize, sleep, and read status of the demodulator, as well as set and get parameters such as frequency and inversion settings. The driver is designed to work with the Linux kernel and uses I2C communication to interact with the chip. It also includes debugging features for printing AFC offsets after tuning.
67 if (ret != 1)
68 printk("ves1820: %s(): writereg error (reg == 0x%02x, "
69 "val == 0x%02x, ret == %i)\n", __func__, reg, data, ret);
86 if (ret != 2)
87 printk("ves1820: %s(): readreg error (reg == 0x%02x, "
88 "ret == %i)\n", __func__, reg, ret);
320 if (verbose) {
321 /* AFC only valid when carrier has been recovered */
322 printk(sync & 2 ? "ves1820: AFC (%d) %dHz\n" :
323 "ves1820: [AFC (%d) %dHz]\n", afc, -((s32) p->u.qam.symbol_rate * afc) >> 10);
324 }
json.jj (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 763 lines
111 JsonParser parser;
112 if (args.length == 0) {
113 System.out.println("JSON Parser: Reading from standard input . . .");
114 parser = new JsonParser(System.in);
115 } else if (args.length == 1) {
116 System.out.println("JSON Parser: Reading from file " + args[0] + " . . .");
117 try {
118 parser = new JsonParser(new java.io.FileInputStream(args[0]));
119 } catch (java.io.FileNotFoundException e) {
120 System.out.println("JSON Parser: File " + args[0] + " not found.");
121 return;
122 }
gnuplot.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 270 lines
79 <KEYWORD1>smooth</KEYWORD1>
80 <KEYWORD1>thru</KEYWORD1>
81 <KEYWORD1>print</KEYWORD1>
82 <KEYWORD1>pwd</KEYWORD1>
83 <KEYWORD1>quit</KEYWORD1>
200 <KEYWORD3>pointsize</KEYWORD3>
201 <KEYWORD3>polar</KEYWORD3>
202 <KEYWORD3>print</KEYWORD3>
203 <KEYWORD3>rmargin</KEYWORD3>
204 <KEYWORD3>rrange</KEYWORD3>
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.
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.
226 String titleStr = filename;
228 PrintStream origOut = System.out;
229 PrintStream origErr = System.err;
326 }
327 } catch (Exception exp) {
328 exp.printStackTrace();
329 }
330 }
360 this.sendStatus( 50, "Starting compiler" );
362 System.out.println( "JCompiler: compiling with arguments: " + getArgumentsAsString( arguments ) );
364 bytes = new ByteArrayOutputStream();
365 PrintStream ps = new PrintStream( bytes );
367 System.setOut(ps);
index.html
(https://swig.svn.sourceforge.net/svnroot/swig)
HTML · 211 lines
✨ Summary
This HTML code documents a SWIG example that wraps a simple C++ class into a Perl interface. It explains how to create a new object, access member data and functions, invoke methods, and handle inheritance and static variables. The documentation includes examples of C++ code, the generated SWIG interface, and a sample Perl script that demonstrates the usage of the wrapped C++ class.
This HTML code documents a SWIG example that wraps a simple C++ class into a Perl interface. It explains how to create a new object, access member data and functions, invoke methods, and handle inheritance and static variables. The documentation includes examples of C++ code, the generated SWIG interface, and a sample Perl script that demonstrates the usage of the wrapped C++ class.
aclocal.m4
(https://bitbucket.org/freebsd/freebsd-head/)
m4 · 905 lines
✨ Summary
This M4 code is a collection of configuration and build scripts for a C library, likely the GNU Binutils. It sets up various macros and functions for building and testing the library, including support for different tar formats, gettext, and other dependencies. The script also includes several external M4 files that provide additional functionality.
This M4 code is a collection of configuration and build scripts for a C library, likely the GNU Binutils. It sets up various macros and functions for building and testing the library, including support for different tar formats, gettext, and other dependencies. The script also includes several external M4 files that provide additional functionality.
562 # In particular we don't look at `^make:' because GNU make might
563 # be invoked under some other name (usually "gmake"), in which
564 # case it prints its new name instead of `make'.
565 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
566 am__include=include
856 ;;
857 cpio)
858 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
859 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
runme.ml
(https://swig.svn.sourceforge.net/svnroot/swig)
OCaml · 35 lines
✨ Summary
This OCaml code creates a simple GIF image using the wrapped GIFPlot library. It draws basic shapes (a red box, blue circle, and green line) on a 400x400 pixel frame buffer, then writes the resulting GIF to a file named “image.gif”. The code also clears the frame buffer with black pixels before drawing the shapes, and deletes the frame buffer and color map after writing the image.
This OCaml code creates a simple GIF image using the wrapped GIFPlot library. It draws basic shapes (a red box, blue circle, and green line) on a 400x400 pixel frame buffer, then writes the resulting GIF to a file named “image.gif”. The code also clears the frame buffer with black pixels before drawing the shapes, and deletes the frame buffer and color map after writing the image.
usb_template.c
(https://bitbucket.org/freebsd/freebsd-head/)
C · 1375 lines
✨ Summary
This is a C module that provides functions for setting up and managing USB templates. It includes a function usb_temp_setup
that sets up a template based on an index, a function usb_temp_get_desc
that retrieves a USB descriptor from the template, and a function usb_temp_unsetup
that frees any memory associated with the currently set up template. The module also includes initialization and unload functions for registering and unregistering the functions.
This is a C module that provides functions for setting up and managing USB templates. It includes a function usb_temp_setup
that sets up a template based on an index, a function usb_temp_get_desc
that retrieves a USB descriptor from the template, and a function usb_temp_unsetup
that frees any memory associated with the currently set up template. The module also includes initialization and unload functions for registering and unregistering the functions.
750 if (pf == NULL) {
751 /* HW profile does not exist - failure */
752 DPRINTFN(0, "Endpoint profile %u "
753 "does not exist\n", ep_no);
754 return (1);
762 if ((pf->max_in_frame_size < wMaxPacketSize) ||
763 (pf->max_out_frame_size < wMaxPacketSize)) {
764 DPRINTFN(0, "Endpoint profile %u "
765 "has too small buffer\n", ep_no);
766 return (1);
770 (1 << (ep_no % 8));
771 if (pf->max_in_frame_size < wMaxPacketSize) {
772 DPRINTFN(0, "Endpoint profile %u "
773 "has too small buffer\n", ep_no);
774 return (1);
example.cxx
(https://swig.svn.sourceforge.net/svnroot/swig)
C++ · 50 lines
✨ Summary
The code outputs messages indicating when objects are created and destroyed, such as “VectorArray new: self=%p” and “VectorArray delete: self=%p”. It also handles array index out of bounds errors with a panic message and exits the program. Additionally, it prints the size of the VectorArray object.
The code outputs messages indicating when objects are created and destroyed, such as “VectorArray new: self=%p” and “VectorArray delete: self=%p”. It also handles array index out of bounds errors with a panic message and exits the program. Additionally, it prints the size of the VectorArray object.
20 char *Vector::as_string() {
21 static char temp[512];
22 sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
23 return temp;
24 }
27 items = new Vector[size];
28 maxsize = size;
29 printf("VectorArray new: self=%p\n",this);
30 }
32 VectorArray::~VectorArray() {
33 printf("VectorArray delete: self=%p\n",this);
34 delete [] items;
35 }
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.
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.
79 tmp_version = g_strdup("$min_gtk_version");
80 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
81 printf("%s, bad version string\n", "$min_gtk_version");
82 exit(1);
83 }
87 (gtk_micro_version != $gtk_config_micro_version))
88 {
89 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
90 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
91 gtk_major_version, gtk_minor_version, gtk_micro_version);
92 printf ("*** was found! If gtk-config was correct, then it is best\n");
93 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
94 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
95 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
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.
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.
XImportConflict.java
(http://ambienttalk.googlecode.com/svn/)
Java · 71 lines
✨ Summary
This Java code defines an exception class XImportConflict
that is thrown when an import operation fails due to conflicting names between the importing object and the imported object. It provides information about the conflicting names and allows for further analysis of the conflict. The exception can be caught and handled by the application, providing a way to recover from the import failure.
This Java code defines an exception class XImportConflict
that is thrown when an import operation fails due to conflicting names between the importing object and the imported object. It provides information about the conflicting names and allows for further analysis of the conflict. The exception can be caught and handled by the application, providing a way to recover from the import failure.
50 * Constructor documenting which duplicate slots were being imported.
51 * @param conflictingNames the names of the slots which were being imported but which already existed in the importing scope
52 * @throws InterpreterException if the slot names cannot be printed (e.g. when using custom symbols which do not provide an adequate print meta-method).
53 */
54 public XImportConflict(ATSymbol[] conflictingNames) throws InterpreterException {
55 super("Conflicting names during import: " + Evaluator.printElements(conflictingNames, "", ",", "").javaValue);
56 conflictingNames_ = conflictingNames;
57 }
common.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 494 lines
✨ Summary
This C code initializes and configures various components for an IXP4xx SoC (System-on-Chip). It sets up the clock source, timer, and clock events to manage the system’s timing and scheduling. The code also configures the expansion bus size and registers devices with the Linux kernel. Overall, it provides a foundation for booting and running applications on an IXP4xx-based system.
This C code initializes and configures various components for an IXP4xx SoC (System-on-Chip). It sets up the clock source, timer, and clock events to manage the system’s timing and scheduling. The code also configures the expansion bus size and registers devices with the Linux kernel. Overall, it provides a foundation for booting and running applications on an IXP4xx-based system.
prettyprint.factor (git://github.com/x6j8x/factor.git) Unknown · 151 lines
5 make math math.parser namespaces parser prettyprint.backend
6 prettyprint.config prettyprint.custom prettyprint.sections
7 quotations sequences sorting strings vocabs vocabs.prettyprint
17 : with-in ( obj quot -- )
18 t make-pprint current-vocab>> [ pprint-in bl ] when* do-pprint ; inline
20 : pprint ( obj -- ) [ pprint* ] with-pprint ;
22 : . ( obj -- ) pprint nl ;
24 : pprint-use ( obj -- ) [ pprint* ] with-use ;
26 : unparse ( obj -- str ) [ pprint ] with-string-writer ;
128 : .c ( -- ) callstack callstack. ;
130 : pprint-cell ( obj -- ) [ pprint-short ] with-cell ;
132 SYMBOL: pprint-string-cells?
init_32.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 536 lines
✨ Summary
This C code initializes and manages memory for a SPARC-based Linux system. It allocates valid address space, maps physical pages to virtual addresses, and tracks available memory. The code also handles memory initialization, freeing unused kernel memory, and flushing pages to RAM. Additionally, it provides functions for managing initrd memory and exporting the sparc_flush_page_to_ram
function.
This C code initializes and manages memory for a SPARC-based Linux system. It allocates valid address space, maps physical pages to virtual addresses, and tracks available memory. The code also handles memory initialization, freeing unused kernel memory, and flushing pages to RAM. Additionally, it provides functions for managing initrd memory and exporting the sparc_flush_page_to_ram
function.
77 void show_mem(void)
78 {
79 printk("Mem-info:\n");
80 show_free_areas();
81 printk("Free swap: %6ldkB\n",
82 nr_swap_pages << (PAGE_SHIFT-10));
83 printk("%ld pages of RAM\n", totalram_pages);
84 printk("%ld free pages\n", nr_free_pages());
85 #if 0 /* undefined pgtable_cache_size, pgd_cache_size */
86 printk("%ld pages in page table cache\n",pgtable_cache_size);
87 #ifndef CONFIG_SMP
88 if (sparc_cpu_model == sun4m || sparc_cpu_model == sun4d)
89 printk("%ld entries in page dir cache\n",pgd_cache_size);
90 #endif
91 #endif
RemoteLogger.java
(http://alageospatialportal.googlecode.com/svn/trunk/)
Java · 182 lines
✨ Summary
This Java class, RemoteLogger
, sends logging information to a server via HTTP POST requests. It retrieves settings and user data from a session, constructs log messages based on input parameters, and sends them to the server with various fields such as type, name, species ID, area, layers, status, and privacy.
This Java class, RemoteLogger
, sends logging information to a server via HTTP POST requests. It retrieves settings and user data from a session, constructs log messages based on input parameters, and sends them to the server with various fields such as type, name, species ID, area, layers, status, and privacy.
113 }
115 System.out.println("Sending log to: " + logger_service + "/log/action");
116 HttpClient client = new HttpClient();
117 PostMethod post = new PostMethod(logger_service + "/log/action");
156 } catch (Exception e) {
157 System.out.println("Error sending logging information to server:");
158 e.printStackTrace(System.out);
174 } catch (Exception e) {
175 System.out.println("Error sending logging information to server:");
176 e.printStackTrace(System.out);
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.
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.