query
stringlengths
7
6.41k
document
stringlengths
12
28.8k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Parse the commandline args into the params hash. 'happy_flag' produces :happy_flag => true in the params hash 'foo=foo_val' produces :foo => 'foo_val' in the params hash. '' Stop parsing; all remaining args are piled into :rest self.rest contains all arguments that don't start with a '' and all args following the '' se...
def process_argv! args = ARGV.dup self.rest = [] until args.empty? do arg = args.shift case when arg == '--' self.rest += args break when arg =~ /\A--([\w\-\.]+)(?:=(.*))?\z/ param, val = [$1, $2] param.gsub!(/\-/, '.') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_argv!\n args = ARGV.dup\n self.rest = []\n @unknown_argvs = []\n until args.empty? do\n arg = args.shift\n case\n # end of options parsing\n when arg == '--'\n self.rest += args\n break\n # --param=val or --param\n when arg...
[ "0.7268705", "0.7090579", "0.69362426", "0.6874826", "0.65471536", "0.6485857", "0.645301", "0.6240287", "0.6214897", "0.612997", "0.60626215", "0.60159725", "0.6009432", "0.60014826", "0.5992993", "0.598897", "0.5949692", "0.59383625", "0.59125113", "0.5871147", "0.5841489",...
0.728001
0
Retrieve the given param, or prompt for it
def param_or_ask attr, hint=nil return self[attr] if include?(attr) require 'highline/import' self[attr] = ask("#{attr}"+(hint ? " for #{hint}?" : '?')) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fetch(param, default = nil)\n params[param] || default\n # gmosx: I *think* facets fucks-up the fetch implementation.\n # params.fetch(param, default)\n end", "def get_param(key, default_value = \"\")\n result = get_option(@params, key, default_value)\n result\n end", "def get_param(param)...
[ "0.65691614", "0.6546895", "0.6532491", "0.6442228", "0.63934237", "0.6385267", "0.6380154", "0.63032854", "0.6299214", "0.62437797", "0.6233124", "0.6179755", "0.61644715", "0.6144932", "0.61233675", "0.6102589", "0.60699683", "0.6008301", "0.59876394", "0.5976565", "0.59763...
0.6593803
0
Retreive the first param defined with the given flag.
def param_with_flag flag params_with(:flag).each do |param| return param if param_definitions[param][:flag].to_s == flag.to_s end raise Configliere::Error.new("Unknown option: -#{flag}") if complain_about_bad_flags? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_param_for_flag(flag)\n params_with(:flag).each do |param_name, param_flag|\n return param_name if flag.to_s == param_flag.to_s\n end\n nil\n end", "def get_value(flag)\n\t\tfp = @flag_pairs.get_value(flag)\n\t\tif !@no_vals.include?(flag)\n\t\t\tif @args.has_key?(flag)\n\t\t\t\t...
[ "0.8202661", "0.6812487", "0.65501416", "0.64255595", "0.6369941", "0.6348079", "0.62931097", "0.6263593", "0.6241798", "0.61755687", "0.6159821", "0.6159821", "0.60932666", "0.6012147", "0.5945891", "0.5855583", "0.5855167", "0.5850562", "0.58425343", "0.58157885", "0.580656...
0.7510594
1
Returns a flag in dashed form, suitable for recycling into the commandline of an external program. Can specify a specific flag name, otherwise the given setting key is used
def dashed_flag_for setting_name, flag_name=nil return unless Settings[setting_name] flag_name ||= setting_name (Settings[setting_name] == true ? "--#{flag_name.to_s.gsub(/_/,"-")}" : "--#{flag_name.to_s.gsub(/_/,"-")}=#{Settings[setting_name]}" ) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dashed_flag_for setting_name, flag_name=nil\n return unless self[setting_name]\n flag_name ||= setting_name\n (self[setting_name] == true ? \"--#{flag_name.to_s.gsub(/_/,\"-\")}\" : \"--#{flag_name.to_s.gsub(/_/,\"-\")}=#{self[setting_name]}\" )\n end", "def format_flag(flag)\n if flag...
[ "0.8657593", "0.69250315", "0.6923394", "0.6622883", "0.6478487", "0.6410422", "0.6372309", "0.6334798", "0.6032994", "0.6017651", "0.59792936", "0.59302", "0.59265643", "0.5905295", "0.5883054", "0.583383", "0.5812948", "0.5800837", "0.57667524", "0.57614106", "0.5746625", ...
0.8717859
0
Complain about bad flags?
def complain_about_bad_flags? @complain_about_bad_flags end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def complain_about_bad_flags!\n @complain_about_bad_flags = true\n end", "def validate_flags\n return if flags == [false, false, false, false]\n\n raise ProtocolException, \"Invalid flags in #{type_name} packet header\"\n end", "def flags; end", "def validate_flags\n return if @fl...
[ "0.8554275", "0.6746927", "0.64452493", "0.6425688", "0.63599014", "0.63505375", "0.6301072", "0.62137884", "0.613931", "0.61261123", "0.6115887", "0.6059471", "0.6059471", "0.60387707", "0.60278547", "0.6017496", "0.6009119", "0.59957105", "0.5994539", "0.5973691", "0.596175...
0.8360382
1
Force this params object to complain about bad (singleletter) flags on the commandline.
def complain_about_bad_flags! @complain_about_bad_flags = true end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def invalid_args!(message)\n raise InvalidCommandLine, message\n end", "def complain_about_bad_flags?\n @complain_about_bad_flags\n end", "def enforce_flags_before_args(state = true)\n check_definition_state\n if argument_parsing_disabled?\n raise ToolDefinitionError,\n ...
[ "0.676017", "0.64137816", "0.6360059", "0.63109773", "0.6212675", "0.605659", "0.6013252", "0.6013252", "0.6013252", "0.6013252", "0.6013252", "0.6013252", "0.5917071", "0.59047705", "0.58824474", "0.58724034", "0.5833427", "0.5761839", "0.5737053", "0.5685064", "0.5652391", ...
0.76640403
0
The contents of the help message. Lists the usage as well as any defined parameters and environment variables
def help help_str = [ usage ] if respond_to?(:descriptions) help_str += ["\nParams"] ordered_params_and_descs = descriptions.sort_by{|p,d| p.to_s } param_help_strings = ordered_params_and_descs.map do |param, desc| if flag = param_definitions[param][:flag] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def help\n\t\tself.usage(false)\n\t\texit EX_OK\n\tend", "def help\n str = \"====[ #{@name} ]====\\nUsage: #{@name} \"\n @doc_args.each do |key, _value|\n str += \"[#{key.upcase}] \"\n end\n @doc_options.each do |key, _value|\n str += \"(--#{key.name}) \"\n end\n str =...
[ "0.7994079", "0.788853", "0.7878086", "0.78086436", "0.78050435", "0.77713954", "0.77711076", "0.774661", "0.77353066", "0.7717648", "0.7717648", "0.770031", "0.770031", "0.7683676", "0.7681193", "0.76312166", "0.75810957", "0.75676984", "0.75676984", "0.752338", "0.752173", ...
0.82839197
0
Output the help message to $stderr, along with an optional extra message appended.
def dump_help extra_msg=nil $stderr.puts help $stderr.puts "\n\n"+extra_msg unless extra_msg.blank? $stderr.puts '' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_error(msg)\n interface.errmsg(msg)\n interface.puts(option_parser.help)\n end", "def err_extra_arg (args, usage)\n message= \"Extra options:\\n\"\n args.each() {|v| message = message + \" #{v}\\n\"}\n message = message + usage\n raise message\n end", "def help_message\n $...
[ "0.74085796", "0.68049043", "0.6786835", "0.67075974", "0.66033554", "0.6591707", "0.6549676", "0.6499222", "0.6483814", "0.6412502", "0.63874453", "0.6377446", "0.634771", "0.63418835", "0.63418835", "0.62642413", "0.622984", "0.62191015", "0.6199504", "0.6196825", "0.618625...
0.81841236
0
Returns the center point of the circle
def center Point.new(x: @x, y: @y) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def center\r\n Point.from_x_y((lower_corner.x + upper_corner.x)/2,(lower_corner.y + upper_corner.y)/2)\r\n end", "def get_center\n abs_size = get_absolute_size\n Vector.new(abs_size.x * 0.5, abs_size.y * 0.5)\n end", "def getCenter\n\t\tbox = self.bbox\n\t\t[ (box[0] + box[2])/2, (box[...
[ "0.8043146", "0.7706153", "0.76230156", "0.75529015", "0.7504603", "0.74515575", "0.7428899", "0.73196787", "0.7279533", "0.727875", "0.7253419", "0.71702826", "0.7145817", "0.7145817", "0.7145817", "0.71336377", "0.7102529", "0.7091045", "0.70840585", "0.7019567", "0.7015357...
0.7942039
1
Returns an array of the two points of intersection
def points_of_intersection(other) return false unless intersects? other p0 = center p1 = other.center p2 = intersection_center other h = height other d = center.distance other.center x3 = p2.x + h*(p1.y - p0.y)/d y3 = p2.y - h*(p1.x - p0.x)/d x4 = p2.x - h*(p1.y - p0.y)/d y4 = p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_intersection\n end", "def intersect(xs, ys)\n result = []\n result = xs & ys\n puts result\nend", "def intersection(array1, array2)\n\tresult = [];\n\tfor i in 0...array1.length\n\t\tfor j in 0...array2.length\n\t\t\tif array1[i] == array2[j]\n\t\t\t\tresult[result.length] = array1[i];\n\t\t\tend...
[ "0.69331396", "0.69314903", "0.6811485", "0.6780484", "0.65815264", "0.65550375", "0.65550375", "0.65550375", "0.65349114", "0.6508613", "0.64718246", "0.6471387", "0.6449763", "0.64491534", "0.64491534", "0.6445728", "0.64383674", "0.64307", "0.6412206", "0.64093703", "0.639...
0.70419115
0
Returns the larger point
def larger_point_of_intersection(other) a = points_of_intersection(other) a.sort_by{|p| [p.x, p.y]}.last rescue false end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def biggest(x,y)\n if x <= y\n return y\n else\n return x\n end\nend", "def larger\n [height, width].max\n end", "def max_point\n # generate the bounding box if not already done\n bounding_box\n # return the max\n @max\n end", "def max x,y\n\t\treturn x if x > y\n\t\tr...
[ "0.6869353", "0.66888875", "0.6639461", "0.6600591", "0.640592", "0.640496", "0.6403258", "0.63745016", "0.6335132", "0.6278888", "0.6258321", "0.6199484", "0.6168444", "0.61362314", "0.61351246", "0.61106294", "0.60929257", "0.6080429", "0.60776705", "0.60763675", "0.606701"...
0.6784093
1
If the distance between the two circles is zero and radius 1 equals radius 2, then the two circles are coincident
def coincident?(other) center.distance(other.center) == 0 and @r == other.r end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_circle_circle(a, b, response)\n # Check if the distance between the centers of the two\n # circles is greater than their combined radius.\n difference_v = T_VECTORS.pop.set(b.position) - a.position\n total_radius = a.r + b.r\n total_radius_sq = total_radius * total_radiu...
[ "0.7508058", "0.71979946", "0.71719503", "0.67284745", "0.6413801", "0.63627934", "0.6358047", "0.6271826", "0.6160869", "0.61526376", "0.61044157", "0.60364103", "0.5998238", "0.59793746", "0.5946302", "0.5883727", "0.58478963", "0.5800338", "0.5764687", "0.575552", "0.56710...
0.73780864
1
GET /pfs_consultations/1 GET /pfs_consultations/1.xml
def show @pfs_consultation = PfsConsultation.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @pfs_consultation } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @consultation = Consultation.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @consultation }\n end\n end", "def new\n @pfs_consultation = PfsConsultation.new\n\n respond_to do |format|\n format.html # new.html.erb...
[ "0.69165915", "0.69002676", "0.640523", "0.63009435", "0.6296551", "0.62218076", "0.62218076", "0.62218076", "0.60162055", "0.6004563", "0.5988748", "0.5927135", "0.5904964", "0.590487", "0.590487", "0.59002745", "0.5862799", "0.5849312", "0.58417815", "0.5827655", "0.5827313...
0.75104535
0
GET /pfs_consultations/new GET /pfs_consultations/new.xml
def new @pfs_consultation = PfsConsultation.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @pfs_consultation } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @consultation = Consultation.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @consultation }\n end\n end", "def create\n @pfs_consultation = PfsConsultation.new(params[:pfs_consultation])\n\n respond_to do |format|\n if @pfs_cons...
[ "0.7618117", "0.7202463", "0.70742965", "0.70742965", "0.6916959", "0.69154644", "0.69113547", "0.6874706", "0.6847885", "0.6728079", "0.67200416", "0.6700713", "0.6664299", "0.6659656", "0.6655738", "0.6647501", "0.6620469", "0.66136706", "0.6607002", "0.6581821", "0.656887"...
0.80458164
0
POST /pfs_consultations POST /pfs_consultations.xml
def create @pfs_consultation = PfsConsultation.new(params[:pfs_consultation]) respond_to do |format| if @pfs_consultation.save format.html { redirect_to(@pfs_consultation, :notice => 'Pfs consultation was successfully created.') } format.xml { render :xml => @pfs_consultation, :status =>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @consultation = Consultation.new(params[:consultation])\n\n respond_to do |format|\n if @consultation.save\n format.html { redirect_to(@consultation, :notice => t(\"flash.notices.model.consultation.created\")) }\n format.xml { render :xml => @consultation, :status => :created...
[ "0.67370784", "0.65699077", "0.64805084", "0.6019515", "0.59803504", "0.5966995", "0.59616303", "0.59497666", "0.59273046", "0.592417", "0.5898888", "0.588757", "0.5875874", "0.58757687", "0.58694196", "0.58613634", "0.5844453", "0.5832742", "0.5813952", "0.5796161", "0.57798...
0.7239453
0
PUT /pfs_consultations/1 PUT /pfs_consultations/1.xml
def update @pfs_consultation = PfsConsultation.find(params[:id]) respond_to do |format| if @pfs_consultation.update_attributes(params[:pfs_consultation]) format.html { redirect_to(@pfs_consultation, :notice => 'Pfs consultation was successfully updated.') } format.xml { head :ok } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @consultation = Consultation.find(params[:id])\n\n respond_to do |format|\n if @consultation.update_attributes(params[:consultation])\n format.html { redirect_to(@consultation, :notice => t(\"flash.notices.model.consultation.updated\"))}\n format.xml { head :ok }\n else\...
[ "0.65200657", "0.610049", "0.60895693", "0.60895693", "0.60784143", "0.60109824", "0.59879416", "0.5976138", "0.5933407", "0.58966297", "0.58870596", "0.5883681", "0.5874982", "0.5872653", "0.5830688", "0.5792625", "0.5792625", "0.5792625", "0.57355595", "0.5712786", "0.57060...
0.7257577
0
DELETE /pfs_consultations/1 DELETE /pfs_consultations/1.xml
def destroy @pfs_consultation = PfsConsultation.find(params[:id]) @pfs_consultation.destroy respond_to do |format| format.html { redirect_to(pfs_consultations_url) } format.xml { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @consultation = Consultation.find(params[:id])\n @consultation.destroy\n\n respond_to do |format|\n format.html { redirect_to(consultations_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @diabetes_consultation = DiabetesConsultation.find(params[:id])\n @...
[ "0.68974614", "0.66474545", "0.6584204", "0.65556467", "0.64917713", "0.64917713", "0.63834584", "0.63825846", "0.6314852", "0.6299912", "0.62518287", "0.62192464", "0.620283", "0.6146533", "0.6121993", "0.6121527", "0.61128306", "0.6089252", "0.60827196", "0.60657024", "0.60...
0.7508039
0
Select assemblies from the database, prejoined with all dependent tables, based on a SQL `where_clause` `where_clause` can be an `Array`, in which case it is a list of assembly names
def assemblies(where_clause=nil) if where_clause.is_a? Array where_clause = {assembly_id_field => where_clause} end dataset = @db[:tAssemblies] .left_join(:tExtracts, :extract_ID => :extract_ID) .left_join(:tStocks, :stock_ID => :stock_ID) .left_join(:tIsolates, :isolate_ID => ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dig_assembly(tmp_assemblies_collection, api_params)\n # First step iterate over the [Aid1, Aid2] and make @baked => A[ASM1, ASM2..ASMn]\n @baked = tmp_assemblies_collection.map do |one_assemblies|\n a1 = one_assemblies.assemblies.map do |one_assembly|\n u...
[ "0.5101221", "0.50779223", "0.4966131", "0.4936653", "0.4930695", "0.4849791", "0.4835786", "0.47494894", "0.47040442", "0.47027367", "0.47016913", "0.47007278", "0.4681085", "0.46532393", "0.46516585", "0.46370915", "0.4617549", "0.4617549", "0.46137857", "0.46053132", "0.45...
0.7802928
0
Which NCBI genetic code is used by the pathogens in this database. Necessary for correct variant annotation. Default is 11 for bacteria. See for all choices.
def genetic_code_table; 11; end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gene_id\n description.andand.match(/ GN=(\\w+) ?/)[1]\n end", "def ndp_code; self[:ndp_code].to_i; end", "def get_genus_species(genus_option, self_option)\n # see Protonym\n true\n end", "def codigo_carteira\n carteira.to_s\n end", "def nucleotide_score\n {\n A: 0,\n C...
[ "0.59449816", "0.5595057", "0.5472233", "0.54038066", "0.5389062", "0.5389062", "0.5358672", "0.5347432", "0.53318", "0.52931756", "0.5267834", "0.5245407", "0.5226581", "0.52095443", "0.52050763", "0.519638", "0.518673", "0.5182526", "0.5180513", "0.5165484", "0.516218", "...
0.74127716
0
Adds dummy columns to queries of `tIsolates` so that columns in `IN_QUERY` specific to `tAssemblies`, e.g., `qc_failed`, have no effect on a query of only `tIsolates`
def add_isolates_dummy_columns(dataset, extra_cols=ISOLATE_DUMMY_COLUMNS) dummy_cols = [:isolate_ID] extra_cols.each do |name, val| dummy_cols << Sequel.lit("#{@db.literal(val)} as #{@db.literal(name)}") end dummy_table = @db[:tIsolates].select(*dummy_cols) dataset.join(dummy_table, isolate_ID...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isolates(where_clause=nil, no_dummy_cols=false)\n dataset = @db[:tIsolates]\n .left_join(:tOrganisms, :organism_ID => :organism_ID)\n .left_join(:tHospitals, :hospital_ID => :tIsolates__hospital_ID)\n dataset = add_isolates_dummy_columns(dataset) unless no_dummy_cols\n dataset = dataset....
[ "0.5941014", "0.51928854", "0.500551", "0.5002081", "0.49684164", "0.49295336", "0.49038437", "0.48059255", "0.47955298", "0.47822878", "0.47086403", "0.46788776", "0.46469015", "0.4640578", "0.4624261", "0.461034", "0.4609172", "0.4581297", "0.4574566", "0.45492133", "0.4532...
0.6762049
0
Select isolates from the database, prejoined with all dependent tables, based an a SQL `where_clause` By default dummy columns are added so that if the `where_clause` mentions columns in tAssemblies (see `ISOLATE_DUMMY_COLUMNS` above), the query still succeeds; to turn this off, set `no_dummy_cols` to `true`
def isolates(where_clause=nil, no_dummy_cols=false) dataset = @db[:tIsolates] .left_join(:tOrganisms, :organism_ID => :organism_ID) .left_join(:tHospitals, :hospital_ID => :tIsolates__hospital_ID) dataset = add_isolates_dummy_columns(dataset) unless no_dummy_cols dataset = dataset.where(wher...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assemblies(where_clause=nil)\n if where_clause.is_a? Array\n where_clause = {assembly_id_field => where_clause}\n end\n dataset = @db[:tAssemblies]\n .left_join(:tExtracts, :extract_ID => :extract_ID)\n .left_join(:tStocks, :stock_ID => :stock_ID)\n .left_join(:tIsolates, :is...
[ "0.6477563", "0.6210614", "0.567406", "0.5625793", "0.5602631", "0.55062026", "0.5468203", "0.5440565", "0.533723", "0.5318345", "0.52353543", "0.5230997", "0.5133361", "0.5113542", "0.5110366", "0.5089493", "0.5062043", "0.5035413", "0.5013288", "0.49945712", "0.4992899", ...
0.6874576
0
The where_clause here applies to tAssemblies, and encounters are chosen by eRAP_ID
def encounters(where_clause=nil) erap_ids = assemblies(where_clause).select_map(pt_id_field(true)).uniq dataset = @db[:tPatientEncounter] .left_join(:tHospitals, :hospital_ID => :tPatientEncounter__hospital_ID) .select(:eRAP_ID, Sequel.as(:start_date, :start_time), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assemblies(where_clause=nil)\n if where_clause.is_a? Array\n where_clause = {assembly_id_field => where_clause}\n end\n dataset = @db[:tAssemblies]\n .left_join(:tExtracts, :extract_ID => :extract_ID)\n .left_join(:tStocks, :stock_ID => :stock_ID)\n .left_join(:tIsolates, :is...
[ "0.63949114", "0.5130556", "0.5099942", "0.50954694", "0.50751424", "0.49979016", "0.49700806", "0.4942421", "0.49262205", "0.49248987", "0.4892262", "0.4870534", "0.48521194", "0.48424613", "0.4823272", "0.48213315", "0.47879556", "0.4755518", "0.4734175", "0.47198892", "0.4...
0.5502495
1
The where_clause here applies to tAssemblies, and isolate tests are chosen by eRAP_ID
def isolate_test_results(where_clause=nil) erap_ids = assemblies(where_clause).select_map(pt_id_field(true)).uniq dataset = @db[:tIsolateTestResults] .left_join(:tIsolateTests, :test_ID => :tIsolateTestResults__test_ID) .left_join(:tOrganisms, :organism_ID => :tIsolateTestResults__organism_ID) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assemblies(where_clause=nil)\n if where_clause.is_a? Array\n where_clause = {assembly_id_field => where_clause}\n end\n dataset = @db[:tAssemblies]\n .left_join(:tExtracts, :extract_ID => :extract_ID)\n .left_join(:tStocks, :stock_ID => :stock_ID)\n .left_join(:tIsolates, :is...
[ "0.6271585", "0.51006454", "0.5097636", "0.50760186", "0.5074149", "0.50693846", "0.49142006", "0.4910266", "0.49005356", "0.4893077", "0.48848426", "0.48163342", "0.48151013", "0.48103392", "0.48071748", "0.48040444", "0.47738916", "0.47642088", "0.4730006", "0.4717398", "0....
0.6635856
0
GET /user_figures GET /user_figures.json
def index @user_figures = UserFigure.all respond_to do |format| format.html # index.html.erb format.json { render json: @user_figures } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_figures\n get(FIGURES)\n end", "def new\n @user_figure = UserFigure.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @user_figure }\n end\n end", "def show\n @user_figure = self.user_figure_by_code_or_id(params)\n\n respond_to do |fo...
[ "0.6747717", "0.6105846", "0.5962451", "0.59181476", "0.5649477", "0.5530733", "0.5530733", "0.55073255", "0.5469516", "0.5447122", "0.5446078", "0.5446078", "0.5390682", "0.5343899", "0.53093046", "0.52463174", "0.52463174", "0.51998794", "0.51801866", "0.515403", "0.5148099...
0.73437667
0
GET /user_figures/new GET /user_figures/new.json
def new @user_figure = UserFigure.new respond_to do |format| format.html # new.html.erb format.json { render json: @user_figure } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @user_figure = UserFigure.new(params[:user_figure])\n\n respond_to do |format|\n if @user_figure.save\n format.html { redirect_to @user_figure, notice: 'User figure was successfully created.' }\n format.json { render json: @user_figure, status: :created, location: @user_figure...
[ "0.7151422", "0.65977246", "0.6485964", "0.63865185", "0.6316806", "0.6260777", "0.6258836", "0.6200304", "0.617386", "0.61492044", "0.6144032", "0.61325884", "0.60806817", "0.60551", "0.6053908", "0.6048544", "0.6048544", "0.6048544", "0.6047661", "0.6040826", "0.6031666", ...
0.7661651
0
POST /user_figures POST /user_figures.json
def create @user_figure = UserFigure.new(params[:user_figure]) respond_to do |format| if @user_figure.save format.html { redirect_to @user_figure, notice: 'User figure was successfully created.' } format.json { render json: @user_figure, status: :created, location: @user_figure } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @user_figures = UserFigure.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @user_figures }\n end\n end", "def new\n @user_figure = UserFigure.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { rend...
[ "0.6199803", "0.6012595", "0.56748605", "0.5617251", "0.53607076", "0.5153961", "0.50838363", "0.5027689", "0.50218385", "0.49946755", "0.49209675", "0.49059203", "0.48626617", "0.48321623", "0.48229852", "0.48181403", "0.48132232", "0.47992823", "0.47819892", "0.47780433", "...
0.6942421
0
PUT /user_figures/1 PUT /user_figures/1.json
def update @user_figure = UserFigure.find(params[:id]) respond_to do |format| if @user_figure.update_attributes(params[:user_figure]) format.html { redirect_to @user_figure, notice: 'User figure was successfully updated.' } format.json { head :no_content } else format.html {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @user_figure = UserFigure.new(params[:user_figure])\n\n respond_to do |format|\n if @user_figure.save\n format.html { redirect_to @user_figure, notice: 'User figure was successfully created.' }\n format.json { render json: @user_figure, status: :created, location: @user_figure...
[ "0.6317344", "0.60594535", "0.6004624", "0.5753693", "0.5593415", "0.5518275", "0.54832095", "0.54442894", "0.54119253", "0.53233725", "0.53214395", "0.53007823", "0.5258194", "0.52529776", "0.5242309", "0.5209043", "0.518881", "0.51715636", "0.51501507", "0.5145435", "0.5109...
0.7173088
0
DELETE /user_figures/1 DELETE /user_figures/1.json
def destroy @user_figure = UserFigure.find(params[:id]) @user_figure.destroy respond_to do |format| format.html { redirect_to user_figures_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @figure.destroy\n respond_to do |format|\n format.html { redirect_to figures_url, notice: 'Figure was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @figure.destroy\n respond_to do |format|\n format.html { redirect_to @figur...
[ "0.6685234", "0.64689034", "0.64212847", "0.6401848", "0.62923247", "0.6227412", "0.61898756", "0.61573285", "0.6153111", "0.61219287", "0.61091244", "0.61028206", "0.6085886", "0.60813636", "0.60727525", "0.60705197", "0.60563433", "0.60529214", "0.6050276", "0.6035309", "0....
0.786352
0
GET /propagations GET /propagations.json
def index @propagations = Propagation.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @propagation = Propagation.new(propagation_params)\n\n respond_to do |format|\n if @propagation.save\n format.html { redirect_to @propagation, notice: 'Propagation was successfully created.' }\n format.json { render :show, status: :created, location: @propagation }\n else...
[ "0.57521534", "0.5448506", "0.54441315", "0.52614194", "0.50498164", "0.502713", "0.49205068", "0.48766506", "0.4857504", "0.48523578", "0.47671646", "0.47301573", "0.47192702", "0.46824127", "0.46791506", "0.46517724", "0.45954728", "0.4521076", "0.45161065", "0.45127594", "...
0.7383385
0
POST /propagations POST /propagations.json
def create @propagation = Propagation.new(propagation_params) respond_to do |format| if @propagation.save format.html { redirect_to @propagation, notice: 'Propagation was successfully created.' } format.json { render :show, status: :created, location: @propagation } else for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @propagations = Propagation.all\n end", "def update_propagation\n return if @config[:no_propagation_update]\n\n propagation = spreadable.propagation\n locations = propagation.locations\n\n # associate the location of the person who spread it with post through post's propagations\n ...
[ "0.6008794", "0.59290016", "0.5569266", "0.55063117", "0.5412536", "0.5393663", "0.5275412", "0.51516676", "0.51424426", "0.5128538", "0.50981", "0.50379187", "0.49701664", "0.49452096", "0.49340022", "0.49230495", "0.48964575", "0.48925784", "0.4891682", "0.4890212", "0.4866...
0.6842326
0
PATCH/PUT /propagations/1 PATCH/PUT /propagations/1.json
def update respond_to do |format| if @propagation.update(propagation_params) format.html { redirect_to @propagation, notice: 'Propagation was successfully updated.' } format.json { render :show, status: :ok, location: @propagation } else format.html { render :edit } forma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def patch!\n request! :patch\n end", "def http_prop_patch(request, response)\n path = request.path\n\n begin\n prop_patch = @server.xml.expect('{DAV:}propertyupdate', request.body)\n rescue Tilia::Xml::ParseException => e\n raise Exception::BadRequest, e.message, nil, e...
[ "0.60744613", "0.5989595", "0.59374785", "0.59278166", "0.5924099", "0.58453906", "0.5830408", "0.58090746", "0.57992965", "0.57476753", "0.572303", "0.57150245", "0.57150245", "0.57138145", "0.5697363", "0.56833506", "0.56576496", "0.5650504", "0.56494915", "0.5633346", "0.5...
0.63373524
0
DELETE /propagations/1 DELETE /propagations/1.json
def destroy @propagation.destroy respond_to do |format| format.html { redirect_to propagations_url, notice: 'Propagation was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @flat.destroy\n\n respond_to do |format|\n format.html { redirect_to flats_url }\n format.json { head :no_content }\n end\n end", "def delete\n response = WebPay.client.delete(path)\n response['deleted']\n end", "def destroy\n @envelope.destroy\n\n respond_t...
[ "0.60784495", "0.6067778", "0.6064005", "0.60592484", "0.6032136", "0.6032136", "0.60009634", "0.5962883", "0.59409004", "0.5939404", "0.59392315", "0.59144866", "0.5907568", "0.59051174", "0.5898334", "0.58881307", "0.5883211", "0.5883211", "0.5868653", "0.58664745", "0.5849...
0.6904773
0
Refreshes the timeout for this session to be SESSION_TIMEOUT seconds from now, depending on the role This should be done on every page request or refresh that a user does.
def refresh_timeout session[:timeout] = current_user.class::SESSION_TIMEOUT.seconds.from_now end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def refresh_timeout\n # a json session cookie will serialize time as strings, make the conversion explicit so that tests too see strings\n # (see config.action_dispatch.cookies_serializer)\n session[:timeout] = current_user.class::SESSION_TIMEOUT.seconds.from_now.to_s\n session[:has_warned] = false\n ...
[ "0.7964514", "0.7694643", "0.7298532", "0.7139415", "0.7102481", "0.7095965", "0.7041863", "0.7007744", "0.69934964", "0.69633", "0.6816154", "0.6745531", "0.6739661", "0.6659883", "0.6566172", "0.65553415", "0.65335244", "0.64650637", "0.64058363", "0.6386019", "0.6382016", ...
0.8525198
0
return an Airtable::Table object, backed by a base defined in DB YAML file
def table Airmodel.client.table base_config[:base_id], base_config[:table_name] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def table\n self.class.read_and_parse_file(@table_path)\n end", "def table(name)\n Arel::Table.new(name, :engine => attribute.relation.engine)\n end", "def table(table_id); Table.new(@opts, get(\"tables/#{table_id}\")); end", "def _table; @table end", "def load_from_file(path = nil)\n ...
[ "0.6808755", "0.67334706", "0.6702155", "0.6414761", "0.6393623", "0.63624746", "0.62151396", "0.62071824", "0.6206575", "0.616705", "0.6140371", "0.6138794", "0.6117652", "0.6114889", "0.60844886", "0.607928", "0.60186744", "0.60186744", "0.60186744", "0.60186744", "0.600745...
0.7114289
0
converts array of generic airtable records to the instances of the appropriate class
def classify(obj=[]) if obj.is_a? Airtable::Record [self.new(obj.fields)] elsif obj.respond_to? :map obj.map{|r| self.new(r.fields) } else raise AlienObject.new("Object is neither an array nor an Airtable::Model") end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def instantiate(records, klass, owner = self)\n records = splat(records)\n records.map do |record|\n klass.new(owner, record)\n end\n end", "def convert_to(ary, type)\n new = []\n ary.each_index do |row|\n new << ary[row].collect {|elem| elem.send(type)}\n end\n ...
[ "0.6267077", "0.61880374", "0.60733414", "0.57421803", "0.5677065", "0.5635402", "0.5562336", "0.5550977", "0.5495032", "0.5480861", "0.5440214", "0.5414212", "0.53977257", "0.5376348", "0.53518105", "0.534638", "0.5343332", "0.53366774", "0.5329419", "0.5305818", "0.5272539"...
0.6775391
0
Creates code that is used to load context data for a specific category type. load_context_data_for__
def load_context category, type, options = {}, &block type_method_name_part = Context.methodify type if options[:cache] define_method "context_cache_duration_for_#{category}_#{type_method_name_part}" do options[:cache] end end define_method "load_context_data_for_#{cate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def populate_category\n\t\t\t\tif params[:purpose] == \"category\"\n\t\t\t\t\t\tcategory = Category.find(params[:category_id])\n\t\t\t\t\t\t@sub_categories = category.sub_categories\n\t\t\t\telsif params[:purpose] == \"sub_category\"\n\t\t\t\t\t\tsub_category = SubCategory.find(params[:category_id])\n\t\t\t\t\t\t@...
[ "0.55535334", "0.5367598", "0.5338221", "0.5298535", "0.52462554", "0.52339077", "0.5126338", "0.5057103", "0.50559086", "0.5043348", "0.5032647", "0.5030907", "0.50284535", "0.502541", "0.50116074", "0.4967007", "0.49600923", "0.49151644", "0.49000302", "0.48589748", "0.4857...
0.76236
0
close the job (make the status of the job as closed accrding to id) curl X PUT d 'api_key=E7tDAFxoiqneXMuhfpaq'
def close_job @job = Job.find(params[:id]) if @job.update_attribute(:status, "closed") response_message = {:message => "This job is closed successfully.", :job => @job} else response_message = {:message => "Failed to close this job. Please try again!"} end respond_to do |format| f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close\n @job = Job.find(params[:id])\n @job.status = \"closed\"\n @job.save\n\n\t\tflash[:notice] = 'Job Proposal is now closed.'\n\n respond_to do |format|\n format.html { redirect_to(@job) }\n format.xml { head :ok }\n end\n end", "def close\n CloseHandle(@job_handle)\n en...
[ "0.7064259", "0.6210876", "0.61820745", "0.61760974", "0.5972964", "0.59600496", "0.5952626", "0.58961904", "0.5879583", "0.58734167", "0.5864832", "0.5855994", "0.58523923", "0.5841183", "0.5822208", "0.58059454", "0.58038104", "0.5798347", "0.5780529", "0.5772883", "0.57713...
0.71394014
0
abort! throws an :abort! to stop the current command flow on its tracks
def abort! throw :abort!, :aborted end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def abort\n return unless @running\n @loop = nil\n @abort = true\n @running = false\n end", "def abort\n unless @finished\n do_abort\n end\n end", "def abort ; conclude(false) ; end", "def cancel\n self.solved(:abort)\n end", "def cancel\n throw(:abort)\n ...
[ "0.74828666", "0.74023557", "0.7385281", "0.73182905", "0.7141447", "0.7130533", "0.7130533", "0.7130533", "0.7011334", "0.6997226", "0.69599956", "0.68231654", "0.6811623", "0.68095213", "0.67785466", "0.67352206", "0.67345184", "0.6718373", "0.6713744", "0.66953343", "0.667...
0.7677022
0
Same as from_events, but returned as a hash which maps from the event given to a query for its information. Again with the existing_event argument assigned via batch lookup.
def map_from_events(events) events = [*events] existing = fetch_existing_map(events) events.each.with_object({}) do |evt, hash| hash[evt] = new( id: evt.meetup_event_id, last_update: evt.meetup_last_update, existing_event: existing.fetch(evt.mee...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fetch_existing_map(events)\n MeetupEvent\n .where(meetup_event_id: events.map(&:meetup_event_id))\n .to_a\n .each.with_object({}) do |evt, hash|\n hash[evt.meetup_event_id] = evt\n end\n end", "def build_event_hash\n\t\t@event_hash = {}\n\t\t\n\t\teach_event { |ev...
[ "0.6217493", "0.5911553", "0.57878846", "0.57878846", "0.57873243", "0.57432246", "0.5675504", "0.5519267", "0.5478592", "0.54378545", "0.53938353", "0.534023", "0.5317749", "0.53063947", "0.5305279", "0.52393556", "0.5198851", "0.51760197", "0.5163368", "0.5155022", "0.51220...
0.6346676
0
Fetches existing events, then performs a mapping similar to Enumerablegroup_by but which assumes only one record per id.
def fetch_existing_map(events) MeetupEvent .where(meetup_event_id: events.map(&:meetup_event_id)) .to_a .each.with_object({}) do |evt, hash| hash[evt.meetup_event_id] = evt end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mapOfAllEvents\n events = self.getAllEvents\n result = Hash.new\n\n events.each do |sport, evs|\n evs.each do |eventID, event|\n result[eventID] = event\n end\n end\n result\n end", "def events_for(aggregate_id)\n if @str...
[ "0.6546429", "0.6087077", "0.6000412", "0.59611744", "0.5888726", "0.5879952", "0.58175015", "0.58175015", "0.5737149", "0.5688409", "0.56474686", "0.5563198", "0.5555186", "0.55190146", "0.55013955", "0.54222727", "0.5415365", "0.54106444", "0.54088485", "0.5407438", "0.5402...
0.64624304
1
Registers a handler. As a result, when `route!` is called for that command, the aggregate will be loaded from repository, the command will be sent to the object to invoke the object's method, and finally the aggregate will be saved.
def register(command, aggregate_class = nil, &block) raise ArgumentError, 'Pass either aggregate class or block' if aggregate_class && block handler = aggregate_class || block @routes[command] = handler end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def register_route(command, lambda = nil, &block)\n callable = lambda || block\n @routes[command] = callable\n end", "def add_command(name, handler)\n @commands[name] = handler\n end", "def handle(handler, *guards, &block)\n client.register_handler handler, *guards, &block\n end", ...
[ "0.67753744", "0.64115196", "0.6298395", "0.6215766", "0.61873037", "0.6125112", "0.6083952", "0.6017534", "0.59184223", "0.58632666", "0.578896", "0.5750783", "0.5705511", "0.569868", "0.5688704", "0.56647164", "0.5617839", "0.5590307", "0.5587714", "0.5532558", "0.5509129",...
0.76117224
0
returns next manipulation subject
def getNextManipulation(subject) print("Iteration: #{@iteration}\r".blue) newContents = doManipulation(subject.contents.clone) @iteration += 1 return(subject.getNewSubjectForManipulator(newContents)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def next!() end", "def next() end", "def next() end", "def next\n after.first\n end", "def next\n @next\n end", "def next_actor\n @actor\n end", "def next()\n \n end", "def next()\n \n end", "def next\n @next||=after.first\n end", "def first_subject\n ...
[ "0.6197835", "0.6122551", "0.6122551", "0.61198986", "0.60029674", "0.59998083", "0.5979614", "0.5979614", "0.59774935", "0.59584516", "0.5907574", "0.5827871", "0.5783839", "0.57395625", "0.5736482", "0.5736482", "0.57363427", "0.57097334", "0.57097334", "0.57097334", "0.570...
0.7565281
0
method t check the favorite and keep asking until they say y or n return true for y return false for n
def check_fav print "Are they a favorite? (y/n): " user_fav = gets.strip if user_fav == "y" return true elsif user_fav == "n" return false else puts "not vaild input" check_fav end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def favoriter?\n false\n end", "def favoriter?\n true\n end", "def is_favorite?\n\t favorite?\n\tend", "def speel_opnieuw?\nwhile true\nspeel_opnieuw = (get_response_for \"Play again (y/n)\").downcase\ncase speel_opnieuw\nwhen 'y', 'yes' then return true\nwhen 'n', 'no' then retu...
[ "0.6791239", "0.6708281", "0.6703796", "0.6636888", "0.6505679", "0.64912546", "0.6418186", "0.6356863", "0.6356744", "0.6355794", "0.6355794", "0.633631", "0.6334004", "0.63234824", "0.62840194", "0.626756", "0.6252937", "0.6216942", "0.62068665", "0.61846954", "0.6173641", ...
0.7384464
0
Sets the role model to use allows different role subject classes (fx User Accounts) to have different role schemas
def rolegroup_model= model_class @rolegroup_model = model_class.to_s and return if model_class.any_kind_of?(Class, String, Symbol) raise "The rolegroup model must be a Class, was: #{model_class}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_role\n @role = role\n end", "def generate_role_model\n template 'role.rb', role_model_path\n end", "def role=(value)\n self.user_type = ROLES[value]\n end", "def set_type_and_role\n # we need to have a type, cannot use the superclass!\n self.type = DEFAULT_CLASS.to_s i...
[ "0.6730186", "0.6675886", "0.6644526", "0.6466558", "0.64402044", "0.6372593", "0.6353031", "0.62789214", "0.626559", "0.62477165", "0.6215852", "0.61865515", "0.61554736", "0.61554736", "0.61554736", "0.61554736", "0.61554736", "0.61554736", "0.61554736", "0.61554736", "0.61...
0.680275
0
Instance variable The value of an instance variable is stored in the instance of class Foo (e.g. foo). instance methods are hold in the class of the instance (here Foo)
def instance_method=(value) # self => foo, self.class => Foo @instance_var = value # assigning to @singleton_instance_var here would create an instance variable of Foo # (which is independent of class varibale with same name) # @singleton_instance_var = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def instance_var\n @instance_var\n end", "def instance_var=(value)\n @instance_var = value\n end", "def instance_var=(value)\n @instance_var = value\n end", "def instance_var=(value)\n @instance_var = value\n end", "def instance_var=(value)\n @instance_var = value\n end", "def i...
[ "0.6996421", "0.69740486", "0.69740486", "0.69740486", "0.69740486", "0.6963336", "0.6963336", "0.6963336", "0.6893292", "0.66749436", "0.66438395", "0.65317565", "0.6502093", "0.64242935", "0.6299651", "0.6263036", "0.6217547", "0.61461085", "0.60251606", "0.60248476", "0.59...
0.71854246
0
For each column in the row, find the matching Field (if any) and assign the value of that column to the Item for that Field.
def assign_row_values row.each do |column, value| field = column_fields[column] next if field.nil? item.public_send("#{field.attribute_name}=", value) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assign_csv_values_to_genericfile(row, generic_file)\n field_mappings = @import.import_field_mappings.where('import_field_mappings.key != ?', 'image_filename')\n field_mappings.each do |field_mapping|\n\n key_column_number_arr = @import.import_field_mappings.where(key: field_mapping.key).first.value....
[ "0.5568106", "0.54769194", "0.5451376", "0.5419831", "0.5327878", "0.53119475", "0.5306525", "0.52919525", "0.5274679", "0.5232165", "0.5216719", "0.5172446", "0.51638377", "0.51474136", "0.5122339", "0.51203835", "0.51134914", "0.5090306", "0.5089729", "0.50707066", "0.50502...
0.7616909
0
For each Field that exists in the column to Field mapping, check that the validation rules pass for that Field's value. This delegates to the rules (e.g. required, min/max length, etc.) defined by each Field. If any of these rules fail, then this method returns false and the `failure` property is set to an `CSVImport::...
def valid? @failure = nil item.validate column_errors = collect_column_errors if column_errors.values.flatten.any? @failure = CSVImport::Failure.new(row, column_errors) end ! @failure end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def valid?\n each_field_with_value do |_, field, value|\n return false unless field.valid?(value)\n end\n true\n end", "def apply_validations!\n if not_nullable? && (! skip_not_nullable_validation_due_to_type?)\n flex_column_class.validates field_name,...
[ "0.6571234", "0.6356092", "0.62357926", "0.6229922", "0.6107899", "0.6037661", "0.5904589", "0.59001696", "0.5884828", "0.5884566", "0.580063", "0.577731", "0.57764924", "0.57695174", "0.57389253", "0.5723371", "0.57008386", "0.5662782", "0.56378096", "0.562626", "0.5595402",...
0.709416
0
Saves the underlying Item record to the database, raising an exception if something goes wrong. Normal ActiveRecord validations are skipped, so take care to explicitly check `valid?` before calling `save!`.
def save! item.save!(:validate => false) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_item(item)\n begin\n item.save\n rescue ActiveRecord::RecordNotUnique\n item.errors.add :base, :not_unique, message:\n \"An item with the name \\\"#{item.name}\\\" already exists \" +\n \"(in the category \\\"#{Item.find_by(name: item.name).category.name}\\\")\"\n...
[ "0.7107259", "0.69883585", "0.6962331", "0.67576057", "0.6749134", "0.65865934", "0.6547381", "0.65461576", "0.6530364", "0.6486031", "0.63613594", "0.6322656", "0.63062704", "0.62849426", "0.62842196", "0.6222059", "0.6205537", "0.61673427", "0.6161661", "0.61078846", "0.608...
0.71239406
0
TODO: Move generatedat to here and call configcachedat
def save_cache!(config_file = File.expand_path(Assh::CONFIG_CACHE), timestamp_file = File.expand_path(Assh::CONFIG_CACHE_AT)) cache = { hosts: @hosts, groups: @groups } File.open(config_file, 'w') { |f| f << cache.to_yaml } File.open(timestamp_file, 'w') {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configure_cache; end", "def config_store; end", "def genPiledConf(conf = {})\n return genPiledDefaultConf().update(conf) ;\n end", "def generated_at\n return nil unless File.exist?(results_file_path(:with_departments))\n File.mtime(results_file_path(:with_departments))\n end", "def update_la...
[ "0.6218166", "0.56603914", "0.56514025", "0.56384766", "0.5634903", "0.55215454", "0.55215454", "0.55215454", "0.55215454", "0.55215454", "0.55215454", "0.55215454", "0.5511446", "0.55080324", "0.5489954", "0.5489954", "0.5489954", "0.5489954", "0.5489954", "0.5489954", "0.54...
0.57777727
1
POST /costomers POST /costomers.json
def create @costomer = Costomer.new(costomer_params) respond_to do |format| if @costomer.save format.html { redirect_to @costomer, notice: 'Costomer was successfully created.' } format.json { render :show, status: :created, location: @costomer } else format.html { render :ne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @costumer = Costumer.new(costumer_params)\n\n respond_to do |format|\n if @costumer.save\n format.html { redirect_to @costumer, notice: 'Costumer was successfully created.' }\n format.json { render :show, status: :created, location: @costumer }\n else\n format.html...
[ "0.68762785", "0.6262957", "0.6186259", "0.61101854", "0.60982835", "0.6078586", "0.6012293", "0.5913759", "0.5908484", "0.58882475", "0.5882627", "0.5862757", "0.586213", "0.5860814", "0.58489275", "0.58452207", "0.5813365", "0.5809998", "0.58049655", "0.5799143", "0.5795957...
0.73007035
0
PATCH/PUT /costomers/1 PATCH/PUT /costomers/1.json
def update respond_to do |format| if @costomer.update(costomer_params) format.html { redirect_to @costomer, notice: 'Costomer was successfully updated.' } format.json { render :show, status: :ok, location: @costomer } else format.html { render :edit } format.json { render...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @costumer.update(costumer_params)\n format.html { redirect_to @costumer, notice: 'Costumer was successfully updated.' }\n format.json { render :show, status: :ok, location: @costumer }\n else\n format.html { render :edit }\n format.j...
[ "0.6543553", "0.62067914", "0.6194361", "0.6164793", "0.6020782", "0.6009965", "0.5982379", "0.5958562", "0.5957633", "0.5949137", "0.5948922", "0.5937667", "0.5925591", "0.5919126", "0.58859813", "0.58840406", "0.5879837", "0.58761084", "0.5874358", "0.58728665", "0.58718187...
0.6971308
0
DELETE /costomers/1 DELETE /costomers/1.json
def destroy @costomer.destroy respond_to do |format| format.html { redirect_to costomers_url, notice: 'Costomer was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @costumer.destroy\n respond_to do |format|\n format.html { redirect_to costumers_url, notice: 'Costumer was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @crust = Crust.find(params[:id])\n @crust.destroy\n\n respond_to do |fo...
[ "0.7118798", "0.6975454", "0.6952453", "0.69273686", "0.68632746", "0.6859912", "0.6819507", "0.6815992", "0.68091", "0.6779775", "0.6772961", "0.6742539", "0.6730625", "0.6712079", "0.6695585", "0.6685835", "0.6679203", "0.66672206", "0.66556734", "0.665336", "0.6649057", ...
0.73740584
0
get_da_summary Parameters:: (tag) params:da_container tag Return:: The Development Application Summary which contains the list of fields as described on the top of this source file Author::
def get_da_summary(page, da_container, detail_page) # Todo: Put your code to process the da_container to get the Development Application Summary here #get info by list item page item_general_info = get_item_general_info(page, da_container, detail_page) #get info by item detail page item_detail_info= get_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def summary\n # TODO\n end", "def summary\n @data['summary']\n end", "def summary\n end", "def summary\n end", "def summary\n description_section.first\n end", "def summary\n \n end", "def summary\n authenticated_post(\"summary\").body\n end", "def create_summary_doc\n ...
[ "0.65208", "0.64147544", "0.63503194", "0.63503194", "0.6262866", "0.6247262", "0.62359965", "0.6215132", "0.6148908", "0.6148908", "0.6077741", "0.6065994", "0.60491157", "0.6031331", "0.6018872", "0.6018872", "0.6018872", "0.6018872", "0.5986082", "0.598302", "0.59732217", ...
0.7089198
1
get_da_summary Parameters:: (tag) params:da_container tag Return:: The Development Application Summary which contains the list of fields as described on the top of this source file Author::
def get_da_summary(page, da_container, detail_page) # Todo: Put your code to process the da_container to get the Development Application Summary here #get info by list item page item_general_info = get_item_general_info(page, da_container, detail_page) #get info by item detail page item_detail_info= get_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def summary\n # TODO\n end", "def summary\n @data['summary']\n end", "def summary\n end", "def summary\n end", "def summary\n description_section.first\n end", "def summary\n \n end", "def summary\n authenticated_post(\"summary\").body\n end", "def create_summary_doc\n ...
[ "0.65208", "0.64147544", "0.63503194", "0.63503194", "0.6262866", "0.6247262", "0.62359965", "0.6215132", "0.6148908", "0.6148908", "0.6077741", "0.6065994", "0.60491157", "0.6031331", "0.6018872", "0.6018872", "0.6018872", "0.6018872", "0.5986082", "0.598302", "0.59732217", ...
0.7089198
0
Setup the instance methods, fields, etc. on the association owning class.
def setup! setup_instance_methods! @owner_class.embedded_relations = @owner_class.embedded_relations.merge(name => self) @owner_class.aliased_fields[name.to_s] = store_as if store_as self end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_associations; end", "def setup_associates(klass, relation, _meta, parent_relation)\n assoc_name =\n if relation.associations.key?(parent_relation)\n parent_relation\n else\n singular_name = inflector.singularize(parent_relation).to_sym\n singular_name if re...
[ "0.7657987", "0.65178555", "0.6479943", "0.6431459", "0.6395818", "0.6360205", "0.61765134", "0.61361146", "0.61005175", "0.60801756", "0.5988589", "0.597291", "0.5960046", "0.5908261", "0.58711827", "0.5838305", "0.58278316", "0.57362074", "0.57287663", "0.57267123", "0.5721...
0.7603321
1
Get the default validation setting for the association. Determines if by default a validates associated will occur.
def validation_default; true; end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validation_default; false; end", "def is_default?\n @rule_details.is_default == true\n end", "def valid_for_default?\n valid?(:default)\n end", "def validate?\n @validate ||= if @options[:validate].nil?\n validation_default\n ...
[ "0.6138287", "0.5850886", "0.57421833", "0.56649536", "0.5600293", "0.54078317", "0.536099", "0.5351824", "0.5336235", "0.53344625", "0.5330405", "0.52556384", "0.52556384", "0.5244482", "0.5243603", "0.52394885", "0.5238396", "0.5235354", "0.5201896", "0.51928586", "0.518701...
0.64848906
1
disable writing to history when ripl exits
def write_history; end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _rl_start_using_history()\r\n using_history()\r\n @_rl_saved_line_for_history = nil\r\n end", "def write_history\n return super if SqueezeHistory.disabled?\n config[:history] = squeezed_history\n super\n end", "def clear_history\n while ! Readline::HISTORY.empty? do\n Readline:...
[ "0.7162448", "0.7073644", "0.6837693", "0.6699722", "0.65451616", "0.6485662", "0.6485662", "0.64403075", "0.64244056", "0.64141834", "0.63894683", "0.63846284", "0.63846284", "0.63846284", "0.62317365", "0.62317365", "0.6184848", "0.6174041", "0.61702126", "0.61419755", "0.6...
0.7333297
0
Convert attributes hash into an array with GeneratedAttribute objects.
def parse_attributes! #:nodoc: self.attributes = (attributes || []).map do |key_value| name, type = key_value.split(':') Rails::Generators::GeneratedAttribute.new(name, type) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_a\n array = []\n attributes.each do |value|\n array << deep_unwrap(value)\n end\n\n return array\n end", "def to_a\n array = []\n attributes.each do |value|\n array << deep_unwrap(value)\n end\n\n return array\n end", "def parse_attributes! #:nodoc:\n self.attribut...
[ "0.66643804", "0.66643804", "0.6574867", "0.6468255", "0.6325934", "0.6295308", "0.62937987", "0.625916", "0.61424583", "0.6094558", "0.5997011", "0.5995476", "0.5995476", "0.5995476", "0.5971737", "0.5971737", "0.5963741", "0.5961962", "0.5960079", "0.59523493", "0.59311056"...
0.67831093
0
Receives name and return camelized, underscored and pluralized names.
def inflect_names(name) #:nodoc: camel = name.camelize under = camel.underscore plural = under.pluralize [camel, under, plural] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def constantize(name)\n name.to_s.split('_').map(&:capitalize).join\n end", "def camelize(name, uc_first=true)\n parts = name.to_s.split('_')\n assemble = lambda { |head, tail| head + tail.capitalize }\n uc_first ? parts.inject('', &assemble) : parts.inject(&assemble)\n end", "def underscore_...
[ "0.7689157", "0.7425837", "0.72283506", "0.72123843", "0.71898544", "0.71293473", "0.71027", "0.7047128", "0.69921064", "0.69684416", "0.69636947", "0.686334", "0.684392", "0.6810377", "0.6793619", "0.6788553", "0.67314446", "0.67239296", "0.6669295", "0.6669295", "0.66656643...
0.830041
0
DELETE /composers/1 DELETE /composers/1.json
def destroy @composer = Composer.find(params[:id]) @composer.destroy respond_to do |format| format.html { redirect_to composers_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @composer = Composer.find(params[:id])\n @composer.destroy\n\n respond_to do |format|\n format.html { redirect_to(composers_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @composer.destroy\n respond_to do |format|\n format.html { redirect_to compose...
[ "0.71664155", "0.71249557", "0.6766559", "0.67644507", "0.67607933", "0.672252", "0.6711907", "0.6670379", "0.6630423", "0.66196233", "0.65997267", "0.65882486", "0.6551529", "0.65372556", "0.65277976", "0.65137726", "0.6502567", "0.648159", "0.64763856", "0.64736986", "0.646...
0.72459567
0
creates three log entries
def create_multiple_log_entries(log_file_name, iterations, seconds) iterations.times { file = File.open(log_file_name, "a") { |f| f.write(LOG_MESSAGE*3) } sleep(seconds) } sleep(BUFFER_TIME) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_log(param); end", "def activity_log_create\n write_activity_log(:create)\n end", "def build_logs\r\n buf = ''\r\n buf << \"#{LogDb::Model::Log.count} logs:\\n\" ## show count for warn, error, info etc.\r\n LogDb::Model::Log.order('created_at').each do |log|\r\n buf << \"[#{l...
[ "0.64978373", "0.62329954", "0.62283933", "0.61651415", "0.6025192", "0.6009979", "0.60055685", "0.59808534", "0.5950926", "0.5884313", "0.58265185", "0.58200186", "0.580708", "0.580694", "0.5799714", "0.5787723", "0.5787013", "0.57817674", "0.57789546", "0.57763416", "0.5758...
0.6642756
0
Override set_perspective (inherited from AppliesPerspectives via DataController) to prevent it from doing anything
def set_perspective # do nothing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setperspectiveprojection(*)\n super\n end", "def perspective(sym)\n if @perspectives\n @perspectives[sym]\n else\n self.class.perspective(sym)\n end\n end", "def perspective(sym)\n self.class.perspective(sym)\n end", "def perspective(name, syms=nil)\n ...
[ "0.70925874", "0.5828837", "0.5770403", "0.5599222", "0.52597183", "0.52305853", "0.5182754", "0.5088457", "0.5088457", "0.48743537", "0.48301736", "0.48211378", "0.47336277", "0.472885", "0.46932775", "0.4659396", "0.46254492", "0.45973927", "0.45973927", "0.4525213", "0.451...
0.83231366
0
GET /journal_entries GET /journal_entries.json
def index @journal_entries = current_user.journal_entries respond_to do |format| format.html # show.html.erb format.json { render json: @journal_entries } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @journal_entries = JournalEntry.order(\"entry_date desc\").page(params[:page])\n end", "def index\n @journal = Journal.find(params[:journal_id])\n\n render json: @journal.workouts\n end", "def index\n @journal_entries = JournalEntry.desc(:entry_date).page(params[:page])\n\n respond...
[ "0.7080957", "0.70709777", "0.7047168", "0.704616", "0.7040924", "0.7037864", "0.7037864", "0.6639268", "0.6637349", "0.6632986", "0.66007763", "0.6592013", "0.65797526", "0.64964604", "0.64581424", "0.64581424", "0.64581424", "0.64581424", "0.64581424", "0.64581424", "0.6437...
0.7739553
0
GET /journal_entries/new GET /journal_entries/new.json
def new @journal_entry = JournalEntry.new respond_to do |format| format.html # new.html.erb format.json { render json: @journal_entry } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @journal = Journal.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json :@journal }\n end\n end", "def new\n @journal_entry = JournalEntry.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @...
[ "0.7945157", "0.7840667", "0.7807872", "0.76159275", "0.7533111", "0.7430711", "0.73569643", "0.7327688", "0.7324965", "0.72936875", "0.72825176", "0.72825176", "0.72825176", "0.72825176", "0.72825176", "0.72825176", "0.72825176", "0.72825176", "0.72555596", "0.7220529", "0.7...
0.81490177
1
POST /journal_entries POST /journal_entries.json
def create @journal_entry = current_user.journal_entries.new(journal_entry_params) respond_to do |format| if @journal_entry.save format.html { redirect_to journal_entries_url, notice: 'journal_entry was successfully created.' } format.json { render json: @journal_entry, status: :created, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @journal_entry = JournalEntry.new(journal_entry_params)\n\n respond_to do |format|\n if @journal_entry.save\n format.html { redirect_to @journal_entry, notice: 'Journal entry was successfully created.' }\n format.json { render :show, status: :created, location: @journal_entry ...
[ "0.71913964", "0.7173346", "0.7061463", "0.70607954", "0.6947829", "0.6655416", "0.6610405", "0.6596214", "0.6568244", "0.65659404", "0.65659404", "0.65285516", "0.650965", "0.64708704", "0.620524", "0.619079", "0.616931", "0.616931", "0.61516225", "0.6087114", "0.6069348", ...
0.7188357
1
GET /received_military_awards/1 GET /received_military_awards/1.json
def show @received_military_award = ReceivedMilitaryAward.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @received_military_award } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @received_military_award = ReceivedMilitaryAward.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @received_military_award }\n end\n end", "def index\n @awards = Award.all\n\n respond_to do |format|\n format.html # index.html.erb\n ...
[ "0.65621805", "0.646991", "0.6438723", "0.6372517", "0.6313913", "0.6227138", "0.6145704", "0.61416376", "0.6111631", "0.6102494", "0.6071152", "0.60607666", "0.6052165", "0.60434145", "0.6004905", "0.59942865", "0.59857273", "0.5957817", "0.5955591", "0.5932932", "0.59231603...
0.7279344
0
GET /received_military_awards/new GET /received_military_awards/new.json
def new @received_military_award = ReceivedMilitaryAward.new respond_to do |format| format.html # new.html.erb format.json { render json: @received_military_award } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @earned_award = EarnedAward.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @earned_award }\n end\n end", "def new\n @military_history = MilitaryHistory.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json...
[ "0.72206634", "0.72094625", "0.71627814", "0.71627814", "0.7156281", "0.7084936", "0.7019563", "0.7019563", "0.6953271", "0.69502616", "0.6930133", "0.6920164", "0.6903913", "0.68765646", "0.68741554", "0.6866669", "0.6853632", "0.68508035", "0.6850466", "0.6837476", "0.68235...
0.7955541
0
POST /received_military_awards POST /received_military_awards.json
def create @received_military_award = ReceivedMilitaryAward.new(params[:received_military_award]) respond_to do |format| if @received_military_award.save format.html { redirect_to @received_military_award.military_history.personal_detail, notice: 'Received military award was successfully created....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n AnalyticsEvent.create(remote_ip: request.remote_ip,\n device: @device,\n type: :available_awards,\n timestamp: Time.now,\n app_id: params[:app_id],\n device_token_id: params[:security_token],\n player_id:...
[ "0.6701179", "0.6252604", "0.60042924", "0.5766562", "0.5753559", "0.5690245", "0.56303674", "0.5592474", "0.5576632", "0.5551649", "0.5522462", "0.55163556", "0.5499189", "0.54909176", "0.54728395", "0.54196334", "0.5388795", "0.52911365", "0.52816397", "0.52816397", "0.5272...
0.64012086
1
PUT /received_military_awards/1 PUT /received_military_awards/1.json
def update @received_military_award = ReceivedMilitaryAward.find(params[:id]) respond_to do |format| if @received_military_award.update_attributes(params[:received_military_award]) format.html { redirect_to @received_military_award, notice: 'Received military award was successfully updated.' } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n if @person.seat\n render json: {errors: 'Cannot update a seated person'}, status: 422\n else\n @person.update person_params\n render json: @person\n end\n end", "def update\n @earned_award = EarnedAward.find(params[:id])\n\n respond_to do |format|\n if @earned_awa...
[ "0.6014259", "0.5958676", "0.58653355", "0.58640605", "0.5861835", "0.5825056", "0.580149", "0.57936376", "0.57873124", "0.57781255", "0.5777352", "0.5764734", "0.5763474", "0.57618135", "0.5754095", "0.5753783", "0.57090586", "0.5707507", "0.5707121", "0.57066214", "0.568998...
0.68999296
0
DELETE /received_military_awards/1 DELETE /received_military_awards/1.json
def destroy @received_military_award = ReceivedMilitaryAward.find(params[:id]) @received_military_award.destroy respond_to do |format| format.html { redirect_to received_military_awards_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @earned_award = EarnedAward.find(params[:id])\n @earned_award.destroy\n\n respond_to do |format|\n format.html { redirect_to earned_awards_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @mostsmallmission = Mostsmallmission.find(params[:id])\n @mos...
[ "0.6918385", "0.6883545", "0.6860852", "0.6841516", "0.68246317", "0.6801488", "0.6799054", "0.6794738", "0.678559", "0.67822355", "0.676338", "0.6761577", "0.6760937", "0.67443484", "0.6742607", "0.67266357", "0.6711576", "0.67050123", "0.66914976", "0.6691492", "0.66867006"...
0.76373786
0
Uses the forced class target os string if provided otherwise uses the target_os rbconfig hash element
def target_os @@forced ? @@forced.target : RbConfig::CONFIG['target_os'] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def os\n return @os if @os\n raw_os = RbConfig::CONFIG['target_os']\n match = raw_os.match(/([a-z]+)/)\n if match\n @os = match[1]\n else\n @os = raw_os\n end\n end", "def determine_os\n @os = \"linux\"\n end", "def determine_os\n @os = 'linux'\n end", "...
[ "0.7579521", "0.7099737", "0.7092007", "0.6853088", "0.67737395", "0.67733175", "0.67573994", "0.67098904", "0.6648079", "0.6648079", "0.66469115", "0.6602397", "0.6554584", "0.6549727", "0.65063745", "0.643014", "0.6418399", "0.6406627", "0.6352598", "0.6318869", "0.6281307"...
0.8209782
0
get connected scenario bacause child doesn't have information about scenario, only parent have this make it little bit more complicated (i don't know how to resolve that with belongs_to helper
def scenario if scenario_id _id = scenario_id elsif parent.scenario_id _id = parent.scenario_id else raise "Assosiation not found ScenarioStep\##{id}: scenario" end Scenario.find(_id) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parent_association\n if params[:id].nil?\n return parent_object.all_parent_relations \n end\n # Gotta find it seperately, will get a recursive stack error elsewise\n o = FeatureRelation.find(params[:id])\n parent_object.id == o.parent_node.id ? parent_object.all_child_relations : parent_obj...
[ "0.6172266", "0.61012626", "0.58392704", "0.58200943", "0.5762134", "0.5739043", "0.5701741", "0.56870514", "0.55739504", "0.5553499", "0.5500512", "0.54701334", "0.54675955", "0.54162765", "0.54162765", "0.54023427", "0.5385767", "0.5378102", "0.53576845", "0.53402275", "0.5...
0.63815737
0
GET /joborders GET /joborders.json
def index @joborders = Joborder.all respond_to do |format| format.html # index.html.erb format.json { render json: @joborders } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getorders(args={})\n {\n :method=> \"GetOrders\"\n }.to_json\n end", "def show\n @joborder = Joborder.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @joborder }\n end\n end", "def index\n @jobs = Job.all\n ...
[ "0.72330666", "0.7178598", "0.709438", "0.70934117", "0.7005013", "0.6961549", "0.6836287", "0.6830774", "0.6819829", "0.6811968", "0.6808421", "0.68024296", "0.6787688", "0.6787688", "0.6787688", "0.6787688", "0.67875016", "0.6746624", "0.6708471", "0.6636435", "0.6562491", ...
0.79305947
0
GET /joborders/1 GET /joborders/1.json
def show @joborder = Joborder.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @joborder } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @joborders = Joborder.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @joborders }\n end\n end", "def index\n @jobs = Job.all\n\n render json: @jobs\n end", "def index\n @jobs = Job.all\n render json: @jobs\n end", "def ...
[ "0.77260166", "0.69460213", "0.6945374", "0.6804507", "0.67637575", "0.66779363", "0.66142637", "0.660664", "0.66026855", "0.65999633", "0.65859336", "0.655686", "0.655686", "0.65530115", "0.6522168", "0.6519389", "0.6496731", "0.6496731", "0.6496731", "0.6496731", "0.6496414...
0.7448081
1
GET /joborders/new GET /joborders/new.json
def new @joborder = Joborder.new respond_to do |format| format.html # new.html.erb format.json { render json: @joborder } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @path = '/orders'\n @method = 'post'\n @order = Order.new\n @bundles = Bundle.all\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @order }\n end\n end", "def new\n @job = @user.jobs.new\n\n respond_to do |format|\n format.html...
[ "0.7503267", "0.7473107", "0.7473107", "0.74241", "0.7411779", "0.7411779", "0.7411779", "0.7411779", "0.7306565", "0.7272512", "0.727095", "0.72480536", "0.72480536", "0.72480536", "0.72480536", "0.72480536", "0.72480536", "0.72480536", "0.72480536", "0.72480536", "0.7248053...
0.8146601
0
POST /joborders POST /joborders.json
def create @joborder = Joborder.new(params[:joborder]) respond_to do |format| if @joborder.save format.html { redirect_to @joborder, notice: 'Joborder was successfully created.' } format.json { render json: @joborder, status: :created, location: @joborder } else format.html ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def submit_order()\n\tputs \"Submitting order\"\n\tdata = create_order()\n\tresponse = request_post(\"/api/order\", data)\n\tputs response.body\nend", "def create\n @order = Order.new( order_params )\n @order.system_id = Order.set_system_id\n respond_to do |format|\n if @order.save\n set_ord...
[ "0.6822477", "0.65741193", "0.641556", "0.6402564", "0.638631", "0.6377219", "0.6333789", "0.6303781", "0.6228141", "0.618629", "0.61784613", "0.617098", "0.61633426", "0.6126191", "0.612012", "0.61134124", "0.6097249", "0.60627747", "0.60567784", "0.60555965", "0.60419273", ...
0.72737914
0
PUT /joborders/1 PUT /joborders/1.json
def update @joborder = Joborder.find(params[:id]) respond_to do |format| if @joborder.update_attributes(params[:joborder]) format.html { redirect_to @joborder, notice: 'Joborder was successfully updated.' } format.json { head :no_content } else format.html { render action: "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n job = Job.find(params[:id])\n job.update_attributes(job_params)\n render json: job\n end", "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, suc...
[ "0.6864731", "0.6709599", "0.6669332", "0.6669332", "0.6669332", "0.65961415", "0.6450958", "0.62908435", "0.6281715", "0.62383914", "0.621988", "0.6192856", "0.61786115", "0.6174831", "0.61401606", "0.61192924", "0.61164886", "0.6111861", "0.6111861", "0.60842943", "0.607524...
0.71096945
0
DELETE /joborders/1 DELETE /joborders/1.json
def destroy @joborder = Joborder.find(params[:id]) @joborder.destroy respond_to do |format| format.html { redirect_to joborders_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @job.destroy\n respond_to do |format|\n format.html { redirect_to client_path(@job.client), notice: 'Job was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n #@job = Job.find(params[:id])\n @job.destroy\n\n respond_to do |format...
[ "0.7209454", "0.7171506", "0.7162323", "0.7162323", "0.7162323", "0.7162323", "0.71614647", "0.7158957", "0.7120576", "0.71204764", "0.71105045", "0.7043789", "0.70288324", "0.702715", "0.70267516", "0.70126605", "0.7011801", "0.70104575", "0.698932", "0.6984907", "0.69644266...
0.7663309
0
action_body generates code for the actions alert, warn and report
def action_body( name, actions ) pre = @run_type == 'realtime' ? 'rt-' : '' pp 'in action_body: ', actions if $options['debug.action'] code = '' init = '' # generate the action routines ( alert warn report ) %W( alert warn report ).each { |type| next unless a = actions.assoc( "#{pre}#{type...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def actions; end", "def report_body; end", "def report_body; end", "def alert_text(action, actor, own)\n text = ''\n owner = own ? 'Your' : \"#{self.actions.first.user.username}'s\"\n case action\n when :open\n text = \"An appeal has been opened by #{actor.username}, and your attention is re...
[ "0.63153887", "0.62673116", "0.62673116", "0.61008835", "0.6064805", "0.6064805", "0.6064805", "0.6064805", "0.6064805", "0.6026703", "0.5994188", "0.595815", "0.594353", "0.5937663", "0.593408", "0.59330535", "0.59132016", "0.59132016", "0.58847964", "0.5884008", "0.5879921"...
0.7419438
0
Returns the URL of the partnership subscription.
def url "#{@partnership.url}/#{@sport}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subscription_path\n @subscription_path ||= \"#{@app_id}/subscriptions\"\n end", "def subscribe_url\n nil\n end", "def p_url\n Rails.application.routes.url_helpers.rent_url(id, host: PUBLIC_URL)\n end", "def participatory_space_url\n return unless participatory_space\n\n ...
[ "0.6800968", "0.637889", "0.6358356", "0.611428", "0.6042513", "0.5989072", "0.59181005", "0.5818189", "0.57925355", "0.57446563", "0.5733308", "0.569968", "0.5692637", "0.5689249", "0.56272775", "0.56112415", "0.56022084", "0.5591289", "0.55777705", "0.5573614", "0.5573212",...
0.63858104
1
Returns the string representation of the partnership subscription.
def to_s "#{@partnership}/#{@sport}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_s\n context = @solution.map{|k, v| \"#{k}: #{v}\"}.join(',')\n \"#<Twilio.Api.V2010.ParticipantContext #{context}>\"\n end", "def to_s\n context = @solution.map {|k, v| \"#{k}: #{v}\"}.join(',')\n \"#<Twilio.Api...
[ "0.63486844", "0.63009405", "0.6190267", "0.61839914", "0.6173273", "0.6147168", "0.6144737", "0.61361897", "0.60976934", "0.5994626", "0.596916", "0.5958417", "0.59228957", "0.5907332", "0.5879435", "0.5879435", "0.5879435", "0.5879435", "0.58757275", "0.5868562", "0.581521"...
0.6305615
1
Gets the archiveFolder property value. Folder ID of an archive folder for the user.
def archive_folder return @archive_folder end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def archive_folder=(value)\n @archive_folder = value\n end", "def find_archive_folder(session)\n session.root_folder.inbox.folders_hash[archive_name]\n end", "def getFolderId\r\n\t\t\t\t\treturn @folderId\r\n\t\t\t\tend", "def getFolder\r\n\t\t\t\t\treturn @folder\r\n\t\...
[ "0.7492594", "0.6887537", "0.62906075", "0.6173752", "0.5944762", "0.5796997", "0.57326865", "0.56843567", "0.568333", "0.56577224", "0.56497824", "0.5634936", "0.5536816", "0.551457", "0.551457", "0.5494278", "0.5469745", "0.53931296", "0.53584564", "0.53401494", "0.5289084"...
0.76694703
0
Sets the archiveFolder property value. Folder ID of an archive folder for the user.
def archive_folder=(value) @archive_folder = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def archive_folder\n return @archive_folder\n end", "def setFolder(folder)\r\n\t\t\t\t\t@folder = folder\r\n\t\t\t\tend", "def set_Folder(value)\n set_input(\"Folder\", value)\n end", "def setFolderId(folderId)\r\n\t\t\t\t\t@folderId = folderId\r\n\t\t\t\tend", "def se...
[ "0.64540654", "0.64090866", "0.6156308", "0.60494286", "0.59550655", "0.59550655", "0.59550655", "0.59550655", "0.59550655", "0.5944457", "0.5857157", "0.5836847", "0.5801596", "0.5801596", "0.5801596", "0.5801596", "0.5801596", "0.5801596", "0.5801596", "0.5801596", "0.58015...
0.84844166
0
Gets the automaticRepliesSetting property value. Configuration settings to automatically notify the sender of an incoming email with a message from the signedin user.
def automatic_replies_setting return @automatic_replies_setting end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def automatic_replies_setting=(value)\n @automatic_replies_setting = value\n end", "def automatic_request_settings\n return @automatic_request_settings\n end", "def automatic_request_settings=(value)\n @automatic_request_settings = value\n ...
[ "0.7163272", "0.63190573", "0.59585047", "0.5912463", "0.57380044", "0.56495816", "0.5533765", "0.5484523", "0.54439825", "0.5415924", "0.5412935", "0.5395799", "0.53835183", "0.5377462", "0.5362243", "0.53344196", "0.53248227", "0.5217402", "0.5207289", "0.5177326", "0.50923...
0.7697603
0
Sets the automaticRepliesSetting property value. Configuration settings to automatically notify the sender of an incoming email with a message from the signedin user.
def automatic_replies_setting=(value) @automatic_replies_setting = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def automatic_replies_setting\n return @automatic_replies_setting\n end", "def is_automatic_reply=(value)\n @is_automatic_reply = value\n end", "def automatic_request_settings=(value)\n @automatic_request_settings = value\n end", "...
[ "0.6822833", "0.6713982", "0.6289495", "0.5588022", "0.55188656", "0.546792", "0.54372686", "0.54132044", "0.5353292", "0.5351751", "0.5206471", "0.51514184", "0.5145858", "0.5129303", "0.50958824", "0.5095475", "0.50902945", "0.5056865", "0.49820963", "0.49577883", "0.494530...
0.7837424
0
Gets the dateFormat property value. The date format for the user's mailbox.
def date_format return @date_format end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getPostDateFormat\r\n\t\t\t\t\treturn @postDateFormat\r\n\t\t\t\tend", "def getPostDateFormat\r\n\t\t\t\t\treturn @postDateFormat\r\n\t\t\t\tend", "def email_date\n strftime(MO.email_time_format)\n end", "def typus_date_format(attribute = 'default')\n date_format = Typus::Configuration.config[se...
[ "0.66002554", "0.66002554", "0.6214974", "0.6062022", "0.59519476", "0.59424645", "0.5941183", "0.5831806", "0.58312064", "0.57232684", "0.57232684", "0.57200235", "0.5677057", "0.5605191", "0.5590546", "0.554753", "0.5543279", "0.5485773", "0.54245955", "0.5394001", "0.53757...
0.6976592
0
Sets the dateFormat property value. The date format for the user's mailbox.
def date_format=(value) @date_format = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_date_format(format)\n @date_format = format\n end", "def set_date_format(format)\n @date_format = format\n end", "def setPostDateFormat(postDateFormat)\r\n\t\t\t\t\t@postDateFormat = postDateFormat\r\n\t\t\t\tend", "def setPostDateFormat(postDateFormat)\r\n\t\t\t\t\t@postDateFormat = postDat...
[ "0.6704843", "0.66959864", "0.6348353", "0.6348353", "0.6042807", "0.5917451", "0.5870429", "0.5794345", "0.5783376", "0.5749023", "0.5738653", "0.563487", "0.5480481", "0.54154366", "0.5379154", "0.53580886", "0.53580886", "0.53580886", "0.5342594", "0.533325", "0.5306964", ...
0.6773503
0
Gets the delegateMeetingMessageDeliveryOptions property value. If the user has a calendar delegate, this specifies whether the delegate, mailbox owner, or both receive meeting messages and meeting responses. Possible values are: sendToDelegateAndInformationToPrincipal, sendToDelegateAndPrincipal, sendToDelegateOnly.
def delegate_meeting_message_delivery_options return @delegate_meeting_message_delivery_options end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delegate_meeting_message_delivery_options=(value)\n @delegate_meeting_message_delivery_options = value\n end", "def get_delivery_options\n # do we use the custom mail configuration?\n if custom?\n smtp_settings = {\n user_name: username,\n ...
[ "0.7060266", "0.52433944", "0.44502187", "0.44502187", "0.44298565", "0.44253704", "0.43419883", "0.4331671", "0.4315281", "0.4299133", "0.42820314", "0.42778954", "0.4221963", "0.42154476", "0.41981578", "0.41911644", "0.41872016", "0.41589576", "0.4156511", "0.40980086", "0...
0.7504897
0
Sets the delegateMeetingMessageDeliveryOptions property value. If the user has a calendar delegate, this specifies whether the delegate, mailbox owner, or both receive meeting messages and meeting responses. Possible values are: sendToDelegateAndInformationToPrincipal, sendToDelegateAndPrincipal, sendToDelegateOnly.
def delegate_meeting_message_delivery_options=(value) @delegate_meeting_message_delivery_options = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delegate_meeting_message_delivery_options\n return @delegate_meeting_message_delivery_options\n end", "def delegate_to(message, options={})\n @delegate_to = message\n @delegate_to_options = options.dup\n end", "def delivery_options(address, port, domain, user_name, pa...
[ "0.6729351", "0.5225721", "0.4757383", "0.47456416", "0.47456416", "0.46231768", "0.44896737", "0.43360424", "0.4306249", "0.4260269", "0.4242165", "0.42421436", "0.41594586", "0.41378972", "0.41370222", "0.40842706", "0.40418", "0.40252024", "0.39941868", "0.3958082", "0.393...
0.7801652
0
Gets the language property value. The locale information for the user, including the preferred language and country/region.
def language return @language end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def locale\n if self.language\n LANGUAGE_CODE[self.language]\n end\n end", "def language\n fetch('nation.language')\n end", "def language(property)\n @languages.fetch(property.to_s, @default_language) if !coerce(property)\n end", "def language\n attributes.fetch(:lang...
[ "0.784643", "0.7569638", "0.7244632", "0.7214411", "0.7214411", "0.7191342", "0.7154726", "0.7101789", "0.7097437", "0.70843494", "0.7076733", "0.7073885", "0.70332164", "0.70299935", "0.6969518", "0.6962422", "0.6962321", "0.6958056", "0.69397014", "0.69397014", "0.69397014"...
0.7687384
1
Sets the language property value. The locale information for the user, including the preferred language and country/region.
def language=(value) @language = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_Language(value)\n set_input(\"Language\", value)\n end", "def set_Language(value)\n set_input(\"Language\", value)\n end", "def set_Language(value)\n set_input(\"Language\", value)\n end", "def set_Language(value)\n set_input(\"Language\", valu...
[ "0.7811526", "0.7810653", "0.7810653", "0.7809744", "0.7809744", "0.7732096", "0.7650019", "0.7607669", "0.75849515", "0.742092", "0.7384843", "0.7334091", "0.7317718", "0.7317718", "0.7226759", "0.71918344", "0.71495783", "0.71477705", "0.7032184", "0.69707197", "0.69667614"...
0.82116574
0
Gets the timeFormat property value. The time format for the user's mailbox.
def time_format return @time_format end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_format=(value)\n @time_format = value\n end", "def time_format=(format)\n @time_format = HOUR_FORMAT_OPTIONS[format]\n end", "def time_format format_type=nil\n\n format =I18n.t(\"time.formats.default_time_only\")\n if format_type==\"jquery_time\" then\n r...
[ "0.7261872", "0.7099333", "0.68931955", "0.67342806", "0.6529003", "0.63324004", "0.6316583", "0.6291746", "0.6191396", "0.6191396", "0.6054055", "0.6037356", "0.5995396", "0.5994066", "0.5979035", "0.5965895", "0.59261185", "0.5919596", "0.59080327", "0.5885156", "0.5871485"...
0.7984599
0
Sets the timeFormat property value. The time format for the user's mailbox.
def time_format=(value) @time_format = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_format=(format)\n @time_format = HOUR_FORMAT_OPTIONS[format]\n end", "def time_format\n return @time_format\n end", "def setCreatedTimeFormat(createdTimeFormat)\r\n\t\t\t\t\t@createdTimeFormat = createdTimeFormat\r\n\t\t\t\tend", "def setCreatedTimeFormat(createdT...
[ "0.8072849", "0.64076746", "0.6394196", "0.6394196", "0.61504567", "0.609613", "0.606858", "0.60595", "0.605692", "0.592688", "0.592688", "0.592688", "0.587719", "0.57931304", "0.5740293", "0.57159203", "0.56984645", "0.5662664", "0.5649511", "0.564873", "0.564035", "0.5627...
0.8174866
0
Gets the userPurpose property value. The purpose of the mailbox. Differentiates a mailbox for a single user from a shared mailbox and equipment mailbox in Exchange Online. Possible values are: user, linked, shared, room, equipment, others, unknownFutureValue. Readonly.
def user_purpose return @user_purpose end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_purpose=(value)\n @user_purpose = value\n end", "def getLoanPurposeObjName\r\n\t\t return \"mfiforce__loan_purpose__c\"\r\n\t\tend", "def purpose\n return nil unless metadata.purpose\n\n metadata.purpose.to_s[0].upcase\n end", "def purpose(*purpose...
[ "0.7282891", "0.57330114", "0.55710423", "0.5474152", "0.52083725", "0.47678584", "0.47321412", "0.4723589", "0.47060373", "0.47037706", "0.46722388", "0.4660151", "0.46032146", "0.46025664", "0.45255828", "0.44609678", "0.44052422", "0.43974695", "0.4359968", "0.43351403", "...
0.7441244
0
Sets the userPurpose property value. The purpose of the mailbox. Differentiates a mailbox for a single user from a shared mailbox and equipment mailbox in Exchange Online. Possible values are: user, linked, shared, room, equipment, others, unknownFutureValue. Readonly.
def user_purpose=(value) @user_purpose = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_purpose\n return @user_purpose\n end", "def purpose(*purpose)\n purpose.any? ? @purpose = purpose[0] : @purpose\n end", "def groups_set_purpose(params = {})\n fail ArgumentError, \"Required arguments 'channel' missing\" if params['channel'].nil?\n fa...
[ "0.60878", "0.58134675", "0.5692968", "0.54200643", "0.5347412", "0.51382834", "0.4860224", "0.47714", "0.4662807", "0.465428", "0.46376318", "0.463651", "0.463651", "0.45862105", "0.45489234", "0.45428076", "0.45320246", "0.4531362", "0.45242727", "0.45168173", "0.45168173",...
0.7918241
0
Gets the workingHours property value. The days of the week and hours in a specific time zone that the user works.
def working_hours return @working_hours end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def working_hours=(value)\n @working_hours = value\n end", "def weekly_hours\n worked_hours\n end", "def working_hours?\n @test_time = @time if @test_time.nil?\n @test_time.working_hours?\n end", "def get_working_hours_total\n @total_hours = 0.0\n unless @save...
[ "0.786711", "0.7138975", "0.6773593", "0.65880144", "0.6467964", "0.641083", "0.6084804", "0.6064469", "0.6035889", "0.6009209", "0.59926987", "0.59926987", "0.59804225", "0.5980248", "0.5942385", "0.5932737", "0.592621", "0.5926002", "0.592334", "0.592334", "0.5921045", "0...
0.84045225
0
Sets the workingHours property value. The days of the week and hours in a specific time zone that the user works.
def working_hours=(value) @working_hours = value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_working_hour\n @working_hour = WorkingHour.find(params[:id])\n end", "def working_hours\n return @working_hours\n end", "def hours_per_week= (hours_per_week)\n # fill in later\n end", "def work_week=(days)\n config[:work_week] = days\n self._w...
[ "0.678414", "0.66119134", "0.6494498", "0.6361874", "0.62766266", "0.6262541", "0.59932745", "0.5931773", "0.5918847", "0.58641344", "0.5843045", "0.58418643", "0.5740123", "0.56894076", "0.5564785", "0.54737455", "0.54630977", "0.54326105", "0.54293203", "0.54227376", "0.540...
0.83011883
0
GET /vertices_scene2s GET /vertices_scene2s.json
def index @vertices_scene2s = VerticesScene2.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_vertices_scene2\n @vertices_scene2 = VerticesScene2.find(params[:id])\n end", "def index\n @vertices_scene1s = VerticesScene1.all\n end", "def create\n @vertices_scene2 = VerticesScene2.new(vertices_scene2_params)\n\n respond_to do |format|\n if @vertices_scene2.save\n for...
[ "0.76108634", "0.71250796", "0.68744576", "0.6858587", "0.66479087", "0.6580277", "0.6563325", "0.63371736", "0.62536013", "0.62093425", "0.6060087", "0.6052024", "0.59370047", "0.58969504", "0.5871672", "0.5854104", "0.5835152", "0.58008033", "0.5775089", "0.5751591", "0.574...
0.8055361
0
POST /vertices_scene2s POST /vertices_scene2s.json
def create @vertices_scene2 = VerticesScene2.new(vertices_scene2_params) respond_to do |format| if @vertices_scene2.save format.html { redirect_to @vertices_scene2, notice: 'Vertices scene2 was successfully created.' } format.json { render :show, status: :created, location: @vertices_scen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_vertices_scene2\n @vertices_scene2 = VerticesScene2.find(params[:id])\n end", "def create\n @vertices_scene1 = VerticesScene1.new(vertices_scene1_params)\n\n respond_to do |format|\n if @vertices_scene1.save\n format.html { redirect_to @vertices_scene1, notice: 'Vertices scene1 ...
[ "0.72995764", "0.7144357", "0.7131055", "0.70339286", "0.6874049", "0.6770989", "0.64274627", "0.63618356", "0.6289375", "0.61330026", "0.6066593", "0.60505193", "0.6041845", "0.6027563", "0.6011105", "0.5991994", "0.5981399", "0.5961633", "0.595232", "0.5942919", "0.5883758"...
0.7774906
0
PATCH/PUT /vertices_scene2s/1 PATCH/PUT /vertices_scene2s/1.json
def update respond_to do |format| if @vertices_scene2.update(vertices_scene2_params) format.html { redirect_to @vertices_scene2, notice: 'Vertices scene2 was successfully updated.' } format.json { render :show, status: :ok, location: @vertices_scene2 } else format.html { render :...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @vertices_scene1.update(vertices_scene1_params)\n format.html { redirect_to @vertices_scene1, notice: 'Vertices scene1 was successfully updated.' }\n format.json { render :show, status: :ok, location: @vertices_scene1 }\n else\n format.html...
[ "0.76619744", "0.7460731", "0.707716", "0.70289004", "0.6797241", "0.65950936", "0.6567008", "0.65485406", "0.6461438", "0.6445436", "0.6433863", "0.638966", "0.6325282", "0.6230958", "0.6215633", "0.6202658", "0.61933726", "0.6171808", "0.6152034", "0.6147132", "0.61291176",...
0.7742234
0