100+ results for 'php split'

Not the results you expected?

CommitInfo.Designer.cs (https://github.com/otac0n/gitextensions.git) C# · 235 lines

33 this.tableLayout = new System.Windows.Forms.TableLayoutPanel();

34 this.gravatar1 = new GitUI.GravatarControl();

35 this.splitContainer1 = new System.Windows.Forms.SplitContainer();

36 this._RevisionHeader = new System.Windows.Forms.RichTextBox();

37 this.commitInfoContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);

89 this.splitContainer1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);

90 this.splitContainer1.Name = "splitContainer1";

91 this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;

101 this.splitContainer1.SplitterDistance = 115;

102 this.splitContainer1.SplitterWidth = 1;

103 this.splitContainer1.TabIndex = 2;

224 private System.Windows.Forms.ToolStripMenuItem showContainedInBranchesToolStripMenuItem;

225 private System.Windows.Forms.ToolStripMenuItem showContainedInTagsToolStripMenuItem;

226 private System.Windows.Forms.SplitContainer splitContainer1;

227 private System.Windows.Forms.RichTextBox _RevisionHeader;

228 private System.Windows.Forms.ToolStripMenuItem copyCommitInfoToolStripMenuItem;

class-wp-customize-setting.php (https://gitlab.com/Gashler/dp) PHP · 439 lines

1 <?php

2 /**

3 * Customize Setting Class.

45

46 // Parse the ID for array keys.

47 $this->id_data[ 'keys' ] = preg_split( '/\[/', str_replace( ']', '', $this->id ) );

48 $this->id_data[ 'base' ] = array_shift( $this->id_data[ 'keys' ] );

49

mail.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 406 lines

1 <?php

2 class Mail {

3 protected $to;

94 $header .= 'Reply-To: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;

95 $header .= 'Return-Path: ' . $this->from . $this->newline;

96 $header .= 'X-Mailer: PHP/' . phpversion() . $this->newline;

97 //$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

98 $header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;

136 $message .= 'Content-ID: <' . basename(urlencode($attachment)) . '>' . $this->newline;

137 $message .= 'X-Attachment-Id: ' . basename(urlencode($attachment)) . $this->newline . $this->newline;

138 $message .= chunk_split(base64_encode($content));

139 }

140 }

157 exit();

158 } else {

159 if (substr(PHP_OS, 0, 3) != 'WIN') {

160 socket_set_timeout($handle, $this->timeout, 0);

161 }

phony-test.js (https://github.com/neocotic/phony.js.git) JavaScript · 467 lines

111 expect(phony.defaults).to.be.an(Object);

112 expect(phony.defaults).to.have.property('alphabet', 'itu');

113 expect(phony.defaults).to.have.property('letterSplitter', ' ');

114 expect(phony.defaults).to.have.property('wordSplitter', 'space');

216 it('should translate using the splitter options', function() {

217 var options = {letterSplitter: '_', wordSplitter: '\\+'};

218

219 expect(phony.from([

365 it('should translate using the splitter options', function() {

366 var options = {letterSplitter: '_', wordSplitter: '+'};

367

368 expect(phony.to('AJZ 0-9', options)).to.be([

qrsplit.php (https://bitbucket.org/Sinfin/pawtucket.git) PHP · 311 lines

167 }

168

169 $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr));

170 if($ret < 0)

171 return -1;

302 }

303

304 $split = new QRsplit($string, $input, $modeHint);

305

306 if(!$casesensitive)

307 $split->toUpper();

308

309 return $split->splitString();

310 }

311 }

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

1 <?php

2 /**

3 * File containing the ezcSearchQueryBuilder class.

115 );

116 $tokens = array();

117 $tokenArray = preg_split( '@(\s)|(["+():-])@', $searchQuery, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );

118 foreach ( $tokenArray as $token )

119 {

bytearray-tests.js (https://github.com/jdeolive/ringojs.git) JavaScript · 322 lines

224 };

225

226 exports.testSplit = function() {

227 var b1 = new ByteArray([0,1,2,3,4,5]), a1;

228

229 a1 = b1.split([]);

230 assert.strictEqual(1, a1.length);

231 assert.isTrue(a1[0] instanceof ByteArray);

234 assert.strictEqual(5, a1[0].get(5));

235

236 a1 = b1.split([2]);

237 assert.strictEqual(2, a1.length);

238 assert.isTrue(a1[0] instanceof ByteArray);

GlyphPacker.cs (https://github.com/virtualglobebook/OpenGlobe.git) C# · 270 lines

33 namespace OpenTK.Graphics.Text

34 {

35 class GlyphPacker

36 {

37 Node root;

39 #region --- Constructors ---

40

41 public GlyphPacker(int width, int height)

42 {

43 if (width <= 0)

219 }

220

221 // This leaf is too large, split it up. We'll decide which way to split

222 // by checking the width and height difference between this rectangle and

223 // out item's bounding box. If the width difference is larger, we'll split

ClassRegistry.php (https://github.com/masihnewbie/cakephp.git) PHP · 341 lines

1 <?php

2 /**

3 * Class collections.

7 * PHP 5

8 *

9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

10 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

11 *

14 *

15 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

16 * @link http://cakephp.org CakePHP(tm) Project

17 * @package Cake.Utility

18 * @since CakePHP(tm) v 0.9.2

19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

20 */

21

AbstractPaginator.php (https://gitlab.com/zan_zan/laravel_sample) PHP · 487 lines

1 <?php

2

3 namespace Illuminate\Pagination;

270

271 /**

272 * Determine if there are enough items to split into multiple pages.

273 *

274 * @return bool

bench_internal.c (https://gitlab.com/vectorci/rippled) C · 318 lines

2 * Copyright (c) 2014-2015 Pieter Wuille *

3 * Distributed under the MIT software license, see the accompanying *

4 * file COPYING or http://www.opensource.org/licenses/mit-license.php.*

5 **********************************************************************/

6 #include <stdio.h>

91

92 #ifdef USE_ENDOMORPHISM

93 void bench_scalar_split(void* arg) {

94 int i;

95 bench_inv_t *data = (bench_inv_t*)arg;

292 if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "mul")) run_benchmark("scalar_mul", bench_scalar_mul, bench_setup, NULL, &data, 10, 200000);

293 #ifdef USE_ENDOMORPHISM

294 if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "split")) run_benchmark("scalar_split", bench_scalar_split, bench_setup, NULL, &data, 10, 20000);

295 #endif

296 if (have_flag(argc, argv, "scalar") || have_flag(argc, argv, "inverse")) run_benchmark("scalar_inverse", bench_scalar_inverse, bench_setup, NULL, &data, 10, 2000);

