100+ results for 'while'

Not the results you expected?

upgrade.php (https://github.com/jarednipper/HSU-common-code.git) PHP · 265 lines

136 $capsubmit = 'mod/questionnaire:submit';

137

138 while ($questionnaire = rs_fetch_next_record($rs)) {

139 $context = get_context_instance(CONTEXT_MODULE, $questionnaire->cmid);

140

251 $recstart = 0;

252 $recstoget = 100;

253 while ($recstart < $numrecs) {

254 if ($records = get_records('questionnaire_question_type', '', '', '', '*', $recstart, $recstoget)) {

255 foreach ($records as $record) {

org_xmlvm_iphone_UIControlContentHorizontalAlignment.m (https://github.com/avh4/xmlvm.git) Objective C · 240 lines

100 staticInitializerLock(&__TIB_org_xmlvm_iphone_UIControlContentHorizontalAlignment);

101

102 // While the static initializer mutex is locked, locally store the value of

103 // whether class initialization began or not

104 int initBegan = __TIB_org_xmlvm_iphone_UIControlContentHorizontalAlignment.classInitializationBegan;

113 if (__TIB_org_xmlvm_iphone_UIControlContentHorizontalAlignment.initializerThreadId != curThreadId) {

114 // Busy wait until the other thread finishes initializing this class

115 while (!__TIB_org_xmlvm_iphone_UIControlContentHorizontalAlignment.classInitialized) {

116 // do nothing

117 }

TearDownPageTest.java (https://github.com/spreddy/liferay-portal.git) Java · 495 lines

25 int label = 1;

26

27 while (label >= 1) {

28 switch (label) {

29 case 1:

GrailsDomainClassPersistentEntity.java (https://github.com/roongr2k7/grails-core.git) Java · 340 lines

212 }

213

214 while (!parent.isRoot()) {

215 PersistentEntity current = parent.getParentEntity();

216 if (current != null) {

OracleQueryGenerator.java (https://bitbucket.org/alsajib/netbeans-soa.git) Java · 374 lines

363 String pKey = null;

364 final java.util.Iterator pkIter = this.mcolumns.iterator();

365 while (pkIter.hasNext()) {

366 final DBColumn tc = (DBColumn) pkIter.next();

367 if (tc.isPrimaryKey()) {

CompCSTaskObject.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 422 lines

406 // Print dependency elements

407 Iterator iterator = fFieldDependencies.iterator();

408 while (iterator.hasNext()) {

409 ICompCSDependency dependency = (ICompCSDependency) iterator.next();

410 dependency.write(newIndent, writer);

Habitats.hpp (https://gitlab.com/natural-computing-optimization/ecological-inspired-algorithm-cpp) C++ Header · 420 lines

206

207

208 while (sum_tabu < size-1)

209 {

210 if ( aleatory.nextDouble() >= g_tree[cur_node-1].distance) //link those two itens

320 cur_habitat = -1;

321 j = 0;

322 while (i <= g_habitatsSize && cur_habitat < 0)

323 {

324 while (j < H[i].h_sp_count && cur_habitat < 0)

336 {

337 i = 0;

338 while (H[cur_habitat].h_sp[i] >= 0)

339 i++;

340 cur_node = -1*H[cur_habitat].h_sp[i];

SimpleCharStream.java (https://github.com/romkk/titanium_mobile.git) Java · 457 lines

427 int nextColDiff = 0, columnDiff = 0;

428

429 while (i < len &&

430 bufline[j = start % bufsize] == bufline[k = ++start % bufsize])

431 {

442 bufcolumn[j] = newCol + columnDiff;

443

444 while (i++ < len)

445 {

446 if (bufline[j = start % bufsize] != bufline[++start % bufsize])

Ellipse.as (https://github.com/kibiz0r/FlashRuby.git) ActionScript · 347 lines

310

311 var i:int = 0;

312 while (i++ < 150)

313 {

314 var postTransformBounds:Rectangle = getBoundingBox(newWidth, newHeight, m);

itk_jpeg_mangle.h (https://github.com/crtc/ITK-PBNRR-GITHUB.git) C Header · 186 lines

5

6 This header file mangles all symbols exported from the jpeg library.

7 It is included in all files while building the jpeg library. Due to

8 namespace pollution, no jpeg headers should be included in .h files in

9 itk.

required.js (https://gitlab.com/nguyenthehiep3232/marius) JavaScript · 270 lines

26 var $property, i1 = -1,

27 l1 = arr1.length - 1;

28 while (i1 < l1) {

29 $property = arr1[i1 += 1];

30 var $propertySch = it.schema.properties[$property];

107 var $propertyKey, $i = -1,

108 l2 = arr2.length - 1;

109 while ($i < l2) {

110 $propertyKey = arr2[$i += 1];

111 if ($i) {

227 var $propertyKey, i3 = -1,

228 l3 = arr3.length - 1;

229 while (i3 < l3) {

230 $propertyKey = arr3[i3 += 1];

231 var $prop = it.util.getProperty($propertyKey),

symbols-processing-vms-ia64.adb (https://bitbucket.org/pizzafactory/pf-gcc.git) Ada · 430 lines

193 -- Skip ELF identification

194

195 while Offset < 16 loop

196 Get_Byte (B);

197 end loop;

253 -- Go to Section Headers

254

255 while Offset < Shoff loop

256 Get_Byte (B);

257 end loop;

280 Get_Word (Shlink);

281

282 while (Offset - Shoff) mod Shentsize /= 0 loop

283 Get_Byte (B);

284 end loop;

MultiTableUI.java (https://bitbucket.org/pizzafactory/pf-gcc.git) Java · 352 lines

97 {

98 Iterator iterator = uis.iterator();

99 while (iterator.hasNext())

100 {

101 ComponentUI ui = (ComponentUI) iterator.next();

113 {

114 Iterator iterator = uis.iterator();

115 while (iterator.hasNext())

116 {

117 ComponentUI ui = (ComponentUI) iterator.next();

157 }

158 // return values from auxiliary UI delegates are ignored

159 while (iterator.hasNext())

160 {

161 ComponentUI ui = (ComponentUI) iterator.next();

AdaptiveCacheManager.java (https://github.com/boyaxxx/community.git) Java · 377 lines

89 }

90 Iterator<AdaptiveCacheElement> itr = caches.iterator();

91 while ( itr.hasNext() )

92 {

93 AdaptiveCacheElement element = itr.next();

212 public synchronized void run()

213 {

214 while ( !done )

215 {

216 try

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

This Java code is part of a text editor’s input handling mechanism. It processes user input, allowing for repeat functionality and recording macros. When the user presses a key, the code checks if repeat mode is enabled and handles the input accordingly, including recording macro actions and updating the buffer with repeated input.

559 // this might be a bit slow if __char__ occurs a lot

560 int index;

561 while((index = readNextChar.indexOf("__char__")) != -1)

562 {

563 readNextChar = readNextChar.substring(0,index)

HTMLTokenizer.java (https://github.com/armandofox/glomop.git) Java · 471 lines

165 {

166 int c = in.read();

167 while (c != -1 && c != '&' && c != '<') {

168 text.append((char)c);

169 c = in.read();

180

181 c = in.read();

182 while (c != -1 && Character.isDigit((char)c)) {

183 ncr.append((char)c);

184 c = in.read();

232 readComment();

233 int c;

234 while ((c = in.read()) != -1) {

235 if (c == '>') {

236 return;

Navigator.py (https://github.com/imxiaohui/vimrc-1.git) Python · 313 lines

224 focus_heading = heading.previous_sibling

225 if not skip_children:

226 while focus_heading.children:

227 focus_heading = focus_heading.children[-1]

228 else:

topology.py (https://bitbucket.org/hilfialkaff/tomography.git) Python · 405 lines

84 consec_fails = 0

85

86 while switches_left > 1 and consec_fails < 10:

87 s1 = randrange(num_switches)

88 while open_ports[s1] == 0:

90

91 s2 = randrange(num_switches)

92 while open_ports[s2] == 0 or s1 == s2:

93 s2 = randrange(num_switches)

94

111 if switches_left > 0:

112 for i in range(num_switches):

113 while open_ports[i] > 1:

114 while True:

214 # add_switch = 3

215

216 while added_switch != add_switch:

217 switch_id = randrange(num_switches)

218

campaigns.php (https://bitbucket.org/flth/xtcm.git) PHP · 355 lines

72 $start = $this->startDate;

73

74 while ($start <= $this->endDate) {

75

76 $end = mktime(0, 0, 0, date("m", $start), date("d", $start), date("Y", $start) + 1);

92 $start = $this->startDate;

93

94 while ($start <= $this->endDate) {

95

96 $end = mktime(0, 0, 0, date("m", $start) + 1, date("d", $start), date("Y", $start));

113 $start = $this->startDate;

114

115 while ($start <= $this->endDate) {

116

117 $end = mktime(0, 0, 0, date("m", $start), date("d", $start) + 7, date("Y", $start));

parser.py (https://github.com/tailhook/pyzza.git) Python · 355 lines

116 tt = token_chars[ch]

117 if tt == TokenSpace:

118 while self.index < data.length:

119 if ch == '\n':

120 self.line += 1

129 elif tt == TokenName:

130 start = self.index - 1

131 while self.index < data.length:

132 if token_chars[data.charAt(self.index)] != TokenName:

133 break

137 elif tt == TokenString:

138 res = ""

139 while self.index < data.length:

140 ch1 = data.charAt(self.index)

141 self.index += 1

AbstractionAttribute.C (https://bitbucket.org/bathtub/rose.git) C · 373 lines

98 SgExpression* returnExpression = NULL;

99

100 // Member function binary operators take only 1 parameter while global

101 // (most often friend) function binary operators take 2 paramters.

102 if (numberOfParameters == 1)

179 SgExpression* returnExpression = NULL;

180

181 // Member function binary operators take only 1 parameter while global

182 // (most often friend) function binary operators take 2 paramters.

183 if (numberOfParameters == 1)

241 SgExpression* returnExpression = NULL;

242

243 // Member function binary operators take only 1 parameter while global

244 // (most often friend) function binary operators take 2 paramters.

245 if (numberOfParameters == 1)

oldresta.c (https://github.com/henriquegemignani/ime.git) C · 383 lines

310

311 VERBOSE = 0;

312 while( numPecas > 1 ) {

313 /*if( numIteracoes + 5 >= 10000 ) VERBOSE = 1; */

314 if( VERBOSE ) printf("Loop: %d pecas\n", numPecas );

315 aux = 0;

316 while( GOKU_POWER_LEVEL > 9000 ) {

317 if( VERBOSE ) printf("\tBusca > ");

318 if( !encontraBuraco( curPonto, it, &aux ) ) {

374 }

375 }

376 while( !pilhaVazia( respPilha ) ) {

377 it = topoPilha( respPilha );

378 printf("(%d,%d,%d)\n", it->p->x, it->p->y, (int) it->dir );

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

This Java code defines a NameSpace class that represents a namespace for variables, methods, and classes. It provides functionality for importing and exporting objects, classes, and packages, as well as caching name resolution. The class also handles variable and method clearing, object importation, static class importation, and package setting.

395 private String [] enumerationToStringArray( Enumeration e ) {

396 Vector v = new Vector();

397 while ( e.hasMoreElements() )

398 v.addElement( e.nextElement() );

399 String [] sa = new String [ v.size() ];

408 private BshMethod [] flattenMethodCollection( Enumeration e ) {

409 Vector v = new Vector();

410 while ( e.hasMoreElements() ) {

411 Object o = e.nextElement();

412 if ( o instanceof BshMethod )

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

This Java class represents a rectangle with methods for manipulating its position, size, and geometry. It provides functionality for iterating over the rectangle’s outline, calculating its hash code, and determining equality with other rectangles. The class is designed to be multi-threaded safe and can be used in various graphical applications.

610 return true;

611 }

612 while ((out1 = outcode(x1, y1)) != 0) {

613 if ((out1 & out2) != 0) {

614 return false;

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

137 quint16 *dst = ((quint16 *) (destPixels + ty1 * dbpl)) + tx1;

138

139 while (h--) {

140 const SRC *src = (const SRC *) (srcPixels + (srcy >> 16) * sbpl);

141 int srcx = basex;

237 quint32 *dst = ((quint32 *) (destPixels + ty1 * dbpl)) + tx1;

238

239 while (h--) {

240 const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl);

241 int srcx = basex;

328 // Beginning of the scan line, with per-pixel checks.

329 i = x1 - fromX;

330 while (i) {

331 int uu = qBound(sourceRect.left(), u >> 16, sourceRect.left() + sourceRect.width() - 1);

332 int vv = qBound(sourceRect.top(), v >> 16, sourceRect.top() + sourceRect.height() - 1);

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

This C code implements a USB driver for CDC (Communication Device Class) Ethernet devices, which are used to connect computers to the internet over USB. The driver provides support for various devices from different manufacturers, including Ericsson and Toshiba. It allows these devices to communicate with the host computer and establish network connections.

123 memset(info, 0, sizeof *info);

124 info->control = intf;

125 while (len > 3) {

126 if (buf [1] != USB_DT_CS_INTERFACE)

127 goto next_desc;

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

This Java code implements a connection to an SSH FTP server, allowing users to perform various file operations such as listing directories, creating and removing files and directories, renaming files, and retrieving and storing files. It uses the J2SSH library to establish a secure connection and interact with the FTP server.

105 count = sftp.listChildren(dir,listing);

106 }

107 while(count != -1);

108

109 for(int i = 0; i < listing.size(); i++)

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

This HTML code is a documentation page for a Java-based beautifier plugin, Beauty. It explains how to create and use custom beautifiers, provides examples of how to add new plugins, and credits contributors who helped develop the plugin. The content is written in a formal tone, suggesting that it is intended for developers who want to customize or extend the plugin’s functionality.

29 </table>

30 <p>

31 The Beauty plugin is a general framework for code beautifiers and provides several built-in beautifiers. While there are several existing plugins for beautifying/formatting various source file formats, this plugin aims to consolidate those formatters into a standard API so that beautifying can be performed in a general way, similar to how the SideKick plugin provides a general framework for code browsers.

32 <p>

33 There are several beautifiers/formatters included:

257 </table>

258 <p>

259 While the ability to create a custom beautifier from within the Beauty plugin is fairly good, even better are beautifiers designed specifically with a strong understanding of the language to be beautified. This is why Beauty can delegate to the AStyle plugin and the XML plugin for beautification of Java, C, C++, XML, and HTML files.

260 <p>

261 Adding a new beautifier/formatter is quite simple:

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.

114 if (templateFiles == null) this.refreshTemplates();

115 e = this.templateFiles.elements();

116 while (e.hasMoreElements()) {

117 o = e.nextElement();

118 if (o instanceof TemplateDir) {

165 StringBuffer retStr = new StringBuffer("Dir: " + this.getLabel() + newLine);

166 Enumeration kids = this.children();

167 while (kids.hasMoreElements()) {

168 TemplateFile f = (TemplateFile) kids.nextElement();

169 if (f.isDirectory()) {

tcl.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 686 lines

159 <KEYWORD1>for</KEYWORD1>

160 <KEYWORD1>foreach</KEYWORD1>

161 <KEYWORD1>while</KEYWORD1>

162 <KEYWORD1>break</KEYWORD1>

163 <KEYWORD1>continue</KEYWORD1>

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

277 void GraphicsContext::platformDestroy()

278 {

279 while (!m_data->layers.isEmpty())

280 endTransparencyLayer();

281

657 p->drawPixmap(destStart, *image, sourceRect);

658 x += w;

659 } while (repeatX && x < r.x() + r.width());

660 x = startX;

661 y += h;

662 } while (repeatY && y < r.y() + r.height());

663 }

664 }

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

This Java code is part of a BeanShell implementation, a JavaScript-like scripting language for Java. It provides an interface to interact with a Java application’s UI components and perform operations on them. The code sets up default variables for a script, handles exceptions, and creates an interpreter instance. It also manages class loading and listener registration for the interpreter.

753 // clean up old listeners

754 Reference deadref;

755 while ( (deadref = refQueue.poll()) != null )

756 {

757 boolean ok = listeners.remove( deadref );

Tiger.jj (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 4099 lines

176 }

177 }

178 } while (t != null);

179 return t;

180 }

384 | < VOID: "void" >

385 | < VOLATILE: "volatile" >

386 | < WHILE: "while" >

387 }

388

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

This Java class, FtpWriter, extends FilterWriter and is used to write data to an FTP server. It’s created through an FtpClient object and provides a way to signal the completion of writer processing by closing the underlying writer and notifying the client. The class ensures that the FtpClient receives a response from the FTP server after writing operations are completed.

23 * ftp.dataPort();

24 * <B>FtpWriter out = ftp.store(targetFile);

25 * while (someReader.ready())

26 * out.write(someReader.read());

27 * in.close();</B>

using-macros.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 184 lines

27

28 <para>The simplest use of macros is to record a series of key strokes

29 and menu commands as a BeanShell script, and play them back later. While

30 this doesn't let you take advantage of the full power of BeanShell, it

31 is still a great time saver and can even be used to

36 macro name and begins recording.</para>

37

38 <para>While recording is in progress, the string <quote>Macro

39 recording</quote> is displayed in the status bar. jEdit records the

40 following:</para>

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

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

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

2

rules.html (http://hadesmem.googlecode.com/svn/trunk/) text · 0 lines

996 <td>

997 <p>

998 <code class="computeroutput"><span class="identifier">expression</span><span class="special">::</span><span class="identifier">while_</span><span class="special">&lt;</span><span class="identifier">Cond</span><span class="special">,</span>

999 <span class="identifier">Do</span><span class="special">&gt;</span></code>

1000 </p>

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

This Java code defines a SessionSwitcher class, which is a toolbar component for jEdit that allows users to switch between different sessions. It provides buttons for saving, reloading, and managing session properties, as well as updating the current session in a combo box dropdown menu. The toolbar also displays a title with customizable text.

178 SessionManager.getInstance().setCurrentSession(view, selectedSession);

179 // The session may not have been changed (eg. if the session change

180 // was cancelled by the user while closing all open buffers).

181 // Make sure the combo box is correct by calling ...

182 updateSessionComboBox();

activity-log.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 43 lines

32 </itemizedlist>

33 <para>

34 While jEdit is running, the log file on disk may not always accurately reflect

35 what has been logged, due to buffering being done for performance reasons.

36 To ensure the file on disk is up to

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

829 /*

830 * Show the user that we are busy reading the input. Sometimes this

831 * may take a while. When reading from stdin another program may

832 * still be running, don't move the cursor to the last line, unless

833 * always using the GUI.

976 }

977 /* Delete the previously read lines. */

978 while (lnum > from)

979 ml_delete(lnum--, FALSE);

980 file_rewind = FALSE;

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

149

150 // Found at least one existing charset, replace all occurrences with new charset.

151 while (len) {

152 mediaType.replace(pos, len, charsetValue);

153 unsigned int start = pos + charsetValue.length();

649

650 // ThreadableLoader::create can return null here, for example if we're no longer attached to a page.

651 // This is true while running onunload handlers.

652 // FIXME: Maybe we need to be able to send XMLHttpRequests from onunload, <http://bugs.webkit.org/show_bug.cgi?id=10904>.

653 // FIXME: Maybe create() can return null for other reasons too?

654 m_loader = ThreadableLoader::create(scriptExecutionContext(), this, request, options);

655 if (m_loader) {

656 // Neither this object nor the JavaScript wrapper should be deleted while

657 // a request is in progress because we need to keep the listeners alive,

658 // and they are referenced by the JavaScript wrapper.

povray.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 519 lines

505 <KEYWORD2>water_level</KEYWORD2>

506 <KEYWORD2>waves</KEYWORD2>

507 <KEYWORD1>#while</KEYWORD1>

508 <KEYWORD2>width</KEYWORD2>

509 <KEYWORD2>wood</KEYWORD2>

csharp.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 187 lines

13 <PROPERTY NAME="indentCloseBrackets" VALUE="}" />

14 <PROPERTY NAME="indentNextLine"

15 VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />

16 <!-- set this to 'true' if you want to use GNU coding style -->

17 <PROPERTY NAME="doubleBracketIndent" VALUE="false" />

138 <KEYWORD1>unsafe</KEYWORD1>

139 <KEYWORD1>virtual</KEYWORD1>

140 <KEYWORD1>while</KEYWORD1>

141

142 <KEYWORD2>using</KEYWORD2>

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

This Java code defines a file filter for importing files into a project viewer. It checks if a file is listed in the CVS/Entries file and, if so, imports it. The filter also supports .svn/Entries files from Subversion version control systems. It caches entries to improve performance and provides options for customizing its behavior.

111 String line;

112

113 while ( (line = br.readLine()) != null ) {

114 int idx1, idx2;

115 idx1 = line.indexOf('/');

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

This Java code is part of a project that allows users to rename nodes (files, directories) within a project structure. It provides a dialog for inputting new names and includes options to prevent changes on disk. The code handles renaming files, directories, and projects, and updates the project structure accordingly.

80 RenameDialog dlg = new RenameDialog(node);

81

82 while (!isValid) {

83 dlg.setVisible(true);

84 newName = dlg.getInput();

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

This HTML code displays a message explaining that when loading a file, jEdit remembers if it had a trailing line separator character and writes it back to the file when saved. The user can remove this separator in the Buffer Options dialog box.

1 <html><body>When loading a file, jEdit remembers if it had a trailing

2 line separator character. While this line separator is never shown in the text

3 area, it is written back to the file when the buffer is saved.<p>

4

FFNet.cc (https://freespeech.svn.sourceforge.net/svnroot/freespeech) C++ · 422 lines ✨ Summary

This C++ code defines a class FFNet that represents a neural network. It provides methods for training and testing the network, including reading from an input stream, printing information about the network, and updating its weights based on gradients calculated during training. The code also includes functions for parsing and serializing the network’s topology and layers.

109 double momentum=mom;

110

111 while (iter)

112 {

113 int i,j;

391 string tag;

392

393 while (1)

394 {

395 char ch;

gnome-gettext.m4 (https://freespeech.svn.sourceforge.net/svnroot/freespeech) m4 · 337 lines ✨ Summary

This M4 code is a part of the GNU gettext package, which provides internationalization and localization support for software. It generates configuration files for building and installing gettext packages, including setting up locale directories, determining catalog formats, and creating lists of files to be processed by xgettext. The output is used to configure the build process for gettext packages.

189 # fi

190

191 dnl These rules are solely for the distribution goal. While doing this

192 dnl we only have to keep exactly one list of the available catalogs

193 dnl in configure.in.

281 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)

282

283 dnl Transform the SED scripts while copying because some dumb SEDs

284 dnl cannot handle comments.

285 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed

lua.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 235 lines

74 <KEYWORD1>do</KEYWORD1>

75 <KEYWORD1>end</KEYWORD1>

76 <KEYWORD1>while</KEYWORD1>

77 <KEYWORD1>repeat</KEYWORD1>

78 <KEYWORD1>until</KEYWORD1>

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

This C code is part of a file system implementation, specifically handling journaling and data corruption protection for a Linux file system. It provides functions to manage inodes, handle page faults, and ensure data integrity by writing changes to a journal before modifying the underlying storage. The code ensures that file system updates are atomic and consistent, preventing data corruption and ensuring system reliability.

379 unsigned int blk;

380

381 while (bref < p+max) {

382 blk = le32_to_cpu(*bref++);

383 if (blk &&

445 if (!p->key)

446 goto no_block;

447 while (--depth) {

448 bh = sb_getblk(sb, le32_to_cpu(p->key));

449 if (unlikely(!bh))

594

595 count++;

596 while (count < blks && count <= blocks_to_boundary &&

597 le32_to_cpu(*(branch[0].p + count)) == 0) {

598 count++;

FavoritesPanel.java (https://bitbucket.org/nbargnesi/idea.git) Java · 201 lines

94 if (node != null) {

95 TreePath pathToList = myTree.getPath(node);

96 while (pathToList != null) {

97 final Object pathObj = pathToList.getLastPathComponent();

98 if (pathObj instanceof DefaultMutableTreeNode) {

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.

121 private void findNextResource() {

122 URL url = null;

123 while ((pathElementsIndex < pathComponents.size())

124 && (url == null)) {

125 try {

436 boolean firstPass = true;

437 Enumeration componentEnum = pathComponents.elements();

438 while (componentEnum.hasMoreElements()) {

439 if (!firstPass) {

440 sb.append(System.getProperty("path.separator"));

472 // ***HACK*** We ask the VM to create an instance

473 // by voluntarily providing illegal arguments to force

474 // the VM to run the class' static initializer, while

475 // at the same time not running a valid constructor.

476

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

This Java code defines a QuickNotepad plugin for the jEdit text editor. It creates a floating window with a text area, toolbar, and tool panel, allowing users to edit files and save changes. The plugin also handles file loading, saving, and formatting, as well as responding to keyboard shortcuts like Esc to close the window.

215 StringBuffer sb = new StringBuffer(2048);

216 String str;

217 while((str = bf.readLine()) != null)

218 {

219 sb.append(str).append('\n');

perl.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 595 lines

143 <KEYWORD1>if</KEYWORD1>

144 <KEYWORD1>until</KEYWORD1>

145 <KEYWORD1>while</KEYWORD1>

146 <KEYWORD1>elsif</KEYWORD1>

147 <KEYWORD1>else</KEYWORD1>

ExpandableDictionary.java (http://scandinavian-keyboard.googlecode.com/svn/trunk/) Java · 458 lines ✨ Summary

This Java code outputs a hexadecimal representation of Unicode character codes, mapping each code to its corresponding Unicode character. The data is generated from a file called UnicodeData.txt and is used to create a lookup table for easy access to Unicode characters by their code points.

453

454 // generated with:

455 // cat UnicodeData.txt | perl -e 'while (<>) { @foo = split(/;/); $foo[5] =~ s/<.*> //; $base[hex($foo[0])] = hex($foo[5]);} for ($i = 0; $i < 0x500; $i += 8) { for ($j = $i; $j < $i + 8; $j++) { printf("0x%04x, ", $base[$j] ? $base[$j] : $j)}; print "\n"; }'

456

457 }

UnixFileSystem.php (git://github.com/alexgorbatchev/SyntaxHighlighter.git) text · 0 lines

110 }

111 $n = (int) $len;

112 while (($n > 0) && ($pathname{$n-1} === '/')) {

113 $n--;

114 }

243 }

244 $vv = array();

245 while (($file = @readdir($dir)) !== false) {

246 if ($file == "." || $file == "..") {

247 continue;

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

195 QBezier *b = beziers;

196

197 while (b >= beziers) {

198 // check if we can pop the top bezier curve from the stack

199 qreal y4y1 = b->y4 - b->y1;

447 QBezier *o = curveSegments;

448

449 while (b >= beziers) {

450 int stack_segments = b - beziers + 1;

451 if ((stack_segments == 10) || (o - curveSegments == maxSegments - stack_segments)) {

474

475 give_up:

476 while (b >= beziers) {

477 ShiftResult res = shift(b, o, offset, threshold);

478

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

This Java class, BSHLiteral, represents a literal value in BeanShell scripting language. It extends SimpleNode and overrides the eval method to return the stored value. The class handles escape sequences for special characters like \b, \t, etc., by replacing them with their corresponding Unicode values or characters.

117

118 // check the next two characters

119 while(endPos < i + 2)

120 {

121 if(Character.isDigit(str.charAt(endPos + 1)))

faq-use.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 715 lines

371

372 <answer>

373 <para>While jEdit can display any character provided by a

374 supported encoding set and enter any character supported by

375 a keyboard driver, it does not have the ability to insert

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

This HTML code outputs a manual page for Artistic Style, a source code formatter. It provides information on options and usage, including explanations of various flags and their effects. The output includes acknowledgments to contributors and beta-testers, as well as a call to action to enjoy the program. The text is formatted in a traditional manual page style, with sections and paragraphs that resemble those found in printed documentation.

152 </font><font color="#ff0000" size="3"><strong>RETAINS the

153 original file name</strong></font><font color="#330000"

154 size="3">, while a copy of the original file is created

155 with a "</font><font color="#ff0000" size="3"><strong>.orig</strong></font><font

156 color="#330000" size="3">" appended to the original

160 color="#330000" size="3"> as above, the indented result

161 will be named </font><font color="#993399" size="3"><strong>Foo.java</strong></font><font

162 color="#330000" size="3">, while the original

163 pre-indented file will be renamed to </font><font

164 color="#993399" size="3"><strong>Foo.java.orig</strong> </font><font

851 >{</tt></b></font><font color=#800080 size=3

852 ><b><tt><br

853 >&nbsp;&nbsp;&nbsp; while (isFoo)<br

854 >&nbsp;&nbsp;&nbsp; </tt></b></font><font

855 color=#ff0000 size=3><b><tt

question49234.sh (https://bitbucket.org/shuangxinyu/emacspack.git) Shell · 42 lines

27 print qq(<?xml version="1.0" encoding="utf-8"?>\n<stores>);

28 open IN, '<$STORE_TMP';

29 while (read IN,\$info, 12) {

30 my (\$div, \$s) = unpack 'x2 i i', \$info; # read binary nums

31 \$_ = <IN>; # Read store name

sorter.js (http://enginey.googlecode.com/svn/trunk/) JavaScript · 89 lines ✨ Summary

This JavaScript code defines a sorting function for data sets. It creates a custom comparator function based on user-defined attributes and their corresponding sorting directions. The basicComparator function is used as a fallback if no specific comparator is defined, treating undefined values as larger. The createSortFunction helper function generates the sorting function based on the provided attribute array and store object.

76 return function(rowA, rowB){

77 var i=0;

78 while(i < sortFunctions.length){

79 var ret = sortFunctions[i++](rowA, rowB);

80 if(ret !== 0){

bootstrap.js (http://enginey.googlecode.com/svn/trunk/) JavaScript · 463 lines ✨ Summary

This JavaScript code is a part of the Dojo toolkit, a popular JavaScript library for building web applications. It provides various utility functions and APIs for tasks such as object manipulation, event handling, and debugging. The code defines several functions that can be used to perform common operations in a web application, including eval, deprecated, and experimental markers.

116 ];

117 var i=0, tn;

118 while((tn=cn[i++])){

119 if(!console[tn]){

120 (function(){

181 var _platforms = ["Browser", "Rhino", "Spidermonkey", "Mobile"];

182 var t;

183 while((t=_platforms.shift())){

184 d["is"+t] = false;

185 }

declare.js (http://enginey.googlecode.com/svn/trunk/) JavaScript · 191 lines ✨ Summary

This JavaScript code defines a class system, allowing for the creation of classes with inheritance and mixin functionality. It provides methods for initializing instances, overriding inherited properties, and accessing mixin ancestors. The code is designed to be flexible and customizable, enabling developers to create complex class hierarchies and compositions.

140 _findMixin: function(mixin){

141 var c = this.constructor, p, m;

142 while(c){

143 p = c.superclass;

144 m = c.mixin;

160 // ascend chain

161 p = c.superclass;

162 }while(p);

163 // if we couldn't find an ancestor in our primary chain, try a mixin chain

164 return !has && (p=this._findMixin(ptype)) && this._findMethod(name, method, p, has);

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

This Java code implements a console emulator for a shell-like interface. It provides methods to execute commands, navigate directories, and handle file operations. The code uses a stack-based directory system and handles escaping and quoting of command arguments. It also keeps track of the current working directory and last directory used. The code is likely part of a larger project or library for building custom shells or console interfaces.

660 String alias;

661 int i = 0;

662 while ((alias = jEdit.getProperty("console.shell.alias." + i)) != null)

663 {

664 aliases.put(alias, jEdit.getProperty("console.shell.alias." + i

683 // load variables from properties

684 /*

685 * String varname; i = 0; while((varname =

686 * jEdit.getProperty("console.shell.variable." + i)) != null) {

687 * variables.put(varname,jEdit.getProperty("console.shell.variable." +

884

885 Iterator iter = commands.keySet().iterator();

886 while (iter.hasNext())

887 {

888 String cmd = (String) iter.next();

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

This Java code implements a console output system for an integrated development environment (IDE). It creates a new process to execute a command, reads its standard output and error streams, and displays them in the IDE. The process can be stopped and waited for to complete, allowing the IDE to display the exit status of the executed command.

369

370 String line;

371 while((line = in.readLine()) != null)

372 {

373 parseLine(line);

409

410 String line;

411 while((line = in.readLine()) != null)

412 {

413 parseLine(line);

sb1250-mac.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 2956 lines ✨ Summary

This C code implements a Linux driver for a specific type of Ethernet controller. It registers platform devices for each available unit, sets their MAC addresses, and provides a way to probe and remove them. The driver is designed to work with various System-on-Chip (SoC) types and can be used in a variety of applications, such as networking or embedded systems.

957 * blocks in the descriptor is the number of blocks

958 * *spanned*, so we need to add in the offset (if any)

959 * while doing the calculation.

960 */

961

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

This Java code is part of a text editor’s plugin system, responsible for managing various menus and actions. It defines classes for handling recent files, macros, and new views, as well as actions to show files in the Finder. The code provides a framework for plugins to interact with the text editor, allowing users to customize its behavior through menu options and keyboard shortcuts.

132 {

133 Iterator i = filenames.iterator();

134 while (i.hasNext())

135 jEdit.openFile(msg.getView(),(String)i.next());

136 MacOSPlugin.started = true;

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

This Java code is part of a graphical user interface (GUI) for an installation program, likely for software distribution. It displays a progress bar and various panels to guide the user through the installation process, including selecting components, choosing directories, and displaying estimated disk usage. The GUI updates in real-time as the installation progresses, providing feedback to the user.

133 Map osTaskDirs = chooseDirectory.osTaskDirs;

134 Iterator keys = osTaskDirs.keySet().iterator();

135 while(keys.hasNext())

136 {

137 OperatingSystem.OSTask osTask = (OperatingSystem.OSTask)keys.next();

KeymapImpl.java (https://bitbucket.org/nbargnesi/idea.git) Java · 908 lines

237 if (list != null) {

238 Iterator<Shortcut> it = list.iterator();

239 while (it.hasNext()) {

240 Shortcut each = it.next();

241 if (shortcut.equals(each)) {

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

This Java code generates an XML file that represents a macOS application’s bundle metadata, including its name, version, and various settings such as classpath, services, and properties. The output is a standard format required by Apple for distributing applications on the Mac App Store. It creates an XML document with key-value pairs representing the bundle’s configuration.

283 Iterator itor = documentTypes.iterator();

284

285 while (itor.hasNext()) {

286

287 DocumentType documentType = (DocumentType) itor.next();

332 Iterator itor = services.iterator();

333

334 while (itor.hasNext()) {

335 Service service = (Service)itor.next();

336 Node serviceDict = createNode("dict",array);

Activator.java (http://keywatch.googlecode.com/svn/trunk/) Java · 262 lines ✨ Summary

This Java code is an Activator class for an OSGi bundle, which sets up a web server using Jetty to host a web application. It provides access to services and implements various listener interfaces to handle bundle events and framework updates. The code initializes the servlet container, adds context, and starts the server when the bundle starts, stopping it when the bundle stops.

101 FileOutputStream fos = new FileOutputStream("webapps/framework.war");

102 int b = is.read();

103 while (b != -1)

104 {

105 fos.write(b);

TaskInfoPopup.java (http://keywatch.googlecode.com/svn/trunk/) Java · 445 lines ✨ Summary

This Java code is a GUI popup window that displays information about a task, allowing users to start, stop, enable, disable, and refresh the task. It also provides options for canceling operations and displaying task status. The popup window can be triggered by clicking on a link in a larger application, and it communicates with a separate task management system to perform actions on the task.

383 statusLine.add(img);

384

385 Label note = new Label(" Querying for task status. This may take a while; please be patient...");

386 note.setStyleName("kwTaskPopup headerText");

387 statusLine.add(note);

query.php (http://forceworkbench.googlecode.com/svn/trunk/workbench/) PHP · 996 lines ✨ Summary

This PHP code is part of a Salesforce Workbench application, handling query-related functionality. It generates query results, exports data to CSV, and allows users to execute queries asynchronously. The code also handles errors, warnings, and export options, providing a user-friendly interface for interacting with Salesforce data.

667 $memLimitBytes = toBytes(ini_get("memory_limit"));

668 $memWarningThreshold = getConfig("memoryUsageWarningThreshold") / 100;

669 while(($suppressScreenOutput || getConfig("autoRunQueryMore")) && !$queryResponse->done) {

670

671 if ($memLimitBytes != 0 && (memory_get_usage() / $memLimitBytes > $memWarningThreshold)) {

watchdog-simple.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 28 lines ✨ Summary

This C code opens a watchdog device file, writes a null character to it repeatedly, and then waits for 10 seconds before checking again. If an error occurs during writing or syncing, the program exits with an error message. The loop continues indefinitely until an error is encountered.

12 exit(EXIT_FAILURE);

13 }

14 while (1) {

15 ret = write(fd, "\0", 1);

16 if (ret != 1) {

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

This Java code defines a GUI component, TagStack, which displays a list of stack positions for a text editor. It allows users to navigate through these positions by clicking on them, and provides options to remove, pop, or clear the current position. The component also includes a popup menu with actions to perform on the selected position.

246 StringBuffer b = new StringBuffer("" + p.getLineNumber());

247 // hackish way to add a fixed number of spaces before filename

248 while(b.length() < 6)

249 b.append(" ");

250 lineNumber.setText(b.toString());

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

This Java class, CTagsFileProvider, is a provider of identifier names from a tags file generated by ctags. It loads and processes the identifiers from the file, storing them in an internal list. The class provides methods to process the file, forget the loaded identifiers, and iterate over the identifiers, allowing for use in other parts of the application.

26 int tabloc;

27

28 while(true) {

29 line = reader.readLine();

30 if (line == null) break;

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

This C header file implements a singly linked list data structure. It provides functions to initialize, insert, remove, and delete elements from the list, as well as retrieve its size. The list is represented by two pointers, pHead and pTail, which point to the first and last elements of the list, respectively.

112 pPrvEntry = pList->pHead;

113 pCurEntry = pPrvEntry->pNext;

114 while(pCurEntry != NULL)

115 {

116 if (pEntry == pCurEntry)

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

This Java code is part of a plugin manager for the JEdit text editor. It displays a table of plugins, allowing users to sort and install them. The code handles user interactions, such as clicking on column headers to sort the table, and installing selected plugins with optional dependencies. It also includes progress indicators and confirmation dialogs for installation operations.

263 return;

264 Iterator parentsIter = entry.parents.iterator();

265 while(parentsIter.hasNext())

266 {

267 ((Entry)parentsIter.next()).install = false;

381 StringBuffer buf = new StringBuffer();

382 Iterator iter = parents.iterator();

383 while(iter.hasNext())

384 {

385 buf.append(((Entry)iter.next()).name);

plugin-implement.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 1232 lines

69 <para>

70 We will keep the capabilities of this plugin modest, but a few

71 other features would be worthwhile. The user should be able to write

72 the contents of the notepad to storage on demand. It should also be

73 possible to choose the name and location of the file that will be

desktop.bsh (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 143 lines

126 startClassMapping() { }

127 classMapping( msg ) { }

128 errorWhileMapping( msg ) { }

129 endClassMapping() { }

130 };

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

This Java code creates a GUI component for managing browser colors. It allows users to add, remove, and edit color settings for different file types. The component displays a table with two columns: one for glob patterns and another for corresponding colors. Users can select new colors from a palette or enter custom values. The changes are saved when the user clicks “Save”.

175 int i = 0;

176 String glob;

177 while((glob = jEdit.getProperty("vfs.browser.colors." + i + ".glob")) != null)

178 {

179 entries.addElement(new Entry(glob,

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

This Java class appears to be a part of an XML parser, providing functionality for parsing and analyzing XML tags. It contains methods for finding allowed elements, attributes, and prefixes within a given tag context, as well as generating XPath expressions based on the parsed data. The class seems to be designed to support advanced XML processing tasks.

206 prefix+= "_";

207 }

208 while(prefixToNS.containsKey(prefix+String.valueOf(uniq)))

209 {

210 uniq++;

254 // add everything

255 Iterator iter = mappings.keySet().iterator();

256 while(iter.hasNext())

257 {

258 String prefix = (String)iter.next();

271 // add everything but the parent's prefix now

272 Iterator iter = mappings.keySet().iterator();

273 while(iter.hasNext())

274 {

275 String prefix = (String)iter.next();

kvm-s390.h (http://omnia2droid.googlecode.com/svn/trunk/) C++ Header · 97 lines ✨ Summary

This C header file defines the interface for KVM (Kernel-based Virtual Machine) on s390 architecture. It provides functions and macros for handling interrupts, memory management, and debugging, as well as interfaces for injecting virtual machine events and handling specific interrupt types. The code is part of the Linux kernel’s KVM implementation.

33 debug_sprintf_event(d_kvm->arch.dbf, d_loglevel, d_string "\n", \

34 d_args); \

35 } while (0)

36

37 #define VCPU_EVENT(d_vcpu, d_loglevel, d_string, d_args...)\

41 d_vcpu->arch.sie_block->gpsw.mask, d_vcpu->arch.sie_block->gpsw.addr,\

42 d_args); \

43 } while (0)

44

45 static inline int __cpu_is_stopped(struct kvm_vcpu *vcpu)

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

263 totals[3] = 0;

264

265 while (kernelValue >= 0) {

266 totals[0] += m_kernelMatrix[kernelValue] * static_cast<float>(paintingData.srcPixelArray->get(kernelPixel++));

267 totals[1] += m_kernelMatrix[kernelValue] * static_cast<float>(paintingData.srcPixelArray->get(kernelPixel++));

304 return (y * paintingData.width + x) << 2;

305 case EDGEMODE_WRAP:

306 while (x < 0)

307 x += paintingData.width;

308 x %= paintingData.width;

309 while (y < 0)

310 y += paintingData.height;

311 y %= paintingData.height;

texparser.py (git://github.com/jeroenh/pytexmate.tmbundle.git) Python · 462 lines ✨ Summary

This code is a TeX parser that reads a log file generated by LaTeX compiler and prints out warnings, errors, and other messages in a human-readable format. It uses various wrappers to modify the input stream to remove unwanted line breaks and merge multiple lines of warnings into one line. The output is printed to the console.

52 line = self.input_stream.readline()

53

54 while line and not self.done:

55 line = line.rstrip("\n")

56

163 # not help for file names with spaces in the name. Also, I doubt that latex supports files

164 # names with accented chars, especially because HFS+ uses NFD (decomposed) Unicode chars,

165 # while most UNIX tools expect NFC (precomposed) chars.

166 self.patterns += [

167 (re.compile('This is') , self.info),

353 def readline(self):

354 statement = ""

355 while True:

356 line = self.input_stream.readline()

357 if not line: # EOF

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

100

101 AutodrainedPool pool;

102 while (OwnPtr<Task> task = m_queue.waitForMessage()) {

103 task->performTask();

104 pool.cycle();

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

This Java code creates a graphical user interface (GUI) for displaying tips of the day, also known as “tip of the day” windows. It displays a random tip in an HTML editor pane and allows users to navigate to the next or previous tip, show/hide the next tip, or close the window. The GUI is designed to be customizable through properties set by the JEdit application.

133 // clicks 'Next Tip'

134 int tipToShow = currentTip;

135 while(tipToShow == currentTip || !tips[tipToShow].getName().endsWith(".html"))

136 tipToShow = Math.abs(new Random().nextInt()) % count;

137 try

tip62.html (https://jedit.svn.sourceforge.net/svnroot/jedit) HTML · 6 lines

1 <html><body>

2 Pressing <b>TAB</b> or <b>A+RIGHT</b>

3 while a selection is active shifts each selected line

4 to the right by one level of indent.

5 </body></html>

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

This C code implements a part of the Linux kernel’s file descriptor management system, specifically for sending file descriptors over network connections using the SCM_RIGHTS message type. It allows a process to send its open files to another process, which can then receive and use them without having to create new file descriptors. The code provides functions for creating, manipulating, and sending file descriptor lists between processes.

117

118 list_add(&fpl->list, &work_list);

119 while (!list_empty(&work_list)) {

120 fpl = list_first_entry(&work_list, struct scm_fp_list, list);

121

FacetFinderImpl.java (https://bitbucket.org/nbargnesi/idea.git) Java · 149 lines

109 final Map<VirtualFile, List<Facet>> map = getRootToFacetsMap(type);

110 if (!map.isEmpty()) {

111 while (file != null) {

112 final List<F> list = (List<F>)((List)map.get(file));

113 if (list != null) {

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

111 + broken/weird focus behaviour (bug #1538692)

112 + now keeps selection if you cancel the installation or an I/O-Error

113 occures while installing or updating (bug #1538689)

114 + selection and checked state of plugins is now remembered if going to

115 other tabpanes or to the settings (feature request #974759)

899 - Fixed a memory leak. Token markers were retaining the line segment

900 they were given to tokenize -- in some cases, this line segment could

901 hang around for a while, and was huge.

902

903 - Fix performance regression when deleting text; too many lines were

922 when a split view is resized.

923

924 - If autosave kicked in while the 'Close All Buffers' dialog was open,

925 then the perspective would be saved, and the wrong buffer would be

926 restored on the next startup.

ascii.py (git://github.com/clawpack/clawpack-4.x.git) Python · 428 lines ✨ Summary

This Python code reads data from a file named fort.t and returns various parameters such as time, number of equations, number of grids, auxiliary values, and dimensions. It appears to be part of a larger program that processes data from this file, possibly in the context of numerical simulations or scientific computing. The code handles errors and provides informative error messages when encountering issues with the file.

262 for i in xrange(grid.dimensions[0].n):

263 l = []

264 while len(l)<grid.meqn:

265 line = f.readline()

266 l = l + line.split()

271 for i in xrange(grid.dimensions[0].n):

272 l = []

273 while len(l)<grid.meqn:

274 line = f.readline()

275 l = l + line.split()

283 for i in xrange(grid.dimensions[0].n):

284 l=[]

285 while len(l) < grid.meqn:

286 line = f.readline()

287 l = l + line.split()

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

This Java code is part of a text rendering engine, responsible for laying out and rendering text on a screen. It uses font substitution to find suitable fonts for characters that can’t be rendered by the default font. The code creates glyph vectors, which represent the visual representation of text, and calculates their widths based on the chosen font.

67 float _x = 0.0f;

68

69 while(chunks != null)

70 {

71 // only paint visible chunks

124 int height = forBackground.getHeight();

125

126 while(chunks != null)

127 {

128 // only paint visible chunks

170 float x = 0.0f;

171

172 while(chunks != null)

173 {

174 if(chunks.accessable && offset < chunks.offset + chunks.length)

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

This HTML code outputs a documentation page for NetRexx, a programming language. It displays the contents of a chapter on “At Once” in a formatted manner, including text, examples, and links to other chapters. The output includes tables, paragraphs, and inline code snippets, providing a structured presentation of the language’s features and usage.

115 <li><b>\</b> used instead of <b>!</b>

116 </li><li><b>several combination</b> for the same operator

117 </li><li>Added <b>strict comparisons</b>, useful to test if two objects are the same.<br>For example "1.2"="1.20" is true, while "1.2"=="1.20" is false<br>and "Leo"="leo" is true, while "Leo"=="leo" is false.

118 </li></ul></td></tr>

119 <tr><td bgcolor="#ffffcc">

235 </p><p><table border="1" cellpadding="10"><tbody><tr><td bgcolor="#ffffcc">

236 <b>Java</b><br>

237 <pre>/* This is Translate.java */<br>import java.io.*;<br>import java.util.Hashtable;<br>public class Translate {<br> public static void main(String[] arg) {<br> Hashtable dict = new Hashtable();<br> dict.put("ciao","hi");<br> dict.put("gatto","cat");<br> dict.put("luna","moon");<br>// and more...<br> BufferedReader r =<br> new BufferedReader(<br> new InputStreamReader(System.in)<br> )<br> ;<br> String again;<br> try {<br> do {<br> System.out.print("Translation of ");<br> String trans = r.readLine();<br> if(<br> (trans = (String)dict.get(trans))<br> == null<br> )<br> trans = "unknown"<br> ;<br> System.out.println("is '"+trans+"'");<br> System.out.print("Again? [y/n] ");<br> again = r.readLine();<br> } while(again.equals("y"));<br> } catch(IOException e) {<br> e.printStackTrace();<br> }<br> }<br>}<br></pre>

238 </td><td bgcolor="#ccffff">

239 <b>NetRexx</b><br>

bbj.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 309 lines

302 <KEYWORD3>WAIT</KEYWORD3>

303 <KEYWORD3>WEND</KEYWORD3>

304 <KEYWORD3>WHILE</KEYWORD3>

305 <KEYWORD3>XOR</KEYWORD3>

306 </KEYWORDS>

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

This Java code checks if a jEdit server is running on the local machine, attempts to shut it down by sending a shutdown command, and then exits with an error code if the shutdown fails. It uses a socket connection to communicate with the server and waits for its closure before continuing execution.

108 catch(IOException ioe)

109 {

110 System.out.println("Exception while trying to connect to existing server:");

111 System.out.println(ioe);

112 System.out.println("Don't worry too much !");

runner.js (http://enginey.googlecode.com/svn/trunk/) JavaScript · 1054 lines ✨ Summary

This JavaScript code initializes and runs the Dojo Unit Test Harness, a testing framework for Dojo, a JavaScript library. It loads required modules, sets up test runners, and executes tests when loaded as part of a larger application. The code is designed to work in various environments, including browsers and Rhino (a JavaScript engine).

267 var self = this;

268 var cb = null;

269 while(chain.length > 0 && this.paused == 0){

270 // Array

271 var pair = chain.shift();

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

This C code implements a profiling system for ARMv7 processors, specifically designed to measure performance counters and interrupts on these systems. It sets up interrupt handlers, requests interrupts, and provides a way to stop and start the profiling system. The code also includes debugging features and is part of an architecture-specific profiling framework.

317

318 if (i != nr)

319 while (i-- != 0)

320 free_irq(irqs[i], NULL);

321

sas.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 459 lines

212 <KEYWORD3>%TO</KEYWORD3>

213 <KEYWORD3>%UNTIL</KEYWORD3>

214 <KEYWORD3>%WHILE</KEYWORD3>

215 <KEYWORD3>%WINDOW</KEYWORD3>

216 <KEYWORD3>%UPCASE</KEYWORD3>

437 <KEYWORD2>WHEN</KEYWORD2>

438 <KEYWORD2>WHERE</KEYWORD2>

439 <KEYWORD2>WHILE</KEYWORD2>

440 <KEYWORD2>WINDOW</KEYWORD2>

441 <KEYWORD2>WORK</KEYWORD2>

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

267 case 2: _mm_stream_si128(dst128++, value128);

268 case 1: _mm_stream_si128(dst128++, value128);

269 } while (--n > 0);

270 }

271

423 const __m128i maskadd2 = _mm_set_epi32(0x7f7f7f7f, 0x7e7e7e7e,

424 0x7c7c7c7c, 0x78787878);

425 while (height--) {

426 for (int x = 0; x < width; x += 8) {

427 const quint8 s = src[x >> 3];

442 }

443 } else {

444 while (height--) {

445 const quint8 s = *src;

446 if (s) {

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

79 if (!d->data) { \

80 return returnValue; \

81 } } while (0)

82

83 #define S5_VERSION_5 0x05

412 QSOCKS5_DEBUG << "QSocks5BindStore performing sweep";

413 QMutableHashIterator<int, QSocks5BindData *> it(store);

414 while (it.hasNext()) {

415 it.next();

416 if (it.value()->timeStamp.hasExpired(350000)) {

IntentionUsagePanel.java (https://bitbucket.org/nbargnesi/idea.git) Java · 152 lines

85 private void setupSpots(Document document) {

86 List<Segment> markers = new ArrayList<Segment>();

87 while (true) {

88 String text = document.getText();

89 final int spotStart = text.indexOf("<" + SPOT_MARKER + ">");

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

This C++ header file implements a sequential vertex coloring algorithm for graphs. It takes a graph, an ordering of its vertices, and a color map as input, and returns the maximum number of colors used in the coloring. The algorithm iterates through each vertex, assigns it the smallest available color that is not used by its neighbors, and updates the color map accordingly.

83 //is equal to i, color j is used by one of the current vertex's

84 //neighbors.

85 while ( j < max_color && mark[j] == i )

86 ++j;

87

111 std::vector<vertex_descriptor> order;

112 order.reserve(std::distance(v.first, v.second));

113 while (v.first != v.second) order.push_back(*v.first++);

114 #endif

115 return sequential_vertex_coloring

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

This C++ header file defines two template metaprogramming structs, parse_impl and phrase_parse_impl, which are used to parse expressions in the Boost.Spirit Qi library. They ensure that the input expressions match the Qi domain and provide a way to compile and execute them for parsing purposes.

28 // If you got an error_invalid_expression error message here,

29 // then the expression (expr) is not a valid spirit qi expression.

30 // Did you intend to use the auto_ facilities while forgetting to

31 // #include <boost/spirit/include/qi_auto.hpp>?

32 BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr);

55 // If you got an error_invalid_expression error message here,

56 // then the expression (expr) is not a valid spirit qi expression.

57 // Did you intend to use the auto_ facilities while forgetting to

58 // #include <boost/spirit/include/qi_auto.hpp>?

59 BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr);

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

This Java code defines a table model for XSL stylesheet parameters, allowing users to add, edit, and delete parameter names and values in a table. It provides methods for adding, removing, and editing parameters, as well as getting the current value of each parameter at a specific row and column index.

181 int i = 0;

182

183 while(iterator.hasNext()) {

184 Parameter parameter = (Parameter)iterator.next();

185 if(parameter.getName().equals(newName) && i != row) {

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

This is a function that takes a pointer to a struct dfa as an argument and returns nothing. It analyzes the tokens in the DFA and determines which strings are required to be matched by the regular expression represented by the DFA. The function then adds these strings to the list of “must” strings for the DFA.

172 do \

173 (nalloc) *= 2; \

174 while ((index) >= (nalloc)); \

175 REALLOC(p, t, nalloc); \

176 }

646 }

647 }

648 while ((wc = wc1) != L']');

649 }

650 #endif /* MBS_SUPPORT */

860 lo = (lo < 0 ? 0 : lo * 10) + *p - '0';

861 if (p != lim && *p == ',')

862 while (++p != lim && ISASCIIDIGIT (*p))

863 hi = (hi < 0 ? 0 : hi * 10) + *p - '0';

864 else

Thrift.php (git://github.com/apache/thrift.git) PHP · 821 lines ✨ Summary

This PHP code defines a Thrift protocol implementation for a TApplicationException class, which is an exception type used to handle application-level errors. It provides methods for reading and writing the exception’s message and code fields to a Thrift output stream. The code also includes Thrift-related classes and constants, setting up the global THRIFT_ROOT environment variable.

225 $fid = 0;

226 $xfer += $input->readStructBegin($fname);

227 while (true) {

228 $xfer += $input->readFieldBegin($fname, $ftype, $fid);

229 if ($ftype == TType::STOP) {

576 $fid = 0;

577 $xfer += $input->readStructBegin($fname);

578 while (true) {

579 $xfer += $input->readFieldBegin($fname, $ftype, $fid);

580 if ($ftype == TType::STOP) {

consumer_redirect.jsp (http://openinfocard.googlecode.com/svn/trunk/) JavaServer Pages · 107 lines ✨ Summary

This is a JSP file that uses OpenID4Java to authenticate users and retrieve their email addresses. It first checks if there is an existing ConsumerManager object in the application scope, and if not, creates one with an InMemoryConsumerAssociationStore and InMemoryNonceVerifier. Then it retrieves the openid parameter from the request and performs discovery on it using the manager’s discover method. If the discovery is successful, it associates with the OpenID provider using the associate method and stores the discovery information in the user’s session. It then obtains an AuthRequest message to be sent to the OpenID provider using the authenticate method and redirects the user to the authentication endpoint if the version of the OpenID protocol is 1.x, or builds a HTML FORM with the message parameters if it is 2.x.

84 Object value;

85

86 while (keyit.hasNext())

87 {

88 key=keyit.next();

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

This Java code defines an AbstractAction class named ClearAll. When executed, it clears the contents of all opened files in a Log Viewer application by iterating through each file following pane and clearing its output destination. The action is performed when a specific action event occurs.

54 Iterator i = allFileFollowingPanes.iterator();

55 FileFollowingPane fileFollowingPane;

56 while (i.hasNext()) {

57 fileFollowingPane = (FileFollowingPane) i.next();

58 //fileFollowingPane.getTextArea().setText("");

allocator.reds (git://github.com/dockimbel/Red.git) Unknown · 774 lines

104 ;; (1) Series frames size will grow from 128KB up to 2MB (arbitrary selected). This

105 ;; range will need fine-tuning with real Red apps. This growing size, with low starting value

106 ;; will allow small apps to not consume much memory while avoiding to penalize big apps.

107

108

141 ][

142 n-frame: memory/n-head

143 while [n-frame <> null][

144 n-next: n-frame/next

145 free-virtual as int-ptr! n-frame

148

149 s-frame: memory/s-head

150 while [s-frame <> null][

151 s-next: s-frame/next

152 free-virtual as int-ptr! s-frame