PageRenderTime 418ms queryTime 39ms sortTime 130ms getByIdsTime 109ms findMatchingLines 16ms

100+ results results for 'gsub repo:tifan/elinks' (418 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
                    
                
symbols.c https://gitlab.com/janneke/guile | C | 563 lines
                    
33#include "fluids.h"
                    
34#include "gsubr.h"
                    
35#include "hash.h"
                    
                
methods.rb https://github.com/eparreno/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
                    
                
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{
                    
                
callbacks.rb https://github.com/n8/rails.git | Ruby | 362 lines
                    
32  #     def before_validation_on_create
                    
33  #       self.number = number.gsub(/[^0-9]/, "") if attribute_present?("number")
                    
34  #     end
                    
                
html_output_buffer.rb https://github.com/wallyqs/org-ruby.git | Ruby | 430 lines
                    
147        when (current_mode == :html or current_mode == :raw_text)
                    
148          @buffer.gsub!(/\A\n/, "") if @new_paragraph == :start
                    
149          @new_paragraph = true
                    
251    def escape_string! str
                    
252      str.gsub!(/&/, "&amp;")
                    
253      # Escapes the left and right angular brackets but construction
                    
254      # @@html:<text>@@ which is formatted to <text>
                    
255      str.gsub! /<([^<>\n]*)/ do |match|
                    
256        ($`[-7..-1] == "@@html:" and $'[0..2] == ">@@") ? $& : "&lt;#{$1}"
                    
257      end
                    
258      str.gsub! /([^<>\n]*)>/ do |match|
                    
259        $`[-8..-1] == "@@html:<" ? $& : "#{$1}&gt;"
                    
260      end
                    
261      str.gsub! /@@html:(<[^<>\n]*>)@@/, "\\1"
                    
262    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)
                    
                
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
                    
                
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;
                    
                
html.rb https://github.com/roguedev/Jeanine-Ann-Lenertz.git | Ruby | 399 lines
                    
98          if el.attr['class'].to_s =~ /\bshow-whitespaces\b/
                    
99            result.gsub!(/(?:(^[ \t]+)|([ \t]+$)|([ \t]+))/) do |m|
                    
100              suffix = ($1 ? '-l' : ($2 ? '-r' : ''))
                    
                
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            // 
                    
                
boss_ragnaros.cpp https://github.com/ShadowCore/ShadowCore.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;
                    
                
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
                    
                
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    }
                    
                
test_filehandler.rb https://github.com/abdollar/ruby.git | Ruby | 403 lines
                    
35    END_OF_REQUEST
                    
36    return StringIO.new(msg.gsub(/^ {6}/, ""))
                    
37  end
                    
                
purell.go https://gitlab.com/unofficial-mirrors/kubernetes-contrib | 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
                    
                
client.rb https://github.com/Abadasoft/vmc.git | Ruby | 471 lines
                    
40    target_url = "http://#{target_url}" unless /^https?/ =~ target_url
                    
41    target_url = target_url.gsub(/\/+$/, '')
                    
42    @target = target_url
                    
153    check_login_status
                    
154    path = path.gsub('//', '/')
                    
155    url = path(VMC::APPS_PATH, name, "instances", instance, "files", path)
                    
452    if parsed_body && parsed_body[:code] && parsed_body[:description]
                    
453      desc = parsed_body[:description].gsub("\"","'")
                    
454      "Error #{parsed_body[:code]}: #{desc}"
                    
                
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
                    
                
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
                    
                
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        {
                    
                
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
                    
                
gmap.rb https://github.com/antond/cartographer.git | Ruby | 312 lines
                    
93    html << "<!-- end of cartographer code -->" if @debug
                    
94    return @debug ? html.join("\n") : html.join.gsub(/\s+/, ' ')
                    
95  end
                    
242    end
                    
243    return @debug ? html.join("\n") : html.join.gsub(/\s+/, ' ')
                    
244  end
                    
                
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)
                    
                
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
                    
                
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 ">"
                    
                
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
                    
                
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
                    
                
basic.rb https://github.com/tf/thor.git | Ruby | 306 lines
                    
149        paras.map! do |unwrapped|
                    
150          unwrapped.strip.gsub(/\n/, " ").squeeze(" ").
                    
151          gsub(/.{1,#{width}}(?:\s|\Z)/){($& + 5.chr).
                    
151          gsub(/.{1,#{width}}(?:\s|\Z)/){($& + 5.chr).
                    
152          gsub(/\n\005/,"\n").gsub(/\005/,"\n")}
                    
153        end
                    
                
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
                    
                
main.go https://bitbucket.org/ymotongpoo/github-keys.git | Go | 333 lines
                    
76			}
                    
77			match := UsernameRe.FindStringSubmatch(href)
                    
78			if len(match) == 2 {
                    
                
language.rb https://github.com/grosser/language_sniffer.git | Ruby | 345 lines
                    
295    def default_alias_name
                    
296      name.downcase.gsub(/\s/, '-')
                    
297    end
                    
                
course_info.inc.php https://bitbucket.org/frchico/chamilo_openshift.git | PHP | 139 lines
                    
63$langLastVisit = "Latest visit";
                    
64$langSubscription = "Subscription";
                    
65$langCourseAccess = "Course access";
                    
                
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
                    
                
parser.rb https://github.com/jjuglans/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]]
                    
                
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	}
                    
                
llpanelsnapshotpostcard.cpp https://bitbucket.org/3das/3dasviewer.git | C++ | 270 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;
                    
                
Audio.c https://github.com/davidk/lufa-lib.git | C | 247 lines
                    
171		if ((Interface->Class    == AUDIO_CSCP_AudioClass) &&
                    
172		    (Interface->SubClass == AUDIO_CSCP_AudioStreamingSubclass) &&
                    
173		    (Interface->Protocol == AUDIO_CSCP_StreamingProtocol))
                    
                
store.rb https://github.com/sebasdiaz/alquiler.git | Ruby | 362 lines
                    
219    method_name = if ''.respond_to? :ord then
                    
220                    method_name.gsub(/\W/) { "%%%02x" % $&[0].ord }
                    
221                  else
                    
221                  else
                    
222                    method_name.gsub(/\W/) { "%%%02x" % $&[0] }
                    
223                  end
                    
                
exceptions.rb https://github.com/opscode/omnibus.git | Ruby | 354 lines
                    
289
                    
290      timeout = cmd.timeout.to_s.reverse.gsub(/...(?=.)/, '\&,').reverse
                    
291
                    
                
DefaultLocalizationStrategy.h https://bitbucket.org/zenoalbisser/webkit.git | C Header | 189 lines
                    
109    virtual String contextMenuItemTagCorrectSpellingAutomatically();
                    
110    virtual String contextMenuItemTagSubstitutionsMenu();
                    
111    virtual String contextMenuItemTagShowSubstitutions(bool show);
                    
                
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  }
                    
                
rakefile https://github.com/mcskrzypczak/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 ***
                    
                
orders.lua https://github.com/warmist/dfhack.git | Lua | 266 lines
                    
48local function normalize_whitespace(str)
                    
49    return str:gsub('%s+', ' '):trim()
                    
50end
                    
264    expect.eq(CR_OK, status)
                    
265    expect.str_find(BACKUP_FILE_NAME:gsub('%-', '%%-'), output)
                    
266end
                    
                
firefox_install_addon.rb https://bitbucket.org/opexxx/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
                    
                
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)
                    
                
inflections.rb https://github.com/bublanina/masterlanguage.git | Ruby | 212 lines
                    
135      else
                    
136        inflections.plurals.each { |(rule, replacement)| break if result.gsub!(rule, replacement) }
                    
137        result
                    
154      else
                    
155        inflections.singulars.each { |(rule, replacement)| break if result.gsub!(rule, replacement) }
                    
156        result
                    
169      inflections.humans.each { |(rule, replacement)| break if result.gsub!(rule, replacement) }
                    
170      result.gsub(/_id$/, "").gsub(/_/, " ").capitalize
                    
171    end
                    
182    def titleize(word)
                    
183      humanize(underscore(word)).gsub(/\b('?[a-z])/) { $1.capitalize }
                    
184    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
                    
                
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)
                    
                
money.rb https://github.com/turn2/apocryphal_antelope.git | Ruby | 299 lines
                    
238    # Commify ("10000" => "10,000")
                    
239    formatted.gsub!(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/,'\1,\2')
                    
240
                    
                
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) {
                    
                
function.markdown https://github.com/djm68/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
                    
                
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
                    
                
candies_controller.rb https://github.com/stevesng/Spotcandy.git | Ruby | 297 lines
                    
89    if @candy.is_candy && !candy_photos.empty?
                    
90      candy_current_photo = @candy.data['photo'].gsub('userpix_thumbs', 'userpix')
                    
91      
                    
103    if refresh_photo
                    
104      pic = @candy.data['photo'].gsub('userpix_thumbs', 'userpix')
                    
105      thumbnail = @candy.data['photo']
                    
                
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
                    
                
ocaml.rb https://github.com/nakao/langscan.git | Ruby | 298 lines
                    
52      def denormalize(str)
                    
53        str.gsub(/([^\\])\\o/,'\1'+"\n")
                    
54      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}
                    
                
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
                    
                
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
                    
                
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/, '')
                    
                
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
                    
                
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>
                    
                
inflector_test.rb https://github.com/awscloudtest/rails.git | Ruby | 316 lines
                    
116    StringToParameterized.each do |some_string, parameterized_string|
                    
117      assert_equal(parameterized_string.gsub('-', '_'), ActiveSupport::Inflector.parameterize(some_string, '_'))
                    
118    end
                    
122    StringToParameterized.each do |some_string, parameterized_string|
                    
123      assert_equal(parameterized_string.gsub('-', '__sep__'), ActiveSupport::Inflector.parameterize(some_string, '__sep__'))
                    
124    end
                    
                
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
                    
                
 

Source

Language