PageRenderTime 958ms queryTime 179ms sortTime 102ms getByIdsTime 96ms findMatchingLines 42ms

100+ results results for 'gsub repo:rubinius/rubinius' (958 ms)

Not the results you expected?
model_schema.rb https://gitlab.com/franzejr/rails | 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
                    
                
example3_9.lua https://gitlab.com/willemmali-c/iup | Lua | 584 lines
                    
16function str_filetitle(filename)
                    
17  local filename = string.gsub(filename, "\\", "/")
                    
18  filename = string.reverse(filename)
                    
                
callbacks.rb https://github.com/sammyman/rails.git | Ruby | 362 lines
                    
32  #     def before_validation_on_create
                    
33  #       self.number = number.gsub(/[^0-9]/, "") if attribute_present?("number")
                    
34  #     end
                    
                
MenuInfo.cpp https://gitlab.com/cfuji/tortoisegit | C++ | 247 lines
                    
77
                    
78	{ ShellMenuLogSubmoduleFolder,			MENULOGSUBMODULE,	IDI_LOG,				IDS_MENULOGSUBMODULE,		IDS_MENUDESCLOG,
                    
79		{ITEMIS_FOLDERINGIT|ITEMIS_ONLYONE|ITEMIS_WCROOT|ITEMIS_SUBMODULE, 0}, {0, 0}, {0, 0}, {0, 0} },
                    
                
boss_ragnaros.cpp https://gitlab.com/Snapper/TrinityCore_434 | C++ | 355 lines
                    
51    SPELL_SONS_OF_FLAME_DUMMY   = 21108,                   // Server side effect
                    
52    SPELL_RAGSUBMERGE           = 21107,                   // Stealth aura
                    
53    SPELL_RAGEMERGE             = 20568,
                    
271                                        _isBanished = true;
                    
272                                        //DoCast(me, SPELL_RAGSUBMERGE);
                    
273                                        _emergeTimer = 90000;
                    
285                                        _isBanished = true;
                    
286                                        //DoCast(me, SPELL_RAGSUBMERGE);
                    
287                                        _emergeTimer = 90000;
                    
                
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
                    
                
purell.go https://gitlab.com/github-cloud-corporation/kubernetes | Go | 375 lines
                    
