PageRenderTime 192ms queryTime 18ms sortTime 33ms getByIdsTime 36ms findMatchingLines 12ms

100+ results results for 'gsub repo:IronLanguages/main' (192 ms)

Not the results you expected?
FormComposeMessage.Designer.cs https://hg.codeplex.com/dbzn | C# | 310 lines
                    
34            this.ToMsgComboBox = new System.Windows.Forms.ComboBox();
                    
35            this.MsgSubjectTextBox = new System.Windows.Forms.TextBox();
                    
36            this.sendMsgBtn = new System.Windows.Forms.Button();
                    
85            // 
                    
86            // MsgSubjectTextBox
                    
87            // 
                    
87            // 
                    
88            this.MsgSubjectTextBox.BackColor = System.Drawing.SystemColors.Info;
                    
89            this.MsgSubjectTextBox.Location = new System.Drawing.Point(59, 49);
                    
89            this.MsgSubjectTextBox.Location = new System.Drawing.Point(59, 49);
                    
90            this.MsgSubjectTextBox.Name = "MsgSubjectTextBox";
                    
91            this.MsgSubjectTextBox.Size = new System.Drawing.Size(259, 20);
                    
91            this.MsgSubjectTextBox.Size = new System.Drawing.Size(259, 20);
                    
92            this.MsgSubjectTextBox.TabIndex = 1;
                    
93            // 
                    
                
kramdown.rb git://github.com/gettalong/kramdown.git | Ruby | 448 lines
                    
77        else
                    
78          el.value.gsub(/\A\n/) do
                    
79            opts[:prev] && opts[:prev].type == :br ? '' : "\n"
                    
79            opts[:prev] && opts[:prev].type == :br ? '' : "\n"
                    
80          end.gsub(/\s+/, ' ').gsub(ESCAPED_CHAR_RE) { "\\#{$1 || $2}" }
                    
81        end
                    
85        w = @options[:line_width] - opts[:indent].to_s.to_i
                    
