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
GET /course_numbers GET /course_numbers.xml
def index @courses = Course.unique_course_numbers_and_names_by_number respond_to do |format| format.html # index.html.erb format.xml { render :xml => @course_numbers } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @course = Course.new\n @course.semester = ApplicationController.current_semester\n @course.year = Time.now.year\n @course_numbers = CourseNumber.find(:all, :order => \"name\")\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @course }\n en...
[ "0.63149214", "0.6289443", "0.62356186", "0.61004436", "0.60712767", "0.6037841", "0.58464617", "0.58437884", "0.58178073", "0.58065563", "0.5784638", "0.57619214", "0.57259357", "0.57159525", "0.5712688", "0.5703823", "0.5687839", "0.5640228", "0.56353664", "0.5634374", "0.5...
0.7304932
0
Matrix: 1 2 O X X X x . x x . . x . x . x . . x . x . x . x . . x x Piece covered: 1, second row 2 X X x x x
def test_cover root = create_solve_matrix(simple_board, [piece('o x'), piece('x x')]) cover(root.r.d.d) assert_equal [1, 1, 1], walk(root, skip: 1).map(&:size) assert_equal <<~MATRIX.chomp, print_matrix(root) 2 X X x x x MATRIX end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cover(matrix, rows, cols, line_num = rows.size - 1)\n\t\t\tif line_num <= 0\n\t\t\t\treturn false if line_num < 0\n\t\t\t\trows.each do |i|\n\t\t\t\t\trow = matrix[i]\n\t\t\t\t\tcols.each do |j|\n\t\t\t\t\t\treturn false if row[j].zero?\n\t\t\t\t\tend\n\t\t\t\tend\n\t\t\t\treturn [], []\n\t\t\tend\n\n\t\t\t# C...
[ "0.6364561", "0.63057566", "0.6260112", "0.6207252", "0.617439", "0.6169232", "0.6164779", "0.612969", "0.6107373", "0.6099621", "0.608486", "0.60329473", "0.60057473", "0.60041994", "0.5994748", "0.5980929", "0.59549505", "0.594661", "0.5944905", "0.5939278", "0.59336627", ...
0.7020383
0
does the schedule chain start with a pickup and end with a dropoff?
def functional? not self.schedules.empty? and self.schedules.first.is_pickup_stop? and self.schedules.last.is_drop_stop? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_pick_up_from_stop\n @bus_stop = BusStop.new(\"Elm Row\", queue = [])\n @bus_stop.add_person_to_queue(@passenger1)\n @bus.pick_up_from_stop(@bus_stop)\n assert_equal(1, @bus.count_passengers())\n assert_equal(0, @bus_stop.count_queuers())\nend", "def pickup_arrived(pickup, sent_at = Time.n...
[ "0.6366195", "0.60708785", "0.6018729", "0.60008186", "0.59566903", "0.5944535", "0.5896943", "0.589478", "0.58703244", "0.5824682", "0.575912", "0.5728682", "0.57262826", "0.56361645", "0.5618457", "0.55925095", "0.55868375", "0.5573928", "0.5560176", "0.5559733", "0.5547893...
0.66927487
0
Add the specified rule to the Schedule as a exception rule. The rule may be a Rule object, or it may be an english String.
def add_exception_rule_with_english(rule_or_english) return add_exception_rule_without_english(rule_or_english) unless rule_or_english.is_a?(String) rules = ::IceCube::Rule.from_english(rule_or_english, :multiple=>true) rules.each do |rule| add_exception_rule(rule) end ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_rule( rule )\n type_check( rule, Elements::Rule )\n assert( !name_defined?(rule.name), \"name [#{rule.name}] is already in use\" )\n \n @rules[rule.name] = rule\n end", "def add_rule(rule)\n @rulebook.add_rule rule\n end", "def add_rule(rule)\n @rules << rule...
[ "0.6843135", "0.63729876", "0.6344014", "0.62724775", "0.62386215", "0.62227666", "0.6158323", "0.6098567", "0.5880118", "0.5696798", "0.5675987", "0.56401765", "0.5571877", "0.55498827", "0.5542989", "0.55289197", "0.55119455", "0.54671293", "0.5440573", "0.54288095", "0.542...
0.6808681
1
Method to observe several webs, and extract the data periodically
def observe uris while true time_init = Time.now.to_i uris.each do |uri| puts "Pinging #{uri}..." request :uri=>uri end time = options.repository.time * 60 - (Time.now.to_i - time_init) puts "Sleeping until #{Time.now + time}..." sleep time ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def web\n @monitors.map{|x| MonitorStatus.new(x)}\n end", "def realtime\n render :json=>WebUrl.all.map(&:url).to_json\n end", "def scrape()\n scrapeForCurrentData\n end", "def scrap_trip_pages\n \n mp_trip_pages.each do |mp, trip_page|\n printf \"mp - #{mp}\\n\"\n doc = ut...
[ "0.5828167", "0.57994586", "0.5702579", "0.5692569", "0.5652435", "0.55402243", "0.55402243", "0.55402243", "0.55384845", "0.55343497", "0.5529917", "0.54933095", "0.546397", "0.5462022", "0.54546934", "0.5436853", "0.54044724", "0.53878236", "0.53439105", "0.5302198", "0.529...
0.69639397
0
GET /admin/color_schemes GET /admin/color_schemes.json
def index @color_schemes = ColorScheme.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def determine_color_scheme\n @default_options.color_scheme = @highline.choose do |menu|\n menu.layout = :one_line\n menu.select_by = :name\n menu.header = nil\n menu.prompt = \"What color scheme would you like? \"\n menu.choice(\"none\") { :none }\n menu....
[ "0.68203425", "0.67786324", "0.6693334", "0.6581378", "0.651902", "0.64164174", "0.63691247", "0.6338296", "0.6133833", "0.61249804", "0.6112569", "0.6092888", "0.60813475", "0.5977952", "0.5963631", "0.59407353", "0.59312457", "0.5911096", "0.5889894", "0.58767176", "0.58502...
0.80495536
0
POST /admin/color_schemes POST /admin/color_schemes.json
def create @color_scheme = ColorScheme.new(color_scheme_params) respond_to do |format| if @color_scheme.save format.html { redirect_to [:admin, @color_scheme], notice: 'Color scheme was successfully created.' } format.json { render action: 'show', status: :created, location: @color_scheme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @color_schemes = ColorScheme.all\n end", "def set_color_scheme\n @color_scheme = ColorScheme.find(params[:id])\n end", "def color_scheme_params\n params.require(:color_scheme).permit(:title, :color)\n end", "def destroy\n @color_scheme.destroy\n respond_to do |format|\n ...
[ "0.68343866", "0.6622495", "0.660607", "0.6592072", "0.63711905", "0.6299486", "0.62942094", "0.6255281", "0.6222468", "0.61537695", "0.60594255", "0.59581196", "0.59156585", "0.5804267", "0.5803855", "0.57478064", "0.57460314", "0.5727808", "0.5718294", "0.55808055", "0.5576...
0.72375786
0
PATCH/PUT /admin/color_schemes/1 PATCH/PUT /admin/color_schemes/1.json
def update respond_to do |format| if @color_scheme.update(color_scheme_params) format.html { redirect_to [:admin, @color_scheme], notice: 'Color scheme was successfully updated.' } format.json { head :no_content } else format.html { render action: 'edit' } format.json { r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n require 'rest-client'\n response = RestClient.put('localhost:3001/colores/'+@color.id.to_s, color_params.as_json, {:Authorization => 'admin irizREhyoG6Ejwr4AcjsQME9'})\n if response.code == 200\n @color = JSON.parse(response.body)\n\n format.htm...
[ "0.6900175", "0.6865616", "0.67735577", "0.6757399", "0.657834", "0.6513731", "0.6428006", "0.63930714", "0.6380179", "0.63305813", "0.63146687", "0.6287639", "0.62600577", "0.6257655", "0.6218711", "0.6185367", "0.6177395", "0.6141599", "0.61067736", "0.6097021", "0.6060738"...
0.7738846
0
DELETE /admin/color_schemes/1 DELETE /admin/color_schemes/1.json
def destroy @color_scheme.destroy respond_to do |format| format.html { redirect_to admin_color_schemes_url, notice: 'Color scheme was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n app_id = @theme_color.app_id\n @theme_color.destroy\n respond_to do |format|\n format.html { redirect_to theme_colors_path(:app_id => app_id), notice: 'Theme color was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n \n respond_...
[ "0.7284764", "0.7167066", "0.7132308", "0.69972837", "0.6973365", "0.68855727", "0.6745983", "0.6741967", "0.6741967", "0.66679186", "0.66668046", "0.66422546", "0.6567303", "0.65615696", "0.6524756", "0.6498226", "0.6484185", "0.64179385", "0.64013714", "0.6395448", "0.63767...
0.83575845
0
create method that counts number of correct questions
def number_correct @correct_answers = [] @turns.each do |turn| @correct_answers << turn.correct? end @correct_answers.count(true) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def question_count \n @by_question.count\n end", "def answered_questions_count\n return 0 if survey.nil?\n survey.answered_count\n end", "def count_quiz_completions(quiz_results)\n no_quiz = quiz_results.count(0)\n total = quiz_results.count\n \"The number of participants who did not attempt ...
[ "0.778846", "0.74885786", "0.73763967", "0.73601353", "0.7299187", "0.7289281", "0.7283605", "0.7212305", "0.71793956", "0.7172062", "0.7171742", "0.71643037", "0.71569777", "0.7034802", "0.70214105", "0.6995705", "0.6900128", "0.68928885", "0.6891105", "0.6891105", "0.688067...
0.7534957
1
Get metadata by key
def [](key) @metadata[key] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def [](key)\n @metadata[key.to_s]\n end", "def object_metadata(key)\n object_path = File.join(container_path, Raca::Util.url_encode(key))\n log \"Requesting metadata from #{object_path}\"\n\n response = storage_client.head(object_path)\n {\n :content_type => response[\"...
[ "0.77375877", "0.71198785", "0.7074156", "0.70510536", "0.6759487", "0.67503184", "0.6688477", "0.66773725", "0.6650719", "0.66339225", "0.6545422", "0.6543049", "0.6527161", "0.6517363", "0.6502452", "0.64690244", "0.6451928", "0.6445363", "0.64398605", "0.64398605", "0.6395...
0.7797258
0
Get metrics for character. Takes an integer (charcode) or a onechar string. currently works only for Latin1 strings, since we only have a chartable for the Latin1 charset so far. (shamelessly stolen from AFM.pm by Gisle Aas)
def metrics_for(char) glyph = if (char.kind_of?(Integer)) ISO_LATIN1_ENCODING[char] else ISO_LATIN1_ENCODING[char.unpack("C*").first] end @char_metrics[glyph] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def frequency(char)\n return 0 if (@size.nil? || @size <= 0)\n @map[char.upcase] * 100/@size\n end", "def frequency(string,char)\n\t\tstring.count(char) / string.length.to_f\n\tend", "def char_occurence(str)\n return puts \"Input must be a non-empty string\" if str.nil? or !str.is_a? String or str.empt...
[ "0.62368226", "0.5940083", "0.59015054", "0.58162344", "0.5757286", "0.5744208", "0.5721551", "0.5710304", "0.56984115", "0.5687543", "0.5676295", "0.56716627", "0.56713086", "0.56561446", "0.5652688", "0.56467307", "0.5646256", "0.5644396", "0.56367373", "0.5615514", "0.5612...
0.86214143
0
Find the ones within the grid
def find_ones # => Establish an empty array to hold the index positions of all the 1s ones_ary = [] # => Finding the index of ROW and COL for each 1 in the grid and storing # => them as row/col array pairs # => |row| denotes the top-level array (could be named anything) @image_array.each_index ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_ones\n ones_locations = []\n # => finding index of ROW and COL for each 1 in grid and storing as row/col array pairs\n @image_array.each_index do |row|\n @image_array[row].each_index do |col|\n if @image_array[row][col] == 1\n puts \"#{row}, #{col}\" # <---this is just to di...
[ "0.78375614", "0.72488105", "0.7159716", "0.7036155", "0.69824415", "0.6770788", "0.6751349", "0.6744614", "0.67151475", "0.6687325", "0.6651689", "0.66397315", "0.6631861", "0.6612426", "0.66002357", "0.65868276", "0.6571389", "0.6558496", "0.6556326", "0.65458786", "0.65271...
0.7549414
1
GET /insurance_types GET /insurance_types.json
def index @title = "Типы страхования" @insurance_types = InsuranceType.all respond_to do |format| if InsuranceType.all.length < 2 format.html # index.html.erb format.json { render json: @insurance_types } else flash.now[:block] = "Ограничение на количество типов!" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @title = \"Тип страхования\"\n @insurance_type = InsuranceType.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @insurance_type }\n end\n end", "def index\n @insurancestatuses = Insurancestatus.all\n end", "def index\n...
[ "0.6790462", "0.6492064", "0.63766456", "0.6308387", "0.6268097", "0.626446", "0.6249017", "0.6222812", "0.6198289", "0.6177467", "0.6172003", "0.61624575", "0.6160889", "0.61490345", "0.61487794", "0.6129874", "0.61230606", "0.61223817", "0.6109729", "0.6068454", "0.60566974...
0.6891916
0
GET /insurance_types/1 GET /insurance_types/1.json
def show @title = "Тип страхования" @insurance_type = InsuranceType.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @insurance_type } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @title = \"Типы страхования\"\n @insurance_types = InsuranceType.all\n\n respond_to do |format|\n if InsuranceType.all.length < 2\n format.html # index.html.erb\n format.json { render json: @insurance_types }\n else\n flash.now[:block] = \"Ограничение на количест...
[ "0.6986033", "0.6551386", "0.6538381", "0.6526528", "0.64878577", "0.64188313", "0.6346555", "0.6341201", "0.6294106", "0.6292991", "0.62782663", "0.6254001", "0.62419826", "0.6221781", "0.6208013", "0.6200758", "0.6194122", "0.61838555", "0.6178867", "0.61711574", "0.6169979...
0.7281386
0
GET /insurance_types/new GET /insurance_types/new.json
def new @title = "Добавление типа страхования" @insurance_type = InsuranceType.new respond_to do |format| if InsuranceType.all.length < 2 format.html # new.html.erb format.json { render json: @insurance_type } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @insurance_type = InsuranceType.new(params[:insurance_type])\n\n respond_to do |format|\n if @insurance_type.save\n flash[:success] = \"Тип успешно добавлен.\"\n format.html { redirect_to @insurance_type }\n format.json { render json: @insurance_type, status: :created, ...
[ "0.7473799", "0.74573493", "0.73975074", "0.73952156", "0.7319704", "0.7239125", "0.7180268", "0.7173036", "0.7162687", "0.7116893", "0.7092307", "0.7072614", "0.7066416", "0.69949144", "0.6983635", "0.6977706", "0.69583803", "0.695438", "0.6940022", "0.69364524", "0.69151247...
0.7936101
0
POST /insurance_types POST /insurance_types.json
def create @insurance_type = InsuranceType.new(params[:insurance_type]) respond_to do |format| if @insurance_type.save flash[:success] = "Тип успешно добавлен." format.html { redirect_to @insurance_type } format.json { render json: @insurance_type, status: :created, location: @ins...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @injurytype = Injurytype.new(injurytype_params)\n\n respond_to do |format|\n if @injurytype.save\n format.html { redirect_to injurytypes_path, notice: 'Injurytype was successfully created.' }\n format.json { render :show, status: :created, location: @injurytype }\n else\n...
[ "0.66435915", "0.6380753", "0.63751394", "0.6348281", "0.63355404", "0.62905973", "0.6065781", "0.60504717", "0.6036703", "0.6026026", "0.5985401", "0.59639376", "0.593139", "0.59088385", "0.59082353", "0.5902702", "0.5900012", "0.5888438", "0.5882307", "0.58576727", "0.58571...
0.71836305
0
PUT /insurance_types/1 PUT /insurance_types/1.json
def update @insurance_type = InsuranceType.find(params[:id]) respond_to do |format| if @insurance_type.update_attributes(params[:insurance_type]) flash[:success] = "Тип успешно отредактирован." format.html { redirect_to @insurance_type } format.json { head :no_content } else...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @surgery_type_instrument_type.update(surgery_type_instrument_type_params)\n format.html { redirect_to @surgery_type_instrument_type, notice: 'Surgery type instrument type was successfully updated.' }\n format.json { render :show, status: :ok, location:...
[ "0.63742757", "0.6267247", "0.6245117", "0.6228662", "0.621011", "0.6205132", "0.6199608", "0.61984926", "0.61931396", "0.61388123", "0.61235356", "0.6113895", "0.61051345", "0.60541826", "0.6052344", "0.60398036", "0.60319614", "0.60132724", "0.601193", "0.59672177", "0.5936...
0.71609944
0
DELETE /insurance_types/1 DELETE /insurance_types/1.json
def destroy @insurance_type = InsuranceType.find(params[:id]) @insurance_type.destroy respond_to do |format| flash[:success] = "Тип успешно удален." format.html { redirect_to insurance_types_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @incident_type = IncidentType.find(params[:id])\n @incident_type.destroy\n\n respond_to do |format|\n format.html { redirect_to incident_types_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @income_type.destroy\n respond_to do |format|\n form...
[ "0.70148975", "0.69671905", "0.69286895", "0.69193506", "0.6912222", "0.6851452", "0.68344337", "0.6826823", "0.68247306", "0.6822793", "0.6809391", "0.6809221", "0.6787108", "0.67665535", "0.67580765", "0.67442334", "0.67436653", "0.67287004", "0.67178565", "0.6706887", "0.6...
0.75580585
0
GET /tasks/1 GET /tasks/1.json
def show @task = Task.find(params[:id]) render json: @task end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def task(name)\n get \"#{base_url}/tasks/#{name}\"\n end", "def show\n render :json => Project.find(params[:project_id]).tasks.find(params[:id])\n end", "def show\n \n @task = @project.tasks.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.js...
[ "0.7555889", "0.7456459", "0.74471563", "0.73451596", "0.7336069", "0.7332103", "0.72564024", "0.7243799", "0.72252154", "0.72077334", "0.72030824", "0.72028416", "0.72028416", "0.72028416", "0.72028416", "0.72028416", "0.72028416", "0.72028416", "0.72028416", "0.72028416", "...
0.76096785
0
login(website, username, password = nil) > true or false goto ATM Summary Page from login Parameter: website you want to go to IP Address of ATM. usename your login user name. password your login password.
def login (website, username, password = nil) return true if @website == website and browser.hidden(:name, 'sno').exist? @website = website puts "[BrowserOperator] Login #{username} #{password}" if password.nil? result = login_from_online_session username els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def login username, password\n @username = username\n\n @page = @page.form('Login') { |form|\n form['txtUserID'] = username\n form['txtPassword'] = password\n form['__EVENTTARGET'] = 'btnLogin'\n }.submit\n change_password password if @page.body =~ /Old Password/\n\n if @page.bo...
[ "0.7147278", "0.7124232", "0.7122677", "0.70733964", "0.7058935", "0.7043865", "0.703573", "0.69393474", "0.68910396", "0.6882995", "0.6832959", "0.68079734", "0.67639923", "0.67248136", "0.6659233", "0.6659233", "0.6659233", "0.664118", "0.66171306", "0.6591094", "0.65680903...
0.74649787
0
get_report_panel() > htmlobejct get html object of get_report panel | | | |report| | | | | |panel | | | | |
def get_report_panel # report_panel = browser.span(:text, @report_root_name).when_present(@time_out).parent.parent report_panel = browser.span(:text, @report_root_name).parent.parent end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_case_panel\n # case_panel = browser.td(:id, 'tb_form_body').when_present()\n case_panel = browser.td(:id, 'td_main_content').when_present(@time_out)\n end", "def report\n return @report\n end", "def fetch_report_page \n @report_page = client.get(REPORT_UR...
[ "0.60621184", "0.5775541", "0.5704415", "0.56754655", "0.56679904", "0.5666235", "0.5618509", "0.5614142", "0.55714285", "0.55652964", "0.55473053", "0.5531293", "0.5523404", "0.54838324", "0.54704636", "0.5463162", "0.5455376", "0.5416894", "0.53902113", "0.5361079", "0.5325...
0.79773366
0
get_case_panel() > htmlobejct get html object of case panel | | | | | | | |case panel | | | | | | |
def get_case_panel # case_panel = browser.td(:id, 'tb_form_body').when_present() case_panel = browser.td(:id, 'td_main_content').when_present(@time_out) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_report_panel\n # report_panel = browser.span(:text, @report_root_name).when_present(@time_out).parent.parent\n report_panel = browser.span(:text, @report_root_name).parent.parent\n end", "def catdet; $ie.frame(:name, 'infoArea').frame(:name, 'detailArea').frame(:name, 'categDetailArea');...
[ "0.6159118", "0.61102164", "0.60480356", "0.57331824", "0.5724966", "0.56982684", "0.5697789", "0.56629354", "0.56629354", "0.56629354", "0.5655952", "0.55781406", "0.5577934", "0.5506649", "0.5468667", "0.5468088", "0.5454209", "0.5454209", "0.542437", "0.5381001", "0.533234...
0.7984804
0
get_counter_table() > htmlobejct get html object of counter table | | | | Couter Table | | | | | | | | | | | | | | | | | | | | | | | |
def get_counter_table counter_table = browser.div(:id, 'div_counter_panel').when_present(@time_out) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_html\n htmlString = %{<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\">}\n htmlString += %{<tr>}\n LineCounter.columnNames.each { |name| htmlString += %{<th>#{name}</th>} }\n htmlString += %{</tr>}\n self.each do |result|\n htmlString += %{<tr>}\n result.to_a.ea...
[ "0.6057572", "0.5820035", "0.5686429", "0.5663883", "0.5505059", "0.5430556", "0.5421555", "0.5395069", "0.53246504", "0.52534163", "0.52525234", "0.52350235", "0.52312064", "0.5229419", "0.51980084", "0.5183014", "0.5134303", "0.51338184", "0.5133315", "0.5121997", "0.507984...
0.7979057
0
get_data_flow_table() > htmlobejct get html object of data flow table | | | | | | | | | | | | | | | | Data Flow | | | | Table | | | | | | | |
def get_data_flow_table data_flow_table = browser.table(:id, 'DataFlowTable').when_present(@time_out) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_flow_table_matrix\n flow_table_matrix = browser.div(:class, 'sData').when_present(@time_out)\n data_flow_table = flow_table_matrix.table(:id, 'DataFlowTable') \n end", "def html_table_to_wire\n <<-HTML\n\t\t<table id=\"#{@jqgrid_id}\" class=\"scroll layout_table\" cellpadding=\"0\"...
[ "0.7043121", "0.6215165", "0.6184031", "0.6175778", "0.6146785", "0.6090169", "0.60775054", "0.60395575", "0.6014881", "0.6001554", "0.5931449", "0.5875351", "0.5856432", "0.58431935", "0.57998484", "0.5792683", "0.5769875", "0.5758136", "0.5712525", "0.5692464", "0.56511736"...
0.7600208
0
get_flow_table_matrix() > htmlobejct only get table of Matrix or Breakdown
def get_flow_table_matrix flow_table_matrix = browser.div(:class, 'sData').when_present(@time_out) data_flow_table = flow_table_matrix.table(:id, 'DataFlowTable') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def matrix\n end", "def get_data_flow_table\n data_flow_table = browser.table(:id, 'DataFlowTable').when_present(@time_out)\n end", "def render_matrix\n Matrix.rows render_rows\n end", "def get_table(options={})\n options = {:vertical_rulings => []}.merge(options)\n\n tables = if opt...
[ "0.58964384", "0.5761006", "0.56807506", "0.5565328", "0.5555529", "0.5555529", "0.5501236", "0.5426536", "0.5423979", "0.5414524", "0.540336", "0.53742874", "0.535778", "0.53376335", "0.5331933", "0.5329463", "0.5327144", "0.5327144", "0.5327144", "0.5327144", "0.53181505", ...
0.7693878
0
wait_loading() wait "Loading" disappear
def wait_loading puts "[BrowserOperator] wait_loading" << '..' * 10 browser.div(:id, 'pageLoading').wait_while_present() end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait_for_progress\n sleep 2\n wait_for(timeout: 60) { element_does_not_exist \"* marked:'#{loading_screen}'\" }\n end", "def wait_for_progress\n sleep 2\n wait_for_element_does_not_exist(\"* id:'#{loading_screen}'\",\n timeout: 60)\n end", "def wait_for_load...
[ "0.77030176", "0.76507515", "0.7559032", "0.75256115", "0.7465412", "0.7191198", "0.717677", "0.7158108", "0.7129424", "0.6852686", "0.68479973", "0.6812432", "0.6711224", "0.6704447", "0.6700052", "0.6669971", "0.6619816", "0.65911764", "0.6587758", "0.6587758", "0.65796775"...
0.8487711
0
Validate that the ids, idrefs, and object_references in the raw_content xml of the original_input object are in valid formats, updating the raw_content xml accordingly to correct issues found. Add warnings to alert the user of changes and/or errors.
def sanitize_id_format_raw_xml(original_input) return nil if original_input.nil? || original_input.raw_content.blank? format_sanitizer = Stix::Stix111::SanitizerValidFormat.new(Setting.XML_PARSING_LIBRARY.to_s.to_sym) format_sanitizer.sanitize_xml(original_input.raw_content) @warnings = format_sanitizer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cleanup! xml\n ns = { 'pre' => 'info:lc/xmlns/premis-v2' }\n \n conflicts = xml.find(\"//pre:*[starts-with(@xmlID, 'agent-')]\", ns).to_a + \n xml.find(\"//pre:*[starts-with(@xmlID, 'object-')]\", ns).to_a +\n xml.find(\"//pre:*[starts-with(@xmlID, 'event-')]\", ns).to_a ...
[ "0.55718523", "0.5436912", "0.51807404", "0.5160168", "0.5104063", "0.5099047", "0.5094983", "0.5028505", "0.49668738", "0.4930489", "0.49290335", "0.49269894", "0.49058852", "0.489864", "0.4891892", "0.48896247", "0.4873956", "0.4867284", "0.48305792", "0.4827959", "0.482750...
0.7191222
0
To prevent resanitization of ids already prefixed with NCCIC, ids already possessing this prefix are only subject to sanitization if the source is an AIS provider. If the source is an AIS provider, the id mappings in the database will will be checked to see if the NCCICprefixed id is on the after side of an id mapping,...
def sanitize_nccic_ids? return false if User.current_user.nil? if AppUtilities.is_ciap_dms_1b_or_1c_arch? # In the DMS 1b+ architecture, CIAP performs all sanitization. To # determine if a file came from an AIS provider, the # Ingest.is_ais_provider_user? method is used to check if the current...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prefix_valid?(prefix)\n NC_REGEXP.match(prefix.to_s) || prefix.to_s.empty?\n end", "def prefix_valid?(prefix)\n NC_REGEXP.match(prefix) || prefix.to_s.empty?\n end", "def icn_id_unique\n return if icn_id.nil?\n return if (conflicting_name = other_names_with_same_icn_id.first).blank?\n...
[ "0.5552556", "0.5516739", "0.55100095", "0.54808193", "0.539401", "0.5306783", "0.5219605", "0.5150483", "0.5149453", "0.5127111", "0.5120951", "0.5096599", "0.5071618", "0.50038284", "0.49665222", "0.49596697", "0.49470094", "0.49413276", "0.4888212", "0.48590624", "0.484883...
0.7270777
0
Returns true if the user is using a sensible seeming storage backend Params storage, the current storage instance else exits with a warning if not
def allowed? storage return true if Boom.local? return true if allowed_storage_types.include? storage.class output error_message storage false end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def storage?\n options[:storage]\n end", "def storage_available?\n return @storage_available if @storage_available\n\n if @storage_available = Gitlab::Git::Storage::ForkedStorageCheck\n .storage_available?(storage_path, storage_timeout, access_retr...
[ "0.7934097", "0.7231881", "0.70484936", "0.70217204", "0.68620753", "0.68612313", "0.68346477", "0.66743743", "0.6671288", "0.6646497", "0.6646497", "0.65978456", "0.65978456", "0.6587831", "0.6587831", "0.65622723", "0.655507", "0.65072685", "0.6464369", "0.6385388", "0.6332...
0.79041255
1
Generates a random number
def generate_number return randomNumber = 1 + rand(100) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gen_num\n rand(1..100)\nend", "def generate_number\r\n \r\n #Generate and return a random number between 1 and 1000\r\n return randomNo = 1 + rand(1000)\r\n \r\n end", "def random\n 1 + (10 * rand(0))\n end", "def number_generator\n rand(1..20)\n end", "def random_num_generator\n ...
[ "0.84647816", "0.82044804", "0.8105791", "0.80716264", "0.80474615", "0.80474615", "0.8046801", "0.79463995", "0.79150206", "0.7901572", "0.7868752", "0.7855355", "0.782981", "0.780851", "0.77326614", "0.7710635", "0.7664996", "0.764664", "0.7645315", "0.76395047", "0.7585437...
0.86664605
0
Shows the credits of the program
def show_credits Console_screen.cls puts "\t\tThank you for playing the number guessing game.\n\n\n\n" puts "\n\t\t\t Developed by Cameron Jordan\n\n" puts "\t\t\t\t Copyright 2020\n\n" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def display_credits\r\n \r\n Console_Screen.cls #Clear the display area\r\n \r\n #Thank the player and display game information\r\n puts \"\\t\\tThank you for taking the SUPERMAN MOVIE TRIVIA QUIZ.\\n\\n\\n\\n\"\r\n puts \"\\n\\t\\t\\t Developed by Jerry Lee Ford, Jr.\\n\\n\"\r\n pu...
[ "0.79224545", "0.7844518", "0.77729225", "0.7761391", "0.7713136", "0.76914257", "0.76914257", "0.74946934", "0.74343395", "0.724074", "0.7128838", "0.70766276", "0.6893868", "0.66223824", "0.63162065", "0.63162065", "0.62717843", "0.62571234", "0.6252922", "0.6043803", "0.60...
0.8263567
0
Get information on a particular Data Provider. This method returns a single Data Provider specified by the ID parameter
def data_providers_id_get(id, opts = {}) data, _status_code, _headers = data_providers_id_get_with_http_info(id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def provider\n get(PROVIDER)\n end", "def data_providers_id_browse_get(id, opts = {})\n data, _status_code, _headers = data_providers_id_browse_get_with_http_info(id, opts)\n data\n end", "def data_providers_id_get_with_http_info(id, opts = {})\n if @api_client.config.debugging\n ...
[ "0.6232608", "0.62321514", "0.6210708", "0.6109614", "0.60300875", "0.6020819", "0.5901537", "0.5854508", "0.5807504", "0.5794483", "0.5783424", "0.5765997", "0.5755663", "0.57395387", "0.5698156", "0.56817645", "0.56710714", "0.56564254", "0.56442475", "0.56442475", "0.56442...
0.6695748
0
Pings a Data Provider to check if it is running. This method allows the querying of a Data Provider specified by the ID parameter to see if it is running or not.
def data_providers_id_is_alive_get(id, opts = {}) data, _status_code, _headers = data_providers_id_is_alive_get_with_http_info(id, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def running?\n begin\n ping\n rescue Errno::EBADF, Errno::ECONNREFUSED => e\n return false\n end\n return true\n end", "def instance_running?(instance_id)\n return false if instance_id.nil? || !configured?\n\n response = @client.describe_instance_status(instance_ids: [i...
[ "0.611442", "0.6081973", "0.5884428", "0.58395416", "0.57601446", "0.5697525", "0.56556815", "0.56497943", "0.5621941", "0.55689085", "0.55485594", "0.5546292", "0.54911584", "0.54505545", "0.543461", "0.5432209", "0.54117936", "0.541108", "0.53939253", "0.53870606", "0.53675...
0.6090647
1
cut message without cutting the word
def cutMsg(msg) if msg.length>160 msg_arr = msg.split(" ") msg_single = "" msg_cut = [] for i in 0..msg_arr.count-1 msg_single +=(msg_arr[i] + " ") #cut message if longer than 160 char if msg_single.length>160 #starting to build each message msg_sin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_message\n self.message = Loofah.fragment(self.message).scrub!(:strip).text\n end", "def sanitized_message\n message.to_s[0,140]\n end", "def sanitze_for_chat(text)\n # Remove bash colorings\n o = text.gsub(/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]/, '')\n # Limit text...
[ "0.6769183", "0.6673501", "0.66266686", "0.65557736", "0.6522374", "0.65135854", "0.64537084", "0.6302581", "0.6302581", "0.61797", "0.61254066", "0.61227876", "0.609927", "0.6079284", "0.6058028", "0.6039369", "0.60343677", "0.59970695", "0.5991691", "0.59827954", "0.597811"...
0.7685591
0
With Stored Card With Recurring With Web Hooks With Meta Data
def test_successful_authorize_stored_card_recurring_webhook_metadata test_successful_purchase_credit_card_recurring_webhook_metadata(false, true, true) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_ygo_embed(embed, card)\n embed.title = \"Card Info:\"\n embed.timestamp = Time.now\n\n embed.footer = Discordrb::Webhooks::EmbedFooter.new(\n text: \"YGOPRODECK\",\n icon_url: \"http://pluspng.com/img-png/yugioh-png-file-official-yu-gi-oh-logo-png-500.png\"\n )\n\n idx = get_card_idx(card...
[ "0.6143527", "0.583132", "0.583132", "0.58152807", "0.56459635", "0.5619618", "0.5601671", "0.55951464", "0.55951464", "0.5560992", "0.5553278", "0.5511015", "0.5508678", "0.5474428", "0.54709196", "0.547064", "0.5451095", "0.54211247", "0.54008466", "0.5376888", "0.534932", ...
0.58840585
1
With Non Existing Customer With customer_ref
def test_successful_store_non_existing_customer_customer_ref(encryption=false) store_successful(encryption, false, 'ref') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def customer_by_ref(customer_ref)\n client.get \"customers/#{inst_id}/byRef?merchantRef=#{customer_ref}\"\n end", "def customer(customer)\n self.all.select {|rev| rev.customer == customer}\n end", "def customers_with_unpaid_invoices\n unpaid_invoices = find_unpaid_invoices\n unpaid_customers = un...
[ "0.68278736", "0.62305886", "0.60968804", "0.59806895", "0.58639646", "0.5859019", "0.5775506", "0.5723828", "0.5711571", "0.5700381", "0.56877303", "0.5665176", "0.5660823", "0.56447756", "0.56144977", "0.5583482", "0.55606085", "0.5516042", "0.55035144", "0.54884076", "0.54...
0.62670267
1
GET /catalogs/comment_types/1 GET /catalogs/comment_types/1.xml
def show @catalogs_comment_type = Catalogs::CommentType.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @catalogs_comment_type } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @catalogs_comment_type = Catalogs::CommentType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @catalogs_comment_type }\n end\n end", "def index\n @curriculum_comment_types = CurriculumCommentType.find(:all)\n\n respond_to do |format|...
[ "0.706486", "0.6751408", "0.6503623", "0.6343553", "0.6320699", "0.6254208", "0.6142149", "0.60637206", "0.60637206", "0.60637206", "0.6045046", "0.6045046", "0.59981453", "0.5975161", "0.5961832", "0.5953559", "0.59436154", "0.59369457", "0.58407825", "0.58227783", "0.572333...
0.76262563
0
GET /catalogs/comment_types/new GET /catalogs/comment_types/new.xml
def new @catalogs_comment_type = Catalogs::CommentType.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @catalogs_comment_type } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @catalogs_comment_type = Catalogs::CommentType.new(params[:catalogs_comment_type])\n\n respond_to do |format|\n if @catalogs_comment_type.save\n format.html { redirect_to(@catalogs_comment_type, :notice => 'Comment type was successfully created.') }\n format.xml { render :xml...
[ "0.7460002", "0.68516123", "0.67456055", "0.6712687", "0.6712687", "0.6712687", "0.6712687", "0.6712687", "0.6712687", "0.6712687", "0.6712687", "0.6712687", "0.6712687", "0.6712687", "0.6712687", "0.6711374", "0.6708651", "0.6557719", "0.6545924", "0.6457944", "0.6431327", ...
0.81250554
0
POST /catalogs/comment_types POST /catalogs/comment_types.xml
def create @catalogs_comment_type = Catalogs::CommentType.new(params[:catalogs_comment_type]) respond_to do |format| if @catalogs_comment_type.save format.html { redirect_to(@catalogs_comment_type, :notice => 'Comment type was successfully created.') } format.xml { render :xml => @catalo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @catalogs_comment_type = Catalogs::CommentType.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @catalogs_comment_type }\n end\n end", "def destroy\n @catalogs_comment_type = Catalogs::CommentType.find(params[:id])\n @catalogs_comment_...
[ "0.6477053", "0.60522246", "0.5962017", "0.58288825", "0.5785414", "0.57712185", "0.57527083", "0.5748044", "0.5674308", "0.5674308", "0.5666947", "0.56669146", "0.56669146", "0.5663949", "0.5652071", "0.5645664", "0.5575193", "0.55620635", "0.54845643", "0.53200734", "0.5251...
0.71668375
0
PUT /catalogs/comment_types/1 PUT /catalogs/comment_types/1.xml
def update @catalogs_comment_type = Catalogs::CommentType.find(params[:id]) respond_to do |format| if @catalogs_comment_type.update_attributes(params[:catalogs_comment_type]) format.html { redirect_to(@catalogs_comment_type, :notice => 'Comment type was successfully updated.') } format.xm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @catalogs_comment_type = Catalogs::CommentType.new(params[:catalogs_comment_type])\n\n respond_to do |format|\n if @catalogs_comment_type.save\n format.html { redirect_to(@catalogs_comment_type, :notice => 'Comment type was successfully created.') }\n format.xml { render :xml...
[ "0.64576775", "0.64069253", "0.61021763", "0.60135716", "0.59961754", "0.578025", "0.564352", "0.56273836", "0.5543415", "0.54531187", "0.5445315", "0.539792", "0.53744996", "0.53681684", "0.53591293", "0.5346631", "0.53371716", "0.5334198", "0.5297746", "0.5274797", "0.52589...
0.7478186
0
DELETE /catalogs/comment_types/1 DELETE /catalogs/comment_types/1.xml
def destroy @catalogs_comment_type = Catalogs::CommentType.find(params[:id]) @catalogs_comment_type.destroy respond_to do |format| format.html { redirect_to(catalogs_comment_types_url) } format.xml { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n if !(current_user.is_admin?)\n flash[:error] = \"You don't have permission to do this action.\"\n redirect_to(curriculum_comment_type_url) and return\n end \n @curriculum_comment_type = CurriculumCommentType.find(params[:id])\n @curriculum_comment_type.destroy\n\n respond_to ...
[ "0.6534271", "0.64726114", "0.6371946", "0.6343649", "0.6293261", "0.6293261", "0.62489563", "0.62428194", "0.6234653", "0.62333894", "0.6194717", "0.6183149", "0.61766875", "0.6148898", "0.61480343", "0.61406827", "0.61228275", "0.6118102", "0.60886604", "0.6080587", "0.6069...
0.7855329
0
PICTURE block data structure: Length(bit) Meaning 32 The picture type according to the ID3v2 APIC frame: 32 The length of the MIME type string in bytes. n8 The MIME type string. 32 The length of the description string in bytes. n8 The description of the picture, in UTF8. 32 The width of the picture in pixels. 32 The he...
def parse_image_data(picture_block) block_content = StringIO.new(picture_block.data) type_index, mime_type_length = block_content.read(8).unpack("NN") mime_type = Helper.encode_to_utf8(block_content.read(mime_type_length)) description_length = block_content.read(4).unpack1("N") data_lengt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write_picture(args = {})\n if @picture[\"n\"] == 0\n raise FlacInfoError, \"There is no METADATA_BLOCK_PICTURE\"\n end\n\n if args.has_key?(:n)\n n = args[:n]\n else\n n = 1\n end\n\n # \"image/jpeg\" => \"jpeg\"\n extension = @picture[n][\"mime_type\"].split(\"/\")[1]\n\n ...
[ "0.5743408", "0.5709568", "0.56898135", "0.5687578", "0.5677594", "0.56765705", "0.5607694", "0.55487365", "0.55279785", "0.5500851", "0.54462427", "0.54462427", "0.5405379", "0.5383938", "0.53803056", "0.53428227", "0.5322493", "0.531529", "0.53152704", "0.5306957", "0.53063...
0.70959365
0
Request a new entitilement to an existing customer This API is for use by partner provisioning services customers only. This will allow the partners to allow the add new entitlement to an existing customer Security Policies This API requires one of the following user roles: AccountAdmin, BatchServiceAdmin, CompanyAdmin...
def request_new_entitlement(id, offer) path = "/api/v2/accounts/#{id}/entitlements/#{offer}" post(path, {}, {}, AvaTax::VERSION) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_entitlement request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_create_entitlement_request request_pb\n query_string_params = if query_string_param...
[ "0.5918555", "0.5695445", "0.56583166", "0.56529576", "0.5631074", "0.558278", "0.55506724", "0.5543484", "0.55312216", "0.55286837", "0.55236214", "0.5512103", "0.54766816", "0.5470606", "0.54664224", "0.5458834", "0.5439727", "0.5429996", "0.54048586", "0.53709275", "0.5361...
0.5738677
1
returns ENTRY_NAME in the ID line. Bio::EMBLentry > String
def entry id_line('ENTRY_NAME') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def short_name\n self.get_column(\"Entry_ID/Short_Name\")\n end", "def name\n return text_get(0, id)\n end", "def name\n text_get(6, @id)\n end", "def getLongNameFromEntry(ent)\n pre_name = \"\"; hashNames = %w(name name2 name3)\n hashNames.each {|name|\n n = ent[\"#{...
[ "0.70373046", "0.67831665", "0.667336", "0.6635988", "0.65395707", "0.65395707", "0.63480717", "0.6322989", "0.62943923", "0.62591124", "0.6192392", "0.61619186", "0.6129987", "0.61209965", "0.6100491", "0.6095399", "0.6072563", "0.6071782", "0.6068947", "0.6062704", "0.60218...
0.8417856
0
returns MOLECULE_TYPE in the ID line. Bio::EMBLmolecule > String
def molecule id_line('MOLECULE_TYPE') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def type_id\n @type_id ||= extract_int(@content[0...TYPE_SIZE])\n end", "def type\n munson.type\n end", "def classifyMolecule(definition)\n if (definition =~ /plasmid/i)\n return \"Plasmid\"\n elsif (definition =~ /mitochon/i) \n return \"Mitochondria\"\n elsif (definition =~ /plas...
[ "0.6836116", "0.6242737", "0.60393", "0.59713864", "0.5892404", "0.5862107", "0.5781918", "0.57620907", "0.57313555", "0.571455", "0.56960696", "0.568816", "0.56789184", "0.5675488", "0.56718993", "0.5638499", "0.5624828", "0.5594668", "0.5575716", "0.5574936", "0.5565746", ...
0.8371312
0
returns DIVISION in the ID line. Bio::EMBLdivision > String
def division id_line('DIVISION') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def division\n return @division\n end", "def division=(value)\n @division = value\n end", "def division\n self.division_id > 0 ? Division.find(self.division_id).name : NOT_SET \n end", "def dividing_line; end", "def subdivision\n @subdivision\n ...
[ "0.6776685", "0.6227262", "0.59728616", "0.5818297", "0.57288295", "0.5670578", "0.5633065", "0.5614724", "0.55239993", "0.551947", "0.55034214", "0.54886764", "0.5472938", "0.54270923", "0.539747", "0.53682905", "0.5360754", "0.5353201", "0.53391004", "0.53241265", "0.531090...
0.8277196
0
returns SEQUENCE_LENGTH in the ID line. Bio::EMBLsequencelength > String
def sequence_length id_line('SEQUENCE_LENGTH') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def amino_acid_number\n @seq.length\n end", "def seq_length \n if self.source_name == \"ENSEMBLGENE\"\n return self.get_gene.slice.length\n elsif self.source_name == \"ENSEMBLPEP\"\n return self.sequence.length\n else\n return nil\n end ...
[ "0.7417147", "0.73864466", "0.7382651", "0.71678394", "0.68685335", "0.67669755", "0.6709529", "0.65140325", "0.6502861", "0.6447077", "0.6415863", "0.6392184", "0.6365331", "0.63300484", "0.63115025", "0.62972534", "0.6272791", "0.6269167", "0.6268963", "0.6268963", "0.62689...
0.88722074
0
iterates on CDS features in the FT lines.
def each_cds ft.each do |cds_feature| if cds_feature.feature == 'CDS' yield cds_feature end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def define_features\n @fvs.each do |vector, label|\n vector.each do |term, value|\n @features.add(term)\n end\n end\n end", "def features\n\t\tcollection = []\n\t\tclasses.each do |_class|\n\t\t\t_class.features.each do |feature|\n\t\t\t\tcollection << feature\n\t\t\tend\n\t\t...
[ "0.5917978", "0.5434558", "0.53669804", "0.53416914", "0.52926046", "0.52920294", "0.5239166", "0.5228374", "0.5219986", "0.51982164", "0.5193399", "0.5187176", "0.5186174", "0.51046604", "0.5097617", "0.5061624", "0.503887", "0.4992969", "0.49657768", "0.49128675", "0.489470...
0.67463547
0
iterates on gene features in the FT lines.
def each_gene ft.each do |gene_feature| if gene_feature.feature == 'gene' yield gene_feature end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def each\n super do |fields|\n form = fields.delete(@@form)\n raise \"Missing #{@@form} value\" if form.nil?\n # Values missing from the final field in a row will be returned as\n # nil. Map them to empty string.\n fields.each { |f,v| fields[f] = \"\" if v.nil? }\n #...
[ "0.6168424", "0.6034993", "0.5902364", "0.58484346", "0.5694033", "0.56531084", "0.54707587", "0.54389024", "0.5435568", "0.54000324", "0.5374136", "0.53064287", "0.5297061", "0.5295505", "0.52884626", "0.52588856", "0.5258599", "0.52508974", "0.5234942", "0.520439", "0.51884...
0.7084961
0
defines the default slot for unassigned code
def default_slot (slot_num) @default_slot = slot_num end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_default_codes\n [:supervisor_review, :data_problem, :instrument_mode, :instrument_method].each do |asso|\n current_value = self.send(asso)\n if current_value.nil? || current_value.local_code == -4\n val = NcsCode.for_attribute_name_and_local_code(\"#{asso}_code\".to_sym, 2)\n ...
[ "0.66014135", "0.64836866", "0.64651084", "0.63958025", "0.63958025", "0.631856", "0.6157906", "0.60199666", "0.59911084", "0.59873235", "0.5981154", "0.59478295", "0.58094335", "0.5746327", "0.5745668", "0.57450914", "0.5708031", "0.5702009", "0.56906205", "0.5689582", "0.56...
0.7085011
0
defines the size of subsequent slot objects
def slot_size (size) @slot_size = size end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resize(size)\n @size = size\n new_slots = Array.new(@size).map { 0 }\n new_slots.each_with_index do |slot, i|\n new_slots[i] = @slots[i]\n end\n @slots = new_slots\n end", "def size\n super\n end", "def size\n super\n end", "def capacity\n @slots.length\n ...
[ "0.67733455", "0.6587945", "0.6587945", "0.64571345", "0.63475144", "0.6232889", "0.6207091", "0.6203031", "0.6196989", "0.61507475", "0.61429346", "0.6124308", "0.6108534", "0.6105881", "0.6105881", "0.6105881", "0.6105881", "0.6105881", "0.6105881", "0.6105881", "0.6105881"...
0.7784806
0
defines a size for a bank
def bank_size size @current_bank_size = size end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def size\n\t\t7500\n\tend", "def size\n sku.size * amount\n end", "def canonic_size( size )\n if canonic_type == :decimal && size.is_a?( Integer )\n [ size, 0 ]\n else\n size\n end\n end", "def set_Size(value)\n set_input(\"Size\", value)\n end", ...
[ "0.702813", "0.67631155", "0.64750046", "0.6470041", "0.6460828", "0.6370744", "0.63330764", "0.62917227", "0.6285083", "0.6285083", "0.62811667", "0.62633675", "0.626301", "0.62328374", "0.62157875", "0.6203155", "0.6203155", "0.6168034", "0.61357224", "0.61357224", "0.61160...
0.8682473
0
defines a number of banks of the same size
def banks count count.each do @banks.push Bank.new @current_bank_size end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_board(n, def_val)\n\t\tArray.new(n) { Array.new(n) { def_val } }\n\tend", "def initialize(size)\n @board_size = size\n @board = []\n @board_size.times { @board << Array.new(@board_size, EMPTY_SYMBOL) }\n end", "def create_board(size)\n return (0...size).map{|b| (0...size).map{|bb| 0}}\n ...
[ "0.648519", "0.63957196", "0.6362817", "0.6077063", "0.6012223", "0.60009503", "0.593522", "0.59067595", "0.5888011", "0.5886706", "0.5861686", "0.58282095", "0.58203393", "0.58085597", "0.580185", "0.5780866", "0.5770957", "0.57562685", "0.5750611", "0.5742241", "0.5735981",...
0.7083812
0
The team in this assignment containing a user. Returns nil if the given user isn't contained in any team.
def team_for_user(user) membership = TeamMembership.find_by user: user, team: teams membership && membership.team end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def current_user_team\n current_user.team\n end", "def team\n return @team\n end", "def user_team(team_id)\n get(\"/user_teams/#{team_id}\")\n end", "def assign_team_from_user\n user = Hubstats::User.find(self.user_id)\n if user.team && user.team.id\n se...
[ "0.6329951", "0.61809987", "0.60206974", "0.6020417", "0.60021013", "0.5962917", "0.5942374", "0.59145314", "0.58901757", "0.58850604", "0.5854123", "0.57676643", "0.5758606", "0.5736068", "0.5692399", "0.5691116", "0.56748766", "0.56723636", "0.56385577", "0.5612119", "0.555...
0.72224027
0
The teammates in this assignment for a user.
def teammates_for_user(user) team = team_for_user(user) team && (team.users - [user]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def team_members\n self.team_member_ids.collect{|user_id| User.find(user_id)}\n end", "def get_team_members\n team_members = []\n self.students.each do |student|\n team_members.append(student.user)\n end\n return team_members\n end", "def team_members\n\t\tUser.where(:id => self.installat...
[ "0.7177479", "0.7030507", "0.6851077", "0.6664658", "0.6664658", "0.6664658", "0.66625905", "0.6632586", "0.65081644", "0.64820176", "0.64498156", "0.6432013", "0.634792", "0.6305259", "0.6295834", "0.6293021", "0.62593234", "0.62565684", "0.62528116", "0.6247123", "0.6241525...
0.76012236
0
Copies the contents (teams, memberships) of another partition. This offers a quick way of describing a new partition that is similar to an existing partition.
def populate_from(partition) team_mapping = {} partition.memberships.includes(:team, :user).each do |template| unless team = team_mapping[template.team] team = Team.create name: template.team.name, partition: self, course: course teams << team team_mappin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetPartitionList\n deep_copy(@partition_info)\n end", "def add!(partition, dirty = false)\n if @list[partition.name].nil?\n @list[partition.name] = partition\n else\n @list[partition.name].merge!(partition, simulate = false, dirty)\n end\n self\n end", "def mergepartitions\n\...
[ "0.5910072", "0.58982044", "0.5671624", "0.5584468", "0.5383433", "0.53015584", "0.5274977", "0.5259547", "0.52287084", "0.5168663", "0.51579213", "0.511837", "0.5092986", "0.508823", "0.50741816", "0.5029912", "0.49961266", "0.49959502", "0.49842665", "0.4973126", "0.4970978...
0.6024927
0
Automatically assigns users to teams for this partitioning.
def auto_assign_users(team_size) all_registrations = course.registrations.where(for_credit: true). includes(:user).all team_sets = [] overflow = [] all_registrations.group_by(&:for_credit?).each do |credit, registrations| students = registrations.map(&:user).shuffle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assign_team_from_user\n user = Hubstats::User.find(self.user_id)\n if user.team && user.team.id\n self.update_column(:team_id, user.team.id)\n end\n end", "def set_users_team\n @users_team = UsersTeam.find(params[:id])\n end", "def give_access_to_teams\n teams.includ...
[ "0.6912287", "0.6717065", "0.64184266", "0.6235339", "0.6206347", "0.61356384", "0.6016731", "0.5958305", "0.592947", "0.5927931", "0.5855566", "0.58464026", "0.57830924", "0.57789737", "0.5778504", "0.5776186", "0.5765314", "0.57634383", "0.5748989", "0.5710928", "0.569568",...
0.7325149
0
call the appropriate planwatch entry association based on the current user's preferences
def planwatch_entries if User.current_user && User.current_user.watch_order == "alph" planwatch_entries_sorted_by_username else planwatch_entries_sorted_by_last_update end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plan\n data['plans'][me]\n end", "def viewed_plan(pln)\r\n #MES- Is the plan on the planner?\r\n if plans.include?(pln)\r\n plans.update_attributes(pln, :viewed_at => Time.now_utc)\r\n end\r\n end", "def show\n set_client_profile(@plan)\n @goals = @plan.goals\n @tasks = @pla...
[ "0.57685834", "0.5653468", "0.5607359", "0.5527081", "0.54886967", "0.5477011", "0.53984964", "0.5393474", "0.53696907", "0.5346996", "0.5313156", "0.52569246", "0.52439094", "0.52439094", "0.52089626", "0.5205278", "0.5196627", "0.5175846", "0.5172123", "0.5165199", "0.51586...
0.60613376
0
:nodoc: Given a label object, return the corresponding 0based integer index. Returns nil if the label is not recognized.
def index(label_) @axis_object.index(label_) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def column_label_to_idx(label)\n @column_attributes.each_with_index do |attr, idx|\n return idx if attr['label'] == label\n end\n\n nil\n end", "def to_index(input)\n input.to_i - 1\n end", "def input_to_index(input)\n self.convert_to_i(input) - 1\n end", "def to_index(...
[ "0.77468055", "0.6087026", "0.6034496", "0.59913456", "0.5967777", "0.59645987", "0.59486675", "0.5942066", "0.5942066", "0.5942066", "0.5941472", "0.5932471", "0.5924154", "0.5873964", "0.58660024", "0.5857514", "0.57924336", "0.57840747", "0.57822794", "0.57821083", "0.5777...
0.6915849
1
Given a 0based integer index, return the corresponding label object. Returns nil if the index is out of bounds (i.e. is less than 0 or greater than or equal to size.)
def label(index_) @axis_object.label(index_) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def next_label\n ret = @labels\n @labels += 1\n ret\n end", "def get(index)\n raise \"Only positive indexes, #{index}\" if index <= 0\n if index > self.get_length\n return nil\n else\n return internal_object_get(index + 1)\n end\n end",...
[ "0.621269", "0.6160785", "0.6076165", "0.59802735", "0.5980246", "0.59317046", "0.5919836", "0.5900933", "0.5890793", "0.5882256", "0.5877775", "0.58701634", "0.5862953", "0.58128774", "0.58050525", "0.5803727", "0.5790448", "0.5784867", "0.5726434", "0.5723477", "0.57167953"...
0.6393989
0
Create an unlocked copy of this structure that can be further modified.
def unlocked_copy copy_ = Structure.new @indexes.each{ |ai_| copy_.add(ai_.axis_object, ai_.axis_name) } copy_ end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nolock\n clone(:with => \"(NOLOCK)\")\n end", "def initialize_copy(other)\n @mutex = Mutex.new\n other.instance_variable_get(:@mutex).synchronize do\n @hash = other.instance_variable_get(:@hash).dup\n end\n end", "def initialize_copy(other)\n @mutex = Mutex.new\n ...
[ "0.6646438", "0.64437973", "0.64437973", "0.62474954", "0.615087", "0.60716957", "0.606198", "0.6026445", "0.59690136", "0.59557366", "0.5932958", "0.58831304", "0.58831304", "0.58831304", "0.58831304", "0.58831304", "0.5880012", "0.5867519", "0.58627445", "0.5854637", "0.585...
0.6757708
0
Returns true if the two structures are equivalent in the axes but not necessarily in the offsets. The structure of a shared slice is equivalent, in this sense, to the "same" structure created from scratch, even though one is a subview and the other is not.
def ==(rhs_) if rhs_.equal?(self) true elsif rhs_.is_a?(Structure) rhs_indexes_ = rhs_.instance_variable_get(:@indexes) if rhs_indexes_.size == @indexes.size rhs_indexes_.each_with_index do |rhs_ai_, i_| lhs_ai_ = @indexes[i_] return false unless lhs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eql?(other)\n return true if self._equal?(other)\n return false unless other._isArray\n lim = self.__size\n unless lim._equal?(other.__size)\n return false\n end\n ts = Thread.__recursion_guard_set\n added = ts.__add_if_absent(self)\n begin\n i = 0\n limi = lim\n whi...
[ "0.6483901", "0.6275042", "0.6275042", "0.62734634", "0.62734634", "0.6093084", "0.60613906", "0.6047414", "0.6041902", "0.5994265", "0.5991959", "0.5954967", "0.59211916", "0.5902692", "0.5888765", "0.58760816", "0.58189905", "0.5814057", "0.58096665", "0.58069766", "0.57856...
0.6478032
1
Append an axis to the configuration of this structure. You must provide the axis, as an object that ducktypes EmptyAxis. You may also provide an optional name string.
def add(axis_, name_=nil) raise StructureStateError, "Structure locked" if @locked name_ = name_ ? name_.to_s : nil ainfo_ = AxisInfo.new(axis_, @indexes.size, name_) @indexes << ainfo_ @names[name_] = ainfo_ if name_ @size *= axis_.size self end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_axis(name, axis_class)\n axis = axis_class.new\n set_cross_axis(axis)\n axes << [name, axis]\n end", "def axis(axis_type, &block)\n axis = GChart::Axis.create(axis_type, &block)\n @axes.push(axis)\n axis\n end", "def axis(axis_)\n @structure.axis(axis_)\n end...
[ "0.7022606", "0.63592786", "0.6317499", "0.58662915", "0.577504", "0.5494298", "0.5444802", "0.5341762", "0.53291667", "0.52726316", "0.5197271", "0.5197014", "0.5189024", "0.50595754", "0.50128317", "0.49152353", "0.4910986", "0.48996845", "0.48760745", "0.48689568", "0.4863...
0.7231604
0
Returns the AxisInfo object representing the given axis. The axis must be specified by 0based index or by name string. Returns nil if there is no such axis.
def axis(axis_) case axis_ when ::Integer @indexes[axis_] else @names[axis_.to_s] end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def axis(axis_)\n @structure.axis(axis_)\n end", "def coord(axis_)\n ainfo_ = @structure.axis(axis_)\n ainfo_ ? _coords[ainfo_.axis_index] : nil\n end", "def add(axis_, name_=nil)\n raise StructureStateError, \"Structure locked\" if @locked\n name_ = name_ ? name_.to_s : ni...
[ "0.60790986", "0.5749908", "0.54073364", "0.53273916", "0.53193843", "0.53003335", "0.5238735", "0.5213796", "0.5035483", "0.50254154", "0.50166225", "0.46796268", "0.4633536", "0.45686752", "0.45534766", "0.44933584", "0.44467446", "0.44288027", "0.43765786", "0.43255347", "...
0.6717592
0
Returns true if this structure has been locked.
def locked? @locked end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def locked?\n\t\t\t@locked\n\t\tend", "def locked?\n @locked\n end", "def locked?\n @mutex.locked?\n end", "def is_locked?\n return true if have_lock?\n begin\n return true unless acquire_lock\n ensure\n release_lock\n end\n false\n end", "def locke...
[ "0.8303343", "0.82868636", "0.82604265", "0.8252662", "0.8243091", "0.8216773", "0.81859964", "0.8182741", "0.81707674", "0.8143699", "0.81157076", "0.8107375", "0.8102168", "0.80961156", "0.8047981", "0.7947579", "0.794645", "0.7917345", "0.78191155", "0.77918404", "0.779108...
0.83241796
1
Creates a Position object for the given argument. The argument may be a hash of row labels by axis name, or it may be an array of row labels for the axes in order.
def position(arg_) vector_ = _vector(arg_) vector_ ? Position.new(self, vector_) : nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def position _args\n \"position _args;\" \n end", "def initialize(rows, cols, nz, label: nil)\n @rows = rows\n @cols = cols\n @label = label \n @nz = nz\n end", "def make_coord(hash)\n nary = hash.delete(:val)\n name = hash.delete(\"ITEM\")\n coord_att_c...
[ "0.53086364", "0.52714735", "0.525546", "0.51324594", "0.51016754", "0.50543797", "0.50393784", "0.50332385", "0.50324184", "0.5031064", "0.50211006", "0.4946357", "0.49439338", "0.49414942", "0.49371487", "0.4921656", "0.49140605", "0.48761985", "0.48761132", "0.48591167", "...
0.5543685
0
Create a new substructure of this structure. The new structure has this structure as its parent, but includes only the given axes, which can be provided as an array of axis names or indexes.
def substructure_including(*axes_) _substructure(axes_.flatten, true) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_json_array(array_)\n if @indexes.size > 0\n raise StructureStateError, \"There are already axes in this structure\"\n end\n array_.each do |obj_|\n name_ = obj_['name']\n type_ = obj_['type'] || 'Empty'\n if type_ =~ /^([a-z])(.*)$/\n mod_ = ::NTable.con...
[ "0.5803201", "0.5754405", "0.5695269", "0.5675838", "0.5608517", "0.5402979", "0.54024935", "0.53464407", "0.53258264", "0.52755505", "0.52378494", "0.5214488", "0.52112305", "0.5160097", "0.5052976", "0.5041263", "0.49996167", "0.4914073", "0.49105993", "0.48295993", "0.4819...
0.6027923
0
Create a new substructure of this structure. The new structure has this structure as its parent, but includes all axes EXCEPT the given axes, provided as an array of axis names or indexes.
def substructure_omitting(*axes_) _substructure(axes_.flatten, false) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def substructure_including(*axes_)\n _substructure(axes_.flatten, true)\n end", "def from_json_array(array_)\n if @indexes.size > 0\n raise StructureStateError, \"There are already axes in this structure\"\n end\n array_.each do |obj_|\n name_ = obj_['name']\n type_ = ...
[ "0.59421474", "0.5861907", "0.5607008", "0.5604717", "0.5576344", "0.5467109", "0.5394172", "0.52975184", "0.5292789", "0.52107364", "0.51963836", "0.5107323", "0.5023212", "0.4877577", "0.48538274", "0.48508674", "0.48280796", "0.4773538", "0.47634062", "0.4669281", "0.46563...
0.62560666
0
Create a new table using this structure as the structure. Note that this also has the side effect of locking this structure. You can initialize the data using the following options: [:fill] Fill all cells with the given value. [:load] Load the cell data with the values from the given array, in order.
def create(data_={}) Table.new(self, data_) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(structure_, data_={})\n Table.new(structure_, data_)\n end", "def initialize table, array = []\n @cell_index = 0\n @table = table\n @cells = []\n array.each { |item| self << item }\n end", "def init_table\n\t$table = Array.new($height) { Array.new($width, '.'...
[ "0.7393545", "0.7055945", "0.6952379", "0.684203", "0.682042", "0.6814888", "0.65209776", "0.6514077", "0.6406507", "0.6380353", "0.6241451", "0.61842453", "0.617583", "0.6164961", "0.6161655", "0.6161598", "0.6119436", "0.6108862", "0.6091016", "0.60667354", "0.60564387", ...
0.73509574
1
Deserialize a structure from the given JSON array
def from_json_array(array_) self.new.from_json_array(array_) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_json_array(data)\n array = Oj.load(data, symbol_keys: true)\n array.collect { |hash| from_h(hash, :from_json) }\n end", "def from_json(json)\n deserialize JSON.parse(json)\n end", "def from_json(serialized_data)\n Yajl::Parser.parse(serialized_data, :symbolize_k...
[ "0.6856132", "0.67556626", "0.63424706", "0.6214163", "0.61257124", "0.5902096", "0.58867043", "0.58835214", "0.5882728", "0.5861921", "0.5861921", "0.5860886", "0.58598775", "0.58526665", "0.5812824", "0.5796917", "0.57794654", "0.5771963", "0.5750523", "0.5746235", "0.57199...
0.719995
0
GET /ways_of_admissions GET /ways_of_admissions.json
def index @ways_of_admissions = WaysOfAdmission.all respond_to do |format| format.html # index.html.erb format.json { render :json => @ways_of_admissions } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @ways_of_admission = WaysOfAdmission.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @ways_of_admission }\n end\n end", "def abilities\n get('/ability/')\n end", "def new\n @ways_of_admission = WaysOfAdmission....
[ "0.73254406", "0.6441837", "0.63329685", "0.6302306", "0.60314643", "0.60048974", "0.59949976", "0.5857629", "0.5848522", "0.58443576", "0.58149326", "0.5803207", "0.5803207", "0.5803207", "0.5803207", "0.5755591", "0.5751429", "0.574464", "0.57365006", "0.57118523", "0.56918...
0.7520956
0
GET /ways_of_admissions/1 GET /ways_of_admissions/1.json
def show @ways_of_admission = WaysOfAdmission.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render :json => @ways_of_admission } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @ways_of_admissions = WaysOfAdmission.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @ways_of_admissions }\n end\n end", "def new\n @ways_of_admission = WaysOfAdmission.new\n\n respond_to do |format|\n format.html # new.htm...
[ "0.7625905", "0.6670756", "0.6405655", "0.627257", "0.62702596", "0.62472767", "0.61689055", "0.61393124", "0.61270803", "0.6114137", "0.6068767", "0.60592824", "0.60030854", "0.5998839", "0.5992738", "0.5991508", "0.5986027", "0.59589916", "0.5921601", "0.5904022", "0.587962...
0.76327384
0
GET /ways_of_admissions/new GET /ways_of_admissions/new.json
def new @ways_of_admission = WaysOfAdmission.new respond_to do |format| format.html # new.html.erb format.json { render :json => @ways_of_admission } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @ways_of_admission = WaysOfAdmission.new(params[:ways_of_admission])\n\n respond_to do |format|\n if @ways_of_admission.save\n format.html { redirect_to @ways_of_admission, :notice => 'Ways of admission was successfully created.' }\n format.json { render :json => @ways_of_admi...
[ "0.7244386", "0.72301584", "0.7203578", "0.71951044", "0.7068416", "0.7051409", "0.7051409", "0.7051409", "0.6968997", "0.6923122", "0.69196784", "0.689644", "0.6846584", "0.68435794", "0.6833177", "0.6814874", "0.67779374", "0.6777399", "0.676609", "0.6762312", "0.67051196",...
0.7823392
0
POST /ways_of_admissions POST /ways_of_admissions.json
def create @ways_of_admission = WaysOfAdmission.new(params[:ways_of_admission]) respond_to do |format| if @ways_of_admission.save format.html { redirect_to @ways_of_admission, :notice => 'Ways of admission was successfully created.' } format.json { render :json => @ways_of_admission, :sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @ways_of_admissions = WaysOfAdmission.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @ways_of_admissions }\n end\n end", "def new\n @ways_of_admission = WaysOfAdmission.new\n\n respond_to do |format|\n format.html # new.htm...
[ "0.6314895", "0.62924534", "0.6264402", "0.62570435", "0.6038272", "0.60105747", "0.6008668", "0.5963634", "0.5842419", "0.57615185", "0.57462686", "0.5734206", "0.5679095", "0.56789804", "0.5655709", "0.5628582", "0.56182086", "0.5602159", "0.5598881", "0.5598881", "0.559888...
0.7029897
0
PUT /ways_of_admissions/1 PUT /ways_of_admissions/1.json
def update @ways_of_admission = WaysOfAdmission.find(params[:id]) respond_to do |format| if @ways_of_admission.update_attributes(params[:ways_of_admission]) format.html { redirect_to @ways_of_admission, :notice => 'Ways of admission was successfully updated.' } format.json { head :no_cont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @admission.update_attributes(admission_params)\n end", "def update\n @admission_type = AdmissionType.find(params[:id])\n\n respond_to do |format|\n if @admission_type.update_attributes(params[:admission_type])\n format.html { redirect_to @admission_type, :notice => 'Tipo de Ing...
[ "0.66711384", "0.6549959", "0.6291597", "0.6266027", "0.6252885", "0.62485427", "0.62485427", "0.62485427", "0.62430644", "0.6232139", "0.62285274", "0.61942375", "0.61837965", "0.61109024", "0.6052985", "0.6015523", "0.5987177", "0.59823006", "0.59823006", "0.59823006", "0.5...
0.7460499
0
DELETE /ways_of_admissions/1 DELETE /ways_of_admissions/1.json
def destroy @ways_of_admission = WaysOfAdmission.find(params[:id]) @ways_of_admission.destroy respond_to do |format| format.html { redirect_to ways_of_admissions_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_pathway\n pathway = Pathway.find(params[:pathway_par])\n current_user.pathways.delete(pathway)\n if current_user.pathways.size < 1\n respond_to do |format|\n format.html { redirect_to '/saved#pathways' }\n format.json { head :no_content }\n end\n end\n end", "def d...
[ "0.7101858", "0.7012176", "0.7007128", "0.69691795", "0.69029677", "0.690095", "0.689542", "0.6888591", "0.68655705", "0.68589133", "0.682943", "0.68117565", "0.6790654", "0.67205137", "0.67049634", "0.6690316", "0.66838217", "0.6671338", "0.66678965", "0.66610855", "0.666108...
0.78210264
0
GET /dossiers GET /dossiers.json
def index @dossiers = Dossier.all respond_to do |format| format.html # index.html.erb format.json { render json: @dossiers } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @dossiers = Dossier.all\n end", "def index\n @task_doers = TaskDoer.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @task_doers }\n end\n end", "def index\n @docters = Docter.all\n end", "def index\n @d_loggers = DLogger.al...
[ "0.6810329", "0.6336722", "0.6312308", "0.62265617", "0.6107729", "0.6063627", "0.60134804", "0.59554994", "0.59470606", "0.59000355", "0.5883624", "0.58774775", "0.58711475", "0.5860346", "0.583942", "0.58331305", "0.58331305", "0.5832496", "0.5806942", "0.5773236", "0.57725...
0.7512536
0
GET /dossiers/new GET /dossiers/new.json
def new @dossier = Dossier.new respond_to do |format| format.html # new.html.erb format.json { render json: @dossier } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @dress = Dress.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @dress }\n end\n end", "def new\n @distro = Distro.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @distro }\n end\n e...
[ "0.7041991", "0.7027663", "0.7027663", "0.7001441", "0.699132", "0.69408023", "0.676399", "0.6751667", "0.67432106", "0.6726703", "0.6721639", "0.6709626", "0.67090255", "0.67090255", "0.6653952", "0.6648382", "0.6642502", "0.66344285", "0.66329724", "0.66204417", "0.66171956...
0.7132308
0
DELETE /dossiers/1 DELETE /dossiers/1.json
def destroy @dossier = Dossier.find(params[:id]) @dossier.destroy respond_to do |format| format.html { redirect_to dossiers_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n client.delete(\"/#{id}\")\n end", "def destroy\n @d_dungeoneer.destroy\n respond_to do |format|\n format.html { redirect_to d_dungeoneers_url, notice: 'D dungeoneer was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @docter...
[ "0.72734493", "0.69258803", "0.69041336", "0.6895464", "0.68447447", "0.68447447", "0.68374944", "0.6831758", "0.68197423", "0.6817086", "0.6786688", "0.6772111", "0.67698276", "0.67515165", "0.6742654", "0.67422175", "0.67420965", "0.6741126", "0.6734444", "0.6729919", "0.67...
0.7209854
1
NOTE: Decision Reviews v2 uses auth_headers for a few form fields and form_data for the rest, while the segmented APIs use form_data for all the fields (no auth_headers) this attempts to find a field's data in either place
def find_datum(header_name, *form_data_path) auth_headers&.dig(header_name) || form_data&.dig(*form_data_path) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def form_field_data\n @attributes[:form_field_data]\n end", "def form_data?; end", "def test_allow_dynamic_form_fields()\n # Parameters for the API call\n name = 'farhan'\n\n # dictionary for optional form parameters\n optional_form_parameters = {}\n optional_form_parameters['field'] = ...
[ "0.5985066", "0.59783816", "0.58524555", "0.56304014", "0.5614221", "0.5611425", "0.55939275", "0.5555727", "0.55501115", "0.54988354", "0.5475566", "0.5465201", "0.5459376", "0.5439083", "0.5377111", "0.5370691", "0.5358277", "0.53541285", "0.5332542", "0.531625", "0.5289348...
0.60325295
0
Checks a given Group( ID) for given access(es) for the instance. Checks indirect access via Roles if instance has Roles, too.
def group_access?(group_id, access) return false if !active? return false if !groups_access_permission? group_id = self.class.ensure_group_id_parameter(group_id) access = self.class.ensure_group_access_list_parameter(access) # check direct access return true if group_through.klass.eager_load...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def group_access(group_id, access)\n group_id = ensure_group_id_parameter(group_id)\n access = ensure_group_access_list_parameter(access)\n\n # check direct access\n instances = joins(group_through.name)\n .where( group_through.table_name => { group_id: group_id, access: acce...
[ "0.7689927", "0.6934077", "0.6909276", "0.68984246", "0.65169734", "0.6513877", "0.63151807", "0.6247778", "0.6235279", "0.61610454", "0.60462964", "0.6013823", "0.5986969", "0.59493524", "0.5901806", "0.5898077", "0.58946973", "0.5882144", "0.5871777", "0.58596545", "0.58346...
0.7431919
1
Lists the Group IDs the instance has the given access(es) plus 'full' to. Adds indirect accessable Group IDs via Roles if instance has Roles, too.
def group_ids_access(access) return [] if !active? return [] if !groups_access_permission? access = self.class.ensure_group_access_list_parameter(access) foreign_key = group_through.foreign_key klass = group_through.klass # check direct access ids = klass.eager_load(:group).wh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def groups_access(access)\n group_ids = group_ids_access(access)\n Group.where(id: group_ids)\n end", "def group_access(group_id, access)\n group_id = ensure_group_id_parameter(group_id)\n access = ensure_group_access_list_parameter(access)\n\n # check direct access\n instances = joi...
[ "0.69214106", "0.6409926", "0.6213953", "0.6089519", "0.5996869", "0.5979226", "0.5974348", "0.59519625", "0.5936231", "0.5898065", "0.5852614", "0.5800237", "0.5791369", "0.5778276", "0.5777684", "0.5757313", "0.5736235", "0.572534", "0.5722983", "0.57197", "0.57118016", "...
0.687208
1
Lists Groups the instance has the given access(es) plus 'full' to. Adds indirect accessable Groups via Roles if instance has Roles, too.
def groups_access(access) group_ids = group_ids_access(access) Group.where(id: group_ids) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @member_groups = @user.groups_where_member\n @admin_groups = @user.groups_where_admin\n end", "def index\n authorize! :see, Group\n @groups = Group.all\n end", "def index\n @groups = []\n for member in current_user.members\n @groups << member.group\n end\n end", "def ...
[ "0.6464902", "0.6328074", "0.6223819", "0.6159835", "0.612284", "0.6087202", "0.60166985", "0.6005422", "0.59562504", "0.59434575", "0.5941536", "0.5897075", "0.58883816", "0.58827597", "0.5877143", "0.5864339", "0.5852241", "0.58486956", "0.5832476", "0.5774533", "0.5771387"...
0.6523111
0
Lists instances having the given access(es) to the given Group.
def group_access(group_id, access) group_id = ensure_group_id_parameter(group_id) access = ensure_group_access_list_parameter(access) # check direct access instances = joins(group_through.name) .where( group_through.table_name => { group_id: group_id, access: access }, activ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def groups_access(access)\n group_ids = group_ids_access(access)\n Group.where(id: group_ids)\n end", "def index\n authorize! :see, Group\n @groups = Group.all\n end", "def private_groups\n Group.find_private self.id\n end", "def index\n @member_groups = @user.groups_where_member\n @a...
[ "0.6936458", "0.6794646", "0.6516333", "0.6439997", "0.64157623", "0.6404525", "0.6370745", "0.6338372", "0.62824047", "0.6246627", "0.6204581", "0.6138839", "0.6116652", "0.6106856", "0.6098244", "0.6076729", "0.6045992", "0.60320455", "0.6004859", "0.6004567", "0.6001334", ...
0.69652796
0
Returns the attributes of a field found by ID
def field_by_id(id = nil) @fields.find { |h| h[:id] == id.to_s } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_field_by_id(id, params = {})\n get(\"/fields/#{id}\", params)\n end", "def GetField id\n\n APICall(path: \"ticket_fields/#{id}.json\")\n\n end", "def show_field(id)\n get(\"fields/#{id}\")\n end", "def fields\n [:id]\n end", "def person_field(id:, **args)\n ...
[ "0.71278214", "0.6838933", "0.65906775", "0.65273035", "0.65091896", "0.6493487", "0.6319446", "0.6307848", "0.61643195", "0.6153259", "0.61191136", "0.61158144", "0.6104361", "0.6030403", "0.60024023", "0.5988341", "0.5973354", "0.59142345", "0.59083724", "0.590474", "0.5882...
0.71265984
1
Alias of field which returns all fields if no lookup found
def fields(lookup = nil) lookup ? field(lookup) : @fields end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fields\n [*lookup]\n end", "def effective_field field\n each do |container|\n return container.value.send(field) unless container.empty?\n end\n nil\n end", "def method_missing(meth, *args, &blk)\n super unless Fields.all.include?(meth)\n field meth, *args\n end...
[ "0.68126124", "0.6555486", "0.6464063", "0.6350577", "0.63324004", "0.6329417", "0.628473", "0.61318254", "0.61207587", "0.61083317", "0.6079714", "0.6079394", "0.6077232", "0.6039908", "0.60340345", "0.6022856", "0.6022459", "0.6012106", "0.60120267", "0.5980714", "0.5979052...
0.7059609
0
Returns a field's ID
def field_id(lookup = nil) field = field(lookup) field[:id].to_i if field end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def id\n fields['id']\n end", "def field_id(field=nil, value=nil)\n result = (namespace && !is_nested) ? \"#{namespace}_\" : ''\n result << field_id_fragment\n result << \"_#{field}\" if field\n result << \"_#{value}\" if value\n result\n end", "d...
[ "0.8134431", "0.770718", "0.75631887", "0.7551903", "0.75062513", "0.734557", "0.7287535", "0.7282469", "0.7267439", "0.72299623", "0.72172576", "0.72172576", "0.7207305", "0.7168327", "0.70441866", "0.6997979", "0.6992676", "0.6983227", "0.6938965", "0.692033", "0.6841632", ...
0.8101269
1
Returns a list options's ID
def list_option_id(field_name = nil, lookup = nil) list_option = list_option(field_name, lookup) list_option[:id].to_i if list_option end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def id\n @options[:id] \n end", "def id\n @options[:id]\n end", "def list_id\n raise 'answer a unique, never changing value'\n end", "def get_id(options)\r\n id = options[:id]\r\n\r\n id\r\n end", "def ids\n options[:id][1..-2].split(\",\").map(&:to_i)\n end", "def list...
[ "0.7247552", "0.7196713", "0.7074756", "0.6683614", "0.6653748", "0.6427796", "0.6358411", "0.63171136", "0.61572754", "0.6137419", "0.6137419", "0.6137419", "0.6122698", "0.6097449", "0.60769016", "0.59619164", "0.596037", "0.59218323", "0.59218323", "0.57962763", "0.5777309...
0.7303448
0
common cache : load_notetags_bubs_tocrafting
def load_notetags_bubs_tocrafting @recipe_list = [] @ingredient_list = [] @tocrafting_tools = [] @tocrafting_actors = [] @tocrafting_skills = [] @tocrafting_gold_fee = self.price @tocrafting_bookcover = "" @tocrafting_se = [] @tocrafting_category = :none @tocrafting_amount = 1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_notetags_bubs_dismantle\n @dismantle_items = []\n @dismantle_gold_fee = Bubs::Dismantle::DEFAULT_DISMANTLE_FEE\n @dismantle_reagents = {}\n @dismantle_counter = 0\n \n dismantle_tag = false\n \n self.note.split(/[\\r\\n]+/).each { |line|\n case line\n when /<dismantle>/i\...
[ "0.6509506", "0.6490414", "0.630726", "0.6262164", "0.62143195", "0.614216", "0.6011857", "0.58874416", "0.5858883", "0.5846048", "0.5772834", "0.5721894", "0.57211274", "0.5630531", "0.5630531", "0.56191564", "0.55478156", "0.5529847", "0.5444097", "0.5405162", "0.5405162", ...
0.74028975
0
load_notetags_bubs_tocrafting common cache : load_notetags_default_fee_bubs_tocrafting
def load_notetags_default_fee_bubs_tocrafting rate = Bubs::TOCrafting::CRAFTING_FEE_PRICE_RATE @tocrafting_gold_fee = (@tocrafting_gold_fee * (rate * 0.01)).to_i end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_notetags_bubs_tocrafting\n @recipe_list = []\n @ingredient_list = []\n @tocrafting_tools = []\n @tocrafting_actors = []\n @tocrafting_skills = []\n @tocrafting_gold_fee = self.price\n @tocrafting_bookcover = \"\"\n @tocrafting_se = []\n @tocrafting_category = :none\n @tocraft...
[ "0.7127678", "0.6106764", "0.53095585", "0.527584", "0.5158422", "0.5124823", "0.51081735", "0.49419987", "0.4920041", "0.4896785", "0.48791948", "0.48491943", "0.48334697", "0.47906068", "0.47779995", "0.47521642", "0.47327054", "0.4717104", "0.4708614", "0.4680199", "0.4677...
0.81379485
0
common cache : load_notetags_recipelist_bubs_tocrafting
def load_notetags_recipelist_bubs_tocrafting(line) return unless line =~ Bubs::Regexp::RECIPEBOOK_OBJ_TAG ? true : false match = $~.clone id_array = match[2].scan(/\d+/) case match[1].upcase when "I", "ITEM", "OGGETTO" for id in id_array @recipe_list.push( $data_items[id.to_i] ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_notetags_bubs_tocrafting\n @recipe_list = []\n @ingredient_list = []\n @tocrafting_tools = []\n @tocrafting_actors = []\n @tocrafting_skills = []\n @tocrafting_gold_fee = self.price\n @tocrafting_bookcover = \"\"\n @tocrafting_se = []\n @tocrafting_category = :none\n @tocraft...
[ "0.7826543", "0.68293303", "0.6372786", "0.6209792", "0.6200309", "0.6190389", "0.5995601", "0.5812322", "0.57118666", "0.56833065", "0.56700075", "0.55957365", "0.553427", "0.5363575", "0.52680963", "0.52680963", "0.52261364", "0.5211963", "0.520268", "0.5142977", "0.5138777...
0.746415
1
def load_notetags_recipelist_bubs_tocrafting common cache : load_notetags_ingredients_bubs_tocrafting
def load_notetags_ingredients_bubs_tocrafting(line) return unless line =~ Bubs::Regexp::INGREDIENT_OBJ_TAG ? true : false amount = $3 ? $3.to_i : 1 case $1.upcase when "I", "ITEM", "OGGETTO" amount.times do @ingredient_list.push( $data_items[$2.to_i] ) end when "W", "WEAPON", "WEP"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_notetags_bubs_tocrafting\n @recipe_list = []\n @ingredient_list = []\n @tocrafting_tools = []\n @tocrafting_actors = []\n @tocrafting_skills = []\n @tocrafting_gold_fee = self.price\n @tocrafting_bookcover = \"\"\n @tocrafting_se = []\n @tocrafting_category = :none\n @tocraft...
[ "0.76085955", "0.7120303", "0.60624444", "0.6013583", "0.58637166", "0.5827202", "0.57813346", "0.5748014", "0.57353663", "0.5571404", "0.5481118", "0.54376245", "0.54373163", "0.54199487", "0.54133505", "0.54130316", "0.5310457", "0.5298427", "0.5276432", "0.526806", "0.5247...
0.712407
1
def load_notetags_ingredients_bubs_tocrafting common cache : load_notetags_tools_bubs_tocrafting
def load_notetags_tools_bubs_tocrafting(line) line =~ Bubs::Regexp::REQUIRED_TOOLS_TAG case $1.upcase when "I", "ITEM", "OGGETTO" @tocrafting_tools.push( $data_items[$2.to_i] ) when "W", "WEAPON", "WEP", "ARMA" @tocrafting_tools.push( $data_weapons[$2.to_i] ) when "A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_notetags_bubs_tocrafting\n @recipe_list = []\n @ingredient_list = []\n @tocrafting_tools = []\n @tocrafting_actors = []\n @tocrafting_skills = []\n @tocrafting_gold_fee = self.price\n @tocrafting_bookcover = \"\"\n @tocrafting_se = []\n @tocrafting_category = :none\n @tocraft...
[ "0.72830015", "0.6617969", "0.6396282", "0.5948711", "0.5812788", "0.57136685", "0.5688709", "0.56245345", "0.5443762", "0.54063857", "0.53945595", "0.5337619", "0.5337619", "0.5314278", "0.5256052", "0.5199232", "0.51914805", "0.5182284", "0.51498675", "0.51498675", "0.51447...
0.66211367
1
inh ov : set_page_keys
def set_page_keys @page_index = @vert_page_index = 0 @item_pages = Bubs::InfoPages::ITEM_INFO_PAGES.clone @equipitem_pages = Bubs::InfoPages::EQUIP_INFO_PAGES.clone @item_pages.unshift(:ingredients) @equipitem_pages.unshift(:ingredients) refresh end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def page(key)\n end", "def set_page\n end", "def traverse\n keys = []\n load_page 0\n while @current_page.next_page != 0\n @current_page.keys.each do |j|\n next if j == 0 \n keys << j\n end\n load_page @current_page.next_page\n end\n @current_page.keys.each do ...
[ "0.6882675", "0.6490277", "0.6326616", "0.6238788", "0.6211657", "0.60934156", "0.6081378", "0.6057948", "0.6048246", "0.6048246", "0.6009942", "0.5996857", "0.59962434", "0.5958839", "0.59331053", "0.59331053", "0.58709526", "0.58531886", "0.58531886", "0.58531886", "0.58258...
0.73176736
0
inh ov : draw_info_footer_text
def draw_info_footer_text(x, y) if current_page == :ingredients draw_ingredients_footer_text(x, y) else super end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw_footer; end", "def draw_info_header_text(x, y)\n if current_page == :ingredients\n draw_ingredients_header_text(x, y)\n else\n super\n end\n end", "def draw_footer\n pos = current_position\n\n complete_pixels = (width * pos[:percent_complete]).floor\n stroke_weight(5)\n ...
[ "0.7844266", "0.72779614", "0.7187967", "0.7149074", "0.6884466", "0.673817", "0.673817", "0.673817", "0.6554542", "0.6537465", "0.6508808", "0.64948946", "0.64640075", "0.64627206", "0.6440607", "0.64269733", "0.64200455", "0.64001876", "0.6368958", "0.632467", "0.631993", ...
0.84854865
0
inh ov : draw_info_header_text
def draw_info_header_text(x, y) if current_page == :ingredients draw_ingredients_header_text(x, y) else super end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw_header\n draw_text(0,0, contents.width, line_height, Vocab::ITEM_EQUIP, Bitmap::ALIGN_CENTER)\n end", "def draw_data(x, y, width, header, text)\n x += 5\n width -= 5\n draw_line(x, y + line_height - 1, width)\n #draw_bg_rect(x + 1 , y, width - 2, line_height)\n if header.is_a? String\...
[ "0.7723878", "0.7138564", "0.7095367", "0.7085035", "0.7068844", "0.6925411", "0.6838984", "0.68075275", "0.6807167", "0.67620534", "0.67487395", "0.67255485", "0.6701365", "0.66632104", "0.6653777", "0.6591866", "0.65366334", "0.64846295", "0.6456307", "0.6380692", "0.637326...
0.83888435
0
vert_page_size Number of Ingredients Displayable at Once
def vert_page_size Bubs::TOCrafting::INGREDIENTS_PAGE_SIZE end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vert_page_max\n (@ingredients.size + vert_page_size) / vert_page_size\n end", "def num_pages\n if order_bw_pages && order_color_pages\n return 2 + order_bw_pages + order_color_pages\n end\n end", "def page_size\n 25\n end", "def page_size_with_links\n [10, 25, 50, 100].map do |...
[ "0.74720436", "0.6009007", "0.5889748", "0.57580876", "0.573502", "0.5663494", "0.563408", "0.5580847", "0.55785644", "0.55613875", "0.5439774", "0.54050314", "0.5397211", "0.53948784", "0.53776014", "0.5377167", "0.5375798", "0.5365554", "0.53417814", "0.53164196", "0.531586...
0.72110564
1
vert_page_max Get Maximum Number of Pages
def vert_page_max (@ingredients.size + vert_page_size) / vert_page_size end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_pages() 1 end", "def max_page\n (Post.count(@tag).to_f / Post.page_size.to_f).ceil\n end", "def max_numbered_pages\n 1_000\n end", "def max_page(per_page = 10)\n count_hint / per_page + (count_hint % per_page == 0 ? 0 : 1)\n end", "def max_pages\n return 1 if (r...
[ "0.74724287", "0.7232255", "0.7153073", "0.7104957", "0.69323146", "0.69041204", "0.6880131", "0.6810045", "0.6810045", "0.6718939", "0.6626275", "0.65442675", "0.6527382", "0.6511183", "0.64804775", "0.64230955", "0.6399847", "0.6365092", "0.6349636", "0.63383406", "0.628385...
0.77815944
0
item_y Y Coordinate of Item Name Display Line
def item_y contents_height / 2 - line_height * 3 / 2 end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw_item(item, x, y)\n draw_icon(item.icon_index, x, y, width = contents.width - 24)\n draw_text(x + 24, y, width, line_height, item.name)\n end", "def draw_item_name(item, x, y, enabled = true, width = 172)\n return unless item\n change_color(normal_color, enabled)\n draw_text(x, y, width, ...
[ "0.6889388", "0.6501188", "0.6501188", "0.6414939", "0.638601", "0.6380136", "0.63023555", "0.62482834", "0.62109077", "0.6173737", "0.61542964", "0.6044152", "0.6027571", "0.6009739", "0.5933658", "0.5933658", "0.58958167", "0.5874625", "0.58609533", "0.5858406", "0.5844723"...
0.7605572
0