100+ results results for 'gsub repo:lokkju/openpli-oe' (173 ms)
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_spredefhd.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 3flashgetdownloader.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( "" );symbols.c https://codeberg.org/gradusadparnassum/guile.git | C | 563 lines
33#include "fluids.h" 34#include "gsubr.h" 35#include "hash.h"read_surfaces.R https://bitbucket.org/lachlancoin/proteomics_variable_selection.git | R | 525 lines
45 col.name<-paste(lastnme(surfaces[s]),lastnme(ranges[r]),sep="_") 46 col.name<-gsub(" ", "_", col.name) 47 col.name<-gsub("High", "H", col.name) 47 col.name<-gsub("High", "H", col.name) 48 col.name<-gsub("Low", "L", col.name) 49 col.name<-gsub("_range", "", col.name) 147 if(filter.tophalf){ 148 fsingle<-gsub("range/","range/res-",fname) 149 fsingle<-gsub("csv","txt",fsingle) 248colnames = colnames(matrix) 249colnames(matrix) = gsub(toreplace, "",colnames) 250#print(colnames(matrix)) 353 ratios = data.frame(t(apply(train$data,2,ratio, train$y, logtransform))) 354 names(ratios) = c(paste("mean",gsub(",", "",classes)), "diff") 355 list(test=test,train=train, combined = combined, classes = classes, train.index =train.index, ratios = ratios)callbacks.rb https://github.com/luke0x/rails.git | Ruby | 362 lines
32 # def before_validation_on_create 33 # self.number = number.gsub(/[^0-9]/, "") if attribute_present?("number") 34 # endtest_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/project1remixoscope.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 = truemain_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" 326railtie.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 endtemplate_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 endjuce_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 687endcontroller_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 endfilesys.rb https://github.com/ecin/hobix.git | Ruby | 416 lines
175 else 176 entry_path = path.gsub( /^#{ Regexp::quote( @basepath ) }\/?/, '' ) 177 next if entry_path !~ /\.#{ Regexp::quote( extension ) }$/GraphicsUtilities.m http://networkpx.googlecode.com/svn/trunk/ | Objective C | 340 lines
72 CGRect bgSubRect) { 73 GUCreateContext(c, bgSubRect.size.width, bgSubRect.size.height); 74 CGImageRef subimage = NULL; 75 if (background != NULL) { 76 if (bgSubRect.size.width == CGImageGetWidth(background) && bgSubRect.size.height == CGImageGetHeight(background)) 77 subimage = CGImageRetain(background); 79 subimage = CGImageCreateWithImageInRect(background, bgSubRect); 80 CGContextDrawImage(c, CGRectMake(0, 0, bgSubRect.size.width, bgSubRect.size.height), subimage); 81 }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(); 237codon.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 }boss_ragnaros.cpp https://gitlab.com/IDGSAMPM/WoWSource434.git | C++ | 353 lines
51 SPELL_SONS_OF_FLAME_DUMMY = 21108, // Server side effect 52 SPELL_RAGSUBMERGE = 21107, // Stealth aura 53 SPELL_RAGEMERGE = 20568, 268 _isBanished = true; 269 //DoCast(me, SPELL_RAGSUBMERGE); 270 _emergeTimer = 90000; 282 _isBanished = true; 283 //DoCast(me, SPELL_RAGSUBMERGE); 284 _emergeTimer = 90000;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(/>/, " >")forums.lua http://facepunch-lua-sdk.googlecode.com/svn/trunk/ | Lua | 261 lines
169 170 -- need to specify base, otherwise it takes the second return value for gsub 171 retForum.threadCount = tonumber( string.gsub( threadCount, ",", "" ), 10 ) 171 retForum.threadCount = tonumber( string.gsub( threadCount, ",", "" ), 10 ) 172 retForum.postCount = tonumber( string.gsub( postCount, ",", "" ), 10 ) 173 174 retForum.forumName = forumName 175 retForum.viewers = tonumber( string.gsub( viewers, ",", "" ), 10 ) 176 retForum.forumDescription = forumDescription 253 thread.lastPostURL = lastPostURL 254 thread.replyCount = tonumber( string.gsub( replies, ",", "" ), 10 ) 255 thread.viewCount = tonumber( string.gsub( views, ",", "" ), 10 )mathematics.py git://github.com/sublee/trueskill.git | Python | 260 lines
8 9 :copyright: (c) 2012-2016 by Heungsub Lee. 10 :license: BSD, see LICENSE for more details.bili_ranking_image.rb http://bilibiliranking.googlecode.com/svn/trunk/ | Ruby | 208 lines
126 work = Work.find_by_wid d.wid 127 d_name = @@iconv.iconv(d.name).gsub(/\"/,'\\"') 128 img = ImageList.new(pa + '3_list2\\_model.png') if e_i.zero?platform_font_pango.cc https://bitbucket.org/kennethendfinger/chromium.git | C++ | 440 lines
79 80 FcConfigSubstitute(0, pattern, FcMatchPattern); 81 FcDefaultSubstitute(pattern);base.rb https://github.com/chetan/yahoo_sports.git | Ruby | 435 lines
43 HTMLEntities.new.decode( 44 html.gsub(/<.+?>/,''). 45 gsub(/ /,' '). 45 gsub(/ /,' '). 46 gsub(/&/,'&'). 47 gsub(/"/,'"'). 47 gsub(/"/,'"'). 48 gsub(/</,'<'). 49 gsub(/>/,'>'). 49 gsub(/>/,'>'). 50 gsub(/&ellip;/,'...'). 51 gsub(/'/, "'"). 51 gsub(/'/, "'"). 52 gsub(/<br *\/>/m, '') 53 ).stripdry_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(',')) 115SequencesTest.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 ) returnbinutils-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 wrappersproperties.spform.php https://github.com/BobRay/SPForm.git | PHP | 661 lines
341array( 342 'name'=>'logSubjectLen', 343 'desc'=>'spf_logsubjectlen_desc',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 33llpanelsnapshotpostcard.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;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 endconfig.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_hashtable.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 endsendmail.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 "" bccLogRecorder.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();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 {page.rb https://github.com/ryanfortin/qmpass.git | Ruby | 316 lines
197 n.sub!(/^(.+?)Page$/, '\1') 198 n.gsub!(/([A-Z])/, ' \1') 199 n.strip 281 def clean_url(url) 282 "/#{ url.strip }/".gsub(%r{//+}, '/') 283 endvalidate_numericality_of_matcher.rb https://github.com/qoobaa/sms.git | Ruby | 214 lines
154 message << NUMERIC_COMPARISIONS.map do |key| 155 @options[key] ? "#{key.to_s.gsub('_', ' ')} #{@options[key]} " : nil 156 end.compact.join('or ')default.html.haml https://github.com/churchio/onebody.git | Haml | 195 lines
7 - if @title.present? 8 == | #{@title.gsub(/<.+?>/, '').html_safe} 9 %meta{ content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no', name: 'viewport' }view_test.rb https://github.com/karthikeyan7585/adva_cms.git | Ruby | 278 lines
61 HTML 62 expected.strip!.gsub!(/\s{2,}/, ' ') 63abingo.rb https://github.com/ryanb/railscasts-episodes.git | Ruby | 225 lines
69 70 short_circuit = Abingo.cache.read("Abingo::Experiment::short_circuit(#{test_name})".gsub(" ", "_")) 71 unless short_circuit.nil? 75 unless Abingo::Experiment.exists?(test_name) 76 lock_key = test_name.gsub(" ", "_") 77 if Abingo.cache.exist?(lock_key) 132 else #Could be a test name or conversion name. 133 conversion_name = name.gsub(" ", "_") 134 tests_listening_to_conversion = Abingo.cache.read("Abingo::tests_listening_to_conversion#{conversion_name}") 189 def self.retrieve_alternatives(test_name, alternatives) 190 cache_key = "Abingo::Experiment::#{test_name}::alternatives".gsub(" ","_") 191 alternative_array = self.cache.fetch(cache_key) do 209 def self.score_conversion!(test_name) 210 test_name.gsub!(" ", "_") 211 participating_tests = Abingo.cache.read("Abingo::participating_tests::#{Abingo.identity}") || []quote-purchase-order.component.html https://bitbucket.org/inderjitsi/test-mean-app.git | HTML | 159 lines
7 </div> 8<form [formGroup]="poForm" (ngSubmit)="onSubmit()" class="" novalidate> 9<div class="wrapper wrapper-content animated fadeInRight">message-chunks.rb https://github.com/shenson/sup.git | Ruby | 271 lines
110 text = text.transcode(encoded_content.charset || $encoding) 111 @lines = text.gsub("\r\n", "\n").gsub(/\t/, " ").gsub(/\r/, "").split("\n") 112 @quotable = truemarc_document.rb https://github.com/rsinger/The-Visible-Kilgour.git | Ruby | 316 lines
36 lccn = marc['010']['a'] 37 lccn.gsub(/\s/,'') 38 endtest_zenweb_plugins_markdown.rb https://github.com/seattlerb/zenweb.git | Ruby | 298 lines
295 def cleanup indent = 4 296 self.gsub(/^\ {#{indent}}/, '').chomp 297 endsimple.rb https://github.com/adambair/spacetrader.git | Ruby | 193 lines
54 55 format.gsub!(/%a/, translate(locale, :"date.abbr_day_names")[object.wday]) 56 format.gsub!(/%A/, translate(locale, :"date.day_names")[object.wday]) 56 format.gsub!(/%A/, translate(locale, :"date.day_names")[object.wday]) 57 format.gsub!(/%b/, translate(locale, :"date.abbr_month_names")[object.mon]) 58 format.gsub!(/%B/, translate(locale, :"date.month_names")[object.mon]) 58 format.gsub!(/%B/, translate(locale, :"date.month_names")[object.mon]) 59 format.gsub!(/%p/, translate(locale, :"time.#{object.hour < 12 ? :am : :pm}")) if object.respond_to? :hour 60 object.strftime(format) 122 123 string = string.gsub(/%d/, '{{count}}').gsub(/%s/, '{{value}}') 124 if string.respond_to?(:force_encoding)Filtering.lua https://bitbucket.org/sylvanaar2/prat-3.0 | Lua | 295 lines
155local function cleanText(msg, author) 156 local cleanmsg = msg:gsub("...hic!",""):gsub("%d",""):gsub("%c",""):gsub("%p",""):gsub("%s",""):upper():gsub("SH","S"); 157 return (author and author:upper() or "") .. cleanmsg;zonefile.rb https://github.com/zarqman/dns-zonefile.git | Ruby | 315 lines
82 def #{attrib}=(val) 83 @#{attrib} = val.gsub('@', @vars['origin']) 84 end 97 else 98 @#{attrib} = val.gsub('@', @vars['origin']) 99 endterminal.rb https://github.com/lamikae/Ruby-GSM.git | Ruby | 292 lines
40 unless File.exists?(executable.split(' ')[0]) then 41 response_fn = '/resp/'+script.gsub(/.sh.*/,'').gsub(/\ /,'_').downcase 42 ##logger.debug "File %s does not exist, reading input from file %s" % [script, response_fn] 141 # clean the response; remove all strings (separated by newline) that start with AT but do NOT have ':' 142 response.gsub!(/^AT[^:]*\n/,'') 143 # remove BOOT and RSSI strings 143 # remove BOOT and RSSI strings 144 response.gsub!(/\^BOOT.*\n|\^RSSI.*\n/,'') 145bbe.lua git://github.com/ksdtech/bbc.git | Lua | 461 lines
173 local f = string.sub(s, fieldstart + 1, i - 1) 174 table.insert(t, (string.gsub(f, '""', '"'))) 175 fieldstart = string.find(s, ',', i) + 1 205 if line == nil then break end 206 line = string.gsub(line, "\r$", "") -- handle CRLF 207 if lno == 0 then 235 if line == nil then break end 236 line = string.gsub(line, "\r$", "") -- handle CRLF 237 if lno == 0 thenconfiguration.jsp git://github.com/liferay/liferay-portal.git | JavaServer Pages | 294 lines
43 <liferay-ui:error key="emailOrderShippingBody" message="please-enter-a-valid-body" /> 44 <liferay-ui:error key="emailOrderShippingSubject" message="please-enter-a-valid-subject" /> 45 <liferay-ui:error key="emailOrderConfirmationBody" message="please-enter-a-valid-body" /> 255 emailParam="emailOrderShipping" 256 emailSubject="<%= shoppingGroupServiceOverriddenConfiguration.getEmailOrderShippingSubjectXml() %>" 257 />url.lua http://msg-pthreads.googlecode.com/svn/trunk/ | Lua | 298 lines
28function escape(s) 29 return string.gsub(s, "([^A-Za-z0-9_])", function(c) 30 return string.format("%%%02x", string.byte(c)) 57local function protect_segment(s) 58 return string.gsub(s, "([^A-Za-z0-9_])", function (c) 59 if segment_set[c] then return c 71function unescape(s) 72 return string.gsub(s, "%%(%x%x)", function(hex) 73 return string.char(base.tonumber(hex, 16)) 86 if string.sub(relative_path, 1, 1) == "/" then return relative_path end 87 local path = string.gsub(base_path, "[^/]*$", "") 88 path = path .. relative_path 88 path = path .. relative_path 89 path = string.gsub(path, "([^/]*%./)", function (s) 90 if s ~= "./" then return s else return "" endinput_type.h git://github.com/chromium/chromium.git | C Header | 282 lines
82 virtual void AppendToFormData(FormData&) const; 83 virtual String ResultForDialogSubmit() const; 84LibPeriodicTable-3.1.lua https://code.google.com/p/strongcwowinterface/ | Lua | 371 lines
71 -- Escape characters that will screw up the name matching. 72 local escapedparentname = parentname:gsub("([%.%(%)%%%+%-%*%?%[%]%^%$])", "%%%1") 73 -- Check all the sets to see if they start with this name.ruby1e1.rb https://github.com/sakoht/RMI.git | Ruby | 270 lines
89 # occur. It also makes Data::Dumper results more readable. 90 target_class_name = 'RMI::ProxyObject::' + remote_class #gsub(':','') 91 target_class = @@proxy_subclasses[target_class_name]ForceSFV.tcl http://nxscripts.googlecode.com/svn/ | TCL | 130 lines
64proc ArgRange {list start end} { 65 regsub -all {[\s]+} $list { } list 66 return [join [lrange [split [string trim $list] { }] $start $end] { }] 88proc SplitPath {path} { 89 regsub -all -- {[\\/]+} $path {/} path 90 return [file split [string trim $path "/"]]matheval.c git://pkgs.fedoraproject.org/libmatheval | C | 367 lines
42#ifdef HAVE_SCM_MAKE_GSUBR 43#define scm_c_define_gsubr scm_make_gsubr 44#else 44#else 45#error Neither scm_c_define_gsubr() nor scm_make_gsubr() available 46#endif 78 /* Register other procedures working on evaluator type. */ 79 scm_c_define_gsubr("evaluator-create", 1, 0, 0, 80 (SCM(*)())evaluator_create_scm); 80 (SCM(*)())evaluator_create_scm); 81 scm_c_define_gsubr("evaluator-evaluate", 4, 0, 0, 82 (SCM(*)())evaluator_evaluate_scm); 82 (SCM(*)())evaluator_evaluate_scm); 83 scm_c_define_gsubr("evaluator-get-string", 1, 0, 0, 84 (SCM(*)())evaluator_get_string_scm);cascade_resolver.h git://github.com/chromium/chromium.git | C Header | 127 lines
24 25class CSSPendingSubstitutionValue; 26 111 112 // A very simple cache for CSSPendingSubstitutionValues. We cache only the 113 // most recently parsed CSSPendingSubstitutionValue, such that consecutive 113 // most recently parsed CSSPendingSubstitutionValue, such that consecutive 114 // calls to ResolvePendingSubstitution with the same value don't need to 115 // do the same parsing job all over again. 119 public: 120 const cssvalue::CSSPendingSubstitutionValue* value = nullptr; 121 HeapVector<CSSPropertyValue, 256> parsed_properties;RemovingSubItemCallEventArgsTest.cs https://HappyQ.svn.codeplex.com/svn | C# | 117 lines
6 /// <summary> 7 ///这是 RemovingSubItemCallEventArgsTest 的测试类,旨在 8 ///包含所有 RemovingSubItemCallEventArgsTest 单元测试 10 [TestClass()] 11 public class RemovingSubItemCallEventArgsTest 12 { 61 BaseItemContainer<T> itemContainerT = null; // TODO: 初始化为适当的值 62 RemovingSubItemCallEventArgs<T> target = new RemovingSubItemCallEventArgs<T>( removeSubItem, itemContainerT ); // TODO: 初始化为适当的值 63 T actual; 81 BaseItemContainer<T> itemContainerT = null; // TODO: 初始化为适当的值 82 RemovingSubItemCallEventArgs<T> target = new RemovingSubItemCallEventArgs<T>( removeSubItem, itemContainerT ); // TODO: 初始化为适当的值 83 bool expected = false; // TODO: 初始化为适当的值 104 BaseItemContainer<T> itemContainerT = null; // TODO: 初始化为适当的值 105 RemovingSubItemCallEventArgs<T> target = new RemovingSubItemCallEventArgs<T>( removeSubItem, itemContainerT ); 106 Assert.Inconclusive( "TODO: 实现用来验证目标的代码" );config.php https://bitbucket.org/pipehline/mautic-imachine.git | PHP | 214 lines
113 'mautic.asset.configbundle.subscriber' => [ 114 'class' => 'Mautic\AssetBundle\EventListener\ConfigSubscriber', 115 ],luaannotate.lua git://github.com/davidm/lua-annotate.git | Lua | 170 lines
17 --print('DEBUG-luacomment-commit', id, text) 18 text = text:gsub('[\r\n]$', '') 19 annotations[id] = text 118 scite_OnOpen(function(path) 119 local annotations_path = path:gsub('[^\\/]+$', 'annotations.txt') 120 print('DEBUG-luacomment-open', path, annotations_path) 133local function cpp_escape_comment(text) 134 text = text:gsub('%*/', '* /') 135 return text 147 local iline = 1 148 code = (code .. '\n'):gsub('(.-\r?\n)', function(line) 149 if commentofline[iline] then 160if path then 161 local annotations_path = path:gsub('[^\\/]+$', 'annotations.txt') 162 local code = read_file(path)collection.rb git://github.com/stevenbristol/lovd-by-less.git | Ruby | 142 lines
112 113 each_with_attribute method.to_s.gsub(/^each_with_/, ''), &block 114 endLocalTerminalLaunchUtilities.java git://pkgs.fedoraproject.org/eclipse-rse | Java | 305 lines
124 } 125 String expandedLocation = getStringVariableManager().performStringSubstitution(location); 126 if (expandedLocation == null || expandedLocation.length() == 0) { 156 String expandedLocation; 157 expandedLocation = getStringVariableManager().performStringSubstitution(location); 158 if (expandedLocation.length() > 0) { 185 186 String expanded = getStringVariableManager().performStringSubstitution(arguments); 187 return parseStringIntoList(expanded);CopyResources.lua http://angel-engine.googlecode.com/svn/trunk/ | Lua | 144 lines
46 47lfs.chdir(fulljoin(os.getenv('PROJECT_DIR'), '..', 'Angel', 'Scripting', 'EngineScripts'):gsub('"', '')) 48 81 82if (not path.exists(dest:gsub('"', ''))) then 83 makedirs(dest:gsub('"', '')) 88 local dstname = fulljoin(dest, path.basename(filename)) 89 dir.copyfile(filename, dstname:gsub('"', '')) 90 endswank.lua git://github.com/matsu911/swank-lua.git | Lua | 370 lines
233 self.lua_command = (self.lua_command or "") .. '\n' .. args[1] 234 self.lua_command = self.lua_command:gsub("^%s*", ""):gsub("%s*$", "") 235 self.logger(self.lua_command:len(), self.lua_command) 306 else 307 return return_abort_message(double_quote(ret:gsub('"', '\\"')), serial), write_str 308 endcheddargetter_spec.rb git://github.com/ads/cheddargetter.git | Ruby | 234 lines
229 def mock_request(method, request_path, response_xml) 230 request_path.gsub!(/^\//, '') 231 options = { :body => response_xml, :content_type => "text/xml" }ui_text_field.rb git://github.com/clayallsopp/formotion.git | Ruby | 166 lines
118 if BW::Device.ios_version >= "7.0" 119 theTextField.text = theTextField.text.gsub("\u00a0", " ").strip 120 endvote.cgi git://pkgs.fedoraproject.org/alpine | TCL | 191 lines
45 # simplify votes_read by making each entry a single line 46 regsub -all \n $data <br> data 47 puts $fid $i\n$dataprosody_files.lua git://github.com/bjc/prosody.git | Lua | 143 lines
25local function clean_path(path) 26 return path:gsub("\\", "/"):gsub("//+", "/"):gsub("^~", os_getenv("HOME") or "~"); 27end 29 local urlcodes = setmetatable({}, { __index = function (t, k) t[k] = char(tonumber("0x"..k)); return t[k]; end }); 30 decode = function (s) return s and (s:gsub("+", " "):gsub("%%([a-fA-F0-9][a-fA-F0-9])", urlcodes)); end 31 encode = function (s) return s and (s:gsub("%W", function (c) return format("%%%02x", c:byte()); end)); end 33local function decode_dir(x) 34 if x:gsub("%%%x%x", ""):gsub("[a-zA-Z0-9]", "") == "" then 35 return decode(x); 38local function decode_file(x) 39 if x:match(".%.dat$") and x:gsub("%.dat$", ""):gsub("%%%x%x", ""):gsub("[a-zA-Z0-9]", "") == "" then 40 return decode(x:gsub("%.dat$", ""));liberty-idsis-pp-v1.1.xsd git://pkgs.fedoraproject.org/axis | XML Schema | 261 lines
201 <xs:element ref="MsgAccount" minOccurs="0"/> 202 <xs:element ref="MsgSubaccount" minOccurs="0"/> 203 <xs:element ref="Extension" minOccurs="0"/> 219 <xs:element name="MsgAccount" type="DSTString"/> 220 <xs:element name="MsgSubaccount" type="DSTString"/> 221 <xs:element name="Facade" type="FacadeType"/>author.rb https://gitlab.com/leijianbin/metasploit-framework.git | Ruby | 146 lines
120 else 121 self.email = str.sub(/\s*\[at\]\s*/, '@').sub(/\s*\[dot\]\s*/, '.').gsub(/^<|>$/, '') 122 m = self.email.match(/([^@]+)@/)EventAggregatorFixture.cs https://hg.codeplex.com/tecx | C# | 146 lines
99 100 CancelingSubscriber subscriber = new CancelingSubscriber(); 101bib_profile https://code.google.com/p/koha/ | Perl | 128 lines
68 my $result = shift; 69 my $sth = $dbh->prepare_cached("SELECT tagfield, tagsubfield 70 FROM marc_subfield_structure 71 WHERE frameworkcode = '' 72 AND tagsubfield <> '\@' 73 AND kohafield <> 'biblioitems.itemtype' 99 my $result = shift; 100 my $sth = $dbh->prepare_cached("SELECT tagfield, tagsubfield 101 FROM marc_subfield_structure 114 my $itemtypes = GetItemTypes; 115 my $sth = $dbh->prepare_cached("SELECT tagfield, tagsubfield 116 FROM marc_subfield_structurevalidate.lua git://github.com/keplerproject/luarocks.git | Lua | 160 lines
44local function prepare_sandbox(file) 45 local root_dir = fs.make_temp_dir(file):gsub("/+$", "") 46 cfg.root_dir = root_dirbng.c git://github.com/OCamlPro/OCamlPro-OCaml-Branch.git | C | 435 lines
145 for (/**/; blen > 0; blen--, a++, b++) { 146 BngSub2Carry(*a, carry, *a, *b, carry); 147 } 243 /* current digit of a -= pl + out. Accumulate carrys in ph. */ 244 BngSub3(*a, ph, *a, pl, out); 245 /* prepare out for next iteration */ 249 /* current digit of a -= out */ 250 BngSub2(*a, carry, *a, out); 251 a++;index.go git://github.com/tav/go.git | Go | 225 lines
144 // Direct value, fetch from struct, fetch from struct pointer. 145 // The last two cases get us to oindex_const_sudo in gsubr.c. 146 []string{"", "t.", "pt."}, 151 // Element is int, element is quad (struct). 152 // This controls whether we end up in gsubr.c (i) or cgen.c (q). 153 []string{"i", "q"},Globals.h https://code.google.com/p/tortoisegit/ | C Header | 124 lines
50#define MENUSVNIGNORE 0x0000000040000000 51#define MENULOGSUBMODULE 0x0000000100000000 52#define MENUPREVDIFF 0x0000000200000000build_with_mtasc.rb git://github.com/textmate/actionscript.tmbundle.git | Ruby | 162 lines
56 @size_is_percentage = true 57 @config['width'].gsub!(/%/,'') 58 @config['height'].gsub!(/%/,'')references.rb git://github.com/peter-murach/github.git | Ruby | 150 lines
140 def validate_reference(ref) 141 refs = (ref =~ (/^(\/)?refs.*/) ? ref : "refs/#{ref}").gsub(/(\/)+/, '/') 142 refs.gsub!(/^\//, '')override.properties git://pkgs.fedoraproject.org/thunderbird-lightning | Properties File | 119 lines
82UninstallingText=??????? $BrandFullNameDA ????????????? $_CLICK 83UninstallingSubText=??????????????: 84FileError=?????????: \r\n\r\n$0\r\n\r\n????????????? ?? ????????????\r\n?????? ??? ????????????\r\n??????????????? ?? ????????????cache.rb git://github.com/wagn/wagn.git | Ruby | 177 lines
8 n = 0 if n.nil? 9 sprintf("%s%d-%d%s", basename.to_s.gsub(/\.\w+$/) { |s| ext = s; '' }, $$, n, ext) 10 end 16 def real_file_path(name) 17 name = name.gsub('%','%25').gsub('?','%3F').gsub(':','%3A') 18 name = name.gsub('\\','%5C').gsub('*','%2A').gsub('"','%22') 18 name = name.gsub('\\','%5C').gsub('*','%2A').gsub('"','%22') 19 name = name.gsub('<','%3C').gsub('>','%3E').gsub('|','%7C') 20 '%s/%s.cache' % [@cache_path, name ]config.rb git://github.com/rhomobile/rhodes.git | 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 endapplication_controller.rb https://gitlab.com/celadevra/gitlab-ce.git | Ruby | 346 lines
116 if id =~ /\.git\Z/ 117 redirect_to request.original_url.gsub(/\.git\Z/, '') and return 118 end 125 if @project.path_with_namespace != project_path 126 redirect_to request.original_url.gsub(project_path, @project.path_with_namespace) and return 127 endrjmethod.rb git://github.com/koichiro/rava.git | Ruby | 227 lines
199 # native 探し 200 nm = 'RJN_' + @owner.this_class.gsub('/','_') 201 beginpresenter.rb git://github.com/DigitPaint/skyline.git | Ruby | 122 lines
112 else 113 truncate(simple_format(strip_tags(content.gsub("<br />", "<br />\n").gsub("</p>", "</p>\n"))), :length => 150) 114 endGMdi.cpp https://lgi.svn.sourceforge.net/svnroot/lgi | C++ | 682 lines
296 PointToScreen(p); 297 GSubMenu *Sub = new GSubMenu; 298 if (Sub)musmap.tcl http://egghelp.googlecode.com/svn/trunk/ | TCL | 342 lines
146 proc tolow {strr} {return [string tolower [string map {? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} $strr]]} 147 proc sspace {strr} {return [string trim [regsub -all {[\t\s]+} $strr { }]]} 148 proc chkrusl {symb} {if {[lsearch -exact {? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} $symb] > -1} {return 1} {return 0}} 208#---------------------------------------------------------------------------- 209 regsub -all -- "\n|\r" $str {} str 210 211 if {[regexp {gnodMapSettings.*?</script>(.*?)<script>} $str -> res]} { 212 regsub -all -- "<a href.*?>" $res " \002*\002 " res 213 regsub -all -- "<.*?>" $res {} res 279 foreach {parser extra redir} $reqqueue($id) {break} 280 regsub -- "^$token," $id {} id 281Picker.js git://github.com/UIZE/UIZE-JavaScript-Framework.git | JavaScript | 230 lines
83 84 handleDialogSubmit:function (_valueInfo) { 85 var 137 submitHandler:function (_valueInfo,_event) { 138 m.handleDialogSubmit(_valueInfo); 139 _event && _event.keepOpen || _possiblyFocus ();ds_system.lua http://microlua-sim.googlecode.com/svn/trunk/ | Lua | 250 lines
55 local dir = ( Sys.convertFakeRootToRoot(wx.wxGetCwd().."/") ) 56 return dir:gsub("//", "/") 57endtypechecker_test.go git://github.com/ssrl/go.git | Go | 168 lines
80 case token.COMMENT: 81 s := errRx.FindStringSubmatch(lit) 82 if len(s) == 2 {resource_platform_map.rb https://github.com/btm/chef.git | Ruby | 151 lines
39 platform.downcase! 40 platform.gsub!(/\s/, "_") 41 platform_sym = platform.to_symruby_less_processing.rb git://github.com/zena/zena.git | Ruby | 314 lines
65 # def r_erb 66 # "<pre><%= @erb.gsub('<','<').gsub('>','>') %></pre>" 67 # endjson.lib.lua https://code.google.com/p/prosody-modules/ | Lua | 355 lines
46 -- FIXME do proper utf-8 and binary data detection 47 t_insert(buffer, "\""..(o:gsub(".", escapes)).."\""); 48endcrontab.rb http://ruby-hive.googlecode.com/svn/trunk/ | Ruby | 368 lines
206 207 day_of_week = day_of_week.downcase.gsub(/#{WDAY.join("|")}/){ 208 WDAY.index($&) 225 226 day_of_week = day_of_week.downcase.gsub(/#{WDAY.join("|")}/){ 227 WDAY.index($&)Image11.h https://bitbucket.org/vionika/spin.android.git | C Header | 125 lines
114 TextureHelper11 mStagingTexture; 115 unsigned int mStagingSubresource; 116command.rb https://bitbucket.org/saranyutcr/client_cinestaan_cms.git | Ruby | 133 lines
43 namespace = klass.namespace 44 formatted = "#{namespace.gsub(/^(default)/, '')}:" 45 end 51 formatted << if klass && !klass.arguments.empty? 52 usage.to_s.gsub(/^#{name}/) do |match| 53 match << " " << klass.arguments.map { |a| a.usage }.compact.join(" ")shared_strings.rb https://bitbucket.org/saranyutcr/client_cinestaan_cms.git | Ruby | 157 lines
38 39 ::Nokogiri::XML(xml.gsub(/#{invalid.keys.join('|')}/, invalid)) 40 endsafe_browsing_api_handler_unittest.cc git://github.com/chromium/chromium.git | C++ | 238 lines
109 110TEST_F(SafeBrowsingApiHandlerUtilTest, SocialEngineeringSubType) { 111 ThreatMetadata expected;accountprofileblock.php https://gitlab.com/otharwa/gnu-social.git | PHP | 299 lines
163 $usf->show(); 164 } else if ($cur->hasPendingSubscription($this->profile)) { 165 $sf = new CancelSubscriptionForm($this->out, $this->profile);tttags.h https://bitbucket.org/proglove/tbmmorpg | C Header | 99 lines
56#define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' ) 57#define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' ) 58#define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' )Dump.lua git://github.com/tekkub/wow-ui-source.git | Lua | 408 lines
54local string_sub = string.sub; 55local string_gsub = string.gsub; 56local string_format = string.format; 80 val = string_sub(val, 1, DEVTOOLS_LONG_STRING_CUTOFF); 81 return string_gsub(string_format("%q...+%s",val,more),"[|]", "||"); 82 else 82 else 83 return string_gsub(string_format("%q",val),"[|]", "||"); 84 endLogNum.h https://bitbucket.org/RomanCizmarik/vpl_gdcm_fixes.git | C Header | 586 lines
146 //! - Throws LogNum::CNegativeResult exception on failure. 147 inline static T logSub(T x, T y); 148}; 218template <typename T> 219inline T CLogNum<T>::logSub(T x, T y) 220{ 269{ 270 value = logSub(value, n.value); 271 return *this; 301{ 302 value = logSub(value, getSafeLog(c)); 303 return *this; 351{ 352 return CLogNum<T>(CLogNum<T>::logSub(x.value, y.value), LogNum::LOG_VALUE); 353}VT100TextStorage.m git://github.com/kkass/iterm.git | Objective C | 167 lines
87 { 88 NSString *origSubstring, *commonString; 89 90 // strip out the common stuff 91 origSubstring = [[contents attributedSubstringFromRange: range] string]; 92 commonString = [origSubstring commonPrefixWithString: str options: NSLiteralSearch]; 98 99 if([commonString isEqualToString: origSubstring]) 100 origDiffString = @""; 101 else 102 origDiffString = [origSubstring substringFromIndex: [commonString length]]; 103Rakefile git://github.com/eahanson/Expectacular.git | Rakefile | 100 lines
94 rendered = ERB.new(IO.read("Templates/Expect.erb.#{extension}")).result(binding) 95 rendered.gsub! /^\s+$/, "" # remove whitespace from otherwise-empty lines 96 rendered.gsub! /\n{3,}/, "\n\n\n" # remove multiple contiguous blank linesutil.js git://github.com/caolan/jam.git | JavaScript | 137 lines
46 // 47 // "hello".gsub /[aeiou]/, '*' #=> "h*ll*" 48 // "hello".gsub /[aeiou]/, '<$1>' #=> "h<e>ll<o>" 48 // "hello".gsub /[aeiou]/, '<$1>' #=> "h<e>ll<o>" 49 // "hello".gsub /[aeiou]/, ($) { 50 // "<#{$[1]}>" #=> "h<e>ll<o>" 51 // 52 gsub: function (str, pattern, replacement) { 53 var i, match, matchCmpr, matchCmprPrev, replacementStr, result, self; 73 if (matchCmpr[i]) { 74 replacementStr = u.string.gsub(replacementStr, new RegExp("\\\$" + i), matchCmpr[i]); 75 } 93 upcase: function(str) { 94 var self = u.string.gsub(str, /_([a-z])/, function ($) { 95 return "_" + $[1].toUpperCase();abfdesc.h https://bitbucket.org/mrhso/afdko.git | C Header | 102 lines
80 float StrokeWidth; 81 float lenGSubrArray; /* Global subr count */ 82 } abfFontDescHeader;generate_and_format_plan.rb https://github.com/eedrummer/laika.git | Ruby | 145 lines
79 # Get rid of some funky stuff generated by schematron 80 clean_location = location.gsub("*:", '').gsub("[namespace-uri()='urn:hl7-org:v3']", '') 81 node = REXML::XPath.first(doc , clean_location)sanitize.rb https://github.com/quake/dryopteris.git | Ruby | 135 lines
70 # this block lifted nearly verbatim from HTML5 sanitization 71 val_unescaped = CGI.unescapeHTML(attr.last.to_s).gsub(/`|[\000-\040\177\s]+|\302[\200-\240]/,'').downcase 72 if val_unescaped =~ /^[a-z0-9][-+.a-z0-9]*:/ and HashedWhiteList::ALLOWED_PROTOCOLS[val_unescaped.split(':')[0]].nil? 96 # disallow urls 97 style = style.to_s.gsub(/url\s*\(\s*[^\s)]+?\s*\)\s*/, ' ') 98encodings.rb git://github.com/IronLanguages/main.git | Ruby | 269 lines
49 def Encodings.get_name(enc) 50 enc = enc.to_s.gsub("-", "_").downcase 51 end 118 119 str = str.gsub(/\?=(\s*)=\?/, '?==?') # Remove whitespaces between 'encoded-word's 120 126 # Join QP encoded-words that are adjacent to avoid decoding partial chars 127 text.gsub!(/\?\=\=\?.+?\?[Qq]\?/m, '') if text =~ /\?==\?/ 128 129 # Separate encoded-words with a space, so we can treat them one by one 130 text.gsub!(/\?\=\=\?/, '?= =?') 131 151 152 if original_encoding.to_s.downcase.gsub("-", "") == to_encoding.to_s.downcase.gsub("-", "") 153 output