Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK ! pA5G G unit.rbnu [ # test/unit compatibility layer using minitest.
require 'minitest/unit'
require 'test/unit/assertions'
require 'test/unit/testcase'
require 'optparse'
module Test
module Unit
TEST_UNIT_IMPLEMENTATION = 'test/unit compatibility layer using minitest'
module RunCount
@@run_count = 0
def self.have_run?
@@run_count.nonzero?
end
def run(*)
@@run_count += 1
super
end
def run_once
return if have_run?
return if $! # don't run if there was an exception
yield
end
module_function :run_once
end
module Options
def initialize(*, &block)
@init_hook = block
@options = nil
super(&nil)
end
def option_parser
@option_parser ||= OptionParser.new
end
def process_args(args = [])
return @options if @options
orig_args = args.dup
options = {}
opts = option_parser
setup_options(opts, options)
opts.parse!(args)
orig_args -= args
args = @init_hook.call(args, options) if @init_hook
non_options(args, options)
@help = orig_args.map { |s| s =~ /[\s|&<>$()]/ ? s.inspect : s }.join " "
@options = options
if @options[:parallel]
@files = args
@args = orig_args
end
options
end
private
def setup_options(opts, options)
opts.separator 'minitest options:'
opts.version = MiniTest::Unit::VERSION
opts.on '-h', '--help', 'Display this help.' do
puts opts
exit
end
opts.on '-s', '--seed SEED', Integer, "Sets random seed" do |m|
options[:seed] = m
end
opts.on '-v', '--verbose', "Verbose. Show progress processing files." do
options[:verbose] = true
self.verbose = options[:verbose]
end
opts.on '-n', '--name PATTERN', "Filter test names on pattern." do |a|
options[:filter] = a
end
opts.on '--jobs-status [TYPE]', [:normal, :replace],
"Show status of jobs every file; Disabled when --jobs isn't specified." do |type|
options[:job_status] = type || :normal
end
opts.on '-j N', '--jobs N', "Allow run tests with N jobs at once" do |a|
if /^t/ =~ a
options[:testing] = true # For testing
options[:parallel] = a[1..-1].to_i
else
options[:parallel] = a.to_i
end
end
opts.on '--no-retry', "Don't retry running testcase when --jobs specified" do
options[:no_retry] = true
end
opts.on '--ruby VAL', "Path to ruby; It'll have used at -j option" do |a|
options[:ruby] = a.split(/ /).reject(&:empty?)
end
opts.on '-q', '--hide-skip', 'Hide skipped tests' do
options[:hide_skip] = true
end
end
def non_options(files, options)
begin
require "rbconfig"
rescue LoadError
warn "#{caller(1)[0]}: warning: Parallel running disabled because can't get path to ruby; run specify with --ruby argument"
options[:parallel] = nil
else
options[:ruby] ||= RbConfig.ruby
end
true
end
end
module GlobOption
include Options
@@testfile_prefix = "test"
def setup_options(parser, options)
super
parser.on '-b', '--basedir=DIR', 'Base directory of test suites.' do |dir|
options[:base_directory] = dir
end
parser.on '-x', '--exclude PATTERN', 'Exclude test files on pattern.' do |pattern|
(options[:reject] ||= []) << pattern
end
end
def non_options(files, options)
paths = [options.delete(:base_directory), nil].uniq
if reject = options.delete(:reject)
reject_pat = Regexp.union(reject.map {|r| /#{r}/ })
end
files.map! {|f|
f = f.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
((paths if /\A\.\.?(?:\z|\/)/ !~ f) || [nil]).any? do |prefix|
if prefix
path = f.empty? ? prefix : "#{prefix}/#{f}"
else
next if f.empty?
path = f
end
if !(match = Dir["#{path}/**/#{@@testfile_prefix}_*.rb"]).empty?
if reject
match.reject! {|n|
n[(prefix.length+1)..-1] if prefix
reject_pat =~ n
}
end
break match
elsif !reject or reject_pat !~ f and File.exist? path
break path
end
end or
raise ArgumentError, "file not found: #{f}"
}
files.flatten!
super(files, options)
end
end
module LoadPathOption
include Options
def setup_options(parser, options)
super
parser.on '-Idirectory', 'Add library load path' do |dirs|
dirs.split(':').each { |d| $LOAD_PATH.unshift d }
end
end
end
module GCStressOption
def setup_options(parser, options)
super
parser.on '--[no-]gc-stress', 'Set GC.stress as true' do |flag|
options[:gc_stress] = flag
end
end
def non_options(files, options)
if options.delete(:gc_stress)
MiniTest::Unit::TestCase.class_eval do
oldrun = instance_method(:run)
define_method(:run) do |runner|
begin
gc_stress, GC.stress = GC.stress, true
oldrun.bind(self).call(runner)
ensure
GC.stress = gc_stress
end
end
end
end
super
end
end
module RequireFiles
def non_options(files, options)
return false if !super
result = false
files.each {|f|
d = File.dirname(path = File.expand_path(f))
unless $:.include? d
$: << d
end
begin
require path unless options[:parallel]
result = true
rescue LoadError
puts "#{f}: #{$!}"
end
}
result
end
end
class Runner < MiniTest::Unit
include Test::Unit::Options
include Test::Unit::GlobOption
include Test::Unit::LoadPathOption
include Test::Unit::GCStressOption
include Test::Unit::RunCount
class Worker
def self.launch(ruby,args=[])
io = IO.popen([*ruby,
"#{File.dirname(__FILE__)}/unit/parallel.rb",
*args], "rb+")
new(io, io.pid, :waiting)
end
def initialize(io, pid, status)
@io = io
@pid = pid
@status = status
@file = nil
@real_file = nil
@loadpath = []
@hooks = {}
end
def puts(*args)
@io.puts(*args)
end
def run(task,type)
@file = File.basename(task).gsub(/\.rb/,"")
@real_file = task
begin
puts "loadpath #{[Marshal.dump($:-@loadpath)].pack("m").gsub("\n","")}"
@loadpath = $:.dup
puts "run #{task} #{type}"
@status = :prepare
rescue Errno::EPIPE
died
rescue IOError
raise unless ["stream closed","closed stream"].include? $!.message
died
end
end
def hook(id,&block)
@hooks[id] ||= []
@hooks[id] << block
self
end
def read
res = (@status == :quit) ? @io.read : @io.gets
res && res.chomp
end
def close
@io.close
self
end
def died(*additional)
@status = :quit
@io.close
call_hook(:dead,*additional)
end
def to_s
if @file
"#{@pid}=#{@file}"
else
"#{@pid}:#{@status.to_s.ljust(7)}"
end
end
attr_reader :io, :pid
attr_accessor :status, :file, :real_file, :loadpath
private
def call_hook(id,*additional)
@hooks[id] ||= []
@hooks[id].each{|hook| hook[self,additional] }
self
end
end
class << self; undef autorun; end
@@stop_auto_run = false
def self.autorun
at_exit {
Test::Unit::RunCount.run_once {
exit(Test::Unit::Runner.new.run(ARGV) || true)
} unless @@stop_auto_run
} unless @@installed_at_exit
@@installed_at_exit = true
end
def after_worker_down(worker, e=nil, c=false)
return unless @options[:parallel]
return if @interrupt
if e
b = e.backtrace
warn "#{b.shift}: #{e.message} (#{e.class})"
STDERR.print b.map{|s| "\tfrom #{s}"}.join("\n")
end
@need_quit = true
warn ""
warn "Some worker was crashed. It seems ruby interpreter's bug"
warn "or, a bug of test/unit/parallel.rb. try again without -j"
warn "option."
warn ""
STDERR.flush
exit c
end
def jobs_status
return unless @options[:job_status]
puts "" unless @options[:verbose]
status_line = @workers.map(&:to_s).join(" ")
if @options[:job_status] == :replace and $stdout.tty?
@terminal_width ||=
begin
require 'io/console'
$stdout.winsize[1]
rescue LoadError, NoMethodError
ENV["COLUMNS"].to_i.nonzero? || 80
end
@jstr_size ||= 0
del_jobs_status
$stdout.flush
print status_line[0...@terminal_width]
$stdout.flush
@jstr_size = [status_line.size, @terminal_width].min
else
puts status_line
end
end
def del_jobs_status
return unless @options[:job_status] == :replace && @jstr_size.nonzero?
print "\r"+" "*@jstr_size+"\r"
end
def after_worker_quit(worker)
return unless @options[:parallel]
return if @interrupt
@workers.delete(worker)
@dead_workers << worker
@ios = @workers.map(&:io)
end
def _run_parallel suites, type, result
if @options[:parallel] < 1
warn "Error: parameter of -j option should be greater than 0."
return
end
begin
# Require needed things for parallel running
require 'thread'
require 'timeout'
@tasks = @files.dup # Array of filenames.
@need_quit = false
@dead_workers = [] # Array of dead workers.
@warnings = []
shutting_down = false
rep = [] # FIXME: more good naming
# Array of workers.
@workers = @options[:parallel].times.map {
worker = Worker.launch(@options[:ruby],@args)
worker.hook(:dead) do |w,info|
after_worker_quit w
after_worker_down w, *info unless info.empty?
end
worker
}
# Thread: watchdog
watchdog = Thread.new do
while stat = Process.wait2
break if @interrupt # Break when interrupt
pid, stat = stat
w = (@workers + @dead_workers).find{|x| pid == x.pid }.dup
next unless w
unless w.status == :quit
# Worker down
w.died(nil, !stat.signaled? && stat.exitstatus)
end
end
end
@workers_hash = Hash[@workers.map {|w| [w.io,w] }] # out-IO => worker
@ios = @workers.map{|w| w.io } # Array of worker IOs
while _io = IO.select(@ios)[0]
break unless _io.each do |io|
break if @need_quit
worker = @workers_hash[io]
case worker.read
when /^okay$/
worker.status = :running
jobs_status
when /^ready$/
worker.status = :ready
if @tasks.empty?
break unless @workers.find{|x| x.status == :running }
else
worker.run(@tasks.shift, type)
end
jobs_status
when /^done (.+?)$/
r = Marshal.load($1.unpack("m")[0])
result << r[0..1] unless r[0..1] == [nil,nil]
rep << {file: worker.real_file,
report: r[2], result: r[3], testcase: r[5]}
$:.push(*r[4]).uniq!
when /^p (.+?)$/
del_jobs_status
print $1.unpack("m")[0]
jobs_status if @options[:job_status] == :replace
when /^after (.+?)$/
@warnings << Marshal.load($1.unpack("m")[0])
when /^bye (.+?)$/
after_worker_down worker, Marshal.load($1.unpack("m")[0])
when /^bye$/
if shutting_down
after_worker_quit worker
else
after_worker_down worker
end
end
break if @need_quit
end
end
rescue Interrupt => e
@interrupt = e
return result
ensure
shutting_down = true
watchdog.kill if watchdog
if @interrupt
@ios.select!{|x| @workers_hash[x].status == :running }
while !@ios.empty? && (__io = IO.select(@ios,[],[],10))
_io = __io[0]
_io.each do |io|
worker = @workers_hash[io]
case worker.read
when /^done (.+?)$/
r = Marshal.load($1.unpack("m")[0])
result << r[0..1] unless r[0..1] == [nil,nil]
rep << {file: worker.real_file,
report: r[2], result: r[3], testcase: r[5]}
$:.push(*r[4]).uniq!
@ios.delete(io)
end
end
end
end
@workers.each do |worker|
begin
timeout(1) do
worker.puts "quit"
end
rescue Errno::EPIPE
rescue Timeout::Error
end
worker.close
end
begin
timeout(0.2*@workers.size) do
Process.waitall
end
rescue Timeout::Error
@workers.each do |worker|
begin
Process.kill(:KILL,worker.pid)
rescue Errno::ESRCH; end
end
end
if @interrupt || @options[:no_retry] || @need_quit
rep.each do |r|
report.push(*r[:report])
end
@errors += rep.map{|x| x[:result][0] }.inject(:+)
@failures += rep.map{|x| x[:result][1] }.inject(:+)
@skips += rep.map{|x| x[:result][2] }.inject(:+)
else
puts ""
puts "Retrying..."
puts ""
rep.each do |r|
if r[:testcase] && r[:file] && !r[:report].empty?
require r[:file]
_run_suite(eval(r[:testcase]),type)
else
report.push(*r[:report])
@errors += r[:result][0]
@failures += r[:result][1]
@skips += r[:result][2]
end
end
end
if @warnings
warn ""
ary = []
@warnings.reject! do |w|
r = ary.include?(w[1].message)
ary << w[1].message
r
end
@warnings.each do |w|
warn "#{w[0]}: #{w[1].message} (#{w[1].class})"
end
warn ""
end
end
end
def _run_suites suites, type
@interrupt = nil
result = []
if @options[:parallel]
_run_parallel suites, type, result
else
suites.each {|suite|
begin
result << _run_suite(suite, type)
rescue Interrupt => e
@interrupt = e
break
end
}
end
report.reject!{|r| r.start_with? "Skipped:" } if @options[:hide_skip]
result
end
# Overriding of MiniTest::Unit#puke
def puke klass, meth, e
# TODO:
# this overriding is for minitest feature that skip messages are
# hidden when not verbose (-v), note this is temporally.
e = case e
when MiniTest::Skip then
@skips += 1
"Skipped:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
when MiniTest::Assertion then
@failures += 1
"Failure:\n#{meth}(#{klass}) [#{location e}]:\n#{e.message}\n"
else
@errors += 1
bt = MiniTest::filter_backtrace(e.backtrace).join "\n "
"Error:\n#{meth}(#{klass}):\n#{e.class}: #{e.message}\n #{bt}\n"
end
@report << e
e[0, 1]
end
def status(*args)
result = super
raise @interrupt if @interrupt
result
end
end
class AutoRunner
class Runner < Test::Unit::Runner
include Test::Unit::RequireFiles
end
attr_accessor :to_run, :options
def initialize(force_standalone = false, default_dir = nil, argv = ARGV)
@runner = Runner.new do |files, options|
options[:base_directory] ||= default_dir
files << default_dir if files.empty? and default_dir
@to_run = files
yield self if block_given?
files
end
Runner.runner = @runner
@options = @runner.option_parser
@argv = argv
end
def process_args(*args)
@runner.process_args(*args)
!@to_run.empty?
end
def run
@runner.run(@argv) || true
end
def self.run(*args)
new(*args).run
end
end
end
end
Test::Unit::Runner.autorun
PK ! ʼ unit/testcase.rbnu [ require 'test/unit/assertions'
module Test
module Unit
# remove silly TestCase class
remove_const(:TestCase) if defined?(self::TestCase)
class TestCase < MiniTest::Unit::TestCase
include Assertions
def on_parallel_worker?
false
end
def run runner
@options = runner.options
super runner
end
def self.test_order
:sorted
end
end
end
end
PK ! unit/parallel.rbnu [ require 'test/unit'
module Test
module Unit
class Worker < Runner
class << self
undef autorun
end
alias orig_run_suite _run_suite
undef _run_suite
undef _run_suites
undef run
def increment_io(orig)
*rest, io = 32.times.inject([orig.dup]){|ios, | ios << ios.last.dup }
rest.each(&:close)
io
end
def _run_suites(suites, type)
suites.map do |suite|
_run_suite(suite, type)
end
end
def _run_suite(suite, type)
r = report.dup
orig_testout = MiniTest::Unit.output
i,o = IO.pipe
MiniTest::Unit.output = o
orig_stdin, orig_stdout = $stdin, $stdout
th = Thread.new do
begin
while buf = (self.verbose ? i.gets : i.read(5))
@stdout.puts "p #{[buf].pack("m").gsub("\n","")}"
end
rescue IOError
rescue Errno::EPIPE
end
end
e, f, s = @errors, @failures, @skips
begin
result = orig_run_suite(suite, type)
rescue Interrupt
@need_exit = true
result = [nil,nil]
end
MiniTest::Unit.output = orig_testout
$stdin = orig_stdin
$stdout = orig_stdout
o.close
begin
th.join
rescue IOError
raise unless ["stream closed","closed stream"].include? $!.message
end
i.close
result << (report - r)
result << [@errors-e,@failures-f,@skips-s]
result << ($: - @old_loadpath)
result << suite.name
begin
@stdout.puts "done #{[Marshal.dump(result)].pack("m").gsub("\n","")}"
rescue Errno::EPIPE; end
return result
ensure
MiniTest::Unit.output = orig_stdout
$stdin = orig_stdin
$stdout = orig_stdout
o.close if o && !o.closed?
i.close if i && !i.closed?
end
def run(args = [])
process_args args
@@stop_auto_run = true
@opts = @options.dup
@need_exit = false
@old_loadpath = []
begin
@stdout = increment_io(STDOUT)
@stdin = increment_io(STDIN)
@stdout.sync = true
@stdout.puts "ready"
while buf = @stdin.gets
case buf.chomp
when /^loadpath (.+?)$/
@old_loadpath = $:.dup
$:.push(*Marshal.load($1.unpack("m")[0].force_encoding("ASCII-8BIT"))).uniq!
when /^run (.+?) (.+?)$/
@stdout.puts "okay"
@options = @opts.dup
suites = MiniTest::Unit::TestCase.test_suites
begin
require $1
rescue LoadError
@stdout.puts "after #{[Marshal.dump([$1, $!])].pack("m").gsub("\n","")}"
@stdout.puts "ready"
next
end
_run_suites MiniTest::Unit::TestCase.test_suites-suites, $2.to_sym
if @need_exit
begin
@stdout.puts "bye"
rescue Errno::EPIPE; end
exit
else
@stdout.puts "ready"
end
when /^quit$/
begin
@stdout.puts "bye"
rescue Errno::EPIPE; end
exit
end
end
rescue Errno::EPIPE
rescue Exception => e
begin
@stdout.puts "bye #{[Marshal.dump(e)].pack("m").gsub("\n","")}"
rescue Errno::EPIPE;end
exit
ensure
@stdin.close
@stdout.close
end
end
end
end
end
if $0 == __FILE__
module Test
module Unit
class TestCase < MiniTest::Unit::TestCase
def on_parallel_worker?
true
end
end
end
end
require 'rubygems'
class Gem::TestCase < MiniTest::Unit::TestCase
@@project_dir = File.expand_path('../../../..', __FILE__)
end
Test::Unit::Worker.new.run(ARGV)
end
PK ! #{(v* v* unit/assertions.rbnu [ require 'minitest/unit'
require 'pp'
module Test
module Unit
module Assertions
include MiniTest::Assertions
def mu_pp(obj) #:nodoc:
obj.pretty_inspect.chomp
end
MINI_DIR = File.join(File.dirname(File.dirname(File.expand_path(__FILE__))), "minitest") #:nodoc:
UNASSIGNED = Object.new # :nodoc:
# :call-seq:
# assert( test, failure_message = UNASSIGNED )
#
#Tests if +test+ is true.
#
#+msg+ may be a String or a Proc. If +msg+ is a String, it will be used
#as the failure message. Otherwise, the result of calling +msg+ will be
#used as the message if the assertion fails.
#
#If no +msg+ is given, a default message will be used.
#
# assert(false, "This was expected to be true")
def assert(test, msg = UNASSIGNED)
case msg
when UNASSIGNED
msg = nil
when String, Proc
else
bt = caller.reject { |s| s.rindex(MINI_DIR, 0) }
raise ArgumentError, "assertion message must be String or Proc, but #{msg.class} was given.", bt
end
super
end
# :call-seq:
# assert_block( failure_message = nil )
#
#Tests the result of the given block. If the block does not return true,
#the assertion will fail. The optional +failure_message+ argument is the same as in
#Assertions#assert.
#
# assert_block do
# [1, 2, 3].any? { |num| num < 1 }
# end
def assert_block(*msgs)
assert yield, *msgs
end
# :call-seq:
# assert_raise( *args, &block )
#
#Tests if the given block raises an exception. Acceptable exception
#types maye be given as optional arguments. If the last argument is a
#String, it will be used as the error message.
#
# assert_raise do #Fails, no Exceptions are raised
# end
#
# assert_raise NameError do
# puts x #Raises NameError, so assertion succeeds
# end
def assert_raise(*args, &b)
assert_raises(*args, &b)
end
# :call-seq:
# assert_nothing_raised( *args, &block )
#
#If any exceptions are given as arguments, the assertion will
#fail if one of those exceptions are raised. Otherwise, the test fails
#if any exceptions are raised.
#
#The final argument may be a failure message.
#
# assert_nothing_raised RuntimeError do
# raise Exception #Assertion passes, Exception is not a RuntimeError
# end
#
# assert_nothing_raised do
# raise Exception #Assertion fails
# end
def assert_nothing_raised(*args)
self._assertions += 1
if Module === args.last
msg = nil
else
msg = args.pop
end
begin
line = __LINE__; yield
rescue MiniTest::Skip
raise
rescue Exception => e
bt = e.backtrace
as = e.instance_of?(MiniTest::Assertion)
if as
ans = /\A#{Regexp.quote(__FILE__)}:#{line}:in /o
bt.reject! {|ln| ans =~ ln}
end
if ((args.empty? && !as) ||
args.any? {|a| a.instance_of?(Module) ? e.is_a?(a) : e.class == a })
msg = message(msg) { "Exception raised:\n<#{mu_pp(e)}>" }
raise MiniTest::Assertion, msg.call, bt
else
raise
end
end
nil
end
# :call-seq:
# assert_nothing_thrown( failure_message = nil, &block )
#
#Fails if the given block uses a call to Kernel#throw.
#
#An optional failure message may be provided as the final argument.
#
# assert_nothing_thrown "Something was thrown!" do
# throw :problem?
# end
def assert_nothing_thrown(msg=nil)
begin
yield
rescue ArgumentError => error
raise error if /\Auncaught throw (.+)\z/m !~ error.message
msg = message(msg) { "<#{$1}> was thrown when nothing was expected" }
flunk(msg)
end
assert(true, "Expected nothing to be thrown")
end
# :call-seq:
# assert_equal( expected, actual, failure_message = nil )
#
#Tests if +expected+ is equal to +actual+.
#
#An optional failure message may be provided as the final argument.
def assert_equal(exp, act, msg = nil)
msg = message(msg) {
exp_str = mu_pp(exp)
act_str = mu_pp(act)
exp_comment = ''
act_comment = ''
if exp_str == act_str
if (exp.is_a?(String) && act.is_a?(String)) ||
(exp.is_a?(Regexp) && act.is_a?(Regexp))
exp_comment = " (#{exp.encoding})"
act_comment = " (#{act.encoding})"
elsif exp.is_a?(Float) && act.is_a?(Float)
exp_str = "%\#.#{Float::DIG+2}g" % exp
act_str = "%\#.#{Float::DIG+2}g" % act
elsif exp.is_a?(Time) && act.is_a?(Time)
if exp.subsec * 1000_000_000 == exp.nsec
exp_comment = " (#{exp.nsec}[ns])"
else
exp_comment = " (subsec=#{exp.subsec})"
end
if act.subsec * 1000_000_000 == act.nsec
act_comment = " (#{act.nsec}[ns])"
else
act_comment = " (subsec=#{act.subsec})"
end
elsif exp.class != act.class
# a subclass of Range, for example.
exp_comment = " (#{exp.class})"
act_comment = " (#{act.class})"
end
elsif !Encoding.compatible?(exp_str, act_str)
if exp.is_a?(String) && act.is_a?(String)
exp_str = exp.dump
act_str = act.dump
exp_comment = " (#{exp.encoding})"
act_comment = " (#{act.encoding})"
else
exp_str = exp_str.dump
act_str = act_str.dump
end
end
"<#{exp_str}>#{exp_comment} expected but was\n<#{act_str}>#{act_comment}"
}
assert(exp == act, msg)
end
# :call-seq:
# assert_not_nil( expression, failure_message = nil )
#
#Tests if +expression+ is not nil.
#
#An optional failure message may be provided as the final argument.
def assert_not_nil(exp, msg=nil)
msg = message(msg) { "<#{mu_pp(exp)}> expected to not be nil" }
assert(!exp.nil?, msg)
end
# :call-seq:
# assert_not_equal( expected, actual, failure_message = nil )
#
#Tests if +expected+ is not equal to +actual+.
#
#An optional failure message may be provided as the final argument.
def assert_not_equal(exp, act, msg=nil)
msg = message(msg) { "<#{mu_pp(exp)}> expected to be != to\n<#{mu_pp(act)}>" }
assert(exp != act, msg)
end
# :call-seq:
# assert_no_match( regexp, string, failure_message = nil )
#
#Tests if the given Regexp does not match a given String.
#
#An optional failure message may be provided as the final argument.
def assert_no_match(regexp, string, msg=nil)
assert_instance_of(Regexp, regexp, "The first argument to assert_no_match should be a Regexp.")
self._assertions -= 1
msg = message(msg) { "<#{mu_pp(regexp)}> expected to not match\n<#{mu_pp(string)}>" }
assert(regexp !~ string, msg)
end
# :call-seq:
# assert_not_same( expected, actual, failure_message = nil )
#
#Tests if +expected+ is not the same object as +actual+.
#This test uses Object#equal? to test equality.
#
#An optional failure message may be provided as the final argument.
#
# assert_not_same("x", "x") #Succeeds
def assert_not_same(expected, actual, message="")
msg = message(msg) { build_message(message, <
with id > expected to not be equal\\? to
>
with id >.
EOT
assert(!actual.equal?(expected), msg)
end
# :call-seq:
# assert_respond_to( object, method, failure_message = nil )
#
#Tests if the given Object responds to +method+.
#
#An optional failure message may be provided as the final argument.
#
# assert_respond_to("hello", :reverse) #Succeeds
# assert_respond_to("hello", :does_not_exist) #Fails
def assert_respond_to obj, meth, msg = nil
#get rid of overcounting
super if !caller[0].rindex(MINI_DIR, 0) || !obj.respond_to?(meth)
end
# :call-seq:
# assert_send( +send_array+, failure_message = nil )
#
# Passes if the method send returns a true value.
#
# +send_array+ is composed of:
# * A receiver
# * A method
# * Arguments to the method
#
# Example:
# assert_send([[1, 2], :member?, 1]) # -> pass
# assert_send([[1, 2], :member?, 4]) # -> fail
def assert_send send_ary, m = nil
recv, msg, *args = send_ary
m = message(m) {
if args.empty?
argsstr = ""
else
(argsstr = mu_pp(args)).sub!(/\A\[(.*)\]\z/m, '(\1)')
end
"Expected #{mu_pp(recv)}.#{msg}#{argsstr} to return true"
}
assert recv.__send__(msg, *args), m
end
# :call-seq:
# assert_not_send( +send_array+, failure_message = nil )
#
# Passes if the method send doesn't return a true value.
#
# +send_array+ is composed of:
# * A receiver
# * A method
# * Arguments to the method
#
# Example:
# assert_not_send([[1, 2], :member?, 1]) # -> fail
# assert_not_send([[1, 2], :member?, 4]) # -> pass
def assert_not_send send_ary, m = nil
recv, msg, *args = send_ary
m = message(m) {
if args.empty?
argsstr = ""
else
(argsstr = mu_pp(args)).sub!(/\A\[(.*)\]\z/m, '(\1)')
end
"Expected #{mu_pp(recv)}.#{msg}#{argsstr} to return false"
}
assert !recv.__send__(msg, *args), m
end
ms = instance_methods(true).map {|sym| sym.to_s }
ms.grep(/\Arefute_/) do |m|
mname = ('assert_not_' << m.to_s[/.*?_(.*)/, 1])
alias_method(mname, m) unless ms.include? mname
end
alias assert_include assert_includes
alias assert_not_include assert_not_includes
def build_message(head, template=nil, *arguments) #:nodoc:
template &&= template.chomp
template.gsub(/\G((?:[^\\]|\\.)*?)(\\)?\?/) { $1 + ($2 ? "?" : mu_pp(arguments.shift)) }
end
end
end
end
PK ! / MarkupTest.phpnu Iw allowedFailures = array(
array('haskell', 'nested-comments'),
array('http', 'default'),
);
}
public static function markupTestProvider()
{
$testData = array();
$markupTests = new Finder();
$markupTests
->in(__DIR__ . '/markup/')
->name('*.txt')
->sortByName()
->files()
;
$workspace = array();
foreach ($markupTests as $markupTest) {
$language = $markupTest->getRelativePath();
if (!isset($workspace[$language])) {
$workspace[$language] = array();
}
if (strpos($markupTest->getFilename(), '.expect.txt') !== false) {
$workspace[$language][$markupTest->getBasename('.expect.txt')]['expected'] = $markupTest->getContents();
} else {
$workspace[$language][$markupTest->getBasename('.txt')]['raw'] = $markupTest->getContents();
}
}
foreach ($workspace as $language => $tests) {
foreach ($tests as $name => $definition) {
$testData[] = array($language, $name, $definition['raw'], $definition['expected']);
}
}
return $testData;
}
/**
* @dataProvider markupTestProvider
*/
public function testHighlighter($language, $testName, $raw, $expected)
{
if (in_array(array($language, $testName), $this->allowedFailures)) {
$this->markTestSkipped("The $language $testName test is known to fail for unknown reasons...");
}
$hl = new Highlighter();
$actual = $hl->highlight($language, $raw);
$this->assertEquals($language, $actual->language);
$this->assertEquals(
trim($expected),
trim($actual->value),
sprintf('The "%s" markup test failed for the "%s" language', $testName, $language)
);
}
}
PK ! S7> > DetectionTest.phpnu Iw allowedFailures = array(
'http', // [1. routeros (15%); 2. groovy (15%)]
'java', // [1. angelscript (22%); 2. scala (22%)]
'shell', // [1. vhdl (9%); 2. elixir (9%)]
'plaintext', // [1. asciidoc (10%); 2. properties (4%)]
'coffeescript', // [1. livescript (26%); 2. coffeescript (26%)]
'handlebars', // [1. htmlbars (12%); 2. handlebars (12%)]
'n1ql', // [1. sql (26%); 2. n1ql (26%)]
'sml', // [1. sml (18%); 2. coq (18%)]
'purebasic', // [1. reasonml (29%); 2. purebasic (29%)]
'fortran', // [1. irpf90 (40%); 2. fortran (40%)]
);
}
public static function detectableLanguagesProvider()
{
$testData = array();
$languages = new Finder();
$languages
->in(__DIR__ . '/detect/')
->sortByName()
->files()
;
foreach ($languages as $language) {
$testData[] = array($language->getRelativePath(), $language->getContents());
}
return $testData;
}
/**
* @dataProvider detectableLanguagesProvider
*/
public function testAutomaticDetection($language, $raw)
{
$hl = new Highlighter();
$hl->setAutodetectLanguages($hl->listLanguages());
$actual = $hl->highlightAuto($raw);
$errMessage = sprintf(
"Expected language: %s; [1. %s (%d%%); 2. %s (%d%%)]",
$language,
$actual->language,
$actual->relevance,
$actual->secondBest->language,
$actual->secondBest->relevance
);
if (in_array($language, $this->allowedFailures)) {
$this->markTestSkipped("The '$language' auto-detection test is known to fail: $errMessage");
}
$this->assertEquals($language, $actual->language, $errMessage);
}
}
PK ! ;I I
bootstrap.phpnu Iw setExpectedException('\DomainException');
$hl = new Highlighter();
$hl->highlight("blah++", "als blurp eq z dan zeg 'flipper'");
}
public function testListLanguagesWithoutAliases()
{
$languageFinder = new Finder();
$expectedLanguageCount = $languageFinder->in(__DIR__ . '/../Highlight/languages/')->name('*.json')->count();
$hl = new Highlighter();
$availableLanguages = $hl->listLanguages();
$this->assertEquals($expectedLanguageCount, count($availableLanguages));
$availableLanguages = $hl->listLanguages(false);
$this->assertEquals($expectedLanguageCount, count($availableLanguages));
}
public function testListLanguagesWithAliases()
{
$languageFinder = new Finder();
$minimumLanguageCount = $languageFinder->in(__DIR__ . '/../Highlight/languages/')->name('*.json')->count();
$hl = new Highlighter();
$availableLanguages = $hl->listLanguages(true);
$this->assertGreaterThan($minimumLanguageCount, count($availableLanguages));
// Verify some common aliases/names are present.
$this->assertContains('yaml', $availableLanguages);
$this->assertContains('yml', $availableLanguages);
$this->assertContains('c++', $availableLanguages);
$this->assertContains('cpp', $availableLanguages);
}
public function testGetAliasesForLanguageWhenUsingMainLanguageName()
{
$languageDefinitionFile = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR .
'Highlight' . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR . "php.json";
$language = new Language('php', $languageDefinitionFile);
$expected_aliases = $language->aliases;
$expected_aliases[] = 'php';
sort($expected_aliases);
$hl = new Highlighter();
$aliases = $hl->getAliasesForLanguage('php');
sort($aliases);
$this->assertEquals($expected_aliases, $aliases);
}
public function testGetAliasesForLanguageWhenLanguageHasNoAliases()
{
$languageDefinitionFile = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR .
'Highlight' . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR . "ada.json";
$language = new Language('ada', $languageDefinitionFile);
$expected_aliases = $language->aliases;
$expected_aliases[] = 'ada';
sort($expected_aliases);
$hl = new Highlighter();
$aliases = $hl->getAliasesForLanguage('ada');
sort($aliases);
$this->assertEquals($expected_aliases, $aliases);
}
public function testGetAliasesForLanguageWhenUsingLanguageAlias()
{
$languageDefinitionFile = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR .
'Highlight' . DIRECTORY_SEPARATOR . 'languages' . DIRECTORY_SEPARATOR . "php.json";
$language = new Language('php', $languageDefinitionFile);
$expected_aliases = $language->aliases;
$expected_aliases[] = 'php';
sort($expected_aliases);
$hl = new Highlighter();
$aliases = $hl->getAliasesForLanguage('php3');
sort($aliases);
$this->assertEquals($expected_aliases, $aliases);
}
public function testGetAliasesForLanguageRaisesExceptionForNonExistingLanguage()
{
$this->setExpectedException('\DomainException');
$hl = new Highlighter();
$hl->getAliasesForLanguage('blah+');
}
}
PK ! ShZ Z special/sublanguages.txtnu Iw echo 'php'; /* ?> */ ?>
PK ! _+ special/sublanguages.expect.txtnu Iw <?echo'php'; /* ?> */?><body><script>document.write('Legacy code');</script></body>
PK ! $Y? special/languagealias.expect.txtnu Iw var x = '<p>this should <b>not</b> be highlighted as <em>HTML</em>';PK ! +[4D D special/languagealias.txtnu Iw var x = '
}
#someTag(parameter.list, goes, "here") {
This is an optional body here
}
#index(friends, "0") {
Hello, #(self)!
} ##else() {
Nobody's there!
}
#()
#raw() {
Hello
}
PK ! vr detect/vhdl/default.txtnu Iw /*
* RS-trigger with assynch. reset
*/
library ieee;
use ieee.std_logic_1164.all;
entity RS_trigger is
generic (T: Time := 0ns);
port ( R, S : in std_logic;
Q, nQ : out std_logic;
reset, clock : in std_logic );
end RS_trigger;
architecture behaviour of RS_trigger is
signal QT: std_logic; -- Q(t)
begin
process(clock, reset) is
subtype RS is std_logic_vector (1 downto 0);
begin
if reset = '0' then
QT <= '0';
else
if rising_edge(C) then
if not (R'stable(T) and S'stable(T)) then
QT <= 'X';
else
case RS'(R&S) is
when "01" => QT <= '1';
when "10" => QT <= '0';
when "11" => QT <= 'X';
when others => null;
end case;
end if;
end if;
end if;
end process;
Q <= QT;
nQ <= not QT;
end architecture behaviour;
PK ! B2 detect/cal/default.txtnu Iw OBJECT Codeunit 11 Gen. Jnl.-Check Line
{
OBJECT-PROPERTIES
{
Date=09-09-14;
Time=12:00:00;
Version List=NAVW18.00;
}
PROPERTIES
{
TableNo=81;
Permissions=TableData 252=rimd;
OnRun=BEGIN
GLSetup.GET;
RunCheck(Rec);
END;
}
CODE
{
VAR
Text000@1000 : TextConst 'ENU=can only be a closing date for G/L entries';
Text001@1001 : TextConst 'ENU=is not within your range of allowed posting dates';
PROCEDURE ErrorIfPositiveAmt@2(GenJnlLine@1000 : Record 81);
BEGIN
IF GenJnlLine.Amount > 0 THEN
GenJnlLine.FIELDERROR(Amount,Text008);
END;
LOCAL PROCEDURE CheckGenJnlLineDocType@7(GenJnlLine@1001 : Record 81);
}
}
PK ! ?M detect/stylus/default.txtnu Iw @import "nib"
// variables
$green = #008000
$green_dark = darken($green, 10)
// mixin/function
container()
max-width 980px
// mixin/function with parameters
buttonBG($color = green)
if $color == green
background-color #008000
else if $color == red
background-color #B22222
button
buttonBG(red)
.blue-button
buttonBG(blue)
#content, .content
font Tahoma, Chunkfive, sans-serif
background url('hatch.png')
color #F0F0F0 !important
width 100%
PK ! ni! detect/awk/default.txtnu Iw BEGIN {
POPService = "/inet/tcp/0/emailhost/pop3"
RS = ORS = "\r\n"
print "user name" |& POPService
POPService |& getline
print "pass password" |& POPService
POPService |& getline
print "retr 1" |& POPService
POPService |& getline
if ($1 != "+OK") exit
print "quit" |& POPService
RS = "\r\n\\.\r\n"
POPService |& getline
print $0
close(POPService)
}
PK ! ,&/ / detect/excel/default.txtnu Iw =IF(C10 <= 275.5, "Unprofitable", "Profitable")PK ! 9y detect/rust/default.txtnu Iw #[derive(Debug)]
pub enum State {
Start,
Transient,
Closed,
}
impl From<&'a str> for State {
fn from(s: &'a str) -> Self {
match s {
"start" => State::Start,
"closed" => State::Closed,
_ => unreachable!(),
}
}
}
PK ! B43 detect/r/default.txtnu Iw library(ggplot2)
centre <- function(x, type, ...) {
switch(type,
mean = mean(x),
median = median(x),
trimmed = mean(x, trim = .1))
}
myVar1
myVar.2
data$x
foo "bar" baz
# test "test"
"test # test"
(123) (1) (10) (0.1) (.2) (1e-7)
(1.2e+7) (2e) (3e+10) (0x0) (0xa)
(0xabcdef1234567890) (123L) (1L)
(0x10L) (10000000L) (1e6L) (1.1L)
(1e-3L) (4123.381E-10i)
(3.) (3.E10) # BUG: .E10 should be part of number
# Numbers in some different contexts
1L
0x40
.234
3.
1L + 30
plot(cars, xlim=20)
plot(cars, xlim=0x20)
foo<-30
my.data.3 <- read() # not a number
c(1,2,3)
1%%2
"this is a quote that spans
multiple lines
\"
is this still a quote? it should be.
# even still!
" # now we're done.
'same for
single quotes #'
# keywords
NULL, NA, TRUE, FALSE, Inf, NaN, NA_integer_,
NA_real_, NA_character_, NA_complex_, function,
while, repeat, for, if, in, else, next, break,
..., ..1, ..2
# not keywords
the quick brown fox jumped over the lazy dogs
null na true false inf nan na_integer_ na_real_
na_character_ na_complex_ Function While Repeat
For If In Else Next Break .. .... "NULL" `NULL` 'NULL'
# operators
+, -, *, /, %%, ^, >, >=, <, <=, ==, !=, !, &, |, ~,
->, <-, <<-, $, :, ::
# infix operator
foo %union% bar
%"test"%
`"test"`
PK ! {Hq q detect/haskell/default.txtnu Iw {-# LANGUAGE TypeSynonymInstances #-}
module Network.UDP
( DataPacket(..)
, openBoundUDPPort
, openListeningUDPPort
, pingUDPPort
, sendUDPPacketTo
, recvUDPPacket
, recvUDPPacketFrom
) where
import qualified Data.ByteString as Strict (ByteString, concat, singleton)
import qualified Data.ByteString.Lazy as Lazy (ByteString, toChunks, fromChunks)
import Data.ByteString.Char8 (pack, unpack)
import Network.Socket hiding (sendTo, recv, recvFrom)
import Network.Socket.ByteString (sendTo, recv, recvFrom)
-- Type class for converting StringLike types to and from strict ByteStrings
class DataPacket a where
toStrictBS :: a -> Strict.ByteString
fromStrictBS :: Strict.ByteString -> a
instance DataPacket Strict.ByteString where
toStrictBS = id
{-# INLINE toStrictBS #-}
fromStrictBS = id
{-# INLINE fromStrictBS #-}
openBoundUDPPort :: String -> Int -> IO Socket
openBoundUDPPort uri port = do
s <- getUDPSocket
bindAddr <- inet_addr uri
let a = SockAddrInet (toEnum port) bindAddr
bindSocket s a
return s
pingUDPPort :: Socket -> SockAddr -> IO ()
pingUDPPort s a = sendTo s (Strict.singleton 0) a >> return ()
PK ! $. detect/csp/default.txtnu Iw Content-Security-Policy:
default-src 'self';
style-src 'self' css.example.com;
img-src *.example.com;
script-src 'unsafe-eval' 'self' js.example.com 'nonce-Nc3n83cnSAd3wc3Sasdfn939hc3'
PK ! a8 8 detect/x86asm/default.txtnu Iw section .text
extern _MessageBoxA@16
%if __NASM_VERSION_ID__ >= 0x02030000
safeseh handler ; register handler as "safe handler"
%endif
handler:
push dword 1 ; MB_OKCANCEL
push dword caption
push dword text
push dword 0
call _MessageBoxA@16
sub eax,1 ; incidentally suits as return value
; for exception handler
ret
global _main
_main: push dword handler
push dword [fs:0]
mov dword [fs:0], esp
xor eax,eax
mov eax, dword[eax] ; cause exception
pop dword [fs:0] ; disengage exception handler
add esp, 4
ret
avx2: vzeroupper
push rbx
mov rbx, rsp
sub rsp, 0h20
vmovdqa ymm0, [rcx]
vpaddb ymm0, [rdx]
leave
ret
text: db 'OK to rethrow, CANCEL to generate core dump',0
caption:db 'SEGV',0
section .drectve info
db '/defaultlib:user32.lib /defaultlib:msvcrt.lib '
PK ! \Cg g detect/moonscript/default.txtnu Iw print "I am #{math.random! * 100}% sure."
my_function = (name="something", height=100) ->
print "Hello I am", name
print "My height is", height
my_function dance: "Tango", partner: "none"
my_func 5,4,3, -- multi-line arguments
8,9,10
table = {
name: "Bill",
age: 200,
["favorite food"]: "rice",
:keyvalue,
[1+7]: 'eight'
}
class Inventory
new: =>
@items = {}
add_item: (name) =>
if @items[name]
@items[name] += 1
else
@items[name] = 1
inv = Inventory!
inv\add_item "t-shirt"
inv\add_item "pants"
import
assert_csrf
require_login
from require "helpers"
PK ! )Pn detect/mipsasm/default.txtnu Iw .text
.global AckermannFunc
# Preconditions:
# 1st parameter ($a0) m
# 2nd parameter ($a1) n
# Postconditions:
# result in ($v0) = value of A(m,n)
AckermannFunc:
addi $sp, $sp, -8
sw $s0, 4($sp)
sw $ra, 0($sp)
# move the parameter registers to temporary - no, only when nec.
LABEL_IF: bne $a0, $zero, LABEL_ELSE_IF
addi $v0, $a1, 1
# jump to LABEL_DONE
j LABEL_DONE
PK ! W\ detect/dart/default.txtnu Iw library app;
import 'dart:html';
part 'app2.dart';
/**
* Class description and [link](http://dartlang.org/).
*/
@Awesome('it works!')
class SomeClass extends BaseClass implements Comparable {
factory SomeClass(num param);
SomeClass._internal(int q) : super() {
assert(q != 1);
double z = 0.0;
}
/// **Sum** function
int sum(int a, int b) => a + b;
ElementList els() => querySelectorAll('.dart');
}
String str = ' (${'parameter' + 'zxc'})';
String str = " (${true ? 2 + 2 / 2 : null})";
String str = " ($variable)";
String str = r'\nraw\';
String str = r"\nraw\";
var str = '''
Something ${2+3}
''';
var str = r"""
Something ${2+3}
""";
checkVersion() async {
var version = await lookUpVersion();
}
PK ! wS detect/dockerfile/default.txtnu Iw # Example instructions from https://docs.docker.com/reference/builder/
FROM ubuntu:14.04
MAINTAINER example@example.com
ENV foo /bar
WORKDIR ${foo} # WORKDIR /bar
ADD . $foo # ADD . /bar
COPY \$foo /quux # COPY $foo /quux
ARG VAR=FOO
RUN apt-get update && apt-get install -y software-properties-common\
zsh curl wget git htop\
unzip vim telnet
RUN ["/bin/bash", "-c", "echo hello ${USER}"]
CMD ["executable","param1","param2"]
CMD command param1 param2
EXPOSE 1337
ENV myName="John Doe" myDog=Rex\ The\ Dog \
myCat=fluffy
ENV myName John Doe
ENV myDog Rex The Dog
ENV myCat fluffy
ADD hom* /mydir/ # adds all files starting with "hom"
ADD hom?.txt /mydir/ # ? is replaced with any single character
COPY hom* /mydir/ # adds all files starting with "hom"
COPY hom?.txt /mydir/ # ? is replaced with any single character
COPY --from=foo / .
ENTRYPOINT ["executable", "param1", "param2"]
ENTRYPOINT command param1 param2
VOLUME ["/data"]
USER daemon
LABEL com.example.label-with-value="foo"
LABEL version="1.0"
LABEL description="This text illustrates \
that label-values can span multiple lines."
WORKDIR /path/to/workdir
ONBUILD ADD . /app/src
STOPSIGNAL SIGKILL
HEALTHCHECK --retries=3 cat /health
SHELL ["/bin/bash", "-c"]
PK ! QbA detect/properties/default.txtnu Iw # .properties
! Exclamation mark = comments, too
key1 = value1
key2 : value2
key3 value3
key\ spaces multiline\
value4
empty_key
! Key can contain escaped chars
\:\= = value5
PK ! ` detect/makefile/default.txtnu Iw # Makefile
BUILDDIR = _build
EXTRAS ?= $(BUILDDIR)/extras
.PHONY: main clean
main:
@echo "Building main facility..."
build_main $(BUILDDIR)
clean:
rm -rf $(BUILDDIR)/*
PK ! H detect/monkey/default.txtnu Iw #IMAGE_FILES="*.png|*.jpg"
#SOUND_FILES="*.wav|*.ogg"
#MUSIC_FILES="*.wav|*.ogg"
#BINARY_FILES="*.bin|*.dat"
Import mojo
' The main class which expends Mojo's 'App' class:
Class GameApp Extends App
Field player:Player
Method OnCreate:Int()
Local img:Image = LoadImage("player.png")
Self.player = New Player()
SetUpdateRate(60)
Return 0
End
Method OnUpdate:Int()
player.x += HALFPI
If (player.x > 100) Then
player.x = 0
Endif
Return 0
End
Method OnRender:Int()
Cls(32, 64, 128)
player.Draw()
player = Null
Return 0
End
End
PK ! DiPW W detect/xquery/default.txtnu Iw xquery version "3.1";
(:~
: @author Duncan Paterson
: @version 1.0:)
declare variable $local:num := math:log10(12345);
(
let $map := map { 'R': 'red', 'G': 'green', 'B': 'blue' }
return (
$map?* (: 1. returns all values; same as: map:keys($map) ! $map(.) :),
$map?R (: 2. returns the value associated with the key 'R'; same as: $map('R') :),
$map?('G','B') (: 3. returns the values associated with the key 'G' and 'B' :)
),
declare function local:city($country as node()*) as element (country) {
for $country in doc('factbook')//country
where $country/@population > 100000000
let $name := $country/name[1]
for $city in $country//city[population gt 1000000]
group by $name
return
element country { attribute type { $name },
$city/name }
};
return
('A', 'B', 'C') => count(),
{local:city(.) + $local:num}
PK ! A: : detect/sql/default.txtnu Iw CREATE TABLE "topic" (
"id" serial NOT NULL PRIMARY KEY,
"forum_id" integer NOT NULL,
"subject" varchar(255) NOT NULL
);
ALTER TABLE "topic"
ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id")
REFERENCES "forum" ("id");
-- Initials
insert into "topic" ("forum_id", "subject")
values (2, 'D''artagnian');
PK ! NJ detect/mizar/default.txtnu Iw ::: ## Lambda calculus
environ
vocabularies LAMBDA,
NUMBERS,
NAT_1, XBOOLE_0, SUBSET_1, FINSEQ_1, XXREAL_0, CARD_1,
ARYTM_1, ARYTM_3, TARSKI, RELAT_1, ORDINAL4, FUNCOP_1;
:: etc...
begin
reserve D for DecoratedTree,
p,q,r for FinSequence of NAT,
x for set;
definition
let D;
attr D is LambdaTerm-like means
(dom D qua Tree) is finite &
::> *143,306
for r st r in dom D holds
r is FinSequence of {0,1} &
r^<*0*> in dom D implies D.r = 0;
end;
registration
cluster LambdaTerm-like for DecoratedTree of NAT;
existence;
::> *4
end;
definition
mode LambdaTerm is LambdaTerm-like DecoratedTree of NAT;
end;
::: Then we extend this ordinary one-step beta reduction, that is,
::: any subterm is also allowed to reduce.
definition
let M,N;
pred M beta N means
ex p st
M|p beta_shallow N|p &
for q st not p is_a_prefix_of q holds
[r,x] in M iff [r,x] in N;
end;
theorem Th4:
ProperPrefixes (v^<*x*>) = ProperPrefixes v \/ {v}
proof
thus ProperPrefixes (v^<*x*>) c= ProperPrefixes v \/ {v}
proof
let y;
assume y in ProperPrefixes (v^<*x*>);
then consider v1 such that
A1: y = v1 and
A2: v1 is_a_proper_prefix_of v^<*x*> by TREES_1:def 2;
v1 is_a_prefix_of v & v1 <> v or v1 = v by A2,TREES_1:9;
then
v1 is_a_proper_prefix_of v or v1 in {v} by TARSKI:def 1,XBOOLE_0:def 8;
then y in ProperPrefixes v or y in {v} by A1,TREES_1:def 2;
hence thesis by XBOOLE_0:def 3;
end;
let y;
assume y in ProperPrefixes v \/ {v};
then A3: y in ProperPrefixes v or y in {v} by XBOOLE_0:def 3;
A4: now
assume y in ProperPrefixes v;
then consider v1 such that
A5: y = v1 and
A6: v1 is_a_proper_prefix_of v by TREES_1:def 2;
v is_a_prefix_of v^<*x*> by TREES_1:1;
then v1 is_a_proper_prefix_of v^<*x*> by A6,XBOOLE_1:58;
hence thesis by A5,TREES_1:def 2;
end;
v^{} = v by FINSEQ_1:34;
then
v is_a_prefix_of v^<*x*> & v <> v^<*x*> by FINSEQ_1:33,TREES_1:1;
then v is_a_proper_prefix_of v^<*x*> by XBOOLE_0:def 8;
then y in ProperPrefixes v or y = v & v in ProperPrefixes (v^<*x*>)
by A3,TARSKI:def 1,TREES_1:def 2;
hence thesis by A4;
end;PK ! Qޜ detect/clean/default.txtnu Iw module fsieve
import StdClass; // RWS
import StdInt, StdReal
NrOfPrimes :== 3000
primes :: [Int]
primes = pr where pr = [5 : sieve 7 4 pr]
sieve :: Int !Int [Int] -> [Int]
sieve g i prs
| isPrime prs g (toInt (sqrt (toReal g))) = [g : sieve` g i prs]
| otherwise = sieve (g + i) (6 - i) prs
sieve` :: Int Int [Int] -> [Int]
sieve` g i prs = sieve (g + i) (6 - i) prs
isPrime :: [Int] !Int Int -> Bool
isPrime [f:r] pr bd
| f>bd = True
| pr rem f==0 = False
| otherwise = isPrime r pr bd
select :: [x] Int -> x
select [f:r] 1 = f
select [f:r] n = select r (n - 1)
Start :: Int
Start = select [2, 3 : primes] NrOfPrimes
PK ! # detect/mel/default.txtnu Iw proc string[] getSelectedLights()
{
string $selectedLights[];
string $select[] = `ls -sl -dag -leaf`;
for ( $shape in $select )
{
// Determine if this is a light.
//
string $class[] = getClassification( `nodeType $shape` );
if ( ( `size $class` ) > 0 && ( "light" == $class[0] ) )
{
$selectedLights[ `size $selectedLights` ] = $shape;
}
}
// Result is an array of all lights included in
// current selection list.
return $selectedLights;
}
PK ! } detect/delphi/default.txtnu Iw TList = Class(TObject)
Private
Some: String;
Public
Procedure Inside; // Suxx
End;{TList}
Procedure CopyFile(InFileName, var OutFileName: String);
Const
BufSize = 4096; (* Huh? *)
Var
InFile, OutFile: TStream;
Buffer: Array[1..BufSize] Of Byte;
ReadBufSize: Integer;
Begin
InFile := Nil;
OutFile := Nil;
Try
InFile := TFileStream.Create(InFileName, fmOpenRead);
OutFile := TFileStream.Create(OutFileName, fmCreate);
Repeat
ReadBufSize := InFile.Read(Buffer, BufSize);
OutFile.Write(Buffer, ReadBufSize);
Until ReadBufSize<>BufSize;
Log('File ''' + InFileName + ''' copied'#13#10);
Finally
InFile.Free;
OutFile.Free;
End;{Try}
End;{CopyFile}
PK ! >Z] ] detect/tcl/default.txtnu Iw package json
source helper.tcl
# randomness verified by a die throw
set ::rand 4
proc give::recursive::count {base p} { ; # 2 mandatory params
while {$p > 0} {
set result [expr $result * $base]; incr p -1
}
return $result
}
set a {a}; set b "bcdef"; set lst [list "item"]
puts [llength $a$b]
set ::my::tid($id) $::my::tid(def)
lappend lst $arr($idx) $::my::arr($idx) $ar(key)
lreplace ::my::tid($id) 4 4
puts $::rand ${::rand} ${::AWESOME::component::variable}
puts "$x + $y is\t [expr $x + $y]"
proc isprime x {
expr {$x>1 && ![regexp {^(oo+?)\1+$} [string repeat o $x]]}
}
PK ! % detect/twig/default.txtnu Iw {% if posts|length %}
{% for article in articles %}
<div>
{{ article.title|upper() }}
{# outputs 'WELCOME' #}
</div>
{% endfor %}
{% endif %}
{% set user = json_encode(user) %}
{{ random(['apple', 'orange', 'citrus']) }}
{{ include(template_from_string("Hello {{ name }}")) }}
{#
Comments may be long and multiline.
Markup is <em>not</em> highlighted within comments.
#}
PK ! Cb2 2 detect/vbnet/default.txtnu Iw Import System
Import System.IO
#Const DEBUG = True
Namespace Highlighter.Test
''' This is an example class.
Public Class Program
Protected Shared hello As Integer = 3
Private Const ABC As Boolean = False
#Region "Code"
' Cheers!
_
Public Shared Sub Main(ByVal args() As String, ParamArray arr As Object) Handles Form1.Click
On Error Resume Next
If ABC Then
While ABC : Console.WriteLine() : End While
For i As Long = 0 To 1000 Step 123
Try
System.Windows.Forms.MessageBox.Show(CInt("1").ToString())
Catch ex As Exception ' What are you doing? Well...
Dim exp = CType(ex, IOException)
REM ORZ
Return
End Try
Next
Else
Dim l As New System.Collections.List()
SyncLock l
If TypeOf l Is Decimal And l IsNot Nothing Then
RemoveHandler button1.Paint, delegate
End If
Dim d = New System.Threading.Thread(AddressOf ThreadProc)
Dim a = New Action(Sub(x, y) x + y)
Static u = From x As String In l Select x.Substring(2, 4) Where x.Length > 0
End SyncLock
Do : Laugh() : Loop Until hello = 4
End If
End Sub
#End Region
End Class
End Namespace
PK ! "{ { detect/isbl/default.txtnu Iw // Описание констант
ADD_EQUAL_NUMBER_TEMPLATE = "%s.%s = %s"
EMPLOYEES_REFERENCE = "РАБ"
/*********************************************
* Получить список кодов или ИД работников, *
* соответствующих текущему пользователю *
*********************************************/
Employees: IReference.РАБ = CreateReference(EMPLOYEES_REFERENCE;
ArrayOf("Пользователь"; SYSREQ_STATE); MyFunction(FALSE; MyParam * 0.05))
Employees.Events.DisableAll
EmployeesTableName = Employees.TableName
EmployeesUserWhereID = Employees.AddWhere(Format(ADD_EQUAL_NUMBER_TEMPLATE;
ArrayOf(EmployeesTableName; Employees.Requisites("Пользователь").SQLFieldName;
EDocuments.CurrentUser.ID)))
Employees.Open()
Result = CreateStringList()
foreach Employee in Employees
if IsResultCode
Result.Add(Employee.SYSREQ_CODE)
else
Result.Add(Employee.SYSREQ_ID)
endif
endforeach
Employees.Close()
Employees.DelWhere(EmployeesUserWhereID)
Employees.Events.EnableAll
Employees = nilPK ! U detect/prolog/default.txtnu Iw mergesort([],[]). % special case
mergesort([A],[A]).
mergesort([A,B|R],S) :-
split([A,B|R],L1,L2),
mergesort(L1,S1),
mergesort(L2,S2),
merge(S1,S2,S).
split([],[],[]).
split([A],[A],[]).
split([A,B|R],[A|Ra],[B|Rb]) :- split(R,Ra,Rb).
PK ! @I detect/less/default.txtnu Iw @import "fruits";
@rhythm: 1.5em;
@media screen and (min-resolution: 2dppx) {
body {font-size: 125%}
}
section > .foo + #bar:hover [href*="less"] {
margin: @rhythm 0 0 @rhythm;
padding: calc(5% + 20px);
background: #f00ba7 url(http://placehold.alpha-centauri/42.png) no-repeat;
background-image: linear-gradient(-135deg, wheat, fuchsia) !important ;
background-blend-mode: multiply;
}
@font-face {
font-family: /* ? */ 'Omega';
src: url('../fonts/omega-webfont.woff?v=2.0.2');
}
.icon-baz::before {
display: inline-block;
font-family: "Omega", Alpha, sans-serif;
content: "\f085";
color: rgba(98, 76 /* or 54 */, 231, .75);
}
PK ! ?+H H detect/capnproto/default.txtnu Iw @0xdbb9ad1f14bf0b36; # unique file ID, generated by `capnp id`
struct Person {
name @0 :Text;
birthdate @3 :Date;
email @1 :Text;
phones @2 :List(PhoneNumber);
struct PhoneNumber {
number @0 :Text;
type @1 :Type;
enum Type {
mobile @0;
home @1;
work @2;
}
}
}
struct Date {
year @0 :Int16;
month @1 :UInt8;
day @2 :UInt8;
flags @3 :List(Bool) = [ true, false, false, true ];
}
interface Node {
isDirectory @0 () -> (result :Bool);
}
interface Directory extends(Node) {
list @0 () -> (list: List(Entry));
struct Entry {
name @0 :Text;
node @1 :Node;
}
create @1 (name :Text) -> (file :File);
mkdir @2 (name :Text) -> (directory :Directory)
open @3 (name :Text) -> (node :Node);
delete @4 (name :Text);
link @5 (name :Text, node :Node);
}
interface File extends(Node) {
size @0 () -> (size: UInt64);
read @1 (startAt :UInt64 = 0, amount :UInt64 = 0xffffffffffffffff)
-> (data: Data);
# Default params = read entire file.
write @2 (startAt :UInt64, data :Data);
truncate @3 (size :UInt64);
}PK ! O detect/objectivec/default.txtnu Iw #import
#import "Dependency.h"
@protocol WorldDataSource
@optional
- (NSString*)worldName;
@required
- (BOOL)allowsToLive;
@end
@property (nonatomic, readonly) NSString *title;
- (IBAction) show;
@end
PK ! ' detect/mathematica/default.txtnu Iw (* ::Package:: *)
(* Mathematica Package *)
BeginPackage["SomePkg`"]
Begin["`Private`"]
SomeFn[ns_List] := Fold[Function[{x, y}, x + y], 0, Map[# * 2 &, ns]];
Print[$ActivationKey];
End[] (* End Private Context *)
EndPackage[]
PK ! detect/dns/default.txtnu Iw $ORIGIN example.com. ; designates the start of this zone file in the namespace
$TTL 1h ; default expiration time of all resource records without their own TTL value
example.com. IN SOA ns.example.com. username.example.com. ( 2007120710 1d 2h 4w 1h )
example.com. IN NS ns ; ns.example.com is a nameserver for example.com
example.com. IN NS ns.somewhere.example. ; ns.somewhere.example is a backup nameserver for example.com
example.com. IN MX 10 mail.example.com. ; mail.example.com is the mailserver for example.com
@ IN MX 20 mail2.example.com. ; equivalent to above line, "@" represents zone origin
@ IN MX 50 mail3 ; equivalent to above line, but using a relative host name
example.com. IN A 192.0.2.1 ; IPv4 address for example.com
IN AAAA 2001:db8:10::1 ; IPv6 address for example.com
ns IN A 192.0.2.2 ; IPv4 address for ns.example.com
IN AAAA 2001:db8:10::2 ; IPv6 address for ns.example.com
www IN CNAME example.com. ; www.example.com is an alias for example.com
wwwtest IN CNAME www ; wwwtest.example.com is another alias for www.example.com
mail IN A 192.0.2.3 ; IPv4 address for mail.example.com
mail2 IN A 192.0.2.4 ; IPv4 address for mail2.example.com
mail3 IN A 192.0.2.5 ; IPv4 address for mail3.example.com
PK ! Ļ detect/xl/default.txtnu Iw import Animate
import SeasonsGreetingsTheme
import "myhelper.xl"
theme "SeasonsGreetings"
function X:real -> sin(X*0.5) + 16#0.002
page "A nice car",
// --------------------------------------
// Display car model on a pedestal
// --------------------------------------
clear_color 0, 0, 0, 1
hand_scale -> 0.3
// Display the background image
background -4000,
locally
disable_depth_test
corridor N:integer ->
locally
rotatez 60 * N
translatex 1000
rotatey 90
color "white"
texture "stars.png"
texture_wrap true, true
texture_transform
translate (time + N) * 0.02 mod 1, 0, 0
scale 0.2, 0.3, 0.3
rectangle 0, 0, 100000, 1154
PK ! /ޤ detect/pf/default.txtnu Iw # from the PF FAQ: http://www.openbsd.org/faq/pf/example1.html
# macros
int_if="xl0"
tcp_services="{ 22, 113 }"
icmp_types="echoreq"
comp3="192.168.0.3"
# options
set block-policy return
set loginterface egress
set skip on lo
# FTP Proxy rules
anchor "ftp-proxy/*"
pass in quick on $int_if inet proto tcp to any port ftp \
divert-to 127.0.0.1 port 8021
# match rules
match out on egress inet from !(egress:network) to any nat-to (egress:0)
# filter rules
block in log
pass out quick
antispoof quick for { lo $int_if }
pass in on egress inet proto tcp from any to (egress) \
port $tcp_services
pass in on egress inet proto tcp to (egress) port 80 rdr-to $comp3
pass in inet proto icmp all icmp-type $icmp_types
pass in on $int_if
PK ! &) 1 1 detect/avrasm/default.txtnu Iw ;* Title: Block Copy Routines
;* Version: 1.1
.include "8515def.inc"
rjmp RESET ;reset handle
.def flashsize=r16 ;size of block to be copied
flash2ram:
lpm ;get constant
st Y+,r0 ;store in SRAM and increment Y-pointer
adiw ZL,1 ;increment Z-pointer
dec flashsize
brne flash2ram ;if not end of table, loop more
ret
.def ramtemp =r1 ;temporary storage register
.def ramsize =r16 ;size of block to be copied
PK ! $m detect/nix/default.txtnu Iw { stdenv, foo, bar ? false, ... }:
/*
* foo
*/
let
a = 1; # just a comment
b = null;
c = toString 10;
in stdenv.mkDerivation rec {
name = "foo-${version}";
version = "1.3";
configureFlags = [ "--with-foo2" ] ++ stdenv.lib.optional bar "--with-foo=${ with stdenv.lib; foo }"
postInstall = ''
${ if true then "--${test}" else false }
'';
meta = with stdenv.lib; {
homepage = https://nixos.org;
};
}
PK ! )0, , detect/css/default.txtnu Iw @font-face {
font-family: Chunkfive; src: url('Chunkfive.otf');
}
body, .usertext {
color: #F0F0F0; background: #600;
font-family: Chunkfive, sans;
--heading-1: 30px/32px Helvetica, sans-serif;
}
@import url(print.css);
@media print {
a[href^=http]::after {
content: attr(href)
}
}
PK ! UA detect/scala/default.txtnu Iw /**
* A person has a name and an age.
*/
case class Person(name: String, age: Int)
abstract class Vertical extends CaseJeu
case class Haut(a: Int) extends Vertical
case class Bas(name: String, b: Double) extends Vertical
sealed trait Ior[+A, +B]
case class Left[A](a: A) extends Ior[A, Nothing]
case class Right[B](b: B) extends Ior[Nothing, B]
case class Both[A, B](a: A, b: B) extends Ior[A, B]
trait Functor[F[_]] {
def map[A, B](fa: F[A], f: A => B): F[B]
}
// beware Int.MinValue
def absoluteValue(n: Int): Int =
if (n < 0) -n else n
def interp(n: Int): String =
s"there are $n ${color} balloons.\n"
type ξ[A] = (A, A)
trait Hist { lhs =>
def ⊕(rhs: Hist): Hist
}
def gsum[A: Ring](as: Seq[A]): A =
as.foldLeft(Ring[A].zero)(_ + _)
val actions: List[Symbol] =
'init :: 'read :: 'write :: 'close :: Nil
trait Cake {
type T;
type Q
val things: Seq[T]
abstract class Spindler
def spindle(s: Spindler, ts: Seq[T], reversed: Boolean = false): Seq[Q]
}
val colors = Map(
"red" -> 0xFF0000,
"turquoise" -> 0x00FFFF,
"black" -> 0x000000,
"orange" -> 0xFF8040,
"brown" -> 0x804000)
lazy val ns = for {
x <- 0 until 100
y <- 0 until 100
} yield (x + y) * 33.33
PK ! O O detect/cs/default.txtnu Iw using System.IO.Compression;
#pragma warning disable 414, 3021
namespace MyApplication
{
[Obsolete("...")]
class Program : IInterface
{
public static List JustDoIt(int count)
{
Console.WriteLine($"Hello {Name}!");
return new List(new int[] { 1, 2, 3 })
}
}
}
PK ! ˿
detect/python/default.txtnu Iw @requires_authorization
def somefunc(param1='', param2=0):
r'''A docstring'''
if param1 > param2: # interesting
print 'Gre\'ater'
return (param2 - param1 + 1 + 0b10l) or None
class SomeClass:
pass
>>> message = '''interpreter
... prompt'''
PK ! yE detect/erlang/default.txtnu Iw -module(ssh_cli).
-behaviour(ssh_channel).
-include("ssh.hrl").
%% backwards compatibility
-export([listen/1, listen/2, listen/3, listen/4, stop/1]).
if L =/= [] -> % If L is not empty
sum(L) / count(L);
true ->
error
end.
%% state
-record(state, {
cm,
channel
}).
-spec foo(integer()) -> integer().
foo(X) -> 1 + X.
test(Foo)->Foo.
init([Shell, Exec]) ->
{ok, #state{shell = Shell, exec = Exec}};
init([Shell]) ->
false = not true,
io:format("Hello, \"~p!~n", [atom_to_list('World')]),
{ok, #state{shell = Shell}}.
concat([Single]) -> Single;
concat(RList) ->
EpsilonFree = lists:filter(
fun (Element) ->
case Element of
epsilon -> false;
_ -> true
end
end,
RList),
case EpsilonFree of
[Single] -> Single;
Other -> {concat, Other}
end.
union_dot_union({union, _}=U1, {union, _}=U2) ->
union(lists:flatten(
lists:map(
fun (X1) ->
lists:map(
fun (X2) ->
concat([X1, X2])
end,
union_to_list(U2)
)
end,
union_to_list(U1)
))).
PK ! rN. . detect/roboconf/default.txtnu Iw # This is a comment
import toto.graph;
##
# Facet
##
facet VM {
installer: iaas;
}
# Components
VM_ec2 {
facets: VM;
children: cluster-node, mysql;
}
VM_openstack {
facets: VM;
children: cluster-node, mysql;
}
cluster-node {
alias: a cluster node;
installer: puppet;
exports: ip, port, optional-property1, optional_property2;
imports: cluster-node.ip (optional), cluster-node.port (optional), mysql.ip, mysql.port;
}
mysql {
alias: a MySQL database;
installer: puppet;
exports: ip, port;
}
##
# Normally, instances are defined in another file...
##
instance of VM_ec2 {
name: VM_;
count: 3;
my-instance-property: whatever;
instance of cluster-node {
name: cluster node; # An in-line comment
}
}
instance of VM_openstack {
name: VM_database;
instance of mysql {
name: mysql;
}
}
PK ! )ͳ detect/gml/default.txtnu Iw /// @description Collision code
// standard collision handling
// Horizontal collisions
if(place_meeting(x+hspd, y, obj_wall)) {
while(!place_meeting(x+sign(hspd), y, obj_wall)) {
x += sign(hspd);
}
hspd = 0;
}
x += hspd;
// Vertical collisions
if(place_meeting(x, y+vspd, collide_obj)) {
while(!place_meeting(x, y+sign(vspd), collide_obj)) {
y += sign(vspd);
}
vspd = 0;
}
y += vspd;
show_debug_message("This is a test");PK ! .MQܟ detect/scheme/default.txtnu Iw ;; Calculation of Hofstadter's male and female sequences as a list of pairs
(define (hofstadter-male-female n)
(letrec ((female (lambda (n)
(if (= n 0)
1
(- n (male (female (- n 1)))))))
(male (lambda (n)
(if (= n 0)
0
(- n (female (male (- n 1))))))))
(let loop ((i 0))
(if (> i n)
'()
(cons (cons (female i)
(male i))
(loop (+ i 1)))))))
(hofstadter-male-female 8)
(define (find-first func lst)
(call-with-current-continuation
(lambda (return-immediately)
(for-each (lambda (x)
(if (func x)
(return-immediately x)))
lst)
#f)))
PK ! Pi detect/javascript/default.txtnu Iw function $initHighlight(block, cls) {
try {
if (cls.search(/\bno\-highlight\b/) != -1)
return process(block, true, 0x0F) +
` class="${cls}"`;
} catch (e) {
/* handle exception */
}
for (var i = 0 / 2; i < classes.length; i++) {
if (checkCondition(classes[i]) === undefined)
console.log('undefined');
}
return (
{block}
)
}
export $initHighlight;
PK ! ! detect/javascript/short-plain.txtnu Iw const cluster = require('cluster');
const numCPUs = require('os').cpus().length;
if (cluster.isMaster) {
for (var i = 0; i < numCPUs; i++) {
cluster.fork();
}
}
PK ! detect/javascript/sample1.txtnu Iw // This was mis-detected as HSP and Perl because parsing of
// keywords in those languages allowed adjacent dots
window.requestAnimationFrame(function render() {
var pos = state.pos;
canvasEl.width = 500;
canvasEl.height = 300;
if (dpad.right) {
pos.x += 3;
} else if (dpad.left) {
pos.x -= 3;
}
ctx.fillStyle = '#AF8452';
ctx.fillRect(pos.x + 5, pos.y - 10, 10, 10);
window.requestAnimationFrame(render);
});
PK ! l, , detect/cpp/default.txtnu Iw #include
int main(int argc, char *argv[]) {
/* An annoying "Hello World" example */
for (auto i = 0; i < 0xFFFF; i++)
cout << "Hello, World!" << endl;
char c = '\n';
unordered_map > m;
m["key"] = "\\\\"; // this is an error
return -2e3 + 12l;
}
PK ! q detect/cpp/comment.txtnu Iw /*
To use this program, compile it -- if you can -- and then type something like:
chan -n 5000 -d 2 < input.txt
In this case, it will produce 5000 words of output, checking two-word groups.
(The explanation above describes two-word generation. If you type "-d 3",
the program will find three-word groups, and so on. Greater depths make more
sense, but they require more input text and take more time to process.)
http://www.eblong.com/zarf/markov/
*/
/* make cpp win deterministically over others with C block comments */
cout << endl;
PK ! I
detect/sqf/default.txtnu Iw /***
Arma Scripting File
Edition: 1.66
***/
// Enable eating to improve health.
_unit addAction ["Eat Energy Bar", {
if (_this getVariable ["EB_NumActivation", 0] > 0) then {
_this setDamage (0 max (damage _this - 0.25));
} else {
hint "You have eaten it all";
};
// 4 - means something...
Z_obj_vip = nil;
[_boat, ["Black", 1], true] call BIS_fnc_initVehicle;
}];
PK ! ^O O detect/profile/default.txtnu Iw 261917242 function calls in 686.251 CPU seconds
ncalls tottime filename:lineno(function)
152824 513.894 {method 'sort' of 'list' objects}
129590630 83.894 rrule.py:842(__cmp__)
129590630 82.439 {cmp}
153900 1.296 rrule.py:399(_iter)
304393/151570 0.963 rrule.py:102(_iter_cached)
PK ! !iW W detect/pony/default.txtnu Iw use "collections"
class StopWatch
"""
A simple stopwatch class for performance micro-benchmarking
"""
var _s: U64 = 0
fun delta(): U64 =>
Time.nanos() - _s
actor LonelyPony
"""
A simple manifestation of the lonely pony problem
"""
var env: Env
let sw: StopWatch = StopWatch
new create(env': Env) =>
env = env
PK ! YN1 1 detect/typescript/default.txtnu Iw class MyClass {
public static myValue: string;
constructor(init: string) {
this.myValue = init;
}
}
import fs = require("fs");
module MyModule {
export interface MyInterface extends Other {
myProperty: any;
}
}
declare magicNumber number;
myArray.forEach(() => { }); // fat arrow syntax
PK ! H H detect/vim/default.txtnu Iw if foo > 2 || has("gui_running")
syntax on
set hlsearch
endif
set autoindent
" switch on highlighting
function UnComment(fl, ll)
while idx >= a:ll
let srclines=getline(idx)
let dstlines=substitute(srclines, b:comment, "", "")
call setline(idx, dstlines)
endwhile
endfunction
let conf = {'command': 'git'}
PK ! "+̋ detect/sas/default.txtnu Iw /**********************************************************************
* Program: example.sas
* Purpose: SAS Example for HighlightJS Plug-in
**********************************************************************/
%put Started at %sysfunc(putn(%sysfunc(datetime()), datetime.));
options
errors = 20 /* Maximum number of prints of repeat errors */
fullstimer /* Detailed timer after each step execution */
;
%let maindir = /path/to/maindir;
%let outdir = &maindir/out.;
systask command "mkdir -p &outdir." wait;
libname main "&maindir" access = readonly;
data testing;
input name $ number delimiter = ",";
datalines;
John,1
Mary,2
Jane,3
;
if number > 1 then final = 0;
else do;
final = 1;
end;
run;
%macro testMacro(positional, named = value);
%put positional = &positional.;
%put named = &named.;
%mend testMacro;
%testMacro(positional, named = value);
dm 'clear log output odsresults';
proc datasets lib = work kill noprint; quit;
libname _all_ clear;
data _null_;
set sashelp.macro(
keep = name
where = (scope = "global");
);
call symdel(name);
run;
PK ! spN N detect/plaintext/default.txtnu Iw id | description
----+-------------
1 | one
2 | two
3 | three
(3 rows)
PK ! +Y Y detect/coq/default.txtnu Iw Inductive seq : nat -> Set :=
| niln : seq 0
| consn : forall n : nat, nat -> seq n -> seq (S n).
Fixpoint length (n : nat) (s : seq n) {struct s} : nat :=
match s with
| niln => 0
| consn i _ s' => S (length i s')
end.
Theorem length_corr : forall (n : nat) (s : seq n), length n s = n.
Proof.
intros n s.
(* reasoning by induction over s. Then, we have two new goals
corresponding on the case analysis about s (either it is
niln or some consn *)
induction s.
(* We are in the case where s is void. We can reduce the
term: length 0 niln *)
simpl.
(* We obtain the goal 0 = 0. *)
trivial.
(* now, we treat the case s = consn n e s with induction
hypothesis IHs *)
simpl.
(* The induction hypothesis has type length n s = n.
So we can use it to perform some rewriting in the goal: *)
rewrite IHs.
(* Now the goal is the trivial equality: S n = S n *)
trivial.
(* Now all sub cases are closed, we perform the ultimate
step: typing the term built using tactics and save it as
a witness of the theorem. *)
Qed.
PK ! b0 detect/tex/default.txtnu Iw \documentclass{article}
\usepackage[koi8-r]{inputenc}
\hoffset=0pt
\voffset=.3em
\tolerance=400
\newcommand{\eTiX}{\TeX}
\begin{document}
\section*{Highlight.js}
\begin{table}[c|c]
$\frac 12\, + \, \frac 1{x^3}\text{Hello \! world}$ & \textbf{Goodbye\~ world} \\\eTiX $ \pi=400 $
\end{table}
Ch\'erie, \c{c}a ne me pla\^\i t pas! % comment \b
G\"otterd\"ammerung~45\%=34.
$$
\int\limits_{0}^{\pi}\frac{4}{x-7}=3
$$
\end{document}
PK ! | detect/oxygene/default.txtnu Iw namespace LinkedList;
interface
uses
System.Text;
type
List = public class
where T is Object;
private
method AppendToString(aBuilder: StringBuilder);
public
constructor(aData: T);
constructor(aData: T; aNext: List);
property Next: List;
property Data: T;
method ToString: string; override;
end;
implementation
constructor List(aData: T);
begin
Data := aData;
end;
constructor List(aData: T; aNext: List);
begin
constructor(aData);
Next := aNext;
end;
method List.ToString: string;
begin
with lBuilder := new StringBuilder do begin
AppendToString(lBuilder);
result := lBuilder.ToString();
end;
end;
method List.AppendToString(aBuilder: StringBuilder);
begin
if assigned(Data) then
aBuilder.Append(Data.ToString)
else
aBuilder.Append('nil');
if assigned(Next) then begin
aBuilder.Append(', ');
Next.AppendToString(aBuilder);
end;
end;
end.
PK ! H% % detect/thrift/default.txtnu Iw namespace * thrift.test
/**
* Docstring!
*/
enum Numberz
{
ONE = 1,
TWO,
THREE,
FIVE = 5,
SIX,
EIGHT = 8
}
const Numberz myNumberz = Numberz.ONE;
// the following is expected to fail:
// const Numberz urNumberz = ONE;
typedef i64 UserId
struct Msg
{
1: string message,
2: i32 type
}
struct NestedListsI32x2
{
1: list> integerlist
}
struct NestedListsI32x3
{
1: list>> integerlist
}
service ThriftTest
{
void testVoid(),
string testString(1: string thing),
oneway void testInit()
}PK ! detect/fix/default.txtnu Iw 8=FIX.4.2␁9=0␁35=8␁49=SENDERTEST␁56=TARGETTEST␁34=00000001526␁52=20120429-13:30:08.137␁1=ABC12345␁11=2012abc1234␁14=100␁17=201254321␁20=0␁30=NYSE␁31=108.20␁32=100␁38=100␁39=2␁40=1␁47=A␁54=5␁55=BRK␁59=2␁60=20120429-13:30:08.000␁65=B␁76=BROKER␁84=0␁100=NYSE␁111=100␁150=2␁151=0␁167=CS␁377=N␁10000=SampleCustomTag␁10=123␁
8=FIX.4.29=035=849=SENDERTEST56=TARGETTEST34=0000000152652=20120429-13:30:08.1371=ABC1234511=2012abc123414=10017=20125432120=030=NYSE31=108.2032=10038=10039=240=147=A54=555=BRK59=260=20120429-13:30:08.00065=B76=BROKER84=0100=NYSE111=100150=2151=0167=CS377=N10000=SampleCustomTag10=123
PK ! 5>$ detect/smali/default.txtnu Iw .class public Lcom/test/Preferences;
.super Landroid/preference/PreferenceActivity;
.source "Preferences.java"
# instance fields
.field private PACKAGE_NAME:Ljava/lang/String;
# direct methods
.method public constructor ()V
.registers 1
.annotation build Landroid/annotation/SuppressLint;
value = {
"InlinedApi"
}
.end annotation
.prologue
.line 25
invoke-direct {p0}, Landroid/preference/PreferenceActivity;->()V
const-string v4, "ASDF!"
.line 156
.end local v0 #customOther:Landroid/preference/Preference;
.end local v1 #customRate:Landroid/preference/Preference;
.end local v2 #hideApp:Landroid/preference/Preference;
:cond_56
.line 135
invoke-static {p1}, Lcom/google/ads/AdActivity;->b(Lcom/google/ads/internal/d;)Lcom/google/ads/internal/d;
.line 140
:cond_e
monitor-exit v1
:try_end_f
.catchall {:try_start_5 .. :try_end_f} :catchall_30
.line 143
invoke-virtual {p1}, Lcom/google/ads/internal/d;->g()Lcom/google/ads/m;
move-result-object v0
iget-object v0, v0, Lcom/google/ads/m;->c:Lcom/google/ads/util/i$d;
invoke-virtual {v0}, Lcom/google/ads/util/i$d;->a()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/Activity;
.line 144
if-nez v0, :cond_33
.line 145
const-string v0, "activity was null while launching an AdActivity."
invoke-static {v0}, Lcom/google/ads/util/b;->e(Ljava/lang/String;)V
.line 160
:goto_22
return-void
.line 136
:cond_23
:try_start_23
invoke-static {}, Lcom/google/ads/AdActivity;->c()Lcom/google/ads/internal/d;
move-result-object v0
if-eq v0, p1, :cond_e
return-void
.end method
PK ! $B detect/rib/default.txtnu Iw FrameBegin 0
Display "Scene" "framebuffer" "rgb"
Option "searchpath" "shader" "+&:/home/kew"
Option "trace" "int maxdepth" [4]
Attribute "visibility" "trace" [1]
Attribute "irradiance" "maxerror" [0.1]
Attribute "visibility" "transmission" "opaque"
Format 640 480 1.0
ShadingRate 2
PixelFilter "catmull-rom" 1 1
PixelSamples 4 4
Projection "perspective" "fov" 49.5502811377
Scale 1 1 -1
WorldBegin
ReadArchive "Lamp.002_Light/instance.rib"
Surface "plastic"
ReadArchive "Cube.004_Mesh/instance.rib"
# ReadArchive "Sphere.010_Mesh/instance.rib"
# ReadArchive "Sphere.009_Mesh/instance.rib"
ReadArchive "Sphere.006_Mesh/instance.rib"
WorldEnd
FrameEnd
PK ! detect/aspectj/default.txtnu Iw package com.aspectj.syntax;
import org.aspectj.lang.annotation.AdviceName;
privileged public aspect LoggingAspect percflowbelow(ajia.services.*){
private pointcut getResult() : call(* *(..) throws SQLException) && args(Account, .., int);
@AdviceName("CheckValidEmail")
before (Customer hu) : getResult(hu){
System.out.println("Your mail address is valid!");
}
Object around() throws InsufficientBalanceException: getResult() && call(Customer.new(String,String,int,int,int)){
return proceed();
}
public Cache getCache() {
return this.cache;
}
pointcut beanPropertyChange(BeanSupport bean, Object newValue): execution(void BeanSupport+.set*(*)) && args(newValue) && this(bean);
declare parents: banking.entities.* implements BeanSupport;
declare warning : call(void TestSoftening.perform()): "Please ensure you are not calling this from an AWT thread";
private String Identifiable.id;
public void Identifiable.setId(String id) {
this.id = id;
}
}PK ! d detect/http/default.txtnu Iw POST /task?id=1 HTTP/1.1
Host: example.org
Content-Type: application/json; charset=utf-8
Content-Length: 137
{
"status": "ok",
"extended": true,
"results": [
{"value": 0, "type": "int64"},
{"value": 1.0e+3, "type": "decimal"}
]
}
PK ! {$,- - detect/htmlbars/default.txtnu Iw
{{!-- only output this author names if an author exists --}}
{{#if author}}
{{#playwright-wrapper playwright=author action=(mut author) as |playwright|}}
{{playwright.firstName}} {{playwright.lastName}}
{{/playwright-wrapper}}
{{/if}}
{{yield}}
PK ! ) ) detect/hsp/default.txtnu Iw #include "foo.hsp"
// line comment
message = "Hello, World!"
message2 = {"Multi
line
string"}
num = 0
mes message
input num : button "sqrt", *label
stop
*label
/*
block comment
*/
if(num >= 0) {
dialog "sqrt(" + num + ") = " + sqrt(num)
} else {
dialog "error", 1
}
stop
PK ! uj detect/bnf/default.txtnu Iw ::= | ::= "<" ">" "::=" ::= " " | ""
::= | "|" ::= | ::= | ::= | "<" ">"
::= '"' '"' | "'" "'"
PK ! R R detect/axapta/default.txtnu Iw class ExchRateLoadBatch extends RunBaseBatch {
ExchRateLoad rbc;
container currencies;
boolean actual;
boolean overwrite;
date beg;
date end;
#define.CurrentVersion(5)
#localmacro.CurrentList
currencies,
actual,
beg,
end
#endmacro
}
public boolean unpack(container packedClass) {
container base;
boolean ret;
Integer version = runbase::getVersion(packedClass);
switch (version) {
case #CurrentVersion:
[version, #CurrentList] = packedClass;
return true;
default:
return false;
}
return ret;
}
PK ! iSv v detect/ada/default.txtnu Iw package body Sqlite.Simple is
Foo : int := int'Size;
Bar : int := long'Size;
Error_Message_C : chars_ptr := Sqlite_Errstr (Error);
Error_Message : String := Null_Ignore_Value (Error_Message_C);
begin
Named : for Index in Foo..Bar loop
Put ("Hi[]{}");
end loop Named;
Foo := Bar;
end Message;
end Sqlite.Simple;
PK ! x)
detect/php/default.txtnu Iw require_once 'Zend/Uri/Http.php';
namespace Location\Web;
interface Factory
{
static function _factory();
}
abstract class URI extends BaseURI implements Factory
{
abstract function test();
public static $st1 = 1;
const ME = "Yo";
var $list = NULL;
private $var;
/**
* Returns a URI
*
* @return URI
*/
static public function _factory($stats = array(), $uri = 'http')
{
echo __METHOD__;
$uri = explode(':', $uri, 0b10);
$schemeSpecific = isset($uri[1]) ? $uri[1] : '';
$desc = 'Multi
line description';
// Security check
if (!ctype_alnum($scheme)) {
throw new Zend_Uri_Exception('Illegal scheme');
}
$this->var = 0 - self::$st;
$this->list = list(Array("1"=> 2, 2=>self::ME, 3 => \Location\Web\URI::class));
return [
'uri' => $uri,
'value' => null,
];
}
}
echo URI::ME . URI::$st1;
__halt_compiler () ; datahere
datahere
datahere */
datahere
PK ! Ri/ / detect/julia-repl/default.txtnu Iw julia> function foo(x) x + 1 end
foo (generic function with 1 method)
julia> foo(42)
43
julia> foo(42) === 43.
false
Here we match all three lines of code:
julia> function foo(x::Float64)
42. - x
end
foo (generic function with 2 methods)
julia> for x in Any[1, 2, 3.4]
println("foo($x) = $(foo(x))")
end
foo(1) = 2
foo(2) = 3
foo(3.4) = 38.6
... unless it is not properly indented:
julia> function foo(x)
x + 1
end
Ordinary Julia code does not get highlighted:
Pkg.add("Combinatorics")
abstract type Foo end
PK ! 1 1 detect/apache/default.txtnu Iw # rewrite`s rules for wordpress pretty url
LoadModule rewrite_module modules/mod_rewrite.so
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [NC,L]
ExpiresActive On
ExpiresByType application/x-javascript "access plus 1 days"
Order Deny,Allow
Allow from All
RewriteMap map txt:map.txt
RewriteMap lower int:tolower
RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC]
RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND
RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L]
PK ! )'6 6 ! detect/livecodeserver/default.txtnu Iw 2000000000 then
put "Welcome to the future!"
else
return "something"
end if
end myFunction
--| END OF blog.lc
--| Location: ./system/application/controllers/blog.lc
----------------------------------------------------------------------
PK ! ) ) detect/swift/default.txtnu Iw import Foundation
@objc class Person: Entity {
var name: String!
var age: Int!
init(name: String, age: Int) {
/* /* ... */ */
}
// Return a descriptive string for this person
func description(offset: Int = 0) -> String {
return "\(name) is \(age + offset) years old"
}
}
PK ! y6 detect/gauss/default.txtnu Iw // This is a test
#include pv.sdf
proc (1) = calc(local__row, fin);
if local__row;
nr = local__row;
else;
k = colsf(fin);
nr = floor(minc(maxbytes/(k*8*3.5)|maxvec/(k+1)));
endif;
retp(nr);
endp;
s = "{% test string %}";
fn twopi=pi*2;
/* Takes in multiple numbers.
Output sum */
keyword add(str);
local tok,sum;
sum = 0;
do until str $== "";
{ tok, str } = token(str);
sum = sum + stof(tok);
endo;
print "Sum is: " sum;
endp;
PK ! { detect/julia/default.txtnu Iw ### Types
# Old-style definitions
immutable Point{T<:AbstractFloat}
index::Int
x::T
y::T
end
abstract A
type B <: A end
typealias P Point{Float16}
# New-style definitions
struct Plus
f::typeof(+)
end
mutable struct Mut
mutable::A # mutable should not be highlighted (not followed by struct)
primitive::B # primitive should not be highlighted (not followed by type)
end
primitive type Prim 8 end
abstract type Abstr end
### Modules
module M
using X
import Y
importall Z
export a, b, c
end # module
baremodule Bare
end
### New in 0.6
# where, infix isa, UnionAll
function F{T}(x::T) where T
for i in x
i isa UnionAll && return
end
end
### Miscellaneous
#=
Multi
Line
Comment
=#
function method0(x, y::Int; version::VersionNumber=v"0.1.2")
"""
Triple
Quoted
String
"""
@assert π > e
s = 1.2
変数 = "variable"
if s * 100_000 ≥ 5.2e+10 && true || x === nothing
s = 1. + .5im
elseif 1 ∈ [1, 2, 3]
println("s is $s and 変数 is $変数")
else
x = [1 2 3; 4 5 6]
@show x'
end
local var = rand(10)
global g = 44
var[1:5]
var[5:end-1]
var[end]
opt = "-la"
run(`ls $opt`)
try
ccall(:lib, (Ptr{Void},), Ref{C_NULL})
catch
throw(ArgumentError("wat"))
finally
warn("god save the queen")
end
'\u2200' != 'T'
return 5s / 2
end
PK ! ىzF@ @ detect/perl/default.txtnu Iw # loads object
sub load
{
my $flds = $c->db_load($id,@_) || do {
Carp::carp "Can`t load (class: $c, id: $id): '$!'"; return undef
};
my $o = $c->_perl_new();
$id12 = $id / 24 / 3600;
$o->{'ID'} = $id12 + 123;
#$o->{'SHCUT'} = $flds->{'SHCUT'};
my $p = $o->props;
my $vt;
$string =~ m/^sought_text$/;
$items = split //, 'abc';
$string //= "bar";
for my $key (keys %$p)
{
if(${$vt.'::property'}) {
$o->{$key . '_real'} = $flds->{$key};
tie $o->{$key}, 'CMSBuilder::Property', $o, $key;
}
}
$o->save if delete $o->{'_save_after_load'};
# GH-117
my $g = glob("/usr/bin/*");
return $o;
}
__DATA__
@@ layouts/default.html.ep
<%= title %>
<%= content %>
__END__
=head1 NAME
POD till the end of file
PK ! 縬s s detect/markdown/default.txtnu Iw # hello world
you can write text [with links](http://example.com) inline or [link references][1].
* one _thing_ has *em*phasis
* two __things__ are **bold**
[1]: http://example.com
---
hello world
===========
> markdown is so cool
so are code segments
1. one thing (yeah!)
2. two thing `i can write code`, and `more` wipee!
PK ! /- detect/taggerscript/default.txtnu Iw $if($is_video(),video,$if($is_lossless(),lossless,lossy))/
$if($is_video(),
$noop(Video track)
$if($ne(%album%,[non-album tracks]),
$if2(%albumartist%,%artist%) - %album%$if(%discsubtitle%, - %discsubtitle%)/%_discandtracknumber%%title%,
Music Videos/%artist%/%artist% - %title%),
$if($eq(%compilation%,1),
$noop(Various Artist albums)
$firstalphachar($if2(%albumartistsort%,%artistsort%))/$if2(%albumartist%,%artist%)/%album%$if(%_releasecomment%, \(%_releasecomment%\),)/%_discandtracknumber%%artist% - %title%,
$noop(Single Artist Albums)
$firstalphachar($if2(%albumartistsort%,%artistsort%))/$if2(%albumartist%,%artist%)/%album%$if(%_releasecomment%, \(%_releasecomment%\),)/%_discandtracknumber%%title%
))
PK ! j
detect/haxe/default.txtnu Iw package my.package;
#if js
import js.Browser;
#elseif sys
import Sys;
#else
import Date;
#end
import Lambda;
using Main.IntExtender;
extern class Math {
static var PI(default,null) : Float;
static function floor(v:Float):Int;
}
/**
* Abstract forwarding
*/
abstract MyAbstract(Int) from Int to Int {
inline function new(i:Int) {
this = i;
}
@:op(A * B)
public function multiply(rhs:MyAbstract) {
return this * rhs;
}
}
// an enum
enum Color {
Red;
Green;
Blue;
Rgb(r:Int, g:Int, b:Int);
}
@:generic
class Gen {
var v:T;
public function new(v:T) {
this.v = v;
}
public var x(get, set):T;
private inline function get_x():T
return v;
private inline function set_x(x:T):T
return v = x;
}
class Main extends BaseClass implements SomeFunctionality {
var callback:Void->Void = null;
var myArray:Array = new Array();
var arr = [4,8,0,3,9,1,5,2,6,7];
public function new(x) {
super(x);
}
public static function main() {
trace('What\'s up?');
trace('Hi, ${name}!');
// switch statements!
var c:Color = Color.Green;
var x:Int = switch(c) {
case Red: 0;
case Green: 1;
case Blue: 2;
case Rgb(r, g, b): 3;
case _: -1;
}
for(i in 0...3) {
trace(i);
continue;
break;
}
do {
trace("Hey-o!");
} while(false);
var done:Bool = false;
while(!done) {
done = true;
}
var H:Int = cast new MyAbstract(42);
var h:Int = cast(new MyAbstract(31), Int);
try {
throw "error";
}
catch(err:String) {
trace(err);
}
var map = new haxe.ds.IntMap();
var f = map.set.bind(_, "12");
}
function nothing():Void
trace("nothing!");
private inline function func(a:Int, b:Float, ?c:String, d:Bool=false):Dynamic {
return {
x: 0,
y: true,
z: false,
a: 1.53,
b: 5e10,
c: -12,
h: null
};
}
override function quicksort( lo : Int, hi : Int ) : Void {
var i = lo;
var j = hi;
var buf = arr;
var p = buf[(lo+hi)>>1];
while( i <= j ) {
while( arr[i] > p ) i++;
while( arr[j] < p ) j--;
if( i <= j ) {
var t = buf[i];
buf[i++] = buf[j];
buf[j--] = t;
}
}
if( lo < j ) quicksort( lo, j );
if( i < hi ) quicksort( i, hi );
}
}PK ! detect/gherkin/default.txtnu Iw # language: en
Feature: Addition
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
@this_is_a_tag
Scenario Outline: Add two numbers
* I have a calculator
Given I have entered into the calculator
And I have entered into the calculator
When I press