86        first, second, *rest = inner(el, opts).strip.gsub(/(.{1,#{w}})( +|$\n?)/, "\\1\n").split(/\n/)
                    
87        first&.gsub!(/^(?:(#|>)|(\d+)\.|([+-]\s))/) { $1 || $3 ? "\\#{$1 || $3}" : "#{$2}\\." }
                    
87        first&.gsub!(/^(?:(#|>)|(\d+)\.|([+-]\s))/) { $1 || $3 ? "\\#{$1 || $3}" : "#{$2}\\." }
                    
88        second&.gsub!(/^([=-]+\s*?)$/, "\\\1")
                    
89        res = [first, second, *rest].compact.join("\n") + "\n"
                    
303      def convert_img(el, _opts)
                    
304        alt_text = el.attr['alt'].to_s.gsub(ESCAPED_CHAR_RE) { $1 ? "\\#{$1}" : $2 }
                    
305        src = el.attr['src'].to_s
                    
                
predefhd.h git://github.com/clj/kroc_scons.git | C Header | 323 lines
                    
31#define PD_LONGSUM                    1
                    
32#define PD_LONGSUB                    2
                    
33#define PD_LONGDIFF                   3
                    
                
flashgetdownloader.h https://bitbucket.org/knoss/pcmanager/ | C Header | 559 lines
                    
51			sss.hRegRootKey = HKEY_LOCAL_MACHINE;
                    
52			sss.pszRegSubKey = _T("SOFTWARE\\FlashGet Network\\FlashGet 3");
                    
53			sss.pszPathValue = _T("Path");
                    
124			sss.hRegRootKey          = HKEY_CURRENT_USER;
                    
125			sss.pszRegSubKey         = TEXT( "Software\\BitComet" );
                    
126			sss.pszPathValue      	 = TEXT( "" );
                    
                
sqlite_adapter.rb https://github.com/drnic/pivotal-tracker-tmbundle.git | Ruby | 462 lines
                    
48        def string_to_binary(value)
                    
49          value.gsub(/\0|\%/n) do |b|
                    
50            case b
                    
57        def binary_to_string(value)
                    
58          value.gsub(/%00|%25/n) do |b|
                    
59            case b
                    
391              # index name can't be the same
                    
392              opts = { :name => name.gsub(/_(#{from})_/, "_#{to}_") }
                    
393              opts[:unique] = true if index.unique
                    
                
symbols.c https://codeberg.org/gradusadparnassum/guile.git | C | 563 lines
                    
33#include "fluids.h"
                    
34#include "gsubr.h"
                    
35#include "hash.h"
                    
                
extoken.c https://github.com/ekoontz/graphviz.git | C | 828 lines
                    
172	break;
                    
173    case GSUB:
                    
174	s = " gsub";
                    
                
read_surfaces.R https://bitbucket.org/lachlancoin/proteomics_variable_selection.git | R | 525 lines
                    
45			col.name<-paste(lastnme(surfaces[s]),lastnme(ranges[r]),sep="_")
                    
46			col.name<-gsub(" ", "_", col.name)
                    
47			col.name<-gsub("High", "H", col.name)
                    
47			col.name<-gsub("High", "H", col.name)
                    
48			col.name<-gsub("Low", "L", col.name)
                    
49			col.name<-gsub("_range", "", col.name)
                    
147	if(filter.tophalf){
                    
148		fsingle<-gsub("range/","range/res-",fname)
                    
149		fsingle<-gsub("csv","txt",fsingle)
                    
248colnames = colnames(matrix)
                    
249colnames(matrix) = gsub(toreplace, "",colnames)
                    
250#print(colnames(matrix))
                    
353	ratios = data.frame(t(apply(train$data,2,ratio, train$y, logtransform)))
                    
354	names(ratios) = c(paste("mean",gsub(",", "",classes)), "diff")
                    
355	list(test=test,train=train, combined = combined, classes = classes, train.index =train.index, ratios = ratios)
                    
                
callbacks.rb https://github.com/luke0x/rails.git | Ruby | 362 lines
                    
32  #     def before_validation_on_create
                    
33  #       self.number = number.gsub(/[^0-9]/, "") if attribute_present?("number")
                    
34  #     end
                    
                
TinyEruby.html https://github.com/toy/rb.git | HTML | 287 lines
                    
19233:         <span class="ruby-comment cmt">#src &lt;&lt; &quot; _buf &lt;&lt; '&quot; &lt;&lt; escape_text(text) &lt;&lt; &quot;';&quot;</span>
                    
19334:         <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/['\\]/</span>, <span class="ruby-value str">'\\\\\&amp;'</span>)
                    
19435:         <span class="ruby-identifier">src</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; _buf &lt;&lt; '&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">text</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;';&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">empty?</span>
                    
20546:       <span class="ruby-comment cmt">#src &lt;&lt; &quot; _buf &lt;&lt; '&quot; &lt;&lt; escape_text(rest) &lt;&lt; &quot;';&quot;</span>
                    
20647:       <span class="ruby-identifier">rest</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/['\\]/</span>, <span class="ruby-value str">'\\\\\&amp;'</span>)
                    
20748:       <span class="ruby-identifier">src</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; _buf &lt;&lt; '&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">rest</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;';&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">rest</span>.<span class="ruby-identifier">empty?</span>
                    
257<pre>
                    
258  return text.gsub!(/['\\]/, '\\\\\&amp;') || text
                    
259</pre>
                    
                
cwords.rb https://github.com/andersjacobsen/cwords.git | Ruby | 446 lines
                    
124    id = ff.shift
                    
125    seq = ff[0..-2].join('').downcase.gsub('u','t')
                    
126    seq += ff[-1] if ff[-1] != '>' # check if last field is ">"
                    
                
events.c https://github.com/alama/wine.git | C | 449 lines
                    
117
                    
118    ControlEvent_CleanupDialogSubscriptions(package, msi_dialog_get_name( dialog ));
                    
119    msi_dialog_end_dialog( dialog );
                    
290
                    
291VOID ControlEvent_CleanupDialogSubscriptions(MSIPACKAGE *package, LPWSTR dialog)
                    
292{
                    
                
attachment.rb https://github.com/aeldaly/paperclip.git | Ruby | 416 lines
                    
80      @queued_for_write[:original]   = uploaded_file.to_tempfile
                    
81      instance_write(:file_name,       uploaded_file.original_filename.strip.gsub(/[^A-Za-z\d\.\-_]+/, '_'))
                    
82      instance_write(:content_type,    uploaded_file.content_type.to_s.strip)
                    
297      if file? && !options[:range].include?(size.to_i)
                    
298        options[:message].gsub(/:min/, options[:min].to_s).gsub(/:max/, options[:max].to_s)
                    
299      end
                    
                
test_externals.py https://bitbucket.org/durin42/hgsubversion/ | Python | 396 lines
                    
326        changes = [
                    
327            ('.hgsub', '.hgsub', """\
                    
328dir/deps/project2 = [hgsubversion] dir:^/externals/project2 deps/project2
                    
331"""),
                    
332            ('.hgsubstate', '.hgsubstate', """\
                    
333HEAD dir/deps/project2
                    
346
                    
347        # Check .hgsub and .hgsubstate were not pushed
                    
348        self.assertEqual(['dir', 'subdir1', 'subdir1/a', 'subdir2',
                    
353        changes = [
                    
354            ('.hgsub', '.hgsub', """\
                    
355subdir1/deps/project1 = [hgsubversion] subdir1:^/externals/project1 deps/project1
                    
357"""),
                    
358            ('.hgsubstate', '.hgsubstate', """\
                    
359HEAD subdir1/deps/project1
                    
                
model_schema.rb https://github.com/latortuga/rails.git | Ruby | 394 lines
                    
72    def self.derive_join_table_name(first_table, second_table) # :nodoc:
                    
73      [first_table.to_s, second_table.to_s].sort.join("\0").gsub(/^(.*_)(.+)\0\1(.+)/, '\1\2_\3').tr("\0", "_")
                    
74    end
                    
                
remixoscope.go https://github.com/mkb218/remixoscope.git | Go | 535 lines
                    
110		if durexp.MatchString(line) {
                    
111			samplelength, err = strconv.Atoui(durexp.FindStringSubmatch(line)[1])
                    
112			sampledone = true
                    
113		} else if chanexp.MatchString(line) {
                    
114			channels, err = strconv.Atoui(chanexp.FindStringSubmatch(line)[1])
                    
115			channelsdone = true
                    
                
main_controller.rb https://github.com/kaazoo/Perequation.git | Ruby | 492 lines
                    
171	    
                    
172	    pdf.Cell(35, 6, ((gain.netto * 100).round/100.0).to_s.gsub(/\./,',')+' EUR', 1)
                    
173	    
                    
173	    
                    
174	    #pdf.Cell(30, 6, ((gain.brutto * 100).round/100.0).to_s.gsub(/\./,',')+' EUR', 1)
                    
175	    
                    
208	    
                    
209	    pdf.Cell(35, 6, ((gain.netto * 100).round/100.0).to_s.gsub(/\./,',')+' EUR', 1)
                    
210	    
                    
210	    
                    
211	    #pdf.Cell(30, 6, ((gain.brutto * 100).round/100.0).to_s.gsub(/\./,',')+' EUR', 1)
                    
212	    
                    
324    # datei an nutzer schicken
                    
325  	send_file "public/"+APP_CONFIG['pq_pdf_prefix']+"_"+dats_input.gsub(',', '_')+".pdf", :filename => APP_CONFIG['pq_pdf_prefix']+"_"+dats_input.gsub(',', '_')+".pdf", :type => "application/pdf"
                    
326  	
                    
                
railtie.rb https://github.com/rails/rails.git | Ruby | 383 lines
                    
85    initializer "active_record.backtrace_cleaner" do
                    
86      ActiveSupport.on_load(:active_record) { LogSubscriber.backtrace_cleaner = ::Rails.backtrace_cleaner }
                    
87    end
                    
                
template_framework.rb https://github.com/cwattengard/BigOldRailsTemplate.git | Ruby | 399 lines
                    
123    def load_from_file_in_template(file_name, parent_binding = nil, file_group = 'default', file_type = :pattern)
                    
124      base_name = file_name.gsub(/^\./, '')
                    
125      begin
                    
145          if contents && parent_binding
                    
146            contents = eval("\"" + contents.gsub('"','\\"') + "\"", parent_binding)
                    
147          end
                    
                
juce_MPESynthesiserBase.cpp git://github.com/julianstorer/JUCE.git | C++ | 376 lines
                    
156//==============================================================================
                    
157void MPESynthesiserBase::setMinimumRenderingSubdivisionSize (int numSamples, bool shouldBeStrict) noexcept
                    
158{
                    
247                    MockSynthesiser synth;
                    
248                    synth.setMinimumRenderingSubdivisionSize (1, false);
                    
249                    synth.setCurrentPlaybackSampleRate (44100);
                    
274                    MockSynthesiser synth;
                    
275                    synth.setMinimumRenderingSubdivisionSize (1, false);
                    
276                    synth.setCurrentPlaybackSampleRate (44100);
                    
341                        MockSynthesiser synth;
                    
342                        synth.setMinimumRenderingSubdivisionSize (subblockSize, strict);
                    
343                        synth.setCurrentPlaybackSampleRate (44100);
                    
358                    MockSynthesiser synth;
                    
359                    synth.setMinimumRenderingSubdivisionSize (32, true);
                    
360                    synth.setCurrentPlaybackSampleRate (44100);
                    
                
Enumerator2.rb https://github.com/MagLev/maglev.git | Ruby | 689 lines
                    
599
                    
600  class StringGsubEnumerator < Enumerator # 
                    
601    def initialize(obj, enum_sel, regex)
                    
685  ArrayEnumerator = Enumerable::ArrayEnumerator
                    
686  StringGsubEnumerator = Enumerable::StringGsubEnumerator 
                    
687end
                    
                
form_column_helpers.rb https://github.com/KyleSuttie/BASEBALL_.git | Ruby | 338 lines
                    
62        options[:include_blank] = true if column.column.null
                    
63        options[:prefix] = options[:name].gsub("[#{column.name}]", '')
                    
64        options
                    
72        id_control = "record_#{column.name}_#{[params[:eid], params[:id]].compact.join '_'}"
                    
73        id_control += scope.gsub(/(\[|\])/, '_').gsub('__', '_').gsub(/_$/, '') if scope
                    
74
                    
                
controller_example_group_methods.rb https://github.com/technoweenie/context_on_crack.git | Ruby | 461 lines
                    
90        param_desc = (params.respond_to?(:call) && params.respond_to?(:to_ruby)) ?
                    
91          params.to_ruby.gsub(/(^proc \{)|(\}$)/, '').strip :
                    
92          params.inspect
                    
182      if hint.nil? && route.respond_to?(:to_ruby)
                    
183        hint = route.to_ruby.gsub(/(^proc \{)|(\}$)/, '').strip
                    
184      end
                    
                
filesys.rb https://github.com/ecin/hobix.git | Ruby | 416 lines
                    
175            else
                    
176                entry_path = path.gsub( /^#{ Regexp::quote( @basepath ) }\/?/, '' )
                    
177                next if entry_path !~ /\.#{ Regexp::quote( extension ) }$/
                    
                
GraphicsUtilities.m http://networkpx.googlecode.com/svn/trunk/ | Objective C | 340 lines
                    
72									   CGRect bgSubRect) {
                    
73	GUCreateContext(c, bgSubRect.size.width, bgSubRect.size.height);
                    
74	CGImageRef subimage = NULL;
                    
75	if (background != NULL) {
                    
76		if (bgSubRect.size.width == CGImageGetWidth(background) && bgSubRect.size.height == CGImageGetHeight(background))
                    
77			subimage = CGImageRetain(background);
                    
79			subimage = CGImageCreateWithImageInRect(background, bgSubRect);
                    
80		CGContextDrawImage(c, CGRectMake(0, 0, bgSubRect.size.width, bgSubRect.size.height), subimage);
                    
81	}
                    
                
boss_ragnaros.cpp https://bitbucket.org/biglad/uncore-4.3.4-public.git | C++ | 353 lines
                    
51    SPELL_SONS_OF_FLAME_DUMMY   = 21108,                   // Server side effect
                    
52    SPELL_RAGSUBMERGE           = 21107,                   // Stealth aura
                    
53    SPELL_RAGEMERGE             = 20568,
                    
268                                        _isBanished = true;
                    
269                                        //DoCast(me, SPELL_RAGSUBMERGE);
                    
270                                        _emergeTimer = 90000;
                    
282                                        _isBanished = true;
                    
283                                        //DoCast(me, SPELL_RAGSUBMERGE);
                    
284                                        _emergeTimer = 90000;
                    
                
gps.hxx git://pkgs.fedoraproject.org/FlightGear | C++ Header | 438 lines
                    
77 */
                    
78class GPS : public SGSubsystem, public flightgear::RNAV
                    
79{
                    
84
                    
85  // SGSubsystem interface
                    
86    virtual void init ();
                    
                
RtpsUdpReceiveStrategy.cpp https://bitbucket.org/snaewe/dds.git | C++ | 490 lines
                    
204  if (header.valid() && header.submessage_._d() == RTPS::DATA_FRAG) {
                    
205    const RTPS::DataFragSubmessage& rtps = header.submessage_.data_frag_sm();
                    
206    frags_.first = rtps.fragmentStartingNum.value;
                    
235    RtpsSampleHeader& rsh = received_sample_header();
                    
236    const DataFragSubmessage& dfsm = rsh.submessage_.data_frag_sm();
                    
237
                    
                
tree.rb https://github.com/projectblacklight/blacklight_advanced_search.git | Ruby | 443 lines
                    
127      # in there without triggering regexp capture reference
                    
128      val.gsub(char, '\\\\' + char)
                    
129    end
                    
                
codon.go https://bitbucket.org/mingzhi/biogo.git | Go | 393 lines
                    
52				if idRe.MatchString(line) {
                    
53					idStr = idRe.FindStringSubmatch(line)[1]
                    
54				}
                    
55				if nameRe.MatchString(line) {
                    
56					names = append(names, nameRe.FindStringSubmatch(line)[1])
                    
57				}
                    
58				if ncbieaaRe.MatchString(line) {
                    
59					ncbieaa = ncbieaaRe.FindStringSubmatch(line)[1]
                    
60				}
                    
61				if sncbieaaRe.MatchString(line) {
                    
62					sncbieaa = sncbieaaRe.FindStringSubmatch(line)[1]
                    
63				}
                    
64				if baseRe.MatchString(line) {
                    
65					bases = append(bases, baseRe.FindStringSubmatch(line)[1])
                    
66				}
                    
                
SNPAssortedMating.R https://github.com/DannyArends/Other.git | R | 364 lines
                    
50	}
                    
51	names <- gsub("res","",names)
                    
52	names <- gsub(".txt","",names)
                    
                
number_helpers.rb https://github.com/cored/padrino-framework.git | Ruby | 288 lines
                    
58        begin
                    
59          format.gsub(/%n/, number_with_precision(number,
                    
60            :precision => precision,
                    
62            :separator => separator)
                    
63          ).gsub(/%u/, unit)
                    
64        rescue
                    
149          parts = number.to_s.split('.')
                    
150          parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1#{delimiter}")
                    
151          parts.join(separator)
                    
261          unit = I18n.translate(:'number.human.storage_units.units.byte', :locale => options[:locale], :count => number.to_i, :raise => true)
                    
262          storage_units_format.gsub(/%n/, number.to_i.to_s).gsub(/%u/, unit)
                    
263        else
                    
279            ).sub(/(#{escaped_separator})(\d*[1-9])?0+\z/, '\1\2').sub(/#{escaped_separator}\z/, '')
                    
280            storage_units_format.gsub(/%n/, formatted_number).gsub(/%u/, unit)
                    
281          rescue
                    
                
mpiparser.rb https://bitbucket.org/hkaiser/libgeodecomp | Ruby | 502 lines
                    
149      param_map.each do |param, val|
                    
150        new_spec[:type] = new_spec[:type].gsub(/#{param}/, val)
                    
151      end
                    
497  def parse_class_name(klass)
                    
498    ret = klass.gsub(/ /, "")
                    
499    return ret.gsub(/>/, " >")
                    
                
standard_commands.rb https://github.com/technohippy/termtter.git | Ruby | 500 lines
                    
113        value = user.__send__(attr.to_sym)
                    
114        puts "#{attr.gsub('_', ' ').rjust(label_width)}: #{value}"
                    
115      end
                    
174      query = event.query.split(/\s/).map {|q|Regexp.quote(q)}.join("|")
                    
175      text.gsub(/(#{query})/i, '<on_magenta><white>\1</white></on_magenta>')
                    
176    else
                    
195    :exec_proc => lambda {|arg|
                    
196      id = arg.gsub(/.*:\s*/, '')
                    
197      output([Termtter::API.twitter.show(id)], :show)
                    
217    :exec_proc => lambda {|arg|
                    
218      id = arg.gsub(/.*:\s*/, '')
                    
219      # TODO: Implement
                    
                
boss_ragnaros.cpp https://github.com/Retriman/MadboxpcWOW-core-.git | C++ | 432 lines
                    
42#define SPELL_SONSOFFLAME_DUMMY     21108                   //Server side effect
                    
43#define SPELL_RAGSUBMERGE           21107                   //Stealth aura
                    
44#define SPELL_RAGEMERGE             20568
                    
324                        WasBanished = true;
                    
325                        //DoCast(me, SPELL_RAGSUBMERGE);
                    
326                        Attack_Timer = 90000;
                    
342                        WasBanished = true;
                    
343                        //DoCast(me, SPELL_RAGSUBMERGE);
                    
344                        Attack_Timer = 90000;
                    
                
forums.lua http://facepunch-lua-sdk.googlecode.com/svn/trunk/ | Lua | 261 lines
                    
169
                    
170				-- need to specify base, otherwise it takes the second return value for gsub
                    
171				retForum.threadCount = tonumber( string.gsub( threadCount, ",", "" ), 10 )
                    
171				retForum.threadCount = tonumber( string.gsub( threadCount, ",", "" ), 10 )
                    
172				retForum.postCount = tonumber( string.gsub( postCount, ",", "" ), 10 )
                    
173
                    
174				retForum.forumName = forumName
                    
175				retForum.viewers = tonumber( string.gsub( viewers, ",", "" ), 10 )
                    
176				retForum.forumDescription = forumDescription
                    
253		thread.lastPostURL = lastPostURL
                    
254		thread.replyCount = tonumber( string.gsub( replies, ",", "" ), 10 )
                    
255		thread.viewCount = tonumber( string.gsub( views, ",", "" ), 10 )
                    
                
mathematics.py git://github.com/sublee/trueskill.git | Python | 260 lines
                    
8
                    
9   :copyright: (c) 2012-2016 by Heungsub Lee.
                    
10   :license: BSD, see LICENSE for more details.
                    
                
bili_ranking_image.rb http://bilibiliranking.googlecode.com/svn/trunk/ | Ruby | 208 lines
                    
126        work = Work.find_by_wid d.wid
                    
127        d_name = @@iconv.iconv(d.name).gsub(/\"/,'\\"')
                    
128        img = ImageList.new(pa + '3_list2\\_model.png') if e_i.zero?
                    
                
platform_font_pango.cc https://bitbucket.org/kennethendfinger/chromium.git | C++ | 440 lines
                    
79
                    
80  FcConfigSubstitute(0, pattern, FcMatchPattern);
                    
81  FcDefaultSubstitute(pattern);
                    
                
base.rb https://github.com/chetan/yahoo_sports.git | Ruby | 435 lines
                    
43    HTMLEntities.new.decode(
                    
44        html.gsub(/<.+?>/,'').
                    
45        gsub(/&nbsp;/,' ').
                    
45        gsub(/&nbsp;/,' ').
                    
46        gsub(/&amp;/,'&').
                    
47        gsub(/&quot;/,'"').
                    
47        gsub(/&quot;/,'"').
                    
48        gsub(/&lt;/,'<').
                    
49        gsub(/&gt;/,'>').
                    
49        gsub(/&gt;/,'>').
                    
50        gsub(/&ellip;/,'...').
                    
51        gsub(/&apos;/, "'").
                    
51        gsub(/&apos;/, "'").
                    
52        gsub(/<br *\/>/m, '')
                    
53    ).strip
                    
                
dry_scaffold_generator.rb https://github.com/michel/dry_scaffold.git | Ruby | 415 lines
                    
105          # Replace quantifiers with default actions.
                    
106          arg_entities[1].gsub!(/\*/, DEFAULT_CONTROLLER_ACTIONS.join(','))
                    
107          arg_entities[1].gsub!(/new\+/, [:new, :create].join(','))
                    
107          arg_entities[1].gsub!(/new\+/, [:new, :create].join(','))
                    
108          arg_entities[1].gsub!(/edit\+/, [:edit, :update].join(','))
                    
109          
                    
113          # Replace quantifiers with default respond_to-formats.
                    
114          arg_entities[1].gsub!(/\*/, DEFAULT_RESPOND_TO_FORMATS.join(','))
                    
115          
                    
                
SequencesTest.java https://code.google.com/p/totallylazy/ | Java | 187 lines
                    
103    @Test
                    
104    public void supportsJoiningSubTypes() throws Exception {
                    
105        final Sequence<Number> numbers = numbers(2, 3.0D);
                    
                
z.sh git://github.com/dakrone/dakrone-dotfiles.git | Shell | 240 lines
                    
165                clean_short = short
                    
166                gsub(/[\(\)\[\]\|]/, "\\\\&", clean_short)
                    
167                for( x in matches ) if( matches[x] && x !~ clean_short ) return
                    
                
binutils-common.exp git://pkgs.fedoraproject.org/mingw-w64-tools | Expect | 316 lines
                    
245		foreach {name value} $ref_subst {
                    
246		    regsub -- $name $line_bx $value line_bx
                    
247		}
                    
284	    foreach {name value} $ref_subst {
                    
285		regsub -- $name $line_bx $value line_bx
                    
286	    }
                    
                
list-assistant.js https://github.com/danboy/palm.git | JavaScript | 547 lines
                    
25	convertSceneName: function(sceneId) {
                    
26		return sceneId.gsub("_", "-");
                    
27	},
                    
                
types.R git://github.com/duncantl/RLLVMCompile.git | R | 330 lines
                    
214          ty = as(md[[1]][[1]], "character")
                    
215          ty = gsub('[!"]', "", gsub("^metadata ", "", ty))   # the "metadata " is from LLVM 3.5
                    
216          return(get(ty, globalenv(), inherits = TRUE))
                    
                
ologit-regression.R git://github.com/andrewheiss/RcmdrPlugin.MPAStats.git | R | 197 lines
                    
135		}
                    
136		check.empty <- gsub(" ", "", tclvalue(lhsVariable))
                    
137		if ("" == check.empty) {
                    
140		}
                    
141		check.empty <- gsub(" ", "", tclvalue(rhsVariable))
                    
142		if ("" == check.empty) {
                    
                
test_utility_commands.py https://bitbucket.org/palfrey/hgsubversion | Python | 315 lines
                    
14
                    
15from hgsubversion import util
                    
16from hgsubversion import svncommands
                    
16from hgsubversion import svncommands
                    
17from hgsubversion import verify
                    
18from hgsubversion import wrappers
                    
                
facebook_session.rb https://github.com/NoJster/rfacebook.git | Ruby | 376 lines
                    
153      # get the remote method name
                    
154      remoteMethod = methodSymbol.to_s.gsub("_", ".")
                    
155      if methodSymbol.to_s.match(/cached_(.*)/)
                    
                
properties.spform.php https://github.com/BobRay/SPForm.git | PHP | 661 lines
                    
341array(
                    
342    'name'=>'logSubjectLen',
                    
343    'desc'=>'spf_logsubjectlen_desc',
                    
                
internal_attributes.rb https://github.com/bigfolio/pismo.git | Ruby | 202 lines
                    
63      datetime.strip!
                    
64      datetime.gsub!(/(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)[^\w]*/i, '')
                    
65      datetime.gsub!(/(mon|tues|tue|weds|wed|thurs|thur|thu|fri|sat|sun)[^\w]*/i, '')
                    
66      datetime.sub!(/on\s+/, '')
                    
67      datetime.gsub!(/\,/, '')
                    
68      datetime.sub!(/(\d+)(th|st|rd)/, '\1')
                    
150      # Convert doc to lowercase, scrub out most HTML tags
                    
151      body.downcase.gsub(/\<[^\>]{1,100}\>/, '').gsub(/\&\w+\;/, '').scan(/\b[a-z][a-z\'\#\.]*\b/).each do |word|
                    
152        next if word.length > options[:word_length_limit]
                    
152        next if word.length > options[:word_length_limit]
                    
153        word.gsub!(/\'\w+/, '')
                    
154        words[word] ||= 0
                    
170      # HACK: Remove annoying DIV that readability leaves around
                    
171      @body.gsub!(/\A\<div\>/, '')
                    
172      @body.gsub!(/\<\/div\>\Z/, '')
                    
                
Base.pm https://github.com/audreyt/ournet-bbs.git | Perl | 581 lines
                    
18# These magical hashes below holds all cached initvar constants:
                    
19# = subrountines   as $RegSub{$glob}
                    
20# = module imports as $RegMod{$glob}
                    
22
                    
23my (%RegVar, %RegSub, %RegMod);
                    
24
                    
220    while (my ($pkg, $sym, $ref) = splice(@defer_sub, 0, 3)) {
                    
221	my $ref = ($RegSub{$ref} || $ref);
                    
222	next unless ($ref =~ /^\*(.+)::([^:]+)$/);
                    
240
                    
241	$RegSub{"*$pkg\::$sym"} = $ref;
                    
242    }
                    
                
intrinsics.rb https://github.com/jackowayed/mirah.git | Ruby | 470 lines
                    
252      transformer = Duby::Transform::Transformer.new(state)
                    
253      transformer.filename = name.gsub(".", "/")
                    
254      orig_factory = Duby::AST.type_factory
                    
302          bytes = builder.generate
                    
303          name = builder.class_name.gsub(/\//, '.')
                    
304          class_map[name] = bytes
                    
                
content_query_spec.rb https://github.com/kstephens/contenter.git | Ruby | 568 lines
                    
31
                    
32ORDER_BY_CV = ORDER_BY.gsub(/\.id = contents\./, '.id = cv.').freeze
                    
33
                    
                
llpanelsnapshotpostcard.cpp https://bitbucket.org/lindenlab/viewer-development/ | C++ | 271 lines
                    
68
                    
69	bool missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response);
                    
70	void sendPostcard();
                    
148
                    
149bool LLPanelSnapshotPostcard::missingSubjMsgAlertCallback(const LLSD& notification, const LLSD& response)
                    
150{
                    
263	{
                    
264		LLNotificationsUtil::add("PromptMissingSubjMsg", LLSD(), LLSD(), boost::bind(&LLPanelSnapshotPostcard::missingSubjMsgAlertCallback, this, _1, _2));
                    
265		return;
                    
                
my-sequel.rb https://github.com/kayakaya/tdiary-core.git | Ruby | 539 lines
                    
39		def self::handler_escape(string)
                    
40			string.gsub(/\r/n, '').gsub(/&/n, '&amp;').gsub(/"/n, '&quot;').gsub(/>/n, '&gt;').gsub(/</n, '&lt;').gsub(/\n/n, '\n')
                    
41		end
                    
154\tdiv.sequel {
                    
155#{h(inner_css.gsub(/^\s*/, "\t\t").gsub(/\r?\n/, "\n"))}\t}
                    
156\t--></style>
                    
                
header.rb https://github.com/wyhaines/iowa.git | Ruby | 895 lines
                    
141    def parse
                    
142      @body = Decoder.decode(@body.gsub(/\n|\r\n|\r/, ''))
                    
143    end
                    
                
rakefile https://github.com/stephanebachelier/totalfinder-i18n.git | Rakefile | 309 lines
                    
99                if line.index code then
                    
100                    line.gsub!("REMOVED", "DUPLICIT") if found
                    
101                    line = line[11..-5] + "\n" unless found # see ***
                    
147                if line.index code then
                    
148                    line.gsub!("REMOVED", "DUPLICIT") if found
                    
149                    line = line[11..-5] + "\n" unless found # see ***
                    
                
test_filehandler.rb https://github.com/ruby/ruby.git | Ruby | 403 lines
                    
35    END_OF_REQUEST
                    
36    return StringIO.new(msg.gsub(/^ {6}/, ""))
                    
37  end
                    
                
config.rb https://github.com/ganlron/Workhorse.git | Ruby | 403 lines
                    
114      jid = Jabber::JID.new(user)
                    
115      dom = jid.domain.gsub(/[\.\@]/, '_').downcase
                    
116      node = jid.node.gsub(/[\.\@]/, '_').downcase unless jid.node.nil?
                    
116      node = jid.node.gsub(/[\.\@]/, '_').downcase unless jid.node.nil?
                    
117      resource = jid.resource.gsub(/[\.\@]/, '_').downcase unless jid.resource.nil?
                    
118      return dom, node, resource
                    
154        else
                    
155          lp,dom = user.downcase.gsub(/[^\w@]/,"_").split('@')
                    
156          u = WH::Config.users.to_hash
                    
185          
                    
186          lp,dom = user.downcase.gsub(/[^\w@]/,"_").split('@')
                    
187          u = WH::Config.users.to_hash
                    
212        if self.user_defined?(user)
                    
213          server,nick = handle.downcase.gsub(/[^\w\/]/,"_").split('/')
                    
214          u = WH::Config.users.to_hash
                    
                
tests_spec.rb https://github.com/smw/buildr.git | Ruby | 260 lines
                    
63    expected = File.expand_path('baz')
                    
64    expected.gsub!('/', '\\') if expected =~ /^[A-Z]:/ # Java returns back slashed paths for windows
                    
65    write 'baz/src/test/scala/CurrentDirectoryTestSuite.scala', <<-SCALA
                    
                
index.html https://github.com/bendyworks/bendyworks.github.com.git | HTML | 268 lines
                    
92
                    
93<pre class="sh_ruby"><code>'foobar'.gsub! /oo/, 'u'
                    
94
                    
                
table.rb https://github.com/texel/rails-sender.git | Ruby | 334 lines
                    
184              if cell_with_replaced_args && cell_with_replaced_args.include?(name)
                    
185                cell_with_replaced_args = value ? cell_with_replaced_args.gsub(name, value) : nil
                    
186              end
                    
                
template.rb https://github.com/TuxmAL/documatic.git | Ruby | 259 lines
                    
106    def unnormalize(code)
                    
107      code = code.gsub(/<text:line-break\/>/, "\n")
                    
108      code = code.gsub(/<text:tab\/>/, "\t")
                    
                
oracle_adapter.rb https://github.com/antw/dm-core.git | Ruby | 229 lines
                    
181        def quote_name(name)
                    
182          "\"#{oracle_upcase(name)[0, self.class::IDENTIFIER_MAX_LENGTH].gsub('"', '_')}\""
                    
183        end
                    
                
sendmail.tcl https://bitbucket.org/aolserver/aolserver | TCL | 250 lines
                    
72    ## Cut out carriage returns
                    
73    regsub -all "\n" $to "" to
                    
74    regsub -all "\r" $to "" to
                    
74    regsub -all "\r" $to "" to
                    
75    regsub -all "\n" $bcc "" bcc
                    
76    regsub -all "\r" $bcc "" bcc
                    
                
LogRecorder.java https://bitbucket.org/higginsci/higgins.git | Java | 265 lines
                    
166    @RequirePOST
                    
167    public synchronized void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
                    
168        JSONObject src = req.getSubmittedForm();
                    
                
CodeReview.php https://github.com/brion/mediawiki-svn.git | PHP | 203 lines
                    
113// http://svn.wikimedia.org/viewvc/mediawiki/trunk/tools/codereview-proxy/
                    
114$wgSubversionProxy = false;
                    
115$wgSubversionProxyTimeout = 30; // default 3 secs is too short :)
                    
120// as long as authentication isn't required.
                    
121$wgSubversionOptions = "--non-interactive --trust-server-cert";
                    
122
                    
134// This is only necessary if using the shell method to access Subversion
                    
135$wgSubversionUser = false;
                    
136$wgSubversionPassword = false;
                    
                
PrepareRoutingSubnetworks.java https://gitlab.com/rizwan/graphhopper-bes.git | Java | 262 lines
                    
42 */
                    
43public class PrepareRoutingSubnetworks
                    
44{
                    
53
                    
54    public PrepareRoutingSubnetworks( GraphStorage g, EncodingManager em )
                    
55    {
                    
65
                    
66    public PrepareRoutingSubnetworks setMinNetworkSize( int minNetworkSize )
                    
67    {
                    
71
                    
72    public PrepareRoutingSubnetworks setMinOnewayNetworkSize( int minOnewayNetworkSize )
                    
73    {
                    
                
parser.rb https://github.com/cykod/Webiva.git | Ruby | 267 lines
                    
128          return '' if self[1].empty?
                    
129          string = self[1].gsub(%r((?:\\[\\bfnrt"/]|(?:\\u(?:[A-Fa-f\d]{4}))+|\\[\x20-\xff]))n) do |c|
                    
130            if u = UNESCAPE_MAP[$&[1]]
                    
                
omapi_provider.rb https://github.com/theforeman/smart-proxy.git | Ruby | 221 lines
                    
78      om.puts(command)
                    
79      command = command.gsub(/key .*/, "key [filtered] [filtered]") if filter_key
                    
80      logger.debug "omshell> #{command}"
                    
                
function.markdown https://github.com/reinh/puppet-docs.git | Markdown | 338 lines
                    
132
                    
133# regsubst
                    
134
                    
176
                    
177    $i3 = regsubst($ipaddress,'^([0-9]+)[.]([0-9]+)[.]([0-9]+)[.]([0-9]+)$','\3')
                    
178
                    
180
                    
181    $x = regsubst($ipaddress, '([0-9]+)', '<\1>', 'G')
                    
182
                    
                
page.rb https://github.com/ryanfortin/qmpass.git | Ruby | 316 lines
                    
197          n.sub!(/^(.+?)Page$/, '\1')
                    
198          n.gsub!(/([A-Z])/, ' \1')
                    
199          n.strip
                    
281    def clean_url(url)
                    
282      "/#{ url.strip }/".gsub(%r{//+}, '/') 
                    
283    end
                    
                
validate_numericality_of_matcher.rb https://github.com/qoobaa/sms.git | Ruby | 214 lines
                    
154          message << NUMERIC_COMPARISIONS.map do |key|
                    
155            @options[key] ? "#{key.to_s.gsub('_', ' ')} #{@options[key]} " : nil
                    
156          end.compact.join('or ')
                    
                
default.html.haml https://github.com/churchio/onebody.git | Haml | 195 lines
                    
7      - if @title.present?
                    
8        == | #{@title.gsub(/<.+?>/, '').html_safe}
                    
9    %meta{ content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no', name: 'viewport' }
                    
                
util.rb https://github.com/dtenenbaum/echidna.git | Ruby | 284 lines
                    
73        
                    
74        a_temp = a.name.gsub(regex, "__PLACEHOLDER__")
                    
75        b_temp = b.name.gsub(regex, "__PLACEHOLDER__")
                    
83
                    
84          [a_num,b_num].each {|i|i.gsub!(/^[+-]/,"")}
                    
85          [a_num,b_num].each {|i|i.gsub!(/^0/,"")}
                    
                
view_test.rb https://github.com/karthikeyan7585/adva_cms.git | Ruby | 278 lines
                    
61    HTML
                    
62    expected.strip!.gsub!(/\s{2,}/, ' ')
                    
63    
                    
                
abingo.rb https://github.com/ryanb/railscasts-episodes.git | Ruby | 225 lines
                    
69
                    
70    short_circuit = Abingo.cache.read("Abingo::Experiment::short_circuit(#{test_name})".gsub(" ", "_"))
                    
71    unless short_circuit.nil?
                    
75    unless Abingo::Experiment.exists?(test_name)
                    
76      lock_key = test_name.gsub(" ", "_")
                    
77      if Abingo.cache.exist?(lock_key)
                    
132      else #Could be a test name or conversion name.
                    
133        conversion_name = name.gsub(" ", "_")
                    
134        tests_listening_to_conversion = Abingo.cache.read("Abingo::tests_listening_to_conversion#{conversion_name}")
                    
189  def self.retrieve_alternatives(test_name, alternatives)
                    
190    cache_key = "Abingo::Experiment::#{test_name}::alternatives".gsub(" ","_")
                    
191    alternative_array = self.cache.fetch(cache_key) do
                    
209  def self.score_conversion!(test_name)
                    
210    test_name.gsub!(" ", "_")
                    
211    participating_tests = Abingo.cache.read("Abingo::participating_tests::#{Abingo.identity}") || []
                    
                
apps.rb https://github.com/kch/heroku.git | Ruby | 320 lines
                    
116      if app_data["database_tables"]
                    
117        data["Database Size"].gsub!('(empty)', '0K') + " in #{quantify("table", app_data["database_tables"])}"
                    
118      end
                    
                
dialogbox.js https://github.com/okonet/dialogbox.git | JavaScript | 267 lines
                    
110      var action = rel[0];
                    
111      var options = rel.length > 1 ? this.parseParams(rel[1].gsub(/]/,'')) : null;
                    
112      switch(action) {
                    
                
quote-purchase-order.component.html https://bitbucket.org/inderjitsi/test-mean-app.git | HTML | 159 lines
                    
7    </div>		
                    
8<form [formGroup]="poForm" (ngSubmit)="onSubmit()" class="" novalidate>
                    
9<div class="wrapper wrapper-content animated fadeInRight">
                    
                
message-chunks.rb https://github.com/shenson/sup.git | Ruby | 271 lines
                    
110        text = text.transcode(encoded_content.charset || $encoding)
                    
111        @lines = text.gsub("\r\n", "\n").gsub(/\t/, "        ").gsub(/\r/, "").split("\n")
                    
112        @quotable = true
                    
                
marc_document.rb https://github.com/rsinger/The-Visible-Kilgour.git | Ruby | 316 lines
                    
36    lccn = marc['010']['a']
                    
37    lccn.gsub(/\s/,'')
                    
38  end
                    
                
test_zenweb_plugins_markdown.rb https://github.com/seattlerb/zenweb.git | Ruby | 298 lines
                    
295  def cleanup indent = 4
                    
296    self.gsub(/^\ {#{indent}}/, '').chomp
                    
297  end
                    
                
simple.rb https://github.com/adambair/spacetrader.git | Ruby | 193 lines
                    
54
                    
55        format.gsub!(/%a/, translate(locale, :"date.abbr_day_names")[object.wday])
                    
56        format.gsub!(/%A/, translate(locale, :"date.day_names")[object.wday])
                    
56        format.gsub!(/%A/, translate(locale, :"date.day_names")[object.wday])
                    
57        format.gsub!(/%b/, translate(locale, :"date.abbr_month_names")[object.mon])
                    
58        format.gsub!(/%B/, translate(locale, :"date.month_names")[object.mon])
                    
58        format.gsub!(/%B/, translate(locale, :"date.month_names")[object.mon])
                    
59        format.gsub!(/%p/, translate(locale, :"time.#{object.hour < 12 ? :am : :pm}")) if object.respond_to? :hour
                    
60        object.strftime(format)
                    
122
                    
123          string = string.gsub(/%d/, '{{count}}').gsub(/%s/, '{{value}}')
                    
124          if string.respond_to?(:force_encoding)
                    
                
Filtering.lua https://bitbucket.org/sylvanaar2/prat-3.0 | Lua | 295 lines
                    
155local function cleanText(msg, author)
                    
156	local cleanmsg = msg:gsub("...hic!",""):gsub("%d",""):gsub("%c",""):gsub("%p",""):gsub("%s",""):upper():gsub("SH","S");
                    
157	return (author and author:upper() or "") .. cleanmsg;
                    
                
zonefile.rb https://github.com/zarqman/dns-zonefile.git | Ruby | 315 lines
                    
82          def #{attrib}=(val)
                    
83            @#{attrib} = val.gsub('@', @vars['origin'])
                    
84          end
                    
97            else
                    
98              @#{attrib} = val.gsub('@', @vars['origin'])
                    
99            end
                    
                
register.component.html https://github.com/juniorsatanas/SpringSecurityVraptor.git | HTML | 122 lines
                    
26        <div class="col-md-8 offset-md-2">
                    
27            <form name="form" role="form" (ngSubmit)="register()" #registerForm="ngForm">
                    
28                <div class="form-group">
                    
                
pre_process.rb https://github.com/ruby/ruby.git | Ruby | 298 lines
                    
107    # [prefix][\]:directive:[spaces][param]newline
                    
108    text = text.gsub(/^([ \t]*(?:#|\/?\*)?[ \t]*)(\\?):(\w+):([ \t]*)(.+)?(\r?\n|$)/) do
                    
109      # skip something like ':toto::'
                    
277    if content =~ /^[^#]/ then
                    
278      content.gsub(/^/, indent)
                    
279    else
                    
279    else
                    
280      content.gsub(/^#?/, indent)
                    
281    end
                    
                
terminal.rb https://github.com/lamikae/Ruby-GSM.git | Ruby | 292 lines
                    
40      unless File.exists?(executable.split(' ')[0]) then
                    
41        response_fn = '/resp/'+script.gsub(/.sh.*/,'').gsub(/\ /,'_').downcase
                    
42        ##logger.debug "File %s does not exist, reading input from file %s" % [script, response_fn]
                    
141      # clean the response; remove all strings (separated by newline) that start with AT but do NOT have ':'
                    
142      response.gsub!(/^AT[^:]*\n/,'')
                    
143      # remove BOOT and RSSI strings
                    
143      # remove BOOT and RSSI strings
                    
144      response.gsub!(/\^BOOT.*\n|\^RSSI.*\n/,'')
                    
145
                    
                
bbe.lua git://github.com/ksdtech/bbc.git | Lua | 461 lines
                    
173      local f = string.sub(s, fieldstart + 1, i - 1)
                    
174      table.insert(t, (string.gsub(f, '""', '"')))
                    
175      fieldstart = string.find(s, ',', i) + 1
                    
205    if line == nil then break end
                    
206    line = string.gsub(line, "\r$", "") -- handle CRLF
                    
207    if lno == 0 then
                    
235    if line == nil then break end
                    
236    line = string.gsub(line, "\r$", "") -- handle CRLF
                    
237    if lno == 0 then
                    
                
firefox_install_addon.rb https://github.com/v-p-b/MSF-Addons.git | Ruby | 322 lines
                    
75		if got_root?
                    
76			userdirs = session.shell_command("ls #{home}").gsub(/\s/, "\n")
                    
77			userdirs << "/root\n"
                    
80			print_status("Checking #{id} account for Firefox")
                    
81			firefox = session.shell_command("ls #{home}#{id}/.mozilla/firefox/").gsub(/\s/, "\n")
                    
82
                    
112			end
                    
113			stat.gsub!(/\s/, "\n")
                    
114			stat.each_line do |profile|
                    
233                    begin
                    
234                        direntry=direntry[lpath.size..direntry.size].gsub("/","\\")
                    
235                        print_status("Creating #{extpath+direntry}")
                    
272                    if @platform == :windows
                    
273                        remote_entry=entry.gsub("/","\\")
                    
274                    else
                    
                
ocaml.rb https://github.com/mallowlabs/langscan.git | Ruby | 298 lines
                    
52      def denormalize(str)
                    
53        str.gsub(/([^\\])\\o/,'\1'+"\n")
                    
54      end
                    
                
configuration.jsp git://github.com/liferay/liferay-portal.git | JavaServer Pages | 294 lines
                    
43				<liferay-ui:error key="emailOrderShippingBody" message="please-enter-a-valid-body" />
                    
44				<liferay-ui:error key="emailOrderShippingSubject" message="please-enter-a-valid-subject" />
                    
45				<liferay-ui:error key="emailOrderConfirmationBody" message="please-enter-a-valid-body" />
                    
255						emailParam="emailOrderShipping"
                    
256						emailSubject="<%= shoppingGroupServiceOverriddenConfiguration.getEmailOrderShippingSubjectXml() %>"
                    
257					/>
                    
                
money.rb https://github.com/nkokkos/spot-us.git | Ruby | 299 lines
                    
238    # Commify ("10000" => "10,000")
                    
239    formatted.gsub!(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/,'\1,\2')
                    
240
                    
                
tc_headers.rb https://github.com/nkokkos/spot-us.git | Ruby | 277 lines
                    
13  def setup
                    
14    @data = <<-END_CSV.gsub(/^\s+/, "")
                    
15    first,second,third
                    
185    # create test data where headers and fields look alike
                    
186    data = <<-END_MATCHING_CSV.gsub(/^\s+/, "")
                    
187    1,2,3
                    
243  def test_skip_blanks
                    
244    @data = <<-END_CSV.gsub(/^ +/, "")
                    
245    
                    
                
input_type.h git://github.com/chromium/chromium.git | C Header | 282 lines
                    
82  virtual void AppendToFormData(FormData&) const;
                    
83  virtual String ResultForDialogSubmit() const;
                    
84
                    
                
LibPeriodicTable-3.1.lua https://code.google.com/p/strongcwowinterface/ | Lua | 371 lines
                    
71		-- Escape characters that will screw up the name matching.
                    
72		local escapedparentname = parentname:gsub("([%.%(%)%%%+%-%*%?%[%]%^%$])", "%%%1")
                    
73		-- Check all the sets to see if they start with this name.
                    
                
ruby1e1.rb https://github.com/sakoht/RMI.git | Ruby | 270 lines
                    
89                # occur.  It also makes Data::Dumper results more readable.
                    
90                target_class_name = 'RMI::ProxyObject::' + remote_class #gsub(':','')
                    
91                target_class = @@proxy_subclasses[target_class_name]
                    
                
HttpAcceptLanguage.html https://github.com/toy/rb.git | HTML | 256 lines
                    
21018:     <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
                    
21119:       <span class="ruby-identifier">l</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/-[a-z]+$/i</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">upcase</span> }
                    
21220:     <span class="ruby-keyword kw">end</span>
                    
                
ForceSFV.tcl http://nxscripts.googlecode.com/svn/ | TCL | 130 lines
                    
64proc ArgRange {list start end} {
                    
65	regsub -all {[\s]+} $list { } list
                    
66	return [join [lrange [split [string trim $list] { }] $start $end] { }]
                    
88proc SplitPath {path} {
                    
89    regsub -all -- {[\\/]+} $path {/} path
                    
90    return [file split [string trim $path "/"]]
                    
                
matheval.c git://pkgs.fedoraproject.org/libmatheval | C | 367 lines
                    
42#ifdef HAVE_SCM_MAKE_GSUBR
                    
43#define scm_c_define_gsubr scm_make_gsubr
                    
44#else
                    
44#else
                    
45#error Neither scm_c_define_gsubr() nor scm_make_gsubr() available
                    
46#endif
                    
78	/* Register other procedures working on evaluator type. */
                    
79	scm_c_define_gsubr("evaluator-create", 1, 0, 0,
                    
80			   (SCM(*)())evaluator_create_scm);
                    
80			   (SCM(*)())evaluator_create_scm);
                    
81	scm_c_define_gsubr("evaluator-evaluate", 4, 0, 0,
                    
82			   (SCM(*)())evaluator_evaluate_scm);
                    
82			   (SCM(*)())evaluator_evaluate_scm);
                    
83	scm_c_define_gsubr("evaluator-get-string", 1, 0, 0,
                    
84			   (SCM(*)())evaluator_get_string_scm);
                    
                
url.lua http://sdccs.googlecode.com/svn/trunk/ | Lua | 298 lines
                    
28function escape(s)
                    
29    return string.gsub(s, "([^A-Za-z0-9_])", function(c)
                    
30        return string.format("%%%02x", string.byte(c))
                    
57local function protect_segment(s)
                    
58	return string.gsub(s, "([^A-Za-z0-9_])", function (c)
                    
59		if segment_set[c] then return c
                    
71function unescape(s)
                    
72    return string.gsub(s, "%%(%x%x)", function(hex)
                    
73        return string.char(base.tonumber(hex, 16))
                    
86    if string.sub(relative_path, 1, 1) == "/" then return relative_path end
                    
87    local path = string.gsub(base_path, "[^/]*$", "")
                    
88    path = path .. relative_path
                    
88    path = path .. relative_path
                    
89    path = string.gsub(path, "([^/]*%./)", function (s)
                    
90        if s ~= "./" then return s else return "" end
                    
                
cascade_resolver.h git://github.com/chromium/chromium.git | C Header | 127 lines
                    
24
                    
25class CSSPendingSubstitutionValue;
                    
26
                    
111
                    
112  // A very simple cache for CSSPendingSubstitutionValues. We cache only the
                    
113  // most recently parsed CSSPendingSubstitutionValue, such that consecutive
                    
113  // most recently parsed CSSPendingSubstitutionValue, such that consecutive
                    
114  // calls to ResolvePendingSubstitution with the same value don't need to
                    
115  // do the same parsing job all over again.
                    
119   public:
                    
120    const cssvalue::CSSPendingSubstitutionValue* value = nullptr;
                    
121    HeapVector<CSSPropertyValue, 256> parsed_properties;
                    
                
RemovingSubItemCallEventArgsTest.cs https://HappyQ.svn.codeplex.com/svn | C# | 117 lines
                    
6    /// <summary>
                    
7    ///这是 RemovingSubItemCallEventArgsTest 的测试类,旨在
                    
8    ///包含所有 RemovingSubItemCallEventArgsTest 单元测试
                    
10    [TestClass()]
                    
11    public class RemovingSubItemCallEventArgsTest
                    
12    {
                    
61            BaseItemContainer<T> itemContainerT = null; // TODO: 初始化为适当的值
                    
62            RemovingSubItemCallEventArgs<T> target = new RemovingSubItemCallEventArgs<T>( removeSubItem, itemContainerT ); // TODO: 初始化为适当的值
                    
63            T actual;
                    
81            BaseItemContainer<T> itemContainerT = null; // TODO: 初始化为适当的值
                    
82            RemovingSubItemCallEventArgs<T> target = new RemovingSubItemCallEventArgs<T>( removeSubItem, itemContainerT ); // TODO: 初始化为适当的值
                    
83            bool expected = false; // TODO: 初始化为适当的值
                    
104            BaseItemContainer<T> itemContainerT = null; // TODO: 初始化为适当的值
                    
105            RemovingSubItemCallEventArgs<T> target = new RemovingSubItemCallEventArgs<T>( removeSubItem, itemContainerT );
                    
106            Assert.Inconclusive( "TODO: 实现用来验证目标的代码" );
                    
                
config.php https://bitbucket.org/pipehline/mautic-imachine.git | PHP | 214 lines
                    
113            'mautic.asset.configbundle.subscriber' => [
                    
114                'class' => 'Mautic\AssetBundle\EventListener\ConfigSubscriber',
                    
115            ],
                    
                
apt_conf_generators.rb https://github.com/rightscale/right_link.git | Ruby | 107 lines
                    
76        x = Date.parse(opts[:frozen_date]).to_s
                    
77        x.gsub!(/-/,"/")
                    
78        opts[:frozen_date] = x
                    
                
luaannotate.lua git://github.com/davidm/lua-annotate.git | Lua | 170 lines
                    
17      --print('DEBUG-luacomment-commit', id, text)
                    
18      text = text:gsub('[\r\n]$', '')
                    
19      annotations[id] = text
                    
118  scite_OnOpen(function(path)
                    
119    local annotations_path = path:gsub('[^\\/]+$', 'annotations.txt')
                    
120    print('DEBUG-luacomment-open', path, annotations_path)
                    
133local function cpp_escape_comment(text)
                    
134  text = text:gsub('%*/', '* /')
                    
135  return text
                    
147  local iline = 1
                    
148  code = (code .. '\n'):gsub('(.-\r?\n)', function(line)
                    
149    if commentofline[iline] then
                    
160if path then
                    
161  local annotations_path = path:gsub('[^\\/]+$', 'annotations.txt')
                    
162  local code = read_file(path)
                    
                
collection.rb git://github.com/stevenbristol/lovd-by-less.git | Ruby | 142 lines
                    
112      
                    
113      each_with_attribute method.to_s.gsub(/^each_with_/, ''), &block
                    
114    end
                    
                
playerctl.lua https://github.com/Mange/dotfiles.git | Lua | 174 lines
                    
6  if url then
                    
7    return string.gsub(url, "https://open.spotify.com/image/", "https://i.scdn.co/image/")
                    
8  else
                    
                
LocalTerminalLaunchUtilities.java git://pkgs.fedoraproject.org/eclipse-rse | Java | 305 lines
                    
124		}
                    
125		String expandedLocation = getStringVariableManager().performStringSubstitution(location);
                    
126		if (expandedLocation == null || expandedLocation.length() == 0) {
                    
156			String expandedLocation;
                    
157			expandedLocation = getStringVariableManager().performStringSubstitution(location);
                    
158			if (expandedLocation.length() > 0) {
                    
185
                    
186			String expanded = getStringVariableManager().performStringSubstitution(arguments);
                    
187			return parseStringIntoList(expanded);
                    
                
settings_main_test.js https://github.com/chromium/chromium.git | JavaScript | 365 lines
                    
120    return settingsMain.showManagedHeader_(
                    
121        settingsMain.inSearchMode_, settingsMain.showingSubpage_,
                    
122        settingsMain.showPages_.about);
                    
                
CopyResources.lua http://angel-engine.googlecode.com/svn/trunk/ | Lua | 144 lines
                    
46
                    
47lfs.chdir(fulljoin(os.getenv('PROJECT_DIR'), '..', 'Angel', 'Scripting', 'EngineScripts'):gsub('"', ''))
                    
48
                    
81
                    
82if (not path.exists(dest:gsub('"', ''))) then
                    
83  makedirs(dest:gsub('"', ''))
                    
88    local dstname = fulljoin(dest, path.basename(filename))
                    
89    dir.copyfile(filename, dstname:gsub('"', ''))
                    
90  end
                    
                
swank.lua git://github.com/matsu911/swank-lua.git | Lua | 370 lines
                    
233   self.lua_command = (self.lua_command or "") .. '\n' .. args[1]
                    
234   self.lua_command = self.lua_command:gsub("^%s*", ""):gsub("%s*$", "")
                    
235   self.logger(self.lua_command:len(), self.lua_command)
                    
306   else
                    
307      return return_abort_message(double_quote(ret:gsub('"', '\\"')), serial), write_str
                    
308   end
                    
                
cheddargetter_spec.rb git://github.com/ads/cheddargetter.git | Ruby | 234 lines
                    
229  def mock_request(method, request_path, response_xml)
                    
230    request_path.gsub!(/^\//, '')
                    
231    options = { :body => response_xml, :content_type =>  "text/xml" }
                    
                
ui_text_field.rb git://github.com/clayallsopp/formotion.git | Ruby | 166 lines
                    
118    if BW::Device.ios_version >= "7.0"
                    
119      theTextField.text = theTextField.text.gsub("\u00a0", " ").strip
                    
120    end
                    
                
vote.cgi git://pkgs.fedoraproject.org/alpine | TCL | 191 lines
                    
45	    # simplify votes_read by making each entry a single line
                    
46	    regsub -all \n $data <br> data
                    
47	    puts $fid $i\n$data
                    
                
prosody_files.lua git://github.com/bjc/prosody.git | Lua | 143 lines
                    
25local function clean_path(path)
                    
26	return path:gsub("\\", "/"):gsub("//+", "/"):gsub("^~", os_getenv("HOME") or "~");
                    
27end
                    
29	local urlcodes = setmetatable({}, { __index = function (t, k) t[k] = char(tonumber("0x"..k)); return t[k]; end });
                    
30	decode = function (s) return s and (s:gsub("+", " "):gsub("%%([a-fA-F0-9][a-fA-F0-9])", urlcodes)); end
                    
31	encode = function (s) return s and (s:gsub("%W", function (c) return format("%%%02x", c:byte()); end)); end
                    
33local function decode_dir(x)
                    
34	if x:gsub("%%%x%x", ""):gsub("[a-zA-Z0-9]", "") == "" then
                    
35		return decode(x);
                    
38local function decode_file(x)
                    
39	if x:match(".%.dat$") and x:gsub("%.dat$", ""):gsub("%%%x%x", ""):gsub("[a-zA-Z0-9]", "") == "" then
                    
40		return decode(x:gsub("%.dat$", ""));
                    
                
liberty-idsis-pp-v1.1.xsd git://pkgs.fedoraproject.org/axis | XML Schema | 261 lines
                    
201      <xs:element ref="MsgAccount" minOccurs="0"/>
                    
202      <xs:element ref="MsgSubaccount" minOccurs="0"/>
                    
203      <xs:element ref="Extension" minOccurs="0"/>
                    
219  <xs:element name="MsgAccount" type="DSTString"/>
                    
220  <xs:element name="MsgSubaccount" type="DSTString"/>
                    
221  <xs:element name="Facade" type="FacadeType"/>
                    
                
author.rb https://gitlab.com/leijianbin/metasploit-framework.git | Ruby | 146 lines
                    
120      else
                    
121        self.email = str.sub(/\s*\[at\]\s*/, '@').sub(/\s*\[dot\]\s*/, '.').gsub(/^<|>$/, '')
                    
122        m = self.email.match(/([^@]+)@/)
                    
                
EventAggregatorFixture.cs https://hg.codeplex.com/tecx | C# | 146 lines
                    
99
                    
100            CancelingSubscriber subscriber = new CancelingSubscriber();
                    
101
                    
                
bib_profile https://code.google.com/p/koha/ | Perl | 128 lines
                    
68    my $result = shift;
                    
69    my $sth = $dbh->prepare_cached("SELECT tagfield, tagsubfield 
                    
70                                    FROM marc_subfield_structure 
                    
71                                    WHERE frameworkcode = '' 
                    
72                                    AND tagsubfield <> '\@' 
                    
73                                    AND kohafield <> 'biblioitems.itemtype'
                    
99    my $result = shift;
                    
100    my $sth = $dbh->prepare_cached("SELECT tagfield, tagsubfield
                    
101                                    FROM marc_subfield_structure 
                    
114    my $itemtypes = GetItemTypes;
                    
115    my $sth = $dbh->prepare_cached("SELECT tagfield, tagsubfield
                    
116                                    FROM marc_subfield_structure 
                    
                
validate.lua git://github.com/keplerproject/luarocks.git | Lua | 160 lines
                    
44local function prepare_sandbox(file)
                    
45   local root_dir = fs.make_temp_dir(file):gsub("/+$", "")
                    
46   cfg.root_dir = root_dir
                    
                
bng.c git://github.com/OCamlPro/OCamlPro-OCaml-Branch.git | C | 435 lines
                    
145  for (/**/; blen > 0; blen--, a++, b++) {
                    
146    BngSub2Carry(*a, carry, *a, *b, carry);
                    
147  }
                    
243    /* current digit of a -= pl + out.  Accumulate carrys in ph. */
                    
244    BngSub3(*a, ph, *a, pl, out);
                    
245    /* prepare out for next iteration */
                    
249  /* current digit of a -= out */
                    
250  BngSub2(*a, carry, *a, out);
                    
251  a++;
                    
                
index.go git://github.com/tav/go.git | Go | 225 lines
                    
144		// Direct value, fetch from struct, fetch from struct pointer.
                    
145		// The last two cases get us to oindex_const_sudo in gsubr.c.
                    
146		[]string{"", "t.", "pt."},
                    
151		// Element is int, element is quad (struct).
                    
152		// This controls whether we end up in gsubr.c (i) or cgen.c (q).
                    
153		[]string{"i", "q"},
                    
                
Globals.h https://code.google.com/p/tortoisegit/ | C Header | 124 lines
                    
50#define MENUSVNIGNORE	    0x0000000040000000
                    
51#define MENULOGSUBMODULE	0x0000000100000000
                    
52#define MENUPREVDIFF		0x0000000200000000
                    
                
build_with_mtasc.rb git://github.com/textmate/actionscript.tmbundle.git | Ruby | 162 lines
                    
56      @size_is_percentage = true
                    
57      @config['width'].gsub!(/%/,'')
                    
58      @config['height'].gsub!(/%/,'')
                    
                
references.rb git://github.com/peter-murach/github.git | Ruby | 150 lines
                    
140    def validate_reference(ref)
                    
141      refs = (ref =~ (/^(\/)?refs.*/) ? ref : "refs/#{ref}").gsub(/(\/)+/, '/')
                    
142      refs.gsub!(/^\//, '')
                    
                
override.properties git://pkgs.fedoraproject.org/thunderbird-lightning | Properties File | 119 lines
                    
82UninstallingText=??????? $BrandFullNameDA ????????????? $_CLICK
                    
83UninstallingSubText=??????????????:
                    
84FileError=?????????: \r\n\r\n$0\r\n\r\n????????????? “??” ????????????\r\n?????? “???” ????????????\r\n??????????????? “??” ????????????
                    
                
cache.rb git://github.com/wagn/wagn.git | Ruby | 177 lines
                    
8      n = 0 if n.nil?
                    
9      sprintf("%s%d-%d%s", basename.to_s.gsub(/\.\w+$/) { |s| ext = s; '' }, $$, n, ext)
                    
10    end
                    
16    def real_file_path(name)
                    
17      name = name.gsub('%','%25').gsub('?','%3F').gsub(':','%3A')
                    
18      name = name.gsub('\\','%5C').gsub('*','%2A').gsub('"','%22')
                    
18      name = name.gsub('\\','%5C').gsub('*','%2A').gsub('"','%22')
                    
19      name = name.gsub('<','%3C').gsub('>','%3E').gsub('|','%7C')
                    
20      '%s/%s.cache' % [@cache_path, name ]
                    
                
 

Source

Language