query
stringlengths
7
9.55k
document
stringlengths
10
363k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns the object in the form of hash
def to_hash hash = super VirtualizationVmwareVirtualDisk.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = VirtualizationVmwareVirtualDisk.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_hash\n object\n end", "def hash\r\n return to_s.hash\r\n end", "def hash\n to_a.hash\n end", "def hash\n [_hash, name, owner].hash\n end", "def hash\n return to_s.hash\n end", "def hash\n @hash\n end", "def hash\n @hash.hash\n end", "def hash\n ...
[ "0.8270299", "0.78767854", "0.78726953", "0.7802364", "0.7789188", "0.77806795", "0.7775915", "0.7767511", "0.7760525", "0.7760525", "0.77559966", "0.7731286", "0.7713916", "0.7713916", "0.7713916", "0.7713916", "0.7713916", "0.7713916", "0.7713916", "0.7713916", "0.7713916",...
0.0
-1
Outputs nonarray value in the form of hash For object, use to_hash. Otherwise, just return the value
def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hash\n [value].hash\n end", "def hash\n [value].hash\n end", "def hash\n\t\tvalue.hash\n\tend", "def hash\n value.hash\n end", "def hash\n @value.hash\n end", "def hash\r\n return to_s.hash\r\n end", "def to_hash\n @value\n end", "def to_hash\n @va...
[ "0.6719518", "0.6719518", "0.666832", "0.66565555", "0.6586841", "0.6452931", "0.6414911", "0.6414911", "0.6382046", "0.6346188", "0.6302933", "0.62237245", "0.6151989", "0.6101756", "0.60795677", "0.60795677", "0.60717124", "0.6035991", "0.6021168", "0.5936472", "0.5903488",...
0.0
-1
return => An Array of Squirrel instances
def squirrels # self.nests # what are my nests? self.nests.map do |nest| # Nest instance nest.squirrel end # binding.pry # [#<Nest>, #<Nest>, #<Nest>] # || # \/ # [#<Squirrel>, #<Squirrel>, #<Squirrel>] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def queries\n qrs = []\n self.each_query {|qr| qrs << qr }\n qrs\n end", "def get_shelves\n shelves = [@shelf_ag, @shelf_hp, @shelf_qz]\n return shelves\n end", "def all\n # Figure out the table's name from the class we're calling the method on.\n table_name = self.to_s.p...
[ "0.6476854", "0.61224896", "0.6083525", "0.6074826", "0.6042455", "0.5914627", "0.5872662", "0.58673775", "0.5865003", "0.5857872", "0.58548903", "0.5803283", "0.5802454", "0.57944906", "0.5774669", "0.57738656", "0.57335556", "0.57330734", "0.5725632", "0.5669892", "0.566045...
0.7075513
0
SCOPES VALIDATIONS CALLBACKS CLASS METHODS
def viewed_courses self.user.viewed_posture_courses.select do |v| if v.posture_course.track_id.present? v.posture_course.track.id == self.track.id end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def valid_scope(valid_scopes, scope)\n\t\tend", "def validate_callback(params)\n raise 'To be implemented in child classes'\n end", "def validate_params\n @calls << [:validate_params]\n end", "def validate; end", "def validate; end", "def validate; end", "def validate; end", "def ...
[ "0.7055817", "0.6469751", "0.6106404", "0.60650235", "0.60650235", "0.60650235", "0.60650235", "0.60380024", "0.60380024", "0.60291", "0.5986233", "0.5976042", "0.5976042", "0.5976042", "0.5968381", "0.5968029", "0.5940366", "0.5940366", "0.5925041", "0.5902548", "0.58957684"...
0.0
-1
POST /job_requests POST /job_requests.json
def create @job_request = job_requests.build( params[ :job_request ] ) if params[:add_to_address_book] location = schedulable_locations.build( params[ :job_request ][:physical_address_attributes] ) location.save! end respond_to do |format| if @job_request.save offers = @job_request.scheduler.create_job_offers format.html { redirect_to root_path, notice: "Job Request Created" } format.json { render json: @job_request } else format.html { render action: "new" } format.json { render json: @job_request.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_batch_job(job_id)\n request = Net::HTTP::Put.new(\"/jobs/#{job_id}\")\n response = http.request(request)\n handle_response({ request_method: request.method, request_path: request.path }, response)\n end", "def create_job(job:, params: {})\n response = HTTParty.post(\"#{@host}/api/jobs\",...
[ "0.6780263", "0.6687482", "0.6652123", "0.6601598", "0.647481", "0.64710575", "0.6417419", "0.64106214", "0.6407836", "0.6371234", "0.6286552", "0.6242088", "0.62181616", "0.61695063", "0.616624", "0.6141631", "0.61173546", "0.6114159", "0.60990155", "0.6096911", "0.60742384"...
0.63869065
9
PUT /job_requests/1 PUT /job_requests/1.json
def update begin @job_request = job_requests.find( params[ :id ] ) rescue ActiveRecord::RecordNotFound @job_request = nil end respond_to do |format| if @job_request && @job_request.update_attributes( params[ :job_request ] ) format.html { redirect_to root_path, notice: "Job Requests Updated Successfully"} format.json { head :no_content } else format.html { redirect_to root_path, notice: "Update Failed" } format.json { render json: @job_request.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_job_success(job_id, success)\n RestClient.put \"#{rest_jobs_url}/#{job_id}\", {\"passed\" => success}.to_json, :content_type => :json\nend", "def update_job_success(job_id, success)\n RestClient.put \"#{rest_jobs_url}/#{job_id}\", { 'passed' => success }.to_json, :content_type => :json\nend", "d...
[ "0.7060899", "0.701508", "0.701508", "0.701508", "0.6841361", "0.67931044", "0.6441181", "0.6381785", "0.63714504", "0.6276087", "0.6202867", "0.62005585", "0.6125181", "0.6124246", "0.61224884", "0.61198634", "0.6106911", "0.61025417", "0.60993516", "0.60967475", "0.60869175...
0.72622836
0
Time complexity: 0(n) Space complexity: 0(n)
def factorial(n) raise ArgumentError if n < 0 return 1 if n == 1 || n == 0 return n * factorial(n-1) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\n end\t\r\n return 1 if a.inject(:+) ==n*(n+1)/2;\r\nend", "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))...
[ "0.6842821", "0.6839885", "0.6603645", "0.6554738", "0.64983106", "0.6412053", "0.6381801", "0.6375984", "0.633254", "0.628327", "0.62447083", "0.6241112", "0.62397665", "0.6227911", "0.62271285", "0.62200683", "0.6218131", "0.6197176", "0.61964417", "0.61833155", "0.61794084...
0.0
-1
Time complexity: 0(n) Space complexity: 0(n)
def reverse(s) return s if s.length < 2 return reverse(s[1..-1]) + s[0] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\n end\t\r\n return 1 if a.inject(:+) ==n*(n+1)/2;\r\nend", "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))...
[ "0.68425924", "0.6839727", "0.66038096", "0.6554466", "0.64986706", "0.64122146", "0.6381702", "0.6375202", "0.6332033", "0.62830585", "0.6244346", "0.6240925", "0.6239316", "0.62276083", "0.6226886", "0.6219938", "0.62179184", "0.6196942", "0.6196645", "0.6183639", "0.617874...
0.0
-1
Time complexity: ? Space complexity: ?
def reverse_inplace(s) return s if s.length == 0 return reverse(s[1..-1]) + s[0] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.64688283", "0.63178664", "0.6267248", "0.62198216", "0.62003064", "0.6068516", "0.60298127", "0.59856176", "0.59822917", "0.598102", "0.5910868", "0.5903023", "0.58936894", "0.5890103", "0.5879472", "0.58556885", "0.58543235", "0.5849014", "0.5835677", "0.57822996", "0.577...
0.0
-1
Time complexity: ? Space complexity: ?
def bunny(n) return 0 if n == 0 return 2 if n == 1 return bunny(n - 1) + bunny(1) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.64688283", "0.63178664", "0.6267248", "0.62198216", "0.62003064", "0.6068516", "0.60298127", "0.59856176", "0.59822917", "0.598102", "0.5910868", "0.5903023", "0.58936894", "0.5890103", "0.5879472", "0.58556885", "0.58543235", "0.5849014", "0.5835677", "0.57822996", "0.577...
0.0
-1
Time complexity: ? Space complexity: ?
def nested(s) # return nested_helper(s[1..-1]) paren_end = s.index(')') return !s.include?('(') if paren_end.nil? paren_start = s[0...paren_end].rindex('(') return false if paren_start.nil? return nested(s[1..paren_start]+s[paren_end+1..-1]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.64688283", "0.63178664", "0.6267248", "0.62198216", "0.62003064", "0.6068516", "0.60298127", "0.59856176", "0.59822917", "0.598102", "0.5910868", "0.5903023", "0.58936894", "0.5890103", "0.5879472", "0.58556885", "0.58543235", "0.5849014", "0.5835677", "0.57822996", "0.577...
0.0
-1
Time complexity: ? Space complexity: ?
def search(array, value) return false if array.nil? return true if array[0] == value return search(array[1..-1],value) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.64688283", "0.63178664", "0.6267248", "0.62198216", "0.62003064", "0.6068516", "0.60298127", "0.59856176", "0.59822917", "0.598102", "0.5910868", "0.5903023", "0.58936894", "0.5890103", "0.5879472", "0.58556885", "0.58543235", "0.5849014", "0.5835677", "0.57822996", "0.577...
0.0
-1
Time complexity: ? Space complexity: ?
def is_palindrome(s) return true if s.empty? || s.length ==1 return false if s[0] != s[s.length - 1] return is_palindrome_helper(s, 1) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.64688283", "0.63178664", "0.6267248", "0.62198216", "0.62003064", "0.6068516", "0.60298127", "0.59856176", "0.59822917", "0.598102", "0.5910868", "0.5903023", "0.58936894", "0.5890103", "0.5879472", "0.58556885", "0.58543235", "0.5849014", "0.5835677", "0.57822996", "0.577...
0.0
-1
Time complexity: ? Space complexity: ?
def digit_match(n, m) return 1 if n == 0 && m == 0 count = 0 if n % 10 == m % 10 count += 1 end if (n / 10 == 0 || m / 10 == 0) return count end return count + digit_match(n / 10, m / 10) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.64688283", "0.63178664", "0.6267248", "0.62198216", "0.62003064", "0.6068516", "0.60298127", "0.59856176", "0.59822917", "0.598102", "0.5910868", "0.5903023", "0.58936894", "0.5890103", "0.5879472", "0.58556885", "0.58543235", "0.5849014", "0.5835677", "0.57822996", "0.577...
0.0
-1
create enough registrations to max the number available
def fill_up(race) race.max_teams.times do |x| team = FactoryGirl.create :team, :name => "team#{x}" race.registrations.create name: "team#{x}", team: team end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reduce_max_times_if_no_more_registrations\n errors.add(:max_times, 'already has more registrations') if max_times_changed? && max_times < registrations.count && max_times != 0\n end", "def build_registrations!\n quantity.times.map{registrations.build(:product => product)}\n end", "def non_eliminati...
[ "0.6555691", "0.60335755", "0.5734284", "0.56878096", "0.5662171", "0.5638957", "0.5582231", "0.5532331", "0.5519514", "0.5504393", "0.5489561", "0.5482158", "0.5479332", "0.5465627", "0.5444873", "0.54357487", "0.54290384", "0.5416783", "0.54023385", "0.5400763", "0.53891665...
0.58925825
2
def autoprefix (prefix, link)
def try(prefix, link) link end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prefix=(prefix) @prefix = prefix end", "def prefixes; end", "def prefixes; end", "def prefix; end", "def prefix; end", "def prefix; end", "def prefix; end", "def prefix; end", "def prefix; end", "def prefix; end", "def prefix; end", "def prefix; end", "def prefix; end", "def prefix(ne...
[ "0.67473847", "0.67285955", "0.67285955", "0.66695315", "0.66695315", "0.66695315", "0.66695315", "0.66695315", "0.66695315", "0.66695315", "0.66695315", "0.66695315", "0.66695315", "0.6622057", "0.6607422", "0.6580267", "0.6458225", "0.64179486", "0.63889736", "0.6379755", "...
0.6134892
27
slurp CDS > Protein a.) common_data
def slurp_commondata(f) var1=Hash.new File.new(f,'r').each_line{|l| l.chomp! l.gsub!('"','') cols= l.split(/\t/) var1[cols[0]]=cols[1] } return var1 end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_refseq\n # prepare output files\n system(%Q[cut -f4 #{$prepare_dir}/refseq_genes_result.tsv | cut -c1-5 | sort | uniq > #{$prepare_dir}/refp_prefix_list.txt ]) # get exist prefix list of protein_id\n FileUtils.mkdir_p(\"#{$prepare_dir}/refp\") unless File.exist?(\"#{$prepare_dir}/refp\")\n refp_outpu...
[ "0.5410093", "0.5275363", "0.5234244", "0.5195857", "0.512016", "0.5108919", "0.510191", "0.5046017", "0.5037706", "0.50304896", "0.5027487", "0.49786612", "0.49605885", "0.4947074", "0.4940088", "0.49292764", "0.49202317", "0.49107608", "0.48956367", "0.48707545", "0.4839346...
0.5986447
0
See ActionController::RequestForgeryProtection for details
def setup_page_links @page_links = PageLink.all.sort{|a,b| a.position <=> b.position} end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def protect_against_forgery?; end", "def disable_request_forgery_protection; end", "def disable_request_forgery_protection=(_arg0); end", "def allow_forgery_protection\n true\n end", "def protect_against_forgery?\n end", "def protect_against_forgery?\n\n end", "def protect_from_forgery\n end...
[ "0.7633273", "0.75466746", "0.7544969", "0.72861606", "0.7254172", "0.722627", "0.7150675", "0.7116732", "0.71094257", "0.70954484", "0.7084591", "0.7083618", "0.7083618", "0.7083618", "0.7083618", "0.7083618", "0.7083618", "0.7056187", "0.7013498", "0.7009992", "0.6961028", ...
0.0
-1
kills 'x' doc that is found
def destroy @doc = Doc.find params[:id] @doc.destroy end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stop_doc\n return unless @track_visibility\n\n @document_self = false\n @document_children = false\n end", "def kill\n\n close_node\n\n wrap_cancel_children('flavour' => 'kill') +\n wrap_cancelled\n end", "def nosourceack(text)\n\t$k.kill\nend", "def kill() end", "def kill!\n @...
[ "0.61360544", "0.61202544", "0.61067003", "0.58359677", "0.57946795", "0.57563037", "0.5679418", "0.564175", "0.5625756", "0.5591268", "0.55263394", "0.5513665", "0.54826313", "0.5480219", "0.5422195", "0.54141766", "0.5412089", "0.53766114", "0.53510165", "0.53319657", "0.53...
0.50750226
44
a function to calculate the number of miles between two sets of (lat,long) coordinates shamelessly stolen from
def calculate_distance(lat1,long1,lat2,long2) delta_long = convert_degrees_to_radians(long2 - long1) delta_lat = convert_degrees_to_radians(lat2 - lat1) a = (Math.sin(delta_lat / 2) * Math.sin(delta_lat / 2)) + Math.cos(convert_degrees_to_radians(lat1)) * Math.cos(convert_degrees_to_radians(lat2)) * (Math.sin(delta_long / 2) * Math.sin(delta_long / 2)) angle = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)) return angle * RADIUS_OF_EARTH_KM end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def haversine_miles(lat1,lng1,lat2,lng2)\n\trad_per_deg = Math::PI / 180\n\tearth_radius_miles = 3963.1676\n\tlat1_rad = lat1*rad_per_deg\n\tlat2_rad = lat2*rad_per_deg\n\tdlat_rad = (lat1-lat2)*rad_per_deg\n\tdlng_rad = (lng1-lng2)*rad_per_deg\n\ta = (Math.sin(dlat_rad/2))**2 + Math.cos(lat1_rad) * Math.cos(lat2_...
[ "0.7593549", "0.7296941", "0.72916555", "0.6898749", "0.687274", "0.6859289", "0.6858514", "0.68575114", "0.67634887", "0.67528605", "0.67118335", "0.666891", "0.66418767", "0.6628817", "0.65530074", "0.65409726", "0.65375704", "0.651639", "0.6484931", "0.64551324", "0.643607...
0.6241614
36
rest of class needs implementation
def add(todo) begin # raise TypeError, "Can only add Todo objects" unless todo.class.name == "Todo" raise TypeError, "Can only add Todo objects" unless todo.instance_of?(Todo) @todos << todo # rescue # puts "invalid class (#{todo.class.name})" end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def implementation; end", "def implementation; end", "def private; end", "def internal; end", "def methods; end", "def methods; end", "def methods; end", "def methods; end", "def wrapper; end", "def class() end", "def initialize\n \n end", "def call\n # implement in subclasses\...
[ "0.8523953", "0.8523953", "0.78491676", "0.71883124", "0.70584863", "0.70584863", "0.70584863", "0.70584863", "0.6980452", "0.69691235", "0.69645184", "0.69396913", "0.69298077", "0.69246954", "0.68834186", "0.68821424", "0.68821424", "0.6861032", "0.6844157", "0.6844157", "0...
0.0
-1
def select new_arr = [] self.each do |todo| don't need to use 'self.each' here (just use 'each') new_arr << todo if yield(todo) end new_arr rtn an arr of Todo objs end
def select # new_list = TodoList.new("Selected Todos") new_list = TodoList.new(title) # should probably keep the original title self.each do |todo| # don't need to use 'self.each' here (just use 'each') new_list.add(todo) if yield(todo) end new_list # rtn a TodoList obj end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def my_select\n new_arr = []\n self.my_each do |ele|\n new_arr << ele if yield ele\n end\n new_arr\n end", "def my_select\n if block_given?\n new_array = []\n self.my_each{|item| array_new << item if yield(self)}\n # This is the same as:\n # for i in 0..self.length-1\n ...
[ "0.74007255", "0.72010475", "0.70896405", "0.7073939", "0.7058128", "0.6903173", "0.6889198", "0.67903614", "0.67575824", "0.6673704", "0.66505766", "0.66448355", "0.6622905", "0.6618596", "0.65584046", "0.65569097", "0.6452629", "0.6413699", "0.62972444", "0.6234604", "0.619...
0.7000011
5
Takes a string as argument, and returns the first Todo object that matches the argument. Return nil if no todo is found.
def find_by_title(str) self.each do |todo| return todo if todo.title == str end nil # select { |todo| todo.title == str }.first # alt from solution end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_by_title(string)\n @todos.each do |todo|\n return todo if (todo.title =~ /#{string}/)\n end\n nil\n end", "def find_by_title(todo_title)\n select { |todo| todo.title == todo_title }.first\n end", "def todo_with_substring(substring) \n issue_todo = @remaining_todos.detect{ ...
[ "0.73197424", "0.7082518", "0.5925521", "0.57626754", "0.574034", "0.5645423", "0.56425625", "0.55725354", "0.5558545", "0.5493785", "0.54746956", "0.5443234", "0.5440293", "0.54157585", "0.54141414", "0.5403148", "0.5372902", "0.53702646", "0.5351545", "0.53336", "0.5288524"...
0.7316401
1
Return a new TodoList object containing only the done items
def all_done self.select { |todo| todo.done? } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_unfinished_todos\n return Todo.where({\"user_id\" => self.id, \"completed\" => false})\n end", "def show_completed_items\n return @to_do_item.select { |x| x.is_done? == true }\n end", "def show_not_completed_items\n return @to_do_item.select { |x| x.is_done? == false }\n end", "def filter...
[ "0.7290903", "0.72537297", "0.7240629", "0.69705564", "0.6903398", "0.6888046", "0.68777454", "0.6823541", "0.6741669", "0.6654324", "0.66469", "0.6644124", "0.6602716", "0.6586828", "0.6537656", "0.65038025", "0.64412826", "0.64242834", "0.6396058", "0.6392591", "0.63877255"...
0.67016405
9
Return a new TodoList object containing only the not done items
def all_not_done self.select { |todo| !todo.done? } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_not_completed_items\n return @to_do_item.select { |x| x.is_done? == false }\n end", "def get_unfinished_todos\n return Todo.where({\"user_id\" => self.id, \"completed\" => false})\n end", "def show_not_completed_date_items\n return @to_do_with_date.select { |x| x.is_done? == false }\n end"...
[ "0.753549", "0.7284123", "0.7018296", "0.7009293", "0.6946318", "0.6780821", "0.6768124", "0.66947544", "0.66900605", "0.66564363", "0.6634344", "0.660676", "0.65365374", "0.65075624", "0.64729244", "0.64450496", "0.6402285", "0.63112044", "0.6288424", "0.6198829", "0.6190951...
0.7240322
2
Takes a string as argument, and marks the first Todo object that matches the argument as done.
def mark_done(str) todo = self.find_by_title(str) todo.done! if todo # find_by_title(str) && find_by_title(str).done! # alt from solution end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mark_done(string)\n @todos.each do |todo|\n todo.done! if (todo.title =~ /#{string}/)\n end\n end", "def mark_todo\n puts \"Which todo have you finished?\"\n action = get_input.to_i\n arr_index = 0\n @todos.each do |x|\n if x[\"completed\"] == \"no\"\n arr_index = arr_inde...
[ "0.78871566", "0.7128225", "0.64186907", "0.6344688", "0.62784827", "0.62169224", "0.6200314", "0.59818006", "0.59785736", "0.59520334", "0.5876329", "0.5861583", "0.581879", "0.57727945", "0.57180214", "0.5662999", "0.56130207", "0.5593954", "0.55824095", "0.55468065", "0.55...
0.8049822
0
Mark every todo as done
def mark_all_done self.each { |todo| todo.done! } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def done!\n @todos.each {|todo| todo.done! }\n end", "def mark_as_done(todo)\n @data_object.aff_to_do &= ~todo\n end", "def mark_todo\n puts \"Which todo have you finished?\"\n action = get_input.to_i\n arr_index = 0\n @todos.each do |x|\n if x[\"completed\"] == \"no\"\n arr_ind...
[ "0.7927046", "0.7835611", "0.7511289", "0.72529584", "0.7136976", "0.70940804", "0.70915896", "0.70643324", "0.7044478", "0.70238686", "0.70120925", "0.69323087", "0.6931281", "0.68638426", "0.68568313", "0.6724465", "0.6660171", "0.66105545", "0.65963537", "0.6596016", "0.65...
0.8608676
0
Mark every todo as not done
def mark_all_undone self.each { |todo| todo.undone! } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mark_as_done(todo)\n @data_object.aff_to_do &= ~todo\n end", "def all_not_done\n self.select { |todo| !todo.done? }\n end", "def mark_all_done\n self.each { |todo| todo.done! }\n end", "def all_done\n self.select { |todo| todo.done? }\n end", "def delete_all_completed!\n @todos = @to...
[ "0.7688036", "0.7572862", "0.745425", "0.672193", "0.6645638", "0.65415275", "0.65254736", "0.64674604", "0.64041317", "0.63934124", "0.6383882", "0.63385856", "0.6308985", "0.6276067", "0.62734413", "0.62730885", "0.624406", "0.62223315", "0.6206861", "0.6178516", "0.6136508...
0.695269
3
A 2 dimensional array of tiles.
def initialize(width, height, tile_width: 1, tile_height: 1) @tiles = (0...height).step(tile_height).map.with_index do |console_y, map_y| (0...width).step(tile_width).map.with_index do |console_x, map_x| Tile.new map_x, map_y, [console_y, console_x] # reversed for Console::setpos end end @height = height / tile_height @width = width / tile_width end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tile_board\n @board_array.each_with_index do |row_array, row|\n 10.times{|column| row_array << Tile.new(row,column)}\n end\n end", "def tiles\n return @tiles\n end", "def tiles\n return @tiles\n end", "def create_tiles\n # Screen fits exactly 15x10 tiles (for 480x320), bu...
[ "0.7683736", "0.75369674", "0.75369674", "0.7233205", "0.72004014", "0.7059862", "0.69200015", "0.6895728", "0.68954366", "0.6832786", "0.68026274", "0.6753374", "0.671673", "0.66449666", "0.663908", "0.662022", "0.6562069", "0.6543913", "0.6542496", "0.65320766", "0.64748", ...
0.60975355
40
Move a +Tile+ on the +Map+. This movement action causes a chain reaction potentially moving (or killing) tiles down the map in that same direction. It does this by comparing each neighboring pair tile_1 > tile_2 tile_2 > tile_3 tile_3 > tile_4 And follows these rules empty tiles don't transfer movement enemies block enemies players are killed when touching enemies enemies get squished by players players get squished by queens rocks block everything
def move(tile, direction) tiles = send(direction, tile) move = [] tiles.each_cons(2) do |this, that| break if this.empty? # break move.clear if (tile == this) && this.enemy? && that.empty? break move.clear if this.enemy? && that.enemy? break move.clear if this.egg? && that.enemy? break move.clear if this.enemy? && that.egg? break this.destroy! if this.player? && (that.enemy? || that.egg?) break that.destroy! if (this.enemy? || this.egg?) && that.player? if (this.worker? || this.queen? || this.egg?) && tile.player? && (that.dirt? || that.rock?) this.destroy! break end if this.soldier? && tile.player? && that.rock? (neighbors(this) - neighbors(tile)).each &:worker! this.destroy! break end if this.player? && tile.queen? && !that.empty? this.destroy! break end break move.clear if that.rock? move << [that, this.type, this.age] end return if move.empty? tile.empty! move.each { |t, type, age| t.send(type, age) } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move_if_needed\n positions.each {|dir, pos|\n t = tile_at(pos)\n if t\n @direction, @position = directions.invert[dir], pos\n # Update the image so that the user actually sees the bug\n # turning if it did.\n update_image\n t.on\n return ...
[ "0.66526705", "0.66092914", "0.6592572", "0.65756977", "0.6566913", "0.6489996", "0.6418296", "0.6296263", "0.62415653", "0.6214329", "0.6149912", "0.61496544", "0.6126512", "0.61131924", "0.61026967", "0.6080054", "0.60781395", "0.6068451", "0.60475737", "0.604509", "0.60049...
0.7090508
0
Find the closest route from +this+ to +that+ based only on position (ignoring all obstacles between +this+ and +that+).
def aggressive_moves(this, that) directions = [] directions << :north if (this.y > that.y) && ((this.y - that.y) < 10) directions << :south if (that.y > this.y) && ((that.y - this.y) < 10) directions << :west if (this.x > that.x) && ((this.x - that.x) < 10) directions << :east if (that.x > this.x) && ((that.x - this.x) < 10) directions end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shortest_route_by_distance_to!(place_or_object_place_was_built_from)\n routes_for!(place_or_object_place_was_built_from).min_by(&:distance_in_meters)\n end", "def shortest_route_by_distance_to(place_or_object_place_was_built_from)\n routes = routes_for place_or_object_place_was_built_from\n ...
[ "0.6891812", "0.67298645", "0.63228613", "0.6309622", "0.5961141", "0.59474003", "0.58396345", "0.583783", "0.5817197", "0.5792247", "0.57533145", "0.57428867", "0.5729735", "0.5692398", "0.56858134", "0.5654979", "0.56526756", "0.5630149", "0.5624555", "0.5594418", "0.559033...
0.5511112
25
Time Complexity: O(n) worst case Space Complexity: O(1)
def add(key, value) @root = add_helper(@root, key, value) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.7053476", "0.6980185", "0.679534", "0.64903593", "0.6485889", "0.64576155", "0.6457308", "0.6428459", "0.6427262", "0.6410083", "0.635387", "0.6349556", "0.6292801", "0.6231402", "0.621655", "0.62068087", "0.6200745", "0.61991835", "0.618588", "0.61676466", "0.6149772", ...
0.0
-1
Time Complexity: O(log(n) best case, O(n) worst case Space Complexity: O(1)
def find(key) return find_helper(@root, key) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\n end\t\r\n return 1 if a.inject(:+) ==n*(n+1)/2;\r\nend", "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))...
[ "0.6938055", "0.68753237", "0.6814082", "0.6536662", "0.64856493", "0.64549804", "0.6440837", "0.64024115", "0.63703656", "0.63429147", "0.6340236", "0.6323656", "0.627925", "0.6276311", "0.6235396", "0.6218242", "0.62176555", "0.6195478", "0.6183377", "0.6171723", "0.6167908...
0.0
-1
Time Complexity: O(n) Space Complexity: O(n)
def inorder arr = [] if @root.nil? return arr end current_node = @root return inorder_helper(current_node, arr) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.6914348", "0.6609048", "0.6416534", "0.63194925", "0.62016535", "0.61871785", "0.60697335", "0.6059072", "0.6053246", "0.6047552", "0.6037029", "0.5990324", "0.5985229", "0.5983502", "0.59483737", "0.5907289", "0.58986485", "0.5894127", "0.589302", "0.5891029", "0.5862035"...
0.0
-1
Time Complexity: O(n) Space Complexity: O(n)
def preorder arr = [] if @root.nil? return arr end current_node = @root return preorder_helper(current_node, arr) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.6913405", "0.66083884", "0.64167774", "0.6319656", "0.62015754", "0.6185741", "0.6069121", "0.60587454", "0.6052126", "0.604728", "0.60361445", "0.5989489", "0.59843206", "0.5983099", "0.59470034", "0.590678", "0.58972865", "0.58927476", "0.5891501", "0.5890075", "0.585961...
0.0
-1
Time Complexity: O(n) Space Complexity: O(n)
def postorder arr = [] if @root.nil? return arr end current_node = @root return postorder_helper(current_node, arr) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_dublicate(array)\n sum = 1000000*(1000000+1)/2 # (n*(n+1))/2\n array.each do |el| \n sum -= el\n end\n return sum\nend", "def solution(a)\r\n n=a.size\r\n i=1\r\n for k in a.sort do\r\n\tif k!=i \r\n\t then \r\n\t return 0\r\n\t break;\r\n\tend\r\n i+=1;\r\...
[ "0.6914348", "0.6609048", "0.6416534", "0.63194925", "0.62016535", "0.61871785", "0.60697335", "0.6059072", "0.6053246", "0.6047552", "0.6037029", "0.5990324", "0.5985229", "0.5983502", "0.59483737", "0.5907289", "0.58986485", "0.5894127", "0.589302", "0.5891029", "0.5862035"...
0.0
-1
Time Complexity: O(n) Space Complexity: O(n) stack
def height(current_node = @root) if current_node.nil? return 0 end r = height(current_node.right) l = height(current_node.left) return [r, l].max + 1 end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stack; end", "def stack; end", "def inorder_traversal_i(root)\n # declare a queue (Stack)'\n # declare an array variable\n # until root.value.nil? \n # push all the left nodes to the stack\n # once reach to root.value, push stack value to array \n arr = []\n stack = Queue.new \n ...
[ "0.67709273", "0.67709273", "0.6561325", "0.64280933", "0.6395118", "0.63767564", "0.6375943", "0.63546336", "0.63369316", "0.63240534", "0.6211601", "0.616786", "0.61594373", "0.6137189", "0.6137189", "0.6136442", "0.61349756", "0.6109848", "0.61034876", "0.6102125", "0.6097...
0.0
-1
show navbar date component
def show_header_date I18n.localize(Date.today, format: :long) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_by_date\n @city = City.find(params[:city_id])\n @events = @city.events.show_by_date(params[:date])\n d = Date.parse(params[:date])\n @started_at = d\n @date = d\n\n add_breadcrumb @city.name, city_path( @city )\n add_breadcrumb d.strftime(\"%b. %e, %Y\"), \"/show-by-date/\" + d.strfti...
[ "0.6479346", "0.6250476", "0.62121177", "0.6143302", "0.6099917", "0.6030608", "0.5989627", "0.59467703", "0.58439547", "0.58019143", "0.5778906", "0.5742497", "0.5741989", "0.5731145", "0.56853014", "0.56690234", "0.56516856", "0.5637627", "0.5593742", "0.5593128", "0.559308...
0.6390898
1
Select all the paragraphs from the body text which are actual paragraphs (ie not headings). It's probably not an entirely accurate algorithm, but I think it's good enough for extracting the first paragraph to use as an excerpt.
def article_paragraphs(article) source = article.file_descriptor.read body = source.split("---\n", 3).last body.split(/\n{2,}/).select { |paragraph| paragraph !~ /^#/ } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_paragraphs(body)\n without_line_breaks = ignore_unnecessary_line_breaks body\n paragraphs = split_body_to_paragraphs without_line_breaks\n paragraphs = remove_blank_spaces paragraphs\n end", "def paragraphs\n raw_content['blocks'].map { |x| x['text'] }\n rescue StandardError\n []\n end",...
[ "0.7406742", "0.67261267", "0.6710166", "0.655919", "0.6441846", "0.6341218", "0.63394237", "0.6295219", "0.62396485", "0.6211436", "0.6153675", "0.615007", "0.6016181", "0.597451", "0.593671", "0.5908489", "0.5899642", "0.58964217", "0.5891824", "0.5866849", "0.58635885", ...
0.6773492
1
Gets the accessPackage property value. Access package containing this policy. Readonly. Supports $expand.
def access_package return @access_package end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def access_package=(value)\n @access_package = value\n end", "def access_package=(value)\n @access_package = value\n end", "def access_packages\n return @access_packages\n end", "def access_packages\n return @access_...
[ "0.72808987", "0.72808987", "0.6381779", "0.6381779", "0.63023806", "0.63023806", "0.6206695", "0.5798183", "0.57096916", "0.50586104", "0.49319774", "0.49246022", "0.4918219", "0.4918219", "0.49067923", "0.49056503", "0.48911703", "0.48806414", "0.48778886", "0.48398876", "0...
0.78515923
1
Sets the accessPackage property value. Access package containing this policy. Readonly. Supports $expand.
def access_package=(value) @access_package = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def access_packages=(value)\n @access_packages = value\n end", "def access_packages=(value)\n @access_packages = value\n end", "def access_package_assignment_approvals=(value)\n @access_package_assignment_approvals = value\n end", ...
[ "0.72447586", "0.72447586", "0.64238185", "0.5963689", "0.5963689", "0.56943214", "0.54830503", "0.5214372", "0.5178155", "0.5079735", "0.4995955", "0.49955738", "0.4914539", "0.4914539", "0.48534617", "0.48534617", "0.48534617", "0.48534617", "0.48534617", "0.48534617", "0.4...
0.8118019
1
Gets the allowedTargetScope property value. Principals that can be assigned the access package through this policy. The possible values are: notSpecified, specificDirectoryUsers, specificConnectedOrganizationUsers, specificDirectoryServicePrincipals, allMemberUsers, allDirectoryUsers, allDirectoryServicePrincipals, allConfiguredConnectedOrganizationUsers, allExternalUsers, unknownFutureValue.
def allowed_target_scope return @allowed_target_scope end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allowed_target_scope=(value)\n @allowed_target_scope = value\n end", "def policy_scope(target, options={})\n policy(target, options).scope\n end", "def specific_allowed_targets\n return @specific_allowed_targets\n end", "def authorization_scope_type...
[ "0.7413168", "0.565327", "0.5066602", "0.49834818", "0.48791662", "0.4832463", "0.4775261", "0.46609005", "0.4629174", "0.46046853", "0.4589094", "0.45679033", "0.45487618", "0.45356905", "0.4510491", "0.45086253", "0.44844607", "0.44803149", "0.44548732", "0.4438318", "0.441...
0.7646298
0
Sets the allowedTargetScope property value. Principals that can be assigned the access package through this policy. The possible values are: notSpecified, specificDirectoryUsers, specificConnectedOrganizationUsers, specificDirectoryServicePrincipals, allMemberUsers, allDirectoryUsers, allDirectoryServicePrincipals, allConfiguredConnectedOrganizationUsers, allExternalUsers, unknownFutureValue.
def allowed_target_scope=(value) @allowed_target_scope = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allowed_target_scope\n return @allowed_target_scope\n end", "def policy_scope(target, options={})\n policy(target, options).scope\n end", "def apply_scopes_if_available(target_object) #:nodoc:\n respond_to?(:apply_scopes, true) ? apply_scopes(target_object) : target_obj...
[ "0.70541763", "0.57116973", "0.55637753", "0.55198485", "0.51172066", "0.5087534", "0.5087534", "0.5087534", "0.5087534", "0.5087534", "0.5087534", "0.4944643", "0.48839843", "0.48804262", "0.48154005", "0.48098823", "0.48083642", "0.4790291", "0.47869527", "0.47424296", "0.4...
0.8244284
0
Gets the automaticRequestSettings property value. This property is only present for an auto assignment policy; if absent, this is a requestbased policy.
def automatic_request_settings return @automatic_request_settings end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def automatic_request_settings=(value)\n @automatic_request_settings = value\n end", "def automatic_user_consent_settings\n return @automatic_user_consent_settings\n end", "def request_approval_settings\n return @request_approval_settings\n ...
[ "0.77007043", "0.63104504", "0.6288458", "0.62032455", "0.6085594", "0.59338486", "0.5910752", "0.5715669", "0.551615", "0.5428545", "0.53918755", "0.5382438", "0.5346777", "0.53011143", "0.52262855", "0.512753", "0.5082034", "0.5025978", "0.49699062", "0.49638557", "0.496385...
0.83910197
0
Sets the automaticRequestSettings property value. This property is only present for an auto assignment policy; if absent, this is a requestbased policy.
def automatic_request_settings=(value) @automatic_request_settings = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def automatic_request_settings\n return @automatic_request_settings\n end", "def automatic_user_consent_settings=(value)\n @automatic_user_consent_settings = value\n end", "def automatic_replies_setting=(value)\n @automatic_replies_setting = va...
[ "0.67025477", "0.6361373", "0.61569047", "0.60746825", "0.5946907", "0.5942239", "0.5506444", "0.5435651", "0.53962266", "0.5353729", "0.5124269", "0.5030916", "0.4955568", "0.491338", "0.48835823", "0.48016283", "0.47961512", "0.47801524", "0.4768167", "0.47270432", "0.47060...
0.858434
0
Gets the catalog property value. Catalog of the access package containing this policy. Readonly.
def catalog return @catalog end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def catalog=(value)\n @catalog = value\n end", "def catalogs\n return @catalogs\n end", "def catalog_type\n return @catalog_type\n end", "def catalog\n puts \"library.catalog\"\n ap self.inspect\n end", "def cata...
[ "0.6886362", "0.6348108", "0.62530214", "0.60943", "0.59707475", "0.5828219", "0.5828219", "0.54213417", "0.54213417", "0.5409492", "0.5382642", "0.53472424", "0.5221966", "0.52041954", "0.51092523", "0.50759554", "0.50553364", "0.5006224", "0.500295", "0.500295", "0.49893075...
0.7106348
0
Sets the catalog property value. Catalog of the access package containing this policy. Readonly.
def catalog=(value) @catalog = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def catalogs=(value)\n @catalogs = value\n end", "def set_catalog\n @catalog = Catalog.find(params[:catalog_id])\n end", "def set_catalog\n @catalog = Catalog.find(params[:id])\n end", "def set_catalog\n @catalog = Catalog.find(params[:id])\n end", "def set...
[ "0.6936077", "0.6475803", "0.642271", "0.642271", "0.63700366", "0.62222606", "0.6049683", "0.6042137", "0.6035421", "0.60003555", "0.5932964", "0.5802521", "0.57066476", "0.56293386", "0.549607", "0.549607", "0.53815085", "0.53324425", "0.53214383", "0.53214383", "0.5292925"...
0.7956617
0
Instantiates a new accessPackageAssignmentPolicy and sets the default values.
def initialize() super end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def access_package_assignment_approvals=(value)\n @access_package_assignment_approvals = value\n end", "def initialize()\n super\n @odata_type = \"#microsoft.graph.accessPackageAssignmentRequestCallbackData\"\n end", "def initialize()\n ...
[ "0.58405685", "0.54143614", "0.5349691", "0.51495117", "0.5117663", "0.5052705", "0.5052705", "0.49925572", "0.49772665", "0.4971401", "0.49572372", "0.49499866", "0.48783353", "0.48748434", "0.4850951", "0.48505026", "0.4849028", "0.47583708", "0.47583708", "0.47526658", "0....
0.0
-1
Gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 20140101T00:00:00Z.
def created_date_time return @created_date_time end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def created_date_time\n return @created_date_time\n end", "def created_date_time_utc\n return @created_date_time_utc\n end", "def created_at_timestamp\n Time.now.gmtime.strftime(\"%Y-%m-%dT%H:%M:%S.000Z\")\n end", "def created_at\n object.created_...
[ "0.76272273", "0.76265085", "0.7532412", "0.74704045", "0.74165946", "0.73928446", "0.7339381", "0.7339381", "0.73193115", "0.7318634", "0.7236681", "0.72077763", "0.71915287", "0.71701336", "0.71701336", "0.71543235", "0.71228206", "0.711236", "0.7109479", "0.7109479", "0.71...
0.7655505
22
Sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 20140101T00:00:00Z.
def created_date_time=(value) @created_date_time = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def created_date_time=(createdDateTime)\n @created_date_time = createdDateTime\n end", "def created_date_time_utc=(value)\n @created_date_time_utc = value\n end", "def created_at=(value)\n @created_at = DateTime.parse(value)\n end", "def create_timestamp\n...
[ "0.7832844", "0.75716174", "0.7211164", "0.7008633", "0.7008577", "0.69466174", "0.6885678", "0.6842985", "0.6798755", "0.6798755", "0.6562056", "0.6528289", "0.64378583", "0.6410297", "0.64069414", "0.64009416", "0.64008987", "0.64008987", "0.64008987", "0.64008987", "0.6400...
0.77042735
27
Gets the customExtensionStageSettings property value. The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand.
def custom_extension_stage_settings return @custom_extension_stage_settings end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def custom_extension_stage_settings=(value)\n @custom_extension_stage_settings = value\n end", "def custom_workflow_extensions\n return @custom_workflow_extensions\n end", "def custom_extension_stage_instance_detail\n return @custom_extension_s...
[ "0.71281826", "0.57687587", "0.5696145", "0.565536", "0.55297357", "0.5125914", "0.50607264", "0.49756873", "0.49669826", "0.48470446", "0.47110742", "0.46430245", "0.46310404", "0.4630035", "0.4630035", "0.4630035", "0.4608793", "0.45643523", "0.45600885", "0.45335364", "0.4...
0.80594397
0
Sets the customExtensionStageSettings property value. The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand.
def custom_extension_stage_settings=(value) @custom_extension_stage_settings = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def custom_extension_stage_settings\n return @custom_extension_stage_settings\n end", "def custom_workflow_extensions=(value)\n @custom_workflow_extensions = value\n end", "def custom_extension_stage_instance_id=(value)\n @custom_extension_stag...
[ "0.66998315", "0.638794", "0.5124113", "0.49520212", "0.49162185", "0.49162185", "0.49162185", "0.4872088", "0.48630068", "0.47883472", "0.4732849", "0.47153306", "0.4654839", "0.459281", "0.45498553", "0.45368066", "0.45260113", "0.4497987", "0.44833574", "0.44431505", "0.44...
0.7716308
0
Gets the description property value. The description of the policy.
def description return @description end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getDescription\r\n\t\t\t\t\treturn @description\r\n\t\t\t\tend", "def getDescription\r\n\t\t\t\t\treturn @description\r\n\t\t\t\tend", "def description\n if description_attribute = read_attribute(:description)\n description_attribute\n elsif self.properties && self.properties['description'].pres...
[ "0.698134", "0.698134", "0.6958347", "0.6817909", "0.68166465", "0.6809939", "0.6809939", "0.6789236", "0.6746046", "0.6713045", "0.669974", "0.66996324", "0.66929543", "0.66846997", "0.6673129", "0.66172", "0.6616292", "0.6616292", "0.6608105", "0.65947056", "0.6592915", "...
0.6816497
30
Sets the description property value. The description of the policy.
def description=(value) @description = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_description(description)\n @description = description\n end", "def description=(v)\n @description = v\n end", "def description=(val)\n self[:description] = val\n end", "def set_Description(value)\n set_input(\"Description\", value)\n end", "def description=(description)\r\n\...
[ "0.77531284", "0.768677", "0.7603899", "0.75766456", "0.7522513", "0.74895763", "0.74895763", "0.7419362", "0.7419362", "0.7419362", "0.7419362", "0.7419362", "0.7419362", "0.7419362", "0.7419362", "0.7419362", "0.7419362", "0.7419362", "0.7419362", "0.7371698", "0.7371698", ...
0.78570503
26
Gets the displayName property value. The display name of the policy.
def display_name return @display_name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def display_name\n @json['profile']['displayName'] rescue nil\n end", "def display_name\n display_name = @current_profile.display_name\n end", "def displayName\n dn = @params['dn']\n if dn\n dn.first\n else\n nil\n end\n end", "def displayname\n\t\tre...
[ "0.73184764", "0.7052022", "0.6919979", "0.6858783", "0.6791015", "0.6768598", "0.6767899", "0.67322254", "0.67270195", "0.66979605", "0.6536299", "0.65226734", "0.6521708", "0.65132606", "0.64976954", "0.6497359", "0.6465976", "0.64159524", "0.6389303", "0.6389303", "0.63829...
0.6839063
41
Sets the displayName property value. The display name of the policy.
def display_name=(value) @display_name = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def display_name=(value)\n @display_name = value\n end", "def display_name=(value)\n @display_name = value\n end", "def display_name=(name)\n @display_name ||= name\n end", "def name=(display_name)\r\n...
[ "0.65919954", "0.65173674", "0.6494671", "0.64806557", "0.64693636", "0.6284536", "0.62765074", "0.62765074", "0.62765074", "0.61743957", "0.602441", "0.59815884", "0.59815884", "0.59177375", "0.5908129", "0.5845729", "0.5726239", "0.5726239", "0.5698761", "0.5687587", "0.568...
0.6656481
38
Gets the expiration property value. The expiration date for assignments created in this policy.
def expiration return @expiration end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def expiration=(value)\n @expiration = value\n end", "def expiration_date_time\n return @expiration_date_time\n end", "def expiration_date_time\n return @expiration_date_time\n end", "def expiration_date_time\n retur...
[ "0.7475697", "0.74282974", "0.74282974", "0.74282974", "0.74282974", "0.74282974", "0.74282974", "0.7268263", "0.721422", "0.7117366", "0.7078226", "0.694817", "0.69333786", "0.6890828", "0.68806505", "0.6843641", "0.6827719", "0.6826211", "0.6826211", "0.6826211", "0.6823118...
0.7590961
0
Sets the expiration property value. The expiration date for assignments created in this policy.
def expiration=(value) @expiration = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def expiration=(expiration_date)\n unless self.new_record?\n logger.warn(\"Attempted to set expiration on existing record: access_token id=#{self.id}. Update ignored\")\n return\n end\n super(expiration_date)\n\n self.expired = expiration_date.nil? || (expiration_date == '') || expiration_dat...
[ "0.7450147", "0.7269094", "0.7269094", "0.7269094", "0.7269094", "0.7269094", "0.7269094", "0.71587944", "0.71504253", "0.7139623", "0.7079358", "0.70657253", "0.70072144", "0.6945491", "0.6865402", "0.6853953", "0.68402207", "0.6744601", "0.67100227", "0.66930974", "0.668508...
0.8418747
0
The deserialization information for the current model
def get_field_deserializers() return super.merge({ "accessPackage" => lambda {|n| @access_package = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackage.create_from_discriminator_value(pn) }) }, "allowedTargetScope" => lambda {|n| @allowed_target_scope = n.get_enum_value(MicrosoftGraph::Models::AllowedTargetScope) }, "automaticRequestSettings" => lambda {|n| @automatic_request_settings = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageAutomaticRequestSettings.create_from_discriminator_value(pn) }) }, "catalog" => lambda {|n| @catalog = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageCatalog.create_from_discriminator_value(pn) }) }, "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() }, "customExtensionStageSettings" => lambda {|n| @custom_extension_stage_settings = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::CustomExtensionStageSetting.create_from_discriminator_value(pn) }) }, "description" => lambda {|n| @description = n.get_string_value() }, "displayName" => lambda {|n| @display_name = n.get_string_value() }, "expiration" => lambda {|n| @expiration = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ExpirationPattern.create_from_discriminator_value(pn) }) }, "modifiedDateTime" => lambda {|n| @modified_date_time = n.get_date_time_value() }, "questions" => lambda {|n| @questions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AccessPackageQuestion.create_from_discriminator_value(pn) }) }, "requestApprovalSettings" => lambda {|n| @request_approval_settings = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageAssignmentApprovalSettings.create_from_discriminator_value(pn) }) }, "requestorSettings" => lambda {|n| @requestor_settings = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageAssignmentRequestorSettings.create_from_discriminator_value(pn) }) }, "reviewSettings" => lambda {|n| @review_settings = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageAssignmentReviewSettings.create_from_discriminator_value(pn) }) }, "specificAllowedTargets" => lambda {|n| @specific_allowed_targets = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::SubjectSet.create_from_discriminator_value(pn) }) }, }) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deserialized\n @deserialized ||= @serializer.deserialize @serialized_object\n end", "def get_field_deserializers()\n return super.merge({\n \"detectionStatus\" => lambda {|n| @detection_status = n.get_enum_value(MicrosoftGraph::Models::SecurityDetectionStatus) },...
[ "0.6510734", "0.63224316", "0.6322254", "0.63094735", "0.62954384", "0.6238735", "0.6232461", "0.62155676", "0.6200175", "0.6199403", "0.6173917", "0.61733985", "0.61705345", "0.61631054", "0.61620396", "0.6158031", "0.6156071", "0.6142402", "0.613998", "0.6138061", "0.612005...
0.0
-1
Gets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 20140101T00:00:00Z.
def modified_date_time return @modified_date_time end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def modified_at\n @photo.updated.to_datetime.utc\n end", "def last_modified_date_time\n return @last_modified_date_time\n end", "def last_modified_date_time\n return @last_modified_date_time\n end", "def last_modified_date_time\n return @...
[ "0.7203478", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.717537", "0.71723247", "0.7141531", "0.69719416", "0.6924966", "0.6844074", "0.6844074", "0.6844074", ...
0.7697877
1
Sets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 20140101T00:00:00Z.
def modified_date_time=(value) @modified_date_time = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def last_modified_date_time=(value)\n @last_modified_date_time = value\n end", "def last_modified_date_time=(value)\n @last_modified_date_time = value\n end", "def last_modified_date_time=(value)\n @last_modified_date_time = value\n ...
[ "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.7118067", "0.700718", "0.66480327", "0.66480327", "0.65516776", "0.65516776", "0.65516776", "0.65422887"...
0.7798356
1
Gets the questions property value. Questions that are posed to the requestor.
def questions return @questions end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def questions=(value)\n @questions = value\n end", "def questions\n @root.questions\n end", "def questions\n @_questions ||= fetch_questions\n end", "def questions\r\n return @questions \r\nend", "def question\n self.question\n end", "def answers\n ...
[ "0.7430519", "0.66309375", "0.6624312", "0.6539379", "0.64167684", "0.64119095", "0.63117385", "0.6229876", "0.6224637", "0.62125176", "0.6156245", "0.6155125", "0.6134332", "0.61029404", "0.60241115", "0.59530973", "0.5914879", "0.58562684", "0.58282465", "0.58282465", "0.58...
0.7675316
0
Sets the questions property value. Questions that are posed to the requestor.
def questions=(value) @questions = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def answers=(value)\n @answers = value\n end", "def question=(value)\n @children['question'][:value] = value\n end", "def question=(value)\n @children['question'][:value] = value\n end", "def set_question\n @question = Question.find(params[\"ques...
[ "0.70386976", "0.7014029", "0.7014029", "0.6030558", "0.5925973", "0.5925973", "0.5925973", "0.59027964", "0.5902654", "0.58851177", "0.58496267", "0.58392197", "0.5828103", "0.58253294", "0.5820249", "0.5820249", "0.5820249", "0.5820249", "0.5820249", "0.5820249", "0.5820249...
0.8678519
0
Gets the requestApprovalSettings property value. Specifies the settings for approval of requests for an access package assignment through this policy. For example, if approval is required for new requests.
def request_approval_settings return @request_approval_settings end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def request_approval_settings=(value)\n @request_approval_settings = value\n end", "def get_access_approval_settings request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body ...
[ "0.8051811", "0.69303685", "0.6435635", "0.63760555", "0.6246672", "0.5903661", "0.5872205", "0.5865275", "0.58333534", "0.5704713", "0.56319773", "0.5566952", "0.55030644", "0.54560083", "0.53921473", "0.5290603", "0.5276922", "0.52046865", "0.5179562", "0.5135223", "0.51351...
0.78985685
1
Sets the requestApprovalSettings property value. Specifies the settings for approval of requests for an access package assignment through this policy. For example, if approval is required for new requests.
def request_approval_settings=(value) @request_approval_settings = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_access_approval_settings 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_update_access_approval_settings_request request_pb\n query_string_para...
[ "0.6657894", "0.6259991", "0.61092204", "0.5946931", "0.59429383", "0.59375066", "0.5823624", "0.5560329", "0.53794026", "0.5348856", "0.5246192", "0.5225701", "0.5221783", "0.5109287", "0.50910115", "0.5072751", "0.50519526", "0.5020044", "0.49376327", "0.49360403", "0.49353...
0.8034666
0
Gets the requestorSettings property value. Provides additional settings to select who can create a request for an access package assignment through this policy, and what they can include in their request.
def requestor_settings return @requestor_settings end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def requestor_settings=(value)\n @requestor_settings = value\n end", "def request_approval_settings\n return @request_approval_settings\n end", "def request_approval_settings=(value)\n @request_approval_settings = value\n end", "de...
[ "0.8177266", "0.69143474", "0.656335", "0.64698523", "0.63895756", "0.63207036", "0.600975", "0.5777073", "0.5724139", "0.5673334", "0.5620587", "0.5620587", "0.5609717", "0.560598", "0.5570528", "0.5570528", "0.55498683", "0.5526068", "0.5526068", "0.549345", "0.5478358", ...
0.8397786
0
Sets the requestorSettings property value. Provides additional settings to select who can create a request for an access package assignment through this policy, and what they can include in their request.
def requestor_settings=(value) @requestor_settings = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def requestor=(value)\n @requestor = value\n end", "def requestor_settings\n return @requestor_settings\n end", "def request_approval_settings=(value)\n @request_approval_settings = value\n end", "def automatic_request_settings=(va...
[ "0.69491047", "0.6694846", "0.66472524", "0.5910212", "0.56414366", "0.5528489", "0.54736614", "0.5290751", "0.5210239", "0.51855016", "0.51855016", "0.5182978", "0.5164257", "0.51500183", "0.5109502", "0.51059014", "0.5095363", "0.5013148", "0.5003357", "0.5002272", "0.49849...
0.8393434
0
Gets the reviewSettings property value. Settings for access reviews of assignments through this policy.
def review_settings return @review_settings end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def review_settings=(value)\n @review_settings = value\n end", "def get_review_generation_settings(account_id, v, opts = {})\n data, _status_code, _headers = get_review_generation_settings_with_http_info(account_id, v, opts)\n return data\n end", "def settings\n ...
[ "0.7144041", "0.56842154", "0.56083494", "0.56083494", "0.5601404", "0.5543098", "0.54984236", "0.54552794", "0.5412952", "0.5391258", "0.5359631", "0.5344572", "0.5322947", "0.53086245", "0.52901113", "0.5230328", "0.51592904", "0.51199985", "0.5083028", "0.5071174", "0.5059...
0.7801948
0
Sets the reviewSettings property value. Settings for access reviews of assignments through this policy.
def review_settings=(value) @review_settings = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def review_set=(value)\n @review_set = value\n end", "def update_review_generation_settings(account_id, v, review_generation_settings_request, opts = {})\n data, _status_code, _headers = update_review_generation_settings_with_http_info(account_id, v, review_generation_settings_requ...
[ "0.5615794", "0.5519889", "0.5505968", "0.53927994", "0.53927994", "0.53349066", "0.525815", "0.525815", "0.5209798", "0.51535475", "0.5094786", "0.5083746", "0.50653064", "0.50643164", "0.50643164", "0.50643164", "0.50643164", "0.50643164", "0.50643164", "0.50643164", "0.506...
0.7529697
0
Serializes information the current object
def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("accessPackage", @access_package) writer.write_enum_value("allowedTargetScope", @allowed_target_scope) writer.write_object_value("automaticRequestSettings", @automatic_request_settings) writer.write_object_value("catalog", @catalog) writer.write_date_time_value("createdDateTime", @created_date_time) writer.write_collection_of_object_values("customExtensionStageSettings", @custom_extension_stage_settings) writer.write_string_value("description", @description) writer.write_string_value("displayName", @display_name) writer.write_object_value("expiration", @expiration) writer.write_date_time_value("modifiedDateTime", @modified_date_time) writer.write_collection_of_object_values("questions", @questions) writer.write_object_value("requestApprovalSettings", @request_approval_settings) writer.write_object_value("requestorSettings", @requestor_settings) writer.write_object_value("reviewSettings", @review_settings) writer.write_collection_of_object_values("specificAllowedTargets", @specific_allowed_targets) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serialize\n end", "def serialize(object) end", "def serialize; end", "def serialize; end", "def serialize\n \n end", "def serialize\n raise NotImplementedError\n end", "def serialize\n raise NotImplementedError\n end", "def dump\r\n super + to_s\r\n end", ...
[ "0.7951372", "0.7645999", "0.7579812", "0.7579812", "0.7440032", "0.720861", "0.720861", "0.7207583", "0.7016516", "0.70007193", "0.6992252", "0.69838214", "0.69723576", "0.69666415", "0.69666415", "0.6942002", "0.69417155", "0.6933786", "0.6913977", "0.6891677", "0.68810964"...
0.6583964
56
Gets the specificAllowedTargets property value. The principals that can be assigned access from an access package through this policy.
def specific_allowed_targets return @specific_allowed_targets end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def specific_allowed_targets=(value)\n @specific_allowed_targets = value\n end", "def allowed_target_scope\n return @allowed_target_scope\n end", "def query_target_permission_set\n @attributes[:query_target_permission_set]\n end", "def query_target_...
[ "0.6294513", "0.5980861", "0.55531824", "0.5541049", "0.5178076", "0.50905323", "0.5085866", "0.5082821", "0.5082263", "0.5048445", "0.50375015", "0.50342625", "0.5008593", "0.49651688", "0.49140137", "0.49022925", "0.49022925", "0.48880875", "0.48801762", "0.48367324", "0.48...
0.7193956
0
Sets the specificAllowedTargets property value. The principals that can be assigned access from an access package through this policy.
def specific_allowed_targets=(value) @specific_allowed_targets = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def specific_allowed_targets\n return @specific_allowed_targets\n end", "def allowed_target_scope=(value)\n @allowed_target_scope = value\n end", "def target_objects=(value)\n @target_objects = value\n end", "def target_objects=(va...
[ "0.5994857", "0.54671526", "0.51062584", "0.51062584", "0.49750328", "0.49081966", "0.49081966", "0.48718238", "0.48024967", "0.4786071", "0.47721398", "0.47691765", "0.47506768", "0.4747814", "0.47474512", "0.47301874", "0.47243786", "0.47059035", "0.46632898", "0.4642823", ...
0.7185911
0
MATCH_TYPE = 0 > GROUP MAIN MATCH_TYPE = 1 > GROUP USERS MATCH_TYPE = 2 > Round of 16, AND CONTINUES FOR: Quarterfinals, Semifinals, Thirdplace playoff, Final
def initialize(attributes = {}) super # must allow the active record to initialize! attributes.each do |name, value| send("#{name}=", value) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_match_results(match)\n if match[0][1] == match[1][1]\n team1 = @teams.find { |team| team.name == match[0][0] }\n team2 = @teams.find { |team| team.name == match[1][0] }\n\n team1.score += 1\n team2.score += 1\n else\n winner = match.max_by { |x| x[1] }\n losser = match.m...
[ "0.58446586", "0.5720351", "0.5530426", "0.55074364", "0.54681623", "0.54631764", "0.5438794", "0.541265", "0.5382414", "0.5326293", "0.53257143", "0.5310903", "0.530656", "0.52929443", "0.526646", "0.5230194", "0.5223697", "0.52056074", "0.5199249", "0.5183336", "0.51742774"...
0.0
-1
GET /roles/new GET /roles/new.json
def edit; end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @role = Role.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @role }\n end\n end", "def new\n @role = Role.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @role }\n end\n end", "d...
[ "0.8056065", "0.8056065", "0.8056065", "0.8047554", "0.7925329", "0.7899501", "0.75905114", "0.7552672", "0.75305", "0.7404623", "0.73878103", "0.73797524", "0.73708034", "0.73708034", "0.73668516", "0.73646253", "0.73598355", "0.73466617", "0.73466617", "0.73466617", "0.7346...
0.0
-1
POST /roles POST /roles.json
def create @role = Role.new role_params authorize @role flash.now[:notice] = 'Role was successfully created.' if @role.save respond_with @role end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post_role(role)\n role = {\n \"id\"=>nil,\n \"name\"=>nil, \n \"description\"=>\"\", \n \"sessionTimeout\"=>\"60\",\n \"roles\"=>[],\n \"privileges\"=>[]\n }.merge(role);\n post(\"#{url_base}/roles\", {\"data\"=>role})[\"data\"]\n end", "def CreateRole params = {}\n ...
[ "0.75822115", "0.74311465", "0.7038971", "0.70284665", "0.69493437", "0.6907223", "0.68323594", "0.67238265", "0.66556704", "0.665271", "0.665271", "0.665271", "0.6631873", "0.66185933", "0.66181964", "0.6614256", "0.6601928", "0.6589104", "0.65649295", "0.6543354", "0.653102...
0.6567332
18
PUT /roles/1 PUT /roles/1.json
def update flash.now[:notice] = 'Role was successfully updated.' if @role.update role_params respond_with @role end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def edit_role(id, *roles)\n request(:put, \"/users/#{id}.json\", default_params(:role_ids => roles))\n end", "def UpdateRole params = {}\n \n APICall(path: 'custom_roles.json',method: 'PUT',payload: params.to_json)\n \n end", "def update\n @role = Role.find(params[:id])\n ...
[ "0.73883325", "0.7328734", "0.71556437", "0.7143024", "0.7127945", "0.7085617", "0.69865286", "0.6953493", "0.6936841", "0.69317037", "0.6862839", "0.68599266", "0.6855699", "0.6850963", "0.6815799", "0.68097216", "0.680326", "0.67881626", "0.6777378", "0.6759132", "0.6751851...
0.6666523
29
DELETE /roles/1 DELETE /roles/1.json
def destroy @role.destroy respond_with @role, location: roles_path end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @role = Role.find(params[:id])\n @role.destroy\n \n respond_to do |format|\n format.html { redirect_to roles_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @role = Role.find(params[:id])\n @role.destroy\n\n respond_to do |format|\n format...
[ "0.7583307", "0.7525977", "0.7523992", "0.75092655", "0.74943435", "0.7418692", "0.738887", "0.73744464", "0.73679906", "0.7358079", "0.731516", "0.72902375", "0.72487247", "0.72487247", "0.72487247", "0.72487247", "0.72487247", "0.72487247", "0.723153", "0.7230734", "0.72307...
0.7123388
31
city_openings method should return all of the Listing objects that are available for the entire span that is inputted.
def city_openings(start_date, end_date) openings(start_date, end_date) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def city_openings(start, ending)\n open_listing = []\n self.listings.each do |listing|\n if listing.available?(start, ending)\n open_listing << listing\n end\n end\n open_listing\n end", "def city_openings(start_date, end_date)\n Listing.find_openings(listings, Date.parse(start_d...
[ "0.8479127", "0.7820051", "0.7524856", "0.7275265", "0.71083397", "0.69790506", "0.6872821", "0.686067", "0.6389673", "0.6239188", "0.6239188", "0.6239188", "0.6177185", "0.61128414", "0.6068961", "0.59632224", "0.595275", "0.5926947", "0.58495796", "0.58319724", "0.5754025",...
0.7213858
4
pins that are dropped
def dropped_pins location = Location.new location.name = params[:locations][:name] location.description = "" location.user_id = @current_user.id location.trip_id = params[:locations][:trip_id] location.coordinates = [params[:locations][:pin][1].to_f, params[:locations][:pin][0].to_f] location.save! @redirect = "/trips/#{params[:locations][:trip_id]}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def drops\n @drops\n end", "def disconnect\n @pins.each { |n, p| p.close } if @pins\n @pins = {}\n super\n end", "def pin_clear\n @pinmap.each { |pin_name, pin| pin.destroy }\n @pinmap.clear\n @patternpinindex.clear\n @patternorder.delete_if { true ...
[ "0.61977303", "0.607159", "0.5801572", "0.5566668", "0.5502558", "0.5485826", "0.5485507", "0.5428434", "0.53852636", "0.53320086", "0.53207254", "0.5316393", "0.52836984", "0.5243039", "0.52288467", "0.52195853", "0.52174443", "0.5215813", "0.5212699", "0.5180796", "0.517159...
0.6105408
1
TL;DR: adds data layers between existing base layers. Stacks data layer on top of the last data layer and/or the first base layer found, and keeps any existing "top" base layers on top.
def copy_data_layers(origin_map, destination_map, user) last_data = destination_map.layers.reverse.find(&:data_layer?) order = if last_data last_data.order + 1 else first_base = destination_map.layers.find(&:base_layer?) first_base ? (first_base.order + 1) : 0 end modified_layers = [] data_layer_copies_from(origin_map, user).map do |layer| # Push layers on top if needed if(destination_map.layers.map(&:order).include?(order)) destination_map.layers.select { |l| l.order >= order }.each do |layer| layer.order += 1 # layer must be saved later modified_layers << layer end end layer.order = order link(destination_map, layer) # link saves modified_layers -= [layer] order += 1 end # this avoid extra saving (including validation) overhead modified_layers.uniq.map(&:save) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def non_basemap_base_layers_for(visualization)\n base_layers = visualization.layers(:base)\n if base_layers.length > 0\n # Remove the basemap, which is always first\n base_layers.slice(1, visualization.layers(:base).length)\n .map do |layer|\n CartoDB:...
[ "0.5955297", "0.5563202", "0.5553294", "0.55439633", "0.53566885", "0.53262013", "0.5261436", "0.52387744", "0.5215683", "0.5156324", "0.51273966", "0.5114609", "0.5104246", "0.50616765", "0.50574696", "0.50460875", "0.50376344", "0.5034433", "0.49607298", "0.49291694", "0.49...
0.5765683
1
Adds or updates the monit configs for the worker and notifies monit to reload the configuration. rubocop:disable Metrics/AbcSize
def add_worker_monit opts = { adapter: adapter, app_shortname: app['shortname'], application: app['shortname'], deploy_to: deploy_dir(app), environment: embed_environment_in_monit? ? environment : { 'RAILS_ENV' => deploy_env }, name: app['name'], out: out, source_cookbook: worker_monit_template_cookbook } context.template File.join(node['monit']['basedir'], "#{opts[:adapter]}_#{opts[:application]}.monitrc") do mode '0640' source "#{opts[:adapter]}.monitrc.erb" cookbook opts[:source_cookbook].to_s variables opts notifies :run, 'execute[monit reload]', :immediately end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_config(watchers)\n # if we support updating backends, try that whenever possible\n if @opts['do_socket']\n update_backends(watchers)\n else\n @restart_required = true\n end\n \n # generate new config\n new_config = generate_config(watchers)\n new_con...
[ "0.68938214", "0.68346053", "0.6185509", "0.6185509", "0.57673967", "0.57658094", "0.5631432", "0.56131184", "0.5587085", "0.5576688", "0.54665625", "0.5446035", "0.54038054", "0.5391812", "0.53782654", "0.5361005", "0.53486735", "0.5347836", "0.5334686", "0.53193", "0.531794...
0.68176603
2
Use callbacks to share common setup or constraints between actions.
def set_battle_equip @battle_equip = BattleEquip.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576"...
0.0
-1
Only allow a trusted parameter "white list" through.
def battle_equip_params params.require(:battle_equip).permit(:result_no, :generate_no, :e_no, :battle_id, :equip_no, :name, :kind_id, :strength, :range, :effect_1_id, :effect_1_value, :effect_2_id, :effect_2_value, :effect_3_id, :effect_3_value) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allowed_params\n ALLOWED_PARAMS\n end", "def expected_permitted_parameter_names; end", "def param_whitelist\n [:role, :title]\n end", "def default_param_whitelist\n [\"mode\"]\n end", "def permitir_parametros\n \t\tparams.permit!\n \tend", "def permitted_params\n []\n end", ...
[ "0.7121987", "0.70541996", "0.69483954", "0.6902367", "0.6733912", "0.6717838", "0.6687021", "0.6676254", "0.66612333", "0.6555296", "0.6527056", "0.6456324", "0.6450841", "0.6450127", "0.6447226", "0.6434961", "0.64121825", "0.64121825", "0.63913447", "0.63804525", "0.638045...
0.0
-1
Public: Getter. Gets a board, based on a board id.
def board @board = Trello::Board.find(@board_id) if @board == nil @board end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def board(board_id)\n Trello::Board.find(board_id)\n rescue\n nil\n end", "def board(project, id)\n get(\"/projects/#{url_encode project}/boards/#{id}\")\n end", "def board\n @board ||= Board.find(params[:id])\n end", "def get_board\n\t\t@board = Trello::Board.find(\"558b0e12f2e6f...
[ "0.84047884", "0.78707016", "0.78107667", "0.76624876", "0.74019647", "0.7103031", "0.69706297", "0.69036275", "0.66743654", "0.6664911", "0.66523695", "0.6615083", "0.6591346", "0.6569949", "0.6549826", "0.6537826", "0.65376747", "0.65361816", "0.65361816", "0.65361816", "0....
0.78607106
2
Public: Getter. Gets all activities for a given board.
def activities return @activities if @activities != nil && @activities.length > 0 @activities = [] self.board.cards.each do |card| card.actions.each do |action| member = Trello::Member.find(action.member_creator_id) action_record = {action: action, member: member} activity = (Parser.new(action_record, @prefix)).parse @activities.push(activity) unless activity == nil end end @activities end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def activities\n return @activities\n end", "def all_activities\n t = PublicActivity::Activity.arel_table\n PublicActivity::Activity.where(\n t[:trackable_id].eq(id).and(t[:trackable_type].eq(Classroom.to_s)).or(\n t[:recipient_i...
[ "0.692477", "0.6535767", "0.6513734", "0.6493531", "0.6484644", "0.6429408", "0.6264161", "0.6185259", "0.6172574", "0.6142869", "0.6103", "0.59649736", "0.5931967", "0.5920747", "0.591234", "0.5886356", "0.5856966", "0.58530396", "0.58500516", "0.58106", "0.5809421", "0.57...
0.75982445
0
GET /role_funcions GET /role_funcions.json
def index @roles = Role.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def role_funcion_params\n params.require(:role_funcion).permit(:role_id, :funcion_id, :funcions)\n end", "def set_role_funcion\n @role_funcion = RoleFuncion.find(params[:id])\n end", "def index\n authorize Role\n\n respond_to do |format|\n format.json { render json: @roles }\n end...
[ "0.66701525", "0.6664875", "0.64303726", "0.63389546", "0.6207894", "0.6207894", "0.61964047", "0.6125827", "0.6070715", "0.6011716", "0.5949966", "0.59381723", "0.5912842", "0.5912062", "0.5911692", "0.5909983", "0.5909983", "0.5851212", "0.5842832", "0.58245695", "0.5823993...
0.5490524
54
GET /role_funcions/1 GET /role_funcions/1.json
def show end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_role_funcion\n @role_funcion = RoleFuncion.find(params[:id])\n end", "def getRole\n @users = User.where(\"role = ?\", params[:role]).NameOrder\n render json: @users\n end", "def index\n authorize Role\n\n respond_to do |format|\n format.json { render json: @roles }\n end\n ...
[ "0.6922573", "0.65405387", "0.65224504", "0.65093327", "0.62409645", "0.62395716", "0.61759853", "0.6150717", "0.61247134", "0.6076954", "0.5993305", "0.59794", "0.59665895", "0.5933133", "0.5933133", "0.5916117", "0.59039223", "0.5895515", "0.5895515", "0.58860976", "0.58860...
0.0
-1
POST /role_funcions POST /role_funcions.json
def create @role_funcion = RoleFuncion.new(role_funcion_params) respond_to do |format| if @role_funcion.save format.html { redirect_to @role_funcion } format.json { render action: 'show', status: :created, location: @role_funcion } else format.html { render action: 'new' } format.json { render json: @role_funcion.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def role_funcion_params\n params.require(:role_funcion).permit(:role_id, :funcion_id, :funcions)\n end", "def create\n abilities = []\n client_application = current_user.client_application_id.to_s\n @abilities = Role.get_method_names.sort\n @role = Role.new(role_params)\n params[:role][:ro...
[ "0.74267626", "0.65071577", "0.6487636", "0.62072855", "0.6137399", "0.6070119", "0.6011283", "0.5988191", "0.5950294", "0.5867114", "0.5830203", "0.5821593", "0.5800196", "0.57921594", "0.5776231", "0.5707571", "0.56972575", "0.56824195", "0.5676192", "0.5632752", "0.5618535...
0.7447437
0
PATCH/PUT /role_funcions/1 PATCH/PUT /role_funcions/1.json
def update respond_to do |format| if @role_funcion.update(role_funcion_params) format.html { redirect_to @role_funcion } format.json { head :no_content } else format.html { render action: 'edit' } format.json { render json: @role_funcion.errors, status: :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def UpdateRole params = {}\n \n APICall(path: 'custom_roles.json',method: 'PUT',payload: params.to_json)\n \n end", "def update\n if !grant_access(\"alter_roles\", current_user)\n head(403)\n end\n @role.user_id = current_user.id\n @role.start_point = false if !params[:...
[ "0.690492", "0.68374765", "0.6813389", "0.66920257", "0.6645745", "0.66119397", "0.66000706", "0.6543117", "0.6520068", "0.6509679", "0.6497725", "0.64884764", "0.64763564", "0.6427757", "0.6395278", "0.6389816", "0.63856095", "0.63725626", "0.6365653", "0.6365653", "0.636416...
0.7766647
0
DELETE /role_funcions/1 DELETE /role_funcions/1.json
def destroy @role_funcion.destroy respond_to do |format| format.html { redirect_to role_funcions_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @role.destroy\n respond_to do |format|\n format.html { redirect_to dashboard_path }\n format.json { head :no_content }\n end\n end", "def DeleteRole id\n \n APICall(path: \"custom_roles/#{id}.json\",method: 'DELETE')\n \n end", "def destroy\n @role...
[ "0.7129084", "0.70189804", "0.7010891", "0.7004442", "0.69502735", "0.69491225", "0.6949014", "0.69430315", "0.69271135", "0.69168305", "0.6910375", "0.6874708", "0.68575794", "0.6843911", "0.68059534", "0.68025565", "0.68025565", "0.68025565", "0.68025565", "0.68025565", "0....
0.796886
0
Use callbacks to share common setup or constraints between actions.
def set_role_funcion @role_funcion = RoleFuncion.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576"...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def role_funcion_params params.require(:role_funcion).permit(:role_id, :funcion_id, :funcions) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.69792545", "0.6781151", "0.67419964", "0.674013", "0.6734356", "0.6591046", "0.6502396", "0.6496313", "0.6480641", "0.6477825", "0.64565", "0.6438387", "0.63791263", "0.63740575", "0.6364131", "0.63192815", "0.62991166", "0.62978333", "0.6292148", "0.6290449", "0.6290076",...
0.0
-1
Instance Methods ++ Gets the Atom feed URL for this tag.
def atom_url Config.site.url.chomp('/') + R(TagController, :atom, CGI.escape(name)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def feed_url\n # Check attributes\n if @site.config[:base_url].nil?\n raise RuntimeError.new('Cannot build Atom feed: site configuration has no base_url')\n end\n\n @item[:feed_url] || @site.config[:base_url] + @item.path\n end", "def feed_url\n blog_url + \"posts.atom\"\n e...
[ "0.8189752", "0.8045675", "0.80272216", "0.7354845", "0.73023635", "0.7296556", "0.69810784", "0.68862134", "0.682987", "0.6778568", "0.6778359", "0.6778359", "0.6641019", "0.662592", "0.6592789", "0.6582007", "0.65684175", "0.65267074", "0.65093833", "0.64482504", "0.6429633...
0.6345253
22
Gets published posts with this tag OR this tag's descendants
def posts(options={}) tags = self.self_and_descendants post_ids = Tagging.filter([[:tag_id, tags.collect(&:id)]]).select(:post_id).collect(&:post_id).uniq query = Post.filter([[:id, post_ids]]).filter(:is_draft => false).reverse_order(:created_at) if options[:non_sticky] && sticky = self.sticky_post query = query.filter("posts.id <> ?", sticky.id) end if options[:page] query = query.paginate(options[:page], options[:per_page] || 10) end query end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def posts\n Post.filter(:tag_id => self.tag_id)\n end", "def related_posts(posts)\n related = []\n return related unless posts.size > 1\n\n posts.each do |post|\n if post.categories == self.categories && post != self && post.date < self.date\n related << post\n end\n end\n\n r...
[ "0.70107466", "0.65423054", "0.64985144", "0.62661654", "0.6187279", "0.6146282", "0.60891026", "0.60037285", "0.5998329", "0.59940445", "0.59483457", "0.5932731", "0.5927019", "0.5925813", "0.592269", "0.58151984", "0.5809469", "0.57857776", "0.57148397", "0.5699944", "0.569...
0.62966603
3
Gets unpublished posts with this tag.
def drafts @drafts ||= posts_dataset.filter(:is_draft => true).reverse_order( :created_at) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unpublished_posts\n @blog_posts = BlogPost.where(:deleted => '0').where(:publish => \"0\").order('created_at DESC')\n end", "def uncategorized\n @posts = Refinery::Blog::Post.uncategorized.page(params[:page])\n end", "def get_unpublished_count\n @unpublished_posts = Post.where(:pub...
[ "0.7790635", "0.6904209", "0.68857396", "0.6801351", "0.6366795", "0.62834615", "0.6262135", "0.6210821", "0.61708796", "0.6092508", "0.6090917", "0.608085", "0.5914339", "0.59019935", "0.58835316", "0.5829606", "0.58235514", "0.58235514", "0.58235514", "0.58235514", "0.58235...
0.55608064
39
URL for this tag.
def url Config.site.url.chomp('/') + self.path end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def url\n File.join(*tag_path)\n end", "def url\n \"#{Rails.configuration.baseurl}#{tag_path(self)}\"\n end", "def tag_url(tag)\n \"/tags/#{tag}/\"\n end", "def url\n @url.to_s\n end", "def url\n uri.to_s\n end", "def url\n end", "def url\n ...
[ "0.85160387", "0.79829544", "0.78193897", "0.7657365", "0.7513979", "0.7494812", "0.732616", "0.732616", "0.7267077", "0.7247402", "0.72277766", "0.7187304", "0.71772933", "0.71772933", "0.7171092", "0.716413", "0.7153856", "0.71492064", "0.7115767", "0.7096625", "0.70937216"...
0.66629624
91
GET /trials/1 GET /trials/1.xml
def show @trial = Trial.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @trial } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @trial = Trial.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @trial }\n end\n end", "def show\n @trial = Trial.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @trial ...
[ "0.6455325", "0.63403314", "0.62679386", "0.6238086", "0.6176045", "0.59208447", "0.58383536", "0.5796926", "0.5773541", "0.56708795", "0.56697667", "0.5644533", "0.5641433", "0.5606891", "0.55835944", "0.5575981", "0.553889", "0.55211014", "0.55211014", "0.55147", "0.5509353...
0.708527
1
GET /trials/new GET /trials/new.xml
def new @trial = Trial.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @trial } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @trial = Trial.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @trial }\n end\n end", "def create\n @trial = Trial.new(params[:trial])\n\n respond_to do |format|\n if @trial.save\n flash[:notice] = 'Trial was successfully cr...
[ "0.72461754", "0.7164848", "0.7125318", "0.65755737", "0.64915645", "0.6489564", "0.6454047", "0.6454047", "0.63882256", "0.63846743", "0.6348695", "0.6348695", "0.6348695", "0.63227135", "0.6318691", "0.6307796", "0.62801623", "0.62801623", "0.6264935", "0.62607425", "0.6256...
0.79213166
0
POST /trials POST /trials.xml
def create @trial = Trial.new(params[:trial]) respond_to do |format| if @trial.save flash[:notice] = 'Trial was successfully created.' format.html { redirect_to(@trial) } format.xml { render :xml => @trial, :status => :created, :location => @trial } else format.html { render :action => "new" } format.xml { render :xml => @trial.errors, :status => :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @trial = Trial.new(params[:trial])\n\n respond_to do |format|\n if @trial.save\n format.html { redirect_to(@trial, :notice => 'Trial was successfully created.') }\n format.xml { render :xml => @trial, :status => :created, :location => @trial }\n else\n format.html...
[ "0.7127306", "0.6726273", "0.6597655", "0.6336137", "0.6316415", "0.62623215", "0.6139367", "0.6121985", "0.60838497", "0.5993323", "0.5978392", "0.59493846", "0.5913752", "0.58503157", "0.5799361", "0.5752214", "0.5673787", "0.56559587", "0.55617106", "0.5474019", "0.5465556...
0.7121765
1
PUT /trials/1 PUT /trials/1.xml
def update @trial = Trial.find(params[:id]) respond_to do |format| if @trial.update_attributes(params[:trial]) flash[:notice] = 'Trial was successfully updated.' format.html { redirect_to(@trial) } format.xml { head :ok } else format.html { render :action => "edit" } format.xml { render :xml => @trial.errors, :status => :unprocessable_entity } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n p = trial_params.clone\n if p[\"question_ids\"].nil?\n p[\"question_ids\"] = []\n end\n\n respond_to do |format|\n if @trial.update(p)\n format.html { redirect_to @trial, notice: 'Trial was successfully updated.' }\n format.json { head :no_content }\n else\n ...
[ "0.62472373", "0.62109756", "0.62040067", "0.6133514", "0.59581023", "0.59560335", "0.5946118", "0.59452057", "0.5937637", "0.5857082", "0.5854942", "0.58395743", "0.5803279", "0.57890713", "0.5788552", "0.5725071", "0.5717323", "0.56885856", "0.5655561", "0.5604429", "0.5560...
0.6948411
0