query_id
stringlengths
32
32
query
stringlengths
7
6.75k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
28c52a212ba9461202c7a0a208009b8d
PUT /relationships/1 PUT /relationships/1.json
[ { "docid": "e1a4bb10514dc0b93cc7f43eceb1e720", "score": "0.65155333", "text": "def update\n @relationship = Relationship.find(params[:id])\n\n respond_to do |format|\n if @relationship.update_attributes(params[:relationship])\n format.html { redirect_to @relationship, notice: 'Relation...
[ { "docid": "57fbdbc436cfcfc44f54cfb39ba79b13", "score": "0.7212586", "text": "def update\n relationship = Relationships.find(params[:id])\n if relationship.update(relationship_params)\n render json: relationship, status: 200\n else\n render json: { errors: relationship.errors }, statu...
a67a41c4f627ec78111b383e7d780bc9
PATCH/PUT /costs/1 PATCH/PUT /costs/1.json
[ { "docid": "475504b701908d13f00d2748bc471afe", "score": "0.64176464", "text": "def update\n respond_to do |format|\n if @cost.update(cost_params)\n format.html { redirect_to @cost, notice: 'Le coût a été mis à jour.' }\n format.json { render :show, status: :ok, location: @cost }\n ...
[ { "docid": "de85f4fb1d61987f1b381edfec4fcea7", "score": "0.70187044", "text": "def update\n @costs_of_bitcoin = CostsOfBitcoin.find(params[:id])\n\n respond_to do |format|\n if @costs_of_bitcoin.update_attributes(params[:costs_of_bitcoin])\n format.html { redirect_to @costs_of_bitcoin,...
cd542b0394ae1082f5a5108e92eb89c4
POST /vehicle_repair_details POST /vehicle_repair_details.xml
[ { "docid": "2d5a3e73dfd9b955f80f32d8639314ba", "score": "0.70772755", "text": "def create\n @vehicle_repair_detail = VehicleRepairDetail.new(params[:vehicle_repair_detail])\n\n respond_to do |format|\n if @vehicle_repair_detail.save\n format.html { redirect_to(@vehicle_repair_detail, :...
[ { "docid": "4bb880a1f7864638e1f3dc3e5b6fa493", "score": "0.6506005", "text": "def new\n @vehicle_repair_detail = VehicleRepairDetail.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @vehicle_repair_detail }\n end\n end", "title": "" }, ...
af380b8e8f48fc92184a618414a7e5b7
If parent is an AssetGroup then delegate writing to the parent If parent is an AssetDir then just write the yaml to realpath
[ { "docid": "a9f370725eafa805b9408b51754a6c30", "score": "0.77291006", "text": "def write_yaml\n if parent.type.eql?('Node::AssetGroup')\n parent.write_yaml(owner)\n else\n super\n end\n end", "title": "" } ]
[ { "docid": "fe873c544dc4e2d9da0da9667be839df", "score": "0.67508566", "text": "def write(&block)\n parent.mkdirs\n open('w', &block)\n end", "title": "" }, { "docid": "889eb47f9c3b98590ddc36bdd11b6c99", "score": "0.66475517", "text": "def write(&block)\n parent.mkdirs\n ...
0ced9181893b4085f149ef6ec912e47b
Price of a product line with its eventual options
[ { "docid": "d0064ee233c248ac4a3aed3734faaece", "score": "0.74228734", "text": "def price\n product = Product.find( product_id )\n tmp_price = product.public_price\n for option in @options\n optval = OptionValue.find( option['value_id'] )\n qty = option['qty']\n qty = 1 if (qty.ni...
[ { "docid": "32455a0d22b5dbc228b2e6b553c2a10a", "score": "0.75268984", "text": "def total_price\n \tproduct.price * quantity #this calculates the total price of each line_item\n end", "title": "" }, { "docid": "89ee66eaed99a81dd0ad4e910f33bcbf", "score": "0.73533684", "text": "def p...
529e385d9f622c170f2113bbbd710563
Sets the position of the object at the specified time to the specified value. This method should be called every tick, before the position method is used.
[ { "docid": "107f0ad6cd5bcf3a1703b64cc1dd601a", "score": "0.6179689", "text": "def update_position(location,time)\n @position[time] = location\n @position.delete(@position.keys.min) if @position.size > BUFFER_SIZE\n return nil\n end", "title": "" } ]
[ { "docid": "b97e73da0216add4066932231255e142", "score": "0.7501556", "text": "def position=(time)\n raise(ArgumentError,\"'time' argument cannot be nil\") if time.nil?\n raise(ArgumentError,\"'time' argument shuld be an integer value\") unless time.is_a?(Integer)\n raise(ArgumentError,\"'...
7c49e92d5da3dbffae2fe5bcfc5e53df
In case of lease return back_office expecting flpt type as buyer and seller
[ { "docid": "1c5ae65deb1a379c08d8ffdd9cd58590", "score": "0.5976938", "text": "def flpt_type\n case @party_type\n when 'TENANT'\n 'BUYER'\n when 'LANDLORD'\n 'SELLER'\n else\n @party_type\n end\n end", "title": "" } ]
[ { "docid": "fc884a56ed9f7510762d5c307d131dc0", "score": "0.62590057", "text": "def selected_type\n buyer_pickup? ? \"Pick Up Date\" : \"Delivery Date\"\n end", "title": "" }, { "docid": "27f47b900f13feacda9a86cdeef37bd3", "score": "0.60713345", "text": "def buyer\n starter\n ...
5fe31d5ccff7882b1937ca29c465840b
default value on argument
[ { "docid": "fcdedfc80d320e93a11ad9fca9c98579", "score": "0.0", "text": "def welcome(greet, name, punct='@')\n greet + ' ' + name + punct\nend", "title": "" } ]
[ { "docid": "14bc48d7a270bf47ba283a1a39a2024b", "score": "0.84882504", "text": "def default=(_arg0); end", "title": "" }, { "docid": "14bc48d7a270bf47ba283a1a39a2024b", "score": "0.84882504", "text": "def default=(_arg0); end", "title": "" }, { "docid": "14bc48d7a270bf47ba...
b501984c4c10b5ae29a44355b61ccf93
Helper to a hard exit, mainly for testing.
[ { "docid": "d95e607b6332c765c8e0747b41bdcae5", "score": "0.68648386", "text": "def exit(status)\n Kernel.exit(status)\n end", "title": "" } ]
[ { "docid": "e7c3e5143c3687c2284f8b53ac1b827b", "score": "0.8203289", "text": "def exit; end", "title": "" }, { "docid": "96d3a11dbab6c4d068247c27d2c85a20", "score": "0.807711", "text": "def coolest_exit\n Kernel.exit! 99\n end", "title": "" }, { "docid": "e558...
30aebadb245bc62849ee29fbe63deeab
creates a hash of meta data to populate imagga's info
[ { "docid": "8042a97f745c2e1ad8c0b09b00cea897", "score": "0.6278562", "text": "def imagga_images_info\n self.images.non_installation.collect do |image|\n image_options = { :image_url => image.filename.to_s }\n image_options.merge! pattern: image.pattern.name if image.pattern.present?\n ...
[ { "docid": "c7604b7110cc3e2a0f9d99a977276e68", "score": "0.7539028", "text": "def meta_information\n @meta_hash ||= {}\n end", "title": "" }, { "docid": "6c6c2a04f83bf15c8874f5655451ee8c", "score": "0.73177975", "text": "def generate_metadata\n data = Hash.new\n dat...
c5a896ef6595c5a2008aab89c98ac035
If +text+ is longer than +length+, +text+ will be truncated to the length of +length+ (defaults to 30) and the last characters will be replaced with the +truncate_string+ (defaults to "..."). ==== Examples truncate("Once upon a time in a world far far away", 14) => Once upon a... truncate("Once upon a time in a world f...
[ { "docid": "b597adc3caac10c72469fbf3508c505c", "score": "0.8933702", "text": "def truncate(text, length = 30, truncate_string = \"...\")\n if text.nil? then return end\n l = length - truncate_string.chars.length\n (text.chars.length > length ? text.chars[0...l] + truncate_string : t...
[ { "docid": "1693f574eae6cbd938ef885ed5f8186b", "score": "0.879933", "text": "def truncate(text, length = 30, truncate_string = \"...\")\n if text.nil? then return end\n if text.length > length then text[0..(length - 3)] + truncate_string else text end\n end", "title": "" }, { ...
c74b2fe0f5f84239b20fe003f82cd073
Selects the Rule candidates that have the most matches of a given type against the given examples. e.g. select_best_by_match_type(:early, :perfect) will select the rules that have the most matches that are early or perfect.
[ { "docid": "3b2b8e5570f74dfd60f28ca4a7b7c557", "score": "0.63231814", "text": "def refine_by_match_type(*match_types)\n Log.debug \"Refining by match types #{match_types.inspect}\"\n return @candidates if @candidates.size==1\n @candidates = highest_scoring_by do |rule|\n rule_score...
[ { "docid": "b4403c9db0bf3c1bee71e0c48ca68009", "score": "0.58787787", "text": "def must_match(example, *types)\n Log.debug \"Removing candidates that don't match the given example\"\n before_num=@candidates.size\n @candidates=@candidates.select {|rule| rule.matches(example, *types)}\n ...
95bd13548c1ee6bdf0c4236ebcb30972
Returns true if this instanciated object is valid
[ { "docid": "bd26cd74eb7eca36ffa0a28b35d30438", "score": "0.0", "text": "def valid?\n validator = ShopperValidator.new\n validator.valid?(self)\n end", "title": "" } ]
[ { "docid": "7052c0036facae7492c10b9f00badf2e", "score": "0.84552956", "text": "def valid?\n @object.validate! rescue false\n end", "title": "" }, { "docid": "42ffb473798f678286285a0f67852d21", "score": "0.835547", "text": "def valid?\n @valid\n end", "title": ...
5aa6954667dd7842f5103851505fcc93
Creates an attachment from a specific repeating invoices by file name
[ { "docid": "c3bf4aea8f40c81ac91d28ee3f73697b", "score": "0.67223316", "text": "def create_repeating_invoice_attachment_by_file_name_with_http_info(xero_tenant_id, repeating_invoice_id, file_name, body, options = {})\n opts = options.dup\n if @api_client.config.debugging\n @api_client.co...
[ { "docid": "4e5af81442d3efd29fd71d9892411864", "score": "0.71174264", "text": "def create_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body, opts = {})\n data, _status_code, _headers = create_repeating_invoice_attachment_by_file_name_with_http_info(xero...
e590d420b6126635b6c3815bedcecd6a
filter records using inequalities, pattern matching, ranges, and boolean logic
[ { "docid": "57d8c2f1b49e2da8254ee5aa40ae1d20", "score": "0.0", "text": "def query_filter(query, table, parameters = {})\n\tquery = \"select #{query} from #{table}\"\n\tif !parameters.empty?\n\t\tquery += \"where\"\n\t\t#if arguments are given, we append them to the query. This method may\n\t\t#not work ...
[ { "docid": "e8e7b7cf85c91aee2e6e060b3f50196c", "score": "0.63808846", "text": "def filter(values); end", "title": "" }, { "docid": "e8e7b7cf85c91aee2e6e060b3f50196c", "score": "0.63808846", "text": "def filter(values); end", "title": "" }, { "docid": "e8e7b7cf85c91aee2e6e...
4201156b503650bd88b4f05d43b730a8
copied from successful_authorization_response not sure if this is the correct format
[ { "docid": "9263a5d0eda8d362264a1635fd47b20a", "score": "0.62155753", "text": "def successful_prior_auth_capture_response\n '$1$,$1$,$1$,$This transaction has been approved.$,$advE7f$,$Y$,$508141794$,$5b3fe66005f3da0ebe51$,$$,$1.00$,$CC$,$auth_only$,$$,$Longbob$,$Longsen$,$$,$$,$$,$$,$$,$$,$$,$$,$$,$...
[ { "docid": "487142cbf9ed54401f096c8c1bda876d", "score": "0.73405117", "text": "def successful_authorization_response\n 'response=1&responsetext=SUCCESS&authcode=123456&transactionid=1355694937&avsresponse=Y&cvvresponse=M&orderid=&type=auth&response_code=100'\n end", "title": "" }, { "doc...
3948466ee4d26e180b11c1561ad678aa
This is set on top of the column headers in a list table
[ { "docid": "2d75fc51fc7aefc95d0eca2a2563570a", "score": "0.0", "text": "def pagination_row(options={})\n # switch between the pagination and a non-breaking space:\n content = @collection.total_pages > 1 ? will_paginate(@collection) : '&nbsp;'\n \"<tr>\n <th style='text-align:right;' class=...
[ { "docid": "a67c1cdcf86bdc451080ffae031640e3", "score": "0.74432343", "text": "def table_header; end", "title": "" }, { "docid": "85dea654f409a14dbe75fe82cc2f3751", "score": "0.73110414", "text": "def header_cells; end", "title": "" }, { "docid": "85dea654f409a14dbe75fe82...
67af5486188103b0803468229c4cb94d
POST /resolutions_types POST /resolutions_types.json
[ { "docid": "5bddb13558239fdfdfda41e06e93180e", "score": "0.69404674", "text": "def create\r\n @resolutions_type = ResolutionsType.new(resolutions_type_params)\r\n\r\n respond_to do |format|\r\n if @resolutions_type.save\r\n format.html { redirect_to @resolutions_type, notice: 'Tipo de ...
[ { "docid": "acc0bdf2a8892d508b7eb320ee90132a", "score": "0.6932495", "text": "def set_resolutions_type\r\n @resolutions_type = ResolutionsType.find(params[:id])\r\n end", "title": "" }, { "docid": "b783b61832a3fec22401643213f4b8b9", "score": "0.685622", "text": "def resolutio...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "e811e556d2b0fb38ac06811861c514de", "score": "0.0", "text": "def set_settingsmtp\n @settingsmtp = Settingsmtp.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...
032e7b697a433fb0b9baded270327acb
Array of contact types
[ { "docid": "5616f2ffa2d5c78de76b147686cbed6f", "score": "0.7214865", "text": "def complete_contact_types\n contact_types.keys << COUNTY_COUNTRY_COORDINATORS\n end", "title": "" } ]
[ { "docid": "9ae9a4b8ea4f9abb8281c80ba4762064", "score": "0.75550824", "text": "def types\n types = JSON.parse(connection.get(\"/Contact/Types\").body )\n end", "title": "" }, { "docid": "0b8ce6ac747e5cd119adef9a31cb81b9", "score": "0.74261385", "text": "def ...
5edbdab701872a4750b6414118228dc8
Matches an HTML document with whatever string is given
[ { "docid": "cda7f4a4fdd1c5a5eef32cde7d6bcf62", "score": "0.0", "text": "def contain(*args)\n HaveTag.new(*args)\n end", "title": "" } ]
[ { "docid": "085204b8ac9064d8fb9de431876ed3dd", "score": "0.68608767", "text": "def detect_html(str); end", "title": "" }, { "docid": "085204b8ac9064d8fb9de431876ed3dd", "score": "0.68608767", "text": "def detect_html(str); end", "title": "" }, { "docid": "494ff98d2e8489cd...
495459175a283f971aafb10ff61a907e
get 'users/:id/edit' => 'usersedit'
[ { "docid": "dff8a61d4a357009096404b209b51f08", "score": "0.77235955", "text": "def edit\n @user = User.find(params[:id])\nend", "title": "" } ]
[ { "docid": "649a14ec2096506edd86316702ce2569", "score": "0.7957348", "text": "def edit\n @user = User.find(params[:id])\n render \"edit\"\n end", "title": "" }, { "docid": "595e02f06170e3b7197852c5253b09e8", "score": "0.79246753", "text": "def edit\n # @user = User.find(par...
0a76c8c35e692f4e63f12ca205434aa2
display_help This function loads the database file and adds the information into an array
[ { "docid": "eb19d62f9d40b33bf6987035dc6d0707", "score": "0.5639693", "text": "def load_database_file\n\tbegin # try to load the file\n\t\t# open the file and create an array to hold it\n\t\tdatabase_file = File.open($database_filename)\n\t\tdatabase_contents = Array.new{Array.new}\n\t\ti = 0\n\t\t# add ...
[ { "docid": "e3f87093f712396c5e8dd6b4870f46f1", "score": "0.65525526", "text": "def load_help_information\n end", "title": "" }, { "docid": "e3f87093f712396c5e8dd6b4870f46f1", "score": "0.65525526", "text": "def load_help_information\n end", "title": "" }, { "docid": "4e...
f04ed10bb4ea0a3110316bb0fdf88b6a
GET /sessions GET /sessions.xml
[ { "docid": "33f6e5d30e10396ea8b35a8b26aaac06", "score": "0.0", "text": "def index\n @sessions = @world.sessions.playing\n end", "title": "" } ]
[ { "docid": "c866b3e73f9a6ae4b8cf5b79e7c9a6af", "score": "0.7440683", "text": "def get_all_sessions\n response = @http.get(\"getAllSessions\")\n msg response, Logger::DEBUG\n return response\n end", "title": "" }, { "docid": "fb236abd1aeb842d71911477bc54e96e", "score": "0.740546...
b7dd7345a29207727c85169721abc626
output to terminal screen in future version can make some smart formatting etc
[ { "docid": "8989df28f453da45620c63094c5235c2", "score": "0.0", "text": "def log(what)\r\n puts what\r\n end", "title": "" } ]
[ { "docid": "320f45a0d08d27563f5be92f1ee939c3", "score": "0.75475115", "text": "def print_screen()\n processes = get_processes()\n\n lines = []\n sep = [\n \"\",\n \" * * * \",\n \"\",\n ]\n\n lines << \"Summary per output\"\n lines.concat(processes.map do |user, (path, pids)|\n \" %...
c9d573e19a02e31d02f2b31d6ef188b8
Is this file likely to result in a creative commons false positive?
[ { "docid": "1463e0b39b39ba6851666b48e1473bc7", "score": "0.6449465", "text": "def potential_false_positive?\n content.strip =~ CC_FALSE_POSITIVE_REGEX\n end", "title": "" } ]
[ { "docid": "2ab3c67760260c12ccc6778173ddbbb3", "score": "0.65731657", "text": "def test_not_file_type\n ver = Verifier.new\n refute_equal(ver.read_file(ARGV[0]),false)\n end", "title": "" }, { "docid": "b902588ac399e40d828e0b8efa3836f3", "score": "0.65045327", "text": "def pro...
78d51af43bd2b5ab4007b7a8c25e826b
GET /family_types/1 GET /family_types/1.json
[ { "docid": "f6c10b364e9a33e1eeb73ecfe9890132", "score": "0.711383", "text": "def show\n @family_type = FamilyType.find(params[:id])\n\n #Get the accounts that match this family type\n @accounts = Account.where('family_type_id = '+params[:id]+'')\n\n respond_to do |format|\n format.html ...
[ { "docid": "d17b1330a634ae2416f4e63867b19beb", "score": "0.69050086", "text": "def index\n @family_types = FamilyType.all\n end", "title": "" }, { "docid": "df2e9382f192d8ff4a8cd1f45c988f44", "score": "0.67855656", "text": "def show\n @family = load_family\n\n respond_to do...
a28e478681ac9d29c5dd796aa824781d
PATCH/PUT /users/1 PATCH/PUT /users/1.json
[ { "docid": "d804123d4d4990a5d54da0bfe736241b", "score": "0.0", "text": "def update\n if @user == @current_user\n redirect_path = user_path(@user)\n else\n lastname_letter = @user.last_name[0]\n redirect_path = users_path(letter: lastname_letter)\n end\n authorize_user\n res...
[ { "docid": "23a904e6ddd4b6b07c4b53353e78cf93", "score": "0.72253686", "text": "def update\n render json: User.update(params[\"id\"], params[\"user\"])\n end", "title": "" }, { "docid": "4781fa7337315133553edb54194e6202", "score": "0.7128914", "text": "def update\n render json:...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "34f76c84e57760032e57f6fa91a7402d", "score": "0.0", "text": "def institucion_params\n params.require(:institucion).permit(:nombre, :siglas)\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...
1e5ab4e1c67fe6d90182fb07a3ad6fa8
This field returns the number of employees at the location specified above.
[ { "docid": "d834d1a2773f3ff2f900e49666b77f8f", "score": "0.57502306", "text": "def employee_size\n self.class.parent.normalize_result_value(result.reverseLookupByPhoneNumberResult.serviceResult.employeeSize) if result && result.reverseLookupByPhoneNumberResult.serviceResult.methods.include?('employee...
[ { "docid": "d1be992a719fb8ffc7fb98925fa08dcb", "score": "0.7093629", "text": "def employee_count(search_position)\n number_of_people_with_position = @employee.count { |person| person.position == search_position }\n end", "title": "" }, { "docid": "3f7d1f46dc474a65dced7226245a02d6", "...
d9223640a86355f706999d235459bda6
The naming mode for serializing attributes to JSON.
[ { "docid": "80afe9708780d86d742ed191bc67f29a", "score": "0.7429123", "text": "def attribute_render_naming\n JSON_ATTRIBUTE_RENDER_NAMING\n end", "title": "" } ]
[ { "docid": "ae98f4835a345be63a8e223bb8c2c1bc", "score": "0.68670267", "text": "def attribute_parse_naming\n JSON_ATTRIBUTE_PARSE_NAMING\n end", "title": "" }, { "docid": "bcfa15fbc55401d2405036df587cb36e", "score": "0.6834062", "text": "def attribute_render_naming\n OBJ_ATTRIB...
22cf754648f6cc6cfa18897adcddabe0
Returns a string that specifies the target repo.
[ { "docid": "28af36ca06523b8bf988cfbf13069b7a", "score": "0.7577271", "text": "def target_repo\n # TODO: Enable possibility to manually override this and set arbitrary repositories.\n source_repo\n end", "title": "" } ]
[ { "docid": "92adb983234ad5a55a28f18c7cf5a9e6", "score": "0.751274", "text": "def target\n \"#{target_repo}/#{target_branch}\"\n end", "title": "" }, { "docid": "248c9af735d03d94de5c9c03b1e95e47", "score": "0.7332409", "text": "def target_repo_value\n @target_repo_url ||= value...
971fae99e92d119a2dfb418b855e6abd
POST /projects POST /projects.xml
[ { "docid": "3c7af02a34d90e34047145c25e4d7320", "score": "0.0", "text": "def create\n if params[:file]\n upload_project_csv(params[:file][:file])\n else\n add_project(params[:project])\n end\n end", "title": "" } ]
[ { "docid": "a3e0e91e8696656e45fd93fd2f5a4826", "score": "0.74479765", "text": "def create_project\n @user = User.find_by_username(session['user'])\n @access_token = OAuth::AccessToken.new(UsersController.consumer, @user.token, @user.secret)\n @response = UsersController.consumer.request(:post, ...
1da27fe590d2b5f5fa8f3a861350e798
Handle a command (first argument)
[ { "docid": "ed5d71f49d58cccd4c4e56093e907d9e", "score": "0.6948355", "text": "def command!(*args)\n return if @stop\n args = @args if args.empty?\n return help if args.empty?\n return send(args.shift, *args) if @commands.include?(args.first)\n err.puts \"Unknown comman...
[ { "docid": "8a8e6d8bee2a8ead6de67e4ce127b793", "score": "0.7906776", "text": "def handle(command)\n # the command manager will deal with validating and\n # returning the requested output\n CommandManager.send(*command.strip.split)\n end", "title": "" }, { "docid": "6ce91fea...
295e431091c1afe9a5a0d1c8188b83aa
Use callbacks to share common setup or constraints between actions. Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "7846745bd9fdb469dd01eccb1ec595d5", "score": "0.0", "text": "def data_keagamaan_katolik_params\n params.require(:data_keagamaan_katolik).permit(:judul, :keterangan, :tautan, :user_id)\n end", "title": "" } ]
[ { "docid": "3db61e749c16d53a52f73ba0492108e9", "score": "0.6089007", "text": "def action_hook; end", "title": "" }, { "docid": "bd89022716e537628dd314fd23858181", "score": "0.6079685", "text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n ...
a7a817661c0faa5c863dfc7d8fa829b2
Returns the string representation of the object
[ { "docid": "a408df9f3be79d7c20500741a990725c", "score": "0.0", "text": "def to_s\n to_hash.to_s\n end", "title": "" } ]
[ { "docid": "e0c61d22481a9b8a23b7a0620c2b5f87", "score": "0.901024", "text": "def to_s\n @object.to_s\n end", "title": "" }, { "docid": "fc45164ab937a7dc1e465646a36f565c", "score": "0.89506465", "text": "def to_s\n object.to_s\n end", "title": "" }, { "doci...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "4a89f9e6c5e050daa07649278ad004c5", "score": "0.0", "text": "def set_shop_request\n @shop_request = current_user.shop_requests.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;...
f2dbc7fe8a549d15fbffe26fe4a37628
overrides method in standard scraper
[ { "docid": "8ba9462e42fe847905908b2d1c4ecb96", "score": "0.0", "text": "def update_with_results(res, obj=nil, options={})\n unless res.blank?\n obj.attributes = res.first\n options[:save_results] ? obj.save : obj.valid?\n results << obj\n end\n end", "title": "" } ]
[ { "docid": "17567fcee68c4d169100a5adcd8a4232", "score": "0.7489807", "text": "def scrape(url)\r\n end", "title": "" }, { "docid": "115c66bd365d61c58703ecd06d2f295f", "score": "0.71391255", "text": "def scrape\n pull_results\n end", "title": "" }, { "docid": "1111abc9...
6c93e75abeaf1ee77f74cc55944e8c1f
TODO: separator between the media/source_media_other and source_type should be |
[ { "docid": "4e972d5097f2ae5de551267aff2de2c0", "score": "0.7672714", "text": "def format_source_media_types(media_type, key)\n return \"\" if media_type.blank?\n\n if key.match(\"media\")\n humanize_token_direct(\"source_media\",media_type)\n elsif key.match(\"type\")\n humanize_token...
[ { "docid": "4ee14fdb166eea0938b5687563539b68", "score": "0.6253502", "text": "def media_type; end", "title": "" }, { "docid": "4ee14fdb166eea0938b5687563539b68", "score": "0.6253502", "text": "def media_type; end", "title": "" }, { "docid": "4ee14fdb166eea0938b5687563539b...
79d8db7e30cd1a934c52ff30526242ea
Creates a session for a users
[ { "docid": "22db77a2fa14b434621fed28f0d9ffcc", "score": "0.0", "text": "def login user\n session[:user_id] = user.id\n end", "title": "" } ]
[ { "docid": "f6c582748271877c1e728a5800e2e2ba", "score": "0.80047446", "text": "def create_user_session\n\n # Set up the user's session\n\n # placeholder\n\n end", "title": "" }, { "docid": "0740ec3fb87ca78b6e54453beeb082e2", "score": "0.7586164", "text": "def create_session\n ...
55ec1259e1ab0ed7a77a19702bdff8c8
Tests whether an object can be called as a constructor.
[ { "docid": "276a4cfbedd9c1f4dec04b3feb189c38", "score": "0.7820689", "text": "def is_constructor(ctx,object)\n JS::Lib.JSObjectIsConstructor(ctx,object)\n end", "title": "" } ]
[ { "docid": "e47d1e6148d9882b409d7ee42b4dbf3d", "score": "0.7289741", "text": "def is_constructor()\n res = super(context,self)\n return res\n end", "title": "" }, { "docid": "833672e09986a902b7ee752c6cabfd67", "score": "0.7048497", "text": "def is_instance_of_constructor...
4c7a76e375fe12f6370f387f2813fe9a
Generate and store the individual hex grid tile objects. Default: 1, 0, 1 y indices 3 to 4 x for row y=1 4 to 4 x for row y=0 4 to 3 x for row y=1
[ { "docid": "43452d2392d282713d2e3e124f6858f6", "score": "0.8084536", "text": "def create_tiles\n # Contain the grid in a hash with int keys to put the origin (0,0) in the\n # grid center and allow for \"negative indices\" relative to the origin.\n @grid = {}\n @tilelist = []\n @grid_arrow...
[ { "docid": "6b2635fe5f8eae7b320f77ce35d31a80", "score": "0.7606158", "text": "def gen_tiles\n @grid.each_with_index do |row, row_id|\n row.each_with_index do |tile, col_id|\n value = count_bombs([row_id, col_id])\n @grid[row_id][col_id] = Tile.new(false, v...
18457c1d1f76a77dc5b0981b1dd7b5d8
Turns off the method checking functionality
[ { "docid": "a7ed444ee746391415878dd0f97cff35", "score": "0.8224801", "text": "def disable_method_checking!\n Thread.current[:'method checking disabled'] = true\n end", "title": "" } ]
[ { "docid": "fe0577fb1b2e2c4e43b0676d2ec0a91f", "score": "0.77151483", "text": "def without_method_checks\n @skip_method_checking = true\n yield\n @skip_method_checking = false\n end", "title": "" }, { "docid": "23c6008ef277cb4520f1a76db42615b0", "score": "0.7196...
f8ecf3ebe915b02148174496f091de47
Adds a leading allocated range for the id of 0. If the range is then adjoining with the next, the two will be joined.
[ { "docid": "4c58493ab0aabc021671189bf90dcc1c", "score": "0.844708", "text": "def add_leading_range\n @allocated_ranges.prepend((0..0))\n try_to_join_leading_ranges\n 0\n end", "title": "" } ]
[ { "docid": "2bc55e17cb0e0172c7bcd3720ab12ead", "score": "0.8316982", "text": "def extend_leading_range\n id = @allocated_ranges[0].last.succ\n @allocated_ranges[0] = (@allocated_ranges[0].first..@allocated_ranges[0].last.succ)\n try_to_join_leading_ranges\n id\n end", "title":...
69b0f412cd6f9b49c2e8f0c3c679690b
Iterate over all saved items
[ { "docid": "7e1fe36d1cd17589da36096fb5c0c9ba", "score": "0.0", "text": "def each\n all.each do |el|\n yield el\n end\n end", "title": "" } ]
[ { "docid": "d2b9d9833faff7316d7344ac9fd47070", "score": "0.629149", "text": "def each\n\t\t\t@order.each { |key|\n\t\t\t\tyield(key, @storage[key]) if @storage.key?(key)\n\t\t\t}\n\t\tend", "title": "" }, { "docid": "c2c5f964cd3eb5d6417152ad4da18372", "score": "0.62240475", "text": "...
b1ac6d75989affedbc15ff613b073ba8
PATCH/PUT /choose_electrical_subjects/1 PATCH/PUT /choose_electrical_subjects/1.json
[ { "docid": "575d2b16c76958387e9e0fdc3f578356", "score": "0.75746787", "text": "def update\n respond_to do |format|\n if @choose_electrical_subject.update(choose_electrical_subject_params)\n format.html { redirect_to @choose_electrical_subject, notice: 'Choose electrical subject was succes...
[ { "docid": "c5d779fb2292e86d0c8ee06f18c7b3fb", "score": "0.7313087", "text": "def update\n respond_to do |format|\n if @electrical_subject.update(electrical_subject_params)\n format.html { redirect_to admin_electrical_subjects_path, notice: 'Electrical subject was successfully updated.' }...
12427268aec55913dd01e3a9a0768fd8
Get the materialization store instance, defaulting to a RamMaterializationStore.
[ { "docid": "1460861d413f6c33b35f8c4ca284b297", "score": "0.8022889", "text": "def materialization_store\n @materialization_store ||= MaterializationStore::RamMaterializationStore.new\n end", "title": "" } ]
[ { "docid": "a32a537ff1e856969f4de2c0b9c1f21e", "score": "0.6660838", "text": "def store\n if store_key\n Spree::Store.current(store_key)\n else\n Spree::Store.default\n end\n end", "title": "" }, { "docid": "2c74ea0cbd8262e7fb1b107840af12bc", "score": "0.6...
c45775adc5820d4dc71eacba0ef16d2b
Update a NSX Manager account Update a NSX Manager account
[ { "docid": "6b113974730e98c93949e13226ed777d", "score": "0.62799054", "text": "def update_nsx_manager_account_with_http_info(account_id, nsx_manager_account, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: CloudServiceManagerApi.update_nsx_manage...
[ { "docid": "72aa0e79cc7c5b7c9d63ebbbff0de21b", "score": "0.71779776", "text": "def update\n # find and update the account\n end", "title": "" }, { "docid": "34f979dcf7609665123c63c06b45a69a", "score": "0.6684289", "text": "def account_update(args)\n @user = args[:user]\n ...
802d44ab9f43518502fae4287cb83df9
Multiplex enumerables into a single enumerator that yields from all at once as an array, stopping when any enumerable stops iterating.
[ { "docid": "341934995875e46f67f5d88917f7b1bc", "score": "0.7431086", "text": "def multiplex(enumerables)\n Enumerator.new do |yielder|\n loop do\n yielder.yield enumerables.map(&:next)\n end\n end\n end", "title": "" } ]
[ { "docid": "983e966c88e38e306cabb8795ded096b", "score": "0.676978", "text": "def flatten(sequences)\n Enumerator::Chain.new(*sequences).to_a\n end", "title": "" }, { "docid": "3bead1f38c5979520e0c87ba5e1f096b", "score": "0.6641116", "text": "def interleave(*enumerables)\n# Co...
de693bb7a496a543fb1f6032e0f699c3
Returns the URL to the current page including the specified filter.
[ { "docid": "34f64d9981bc76f56088cfd94121cb65", "score": "0.712276", "text": "def url_for_filter(*args)\n filter_params = args.extract_options!\n filter_params = current_filters.merge(filter_params)\n url_for(filter: filter_params)\n end", "title": "" } ]
[ { "docid": "f9c82e1a576b05f6aff9fc873e524c37", "score": "0.66432744", "text": "def getFilteredUrl()\n fullUrl = site.config['WFBaseUrl'] + getJekyllsRelativeUrl()\n fullUrl = fullUrl.sub('index.html', '')\n fullUrl = fullUrl.sub('.html', '')\n\n fullUrl\n end", "title": "" }...
8561572a46af29b7e8753971a78c2e34
DELETE /sales_orders/1 DELETE /sales_orders/1.json
[ { "docid": "25d0ff3095f661110e51648310a5bea9", "score": "0.7141311", "text": "def destroy\n @sales_order.destroy\n respond_to do |format|\n format.html { \n flash[:notice] = 'La orden de venta se eliminó satisfactoriamente.'\n redirect_to sale_orders_path\n }\n format....
[ { "docid": "d95245ee8d8e63ffab2dfbac802158ee", "score": "0.7428313", "text": "def destroy\n delete(\"/orders/#{id}/delete\")\n end", "title": "" }, { "docid": "965c1ebfc569821b7742fc1d1a93bcb1", "score": "0.73251176", "text": "def destroy\n if @sales_order.destroy\n r...
03b83fc919f593b5132032fd1a33328a
Setup up the possible options for getting a collection, with defaults
[ { "docid": "ddd5f49e81ee8c3a1f86af08085c5488", "score": "0.5898484", "text": "def options\n order = params[:order]\n if order == 'name'\n order = 'arcades.name, frequentships_count desc' \n elsif order == 'favorites'\n order = 'frequentships_count desc'\n elsif order == 'games'\n ...
[ { "docid": "89095cebf841916c8aed44e907a8ac73", "score": "0.74480367", "text": "def collection_options(**options)\n initialize_default_collection_opts\n\n options.each do |key, value|\n raise(\"Invalid key passed to collection_options: #{key}\") unless valid_collection_option...
35d759b9e06ffe87376bbab2339f150d
Subject can be set in your I18n file at config/locales/en.yml with the following lookup: en.user_mailer.notify_announcement.subject
[ { "docid": "1497048336616d1f45ddb11102809020", "score": "0.6181296", "text": "def notify_announcement(user, message)\n @user = user\n @message = message\n\n mail to: @user.email#, subject: @message.title\n end", "title": "" } ]
[ { "docid": "8928fe4f050d7ebd3e9aa992b07e320a", "score": "0.7866347", "text": "def subject_for\n ActiveSupport::Deprecation.warn \"subject_for\"\n I18n.t(:\"subject\", scope: [:notifications, :mailer],\n default: [:subject])\n end", "title": "" }, { "docid": "...
00153e9f591f6a15c3c7bfb0f0d0e7a7
return cached value or evaluate instance
[ { "docid": "8ba17b76da220f78a712c51be49d1073", "score": "0.6115308", "text": "def instance_cache_fetch(key)\n key = \"@_cache_#{key}\"\n instance_variable_set(key, yield) unless instance_variable_defined?(key)\n instance_variable_get(key)\n end", "title": "" } ]
[ { "docid": "622cef37bbbcd27c28a8fe9d90085700", "score": "0.6897886", "text": "def get_value\n # If it is evaluated then just return the value.\n if @evaluated\n @value\n # If it is not evaluated then evaluate it, save and return the value.\n else\n @value = @parent.evaluate\n ...
7e574006272cf25ff891116c7350c5ab
caches_action :new, :show, :edit, :send_invoice
[ { "docid": "0afc3d972e6e58f6d8ecd3fb00a50367", "score": "0.0", "text": "def new\n #this quote instance variable is for front end to add the values into the form using JS\n @quote = Quote.find_by(id:params[:quote_id])\n\n if @quote\n @quote_items = @quote.quote_items\n elsif @quote == ni...
[ { "docid": "05230350abcf3a1912308a6312514a39", "score": "0.66699725", "text": "def controller_cache?; false; end", "title": "" }, { "docid": "4720f15f8129aae5d9923d766b8b8b7f", "score": "0.64733654", "text": "def expire_cache\n Book.all.each { |b| expire_action \"show_book_#{...
22168a5d84e81941a29d1091888813fe
GET /luxire_style_master_images GET /luxire_style_master_images.json
[ { "docid": "6bf96895c848c59a3962492a9dd7bc25", "score": "0.79908276", "text": "def index\n @luxire_style_master_images = LuxireStyleMasterImage.all\n end", "title": "" } ]
[ { "docid": "a1625a7933486d7cac0ff9e597f09f70", "score": "0.713266", "text": "def pic \n link = params[\"api_URL\"]\n tail = \"?show-blocks=all&api-key=#{ENV[\"API_KEY\"]}\"\n response = Unirest.get(link + tail)\n @pics = response.body[\"response\"][\"content\"][\"blocks\"][\"main\"][\"elemen...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "bb404066a35a7aaa4cf8905041f087d3", "score": "0.0", "text": "def set_admin_need_help\n @admin_need_help = NeedHelp.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...
1b64a4e2df44e684d66621491830a515
GET /universidads or /universidads.json
[ { "docid": "353e5c687253fa97e55544eac7511862", "score": "0.0", "text": "def index\n if current_user.has_role?(:admin)\n @universidads = Universidad.all\n \n else\n redirect_to root_path, alert: \"No tienes permiso para esta accion\"\n end\n \n end", "title": "" } ]
[ { "docid": "64b85c0376cc0179279af8bc8cccf114", "score": "0.61902505", "text": "def index\n @universes = Universe.page params[:page]\n if params[:page].nil?\n set_pagination_headers(1)\n else\n set_pagination_headers(params[:page])\n end\n render json: @universes\n ...
5d278158e3c0cebc019fce4e798f0ad2
checks whether columns contains field
[ { "docid": "33999f7c8e9ffca6114d41832b44bac0", "score": "0.76047057", "text": "def columns_includes?(field, columns)\n Hash[*(columns.flatten)].keys.include?(field) \n end", "title": "" } ]
[ { "docid": "a01d45ce2e426e3dd813de1f0a0963ac", "score": "0.7907272", "text": "def includes_column?(name); end", "title": "" }, { "docid": "3e2ec01a8e1cd559cf1f1e8aa80c5116", "score": "0.74470353", "text": "def has_column?(name)\r\n end", "title": "" }, { "docid": "f0...
0bfee4168b3280caac9d1eff8033674d
PATCH/PUT /user_references/1 PATCH/PUT /user_references/1.json
[ { "docid": "6818107673eade3cf88598e7a9be6060", "score": "0.69401693", "text": "def update\n respond_to do |format|\n if @user_reference.update(user_reference_params)\n format.html { redirect_to @user_reference, notice: 'User reference was successfully updated.' }\n format.json { re...
[ { "docid": "ccfedcb8357af5d6f0e0f5f434793792", "score": "0.66969997", "text": "def update\n respond_to do |format|\n if @reference_user.update(reference_user_params)\n format.html { redirect_to @reference_user, notice: 'Reference user was successfully updated.' }\n format.json { re...
16f929da21e1fba8bd4ab31048d8fc48
GET /restaurante_users GET /restaurante_users.xml
[ { "docid": "65b9347d2c84b53b22e3b6c8025fedfb", "score": "0.72088456", "text": "def index\n @restaurante_users = RestauranteUser.all\n# @ru = RestauranteUsers.find_by_user_id(current_user.id).restaurante_id\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { rende...
[ { "docid": "81f820aba49ac09ba424a3c44ecb4bf8", "score": "0.75484985", "text": "def account_users \n make_request(:get,\"#{account_url}/users.xml\")\n end", "title": "" }, { "docid": "b04319c0b0841cb36d0f04132f4faf8a", "score": "0.7048825", "text": "def show\n @restaurante_...
0f57bcc72eb0da820d70f38b5f8aaf33
POST /historical_sources POST /historical_sources.json
[ { "docid": "c2168aa227fed0b03c9aff13a0e11898", "score": "0.69152486", "text": "def create\n @historical_source = HistoricalSource.new(historical_source_params)\n\n respond_to do |format|\n if @historical_source.save\n format.html { redirect_to @historical_source, notice: 'Historical so...
[ { "docid": "40342f17a526efb5b0ff1fdd1cc99623", "score": "0.70590115", "text": "def index\n @historical_sources = HistoricalSource.all\n end", "title": "" }, { "docid": "0a941a47edf1b7570964104990e4acea", "score": "0.64427185", "text": "def set_historical_source\n @historical...
7783fa9064a6458a441467b19e09015a
Delete test run tag.
[ { "docid": "7a62d94665ebb498ddf3043477ad9eeb", "score": "0.71904445", "text": "def delete_test_run_tag_using_delete(run_id, tag_id, opts = {})\n delete_test_run_tag_using_delete_with_http_info(run_id, tag_id, opts)\n nil\n end", "title": "" } ]
[ { "docid": "8931643319b867b5e78aa7689f026f0e", "score": "0.7087828", "text": "def delete(tag)\n run_rs_tag_util('--remove', tag)\n end", "title": "" }, { "docid": "2c3b909cfadd8ecae88115d66bb077b5", "score": "0.7080128", "text": "def delete(test_run_id)\n self.class.de...
af630984682f1a0b5a68e6092af0d102
Update properties of this object
[ { "docid": "5692a7d0e212431e83fb692377e19d9c", "score": "0.0", "text": "def update!(**args)\n @next_page_token = args[:next_page_token] if args.key?(:next_page_token)\n @notes = args[:notes] if args.key?(:notes)\n end", "title": "" } ]
[ { "docid": "150fa2bdc1fc43d28ac45e2278a1f797", "score": "0.7012263", "text": "def update_properties(hash)\n hash.each do |key, value|\n setter_method = \"#{key}=\"\n if self.respond_to?(setter_method)\n self.send(setter_method, value)\n end\n end\n end", "t...
1aff64443939aa4d1759def626612158
Gets the top property value. The margin in microns from the top edge.
[ { "docid": "bf1fcf2b35552c35123f62896bf35bf4", "score": "0.6629452", "text": "def top\n return @top\n end", "title": "" } ]
[ { "docid": "546663017c0922a59d14779922fbfcb8", "score": "0.7696681", "text": "def margin_top_actual\n self.margin_top + (@paras.empty?? 0.points : @paras.first.margin_top)\n end", "title": "" }, { "docid": "ae83811b73ec6451b5cadcced5a68db4", "score": "0.75788903", "text": "de...
4623af4dc134e4fb6320736309503f09
GET /Embeddable/open_responses/new GET /Embeddable/open_responses/new.xml
[ { "docid": "2bc46da85c38e4494761c6cea2ec3523", "score": "0.634024", "text": "def new\n @open_response = Embeddable::OpenResponse.new\n if request.xhr?\n render :partial => 'remote_form', :locals => { :open_response => @open_response }\n else\n respond_to do |format|\n format.ht...
[ { "docid": "abbc86e6b5ed457220c721f90f07586a", "score": "0.69099444", "text": "def new\n @resp = Response.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @resp }\n end\n end", "title": "" }, { "docid": "ac8c045efee933df2754423ac5...
87953ba0a62821757c82d9da46b91dd6
Facade to access filename of photo
[ { "docid": "ef855b19fb23c0db3343d0f71ae1cd02", "score": "0.7446807", "text": "def photo_filename\n url = read_attribute(\"photo_url\")\n if ! url.blank?\n url.gsub(/\\/images\\//,\"\")\n else\n \"\"\n end\n end", "title": "" } ]
[ { "docid": "5eff2bb2e48b27606abbacf098599757", "score": "0.7681657", "text": "def photo_filename\n File.join PHOTO_STORE, \"#{id}.#{extension}\"\n end", "title": "" }, { "docid": "5eff2bb2e48b27606abbacf098599757", "score": "0.7681657", "text": "def photo_filename\n File.join ...
88132ed1cce1f940d61b2285290cbcbf
Returns true if the given branch exists name The name of the branch as a String.
[ { "docid": "041dfec8a6ebd3494866fca9917e7ff9", "score": "0.82251877", "text": "def branch_exists?(name)\n rugged.branches.exists?(name)\n\n # If the branch name is invalid (e.g. \".foo\") Rugged will raise an error.\n # Whatever code calls this method shouldn't have to deal with that so...
[ { "docid": "f89df1c30f9e7bca4cb85dcde70bf78d", "score": "0.7758606", "text": "def branch_exists?(branch = branch_name)\n git.capturing.rev_parse({:verify => true, :quiet => true}, \"refs/heads/#{branch}\")\n true\n rescue MiniGit::GitError\n false\n end", "title": "" }, { ...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "85e57599f683f33c39c9afb4b4e9151a", "score": "0.0", "text": "def set_permission_user\n @permission_user = PermissionUser.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...
d56ba3f9d1239a8c0d0c3103a3f118ed
Public Returns a Hash of instance id to Aws::EC2::Types::Instance
[ { "docid": "7c04143c899e4fc953db2ca8ee41fe16", "score": "0.6836967", "text": "def id_instances\n @id_instances ||= Hash[instances.map { |i| [i.instance_id, i] }]\n end", "title": "" } ]
[ { "docid": "cc97319c0ac30719ed643183dddf701b", "score": "0.721287", "text": "def instance_id\n return ec2_meta_data('instance-id')\n end", "title": "" }, { "docid": "1264b7811252a5161a9165157ea8360d", "score": "0.7129201", "text": "def instance_id\n data[:instance_id...
96ada8cb12f64c9b0df2e98fa186b6fa
Creates a new Program object.
[ { "docid": "866960dec3182b8ef058bffb2ac426ce", "score": "0.0", "text": "def initialize(path)\n path = File.expand_path(path)\n\n unless File.file?(path)\n raise(ProgramNotFound,\"program #{path.dump} does not exist\")\n end\n\n @path = path\n @name = File.basename(path)\n...
[ { "docid": "014dca2446ede736389a3dc589780434", "score": "0.85310304", "text": "def new\n @program = Program.new\n end", "title": "" }, { "docid": "e7db7c0bdaff0cac5606440a9353f41c", "score": "0.82837087", "text": "def new\n @program = Program.new\n end", "title": ""...
77b82f0a6386adb988f9989252ea506e
Executes an HTTP DELETE request.
[ { "docid": "6f48b41a2976b67ad9083f962cd586e9", "score": "0.0", "text": "def delete(request, adapter = nil)\n request = Request.new :url => request if request.kind_of? String\n\n with_adapter :delete, request, adapter do |adapter|\n yield adapter.client if block_given?\n adapter.d...
[ { "docid": "ad0c36135de0490ca71e281a94cd49f9", "score": "0.84781146", "text": "def delete\n execute_request('DELETE') do |uri, headers|\n HTTP.http_client.delete(uri, header: headers)\n end\n end", "title": "" }, { "docid": "6bb5b9e2ce5ab901a05a1d618f90ad4d", ...
048302b0a67a18722518ac63e0fb4aa9
Perform a nonbare clone of a git repository.
[ { "docid": "1ac89447c03e499471a81da5f9ba9b5a", "score": "0.7053043", "text": "def clone\n @cache.sync\n\n # We do the clone against the target repo using the `--reference` flag so\n # that doing a normal `git pull` on a directory will work.\n git [\"clone\", \"--reference\", @cache.git_dir, ...
[ { "docid": "47ff43ace9dc519a31a5ed31468a1391", "score": "0.79773843", "text": "def clone_repository\n `cd #{client.config.tmp_folder} && git clone #{client.config.repository_url}.git`\n `cd #{client.config.tmp_folder}/#{client.config.repository_name} && git fetch origin #{client.config.ref_tree} &...
a2099a77c85e91272ae2f9e35b937953
Only allow a trusted parameter "white list" through.
[ { "docid": "ec0749a825beb05cacb9d73dfa6147b4", "score": "0.0", "text": "def points_setting_params\n params[:points_setting]\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.7943618", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "f6060519cb0c56a439976f0c978690db", "score": "0.69572574", "text": "def permitted_params\n params.permit!\n end", "title"...
16263716b649a4397e544b45c9c9634c
GET /import_batches/1 GET /import_batches/1.json
[ { "docid": "718f8ea6d6682c2cd322fd6226f48bf1", "score": "0.6779749", "text": "def show\n @import_batch = ImportBatch.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @import_batch }\n end\n end", "title": "" } ]
[ { "docid": "a491db5befce6148a80aa5a0a34ccf66", "score": "0.6595161", "text": "def create\n @import_batch = ImportBatch.new(params[:import_batch])\n\n respond_to do |format|\n if @import_batch.save\n format.html { redirect_to @import_batch, notice: 'Import batch was successfully created...
2cf7ac0f9a80601e95e323102a40b14c
List Tags for Subnet Returns an array of Tag objects
[ { "docid": "48d0ff9487c9398293494548a5a06bc5", "score": "0.633017", "text": "def list_subnet_tags(id, opts = {})\n data, _status_code, _headers = list_subnet_tags_with_http_info(id, opts)\n data\n end", "title": "" } ]
[ { "docid": "6352dce1681b9c532aed745777ccbebd", "score": "0.7188013", "text": "def tag_list\n tags.map(&:tag)\n end", "title": "" }, { "docid": "73e64aba49097dcac7758a5d4fc4d4e4", "score": "0.7157504", "text": "def list()\n _params = {}\n return @mast...
ffac727d7f054a5b648b580d77f6a29c
allow for creating an array out of a multiline string
[ { "docid": "0e9f8409bbcc97ad7cf3021ba5aba74e", "score": "0.59530985", "text": "def to_multi_list\n self.strip.split(/\\n+/).map{ |a| a.strip }\n end", "title": "" } ]
[ { "docid": "233cce0771d43e86c10e6388ff40b089", "score": "0.717277", "text": "def convert_arr(incoming_text)\n incoming_text.split(\"\\n\")\n end", "title": "" }, { "docid": "3e86cc730ff8965950a0123e9399ea21", "score": "0.7005982", "text": "def get_array_from_text unparsed\n re...
2542d10e78aab3c90de5f01fc8f40490
authenticate user from Authorization in header with exception
[ { "docid": "f749eb825032be698c4b1404bb63c145", "score": "0.0", "text": "def authenticate_user_from_token!\r\n raise AuthorizationError unless http_auth_token.present?\r\n result = find_user\r\n raise BadRequestError, result.errors if result.failure?\r\n @current_user = result...
[ { "docid": "00a2aa46a4673155380c62d2ad887d06", "score": "0.75296116", "text": "def authenticate_user_from_token!\n auth_token = request.headers['Authorization']\n authenticate_error unless authenticate_with_auth_token auth_token\n end", "title": "" }, { "docid": "088fc061b7e348d1b9358...
051cd152c41edb1b5097bda24c2aeadb
GET /payment_increases/1 GET /payment_increases/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "5c843c722a9377dd063fe1a8fd548ed0", "score": "0.70193803", "text": "def index\n @payment_increases = PaymentIncrease.all\n end", "title": "" }, { "docid": "4c1a1775017576cb9129c8e54478e46f", "score": "0.6218287", "text": "def set_payment_increase\n @payment_increa...
1e699f2bc72d5345daa1b0aea64b96ac
attributes must be CAMEL CASE for NIS params
[ { "docid": "3fb67270bdb3f5b4dda78b1cfb5386de", "score": "0.0", "text": "def to_hash\n {\n otherHash: { data: other_hash },\n otherAccount: other_account,\n signer: signer\n }\n end", "title": "" } ]
[ { "docid": "41d7f023ab2d128d5a997ec664617669", "score": "0.69690377", "text": "def ignore_case\n attributes.fetch(:ignoreCase)\n end", "title": "" }, { "docid": "e2c4d04fefd989ac8ab3638b8b79047d", "score": "0.6671308", "text": "def amalgamate_attributes(strs = {}, sym...
9d8110e8c8f7f50827d9e48320a17dda
convert to km per hour
[ { "docid": "ed35d3c14e9aae9707104c0e98874967", "score": "0.0", "text": "def current_wind_speed(t,location)\n\ttag = 'obs-wind obs-wind-spd-kph '\n\ttag += location\n\ttag = t.css(\"td[headers = '#{tag}']\").text\n\tif tag == \"-\"\n\t\treturn nil\n\telse \n\t\treturn mph_to_kmh(tag)\n\tend\nend", "t...
[ { "docid": "08002110de4f6f7cef102186909c085f", "score": "0.7316971", "text": "def to_kilometres_per_hour(velocity)\n return (velocity * 3600) / 1000.0\n end", "title": "" }, { "docid": "dba0fe303e405f7dd13305fde6299ac3", "score": "0.70455134", "text": "def speed_kmh(p)\n speed...
d1ebbeacd895ef527682a300dc6eed6c
Public: Perform the script
[ { "docid": "9294f3c86b089176a6b7d69133448c35", "score": "0.0", "text": "def execute\n GitHub.connect do\n pull_request = GitHub::PullRequest.new(config.github_repo, pull_request_id)\n merge pull_request\n update_changelog pull_request\n end\n rescue GitHub::...
[ { "docid": "cea4a3ca0ca383de9008ae0487f7ef19", "score": "0.83106136", "text": "def execute\n # code for the script goes here\n end", "title": "" }, { "docid": "23e445f57d623916b45d200b73da313d", "score": "0.7574364", "text": "def execute_script(script)\n end", "title...
aa18ea079672a42c83e823b5c8709e9b
GET /asignaciones/1 GET /asignaciones/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "71646aa845cfe2c807867cc691aee5d1", "score": "0.740708", "text": "def index\n @asignaturas = Asignatura.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @asignaturas }\n end\n end", "title": "" }, { "docid": "3d651c2d3b...
0ed2700a0564c321309c51c6bb04e5fb
PATCH/PUT /tinta_sublimacion_productos/1 PATCH/PUT /tinta_sublimacion_productos/1.json
[ { "docid": "73f2eed000256d194a0c7a3b02ac3d1c", "score": "0.717443", "text": "def update\n respond_to do |format|\n if @tinta_sublimacion_producto.update(tinta_sublimacion_producto_params)\n format.html { redirect_to @tinta_sublimacion_producto, notice: 'Tinta sublimacion producto was succ...
[ { "docid": "8e14c90caddf909ba9d888ea0662d66e", "score": "0.6644812", "text": "def update\n respond_to do |format|\n if @papel_sublimacion_producto.update(papel_sublimacion_producto_params)\n format.html { redirect_to @papel_sublimacion_producto, notice: 'Papel sublimacion producto was suc...
5e458cd7e450f86376a6d46aa5bc8137
DELETE /bookingrooms/1 DELETE /bookingrooms/1.json
[ { "docid": "0a5d3ab9d22f2097fbcd4551f0a9b4c2", "score": "0.77592885", "text": "def destroy\n @bookingroom.destroy\n respond_to do |format|\n format.html { redirect_to bookingrooms_url }\n format.json { head :no_content }\n end\n end", "title": "" } ]
[ { "docid": "5cad1d44a6b4d39b8f4c27c0e8fb1f66", "score": "0.7493263", "text": "def destroy\n @restroom.destroy\n respond_to do |format|\n format.html { redirect_to restrooms_url }\n format.json { head :no_content }\n end\n end", "title": "" }, { "docid": "57bf4df4d6fcb742d...
ecdd47260b69d77809040b4f82a9ea42
Forces item to assume the top position in the list.
[ { "docid": "e493564792e012efb98a60eba1e09da1", "score": "0.74292815", "text": "def assume_top_position\n set_my_position(1)\n end", "title": "" } ]
[ { "docid": "b2c27c8daf91bd7e39bc0109934fea6d", "score": "0.84269834", "text": "def assume_top_position\n set_list_position(acts_as_list_top)\n end", "title": "" }, { "docid": "4b4c0ec237f7356a3d42948741398a55", "score": "0.82675207", "text": "def move_to_top\n ...
75a2842586b5eb016ba669b40a154e08
Write data to the socket
[ { "docid": "ec30c36888ee6facba68b679f508d4ff", "score": "0.76832193", "text": "def write(data)\n timeout = false\n loop do\n result = @socket.write_nonblock(data, :exception => false)\n return result unless result == :wait_writable\n\n raise TimeoutError, \"Write...
[ { "docid": "1205fe47135776840f8f7ceffa4a1a07", "score": "0.91509956", "text": "def write(data)\n @socket.write(data)\n end", "title": "" }, { "docid": "30c8a236a4a1af2af12933878ae04a25", "score": "0.90218264", "text": "def write(data)\n @socket << data\n end",...
d21bd0510a0d9f19edd02f5dc856a718
UNTESTED called on Array object; creates duplicate mask array, then assigns needy zeros in the mask; gets the row ids of any rows that lack zeros in the assigned mask; if a row lacks zeros in the mask, creates a new zero in that row in the working matrix by subtracting the minsanszero; returns the modified array it was...
[ { "docid": "7ade3d96e20eaa6ae3dd1924bca9c85c", "score": "0.6880116", "text": "def fix_assignables_in_rows\n\t\t# create duplicate mask array, then assign needy zeros in the mask\n\t\tmask = self.map {|row| row.dup}\n\t\tassign_needy_zeros(mask)\n\n\t\t# throw an error if there is a negative value in the...
[ { "docid": "b7025d8adb373418952012327841d8a6", "score": "0.6866121", "text": "def fix_assignables_in_rows\n\t\t# create duplicate mask array, then assign needy zeros in the mask\n\t\tmask = self.map {|row| row.dup}\n\t\tassign_needy_zeros(mask)\n\n\t\t# throw an error if there is a negative value in the...
472636b109646e1e4f23cbaf20f2d4c2
Returns historical metrics for a specific dependency from a specific date Date format must be YYYYMMDD
[ { "docid": "11a8b67e484452071f4af1860854a10f", "score": "0.5469843", "text": "def get_dependency_metrics_since(project_uuid, component_uuid, date, opts = {})\n data, _status_code, _headers = get_dependency_metrics_since_with_http_info(project_uuid, component_uuid, date, opts)\n data\n end",...
[ { "docid": "108fae2cd752a5b1259831a6a73c5f73", "score": "0.6719542", "text": "def read_history_by_date(date)\n obj = self.send(self_class_name+'_histories').find_first_by_date(date)\n obj.value unless obj.nil?\n end", "title": "" }, { "docid": "4eafcf02ad7e1c76d48a3b...
773565f2cfda1072596916993327d99b
Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
[ { "docid": "35ac5b8e65a264d44aa8f4b81e76157b", "score": "0.7004294", "text": "def recurse_proc(result, &proc)\n case result\n when Array\n result.each { |x| recurse_proc x, &proc }\n proc.call result\n when Hash\n result.each { |x, y| recurse_proc x, &proc; recurse_proc y, &proc ...
[ { "docid": "99d07a17fab5741affd67b345c143a11", "score": "0.70289487", "text": "def recurse_proc(result, &proc)\n case result\n when Array\n result.each { |x| recurse_proc x, &proc }\n proc.call result\n when Hash\n result.each do |x, y|\n recurse_proc x, &pro...
166a503c112821d80d4ba84df3e7b735
PATCH/PUT /units/1 PATCH/PUT /units/1.json
[ { "docid": "55603481a99700a2825df57776789142", "score": "0.6056027", "text": "def update\n respond_to do |format|\n if @unit.update(unit_params)\n format.html { redirect_to units_url, notice: \"#{t(:unit)} #{t(:was_successfully_updated)}\" }\n else\n flash.now[:danger] = \"#{t...
[ { "docid": "d144603e6f3c737c7e1cee9b2167ad48", "score": "0.78405803", "text": "def update\n params.require(%i[id units])\n retrieve_and_validate_put.update!(units: params[:units])\n head :no_content\n end", "title": "" }, { "docid": "39fa38e0d4ccde163ebb6d5413a4a724", "score": ...
561da3384c05f3cd8e71e6e82f27f878
Add summary value to page Have to set TableSettings::Column.summarize_page
[ { "docid": "12ff190e368da2746b5ac162ad72ac3a", "score": "0.71584636", "text": "def summarize_page_value(value)\n @buttons_hash[:summarize_page_value] = value\n\n self\n end", "title": "" } ]
[ { "docid": "90b54693979be61c32712159cde2022b", "score": "0.74125767", "text": "def summarize_page(enabled = true, label = nil)\n @column_hash[:summarize_page] = true\n @column_hash[:summarize_page_label] = label unless label.nil?\n self\n end", "title": "" }, { "docid": "20...
fa3e10a58bd07e2bf7a265ff3278201f
POST /lodgers POST /lodgers.json
[ { "docid": "2675c1fda04cc21cebdffb637a9b2b3d", "score": "0.6688595", "text": "def create\n @users = User.all\n authorize @users\n\n @lodger = Lodger.new(lodger_params)\n respond_to do |format|\n if @lodger.save\n format.html { redirect_to @lodger, notice: 'Lodger was successfully...
[ { "docid": "f392336177d275cf58ba813fbd850fb2", "score": "0.6508636", "text": "def create\n @lodger = Lodger.new(params[:lodger])\n\n respond_to do |format|\n if @lodger.save\n format.html { redirect_to(@lodger, :notice => 'Lodger was successfully created.') }\n format.xml { ren...
b565eae23829c7dd052a3ea3bb22e3f3
GET /stations/1 GET /stations/1.json
[ { "docid": "960e691d90a0694027b246288d06796f", "score": "0.7326053", "text": "def show\n @station = Station.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @station }\n end\n end", "title": "" } ]
[ { "docid": "74550b671c824e1161f1f74381a902f3", "score": "0.7587902", "text": "def show\n @station = Station.find_by_id!(params[:id])\n render json: @station\n end", "title": "" }, { "docid": "25bbe6605e203c071cd8ed4300ad7654", "score": "0.7502435", "text": "def index\n if @...
7ce7f9b5917aca78992391d5518b6ca1
Public: Returns the bits per sample of the buffer's sample data
[ { "docid": "f571901e4299e7a9aafb7aab7578ae8f", "score": "0.8256347", "text": "def bits_per_sample\n @format.bits_per_sample\n end", "title": "" } ]
[ { "docid": "0a9f952c9dc06167e78d065ed5b25454", "score": "0.8298989", "text": "def bits_per_sample\n @bits_per_sample\n end", "title": "" }, { "docid": "3af0f1f53298083c6a8c487eda0eed1e", "score": "0.8243053", "text": "def bits_per_sample\n return @format.bits_per_sample\n ...
6e9a1ec0ad41023771426cdab1b0dca7
val has a type which allow Comparable therefore here we just need to extend that notion to the node
[ { "docid": "3d759db18a49ba3309f6d715715549e3", "score": "0.624173", "text": "def <=>(oNode)\n self.val <=> oNode.val\n end", "title": "" } ]
[ { "docid": "290b3ad4f582043581507e88744357fe", "score": "0.6301104", "text": "def add_val(val)\n super\n self.last_node.next_node = self.first_node\n end", "title": "" }, { "docid": "73c6b09c765a4b95a88e7204b958adc3", "score": "0.60199314", "text": "def node=(_); end", "ti...
ebb47661763448e8dc8d552158a56a5d
Renvoit la dimension du training set i.e. la somme des dimensions de l'input et de l'output
[ { "docid": "25f9536b6d2f35560accc756323befbb", "score": "0.66724944", "text": "def total_dimension\n return self.input_dimension + self.output_dimension\n end", "title": "" } ]
[ { "docid": "aab269b40747091372f20b4906821384", "score": "0.66108155", "text": "def set_dimension(in_dim, out_dim)\n # On modifie les deux dimensions\n self.input_dimension = in_dim\n self.output_dimension = out_dim\n end", "title": "" }, { "docid": "012034b6acdc75ead6abb55bf33e86be...
44e1ee4d7b51cc818e2e6300baa31501
set read flag to true
[ { "docid": "96c258d649345fbaf54399f5d1613ac3", "score": "0.0", "text": "def set_read_flag\n current_user.user_messages\n .joins(:message)\n .where(messages: { chat_room_id: @chat_room.id })\n .update_all(is_read: true)\n end", "title": "" } ]
[ { "docid": "0d21ab7dd22253cc339e7924ac891a63", "score": "0.9069799", "text": "def set_read\n @read = true\n end", "title": "" }, { "docid": "fd15982d56737077a7eac37e75764f47", "score": "0.83033407", "text": "def read!\n self.update_attribute :read, true\n end", "t...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "481ec423c86ec1b921be8347be6d034a", "score": "0.0", "text": "def notification_params\n params.require(:notification).permit(:title, :description, :notification_type, :attachment, :designation_ids=>[])\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...
b23817d3184e868069c24809a783e735
make a clean copy of the current solution free from backreferences
[ { "docid": "c53000c3817f830a6a4c88cb5d260b7e", "score": "0.0", "text": "def store_encumbent \n @statistics[:encumbents] += 1 if @encumbent_value # do not count the first \"encumbent\" (initial solution)\n # Synchronize encumbent and current solution\n # \n # For offsets, lower all offsets...
[ { "docid": "8696545dc797a6782b4f999424d98952", "score": "0.5885758", "text": "def clean_referenced_patterns\n refs = [:referenced_patterns]\n # refs << :referenced_subroutine_patterns if Origen.tester.v93k?\n refs.each do |ref|\n var = send(ref)\n var = var.uniq.map do |pat|...