320	if len(u.Host) > 0 {
                    
321		if matches := rxDWORDHost.FindStringSubmatch(u.Host); len(matches) > 2 {
                    
322			var parts [4]int64
                    
334	if len(u.Host) > 0 {
                    
335		if matches := rxOctalHost.FindStringSubmatch(u.Host); len(matches) > 5 {
                    
336			var parts [4]int64
                    
347	if len(u.Host) > 0 {
                    
348		if matches := rxHexHost.FindStringSubmatch(u.Host); len(matches) > 2 {
                    
349			// Conversion is safe because of regex validation
                    
360	if len(u.Host) > 0 {
                    
361		if matches := rxHostDots.FindStringSubmatch(u.Host); len(matches) > 1 {
                    
362			// Trim the leading and trailing dots
                    
                
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
                    
                
BuildStringPart_SubstituteMenu.java https://github.com/JetBrains/MPS.git | Java | 303 lines
                    
11import java.util.ArrayList;
                    
12import jetbrains.mps.lang.editor.menus.substitute.ConstraintsFilteringSubstituteMenuPartDecorator;
                    
13import jetbrains.mps.lang.editor.menus.EditorMenuDescriptorBase;
                    
53    List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> result = new ArrayList<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>();
                    
54    result.add(new ConstraintsFilteringSubstituteMenuPartDecorator(new SMP_Param_fvo6kj_a(), CONCEPTS.BuildVarRefStringPart$2T));
                    
55    result.add(new ConstraintsFilteringSubstituteMenuPartDecorator(new SMP_Action_fvo6kj_b(), CONCEPTS.BuildTextStringPart$3R));
                    
                
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( "" );
                    
                
BinaryNullableSubtractTests.cs https://gitlab.com/0072016/0072016-corefx- | C# | 330 lines
                    
92        [Theory, ClassData(typeof(CompilationTypes))]
                    
93        public static void CheckNullableULongSubtractTest(bool useInterpreter)
                    
94        {
                    
99                {
                    
100                    VerifyNullableULongSubtract(array[i], array[j], useInterpreter);
                    
101                }
                    
105        [Theory, ClassData(typeof(CompilationTypes))]
                    
106        public static void CheckNullableLongSubtractTest(bool useInterpreter)
                    
107        {
                    
112                {
                    
113                    VerifyNullableLongSubtract(array[i], array[j], useInterpreter);
                    
114                }
                    
239
                    
240        private static void VerifyNullableULongSubtract(ulong? a, ulong? b, bool useInterpreter)
                    
241        {
                    
                
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)
                    
                
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
                    
                
utils.lua https://github.com/jjensen/luaplus51-all.git | Lua | 475 lines
                    
3-- @module pl.utils
                    
4local format,gsub,byte = string.format,string.gsub,string.byte
                    
5local compat = require 'pl.compat'
                    
101    utils.assert_string(1,s)
                    
102    return (s:gsub('[%-%.%+%[%]%(%)%$%^%%%?%*]','%%%1'))
                    
103end
                    
                
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
                    
                
l-file.lua https://bitbucket.org/preining/tex-live.git | Lua | 494 lines
                    
14local insert, concat = table.insert, table.concat
                    
15local find, gmatch, match, gsub, sub, char, lower = string.find, string.gmatch, string.match, string.gsub, string.sub, string.char, string.lower
                    
16local lpegmatch = lpeg.match
                    
99function file.replacesuffix(filename, suffix)
                    
100    return (gsub(filename,"%.[%a%d]+$","")) .. "." .. suffix
                    
101end
                    
139    pth = gsub(pth,trick_2,"")
                    
140    return (gsub(pth,"//+","/"))
                    
141end
                    
213--~     if find(str,"/") then
                    
214--~         str = gsub(str,"^%./",(gsub(getcurrentdir(),"\\","/")) .. "/") -- ./xx in qualified
                    
215--~         str = gsub(str,"/%./","/")
                    
300function file.robustname(str,strict)
                    
301    str = gsub(str,"[^%a%d%/%-%.\\]+","-")
                    
302    if strict then
                    
                
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 ) }$/
                    
                
snippets_controller_spec.rb https://gitlab.com/klml/gitlab-ee | Ruby | 325 lines
                    
276
                    
277      let(:formatted_content) { content.gsub(/\r\n/, "\n") }
                    
278
                    
                
methods.rb https://github.com/nicksieger/rails.git | Ruby | 391 lines
                    
73      end
                    
74      string.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{inflections.acronyms[$2] || $2.capitalize}" }
                    
75      string.gsub!('/'.freeze, '::'.freeze)
                    
91      return camel_cased_word unless /[A-Z-]|::/.match?(camel_cased_word)
                    
92      word = camel_cased_word.to_s.gsub('::'.freeze, '/'.freeze)
                    
93      word.gsub!(/(?:(?<=([A-Za-z\d]))|\b)(#{inflections.acronym_regex})(?=\b|[^a-z])/) { "#{$1 && '_'.freeze }#{$2.downcase}" }
                    
93      word.gsub!(/(?:(?<=([A-Za-z\d]))|\b)(#{inflections.acronym_regex})(?=\b|[^a-z])/) { "#{$1 && '_'.freeze }#{$2.downcase}" }
                    
94      word.gsub!(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2'.freeze)
                    
95      word.gsub!(/([a-z\d])([A-Z])/, '\1_\2'.freeze)
                    
132
                    
133      result.gsub!(/([a-z\d]*)/i) do |match|
                    
134        "#{inflections.acronyms[match] || match.downcase}"
                    
163    def titleize(word)
                    
164      humanize(underscore(word)).gsub(/\b(?<!['’`])[a-z]/) { |match| match.capitalize }
                    
165    end
                    
                
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	}
                    
                
hb-ot-shape-complex-myanmar.cc https://gitlab.com/godotengine/godot | C++ | 318 lines
                    
79  /* Do this before any lookups have been applied. */
                    
80  map->add_gsub_pause (setup_syllables_myanmar);
                    
81
                    
87
                    
88  map->add_gsub_pause (reorder_myanmar);
                    
89
                    
92    map->enable_feature (myanmar_basic_features[i], F_MANUAL_ZWJ | F_PER_SYLLABLE);
                    
93    map->add_gsub_pause (nullptr);
                    
94  }
                    
                
app_generator.rb https://github.com/gavingmiller/rails.git | Ruby | 512 lines
                    
103
                    
104      gsub_file "config/environments/development.rb", /^(\s+)config\.file_watcher/, '\1# config.file_watcher'
                    
105
                    
106      unless cookie_serializer_config_exist
                    
107        gsub_file "config/initializers/cookies_serializer.rb", /json(?!,)/, "marshal"
                    
108      end
                    
397      def app_const_base
                    
398        @app_const_base ||= defined_app_const_base || app_name.gsub(/\W/, "_").squeeze("_").camelize
                    
399      end
                    
491          if (customrc = argv.index { |x| x.include?("--rc=") })
                    
492            fname = File.expand_path(argv[customrc].gsub(/--rc=/, ""))
                    
493            yield(argv.take(customrc) + argv.drop(customrc + 1), fname)
                    
                
methods.rb https://github.com/gavingmiller/rails.git | Ruby | 391 lines
                    
73      end
                    
74      string.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{$1}#{inflections.acronyms[$2] || $2.capitalize}" }
                    
75      string.gsub!("/".freeze, "::".freeze)
                    
91      return camel_cased_word unless /[A-Z-]|::/.match?(camel_cased_word)
                    
92      word = camel_cased_word.to_s.gsub("::".freeze, "/".freeze)
                    
93      word.gsub!(/(?:(?<=([A-Za-z\d]))|\b)(#{inflections.acronym_regex})(?=\b|[^a-z])/) { "#{$1 && '_'.freeze }#{$2.downcase}" }
                    
93      word.gsub!(/(?:(?<=([A-Za-z\d]))|\b)(#{inflections.acronym_regex})(?=\b|[^a-z])/) { "#{$1 && '_'.freeze }#{$2.downcase}" }
                    
94      word.gsub!(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2'.freeze)
                    
95      word.gsub!(/([a-z\d])([A-Z])/, '\1_\2'.freeze)
                    
132
                    
133      result.gsub!(/([a-z\d]*)/i) do |match|
                    
134        "#{inflections.acronyms[match] || match.downcase}"
                    
163    def titleize(word)
                    
164      humanize(underscore(word)).gsub(/\b(?<!['’`])[a-z]/) { |match| match.capitalize }
                    
165    end
                    
                
mongoid.rb https://github.com/victorbv/rails_admin.git | Ruby | 390 lines
                    
110            :length => nil,
                    
111            :pretty_name => field.name.to_s.gsub('_', ' ').strip.capitalize,
                    
112            :nullable? => true,
                    
289        if !nested && [:embeds_one, :embeds_many].include?(association.macro.to_sym)
                    
290          raise <<-MSG.gsub(/^\s+/, '')
                    
291          Embbeded association without accepts_nested_attributes_for can't be handled by RailsAdmin,
                    
                
tag_set_nominations_controller.rb https://github.com/sarken/otwarchive.git | Ruby | 365 lines
                    
301        # fix back the tagname if it has [] brackets -- see _review_individual_nom for details
                    
302        name = name.gsub('#LBRACKET', '[').gsub('#RBRACKET', ']')
                    
303        if TagSet::TAG_TYPES_INITIALIZABLE.include?(type)
                    
                
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)
                    
                
resource.h https://gitlab.com/twindev/tortoisegit | C Header | 282 lines
                    
115#define IDS_MENUDESCSVNFETCH            210
                    
116#define IDS_MENULOGSUBMODULE            211
                    
117#define IDS_MENUUNDOADD                 212
                    
                
cyanobase.R https://gitlab.com/raim/genomeBrowser | R | 324 lines
                    
68                  header=FALSE)
                    
69cat <- apply(cat, 2, function(x) gsub("&amp;","&",gsub("&#x27;","'",x)))
                    
70
                    
70
                    
71catstr <- unlist(gsub(";$","",apply(cat[match(cyan[,"ID"],cat[,"V1"]),
                    
72                                        c("V3","V5")],1,
                    
79colnames(go) <- c("uniprot","cyanobaseID","go")
                    
80go$cyanobaseID <- gsub("syn:","",go$cyanobaseID)
                    
81## extract all GO terms & descriptions
                    
83god <- got <- unique(unlist(got))
                    
84got <- sapply(got, function(x) gsub("\\]","",gsub(".*\\[","",x)))
                    
85god <- sapply(god, function(x) trimws(gsub("\\[.*","",x)))
                    
94got <- strsplit(go$go,";")
                    
95got <- lapply(got, function(x) gsub("\\]","",gsub(".*\\[","",x)))
                    
96got <- unlist(lapply(got, paste0, collapse=";"))
                    
                
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
                    
                
hb-ot-layout.cc https://github.com/zpao/v8monkey.git | C++ | 504 lines
                    
50
                    
51  layout->gsub_blob = Sanitizer<GSUB>::sanitize (hb_face_reference_table (face, HB_OT_TAG_GSUB));
                    
52  layout->gsub = Sanitizer<GSUB>::lock_instance (layout->gsub_blob);
                    
77{
                    
78  return likely (face->ot_layout && face->ot_layout->gsub) ? *face->ot_layout->gsub : Null(GSUB);
                    
79}
                    
408  ASSERT_STATIC (Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_NO_FEATURE_INDEX);
                    
409  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
                    
410  const LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
                    
433{
                    
434  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
                    
435  const Feature &f = g.get_feature (feature_index);
                    
447{
                    
448  return &_get_gsub (face) != &Null(GSUB);
                    
449}
                    
                
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))
                    
                
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;
                    
                
text_helper.rb https://github.com/lutvi-r/canvas-lms.git | Ruby | 333 lines
                    
21    text ||= ""
                    
22    text.gsub(/<\/?[^>\n]*>/, "").gsub(/&#\d+;/) {|m| puts m; m[2..-1].to_i.chr rescue '' }.gsub(/&\w+;/, "")
                    
23  end
                    
64    placeholder_blocks = []
                    
65    message = message.gsub(AUTO_LINKIFY_REGEX) do |match|
                    
66      placeholder_blocks << if match == AUTO_LINKIFY_PLACEHOLDER
                    
82    # now put the links back in
                    
83    message = message.gsub(AUTO_LINKIFY_PLACEHOLDER) do |match|
                    
84      placeholder_blocks.shift
                    
86
                    
87    message = message.gsub(/\r?\n/, "<br/>\r\n")
                    
88    processed_lines = []
                    
155    indentation = " " * spaces
                    
156    text.gsub(/\n/, "\n#{indentation}")
                    
157  end
                    
                
parser.rb https://github.com/rfrankel/bostonrb.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]]
                    
                
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);
                    
                
aviary_fx.rb https://github.com/aviaryapi/AviaryFxRuby.git | Ruby | 478 lines
                    
160
                    
161      return Nokogiri::XML(builder.to_xml).root.to_s.gsub(/\n  /, "").gsub(/\n/, "")
                    
162
                    
                
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
                    
                
Callbacks.html https://github.com/jparker/api-doc-mirror.git | HTML | 387 lines
                    
98    before_validation(:on =&gt; :create) do
                    
99      self.number = number.gsub(/[^0-9]/, &quot;&quot;) if attribute_present?(&quot;number&quot;)
                    
100    end
                    
                
message.tcl https://github.com/cognovis/project-open.git | TCL | 410 lines
                    
264	# Remove special TCL characters
                    
265	regsub -all {\$} $title {&#36;} title
                    
266	regsub -all {\[} $title {&#91;} title
                    
266	regsub -all {\[} $title {&#91;} title
                    
267	regsub -all {\]} $title {&#93;} title
                    
268
                    
                
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	},
                    
                
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
                    
                
generator.rb https://github.com/realityforge/gwt-contacts.git | Ruby | 209 lines
                    
27                        "#{Domgen::Generator::Imit::TEMPLATE_DIRECTORY}/graph_enum.java.erb",
                    
28                        'main/java/#{repository.imit.qualified_graph_enum_name.gsub(".","/")}.java',
                    
29                        Domgen::Generator::Imit::HELPERS)
                    
35                        "#{Domgen::Generator::Imit::TEMPLATE_DIRECTORY}/entity.java.erb",
                    
36                        'main/java/#{entity.imit.qualified_name.gsub(".","/")}.java',
                    
37                        Domgen::Generator::Imit::HELPERS)
                    
40                        "#{Domgen::Generator::Imit::TEMPLATE_DIRECTORY}/mapper.java.erb",
                    
41                        'main/java/#{data_module.imit.qualified_mapper_name.gsub(".","/")}.java',
                    
42                        Domgen::Generator::Imit::HELPERS)
                    
45                        "#{Domgen::Generator::Imit::TEMPLATE_DIRECTORY}/data_loader_service.java.erb",
                    
46                        'main/java/#{repository.imit.qualified_data_loader_service_name.gsub(".","/")}.java',
                    
47                        Domgen::Generator::Imit::HELPERS)
                    
50                        "#{Domgen::Generator::Imit::TEMPLATE_DIRECTORY}/data_loader_service_interface.java.erb",
                    
51                        'main/java/#{repository.imit.qualified_data_loader_service_interface_name.gsub(".","/")}.java',
                    
52                        Domgen::Generator::Imit::HELPERS)
                    
                
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://gitlab.com/MarcuSacramento/ferramentas | Ruby | 472 lines
                    
126            if m = value.match(QUOTE_REGEXP_SQ)
                    
127              scanned << m[1].gsub(/\\(.)/, '\\1')
                    
128              value = m.post_match
                    
133            if m = value.match(QUOTE_REGEXP_DQ)
                    
134              scanned << m[1].gsub(/""/, '').gsub(/\\(.)/, '\\1')
                    
135              value = m.post_match
                    
227        if line = io.gets
                    
228          line.gsub(/[\r\n]*/, '')
                    
229        end
                    
                
typeahead.js https://gitlab.com/Ronconi/MEAN-Skeleton | JavaScript | 331 lines
                    
120
                    
121          // Let ngSubmit pass if the typeahead tip is hidden or no option is selected
                    
122          if ($typeahead.$isVisible() && !(evt.keyCode === 13 && scope.$activeIndex === -1)) {
                    
                
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
                    
                
url.lua https://gitlab.com/kokeiro001/YamabiYagiNoHoko | Lua | 297 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
                    
                
congruify.R https://bitbucket.org/jonathaneastman/geiger.git | R | 389 lines
                    
2	.split_lab=function(label){
                    
3		lab=gsub(".", "_", label, fixed=TRUE)
                    
4		lab=gsub(" ", "_", lab, fixed=TRUE)
                    
                
MatchScoutingPanel.java https://github.com/FRC-Team-1160/1160-Scouting-App.git | Java | 370 lines
                    
143        JButton weightingSubmit = new JButton("submit"), weightingClear = new JButton("reset");
                    
144        weightingSubmit.addActionListener(this.new WeightingSubmit());
                    
145        weightingClear.addActionListener(this.new WeightingClear());
                    
155        this.elementButtonPanel.add(elementClear);
                    
156        this.weightingButtonPanel.add(weightingSubmit);
                    
157        this.weightingButtonPanel.add(weightingClear);
                    
332
                    
333        class WeightingSubmit implements ActionListener{
                    
334
                    
                
sqlsrv.php https://gitlab.com/wendy-du-973/club-invest-gr2 | PHP | 429 lines
                    
145 * @param string $setting The name of the setting to set. The possible values are
                    
146 * "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity".
                    
147 * @param mixed $value The value of the specified setting. The following table shows possible values:
                    
162 *
                    
163 * LogSubsystems
                    
164 * SQLSRV_LOG_SYSTEM_ALL (-1)
                    
                
scrubbers.rb https://gitlab.com/gitnyasha/zimcreative | Ruby | 298 lines
                    
270        if node.type == Nokogiri::XML::Node::TEXT_NODE || node.type == Nokogiri::XML::Node::CDATA_SECTION_NODE
                    
271          node.content = node.content.gsub(/\u2028|\u2029/, "")
                    
272        end
                    
                
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
                    
                
path.lua https://github.com/torch/torch7-distro.git | Lua | 395 lines
                    
252   if name then
                    
253      name = name:gsub(dir.separator, ".")
                    
254      local init = name:match("(.*)%.init$")
                    
260      if name then
                    
261         name = name:gsub(dir.separator, ".")
                    
262      end
                    
264   if not name then name = file end
                    
265   name = name:gsub("^%.+", ""):gsub("%.+$", "")
                    
266   return name
                    
274   assert(type(mod) == "string")
                    
275   return (mod:gsub("[^.]*$", ""):gsub("%.", dir.separator))
                    
276end
                    
303   local rest = file:sub(#prefix+1):gsub("^/*", "")
                    
304   local name_version = (name.."_"..version):gsub("%-", "_"):gsub("%.", "_")
                    
305   return dir.path(prefix, name_version.."-"..rest)
                    
                
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
                    
                
package-frame.html https://github.com/ianw/bottomupcs.git | HTML | 148 lines
                    
68<BR>
                    
69<A HREF="GlyphPositioningSubtable.html" title="class in org.apache.fop.complexscripts.fonts" target="classFrame">GlyphPositioningSubtable</A>
                    
70<BR>
                    
                
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")
                    
                
site_template.php https://gitlab.com/Rad1calDreamer/honey | PHP | 414 lines
                    
53							__IncludeLang($fname, false, true);
                    
54						elseif(file_exists(($fname = $path."/".$file."/lang/".LangSubst(LANGUAGE_ID)."/description.php")))
                    
55							__IncludeLang($fname, false, true);
                    
                
jpgtest.cxx https://gitlab.com/f3822/qtwebengine-chromium | C++ | 392 lines
                    
56void dotest(unsigned char *srcbuf, int w, int h, BMPPIXELFORMAT pf, int bu,
                    
57	int jpegsub, int qual, char *filename, int dotile, int useppm, int quiet)
                    
58{
                    
80	if(!quiet) printf("\n>>>>>  %s (%s) <--> JPEG %s Q%d  <<<<<\n", _pfname[pf],
                    
81		bu?"Bottom-up":"Top-down", _subnamel[jpegsub], qual);
                    
82	if(dotile) {tilesizex=tilesizey=4;}  else {tilesizex=w;  tilesizey=h;}
                    
107		if(quiet) printf("%s\t%s\t%s\t%d\t",  _pfname[pf], bu?"BU":"TD",
                    
108			_subnamel[jpegsub], qual);
                    
109		for(i=0; i<h; i++) memcpy(&rgbbuf[pitch*i], &srcbuf[w*ps*i], w*ps);
                    
115		_catch(tjCompress(hnd, rgbbuf, tilesizex, pitch, tilesizey, ps,
                    
116			jpegbuf[0], &comptilesize[0], jpegsub, qual, flags));
                    
117		ITER=0;
                    
127					_catch(tjCompress(hnd, &rgbbuf[pitch*i+j*ps], tempw, pitch,
                    
128						temph, ps, jpegbuf[tilen], &comptilesize[tilen], jpegsub, qual,
                    
129						flags));
                    
                
RemotingSubsystemProviders.java https://github.com/pepite/jboss-as.git | Java | 253 lines
                    
67 */
                    
68class RemotingSubsystemProviders {
                    
69
                    
69
                    
70    static final String RESOURCE_NAME = RemotingSubsystemProviders.class.getPackage().getName() + ".LocalDescriptions";
                    
71
                    
                
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
                    
                
test_imap_response_parser.rb https://gitlab.com/leduc1984/ruby | Ruby | 279 lines
                    
24      $SAFE = 1
                    
25      parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
                    
26* LIST (\\HasChildren) "." "INBOX"
                    
35      3.times do |i|
                    
36      parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
                    
37* LIST (\\Foo#{i}) "." "INBOX"
                    
41    assert_raise(Net::IMAP::FlagCountError) do
                    
42      parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
                    
43* LIST (\\Foo3) "." "INBOX"
                    
51      100.times do
                    
52      parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
                    
53* LIST (\\Foo) "." "INBOX"
                    
60    parser = Net::IMAP::ResponseParser.new
                    
61	response = parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
                    
62* XLIST (\\Inbox) "." "INBOX"
                    
                
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();
                    
                
rdoc.rb https://gitlab.com/klauer/ruby | Ruby | 500 lines
                    
233    # read and strip comments
                    
234    patterns = File.read(filename).gsub(/#.*/, '')
                    
235
                    
                
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;
                    
                
host.go https://gitlab.com/adotout/gcc | Go | 407 lines
                    
133	port := "80"
                    
134	if matches := trailingPort.FindStringSubmatch(req.Host); len(matches) != 0 {
                    
135		port = matches[1]
                    
                
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    {
                    
                
mapSolver_patterns.lua https://gitlab.com/Aconitin/TowerDefense | Lua | 296 lines
                    
1prepend = (...):gsub('%.[^%.]+$', '') .. "."
                    
2local basic = require(prepend .. "mapSolver_basic")
                    
                
 

Source

Language