query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
85055360fdf5569e0f5a36d1814242f2 | vague priority ordering inferred from test suite. this will grow unwieldy if we get many more challenges. | [
{
"docid": "25fcea6ea25284e5ec1db2723a106e03",
"score": "0.0",
"text": "def select_response\n response ||= chill! if input.shouting?\n \n # these are effectively redundant *today* but a slightly altered test suite\n # might make us glad to have them explicitly called out.\n response ||= c... | [
{
"docid": "25f09fb2d8332a5b3a80138f6a137331",
"score": "0.6465157",
"text": "def test_priorities_basic\n expected = {:title => \"Jog\"}\n task = \"Jog\"\n priorities = {\"0\" => 0, \"!!!\" => 3, \"!2\" => 2, \"!5\" => 3}\n priorities.each{|str,p|\n title = [task,str].join(\" \")\n ... |
36945aa0a24ebef49b9022095fd71fd3 | Make a pending membership request. | [
{
"docid": "2aadcd217055be055c48803d3a25007e",
"score": "0.0",
"text": "def request(user, group, send_mail = nil)\n if send_mail.nil?\n send_mail = global_prefs.email_notifications? &&\n group.owner.connection_notifications?\n end\n if user.groups.include?(group)... | [
{
"docid": "adefcae6b0667ee96881d232c82d8eab",
"score": "0.6533535",
"text": "def create_membership_request\n member = Member.new(squad: @squad, user: current_user, membership: 'request')\n member.save(validate: false)\n end",
"title": ""
},
{
"docid": "b4306f372be25... |
67082cb725546ed00db28db4feb584ec | Sets the old properties of the given relationship, overwrites old properties | [
{
"docid": "61d8903e14d46027e94432b4173850fc",
"score": "0.70303506",
"text": "def set_rel_props(rel, hash)\n @batch_inserter.set_relationship_properties(rel, hash)\n end",
"title": ""
}
] | [
{
"docid": "0047f1efd4c1db4e0614a70e8e966b30",
"score": "0.6898457",
"text": "def update(attrs)\n @attrs.update(attrs[:relationship]) unless attrs[:relationship].nil?\n self\n end",
"title": ""
},
{
"docid": "b9fe890161f193fe7a93e47e7bb22708",
"score": "0.68010914",
"tex... |
c70fffdf12d341bcf1b29d000c3702df | GET /events/1 GET /events/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "aa321cb61c328d7641f0ffee4f6e0b70",
"score": "0.75027657",
"text": "def show\n @event = Event.find(params[:id])\n render json: @event\n end",
"title": ""
},
{
"docid": "64b8f8ad44f7b6e6250a9fc54b79647c",
"score": "0.7400539",
"text": "def get(event_id)\n @clien... |
884b72fd8acad05d9c5a850d57a2ce67 | Common method to render create new resource | [
{
"docid": "8f9dca8c9d134d41fe7d6199d9719de8",
"score": "0.6801487",
"text": "def render_created message: nil, data: nil\n render_success message: message, data: data, status_code: 201\n end",
"title": ""
}
] | [
{
"docid": "38e9f2058a8b3239a052ca64755013dc",
"score": "0.7496953",
"text": "def render_create(resource, meta = {})\n if resource.persisted?\n render_params = { json: resource, status: 201, include: params[:include] }\n render_params.merge!(meta: meta) if meta.present?\n\n ren... |
1b4d5b5522f03e33a04c1b768a35eae3 | Set the value of the Amount input for this Choreo. | [
{
"docid": "dab4385da7e8782e1ac4124239cc853a",
"score": "0.7636373",
"text": "def set_Amount(value)\n set_input(\"Amount\", value)\n end",
"title": ""
}
] | [
{
"docid": "891bc9a49411fe8548eb52881d2bff6a",
"score": "0.73611635",
"text": "def set_Amount(value)\n set_input(\"Amount\", value)\n end",
"title": ""
},
{
"docid": "891bc9a49411fe8548eb52881d2bff6a",
"score": "0.73611635",
"text": "def set_Amount(value)\n s... |
4a6f50430c76279099322850dbd3f6a9 | Returns true if this object has been destroyed, otherwise returns false. | [
{
"docid": "ebb9ea2e14988ef155601376f95935a7",
"score": "0.8246868",
"text": "def destroyed?\n sync_with_transaction_state\n @destroyed\n end",
"title": ""
}
] | [
{
"docid": "654919b070351d7b04989d480062ca58",
"score": "0.8626681",
"text": "def destroyed?\n @destroyed == true\n end",
"title": ""
},
{
"docid": "f54e4d729d16154f372f9a8a598a0725",
"score": "0.8613514",
"text": "def destroyed?\n return false\n end",
"title"... |
8a9b5e074fb6a2062920badd5f09031b | GET /tipos_projetos/new GET /tipos_projetos/new.json | [
{
"docid": "80add858c7df7a9f9873ac618da28f2e",
"score": "0.8222527",
"text": "def new\n @tipos_projeto = TiposProjeto.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @tipos_projeto }\n end\n end",
"title": ""
}
] | [
{
"docid": "106137a65920dc3ffd9ac1cbc47fb8c3",
"score": "0.7811353",
"text": "def create\n @tipos_projeto = TiposProjeto.new(params[:tipos_projeto])\n\n respond_to do |format|\n if @tipos_projeto.save\n format.html { redirect_to @tipos_projeto, notice: 'Tipos projeto was successfully c... |
2855a4b448b5a4258f229231c2b297b7 | GET /spelling_errors/new GET /spelling_errors/new.json | [
{
"docid": "329007458141deda5281a37a26800092",
"score": "0.0",
"text": "def new\n \n end",
"title": ""
}
] | [
{
"docid": "412fab05da8fd9b5d70c8aff4c07d53d",
"score": "0.6892578",
"text": "def new\n @term = @glossary.terms.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @term }\n end\n end",
"title": ""
},
{
"docid": "50156afaf32206c443c62c... |
b7cb6bddcebf60856c480314c5d90dc1 | GET /clubs/1 GET /clubs/1.xml | [
{
"docid": "a4758c9dd0675bc4c1bb6dc9d51ee647",
"score": "0.63465446",
"text": "def show\n @club = Club.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @club }\n format.iphone # index.html.erb\n end\n end",
"title": ""... | [
{
"docid": "462ec44b4c583d6b59a0a581bedbd5a9",
"score": "0.7531889",
"text": "def show\n @club = Club.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @club }\n end\n end",
"title": ""
},
{
"docid": "462ec44b4c583d6... |
8dd6643b2edc8d519698dbd0a5c01276 | constants and config? any admin functions? Add download functions. | [
{
"docid": "d656ba61d068a64bdc4ed49a4f3424bf",
"score": "0.0",
"text": "def upload\n # post = save_file(params[:upload], params[:uuid].to_s())\n upload = params[:upload]\n @mdo = Msg_dohicky.new(get_remote_addr, Home)\n \n if (upload.to_s.empty?)\n @mdo.set_message(\"No file name so no... | [
{
"docid": "2a8a06514acfc42e4e9bd17aa7026d42",
"score": "0.6379226",
"text": "def config; end",
"title": ""
},
{
"docid": "2a8a06514acfc42e4e9bd17aa7026d42",
"score": "0.6379226",
"text": "def config; end",
"title": ""
},
{
"docid": "2a8a06514acfc42e4e9bd17aa7026d42",
... |
2d071be0b873c11535d354a210667dc2 | This unit test check for the valid next move city got by the move_turns_dynamic_palisades. | [
{
"docid": "5d43d0fb55aad4fa93257fe1a59281fa",
"score": "0.62446755",
"text": "def test_move_turns_dynamic_palisades\n ruby_rush=RubyRush.new(1, 2, 3)\n ruby_rush.turn=10\n ruby_rush.random(ruby_rush.seed)\n ruby_rush.move_turns_dynamic_palisades\n assert_includes ['Ma... | [
{
"docid": "65b56371d0cf72ea95a9f0a30a0bea3f",
"score": "0.6684479",
"text": "def test_next_valid\n\t prng = Minitest::Mock.new\n\t def prng.rand(num); 1; end\n\t\tcity = City.new(\"Fake City\", 7, 0, prng)\n\t\tcity1 = City.new(\"Fake City 1\", 7, 0, prng)\n\t\tcity2 = City.new(\"Fake City 2\", 7... |
70243e55e4e7f36254b81edb317ea793 | Returns an array containing courses to send notifications for. There are two possible cases where it is necessary to send a message to the user: when seats become available (zero seats to nonzero seats) and when seats become completely filled (nonzero seats to zero seats). All other changes are irrelevant. This method ... | [
{
"docid": "e56e12b4a9ca0dbd8bb2142a1c5fff10",
"score": "0.7464529",
"text": "def courses_to_email(user)\n courses = []\n \n # For each course that the user is tracking\n Tracking.where(user_id: user.id).each do |t|\n course = Course.find(t.course_id)\n seats = course.seats\n ... | [
{
"docid": "a3c376790b9c47d93468c2e0d9129b2d",
"score": "0.59762615",
"text": "def add_to_waiting_list(user, course)\n\t\t#Checks for available seats and adds students to waiting list if seats are filled\n\t\t#Else registers them for the course\n\t\tcourse.users << user\n\t\tif course.seats <= course.us... |
07d567dcca4a02b452151d4a9e6bf09b | Test that this user is authorized with DigitalNZ. This is assumed to be true if an access token is available. Calling the optional test parameter will always make an HTTP connection to DigitalNZ to test the authorization. | [
{
"docid": "77625b0ec89b10e2fd1f714eece2e3c9",
"score": "0.7834095",
"text": "def authorized?(test = false)\n if test\n if access_token\n access_token.get('/oauth/test_request').is_a?(Net::HTTPSuccess)\n else\n false\n end\n else\n !!access_token\n... | [
{
"docid": "10f7b05f5627c0b0262d5c8049d614dc",
"score": "0.64515775",
"text": "def authorize(oauth_verifier)\n @access_token = request_access_token(oauth_verifier)\n @authorized = true\n return true\n rescue\n puts $! if @@verbose\n return false\n end",
"title": ""
},
{
"doc... |
3cc00b2179fa084065408f274a7c0281 | PATCH/PUT /institutions_branches/1 PATCH/PUT /institutions_branches/1.json | [
{
"docid": "f4b0dbc812f63ae33a0277a1bab97e67",
"score": "0.68093634",
"text": "def update\n respond_to do |format|\n if @institutions_branch.update(institutions_branch_params)\n format.html { redirect_to @institutions_branch, notice: 'Institutions branch was successfully updated.' }\n ... | [
{
"docid": "0a968ac8d66a6978d82d509a3877a65b",
"score": "0.6976165",
"text": "def update\n respond_to do |format|\n if @branch.update(branch_params)\n format.json { render json: @branch, status: :ok }\n else\n format.json { render json: @branch.errors, status: :unprocessable_... |
4cf59afe20b63297fc53389c5355b544 | GET /discussions/new GET /discussions/new.json | [
{
"docid": "40e4291641c417fe8cce4a908401f4d7",
"score": "0.68824583",
"text": "def new\n @discussion = Discussion.new\n if !params[:establish].nil?\n @note = Establish.find(params[:establish]).chapter.find(params[:chapter]).note.find(params[:note])\n end\n\n respond_to do |format|\n ... | [
{
"docid": "02ddb1c0b894ef1539299a309f036bf6",
"score": "0.8492052",
"text": "def new\n @discussion = Discussion.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @discussion }\n end\n end",
"title": ""
},
{
"docid": "02ddb1c0b894ef1... |
692aa71a499b165dbbdfc9563f68d14f | Ask the user about missing dependencies. This method will use a user interface to know what to do with missing dependencies. For each dependency, choices are: Install it Ignore it Change the context to find it (select directory...) Parameters:: ioInstaller (_Installer_): The RDI installer iMissingDependencies (list): T... | [
{
"docid": "dcee931dfb7e14a2af161e75548cd85c",
"score": "0.76604766",
"text": "def execute(ioInstaller, iMissingDependencies)\n # List of corresponding dependencies user choices\n # list< DependencyUserChoice >\n rDependenciesUserChoices = []\n\n @Called = tru... | [
{
"docid": "71bac829bb330e7286927fbd1d31e05c",
"score": "0.7524566",
"text": "def askUserForMissingDeps(iMissingDependencies, iPreferredViewsList)\n rDependenciesUserChoices = []\n\n lViewsList = iPreferredViewsList\n if ((iPreferredViewsList == nil) or\n (iPreferredViewsList.emp... |
b5836e11bb00af21be99de6b8afc92a7 | Registro Federal de Contribuyentes (R.F.C.) para persona moral | [
{
"docid": "e952fd3b4cd87b88f5d89b93e75241a9",
"score": "0.5332825",
"text": "def rfc_persona_moral\n consonants_n_amp = CONSONANTS + ['Ñ', '&']\n all_letters = consonants_n_amp + VOWELS\n [fetch_sample(all_letters, count: 3), date, fetch_sample(HOMOCLAVE, count: 3)].flatten.join\n end... | [
{
"docid": "53f8b63278f00b0f57f77c74131b3f22",
"score": "0.5541764",
"text": "def municipality_from_cadastrial # :doc:\n data.municipalities.find do |m|\n m.cadastrial_code == term.upcase\n end\n end",
"title": ""
},
{
"docid": "7992b31d451ca327426d9ee59582a32c",
"sco... |
2f0843052be1e220ad6308f12480dc19 | Example of duties: manager, designer, programmer, tester. Finds TeamsUser and save preferred Duty | [
{
"docid": "8e4ec92383615de583e51efc0715a60b",
"score": "0.5616523",
"text": "def update_duties\n team_user = TeamsUser.find(params[:teams_user_id])\n team_user.update_attribute(:duty_id, params[:teams_user]['duty_id'])\n redirect_to controller: 'student_teams', action: 'view', student_id: para... | [
{
"docid": "7f95c08b1439db6120a962f9e4bc3a05",
"score": "0.58251715",
"text": "def populate_judge_team_for_testing(judge_team, judge_user, attorneys)\n attorneys.each do |u|\n judge_team.users << u\n attorney_orgsuser = OrganizationsUser.existing_record(u, judge_team)\n DecisionDraftin... |
0bf2704dcb8daf0dbba6c62fda817676 | lexer rule lpar! (LPAR) (in Hephaestus.g) | [
{
"docid": "84b4593d63765b661783fca9d770de00",
"score": "0.7796226",
"text": "def lpar!\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 41 )\n\n\n\n type = LPAR\n channel = ANTLR3::DEFAULT_CHANNEL\n # - - - - label initialization - - - -\n\... | [
{
"docid": "e28ff289ad793f52a137a8a2c7feac34",
"score": "0.7948812",
"text": "def lpar!\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 5 )\n\n type = LPAR\n channel = ANTLR3::DEFAULT_CHANNEL\n\n \n # - - - - main rule block - - - -\... |
2d779c961b99882da41899e369e195a0 | Replaces the existing method definition, if there is one, with the passed block as its body. | [
{
"docid": "a934aebb964e9d33d252da6120a5fbd5",
"score": "0.5928495",
"text": "def redefine_method(method, &block)\n visibility = method_visibility(method)\n remove_possible_method(method)\n define_method(method, &block)\n\n # The following line doesn't work as expected when overriding privat... | [
{
"docid": "ff457cb94601b4982be98084e7ddb51a",
"score": "0.6770566",
"text": "def redefine_method(method, &block); end",
"title": ""
},
{
"docid": "ff457cb94601b4982be98084e7ddb51a",
"score": "0.6770566",
"text": "def redefine_method(method, &block); end",
"title": ""
},
{
... |
d37c20141b47d514d5790e08d89dc4c7 | always returns void array | [
{
"docid": "bc03dee2049f31a8649d2c7bacdf47b1",
"score": "0.0",
"text": "def lower_priority_elements\n []\n end",
"title": ""
}
] | [
{
"docid": "e43fd1f5ecafa38ed0f0bf061da1a7b5",
"score": "0.76345444",
"text": "def void_array(*args)\n return nil.to_a\n end",
"title": ""
},
{
"docid": "98ce7de31cb5fa948b0ef71cac8a0222",
"score": "0.70904154",
"text": "def array\n raise \"Not implemented\"\n end",
"... |
18eeaccd1aae1f12e12bded336fa6539 | POST /movimientos POST /movimientos.json | [
{
"docid": "96260ba5505ced11e03466b83051ce6a",
"score": "0.5909531",
"text": "def create\n @movimiento = Movimiento.new(movimiento_params)\n @movimiento.empresa_id = current_user.empresa_id\n @movimiento.usuario = current_user\n flash[:cuenta_id] = @movimiento.cuenta_id\n\n respond_to do ... | [
{
"docid": "00776654abdf8cc6884c5699d846ebf6",
"score": "0.68400335",
"text": "def create\n @moviesttt = Moviesttt.new(moviesttt_params)\n\n respond_to do |format|\n if @moviesttt.save\n format.html { redirect_to @moviesttt, notice: 'Moviesttt was successfully created.' }\n form... |
c8b3310bc8ec20dd44d6c2000a93c8df | binding.pry look though output and display name and ratings | [
{
"docid": "7d886a68f6b55635833006959456c561",
"score": "0.0",
"text": "def process_output\n\tcounter = 1\n\t\t@parsed[\"businesses\"].each do |x|\n\t\t\tputs \"#{counter} Name: \" + x[\"name\"] + \" Rating:\" + x[\"rating\"].to_s\n\t\t\tcounter +=1 \n\t\tend\n\tend",
"title": ""
}
] | [
{
"docid": "5b5fb4170bc32f57aa036c34877c3bd9",
"score": "0.6639469",
"text": "def wrestler_output\n\n\t\tputs \"Name: #{self.values[:name]}\"\n\t\tputs \"Set: #{self.values[:set]}\"\n\t\tputs \"Singles Priority: #{self.values[:prioritys]}\"\n\t\tputs \"Tag Team Priority: #{self.values[:priorityt]}\"\n\t... |
c5d2e5a71683bf52d3a7e79610ca7b0a | POST /projects POST /projects.json | [
{
"docid": "ea62dc94c8a4f362d9fdf07bd686dae1",
"score": "0.0",
"text": "def create\n @project = Project.new(project_params)\n @project.user_id = current_user.id\n respond_to do |format|\n if @project.save\n format.html { redirect_to @project, notice: 'Project was successfully create... | [
{
"docid": "3987b362caed851c61fc0c13c211f4a8",
"score": "0.7338948",
"text": "def create\n @project = Project.new(params[:project])\n\n respond_to do |format|\n if @project.save\n format.json { render :json => @project, :status => :created, :location => @project }\n format.html ... |
833559763b13605a4672fd8d99609813 | task_duration Description: This method returns the duration of the task. Parameters: None | [
{
"docid": "ad19c5232e4c853ffc7ba1e1de8e90a6",
"score": "0.8230649",
"text": "def task_duration\n\n if self.complete?\n sprintf(\"%4.1f\", (self.completed_on - self.created_on) / 1.day)\n else\n '0'\n end\n\n end",
"title": ""
}
] | [
{
"docid": "fedc269d733b5ce605d01e3fed02de49",
"score": "0.8556176",
"text": "def task_duration\n if status == :active\n formatted_duration(running_time) \n else\n formatted_duration(duration)\n end\n end",
"title": ""
},
{
"docid": "82299bcf683c5d2a6c5be9329bedc708",
... |
7e986c67a41edf18fbd307618a082241 | Sets the version property value. The version of the policy | [
{
"docid": "be66a75eb49c2712f2221c0f3fc27028",
"score": "0.7961405",
"text": "def version=(value)\n @version = value\n end",
"title": ""
}
] | [
{
"docid": "ce63b532d3c9a0ee99aa6c226439a5d1",
"score": "0.7842722",
"text": "def version=(v)\n @version = v\n end",
"title": ""
},
{
"docid": "d3630952995feebfe266a7272c6183eb",
"score": "0.7689886",
"text": "def set(new_version)\n self.version = new_version\n end",
... |
0aea87ac137c06d6962bfced69153ad7 | Return the minimum role required for +action+, and, if specified, +property+. | [
{
"docid": "2a5436e746bfdf2948a3d57fd1862fba",
"score": "0.8429756",
"text": "def minimum_role(action, resource_config, property=nil)\n if property.nil?\n p = resource_config[:permission]\n raise Error, \"undefined #{action.inspect} permission\" unless p\n p[action]\n ... | [
{
"docid": "781015ac55f58d33e44a6d20ecbfda47",
"score": "0.594379",
"text": "def require_role\n action = request.params[:action]\n if (current_user && action.starts_with?(current_user.role_str))\n\n else\n store_location\n error_403\n return false\n ... |
d4726fab0da16c00d42c2e57d4b6f962 | process_erb_templates(cartridge_name) > nil Search cartridge for any remaining erb files render them | [
{
"docid": "346c901edfc68326efaf622505245c7e",
"score": "0.8834185",
"text": "def process_erb_templates(cartridge_name)\n logger.info \"Processing ERB templates for #{cartridge_name}\"\n env = Utils::Environ.for_gear(@user.homedir)\n render_erbs(env, File.join(@user.homedir, cartridge_nam... | [
{
"docid": "9aa5a9e31e44f6bfe9cf25328030160c",
"score": "0.6367204",
"text": "def templates() = templates_path.glob('**/*.erb')",
"title": ""
},
{
"docid": "d65de1644b286e74f3b32e630eabc0a0",
"score": "0.5979455",
"text": "def __in_erb_template;\n end",
"title": ""
},
{
... |
eedd9619727101e652186e5b66c4d40d | Gets project role by its name | [
{
"docid": "99305e01aca834371984b0b8981152f3",
"score": "0.0",
"text": "def get_role_by_title(role_title, role_list = roles)\n role_list.each do |role|\n return role if role.title.downcase == role_title.downcase\n end\n nil\n end",
"title": ""
}
] | [
{
"docid": "94ab53967846c90d7ffd01497799a20f",
"score": "0.7427956",
"text": "def get_role(name)\n role_mapper = get_data_file(data_dir, 'role_mappings.yaml')\n unless File.exists?(role_mapper)\n raise(Exception, \"Role mapping file: #{role_mapper} should exist\")\n end\n ... |
532c8aae79cfa14b247515543ba589bd | Human representation of average seconds per `mark`. | [
{
"docid": "81bcbdd81c22be45012b43f7de9366a4",
"score": "0.6723039",
"text": "def ha\n \"%0.2f second average\" % average\n rescue\n \"\"\n end",
"title": ""
}
] | [
{
"docid": "b1071d17bd505b25ad2f3fdfff2922a5",
"score": "0.6432494",
"text": "def average_predict_time\n\t\treturn @timmer/Float(@predict_call_count)\n\tend",
"title": ""
},
{
"docid": "7bfb24cf2dece84b74bf5b00eb9736df",
"score": "0.6270333",
"text": "def average_reading_time(content... |
eb043f03300f20614e57322d2e2bbade | Get static (unchanging) data. Does not honor invalidation, since static data is assumed not to change. This will not cause a load orfetch if someone else (such as a parent job or build or server) has given us static data already. If we have loaded our own data, that will be used in preference. | [
{
"docid": "3f841eacd048ba288ce9d2ada2d8f977",
"score": "0.7461929",
"text": "def static_data(field=nil)\n # We don't care about invalidation for static fields\n if field\n # If something is already loaded, use it!\n return @data[field] if @data\n static_data[fie... | [
{
"docid": "bfc86223afa3bff2c603cfc999135d1c",
"score": "0.63010305",
"text": "def fetch_locations_static_data\n with_cache(CACHE_KEY, freshness: CACHE_DURATION) do\n payload = payload_builder.build_locations_fetch_payload\n result = api_call(payload)\n\n return result ... |
8d8597112f2d7bbd3c3f7cc0a493cf88 | This method checks the validity of compfilters. A list of compfilters needs to be specified. Also the parent of the component we're checking should be specified, not the component to check itself. | [
{
"docid": "19d5660cee0646ccb285f8772f79f8fc",
"score": "0.79117954",
"text": "def validate_comp_filters(parent, filters)\n filters.each do |filter|\n is_defined = parent.key?(filter['name'])\n\n if filter['is-not-defined']\n if is_defined\n return false\... | [
{
"docid": "12b6d43a5d24c4abefcceeb7be471124",
"score": "0.6809982",
"text": "def validate_prop_filters(parent, filters)\n filters.each do |filter|\n is_defined = parent.key?(filter['name'])\n\n if filter['is-not-defined']\n if is_defined\n return false\n... |
4d15f4e2b71ae76a2200d20ef1a35c66 | Removes the block without putting it back in the frontier | [
{
"docid": "f5faf7a8b8827a363047593871c23d47",
"score": "0.0",
"text": "def sweep(block:, name: )\n record(block: block, name: name)\n\n block.lines.each(&:mark_invisible)\n frontier.register_indent_block(block)\n end",
"title": ""
}
] | [
{
"docid": "e22a0d65d22121b2d14bd50db2c8948b",
"score": "0.74544966",
"text": "def remove_block\r\n block = params[:block].to_s.underscore\r\n @user = User.current\r\n # remove block in all groups\r\n layout = @user.pref[:graph_alloc] || {}\r\n %w(top left right).each {|f| (layout[f] ||= ... |
7f5e7aabca805734806cc37d2403e49c | binding a state of an object | [
{
"docid": "07690685babfcb3d40e013266a2a51de",
"score": "0.0",
"text": "def get_a_binding\n\tval = 123\n\tbinding\nend",
"title": ""
}
] | [
{
"docid": "8b492ad68e847046b8b9e72466fab3d0",
"score": "0.6644425",
"text": "def binding() end",
"title": ""
},
{
"docid": "8b492ad68e847046b8b9e72466fab3d0",
"score": "0.6644425",
"text": "def binding() end",
"title": ""
},
{
"docid": "e2bfd555f7ccf8c58c3b0987b5710577",... |
c0d004b5598fc31a921bf649a11e2af2 | Set the value of the SubPostalCode input for this Choreo. | [
{
"docid": "83511db9c39066ae1aeaebf9dac5272c",
"score": "0.82703453",
"text": "def set_SubPostalCode(value)\n set_input(\"SubPostalCode\", value)\n end",
"title": ""
}
] | [
{
"docid": "1aed15dc4bc39a55d9a4f4d96b038db0",
"score": "0.5958342",
"text": "def postal_code=(postal_code)\n if postal_code.nil?\n fail ArgumentError, 'postal_code cannot be nil'\n end\n\n if postal_code.to_s.length < 1\n fail ArgumentError, 'invalid value for \"postal_code... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "fa6b351422107ebb8a33cd8478e0fa5e",
"score": "0.0",
"text": "def measurement_params\n params.require(:measurement).permit(:value, :measurement_type_id, :comment, :date)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
e38fd1b074db060f009560d8e92f9f6a | Inserts/updates two columns into subtitle markers CSV file: persistentId and recordId relativeMS samples charLength 0 0 47 > relativeMS samples charLength persistentId recordId 0 0 47 Ag57 63280005 | [
{
"docid": "0466119c6a0ec78ffb4b36bdd5a7a1aa",
"score": "0.6216095",
"text": "def fix\n record_id_mappings = compute_record_id_mappings(@content_at_file.contents)\n subtitles = @stm_csv_file.subtitles\n num_subtitles = subtitles.length\n\n if record_id_mappings.length... | [
{
"docid": "b0ce5260d5baaa67f89e9461df9df98b",
"score": "0.6931952",
"text": "def update_primary_subtitle_marker_csv_file(content_at_file_to, st_ops_for_file)\n # Get content_at_file as of from_git_commit\n content_at_file = content_at_file_to.as_of_git_commit(@from_git_commit)\n ... |
27f8620209f33d19e7bb994598204892 | Runs the tests and/or suites contained in this TestSuite. | [
{
"docid": "e60aa274192c47b6e5720af2caf7b414",
"score": "0.0",
"text": "def run(result, &progress_block)\n @start_time = Time.now\n yield(STARTED, name)\n yield(STARTED_OBJECT, self)\n run_startup(result)\n while test = @tests.shift\n @n_tests += test.size\n ... | [
{
"docid": "8ed4d9487da168e3023e8e171ccf922e",
"score": "0.78571403",
"text": "def run_tests\n _run_anything :test\n end",
"title": ""
},
{
"docid": "b16738224a01149876e65234c9a9204a",
"score": "0.7797746",
"text": "def run\n tests.each do |test|\n test.run\n ... |
2c097c10d367aaf682f579715b75b608 | if first[0] > second[0] if first.nil? | [
{
"docid": "3ee234071380c0fad55fd671ae4e716e",
"score": "0.0",
"text": "def move(coords)\n first, second = coords\n if @board[first] == []\n return @board\n elsif first > 2 || second > 2 || first < 0 || second < 0\n return @board\n elsif @board[first][0] > @board[second][0]\n ... | [
{
"docid": "c23ec8bb782a69e45961f17d11ebd521",
"score": "0.69762546",
"text": "def can_be_merged(arr1, arr2)\n return true if arr1.nil? or arr2.nil?\n return true if arr1[1] >= arr2[0]\n\n return false\nend",
"title": ""
},
{
"docid": "7a370289d7b0a6484d95f0d90cabdd93",
"score": "0.68... |
9ceb011c748e37fdf6c7d8ab714fe58f | GET /partner_details/1 GET /partner_details/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "8919e0078b61cff260e778fe27ad0978",
"score": "0.7834648",
"text": "def show\n @our_partner = OurPartner.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @our_partner }\n end\n end",
"title": ""
},
{
"docid"... |
b7ea67b8067fca3c0387d7dfe325e4cb | IOflush ios.flush => ios Flushes any buffered data within _ios_ to the underlying operating system (note that this is Ruby internal buffering only; the OS may buffer the data as well). $stdout.print "no newline" $stdout.flush _produces:_ no newline | [
{
"docid": "9646aede343fc5dce938fc57acd609c1",
"score": "0.5741564",
"text": "def flush\n end",
"title": ""
}
] | [
{
"docid": "5f3cb2a7d1ad72a0dc08ceb1fd074fe9",
"score": "0.83600587",
"text": "def flush\n each_ios_and_stdout(&:flush)\n end",
"title": ""
},
{
"docid": "2ce4cd694db79a70cd4ced6da57af56d",
"score": "0.75099504",
"text": "def flush!\n $stdout.flush\n end",
"title": ""
}... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "76c5026bf7a053411de6b3f988e8fa06",
"score": "0.0",
"text": "def java_jprogress_params\n params.require(:java_jprogress).permit(:heading, :ques, :ans, :point, :input, :output)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
87118eaaf1e5f5ab8620d85d1a1e393f | Returns a cleaned array of keywords, free of duplicates and extraneous comma | [
{
"docid": "69ab85e9415cb4d31496e4e8f2cfa117",
"score": "0.7325189",
"text": "def clean_keywords(input)\n keywords = input.split(',').map! { |i| i.chomp.strip.downcase }.compact.uniq.keep_if { |i| i != '' }\n if keywords.empty?\n nil\n else\n keywords.join(', ')\n end\n end",
... | [
{
"docid": "a5827285f7fa2d7832f56f1a40e4cd55",
"score": "0.6882025",
"text": "def clean_array( keywords )\n keywords.map!{|keyword| keyword.downcase.strip}\n blacklist = %w{ 000 do we from as other like working web data and 00 to you your our on in the of for ru }\n\n keywords.each do |keyword|\n ... |
e1e32076c5561859bdc80145ecf3642c | DELETE /artist_people/1 DELETE /artist_people/1.json | [
{
"docid": "13570fa391d81bcfb5d4ef483455164e",
"score": "0.77256036",
"text": "def destroy\n @artist_person = ArtistPerson.find(params[:id])\n @artist_person.destroy\n\n respond_to do |format|\n format.html { redirect_to artist_people_url }\n format.json { head :no_content }\n end\... | [
{
"docid": "3722dbf1b3c8421b2f862ac260c782b0",
"score": "0.746652",
"text": "def destroy\n @artist = Artist.find(params[:id])\n @aliases = \n @artist.destroy\n\n respond_to do |format|\n format.html { redirect_to artists_url }\n format.json { head :no_content }\n end\n end",
... |
db9d3b0ec406445c1540d88225d49e8c | O(N) increasing stack data structure | [
{
"docid": "e591ff6ba5b9d2db40186829c89b110b",
"score": "0.0",
"text": "def largest_rectangle_area(heights)\n # Maintain increasing stack\n stack = []\n max_area = 0\n i = 0\n\n # Iterate once (Increasing order)\n while i < heights.length\n # If stack is empty or height is higher, push it in th... | [
{
"docid": "ad70934a6c6618f419425a4d64b6cbc7",
"score": "0.6833793",
"text": "def stack; @stack ||= [] end",
"title": ""
},
{
"docid": "856cc480e4ea1d0b21fee2cf50f040c5",
"score": "0.68279564",
"text": "def stack_ll; end",
"title": ""
},
{
"docid": "7b0c83a4d6a320271517b4... |
be6ba122ea33ec084bf38e5d536d208f | GET /email_messages/new GET /email_messages/new.json | [
{
"docid": "77a7ce0067e5b3f0a9fd9408c7f80ad0",
"score": "0.8299705",
"text": "def new\n @email_message = EmailMessage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @email_message }\n end\n end",
"title": ""
}
] | [
{
"docid": "67d9910d593506f65db4e41c7e2b69b5",
"score": "0.80222726",
"text": "def new\n @message = Message.new\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @message }\n end\n end",
"title": ""
},
{
"docid": "3b5c9a51f147971dfd0ba1d05... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "14bd2071eeda438da89d5aeeb4921614",
"score": "0.0",
"text": "def survey_params\n params.require(:survey).permit(:name,:evento_id,:archivo,questions_attributes: [\n :content, :id, :survey_id,:_destroy, \n answers_attributes: [:content, :id, :questions_id,:_destroy]\n ])\n\... | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
b0e2bbdd646cb94f792ca2c9ccade303 | Returns the hash value dumped to JSON. | [
{
"docid": "094a881fedfa10406af811e6891293a3",
"score": "0.0",
"text": "def convert_before_write(value)\n value.to_json\n end",
"title": ""
}
] | [
{
"docid": "591e6b17363dd41043a0033dec7d99d2",
"score": "0.7765287",
"text": "def hashed\n Digest::SHA256.hexdigest(to_hash.to_json)\n end",
"title": ""
},
{
"docid": "2b6d2cb1d0e4d8a3632f2583e3932881",
"score": "0.7622292",
"text": "def dump\n JSON.dump(@hash)\n end",
... |
64b60d52c13c96a60d6906cbce6f824b | DELETE /blocs/1 DELETE /blocs/1.json | [
{
"docid": "5647fc053cdb4bb0742cca46e3cdaa6e",
"score": "0.6887383",
"text": "def destroy\n @bloc = Bloc.find(params[:id])\n @bloc.destroy\n\n respond_to do |format|\n format.html { redirect_to blocs_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.65437067",
"text": "def delete(path)\n begin\n response = client[path].delete :accept => 'application/json'\n rescue Exception => e\n puts e.inspect\n end\n end",
"title": ""
},
{
"docid": ... |
7dc31068848417f5973f9a84f4cb446e | I worked on this challenge [by myself, with: Catie Stallings]. Your Solution Below | [
{
"docid": "5d32f21db85d0932a53c17d860d86a4b",
"score": "0.0",
"text": "def factorial(number)\n factor = 1\n counter = 1\n while counter < number\n factor *= (counter + 1)\n counter += 1\n end\n return factor\nend",
"title": ""
}
] | [
{
"docid": "6979036015fac47c519d3834b2c5c971",
"score": "0.67630976",
"text": "def sort_string(string)\r\n # your code here\r\n a = string.split(\" \")\r\n b = a.sort{|x,y| x.length <=> y.length}\r\n b[0]<<' '<<b[1]<<' '<<b[2]\r\nend\r\n\r\n\r\n# Select random elements from an array\r\n\r\ndef rando... |
83a70dd95bacd7a225247e120268ffb5 | GET we_all_family_stats_admin_weafam_stats_path(format: "xls") SAVE file 'we_all_family_stats.xls' | [
{
"docid": "f82236e62a8bc1a2192ef00447eb5c5c",
"score": "0.75040764",
"text": "def we_all_family_stats\n @weafam_stats = WeafamStat.order('id DESC')\n respond_to do |format|\n format.html\n format.csv { render text: @weafam_stats.to_csv }\n # format.xls { send_data @weafam_stats.t... | [
{
"docid": "737a3381ae164528f2992de2c3ef4fc7",
"score": "0.6723797",
"text": "def report_xls\n book = Spreadsheet::Workbook.new\n\n add_thing_sheet(book)\n add_user_sheet(book)\n\n buffer = StringIO.new()\n\n book.write buffer\n filename = Time.now.localtime.strftime(\"edot-%Y-%m-%d-%H... |
cfccd8c7ef4224a610a0cc779195227b | Create a Quarter with any datelike object, needs to respond to `to_date`. So Date, DateTime, and Time will all work. Note that the stored date is normalized to a proper Date object to keep things consistent. | [
{
"docid": "34a11ba1e020a0185620fa8b3d6db771",
"score": "0.6445099",
"text": "def initialize(date:)\n @date = date.to_date.freeze\n @year = date.year.freeze\n @number = QuarterHelper.quarter(date).freeze\n end",
"title": ""
}
] | [
{
"docid": "df87ec8c1baf34567deccf9155e335d4",
"score": "0.6422409",
"text": "def date_to_qspec(date, delim = nil)\n unless date.class == Date\n date = grok_date(date)\n end\n '%s%sQ%d' % [date.year, delim, quarter_by_month(date.mon)]\n end",
"title": ""
},
{
"docid": "12a19ff... |
84f50530495633f9ffa60a5316b558fa | 1. DRIVER TESTS GO BELOW THIS LINE | [
{
"docid": "8005a3b1f39b377c00d376df69b67154",
"score": "0.0",
"text": "def assert\n\traise \"Assertion error!\" unless yield\nend",
"title": ""
}
] | [
{
"docid": "35a51327dd0b5c9a884bb0e6f7155697",
"score": "0.7101977",
"text": "def testing\n # ...\n end",
"title": ""
},
{
"docid": "8fbc98d9068bd9c82033a031286f0a1e",
"score": "0.708567",
"text": "def tests; end",
"title": ""
},
{
"docid": "8fbc98d9068bd9c820... |
d23694dee34fb222e2d04cb78b8d6f0d | additional function (reverse string) | [
{
"docid": "7bafcd1b6ebdebc524d5f4ed3b5347ad",
"score": "0.0",
"text": "def reverse(str)\n reverse = ''\n\n str.length.times do |i|\n reverse.insert(i, str[-1-i].chr)\n end\n\n return reverse\nend",
"title": ""
}
] | [
{
"docid": "322c8c8db406a972295707795ed604c7",
"score": "0.86396486",
"text": "def reverse(string)\nend",
"title": ""
},
{
"docid": "322c8c8db406a972295707795ed604c7",
"score": "0.86396486",
"text": "def reverse(string)\nend",
"title": ""
},
{
"docid": "d14471b5a64486b096... |
51c451cc85d201fe7ad507cc670c9c1f | Processes the output of the cartridge configure script and scrapes it for connectivity details (such as IP and credentials). Adds a new attribute 'db' of type DbConnection to the cart with the scraped details. | [
{
"docid": "f38092e87bf29d06387136c3225fb24c",
"score": "0.716977",
"text": "def configure_hook_completed(args)\n $logger.info(\"DatabaseCartListener is processing configure hook results\")\n\n cart = args[:cart]\n output = args[:output]\n\n my_username_pattern = /Root User: ... | [
{
"docid": "c7d310de36bee73fded301a9edcba71b",
"score": "0.55218375",
"text": "def connect\n if (@type == \"db2\")\n @config\n Models::Databases::SiteDatabase::Base.setup_connection(@config)\n elsif (@type == \"bops\")\n @config\n Models::Databases::Bops::Base.setup... |
e4aff57bf53974a05dc9af7a77def594 | DELETE /measures/1 DELETE /measures/1.json | [
{
"docid": "cd8fbc30bb03c498ccb917e509c9b82b",
"score": "0.74395895",
"text": "def destroy\n @measure.destroy\n respond_to do |format|\n format.html { redirect_to measures_url, notice: 'Measure was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title... | [
{
"docid": "6730aee7da17a64bdf1562fd46b9c32c",
"score": "0.7651387",
"text": "def destroy\n @measure = Measure.find(params[:id])\n @measure.destroy\n\n respond_to do |format|\n format.html { redirect_to measures_url }\n format.json { head :no_content }\n end\n end",
"title": "... |
e34829525af02d8bf86e3418488839b2 | GET /indice_pincipals/1 GET /indice_pincipals/1.xml | [
{
"docid": "4bbd84e88dac92e695fb7f68f0487ef3",
"score": "0.6843019",
"text": "def show\n @indice_pincipal = IndicePincipal.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @indice_pincipal }\n end\n end",
"title": ""
}
] | [
{
"docid": "5eeb9b4c6cd359a575fb42046865c83d",
"score": "0.61953884",
"text": "def show\r\n @ips = Ip.find(params[:id])\r\n respond_to do |format|\r\n format.html #show.html.erb\r\n format.xml { render :xml => @ips.to_xml(:dasherize => false) }\r\n end\r\n end",
"title": ""
},
... |
b6ef5277c946f7da46874c2b8808f6bd | GET /employeemodels/1 GET /employeemodels/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "28a54c8aa8c773a60be2dde2a537de77",
"score": "0.758373",
"text": "def index\n @employeemodels = Employeemodel.all\n end",
"title": ""
},
{
"docid": "cfada938ff1af3e36010498c05c110e6",
"score": "0.71295816",
"text": "def set_employeemodel\n @employeemodel = Employe... |
560120d61f6f29afc5033b5fada6277a | returns true if the specified user has already made a pick with the specified record | [
{
"docid": "50ba9ca03360b20c47c97a96fe73456d",
"score": "0.78551924",
"text": "def user_result_picked(picks, user_id, record_abbr)\n picks.each { |pick|\n return true if pick.user_id == user_id && pick.my_record_abbreviation == record_abbr\n }\n return false\n end",
"title": ""
}
] | [
{
"docid": "de78c88d6eb3f6240a60c4544629b6df",
"score": "0.6401384",
"text": "def user_already_has_item_with_name?(record)\n user_item_names(record).include?(record.name.downcase)\n end",
"title": ""
},
{
"docid": "44fb372052108c55b401eb2926044df2",
"score": "0.6156375",
"text": ... |
658451d145d170b362581c5b634a2186 | PUT /nvs_goal_types/1 PUT /nvs_goal_types/1.json | [
{
"docid": "1d19e50c545b85f7c7952241a85854dc",
"score": "0.7215835",
"text": "def update\n @nvs_goal_type = NvsGoalType.find(params[:id])\n\n respond_to do |format|\n if @nvs_goal_type.update_attributes(params[:nvs_goal_type])\n format.html { redirect_to @nvs_goal_type, notice: 'Nvs go... | [
{
"docid": "90024d719dedac4a95a70fc1510dcb6e",
"score": "0.65126395",
"text": "def create\n @nvs_goal = NvsGoal.new(params[:nvs_goal])\n @nvs_goal.project_id = @project\n @nvs_goal.created_by = User.current\n\n respond_to do |format|\n if @nvs_goal.save\n format.html { redirect_t... |
a12198182d9dec35ef6e9a650f5eff88 | DELETE /sfprojects/1 DELETE /sfprojects/1.json | [
{
"docid": "1dd861c98429fcbc2eadefd67c7d00d6",
"score": "0.74818355",
"text": "def destroy\n @sfproject.destroy\n respond_to do |format|\n format.html { redirect_to sfprojects_url, notice: 'Sfproject was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "7ddc4c6f1bc07f28aa0ff6637e66ea9c",
"score": "0.75831956",
"text": "def destroy #BigCal\n @project.destroy\n respond_to do |format|\n format.html { redirect_to projects_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "5ee7238ce8... |
cac5c3edd61586183d0c711980efd546 | POST /exps POST /exps.json | [
{
"docid": "9e981b3f5e29832dac8ff1280f779ff7",
"score": "0.51091194",
"text": "def create\n @exp = Exp.new(params[:exp])\n\n respond_to do |format|\n if @exp.save\n format.html { redirect_to @exp, notice: 'Article was successfully posted.' }\n format.json { render json: @exp, st... | [
{
"docid": "de8036ad41041781d80a41142b81711c",
"score": "0.6092958",
"text": "def create\n @pex = Pex.new(pex_params)\n\n respond_to do |format|\n if @pex.save\n format.html { redirect_to @pex, notice: 'Pex was successfully created.' }\n format.json { render :show, status: :crea... |
b7af7de16b3522d998fb61a74dd2c53d | 'a'.ord => 97 97.chr => 'a' find substring by string[position] | [
{
"docid": "31c59822bf967af8434c39efff44c266",
"score": "0.0",
"text": "def caesarCipher(string,shift)\n\tcipherString = []\n\ti = 0\n\twhile i < string.length\n\t\tif string[i] == \" \"\n\t\t\tcipherString << string[i]\n\t\telse\n\t\t\tif (string[i].ord + shift) > 122\n\t\t\t\tcipherString << (((string... | [
{
"docid": "573826d0efca03c9deb3f866f7b8b2ec",
"score": "0.73595476",
"text": "def index_of_chr(string,chr)\n i = 0\n while i < string.length\n if string[i] == chr\n return i\n end\n i += 1\n end\n return nil\nend",
"title": ""
},
{
"docid": "10135... |
769117710083812818e56e49277956c2 | reset to initial state | [
{
"docid": "e6b7026b69b292451ed8d18d78bed8ab",
"score": "0.0",
"text": "def reset!\n @x = @init_x\n @y = @init_y\n end",
"title": ""
}
] | [
{
"docid": "2064dc79965cdd0af12bfd8cd5d96fc5",
"score": "0.8459113",
"text": "def reset\n end",
"title": ""
},
{
"docid": "2064dc79965cdd0af12bfd8cd5d96fc5",
"score": "0.8459113",
"text": "def reset\n end",
"title": ""
},
{
"docid": "12ac7c0f67b29f06a45042207fdb... |
55538d4f1fb05ef97c12d3e000e1632e | Run before every test | [
{
"docid": "806de411176d6fd49f9bcb245938b7fb",
"score": "0.0",
"text": "def setup\n File.delete(DB_NAME) if File.exist?(DB_NAME)\n end",
"title": ""
}
] | [
{
"docid": "adbfdc9f43bde6e2d37ba07928b011d4",
"score": "0.8145802",
"text": "def before_each_test\nend",
"title": ""
},
{
"docid": "83fb7bfbd0700b1d2cf6e17bb20b283a",
"score": "0.8108899",
"text": "def before_test\n end",
"title": ""
},
{
"docid": "31af79b9c5e648e754d... |
c66cd9747489707ed79593b2f5f54d70 | Unsets the current threadlocal SpanContext, disabling stats recorder creation methods of OpenCensus::Stats::Recorder | [
{
"docid": "98be27e7dff85e2474837ce9307d1b0e",
"score": "0.6629319",
"text": "def unset_recorder_context\n OpenCensus::Context.unset RECORDER_CONTEXT_KEY\n end",
"title": ""
}
] | [
{
"docid": "a0fe686c738f4468cb23522643ec484d",
"score": "0.6233311",
"text": "def clear_spans!\n tracer.instance_variable_set(:@spans, [])\n\n @spans = nil\n @span = nil\n end",
"title": ""
},
{
"docid": "e92b342031feb6433f958f0560a42711",
"score": "0.6089057",
"tex... |
a3d748db4d727b75a5d845bab6f30d97 | general permission to access PCP Subjects in PcpAllSubjectsController | [
{
"docid": "2fa622ca5ab19362bb58aba5a90eb973",
"score": "0.0",
"text": "def permitted_to_access?( account, feature = FEATURE_ID_MY_PCP_SUBJECTS, action = :to_read )\n pg = account.permitted_groups( feature, action )\n case pg\n when nil\n false\n when ''\n true\n else # ( pg & [... | [
{
"docid": "d10b348ac3945b7b48723639778f9ee2",
"score": "0.732846",
"text": "def elective_subject\n @elective_group = ElectiveGroup.shod(params[:id])\n @elective_subjects ||= @elective_group.subjects\n authorize! :read, @elective_group\n end",
"title": ""
},
{
"docid": "e898832426a... |
38a2326f25bc71809aa5ad8ca2408afd | Yield all integers from 0 up to, but not including, the number of items in this collection. For collections which provide indexed access, these are all the valid, nonnegative indices into the collection. | [
{
"docid": "fb92c2ccce740cdf1acae81d913c607f",
"score": "0.58126837",
"text": "def each_index(&block)\n return enum_for(:each_index) unless block_given?\n 0.upto(size-1, &block)\n self\n end",
"title": ""
}
] | [
{
"docid": "5b600c660828785b6b2a8a7bdfdce1cd",
"score": "0.60059774",
"text": "def index_iterator(start=0, stop=nil)\n if stop.nil?\n stop = n\n end\n\n maximum_indicies = @reps[start...stop]\n remaining_indicies = maximum_indicies.map { |maximum| (0...maximum).to_a }\n r... |
95f2736c0f4d232128777d73b4a7ae2f | Retrieve payments for a payout Retrieve payments for a payout | [
{
"docid": "ff29c93d45928d5be4ada7c87ac1cc33",
"score": "0.6159602",
"text": "def get_payments_for_payout_v3_with_http_info(payout_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PayoutServiceApi.get_payments_for_payout_v3 ...'\n end\n ... | [
{
"docid": "77526e1ca9206f9965caa5bea7029a5a",
"score": "0.68665457",
"text": "def payments\n @session.payments @account_id\n end",
"title": ""
},
{
"docid": "8852eb07c3a5d693db7f5d90c9ec3a9c",
"score": "0.6783584",
"text": "def get_payments(options = {})\n request_param... |
a215c01435b3845b0fbb351488cb9f33 | Creates and returns a PDF::Writer instance | [
{
"docid": "51cc31d6296ca16044cce560f64b5cdb",
"score": "0.62299323",
"text": "def to_pdf_writer(options = {})\n I18n.switch_locale(options[:locale] || Utility.locale_code) do\n # setup\n pdf = PDF::Writer.new(\n :paper => Utility.paper_size,\n :orientation => :portrait\n ... | [
{
"docid": "738a5166f83c90a7fdda6cba9ddfa973",
"score": "0.74901146",
"text": "def create_pdf\n File.open(@path, 'wb') do |file|\n file << rendered_pdf\n end\n end",
"title": ""
},
{
"docid": "26c28bc7e3c2eca4c6e1a6cd7860149d",
"score": "0.74662495",
"text": "def create_f... |
c2394bb0602efc671ebbf89de2294a93 | PUT /check_points/1 PUT /check_points/1.json | [
{
"docid": "cf570944cac11f0d11a16bf3d89697e0",
"score": "0.7295341",
"text": "def update\n @check_point = CheckPoint.find(params[:id])\n respond_to do |format|\n if @check_point.update_attributes(params[:check_point])\n format.html { redirect_to check_points_path, notice: t(\"activerec... | [
{
"docid": "b4509dab50d3c25cd60e5c13b98c0a1b",
"score": "0.7158712",
"text": "def update\n respond_to do |format|\n if @check_point.update(check_point_params)\n format.html { redirect_to @check_point, notice: 'Check point was successfully updated.' }\n format.json { head :no_conten... |
2ece96a65fe336b1801d90bd6305fa91 | Allow caller to override the capabilities | [
{
"docid": "752fa3229df32f00a775f85e3d28db58",
"score": "0.0",
"text": "def fmtstr_set_caps(fpu, dpa)\n\t\t@use_fpu = fpu\n\t\t@use_dpa = dpa\n\tend",
"title": ""
}
] | [
{
"docid": "e0ccd434067c204de8909cb83569deeb",
"score": "0.83256024",
"text": "def capabilities; end",
"title": ""
},
{
"docid": "e0ccd434067c204de8909cb83569deeb",
"score": "0.83256024",
"text": "def capabilities; end",
"title": ""
},
{
"docid": "e0ccd434067c204de8909cb8... |
13d464b0b1e470d35e749300b3a86fd5 | Determines if the user is logged in. | [
{
"docid": "5a96ed2b3b5935dd9774d0c5ec9d3228",
"score": "0.0",
"text": "def logged_in?\n return !session[:people_title].nil?\n end",
"title": ""
}
] | [
{
"docid": "31fb4132def094f5ed9925db932d58eb",
"score": "0.85887",
"text": "def user_is_logged_in\n if session[:current_user] != nil\n return true\n else\n return false\n end\n end",
"title": ""
},
{
"docid": "22ba2a6c1fd641fead2b88113346f450",
"score": "0.8514761",
... |
d169e826b0186104dceef59591cefe3b | Send a doubleclick at the current mouse location. | [
{
"docid": "ae43c75b145e4ae9174409c21f976936",
"score": "0.7976238",
"text": "def doubleclick(btn = 'left')\n automatically \"mousedoubleclick #{mouse_button_translate(btn)}\"\n end",
"title": ""
}
] | [
{
"docid": "9ae956159820e6fc7725194c995deec0",
"score": "0.8588992",
"text": "def double_click\n Bewildr::Mouse.double_click(clickable_point)\n end",
"title": ""
},
{
"docid": "84027c7d65d574201a53dd3a2250c72e",
"score": "0.818135",
"text": "def double_click point = current_p... |
ad8e089feb993c8530154ccf8b122d19 | whether it should uppercase or lowercase each letter. The nonalphabetic characters should still be included in the return value, they just don't count when toggling the desired case. | [
{
"docid": "52d3ada58ed0f4079afb9119ef71ee0b",
"score": "0.0",
"text": "def staggered_case(string, first_case = \"up\")\r\n new_string = \"\"\r\n if first_case == \"up\"\r\n index = 0\r\n else\r\n index = 1\r\n end\r\n string.each_char do |x|\r\n index % 2 == 0 ? new_string << x.upcase : n... | [
{
"docid": "bac74b41b99024554780fe86eaf236f4",
"score": "0.73807573",
"text": "def is_all_lowercase?\n return self.downcase.eql? self\n end",
"title": ""
},
{
"docid": "bac74b41b99024554780fe86eaf236f4",
"score": "0.73807573",
"text": "def is_all_lowercase?\n return self.downc... |
2427e517932c929e20cd524025ba28c4 | > defining Go! => 42 | [
{
"docid": "644bf7887f66173cfadbd62654def225",
"score": "0.0",
"text": "def meditate\n puts 'Adjusting posture...'\n p = Proc.new do\n puts 'Ringing bell...'\n next\n puts 'Getting distracted!'\n end\n p.call\n puts 'Sitting still...'\nend",
"title": ""
}
] | [
{
"docid": "48c979f95d65b66ecb941e7e71370af0",
"score": "0.63577956",
"text": "def hello; :hello; end",
"title": ""
},
{
"docid": "48c979f95d65b66ecb941e7e71370af0",
"score": "0.63577956",
"text": "def hello; :hello; end",
"title": ""
},
{
"docid": "42a15877e51f4bf3b011b7... |
22015f94884db98b0dc0d146252ccfaf | Subject can be set in your I18n file at config/locales/en.yml with the following lookup: en.party_mailer.reminder.subject | [
{
"docid": "945d9f07914e21724cbe2339ae199f12",
"score": "0.0",
"text": "def reminder(invite)\n @greeting = \"Hi\"\n @party = invite.party\n email = invite.user.email\n organizer_email = @party.organizer.email\n mail to: email, from: organizer_email , subject: \"Please RSVP!\"\n end",
... | [
{
"docid": "ea740e704e8f1173fb87b45dfcaaf989",
"score": "0.77905834",
"text": "def subject_for(key)\n I18n.t(:subject, scope: [:mailer, key])\n end",
"title": ""
},
{
"docid": "8928fe4f050d7ebd3e9aa992b07e320a",
"score": "0.7732638",
"text": "def subject_for\n ActiveSuppor... |
144cc1dc311f9bc5f0455e0d6bab43bb | TODO don't delete this, just deactivate it | [
{
"docid": "702985786a1d2f88bee00218364fe080",
"score": "0.0",
"text": "def destroy\n authorize @case_assignment\n @case_assignment.destroy\n\n redirect_to after_action_path(case_assignment_parent)\n end",
"title": ""
}
] | [
{
"docid": "de16896df674d9996b64636c57994b09",
"score": "0.74109447",
"text": "def deactivate; end",
"title": ""
},
{
"docid": "de16896df674d9996b64636c57994b09",
"score": "0.74109447",
"text": "def deactivate; end",
"title": ""
},
{
"docid": "8d19c5a7ff773bf998fad8e175eb... |
18034ee4d5a9836305ad783a9ec2540c | GET /doit_lists GET /doit_lists.json | [
{
"docid": "67a40b6b89d0658c65464856ddf70c98",
"score": "0.75135195",
"text": "def index\n @doit_lists = DoitList.all\n end",
"title": ""
}
] | [
{
"docid": "c2c6c7fb0c49180e9474b8eff2409fd5",
"score": "0.7966166",
"text": "def lists\n\tget('/lists.json')\nend",
"title": ""
},
{
"docid": "77a1d3e486268772863d6922fb51ab9a",
"score": "0.71837693",
"text": "def list\n JSON.parse get(\"list/json\")\n end",
"title": ""
... |
eea906738c88dd681e1e2d5f3ce01290 | Initialize and return a new API instance. | [
{
"docid": "50cd53bd1048422a20e1511b8cc9cfb9",
"score": "0.0",
"text": "def initialize(opts)\n @opts = opts\n uri = URI(opts[:uri])\n @host = uri.host\n @port = uri.port\n end",
"title": ""
}
] | [
{
"docid": "e3f919ef12baaa303d35c608315ed363",
"score": "0.7568109",
"text": "def initialize(api)\n @api = api\n end",
"title": ""
},
{
"docid": "4151def6ff4464fd239a58f0b16e02cf",
"score": "0.7567174",
"text": "def api\n # Should return an instance of the API ... |
f0a6fd44603ecf8dd397754a9b292b0c | Do nothing or override in cloud specific derived classes for prevmcreation setup steps | [
{
"docid": "cc967ba1f95c7f1ddcc0e0d4f8cc1840",
"score": "0.0",
"text": "def create_server_dependencies; end",
"title": ""
}
] | [
{
"docid": "0e9ad86554e48b7b877bfd8407f71d5e",
"score": "0.7201509",
"text": "def setup_create\n\t\traise NotImplementedError, \"cannot create generic virtual machines on the go\"\n\tend",
"title": ""
},
{
"docid": "70eecff7b6e2caf391e71de43710ac0a",
"score": "0.66420436",
"text": "d... |
e216e581c3a61c8aaf7b3c15b53efa09 | Gets the v12_0 property value. When TRUE, only Version 12.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. | [
{
"docid": "6edac1eb7e4a1175bdb9392f7d56215b",
"score": "0.65491676",
"text": "def v12_0\n return @v12_0\n end",
"title": ""
}
] | [
{
"docid": "95ed54797cd6d00b014eee3d7e2bab11",
"score": "0.5889997",
"text": "def get_value\n read_attribute('boolean_value')\n end",
"title": ""
},
{
"docid": "fe52559e171852772deea7afc06c82ed",
"score": "0.56802547",
"text": "def v11_0\n return @v11_0\n ... |
1376923d20f97d4d1c6a4d85d74dff14 | Here is the test for four of a kind | [
{
"docid": "ed064b527ebc89011e6c9391d89863b1",
"score": "0.0",
"text": "def white_four(white_numbers)\n white = white_numbers\n if (white[0] == white[1]) && (white[0] == white[2]) && (white[0] == white[3])\n w_4s = \"Four of a kind, #{white[0]}s.\"\n elsif (white[1] == white[2]) && (whit... | [
{
"docid": "314a01f527762e05559c2535f202ce35",
"score": "0.7614617",
"text": "def check_four_of_a_kind\n return check_matches(2, @cards)\n end",
"title": ""
},
{
"docid": "c7a0ae811b8c8edb71b673a8a488011d",
"score": "0.7453807",
"text": "def four_of_a_kind?\n # Lol, for a seco... |
8b059d665a567e36844c564fe4f976e2 | DELETE /file_attachment_dumps/1 DELETE /file_attachment_dumps/1.json | [
{
"docid": "cfe66cf6a6cafb8b4ff4f8a98ea2ab23",
"score": "0.72873646",
"text": "def destroy\n @dump = Dump.find(params[:dump_id])\n @file_attachment_dump = @post.file_attachment_dumps.find(params[:id])\n @file_attachment_dump.destroy\n respond_to do |format|\n format.html { redirect_to f... | [
{
"docid": "8605a21a07308219a55ec6021f47c90e",
"score": "0.7247938",
"text": "def destroy\n if @attachment.destroy \n render json: { message: \"File deleted from server\" }\n else\n render json: { message: @attachment.errors.full_messages.join(',') }\n end\n end",
"title": ""
... |
29303ce8450334966eb97a820f255195 | recursive grabering of categories | [
{
"docid": "bb7f3b6b185e91563fef16e5acb31edb",
"score": "0.0",
"text": "def get_catalog url, categories\n url ||= self.FoodURL\n page = @agent.get(url)\n #while there is table#ctl00_ContentPH_ChildDL links - we grabber children\n\n end",
"title": ""
}
] | [
{
"docid": "f5c7d6be0d170294621fcfbf12e1a96a",
"score": "0.76266056",
"text": "def get_categories\n get_sub_categories(nil)\n end",
"title": ""
},
{
"docid": "f5c7d6be0d170294621fcfbf12e1a96a",
"score": "0.76266056",
"text": "def get_categories\n get_sub_categories(nil)\n end... |
70b3646141194c23e9f94ee622fa3aaf | I worked on this challenge [by myself, with: ]. Your Solution Below | [
{
"docid": "6322a45fef54f954cc4e77f469c97134",
"score": "0.0",
"text": "def good_guess?(intgr)\nif intgr == 42\n return true\nelse return false\nend\nend",
"title": ""
}
] | [
{
"docid": "b9960478999684c2b536f76e22f6fc63",
"score": "0.62877476",
"text": "def solution4(input)\n end",
"title": ""
},
{
"docid": "bca12d2414c241325b8beea187f866fa",
"score": "0.60846186",
"text": "def isLucky(n)\r\nhalf1 = []\r\nhalf2 = []\r\nn_string = n.to_s\r\n\r\n\r\nfirsth... |
e7e74acea7f6fe862040b97105367a86 | GET /propiedadclases GET /propiedadclases.json | [
{
"docid": "5d679779499c584da19f332c35d0457e",
"score": "0.6883725",
"text": "def index\n @propiedadclases = Propiedadclase.all\n end",
"title": ""
}
] | [
{
"docid": "ad5209f740e388c0d040f7c81f99ecbe",
"score": "0.64184266",
"text": "def show\n @palabras_clafe = PalabrasClave.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @palabras_clafe }\n end\n end",
"title": ""
},
{
... |
a260bebbdaddaf76c1e263856459939e | gets the user and mission from the user session if they're not already set | [
{
"docid": "c748427b506c5996aa6fd204368536f1",
"score": "0.79717696",
"text": "def get_user_and_mission\n\n # don't do this for XML requests\n return if request.format == Mime::XML\n\n # get the current user session from authlogic\n user_session = UserSession.find\n user = user_... | [
{
"docid": "d0fdfcc41fc21f258f3e865e55e2722b",
"score": "0.651333",
"text": "def get_user_to_act_on\n @user = session[:user]\n end",
"title": ""
},
{
"docid": "9f60d52e8adcb969ea1aec48c2ca099c",
"score": "0.65019053",
"text": "def current_user\n \tif session[:status] == \"3\"\n ... |
78215de730a5d8818b2aee69ff8448ff | reset price of item | [
{
"docid": "a01745f105e70ae2291a0840bd08c26c",
"score": "0.75806624",
"text": "def refreshPrice\n @price = @originalPrice\n end",
"title": ""
}
] | [
{
"docid": "f91cb0ae8cad6e6e0bd61912507a7b10",
"score": "0.7671542",
"text": "def set_item_price\n self.item_price ||= product.price\n end",
"title": ""
},
{
"docid": "ea8bb115cea4df3e1c07f29b0efc319c",
"score": "0.750899",
"text": "def zero_prices!\n raise \"Locked since #{se... |
a7013ff371cf6eb7b567f78cf6cd72c4 | Shortcut methods for the best Hsp | [
{
"docid": "d9522b476124ef86742659eae844eddd",
"score": "0.0",
"text": "def evalue;\t\t@hsps.first.evalue;\t\tend",
"title": ""
}
] | [
{
"docid": "b6ea57868f70d34431fd3ddce643afcb",
"score": "0.68786496",
"text": "def hiss; end",
"title": ""
},
{
"docid": "b78708f279678594607705af65622e91",
"score": "0.64722127",
"text": "def hamlet; end",
"title": ""
},
{
"docid": "43457b9bb9d42357bec1690567445a86",
... |
3ec5b9cf6fa6f34b1faed9305f6ae1be | Public: prints the detailed view of all your Lists and all their Items. Returns nothing. | [
{
"docid": "7df48e4cdbeb1aa958a8efdb2ec82c39",
"score": "0.69253516",
"text": "def all\n storage.lists.each do |list|\n output \" #{list.name}\"\n list.items.each do |item|\n output \" #{item.short_name}:#{item.spacer} #{item.value}\"\n end\n end\n... | [
{
"docid": "3d1c74cd5762b50df182a2935447bd12",
"score": "0.7746581",
"text": "def view \n puts\n puts \"Viewing #{listname.capitalize} List\"\n\n items.each_with_index do |item, index| \n puts \"#{index+1}. #{item}\"\n end\n end",
"title": ""
},
{
"docid":... |
fc86e84c51f2774d8a48659aca8bf97f | Autoevals a single command | [
{
"docid": "729956df4ee5f39fcc3d6089bc2adcbc",
"score": "0.64485395",
"text": "def one_unknown_cmd(commands, input)\n unless Setting[:autoeval]\n return errmsg(\"Unknown command: \\\"#{input}\\\". Try \\\"help\\\"\")\n end\n\n commands.find { |c| c.is_a?(EvalCommand) }.execute\n ... | [
{
"docid": "41ef2ecabed6ef29d736615ad59308eb",
"score": "0.66232073",
"text": "def method_missing(sym, *args, &block)\n shell.execute sym.to_s\n $last_res\n end",
"title": ""
},
{
"docid": "b662333d3814d230618be3ed2a898f65",
"score": "0.66096973",
"text": "def run(comman... |
ce9dc9e5bc6d2df548245f71af52f6fe | [Array[ Word ]] the elements of this array source://syntax_tree//lib/syntax_tree/node.rb12081 | [
{
"docid": "050bea5ca1589e87b5597c3bf130ba26",
"score": "0.0",
"text": "def elements; end",
"title": ""
}
] | [
{
"docid": "1c4294d3a167c5d54ac0d3b31e936b90",
"score": "0.7565118",
"text": "def visit_words(node)\n visit_array(\n ArrayLiteral.new(\n lbracket: node.beginning,\n contents: Args.new(parts: node.elements, location: node.location),\n location: n... |
af5c7544378f6899149752ca6d3ccd89 | returns the current weather type as a string: Clear, Cloudy, Overcast, Rainy, etc... | [
{
"docid": "ede015e6e4df1a26664267bc98cf40f5",
"score": "0.7724508",
"text": "def current_weather\n current_weather_type = @weather_instance[\"current_observation\"][\"weather\"]\n\n return current_weather_type\n end",
"title": ""
}
] | [
{
"docid": "12879987016bc67429ce7643965c5977",
"score": "0.7419974",
"text": "def weather_type_code\n @weather_type_code ||= text_from_node('icon_url_name').gsub(/^n|\\.jpg$/, '').to_sym\n end",
"title": ""
},
{
"docid": "479de67125f8a6951c5398fba7e6130d",
"score": "0.69875604",
... |
d29312b8893f9040f4bb23a764a63434 | PUT Update one Person using the body | [
{
"docid": "42df8ba024ce54dab184f02761621ecd",
"score": "0.7820142",
"text": "def update_by_body\n @person = Person.find(person_update_params[:id])\n\n if @person.update_attributes(person_update_params)\n render json: { status: 'PUT Success' }, status: :ok\n else\n render json: { stat... | [
{
"docid": "f15da4f0ad6bedf82602d7bee9c504c7",
"score": "0.76712745",
"text": "def update\n resource_path = \"/projects/#{project_id}/people/#{id}\"\n Request.put(resource_path, self.to_xml('person'))\n end",
"title": ""
},
{
"docid": "5f65b02a816e569d1e79e1a353f47fae",
"sco... |
782e14bca1ae7f0f32c7194611c1f8e1 | GET /wishlists GET /wishlists.json | [
{
"docid": "5ff16e89deec807cba3329a9b0a9e030",
"score": "0.65151966",
"text": "def index\n if current_user.present?\n @wishlists1 = current_user.wishlists\n end\n @wishlists2 = Wishlist.where(\"shared =?\", 'public')\n @users = current_users\n end",
"title": ""
}
] | [
{
"docid": "fb36cf1250dbef08b124a0edfc4bc6a1",
"score": "0.8156006",
"text": "def wish_list(options={})\n get('/wish_list', options)\n end",
"title": ""
},
{
"docid": "4f2a5dc8cc42ed79611874a877ff7a84",
"score": "0.7813523",
"text": "def index\n @wishlists = Wishlist.a... |
0cf2c00bce5454b05e7010a8f0b5083e | Get the rules or settings defined for a role management policy. The rules are a collection of following types that are derived from the unifiedRoleManagementPolicyRule object:+ unifiedRoleManagementPolicyApprovalRule+ unifiedRoleManagementPolicyAuthenticationContextRule+ unifiedRoleManagementPolicyEnablementRule+ unifi... | [
{
"docid": "583f0340a1135981bddd4932c2263d5b",
"score": "0.5156132",
"text": "def get(request_configuration=nil)\n request_info = self.to_get_request_information(\n request_configuration\n )\n ... | [
{
"docid": "22e16156f4295488d1321af5647aa903",
"score": "0.6923373",
"text": "def role_management_policies\n return @role_management_policies\n end",
"title": ""
},
{
"docid": "512e310677b97e4b00203e4b2c3d2173",
"score": "0.6343358",
"text": "def role_manage... |
e7cbfa300f46d7a8b1906c29c3a7c2a6 | Get the value of the specific theme option. | [
{
"docid": "38441ae41befc3c348e6c4aad45d5bc1",
"score": "0.6815739",
"text": "def theme_option(option_name)\n theme_data(parent: true).merge(theme_data)[option_name.to_s]\n end",
"title": ""
}
] | [
{
"docid": "1eeede738a0bf49e9411caaf1e92fca0",
"score": "0.6631905",
"text": "def value\n options_hash[option_id]\n end",
"title": ""
},
{
"docid": "478646e81dacae21f4cc97dc7ffe6438",
"score": "0.6190249",
"text": "def value\r\n assert_exists\r\n option_value\r\... |
35c29c7d000ac3eca806e01c43388328 | Truncate the account name on Accound cards if too long | [
{
"docid": "779ef8713d3d3ec11cec044271b5d045",
"score": "0.8246614",
"text": "def account_card_title\n name_too_long ? name[0..Account::DISPLAY_NAME_LIMIT] + '...' : name\n end",
"title": ""
}
] | [
{
"docid": "c3789ec582c3c74cd57023dca4f70c69",
"score": "0.73994225",
"text": "def name_too_long\n name.length > Account::DISPLAY_NAME_LIMIT\n end",
"title": ""
},
{
"docid": "dad69cfd3d8d1b1b841e2b8790c38edf",
"score": "0.6836745",
"text": "def display_user_link\n name.trunca... |