query_id
stringlengths
32
32
query
stringlengths
7
6.75k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
b07f6a3cab670c4955a304779b607b98
PUT /ttcourts/1 PUT /ttcourts/1.json
[ { "docid": "11427d033cfe3cfaea376fb19c5ca6e0", "score": "0.0", "text": "def update\n @holdgame = Holdgame.find(params[:id])\n @hodgame.gameholder_id = current_user.id #use this field for uploder id not real gameholder_id\n @holdgame.lttfgameflag = false\n respond_to do |format|\n if @ho...
[ { "docid": "f97a3f3a553392b04d1ec680c1ae5513", "score": "0.6969086", "text": "def update\n @court = Court.find(params[:id])\n\n respond_to do |format|\n if @court.update_attributes(params[:court])\n format.html { redirect_to @court, notice: 'Court was successfully updated.' }\n ...
b4ec063b8206a8884f5343fb3033fb31
Override to be informed when trying to add an entity that we already have (registry ID clash)
[ { "docid": "60a6f3aca584e8b3a8f694bcb21aa1fa", "score": "0.6760354", "text": "def fire_duplicate_id(old_entity, new_entity); end", "title": "" } ]
[ { "docid": "f0fc0c0c3cc27ca0dbcc5384c54aa3f1", "score": "0.69435143", "text": "def allow_to_add_new_entity?(opts ={})\n registered?\n end", "title": "" }, { "docid": "81dc20b7a0e940210b69dbf9459bfa7c", "score": "0.6758582", "text": "def <<(entity)\n reg_id = entity.registry_id...
d52ffb370e89a0ff18b9f8524c336a74
HACK to route the call through kit object from the UI.
[ { "docid": "481985fd59aa182eed7f82d1ba3dddc3", "score": "0.0", "text": "def can_create_reserve_schedule?\n kit_schedule = KitSchedule.new\n kit_schedule.current_user = User.current_user\n return kit_schedule.can_create_reserve?(self.center_ids)\n end", "title": "" } ]
[ { "docid": "7a59171f09cfba3e85fbca04c773eca1", "score": "0.5997633", "text": "def call\n @ui\n end", "title": "" }, { "docid": "6199333fb432af38c8abaadcbc60a77e", "score": "0.5970565", "text": "def call\n\n\tend", "title": "" }, { "docid": "6199333fb432af38c8a...
204bdfacd3a3d61061d6ebcecda44abe
Returns [Array] collection of workers
[ { "docid": "d211dcfabdf12f54d3704002667510f5", "score": "0.881021", "text": "def workers\n @workers ||= []\n end", "title": "" } ]
[ { "docid": "bce90466d85c2e0fd098518f90a14d54", "score": "0.8392647", "text": "def workers\n Worker.all\n end", "title": "" }, { "docid": "bce90466d85c2e0fd098518f90a14d54", "score": "0.8392647", "text": "def workers\n Worker.all\n end", "title": "" }, { "docid": "...
ab860a9e94c48d6646b542fada9e5013
TODO trim this interface?
[ { "docid": "d78ddbc5931b1c5b3062dcf903840b5d", "score": "0.0", "text": "def initialize(raw, deliminator)\n @raw = raw\n @start = deliminator.start\n @stop = deliminator.stop\n\n # read fails silently otherwise\n raise ArgumentError, \"Template string blank\" if @raw.empty? \n end", ...
[ { "docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1", "score": "0.77684706", "text": "def private; end", "title": "" }, { "docid": "d8ae3e2b236950074c4632d180274b8a", "score": "0.6764024", "text": "def specie; end", "title": "" }, { "docid": "d8ae3e2b236950074c4632d180274b8a", ...
61f24b3c6b83886076fc0b41b324d396
Add additional metadata as html for a submission
[ { "docid": "d1af88618f5692c8a802c8ade15b3047", "score": "0.62603205", "text": "def additional_metadata(sub)\n # Get the list of metadata attribute from the REST API\n json_metadata = JSON.parse(Net::HTTP.get(URI.parse(\"#{REST_URI}/submission_metadata?apikey=#{API_KEY}\")))\n metadata_list = {}...
[ { "docid": "0d2d30885a3feb04cee2216e547b4252", "score": "0.6487132", "text": "def render_content (entry, workitem)\n\n entry.title = \\\n workitem.participant_name + \" \" +\n workitem.fei.expression_id + \" \" +\n workitem.fei.workflow_instance_id\n\n entry.cont...
fc6e98c30d8d5dd483dbf598be4361fa
Update MyPayment by ID
[ { "docid": "0a067e581caabe36c18bb87c90310ff3", "score": "0.0", "text": "def update_my_payment_by_id_with_http_info(project_key, id, my_payment_update, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: DefaultApi.update_my_payment_by_id ...'\n e...
[ { "docid": "49e2757c007d30d9ba66491759097c6d", "score": "0.77097785", "text": "def update\n # currently, required knowledge of the transaction id should be secure enough\n \n respond_to do |format|\n if @payment.update(payment_params)\n format.html { redirect_to @payment, notice: 'P...
182fc4a9a75f6cc7ffd2a2e1a9e941aa
Check if a motion has enough seconds (more than two) to start being discussed.
[ { "docid": "e6f55155b3b36e89b4b9a0d529b34d00", "score": "0.64493793", "text": "def can_wait_objection?\n seconds.count >= 2\n end", "title": "" } ]
[ { "docid": "ac94647bea5285a0d9f7c0d3581b59ef", "score": "0.6941057", "text": "def can_expedite?\n seconds.count >= seconds_for_expedition\n end", "title": "" }, { "docid": "bbb4f5b34aaa3343c2ced856b8e71ce1", "score": "0.6907861", "text": "def has_seconded?(motion)\n seconds.wh...
1294805538500b945434fe6ae74be9fc
Set Strike Quote and Time
[ { "docid": "412dbe14c6e4549880e27b91aa41533e", "score": "0.5996296", "text": "def setStrike(point = nil)\n @strike = unless point.nil?\n point\n else\n @quote.last\n end\n @strikeTime = Time.new\n end", "title": "" } ]
[ { "docid": "183afb8e6803f043deb2360f24880e0d", "score": "0.6435542", "text": "def set_time_format(ampm = false)\n\t\tdata = command(:write_special)\n\t\tdata << 0x27.chr # Set time format\n\t\tdata << (ampm ? 'S' : 'M')\n\t\tsend_command data\n\tend", "title": "" }, { "docid": "9b47e8a24ad9b...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "14b707f511f9690c98351d8dac5c1ffb", "score": "0.0", "text": "def student_params\n params.require(:student).permit(:email)\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...
5b3cd186111d092648a228a5c516683b
import modules import sys Gather our code in a main() function
[ { "docid": "ae98ef69cf2bbf39735b1258fde2c795", "score": "0.0", "text": "def main()\n printf(\"Hello from Ruby script %s\\n\", $0)\n print \"Begin main <\" + $defaultProgramName + \">\\n\";\n\n # Command line args are in sys.argv[1], sys.argv[2] ..\n # sys.argv[0] is the script name itself an...
[ { "docid": "efa7967c369e2852cbce412d933637df", "score": "0.6416293", "text": "def main; end", "title": "" }, { "docid": "efa7967c369e2852cbce412d933637df", "score": "0.6416293", "text": "def main; end", "title": "" }, { "docid": "efa7967c369e2852cbce412d933637df", "sc...
5a7014272a204a0d59aa5c9de6e55f46
Site Tags Updates the site's list of tags.
[ { "docid": "d5468e3cb69bf4cfea395c50bdefdbb3", "score": "0.62610275", "text": "def set_site_tags(id, opts = {})\n data, _status_code, _headers = set_site_tags_with_http_info(id, opts)\n data\n end", "title": "" } ]
[ { "docid": "570a652122bee652f5f4258d81779b23", "score": "0.6819914", "text": "def update_tags\n @updated = Tag.refresh_counts\n @deleted = []\n Tag.unused.order(:title).all.each do |tag|\n @deleted << tag.destroy\n end\n end", "title": "" }, { "docid": "952a1eb8...
3f52973818698070d105a2c20fdb77a5
Serializes information the current object
[ { "docid": "3a7cba7f6638844c42a12c560da219c7", "score": "0.0", "text": "def serialize(writer)\n raise StandardError, 'writer cannot be null' if writer.nil?\n super\n writer.write_date_time_value(\"acknowledgedDateTime\", @acknowledged_date_time)\n ...
[ { "docid": "d162e297d0f84ca205afa381c3f6a428", "score": "0.7830697", "text": "def serialize\n Marshal.dump(self)\n end", "title": "" }, { "docid": "762bca0e2db3ff19d91cc4521bb1e1d9", "score": "0.7645999", "text": "def serialize(object) end", "title": "" }, { "docid": ...
d8a5dc52a7d359d47c52cf969a2908f1
Return configuration for a specific firewall on the VRouter5600. _Parameters_ +firewall_or_name+:: Firewall or String : A Firewall object or name of firewall for which you want the configuration. _Return_ _Value_ NetconfResponse : Status ( NetconfResponseStatus ) and configuration of requested firewall.
[ { "docid": "c17bb0d57ea80b926500d43715bb7df4", "score": "0.7612352", "text": "def get_firewall_instance_cfg(firewall_or_name)\n firewall_name = firewall_or_name.is_a?(Firewall) ? firewall_or_name.rules.name :\n firewall_or_name \n get_uri = \"#{@controller.get_ext_mount_config_uri(self)}/\"\\...
[ { "docid": "864a7d67cbd921f21b50a4afd1686577", "score": "0.66231835", "text": "def get_firewalls_cfg\n get_uri = \"#{@controller.get_ext_mount_config_uri(self)}/\"\\\n \"vyatta-security:security/vyatta-security-firewall:firewall\"\n response = @controller.rest_agent.get_request(get_uri)\n ...
7c32acd3903c5d05435516e4613e78e0
all this should happen in provider service . but hack mode on
[ { "docid": "f07039f6bcfffd33d7e859a4b8ac39b5", "score": "0.0", "text": "def api_base_path\n 'https://messaging.bandwidth.com/api/v2'\n end", "title": "" } ]
[ { "docid": "8a77c1770835602bded28e5b727a44de", "score": "0.6551605", "text": "def provider; end", "title": "" }, { "docid": "e21095589b2ef7011ea0624bbe61b7fb", "score": "0.61685526", "text": "def provider\n\tend", "title": "" }, { "docid": "ef1e4c0cc26e4eec8642a7d74e09c9d...
2b097673c7982aecaca8168334cdbee4
Executes a compellent jar command with Exit Code and Response XMls
[ { "docid": "ccc89698ac764a17ed5d871a8fd126a4", "score": "0.7643316", "text": "def command_exec(libPath,respXml,command)\n #ref_id = CommonLib.get_unique_refid\n #resp_xml = \"#{@log_path}/response_#{ref_id}.xml\"\n args = [\"-jar\", libPath,\n \"-host\", @host,\n \"-user\", @user,\n ...
[ { "docid": "096fe86c0b109e19f5e92b3fae5b8186", "score": "0.8022355", "text": "def exec(command, *extra_args)\n ref_id = CommonLib.get_unique_refid\n resp_xml = \"#{@log_path}/response_#{ref_id}.xml\"\n args = [\"-jar\", @lib_path,\n \"-host\", @host,\n \"-user\", @user,\n \"-pass...
fa95198a8a30172ed7c8259859143aab
before_create :set_date after_commit :update_meals, on: :create def set_date(day=Time.now) self.date = day end Add reconciliation_id to meals without a reconciliation_id that have at least one bill associated with them def update_meals Meal.where(community_id: community_id).unreconciled.joins(:bills).update_all(reconci...
[ { "docid": "984d31227168399437980dfb026899a9", "score": "0.0", "text": "def number_of_meals\n meals.count\n end", "title": "" } ]
[ { "docid": "eb2271c4b8bb938c875f48f7277ab50c", "score": "0.62753844", "text": "def approve_setup_fee_collection( current_user )\n self.is_setup_fee_collection_approved = true \n self.setup_fee_collection_approver_id = current_user.id \n self.save\n \n # create all those payment payable ...
352b3fc77577f57c6eea46577e2476e0
Advanced extenstions for some reason my test cant find this matching method
[ { "docid": "dbc11a93191c788147b659f55b94dfee", "score": "0.0", "text": "def can_whoohoo(song, room)\n add_song(room)\n for pref_song in song\n if pref_song == song\n p \"Whoohoo!\"\n end\n end\n end", "title": "" } ]
[ { "docid": "072514f3348fe62556dcdfd4b06e3d08", "score": "0.65358704", "text": "def spec; end", "title": "" }, { "docid": "072514f3348fe62556dcdfd4b06e3d08", "score": "0.65358704", "text": "def spec; end", "title": "" }, { "docid": "e72416c568ecd0002ea352c070ac9587", "...
82b055ea69e57e8a696b12c36ab7d1d3
Tests if 'fake rubies' is returned for arguments (0,'fake')
[ { "docid": "d54dfa5ea38b618a5591be5783b1d787", "score": "0.0", "text": "def test_plural_fake_ruby\n\t\tp = Print.new\n\t\tassert_equal('fake rubies',p.singular_or_plural(0,'fake'))\n\tend", "title": "" } ]
[ { "docid": "31a8b21b838c6e153a47dd9e46c3c019", "score": "0.6710147", "text": "def test_rubies_found_negative\n prospector = Rubyist.new(1)\n prospector.rubies_found(-2, -2)\n assert prospector.real_ruby_count.zero? && prospector.fake_ruby_count.zero?\n end", "title": "" }, { "docid...
e1cbd3d68a4081034969be346ddc3105
DELETE /client_mails/1 DELETE /client_mails/1.json
[ { "docid": "0f9300906ec9839fa9cecdb714875aa8", "score": "0.7607888", "text": "def destroy\n @client_mail.destroy\n respond_to do |format|\n format.html { redirect_to client_mails_url, notice: 'El Correo fue Eliminado Exitosamente.'}\n format.json { head :no_content }\n end\n end", ...
[ { "docid": "25cb4697ca08c0cd70af19fa2db6278c", "score": "0.7868993", "text": "def destroy\n @clientmail.destroy\n respond_to do |format|\n format.html { redirect_to clientmails_url }\n format.json { head :no_content }\n end\n end", "title": "" }, { "docid": "f0b500bffe436...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "4ef61a84580ff0915cf0699dfe7b948f", "score": "0.0", "text": "def set_pickup\n @pickup = Pickup.find(params[:id])\n end", "title": "" } ]
[ { "docid": "631f4c5b12b423b76503e18a9a606ec3", "score": "0.60339177", "text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end", "title": "" }, { "docid": "7b068b9055c4e7643d4910e8e694ecdc", "score": "0.60135007", "text": "d...
2b7c48e894931ef472dd6e2421b687b9
GET /lookup_visitfrequencies/new GET /lookup_visitfrequencies/new.xml
[ { "docid": "12c603780a74949e68cd94c217ee6dd3", "score": "0.74870753", "text": "def new\n @lookup_visitfrequency = LookupVisitfrequency.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @lookup_visitfrequency }\n end\n end", "title": "" }...
[ { "docid": "415306db492ffaf5f1145923a2858c8c", "score": "0.6795838", "text": "def create\n @lookup_visitfrequency = LookupVisitfrequency.new(params[:lookup_visitfrequency])\n\n respond_to do |format|\n if @lookup_visitfrequency.save\n format.html { redirect_to(@lookup_visitfrequency, :...
3ec76858df9779ee22291007dec7905b
depends_on "cmake" => :build
[ { "docid": "646ad0ca3c270a40078a109ee057e5e8", "score": "0.0", "text": "def install\n bin.install \"mcping\"\n end", "title": "" } ]
[ { "docid": "3ad500f8dff0f174c703d9d5858b59fd", "score": "0.68379843", "text": "def cmake_package(name, workspace: Autoproj.workspace)\n package_common(:cmake, name, workspace: workspace) do |pkg|\n pkg.depends_on \"cmake\"\n common_make_based_package_setup(pkg)\n yield(pkg) if bl...
f00e59e4bc105522c889dba463a4d996
Finds the element with the given css selector and the given class
[ { "docid": "8dde7e22166b3b37b90156ac30015f4b", "score": "0.5892916", "text": "def has_class?(css, klass)\n find(XPath.from_css(css + \".#{klass}\"))\n end", "title": "" } ]
[ { "docid": "dcf0ab866882fbb9cc3a1ed789e7bb5b", "score": "0.754348", "text": "def search_by_element_class(options)\r\n @page = @page.css(options)\r\n end", "title": "" }, { "docid": "b263aaf6a48428c751a804e38c25c718", "score": "0.7266659", "text": "def element_by_class(element_typ...
1e5f890227bed0145134799c1eb4a0aa
Relative path on the filesystem for the processed medium image.
[ { "docid": "0b4e90d9bd7c2f4fdb4a54f19f1758da", "score": "0.7233926", "text": "def medium_path\n 'm_' + image_path\n end", "title": "" } ]
[ { "docid": "de8b025dc05ff8f499decb24f7b829d8", "score": "0.7645889", "text": "def image_path\n absolute_image_path.relative_path_from(Rails.root).to_s\n end", "title": "" }, { "docid": "86959b1317b5a1346aee5ea2856ff8c7", "score": "0.7425274", "text": "def path\n File.joi...
c947d2263595b9b7a4b75db72fef4251
POST /steps POST /steps.json
[ { "docid": "c399669c90a35c94fecf5f3f9a787e3f", "score": "0.7002103", "text": "def create\n\n @step = @processdef.steps.build(params[:step])\n\n respond_to do |format|\n if @step.save\n format.html { redirect_to processdef_steps_url(@processdef), notice: 'Step was successfully created.'...
[ { "docid": "8bd1a47f06b042db62c7d97350a8b9aa", "score": "0.7671104", "text": "def create\n @step = Step.new(step_params)\n @step.save\n render json: @step\n end", "title": "" }, { "docid": "d7d3bbeb614b8456adffa25bea018ff7", "score": "0.7391872", "text": "def create\n @s...
95e4ece574273c4f87de96ae8c72701c
Remove all filters and conjunctions/disjunctions.
[ { "docid": "2887ebba99df4e531ac393a97b80a29d", "score": "0.67471224", "text": "def clear_filters\n Native.sd_journal_flush_matches(@ptr)\n end", "title": "" } ]
[ { "docid": "c1e1858d75627032936f6083e7510cf0", "score": "0.7361662", "text": "def remove_filters!\n @filters = []\n end", "title": "" }, { "docid": "e9386358aff716675e262e09d76589fc", "score": "0.68146026", "text": "def clear_filters\n\t\t@filters = []\n\t\treturn self\n\tend...
607afc01cba483f3420aaabcdff7fe54
Check if a location falls within the minimum or maximum values of this range. Arguments +i+: Location to check if it is included in the range Returns:: +true+ _or_ +false+
[ { "docid": "c5d600763482d097e2feb0afb394d132", "score": "0.64514846", "text": "def include?(i)\n @range.include?(i)\n end", "title": "" } ]
[ { "docid": "355f8f731b1e17de045796a76a86f98c", "score": "0.6434217", "text": "def _index_in_range?(i, max, min)\n !((i > max) || (i < min))\n end", "title": "" }, { "docid": "e9f434a60146265696c5bc6505ab5b7f", "score": "0.61021364", "text": "def in_range?(radius:, locatio...
b96c0a4a486963780b716890abb450eb
Sets the attribute breadcrumbs
[ { "docid": "5e380aaf2fd3310541dbc51e93616a4b", "score": "0.68392503", "text": "def breadcrumbs=(_arg0); end", "title": "" } ]
[ { "docid": "0fed06ab6e7081d35261639c96c98adb", "score": "0.71149075", "text": "def set_breadcrumb_path( path )\n @list_of_breadcrumbs[ @list_of_breadcrumbs.last.first.nil? ? -2 : -1 ][ 1 ] = path\n end", "title": "" }, { "docid": "ca536b80635322ce086422e1e115592a", "score": "0.709202...
1c9b85f52bb05a91448437adb2f242f6
Return a hash of changes between initial file read and current Items object
[ { "docid": "51e06be0cdcba4d10113cf509a3821af", "score": "0.0", "text": "def changes\n @content.diff(@initial_content)\n end", "title": "" } ]
[ { "docid": "9c4b697959ad417616fc071f0a6feead", "score": "0.6483958", "text": "def hash\n super +\n @file.hash\n end", "title": "" }, { "docid": "9c4b697959ad417616fc071f0a6feead", "score": "0.6483958", "text": "def hash\n super +\n @file.hash\n end", "ti...
0ede29fea7144a7d2867914633308891
this method will only work with datasets of 2 distinct targets, and the sigmoid activation function
[ { "docid": "7f01425362b9baf0ec9ae361dae6b982", "score": "0.0", "text": "def target_value target\n @targets.index target\n end", "title": "" } ]
[ { "docid": "f188c38a22a889c4badb3c264e819bb3", "score": "0.62239885", "text": "def compute_output\n @output = []\n for unit_weight in @weights\n @output.push(Utility.sigmoid(@input,unit_weight))\n end\n @output\n end", "title": "" }, { "docid": "467b01384b0146d0fd8a9bf1f580...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "6d4c7fe3650398d2bc38077291a9dc56", "score": "0.0", "text": "def drum_type_params\n params.require(:drum_type).permit(:diameter, :width, :description, :empty_grams)\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...
cf1574157391cec854c3a22967e7a9ee
Return the zone type
[ { "docid": "8a23c3e7d30c95008d11facbe2b854a1", "score": "0.6752478", "text": "def get_zone_type(ice_prio = false)\n if tall_grass?\n return 1\n elsif very_tall_grass?\n return 2\n elsif cave?\n return 3\n elsif mount?\n return 4\n elsif sand?\n ...
[ { "docid": "9b3ac65823ffebaaa16350356932f0bb", "score": "0.71752894", "text": "def zone_identifier; end", "title": "" }, { "docid": "9b3ac65823ffebaaa16350356932f0bb", "score": "0.71752894", "text": "def zone_identifier; end", "title": "" }, { "docid": "51236eeb0ee176e128...
8b78ec68c06ece497e56450d71c0cdcb
GET /textbook_matches/1 GET /textbook_matches/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "c83b39f790532e4ca9576d60be497947", "score": "0.75807226", "text": "def index\n @textbook_matches = TextbookMatch.all\n end", "title": "" }, { "docid": "150d29a03645e6a0c6deb555b54edf1a", "score": "0.63949656", "text": "def create\n @textbook_match = TextbookMatch.n...
d60e1693649c239a85e660d57e67dd79
POST /tekniskitems POST /tekniskitems.json
[ { "docid": "6f22fae5a85d7a42add2d04f1995cf48", "score": "0.6348898", "text": "def create\n @tekniskitem = Tekniskitem.new(tekniskitem_params)\n if @tekniskitem.save\n redirect_to tekniskcategories_path , notice: 'Dingsen er lagt til.' \n else\n\n end\n end", "title": "" }...
[ { "docid": "16e5ed8b6d3a3b007e65ba2038a70e4f", "score": "0.6923757", "text": "def tekniskitem_params\n params.require(:tekniskitem).permit(:title, :antall, :tekniskcategory_id, :status)\n end", "title": "" }, { "docid": "13c196a8e428eea00eaf7b700acea567", "score": "0.6414931", ...
11da95cee9df2ed38117a446c736f33a
DELETE /rsvps/1 DELETE /rsvps/1.json
[ { "docid": "6737f4dccf4e731d476ec224bb494612", "score": "0.6958129", "text": "def destroy\n @rsvp.destroy\n respond_to do |format|\n format.html { redirect_to rsvps_url, notice: 'Rsvp was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "title": "" } ...
[ { "docid": "a6a1337be92524da5eb404fe7fc34e3c", "score": "0.7222658", "text": "def destroy\n @rsvp = Rsvp.find(params[:id])\n @rsvp.destroy\n\n respond_to do |format|\n format.html { redirect_to(rsvps_url) }\n format.xml { head :ok }\n end\n end", "title": "" }, { "doc...
5af569a6a5ae17019582799257c6b921
DELETE /out_notes/1 DELETE /out_notes/1.json
[ { "docid": "ee7db5cb5ca59bc7a783f442d070eb85", "score": "0.0", "text": "def destroy\n authorize @out_note\n @number = @out_note.note_number\n @order_type = @out_note.order_type\n @out_note.destroy\n respond_to do |format|\n flash[:success] = @order_type.humanize+\" saliente número \"...
[ { "docid": "7ebe23c6fa8b3649035ebd7cb0ee6d5e", "score": "0.75575805", "text": "def destroy\n return if new_record?\n \n @api.delete \"/notes/#{shortcode_url}.json\"\n end", "title": "" }, { "docid": "de377ba803576ce98e0e3345ef0588dc", "score": "0.7370177", "text": "def dest...
850c85c05329e2ecc2df315cb938df5c
Redirects Teacher/Principal user back to their correspondsing pages in order to book off their selected time
[ { "docid": "aed4f5e996505136cd778c284e6f6d7f", "score": "0.698775", "text": "def scheduling\n if session[:role] == \"Teacher\"#If they are a teacher redirect them back to their page\n redirect_to \"https://database-tjthekid.c9users.io/teacher_page\"\n return\n elsif s...
[ { "docid": "79d5a6c8a85ebe5d6a46169351093269", "score": "0.78293437", "text": "def teacher_page\n if session[:role] == \"Student\"\n redirect_to \"https://database-tjthekid.c9users.io/student_page\"\n return\n elsif session[:role] == \"Principle\"#If they are a princi...
825c58b8b7d0cd8742910cd17e25cf72
PATCH/PUT /accounts/1 PATCH/PUT /accounts/1.json
[ { "docid": "dcda005fe85cd147d1ebb2e27c23eac6", "score": "0.63076025", "text": "def update\n respond_to do |format|\n if @account.update(account_params)\n format.html { redirect_to @account, notice: 'Account was successfully updated.' }\n format.json { head :no_content }\n else...
[ { "docid": "6ff99486bd117ea96875caa9752b087a", "score": "0.672479", "text": "def update\n @account = current_user.accounts.find(params[:id])\n\n if @account.update(account_params)\n head :no_content\n else\n render json: @account.errors, status: :unprocessable_entity\n end\n end",...
e7f3e087fef65d98e122ba53dbf9ddfa
override this in individual classes to define whether params from scraper parser are the same record as current one. By default this is if the uid is the same (we should only be matching against records from the correct council so don't need to check council_id)
[ { "docid": "9ffe8ce824f33b8450a85d8aacdb6dfa", "score": "0.6917105", "text": "def matches_params(params={})\n params[:uid].blank? ? false : (params[:uid] == self[:uid]) \n end", "title": "" } ]
[ { "docid": "b808a1977031d6723065cb8e69600eb6", "score": "0.673459", "text": "def matches_params(params={})\n if params[:uid].blank?\n self[:committee_id] == params[:committee_id] && (self[:url]==params[:url] || self[:date_held]==params[:date_held])\n else\n super \n end\n end", "...
a87fd5d46e2826306e2625f5640fa26c
TODO: internal API should be configurable/adjustable with context.yml !
[ { "docid": "85a751e27d8b841bf3ef034bc15eaf1f", "score": "0.0", "text": "def context_manager; Java::RbTrinidadContext::DefaultManager.new end", "title": "" } ]
[ { "docid": "e72cb44b5966ca03547255a5b78ceb21", "score": "0.7599769", "text": "def automatic_context; end", "title": "" }, { "docid": "e3061c29e5b1c24792771045ed903e06", "score": "0.7384486", "text": "def context; end", "title": "" }, { "docid": "e3061c29e5b1c24792771045ed...
54b20e942669408fe60d821b61b7f6c4
Marshals this object into xml. Making a bit of a lazinessmotivated assumption that you will in fact be supplying a :builder option. Even though it's optional, it's not. This is because I can't imagine any reason you'd be serializing this object as the toplevel message.
[ { "docid": "21e6fbf59740729e4d8c5edd3c30cd70", "score": "0.6299452", "text": "def marshal( options={} )\n xml = options[:builder]\n\n @table.each_pair do |key, value|\n if value.is_a?( Array )\n if value.empty?\n do_xml!( xml, key, nil )\n else\n...
[ { "docid": "4f20b86fea9f6b1ef05c64fdfda57647", "score": "0.7018781", "text": "def to_xml\n builder.target!\n end", "title": "" }, { "docid": "2e255432c43e2c4e91e2cb72bd315f68", "score": "0.69700134", "text": "def to_xml(options = {})\n to_xml_opts = {:skip_types => tru...
f10aecb81d20784d67f11d1a1e227cb3
Todo: Add description for test test_get_unix_date_time
[ { "docid": "27a49f5c1a0f4d0901147de9328b6811", "score": "0.69818985", "text": "def test_get_unix_date_time()\n\n # Perform the API call through the SDK function\n result = @controller.get_unix_date_time()\n\n # Test response code\n assert_equal(200, @response_catcher.response.status_code)\n\...
[ { "docid": "0c51db9a383808bdcad4133ec21625e0", "score": "0.7449081", "text": "def test_unix_date_time()\n # Parameters for the API call\n datetime = DateTimeHelper.from_unix(1484719381)\n\n # Perform the API call through the SDK function\n result = @controller.unix_date_time(datetime)\n\n ...
235c19435f3750730c0a29e83270ce52
Returns true if this parser supports SFS 1.2 extensions. See WKTParser for details.
[ { "docid": "b67cf93515aa3ece5603a50b46a39014", "score": "0.54406893", "text": "def support_wkt12?\n @support_wkt12\n end", "title": "" } ]
[ { "docid": "39e8bd259486dc04ed436974685b2680", "score": "0.6800344", "text": "def supported?(extension_name)\n end", "title": "" }, { "docid": "2043046c1f3cbbebfb7d51ff4fa97fb0", "score": "0.6661048", "text": "def supports_extensions?\n false\n end", "title": "" ...
1c4b1b6c92de09ab5463d418c06e7c88
Expose fields in the given env hash for the rest of the application.
[ { "docid": "5060a517faa804b5d62bd97c691237dc", "score": "0.5452045", "text": "def set_env_fields(env:, **fields)\n fields.each do |field, value|\n env[\"rack.range.#{field}\"] = value\n end\n end", "title": "" } ]
[ { "docid": "ca49e09ac896b107ecb371df4dac4da4", "score": "0.63983715", "text": "def process_environment(env)\n request_data = { \n :url => env['REQUEST_URI'],\n :ip_address => env['HTTP_X_FORWARDED_FOR'] ? env['HTTP_X_FORWARDED_FOR'] : env['REMOTE_ADDR']\n }\n ...
7ec1502aa99b05f673deae9e3aad3146
required parameters: name: listener_port, type: Integer, min value: 1, max value: 65535 name: load_balancer_id, type: String optional parameters: name: _method, type: String, optional values: GET|POST name: _region, type: String name: _scheme, type: String, optional values: http|https name: owner_account, type: String ...
[ { "docid": "51e64bc01c9668a9c04f3ebf0248d9b9", "score": "0.63346136", "text": "def describe_load_balancer_u_d_p_listener_attribute(listener_port, load_balancer_id, optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'DescribeLoadBalancerUDPListenerAttribute'\n\t\targs[:query]['L...
[ { "docid": "6b579bdc8dd0ecb0cd4b6b71cd667752", "score": "0.7655525", "text": "def start_load_balancer_listener(listener_port, load_balancer_id, optional={})\n\t\targs = self.class.new_params\n\t\targs[:query]['Action'] = 'StartLoadBalancerListener'\n\t\targs[:query]['LoadBalancerId'] = load_balancer_id\...
725c030943c9f810ee22c00319f5bc0b
TODO Move to Webdriver Relies on getAttribute returning nil
[ { "docid": "e99c9dd678e880763c7e15bad59456ff", "score": "0.0", "text": "def has_attribute?(name)\n !attr(name).nil?\n end", "title": "" } ]
[ { "docid": "e889edb02b65d20e55898cc50a84b02a", "score": "0.6725554", "text": "def get_element_attribute(access_type,access_name,attribute_name)\n\treturn WAIT.until{$driver.find_element(:\"#{access_type}\" => \"#{access_name}\")}.attribute(\"#{attribute_name}\")\nend", "title": "" }, { "doci...
5ee6c56ab5d9f632d6a09a620137257b
DELETE /trips/1 DELETE /trips/1.json
[ { "docid": "b0684e5379543662626082716442caf7", "score": "0.7373286", "text": "def destroy\n @trip = Trip.find(params[:id])\n @trip.destroy\n\n respond_to do |format|\n format.html { redirect_to trips_url }\n format.json { head :no_content }\n end\n end", "title": "" } ]
[ { "docid": "8d7974daec8f84834884a9982cfda923", "score": "0.76655746", "text": "def destroy\n @trip.destroy\n\n respond_to do |format|\n format.any(:trips_json, :json) do\n head :no_content\n end\n end\n end", "title": "" }, { "docid": "450279cf721c70c...
77288f4df60cbed50c6c5a585d6f33a5
This action makes Bailment RBO Request after approving a kit and renders a pdf containing the Bailment Info of that kit if the kit is present in Bailment.
[ { "docid": "7036ac0597895bdf1d14c15c23cfe34a", "score": "0.739156", "text": "def bailment_info_print\n @kit = Kitting::Kit.find_by_kit_number_and_commit_id_and_category(params[:kit_number],nil,nil)\n if @kit\n @updated_by = Kitting::Customer.find(@kit.updated_by).user_name rescue \"\"\...
[ { "docid": "42d3fed04a03c3be45851e241d72c013", "score": "0.5928449", "text": "def show\n @currency = @company.currency_code\n @gstr_advance_payment = @company.gstr_advance_payments.find(params[:id])\n @gstr_advance_payment_line_items = @gstr_advance_payment.gstr_advance_payment_line_items\n ...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "54833bc0b4b29f88fca01ef66ee68baf", "score": "0.0", "text": "def set_daily_track\n @daily_track = DailyTrack.find(params[:id])\n end", "title": "" } ]
[ { "docid": "631f4c5b12b423b76503e18a9a606ec3", "score": "0.60339177", "text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end", "title": "" }, { "docid": "7b068b9055c4e7643d4910e8e694ecdc", "score": "0.60135007", "text": "d...
c5b9a55d194b1901e14db03f410fdb87
Private: Get number of HTTP status codes and their count code Integer status code Returns nil
[ { "docid": "c84fb014547faacd25300f031da59424", "score": "0.7902021", "text": "def http_status_counter(code)\n if @status[code].nil?\n @status[code] = 0\n end\n\n @status[code] = (@status[code].to_i + 1)\n end", "title": "" } ]
[ { "docid": "84bbb3de2b95b9e52b31cf7a63005ed5", "score": "0.7521316", "text": "def status_code\n @http_response.code.to_i\n end", "title": "" }, { "docid": "6c8bd9f85fd3cefecce7817defb3c2f8", "score": "0.7420189", "text": "def status_code\n http_response.status.to...
c447d7765f1e8fb74b4a3f1f4b4dda04
PATCH/PUT /user_matches/1 PATCH/PUT /user_matches/1.json
[ { "docid": "505e5f06427eba85fefb3a1e03435105", "score": "0.7093835", "text": "def update\n respond_to do |format|\n if @user_match.update(user_match_params)\n format.html { redirect_to back_or_default, notice: (t 'user_match.update.success') }\n format.json { render @user_match, st...
[ { "docid": "f2a318f510c40b2b397f6ceb295127f9", "score": "0.7194599", "text": "def update\n success = @match.update(match_params)\n if success\n @match.user_matches.each do |user_match|\n (user_match.user_id == current_user.id) ? user_match.update(:validated => true) : user_match.update...
06fd4695b0629d0dd97ca31e420d09e3
METHOD: Adds an assignment to the assignment table
[ { "docid": "554081798e35a5e9a0a586a10752f52c", "score": "0.0", "text": "def create_assignment(object,client,channel)\n\t \tcourse_name = object['course_name']\n\t \tdescription = object['description']\n\t \tdue_date = object['due_date']\n\n\t\t assignment = Assignment.create!(:course_name =>...
[ { "docid": "873c10de77f7fc1801fa337c2127abd6", "score": "0.72812796", "text": "def assignment\n # Create assignment\n Relationship.create(assignment_parameters)\n \n # Get human readable assignment values\n @assignment_parts = assign_parts(params)\n end", "title...
1097a7e7758f08d32addfc88ea3fdcab
GET /users GET /users.json
[ { "docid": "565c46751df83f2984590f468f460593", "score": "0.0", "text": "def index\n @group = Group.find(params[:group_id])\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @group }\n end\n end", "title": "" } ]
[ { "docid": "9f7c735ace683c5c2b12c914cc9ad8a8", "score": "0.84081405", "text": "def get\n users = User.all.as_json\n render(json: users.as_json, status: :ok)\n end", "title": "" }, { "docid": "543509c6588e2f79a8dbcd1cdcdaf7b9", "score": "0.836071", "text": "def users\...
d38bd6f5a0835f66bef60f645a128f39
Returns a hash of file name => song object for each song that should go through the audio engine
[ { "docid": "9b2bfa74d72db6bcb35a1e0d96e52ca3", "score": "0.0", "text": "def normalize_for_split_option(song)\n songs_to_generate = {}\n\n if @options[:split]\n split_songs = song.split\n split_songs.each do |track_name, split_song|\n extension = File.extname(@output_file...
[ { "docid": "0662d7c9d094a2f4c3b364000d99e244", "score": "0.7511646", "text": "def audio_paths\n Hash[@media[:music].map { |entry| [audio_path(entry[:ext]), entry[:path]] }]\n end", "title": "" }, { "docid": "cf21071f03a45a5a1521a1428dd4f28a", "score": "0.7086676", "text": "def so...
ed5db45d7beb1a25cfdef4147eb234de
Returns array of currently selected plugin ids.
[ { "docid": "cdc462fbbdab02e4b8332b0e2791332e", "score": "0.54653376", "text": "def plugins\n @@plugins ||= begin\n if no_plugins?\n puts '*** Plugins disabled with NO_PLUGINS variable ***'\n []\n else\n get_plugin_names_for_env get_env\n end\n end\n end", "...
[ { "docid": "61a402f1eda3d7e1206bacec1cb84059", "score": "0.6430566", "text": "def plugins\n Array(@plugins).freeze\n end", "title": "" }, { "docid": "9df0d813fbea48fa5bf6d341f691a11a", "score": "0.642741", "text": "def plugins\n\n\t\tif @plugins.length == 0\n\t\t\tret...
621f2838548f9b1baccf8ac34dbb9620
should this input line be completely ignored for columnizing purposes? TODO: deal with input that looks like multiple pages, with header lines repeated
[ { "docid": "7caa00dbbbc217781a375f031a7c8513", "score": "0.5490058", "text": "def is_header?(fields)\n # parsing should ignore...\n # lines that are completely blank\n # lines that appear to be entirely delimiters\n\n return true if fields.empty?\n\n line = fields.join\n\n ...
[ { "docid": "490553746e266f23669faea02cbc49e9", "score": "0.6523456", "text": "def tabular_input_cleanse_header\n ignored_columns = tabular_input.header.cleanse!\n logger.warn('Stripped out invalid columns from custom header', ignored_columns) unless ignored_columns.empty?\n\n ...
abe4f9490de612db3f0b53f6b1b39144
This method generates an array of all moves that can be made after the current move.
[ { "docid": "ed080e35ce8761efb4b124d5fb6fcd50", "score": "0.0", "text": "def children\n nodes = []\n (0..2).each do |i|\n (0..2).each do |j|\n pos = [i, j]\n # next unless board.empty?(pos)\n if board.empty?(pos)\n dupped_b = @board.dup\n dupped_b[pos] = ...
[ { "docid": "ab6b87d439d2ac15bdfbf3aebcff6da0", "score": "0.7375647", "text": "def generate_moves\n @delta.each do |step|\n (1..7).each do |i|\n new_pos = [@pos[0] + step[0] * i, @pos[1] + step[1] * i]\n if valid_coord?(new_pos)\n @move_list << new_pos\n break if @...
1eadf00dab4dd32ce0f52b9a7fe5c458
If you have extra params to permit, append them to the sanitizer.
[ { "docid": "4953241fb91db9513d20125380a6d79a", "score": "0.0", "text": "def configure_sign_up_params\n devise_parameter_sanitizer.permit(:sign_up, keys: [:nickname, :user_icon_id, :family_id, :host_user])\n end", "title": "" } ]
[ { "docid": "505e334c1850c398069b6fb3948ce481", "score": "0.72707826", "text": "def sanitise!\n @params.keep_if {|k,v| whitelisted? k}\n end", "title": "" }, { "docid": "b4c9587164188c64f14b71403f80ca7c", "score": "0.7025185", "text": "def sanitize_params!\n request.sanitiz...
a1fbb3e4b0632ce0c809fdd884bc0042
Q326: Power of Three
[ { "docid": "cd907a4436c2ae9e50e9242b7632f2ab", "score": "0.6120049", "text": "def is_power_of_three(n)\n return false if n == 0\n\n while n % 3 == 0\n n = n / 3\n end\n\n n == 1 ? true : false\nend", "title": "" } ]
[ { "docid": "f3a98adf772083f622b5b6f02b9a77e7", "score": "0.6972212", "text": "def cube(siffra)\n return siffra**3\nend", "title": "" }, { "docid": "61b556e759dea7ee395cd8ec4aec6228", "score": "0.6794241", "text": "def transmogrifier(num1,num2,num3)\n transmogrified = num1 * num2\...
3259a83ad3c072dceca1621481b5ee83
cantidad de productos con opciones de submenu
[ { "docid": "abe90638afd2d211fde4534b1bfce790", "score": "0.0", "text": "def cant_productos(opcion)\n lines = read()\n\n if opcion == \"a\"\n lines.each do |x|\n arr = x.split(\" \")\n existencia = arr[3].to_i + arr[2].to_i + arr[1].to_i\n puts \"#{arr[0]} hay #{existencia} productos\...
[ { "docid": "b8cae466ce00368bc2fe78676bb02088", "score": "0.59446514", "text": "def dessert_item_count\n desserts = @menu[:desserts]\n total = 0\n desserts.each { |k, v| total += v.size }\n total\n end", "title": "" }, { "docid": "3c8be0823d027d177b1005d3fcd44b54", "score": "...
02dca19e31ab00e3e6161e084dafe2e0
Marks all assertion within this suite as skipped and the suite itself too.
[ { "docid": "bfed12a0e68fed403c075a46f0358a77", "score": "0.7338726", "text": "def skip_suite(suite, reason) # :nodoc:\n suite.skip(reason)\n reason = suite.reason\n suite.assertions.each do |test|\n test.skip(reason)\n end\n end", "title": "" } ]
[ { "docid": "66101edc5365e80119f5322452b8f9a9", "score": "0.69781625", "text": "def markSkipped message = nil\n raise SkippedTest, message\n end", "title": "" }, { "docid": "b71e651dfb95fba321810633061cfd0e", "score": "0.6694949", "text": "def skip_now\n @skipped = true\n...
b8e7831a97f87dbf050273272b43283a
Returns the Last Name Required label.
[ { "docid": "efd645c54240c1fb38db305ff3eb0913", "score": "0.83054745", "text": "def last_name_required_label\n $tracer.trace(__method__)\n return ToolTag.new(span.id(\"/valLastName$/\"), __method__)\n end", "title": "" } ]
[ { "docid": "87c1401d60287c8786fd826465a60344", "score": "0.73723996", "text": "def first_name_required_label\n $tracer.trace(__method__)\n return ToolTag.new(span.id(\"/valFirstName$/\"), __method__)\n end", "title": "" }, { "docid": "96744edfe4c36eea9af9575dd301d4c4", "...
4bfd1695c1e7950c721da2fe2416c3d3
Does this TypeKind have multiple possible implementors?
[ { "docid": "57189876addf7a122867cfc4ee597dab", "score": "0.0", "text": "def resolves?; end", "title": "" } ]
[ { "docid": "11c75c2b9d1d2f490c84757d01ba2e31", "score": "0.63113314", "text": "def type_registered?(klass_or_type)\n end", "title": "" }, { "docid": "0cfadad0dde35d8b6baf4bd690a4b86f", "score": "0.6261762", "text": "def kind_of(klass); end", "title": "" }, { "docid": "...
699d379cb9fb23583fc1aa92bc0f8ab4
Removes a list of files. Each parameter should be the name of the file to delete. If the last parameter isn't a String, verbose mode will be enabled. Returns the number of files deleted.
[ { "docid": "5f1375d57f558b1a9757bce878c92167", "score": "0.53426653", "text": "def safe_unlink(*files)\n verbose = if files[-1].is_a? String then false else files.pop end\n files.each do |file|\n begin\n unlink file\n $stderr.print \"removing \", file, \"\\n\" if verbose\n ...
[ { "docid": "7acf7e19cd8af1695fac3d5fedc9e119", "score": "0.70958173", "text": "def delete_files( files )\n files.each do |file|\n puts \"Deleting file: #{file}\"\n File.delete( file )\n end\n end", "title": "" }, { "docid": "18a11af62dfa9a9221b1497227684cb9", "score": "0...
1d2b2d7e0e08f65dae766e9760265355
PUT /system_specifications/1 PUT /system_specifications/1.json
[ { "docid": "b2f52bb30c0e0b462de0b08ebc837c0c", "score": "0.59331", "text": "def update\n flash.keep\n\n respond_to do |format|\n if @system_specification.update_attributes(params[:system_specification])\n\n format.html { redirect_to @system_specification, :flash => {:success => 'Succes...
[ { "docid": "80138c2132ff19b52822cc35ed52733d", "score": "0.66676855", "text": "def update\n respond_to do |format|\n if @system_requirement.update(system_requirement_params)\n format.html { redirect_to @system_requirement, notice: 'System requirement was successfully updated.' }\n ...
0fd8aa2a84e940efd85a357a3d263207
Returns all the BasicFoods in a sorted list
[ { "docid": "3745203d58593a90828ccd3b0044e8a1", "score": "0.7827255", "text": "def get_foods\n v = @foodbase.values\n res = v.inject([]) { | memo, i | i.class==BasicFood ? memo+[i.name] : memo }\n res.sort\n end", "title": "" } ]
[ { "docid": "1eed88d29d4839373f1823b50b0d1afd", "score": "0.6613815", "text": "def all_favourite_food(people)\nfavourite_food_arr = []\n for person in people\n for snack in person\n favourite_food_arr.push(person[:favourites][:snacks][snack])\n end\n end\nreturn favourite_food_arr.sort\nputs...
f4a572adaafafc291b9ab308a5301abd
adds an existing font (from any PDF Object) to the font library. returns the font on success or false on failure. example: fonts = CombinePDF.new("japanese_fonts.pdf").fonts(true) CombinePDF.register_font_from_pdf_object :david, fonts[0] VERY LIMITTED SUPPORT: at the moment it only imports Type0 fonts. also, to extract...
[ { "docid": "eab8456b33a7603af7da8865c431af44", "score": "0.8531249", "text": "def register_existing_font(font_name, font_object)\n Fonts.register_font_from_pdf_object font_name, font_object\n end", "title": "" } ]
[ { "docid": "1b3168d70446f131205b5c15a39a1d85", "score": "0.7587095", "text": "def set_font(font = :Helvetica)\n # if the font exists, return it's name\n resources[:Font] ||= {}\n fonts_res = resources[:Font][:referenced_object] || resources[:Font]\n fonts_res.each do |k, v|\n ...
d770293f5e8bef90c179e015308c2afd
id Set a persistent ID to a proxy. May be used in sections : defaults | frontend | listen | backend no | yes | yes | yes Arguments : none Set a persistent ID for the proxy. This ID must be unique and positive. An unused ID will automatically be assigned if unset. The first assigned value will be 1. This ID is currently...
[ { "docid": "b43d1d86c19eb086710f0b81cafbd6ff", "score": "0.6803373", "text": "def persistent_id(params = nil)\n if @name_index\n @conf.insert(@name_index + @conf.length, \" \" + \"id \" + params.to_s + \"\\n\")\n else\n puts \"no #{@proxy_type} name assigned\"\n return ...
[ { "docid": "5f48009b8b3b9c4167fcaa65a767d0ef", "score": "0.68630767", "text": "def set_id(id)\n unless id.nil?\n @id = id\n end\n @id\n end", "title": "" }, { "docid": "20eb75dea8b64ef677c28820e90e7523", "score": "0.67549103", "text": "def id=(v)\r\n @id = v\r\n ...
5b578a68a9fbc17dd881d1506b3a233f
Simple test if binstubs prefix should be used.
[ { "docid": "2b96b33a34093d5c847b9e978c7015e7", "score": "0.0", "text": "def cucumber_exec(options = {})\n options[:binstubs] == true ? \"bin/cucumber\" : \"cucumber\"\n end", "title": "" } ]
[ { "docid": "58756ef059d4456fd3c6393dd4bd07f1", "score": "0.6933247", "text": "def has_prefix?\n info(:use_the_prefix)\n end", "title": "" }, { "docid": "b97be2ac5479694d3f89708f1d882f4f", "score": "0.6898414", "text": "def has_prefix?\n prefix.present?\n end", ...
cbb396212a1a168dc8cf908a8611daf6
DELETE /mostsmalliteminfos/1 DELETE /mostsmalliteminfos/1.json
[ { "docid": "9dc8a3c061789b23c40697f1004b7054", "score": "0.79271305", "text": "def destroy\n @mostsmalliteminfo = Mostsmalliteminfo.find(params[:id])\n @mostsmalliteminfo.destroy\n\n respond_to do |format|\n format.html { redirect_to mostsmalliteminfos_url }\n format.json { head :no_c...
[ { "docid": "e59f29627bc48fe02a508b69fee42607", "score": "0.7267128", "text": "def destroy\n @mostsmallitemcategory = Mostsmallitemcategory.find(params[:id])\n @mostsmallitemcategory.destroy\n\n respond_to do |format|\n format.html { redirect_to mostsmallitemcategories_url }\n format.j...
c53606c6afb878da69f181262b24534a
Pressing the key will call the procedure.
[ { "docid": "f910f438c759912ab13af938568ba6d8", "score": "0.0", "text": "def output\n @output.call\n end", "title": "" } ]
[ { "docid": "64154f2ba1dd2a51e08a327b049b88e5", "score": "0.7249274", "text": "def press(key_sequence)\n end", "title": "" }, { "docid": "bed72884a9347c184752d63a8d9e33f0", "score": "0.7200026", "text": "def key_press locator, keycode\r\n command 'keyPress', locator, keycode\r\n ...
52dc38fd9878592fbe837a1a6b40d1ea
Returns the list of shares.
[ { "docid": "ad64a4ab83625c3e27632b2e66519c95", "score": "0.0", "text": "def list(opts)\n opts = check_params(opts,[:volume])\n super(opts)\n end", "title": "" } ]
[ { "docid": "5388a6eb17eb8fb414c7064b7df25311", "score": "0.82969326", "text": "def all_shares\n response = get(\"#{@config['url']}/api/2.1/rest/shares\", {accept: :json, :cookies => cookies})\n JSON.parse(response, :symbolize_names => true)[:shares][:share]\n end", "title": "" }, { ...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "cbb3fbe0502d73e0d031115e941214b0", "score": "0.0", "text": "def set_muscle_mass\r\n @muscle_mass = MuscleMass.find(params[:id])\r\n end", "title": "" } ]
[ { "docid": "bd89022716e537628dd314fd23858181", "score": "0.6163754", "text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "title": "" }, { "docid": "3db61e749c16d53a52f73ba0492108e9", "score": "0.6045816", "text": "def action_hook;...
d7cc9a90af4d647fbe780670f6531e48
PUT /ideas/1/scratch Allows to "scratch/unscratch" an idea, which doesn't destroy it, but will mark/unmark an idea as "scratched out"
[ { "docid": "481a6e02899bdb10b1005ce4070f48a0", "score": "0.73864925", "text": "def scratch\n @idea = Idea.find(params[:id])\n \n @idea.update_attribute(:scratched, !@idea.scratched)\n redirect_back_or ideas_path\n end", "title": "" } ]
[ { "docid": "e67a728f004b80ac688a51f1f70a0331", "score": "0.63107306", "text": "def set_scratch\n @scratch = Scratch.find(params[:id])\n end", "title": "" }, { "docid": "dc6aba9882020bd760d30f9bdc80b1f1", "score": "0.63106024", "text": "def update\n @scratch = Scratch.find(para...
fc22f5fc836e5e5d5fa972fd3f8caa25
Sets the owner property value. If set, this represents the user who created or added the calendar. For a calendar that the user created or added, the owner property is set to the user. For a calendar shared with the user, the owner property is set to the person who shared that calendar with the user.
[ { "docid": "d231fdf4d2556a1e2664ad905eb990ee", "score": "0.78892386", "text": "def owner=(value)\n @owner = value\n end", "title": "" } ]
[ { "docid": "76ab0bc9faf76c8e0aafd628dc847ba4", "score": "0.76939124", "text": "def set_owner\n @owner = Owner.find_by_owner_user_id(current_owner_user.id)\n end", "title": "" }, { "docid": "d2c0db8e29fd023eb980be450460d696", "score": "0.75542957", "text": "def set_owner #:doc...
a14f97dec9998558b17fa317120f81ea
POST /pregnancy_trimester_i_examinations POST /pregnancy_trimester_i_examinations.json
[ { "docid": "ee137ecda3fd69430ceb25f3c9e2e7ec", "score": "0.6079681", "text": "def create\n @pregnancy_trimester_i_examination = PregnancyTrimesterIExamination.new(params[:pregnancy_trimester_i_examination])\n @pregnancy_trimester_i_examination.user_id = session[:user_id]\n if params[:patient_id...
[ { "docid": "c064792922bb716d94e0aa61682cb669", "score": "0.6056844", "text": "def index\n @pregnancy_trimester_i_examinations = PregnancyTrimesterIExamination.find(\n :all,\n :joins => [:patient_examinations, :patients],\n :order => ['patients.last_name, patients.first_name, patients.p...
6b65b82bb4b2eda1dfaa73fef233320c
TODO there is probably a better way
[ { "docid": "a7dc5777f58341ad0763a2ce883699de", "score": "0.0", "text": "def get_users_for_organization organization\n user_role = Role.find_by(:name => 'transit_manager')\n\n unless user_role.nil?\n users = organization.users_with_role user_role.name\n end\n\n return users || []\n end"...
[ { "docid": "b6b2bcc0062aeb115edab7b10cbe6930", "score": "0.6127748", "text": "def desired; end", "title": "" }, { "docid": "9dcc74dd11eb115d21bf9af45b3ec4e3", "score": "0.5871184", "text": "def bodystmt; end", "title": "" }, { "docid": "9dcc74dd11eb115d21bf9af45b3ec4e3", ...
a6a31a82761766983c975c37145fc707
Gets the signatureVersion property value. Current malware definitions version
[ { "docid": "38fff62047225d132c48bcdb0d113a6a", "score": "0.86840373", "text": "def signature_version\n return @signature_version\n end", "title": "" } ]
[ { "docid": "233c3ce3d1f9e174e03aab2e72fbc165", "score": "0.7810005", "text": "def signature_version=(value)\n @signature_version = value\n end", "title": "" }, { "docid": "507251835cdac01c3e9ec511ce5a238f", "score": "0.73251635", "text": "def ver\n ...
1cc9b39096d7558f168b1b22e56f81b8
input: chomp_session instance output: one restaurant
[ { "docid": "580b4aa81454d860dd57dc17bc19f17e", "score": "0.604443", "text": "def generate_restaurant(chomp_session)\n # algorithm to get recommendation\n # based on chompsession ID, get all responses\n # find the lowest budget, convert to integer 1,2,3 or 4\n # get frequency table of cuisine...
[ { "docid": "a8ef7e39d0f8cfa5dd8f87449de76313", "score": "0.551864", "text": "def session\n uuid = nil\n list = get(\"list\")\n if !list.empty?\n msg list\n uuid = list[0] # return existing session identifier if there is one\n return uuid\n end\n uuid = get \"...
66e588e42efcb81f20d979a69dcf62ff
Generates log entry with header and body
[ { "docid": "3d087aa2bff9c05588c06db5bc3dac90", "score": "0.0", "text": "def generate_entry_for_tag(pull_requests, issues, newer_tag_name, newer_tag_link, newer_tag_time, older_tag_name) # rubocop:disable Metrics/ParameterLists\n github_site = @options[:github_site] || \"https://github.com\"\n ...
[ { "docid": "be90f224b08559aa1f79d81d58b0741d", "score": "0.63587326", "text": "def make_log_entry\n le = LogEntry.new(:description => \"Desc ##{sn}\")\n le end", "title": "" }, { "docid": "fcea1c07c990e6a799a369c718937487", "score": "0.62994844", "text": "def create_log(param); e...
f98512b8c00e644c1028636186317c45
GET /clientes/1 GET /clientes/1.json
[ { "docid": "73b3c2a4b356afe4f2829fb76e68d98b", "score": "0.0", "text": "def show\n render json: @cliente\n end", "title": "" } ]
[ { "docid": "d144515f40616fcd4071bc6074af11d5", "score": "0.7609307", "text": "def index\n @clientes = Cliente.all\n render json: @clientes\n end", "title": "" }, { "docid": "c0ffa931d98d5ce1e2041a93d545d9ea", "score": "0.73048556", "text": "def index\n @clients = Client.all...
6fe6e4c89e0addfcb984809cbab616a2
print on the html page like php
[ { "docid": "df8646a2545fa76b3c5a5b84713d80f2", "score": "0.0", "text": "def wp(message)\n $debug_extras_messages ||= []\n unless message.blank?\n $debug_extras_messages << message\n end\n end", "title": "" } ]
[ { "docid": "bd866d5842bfdc825b7bc8db3dcaa175", "score": "0.7377636", "text": "def print_page\n @browser.print\n end", "title": "" }, { "docid": "fc4daf0178bf5d3f3e46c316fb669f8a", "score": "0.72949725", "text": "def print\n File.open(\"#{DIRECTORY_PATH}/spy.html\", \"w...
d190939dcc8fcfca3beeec73e42e5ecc
GET /instructors/new GET /instructors/new.json
[ { "docid": "b887272d473b3b1641a5a7b7a2573109", "score": "0.79268175", "text": "def new\n @instructor = Instructor.new\n\n respond_to do |format|\n format.json { render json: @instructor }\n end\n end", "title": "" } ]
[ { "docid": "2b9c42086c46818a5b862006c3988664", "score": "0.78281593", "text": "def new\n @instructor = Instructor.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @instructor }\n end\n end", "title": "" }, { "docid": "0a8795d0b9d...
ac4aee0b3e6dffacfeb9bcdd9db772fd
Retrieves the audio features for the track
[ { "docid": "a6888f58a24a6663ca482ac0e610e600", "score": "0.8087591", "text": "def audio_features\n RSpotify::AudioFeatures.find(@id)\n end", "title": "" } ]
[ { "docid": "513dbb197ebe60b0dc37efee37573170", "score": "0.6776853", "text": "def audio\n results.select{|t|t.track_type == \"Audio\"}\n end", "title": "" }, { "docid": "c89d73f98f08565196d4766c4520dfff", "score": "0.67015654", "text": "def get_tracks_and_afs(tracks)\n tracks_...
decde6d077ece875171d11ff7443a966
POST /work_days POST /work_days.json
[ { "docid": "d6e624fee423851bdbcf5ea98af5c168", "score": "0.7179159", "text": "def create\n @work_day = WorkDay.new(params[:work_day])\n\n respond_to do |format|\n if @work_day.save\n format.html { redirect_to @work_day, notice: 'Work day was successfully created.' }\n format.jso...
[ { "docid": "2e54815e2240bd028bbe8763a916eaed", "score": "0.7279587", "text": "def create\n @work_day = WorkDay.new(params[:work_day])\n\n respond_to do |format|\n if @work_day.save\n format.html { redirect_to work_days_path, notice: 'Work day was successfully created.' }\n forma...
96b62d5225d1aeab905fd7ac3b35c6af
replace the specified Deployment
[ { "docid": "d6c75e8d1afc716220d12938ceb14333", "score": "0.66500753", "text": "def replace_namespaced_deployment(name, namespace, body, opts = {})\n data, _status_code, _headers = replace_namespaced_deployment_with_http_info(name, namespace, body, opts)\n return data\n end", "title": ""...
[ { "docid": "6404e4ecb795c7e9b7c6209bb3a9e2f8", "score": "0.6935787", "text": "def deploy\n patch_replace? ? patch_replace : super\n end", "title": "" }, { "docid": "9e9f1400dcb5a0d61ca3b948dcc3a9c4", "score": "0.6579202", "text": "def set_deployment\n id = params[:depl...
f7bea8fbaeb5ada6926b5241e771eb7c
client_id Your client id. Log onto the Campaign Manager to access your client id. token Your token. Log onto the Campaign Manager to access your token. message_id A unique ID returned from a successful transaction.send request or from user.transactions method. hash A hash returned from a successful transaction.send req...
[ { "docid": "59acb8a37eeb65b060d572796416d43d", "score": "0.0", "text": "def lookup(options)\n # q6z5e0on\n @client.get_request('/moms/transaction.lookup', options) \n end", "title": "" } ]
[ { "docid": "0aea92f15acc8540b77e7709ae58e421", "score": "0.60047925", "text": "def associate_client_with_token(data_hash)\n\n response = rest_post_call($INTRODUCTIONS_DOMAIN + '/confirm', data_hash.to_json)\n\n if (response.code != '200') then\n raise \"Failed to associate client with token: \" + r...
753a3799ef767f80d72a74e59ac4f54b
GET /be_a_volunteers/1 or /be_a_volunteers/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "3e6dfa12dd58779dedac8c1c6f1c104c", "score": "0.71713877", "text": "def index\n @volunteers = Volunteer.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @volunteers }\n end\n end", "title": "" }, { "docid": "164e83a6eb6...
1f9e7935b6756c24d744f5f25ac30056
Iterates through all the tasks on all nodes
[ { "docid": "a9c5a4745d810ea681f323e60098ab90", "score": "0.7301427", "text": "def each_task\n return to_enum(:each_task) unless block_given?\n each_node do |node|\n node.each_task do |task|\n yield task\n end\n end\n end", "title": "" } ]
[ { "docid": "461e01a0afc294101f917e5016ade259", "score": "0.7458429", "text": "def tasks\n nodes\n end", "title": "" }, { "docid": "23746396ca6915808cef0b899da8ce21", "score": "0.7017858", "text": "def all_tasks; end", "title": "" }, { "docid": "d529b542448ec010c1b4149...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "5e754a889ca12b74bde1c2216cfdef5d", "score": "0.0", "text": "def subscribers_list_params\n params.require(:subscribers_list).permit(:name)\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...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "aa314e616d679b0221ba9b07cca4357e", "score": "0.0", "text": "def datebodydatum_params\n params.require(:datebodydatum).permit(\n :date, :weight, :pulse, :bodytemperature, :bloodpressure, :highbloodpressure, :date_search)\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...
738eeabb20328d1f52f1a6ff6d36e36c
Get details of one photo (with access token) route: POST /photos/:id
[ { "docid": "8bf0fc20cfb4efa0570b063f38c82331", "score": "0.7024158", "text": "def authorized\n photo_obj = API.get_one(params[:id], true, params[:access_token], params[:token_secret])\n if photo_obj['error'].nil?\n photo = PhotoPresenter.new(photo_obj['photo'])\n render :json => photo.as...
[ { "docid": "8b967068a1ef07734415ac63e75409ff", "score": "0.74332225", "text": "def index\n if params[:single]\n\t url = \"#{API_BASE_URL}/photos/#{params[:id]}.json?token=#{ENV['API_KEY']}\"\n\t response = RestClient.get(url)\n\t @photo = JSON.parse(response.body)\n\telse\n\t url = \"#{API_BASE_U...
8f20d714b96c28f8ba249257dd2069d0
Adds two CGPoint values and returns the result as a new CGPoint.
[ { "docid": "36570e730a7b4a5dc50cc3055710e28a", "score": "0.83502376", "text": "def CGPointAdd(point1, point2)\n\tCGPointMake(point1.x + point2.x, point1.y + point2.y)\nend", "title": "" } ]
[ { "docid": "65d1bcfcd9c953fffcbe4d1eed8026a3", "score": "0.7460101", "text": "def add(a, b) \n\t\treturn Point.new(a.x + b.x, a.y + b.y)\n\tend", "title": "" }, { "docid": "637014aac8fe03da006f3d642544ef62", "score": "0.74556106", "text": "def +(other)\n if other.is_a?(Numeric)\...
23021d7cd80484cdb4dd378f2e5a9a12
Stub to be used for driving directly by rack, mainly for testing. Not for real use.
[ { "docid": "43aceadffb1b23f7c27f852c69e9f62b", "score": "0.542828", "text": "def call(env)\n\trequest = Rack::Request.new(env)\n\tresponse = Rack::Response.new\n\tprocess(request, response)\n\t[response.status, response.headers, response.body]\n end", "title": "" } ]
[ { "docid": "9857d13489cefc6e459eb86adc3dc4da", "score": "0.6944175", "text": "def new_stub_for method_name\n response = Response.new(Http::Request.new, Http::Response.new)\n response.request_type = method_name\n response.request_options = {}\n send(\"simulate_#{method_name}_r...
e561e11bcf379ef5dc139c210017366b
Only allow a list of trusted parameters through.
[ { "docid": "568484fc0f465098cadbbbfad7c3887f", "score": "0.0", "text": "def collectible_params\n params.require(:collectible).permit(:island_collection_id)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.7477011", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "36956168ba2889cff7bf17d9f1db41b8", "score": "0.716907", "text": "def set_param_whitelist(*param_list)\n self.param_whitelist = ...
c6773a30f807ed2e045d31c3d2ca72d2
========================================= THIS METHOD'S FUNCTIONS ARE NOW REDUNDANT
[ { "docid": "a1369905980fe3205cdb7140d82df228", "score": "0.0", "text": "def get_latest_trends_timing\n # Trolls the db looking for most recent trending events for the country upon which the method is called; returns the time of last seed.\n return LocalTrendingEvent.where(country_id: self.id).orde...
[ { "docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1", "score": "0.75775176", "text": "def private; end", "title": "" }, { "docid": "0b8b7b9666e4ed32bfd448198778e4e9", "score": "0.6824822", "text": "def probers; end", "title": "" }, { "docid": "65ffca17e416f77c52ce148aeafbd826", ...
a5dc1ad1bb5610d4cff8f92c6cc72c8c
Configure a AI VMware Fusion VM
[ { "docid": "67a67b42f2ec3cd4e80819662a7f2c17", "score": "0.76439714", "text": "def configure_ai_fusion_vm(client_name,client_mac,client_arch,client_os,client_rel)\n client_os=\"solaris11-64\"\n configure_fusion_vm(client_name,client_mac,client_os)\n return\nend", "title": "" } ]
[ { "docid": "99cb081834c2a92d3a130d5bf50ced94", "score": "0.79207224", "text": "def configure_vs_fusion_vm(client_name,client_mac,client_arch,client_os,client_rel)\n client_os = \"vmkernel5\"\n configure_fusion_vm(client_name,client_mac,client_os)\n return\nend", "title": "" }, { "docid": ...
69f3f04eff3fd9a489c84b458b307c43
Look up the generator class. Require its class file, find the class in ObjectSpace, tag it with this spec, and return.
[ { "docid": "9075a23a4585eef43ffcb4cf682635ee", "score": "0.6124462", "text": "def klass\n unless @klass\n require class_file\n @klass = lookup_class\n @klass.spec = self\n end\n @klass\n end", "title": "" } ]
[ { "docid": "5af457cf2987041bb72631db7992b008", "score": "0.7158751", "text": "def lookup_class\n ObjectSpace.each_object(Class) do |obj|\n return obj if obj.ancestors.include?(Rails::Generator::Base) and\n obj.name.split('::').last == class_name\n en...
c8e725682ab7f2f6525d33d730ee4717
When `:button` is `true`, this is what is rendered
[ { "docid": "152adecd5684d17ea94e3a4346ede348", "score": "0.7274419", "text": "def render_button\n NfgUi::Components::Elements::Button.new({ **integrated_slat_action_button_component_options, body: (block_given? ? yield : body) }, view_context).render\n end", "title": "" } ]
[ { "docid": "139c0617c9c46d04757abf04ee7c1d87", "score": "0.75077546", "text": "def button\n options.fetch(:button, false)\n end", "title": "" }, { "docid": "7e4e87c556d2ce000cf60ec9e7d99a1e", "score": "0.7147351", "text": "def button?\n\t\tcan_button? and show_but...