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
Return an array of lambdas that multiply by the arguments
def multipliers(*args) x = nil args.map {|x| lambda {|y| x*y }} end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def multipliers(*args)\n x = nil\n args.map {|x| lambda {|y| x*y }} \nend", "def multipliers(*args)\n x = nil \n args.map {|x| lambda{|y| x*y} }\nend", "def multiple_lambda(arg)\n puts [1,2,3].map { |x| arg.call(x) }\nend", "def product(*args)\n args.map! { |x| Rubinius::Type.coerce_to(x, Array...
[ "0.7990888", "0.78802836", "0.691712", "0.6845003", "0.68264866", "0.6745118", "0.67195624", "0.6706147", "0.66665363", "0.66164184", "0.65291363", "0.6519791", "0.6511596", "0.64437294", "0.64103234", "0.639484", "0.6380405", "0.6343877", "0.63372105", "0.6327419", "0.629461...
0.79104203
1
Process the answer text specified by the param 'answer.text' for the specified problem params :id = the id of the Problem :sequence_id = the id of the Sequence the problem is in :answer = student answer, expected to be formatted: choose_1: hash, :body => answer.body choose_n: hash, for each answer: answer.id => (0|1) (...
def process_answer @problem = Problem.find(params[:id]) unless params[:answer] @message = "You did not submit an answer; please make sure to select/type an answer." render_tutor :file => "notice_message" else ActiveRecord::Base.transaction do if (@problem.correct?(params[:answer]))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def evaluate_answer(answer)\n question = answer.question.actable\n answer_text_array = answer.normalized_answer_text.downcase.gsub(/([^a-z ])/, ' ').split(' ')\n answer_text_lemma_array = []\n answer_text_array.each { |a| answer_text_lemma_array.push(WordNet::Synset.morphy_all(a).first || a) }\n\n h...
[ "0.5899886", "0.57397425", "0.57197946", "0.5694619", "0.56915677", "0.56915677", "0.5528814", "0.5501526", "0.54874325", "0.5464522", "0.54565215", "0.54348356", "0.54293317", "0.5424796", "0.5424796", "0.541272", "0.5377156", "0.5351968", "0.5345317", "0.5321978", "0.531332...
0.59215873
0
If a student requests help on a problem that has scaffolds, push them into the scaffold, otherwise get the next hint for the problem specified by the param 'problem_id'. session['hint_cout'] is the number of hints shown so far, and renders the hint params :problem_id = the id of the problem to get the next hint of
def request_help @problem = Problem.find params[:problem_id], :include => :hints, :order => "hints.position" @hints = @problem.hints if @problem.has_scaffolds? ActiveRecord::Base.transaction do changed_and_notify_observers(:answer => { :incorrect => nil, :problem => @problem}) flash[:m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def help_student_out\n\n if @problem.has_scaffolds?\n\n # the problem has scaffolds, so push the user into the first scaffolding problem\n reset_hints\n @sequence = Sequence.find params[:sequence_id] unless params[:sequence_id].nil?\n @parent = @problem\n @problem = @parent.scaffold.pro...
[ "0.68438554", "0.64707196", "0.60058945", "0.5810771", "0.556419", "0.55267286", "0.53537023", "0.52281475", "0.5223159", "0.5183811", "0.5154309", "0.5143162", "0.5132326", "0.5121342", "0.5067096", "0.50421655", "0.50377", "0.5035361", "0.49523696", "0.49311468", "0.4927065...
0.7843927
0
When the tutor page loads it makes an ajax request for onload. This is a hook for resuming and tutor extensions params :problem_id = problem of the assistment being loaded
def load_tutor ActiveRecord::Base.transaction do resume_tutor end render_tutor :file => "load_tutor" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def begin_assistment(assistment)\n @main_problem = assistment.problem\n reset_hints\n changed_and_notify_observers(:begin_problem => @main_problem)\n render_tutor :template => \"assistment\"\n end", "def next_assistment\n reset_hints\n @sequence = Sequence.find(params[:sequence_id])\n @main...
[ "0.5863581", "0.5455854", "0.5413556", "0.5389837", "0.5338065", "0.5154772", "0.51269174", "0.5118367", "0.51071185", "0.50519794", "0.5035349", "0.5023713", "0.5015225", "0.49761045", "0.49746668", "0.4967411", "0.49608526", "0.49504158", "0.4946107", "0.4939316", "0.492666...
0.61072737
0
Shows the student help, be it scaffolding or incorrect messages or hints Note: only should be called from process_answer, so keep private
def help_student_out if @problem.has_scaffolds? # the problem has scaffolds, so push the user into the first scaffolding problem reset_hints @sequence = Sequence.find params[:sequence_id] unless params[:sequence_id].nil? @parent = @problem @problem = @parent.scaffold.problems.first ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_help\n display banner\n display \"\"\n display short_help\n display \"\"\n end", "def help\r\n\tputs \"-to add new student: add student\"\r\n\tputs \"-to display all students: display students\"\r\n\tputs \"-to display all subjects: display subjects\"\r\n\tputs \"-to update a grad...
[ "0.708482", "0.70244694", "0.6828962", "0.6828962", "0.6768292", "0.67299813", "0.66889715", "0.6583827", "0.6583827", "0.6583609", "0.6529532", "0.65132856", "0.6502692", "0.6502692", "0.6502692", "0.6502692", "0.6502692", "0.6502692", "0.6502692", "0.6492428", "0.646906", ...
0.7160714
0
Begin the assignment class_assignment = the assignment to begin
def begin_assignment(class_assignment) start_assignment(class_assignment) ActiveRecord::Base.transaction do changed_and_notify_observers(:begin_assignment => @class_assignment) begin_sequence(@class_assignment.sequence) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resume_assignment(class_assignment)\n start_assignment(class_assignment)\n ActiveRecord::Base.transaction do\n begin_sequence(@class_assignment.sequence)\n end\n end", "def start_assignment(class_assignment)\n @class_assignment = class_assignment\n session[:assignment_id] = @class_assign...
[ "0.7267498", "0.72235566", "0.6438112", "0.61979544", "0.6053754", "0.6040036", "0.5946263", "0.59229594", "0.581159", "0.5806761", "0.580509", "0.5711093", "0.57070225", "0.56535685", "0.5619692", "0.5564679", "0.5506426", "0.54588515", "0.54523665", "0.54290473", "0.5429047...
0.7946161
0
Resume the assignment; does not notify of the begin here! class_assignment = the assignment to resume
def resume_assignment(class_assignment) start_assignment(class_assignment) ActiveRecord::Base.transaction do begin_sequence(@class_assignment.sequence) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def begin_assignment(class_assignment)\n start_assignment(class_assignment)\n ActiveRecord::Base.transaction do\n changed_and_notify_observers(:begin_assignment => @class_assignment)\n begin_sequence(@class_assignment.sequence)\n end\n end", "def resume\n\t\traise NotImplementedError\n\tend",...
[ "0.68989164", "0.6550779", "0.6495271", "0.6495271", "0.64433205", "0.6376616", "0.6349607", "0.6318638", "0.62974125", "0.62804973", "0.62804973", "0.62349826", "0.6230775", "0.61118716", "0.61072046", "0.6056515", "0.59928423", "0.5983355", "0.59816986", "0.59689325", "0.58...
0.81864285
0
Starts an assignment class_assignment = the assignment to start
def start_assignment(class_assignment) @class_assignment = class_assignment session[:assignment_id] = @class_assignment.id end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def begin_assignment(class_assignment)\n start_assignment(class_assignment)\n ActiveRecord::Base.transaction do\n changed_and_notify_observers(:begin_assignment => @class_assignment)\n begin_sequence(@class_assignment.sequence)\n end\n end", "def begin_assignment(assignment)\n @session...
[ "0.77876914", "0.7071398", "0.69383043", "0.6244062", "0.6204371", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.61806875", "0.6040642", ...
0.821628
0
Begin the sequence sequence = the sequence to begin
def begin_sequence(sequence) @sequence = sequence session[:assignment_id] = nil if @class_assignment.nil? # Find the next Assistment (gives us the current on if we're not done with it) @next_up = @sequence.next_assistment(session[:assignment_id], current_user) # Begin the assistment if we found it...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start; @sequence[0]; end", "def setSequence(sequence) \r\n\t\t\t\t\t@sequence = sequence\r\n\t\t\t\tend", "def initialize(sequence:)\n @sequence = sequence\n end", "def sequence\n @sequence\n end", "def sequence\n return @sequence\n end", "def initialize\n ...
[ "0.77155775", "0.65727615", "0.6572126", "0.6544094", "0.6493504", "0.6413152", "0.6375708", "0.63313717", "0.62326276", "0.6194107", "0.61217016", "0.61217016", "0.612128", "0.6112325", "0.60905796", "0.60816467", "0.6053912", "0.60517436", "0.60442644", "0.60370106", "0.601...
0.6965925
1
Begin the assistment assistment = the assistment to begin
def begin_assistment(assistment) @main_problem = assistment.problem reset_hints changed_and_notify_observers(:begin_problem => @main_problem) render_tutor :template => "assistment" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def begin_sequence(sequence)\n @sequence = sequence\n session[:assignment_id] = nil if @class_assignment.nil?\n\n # Find the next Assistment (gives us the current on if we're not done with it)\n @next_up = @sequence.next_assistment(session[:assignment_id], current_user)\n\n # Begin the assistment if...
[ "0.62126577", "0.5869681", "0.58683646", "0.5832322", "0.5724537", "0.5706221", "0.5704701", "0.56819224", "0.55979276", "0.5572753", "0.5523822", "0.5497056", "0.5484616", "0.5484442", "0.54651666", "0.54623777", "0.5417032", "0.54125744", "0.5409858", "0.54072106", "0.54072...
0.7230427
0
If this user has a progress for this sequence with a nil assignment, remove it. Note: This means any type of resuming will not be available when previewing sequences. You will observe that especially in a RandomSection, where you refresh the preview and keep getting a new first problem. Arguments: sequence: sequence to...
def initialize_preview(sequence) progress = sequence.progress(nil, current_user) progress.destroy unless progress.nil? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_no_progress(*params)\n\t\tself.each{|x| safe{x.remove(*params)} if x.respond_to?('remove')}\n\tend", "def destroy\n \n @sequence = Sequence.first(:seq_id=>params[:id].to_i) #current_user.sequences.first(:seq_id=>params[:id].to_i)#Sequence.get(params[:id])\n debugger\n @sequence.destroy!\n\...
[ "0.54071707", "0.5270055", "0.5255837", "0.5230683", "0.51876724", "0.5124187", "0.51149625", "0.5094205", "0.50560385", "0.5031859", "0.50132877", "0.500028", "0.49975795", "0.49932176", "0.4990891", "0.49744543", "0.49712986", "0.49712634", "0.49598584", "0.49504092", "0.49...
0.6825857
0
Reset the hint counter to indicate that no hints are currently shown. effects: session[:hint_count] is 1
def reset_hints logger.info "hint_count = #{session[:hint_count]}, resetting to -1" session[:hint_count] = -1 logger.info "hint_count = #{session[:hint_count]}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_initial_values\n self.hints_used = 0\n end", "def hint!(hint = nil)\n mutate(:hint, hint)\n end", "def set_hint\n @hint = Hint.find(params[:id])\n end", "def hint(hint = nil)\n set_option(:hint, hint)\n end", "def hint=(value)\n @hint = value\n ...
[ "0.6632687", "0.6358544", "0.59981614", "0.5985987", "0.5864733", "0.58062726", "0.5798576", "0.57944226", "0.570967", "0.5668652", "0.56157726", "0.5613364", "0.5585491", "0.5569764", "0.5561625", "0.5539803", "0.5535753", "0.5531101", "0.5519193", "0.5462449", "0.5425067", ...
0.87632895
0
GET /project_categories/new GET /project_categories/new.xml
def new @project_category = ProjectCategory.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @project_category } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @new_project = Project.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @new_project }\n end\n end", "def new\n @title = t(\"h2.categories\")\n @category = Category.new\n\n respond_to do |format|\n format.html # new.html.erb\n ...
[ "0.7101813", "0.7031246", "0.6990551", "0.6982382", "0.6965359", "0.6930829", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.693057", "0.69216835", ...
0.78604364
0
DELETE /project_categories/1 DELETE /project_categories/1.xml DELETE /project_categories/1.fxml
def destroy @project_category = ProjectCategory.find(params[:id]) @project_category.destroy respond_to do |format| format.html { redirect_to(project_categories_url) } format.xml { head :ok } format.fxml { render :fxml => @project_category } format.amf { render :amf => @project_cat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @retain_node_selector = RetainNodeSelector.find(params[:id])\n @retain_node_selector.destroy\n\n respond_to do |format|\n format.html { redirect_to(retain_node_selectors_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @project_category.destroy\n respond_t...
[ "0.6248816", "0.6192847", "0.6189908", "0.6188798", "0.61819845", "0.61805123", "0.6111812", "0.6101334", "0.6085564", "0.6066144", "0.6027458", "0.60216856", "0.60184115", "0.60165435", "0.6015889", "0.5987892", "0.59758323", "0.5970805", "0.59694004", "0.59611565", "0.59566...
0.647362
0
GET /cms/themes GET /cms/themes.json
def index @cms_themes = current_portal.themes end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @themes = Theme.all\n json_response(@themes)\n end", "def index\n @subthemes = Subtheme.all\n\n render json: @subthemes\n end", "def get_theme\n respond theme, 200, {'Content-Type' => 'text/plain'}\n end", "def fetch_themes(options={})\n url = build_url options\n themes = ...
[ "0.7893088", "0.72740996", "0.7234276", "0.7005321", "0.69381523", "0.68720514", "0.6851747", "0.6851747", "0.6842243", "0.6724387", "0.67204005", "0.67122674", "0.66356134", "0.662822", "0.662822", "0.6592406", "0.6589331", "0.6562291", "0.65290695", "0.6516809", "0.6512422"...
0.7533169
1
POST /cms/themes POST /cms/themes.json
def create @cms_theme = current_portal.themes.build(cms_theme_params) respond_to do |format| if @cms_theme.save format.html { redirect_to cms_themes_path, notice: "Theme #{@cms_theme.name} was successfully created." } format.json { render :index, status: :created, location: @cms_theme } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n if !current_group.shapado_version.has_custom_js?\n params[:theme].delete(:javascript)\n end\n if !current_group.shapado_version.has_custom_themes?\n params[:theme].delete(:javascript)\n params[:theme].delete(:layout_html)\n params[:theme].delete(:questions_index_html)\n ...
[ "0.721426", "0.7016913", "0.6941967", "0.6907182", "0.6875543", "0.68518716", "0.6756731", "0.67421544", "0.671163", "0.6700734", "0.66862607", "0.6474598", "0.64503306", "0.64166856", "0.64166856", "0.6414082", "0.64026046", "0.63826907", "0.63644654", "0.63614184", "0.63548...
0.7530813
0
PATCH/PUT /cms/themes/1 PATCH/PUT /cms/themes/1.json
def update respond_to do |format| if @cms_theme.update(cms_theme_params) format.html { redirect_to cms_themes_path, notice: "Theme #{@cms_theme.name} was successfully updated." } format.json { render :index, status: :ok, location: @cms_theme } else format.html { render :edit } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n if !current_group.shapado_version.has_custom_js?\n params[:theme].delete(:javascript)\n end\n if !current_group.shapado_version.has_custom_themes?\n params[:theme].delete(:javascript)\n params[:theme].delete(:layout_html)\n params[:theme].delete(:questions_index_html)\n ...
[ "0.73824835", "0.72103924", "0.7003184", "0.7003184", "0.7003184", "0.6955693", "0.694776", "0.6846973", "0.6779558", "0.6722963", "0.66224146", "0.6610542", "0.658184", "0.6524069", "0.6520081", "0.6476765", "0.6456132", "0.6446476", "0.63508385", "0.6320686", "0.6248324", ...
0.72894377
1
DELETE /cms/themes/1 DELETE /cms/themes/1.json
def destroy tname = @cms_theme.name @cms_theme.destroy respond_to do |format| format.html { redirect_to cms_themes_url, notice: "Theme #{tname} was successfully destroyed." } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @theme = current_group.themes.find(params[:id])\n @theme.destroy\n respond_to do |format|\n format.html { redirect_to(themes_url) }\n format.json { head :ok }\n end\n end", "def destroy\n @theme.destroy\n respond_to do |format|\n format.html { redirect_to adminthe...
[ "0.7851794", "0.7706489", "0.747603", "0.74460495", "0.74460495", "0.74112314", "0.73783803", "0.7346299", "0.7341367", "0.73393273", "0.7298347", "0.72922355", "0.728045", "0.72670764", "0.72247", "0.7072377", "0.70672166", "0.69960487", "0.6891453", "0.6862824", "0.6788968"...
0.79375565
0
Generates the contents of the module.modulemap file.
def generate <<-MODULE_MAP.strip_heredoc #{module_specifier_prefix}module #{target.product_module_name}#{module_declaration_attributes} { #{headers.join("\n ")} export * module * { export * } } MODULE_MAP end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_module_definition\n get_module_definition_file_name\n file = get_module_definition_file\n file.write(get_renderer(ProfileTemplates.module_definition_template))\n end", "def generate\n <<-MODULE_MAP.strip_heredoc\n framework module #{target.product_module_name} {\n ...
[ "0.7067548", "0.70397544", "0.65133184", "0.6388239", "0.63563585", "0.6338982", "0.6289069", "0.59619033", "0.5917532", "0.59038866", "0.5892097", "0.5792903", "0.5764935", "0.576123", "0.5746657", "0.5727084", "0.5727084", "0.5727084", "0.5688828", "0.564525", "0.562026", ...
0.72657776
0
The prefix to `module` to prepend in the module map. Ensures that only framework targets have `framework` prepended.
def module_specifier_prefix if target.requires_frameworks? 'framework ' else '' end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prefixed_label(package)\n label = ( package =~ /^#{$prefix}(.*)$/ ) && $1 || package\n label = '.' if label.empty?\n label\nend", "def prepended_modules; end", "def module_name\n (i = name.index(\"::\")) ? name[0..i-1] : name\n end", "def prefix\n \"#{name}::\"\n end", "def prefix(nu...
[ "0.6204197", "0.61253226", "0.59575367", "0.57217586", "0.5719684", "0.5624722", "0.5587495", "0.5568734", "0.552103", "0.5507154", "0.549659", "0.5444399", "0.5440374", "0.54304063", "0.54150313", "0.54132855", "0.53969586", "0.5365252", "0.53509134", "0.53503543", "0.534984...
0.74405086
0
GET /portions/1 GET /portions/1.json
def show @portion = Portion.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @portion } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_portions_with_http_info(name, slide_index, shape_index, paragraph_index, password = nil, folder = nil, storage = nil, sub_shape = nil)\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: SlidesApi.get_portions ...'\n end\n\n # verify the required paramete...
[ "0.6646501", "0.60743207", "0.60742426", "0.6055341", "0.5948229", "0.57642984", "0.57569546", "0.57415015", "0.5689772", "0.5683002", "0.567669", "0.56552345", "0.5640661", "0.560722", "0.5605083", "0.55988485", "0.55961615", "0.55728745", "0.55619794", "0.5513005", "0.55089...
0.6691603
0
GET /portions/new GET /portions/new.json
def new @portion = Portion.new respond_to do |format| format.html # new.html.erb format.json { render json: @portion } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @prob = Prob.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @prob }\n end\n end", "def new\n @distribution = Distribution.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @distribution ...
[ "0.672625", "0.66733426", "0.6628267", "0.6604458", "0.6579318", "0.6573868", "0.65199393", "0.64789796", "0.64682996", "0.64622706", "0.64550567", "0.6433738", "0.64094865", "0.6408561", "0.6402145", "0.6400933", "0.63804245", "0.63685566", "0.6343675", "0.6333863", "0.63305...
0.7359692
0
PUT /portions/1 PUT /portions/1.json
def update @portion = Portion.find(params[:id]) respond_to do |format| if @portion.update_attributes(portion_params) format.html { redirect_to @portion, notice: 'Portion was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit" } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n # @person = Person.find(params[:id])\n # @person.pct_complete = @person.requirement_progress\n respond_to do |format|\n if @person.update_attributes(params[:person])\n format.html { redirect_to @person, :notice => 'Person was successfully updated.' }\n format.json { head :n...
[ "0.5802962", "0.5792815", "0.5771799", "0.57631135", "0.57588285", "0.57467693", "0.57368326", "0.5706787", "0.5689776", "0.5666877", "0.56130123", "0.5577766", "0.5564208", "0.5531885", "0.553107", "0.55005854", "0.5494341", "0.5492873", "0.54921633", "0.548862", "0.5484597"...
0.6143856
0
DELETE /portions/1 DELETE /portions/1.json
def destroy @portion = Portion.find(params[:id]) @portion.destroy respond_to do |format| format.html { redirect_to portions_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete\n render json: Item.delete(params[\"id\"])\n end", "def delete\n client.delete(\"/#{id}\")\n end", "def delete(*rest) end", "def delete_portions_with_http_info(name, slide_index, shape_index, paragraph_index, portions = nil, password = nil, folder = nil, storage = nil, sub_shape = nil)...
[ "0.6594877", "0.65476537", "0.6515514", "0.6476508", "0.64532423", "0.64456683", "0.64133865", "0.63978666", "0.63837117", "0.63482326", "0.6346147", "0.6342285", "0.63354266", "0.6332718", "0.63289714", "0.63277847", "0.63090146", "0.6300496", "0.6292338", "0.62783563", "0.6...
0.70704156
0
Public: Create a new order on the specified symbol for the authenticated account options The Hash which hosts various REST query params. :symbol The String of which trading pair to create the order on. :side The String determining which side to create the order on. :type The String determining what type of order it is....
def create_order(options) request :account, :post, 'order', options end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conditional_new_with_http_info(side, symbol, order_type, qty, base_price, stop_px, time_in_force, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ConditionalApi.conditional_new ...'\n end\n # verify the required parameter 'side' is set\n i...
[ "0.67751443", "0.61303395", "0.6124307", "0.6081301", "0.60476345", "0.58866614", "0.57158345", "0.5612469", "0.5597483", "0.5522463", "0.55079037", "0.54830754", "0.54683083", "0.54648197", "0.54087293", "0.53777003", "0.53365", "0.5324106", "0.53176373", "0.529743", "0.5291...
0.6132457
1
Public: Create a test order on the specified symbol for the authenticated account options The Hash which hosts various REST query params. :symbol The String of which trading pair to create the order on. :side The String determining which side to create the order on. :type The String determining what type of order it is...
def create_test_order(options) request :account, :post, 'order/test', options end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def conditional_new_with_http_info(side, symbol, order_type, qty, base_price, stop_px, time_in_force, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ConditionalApi.conditional_new ...'\n end\n # verify the required parameter 'side' is set\n i...
[ "0.6624426", "0.6112447", "0.60501313", "0.5945942", "0.5928519", "0.57455355", "0.5673348", "0.56520844", "0.5454309", "0.54093623", "0.5380087", "0.53307676", "0.53138036", "0.5300096", "0.5294888", "0.5291926", "0.5272777", "0.5243171", "0.52430755", "0.5241531", "0.523606...
0.6199832
1
Public: Query an orders status on the specified symbol for the authenticated account. One must send either an :orderId or :origOrderId, but not both. options The Hash which hosts various REST query params. :symbol The String of which trading pair to query from (optional). :orderId The String determining which order to ...
def query_order(options) request :account, :get, 'order', options end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def order_query_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: OrderApi.order_query ...'\n end\n # resource path\n local_var_path = '/v2/private/order'\n\n # query parameters\n query_params = {}\n query_params[:'...
[ "0.6706447", "0.57608306", "0.56512463", "0.56506246", "0.56328195", "0.56189376", "0.5615394", "0.555208", "0.5441758", "0.53886485", "0.5386614", "0.5380608", "0.53074384", "0.5275381", "0.5237191", "0.5224376", "0.5211199", "0.52067494", "0.517712", "0.5169724", "0.5164703...
0.5859155
1
Public: Cancel the order specified for the authenticated account. One must send either an :orderId or :origOrderId, but not both. options The Hash which hosts various REST query params. :symbol The String of which trading pair to delete from (optional). :orderId The String determining which order to cancel (optional). ...
def cancel_order(options) request :account, :delete, 'order', options end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def order_cancel_with_http_info(symbol, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: OrderApi.order_cancel ...'\n end\n # verify the required parameter 'symbol' is set\n if @api_client.config.client_side_validation && symbol.nil?\n f...
[ "0.7151339", "0.6844501", "0.6647767", "0.65457785", "0.64356554", "0.63642", "0.6317179", "0.6292255", "0.6264645", "0.61907256", "0.6178571", "0.61391026", "0.59826005", "0.5861006", "0.58549476", "0.58191717", "0.57856923", "0.57641184", "0.55803865", "0.5563786", "0.55373...
0.6966155
1
Public: Retrieve open orders for the authenticated account options The Hash which hosts various REST query params. :symbol The String of which trading pair to retrieve (optional). :recvWindow The Number of how long a request is valid for in milliseconds (optional). Returns a Hash with the request response
def open_orders(options) request :account, :get, 'openOrders', options end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def private_get_open_orders_by_currency_get_with_http_info(currency, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: TradingApi.private_get_open_orders_by_currency_get ...'\n end\n # verify the required parameter 'currency' is set\n if @api_cl...
[ "0.63513863", "0.6157208", "0.6153611", "0.6086163", "0.6019289", "0.59612817", "0.59551907", "0.5941278", "0.5912046", "0.5764546", "0.5761895", "0.5589597", "0.55299824", "0.54985815", "0.5490895", "0.54891783", "0.5484573", "0.54554516", "0.54534626", "0.5408401", "0.53860...
0.7339558
0
Public: Retrieve all orders of the specified symbol for the authenticated account options The Hash which hosts various REST query params. :symbol The String of which trading pair to retrieve. :orderId The String determining which order to start the data from (optional). :limit The Number of how many trades to request (...
def all_orders(options) request :account, :get, 'allOrders', options end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def orders params={}\n params = get_defaults(params)\n path = join_params(params, :currency_pair, :book, :limit)\n request(:get, \"/stats/orders/#{path}\")\n end", "def query_order(options)\n request :account, :get, 'order', options\n end", "def open_orders(options)\n ...
[ "0.6564115", "0.63287276", "0.6269262", "0.61011636", "0.5973901", "0.5938831", "0.57796514", "0.57796514", "0.5670781", "0.56673044", "0.56441826", "0.56310385", "0.5622658", "0.55724895", "0.5520236", "0.55201364", "0.54678315", "0.54099077", "0.54000926", "0.53950185", "0....
0.6515827
1
Public: Retrieve account information for the authenticated account options The Hash which hosts various REST query params. :recvWindow The Number of how long a request is valid for in milliseconds (optional). Returns a Hash with the request response
def account_info(options = {}) request :account, :get, 'account', options end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def account_info()\n response = @session.do_get build_url(\"/account/info\")\n parse_response(response)\n end", "def get_account\n as_json(get_results('/account'))\n end", "def getaccountdetails(params = {})\n request :getaccountdetails, params.merge( :parser => :hash)\n end", ...
[ "0.64172304", "0.63194996", "0.6257746", "0.61884224", "0.6016922", "0.6008329", "0.59770477", "0.5954892", "0.593748", "0.58918655", "0.58797365", "0.5865784", "0.5806325", "0.5776514", "0.57586455", "0.57562643", "0.5735206", "0.5704303", "0.570065", "0.56858945", "0.565560...
0.6878117
0
GET /publishers/new GET /publishers/new.json
def new @publisher = Publisher.new respond_to do |format| format.html # new.html.erb format.json { render json: @publisher } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @publisher = Publisher.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @publisher }\n end\n end", "def new\n @published = Published.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @p...
[ "0.7298441", "0.71591556", "0.7065738", "0.6991764", "0.6893819", "0.68046474", "0.6774935", "0.67428064", "0.6721182", "0.6721107", "0.6701258", "0.6607325", "0.658774", "0.6586458", "0.6581901", "0.6581901", "0.6581901", "0.65719026", "0.65272254", "0.65245736", "0.6517964"...
0.7364308
0
DELETE /publishers/1 DELETE /publishers/1.json
def destroy @publisher = Publisher.find(params[:id]) @publisher.destroy respond_to do |format| format.html { redirect_to publishers_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deletePublisher( publisher_id)\n params = Hash.new\n params['publisher_id'] = publisher_id\n return doCurl(\"delete\",\"/publisher\",params)\n end", "def destroy\n @publisher.destroy\n respond_to do |format|\n format.html { redirect_to publishers_url, notice: 'Publisher was successfully ...
[ "0.73221904", "0.7257485", "0.7237698", "0.7102088", "0.7052849", "0.69781244", "0.6940649", "0.6940649", "0.6929163", "0.68650997", "0.68585014", "0.68214566", "0.68214566", "0.6802157", "0.67710805", "0.6745408", "0.6741929", "0.67175996", "0.6682601", "0.66762435", "0.6584...
0.75259465
1
GET /pagos/new GET /pagos/new.json
def new @cliente = Cliente.find(params[:cliente_id]) @pago = @cliente.pagos.new respond_to do |format| format.html # new.html.erb format.json { render json: @pago } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @pagamento = Pagamento.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @pagamento }\n end\n end", "def new\n @page = current_site.pages.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @...
[ "0.78108805", "0.7589573", "0.7574396", "0.7574396", "0.7574396", "0.7574396", "0.7574396", "0.751107", "0.75005895", "0.7452341", "0.74482673", "0.7428952", "0.74005204", "0.73917687", "0.73905385", "0.73629624", "0.7362877", "0.7346907", "0.73042214", "0.72749203", "0.72513...
0.7599859
1
PUT /pagos/1 PUT /pagos/1.json
def update @cliente = Cliente.find(params[:cliente_id]) @pago = @cliente.pagos.find(params[:id]) respond_to do |format| if @pago.update_attributes(params[:pago]) format.html { redirect_to [@cliente, @pago], notice: 'Pago was successfully updated.' } format.json { head :no_content } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @pago.update(pago_params)\n format.html { redirect_to @pago, notice: 'Pago was successfully updated.' }\n format.json { render :show, status: :ok, location: @pago }\n else\n format.html { render :edit }\n format.json { render json: @...
[ "0.62496865", "0.62496865", "0.622705", "0.6223003", "0.6219581", "0.6163311", "0.6103855", "0.60394585", "0.60174", "0.6008745", "0.5990688", "0.5968428", "0.5920804", "0.5896565", "0.58930534", "0.58242935", "0.579178", "0.5767951", "0.5767951", "0.5767951", "0.5767951", ...
0.64114434
0
GET /submissions/1 GET /submissions/1.json
def show @submission = Submission.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @submission } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @submissions = Contests.get_contest_submissions(params[:id])\n unless @submissions.nil?\n render json: @submissions\n return\n end\n end", "def show\n @submission = Submission.find(params[:id])\n respond_to do |format|\n format.html # show.html.erb\n format.json { r...
[ "0.75976753", "0.6980844", "0.68887013", "0.68887013", "0.68887013", "0.68887013", "0.6793104", "0.6693824", "0.65924597", "0.65682155", "0.65682155", "0.6524869", "0.6435726", "0.6354281", "0.634649", "0.6322576", "0.63194156", "0.63111156", "0.63008237", "0.62865794", "0.62...
0.69953114
1
POST /submissions POST /submissions.json
def create @submission = Submission.new(:student_id => current_student.id, :assignment_id => params[:assignment_id]) respond_to do |format| if @submission.save @assignment = @submission.assignment @assignment.questions.each do |question| answer = SubmittedAnswer.new(:submission...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @submission = current_user.submissions.create!(submission_params)\n flash[:notice] = \"submission created\"\n redirect_to @submission\n end", "def create\n @submission = Submission.new(submission_params)\n\n respond_to do |format|\n if @submission.save\n SubmissionsMailer...
[ "0.64286584", "0.6397784", "0.6364488", "0.62865955", "0.6269671", "0.62547904", "0.62334865", "0.6227906", "0.62200016", "0.6184718", "0.61777997", "0.6162035", "0.6142178", "0.61313593", "0.6130356", "0.61297196", "0.6063857", "0.6063857", "0.6063857", "0.6063857", "0.60592...
0.66237307
0
GET /produtors GET /produtors.json
def index @produtors = Produtor.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n if is_my_resource(params[:prossumer_id])\n @products = Product.where(prossumer_id: params[:prossumer_id]).as_json({\n cycle_id: params[:cycle_id],\n ...
[ "0.6557552", "0.6476077", "0.6318458", "0.63125676", "0.6129906", "0.610393", "0.60885614", "0.607033", "0.60284793", "0.6010327", "0.6009324", "0.6004722", "0.59816337", "0.5980739", "0.5969821", "0.59402907", "0.5909553", "0.5909205", "0.5907719", "0.5899621", "0.58838993",...
0.69310397
0
POST /produtors POST /produtors.json
def create @produtor = Produtor.new(produtor_params) respond_to do |format| if @produtor.save format.html { redirect_to @produtor, notice: 'Produtor was successfully created.' } format.json { render :show, status: :created, location: @produtor } else format.html { render :ne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @profesor = Profesor.new(profesor_params)\n\n if @profesor.save\n render json: @profesor, status: :created, location: @profesor\n else\n render json: @profesor.errors, status: :unprocessable_entity\n end\n end", "def create\n @prod = Prod.new(params[:prod])\n\n respond_t...
[ "0.63210547", "0.62858576", "0.61918646", "0.6125815", "0.6105179", "0.6096999", "0.60850567", "0.60728115", "0.6050375", "0.6050375", "0.6050375", "0.60334283", "0.60108876", "0.5974802", "0.5970934", "0.59542656", "0.59488547", "0.59413743", "0.5913448", "0.5907909", "0.590...
0.6494978
0
Pubblic: Create a new concurrent auditlog tailer logfile The concurrent auditlog index file txlogdir The concurrent auditlog log directory Returns the instance
def initialize(logfile, txlogdir) @logfile = logfile.logfile @txlogdir = Dir.new(txlogdir) @processed_tx_files = [] @remove_parsed_tx = true @prune_old_tx = true Modsec::logger.debug 'created a new concurrent tailer' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def log_file_creation()\n\tcurrent_path = File.dirname(File.realpath(__FILE__))\n\t$csv_path = \"#{current_path}/Attachments.csv\"\n\tif !File.directory?(\"#{current_path}/logs\")\n\t\tFileUtils.mkdir_p \"#{current_path}/logs\"\n\tend\n\t$log_path = \"#{current_path}/logs/jira-attachment-upload.txt\"\n\t$log = Log...
[ "0.59802157", "0.5785496", "0.5735534", "0.5545969", "0.55411935", "0.54869103", "0.54207546", "0.54205513", "0.5415624", "0.53991795", "0.538583", "0.5372893", "0.5372443", "0.53633374", "0.535324", "0.53119934", "0.5307196", "0.5303366", "0.5291817", "0.5278765", "0.5264875...
0.7270942
0
Public: Parse the next transaction from the auditlog index file Returns an instance of Modsec::Transaction or nil if EOF is reached
def process_next_tx begin tx = nil until tx do tx = process_tx(@logfile.readline) end rescue EOFError return nil end tx end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_tx(line)\n txoverview = Modsec::Parser::parse_concurrent_log_entry(line)\n\n unless txoverview\n Modsec::logger.warn(\"Couldn't parse tx concurrent log line: '#{line}'\")\n return nil\n end\n\n txfile = @txlogdir.path + txoverview[:transaction_file]\n\n ...
[ "0.55455077", "0.5316867", "0.4979841", "0.48850667", "0.4806015", "0.47921914", "0.47539812", "0.46391192", "0.45394135", "0.45386395", "0.45197752", "0.45144287", "0.44992986", "0.44803238", "0.44603866", "0.4434593", "0.44273487", "0.44226816", "0.44032505", "0.43925223", ...
0.67319745
0
Private: process a single line of the concurrent auditlog line A line from the concurrent auditlog index file This will parse the line, open the respective concurrent auditlog TX file, parse the file and return a Transaction object Returns an instance of Modsec::Transaction
def process_tx(line) txoverview = Modsec::Parser::parse_concurrent_log_entry(line) unless txoverview Modsec::logger.warn("Couldn't parse tx concurrent log line: '#{line}'") return nil end txfile = @txlogdir.path + txoverview[:transaction_file] unless File.e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_next_tx\n begin\n tx = nil\n until tx do\n tx = process_tx(@logfile.readline)\n end\n rescue EOFError\n return nil\n end\n tx\n end", "def transaction_import_process(send_transaction)\n readcsv\n check\n sa...
[ "0.6210335", "0.55313915", "0.5364846", "0.52613634", "0.5053828", "0.49689135", "0.49256468", "0.49065277", "0.49010754", "0.48996603", "0.48405823", "0.4835453", "0.47865784", "0.47743332", "0.47418046", "0.47240716", "0.472083", "0.46847156", "0.46836886", "0.46810862", "0...
0.78791016
0
Public: Persist progress of the tailer Removes all succesfully parsed auditlog transaction files and record position of the auditlog index file Returns nothing.
def checkpoint remove_processed_tx_files Modsec::Tailer.write_resume_file(@logfile) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear_completed!\n update\n [@@logs[:todo], @@logs[:metrics]].each do |file|\n\tputs \"FILE: #{file.inspect}\"\n FileUtils.rm(file)\n FileUtils.touch(file)\n end\n @@todo.each do |line|\n add_todo(line)\n end\n end", "def notify_on_parsing_log\n open(OPER...
[ "0.5634515", "0.557394", "0.54195607", "0.54151386", "0.53489983", "0.5215128", "0.5209628", "0.51734716", "0.51238775", "0.5055174", "0.5039582", "0.5007863", "0.49745056", "0.4945315", "0.4945085", "0.4933544", "0.49272394", "0.48866582", "0.4880861", "0.4873037", "0.486582...
0.6716071
0
Private: Remove all successfully parsed transaction files Returns nothing.
def remove_processed_tx_files unless @remove_parsed_tx Modsec::logger.debug('Not removing processed TX, disabled in instance') return end @processed_tx_files.each do |txfile| Modsec::logger.debug("Removing #{txfile}") File.unlink(txfile) end ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_up\n @files.each {|file| FileUtils.remove(file.path)}\n end", "def remove_stale_files() = stale_files.each { |file| remove_file(file) }", "def cleanup\n\t\tfile_count = 0\n\t\tif File.directory?(@file_path)\n\t\t\tDir.foreach(@file_path) do |f|\n\t\t\t\tfile_count += 1\n\t\t\t fn = File.join(@fi...
[ "0.7074895", "0.66263336", "0.65485567", "0.65006226", "0.64961237", "0.64789474", "0.6401841", "0.6389227", "0.636788", "0.6358601", "0.6312191", "0.6312191", "0.62496746", "0.62254566", "0.6223179", "0.621139", "0.6197034", "0.61917496", "0.61879975", "0.61841255", "0.61824...
0.78892195
0
Public: Close the tailer Does a checkpoint of the tailer state and closes the auditlog index logfile. Returns nothing.
def close checkpoint @logfile.close end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close_logfile\n return unless @__current_logfile\n\n @__current_logfile.close\n logfile = @__current_logfile\n @__current_logfile = nil\n logfile\n end", "def close_exit\n HIST_FH.close\n history\n exit\nend", "def close\n @log_file.clos...
[ "0.6061603", "0.595778", "0.59212905", "0.5785464", "0.56928444", "0.56582886", "0.5645451", "0.5631678", "0.5559082", "0.5516392", "0.54150707", "0.5412264", "0.54066086", "0.54019713", "0.5376007", "0.5375453", "0.5361372", "0.53362846", "0.5330335", "0.5329529", "0.5319795...
0.71792966
0
GET /spent_points/new GET /spent_points/new.xml
def new @spent_point = SpentPoint.new @users = User.all @user = User.find(params[:user_id]) respond_to do |format| format.html # new.html.erb format.xml { render :xml => @spent_point } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @point = Point.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @point }\n end\n end", "def new\n @point = Point.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @point }\n end\n en...
[ "0.7117816", "0.71022725", "0.7024511", "0.6981992", "0.6975542", "0.6857582", "0.6797067", "0.6694133", "0.66869944", "0.6633076", "0.6631635", "0.66045296", "0.6592728", "0.65587014", "0.65486777", "0.6544051", "0.65328926", "0.65298104", "0.6520911", "0.6504039", "0.649374...
0.7292484
0
POST /spent_points POST /spent_points.xml
def create @spent_point = SpentPoint.new(params[:spent_point]) respond_to do |format| if @spent_point.save format.html { redirect_to(@spent_point, :notice => 'SpentPoint was successfully created.') } format.xml { render :xml => @spent_point, :status => :created, :location => @spent_point...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @points_spent = PointsSpent.new(params[:points_spent])\n\n # Ensure user has enough points to make the purchase\n @student = Student.find(params[:points_spent][:student_id])\n @reward = Reward.find(params[:points_spent][:reward_id])\n if (@student.xp_gained - @student.xp_used) >= @rewar...
[ "0.6549753", "0.65219164", "0.6379686", "0.61524487", "0.6119713", "0.5971126", "0.5953579", "0.595017", "0.59442884", "0.5886112", "0.5871973", "0.5819792", "0.5817079", "0.5815847", "0.57370937", "0.57246614", "0.57217366", "0.5721121", "0.5718663", "0.5710546", "0.57098603...
0.71658796
0
PUT /spent_points/1 PUT /spent_points/1.xml
def update @spent_point = SpentPoint.find(params[:id]) respond_to do |format| if @spent_point.update_attributes(params[:spent_point]) format.html { redirect_to(@spent_point, :notice => 'SpentPoint was successfully updated.') } format.xml { head :ok } else format.html { rend...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @points_spent = PointsSpent.find(params[:id])\n\n respond_to do |format|\n if @points_spent.update_attributes(params[:points_spent])\n format.html { redirect_to @points_spent, notice: 'Points spent was successfully updated.' }\n format.json { head :no_content }\n else\n ...
[ "0.71722007", "0.6528848", "0.64901394", "0.6474536", "0.62908524", "0.6265939", "0.62528586", "0.62137496", "0.6200369", "0.6171869", "0.61660904", "0.6112646", "0.6094417", "0.60544044", "0.60427785", "0.6032659", "0.60236984", "0.6020894", "0.60071385", "0.59923047", "0.59...
0.755289
0
DELETE /spent_points/1 DELETE /spent_points/1.xml
def destroy @spent_point = SpentPoint.find(params[:id]) @spent_point.destroy respond_to do |format| format.html { redirect_to(spent_points_url) } format.xml { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @point = Point.find(params[:id])\n @point.destroy\n\n respond_to do |format|\n format.html { redirect_to(points_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @point = Point.find(params[:id])\n @point.destroy\n\n respond_to do |format|\n format.h...
[ "0.6737008", "0.6737008", "0.6737008", "0.66925377", "0.64875734", "0.6480205", "0.64600444", "0.64552796", "0.6451266", "0.64254457", "0.6386445", "0.6353665", "0.63108546", "0.62710667", "0.62223905", "0.62015545", "0.61959606", "0.61828196", "0.618136", "0.61737585", "0.61...
0.7281607
0
Return an array config for build an Ext.grid.ColumnModel() config If +json+ false we return the Hash object, else a JSON pretty printed string
def column_fields(json=true) data = @data.map do |data| data = data.dup editor = parse_column_editor(data.delete("editor")) renderer = parse_column_renderer(data.delete("renderer")) data.merge!(editor) if editor data.merge!(renderer) if renderer ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_json *args\n\t\t\tto_h(args[0].is_a?(Hash) && args[0][:include_config]).to_json(*args)\n\t\tend", "def to_config\n HashWithIndifferentAccess.new({\n type: self.class.to_s,\n config: self.config,\n prices: self.prices,\n source_type: self.source\n })\n end", "d...
[ "0.5576605", "0.5430428", "0.5420474", "0.5382795", "0.538116", "0.53640294", "0.53260046", "0.53189516", "0.5308214", "0.53043926", "0.5281385", "0.5250974", "0.5208037", "0.5202623", "0.5169936", "0.51382625", "0.51274353", "0.50852805", "0.50852805", "0.5078347", "0.504461...
0.57494646
0
Return a searched and paginated data collection for the ExtJS Ext.data.GroupingStore() json You can pass options like: If options has key +json+ false we return the Hash object, else a JSON string Examples: store_data(params, :include => :posts)
def store_data(params={}, options={}) # Some can tell me that this method made two identical queries one for count one for paginate. # We don't use the select count because in some circumstances require much time than select *. params[:limit] ||= 50 json = params.has_key?(:js...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fetch\n sort = 'created_at DESC'\n\n case params[:sort_by]\n when 'recent'\n sort = 'created_at DESC'\n else\n\n end\n\n q = '%' + params[:query].downcase + '%'\n\n groups = Group.where(\"LOWER(name) LIKE ? OR LOWER(identifier) LIKE ? OR lower(tags) LIKE ?\", q, q, q)\n ...
[ "0.58546", "0.57846767", "0.56981665", "0.5650725", "0.56096524", "0.56056494", "0.55674136", "0.55622333", "0.5444162", "0.54066324", "0.53746456", "0.536976", "0.53464645", "0.53236455", "0.5323094", "0.53159755", "0.5311147", "0.5248444", "0.5234387", "0.5232781", "0.52095...
0.676865
0
do some process on reboot
def on_reboot next_runlevel = `/sbin/runlevel`.split[1].strip yield if next_runlevel == '6' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reboot\r\n raise Shells::NotRunning unless running?\r\n raise Shells::PfSenseCommon::RestartNow\r\n end", "def reboot!\n self.reboot(\"HARD\")\n end", "def on_restart(&block); end", "def reboot\n node.update!(alive: false)\n run(\"reboot\")\n end", "def reboot(_hard = false)...
[ "0.74230707", "0.72173876", "0.71085536", "0.70257056", "0.7004664", "0.6799233", "0.67312765", "0.6623752", "0.66194296", "0.65984607", "0.6575253", "0.655906", "0.6529424", "0.6527814", "0.6518031", "0.6514547", "0.64400303", "0.63667065", "0.6360549", "0.6340377", "0.63275...
0.7717663
0
convert this to a job so that it can be stored to JobStore
def to_job job = Patriot::JobStore::Job.new(self.job_id) job.read_command(self) return job end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def job\n job_name.constantize.new({\n :context => self\n })\n end", "def job\n OSC::Machete::Job.new(\n script: script,\n pbsid: pbsid,\n host: host || workflow.batch_host,\n torque_helper: ResourceMgrAdapter.new(workflow)\n )\n end", "def job\n JenkinsApi::Client::...
[ "0.67330796", "0.6381972", "0.63314044", "0.63314044", "0.631235", "0.6309635", "0.62588936", "0.6219287", "0.61936456", "0.6182663", "0.6145101", "0.6095482", "0.6086502", "0.6086502", "0.607602", "0.6039809", "0.60102874", "0.600626", "0.6005834", "0.5999348", "0.59787935",...
0.7853954
0
build the identifier of the job for this command. This method should be overriden in subclasses
def job_id raise NotImplementedError end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def job_id=(value)\n @job_id = value.to_s\n end", "def create_job_id\n application_job_overrides_method!(__method__)\n\n # default implementation for framework jobs\n Generators.generate_uuid(self)\n end", "def getJobId()\n return @helper.getJobId()\n end...
[ "0.73411506", "0.723612", "0.71205235", "0.71205235", "0.71205235", "0.71205235", "0.71205235", "0.71205235", "0.71205235", "0.7105371", "0.704065", "0.6999826", "0.6897487", "0.6821001", "0.6708073", "0.6634066", "0.65867674", "0.6489131", "0.64263344", "0.633312", "0.633262...
0.76510274
0
mark this job to skip execution
def skip param 'state' => Patriot::JobStore::JobState::SUCCEEDED end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def skip_wait\n @skip_wait = true\n end", "def skip!\n @skip ||= true\n end", "def skip_wait=(setting)\n @skip_wait = setting\n end", "def skip\n @skip = true\n end", "def markSkipped message = nil\n raise SkippedTest, message\n end", "def skipped!\n ...
[ "0.6870566", "0.6838327", "0.66426295", "0.66373897", "0.6562219", "0.65084994", "0.6483027", "0.6420004", "0.64199656", "0.6393537", "0.6393537", "0.63807493", "0.63807493", "0.6331711", "0.6312151", "0.6311608", "0.62913036", "0.627054", "0.6269526", "0.62497795", "0.624283...
0.7654069
0
mark this job to suspend execution
def suspend param 'state' => Patriot::JobStore::JobState::SUSPEND end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suspend_job!(job)\n job.run_callbacks :suspend do\n job.suspend!\n job.save! do\n analyze_workflow_state(job)\n end\n end\n end", "def suspend!\n return if suspended?\n self.status = \"suspended\"\n self.stop = Time.now.to_s\n end", "de...
[ "0.7677102", "0.7519089", "0.74229974", "0.7386513", "0.73253286", "0.7255551", "0.72083807", "0.7112789", "0.703697", "0.7010824", "0.6999732", "0.69245905", "0.68195313", "0.6797364", "0.672594", "0.66997707", "0.6648461", "0.6429336", "0.6420272", "0.6302986", "0.6127449",...
0.79495174
0
validate values of command attributes
def validate_command_attrs self.class.validation_logics.each do |attr, logics| val = self.instance_variable_get("@#{attr}".to_sym) logics.each do |l| unless l.call(self, attr, val) raise "validation error : #{attr}=#{val} (#{self.class})" end e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_command(command)\n command_validator.validate(command)\n end", "def _entry_4_validatecommand(*args)\n\n end", "def validate_attrs\n @target.present? && !@target.errors.any? && @actor.present? && @action_key.present?\n end", "def validate_hashes\n super unless BYPASS_COMMANDS.in...
[ "0.7074861", "0.6768838", "0.67445433", "0.672914", "0.6624143", "0.6525728", "0.65106153", "0.6483904", "0.64454925", "0.64391565", "0.642974", "0.642974", "0.64255446", "0.6392191", "0.63749796", "0.6222121", "0.609374", "0.60848284", "0.60794675", "0.6072997", "0.60620505"...
0.8526071
0
add a sub command
def add_subcommand raise "sub command is not supported" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_sub_command(command)\n @sub_commands << command\n end", "def subcommands(cmd); end", "def subcommands(cmd); end", "def subcommand() __subcommand__ end", "def subcommands() __subcommands__ end", "def __subcommand__!() @__subcommand__ end", "def subcommand!() __subcommand__! end", "def __su...
[ "0.83664924", "0.82296765", "0.82296765", "0.82121664", "0.7743552", "0.76952165", "0.75234264", "0.7502753", "0.7427184", "0.71906555", "0.69922704", "0.69879055", "0.69879055", "0.694591", "0.68125606", "0.68064135", "0.67982656", "0.678987", "0.67548573", "0.67371714", "0....
0.8389459
0
add a post processor
def add_post_processor(post_processor) @post_processors ||= [] @post_processors << post_processor end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def postprocessor(&block)\n @config.postprocessor = block\n end", "def register_postprocessor(mime_type, klass, proc = nil, &block)\n proc ||= block\n mutate_hash_config(:postprocessors, mime_type) do |processors|\n processors.push(wrap_processor(klass, proc))\n processors\n ...
[ "0.7330927", "0.7190586", "0.71394217", "0.70333445", "0.7014689", "0.7007618", "0.68882394", "0.6644415", "0.65988517", "0.6451257", "0.6400848", "0.6394727", "0.6085137", "0.6079436", "0.60603184", "0.60346526", "0.59923637", "0.59713763", "0.59577715", "0.5944701", "0.5937...
0.7959833
0
Setup the override of the erb file. We copy one file from the standard yard directory and copy that file to a temporary directory after which the copied file is patched. A few hooks that trigger the logic in the base_helper file.
def setup_override spec = Gem::Specification.find_by_name 'yard' erb = File.join(spec.gem_dir,"templates","default","fulldoc","html",ERB) # Create the subdirectory structure subdir = File.join(tmpdir,"default","fulldoc","html") FileUtils.mkdir_p subdir # Copy the erb target_file = File.join(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prepare_stubbed_script\n base = powershell_shell? ? \"bootstrap.ps1\" : \"bootstrap.sh\"\n config[:script] = File.join(sandbox_path, base)\n info(\"#{File.basename(config[:script])} not found \" \\\n \"so Kitchen will run a stubbed script. Is this intended?\")\n File.open(c...
[ "0.5823329", "0.5674627", "0.5616849", "0.5579969", "0.5559753", "0.5510844", "0.5499821", "0.5479635", "0.54503745", "0.543222", "0.5429064", "0.5380326", "0.5375377", "0.5310271", "0.5295638", "0.5273922", "0.5269803", "0.5263156", "0.52541727", "0.5246749", "0.52422816", ...
0.77730155
0
Format as date for API XML responses.
def api_date; utc.strftime(API_TIME_FORMAT); end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def api_date\n utc.strftime(MO.api_time_format)\n end", "def httpdate\n return \"#{self.day_name[0, 3]}, #{@t_day} #{self.month_name[0, 3]} #{@t_year} #{\"%02d\" % @t_hour}:#{\"%02d\" % @t_min}:#{\"%02d\" % @t_sec} GMT\"\n end", "def web_date; strftime(WEB_DATE_FORMAT); end", "def date_format\n ...
[ "0.710664", "0.6650012", "0.6564843", "0.654952", "0.65195906", "0.64993453", "0.64705384", "0.64080274", "0.64048666", "0.63887584", "0.6379236", "0.6346298", "0.6331141", "0.63261193", "0.6322829", "0.6294014", "0.62864584", "0.6240731", "0.6234927", "0.62178147", "0.621437...
0.7134129
0
Format as date for emails.
def email_date; strftime(EMAIL_TIME_FORMAT); end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def email_date\n strftime(MO.email_time_format)\n end", "def format_date\n chars = @date.split('')\n chars.pop(6)\n chars.join('')\n end", "def date_formatted\n date.strftime(\"%A %B %d, %Y\")\n end", "def format_date(date)\n date.strftime '%d-%m-%Y'\n end", "def format_date(d...
[ "0.78898466", "0.73499525", "0.71885467", "0.71829766", "0.71184826", "0.7090692", "0.70295334", "0.700633", "0.6986569", "0.6986569", "0.69707716", "0.6965271", "0.69462055", "0.6940831", "0.6940113", "0.69014025", "0.68855363", "0.6872169", "0.68641686", "0.68464005", "0.68...
0.7994869
0
Users who have the role cloud_resource_admin in ccadmin/cloud_admin
def list_cloud_resource_admins domain = domains(name: Rails.configuration.cloud_admin_domain).first return [] unless domain project = projects( domain_id: domain.id, name: Rails.configuration.cloud_admin_project, ).first return [] unless projec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def project_administrators\n people_with_the_role(Seek::Roles::PROJECT_ADMINISTRATOR)\n end", "def project_administrators\n people_with_the_role(Seek::Roles::PROJECT_ADMINISTRATOR)\n end", "def admin_index\n authorize User\n @users = current_user.org.users.includes(:roles)\n end", "def user_is...
[ "0.6614105", "0.6614105", "0.6498158", "0.6458977", "0.6440064", "0.6373635", "0.63690805", "0.6366887", "0.6331124", "0.63150024", "0.63018507", "0.6296956", "0.62965703", "0.6295073", "0.6294085", "0.62824625", "0.62772936", "0.62602645", "0.62557894", "0.62435824", "0.6243...
0.6918251
0
Returns admins for the given scope (e.g. project_id: PROJECT_ID, domain_id: DOMAIN_ID) This method looks recursively for project, parent_projects and domain admins until it finds at least one. It should always return a non empty list (at least the domain admins).
def list_scope_admins(scope = {}) role = find_role_by_name("admin") list_scope_assigned_users(scope.merge(role: role)) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_scope_assigned_users(options = {})\n admins = []\n project_id = options[:project_id]\n domain_id = options[:domain_id]\n role = options[:role]\n raise_error = options[:raise_error]\n\n # do nothing if role is nil\n return admins if role.nil?\n\n begi...
[ "0.6764609", "0.6630114", "0.599222", "0.58491737", "0.5819053", "0.5699281", "0.5562153", "0.5521447", "0.5496468", "0.54678255", "0.5442378", "0.5442378", "0.5430242", "0.54254174", "0.5420781", "0.53962195", "0.53556925", "0.5314262", "0.5298099", "0.5297418", "0.5297418",...
0.70337105
0
Returns assigned users for the given scope and role (e.g. project_id: PROJECT_ID, domain_id: DOMAIN_ID, role: ROLE) This method looks recursively for assigned users of project, parent_projects and domain.
def list_scope_assigned_users(options = {}) admins = [] project_id = options[:project_id] domain_id = options[:domain_id] role = options[:role] raise_error = options[:raise_error] # do nothing if role is nil return admins if role.nil? begin if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assignable_users\n users = project.assignable_users.to_a\n users << author if author && author.active?\n if assigned_to_id_was.present? && assignee = Principal.find_by_id(assigned_to_id_was)\n users << assignee\n end\n users.uniq.sort\n end", "def user_assignments\n harvest_client...
[ "0.597375", "0.5762093", "0.56076443", "0.552839", "0.5526004", "0.54818016", "0.5473853", "0.5473853", "0.5289423", "0.5289423", "0.5289423", "0.5278787", "0.52584", "0.5257308", "0.5257308", "0.5220349", "0.52159005", "0.5205715", "0.5199162", "0.5170026", "0.51611483", "...
0.7534337
0
Serves an empty favicon.
def favicon? return unless request.path == '/favicon.ico' headers['Content-Type'] = 'image/png' self.status = 200 self.body = '' raise FinishRequest end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def favicon?\n return unless request.path == '/favicon.ico'\n self.headers['Content-Type'] = 'image/png'\n self.status = 200\n self.body = ''\n raise FinishRequest\n end", "def page_favicon\n if block_given?\n set_page_favicon(yield)\n else\n em...
[ "0.6882424", "0.68565726", "0.6596365", "0.6448477", "0.643191", "0.6287149", "0.62820125", "0.6146", "0.6009062", "0.59031355", "0.5900919", "0.58869624", "0.57901937", "0.5760936", "0.5686538", "0.56011844", "0.5576296", "0.54499596", "0.54295963", "0.53964216", "0.53868043...
0.69168407
0
GET /service_classes GET /service_classes.json
def index @service_classes = ServiceClass.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fetch_classes_list\n uri = URI(BASE_URI + \"classes\")\n classes = make_request(uri)\n classes_instances = classes[\"results\"].map do |classes_data|\n Classes.new classes_data[\"name\"]\n end\n end", "def get_classes_with_http_info(_class, opts = {})\n if @api_client.config.debugging\...
[ "0.6789863", "0.6621691", "0.63298637", "0.63236415", "0.61987597", "0.61334", "0.61285555", "0.59891677", "0.5928077", "0.58948845", "0.58891", "0.58813244", "0.58697677", "0.58582324", "0.5852177", "0.58499783", "0.5840947", "0.5829543", "0.5829543", "0.58225894", "0.577341...
0.74693906
0
POST /service_classes POST /service_classes.json
def create @service_class = ServiceClass.new(service_class_params) respond_to do |format| if @service_class.save format.html { redirect_to @service_class, notice: 'Service class was successfully created.' } format.json { render action: 'show', status: :created, location: @service_class } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @classs = Classs.new(classs_params)\n\n respond_to do |format|\n if @classs.save\n format.html { redirect_to @classs, notice: 'Classs was successfully created.' }\n format.json { render :show, status: :created, location: @classs }\n else\n format.html { render :new...
[ "0.632215", "0.60935444", "0.6005553", "0.59551513", "0.594346", "0.5909758", "0.58714736", "0.58646196", "0.58397657", "0.57784164", "0.5698715", "0.56738406", "0.56334597", "0.5633354", "0.5625076", "0.5619984", "0.56195104", "0.5599393", "0.5583317", "0.5559719", "0.554009...
0.7125462
0
PATCH/PUT /service_classes/1 PATCH/PUT /service_classes/1.json
def update respond_to do |format| if @service_class.update(service_class_params) format.html { redirect_to @service_class, notice: 'Service class was successfully updated.' } format.json { head :no_content } else format.html { render action: 'edit' } format.json { render ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @clazz = Clazz.find(params[:id])\n\n respond_to do |format|\n if @clazz.update_attributes(params[:clazz])\n format.html { redirect_to @clazz, notice: 'Clazz was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: \"edit...
[ "0.62031806", "0.6070598", "0.60691464", "0.60532767", "0.60136473", "0.60026556", "0.5955125", "0.59423935", "0.58925736", "0.5872688", "0.58579516", "0.5857881", "0.5843052", "0.583704", "0.578493", "0.5759006", "0.5759006", "0.5741993", "0.5740972", "0.57320124", "0.573201...
0.70039785
0
DELETE /service_classes/1 DELETE /service_classes/1.json
def destroy @service_class.destroy respond_to do |format| format.html { redirect_to service_classes_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @test_class = TestClass.find(params[:id])\n @test_class.destroy\n\n respond_to do |format|\n format.html { redirect_to test_classes_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @classs.destroy\n respond_to do |format|\n format.html { redire...
[ "0.6904344", "0.68612945", "0.68365896", "0.6825152", "0.6816895", "0.67970586", "0.6792944", "0.67907", "0.67907", "0.67907", "0.6787986", "0.6761176", "0.67544466", "0.6741135", "0.6729059", "0.67279834", "0.6720431", "0.67175317", "0.6711432", "0.66879493", "0.6686034", ...
0.7877236
0
Pick a card from the top of the deck.
def pick raise NoMoreCardsException.new("Deck is empty") if cards_left == 0 @deck.shift end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def choose_card \n\n @cards.shift\n end", "def take_card\n @deck.shift\n end", "def top\n cards.first\n end", "def take_card\n raise OutOfCardsError if empty?\n @cards.pop\n end", "def pick(number, *cards)\n cards.flatten.first(number)\n end", "def pop_card_top\n ...
[ "0.7750942", "0.7604298", "0.7285924", "0.72373956", "0.7228401", "0.7102684", "0.70469075", "0.7034546", "0.7034546", "0.6975435", "0.69578624", "0.695459", "0.69164735", "0.6884154", "0.6759156", "0.6751524", "0.67156434", "0.6713867", "0.6696027", "0.6681386", "0.66700333"...
0.78834045
0
GET /resource_periods/1 GET /resource_periods/1.json
def show @title = "Show Resources Periods" @resource_period = ResourcePeriod.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render :json => @resource_period } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @period = Period.find(params[:id])\n\n render json: @period\n end", "def show\n period = current_user.school.periods.find(params[:id])\n render json: period\n end", "def get_periods\n @periods = current_user.periods.all.order(created_at: :desc)\n render json: @periods\n end", ...
[ "0.6927344", "0.67080575", "0.66240716", "0.6456188", "0.6396164", "0.63862264", "0.63823146", "0.62471646", "0.6205983", "0.6095286", "0.6081888", "0.6046153", "0.6036692", "0.60237724", "0.60048807", "0.5969141", "0.5968913", "0.5936523", "0.59330976", "0.5901373", "0.58967...
0.7292683
0
GET /resource_periods/new GET /resource_periods/new.json
def new @title = "New Resources Periods" @resource_period = ResourcePeriod.new respond_to do |format| format.html # new.html.erb format.json { render :json => @resource_period } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @resource_period = ResourcePeriod.new(params[:resource_period])\n\n respond_to do |format|\n if @resource_period.save\n format.html { redirect_to(@resource_period, :notice => 'Resource period was successfully created.') }\n format.json { render :json => @resource_period, :sta...
[ "0.73874164", "0.696887", "0.6916584", "0.6815948", "0.68094087", "0.6797262", "0.671707", "0.67065203", "0.66792387", "0.6662083", "0.66338736", "0.6466717", "0.6461722", "0.6458407", "0.644551", "0.6438542", "0.6393227", "0.63227427", "0.6302949", "0.62818295", "0.6212755",...
0.7887149
0
POST /resource_periods POST /resource_periods.json
def create @resource_period = ResourcePeriod.new(params[:resource_period]) respond_to do |format| if @resource_period.save format.html { redirect_to(@resource_period, :notice => 'Resource period was successfully created.') } format.json { render :json => @resource_period, :status => :cre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n period = current_user.school.periods.create(period_params)\n\n if period.save\n render json: period, status: :created, location: period\n else\n render json: {errors: period.errors}, status: :unprocessable_entity\n end\n end", "def create_period\n periods_checked = current_...
[ "0.64428973", "0.63672835", "0.6297289", "0.61034334", "0.60950357", "0.5994477", "0.59289634", "0.59061104", "0.5874629", "0.586725", "0.58665997", "0.5845856", "0.583242", "0.58230525", "0.5785686", "0.57856554", "0.57346535", "0.5728906", "0.5631455", "0.556406", "0.556296...
0.70266056
0
PUT /resource_periods/1 PUT /resource_periods/1.json
def update @resource_period = ResourcePeriod.find(params[:id]) respond_to do |format| if @resource_period.update_attributes(params[:resource_period]) format.html { redirect_to(@resource_period, :notice => 'Resource period was successfully updated.') } format.json { head :ok } else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n period = current_user.school.periods.find(params[:id])\n\n if period.update(period_params)\n render json: period, status: :accepted\n else\n render json: {errors: period.errors}, status: :unprocessable_entity\n end\n end", "def update\n @period = Period.find(params[:id])\n\...
[ "0.68046", "0.6659717", "0.6432051", "0.6432051", "0.6432051", "0.6432051", "0.6252475", "0.61584026", "0.6103012", "0.60996073", "0.6083447", "0.60647136", "0.6051713", "0.6010934", "0.59776336", "0.5976837", "0.59125096", "0.59125096", "0.59125096", "0.5888131", "0.58579993...
0.7182669
0
DELETE /resource_periods/1 DELETE /resource_periods/1.json
def destroy @resource_period = ResourcePeriod.find(params[:id]) @resource_period.destroy respond_to do |format| format.html { redirect_to(resource_periods_url) } format.json { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @time_period.destroy\n format.json { head :no_content }\n end", "def destroy\n @period = Period.find(params[:id])\n @period.destroy\n\n head :no_content\n end", "def destroy\n @period.destroy\n\n head :no_content\n end", "def destroy\n @tb_period = TbPeriod.find(param...
[ "0.7697801", "0.72568065", "0.71701294", "0.7106386", "0.70719093", "0.7050071", "0.70077837", "0.69487894", "0.6829098", "0.67756325", "0.676243", "0.67380077", "0.6707987", "0.6690636", "0.6688955", "0.6659802", "0.6651854", "0.664658", "0.6633454", "0.65934736", "0.6588433...
0.8014797
0
GET /etapas GET /etapas.json
def index @etapas = Etapa.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @tacos = Taco.all\n\n respond_to do |format|\n format.html { render :index }\n format.json { render @tacos }\n end\n end", "def index\n\t\tvendas = Venda.all\n\t\trender json: vendas, status: :ok\n\tend", "def events\n url = 'https://api.artic.edu/api/v1/exhibitions?limit=35'...
[ "0.6238049", "0.6214868", "0.6206816", "0.617936", "0.61702967", "0.6168486", "0.6147777", "0.6141898", "0.61418796", "0.610794", "0.6094119", "0.6087856", "0.6062875", "0.60583717", "0.60523957", "0.6043408", "0.60286295", "0.60144097", "0.5983053", "0.5957061", "0.5951886",...
0.743863
0
POST /monthly_cashflows POST /monthly_cashflows.json
def create @monthly_cashflow = MonthlyCashflow.new(monthly_cashflow_params) if @monthly_cashflow.save flash[:success] = 'Monthly cashflow was successfully created.' redirect_to monthly_cashflows_url else flash[:danger] = 'Monthly cashflow was not created.' redirect_to mo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def monthly_cashflow_params\n params.require(:monthly_cashflow).permit(:month, :vote_number, :subdepartment_id, :department_id, :mscore_classification_id, :line_item, :operational_expenditure, :revenue, :capital_expenditure)\n end", "def set_monthly_cashflow\n @monthly_cashflow = MonthlyCashflow.fin...
[ "0.7121171", "0.71175885", "0.7071899", "0.68967116", "0.6548815", "0.64433646", "0.636023", "0.63413304", "0.6337751", "0.6302797", "0.6184155", "0.61473274", "0.61147416", "0.60952336", "0.6070391", "0.6041794", "0.5998461", "0.5979804", "0.5970918", "0.5940618", "0.5857160...
0.74086404
0
PATCH/PUT /monthly_cashflows/1 PATCH/PUT /monthly_cashflows/1.json
def update if @monthly_cashflow.update(monthly_cashflow_params) flash[:success] = 'Monthly cashflow was successfully updated.' redirect_to monthly_cashflows_url else flash[:danger] = 'Monthly cashflow was not updated.' redirect_to monthly_cashflows_url end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @monthly_finance = MonthlyFinance.find(params[:id])\n respond_to do |format|\n if @monthly_finance.update_attributes(params[:monthly_finance])\n format.html { redirect_to @monthly_finance, notice: 'Monthly finance was successfully updated.' }\n format.json { head :no_content }...
[ "0.7025375", "0.68562514", "0.648169", "0.63878495", "0.63759935", "0.63705814", "0.63677084", "0.6309582", "0.6292671", "0.6186885", "0.6120646", "0.6095571", "0.606975", "0.6063024", "0.6052172", "0.59902006", "0.59869605", "0.5933449", "0.5924674", "0.59033453", "0.5880101...
0.6917289
1
Build a fully formed URL which can be used to make a request for the product from a rendering server.
def generateUrl(additionalParams={}) finalParams = self._setFinalParams(additionalParams) options = {} options['product'] = self options['renderParameters'] = finalParams params = @serverManager.buildRenderCommand(options) if params then url = @serverManager.bui...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_url(product, options = nil)\n \"#{BASE_URL}#{product}#{build_query_string(options)}\"\n end", "def build_urlpath\n render_endpoint_request do\n erb = EndpointRequestBuilder.new(@endpoint)\n extra_params = erb.formatted_url_path(@arguments)\n render json: { success: extra_p...
[ "0.81995", "0.73755896", "0.70849085", "0.7077401", "0.7023467", "0.70166856", "0.7010425", "0.69817847", "0.69156265", "0.6882417", "0.6873758", "0.68404514", "0.6839499", "0.68249846", "0.6804516", "0.67967546", "0.677643", "0.67747736", "0.67419165", "0.67334485", "0.67334...
0.7706531
1
Return the access info for the product. Required method for products passed to the ServerManager object.
def getAccessInfo() @accessInfo end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_product_info\n @client.call(self.class, __callee__.to_s, @call_params)\n end", "def get_accessible_products\n return call('Product.get_accessible_products')\n end", "def access_info\n super\n end", "def product_info\n params['productinfo']\n end", "def pr...
[ "0.6626096", "0.6405489", "0.617373", "0.61342967", "0.6046521", "0.5927685", "0.5926872", "0.5902875", "0.5886022", "0.587818", "0.587818", "0.5872644", "0.5756177", "0.5756177", "0.57540107", "0.5646792", "0.562244", "0.55921865", "0.5572863", "0.5555533", "0.5555533", "0...
0.75322825
0
Retrieve a render parameter.
def getRenderParameter(key) value = (@renderParameters[key] or @productPropertyDefaults[key]) value end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_param\n @params[name]\n end", "def get_value(render_context)\n return render_context.get_variable_value(@variable_name)\n end", "def param\n params[0]\n end", "def get_parameter(index)\n @parameters[index]\n end", "def get_param(param)\n #$LOG.debu...
[ "0.6961849", "0.66780555", "0.64816624", "0.61624396", "0.61111957", "0.6039894", "0.5951773", "0.5907975", "0.58634096", "0.5857884", "0.58489424", "0.5826278", "0.58227766", "0.56645614", "0.5617074", "0.56021565", "0.56021565", "0.5595593", "0.55952895", "0.55894977", "0.5...
0.77364737
0
Return the workflow ID.
def getWorkflowId() @workflowId end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def workflow_id\n self.decision_context.workflow_context.decision_task.workflow_execution.workflow_id\n end", "def workflow\n @workflow ||= Workflow.find(self.workflow_id)\n end", "def process_id\n return @process_id\n end", "def _execution_id\n attrib...
[ "0.8571216", "0.6891027", "0.6497711", "0.64170396", "0.6397672", "0.63528574", "0.6346141", "0.6254553", "0.621064", "0.62080055", "0.61469585", "0.6074409", "0.60471314", "0.60439456", "0.6039739", "0.6039739", "0.6039739", "0.60286057", "0.6013136", "0.600817", "0.5992197"...
0.8563879
1
Set the access info for the product. Required method for products passed to the ServerManager object.
def setAccessInfo(accessInfo) if accessInfo @accessInfo = accessInfo else @accessInfo = nil end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_access_info(opts)\n opts = check_params(opts,[:access_info])\n super(opts)\n end", "def set_access\n @access = Access.find(params[:id])\n end", "def set_access\n @access = Access.find(params[:id])\n end", "def set_access\n @access = Access.find(params[:id])\n end"...
[ "0.6533318", "0.61237174", "0.61237174", "0.61237174", "0.61237174", "0.61237174", "0.61237174", "0.61237174", "0.60360914", "0.5952121", "0.5923793", "0.5884295", "0.58458704", "0.5800796", "0.5796302", "0.5778398", "0.57629955", "0.57189614", "0.57018876", "0.57018876", "0....
0.68426126
0
Set a render parameter on the product.
def setRenderParameter(key, newValue=nil) if key.is_a?(Hash) key.each do |k, v| self.setRenderParameter(k, v) end else param = @renderParameters[key] default = @productPropertyDefaults[key] if param != newValue if newValue == nil ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getRenderParameter(key)\n value = (@renderParameters[key] or @productPropertyDefaults[key])\n value\n end", "def set_product\n @product = Product.find(params[:product_id]) if params[:product_id]\n end", "def set_product\n\t\t\t@product = Product.find(params[:product_id])\n\t\tend...
[ "0.636691", "0.61209583", "0.61104083", "0.60783416", "0.6039486", "0.6027861", "0.5987603", "0.59853953", "0.5966661", "0.5958614", "0.5898081", "0.5894503", "0.58923745", "0.58844864", "0.58830196", "0.58830196", "0.58830196", "0.58830196", "0.58830196", "0.58829206", "0.58...
0.7649569
0
Set the workflow ID.
def setWorkflowId(newWorkflowId) if @workflowId != newWorkflowId @accessInfo = nil @workflowId = newWorkflowId end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_workflow\n @workflow = Workflow.find(params[:id])\n end", "def set_workflow\n @workflow = Workflow.find(params[:id])\n end", "def set_workflow\n @workflow = Workflow.find(params[:id])\n end", "def set_workflow\n @workflow = Workflow.find(params[:id])\n end", "def...
[ "0.760165", "0.75687945", "0.75687945", "0.75687945", "0.74647266", "0.7286749", "0.69460684", "0.68272656", "0.67777026", "0.6755716", "0.67305976", "0.6692712", "0.6655728", "0.65646666", "0.64446867", "0.6259813", "0.6240821", "0.6203061", "0.6193512", "0.61907786", "0.617...
0.7649108
0
PRIVATE METHODS Set the final render parameters for the product.
def _setFinalParams(additionalParams) finalParams = Marshal.load(Marshal.dump(@renderParameters)) if additionalParams.is_a?(Hash) additionalParams.each do |k, v| if v finalParams[k] = v end end end finalParams['workflow'] = @workf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setRenderParameter(key, newValue=nil)\n if key.is_a?(Hash)\n key.each do |k, v|\n self.setRenderParameter(k, v)\n end\n else\n param = @renderParameters[key]\n default = @productPropertyDefaults[key]\n if param != newValue\n if ne...
[ "0.68151724", "0.5899666", "0.54558104", "0.5408332", "0.5404325", "0.5214136", "0.5209796", "0.52097934", "0.51925236", "0.51918113", "0.5189835", "0.5173723", "0.51288646", "0.51236653", "0.510305", "0.5080325", "0.5074714", "0.5056413", "0.5046699", "0.5038683", "0.5026368...
0.68073756
1
There is incomplete era data in CLDR for certain locales like Hindi. Fall back if that happens.
def era(date, pattern, length, options = {}) choices = case length when 0 ["", ""] when 1..3 calendar.eras(:abbr) else calendar.eras(:name) end if result = choices[date.year < 0 ? 0 : 1] result else er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def era(date) = year(date).positive? ? 1 : 0", "def read_locale\n raise \"Override me\"\n end", "def encoding_found; end", "def encoding_found; end", "def guess_date_format\n begin\n line = @data.gets\n break if line.nil?\n\n date = line[1..-1]\n guessed_format ...
[ "0.60694003", "0.5713341", "0.5251683", "0.5251683", "0.5180684", "0.51042455", "0.5094286", "0.5094286", "0.50164926", "0.5012476", "0.49795422", "0.49759802", "0.49721065", "0.49058127", "0.49051288", "0.48676768", "0.48562717", "0.48300713", "0.48300713", "0.48269436", "0....
0.58852136
1
delete "/places/:id", to: "placesdestroy", as: "delete_place"
def destroy @place = Place.find(params[:id]) @place.destroy redirect_to places_path end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n place = Place.find(params[:id])\n place.destroy\n\n head :no_content\n end", "def destroy\n @place = Place.find(params[:id])\n @place.destroy\n\n respond_to do |format|\n format.html { redirect_to(admin_places_url) }\n format.xml { head :ok }\n end\n end", "def d...
[ "0.8073168", "0.8036967", "0.79502255", "0.79502255", "0.79502255", "0.79502255", "0.79502255", "0.79502255", "0.79502255", "0.7948204", "0.7948204", "0.7948204", "0.7948204", "0.7948204", "0.785698", "0.7852824", "0.77229494", "0.7681127", "0.76725507", "0.76725507", "0.7672...
0.8117552
0
Check if all nodes are ready
def all_nodes_ready? if current_platform_spec.nodes.nil? false else true end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait_until_ready\n\t\t\t\twhile true\n\t\t\t\t\tConsole.logger.debug(self) do |buffer|\n\t\t\t\t\t\tbuffer.puts \"Waiting for ready:\"\n\t\t\t\t\t\t@state.each do |child, state|\n\t\t\t\t\t\t\tbuffer.puts \"\\t#{child.class}: #{state.inspect}\"\n\t\t\t\t\t\tend\n\t\t\t\t\tend\n\t\t\t\t\t\n\t\t\t\t\tself.sleep\...
[ "0.70865655", "0.69796854", "0.68735975", "0.67963034", "0.6784398", "0.67665577", "0.67665577", "0.67665577", "0.6728033", "0.67121893", "0.670675", "0.6629128", "0.6629128", "0.6615216", "0.6598469", "0.65812427", "0.6579421", "0.65786695", "0.6573165", "0.6564038", "0.6557...
0.8059144
0
Returns all ready nodes
def all_ready_nodes current_platform_spec.nodes end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def available_node_list\n all_nodes = Node.by_name\n return all_nodes.select {|node| node.status == \"RUNNING\"}\n end", "def get_registered_nodes\n update_nodes\n @registered_nodes\n end", "def get_node_ready(nodes)\n ready_nodes = nodes.select { |node| check_node_status(node) == \"read...
[ "0.7389127", "0.71221334", "0.6982061", "0.69811434", "0.6969691", "0.6937025", "0.69320995", "0.6913792", "0.687995", "0.6875411", "0.68741584", "0.68595594", "0.68348193", "0.6792472", "0.6701012", "0.66440856", "0.6597566", "0.65503377", "0.65503377", "0.65143937", "0.6489...
0.7556993
0
GET /ptcourses/new GET /ptcourses/new.xml
def new @ptcourse = Ptcourse.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @ptcourse } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @court = Court.new\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @court }\n end\n end", "def new\n @course = Course.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @course }\n en...
[ "0.7341229", "0.7275554", "0.7255882", "0.7255882", "0.7255882", "0.7255882", "0.7255882", "0.71600825", "0.7092506", "0.7072872", "0.7068522", "0.70481384", "0.7024046", "0.6982241", "0.69728917", "0.6971087", "0.6916632", "0.69050294", "0.6880734", "0.6875036", "0.6834592",...
0.76479363
0
POST /ptcourses POST /ptcourses.xml
def create @ptcourse = Ptcourse.new(params[:ptcourse]) respond_to do |format| if @ptcourse.save flash[:notice] = t('ptcourse.title')+" "+t('created') format.html { redirect_to(@ptcourse) } format.xml { render :xml => @ptcourse, :status => :created, :location => @ptcourse } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n # render plain: params[:courses].inspect\n @courses = Courses.new(courses_params)\n\n respond_to do |format|\n if @courses.save\n format.html { redirect_to @courses, notice: 'Course was successfully created.' }\n format.json { render :show, status: :created, location: @cour...
[ "0.63087076", "0.61808616", "0.60667825", "0.60662585", "0.6046798", "0.6038325", "0.60183924", "0.6017056", "0.60111374", "0.5996746", "0.5963111", "0.5957865", "0.5935554", "0.59213597", "0.59148836", "0.5911685", "0.58762753", "0.5875794", "0.5873821", "0.58446914", "0.583...
0.6480868
0
PUT /ptcourses/1 PUT /ptcourses/1.xml
def update @ptcourse = Ptcourse.find(params[:id]) respond_to do |format| if @ptcourse.update_attributes(params[:ptcourse]) flash[:notice] = t('ptcourse.title')+" "+t('updated') format.html { redirect_to(@ptcourse) } format.xml { head :ok } else format.html { render...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @course = Course.find(params[:id])\n\n respond_to do |format|\n if @course.update_attributes(params[:course])\n flash[:notice] = 'Course was successfully updated.'\n format.html { redirect_to courses_path }\n format.xml { head :ok }\n else\n format.html { r...
[ "0.6284466", "0.627919", "0.627919", "0.62480855", "0.624321", "0.62407875", "0.6237871", "0.6202016", "0.61660415", "0.6157407", "0.60705566", "0.60361767", "0.6034231", "0.6033288", "0.60236245", "0.59909356", "0.5982871", "0.5978606", "0.5960699", "0.5960699", "0.5960699",...
0.6714851
0
DELETE /ptcourses/1 DELETE /ptcourses/1.xml
def destroy @ptcourse = Ptcourse.find(params[:id]) @ptcourse.destroy respond_to do |format| format.html { redirect_to(ptcourses_url) } format.xml { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_course_by_id(org_unit_id)\n path = \"/d2l/api/lp/#{$lp_ver}/courses/#{org_unit_id}\" # setup user path\n # ap path\n _delete(path)\n puts '[+] Course data deleted successfully'.green\nend", "def delete_course_template(org_unit_id)\n path = \"/d2l/api/lp/#{$lp_ver}/coursetemplates/#{org_...
[ "0.7269214", "0.7037661", "0.69820833", "0.69140667", "0.684895", "0.684895", "0.684895", "0.6802657", "0.6791813", "0.6725727", "0.66734684", "0.66392803", "0.66245955", "0.66111803", "0.6598784", "0.65979445", "0.6559361", "0.65582865", "0.6554588", "0.6553739", "0.65282345...
0.72833306
0
PATCH/PUT /interviews/1 PATCH/PUT /interviews/1.json
def update respond_to do |format| if @interview.update(interview_params) format.html { redirect_to interviews_path, notice: 'Interview was successfully updated.' } format.json { render :show, status: :ok, location: @interview } else format.html { render :edit } format.jso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n respond_to do |format|\n if @interview.update(interview_params)\n format.html { redirect_to interviews_url, notice: 'Interview was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: 'edit' }\n format.json { render ...
[ "0.697521", "0.6907105", "0.6808505", "0.6613136", "0.6583135", "0.6520456", "0.65116495", "0.64914995", "0.64498097", "0.63842154", "0.6313768", "0.6193843", "0.61235684", "0.61035794", "0.60905147", "0.6064986", "0.6049117", "0.6035259", "0.5993702", "0.5993171", "0.5993171...
0.693493
1
GET /inbound_emails/1 GET /inbound_emails/1.xml
def show @inbound_email = InboundEmail.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @inbound_email } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @inbound_emails = InboundEmail.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @inbound_emails }\n end\n end", "def index\n @inbound_email_logs = InboundEmailLog.all\n\n respond_to do |format|\n format.html # index.html.erb\n...
[ "0.7499191", "0.697547", "0.68281937", "0.65668064", "0.6406546", "0.63444144", "0.625827", "0.6238231", "0.61400753", "0.6079621", "0.60314095", "0.59891766", "0.59887475", "0.59774595", "0.5975271", "0.59436214", "0.5915845", "0.59143794", "0.58987427", "0.58928365", "0.587...
0.7096657
1
GET /inbound_emails/new GET /inbound_emails/new.xml
def new @inbound_email = InboundEmail.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @inbound_email } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @inbound_email_log = InboundEmailLog.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @inbound_email_log }\n end\n end", "def new\n @email = Email.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { re...
[ "0.7437268", "0.71263456", "0.69443876", "0.69266963", "0.6881876", "0.68074584", "0.67030877", "0.6682923", "0.6679531", "0.66649264", "0.6645538", "0.65011954", "0.64911425", "0.64732134", "0.64732134", "0.64732134", "0.64732134", "0.6465804", "0.6458232", "0.6437588", "0.6...
0.78887
0
PUT /inbound_emails/1 PUT /inbound_emails/1.xml
def update @inbound_email = InboundEmail.find(params[:id]) respond_to do |format| if @inbound_email.update_attributes(params[:inbound_email]) format.html { redirect_to(@inbound_email, :notice => 'Inbound email was successfully updated.') } format.xml { head :ok } else forma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_should_update_invite_via_API_XML\r\n get \"/logout\"\r\n put \"/invites/1.xml\", :invite => {:message => 'API Invite 1',\r\n :accepted => false,\r\n :email => 'test@email.com',\r\n :user...
[ "0.6241355", "0.61718875", "0.5876545", "0.5751069", "0.5724289", "0.57186604", "0.569471", "0.56709325", "0.5633619", "0.5610555", "0.55949676", "0.5590412", "0.5529563", "0.5521022", "0.5519703", "0.55169535", "0.5480281", "0.5472999", "0.54613596", "0.54598397", "0.5435844...
0.7056256
0
DELETE /inbound_emails/1 DELETE /inbound_emails/1.xml
def destroy @inbound_email = InboundEmail.find(params[:id]) @inbound_email.destroy respond_to do |format| format.html { redirect_to(inbound_emails_url) } format.xml { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @inbound_email_log = InboundEmailLog.find(params[:id])\n @inbound_email_log.destroy\n\n respond_to do |format|\n format.html { redirect_to(inbound_email_logs_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @email = Email.find(params[:id])\n @email.destroy...
[ "0.7294711", "0.6826845", "0.67699516", "0.66255826", "0.6607035", "0.65717995", "0.6447801", "0.6422128", "0.64183617", "0.6403372", "0.64019173", "0.63644856", "0.6344812", "0.63412124", "0.6329144", "0.630926", "0.63060707", "0.6294231", "0.62929803", "0.6275482", "0.62691...
0.7647205
0