query
stringlengths
7
6.41k
document
stringlengths
12
28.8k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Tests that course's total_fee is not nil and is greater than or equal to 0 and returns true or false.
def total_fee_is_valid? return ((self.total_fee != nil) and (self.total_fee >= 0)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fee_per_meeting_is_valid?\n return ((self.fee_per_meeting != nil) and (self.fee_per_meeting >= 0))\n end", "def fee_for_additional_materials_is_valid?\n return ((self.fee_for_additional_materials != nil) and (self.fee_for_additional_materials >= 0))\n end", "def free?\n self.setupFee == 0 && ...
[ "0.7698745", "0.7017238", "0.686757", "0.68662935", "0.6678528", "0.66256934", "0.6557586", "0.6436912", "0.6390961", "0.63814205", "0.63697875", "0.62293804", "0.62135327", "0.618787", "0.6171076", "0.61420584", "0.61293584", "0.6064821", "0.6049073", "0.602505", "0.6005423"...
0.83600813
0
Adds errors if ptainstructor_is_valid? returns false
def ptainstructor_is_valid errors.add(:ptainstructor,'No PTA instructor was selected.') unless ptainstructor_is_valid? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ptainstructor_is_valid?\n return self.ptainstructor_id != nil\n end", "def teacher_is_valid\n errors.add(:teacher,'No classroom location was selected.') unless teacher_is_valid?\n end", "def instructor_active\n if self.instructor != nil\n if self.instructor.active == false\n ...
[ "0.7986762", "0.6713823", "0.6494201", "0.6046265", "0.600162", "0.59047836", "0.58997005", "0.58126855", "0.5809437", "0.57614034", "0.57481265", "0.5746208", "0.57296884", "0.57296884", "0.57296884", "0.566712", "0.5664021", "0.56560785", "0.56548095", "0.56395245", "0.5607...
0.8588355
0
Tests that the course's ptainstructor_id is not nil and returns true or false.
def ptainstructor_is_valid? return self.ptainstructor_id != nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CA_only?\n course_assistant? && (not instructor?)\n end", "def can_create_course?\n ptainstructors = Ptainstructor.find_by_semester_id(self.id)\n teachers = Teacher.find_by_semester_id(self.id)\n if ((ptainstructors == nil) or (teachers == nil))\n return false\n end\n return true\n ...
[ "0.73070735", "0.72831607", "0.7220261", "0.71659905", "0.65088296", "0.650151", "0.6478992", "0.6473052", "0.6441444", "0.63904697", "0.637861", "0.6372246", "0.6317061", "0.63082796", "0.62789655", "0.62364626", "0.6220693", "0.6195924", "0.61431336", "0.6139531", "0.610259...
0.833853
0
Adds errors if teacher_is_valid? returns false
def teacher_is_valid errors.add(:teacher,'No classroom location was selected.') unless teacher_is_valid? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def teacher_is_valid?\n return self.teacher_id != nil\n end", "def check_destroy\n valid=true\n msg=\"\"\n if matters.count > 0\n valid=false\n msg+=\" There are #{matters.count} teacher_matters references\"\n end\n if teachings.count > 0\n valid=false\n msg+=\" There are #...
[ "0.7701353", "0.65671885", "0.64631915", "0.64056695", "0.6350357", "0.622444", "0.6196493", "0.60277474", "0.59879917", "0.59725815", "0.5956702", "0.5930681", "0.59111017", "0.5903324", "0.5900726", "0.5898185", "0.58875984", "0.58524483", "0.5836989", "0.5834455", "0.58294...
0.85017115
0
Tests that the course's teacher_id is not nil and returns true or false.
def teacher_is_valid? return self.teacher_id != nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_teacher?(teacher)\n return @has_teacher\n end", "def can_create_course?\n ptainstructors = Ptainstructor.find_by_semester_id(self.id)\n teachers = Teacher.find_by_semester_id(self.id)\n if ((ptainstructors == nil) or (teachers == nil))\n return false\n end\n return true\n end",...
[ "0.7449263", "0.7200843", "0.68973225", "0.67134386", "0.67134386", "0.6505894", "0.6498933", "0.64595133", "0.64591366", "0.64050275", "0.64050275", "0.64050275", "0.63600016", "0.63040674", "0.62889653", "0.6263735", "0.6236275", "0.62268835", "0.61472505", "0.61325", "0.61...
0.81804997
0
Returns array with number of students in course and class_max.
def class_how_full? return [self.students.count, self.class_max] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def expected_grades\n assignment.course.students.count\n end", "def expected_grades\n metrics.count * course.students.count\n end", "def num_grades (student)\n @grades[student].length\n end", "def find_max\n\t# Use method: stu_max = @students_list.max_by{|x| x.avg}\n\t max =0\n\t for i in...
[ "0.6461427", "0.6382975", "0.6140354", "0.59984523", "0.59177566", "0.59177566", "0.59030765", "0.58153164", "0.5814784", "0.57280606", "0.56930727", "0.5684635", "0.5638393", "0.5582642", "0.55610883", "0.55566406", "0.55316156", "0.55268115", "0.55179995", "0.54999554", "0....
0.72358114
0
Characterizes the file at 'filepath' if available, otherwise, pulls a copy from the repository and runs characterization on that file.
def perform(file_set, file_id, filepath = nil, user = nil) @event_start = DateTime.current @relation = file_set.class.characterization_proxy file = file_set.characterization_proxy raise "#{@relation} was not found for FileSet #{file_set.id}" unless file_set.characterization_proxy? filepath = Hyrax::...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def perform(file_set, file_id, filepath = nil)\n raise \"#{file_set.class.characterization_proxy} was not found for FileSet #{file_set.id}\" unless file_set.characterization_proxy?\n\n filepath = Hyrax::WorkingDirectory.find_or_retrieve(file_id, file_set.id) unless filepath && File.exist?(filepath)\n char...
[ "0.52823174", "0.5210008", "0.5159241", "0.51019925", "0.5078289", "0.50264984", "0.50216323", "0.49831176", "0.49456105", "0.49415442", "0.48564264", "0.4850974", "0.47973493", "0.47727823", "0.47692093", "0.4724287", "0.47218582", "0.46690923", "0.46659172", "0.46640107", "...
0.58841264
0
Returns array of tokens that cover the value that the parameter token has as its default Search forward to find value assigned to this parameter We want to find the thing after `=` and before `,`
def extract_default_value_tokens(ptok) value_tokens = [] token = ptok.next_code_token nesting = 0 while token case token.type when :LPAREN, :LBRACK nesting += 1 when :RBRACK nesting -= 1 when :RPAREN nesting -= 1 if nesting.negative? # Th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scan_for_commas(token); end", "def parameters\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 74 )\n return_value = ParametersReturnValue.new\n\n # $rule.start = the first token seen before matching\n return_value.start = @input.look\n\n ...
[ "0.6007873", "0.58190423", "0.5797972", "0.5745399", "0.5708995", "0.5708995", "0.5694716", "0.5653947", "0.56236243", "0.56137717", "0.5551762", "0.5526229", "0.5504136", "0.54743356", "0.5433497", "0.54331636", "0.5410425", "0.53768414", "0.5353954", "0.5281074", "0.5262896...
0.7109807
0
Returns an array of tokens that cover the data type of the parameter ptok Search backwards until we either bump into a comma (whilst not nested), or reach the opening LPAREN
def extract_type_tokens(ptok) type_tokens = [] token = ptok.prev_code_token nesting = 0 while token case token.type when :LBRACK nesting += 1 when :LPAREN nesting += 1 if nesting.positive? # This is the LPAREN at the start of the parameter list ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_multiple_values\n next_token if peek_token == :lparen #skip :lparen\n value = []\n value << current_token if String === next_token until peek_token.nil? || peek_token == :rparen\n next_token if peek_token == :rparen # consume the :rparen\n value.join(',')\n end", "def extract_default_...
[ "0.66376424", "0.6580629", "0.6500217", "0.63559425", "0.61661", "0.6093485", "0.60577714", "0.6030269", "0.59247357", "0.5919154", "0.5918971", "0.5834444", "0.5763134", "0.57408804", "0.5736345", "0.56850344", "0.56667316", "0.56598485", "0.5652574", "0.5630184", "0.5615968...
0.79251134
0
returns true if this location has no more offerings
def isEmpty? return self.offerings.count == 0 end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def no_more?\n return false unless @eligibles.empty?\n NO_MORE\n end", "def has_onsite_holdings?\n return false unless self[:location_facet].present?\n\n # consider each location for this record....\n self[:location_facet].each do |location_facet|\n # skip over anything that's offsite.....
[ "0.73762673", "0.67329735", "0.66097456", "0.6604794", "0.6591897", "0.6465306", "0.6453284", "0.6357941", "0.63112307", "0.61815304", "0.6155567", "0.613523", "0.6133661", "0.61175406", "0.6083638", "0.60711193", "0.60544145", "0.60544145", "0.60503423", "0.60490185", "0.603...
0.7491813
0
Format share descriptions a bit nicer by converting and to spaces.
def share_description(value) raw(value).gsub("<br>", " ").gsub("<br />", " ") end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def share_description(value) \n raw(value).gsub(\"<br>\", \" \").gsub(\"<br />\", \" \")\n end", "def format_description description\n \"#{description}\".ljust(30)\n end", "def format_title_description\n if description.present? && title.present?\n self.description = description.strip.capita...
[ "0.6643694", "0.6355451", "0.6085365", "0.60843813", "0.60843813", "0.6040165", "0.60256976", "0.6025095", "0.5960897", "0.58909446", "0.5823", "0.58066446", "0.5805102", "0.57892996", "0.57788354", "0.5769854", "0.570135", "0.56535614", "0.56459296", "0.56459296", "0.5631979...
0.6755102
0
Link helper takes a URL and outputs a link with a custom label with http and www stripped out
def link_helper(url) # set up another variable for the link link = url # add http if missing from url if !url.include?("http://") && !url.include?("https://") url = "http://" + url end # strip out http/https from link if link.include?("http://") || link.include?("https://") lin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def link_to (label, url)\n \"<a href='#{url}'>#{label}</a>\"\n end", "def link\n Html::Link.new(:href => url) << display_name\n end", "def external_link(label, path, **opt, &block)\n opt[:target] = '_blank' unless opt.key?(:target)\n make_link(label, path, **opt, &block)\n end", "def build...
[ "0.74292344", "0.69627106", "0.68916947", "0.6874132", "0.6842955", "0.6818617", "0.68048346", "0.67558837", "0.66976136", "0.66417", "0.66417", "0.66399485", "0.66192704", "0.6571805", "0.65665644", "0.6544465", "0.6539952", "0.65295047", "0.65069044", "0.6494934", "0.649424...
0.7181887
1
SVG Image Helper Converts a dragonflystored SVG image to inline SVG with a missing asset fallback.
def svg_image(image) raw image.data rescue Dragonfly::Job::Fetch::NotFound "Image missing" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inline_svg(path)\n file = File.open(\"public/images/#{path}\", \"rb\")\n file.read\n end", "def image file, opts = {}\n # FIXME handle case when SVG is a File or IO object\n if ::String === file && (file.downcase.end_with? '.svg')\n opts[:fallback_font_name] ||= default_svg_font if respond_...
[ "0.6976713", "0.69373757", "0.6889673", "0.6708993", "0.6666454", "0.6664146", "0.66472864", "0.66189384", "0.6558477", "0.62838167", "0.626389", "0.6240496", "0.61302423", "0.61154705", "0.61154705", "0.60168093", "0.59429413", "0.5888581", "0.58310914", "0.5781527", "0.5745...
0.75487447
0
GET /feelings/1 GET /feelings/1.json
def show @feeling = Feeling.find(params[:id]) @sake = Sake.find(params[:sake_id]) respond_to do |format| format.html # show.html.erb format.json { render json: @feeling } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_feeling\n @feeling = Feeling.find(params[:id])\n end", "def index\n @feelings = Feeling.where(user: current_user).all\n end", "def find_feeling(user)\n self.feelings.where( user_id: user.id ).first\n end", "def new\n @sake= Sake.find(params[:sake_id])\n @feeling = Feeling.new\n ...
[ "0.6516207", "0.64383405", "0.63671356", "0.6219716", "0.59933156", "0.59692436", "0.59370697", "0.5857662", "0.5825682", "0.57739466", "0.5749843", "0.57436013", "0.57394665", "0.5708842", "0.5706743", "0.56900954", "0.56874657", "0.5677101", "0.56712615", "0.56625116", "0.5...
0.6761551
0
GET /feelings/new GET /feelings/new.json
def new @sake= Sake.find(params[:sake_id]) @feeling = Feeling.new respond_to do |format| format.html # new.html.erb format.json { render json: @feeling } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @feeling = Feeling.new(feeling_params)\n\n respond_to do |format|\n if @feeling.save\n format.html { redirect_to new_feeling_path }\n #format.js\n format.json { render :show, status: :created, location: @feeling }\n else\n format.html { render :new }\n ...
[ "0.69000375", "0.689388", "0.686288", "0.68234533", "0.6801308", "0.67607284", "0.67200273", "0.671727", "0.66915035", "0.66681135", "0.66681135", "0.6653322", "0.6639211", "0.66371816", "0.66341233", "0.65769696", "0.6576178", "0.65605223", "0.65164644", "0.6514515", "0.6512...
0.7440437
0
PUT /feelings/1 PUT /feelings/1.json
def update @feeling = Feeling.find(params[:id]) respond_to do |format| if @feeling.update_attributes(params[:feeling]) format.html { redirect_to @feeling, notice: 'Feeling was successfully updated.' } format.json { head :ok } else format.html { render action: "edit" } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_feeling\n @feeling = Feeling.find(params[:id])\n end", "def update\n puts \"update #{@feeling.as_json} #{updated_params.as_json}\"\n respond_to do |format|\n if @feeling.update(updated_params)\n puts \"brucep update success\"\n #format.html { redirect_to @feeling, notice:...
[ "0.6885447", "0.6589147", "0.62522805", "0.612598", "0.6112526", "0.6074186", "0.60537636", "0.60494673", "0.6044397", "0.60422385", "0.6028454", "0.59988153", "0.5990904", "0.59555966", "0.5932589", "0.592771", "0.59120136", "0.58992726", "0.5899209", "0.58894825", "0.588246...
0.7325833
0
DELETE /feelings/1 DELETE /feelings/1.json
def destroy @feeling = Feeling.find(params[:id]) @feeling.destroy respond_to do |format| format.html { redirect_to feelings_url } format.json { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @feeling = Feeling.find(params[:id])\n @feeling.destroy\n render :ok, json: { feeling: @feeling }\n end", "def destroy\n @feeling.destroy\n respond_to do |format|\n format.html { redirect_to feelings_url, notice: 'Feeling was successfully destroyed.' }\n format.json { head...
[ "0.75347584", "0.7383757", "0.6595079", "0.65502685", "0.65330356", "0.64812326", "0.6477097", "0.6459164", "0.6458657", "0.6448738", "0.64453256", "0.6416836", "0.636335", "0.6354889", "0.6345786", "0.6336549", "0.6336549", "0.6334268", "0.6329851", "0.6329404", "0.6311851",...
0.76134413
0
Sends the notice unless it is one of the default ignored exceptions
def notify_or_ignore(exception, opts = {}) notice = build_notice_for(exception, opts) send_notice(notice) unless notice.ignore? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def notice!\n self.severity = :NOTICE\n end", "def notice; end", "def notify_or_ignore(exception, context = {})\n notify(exception, context) unless ignored?(exception)\n end", "def rescue_action_in_public_with_errornot(exception)\n unless errornot_ignore_user_agent?\n ...
[ "0.65168333", "0.6434321", "0.640824", "0.621561", "0.6197395", "0.61959904", "0.6174005", "0.6072776", "0.60374594", "0.5936417", "0.5936417", "0.5920188", "0.59181964", "0.587393", "0.5858212", "0.5795644", "0.57782435", "0.57683146", "0.57156485", "0.57066834", "0.5706503"...
0.72404635
0
If there is a file saved on the server for the record, this method sets its permissions using the nix +chmod+ command. +permissions+ should be an octalformat integer. The default setting when saving files is 0644.
def chmod(permissions = nil) permissions ||= self.class.upload_options[:chmod] File.chmod(permissions, full_path) if file_exists? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_permissions_on_storage\n if @options[:perms]\n response = system(\"chmod -R o+w #{File.join(@path, 'storage')}\")\n if response\n say_success \"Updated permissions on storage/ directory.\"\n else\n say_failed \"Could not update permissions on storage/ director...
[ "0.61778283", "0.6151694", "0.6135356", "0.6115305", "0.6100644", "0.6083128", "0.59712285", "0.59698904", "0.59641623", "0.58579946", "0.5851635", "0.5821485", "0.58096987", "0.578552", "0.5781495", "0.5779447", "0.5756283", "0.5678055", "0.56312793", "0.5623642", "0.5612418...
0.72598076
0
Returns the full system path (including +RAILS_ROOT+) to the uploaded file, as specified by the record's current attributes. Used by +full_path+ in the event that no file exists.
def full_path_from_current_attributes path = self.class.upload_options[:directory]. gsub(Regexp.new("^(#{RAILS_ROOT})?/?"), RAILS_ROOT + '/') + '/' + instance_directory + '/' + send(self.class.upload_options[:filename]) path.gsub(/\/+/, '/') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def full_file_path\n Rails.root.join('uploads', filepath).to_s\n end", "def upload_full_path\n @upload_full_path ||= File.join(@upload_file_path, name)\n end", "def full_path\n @full_path ||= path ? File.join(root, path) : root\n end", "def full_path\n File.join(@path, @name)\n ...
[ "0.7924824", "0.7746192", "0.7309491", "0.7155678", "0.7129289", "0.71280617", "0.71274024", "0.7108221", "0.71034974", "0.7069348", "0.7019013", "0.69260925", "0.6884028", "0.6842242", "0.6799916", "0.6784461", "0.67746043", "0.67746043", "0.6749577", "0.6685508", "0.6606524...
0.8146056
0
Renames the uploaded file stored in the filesystem if the record's attribute changes have caused the file's path to change. Only works if the path is a function only of the record's own properties, not of the properties of any associations. Called using the +before_update+ callback in ActiveRecord::Base.
def rename_uploaded_file return unless @uploaded_file.nil? if file_exists? and full_path != full_path_from_current_attributes ensure_directory_exists File.rename(full_path, full_path_from_current_attributes) remove_empty_directory @saved_full_path = full_path_from_curre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_path\n update_column :path, file.url unless url?\n end", "def rename_file\n return unless @old_filename && @old_filename != full_filename\n if save_attachment? && File.exists?(@old_filename)\n FileUtils.rm @old_filename\n elsif File.exists?(@old_filename)\n ...
[ "0.64164037", "0.6395799", "0.63228154", "0.6070498", "0.59627134", "0.5951", "0.584486", "0.5843303", "0.58145225", "0.57840216", "0.5773075", "0.57341856", "0.5700501", "0.5687526", "0.5684828", "0.565464", "0.5646318", "0.5643698", "0.5638444", "0.56376165", "0.5627437", ...
0.66050786
0
Makes sure that the appropriate directory exists so the file can be saved into it.
def ensure_directory_exists dir = File.dirname(full_path_from_current_attributes) FileUtils.mkdir_p(dir) unless File.exists?(dir) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ensure_directory\n FileUtils.mkdir_p(to_s)\n self\n end", "def ensure_meta_info_dir_exists!\n FileUtils.mkdir_p(RubyFileReader::Reader.meta_info_dir_pathname)\n end", "def ensureDir(filename)\n dir = File::dirname(filename) ;\n system(\"mkdir -p #{dir}\") ;\n end", "def ensure...
[ "0.7606959", "0.7197922", "0.7135695", "0.7133732", "0.7124492", "0.7109498", "0.7090023", "0.699093", "0.6986757", "0.6981973", "0.69757754", "0.69732857", "0.69710934", "0.69115514", "0.69115514", "0.68944305", "0.68728375", "0.6853175", "0.683741", "0.6814181", "0.6808982"...
0.772864
0
Removes the file's directory if it is empty. Recusively deletes directories going up the tree until it reaches a nonempty directory. Thumbs.db and .DS_Store files are removed if they are the only contents of a directory.
def remove_empty_directory(path = nil) dir = path || File.dirname(full_path) dir.gsub!(/(\/+\.\.?\/*)*$/, '') system_files = %w(Thumbs.db .DS_Store) if File.directory?(dir) and !File.symlink?(dir) and (Dir.entries(dir) - %w(. ..) - system_files).empty? system_files.each { |sys| File...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_file_and_clean_directories( path )\n # first, delete the file\n delete_file( path )\n # recursively remove any parent directories, but only if they are empty, stop if they are not\n remove_empty_folders_recursively( path )\n end", "def delete\n File.delete fullpath\n d...
[ "0.7876363", "0.7431147", "0.735552", "0.7164017", "0.7158658", "0.7134201", "0.70936924", "0.6960207", "0.6943068", "0.68454456", "0.6800318", "0.6778718", "0.6776878", "0.6767045", "0.6748883", "0.67399156", "0.67366195", "0.66414785", "0.65970296", "0.6578105", "0.6546556"...
0.7812255
1
GET /exhibitior_categories/new GET /exhibitior_categories/new.json
def new @exhibitior_category = ExhibitiorCategory.new respond_to do |format| format.html # new.html.erb format.json { render json: @exhibitior_category } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n puts @category.inspect\n @internal = @category.internals.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @internal }\n end\n end", "def new\n @category = Category.new\n respond_to do |format|\n format.html # new.html.erb\n ...
[ "0.74364746", "0.73833764", "0.73656535", "0.7362489", "0.7362489", "0.7362489", "0.7362489", "0.7362489", "0.7362489", "0.7362489", "0.7362489", "0.7362489", "0.7344639", "0.73279166", "0.7327913", "0.7300623", "0.7237526", "0.7175016", "0.71696764", "0.71354294", "0.7132861...
0.77980167
0
POST /exhibitior_categories POST /exhibitior_categories.json
def create @exhibitior_category = ExhibitiorCategory.new(params[:exhibitior_category]) respond_to do |format| if @exhibitior_category.save format.html { redirect_to @exhibitior_category, notice: 'Exhibitior category was successfully created.' } format.json { render json: @exhibitior_categ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @categoria = Categoria.new(categoria_params)\n if @categoria.save\n render json: @categoria\n else\n render json: @categoria.errors, status: :unprocessable_entity\n end\n end", "def create_category payload\n\t\t\t\t\tFreshdesk::Api::Client.convert_to_hash( @connection.post CA...
[ "0.67995447", "0.67280954", "0.6692331", "0.6446782", "0.64250207", "0.6298797", "0.62950927", "0.6272612", "0.6272286", "0.62249583", "0.62238014", "0.621838", "0.61868274", "0.61715853", "0.61662114", "0.61554", "0.61518496", "0.6138151", "0.6121284", "0.6093589", "0.609086...
0.698518
0
PUT /exhibitior_categories/1 PUT /exhibitior_categories/1.json
def update @exhibitior_category = ExhibitiorCategory.find(params[:id]) respond_to do |format| if @exhibitior_category.update_attributes(params[:exhibitior_category]) format.html { redirect_to @exhibitior_category, notice: 'Exhibitior category was successfully updated.' } format.json { hea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UpdateCategory params = {}\n \n APICall(path: 'categories.json',method: 'PUT',payload: params.to_json)\n \n end", "def update_categories(categories, options = {} )\n options.merge!(:docid => self.docid, :categories => categories)\n resp = @conn.put do |req|\n ...
[ "0.68047875", "0.6802997", "0.65672714", "0.65645427", "0.6486565", "0.6376908", "0.630117", "0.6256176", "0.62543267", "0.6214432", "0.6180587", "0.61505646", "0.61470294", "0.6122314", "0.6117411", "0.611602", "0.61112916", "0.60785085", "0.6060442", "0.60554504", "0.604269...
0.7001599
0
DELETE /exhibitior_categories/1 DELETE /exhibitior_categories/1.json
def destroy @exhibitior_category = ExhibitiorCategory.find(params[:id]) @exhibitior_category.destroy respond_to do |format| format.html { redirect_to exhibitior_categories_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @exhibitor_category = ExhibitorCategory.find(params[:id])\n @exhibitor_category.destroy\n\n respond_to do |format|\n format.html { redirect_to exhibitor_categories_url }\n format.json { head :no_content }\n end\n end", "def destroy\n #@incidentcategory.destroy\n render ...
[ "0.73797965", "0.73602843", "0.7295814", "0.7242014", "0.72043025", "0.7200795", "0.7151931", "0.712239", "0.71190214", "0.71094865", "0.7101901", "0.7101655", "0.7088081", "0.70532817", "0.7044528", "0.70421284", "0.7000866", "0.6995815", "0.6992089", "0.698252", "0.6978376"...
0.77388936
0
Payments history for calendar month +month_period+ +month_period+ A string like 'yyyyMM' that represent month of year
def get_payments_history(month_period) request('getPaymentsHistory', base_api_parameters.merge({ monthPeriod: month_period })) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def month() end", "def period\n case self.recurring_month\n when 12\n 1.year # 1.year != 12.months\n else\n self.recurring_month.months\n end\n end", "def monthly\n end", "def month=(_arg0); end", "def month; end", "def month; end", "def calculate_month_and_next_month(year, mont...
[ "0.66572005", "0.6550886", "0.6426259", "0.6388943", "0.6368296", "0.6368296", "0.6343893", "0.63118684", "0.62379336", "0.62376076", "0.6217388", "0.6216285", "0.6178661", "0.61545473", "0.61245275", "0.6068385", "0.60121477", "0.60079324", "0.5964177", "0.5949472", "0.59494...
0.6724994
0
Summary expenses report for calendar month +month_period+ +month_period+ A string like 'yyyyMM' that represent month of year
def get_expenses_summary(month_period) request('getExpensesSummary', base_api_parameters.merge({ monthPeriod: month_period })) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def month() end", "def expenses_for(m)\n d = Date.parse(m)\n exp = self.expenses.within_range(d, ((d + 1.month) - 1.day)).sum(:amount)\n exp.nil? ? 0 : exp\n end", "def month_depot\n \"#{depot.name} \"+\"#{issue_date.strftime(\"%b\")} \"+\"#{issue_date.year}\"\n end", "def month; end", "def m...
[ "0.68188566", "0.677088", "0.666363", "0.66531795", "0.66531795", "0.6549146", "0.63745123", "0.63384", "0.63263035", "0.6311498", "0.6289573", "0.6287287", "0.6285008", "0.62812096", "0.62656796", "0.61824304", "0.61760306", "0.6157619", "0.6134104", "0.60981125", "0.6065677...
0.6889355
0
Returns an Array of dependencies on the target
def dependency_list @target.dependencies.map(&:display_name) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dependencies\n @target_dependencies + (@parent ? @parent.dependencies : [])\n end", "def dependencies\n @dependencies.collect { |name, dependency| dependency }\n end", "def dependencies\n []\n end", "def dependencies\n @dependencies.values\n end", "def de...
[ "0.78034174", "0.77154183", "0.7679972", "0.76735425", "0.76414096", "0.7542985", "0.7542985", "0.7542985", "0.7542985", "0.74957013", "0.7423224", "0.7314318", "0.7239806", "0.7239806", "0.7239806", "0.7198187", "0.71836644", "0.7183548", "0.7125391", "0.70432097", "0.703956...
0.80951196
0
Returns names of files with duplicates imports.
def files_with_duplicate_imports files.select(&:has_duplicate_import?) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def all_unique_imports\n files.map(&:all_imports).flatten.uniq\n end", "def remove_duplicate_imports\n files.each(&:remove_duplicate_imports)\n end", "def duplicate_imports_info\n import_frequency_mapping = {}\n all_imports.uniq.each do |item|\n item_occurrence = all_imports.count(item)\n ...
[ "0.8267978", "0.7631692", "0.6641064", "0.64679164", "0.6379785", "0.6194772", "0.61196035", "0.6074548", "0.5990646", "0.5987395", "0.59770125", "0.59103966", "0.58946514", "0.5876847", "0.5834983", "0.57414603", "0.57414603", "0.5686114", "0.5671773", "0.5630323", "0.558754...
0.8417419
0
Returns the unused dependencies on the target
def unused_dependencies_list imports = all_unique_imports.map { |import| import.split.last } dependency_list - imports end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_unused_dependencies\n # puts 'removing unused dependencies list.'\n dependencies = @target.dependencies\n dependencies.each do |dependency|\n dependency.remove_from_project if unused_dependencies_list.include? dependency.display_name\n end\n end", "def enabled_dependencies\n @de...
[ "0.75177723", "0.7088838", "0.6891703", "0.68696356", "0.6738311", "0.6725072", "0.66946477", "0.66920424", "0.6681482", "0.6672426", "0.66719073", "0.6666976", "0.66294324", "0.6573338", "0.65641856", "0.65641856", "0.65641856", "0.65641856", "0.6527892", "0.64535195", "0.64...
0.7489569
1
Removed the unused target dependencies on the target.
def remove_unused_dependencies # puts 'removing unused dependencies list.' dependencies = @target.dependencies dependencies.each do |dependency| dependency.remove_from_project if unused_dependencies_list.include? dependency.display_name end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_dependencies\n raise 'Not implemented'\n end", "def prune_dependencies\n class_names = @classes.map {|klass| klass.name}\n @classes.each do |klass|\n klass.dependencies = klass.dependencies.uniq.keep_if {|dep| class_names.include?(dep)}\n end\n end", "def remove_from_dep...
[ "0.6889047", "0.6659218", "0.6656846", "0.653687", "0.647297", "0.647297", "0.63622", "0.6326725", "0.6312936", "0.6293903", "0.62418056", "0.62074286", "0.61986613", "0.6183366", "0.6173584", "0.61659145", "0.6149706", "0.6058918", "0.60501415", "0.60405105", "0.6039996", ...
0.85026187
0
Removes all the duplicate import statements from all the files linked to the target
def remove_duplicate_imports files.each(&:remove_duplicate_imports) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_duplicate_imports\n duplicate_imports_mapping = duplicate_imports_info\n duplicate_imports = duplicate_imports_mapping.keys\n file_lines = IO.readlines(@path, chomp: true).select do |line|\n if duplicate_imports.include? line\n if duplicate_imports_mapping[line] <= 1\n line...
[ "0.6893452", "0.67451614", "0.6592932", "0.60712755", "0.60682005", "0.59842294", "0.5977443", "0.5866538", "0.5861052", "0.5858443", "0.58310634", "0.58169115", "0.578584", "0.57832396", "0.5782469", "0.5743226", "0.572319", "0.5685762", "0.56426513", "0.56395173", "0.562401...
0.83346874
0
GET /businessbooks GET /businessbooks.json
def index @businessbooks = Businessbook.search(params[:search]).paginate(:per_page => 18, :page => params[:page]) respond_to do |format| format.html # index.html.erb format.json { render :json => @businessbooks } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @businessbook = Businessbook.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @businessbook }\n end\n end", "def index\n base_url = 'https://www.googleapis.com/books/v1/volumes?q=fiction&maxResults=20'\n and_key = '&key='\...
[ "0.7298897", "0.70421624", "0.695971", "0.69306314", "0.68328303", "0.67693084", "0.672795", "0.66955805", "0.66766506", "0.66766506", "0.66766506", "0.6676336", "0.6658967", "0.6612253", "0.6606977", "0.6593214", "0.65840733", "0.6574277", "0.65341747", "0.6504094", "0.65039...
0.7229365
1
GET /businessbooks/1 GET /businessbooks/1.json
def show @businessbook = Businessbook.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render :json => @businessbook } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n base_url = 'https://www.googleapis.com/books/v1/volumes?q=fiction&maxResults=20'\n and_key = '&key='\n key = ENV['GOOGLE_BOOKS_API_KEY'] \n googleurl = base_url + and_key + key\n\n response = RestClient.get(googleurl)\n @books = JSON.parse(response)\n\n respond_to do |format|\n format.html\n ...
[ "0.699776", "0.6908427", "0.6835466", "0.6817468", "0.6666077", "0.66522855", "0.66353226", "0.66289055", "0.6626388", "0.6619751", "0.6619751", "0.6619751", "0.6552016", "0.6552016", "0.6552016", "0.6543199", "0.65218496", "0.65097106", "0.64712507", "0.6463741", "0.6460948"...
0.7402133
0
GET /businessbooks/new GET /businessbooks/new.json
def new @businessbook = Businessbook.new respond_to do |format| format.html # new.html.erb format.json { render :json => @businessbook } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @book = Book.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @book }\n end\n end", "def new\n @book = Book.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @book }\n end\n en...
[ "0.7581938", "0.7581938", "0.7566873", "0.75459146", "0.75042427", "0.7498681", "0.7498681", "0.7498681", "0.7498681", "0.7498681", "0.7498681", "0.7498681", "0.7498681", "0.7498681", "0.7498681", "0.7498681", "0.7489435", "0.747616", "0.74659175", "0.7336534", "0.73196006", ...
0.7909274
0
POST /businessbooks POST /businessbooks.json
def create @businessbook = Businessbook.new(params[:businessbook]) respond_to do |format| if @businessbook.save format.html { redirect_to @businessbook, :notice => 'Businessbook was successfully created.' } format.json { render :json => @businessbook, :status => :created, :location => @bu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @book = Book.new(book_params)\n\n if @book.save\n render json: @book, status: :created, location: @book\n else\n render json: @book.errors, status: :unprocessable_entity\n end\n end", "def create\n @api_book = Api::Book.new(api_book_params)\n\n if @api_book.save\n r...
[ "0.65611285", "0.6463056", "0.6416757", "0.64146", "0.6325686", "0.62910694", "0.6285444", "0.62647307", "0.61569035", "0.6153173", "0.61375266", "0.61241496", "0.6092917", "0.6091869", "0.60832745", "0.6066547", "0.60340077", "0.6032788", "0.6032788", "0.6032788", "0.6032788...
0.7194014
0
PUT /businessbooks/1 PUT /businessbooks/1.json
def update @businessbook = Businessbook.find(params[:id]) respond_to do |format| if @businessbook.update_attributes(params[:businessbook]) format.html { redirect_to @businessbook, :notice => 'Businessbook was successfully updated.' } format.json { head :no_content } else for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @api_book = Api::Book.find(params[:id])\n\n if @api_book.update(api_book_params)\n head :no_content\n else\n render json: @api_book.errors, status: :unprocessable_entity\n end\n end", "def update\n @book = Book.find(params[:id])\n\n respond_to do |format|\n if @book...
[ "0.6816322", "0.68015784", "0.6615512", "0.64487374", "0.64161587", "0.6367759", "0.63424164", "0.6319049", "0.6302526", "0.6262543", "0.6261328", "0.6230062", "0.6225963", "0.62095773", "0.6199712", "0.6150143", "0.6147326", "0.61428815", "0.6136365", "0.61291105", "0.612089...
0.69470376
0
DELETE /businessbooks/1 DELETE /businessbooks/1.json
def destroy @businessbook = Businessbook.find(params[:id]) @businessbook.destroy respond_to do |format| format.html { redirect_to businessbooks_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @api_book.destroy\n\n head :no_content\n end", "def destroy\n @business = Business.find(params[:id])\n @business.destroy\n\n respond_to do |format|\n format.html { redirect_to businesses_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @busine...
[ "0.72218", "0.7198506", "0.7082027", "0.7044859", "0.6987978", "0.6974579", "0.6963525", "0.6953768", "0.6933736", "0.6933736", "0.6932949", "0.69251823", "0.69176364", "0.69176364", "0.69176364", "0.69176364", "0.69176364", "0.69176364", "0.69176364", "0.69176364", "0.691763...
0.77143854
0
GET /admin/digersayfas GET /admin/digersayfas.json
def index @admin_digersayfas = Admin::Digersayfa.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_admin_digersayfa\n @admin_digersayfa = Admin::Digersayfa.find(params[:id])\n end", "def index\n return if !current_user.admin?\n @disfrazs = Disfraz.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @disfrazs }\n end\n end", "def u...
[ "0.6332812", "0.5838458", "0.5823415", "0.5746072", "0.5675711", "0.5658039", "0.5600863", "0.55869013", "0.5580449", "0.5578242", "0.5536106", "0.5519336", "0.5491851", "0.5478802", "0.54681295", "0.54366094", "0.5430967", "0.54264057", "0.5415979", "0.54115105", "0.5406339"...
0.7174638
0
POST /admin/digersayfas POST /admin/digersayfas.json
def create @admin_digersayfa = Admin::Digersayfa.new(admin_digersayfa_params) @turad = { 0 => "Bilim İnsanları", 1 => "Resmi Evraklar", 2 => "İlginç Bilgiler", 3 => "Motivasyon", 4 => "Sınav Sistemi"} @tur = { 0 => "biliminsanlari", 1 => "resmievraklar", 2 => "ilgincbilgiler", 3 => "motivasyon", 4 => "sinav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def admin_digersayfa_params\n params.require(:admin_digersayfa).permit(:baslik, :metin, :tur, :dosya) \n end", "def update\n respond_to do |format|\n if @admin_digersayfa.update(admin_digersayfa_params)\n format.html { redirect_to @admin_digersayfa, notice: 'Digersayfa was successfully upd...
[ "0.59678805", "0.58623284", "0.5756909", "0.5643321", "0.55046505", "0.54953986", "0.5492916", "0.54927695", "0.54807836", "0.5457218", "0.5453056", "0.5415985", "0.535122", "0.5335929", "0.53337973", "0.5330513", "0.5296965", "0.5279655", "0.5257377", "0.52537113", "0.525194...
0.6569528
0
PATCH/PUT /admin/digersayfas/1 PATCH/PUT /admin/digersayfas/1.json
def update respond_to do |format| if @admin_digersayfa.update(admin_digersayfa_params) format.html { redirect_to @admin_digersayfa, notice: 'Digersayfa was successfully updated.' } format.json { render :show, status: :ok, location: @admin_digersayfa } else format.html { render :e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n keystone.update_tenant({:id=>params[:id],:name=>params[:name],:description=>params[:description],:enabled=>params[:enabled]})\n respond_to do |format|\n format.html { redirect_to tenants_path, :notice => 'Tenant was successfully updated.' }\n format.json { head :ok }\n end\n en...
[ "0.6654816", "0.6445601", "0.62220114", "0.6175265", "0.61671823", "0.6163973", "0.6111223", "0.60848165", "0.603647", "0.6017741", "0.6017741", "0.5998265", "0.5995518", "0.59791595", "0.5892284", "0.5880789", "0.58544594", "0.58405834", "0.58374256", "0.5806576", "0.5792266...
0.68653923
0
DELETE /admin/digersayfas/1 DELETE /admin/digersayfas/1.json
def destroy @admin_digersayfa.destroy respond_to do |format| format.html { redirect_to admin_digersayfas_url, notice: 'Digersayfa was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_tenant_circle(args = {}) \n delete(\"/tenantcircles.json/#{args[:circleId]}\", args)\nend", "def delete\n response = WebPay.client.delete(path)\n response['deleted']\n end", "def delete\n client.delete(\"/#{id}\")\n end", "def delete()\n @api.do_request(\"DELETE\", get_...
[ "0.74236", "0.7324176", "0.7195265", "0.71433914", "0.71433914", "0.71433914", "0.71433914", "0.70854354", "0.7054274", "0.69827485", "0.6969745", "0.6968206", "0.6907897", "0.6904587", "0.68939435", "0.68937755", "0.68937755", "0.6888857", "0.6878041", "0.68323946", "0.68077...
0.75525564
0
GET /instituicoes GET /instituicoes.json
def index @instituicoes = Instituicao.all respond_to do |format| format.html # index.html.erb format.json { render json: @instituicoes } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @instituicao = Instituicao.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @instituicao }\n end\n end", "def index\n @instancia = Instancium.all\n end", "def show\n @institucional = Institucional.find(params[:id])\n\n...
[ "0.751949", "0.6958533", "0.68788326", "0.68244416", "0.6755332", "0.6747474", "0.67021245", "0.6619203", "0.6611335", "0.66074824", "0.6586544", "0.65787476", "0.64574796", "0.64278275", "0.641245", "0.6407009", "0.640509", "0.640509", "0.63766575", "0.63558304", "0.634916",...
0.7875285
0
GET /instituicoes/1 GET /instituicoes/1.json
def show @instituicao = Instituicao.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @instituicao } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @instituicoes = Instituicao.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @instituicoes }\n end\n end", "def show\n @institucional = Institucional.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n ...
[ "0.7704511", "0.70620894", "0.69456315", "0.68963146", "0.6868936", "0.685834", "0.6730599", "0.66842204", "0.6682483", "0.6668672", "0.66208", "0.65291506", "0.65291506", "0.6524573", "0.65057886", "0.65046215", "0.65035135", "0.64633906", "0.64383066", "0.6434014", "0.63916...
0.766338
1
GET /instituicoes/new GET /instituicoes/new.json
def new @instituicao = Instituicao.new respond_to do |format| format.html # new.html.erb format.json { render json: @instituicao } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @indicativo = Indicativo.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @indicativo }\n end\n end", "def new\n @sitio_entrega = SitioEntrega.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render j...
[ "0.7481899", "0.74592733", "0.7392899", "0.7371191", "0.7345058", "0.7335122", "0.7324422", "0.72810566", "0.727145", "0.72610426", "0.7247983", "0.7228057", "0.72174495", "0.71782017", "0.7171193", "0.7157048", "0.7149544", "0.71336293", "0.71280897", "0.71144384", "0.709214...
0.79367125
0
POST /instituicoes POST /instituicoes.json
def create @instituicao = Instituicao.new(params[:instituicao]) respond_to do |format| if @instituicao.save format.html { redirect_to @instituicao, notice: 'Instituicao was successfully created.' } format.json { render json: @instituicao, status: :created, location: @instituicao } e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @instituto = Instituto.new(instituto_params)\n\n respond_to do |format|\n if @instituto.save\n format.html { redirect_to @instituto, notice: 'O instituto foi criado com sucesso.' }\n format.json { render :show, status: :created, location: @instituto }\n else\n form...
[ "0.70578986", "0.68975914", "0.6834867", "0.6772598", "0.67714244", "0.6739272", "0.661475", "0.6461626", "0.64222103", "0.641717", "0.6408052", "0.640658", "0.64003813", "0.63718206", "0.6368992", "0.6346715", "0.6300704", "0.6297224", "0.6296384", "0.62830585", "0.62819237"...
0.7440674
0
PUT /instituicoes/1 PUT /instituicoes/1.json
def update @instituicao = Instituicao.find(params[:id]) respond_to do |format| if @instituicao.update_attributes(params[:instituicao]) format.html { redirect_to @instituicao, notice: 'Instituicao was successfully updated.' } format.json { head :no_content } else format.html ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @instituicao = Instituicao.find(params[:id])\n\n respond_to do |format|\n if @instituicao.update_attributes(params[:instituicao])\n format.html { redirect_to(@instituicao, :notice => 'Instituicao was successfully updated.') }\n format.xml { head :ok }\n else\n for...
[ "0.6810022", "0.6726203", "0.6404884", "0.63641167", "0.636172", "0.6285308", "0.6285308", "0.6281354", "0.62721556", "0.62643033", "0.6262745", "0.625416", "0.6218062", "0.62179774", "0.6217759", "0.6217759", "0.6208347", "0.6200834", "0.6161696", "0.6144672", "0.6143541", ...
0.71600014
0
DELETE /instituicoes/1 DELETE /instituicoes/1.json
def destroy @instituicao = Instituicao.find(params[:id]) @instituicao.destroy respond_to do |format| format.html { redirect_to instituicoes_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @asignatura.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end", "def destroy\n @instancium.destroy\n respond_to do |format|\n format.html { redirect_to instancia_url, notice: 'Instancium was successfully destroyed.' }\n format.json { head...
[ "0.7370825", "0.73668385", "0.73220986", "0.73165035", "0.7307515", "0.7260004", "0.71701807", "0.71200705", "0.7117085", "0.7117085", "0.7085163", "0.7083893", "0.7060684", "0.7056958", "0.7053504", "0.70364827", "0.7032805", "0.7027775", "0.70275205", "0.701552", "0.7015155...
0.7671489
0
POST /data_items POST /data_items.json
def create @data_item = DataItem.new(data_item_params) respond_to do |format| if @data_item.save format.html { redirect_to @data_item, notice: 'Data item was successfully created.' } format.json { render :show, status: :created, location: @data_item } else format.html { rend...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n item = list.items.create!(item_params)\n render json: item, status: 201\n end", "def create\n @request_item = RequestItem.new(request_item_params)\n @request_item.item = Item.new(name: params[:request_item][:item][:name])\n\n if @request_item.save\n render json: @request_item \n...
[ "0.6995797", "0.6736687", "0.67053056", "0.662083", "0.660447", "0.6530322", "0.64518636", "0.64164734", "0.6386439", "0.6361424", "0.63582677", "0.63432807", "0.62786186", "0.6271697", "0.62401927", "0.62266135", "0.61705756", "0.61504644", "0.61439097", "0.6133691", "0.6132...
0.6744072
1
Get the underlying type size in bits
def type_size @type.size end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def size\n (@bit_length*@length*@count)/8.0\n end", "def size\n @type.size\n end", "def sizeof(type)\n size_ptr = Pointer.new(:ulong_long)\n align_ptr = Pointer.new(:ulong_long)\n NSGetSizeAndAlignment(type, size_ptr, align_ptr)\n size_ptr[0]\n end", "def raw_num_bytes\...
[ "0.7705189", "0.7467742", "0.7450963", "0.7417675", "0.734754", "0.70911944", "0.70911944", "0.7063093", "0.70573896", "0.68974715", "0.6862758", "0.6853569", "0.67551893", "0.66868585", "0.6642069", "0.6633071", "0.660719", "0.6605012", "0.657718", "0.6556635", "0.65282625",...
0.7743193
0
Set the size and signedness of the underlying type
def set_type_size(sz, signed = false) tname = "#{signed ? "" : "U"}Int#{sz}" t = eval tname raise "unsupported bitfield type #{tname}" unless t @type = t @signed = signed return sz end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def type_size=(sz)\n t = eval \"Int#{sz}\"\n raise \"unsupported enum size #{sz}\" unless t\n @type = t\n return sz\n end", "def initialize\n @type = LENGTH\n @value = UNSET\n @value_list = [SHORT, LONG].freeze\n end", "def size=(size)\n instanc...
[ "0.6069003", "0.59874624", "0.5922158", "0.58663684", "0.5863692", "0.5747521", "0.57346654", "0.5697523", "0.5636921", "0.562953", "0.55702984", "0.55702984", "0.5555129", "0.55262977", "0.55237573", "0.552178", "0.5498379", "0.54919183", "0.5478183", "0.544552", "0.5405694"...
0.75745386
0
When people refer to a mountain they can use Mount Name, Name Mountain, Mt. Name, Name mtn ...etc
def aliases myAliases = "" if ['Mount ',' Mountain',' Peak'].any? {|word| self.name.include?(word)} short = shortname myAliases = "#{short} Mountain, Mount #{short}, Mt. #{short}, Mt #{short}, #{shortname} mt, #{shortname} mtn, #{short} mtn., #{short} Peak" end myAliases end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def full_name\n \"#{brand.name} #{name} (#{vehicle_type.name})\"\n \n end", "def snake_name\n @mountain.name.gsub(/./,'').gsub(/ /,'_').downcase\n end", "def name\n 'occupant'\n end", "def human_from_name; end", "def appellant_fullname_readable\n appellant_name&.titleize\n end", "d...
[ "0.64742225", "0.6427333", "0.6344343", "0.63430834", "0.6299515", "0.6277544", "0.6233395", "0.62087435", "0.6203189", "0.61714435", "0.61332124", "0.61231005", "0.61062247", "0.609935", "0.60773283", "0.6067734", "0.6060615", "0.60569674", "0.6050722", "0.60484797", "0.6040...
0.6846041
0
Searches for the nearest higher mountain in a given radius and sets that as the parent mountain Sets distance to parent mountain as well
def set_parent_mountain_by_radius radius Place.find_by_radius(centerLatitude, centerLongitude, radius, (height||0)+1).where("type = 'Mountain'").each do |mountain| distance = dist(mountain.centerLatitude, mountain.centerLongitude) if distance < dist_to_parent && self != mountain self.di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def refresh_nearby_mountains\n return unless self.height_changed? || self.latitude_changed? || self.longitude_changed?\n Mountain.find_by_radius(self.latitude,self.longitude,self.dist_to_parent + 20).where(\"type = 'Mountain'\").each do |mountain|\n next if mountain.height.nil? || mountain.dist_to_paren...
[ "0.7133173", "0.6104328", "0.58099306", "0.55982375", "0.54753995", "0.53915673", "0.5343848", "0.5337359", "0.5316703", "0.52875584", "0.5238724", "0.5238321", "0.521971", "0.51853186", "0.51826876", "0.5162653", "0.51573294", "0.5144329", "0.5136009", "0.51356137", "0.51223...
0.85513055
0
Look for mountains within radius to parent or 30km whichever is higher. If this mountain is higher than a mountain in this radius and closer than its parent then change that mountains parent to be this mountain and update its dist_to_parent
def refresh_nearby_mountains return unless self.height_changed? || self.latitude_changed? || self.longitude_changed? Mountain.find_by_radius(self.latitude,self.longitude,self.dist_to_parent + 20).where("type = 'Mountain'").each do |mountain| next if mountain.height.nil? || mountain.dist_to_parent.nil? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_parent_mountain_by_radius radius\n Place.find_by_radius(centerLatitude, centerLongitude, radius, (height||0)+1).where(\"type = 'Mountain'\").each do |mountain|\n distance = dist(mountain.centerLatitude, mountain.centerLongitude) \n if distance < dist_to_parent && self != mountain\n ...
[ "0.8235895", "0.5898242", "0.5318209", "0.5277388", "0.5045914", "0.49961343", "0.49835724", "0.49419254", "0.49409592", "0.49079368", "0.4890193", "0.48785388", "0.48690915", "0.486506", "0.4854083", "0.4815669", "0.48073077", "0.47885486", "0.478069", "0.47805166", "0.47803...
0.71061254
1
Returns an array of Licensee::License instances
def licenses(options = {}) Licensee::License.all(options) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def licenses\n licenses = []\n uris = metadata[dataset_uri][dct.license.to_s]\n if uris.nil?\n []\n else\n uris.each do |uri|\n l = metadata[uri]\n licenses << License.new(:uri => uri, :name => l[dct.title.to_s])\n end\n return l...
[ "0.79116863", "0.7615163", "0.7191282", "0.7116111", "0.7056881", "0.70310897", "0.6982774", "0.6905566", "0.6766984", "0.66965204", "0.6654633", "0.6613263", "0.66106236", "0.65628034", "0.65628034", "0.65494007", "0.65008265", "0.64991575", "0.6475362", "0.6403956", "0.6308...
0.8071391
0
Returns the license for a given path
def license(path) Licensee.project(path).license end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def license\n File.read file_path('LICENSE') if license?\n end", "def license_file_path(path = NULL)\n if null?(path)\n @license_file_path || File.join(install_dir, \"LICENSE\")\n else\n @license_file_path = File.join(install_dir, path)\n end\n end", "def license\n last...
[ "0.7683035", "0.74824435", "0.7099152", "0.70910287", "0.6921656", "0.6828952", "0.68228656", "0.6766218", "0.67525727", "0.6741766", "0.66850466", "0.6644496", "0.6614537", "0.6590169", "0.6530255", "0.65026665", "0.64850676", "0.647243", "0.6460033", "0.6417067", "0.6340329...
0.86217886
0
Inverse of the confidence threshold, represented as a float By default this will be 0.1
def inverse_confidence_threshold @inverse ||= (1 - Licensee.confidence_threshold / 100.0).round(2) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inverse_brightness\n @base.brightness > 0.5 ? -1 : 1\n end", "def threshold(x)\n\t\tx > 0 ? 1.0 : 0.0\n\tend", "def confidence_lowered\n @positions.transform_values! {|value| value - 1}\n @positions.delete_if {|key, value| value == 0 }\n end", "def inverse()\n map_hash{|k,v|[k,1/v] ...
[ "0.6771814", "0.6225526", "0.6224604", "0.598087", "0.5944674", "0.57596177", "0.5613212", "0.56006366", "0.55319154", "0.54572326", "0.5448475", "0.5445973", "0.5438047", "0.5371062", "0.53431785", "0.5311402", "0.53051555", "0.5297779", "0.5294272", "0.5287737", "0.5282349"...
0.8523854
0
Return the list of linked workitems ['role1:wid1', ..., 'roleN:widN']
def links tmp = [] @doc.xpath('//field[@id="linkedWorkItems"]/list/struct').each do |struct| linked_wid = struct.xpath('item[@id="workItem"]').text role = struct.xpath('item[@id="role"]').text tmp << "#{role}:#{linked_wid}" end return tmp end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def workitems (store_name=nil)\n\n return load_user_workitems if store_name == 'users'\n return (@workitems[store_name] || []) if store_name\n\n # then return all the workitems the user has access to\n\n wis = load_user_workitems\n\n @store_names.inject(wis) do |r, sname|\n r += (@workitems[sna...
[ "0.588742", "0.5639725", "0.5494293", "0.5393605", "0.5306446", "0.5221445", "0.51779103", "0.51683897", "0.51538044", "0.5148698", "0.5145366", "0.51173925", "0.51153964", "0.51047075", "0.50885755", "0.5083474", "0.5060652", "0.5057517", "0.50118136", "0.5007342", "0.500442...
0.7573507
0
Add a link to another workitem with specified role
def add_link(lh) lnk_wid = lh[:wid] lnk_role = lh[:role] # find or create the attach node if @doc.xpath('//field[@id="linkedWorkItems"]/list').last.nil? Nokogiri::XML::Builder.with(@doc.xpath('//work-item').last) do field(:id => 'linkedWorkItems') { list {} } end end ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_role_url(url, role_index=0)\n implementation[\"roles\"][role_index][\"role_url\"]=url\n end", "def admin_link_to_user(user)\n case user.role\n when 'influencer'\n link_to(user.full_name, admin_influencer_path(user.influencer))\n when 'affiliate'\n link_to(user.full_na...
[ "0.5651713", "0.5580572", "0.5452056", "0.5435948", "0.5411164", "0.5391962", "0.5356014", "0.531838", "0.5298207", "0.5297529", "0.52965766", "0.5295887", "0.5295887", "0.5289582", "0.52657247", "0.52458954", "0.52362657", "0.52158487", "0.52028644", "0.51917166", "0.5188409...
0.61871344
0
Delete an organization's routing settings
def delete_routing_settings(opts = {}) delete_routing_settings_with_http_info(opts) return nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @org_setting.destroy\n\n head :no_content\n end", "def delete_routing_settings_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: RoutingApi.delete_routing_settings ...\"\n end\n \n # resource path\n lo...
[ "0.730187", "0.65662843", "0.6402383", "0.6378157", "0.6342843", "0.63057655", "0.62673783", "0.62329805", "0.6202773", "0.6193246", "0.617383", "0.61692655", "0.6145706", "0.61408544", "0.61327016", "0.61080647", "0.6107035", "0.60616076", "0.6054164", "0.6053777", "0.605009...
0.6706296
1
Get the wrapup codes for a queue
def get_routing_queue_wrapupcodes(queue_id, opts = {}) data, _status_code, _headers = get_routing_queue_wrapupcodes_with_http_info(queue_id, opts) return data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_routing_queue_wrapupcodes_with_http_info(queue_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: RoutingApi.get_routing_queue_wrapupcodes ...\"\n end\n \n \n # verify the required parameter 'queue_id' is set\n fail Argumen...
[ "0.593082", "0.5857839", "0.5729366", "0.57112134", "0.56663644", "0.56494474", "0.5646263", "0.5646263", "0.5624186", "0.55112594", "0.5492475", "0.5487969", "0.5431073", "0.5431073", "0.54277134", "0.539099", "0.53842854", "0.5314806", "0.5296389", "0.5292231", "0.5276259",...
0.6597079
1
Get an organization's routing settings
def get_routing_settings(opts = {}) data, _status_code, _headers = get_routing_settings_with_http_info(opts) return data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_routing_settings_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: RoutingApi.get_routing_settings ...\"\n end\n \n # resource path\n local_var_path = \"/api/v2/routing/settings\".sub('{format}','json')\n\n # qu...
[ "0.61976194", "0.6116203", "0.6043768", "0.6023132", "0.6023132", "0.59173304", "0.5763514", "0.57590765", "0.5696754", "0.5636265", "0.56117845", "0.5528207", "0.5515749", "0.5483957", "0.54781586", "0.5463524", "0.54619485", "0.5427907", "0.53998363", "0.53828526", "0.53819...
0.62819916
0
Get Contact Center Settings
def get_routing_settings_contactcenter(opts = {}) data, _status_code, _headers = get_routing_settings_contactcenter_with_http_info(opts) return data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_settings\n settings.get\n end", "def get_routing_settings_contactcenter_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: RoutingApi.get_routing_settings_contactcenter ...\"\n end\n \n # resource path\n ...
[ "0.6859486", "0.67521214", "0.6604221", "0.6604221", "0.65050334", "0.65021676", "0.6328418", "0.63258797", "0.6324125", "0.6308632", "0.6276304", "0.6253201", "0.622507", "0.61976767", "0.6146485", "0.6141268", "0.61061513", "0.609263", "0.609263", "0.6048011", "0.6032028", ...
0.71615505
0
Get the list of routing skills.
def get_routing_skills(opts = {}) data, _status_code, _headers = get_routing_skills_with_http_info(opts) return data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def skills\n\t\t[]\n\tend", "def index\n @desired_skills = DesiredSkill.all\n end", "def index\n\t@skills = Skill.all\n end", "def skills_view(skills)\n skills.map { |skill| skill_view(skill) }\n end", "def list_skills\n\t\trender json: Skill.where(language_id: params[:language_id]).to_json\n\tend...
[ "0.7204195", "0.6707567", "0.6667485", "0.665472", "0.66317236", "0.6582452", "0.6541576", "0.65037006", "0.65037006", "0.64443225", "0.6414369", "0.64018404", "0.6391023", "0.6369318", "0.63278127", "0.62645847", "0.6242867", "0.6210142", "0.6133432", "0.6127569", "0.611758"...
0.7397265
1
Add bulk routing language to user. Max limit 50 languages
def patch_user_routinglanguages_bulk(user_id, body, opts = {}) data, _status_code, _headers = patch_user_routinglanguages_bulk_with_http_info(user_id, body, opts) return data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_language_redirect\n # Add languages\n record.parts.each do |part|\n # Get language redirect configuration\n if part.name == 'config'\n # Loop all languages\n languages = []\n part.content.each_line do |language|\n # Get language name and bas...
[ "0.64350766", "0.6042314", "0.59030354", "0.5797003", "0.5696586", "0.5687204", "0.566597", "0.5517404", "0.5451561", "0.54204214", "0.5397678", "0.5396581", "0.53672826", "0.52999985", "0.52969587", "0.5285753", "0.52821153", "0.5263881", "0.525577", "0.52556974", "0.5236189...
0.60516745
1
Just calling model_cls.new(attrs) fails to account for embedded associations that are inherited with _type. We check for embedded associations and ensure that embeds_many and embeds_one are handled properly.
def _reify model_cls, attrs disc_key = model_cls.discriminator_key model_cls = attrs[disc_key].constantize if attrs[disc_key] instance = model_cls.new attrs.each do |k, v| if (rel = model_cls.relations[k]) && rel.embedded? # Reify the subrel if rel.is_a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def construct_model(record, reflection, id, attributes, seen, model_cache)\n klass = if reflection.polymorphic?\n record.send(reflection.foreign_type).constantize\n else\n reflection.klass\n end\n\n model = model_cache[klass][id] ||= klass.instantiate(attributes)\n other = re...
[ "0.6377699", "0.62251276", "0.6024569", "0.5934028", "0.57572323", "0.5727669", "0.5664753", "0.5664248", "0.5582147", "0.55699843", "0.55603516", "0.5559794", "0.55230045", "0.55061775", "0.55044043", "0.54982626", "0.54449993", "0.5444811", "0.5436498", "0.540047", "0.53890...
0.6256274
1
Given an array of nonuniform length arrays, rightpad all arrays with zeros so they're the same size, then transpose the array. This is a destructive operation: the zeropadding modifies the arrayofarrays
def jagged_transpose(arrays) max_length = arrays.map{ |a| a.length }.max arrays.map{ |a| a.fill(0, a.length, max_length - a.length) }.transpose end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transpose(array)\n result = []\n number = array.count\n if array.empty?\n single_array = array\n else\n single_array = [array[0]]\n end\n single_array.each do |val|\n val.each do |v|\n new_array = []\n number.times do\n new_array << v\n end\n result << new_array\n e...
[ "0.67185825", "0.65414304", "0.64826894", "0.6358183", "0.6284582", "0.62558293", "0.6179306", "0.6164385", "0.6154813", "0.60738105", "0.59777343", "0.5919717", "0.5879765", "0.5865317", "0.58263654", "0.5804391", "0.58035696", "0.57423973", "0.5734635", "0.57249856", "0.571...
0.71513534
0
GET /stock_gabarras/1 GET /stock_gabarras/1.xml
def show @stock_gabarra = StockGabarra.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @stock_gabarra } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @stock = Stock.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @stock }\n end\n end", "def new\n @stock_gabarra = StockGabarra.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { rende...
[ "0.67526084", "0.6715799", "0.6571327", "0.65441597", "0.6493681", "0.6479716", "0.63526934", "0.6342628", "0.633463", "0.62446284", "0.61916393", "0.6180023", "0.6170798", "0.6159341", "0.6104314", "0.60863477", "0.606803", "0.6045858", "0.60283875", "0.60276", "0.60222316",...
0.73484886
0
GET /stock_gabarras/new GET /stock_gabarras/new.xml
def new @stock_gabarra = StockGabarra.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @stock_gabarra } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @stock = Stock.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @stock }\n end\n end", "def new\r\n @stock_transfer = StockTransfer.new\r\n\r\n respond_to do |format|\r\n format.html # new.html.erb\r\n format.xml { render :x...
[ "0.75774455", "0.713519", "0.71218437", "0.71024317", "0.7076562", "0.69889104", "0.6884069", "0.6884069", "0.6884069", "0.6884069", "0.6884069", "0.6884069", "0.67877734", "0.6784752", "0.6774144", "0.6696844", "0.6692977", "0.66864675", "0.66664976", "0.6634966", "0.6622655...
0.77319825
0
POST /stock_gabarras POST /stock_gabarras.xml
def create @stock_gabarra = StockGabarra.new(params[:stock_gabarra]) respond_to do |format| if @stock_gabarra.save flash[:notice] = 'StockGabarra was successfully created.' format.html { redirect_to(@stock_gabarra) } format.xml { render :xml => @stock_gabarra, :status => :created...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @stock = Stock.new(params[:stock])\n\n respond_to do |format|\n if @stock.save\n flash[:notice] = 'Stock was successfully created.'\n format.html { redirect_to(@stock) }\n format.xml { render :xml => @stock, :status => :created, :location => @stock }\n else\n ...
[ "0.6194585", "0.6093889", "0.60368073", "0.6017775", "0.6014114", "0.59872866", "0.588416", "0.5862459", "0.5862459", "0.5862459", "0.5862459", "0.5862459", "0.5862459", "0.58326036", "0.5828713", "0.5828713", "0.5828713", "0.5828713", "0.5815972", "0.57984734", "0.5779719", ...
0.70952505
0
PUT /stock_gabarras/1 PUT /stock_gabarras/1.xml
def update @stock_gabarra = StockGabarra.find(params[:id]) respond_to do |format| if @stock_gabarra.update_attributes(params[:stock_gabarra]) flash[:notice] = 'StockGabarra was successfully updated.' format.html { redirect_to(@stock_gabarra) } format.xml { head :ok } else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @stock = Stock.find(params[:id])\n\n respond_to do |format|\n if @stock.update_attributes(params[:stock])\n flash[:notice] = 'Stock was successfully updated.'\n format.html { redirect_to(@stock) }\n format.xml { head :ok }\n else\n format.html { render :act...
[ "0.6187903", "0.61674374", "0.6154142", "0.6084725", "0.6019372", "0.5988001", "0.59314835", "0.5902975", "0.58936757", "0.5881712", "0.5881712", "0.5881712", "0.5881712", "0.5881712", "0.5881712", "0.5881712", "0.5881712", "0.5881712", "0.5881712", "0.5881712", "0.5876238", ...
0.6751812
0
DELETE /stock_gabarras/1 DELETE /stock_gabarras/1.xml
def destroy @stock_gabarra = StockGabarra.find(params[:id]) @stock_gabarra.destroy respond_to do |format| format.html { redirect_to(stock_gabarras_url) } format.xml { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @stock = Stock.find(params[:id])\n @stock.destroy\n\n respond_to do |format|\n format.html { redirect_to(stocks_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @stock = Stock.find(params[:id])\n @stock.destroy\n\n respond_to do |format|\n format.h...
[ "0.67664903", "0.67664903", "0.6697583", "0.6637852", "0.65870255", "0.6581397", "0.65796584", "0.6570577", "0.6497727", "0.64919853", "0.64591134", "0.6368759", "0.6343575", "0.6312497", "0.62912893", "0.62897813", "0.6233325", "0.62260705", "0.6219344", "0.6213168", "0.6209...
0.7252481
0
Returns an optional workout sumary If defaults are set returns standard summary. Otherwaise returns the start_workout partial
def workout_program(user) return workout_summary(user) if user.started? start_workout(user) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def summary\n #render unless @output\n @summary\n end", "def summary *args\n @summary = args.first if args.size > 0\n end", "def workout\n WorkoutPlan.new(plan)\n end", "def total_workouts\n set_sport_by_user.count || 0\n end", "def edit_summary\n return summary unless diff_...
[ "0.5523957", "0.530634", "0.52549636", "0.5158978", "0.5071245", "0.4990898", "0.49788228", "0.49595895", "0.49449766", "0.4916034", "0.48936713", "0.4891835", "0.48880687", "0.48851243", "0.48846623", "0.48550475", "0.48405808", "0.48034096", "0.47995967", "0.47987047", "0.4...
0.60265905
0
>> quiz = [0,0,0,1,0,0,1,1,0,1] >> count_quiz_completions(quiz) => "The number of participants who did not attempt Quiz 1 is 6 out of 10 total participants."
def count_quiz_completions(quiz_results) no_quiz = quiz_results.count(0) total = quiz_results.count "The number of participants who did not attempt Quiz 1"\ " is #{no_quiz} out of #{total} total participants." end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_quiz(questions)\r\n answer = \"\"\r\n score = 0\r\n for question in questions #a for loop for every question in the above array\r\n puts question.prompt\r\n answer = gets.chomp()\r\n if answer == question.answer\r\n score += 1\r\n end\r\nend\r\n puts \"you got\" + score.to_s ...
[ "0.7076016", "0.6728585", "0.6710225", "0.6652424", "0.6644462", "0.663831", "0.6636416", "0.6606279", "0.6586398", "0.64089113", "0.6376458", "0.6270606", "0.6246921", "0.6238103", "0.6178607", "0.6170431", "0.61440253", "0.61341083", "0.61295664", "0.611574", "0.61090994", ...
0.8939018
0
Enables or disables the generation of events in the Page domain.
def page_events=(new_page_events) new_page_events = !!new_page_events if new_page_events != page_events @rpc.call(new_page_events ? 'Page.enable' : 'Page.disable') @page_events = new_page_events end new_page_events end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable\n {\n method: \"Page.enable\"\n }\n end", "def set_lifecycle_events_enabled(enabled:)\n {\n method: \"Page.setLifecycleEventsEnabled\",\n params: { enabled: enabled }.compact\n }\n end", "def disable\n {\n method: \"Pag...
[ "0.67002696", "0.6632279", "0.5825981", "0.5763034", "0.55463254", "0.5482061", "0.545053", "0.5421582", "0.5420663", "0.53439677", "0.5221659", "0.52019787", "0.5195125", "0.5152388", "0.5122626", "0.51105136", "0.5058344", "0.5049732", "0.5035277", "0.50184125", "0.4998353"...
0.7110019
0
Returns string containing respondent's first and last name
def respondent_full_name [respondent_first_name, respondent_last_name].compact.join(' ') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def full_name\n if first_name? && last_name?\n name_words = first_name.split(\" \") + last_name.split(\" \")\n return name_words.map{ |w| w.capitalize }.join(\" \")\n else\n return email\n end\n end", "def full_name\n [first_name, last_name].join(' ')\n end", "def full_name...
[ "0.7651924", "0.7569874", "0.7541533", "0.75231886", "0.75231886", "0.7517006", "0.7505338", "0.74688125", "0.74542254", "0.74542254", "0.74542254", "0.74542254", "0.74542254", "0.74542254", "0.7438604", "0.74363995", "0.74363995", "0.74363995", "0.74363995", "0.74363995", "0...
0.8590738
0
fixes birth number badly transfered from candidates
def fix_bad_birth_numbers(students = nil) ActiveRecord::Base.connection.execute('SET NAMES UTF8') notfound = [] students ||= Student.find(:all) @@mylog.info "There are %i students" % students.size students.each do |student| if c = Candidate.find(:all, :conditions => ["birth_number ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def celebrate_birthday\n\t\t@age += 1\n\t\tabout(true)\n\tend", "def celebrate_birthday(age)\n\t\t\tage = @age\n\t\t\tage + 1\n\t\tend", "def celebrate_birthday\n\t\t@age += 1\n\tend", "def celebrate_birthday\n\t\t@age += 1\n\tend", "def celebrate_birthday\r\n\t\t@age += 1\r\n\tend", "def celebrate_birth...
[ "0.61577225", "0.6135849", "0.60823715", "0.60823715", "0.60721546", "0.60409033", "0.60383934", "0.6026922", "0.6012647", "0.5918162", "0.59168875", "0.59168875", "0.5915824", "0.5908193", "0.5894481", "0.58818865", "0.585106", "0.5849952", "0.5849952", "0.5849952", "0.58261...
0.6877508
0
reads sident from webservice and change it for students
def repair_sident(indices) @@mylog.info "There are %i students" % indices.size @client = SOAP::NetHttpClient.new service = SERVICE_URL + SIDENT_SERVICE_PATH f = File.new("sident_errs.txt", "wb") indices.each do |index| @@mylog.info "Procesing index #%i" % index.id service_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_uic(birth_number)\n service = prepare_service(birth_number)\n @@logger.debug \"Trying service for student with bn #{birth_number}\"\n @@logger.debug service\n begin\n service_response = query_service(service)\n rescue Exception => e\n @@logger.error 'Something gone wrong with servi...
[ "0.6116094", "0.6046837", "0.6037891", "0.5998901", "0.59817576", "0.59674853", "0.59195304", "0.5898165", "0.5895579", "0.5892546", "0.58843505", "0.58116835", "0.58065975", "0.5803452", "0.5801357", "0.58009857", "0.5794507", "0.57696253", "0.5760095", "0.57466507", "0.5745...
0.64471924
0
copies corridor subject from one to another corridor
def copy_corridor_subject(from_specialization, to_specialization) SpecializationSubject.find_all_by_specialization_id(from_specialization).each {|cs| csn = cs.clone csn.update_attribute(:specialization_id, to_specialization) } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy_to(other); end", "def assign_canned_subject\n self.subject = canned_subject\n end", "def combine_subjects\n @sentences.each_cons(2) do |s1, s2|\n if s1.subject == s2.subject\n s2.subject = Pronoun.new(s1.subject.gender)\n end\n end\n end", "def copy(new_prefix, other_vals...
[ "0.62365746", "0.590587", "0.5584064", "0.55696654", "0.54849213", "0.5470133", "0.53966343", "0.53966343", "0.53966343", "0.53966343", "0.53966343", "0.53966343", "0.53966343", "0.53966343", "0.53887695", "0.53752095", "0.5329787", "0.529699", "0.52954537", "0.5282319", "0.5...
0.77002716
0
adds corridor subjects from type and subjects ids
def add_corridor_subjects(specialization_id, type, *ids) ids.each {|i| type.create(:subject_id => i, :specialization_id => specialization_id) } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject_ids=(*ids)\n ids.flatten!\n subjects = subscribables_subscriptions.find(:all, :conditions => { :subscribable_type => 'Subject' })\n subscribables_subscriptions.delete(subjects)\n subscribables.reload\n unless ids == [0]\n ids.delete('0')\n subscribables << Subject.find_all_by_i...
[ "0.5937251", "0.58760554", "0.5841737", "0.57777596", "0.57418853", "0.5698272", "0.564167", "0.5517109", "0.55109835", "0.54901993", "0.545795", "0.5440346", "0.5438689", "0.5360564", "0.5348204", "0.5291302", "0.5288366", "0.5284829", "0.52696025", "0.5267824", "0.5262338",...
0.8289575
0
For each keyvalue pair in the second provided hash, predict the email given the format(s) in company_email_format_hash
def predict_email(prediction_dataset_hash) prediction_dataset_hash.each do |name, domain| new_email = EmailObject.new(name) new_email.domain = domain if @company_email_format_hash.key? domain new_email.email_format = @company_email_format_hash[domain] puts "Name: #{new_email.name} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def emails_to_hash(emails)\n {\n :primary => emails.find { |email| email.primary }.email,\n :additional => emails.select { |email| !email.primary && email.verified}.map { |email| email.email }\n }\nend", "def read_hash(gmail, my_hash)\n\n @my_hash = my_hash\n @gmail = gmail\n\n @my_hash.each do |key, ...
[ "0.5980221", "0.5902993", "0.5503901", "0.54622376", "0.5426123", "0.5385771", "0.53739285", "0.53543955", "0.53529567", "0.534108", "0.5340184", "0.5290035", "0.5247238", "0.5213672", "0.5188327", "0.51502", "0.50781226", "0.5064934", "0.50607044", "0.5059193", "0.5049328", ...
0.7308328
0
1. For a given person, return their favourite tv show
def tv_show(person) return person[:favourites][:tv_show] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tv_show(person)\n tv_show = person[:favourites][:tv_show]\n return tv_show\nend", "def fav_tv_show(person)\n return person[:favourites][:tv_show]\nend", "def get_favourite_tv_show(person)\n return person[:favourites][:tv_show]\nend", "def get_tv_show(person)\n return person[:favourites][:tv_show]\ne...
[ "0.7669126", "0.74630356", "0.7420349", "0.7370223", "0.7161871", "0.71301794", "0.71096283", "0.69950676", "0.68426484", "0.6778154", "0.676397", "0.6762284", "0.6553473", "0.65082234", "0.6430549", "0.6378693", "0.63551176", "0.6304187", "0.6287841", "0.6226974", "0.6220912...
0.7502839
1
def bin_decision_backup(past_yield, desired_yield) if(past_yield <= desired_yield) bin = 1 else bin = rand(2..10) end return bin end
def bin_decision(threshold) tmp = rand(1..100) if(tmp <= threshold) bin = 1 else bin = rand(2..10) end return bin end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rand_gen\n rand100 = rand(1..100)\n if (0..50).cover?(rand100)\n output_val = 1\n elsif (51..75).cover?(rand100)\n output_val = 2\n elsif (76..90).cover?(rand100)\n output_val = 3\n elsif (91..95).cover?(rand100)\n output_val = 4\n elsif (96..100).cover?(rand100)\n ...
[ "0.6501454", "0.64549047", "0.64001167", "0.63501245", "0.63500243", "0.6141074", "0.6114508", "0.60487866", "0.59814036", "0.59814036", "0.59814036", "0.5966036", "0.59596086", "0.5950158", "0.59330815", "0.5932772", "0.5895907", "0.5883795", "0.583623", "0.5817098", "0.5809...
0.79586697
0
Find a move number of a possible fork:
def move_number_fork current = @game.current_player if current == :O @count_spots.last if @game.fork?.size > 1 end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_fork(wins, forker, forkee)\n position_counts = count_positions(wins, forker, forkee)\n forking_moves = []\n position_counts.each do |position, count|\n forking_moves.push(position) if count > 1\n end\n forking_moves = (forking_moves - (forking_moves & forker))\n forking_moves.empty?...
[ "0.7214283", "0.67108524", "0.6621591", "0.65560275", "0.6528573", "0.635649", "0.6356065", "0.6356065", "0.6188072", "0.60513544", "0.6030303", "0.5945687", "0.5834187", "0.5826054", "0.57539535", "0.572253", "0.5696886", "0.56904507", "0.5681871", "0.562731", "0.55833095", ...
0.72230446
0
Return an array of primary region replicas tableName table to return regions for
def getPrimaryRegionEncodedNames(tableName) c = HBaseConfiguration.new() tableNameObj = TableName.valueOf(tableName) t = HTable.new(c, tableNameObj) regions = t.getRegionsInRange(t.getStartKeys[0], t.getEndKeys[t.getEndKeys.size-1]) priRegions = Array.new regions.each do |r| ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def table_regions(name, start_row = nil, end_row = nil)\n raise NotImplementedError, \"Getting the table regions is not supported yet\"\n end", "def getPrimaryDistribution(tableName)\n c = HBaseConfiguration.new()\n tableNameObj = TableName.valueOf(tableName)\n t = HTable.new(c, tableNameObj)\n r...
[ "0.6588477", "0.6113635", "0.5896268", "0.58489084", "0.5829196", "0.58112407", "0.57174903", "0.5666384", "0.5639907", "0.56119996", "0.55950606", "0.55498254", "0.5516848", "0.5445279", "0.543753", "0.5359669", "0.5347066", "0.5328389", "0.5319675", "0.53120387", "0.5307764...
0.7482731
0
Distribute the regions in the array passed uniformly across the server array provided
def distributePrimaryRegions(priRegions) c = HBaseConfiguration.new() admin = HBaseAdmin.new(c) servers = Array.new() dServers = Array.new() dServers = admin.getClusterStatus.getDeadServerNames() serv = admin.getClusterStatus.getServers() serv.each do |s| if (!dServers.include?(s)) servers << s....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def divide_individually(array_with_number_of_addresses)\n possible_ranges = []\n num = self.to_num()\n bits_to_move = 32 - @bits\n remaining_addresses = self.free\n array_with_number_of_addresses.each() {|number_of_addresses_for_subnet|\n if (2 ** bits_to_move) < number_of_addresses_for_subnet\...
[ "0.5648439", "0.5311164", "0.5304631", "0.51253974", "0.50617677", "0.5017626", "0.49934906", "0.48969123", "0.48899093", "0.4840798", "0.4821756", "0.47919583", "0.47817144", "0.47581056", "0.47357437", "0.47319466", "0.47319466", "0.4725475", "0.47095367", "0.47092828", "0....
0.62527525
0
Initializes a new Ban object
def initialize(raw_ban) @raw_ban = raw_ban end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize\r\n @owner = msg.sender\r\n @counter = 0\r\n @bets = Mapping.of( Integer => Bet ) ## type mapping( uint => Bet )\r\n end", "def initialize(name, bulbs)\n\t\t@name = name\n\t\t@bulbs = bulbs\n\tend", "def initialize (banco, numero_cuenta, saldo_cuenta = 0)\n @banco ...
[ "0.68401676", "0.656826", "0.65381145", "0.64578813", "0.6371757", "0.6274962", "0.62144697", "0.62128013", "0.6204669", "0.62019575", "0.61475253", "0.6133302", "0.6085256", "0.6084247", "0.60379523", "0.60094404", "0.6001493", "0.59995127", "0.59748083", "0.5948451", "0.593...
0.77015656
0
The player's Steam 64 bit ID
def steam_id raw_ban['SteamId'].to_i end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def steam_id\n raw_friend['steamid'].to_i\n end", "def uid\n id && Base58GMP.encode(id)\n end", "def tuid\n self.player_id.to_s + self.team_id.to_s\n end", "def secret_ID(id = nil)\r\n return id ? id >> 16 : @id >> 16\r\n end", "def identifier\n SecureRandom.hex(16)\n end", "def u...
[ "0.73491544", "0.67257905", "0.66229326", "0.6490911", "0.6408611", "0.6287923", "0.6262609", "0.6262545", "0.6260919", "0.6202612", "0.62016654", "0.6170822", "0.616833", "0.6164912", "0.61478496", "0.6097115", "0.60859674", "0.6085555", "0.6085555", "0.6082716", "0.6076983"...
0.7306445
1
String containing the player's ban status in the economy.
def economy_banned_status raw_ban['EconomyBan'] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status\n output = \"\"\n player = @game.player\n output << \"You won!! you have scaped with life from the castle!!! \"\n output << \"WELL DONE!!\"\n end", "def status()\r\n\t\treturn to_s() + \", #{total_guess_count()} guesses (#{bad_guess_count()} bad), won? #{won?}, lost? #{lost?}\"\r\n\tend",...
[ "0.6465956", "0.64026785", "0.6379537", "0.63592315", "0.6345788", "0.6337388", "0.63297904", "0.62974423", "0.619753", "0.6189802", "0.61089504", "0.6094221", "0.60374403", "0.60345924", "0.6032034", "0.60320145", "0.6027504", "0.6008943", "0.60056204", "0.59927166", "0.5975...
0.8089339
0
Due to `if Jets::Stack.has_resources?` check early on in the bootstraping process The code has not been built at that point. So we use a placeholder and will replace the placeholder as part of the cfn template build process after the code has been built and the code_s3_key with md5 is available.
def code_s3_key "code_s3_key_placeholder" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_s3_key\n if photo && photo.filename && photo.source_id && name\n \"places/#{photo.place_id}/#{photo.source_id}/#{photo.file_parts[:root]}-#{name}.#{photo.file_parts[:extension]}\"\n else\n nil\n end\n end", "def bucket_name\n 'ios-ksr-builds'...
[ "0.5726733", "0.5661511", "0.5531613", "0.55142844", "0.5394334", "0.5278653", "0.52558106", "0.52528733", "0.51931196", "0.51488304", "0.5136274", "0.51173973", "0.51095766", "0.5100951", "0.5076209", "0.504742", "0.5042179", "0.50356054", "0.5010599", "0.5001653", "0.497814...
0.7231689
0
Dump given message to the log device without any formatting. If no log device exists, return +nil+.
def <<(msg) unless @logdev.nil? @logdev.write(msg) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def debug(message)\n return unless debugging?\n\n logger.debug(message.to_s)\n nil\n end", "def output(message)\n return if disabled\n if Device.simulator?\n puts(message)\n else\n NSLog(message)\n end\n message\n end", "def debugonce(message)\n ...
[ "0.60039926", "0.58382386", "0.56024206", "0.55666196", "0.55440235", "0.55388784", "0.55302936", "0.5462529", "0.54331875", "0.53947324", "0.5375474", "0.53453916", "0.5311871", "0.5254254", "0.5251005", "0.5231307", "0.5220675", "0.52088624", "0.5199539", "0.5190324", "0.51...
0.5844435
1
Close the logging device.
def close @logdev.close if @logdev end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close\n @logdev.close if @logdev\n end", "def close\n @logdevs.each do |name, ld|\n ld[:dev].close\n end\n end", "def closeLog()\n @logger.close() ;\n end", "def close\n flush\n @log.close if @log.respond_to?(:close) && !@log.tty?\n @log = nil\n end", "def ...
[ "0.81122386", "0.7884688", "0.7607325", "0.75072706", "0.74091536", "0.7402672", "0.73840773", "0.7304757", "0.71073735", "0.6899726", "0.68814754", "0.68182427", "0.6670712", "0.6466136", "0.6224144", "0.6173834", "0.61599284", "0.6155557", "0.61449194", "0.6142942", "0.6099...
0.81379324
0
GET /ios_topbars/new GET /ios_topbars/new.json
def new @ios_topbar = @user.build_ios_topbar respond_to do |format| format.html # new.html.erb format.json { render json: @ios_topbar } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @ios_topbar = @user.build_ios_topbar(params[:ios_topbar])\n\n respond_to do |format|\n if @ios_topbar.save\n format.html { redirect_to user_ios_topbar_url, :flash => { success: 'Top Bar Color successfully created.' } }\n format.json { render json: @ios_topbar, status: :created...
[ "0.67649686", "0.6763822", "0.6451191", "0.6434442", "0.63553584", "0.63374573", "0.62913173", "0.6272199", "0.6260369", "0.62488884", "0.6220289", "0.61899066", "0.6173362", "0.6168536", "0.6167665", "0.6144411", "0.61321086", "0.6129298", "0.61153615", "0.6110055", "0.61036...
0.70895004
0
POST /ios_topbars POST /ios_topbars.json
def create @ios_topbar = @user.build_ios_topbar(params[:ios_topbar]) respond_to do |format| if @ios_topbar.save format.html { redirect_to user_ios_topbar_url, :flash => { success: 'Top Bar Color successfully created.' } } format.json { render json: @ios_topbar, status: :created, location:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @ios_topbar = @user.build_ios_topbar\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @ios_topbar }\n end\n end", "def top_bar\n raise \"No top level progress bar\" unless @top_bar\n\n @top_bar\n end", "def destroy\n @ios_t...
[ "0.63054585", "0.58808243", "0.5842777", "0.5764179", "0.5598212", "0.5550156", "0.55280316", "0.54193044", "0.5368331", "0.53079444", "0.5147426", "0.5113014", "0.50867176", "0.5082762", "0.5045289", "0.5043123", "0.503894", "0.5021577", "0.49959806", "0.49874905", "0.496399...
0.6848883
0
PUT /ios_topbars/1 PUT /ios_topbars/1.json
def update @ios_topbar = @user.ios_topbar respond_to do |format| if @ios_topbar.update_attributes(params[:ios_topbar]) format.html { redirect_to user_ios_topbar_url, :flash => { success: 'Top Bar Color successfully updated.' } } format.json { head :no_content } else format.h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @ios_topbar = @user.build_ios_topbar(params[:ios_topbar])\n\n respond_to do |format|\n if @ios_topbar.save\n format.html { redirect_to user_ios_topbar_url, :flash => { success: 'Top Bar Color successfully created.' } }\n format.json { render json: @ios_topbar, status: :created...
[ "0.6147237", "0.58415157", "0.5777632", "0.5756605", "0.56879574", "0.56521755", "0.56232065", "0.5592485", "0.55634034", "0.5460779", "0.5442371", "0.54187995", "0.54149514", "0.53758353", "0.53338075", "0.53068495", "0.5272955", "0.5256504", "0.52412534", "0.5218861", "0.52...
0.69610995
0
DELETE /ios_topbars/1 DELETE /ios_topbars/1.json
def destroy @ios_topbar = @user.ios_topbar @ios_topbar.destroy respond_to do |format| format.html { redirect_to new_user_ios_topbar_url, :flash => { success: 'Top Bar Color successfully deleted.' } } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n # Make sure the request came from an admin\n unless session[:admin_id]\n redirect_to_home\n return\n end\n \n @bar = Bar.find(params[:id])\n @bar.destroy\n\n respond_to do |format|\n format.html { redirect_to bars_url }\n format.json { head :no_content }\n en...
[ "0.67203504", "0.6693712", "0.66052395", "0.6596948", "0.65449905", "0.6540875", "0.65384316", "0.65342724", "0.65323496", "0.65127444", "0.6466629", "0.64347625", "0.64247054", "0.63976705", "0.6392009", "0.63696116", "0.63678545", "0.6366376", "0.6366376", "0.63474625", "0....
0.7557382
0
Description Test useful to check correctness of conversion and cross browser visibility of all elements of kind Video Mode Html Specific filters ApplicationControlleradmin_authenticate Skipped filters ApplicationControllerauthenticate ApplicationControllerinitialize_location ApplicationControllerinitialize_players_coun...
def videos_test end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_video_element(video_doc, video_options)\n expect(video_doc.at_xpath('video:thumbnail_loc').text).to eq(video_options[:thumbnail_loc])\n expect(video_doc.at_xpath('video:thumbnail_loc').text).to eq(video_options[:thumbnail_loc])\n expect(video_doc.at_xpath('video:gallery_loc').text).to eq(vi...
[ "0.5891938", "0.5838972", "0.58306587", "0.5765835", "0.5723487", "0.5677557", "0.5674475", "0.56693363", "0.5656986", "0.5590565", "0.55620307", "0.5522716", "0.54958296", "0.54794925", "0.5467298", "0.5377037", "0.53142023", "0.53003246", "0.52932036", "0.52903837", "0.5275...
0.66605896
0
Description Test useful to check correctness of conversion and cross browser visibility of all elements of kind Audio Mode Html Specific filters ApplicationControlleradmin_authenticate Skipped filters ApplicationControllerauthenticate ApplicationControllerinitialize_location ApplicationControllerinitialize_players_coun...
def audios_test end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def smartphones_are_visible\n wait = Selenium::WebDriver::Wait.new(:timeout => 0.2)\n preloader_wait\n $driver.manage.timeouts.implicit_wait = 0\n begin\n search_result = wait.until { $driver.find_element(@@список_смартфонов) }\n rescue => e\n error('Eti mob...
[ "0.56154615", "0.5464052", "0.54391384", "0.53845745", "0.5375689", "0.5348216", "0.5299415", "0.52725124", "0.5262615", "0.5251521", "0.5251047", "0.52241135", "0.51914674", "0.51686305", "0.51580733", "0.51398253", "0.5126495", "0.51260114", "0.51169014", "0.51077414", "0.5...
0.6196123
0