query_id
stringlengths
32
32
query
stringlengths
7
6.75k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
f068259806455578f617777106e077ad
GET /people/new GET /people/new.json
[ { "docid": "edab9199a74b9108b66478818dbc9bb7", "score": "0.7880659", "text": "def new\n @person = Person.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @person }\n end\n end", "title": "" } ]
[ { "docid": "f756de51561ef732ec7957f10d0cc132", "score": "0.785759", "text": "def new\n @person = Person.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @person }\n end\n end", "title": "" }, { "docid": "bae0f54ccddc2240...
d985243df46e3c4f0fb5c9839306925e
POST /interpros POST /interpros.json
[ { "docid": "be63935435a3bdb81360835b36f8d30a", "score": "0.7342578", "text": "def create\n @interpro = Interpro.new(params[:interpro])\n\n respond_to do |format|\n if @interpro.save\n format.html { redirect_to @interpro, notice: 'Interpro was successfully created.' }\n format.js...
[ { "docid": "57bf32aad73675a9dda156dadc36bd8e", "score": "0.6390789", "text": "def new\n @interpro = Interpro.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @interpro }\n end\n end", "title": "" }, { "docid": "4e6a7e62fccfad27709b4...
83e553bdc84d86f3802d9ec711006d00
The userfacing entry for post.contents in the Haml templates.
[ { "docid": "bf1af931e66c7e03f96f7a10e6cef5fc", "score": "0.54961807", "text": "def contents\n rendered_contents\n end", "title": "" } ]
[ { "docid": "a1f655b2d68ac1ef5241c6e0a55d9b33", "score": "0.68167156", "text": "def content_entry\n self.controller.instance_variable_get :@entry\n end", "title": "" }, { "docid": "b1a1ac03fba7431a4b50c832f4c9f8fc", "score": "0.6711025", "text": "def view_post\n content...
86b909290b4fed98506f579ffd77bc08
Using xpdf's pdftoText convert pdfs to text
[ { "docid": "a8c7936ae3929bf8e9e17065758c90f6", "score": "0.68334544", "text": "def decodePdfs\n workingDir = '.'\n pdfs = Dir.glob(\"*.pdf\")\n\n pdfs.each do |pdf|\n system(\"pdftotext -nopgbrk ./\"+pdf)\n end\n\nend", "title": "" } ]
[ { "docid": "7be5020a5b4dbaeea9da532a790ef10d", "score": "0.7683593", "text": "def pdf_to_text(file, noblank = true)\n spec = file.sub(/.pdf$/, '')\n `pdftotext #{spec}.pdf`\n # file = File.new(\"#{spec}.txt\")\n # text = []\n # file.readlines.each do |l|\n # l.chomp! if noblank\n # if l.lengt...
24f0a1e37c91c30a0c587b0b5ac8b9be
POST /survey_questions POST /survey_questions.json
[ { "docid": "31bcc9c20b775b2ca54ec3af85c9cf33", "score": "0.67626065", "text": "def create\n\n params[:survey_question][:survey_id] = params[:survey_id]\n @survey_question = SurveyQuestion.new(params[:survey_question])\n\n respond_to do |format|\n if @survey_question.save\n\n format....
[ { "docid": "e68624a0fd0baa2e6be5ae5c0c0876a0", "score": "0.8065983", "text": "def create\n json = params[:survey]\n json[:questions] = JSON.parse(json[:questions])\n json[:questions].each_with_index do |question, idx|\n json[:questions][idx]['id'] = idx + 1\n end\n @survey = Survey.n...
fb92e3d8edfc097926118f11f41a1292
Manually emit a fluent event for all timed out events
[ { "docid": "3e60d1a2056aa940daeea5ea0da6fcc2", "score": "0.6075123", "text": "def timeout_events(timeout_buffer)\n timeout_buffer.each do |event_id|\n emit_event(@event_buffer.delete(event_id), 'event_timeout')\n end\n end", "title": "" } ]
[ { "docid": "a5e1c95a9ae7a5d23532924ccd78db06", "score": "0.6497384", "text": "def timeout *args\n @evented_example.timeout *args\n end", "title": "" }, { "docid": "d0c81076b5c02ad489b6874463cd14c4", "score": "0.63093704", "text": "def timeout(*args)\n @evented_example.ti...
5bbde05c70b313b2548e7838efdd1b7f
Get payer details from Payer identification loop of 835 file.
[ { "docid": "5e5017812d0a5ec5fd9d9685e540d0e8", "score": "0.61517525", "text": "def get_payer_details(value)\n case @current_element\n when 'N102'\n @payer_name = value\n when 'N104'\n @payer_npi = value\n when 'N301'\n @payer_address = value\n when 'N401'\n @payer_city...
[ { "docid": "4dabc28dc8c2b5e69a339590e751e295", "score": "0.6374895", "text": "def payer_identification_loop(repeat = 1)\n payer = get_payer\n output_version = @facility_config.details[:output_version]\n Output835.log.info \"\\n payer is #{payer.name}\"\n if payer\n payer_segments = []\n...
3db1f4af519902721090bc951d9eee1f
GET /autocompletes/1 GET /autocompletes/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "98984a3b19a476543c2e77754e7b2b5b", "score": "0.7628161", "text": "def autocompletes\n wrapping_autocomplete_entities!(\n get(\n ROOT_LIST,\n autocompletes_parameters\n )\n )\n end", "title": "" }, { "docid": "8b00f6c83649...
ad1042fb51a2a178edebe38d2c04b347
GET /facebookads/1 GET /facebookads/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "6c5f90a3a77eddfb5a8b1555a474d23a", "score": "0.7218103", "text": "def index\n @facebook_ads = FacebookAd.all\n end", "title": "" }, { "docid": "1e05cdbb4eb5881856063d627d26e4c1", "score": "0.71480966", "text": "def index\n @facebookads = Facebookad.all\n end", ...
4335949eee5e47608c9b04749e0281f5
Calculates :memory_diff for each request based on the last completed request that was not a failure.
[ { "docid": "5c91cd281022f12cd578e633d31a981d", "score": "0.529603", "text": "def update_pids\n # memory isn't recorded with exceptions. need to set #last_memory_reading+ to -1 as\n # the memory used could have changed. for the next request the memory change will not be recorded.\n #\n # ...
[ { "docid": "8b572ff8c0e4678a47fbe7c7669f72cb", "score": "0.5775174", "text": "def allocations\n @allocation_count_finish - @allocation_count_start\n end", "title": "" }, { "docid": "d77f185cff1368175718672c46123a9d", "score": "0.5440203", "text": "def memory_allocation_ex...
bfd539bcbecb700fe3d85b3f0ae93848
Add the following middleware to the chain: use Serf::Middleware::ParcelFreezer
[ { "docid": "8aa327ce53bb880e97af7c77692a6aed", "score": "0.68338215", "text": "def use_default_serfer_stage\n use Serf::Middleware::ParcelFreezer\n use Serf::Middleware::PolicyChecker, policy_chain: @policy_chain\n use Serf::Serfer\n end", "title": "" } ]
[ { "docid": "3f35059e1fa6a00c17e6ed37a5946aaa", "score": "0.6186402", "text": "def middleware; end", "title": "" }, { "docid": "3f35059e1fa6a00c17e6ed37a5946aaa", "score": "0.6186402", "text": "def middleware; end", "title": "" }, { "docid": "3f35059e1fa6a00c17e6ed37a5946a...
dc90f4fb0fa7c7e007e7551fb7628593
DELETE /climates/1 DELETE /climates/1.json
[ { "docid": "42d835ac3dd746c2a9f64376bf4e3f10", "score": "0.68032074", "text": "def destroy\n @climate = Climate.find(params[:id])\n @climate.destroy\n\n respond_to do |format|\n format.html { redirect_to climates_url }\n format.json { head :no_content }\n end\n end", "title": ...
[ { "docid": "689d5a07a403c4b765ba178e4aff08a3", "score": "0.70482683", "text": "def delete\n client.delete(\"/#{id}\")\n end", "title": "" }, { "docid": "4c1c164b581dbae14285797e584e8fb7", "score": "0.6982713", "text": "def delete_tenant_circle(args = {}) \n delete(\"/tenantci...
1e205a2eada544daf7e7ecd617953058
Public: Scoped to just a profile. Returns the ActiveRecord query object.
[ { "docid": "882bce386c9adb6fb22eba1b693ad7f0", "score": "0.0", "text": "def by_profile\n profile.owned_tags.ordered_by_slug\n end", "title": "" } ]
[ { "docid": "f3dbc2e4bc0ceb5bad72e56fee2be3d1", "score": "0.61415136", "text": "def results(profile=nil, options={})\n query = loaded? ? Query.from_query(self) : self\n\n options, profile = profile, self.profile if profile.is_a?(Hash)\n\n query.profile = profile\n query.apply_options(...
dea64066b97116285099c59a0f7efa04
return has precedence over puts in the method definition since return is blank, the method doesn't return anything therefore puts scream("Yipee") won't return anything either Exercise 5
[ { "docid": "fbbbd1a9116e015d8d9cca2c176b984e", "score": "0.0", "text": "def scream(words)\n words = words + \"!!!\"\n puts words \nend", "title": "" } ]
[ { "docid": "f8fffa44fd60beaba607ddb3a80e36c0", "score": "0.7324246", "text": "def scream(words)\nwords = words + \"!!!!\"\nreturn #this makes the program return nothing.. because it has nothing next to the return method\nputs words\nend", "title": "" }, { "docid": "7ad48ebadac491bb55d555d40f...
d4a1edaae4d92d004632cf64501ce2e7
DELETE /users/1 DELETE /users/1.json
[ { "docid": "15bbd6148634eeae1703a9d0983f5a27", "score": "0.0", "text": "def destroy\n @user.destroy\n respond_to do |format|\n format.html { redirect_to users_url, notice: 'User was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "title": "" } ]
[ { "docid": "8e69eb3ff3374e0db6fa9eb17958df65", "score": "0.78736883", "text": "def DeleteUser id\n \n APICall(path: \"users/#{id}.json\",method: 'DELETE')\n \n end", "title": "" }, { "docid": "6f74a32c6fdb67babd4a903e37b5baa4", "score": "0.7750104", "text": ...
e42ab122f65d21a9f87e5860f1afcc0b
define the action to create a new controller (constructor?)
[ { "docid": "8117f9a5c4727f278743782543cabdb0", "score": "0.0", "text": "def new\n @flashcard = Flashcard.new\n end", "title": "" } ]
[ { "docid": "7ae383689b7ba3e649a3ec60eb2d8f4e", "score": "0.7711127", "text": "def controller ; OpenStruct.new(action: :create) ; end", "title": "" }, { "docid": "f700c7a64bf3f742990193a81314e3ce", "score": "0.76239103", "text": "def create_controller(ctrl_action)\n ctrl_name, acti...
f7b0b763a450eb101adba69a827b6943
For handling signup request
[ { "docid": "5c3328eecd6fd94c32d307ccd62708c1", "score": "0.7183139", "text": "def signup\n email = params[:email]\n password = params[:password]\n\n uri = URI('https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=\n AIzaSyBTjel7X8dsnvOts0_QCq_CIteaWswF9P8')\n\n res = Net::HTTP....
[ { "docid": "95d5138b6fffc1851522fe2af5f9031a", "score": "0.83796203", "text": "def signup\n\n end", "title": "" }, { "docid": "95d5138b6fffc1851522fe2af5f9031a", "score": "0.83796203", "text": "def signup\n\n end", "title": "" }, { "docid": "44e542b8c24d9a4302f318c44c8a...
531f33fa526c8e369e7d01995be98bbb
GET /stories/1 GET /stories/1.xml
[ { "docid": "53c9c7b54c2fdd2c2cd2a6ca58e74aa5", "score": "0.7171671", "text": "def show\n @story = Story.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @story }\n end\n end", "title": "" } ]
[ { "docid": "092b32fe7594ec690d3f9d37342b58aa", "score": "0.7582661", "text": "def show\n @story = Story.find(params[:id])\n\n respond_to do |format|\n format.xml { render :xml => @story }\n end\n end", "title": "" }, { "docid": "7e1591c8e3e4a879fb9cda4f0fc72229", "score":...
1ad22480772bc2b3df91b79cfda1031a
To provide truncate_html to test context, need to define bridge trucate_html which some tests depends on.
[ { "docid": "5a82b8d75b4bd99ca67659b6d4d06286", "score": "0.61520433", "text": "def truncate_html(html, options={})\n return '' if html.nil?\n html_string = TruncateHtml::HtmlString.new(html)\n TruncateHtml::HtmlTruncator.new(html_string, options).truncate.html_safe\n end", "title":...
[ { "docid": "cf9b9989238885ca30173a459097a9b3", "score": "0.6195599", "text": "def sub_content\n HTML_Truncator.truncate(content_html, 300, length_in_chars: true)\n end", "title": "" }, { "docid": "c789a11b110e68f2b610f3997696dd34", "score": "0.59807324", "text": "def truncate_htm...
4ac480384b414cacf9d279e23efac492
GET /kioskitems/1 GET /kioskitems/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "7f3a71d010058e1066915768835ce257", "score": "0.6871902", "text": "def index\n @kioskitems = Kioskitem.active.ordered.all\n render layout: \"kiosk\"\n end", "title": "" }, { "docid": "8d887857bb67235d66921b56f6fb7d0f", "score": "0.6543132", "text": "def set_kioskite...
1f8886b6cf0fa92574b5482cbf4c1f16
MEMBER PAGES notes associated with this affiliate_event_applications
[ { "docid": "b19a27f835ff195203cf6924e18fdc13", "score": "0.4985381", "text": "def notes\n @bhsi_application = BhsiApplication.find(params[:id])\n @notes = @bhsi_application.notes.includes(:author).search_sort_paginate(params, :parent => @bhsi_application)\n end", "title": "" } ]
[ { "docid": "b0d58d3cdd7c206827cf68c177dcfeb0", "score": "0.62449086", "text": "def membership_payment_notes\n payment_notes(Payment::PAYMENT_TYPE_MEMBER)\n end", "title": "" }, { "docid": "ee627f46ae351ee4def15ee621da1380", "score": "0.60181606", "text": "def personal_notes\n ...
bcb738a0a8591f3db2462d3ffed51622
Show company and its products from admin view
[ { "docid": "11cd272618504221a8db14663f568e02", "score": "0.75856125", "text": "def show\n @company = User.find(params[:id])\n @products = @company.products\n end", "title": "" } ]
[ { "docid": "2e492eb7341725b67b5fc39cc6002bda", "score": "0.77221763", "text": "def index\n @companies = Company.where(user_id: current_user.id).order(\"name\")\n @path = 'products'\n @pagetitle = \"Products\"\n end", "title": "" }, { "docid": "ea3666878921f9ae25fe0db905cec962", ...
24ed965e40de710a44501d2404add2a8
Calculate the next delay for a given retry count. This is a truncated binary exponential backoff, with a base slot delay of 0.34 seconds, and an exponent of min(retries, 10).
[ { "docid": "28c426eebdc30a08a83aff228b9908e9", "score": "0.74261457", "text": "def delay_for_retry(retries, prng = Random::DEFAULT)\n maximum_wait = (2 ** [retries, 10].min) - 1\n slots_to_wait = prng.rand(0 .. maximum_wait)\n delay = (0.34 * slots_to_wait).round(2)\n end", "title...
[ { "docid": "0de35e677de706b9b3dc43e759876bc1", "score": "0.7220198", "text": "def retry_delay(_ = nil)\n delay = backoff_strategy[retry_attempt] || backoff_strategy.last\n # if the values are the same don't bother generating a random number, if\n # the delta is zero, some platforms ...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "793640978cb3035f4862259bc480aeb5", "score": "0.0", "text": "def lien_params\n params.require(:lien).permit(:name, :url)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.7497917", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "13a61145b00345517e33319a34f7d385", "score": "0.69572496", "text": "def strong_params\n params.require(:request).permit(param_whit...
96affffd5547a29c34add545767e4c76
POST /users/1 POST /users/1.json
[ { "docid": "0fd24b7eb0a8328a3ded207dd05ca359", "score": "0.0", "text": "def update\n @user = User.find_by_sim_serial_number(params[:id])\n\n params = user_params\n params.delete_if {|k,v| !params[k].present?}\n\n if @user.update(params)\n render json: @user\n .to_json(...
[ { "docid": "24c5e44d772da89269600975eeebdfda", "score": "0.70971906", "text": "def create\n @user = User.new(user_params)\n @user.save\n json_response(@user, :created)\n end", "title": "" }, { "docid": "e1e13eee09f048e261c1adc854f89ba8", "score": "0.7070795", "text": "def c...
a0dcc985ff2d8439d2be525f8fd39d3a
rubocop: enable CodeReuse/ActiveRecord This method will eventually take the place of `execute` as an efficient way to get relevant environment entries. Currently, `execute` method has a serious technical debt and we will likely rework on it in the future. See more
[ { "docid": "b1a14803695c324003347dbf1fc7d80b", "score": "0.0", "text": "def find\n environments = project.environments\n environments = by_name(environments)\n environments = by_search(environments)\n\n # Raises InvalidStatesError if params[:states] contains invalid states.\n environments...
[ { "docid": "8cb923c8364e4247c0d83d09806699e2", "score": "0.6741063", "text": "def _run_env_queries\n _run_commands('basic common env queries', {\n 'uname' => ['-a'],\n 'pwd' => [''],\n 'env' => [''],\n },\n false)\n case ...
8c30881e4825953dc79040bfe68a4cbb
Returns the smaller of the two dimensions
[ { "docid": "d8386638f8c1933400b081a25cdaa465", "score": "0.7497924", "text": "def smaller\n [height, width].min\n end", "title": "" } ]
[ { "docid": "d671a637e647bf94f537b9de8e6e27e1", "score": "0.7391031", "text": "def smaller\n [height, width].min\n end", "title": "" }, { "docid": "cc41287a81a7cbf842df49beec8fd835", "score": "0.72112924", "text": "def is_smaller_than(dimensions)\n !is_bigger_than(dim...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "9045a2a70363a3d90659179e4f6f7274", "score": "0.0", "text": "def bookreview_params\n params.require(:bookreview).permit(:rating, :summary, :details, :book_id)\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...
681d9a739aab1c0fbf30cc5f254a0fe1
Returns a +Hash+ of properties that can be converted into a json string to make a _Sumac_ +compatibility+ message.
[ { "docid": "5a3c4cbde882d8414cc6dc6ebdf5f31d", "score": "0.0", "text": "def properties\n { 'message_type' => 'shutdown' }\n end", "title": "" } ]
[ { "docid": "5b93661b696682cce0bf70101d844fe0", "score": "0.69470537", "text": "def to_json\n hash = {}\n PROPERTIES.each do |p, u|\n attr_name = u.encode('UTF-8')\n value = @message.send(attr_name)\n hash[p] = value.to_s.encode('UTF-8') unless value.nil?\n ...
cea86acbb0e5437af165f52d5831b8b2
Retrieves the character with the specified name on the specified realm.
[ { "docid": "08f8ec5cbd14032421f155bb80b0d96d", "score": "0.6695965", "text": "def character(realm, name, *optional_fields)\r\n if optional_fields[0] == :all\r\n optional_fields = :achievements, :appearance, :feed, :guild, :items, :mounts, :pets, :petSlots, :progression, :pvp, :quests, :reput...
[ { "docid": "ece68ec94a1cd32e29e9fe3c9c238a16", "score": "0.7893352", "text": "def character(name, realm)\n self.class.get(\"/wow/character/#{URI.escape realm}/#{URI.escape name}\",\n :query => {\n 'fields' => 'items',\n 'apikey' => ENV['BNET_K...
ccf82defcdd1874a1ff5df096ec758be
DELETE /tracks/1 DELETE /tracks/1.json
[ { "docid": "0f143de263ab9b055ed369265d053c68", "score": "0.75127786", "text": "def destroy\n @track.destroy\n respond_to do |format|\n format.html { redirect_to tracks_url, notice: 'Track was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "title": "" ...
[ { "docid": "8b19aee3fd29210a8b42aebb3bcbe5b9", "score": "0.7834874", "text": "def destroy\n @track = Track.find(params[:id])\n @track.destroy\n\n respond_to do |format|\n format.html { redirect_to tracks_url }\n format.json { head :no_content }\n end\n end", "title": "" }, ...
33984fd90bdaa48b3b9dce8fb6a146ee
Set the value of the Markdown input for this Choreo.
[ { "docid": "d2bcceb0dde7d602d365bd5ef6fec9aa", "score": "0.8554088", "text": "def set_Markdown(value)\n set_input(\"Markdown\", value)\n end", "title": "" } ]
[ { "docid": "f5802fa270b03dd4ab745fcccaa19dd4", "score": "0.8515624", "text": "def set_Markdown(value)\n set_input(\"Markdown\", value)\n end", "title": "" }, { "docid": "f5802fa270b03dd4ab745fcccaa19dd4", "score": "0.8515624", "text": "def set_Markdown(value)\n ...
1c5eb623a4cccde17ecd3b1d51c06cdd
prints every food in the database
[ { "docid": "06d019431123a1d88d0083437b2a0ea7", "score": "0.6456796", "text": "def printAll()\n @base.each_value {|food| puts food.to_s()}\n end", "title": "" } ]
[ { "docid": "5a09b87f4cdec50043b9af4b9f651102", "score": "0.8118894", "text": "def print_all\n @foodDB.foodbase.each_value do | item |\n icl_print( item )\n end\n end", "title": "" }, { "docid": "58dc44515494ccaaee94ffc568400759", "score": "0.77921724", "text": "def comman...
2989a8f6947a85262a8a43ff37914d6c
when updating name value pairs, used save the values in hash to avoid db calls
[ { "docid": "c8ee258ac491c576f8261da91dc8d739", "score": "0.0", "text": "def update\n if super\n @@saved_nv_values[self.val_name] = self.val_value\n end\n self\n end", "title": "" } ]
[ { "docid": "4ae9c87a0bde2592e6ec9fd19454ae08", "score": "0.6608439", "text": "def update(hash); end", "title": "" }, { "docid": "be3a7925da1c8ab36713503c04875445", "score": "0.65209705", "text": "def store_the_names(normal_name, sec_name, hash)\n\thash[normal_name] = sec_name\n\thash...
e561e11bcf379ef5dc139c210017366b
Only allow a list of trusted parameters through.
[ { "docid": "071070d9af63bccc6564d8be3af80787", "score": "0.0", "text": "def city_params\n params.require(:city).permit(:city_desc, :region_id, :comment)\n end", "title": "" } ]
[ { "docid": "c1f317213d917a1e3cfa584197f82e6c", "score": "0.6948629", "text": "def allowed_params\n ALLOWED_PARAMS\n end", "title": "" }, { "docid": "e662f0574b56baff056c6fc4d8aa1f47", "score": "0.6813401", "text": "def strong_params\n params.require(:listing_member).permit...
16d501060b7dc402a7873388a9a3673c
Page specific elements finder
[ { "docid": "32d9be558252868698f2e3087870a265", "score": "0.0", "text": "def find_all locator\n all locator\n end", "title": "" } ]
[ { "docid": "6aab5a7b25116450732eefb8ed892139", "score": "0.694296", "text": "def locate_paginate(doc)\n anchors = (doc/'a')\n page_numbers = []\n anchors.each do|anchor|\n href = anchor[\"href\"]\n if href and href.match(/nutrition_comparison_popup/) and href.match(/page=/)\n page_numbers ...
bbdaa3f66abd2f930d9f79c914024888
put the working tree in a releasebranch, make sure the submodules are uptodate and copy everything to the release path
[ { "docid": "3f4e9bd1615b13c703ac80aedc59ba47", "score": "0.75555694", "text": "def release\n release_branch = fetch(:release_branch, File.basename(release_path))\n git :checkout, '-B', release_branch,\n fetch(:remote_branch, \"origin/#{fetch(:branch)}\")\n git :submodule, :update, '--init'...
[ { "docid": "7d7df296f0f5bb9e5a396247958b6d88", "score": "0.7864858", "text": "def release\n\trelease_branch = fetch(:release_branch, File.basename(release_path))\n\tgit :checkout, '-B', release_branch,\n\tfetch(:remote_branch, \"origin/#{fetch(:branch)}\")\n\tgit :submodule, :update, '--init'\n\t# git a...
8c905f32e51b60d0210a35ad05a11225
Public: Determine if this policy is empty. It is considered empty if there are no statements. Returns true if empty, false if not
[ { "docid": "84143d5abd71f32046e7c509f559f793", "score": "0.77235496", "text": "def empty?\n @statements.empty?\n end", "title": "" } ]
[ { "docid": "b7427d80f3adc05737d9c71c983b9686", "score": "0.70350987", "text": "def empty?\n not any? { true }\n end", "title": "" }, { "docid": "ac60fd94e2d04f0b54bca57be8758253", "score": "0.6931827", "text": "def empty?\n @conditions.empty?\n end", "title": "" ...
ba38f63002858695d0709ff9b3db3e1e
Variables which should be defined as an output of the current flow
[ { "docid": "bf94528430935b5e618f829fe4733459", "score": "0.7097771", "text": "def output_variables\n vars = flow_variables\n # Flags that are set by this flow flow out of it\n (vars[:this_flow][:set_flags] +\n # As do any flags set by its children which are marked as...
[ { "docid": "5c5bcda86dbb39340ebd255a6932392f", "score": "0.6735562", "text": "def sub_flow_no_return_vars\n @sub_flow_no_return_vars ||= []\n end", "title": "" }, { "docid": "4e6ac675f77b6dbaa5f17bc5c8cb9507", "score": "0.66979545", "text": "def variables; end", "...
3a5aeed11486f52ab1f324e59e9f1b54
Check if a token represents a word that functions as a noun.
[ { "docid": "679bb8ce3f03f2759449a9182f5a44b4", "score": "0.68384355", "text": "def functions_as_noun(token)\n _is_in(token, @functions_as_noun_tags)\n end", "title": "" } ]
[ { "docid": "274955f3f4eaa17fa006a789512889a1", "score": "0.7959786", "text": "def is_noun(token)\n _is_in(token, @noun_tags)\n end", "title": "" }, { "docid": "d0313fcf588dbd9ef76b03979745af8e", "score": "0.7950006", "text": "def word?(token)\n token =~ /^[A-Za-z]+$/\n ...
4b00042269a789f382b1823a4683a7b1
renders a menu using the page icons given
[ { "docid": "a98d3acd4da88146e5950a026446e8af", "score": "0.7505364", "text": "def menu_icons(pages)\n pages.map do |p|\n content_tag :li, permalink(image_tag(p.icon.url),p,:class =>activated(p))\n end.join(\"\\n\")\n end", "title": "" } ]
[ { "docid": "84b760cb94aafcfbd4303546126517f8", "score": "0.6965465", "text": "def menu_items(pages)\n pages.map{ |p| content_tag(:li, page_link(p), :class => activated(p))}.join(\"\\n\")\n end", "title": "" }, { "docid": "0dbe4c584783cc99cf95e406ac5eefbf", "score": "0.6851055", "...
6c29f8776c8a0a8df5f34e54d8e85b78
Confirms command is valid.
[ { "docid": "62e32c86d66037d32ac9fa793716ed90", "score": "0.6231332", "text": "def valid_command?(cmd)\n command = cmd.is_a?(Symbol) ? cmd : cmd.to_sym\n Gitlab.actions.include?(command)\n end", "title": "" } ]
[ { "docid": "fabdece283d58e3e16a29f5339b130ac", "score": "0.7662346", "text": "def validate_command\n errors.add_on_blank(:command)\n false unless errors.empty?\n end", "title": "" }, { "docid": "5d6bcc9e838b2bd3f0a12b3ffd377781", "score": "0.7564907", "text": "def ...
a9099273a4d61f24722ac8d1073aafcb
Get Source By Id
[ { "docid": "123c1b694c3f5da34b8660df4071fe93", "score": "0.6202272", "text": "def service_sources_id_get_with_http_info(id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: SourcesApi.service_sources_id_get ...\"\n end\n # verify the req...
[ { "docid": "e3f2e3690936079cee38a57bda37b83b", "score": "0.8195326", "text": "def get_source( source_id )\n log_message( \"Getting source #{source_id}...\" ) unless @logging == false\n @connection.get( \"source/#{source_id}\" )\n end", "title": "" }, { "docid": "083d208e716007b44d98c7...
077da8502ce8d430e3fe2a86fb4a0e4f
indicates if this style should be applied to pivot tables
[ { "docid": "cf935989fd5397454aa6e76f02a8342c", "score": "0.0", "text": "def pivot; end", "title": "" } ]
[ { "docid": "d2cf151a3048fab08fab4de9915829cc", "score": "0.7379973", "text": "def defaultPivotStyle; end", "title": "" }, { "docid": "4be327a877d856cc25796f6ddca262a6", "score": "0.6968056", "text": "def allow_pivot_tables\n return @allow_pivot_tables\n end"...
f04f5d7ce25ed9ed7591e5987ae2cda0
TODO: blog about this... 1. stub out the default validation and add your own thanks to comment by Mark Reginald James on 2. see how I merged the nested errors into the base collection in must_have_valid_notifications method 3. need to deal with STI naming differences for shared attributes ie. address => email or url de...
[ { "docid": "3198f311e8745aeba9086ace8e08347e", "score": "0.63486403", "text": "def validate_associated_records_for_notifications; end", "title": "" } ]
[ { "docid": "54d21ef47889fe9748b230e6815eacfc", "score": "0.59972715", "text": "def errors\n super.tap do |errors|\n errors.add(:'user.email', 'is invalid') if errors[:'user.email'].empty?\n end\n end", "title": "" }, { "docid": "f46609a72f7f67bb7e35c504ccf...
da4b15a3f2a5df23b1a1109d51b5553f
PATCH/PUT /videos/1 PATCH/PUT /videos/1.json
[ { "docid": "ae698cd827aa20821c01c3464214c25f", "score": "0.5888707", "text": "def update\n respond_to do |format|\n if @video.update(video_params)\n #@video.added_by=current_user.id\n @video.add_labels(params[:Label])\n format.html { redirect_to [:media, @video] }\n f...
[ { "docid": "30b1dbafa876f7bbd98f9d8b326fcce6", "score": "0.7237686", "text": "def update\n @video.update(video_params)\n render json: @video\n end", "title": "" }, { "docid": "2d8bb9e95356ae1c3bc85d8101ea8df1", "score": "0.68665653", "text": "def update\n @video = Video.fin...
35c0fc3bd8832e5479f2e4e59d11ec5b
Set the host for this site to the value supplied, overriding any previous values.
[ { "docid": "0a391d3bfeb7aba7eb606983104d9928", "score": "0.8388092", "text": "def set_host(host)\n @site_config.hosts = [host]\n end", "title": "" } ]
[ { "docid": "c2b6b3a654b341c99b2b2879c4658ebd", "score": "0.8210082", "text": "def host=(value)\n @host = value\n end", "title": "" }, { "docid": "10158ab1f2626c2c68087a6021c5ebfd", "score": "0.8020037", "text": "def default_host=(value)\n @default_host ...
e0cd5ad06ec6e9a6a4c4afc8354b2ef7
Read text file & input into array
[ { "docid": "1f6167494a8990eb91507afeebfc679d", "score": "0.0", "text": "def outputResult()\n #@theReg = theWord\n File.open(\"crashLog.txt\", 'r') do |f1|\n while line = f1.gets\n $txtinput = line.to_s.chomp\n if @theReg == $txtinput\n $response = \"The vehi...
[ { "docid": "a79024acf3c4c41799e4596e6d684e0e", "score": "0.79952645", "text": "def read_loaded_txt_file_to_array(file)\n\ttext_array = file.read.split(\",\")\nend", "title": "" }, { "docid": "2cdcfb5aafc8b1d89dc4afad904416b7", "score": "0.7593899", "text": "def file_to_array file\n ...
413f427364b0125d8b49f9d46dfeb715
returns the list of all the
[ { "docid": "325d25d81b9292dbd83d115898ae6387", "score": "0.0", "text": "def list\n #query = \"SELECT row_number() OVER (ORDER BY enem2013 nulls last) as ranking, idschool,codesc,nomeesc,bairro,end_esc\"\n #query = query + \",num_esc,ab1em_14,ap3em_14,enem2013,longitude,latitude FROM schoolbs\"\n ...
[ { "docid": "85719e462fed2496c3068dcc405c32e5", "score": "0.7915141", "text": "def all\n @list\n end", "title": "" }, { "docid": "0d9c24aa867dadab8db51c9042bc5370", "score": "0.74904853", "text": "def all\n @list.values\n end", "title": "" }, { "docid":...
1aa9509f976f2359db66932ccf14f412
Deletes the data stored at the specified path. This does NOT do a recursive delete. It'll only delete the data the path specified, all other data in subpaths of +path+ will remain intact.
[ { "docid": "49fddd87989873b36535d9938627afc1", "score": "0.6479523", "text": "def delete(path)\n path = relativize_path path\n\n Precog.connect self do |http|\n uri = Addressable::URI.new\n uri.query_values = { :apiKey => api_key }\n\n http.delete \"/ingest/v#{VERSION}/fs/...
[ { "docid": "a45f342c0514063a0b469bf057196e37", "score": "0.75156873", "text": "def delete(path)\n path = normalize_path(path)\n if path.empty?\n raise 'Empty path'\n elsif path.size == 1\n child = @children.delete(path.first)\n @modified = true if child\n child...
1e5e0cae0ff0a34d4ea06aa3c31b2f19
Assume both drone and engines are off when landed.
[ { "docid": "5ed66c7955e8b58a3fc72c2e607b41d2", "score": "0.5796177", "text": "def land\n return false if status == :off\n\n # For testing purpose\n puts 'start landing'\n move_down(low_power: LANDING_POWER)\n reset_gyroscope_and_orientation\n @engines.collect(&:turn_off)\n set_off\n...
[ { "docid": "636f1f10caeac1fb1a1f9acb5d7b5b75", "score": "0.60355496", "text": "def use_drb?\n @use_drb == true\n end", "title": "" }, { "docid": "fd7674041d00333e452cbc5bd4a3683c", "score": "0.58716583", "text": "def ntfy_state_on_localgame\n # all network operations are disab...
b43be30d189289e15f8c0690b037d5b5
returns true if the resource matches any of the rules for a given group
[ { "docid": "79cd7314b9f1d0baf79d857f2218d05e", "score": "0.6897544", "text": "def in_group?(group_id)\n group_details = GROUP_MAPPINGS[group_id]\n raise \"Group not found\" if group_details.nil?\n\n group_details[MATCH_RULES].each do |rule|\n matched = self.type.match(rule)...
[ { "docid": "ef312900ab9029ec1118c2a2f71a4fe4", "score": "0.7028722", "text": "def check(action, resource, group = nil)\n return false unless valid_group? group\n\n # rules precedence is bigger than inner_check\n return true if check_rules action, resource\n\n inner_check(action, resource)\n ...
a4f6aa4d502ee52bbc61c91c46c23b70
POST /support_conversations POST /support_conversations.json
[ { "docid": "20c6c5ec416ff3abd75be6e34750b0a4", "score": "0.64781904", "text": "def create\n @support_conversation = SupportConversation.new(support_conversation_params)\n\n respond_to do |format|\n if @support_conversation.save\n format.html { \n redirect_to @support_conversat...
[ { "docid": "a15cdf93f36acb4a48c8527a73d48b55", "score": "0.71195906", "text": "def create_conversation(data)\n # required_fields = [\"subject\", \"type\", \"mailboxId\", \"status\", \"customer\", \"threads\"]\n\n post(\"conversations\", { body: data })\n\n last_response.headers[\"Resource-ID\"]...
27be3894a33eac34647a946ae59baca9
GET /steps/1 GET /steps/1.json
[ { "docid": "7ff2e312cc921f428dd1f2c29d2bec38", "score": "0.7109168", "text": "def show\n render json: @step\n end", "title": "" } ]
[ { "docid": "f15d78fa65be6cbc9610d21dbdb2f005", "score": "0.72904414", "text": "def index\n @steps = Step.all\n render json: @steps\n end", "title": "" }, { "docid": "47ff9cdedff5fbc08e2e81c67f51966a", "score": "0.7228227", "text": "def show\n @step1 = Step1.find(params[:id]...
aeaf56a48eb1e119587422c8eec51a0c
Start trace events collection.
[ { "docid": "e41bdd296e27e30fe2e5d31c88b5f45e", "score": "0.0", "text": "def start(categories: nil, options: nil, buffer_usage_reporting_interval: nil, transfer_mode: nil, stream_format: nil, stream_compression: nil, trace_config: nil)\n {\n method: \"Tracing.start\",\n params: {...
[ { "docid": "0e96bf5db8eeb882ac2ad8e2b4a7c9a3", "score": "0.7152857", "text": "def start\n @collecting_events = true\n end", "title": "" }, { "docid": "6f124d37ff053e537317580ea0f17a27", "score": "0.6903478", "text": "def start(enable = false)\n @trace_point = TracePoint.ne...
8b8d79243ef80d6297c55063153c87af
QUESTIONS Narrative? fiction vs. nonfiction
[ { "docid": "8930aa7799d6adb1816716e7069f975e", "score": "0.6067108", "text": "def narrative?\n\t\tself.status == \"Fictional Narrative\"\n\tend", "title": "" } ]
[ { "docid": "b4ff6ff5fbb95cdd9920792bac043b44", "score": "0.608973", "text": "def add_cop_questions\n [ [:human_rights, :additional, \"Commitment and policy. Does your COP contain information on the elements listed below? If yes, select one or more.\", nil, 1,\n [\"Public commitment to respect ...
11ee240164a2bef9cf843e1bf0cd9d3a
GET /invitations/new GET /invitations/new.json
[ { "docid": "bd07b7e4fc4b47da8ec70bbc4d29a96c", "score": "0.79464066", "text": "def new\n @invitation = Invitation.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @invitation }\n end\n end", "title": "" } ]
[ { "docid": "3d0aef95ca2761cb4841a83a3e97abef", "score": "0.78633064", "text": "def new\n @invitation = Invitation.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @invitation }\n end\n end", "title": "" }, { "docid": "35fa49d0fe8...
208fd28d44ed1f985c4efbfe82bce034
Return a copy of this string with '%' characters escaped. Example: 'a%b'.escape_format => 'a%%b'
[ { "docid": "42ffca3e4e9d0b7ab6642f349a5a98e9", "score": "0.8266676", "text": "def escape_format\n gsub(/%/, \"\\&\\&\")\n end", "title": "" } ]
[ { "docid": "2ad4264ae9f118ae9ac4ba270c2b0986", "score": "0.847509", "text": "def escape_format!\n gsub!(/%/, \"\\&\\&\")\n self\n end", "title": "" }, { "docid": "49a10b237d1123ba1441c2171f4bedfe", "score": "0.68227285", "text": "def escape\n return self.gsub(/([^ a-zA-Z0-9...
33f96e77560b031bec1529602625a052
PATCH/PUT /animals/1 PATCH/PUT /animals/1.json
[ { "docid": "d2a8e6797fdf3a96a23a0f1121b7847e", "score": "0.6804528", "text": "def update\n if @animal.update(animal_params)\n render :show, status: :ok, location: @animal\n else\n render json: @animal.errors, status: :unprocessable_entity\n end\n end", "title": "" } ]
[ { "docid": "15bb585ffa0114df6f9765ced48e18a9", "score": "0.7495487", "text": "def update\n \n if @animal.update(animal_params)\n render json: @animal\n else\n render json: {}, status: :bad_request \n end\n end", "title": "" }, { "docid": "ca48c6b90c3e9d38cb68a7ad7459bb5...
cb15dc74543ec2867ae26c44ac990457
Prepare the core graph. To be able to have three disjunct Hamilton paths in one Kn you need at least 5 nodes so we hardcode a graph with 5 nodes and three disjunct circles
[ { "docid": "c87076a862b1040fc3fbd4d46d740cf9", "score": "0.0", "text": "def breed(players)\n (0..4).each do |i|\n players[i].successor(0, players[(i + 1) % 5])\n players[i].successor(1, players[(i - 1) % 5])\n players[i].successor(2, players[(i + 2) % 5])\n end\n end", "title":...
[ { "docid": "73b386c78c5ef9fcfef96c54e2c17c26", "score": "0.61675453", "text": "def build_sketch_graph\n\t@temp_hop_record = Hash.new\n\t@processed_list = Hash.new\n\t$node_list.each do |n|\n\t\t#Nodes in sketched graph: queries, user_inputs\n\t\t#if n.getInstr.getFromUserInput or (n.isQuery? and n.isWri...
95ea57138df01c0115370bd4219ae872
POST /albumfours POST /albumfours.json
[ { "docid": "5b8e21255b4290c86e5a949d364510c5", "score": "0.0", "text": "def create\n @albumfour = Albumfour.new(albumfour_params)\n\n respond_to do |format|\n if @albumfour.save\n User.find_each do |user|\n AlbumfourMailer.albumfour_notification(@albumfour).deliver\n end\n...
[ { "docid": "a734ff744a594bab251145f0add2e754", "score": "0.6626243", "text": "def create_albums\n url = 'https://stg-resque.hakuapp.com/albums.json'\n uri = URI(url)\n response = Net::HTTP.get(uri)\n albums = JSON.parse(response)\n\n albums.each do |album|\n Album.create!(album.except('id'))\n ...
0a3240fcfc6a93eee0ef541f9cf1a82d
return a hash of all the cars info, except id and created/update at
[ { "docid": "96ead2ef1143e01a2993d0f8a822d834", "score": "0.6176694", "text": "def info\n self.attributes.except('id', 'created_at', 'updated_at')\n end", "title": "" } ]
[ { "docid": "f983563a9ba14eed4d7c3fd1eb19679c", "score": "0.69696736", "text": "def hash\n [id, vin, heading, price, miles, msrp, data_source, is_certified, vdp_url, carfax_1_owner, carfax_clean_title, exterior_color, interior_color, dom, dom_180, dom_active, seller_type, inventory_type, stock_no, l...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "2379dee3b60e6f1e8dacdbcfa7e26fb4", "score": "0.0", "text": "def set_item_location\n @item_location = ItemLocation.find(params[:id])\n end", "title": "" } ]
[ { "docid": "bd89022716e537628dd314fd23858181", "score": "0.6163163", "text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "title": "" }, { "docid": "3db61e749c16d53a52f73ba0492108e9", "score": "0.6045976", "text": "def action_hook;...
08ec6d66c9ce2ea095b01656095f9358
GET /heatmaps GET /heatmaps.json
[ { "docid": "55b04285c719fd1459aa9130c12a0a8a", "score": "0.7710296", "text": "def index\n @heatmaps = Heatmap.all\n end", "title": "" } ]
[ { "docid": "bccf471b75c6a67a772199ff9d95def5", "score": "0.77017415", "text": "def index\n @heatmaps = Heatmap.all\n respond_with(@heatmaps)\n end", "title": "" }, { "docid": "2569c91746b721a33e0772210f8d1208", "score": "0.67351496", "text": "def show\n @heatmap = Heatmap.f...
782949ed0a4aa1b7c6d1528750fa4d07
Determines which index of the array $PokemonGlobal.pokedexIndex to save the "last viewed species" in. All regional dexes come first in order, then the National Dex at the end.
[ { "docid": "2361df62067111a697b1c077cbe06cd9", "score": "0.71473855", "text": "def pbGetSavePositionIndex\n index=pbGetPokedexRegion\n if index==-1 # National Dex\n index=$PokemonGlobal.pokedexUnlocked.length-1 # National Dex index comes\n end # ...
[ { "docid": "575156e3632a71a0d53cc06464a4e89e", "score": "0.7151874", "text": "def pbGetSavePositionIndex\n index = pbGetPokedexRegion\n if index==-1 # National Dex\n index = $PokemonGlobal.pokedexUnlocked.length-1 # National Dex index comes\n end ...
1af8ee1967ceae3bf692f0eb96cc9c1a
call this from a view to set up the linking script between he anchor element and the block element
[ { "docid": "2e1c64110b72d15d77a4b27b40aba32d", "score": "0.0", "text": "def script_full(params=Hash.new)\n getScriptCall(anchor, params, true)\n end", "title": "" } ]
[ { "docid": "8adcb5be8ea082cc47909e08953645fb", "score": "0.65371317", "text": "def anchor; end", "title": "" }, { "docid": "8adcb5be8ea082cc47909e08953645fb", "score": "0.65371317", "text": "def anchor; end", "title": "" }, { "docid": "e64b8a3bd71559cbce8bd34f810bf39c", ...
aa1eaefdc47482e391eecafd17c2f468
allows player to choose title screen option
[ { "docid": "c4df44128432a13cd7f2a61a09ba5f84", "score": "0.70298386", "text": "def resolve_title_screen_selection(user_selection)\n if user_selection.upcase == 'N'\n require './lib/new_game'\n\n game = NewGame.new\n game.start_new_game\n elsif user_selection.upcase == 'S'\n req...
[ { "docid": "35b78753f39433f786c499dba5464010", "score": "0.7148785", "text": "def command_to_title\n # Play decision SE\n $game_system.se_play($data_system.decision_se)\n # Fade out BGM, BGS, and ME\n Audio.bgm_fade(800)\n Audio.bgs_fade(800)\n Audio.me_fade(800)\n # Switch to title...
81994076247007ced0e9e4c300599aac
GET /companys || /companys.json
[ { "docid": "67cf1330275272331b02859eb1dbc49e", "score": "0.62906057", "text": "def index\n\t\t@companies = Company.all\n\tend", "title": "" } ]
[ { "docid": "22c56365e2c2c2899f91afe56d9295f3", "score": "0.73684746", "text": "def companies\n render \"company/companies.json.jbuilder\", status: :ok\n end", "title": "" }, { "docid": "44e7ae9d8ffc58dfb2c5b2d4eb1efe8f", "score": "0.72784823", "text": "def index\n @companies =...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "92eb00dd1af736d1da1f0ca60524f8cd", "score": "0.0", "text": "def user_params\n params.require(:user).permit(:name, :login, :edad, :direccion, :cuenta_bancaria, :password, :email,\n :password_confirmation)\n end", "title": "" } ]
[ { "docid": "e164094e79744552ae1c53246ce8a56c", "score": "0.6980957", "text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "title": "" }, { "docid": "e662f0574b56baff056c6fc4d8aa1f47", "score": "0.6783065", "text": "def strong_params\n params.requi...
3de44e0a25239bac25cdd96673d2471b
reverse() returns an OrderedHash with the reverse order to this one
[ { "docid": "30a4e88bb9684b5ba40771cfb8c04f7a", "score": "0.74709153", "text": "def reverse()\n reversed = self.class.new( @auto_fill )\n order = @order.reverse\n hash = @hash.dup\n \n reversed.instance_eval do\n @order = order\n @hash ...
[ { "docid": "6e9aefe58dc20b93c381a3f2ef7a58cf", "score": "0.76220804", "text": "def reverse\n self.keys.reverse.inject({}){|h,k| h[k] = self[k]; h}\n end", "title": "" }, { "docid": "e2a0327dffcb216038d4de11ecd80eb0", "score": "0.68946624", "text": "def reverse!\n edges = {}\n ...
24f68df39d3c884e6cfc3804faca6645
Get the To email address list
[ { "docid": "951581a13ea8ca97c2ec9b05ceb542a5", "score": "0.6655361", "text": "def to_email_address\n @to_email_address\n end", "title": "" } ]
[ { "docid": "6c6469b6fedbef26692842c24a6ef3ad", "score": "0.82893836", "text": "def get_to_addresses\n\n return [] if self.to_addresses.nil?\n return self.to_addresses.split(Email::ADDRESS_SEPARATOR)\n end", "title": "" }, { "docid": "5499a68dd1352c0e29ee0223fd88d3c4", "score": "0....
26dd75779f9aba545bee9d5decc1150b
Get the spoor of the manifest
[ { "docid": "3af8d5b9d855af848913ce13a88dfe57", "score": "0.0", "text": "def spoor(spoor_content = nil)\n @spoor = spoor_content unless spoor_content.nil?\n\n @spoor\n end", "title": "" } ]
[ { "docid": "cc6a83598255962359c6463f34465bd9", "score": "0.6856411", "text": "def manifest\n return @manifest\n end", "title": "" }, { "docid": "89a95fac51b8d48ec4b77f0c341f4004", "score": "0.6556208", "text": "def manifest_path\n @manifest_path\n end", ...
e09c85fa0558464f041f41443ba96076
Gets the serverside encryption state of an object in an Amazon S3 bucket. Prerequisites: An Amazon S3 bucket. An object within that bucket.
[ { "docid": "1bcaeae773ba83a4b66d0b8f77872653", "score": "0.7995473", "text": "def get_server_side_encryption_state(s3_client, bucket_name, object_key)\n response = s3_client.get_object(\n bucket: bucket_name,\n key: object_key\n )\n encryption_state = response.server_side_encryption\n encrypti...
[ { "docid": "2cbfcbffff243ecf6ed10ce81f40a1af", "score": "0.70480454", "text": "def run_me\n bucket_name = 'doc-example-bucket'\n object_key = 'my-file.txt'\n region = 'us-west-2'\n s3_client = Aws::S3::Client.new(region: region)\n\n puts \"Getting server-side encryption state for object '#{object_k...
f782399d077a2919d9a0b2cf79cf1ef4
POST /vestments or /vestments.json
[ { "docid": "e82728affbea48c674d4d7de0bcf388d", "score": "0.67164254", "text": "def create\n @vestment = Vestment.new(vestment_params)\n\n respond_to do |format|\n if @vestment.save\n format.html { redirect_to @vestment, notice: \"Vestment was successfully created.\" }\n format.j...
[ { "docid": "d939dbe51500b0f0a44cc5176b95a028", "score": "0.6197907", "text": "def create\n @vestimentum = Vestimentum.new(vestimentum_params)\n\n respond_to do |format|\n if @vestimentum.save\n format.html { redirect_to @vestimentum, notice: 'Vestimentum was successfully created.' }\n ...
e176af290e50a5fb5a900445d4a7e7f0
returns the array with error letters
[ { "docid": "126e61f6738c00edd005a5e22dcd2978", "score": "0.66634756", "text": "def errors\n @user_guesses - normalized_letters\n end", "title": "" } ]
[ { "docid": "c6ea351503935d0500613ff3b4e27c28", "score": "0.6885124", "text": "def error(name)\n array name, required: false do |s|\n s.string\n end\n end", "title": "" }, { "docid": "80f5971a91050fba9e773680242eec03", "score": "0.68481314", "text": "def error\n ...
ab1baf61bc2f2b658b3fd283b7668ad4
plex first episode of a show
[ { "docid": "f22f0dcc73842ffe79fb27eab93de4d8", "score": "0.6759812", "text": "def thetvdb_missing_plex_first_ep(show)\n log_debug\n first_ep = '0;0'\n \n $plex.episodes[show].keys.each do |season|\n $plex.episodes[show][season].keys.each do |episode|\n if first_ep == '0;0' \n f...
[ { "docid": "59878288f177ac4f2b0ad0ecf6800959", "score": "0.7179375", "text": "def first_episode_number\n @first_episode_number || 1\n end", "title": "" }, { "docid": "1fc06fa1f9a1082a498189df8007b205", "score": "0.68348485", "text": "def next_episodes(show, name, id)\n db_show...
aa52cf9a085568cbf10f2882e67aa22d
:category: Top Level ++ noExitWhenQuit()
[ { "docid": "62b0256522f67ecad97cec25594d8e74", "score": "0.7769001", "text": "def noExitWhenQuit(flag = true)\n @device.noExitWhenQuit(flag) ;\n end", "title": "" } ]
[ { "docid": "039c0116133976547fc845e075185835", "score": "0.7722732", "text": "def forced_exit?; @quit > 1 end", "title": "" }, { "docid": "2d2ffce0d75b6c48e62cd34b38c7ea0e", "score": "0.7191065", "text": "def force_quit; @quit = 2 end", "title": "" }, { "docid": "1ff43047...
3fcbb1d68dcfdeccf8b370ec73bca84d
Accessor for individual Refs.
[ { "docid": "a8bfaeb99a85ffa555e7aadbb3708ff5", "score": "0.51240855", "text": "def [](ref_id)\n response = @key_value.perform(:get, ref_id)\n Ref.new(@key_value.collection, @key_value.key, response)\n end", "title": "" } ]
[ { "docid": "4f25758d810b4989d285e382e8862d0e", "score": "0.6065613", "text": "def refs\n @refs\n end", "title": "" }, { "docid": "0e44c572037e140337fd74a687fc231b", "score": "0.5949632", "text": "def getRefPath()\n return @refPath\n end", "title": "" }, { ...
652b79667570f35275ca91b204c2bb4b
Refer to include? / member? include? Returns true if the given object is present in self
[ { "docid": "f8393e1a89287da91d4586a02d99b426", "score": "0.0", "text": "def element_present?(name)\n collection.include?(name)\n end", "title": "" } ]
[ { "docid": "28c6fab698f7cc0b50c7297b222399f2", "score": "0.8397547", "text": "def member?(obj)\n include?(obj)\n end", "title": "" }, { "docid": "2501769e0e9cf813c4140eb69557f0b3", "score": "0.81121546", "text": "def include?(object)\n return self.has_key?(object.n...
8b3c0f18312571d9f0d3c9ab9a33f02f
Prepend modal dialog elements to the body
[ { "docid": "adf241aada52e855a3212f3c762bffc6", "score": "0.79282016", "text": "def prepend_body\n render :partial => \"common/modal\"\n end", "title": "" } ]
[ { "docid": "935904321cb9a6c69866a54af6e5e50e", "score": "0.8207811", "text": "def prepend_body\n content_tag(:div, nil, :class => \"modal-container\")+\n content_tag(:div, nil, :id => \"ajax-modal\", :class => \"modal hide fade\", :tabindex => \"-1\")\n end", "title": "" }, { ...
aca64ede55d78c2713609414d5d019ab
Does nothing. Returns self.
[ { "docid": "14eead82072e6af29c940ddf453c3b88", "score": "0.0", "text": "def decrypt\n self\n end", "title": "" } ]
[ { "docid": "7fa0e0d2659e318763a252b38e6a33f0", "score": "0.68498796", "text": "def initialize\n clear\n super\n end", "title": "" }, { "docid": "d7fb9419466501b033b6b58531987087", "score": "0.6702055", "text": "def +@\n self\n end", "title": "" }, { "...
2f19c727a6711513b5a9f080e967bc6c
Override: Trigger Map Event triggers : Trigger array normal : Is priority set to [Same as Characters] ?
[ { "docid": "d1fc1eef400a1516d576b11887aa72f5", "score": "0.48689327", "text": "def start_map_event(x, y, triggers, normal, rect = collision_rect)\r\r\n return if $game_map.interpreter.running?\r\r\n $game_map.events_xy_rect(x, y, rect).each do |event|\r\r\n if event.trigger_in?(triggers) && e...
[ { "docid": "5fd4b7b5f15a13e298602ac11d7f7bf2", "score": "0.6454336", "text": "def trigger_options\n triggers.map { |t, _| [t.gsub('on_', '').titlecase, t] }\n end", "title": "" }, { "docid": "fbf512dc5e4c3208896b8d7660ec6807", "score": "0.5585718", "text": "def trigger_charac...
6ad6ff5766d5de071d100dfbf1064c0d
Handles updates when we are running
[ { "docid": "ae169528ab98fa32005b70ac5858bd8f", "score": "0.0", "text": "def update_running\n\n # So, if we're running we (a) count down,(b) check we have enough shapes,\n # and (c) see if the user clicks on one of them\n\n # (a) count down, and handle if we're out of time\n if @args....
[ { "docid": "cb2162d3a1fd3434effd12aa702f250f", "score": "0.7951972", "text": "def update() end", "title": "" }, { "docid": "5ca2caa1a207739e77f437de35e41cf1", "score": "0.7723542", "text": "def update ; end", "title": "" }, { "docid": "da63345424fc9aecef032928485bd149", ...
300f561fa9e01734af89dfc2799d6cfc
PUT /st_transport_datas/1 PUT /st_transport_datas/1.xml
[ { "docid": "5ad2358360b7c5f7a877b81ec9201848", "score": "0.6851421", "text": "def update\n @st_transport_data = StTransportData.find(params[:id])\n\n respond_to do |format|\n if @st_transport_data.update_attributes(params[:st_transport_data])\n format.html { redirect_to(@st_transport_d...
[ { "docid": "ce8f372167bc139eb18b988da9b21ffd", "score": "0.67343074", "text": "def put_datastream(pid, dsID, xml)\n uri = URI.parse(@fedora + '/objects/' + pid + '/datastreams/' + dsID ) \n RestClient.put(uri.to_s, xml, :content_type => \"application/xml\")\n rescue => e\n e...
c3253eb839c410c65030a1b31f7ca7df
Marks code as deprecated with replacement.
[ { "docid": "b5883f33a6a85612fff0cc080f3e336c", "score": "0.7307996", "text": "def deprecate(old, new); end", "title": "" } ]
[ { "docid": "77b0c109415e0f3e761fd3df7d4dff39", "score": "0.7969709", "text": "def deprecated; end", "title": "" }, { "docid": "77b0c109415e0f3e761fd3df7d4dff39", "score": "0.7969709", "text": "def deprecated; end", "title": "" }, { "docid": "77b0c109415e0f3e761fd3df7d4dff...
6905fd6f8203a1a449d871bb67083c84
Configure/define which currencies you want to store exchange rates for
[ { "docid": "e52f5e4ba5d5090257ff5a4d1f15dcc3", "score": "0.6157199", "text": "def currencies=(currencies)\n @currencies = []\n currencies.each do |currency|\n if currency =~ /^[A-Z]{3}$/i\n @currencies << currency.upcase\n else\n raise InvalidCurrenc...
[ { "docid": "f37a73a076ce6f1af7280b54411ec28d", "score": "0.75952315", "text": "def update_rates\n clear_rates\n add_currency_rate(\"EUR\", 1)\n add_currency_rates(config[\"exchange_rates\"]) # rates from bank.yml\n \n fetch_rates.each do |currency_rate|\n add_currency_r...
f322e1560f551e2aaf44f033e2fd20a0
Switch to a Screen registered with the screen_name, notifying listeners of the :on_enter event.
[ { "docid": "6e90b351371add5ee8be73d3da27ea06", "score": "0.8636431", "text": "def go_to(screen_name)\n raise \"There is no screen named #{screen_name}\" unless @screens.has_key? screen_name\n @current_screen = @screens[screen_name]\n @current_screen.notify(:on_enter)\n end", "title...
[ { "docid": "c16ecbba252b6983175b9657abf78120", "score": "0.75506485", "text": "def enter_screen\n @screen = get_entries(Hash.new, SCREEN_ASPECTS, \"enter screen\")\n end", "title": "" }, { "docid": "05d1c4652694af1668d044afaccd76e3", "score": "0.6677325", "text": "def open_menu(s...
de717c9db0e5a3f6ef81404950fbe5ab
matching rule with string
[ { "docid": "f64d8e4a7a0a364c7d86d7dea185cedf", "score": "0.0", "text": "def rule\n @time.strip.match(/^(12|11|10|0?\\d):([012345]\\d)\\s+(AM|PM)/)\n end", "title": "" } ]
[ { "docid": "3b67f204d296e7d0b15d80d4debb016b", "score": "0.6919683", "text": "def parse_rule(s, type); end", "title": "" }, { "docid": "d29a10445b9868614fc0944468af9349", "score": "0.6835096", "text": "def match_for_rule(rule)\n ::RDParser::DEBUG && debug_message(\"TRYING #{rule}\...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "1c822c16035121a32a6d77930a34a510", "score": "0.0", "text": "def stock_movement_detail_params\n params.require(:stock_movement_detail).permit(:product_id, :unit_price, :quantity, :amount, :status, :stock_movement_id, :user_id)\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...
bc3593e479a72b1076ad62b6eebfaf40
def upvote spot = Spot.find(params[:id]) spot.upvote! redirect_to(:back) end
[ { "docid": "8d2974f7090a51efcd15e5e5ee09443f", "score": "0.0", "text": "def spot_types\n render json: SpotType.pluck(:name)\n end", "title": "" } ]
[ { "docid": "0b2f9b38494143ed1ba5fe5435f8328e", "score": "0.8815873", "text": "def up_vote\n update_vote(1)\n redirect_to :back\n end", "title": "" }, { "docid": "0b2f9b38494143ed1ba5fe5435f8328e", "score": "0.8815873", "text": "def up_vote\n update_vote(1)\n redirect_to ...
374df0a63067ad9d203c422dbdad712f
Detach all IO objects of a certain mode from the reactor mode can be either :read or :write
[ { "docid": "6aa0a0be25a1429ec42021562459fa43", "score": "0.7346557", "text": "def detach_all(mode)\n raise(\"mode is not :read or :write\") unless [:read, :write].include? mode\n @selectables[mode] = {:ios => {}, :callbacks => {}, :io_list => []}\n end", "title": "" } ]
[ { "docid": "b308792e6e16e05185c3c063fa9c0ba1", "score": "0.7103756", "text": "def detach(mode, io, force=false)\n selectables = @selectables[mode] || raise(\"mode is not :read or :write\")\n return unless selectables[:ios].include?(io.object_id)\n if !force && selectables[:callbacks][io.o...
cfcddc54f2649bc4c82feef3f6c8c99e
We don't currently support mysql's analogous json format
[ { "docid": "457a2c2d669ee7afb5c2f96d32a29082", "score": "0.0", "text": "def configure(conf)\n compat_parameters_convert(conf, :inject)\n super\n\n if @format == 'json'\n @format_proc = Proc.new{|tag, time, record| record.to_json}\n else\n @key_names = @key_names.split(/\\s*,\\s*/)\...
[ { "docid": "44054992bade0e2d5c5c74bacdcff0e6", "score": "0.6470045", "text": "def serialize_column(data)\n activerecord_json_column? ? data : super\n end", "title": "" }, { "docid": "4875dc7d5eb4b5f42259dc562484cec1", "score": "0.634856", "text": "def json_serialize\n...
dac137eddcdf97c643a5ebb22ab833cb
Return SQL code for this disjunction. e.g (first_name = 'Julius' AND last_name = 'Caesar') OR (zone.name = 'Rome')
[ { "docid": "99773dcf900bcc471bf22ef4eb4d3458", "score": "0.71824384", "text": "def sql\n \"(\\n#{@conjunctions.map(&:sql).join(\" OR\\n\")}\\n)\"\n end", "title": "" } ]
[ { "docid": "02e0cab93c3634a331c2b01761cf0aef", "score": "0.6075631", "text": "def sql_or\n Sequel.or(self)\n end", "title": "" }, { "docid": "c262337cb6321631d4fe3c3afdfd75c7", "score": "0.5989593", "text": "def or\n @sql += 'OR'\n\n self\n end", "title": "" ...
23b7ebf9565d51bf32fe74adc69c937b
Operate from project root?
[ { "docid": "064f3374426be31a66edf8968dd0aa70", "score": "0.0", "text": "def rooted\n settings.rooted\n end", "title": "" } ]
[ { "docid": "40c800fae69b6cbd2bd7108db563765c", "score": "0.74931556", "text": "def project_root; end", "title": "" }, { "docid": "40c800fae69b6cbd2bd7108db563765c", "score": "0.74931556", "text": "def project_root; end", "title": "" }, { "docid": "40c800fae69b6cbd2bd7108d...
25371377aca8575a6fb99406488fb406
GET /feedposts/1 GET /feedposts/1.xml
[ { "docid": "49d1e73f1c311595d80eb8910805a032", "score": "0.0", "text": "def show\n @feedpost = Feedpost.find(params[:id])\n\n respond_to do |format|\n format.html {\n if params[:ajax]\n render :html => @feedpost, :layout => false\n else\n render :html => @feedp...
[ { "docid": "87fdc1d9b5af0abd4e5109d362f3759e", "score": "0.74675816", "text": "def feed\n\n\t request.format = \"xml\" unless params[:format]\n\n @blog = Blog.where(\"url_identifier = ? OR id = ?\", params[:id], params[:id]).first\n\n\t\tunless @blog\n\t\t\tflash[:error] = \"Couldn't find that feed....
56a73aaf080b037d26c14fb59a91ade4
Returns the minute of the hour (0..59).
[ { "docid": "dbb7477c64ac80c0dd1844f2c7003ece", "score": "0.5739169", "text": "def min\n if @time\n @time.min\n elsif @datetime\n @datetime.min\n else\n to_time.min\n end\n end", "title": "" } ]
[ { "docid": "17e80639aa78c90586f89b95d7dd5788", "score": "0.76168805", "text": "def minute\n @minute\n end", "title": "" }, { "docid": "ace0ff07d461bc0f08501d348a771e3c", "score": "0.75115323", "text": "def getminute()\n\t\treturn @min\n\tend", "title": "" }, { "do...
bbed1524723ee1f9ea918b36b0b9c22a
Process an +end+ lexeme.
[ { "docid": "ad479447f51ee8abfede9acacff381e1", "score": "0.7002607", "text": "def lex_end line\n ends << line\n end", "title": "" } ]
[ { "docid": "c0a119839cb17acc2517d3309e8689bd", "score": "0.75118804", "text": "def handle_end\n if get_next_token.type != \"EOL\"\n raise @err_class, \"I don't know what you're talking about!\"\n end\n end", "title": "" }, { "docid": "3a7ac9b1ffd10a358b385cd665615ee0", "score...
283510590fbbfb558828d688abbec56d
Refund bounty to the person who created it. The amount refundable is simply the amount (amount bs fee)
[ { "docid": "a0ef95551246e9faf2d0d6a90e2989e9", "score": "0.8143265", "text": "def refund!\n if refundable?\n self.class.transaction do\n transaction = Transaction.build do |tr|\n tr.description = \"Refund Bounty(#{id}) - Bounty Amount: $#{amount} Refunded: $#{amount}\"\n ...
[ { "docid": "ecaf8b6a0f457ad2a7668d8555e0d9cc", "score": "0.7175575", "text": "def refund(money, reference, options = {})\n standard_response\n end", "title": "" }, { "docid": "44f49052bb954f8cfb06470adcf2ebc7", "score": "0.71279585", "text": "def refund(refund); end", "ti...
282b8fdd2dd57e4ea366e46805fd6fe8
Filter method to enforce a login requirement Apply as a before_filter on any controller you want to protect
[ { "docid": "f78dce38f0b306586e8fc89afeaf831b", "score": "0.0", "text": "def authenticate\n logged_in? ? true : access_denied\n end", "title": "" } ]
[ { "docid": "c990138ccf2bd3d42f5ea65705d019f1", "score": "0.778557", "text": "def login_filter\n unless logged_in?\n flash[:notice] = \"You must first log in.\"\n redirect_to :controller => 'application', :action => 'index' \n end\n end", "title": "" }, { "docid": "00d75f0a7d...
1a881beda84d40fc0ba519d0e0463599
Saves the settings with the passedin key and val.
[ { "docid": "43b0238bb0f495cde6a4c2e0f9461df5", "score": "0.7639786", "text": "def save_setting(key, val)\r\n # Check for nil, since unchecked checkboxes don't send a value.\r\n # Check for whether a boolean, since .blank? returns true for false.\r\n # Check for a blank string.\r\n if val == ...
[ { "docid": "a8e822d76370c1a85e8938f0ed3e638f", "score": "0.65049446", "text": "def save_settings\n (params[:setting] || []).each do |key, val|\n setting = Setting.find_by_key(key)\n setting = Setting.create!(key: key) unless setting\n if val.is_a?(ActionDispatch::Http::Uploaded...