LessonsManagementImpl.java (https://github.com/dyreschlock/schlock-website.git) Java · 361 lines

134 else

135 {

136 List<String> grades = Arrays.asList(StringUtils.split(grade, CONJUNCTION));

137 List<LessonPost> posts = postDAO.getByYearGradeLessonKeyword(year, grades, null);

138

227 }

228

229 List<String> grades = Arrays.asList(StringUtils.split(grade, CONJUNCTION));

230 List<LessonPost> posts = postDAO.getByYearGradeLessonKeyword(year, grades, lesson);

231

related_items_tree_app_spec.js (https://gitlab.com/markglenfletcher/gitlab-ee) JavaScript · 315 lines

8 import AddItemForm from 'ee/related_issues/components/add_issuable_form.vue';

9 import CreateIssueForm from 'ee/related_items_tree/components/create_issue_form.vue';

10 import IssueActionsSplitButton from 'ee/related_items_tree/components/issue_actions_split_button.vue';

11

12 import { mockInitialConfig, mockParentItem } from '../mock_data';

30 const findAddItemForm = () => wrapper.find(AddItemForm);

31 const findCreateIssueForm = () => wrapper.find(CreateIssueForm);

32 const findIssueActionsSplitButton = () => wrapper.find(IssueActionsSplitButton);

33

34 afterEach(() => {

90 wrapper.vm.handleAddItemFormBlur(newValue);

91

92 expect(wrapper.vm.addPendingReferences).toHaveBeenCalledWith(newValue.split(/\s+/));

93 });

94

AutoParagraphTest.php (https://gitlab.com/Griffolion/Game-Embargo-Tracker) PHP · 577 lines

1 <?php

2

3 class HTMLPurifier_Injector_AutoParagraphTest extends HTMLPurifier_InjectorHarness

219 }

220

221 public function testSplitUpInternalsOfPTagInBlockNode()

222 {

223 $this->assertResult(

231 }

232

233 public function testSplitUpInlineNodesInPTagInBlockNode()

234 {

235 $this->assertResult(

TransitionsTest.lua (https://bitbucket.org/Tsiannian/cocos2d-x.git) Lua · 266 lines

181 elseif index == Transition_Table.CCTransitionTurnOffTiles then

182 scene = CCTransitionTurnOffTiles:create(t, scene)

183 elseif index == Transition_Table.CCTransitionSplitRows then

184 scene = CCTransitionSplitRows:create(t, scene)

185 elseif index == Transition_Table.CCTransitionSplitCols then

186 scene = CCTransitionSplitCols:create(t, scene)

haSerializer.js (https://github.com/jaws-project/jaws.git) JavaScript · 301 lines

2 * HTML_AJAX_Serialize_HA - custom serialization

3 *

4 * This class is used with the JSON serializer and the HTML_AJAX_Action php class

5 * to allow users to easily write data handling and dom manipulation related to

6 * ajax actions directly from their php code

15 * reads the action to take and pipes it to the right method

16 *

17 * @param string payload incoming data from php

18 * @return true on success, false on failure

19 */

164 _camelize: function(instr)

165 {

166 var p = instr.split('-');

167 var out = p[0];

168 for(var i = 1; i < p.length; i++) {

TargetTxtClassObject.py (https://gitlab.com/envieidoc/Clover) Python · 190 lines

6 # are licensed and made available under the terms and conditions of the BSD License

7 # which accompanies this distribution. The full text of the license may be found at

8 # http://opensource.org/licenses/bsd-license.php

9 #

10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

72 # @param FileName: Text filename

73 # @param CommentCharacter: Comment char, be used to ignore comment content

74 # @param KeySplitCharacter: Key split char, between key name and key value. Key1 = Value1, '=' is the key split char

75 #

76 # @retval 0 Convert successfully

92 continue

93

94 LineList = Line.split(KeySplitCharacter, 1)

95 Key = LineList[0].strip()

96 if len(LineList) == 2:

TouchTest.ap_.d (https://gitlab.com/gregtyka/Restaurant-Menu--Ionic) D · 129 lines

110 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_select.scss \

111 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_slide-box.scss \

112 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_split-pane.scss \

113 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_tabs.scss \

114 D:\Programming\TouchPoint\TouchPoint_Ionic\TouchTest\platforms\android\assets\www\lib\ionic\scss\_toggle.scss \

PrintPreviewForm.Designer.cs (https://gitlab.com/thmjpr/ngmo_psu) C# · 264 lines

64 this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;

65 this.splitContainer1.IsSplitterFixed = true;

66 this.splitContainer1.Location = new System.Drawing.Point(0, 0);

67 this.splitContainer1.Name = "splitContainer1";

68 //

69 // splitContainer1.Panel1

85 this.splitContainer1.Size = new System.Drawing.Size(681, 501);

86 this.splitContainer1.SplitterDistance = 453;

87 this.splitContainer1.TabIndex = 2;

247

248 private System.Windows.Forms.PrintPreviewControl printPreviewCtrl;

249 private System.Windows.Forms.SplitContainer splitContainer1;

250 private System.Windows.Forms.Button bt_Cancel;

251 private System.Windows.Forms.Button bt_print;

test_string.cpp (https://github.com/uliss/pure-data.git) C++ · 362 lines

166 }

167

168 SECTION("splitByChar")

169 {

170 std::vector<std::string> chars;

171 utf8_split_by_char(chars, "");

172 REQUIRE(chars.empty());

173

174 utf8_split_by_char(chars, "abc");

175 REQUIRE(chars.size() == 3);

176 REQUIRE(chars[0] == "a");

PieceTable.cs (https://github.com/zgramana/monodevelop.git) C# · 325 lines

66 public abstract byte[] GetBytes (HexEditorData hexEditorData, long myOffset, long offset, int count);

67

68 public TreeNode SplitRight (long leftLength)

69 {

70 return InternalSplitRight (System.Math.Min (Length, System.Math.Max (0, leftLength)));

265 long newLength = offset - startNode.value.CalcOffset (startNode);

266 if (startNode == endNode) {

267 TreeNode splittedNode = startNode.value.SplitRight (newLength + length);

268 ChangeLength (startNode, newLength);

269

304 long newLength = offset - oldNodeOffset;

305

306 TreeNode splittedNode = node.value.SplitRight (newLength);

307 ChangeLength (node, newLength);

308

Message.php (https://github.com/Exercise/zf2.git) PHP · 283 lines

1 <?php

2 /**

3 * Zend Framework

241 public static function createFromMessage($message, $boundary, $EOL = Mime::LINEEND)

242 {

243 $parts = Decode::splitMessageStruct($message, $boundary, $EOL);

244

245 $res = new self();

csstree.js (https://gitlab.com/sogeta_albazi/books-and-movies) JavaScript · 1656 lines

569 }

570

571 var lines = error.source.split(/\r\n?|\n|\f/);

572 var line = error.line;

573 var column = error.column;

vector3.py (https://github.com/armyofevilrobots/optimized-skeinforge.git) Python · 292 lines

39

40 __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'

41 __credits__ = 'Nophead <http://forums.reprap.org/profile.php?12,28>\nArt of Illusion <http://www.artofillusion.org/>'

42 __date__ = '$Date: 2008/21/04 $'

43 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'

288

289

290 globalGetAccessibleAttributeSet = 'x y z'.split()

291 globalSetAccessibleAttributeSet = globalGetAccessibleAttributeSet

292

Paginator.php (https://bitbucket.org/ndj/piecrust.git) PHP · 350 lines

1 <?php

2

3 namespace PieCrust\Page;

13

14 /**

15 * The pagination manager for a page split into sub-pages.

16 *

17 * Pages that display a large number of posts may be split into

sha1.hpp (https://gitlab.com/amyasnikov/xgame) C++ Header · 313 lines

292 }

293

294 /* Append total_bits, split this uint64_t into two uint32_t */

295 block[BLOCK_INTS - 1] = total_bits & 0xffffffff;

296 block[BLOCK_INTS - 2] = (total_bits >> 32);

SetCookie.php (https://github.com/leerbag/zf2.git) PHP · 399 lines

1 <?php

2

3 namespace Zend\Http\Header;

74 $setCookieProcessor = function($headerLine) use ($setCookieClass) {

75 $header = new $setCookieClass;

76 $keyValuePairs = preg_split('#;\s*#', $headerLine);

77 foreach ($keyValuePairs as $keyValue) {

78 if (strpos($keyValue, '=')) {

79 list($headerKey, $headerValue) = preg_split('#=\s*#', $keyValue, 2);

80 } else {

81 $headerKey = $keyValue;

99 }

100

101 list($name, $value) = preg_split('#: #', $headerLine, 2);

102

103 // check to ensure proper header type for this factory

class-Shoestrap_Color.php (https://gitlab.com/aristath/shoestrap-3) PHP · 481 lines

1 <?php

2

3

10 /**

11 * Sanitises a HEX value.

12 * The way this works is by splitting the string in 6 substrings.

13 * Each sub-string is individually sanitized, and the result is then returned.

14 *

DatabaseAdapter.php (https://github.com/drawig/THM-PHP-Demo-Projects.git) PHP · 377 lines

1 <?php

2

3 include('Projekt.php');

4 include('Ticket.php');

5

6 /**

108 if (count($vorgaenger) != 0) {

109 //String auslesen und zahlen im array speichern

110 $zahlen = split('[,]', $vorgaenger);

111

112

InfBinarySectionTest.py (https://gitlab.com/envieidoc/Clover) Python · 386 lines

7 # under the terms and conditions of the BSD License which accompanies this

8 # distribution. The full text of the license may be found at

9 # http://opensource.org/licenses/bsd-license.php

10 #

11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

245 #

246 def StringToSectionString(String):

247 Lines = String.split('\n')

248 LineNo = 0

249 SectionString = []

260 ItemList = []

261 for Item in SectionString:

262 ValueList = Item[0].split('|')

263 for count in range(len(ValueList)):

264 ValueList[count] = ValueList[count].strip()

RequestTest.php (https://github.com/shupp/openid.git) PHP · 269 lines

139 {

140 $url = $this->authRequest->getAuthorizeURL();

141 $split = preg_split('/\?/', $url);

142 $message = new OpenID_Message($split[1], OpenID_Message::FORMAT_HTTP);

189

190 $url = $this->authRequest->getAuthorizeURL();

191 $split = preg_split('/\?/', $url);

192 $message = new OpenID_Message($split[1], OpenID_Message::FORMAT_HTTP);

215

216 $url = $this->authRequest->getAuthorizeURL();

217 $split = preg_split('/\?/', $url);

218 $message = new OpenID_Message($split[1], OpenID_Message::FORMAT_HTTP);

242

243 $url = $this->authRequest->getAuthorizeURL();

244 $split = preg_split('/\?/', $url);

245 $message = new OpenID_Message($split[1], OpenID_Message::FORMAT_HTTP);

CmdSpheroid.cs (https://github.com/cazzar/MCaznowl-Build.git) C# · 241 lines

7 obtain a copy of the Licenses at

8

9 http://www.opensource.org/licenses/ecl2.php

10 http://www.gnu.org/licenses/gpl-3.0.html

11

63 else

64 {

65 cpos.type = Block.Byte(message.Split(' ')[0]);

66 if (!Block.canPlace(p, cpos.type)) { Player.SendMessage(p, "Cannot place that."); wait = 1; return; }

67 if (cpos.type == Block.Zero || message.Split(' ')[1].ToLower() != "vertical")

testsuite.js (https://github.com/nottrobin/Emulate-HTML5.git) JavaScript · 325 lines

15 });

16 };

17 Y.jsonp("server/service.php?callback=globalFunction");

18

19 self.wait(300);

27 var self = this;

28

29 Y.jsonp("server/service.php?callback={callback}", function (json) {

30 self.resume(function () {

31 Y.Assert.isObject(json);

46 };

47

48 Y.jsonp("server/service.php?callback=globalFunction", function (data) {

49 self.resume(function () {

50 Y.config.win.globalFunction = undefined;

VAOGLRenderer.java (https://github.com/copyliu/Spoutcraft_CJKPatch.git) Java · 417 lines

221

222 if (vertIndex > MAX_VERTS - 50) {

223 if (isSplittable(vertIndex, currentType)) {

224 int type = currentType;

225 applyBuffer();

230

231 /**

232 * Check if the geometry being created can be split at the current index

233 *

234 * @param count The current index

235 * @param type The type of geometry being built

236 * @return True if the geometry can be split at the current index

237 */

238 private boolean isSplittable(int count, int type) {

permissions_phpbb.php (http://twpug.googlecode.com/svn/trunk/) PHP · 219 lines

1 <?php

2 if (empty($lang) || !is_array($lang))

3 {

42 * $lang = array_merge($lang, array(

43 * 'acl_bug_view' => array('lang' => 'Can view bug reports', 'cat' => 'bugs'),

44 * 'acl_bug_post' => array('lang' => 'Can post bugs', 'cat' => 'post'), // Using a phpBB category here

45 * ));

46 *

160 'acl_m_move' => array('lang' => '??????', 'cat' => 'topic_actions'),

161 'acl_m_lock' => array('lang' => '??????', 'cat' => 'topic_actions'),

162 'acl_m_split' => array('lang' => '??????', 'cat' => 'topic_actions'),

163 'acl_m_merge' => array('lang' => '??????', 'cat' => 'topic_actions'),

164

173 'acl_a_server' => array('lang' => '???????/????', 'cat' => 'settings'),

174 'acl_a_jabber' => array('lang' => '????Jabber??', 'cat' => 'settings'),

175 'acl_a_phpinfo' => array('lang' => '????php??', 'cat' => 'settings'),

176

177 'acl_a_forum' => array('lang' => '??????', 'cat' => 'forums'),

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

687

688 Returns true if the UCS-4-encoded character specified by \a ucs4

689 can be split into the high and low parts of a utf16 surrogate

690 (ie. if its code point is greater than or equals to 0x10000).

691 */

jedit_gui.props (https://jedit.svn.sourceforge.net/svnroot/jedit) MSBuild · 2181 lines

56 undo redo cut copy paste - find find-next - new-view unsplit \

57 split-horizontal split-vertical - buffer-options global-options - \

58 plugin-manager - help

59

72 find-next.icon=FindAgain.png

73 new-view.icon=NewView.png

74 unsplit.icon=UnSplit.png

75 split-horizontal.icon=SplitHorizontal.png

76 split-vertical.icon=SplitVertical.png

77 buffer-options.icon=Properties.png

78 global-options.icon=Preferences.png

500 #{{{ Splitting menu

501 splitting=unsplit-current \

502 unsplit \

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

This Java class, SpriteMake, is used to create a sprite object with multiple images. It takes a file name and dimensions as input, loads the images, and stores them in a 2D array. The class provides methods to access individual images, create a shadow image, and get the dimensions of the sprite. It can be used to create moveable sprites in a game or animation.

55 this.imageWidth = row;

56 this.imageHeight = col;

57 this.images = GraphicsUtils.getSplit2Images(fileName, row, col, false);

58 this.images = GraphicsUtils.getFlipHorizintalImage2D(images);

59 }

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

6 <meta name="generator" content="DocBook XSL Stylesheets V1.74.0">

7 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Icl">

8 <link rel="up" href="../../header/boost/icl/split_interval_map_hpp.html" title="Header &lt;boost/icl/split_interval_map.hpp&gt;">

9 <link rel="prev" href="is_map_icl_split_interv_id515891.html" title="Struct template is_map&lt;icl::split_interval_map&lt; DomainT, CodomainT, Traits, Compare, Combine, Section, Interval, Alloc &gt;&gt;">

30 </div>

31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>

32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/icl/split_interval_map_hpp.html" title="Header &lt;boost/icl/split_interval_map.hpp&gt;">boost/icl/split_interval_map.hpp</a>&gt;

33

34 </span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> DomainT<span class="special">,</span> <span class="keyword">typename</span> CodomainT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">,</span>

37 <span class="keyword">struct</span> <a class="link" href="has_inverse_icl_split_i_id515985.html" title="Struct template has_inverse&lt;icl::split_interval_map&lt; DomainT, CodomainT, Traits, Compare, Combine, Section, Interval, Alloc &gt;&gt;">has_inverse</a><span class="special">&lt;</span><span class="identifier">icl</span><span class="special">::</span><span class="identifier">split_interval_map</span><span class="special">&lt;</span> <span class="identifier">DomainT</span><span class="special">,</span> <span class="identifier">CodomainT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">Compare</span><span class="special">,</span> <span class="identifier">Combine</span><span class="special">,</span> <span class="identifier">Section</span><span class="special">,</span> <span class="identifier">Interval</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">&gt;</span> <span class="special">{</span>

38 <span class="comment">// types</span>

39 <span class="keyword">typedef</span> <span class="identifier">has_inverse</span><span class="special">&lt;</span> <a class="link" href="split_interval_map.html" title="Class template split_interval_map">icl::split_interval_map</a><span class="special">&lt;</span> <span class="identifier">DomainT</span><span class="special">,</span> <span class="identifier">CodomainT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">Compare</span><span class="special">,</span> <span class="identifier">Combine</span><span class="special">,</span> <span class="identifier">Section</span><span class="special">,</span> <span class="identifier">Interval</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&gt;</span> <a name="boost.icl.has_inverse_icl_split_i_id515985.type"></a><span class="identifier">type</span><span class="special">;</span>

40

41 <span class="comment">// <a class="link" href="has_inverse_icl_split_i_id515985.html#id516606-bb">public member functions</a></span>

61 <hr>

62 <div class="spirit-nav">

63 <a accesskey="p" href="is_map_icl_split_interv_id515891.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/icl/split_interval_map_hpp.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_interval_container_i_id516625.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>

64 </div>

65 </body>

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

121 } else {

122 temp = *this;

123 temp.parameterSplitLeft(t1, &result);

124 }

125

274 qreal d = (p1.x() - p2.x())*(p1.x() - p2.x()) + (p1.y() - p2.y())*(p1.y() - p2.y());

275 if (qAbs(d - o2) > max_dist_line)

276 return Split;

277

278 QPointF normalPoint = b1->normalVector(i);

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

478

479 // if res isn't Ok or Split then *o is undefined

480 if (res == Ok || res == Split)

550

551 if((len-chord) > error) {

552 split(&left, &right); /* split in two */

553 left.addIfClose(length, error); /* try left side */

554 right.addIfClose(length, error); /* try right side */

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

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

150 int pos = fileNode.path.lastIndexOf(fileSep);

151 String pathName = fileNode.path.substring(0, pos);

152 String[] paths = pathName.split(fileSepRegex);

153 if (topPathNdx == -1)

154 {

198 int pos = fileNode.path.lastIndexOf(fileSep);

199 String pathName = fileNode.path.substring(0, pos);

200 String[] paths = pathName.split(fileSepRegex);

201

202 DefaultMutableTreeNode insNode = folderTreeNode;

text-edit.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 1246 lines

475

476 <para><guimenu>Edit</guimenu>&gt;<guisubmenu>Text</guisubmenu>&gt;<guimenuitem>Format

477 Paragraph</guimenuitem> (shortcut: <keycap>C+e f</keycap>) splits and

478 joins lines in the current selection to make it fit within the wrap

479 column position. If nothing is selected, the paragraph containing the

489 <title>Wrapping Long Lines</title>

490

491 <para>The <firstterm>word wrap</firstterm> feature splits lines at word

492 boundaries in order to fit text within a specified wrap margin. A word

493 boundary, for the purposes of word wrap, means whitespace. Long lines

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

This Java class LHS represents the left-hand side of an assignment in a scripting language, such as BeanShell. It provides methods to evaluate and assign values to variables, fields, properties, and array indices. The class handles different types of assignments, including variable assignments, field assignments, property assignments, and array index assignments.

42

43 This is probably the most debatable design issue in bsh...

44 Because of the way things started, the grammar splits on whether

45 something is an LHS or not... The alternative would be to wrap all

46 objects in bsh, rather than just carrying types that might be used in

logviewer_types.dtd (https://jedit.svn.sourceforge.net/svnroot/jedit) Document Type Definition · 118 lines

69

70 <!--

71 This element describes how an individual entry is to be split into columns.

72 The "group" attribute is used to determine which parts of the resulting

73 regex matches should be used for display. For example, given an entry like:

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

This Java code is part of a text editor’s buffer management system. It reads and processes markers from a file, which are used to mark specific positions in a document. The code handles various encoding formats, detects errors, and updates the buffer with the correct content based on the detected encoding. It also logs any errors that occur during this process.

249 if(fallbackEncodings != null && fallbackEncodings.length() > 0)

250 {

251 for(String encoding: fallbackEncodings.split("\\s+"))

252 {

253 encodingProviders.add(encoding);

maple.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 736 lines

525 <FUNCTION>print</FUNCTION>

526 <FUNCTION>printf</FUNCTION>

527 <FUNCTION>ProbSplit</FUNCTION>

528 <FUNCTION>procbody</FUNCTION>

529 <FUNCTION>ProcessOptions</FUNCTION>

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

266 if (nameOfClass.isEmpty())

267 nameOfClass = getObjectName(e);

268 namespaces = nameOfClass.split(QLatin1String("::"));

269 bareNameOfClass = namespaces.last();

270 namespaces.removeLast();

401 if (n.firstChild().toElement().tagName() == QLatin1String("cstring")) {

402 name.prepend(n.firstChild().toElement().firstChild().toText().data());

403 return name.split(QLatin1String("::")).last();

404 }

405 return e.tagName();

rebol.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 547 lines

321 <KEYWORD1>show-popup</KEYWORD1>

322 <KEYWORD1>source</KEYWORD1>

323 <KEYWORD1>split-path</KEYWORD1>

324 <KEYWORD1>stylize</KEYWORD1>

325 <KEYWORD1>switch</KEYWORD1>

apdl.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 7537 lines

526 <KEYWORD1>ARSCALE</KEYWORD1>

527 <KEYWORD1>ARSP</KEYWORD1>

528 <KEYWORD1>ARSPLIT</KEYWORD1>

529 <KEYWORD1>ARSY</KEYWORD1>

530 <KEYWORD1>ARSYM</KEYWORD1>

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

This is a C++ header file that defines an interface for a network device driver, specifically for a Fibre Channel over Ethernet (FCoE) adapter. It provides functions and data structures for managing connections, commands, and queues related to FCoE communication. The code appears to be part of a Linux kernel module or a user-space application.

61 /* 5706/08 hardware has limit on maximum buffer size per BD it can handle */

62 #define MAX_BD_LENGTH 65535

63 #define BD_SPLIT_SIZE 32768

64

65 /* min, max & default values for SQ/RQ/CQ size, configurable via' modparam */

impress.js (https://bitbucket.org/jkodumal/rmanalan.bitbucket.org.git) JavaScript · 324 lines

17

18 var style = document.createElement('dummy').style,

19 prefixes = 'Webkit Moz O ms Khtml'.split(' '),

20 memory = {};

21

24

25 var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1),

26 props = (prop + ' ' + prefixes.join(ucProp + ' ') + ucProp).split(' ');

27

28 memory[ prop ] = null;

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

This Java code defines a BrowserOptionPane class that extends AbstractOptionPane. It creates a GUI panel with options for browser settings, such as default directory, toolbar and menubar visibility, icon display, hidden file handling, sorting behavior, and double-click close functionality. The panel’s values are saved to the application’s properties when the user clicks “Save”.

113 addComponent(doubleClickClose);

114

115 /* split VFSFileDialog horizontally */

116 currentBufferFilter = new JCheckBox(jEdit.getProperty("options.browser"

117 + ".general.currentBufferFilter"));

IntToIntBtree.java (https://bitbucket.org/nbargnesi/idea.git) Java · 1113 lines

43 private boolean isLarge = true;

44 private final ResizeableMappedFile storage;

45 private final boolean offloadToSiblingsBeforeSplit = false;

46 private boolean indexNodeIsHashTable = true;

47 final int metaDataLeafPageLength;

557 }

558

559 private int splitNode(int parentAddress) {

560 final boolean indexLeaf = isIndexLeaf();

561

562 if (doSanityCheck) {

563 myAssert(isFull());

564 dump("before split:"+indexLeaf);

565 }

566

CodingStyle (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 825 lines

366 Another measure of the function is the number of local variables. They

367 shouldn't exceed 5-10, or you're doing something wrong. Re-think the

368 function, and split it into smaller pieces. A human brain can

369 generally easily keep track of about 7 different things, anything more

370 and it gets confused. You know you're brilliant, but maybe you'd like

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

6 <meta name="generator" content="DocBook XSL Stylesheets V1.74.0">

7 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Icl">

8 <link rel="up" href="../../header/boost/icl/split_interval_map_hpp.html" title="Header &lt;boost/icl/split_interval_map.hpp&gt;">

9 <link rel="prev" href="is_map_icl_split_interv_id502849.html" title="Struct template is_map&lt;icl::split_interval_map&lt; DomainT, CodomainT, Traits, Compare, Combine, Section, Interval, Alloc &gt;&gt;">

30 </div>

31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>

32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/icl/split_interval_map_hpp.html" title="Header &lt;boost/icl/split_interval_map.hpp&gt;">boost/icl/split_interval_map.hpp</a>&gt;

33

34 </span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> DomainT<span class="special">,</span> <span class="keyword">typename</span> CodomainT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">,</span>

37 <span class="keyword">struct</span> <a class="link" href="has_inverse_icl_split_i_id503490.html" title="Struct template has_inverse&lt;icl::split_interval_map&lt; DomainT, CodomainT, Traits, Compare, Combine, Section, Interval, Alloc &gt;&gt;">has_inverse</a><span class="special">&lt;</span><span class="identifier">icl</span><span class="special">::</span><span class="identifier">split_interval_map</span><span class="special">&lt;</span> <span class="identifier">DomainT</span><span class="special">,</span> <span class="identifier">CodomainT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">Compare</span><span class="special">,</span> <span class="identifier">Combine</span><span class="special">,</span> <span class="identifier">Section</span><span class="special">,</span> <span class="identifier">Interval</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span><span class="special">&gt;</span> <span class="special">{</span>

38 <span class="comment">// types</span>

39 <span class="keyword">typedef</span> <span class="identifier">has_inverse</span><span class="special">&lt;</span> <a class="link" href="split_interval_map.html" title="Class template split_interval_map">icl::split_interval_map</a><span class="special">&lt;</span> <span class="identifier">DomainT</span><span class="special">,</span> <span class="identifier">CodomainT</span><span class="special">,</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="identifier">Compare</span><span class="special">,</span> <span class="identifier">Combine</span><span class="special">,</span> <span class="identifier">Section</span><span class="special">,</span> <span class="identifier">Interval</span><span class="special">,</span> <span class="identifier">Alloc</span> <span class="special">&gt;</span> <span class="special">&gt;</span> <a name="boost.icl.has_inverse_icl_split_i_id503490.type"></a><span class="identifier">type</span><span class="special">;</span>

40

41 <span class="comment">// <a class="link" href="has_inverse_icl_split_i_id503490.html#id503564-bb">public member functions</a></span>

61 <hr>

62 <div class="spirit-nav">

63 <a accesskey="p" href="is_map_icl_split_interv_id502849.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../header/boost/icl/split_interval_map_hpp.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_interval_container_i_id503583.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>

64 </div>

65 </body>

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

257 int read_undo_file = FALSE;

258 #endif

259 int split = 0; /* number of split lines */

260 #define UNKNOWN 0x0fffffff /* file size is unknown */

261 linenr_T linecnt;

naming.c (https://swig.svn.sourceforge.net/svnroot/swig) C · 1654 lines ✨ Summary

This C code is part of a SWIG (Simplified Interface to C and other languages) wrapper generator, which creates interface files for C/C++ code to be used with Python. It processes C/C++ nodes, such as functions and variables, and generates string representations of these entities in Python syntax.

515 String *nprefix = NewStringEmpty();

516 String *nlast = NewStringEmpty();

517 Swig_scopename_split(name, &nprefix, &nlast);

518 rn = name_object_get(namehash, nlast, decl, ncdecl);

519 Delete(nlast);

637 String *nlast = NewStringEmpty();

638 String *tprefix;

639 Swig_scopename_split(name, &nprefix, &nlast);

640 tprefix = SwigType_templateprefix(nlast);

641 Delete(nlast);

angular_async_base.html.twig (https://bitbucket.org/guilleferrer/angularjsbundle.git) Twig Template · 48 lines

21 * License: MIT

22 */

23 !function(a,b,c){function t(a,c){var e=b.createElement("script"),f=j;e.onload=e.onerror=e[o]=function(){e[m]&&!/^c|loade/.test(e[m])||f||(e.onload=e[o]=null,f=1,c())},e.async=1,e.src=a,d.insertBefore(e,d.firstChild)}function q(a,b){p(a,function(a){return!b(a)})}var d=b.getElementsByTagName("head")[0],e={},f={},g={},h={},i="string",j=!1,k="push",l="DOMContentLoaded",m="readyState",n="addEventListener",o="onreadystatechange",p=function(a,b){for(var c=0,d=a.length;c<d;++c)if(!b(a[c]))return j;return 1};!b[m]&&b[n]&&(b[n](l,function r(){b.removeEventListener(l,r,j),b[m]="complete"},j),b[m]="loading");var s=function(a,b,d){function o(){if(!--m){e[l]=1,j&&j();for(var a in g)p(a.split("|"),n)&&!q(g[a],n)&&(g[a]=[])}}function n(a){return a.call?a():e[a]}a=a[k]?a:[a];var i=b&&b.call,j=i?b:d,l=i?a.join(""):b,m=a.length;c(function(){q(a,function(a){h[a]?(l&&(f[l]=1),o()):(h[a]=1,l&&(f[l]=1),t(s.path?s.path+a+".js":a,o))})},0);return s};s.get=t,s.ready=function(a,b,c){a=a[k]?a:[a];var d=[];!q(a,function(a){e[a]||d[k](a)})&&p(a,function(a){return e[a]})?b():!function(a){g[a]=g[a]||[],g[a][k](b),c&&c(d)}(a.join("|"));return s};var u=a.$script;s.noConflict=function(){a.$script=u;return this},typeof module!="undefined"&&module.exports?module.exports=s:a.$script=s}(this,document,setTimeout)

24

25 // load all of the dependencies asynchronously.

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

46 String fullpath = buffer.getPath();

47 VFS vfs = VFSManager.getVFSForPath(fullpath);

48 // Split into constituent parts

49 String path = vfs.getParentOfPath(fullpath);

50 String name = vfs.getFileName(fullpath);

restkit.contrib.wsgi_proxy-pysrc.html (git://pkgs.fedoraproject.org/python-restkit) HTML · 330 lines

102 <a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"> <tt id="link-19" class="py-name"><a title="restkit.wrappers.Request.host" class="py-name" href="#" onclick="return doclink('link-19', 'host', 'link-17');">host</a></tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name"><a title="webob.response.Response.environ" class="py-name" href="#" onclick="return doclink('link-20', 'environ', 'link-15');">environ</a></tt><tt class="py-op">[</tt><tt class="py-string">'HTTP_HOST'</tt><tt class="py-op">]</tt> </tt>

103 <a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">':'</tt> <tt class="py-keyword">in</tt> <tt id="link-21" class="py-name"><a title="restkit.wrappers.Request.host" class="py-name" href="#" onclick="return doclink('link-21', 'host', 'link-17');">host</a></tt><tt class="py-op">:</tt> </tt>

104 <a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"> <tt id="link-22" class="py-name"><a title="restkit.wrappers.Request.host" class="py-name" href="#" onclick="return doclink('link-22', 'host', 'link-17');">host</a></tt><tt class="py-op">,</tt> <tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name"><a title="restkit.wrappers.Request.host" class="py-name" href="#" onclick="return doclink('link-23', 'host', 'link-17');">host</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>

105 <a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"> </tt>

106 <a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">port</tt><tt class="py-op">:</tt> </tt>

195 <a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt id="link-60" class="py-name"><a title="restkit.wrappers.Request.host" class="py-name" href="#" onclick="return doclink('link-60', 'host', 'link-17');">host</a></tt> <tt class="py-op">=</tt> <tt id="link-61" class="py-name"><a title="webob.response.Response.environ" class="py-name" href="#" onclick="return doclink('link-61', 'environ', 'link-15');">environ</a></tt><tt class="py-op">[</tt><tt class="py-string">'HTTP_HOST'</tt><tt class="py-op">]</tt> </tt>

196 <a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">':'</tt> <tt class="py-keyword">in</tt> <tt id="link-62" class="py-name"><a title="restkit.wrappers.Request.host" class="py-name" href="#" onclick="return doclink('link-62', 'host', 'link-17');">host</a></tt><tt class="py-op">:</tt> </tt>

197 <a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> <tt id="link-63" class="py-name"><a title="restkit.wrappers.Request.host" class="py-name" href="#" onclick="return doclink('link-63', 'host', 'link-17');">host</a></tt><tt class="py-op">,</tt> <tt class="py-name">port</tt> <tt class="py-op">=</tt> <tt id="link-64" class="py-name"><a title="restkit.wrappers.Request.host" class="py-name" href="#" onclick="return doclink('link-64', 'host', 'link-17');">host</a></tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-string">':'</tt><tt class="py-op">)</tt> </tt>

198 <a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> </tt>

199 <a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">port</tt><tt class="py-op">:</tt> </tt>

256 restkit.resource.Resource.get" class="py-name" href="#" onclick="return doclink('link-69', 'get', 'link-38');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'allowed_methods'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>

257 <a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">allowed_methods</tt><tt class="py-op">:</tt> </tt>

258 <a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-name">config</tt><tt class="py-op">[</tt><tt class="py-string">'allowed_methods'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">m</tt><tt class="py-op">.</tt><tt class="py-name">upper</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">m</tt> <tt class="py-keyword">in</tt> <tt class="py-name">allowed_methods</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> </tt>

259 <a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> <tt class="py-name">strip_script_name</tt> <tt class="py-op">=</tt> <tt class="py-name">local_config</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="restkit.contrib.webob_api.Request.get

260 restkit.resource.Resource.get" class="py-name" href="#" onclick="return doclink('link-70', 'get', 'link-38');">get</a></tt><tt class="py-op">(</tt><tt class="py-string">'strip_script_name'</tt><tt class="py-op">,</tt> <tt class="py-string">'true'</tt><tt class="py-op">)</tt> </tt>

youtubequery.cs (http://google-gdata.googlecode.com/svn/trunk/) C# · 802 lines ✨ Summary

This C# code defines a class YouTubeQuery that provides methods for constructing queries to retrieve data from YouTube’s API. It includes classes for activities and user activity feeds, allowing users to search for specific events or authors in their friends’ recent actions on the site. The code generates URLs and query strings based on the provided parameters.

609

610 char[] otherDeli = { '=' };

611 string[] parameters = token.Split(otherDeli, 2);

612 switch (parameters[0]) {

613 case "format":

614 if (parameters[1] != null) {

615 string[] formats = parameters[1].Split(new char[] { ',' });

616 foreach (string f in formats) {

617 this.Formats.Add((VideoFormat)Enum.Parse(typeof(VideoFormat), f));

rpt2acvq.f (git://github.com/clawpack/clawpack-4.x.git) FORTRAN Legacy · 95 lines ✨ Summary

This FORTRAN legacy code implements a Riemann solver for the 2D acoustic equations on a quadrilateral grid. It calculates the up-going and down-going flux differences of the acoustic wave equation, which are used to update the solution at each cell boundary. The code uses a split approach, separating the calculation into two parts: one for the up-going flux and another for the down-going flux.

10 c # equations on a quadrilateral grid.

11 c

12 c # Split asdq (= A^* \Delta q, where * = + or -)

13 c # into down-going flux difference bmasdqb (= B^- A^* \Delta q)

14 c # and up-going flux difference bpasdq (= B^+ A^* \Delta q)

test_image_selection.html (git://github.com/zpao/v8monkey.git) HTML · 93 lines ✨ Summary

This HTML code creates a test page for Mozilla Bug 599368, which is related to image selection and drag points. It loads an iframe with an image, simulates mouse interactions, and takes snapshots of the window’s content before and after selecting different images. The test verifies that selecting different images results in different drag points being added.

38

39 gImage = doc.createElement('img');

40 var src = String(window.location).split("/");

41 src.pop();

42 src.push("blue-32x32.png");

61 gBlueSelected = snapshotWindow(gIframe.contentWindow, false);

62

63 var src = String(window.location).split("/");

64 src.pop();

65 src.push("fuchsia-32x32.png");

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

641 int len);

642 XMLPUBFUN xmlChar * XMLCALL

643 xmlSplitQName2 (const xmlChar *name,

644 xmlChar **prefix);

645 XMLPUBFUN const xmlChar * XMLCALL

646 xmlSplitQName3 (const xmlChar *name,

647 int *len);

648

CCWatchDog.java (http://creativecomputing.googlecode.com/svn/trunk/) Java · 237 lines ✨ Summary

This Java code implements a watchdog process that runs a specified Java class and monitors its execution time, frame rate, and error output. It restarts the process if it exceeds a maximum off-time threshold or fails to meet a minimum frame rate requirement. The process is designed to be configurable through an XML settings file.

147 }

148

149 String[] myCommandArray = theLine.split(" ",2);

150 String myCommand = myCommandArray[0];

151 String myValue = "";

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

This JavaScript code defines a set of functions and classes for handling HTTP requests, specifically for creating RESTful services. It provides a framework for building web applications that can send and receive data in various formats (e.g., JSON, XML, JavaScript). The code also includes built-in transports for common HTTP methods like GET, POST, and JSONP.

41 //generate the methods

42 for(var serviceName in self._smd.services){

43 var pieces = serviceName.split("."); // handle "namespaced" services by breaking apart by .

44 var current = self;

45 for(var i=0; i< pieces.length-1; i++){

edt-user.el (git://github.com/emacsmirror/emacs.git) Lisp · 169 lines ✨ Summary

This is a Lisp code that provides an interactive function for displaying help information about the EDT Emacs text editor. The function is called edt-user-keypad-help and it displays a message with a list of key bindings and their corresponding actions in the EDT Emacs text editor.

132 C-w: Set Screen Width 132 +----------+----------+----------+

133 C-z: Suspend Emacs

134 G-C-\\: Split Window

135

136 G-a: Append to Kill Buffer

156 G-y: EDT Emulation OFF

157 G-z: Switch to Default EDT Key Bindings

158 G-2: Split Window

159 G-%: Go to Percentage

160 G- : Undo (GOLD Spacebar)

OutputToGeneralTestEventsConverter.java (https://bitbucket.org/nbargnesi/idea.git) Java · 503 lines

35 * @author Roman Chernyatchik

36 * <p/>

37 * This implementation also supports messages splitted in parts by early flush.

38 * Implementation assumes that buffer is being flushed on line end or by timer,

39 * i.e. incomming text contains no more than one line's end marker ('\r', '\n', or "\r\n")

47 private final String myTestFrameworkName;

48

49 private final OutputLineSplitter mySplitter;

50 private boolean myPendingLineBreakFlag;

51

55 myServiceMessageVisitor = new MyServiceMessageVisitor();

56

57 mySplitter = new OutputLineSplitter(consoleProperties.isEditable()) {

58 @Override

59 protected void onLineAvailable(@NotNull String text, @NotNull Key outputType, boolean tcLikeFakeOutput) {

jedit_keys.props (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 226 lines

38 goto-marker.shortcut=C+y

39 undo.shortcut=C+z

40 unsplit-current.shortcut=C+0

41 unsplit.shortcut=C+1

42 split-horizontal.shortcut=C+2

43 split-vertical.shortcut=C+3

AdvancedDtdOptions.java (https://bitbucket.org/nbargnesi/idea.git) Java · 258 lines

194 final String s = ((XmlElementDecl)element).getName();

195 if (s != null) {

196 final String[] parts = s.split(":");

197 if (parts.length > 1) {

198 map.put(XMLNS + ":" + parts[0], null);

202 final String s = ((XmlAttributeDecl)element).getName();

203 if (s != null) {

204 final String[] parts = s.split(":");

205 if (parts.length > 1) {

206 map.put(XMLNS + ":" + parts[0], null);

Markdown.pl (git://github.com/ttscoff/nv.git) Perl · 1451 lines ✨ Summary

This is a Perl script that converts Markdown text to HTML. It supports features such as headers, emphasis, code blocks, blockquotes, and links. The script uses regular expressions to parse the input text and generate the corresponding HTML output.

51 # Table of hash values for escaped characters:

52 my %g_escape_table;

53 foreach my $char (split //, '\\`*_{}[]()>#+-.!') {

54 $g_escape_table{$char} = md5_hex($char);

55 }

848 sub _ProcessListItems {

849 #

850 # Process the contents of a single ordered or unordered list, splitting it

851 # into individual list items.

852 #

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

946 }

947

948 static void qSplitTableName(QString &tablename, QString &schema)

949 {

950 int dot = tablename.indexOf(QLatin1Char('.'));

965 QString tbl = tablename;

966 QString schema;

967 qSplitTableName(tbl, schema);

968

969 if (isIdentifierEscaped(tbl, QSqlDriver::TableName))

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

This Java code is part of a plugin manager for an IDE (Integrated Development Environment). It provides functionality to manage plugins, including sorting and filtering plugin information, displaying plugin details in a table, and handling keyboard and mouse events. The code also includes rendering and focus management for the plugin table.

87 setBorder(new EmptyBorder(12,12,12,12));

88

89 final JSplitPane split = new JSplitPane(

90 JSplitPane.VERTICAL_SPLIT, jEdit.getBooleanProperty("appearance.continuousLayout"));

91 split.setResizeWeight(0.75);

92 /* Setup the table */

93 table = new JTable(pluginModel = new PluginTableModel());

134 scrollpane = new JScrollPane(table);

135 scrollpane.getViewport().setBackground(table.getBackground());

136 split.setTopComponent(scrollpane);

137

138 /* Create description */

140 infoBox = new PluginInfoBox());

141 infoPane.setPreferredSize(new Dimension(500,100));

142 split.setBottomComponent(infoPane);

143

144 SwingUtilities.invokeLater(new Runnable()

starting.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 320 lines

41 </para>

42 <para>

43 jEdit remembers open buffers, views and split window configurations between editing sessions, so you can get back to work immediately after starting jEdit. This feature can be

44 disabled in the <guibutton>General</guibutton> pane of the

45 <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem>

jeBSP_HW.cpp (https://jetpp.svn.sourceforge.net/svnroot/jetpp) C++ · 597 lines ✨ Summary

This C++ code is part of a 3D graphics rendering engine, specifically handling the generation and management of geometry data for a BSP (Binary Space Partitioning) tree. It creates a mapping between materials and their corresponding vertex and index data, allowing for efficient rendering of 3D models with varying material properties.

176 goto ExitWithError;

177

178 // We MUST destroy the chain of merged/split faces fragments as soon as we are done with them

179 jeBSPNode_DestroyBSPFaces_r(BSP->RootNode, BSP, JE_TRUE);

180

MasterDetailsState.java (https://bitbucket.org/nbargnesi/idea.git) Java · 46 lines

16 package com.intellij.openapi.ui;

17

18 import com.intellij.ide.ui.SplitterProportionsDataImpl;

19 import com.intellij.util.xmlb.annotations.Property;

20 import com.intellij.util.xmlb.annotations.Tag;

24 */

25 public class MasterDetailsState {

26 private SplitterProportionsDataImpl proportions = new SplitterProportionsDataImpl();

27 private String lastEditedConfigurable;

28

29 @Property(surroundWithTag = false)

30 public SplitterProportionsDataImpl getProportions() {

31 return proportions;

32 }

pretty_vcproj.py (https://bitbucket.org/ultra_iter/qt-vtl.git) Python · 316 lines

131 'AdditionalLibraryDirectories']:

132 # We want to fix up these paths

133 path_list = value.split(';')

134 new_list = FixFilenames(path_list, os.path.dirname(ARGUMENTS[1]))

135 node.setAttribute(name, ';'.join(new_list))

154 if node.attributes:

155 for (name, value) in node.attributes.items():

156 sorted_list = sorted(value.split(';'))

157 unique_list = []

158 [unique_list.append(i) for i in sorted_list if not unique_list.count(i)]

208 if dom.documentElement.attributes:

209 vsprops = dom.documentElement.getAttribute('InheritedPropertySheets')

210 return FixFilenames(vsprops.split(';'), os.path.dirname(filename))

211 return []

212

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

The HTML code explains how to view multiple buffers at once in a single view. It describes keyboard shortcuts for splitting and removing splits: C+2 horizontally, C+3 vertically, C+1 removes all splits, and C+0 removes the currently focused split. The editor, jEdit, remembers the state of the view between editing sessions.

1 <html><body>You can view multiple buffers at a time, in one single view.

2 <b>C+2</b> splits the view horizontally. <b>C+3</b> splits

3 the view vertically. <b>C+1</b> removes all splits from the

4 view. <b>C+0</b> removes the currently focused split from the view. jEdit remembers if the view was split between editing sessions.

5 </body></html>

6

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

327 (Marcelo Vanzin)

328

329 - SF bug 1523117: Add explicit fold in PHP mode inserts wrong comments

330 The "DEF_CLASS" rule set in the php mode file didn't have any line

331 or range comments declared in the props section; so the code was now

332 picking up the porperties for the default rule set, which had the

333 HTML-style range comment instead of the PHP line comment. This is

334 probably due to the XML parser change - the old code was probably

335 propagating some property of another rule set to the DEF_CLASS rule

589 - Gnuplot syntax highlighting (Loren Charnley).

590

591 - Updated PHP syntax highlighting (Matthieu Casanova).

592

593 - Fixed end token of heredoc that must start at beginning of the line in

594 PHP (Matthieu Casanova)

595

596 - Updated MIPS R2000 assembly syntax highlighting (James Turk).

ntpath.py (git://github.com/IronLanguages/main.git) Python · 498 lines ✨ Summary

This is a Python module for working with file paths on Windows. It provides functions for manipulating and transforming file paths, such as joining path components, splitting paths into their components, and resolving relative paths to absolute paths. The module also includes support for Unicode filenames on Windows Vista and later.

14 from genericpath import *

15

16 __all__ = ["normcase","isabs","join","splitdrive","split","splitext",

17 "basename","dirname","commonprefix","getsize","getmtime",

18 "getatime","getctime", "islink","exists","lexists","isdir","isfile",

168 Either part may be empty."""

169

170 d, p = splitdrive(p)

171 # set i to index beyond p's last slash

172 i = len(p)

190 return genericpath._splitext(p, sep, altsep, extsep)

191 splitext.__doc__ = genericpath._splitext.__doc__

192

193

474 if not path:

475 raise ValueError("no path specified")

476 start_list = abspath(start).split(sep)

477 path_list = abspath(path).split(sep)

typemaps.i (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 317 lines

129

130 For example, suppose you were trying to wrap the modf() function in the

131 C math library which splits x into integral and fractional parts (and

132 returns the integer part in one of its parameters):

133

Link.js (http://jsdoc-toolkit.googlecode.com/svn/) JavaScript · 148 lines ✨ Summary

This is a constructor function for creating HTML links to documented symbols. It has various methods that allow you to set properties such as the target name, inner text, and source file path. The toString() method returns an HTML link based on the properties set in the object.

47 linkString = this.alias.replace(/(^|[^a-z$0-9_#.:^-])([|a-z$0-9_#.:^-]+)($|[^a-z$0-9_#.:^-])/i,

48 function(match, prematch, symbolName, postmatch) {

49 var symbolNames = symbolName.split("|");

50 var links = [];

51 for (var i = 0, l = symbolNames.length; i < l; i++) {

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

162 <para>

163 <classname>EditPaneUpdate</classname>, sent when an edit pane

164 containing a text area (including a pane created by splitting

165 an existing window) has been created or destroyed, or when a

166 buffer displayed in an edit pane has been changed;

darcs.py (https://bitbucket.org/nbargnesi/idea.git) Python · 167 lines

41

42 checktool('darcs')

43 version = self.run0('--version').splitlines()[0].strip()

44 if version < '2.1':

45 raise util.Abort(_('darcs version 2.1 or newer needed (found %r)') %

95 repodir=self.tmppath)

96 self.checkexit(status)

97 for line in output.split('\n'):

98 path = line[2:]

99 if path:

jedit_keys.props (https://jedit.svn.sourceforge.net/svnroot/jedit) Unknown · 235 lines

41 goto-marker.shortcut=C+y

42 undo.shortcut=C+z

43 unsplit-current.shortcut=C+0

44 unsplit.shortcut=C+1

45 split-horizontal.shortcut=C+2

46 split-vertical.shortcut=C+3

47 resplit.shortcut=C+4

48 #}}}

49

htmltextslave.c (git://pkgs.fedoraproject.org/mingw-gtkhtml3) C · 1650 lines

57 }

58

59 /* Split this TextSlave at the specified offset. */

60 static void

61 split (HTMLTextSlave *slave,

653 split_index = g_utf8_offset_to_pointer (slave->owner->text + item->offset, start_offset - offset)

654 - (slave->owner->text + item->offset);

655 tmp_gi = pango_glyph_item_split (&glyph_item->glyph_item, slave->owner->text, split_index);

656

657 /* free the beginning we don't need */

673 split_index = g_utf8_offset_to_pointer (slave->owner->text + tmp_gi1.item->offset, end_offset - MAX (start_offset, offset))

674 - (slave->owner->text + tmp_gi1.item->offset);

675 tmp_gi2 = pango_glyph_item_split (&tmp_gi1, slave->owner->text, split_index);

676

677 glyph_item->glyph_item = *tmp_gi2;

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

9

10 - During auto-save, ~/.jedit/perspective.xml is only written if files

11 were opened or closed or views were split or unsplit since the last

12 time it was auto-saved.

13

87 - Updated BibTeX and LaTeX syntax highlighting (Thomas Alspaugh).

88

89 - PHP mode now recognizes <script language="PHP">...</script>.

90

91 - Updated Omnimark syntax highlighting (Lionel Fiol).

775 showing in at least one edit pane). So as a poor man's CodeAid, you

776 can open a text file listing Java classes and methods in a zero-height

777 split.

778

779 - The plugin manager now has better handling of loading and unloading

SelectBox.js (git://github.com/django/django.git) JavaScript · 110 lines ✨ Summary

This JavaScript code defines a SelectBox object that manages a select box element on a web page. It provides methods to populate, filter, delete, and manipulate options in the select box, as well as sort and select all options. The cache stores option data for efficient lookup and manipulation. The object is exposed globally via the window.SelectBox property.

27 // Redisplay the HTML select box, displaying only the choices containing ALL

28 // the words in text. (It's an AND search.)

29 const tokens = text.toLowerCase().split(/\s+/);

30 for (const node of SelectBox.cache[id]) {

31 node.displayed = 1;

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

This C++ header file provides a set of functions and macros for interacting with a Linux-based storage controller, specifically the AIC79xx series. It defines various interfaces for managing SCSI commands, handling interrupts, and controlling device operations. The code is designed to be platform-specific, with Linux being one of the supported platforms.

460 #define PCIXM_STATUS_64BIT 0x0001 /* Active 64bit connection to device. */

461 #define PCIXM_STATUS_133CAP 0x0002 /* Device is 133MHz capable */

462 #define PCIXM_STATUS_SCDISC 0x0004 /* Split Completion Discarded */

463 #define PCIXM_STATUS_UNEXPSC 0x0008 /* Unexpected Split Completion */

464 #define PCIXM_STATUS_CMPLEXDEV 0x0010 /* Device Complexity (set == bridge) */

465 #define PCIXM_STATUS_MAXMRDBC 0x0060 /* Maximum Burst Read Count */

466 #define PCIXM_STATUS_MAXSPLITS 0x0380 /* Maximum Split Transactions */

467 #define PCIXM_STATUS_MAXCRDS 0x1C00 /* Maximum Cumulative Read Size */

468 #define PCIXM_STATUS_RCVDSCEM 0x2000 /* Received a Split Comp w/Error msg */

UsersFilterAction.java (https://bitbucket.org/nbargnesi/idea.git) Java · 242 lines

198

199 private void setText(final String text) {

200 final String[] pieces = text.split(",");

201 if (pieces.length == 0) {

202 myLabel.setText(ALL);

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

1 <?php

2

3 /**

30

31 // Legacy bbPress config location

32 'bb-config-location' => ABSPATH . 'bb-config.php',

33

34 /** XProfile **********************************************************/

435 *

436 * @param bool $default Optional. Default value false

437 * @todo split and move into blog and forum components

438 * @uses bp_get_option() To get the blog/forum comments option

439 * @return bool Is blog/forum comments allowed?

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

This Java code provides utility methods for inserting relative paths into a text buffer within the JEdit editor. It allows users to choose a file and insert its relative path into the current buffer, using a dialog box to select the file from the file system. The getRelativePath method calculates the relative URL based on the directory structure of the chosen file.

72 separator = File.separator;

73 }

74 String[] dirsBuffer = fromDir.split(separator);

75 String[] dirsFile = MiscUtilities.getParentOfPath(toFile).split(separator);

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

289 <para>

290 For each buffer, jEdit does syntax-highlighting for you.

291 To do this, it splits the content of the buffer in tokens and gives

292 every token a <emphasis>token type</emphasis>.

293 Token types are taken from a predefined set, like <code>COMMENT1</code>, <code>MARKUP</code>,

604 available from jedit repository. The documentation is generated using docbook xsl.

605 </para>

606 <para>Some tests are included. They are based upon <ulink url="http://fest.easytesting.org/swing/wiki/pmwiki.php">FEST-swing</ulink>

607 for GUI testing. Otherwise they are plain <ulink url="http://www.junit.org/">jUnit</ulink> tests.

608 To run the tests, <command>cd</command> to the plugin root directory and type <command>ant test</command>.

normal.conf (git://github.com/dellort/lumbricus.git) Config · 363 lines ✨ Summary

This configuration code defines various visual settings for a graphical user interface (GUI) application, likely a game. It specifies colors, fonts, borders, and other visual elements to be used throughout the application, including buttons, labels, and windows. The code also sets up layout and rendering options, such as background images and font styles, to create a consistent and visually appealing user experience.

46 }

47

48 + "/w-splitbar" {

49 border-back-color = "k=0.7"

50 }

51 + "/w-splitbar-h" { bitmap-cursor-res = "size_we" }

52 + "/w-splitbar-v" { bitmap-cursor-res = "size_ns" }

lexing.n (git://github.com/saidai-no/nemerle.git) Unknown · 42 lines

29 | sth => Assert.Fail($"Peek operation fails: $sth")

30

31 [Test] public ellipsis_operator_is_not_splitted(): void

32 def lexer = Lexer(Helper.ConvertToTokenLooseGroup([".."]))

33

box.js (https://code.google.com/p/ecartcommerce/) JavaScript · 325 lines ✨ Summary

This JavaScript code creates a web application for managing boxes, which are likely containers or sections on a webpage. It sets up a grid to display and edit box data, including adding new boxes, saving changes, deleting boxes, and refreshing the grid. The application also includes features like checkbox selection and search functionality.

250 }

251 var ret = new Array();

252 value = value.split(',');

253 for (var i = 0, n = value.length; i < n; i++) {

254 if (value[i] != '') {

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

This is a C header file for an Open Sound System (OSS) module, specifically for the OPL3 sound chip. It defines data structures and functions for managing the OPL3’s hardware and software resources, including voice allocation, patch loading, and MIDI channel management. The code provides an interface between the OSS kernel and user-level applications that use the OPL3 sound chip.

91 #define OPL3_OPL4_ENABLE 0x02 /* OPL4 mode */

92

93 #define OPL3_REG_KBD_SPLIT 0x08 /* Left side */

94 #define OPL3_COMPOSITE_SINE_WAVE_MODE 0x80 /* Don't use with OPL-3? */

95 #define OPL3_KEYBOARD_SPLIT 0x40

history-restore.pl (git://github.com/shabble/irssi-scripts.git) Perl · 186 lines ✨ Summary

This Perl script is a template for an IRC bot that displays and restores a fake history of messages. It uses Irssi, a Perl IRC client library, to interact with the IRC server. The script initializes itself, binds commands to display and restore the history, and simulates typing and pressing keys on the keyboard.

171 # my $n = 0;

172 # $m++;

173 # for my $char (split '', $entry) {

174 # $n++;

175 # Irssi::timeout_add_once(100 * $n * $m,

json2.js (git://github.com/aparajita/cappuccino.git) JavaScript · 480 lines ✨ Summary

This JavaScript code implements a JSON (JavaScript Object Notation) parser and serializer, allowing for easy conversion between JSON strings and JavaScript objects. It defines functions to parse JSON text into JavaScript objects and serialize JavaScript objects into JSON strings, handling various edge cases and syntax errors along the way.

445 // But just to be safe, we want to reject all unexpected forms.

446

447 // We split the second stage into 4 regexp operations in order to work around

448 // crippling inefficiencies in IE's and Safari's regexp engines. First we

449 // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we

bulkstamp.py (git://github.com/IronLanguages/main.git) Python · 136 lines ✨ Summary

This is a Python script that stamps version information on files in a given directory tree. It takes three arguments: the version number, the root directory to search, and a description file containing product name, major, minor, and other version information. The script uses the verstamp module to stamp the version information on files with extensions .dll, .pyd, .exe, and .ocx.

55 # Handle the "_d" thing.

56 pathname = os.path.join(dirname, name)

57 base, ext = os.path.splitext(name)

58 if base[-2:]=='_d':

59 name = base[:-2] + ext

decompile.rkt (git://github.com/gmarceau/PLT.git) Racket · 26 lines ✨ Summary

This Racket code compiles Scheme source files into bytecode using the zo-parse and decompile functions, then prints a pretty representation of the compiled bytecode to the console. It takes one command-line argument, the path to either a source file or a compiled bytecode file, and handles both cases by checking if the provided file exists in its compiled form.

14 (for ([zo-file source-files])

15 (let ([zo-file (path->complete-path zo-file)])

16 (let-values ([(base name dir?) (split-path zo-file)])

17 (let ([alt-file (build-path base "compiled" (path-add-suffix name #".zo"))])

18 (parameterize ([current-load-relative-directory base]

models.py (https://code.google.com/p/chirpradio/) Python · 280 lines ✨ Summary

This is a Django application that manages radio spot scheduling and playback. It allows DJs to schedule spots, which are stored as copies of audio content. The system tracks when each spot is played back, including the date, time, and user who played it. It also provides URLs for adding, editing, and deleting spot copies, as well as viewing schedules and playback history.

242

243 def __unicode__(self):

244 body_words = self.body.split(" ")

245 def shorten(words, maxlen=55):

246 s = ' '.join(words)