query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
b885a9451935e6738fa9fa7deeb79a85 | Needs A user and a post id | [
{
"docid": "8d82ef10a9dadddb8758817518d138f1",
"score": "0.0",
"text": "def create\n unless @post\n return {error: \"Post not found\"}\n end\n\n unless @user\n return {error: \"User not not created\"}\n end\n @like = Like.create(user_id: @user.id, post_id: @post.id )\n if @li... | [
{
"docid": "62af5bf1f3de0af6f0f90cf1123e4605",
"score": "0.7539155",
"text": "def users_post(user)\n self.user.id == user.id if !user.nil?\n end",
"title": ""
},
{
"docid": "62af5bf1f3de0af6f0f90cf1123e4605",
"score": "0.7539155",
"text": "def users_post(user)\n self.user.id =... |
7e79d303ba3655430ddd8acffc4e411b | Is the game over? | [
{
"docid": "bd4ae0aadc56a706f70512310291df78",
"score": "0.0",
"text": "def over?(board)\n if(draw?(board) || won?(board))\n return true\n else\n return false\n end\nend",
"title": ""
}
] | [
{
"docid": "04109739eee8c53cb7edcc69b91ebebc",
"score": "0.8895447",
"text": "def over?\n !@game_on\n end",
"title": ""
},
{
"docid": "95c31d6fcbe2b78091a922bbec0078d1",
"score": "0.8860285",
"text": "def game_over?\n @game_over\n end",
"title": ""
},
{
"docid... |
d3aa756a2c3212ced57ff31cb1088fe2 | Creates a PLTE chunk that corresponds with this palette to store the r, g, and b channels of all colors. | [
{
"docid": "91d2c230749e069a1f18e6ff0b1ef358",
"score": "0.8197929",
"text": "def to_plte_chunk\n @encoding_map.clear\n colors = []\n\n each_with_index do |color, index|\n @encoding_map[color] = index\n colors += ChunkyPNG::Color.to_truecolor_bytes(color)\n end\n\n ... | [
{
"docid": "9337819f0a851e09075480b0f2007fe4",
"score": "0.5983202",
"text": "def to_trns_chunk\n ChunkyPNG::Chunk::Transparency.new(\"tRNS\", map { |c| ChunkyPNG::Color.a(c) }.pack(\"C*\"))\n end",
"title": ""
},
{
"docid": "c37b26e5d64b09a3783c1b4af7c24843",
"score": "0.5878138... |
e9d1ad53f9c2ad554d29a93ec228f495 | Clicks the Done button, then instantiates the EditSiteInfo class. | [
{
"docid": "d0bf02b0fe91423d37e26535b32143fe",
"score": "0.78439033",
"text": "def done\n frm.button(:value=>\"Done\").click\n EditSiteInfo.new(@browser)\n end",
"title": ""
}
] | [
{
"docid": "1579c6055be20b6557afdb44033df0ee",
"score": "0.70452243",
"text": "def new_site\n frm.link(:text, \"New Site\").click\n EditSiteInfo.new(@browser)\n end",
"title": ""
},
{
"docid": "7386e45ed83cbd40d4c8c54277d40cd7",
"score": "0.68229645",
"text": "def continue\n ... |
089bdd25fcb55c6fd3907b4251a990fc | method for generate the map from a file | [
{
"docid": "95d8a54d5f8ddf9a61a14af47391e013",
"score": "0.79264593",
"text": "def generate_map_file (file)\n (File.read \"input\").split(\"\\n\").map{|x| x.split(\"\").map {|y| \" \" + y + \" \"}}\n end",
"title": ""
}
] | [
{
"docid": "4f033e2a997921a234a94289368dbc5c",
"score": "0.7594471",
"text": "def read_map(filename)\n file_data = []\n\n File.open(filename, 'r') do |file|\n file.each_line do |line|\n index = 0\n line_hash = {}\n line_data = line.split(' ')\n line_data.length.times do\n ... |
96244907cd737aa1e432d75b946488bf | The ordering of edges in sketchup face boundaries seems arbitrary, make predictable Start at arbitrary element, order edges/arcs with endpoints like (e0,e1),(e1,e2),(e2,e3)...(eN,e0) | [
{
"docid": "d3edbc413883c52513fb5b5989d79bab",
"score": "0.6216644",
"text": "def ordered_edges(loop)\n # Yields each edge and its end vertex (end for the given ordering)\n # Sketchup does not guarantee edges are in order, or that start matches end.\n return to_enum(:ordered_edges, loop) unless... | [
{
"docid": "d944b4044ac8338d63ec89d4c21e1634",
"score": "0.6393946",
"text": "def first_edge\n end",
"title": ""
},
{
"docid": "f71b07aa7948c0d27bf646e88bb49f98",
"score": "0.6233395",
"text": "def create_test_edge_shared_by_two_faces\n entities = Sketchup.active_model.active_ent... |
a8da31a0cfadb78b89c5b94a0ee10cf4 | DELETE /tableaus/1 DELETE /tableaus/1.json | [
{
"docid": "49279ae2b048ec90012f5b01328df46a",
"score": "0.66629833",
"text": "def destroy\n @tableau.destroy\n respond_to do |format|\n format.html { redirect_to tableaus_url, notice: 'Tableau was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title... | [
{
"docid": "a87e82d0b97ba263af065303b364c70e",
"score": "0.6937988",
"text": "def delete_table(table_id); delete(\"tables/#{table_id}\"); nil; end",
"title": ""
},
{
"docid": "cbaebd4c79c0bd64ec152ba8428af132",
"score": "0.6922608",
"text": "def destroy(table, id)\n self.post(\"/#... |
0d7d4b3e6c492dcc05dff5cbe28a8e99 | assert a predicate is true | [
{
"docid": "e1fa9d2b87089cedca0826d42ed6446b",
"score": "0.70995796",
"text": "def assert(predicate, message='failed assertion')\n @assertions += 1\n return if predicate\n fail message\n end",
"title": ""
}
] | [
{
"docid": "a541baa7259c3d28ea262cded20b78c5",
"score": "0.7541277",
"text": "def test_assert_predicate\n object = 1\n predicate = :even?\n unless object.send predicate\n raise \"Expected #{object.inspect} to be #{predicate}\"\n end\n end",
"title": ""
},
{
"... |
a196ccdacd876f4440d95352fabf355a | DELETE /desks/1 DELETE /desks/1.json | [
{
"docid": "c2847abdaebe1ec0609b8d4393dd1873",
"score": "0.747344",
"text": "def destroy\n @desk.destroy\n respond_to do |format|\n format.html { redirect_to desks_url, notice: 'Desk was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "9644cb2dc36f3317247599164d0d35f8",
"score": "0.7473595",
"text": "def destroy\n @desk.destroy\n respond_to do |format|\n format.html { redirect_to desks_url, notice: \"Desk was successfully destroyed.\" }\n format.json { head :no_content }\n end\n end",
"title": ""
... |
ec55273ca4b5795f2310401a48bafeec | GET /instructor GET /instructor.json | [
{
"docid": "e963967a02bf7c8d9864beaa49b923e2",
"score": "0.68989336",
"text": "def index\n @instructors = Instructor.all\n # render json: @instructors.to_json\n render json: @instructors.to_json(only: [:first_name, :last_name, :region, :photo, :email, :bio, :instagram, :experience, :user_id],\n... | [
{
"docid": "2223411e398eecd0faf46376f1c51b4c",
"score": "0.816429",
"text": "def show\n render json: @instructor\n end",
"title": ""
},
{
"docid": "41e40d55965b0c3c7e4a4cfc7112484a",
"score": "0.8150274",
"text": "def show\n @instructor = Instructor.find(params[:id])\n\n re... |
cec4e2971aef76f359fd1806fe52a822 | create the scores for a game you've created | [
{
"docid": "5cb0ae313e4ec4bc0cfcdd66dfef7a2c",
"score": "0.0",
"text": "def commence_game( player_ids )\n\t\tplayer_ids.each do |player_id|\n\t\t\tplayer = Player.where( id: player_id ).first\n\t\t\tif player\n\t\t\t\t# if the player exists, make him/her play in the game and specify the game id as a par... | [
{
"docid": "f63ad0b899b9c4eaa6534b4020a199b2",
"score": "0.7504127",
"text": "def create_scores\n end",
"title": ""
},
{
"docid": "e2b3d82fac94796c5d58a18dc0d25687",
"score": "0.74593115",
"text": "def create_scores\n scores= Array.new\n value = 100\n until value < 30... |
c5f20cf4259868a02a16b5b3ef91e583 | takes the key and date as args and returns a hash | [
{
"docid": "8a14c63c802de1cfa20cb9d82fcfc879",
"score": "0.0",
"text": "def shift(key, date)\n key = convert_string_into_array(key)\n offset = offset(date)\n shift_value = key.zip(offset)\n shift_amount = shift_value.map do |num|\n num.sum\n end\n end",
... | [
{
"docid": "f48cf15c48ded57f05188c2c00eb8008",
"score": "0.712255",
"text": "def parse_date_keys( hash )\n new_hash = {}\n hash.each_pair do |key,value|\n case key\n when String\n date = Date.parse( key )\n when Date\n date = key\n end\n new... |
a0c60caa1c7cd0a25a5c39acc4d406c4 | GET /admin/comments/new GET /admin/comments/new.json | [
{
"docid": "6f035e8adcbfd4052bb4e567466c364a",
"score": "0.81907034",
"text": "def new\n @commentable = find_commentable\n @comment = Comment.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @admin_comment }\n end\n end",
"title": ""
... | [
{
"docid": "1a53e6f3654e9ce35771ba8b4ac93455",
"score": "0.80619955",
"text": "def new\n @comment = Comment.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @comments }\n end\n end",
"title": ""
},
{
"docid": "bfe3a2c256e9edd1fef2ef... |
d3da1ed9a314cda5fb94a6190bcfd1f0 | Update action.Works togrther with "Edit". | [
{
"docid": "557506e27f6e0d25a106ac9c3a0b3388",
"score": "0.0",
"text": "def update\n if @question.update(question_params)\n redirect_to @question, notice: 'Question was successfully updated.'\n else\n render :edit\n end\n end",
"title": ""
}
] | [
{
"docid": "0d0ce957220ffe56584c29ebb0688b3b",
"score": "0.8710504",
"text": "def update\n save_action :edit\n end",
"title": ""
},
{
"docid": "0d0ce957220ffe56584c29ebb0688b3b",
"score": "0.8710504",
"text": "def update\n save_action :edit\n end",
"title": ""
}... |
0225e6bef2dd70a319522d7d32bad439 | The number of layers. | [
{
"docid": "4e76c4793751614add6608e64f6dce8d",
"score": "0.89038366",
"text": "def layers_count\n data.layers_count\n end",
"title": ""
}
] | [
{
"docid": "cbf959ac8f1ccb0247ec25c4f8618e50",
"score": "0.89089197",
"text": "def nlayers\n @nlayers ||= layer_shapes.size\n end",
"title": ""
},
{
"docid": "556a62e70326d47dd18f2246880289be",
"score": "0.8823458",
"text": "def nlayers\n @nlayers ||= layer_shapes.size\n ... |
f60a2c68ee45c3a68ffc63987546f9c5 | run block with JobInfo to finish for each waited session job or return JobInfo array if no block was passed | [
{
"docid": "05ffdc9f0433973fe706950bb4828afc",
"score": "0.6817871",
"text": "def wait_each(timeout = -1)\n if ! block_given?\n ary = Array.new\n end\n while true\n begin\n info = DRMAA.wait(ANY_JOB... | [
{
"docid": "770b655ce793dc60ca2d205cffaee6c4",
"score": "0.67686194",
"text": "def wait_each(timeout = -1)\n if ! block_given?\n ary = Array.new\n end\n while true\n begin\n info = DRMAA.wait(ANY_JOB, timeout)\n rescue DRMAAInvalidJobError\n ... |
64f5273fbb74dfe1988112c829451053 | load xml rules as a string | [
{
"docid": "a4ec076adfaf66fa000349ca7aace4fe",
"score": "0.8187123",
"text": "def load_xml_rules_as_string( str )\r\n begin\r\n doc = REXML::Document.new str\r\n doc.elements.each( \"rule-set\") { |rs| \r\n facts = rs.elements.each( \"facts\") { |f| \r\n facts( f.a... | [
{
"docid": "6d53092351fc1a6faa328d32a4797bd9",
"score": "0.6614879",
"text": "def load_rb_rules_as_string( str )\r\n instance_eval(str) \r\n end",
"title": ""
},
{
"docid": "d2ad9e386b2638fa91897d00334ae78c",
"score": "0.6465752",
"text": "def load_xml( fileName )\r\n ... |
9df81b836be53bc2e94f6a30d335cb44 | Convenience accessor to members of datapoints set | [
{
"docid": "e30eabb3e6e1fb9a454a2bcf73378900",
"score": "0.51718366",
"text": "def datapoints(with_gauges=true)\n datapoints = @redis.smembers \"datapoints\"\n unless with_gauges\n datapoints.reject!{|d| (d.match(/^gauge/) rescue false) }\n end\n datapoints\n end",
"tit... | [
{
"docid": "b40aee3da4ab477e19675fef5be81774",
"score": "0.62434006",
"text": "def getPoints\n\t\treturn @points\n\tend",
"title": ""
},
{
"docid": "c27255faebde1dcd3daf980d59ea33e6",
"score": "0.61719084",
"text": "def points\n raise NotImplementedError\n end",
"title": ... |
7baea0cf5eca05ab40d88f026424f28d | Callbacks for JSON::Stream::Parser / Yajl::FFI::Parser | [
{
"docid": "feb6962783fc3d7f0dfd57ae83e9179f",
"score": "0.0",
"text": "def start_document\n check @stack.nil?, \"document already started\"\n\n @stack = []\n @root_set = false\n @root = nil\n end",
"title": ""
}
] | [
{
"docid": "5242cc27361f3e0187c6fb33fbb008f6",
"score": "0.68127793",
"text": "def parse\n @parser.parse\n @callbacks.result\n end",
"title": ""
},
{
"docid": "87dc9ef8ab3251e3cf6906ac00eaed6b",
"score": "0.67427546",
"text": "def parse\n @parser.parse\n... |
09c5d92de9f1f9df01a5ccf72e10c3c7 | Public: insert Inserts the information collected in initialize into the proper table Parameters: None Returns: The object's id number State Changes: | [
{
"docid": "25e34d48c2eb9a2367c2acb415485350",
"score": "0.0",
"text": "def insert\n \n DATABASE.execute(\"INSERT INTO slides (title, slide_text, slide_order) VALUES \n (?, ?, ?)\", @title, @slide_text, @slide_order)\n \n @id = DATABASE.l... | [
{
"docid": "97ebf51eb332e8480ff36643a340b7b6",
"score": "0.74609333",
"text": "def insert(table, id, attributes) # abstract\n end",
"title": ""
},
{
"docid": "97ebf51eb332e8480ff36643a340b7b6",
"score": "0.74609333",
"text": "def insert(table, id, attributes) # abstract\n e... |
0d98ec493bd88430ce246e2fb1d2f431 | GET /disclaimers/1 GET /disclaimers/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "52ebac6c083f5def5da1d702f1b87601",
"score": "0.7169579",
"text": "def disclaimers_get(opts = {})\n data, _status_code, _headers = disclaimers_get_with_http_info(opts)\n data\n end",
"title": ""
},
{
"docid": "411cdeff1cda63ad42efdea620ab0a94",
"score": "0.6887087... |
65c10e294ae34ffb079ebe08cdcfa9ce | Maps table key schema to hash with attribute name as key and key type as value. | [
{
"docid": "34817e9263d42ce04050872216fb53c7",
"score": "0.57851815",
"text": "def key_schema(index = nil)\n return @key_schema[index] if @key_schema[index]\n\n current_schema = if index\n everything = Array(schema[:local_secondary_indexes]) +\n ... | [
{
"docid": "803200f7f09e837327a58db4e17789c0",
"score": "0.74211246",
"text": "def hash_key(key, type)\n @key_schema << { attribute_name: key, key_type: HASH }\n @attribute_definitions << send(type, key)\n end",
"title": ""
},
{
"docid": "40a47a296c6fca016c5ad0a540485269",... |
607955fae8513adb09fb03c2ee3e4dd1 | extend Components::Section TODO: reduce usage of German in method names | [
{
"docid": "1c539312a6ea9818c4d5fff3382f8cbc",
"score": "0.0",
"text": "def assert_header_is_visible(section_heading)\n page.all(\".cucumber-heading-secondary\").each do |section|\n return nil if section.text.include?(section_heading)\n end\n raise Capybara::ElementNotFound.new(\"H... | [
{
"docid": "8fcc62a65bc45e47ee355d7ac561967e",
"score": "0.7727941",
"text": "def section; end",
"title": ""
},
{
"docid": "8fcc62a65bc45e47ee355d7ac561967e",
"score": "0.7727941",
"text": "def section; end",
"title": ""
},
{
"docid": "87dc79c3b96b6d1cbb634c62ca4bb7dd",
... |
9a745a4b218270cf32c381f63a6d74c9 | method that takes result of computation and prints it | [
{
"docid": "c736631c33d382c5a0ed4e971e29f0c2",
"score": "0.0",
"text": "def compute(set)\n\tnumColors = set.numColors\n\tred = set.red\n\tgreen = set.green\n\tblue = set.blue\n\t\n\tcontrast = Array.new(numColors){Array.new(numColors)}\n\tmaxContrast = 0\n\tmaxContrastIndex = -10000\n\tcontrastOwner = A... | [
{
"docid": "c802cb64e0c389df1911b6d158707279",
"score": "0.7930903",
"text": "def print_result(result)\n puts result\n end",
"title": ""
},
{
"docid": "bb8f3158d53757e53389096ad9756f61",
"score": "0.7606118",
"text": "def output_results (result) #result is what we are passing the... |
35f1c5fe2c0a6a8f4e1e65e652541f4e | routing key format: type.id.event `type` can be public or private `id` can be user id or market id `event` is the event identifier, ex: order_completed, trade, ... | [
{
"docid": "0d75743cb84be9d6b31cb8420325265d",
"score": "0.0",
"text": "def on_message(delivery_info, _metadata, payload)\n routing_key = delivery_info.routing_key\n if routing_key.count(\".\") != 2\n logger.error { \"invalid routing key from amqp: #{routing_key}\" }\n return\n ... | [
{
"docid": "788f925809219b11b3a281680296e48f",
"score": "0.6674291",
"text": "def route_key; end",
"title": ""
},
{
"docid": "788f925809219b11b3a281680296e48f",
"score": "0.6674291",
"text": "def route_key; end",
"title": ""
},
{
"docid": "d7fcc200b5d8a764d6dcca186f812dc7... |
064a250426015db8188daaa160a24b7e | serialize the hash into json and save in a cookie add to the responses cookies | [
{
"docid": "5d11464136aa100d70fe8b380ecccd55",
"score": "0.0",
"text": "def store_flash(res)\n res.cookies << WEBrick::Cookie.new(\"_rails_lite_app_flash\", @flash_cookie.to_json) unless @flash_cookie.empty?\n end",
"title": ""
}
] | [
{
"docid": "74b129b6e46ffbb51e2975dcd455d45b",
"score": "0.7670182",
"text": "def store_hash(res)\n cookie = WEBrick::Cookie.new(\"_rails_lite_app_flash\", @cookie_hash.to_json)\n res.cookies << cookie\n end",
"title": ""
},
{
"docid": "a837bdf2bdd8929c05ac3e1f077d908c",
"score": ... |
49a09ca53055f72037fbb24da69d8449 | remove from all possible index keys, instead of relying on current value. uses KEYS command, is slow. | [
{
"docid": "c9f94dfff3c9baa82a9ed91b2ca012f2",
"score": "0.6173422",
"text": "def eliminate(obj)\n redis.evalsha Queris.script_hash(:remove_from_keyspace), [], [obj.send(@key), keypattern, 480]\n end",
"title": ""
}
] | [
{
"docid": "305691ac0d908601f6ce89ca8e289ada",
"score": "0.6964912",
"text": "def clean\n the_keys = keys( false )\n\n unset *the_keys unless the_keys.empty?\n end",
"title": ""
},
{
"docid": "f96fd5a53765440b586a1f755a146995",
"score": "0.6955056",
"text": "def remove_k... |
47f0b449f317a373ce44ab7e7620b1a0 | Support :if_exists, :cascade, and :concurrently options. | [
{
"docid": "b1ee1e1b4f13702a2fa40f503690bb9f",
"score": "0.0",
"text": "def drop_index_sql(table, op)\n sch, _ = schema_and_table(table)\n \"DROP INDEX#{' CONCURRENTLY' if op[:concurrently]}#{' IF EXISTS' if op[:if_exists]} #{\"#{quote_identifier(sch)}.\" if sch}#{quote_identifier(op[:name... | [
{
"docid": "82cc742f9f132f1039bb91a0ff4f67da",
"score": "0.6839439",
"text": "def continue_on_exists_proc; end",
"title": ""
},
{
"docid": "c66a791c0b5aa38b0611595767f04752",
"score": "0.6661225",
"text": "def on_exists_proc; end",
"title": ""
},
{
"docid": "13264612d2106... |
b1387557a9869f7da91abe23ab73e0c1 | PATCH/PUT /outreach_reports/1 or /outreach_reports/1.json | [
{
"docid": "b7c341367cb6ddb37cc37ec74e825d4b",
"score": "0.7475237",
"text": "def update\n respond_to do |format|\n if @outreach_report.update(outreach_report_params)\n format.html { redirect_to leaders_path, notice: \"Outreach report was successfully updated.\" }\n format.json { r... | [
{
"docid": "77049fa44731143507f485c8c64c8ed3",
"score": "0.68697006",
"text": "def set_outreach_report\n @outreach_report = OutreachReport.find(params[:id])\n end",
"title": ""
},
{
"docid": "d74169277c3008388ff090dcb4907998",
"score": "0.64639485",
"text": "def update\n r... |
9b4ee6d8afdd79b4ad589a36bfe63399 | PATCH/PUT /sokuteis/1 PATCH/PUT /sokuteis/1.json | [
{
"docid": "47a4dc4ba904905181cca8f8c90250cc",
"score": "0.63644636",
"text": "def update\n respond_to do |format|\n if @sokutei.update(sokutei_params)\n format.html { redirect_to @sokutei, notice: 'Sokutei was successfully updated.' }\n format.json { render :show, status: :ok, loc... | [
{
"docid": "ea416b077fa0aa7e84ec3fe2ef9c3772",
"score": "0.6737656",
"text": "def put\n request_method('PUT')\n end",
"title": ""
},
{
"docid": "af9aedd4f428a2c26c3fd57798526020",
"score": "0.6672808",
"text": "def put(path, data = {}, header = {})\n _send(json_request(N... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "edb9a24195bf760a993318e30232b647",
"score": "0.0",
"text": "def update!(**args)\n @http_request = args[:http_request] if args.key?(:http_request)\n @report_location = args[:report_location] if args.key?(:report_location)\n end",
"title": ""
}
] | [
{
"docid": "150fa2bdc1fc43d28ac45e2278a1f797",
"score": "0.70124525",
"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",
"... |
6ebbe67de962a520494c9ccb4092a89d | Translate Hash keys and values into pairs of dt and dd elements. | [
{
"docid": "3807cbe22821c9291478e4d47eaa5d25",
"score": "0.7823798",
"text": "def dt_dd_pairs(hash)\n hash.map do |k, v|\n css = (v.present? || false?(v)) ? 'present' : 'blank'\n opt = { class: css }\n label = html_tag(:dt, k, opt)\n value = html_tag(:dd, opt) { html_div(v.ins... | [
{
"docid": "2dd0f15604bf42f1a75bbacebe2f9d4e",
"score": "0.5976421",
"text": "def format_keys_and_values\n if @key.include?(\"date\")\n cal_date = @el.css(\"p\").children[1].text.strip #if @el\n time = @el.css(\"p\").children[3].text.strip if @el.css(\"p\").children[3]\n if time\n ... |
7486ae3f5d55b8a8391f810fd6f5795c | PUT /subconsultants/1 PUT /subconsultants/1.json | [
{
"docid": "949c77ba501610f39b10d988983dc8f9",
"score": "0.7425959",
"text": "def update\n @subconsultant = Subconsultant.find(params[:id])\n\n respond_to do |format|\n if @subconsultant.update_attributes(params[:subconsultant])\n format.html { redirect_to @subconsultant, notice: 'Subc... | [
{
"docid": "b1dd6f146c5fc2d8ccbbeeb649776f37",
"score": "0.63342893",
"text": "def create\n @subconsultant = Subconsultant.new(params[:subconsultant])\n\n respond_to do |format|\n if @subconsultant.save\n format.html { redirect_to @subconsultant, notice: 'Subconsultant was successfully... |
91c20042e78eb4ac339bc5c2558cc419 | This should return the minimal set of attributes required to create a valid Task. As you add validations to Task, be sure to update the return value of this method accordingly. | [
{
"docid": "c6f6d918e18c384217b431e8dc3db528",
"score": "0.0",
"text": "def valid_attributes\n { :description => 'MyDescription', :title => 'Title', :status_id => @status.id, :user_id => @user.id }\n end",
"title": ""
}
] | [
{
"docid": "93ca1824aef6975e30820b291ba31d58",
"score": "0.7247866",
"text": "def valid_attributes\n {\n :tname => \"Task #1\",\n :tdescription => \"Description for tsk #1\",\n :tpriority => \"routine\",\n :tstate => \"open\",\n :tasklist_id => @tasklist.id\n }\n... |
05c922117d9255445890cf4a35c90666 | Make a snapshot of the current buffer at a given moment in FIFO order. Notes: | [
{
"docid": "90aceb7d5f4b88d8bef980bd4eb56043",
"score": "0.6031281",
"text": "def take_snapshot\n @mutex.synchronize do\n i = high_position\n j = low_position + 1\n\n data = if empty?\n []\n elsif @low == -1\n @buffer.compact\n ... | [
{
"docid": "3dd2498b789bf77947fe36f32f95ecd8",
"score": "0.5940147",
"text": "def <<(_buf)\n super\n vma.buf = _buf\n @current_buf = self.size - 1\n $buffer_history << @current_buf\n @recent_ind = 0\n $hook.call(:change_buffer, vma.buf)\n gui_set_current_buffer(vma.buf.id)\n gui_... |
192ff3d4f3044d6cd23b76ac62341bc5 | DELETE /site_payments/1 DELETE /site_payments/1.json | [
{
"docid": "c6238ed69b805087cbbdbea374841a96",
"score": "0.77162665",
"text": "def destroy\n @site_payment.destroy\n respond_to do |format|\n format.html { redirect_to site_payments_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "aac98affd2b276d80471f439b432b6c4",
"score": "0.69923544",
"text": "def destroy\n @paysite.destroy\n respond_to do |format|\n format.html { redirect_to paysites_url, notice: 'Paysite was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title... |
120bad61a85bfab0ba7e220455a152b5 | add your instance methods here | [
{
"docid": "d99e48bcda4bfeda514407b112f8741e",
"score": "0.0",
"text": "def increment_column!(attribute, by = 1)\n # \"foo\"\n increment(attribute, by).update_column(attribute, self[attribute])\n end",
"title": ""
}
] | [
{
"docid": "f4ad13bf5fa71b1e7bc47220336ffdbf",
"score": "0.77246344",
"text": "def methods() end",
"title": ""
},
{
"docid": "1e5e53c4b9e93d9482caa25c8f435412",
"score": "0.7593585",
"text": "def methods; end",
"title": ""
},
{
"docid": "1e5e53c4b9e93d9482caa25c8f435412",... |
b7ec761e9a2934ef333e3b2660115bb2 | last name field management Difficulty Easy | [
{
"docid": "300ba78b748432def788b5c3b5f7df36",
"score": "0.0",
"text": "def set_last_name_field(last_name)\n @chrome_driver.find_element(:id, LAST_NAME_FIELD).send_keys(last_name)\n end",
"title": ""
}
] | [
{
"docid": "04316b1df2768f0b902a923514253a70",
"score": "0.796893",
"text": "def last_name\n self.name.split.last\n end",
"title": ""
},
{
"docid": "b2d53f45f12bd6b05dc524bf6d06cda8",
"score": "0.787417",
"text": "def last_name\n name.split[1..-1].join(\" \") if name\n end... |
2b5a3e7350520e21969f8d18bcce4267 | outside access =begin def initialize (variable) | [
{
"docid": "78da8d4100f5c405999655f1459ffe13",
"score": "0.0",
"text": "def initialize (brand, sound) \n\t @brand = brand # instances ex\n\t @sound = sound\n\tend",
"title": ""
}
] | [
{
"docid": "606c4aa2464af00d9b64b8e1b15b1ecb",
"score": "0.7927581",
"text": "def initialize(value); end",
"title": ""
},
{
"docid": "be9e8a63f2bae52958acf9ae58af5493",
"score": "0.7880929",
"text": "def initialize(x) end",
"title": ""
},
{
"docid": "8e3629bb42b471c640e3e... |
5495d65bde6c96264095f51d1725eaa0 | Finds existing leaderboard member or creates a new entry if none exists. | [
{
"docid": "4442b7fb9d8f0a218c8954578f9632ff",
"score": "0.75415635",
"text": "def find_or_create(name)\n unless leaderboard.check_member?(name)\n id = Redis.current.incr('id')\n user_id = User.find_by(email: name).id\n member_data = {id: id, user_id: user_i... | [
{
"docid": "e30ab6aff622d72c6d0e666d5724f0b0",
"score": "0.64662147",
"text": "def rank_member_in(leaderboard_name, member, score, member_data)\n @redis_connection.multi do |transaction|\n transaction.zadd(leaderboard_name, score, member)\n if member_data\n transaction.hmset(member_d... |
c89278775dd82eb72134db34b77fc7e9 | This method retrieves the details of the individual items in an item group. An item group is an item that has various aspect differences, such as color, size, storage capacity, etc. You pass in the item group ID as a URI parameter. You use this method to show the item details of items with multiple aspects, such as col... | [
{
"docid": "c9e2512c23bf0c1bb10a759cf5fe231d",
"score": "0.5936709",
"text": "def get_items_by_item_group(item_group_id, opts = {})\n data, _status_code, _headers = get_items_by_item_group_with_http_info(item_group_id, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "4ac014f7951c5f70086946cccdbf97cb",
"score": "0.7030728",
"text": "def get_items_by_item_group_with_http_info(item_group_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ItemApi.get_items_by_item_group ...'\n end\n # verify... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "fd33bcb7e19bcd0b0d6352c708d7bf5c",
"score": "0.0",
"text": "def user_in_out_params\n params.require(:user_in_out).permit(:user_in, :user_out)\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... |
7cc8880c02d0c89c9c16002b3d0aaefc | Create revision after creating of the page part | [
{
"docid": "9a19d0710872282c860d8da3d93e6a91",
"score": "0.76856625",
"text": "def create_first_revision\n attributes = get_attributes(FIELDS['page_part_revision_attributes'])\n number = self.page.number_of_last_revision == 0 ? 1 : self.page.number_of_last_revision\n attribute... | [
{
"docid": "38465662eb27f3503baedf90119d7a34",
"score": "0.7354126",
"text": "def add_revision\n attributes = get_attributes(FIELDS['page_part_revision_attributes'])\n attributes['number'] = self.page.number_of_last_revision\n attributes['filter_id'] = nil if attributes['filte... |
ff0bc47e3cb1d3919f789b79d2c15e62 | GET /position_thresholds/new GET /position_thresholds/new.xml | [
{
"docid": "d43ec5eec04ae0cd306c48bf620d3aeb",
"score": "0.76780236",
"text": "def new\n @position_threshold = PositionThreshold.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @position_threshold }\n end\n end",
"title": ""
}
] | [
{
"docid": "48bbf60cb6c6a46259f794114462b4a6",
"score": "0.7047191",
"text": "def create\n @position_threshold = PositionThreshold.new(params[:position_threshold])\n\n respond_to do |format|\n if @position_threshold.save\n flash[:notice] = 'PositionThreshold was successfully created.'\... |
e3d92ca2d99a2176802e8adbc211f3dd | === Settings This method is a thin wrapper around the Gnuplot "set" command. It can be used to set a lot of options. However, nothing is drawn until the user issues a plotting command. See the examples below for a quick overview. See the Gnuplot documentation for more details. === Examples b.set('terminal enhanced post... | [
{
"docid": "1ccdaf6eb5c9810d836e7a06f9a8a05b",
"score": "0.0",
"text": "def set(str)\n\t\t@pipe.puts \"set #{str}\"\n\tend",
"title": ""
}
] | [
{
"docid": "1dd5947504724bc58c1539ca6734d0db",
"score": "0.6081122",
"text": "def options_set opts, colors\n\t\t\t\topts.separator \"\"\n\t\t\t\topts.separator \" *\".colorize(colors[:cyan]) + \" set, s\".colorize(colors[:yellow]) + \n\t\t\t\t\" adds additional information to a task\".colorize(colors[:... |
1707835556efb43e4a79ed2b73e6080a | Basically a caesar cipher | [
{
"docid": "e0917e77690854dac4c82f4e95f20c18",
"score": "0.0",
"text": "def encode_substitution_cipher(input)\n plaintext = input.unpack('U'*input.length)\n key = []\n output = \"\"\n\n # direction of caesar\n direction = rand(2)\n # number of caesar shifts\n num = fix_illegal(make_real(33+rand(4... | [
{
"docid": "26d209505ee3e78e32158b8732907001",
"score": "0.85512626",
"text": "def caesar_cipher(num)\n\n end",
"title": ""
},
{
"docid": "362a119dbd1f2ec74dbbc5a21585163f",
"score": "0.83888704",
"text": "def caesar_cipher(message, key, result = '')\n message.each_char do |char|... |
4bf0c68b5b52634147a2004a7f1b6f66 | Determines an expected renewal amount, taking into account the +renewal_amount+ field. If the field is blank, it estimates based on the current list prices. Returns a Float. | [
{
"docid": "41079eb74c8ea70c758d6589ac647dc5",
"score": "0.66062194",
"text": "def expected_revenue\n if !renewal_amount.nil?\n @x = renewal_amount\n elsif payment_terms != \"Bundled\"\n hw_t = 0.0\n line_items.each { |l| hw_t += (l.current_list_price.nil? ? 0.0 : l.current_list_pri... | [
{
"docid": "aa79a10d08a4cbb8f6ff71d39eb308b6",
"score": "0.65217024",
"text": "def seen_renewals_remaining\n fields['seenRenewalsRemaining'] || Float::INFINITY\n end",
"title": ""
},
{
"docid": "335118928003d16c3c68be7f9ca3c1a1",
"score": "0.6448943",
"text": "def seen_renewals_r... |
1cc053c31b665cd608e393a8e44eb784 | :callseq: emitter.remove_listener(event, proc) > emitter Remove a listener from the listener array for the specified event. | [
{
"docid": "dc9f4bd70ff7335ae77dadb6d45f8fc0",
"score": "0.8181607",
"text": "def remove_listener(event, proc)\n if @listeners && @listeners.key?(event)\n @listeners[event].delete_if do |lis|\n lis == proc || lis.respond_to?(:original) && lis.original == proc\n end\n end... | [
{
"docid": "18af757001997c25b2827bc76ca98c6a",
"score": "0.8255888",
"text": "def remove_listener(event, listener = nil)\n if listener.nil?\n listeners(event).clear\n else\n listeners(event).delete listener\n end\n end",
"title": ""
},
{
"docid": "1184c7fedb37... |
d7757596ff7ded33f47eed702fd04ed8 | GET /opportunities GET /opportunities.json | [
{
"docid": "72bc09a6dda987daff924fc62bed9b02",
"score": "0.5654502",
"text": "def searchByCon\n Rails.logger = Logger.new(STDOUT)\n criteria = params[:criteria]\n value = params[:value]\n case criteria\n when \"id\"\n @opportunities = Opportunity.where(\"id = ? and status= ?\", value, \... | [
{
"docid": "437c32361777ba643d2acb89a6a236d3",
"score": "0.8098834",
"text": "def index\n @opportunities = Opportunity.all\n\n render json: @opportunities\n end",
"title": ""
},
{
"docid": "ad5a0a60e78e82e3eaac7b9bcd1402d2",
"score": "0.76426303",
"text": "def index\n @oppo... |
42e5f7176e2aaed1f254ea6e35088175 | TODO retrieve from parameter and check for other apply forms | [
{
"docid": "0e4068da526c66e618f5a442a05834d1",
"score": "0.0",
"text": "def after_initialize\n self.fee ||= 2200\n end",
"title": ""
}
] | [
{
"docid": "e2998c1905cd6bb84ea2c88d0992dbb0",
"score": "0.6069759",
"text": "def pre_form\n\n end",
"title": ""
},
{
"docid": "9d17c779b21f2755fea966084d279bde",
"score": "0.6053153",
"text": "def modifier_form?; end",
"title": ""
},
{
"docid": "9d17c779b21f2755fea96608... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "20dd9f0abbc3ce6a67b380d4cd6569cc",
"score": "0.0",
"text": "def horario_params\n params.require(:horario)\n .permit(:codigo, \n :margenEntradaCheck, \n :margenSalidaCheck, \n :inicioMargenEntrada, \n :finMargenEntrada, \n :inicioMargenSalida, \n ... | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
7a763ae10a4a4b694eff25a3e6d02d77 | Performs a commit on the database connection | [
{
"docid": "680152c521238e2962961ddb235c9b16",
"score": "0.8950018",
"text": "def commit\n @connection.commit\n end",
"title": ""
}
] | [
{
"docid": "11544a1f9052b32d3579d6a041097ad8",
"score": "0.8789887",
"text": "def commit\n\t\t@connection.commit\n\tend",
"title": ""
},
{
"docid": "80b88c33f0b8bceca82d498cb8c1971b",
"score": "0.868303",
"text": "def commit_db_transaction\n @connection.commit\n end",
... |
24e107f47a2b8b047c5af7faebe3482e | Get an array of log components (i.e. ['qrserver\\d+']) that should be checked, specified using regular expressions. Override this in componentspecific test base classes | [
{
"docid": "d9cc48a9c45776c59228ca1079fe91fa",
"score": "0.64830095",
"text": "def get_default_log_check_components\n return ['[\\\\w-]+'] # All components\n end",
"title": ""
}
] | [
{
"docid": "06be77accc85dc5189d50ee19053425e",
"score": "0.56709737",
"text": "def matchers\n @components.values\n end",
"title": ""
},
{
"docid": "5d191f08ec0d78c25f56858b8e9d42dd",
"score": "0.55461925",
"text": "def assert_log_every_input_match(re)\n message = \"\"\n ... |
49278fbfea506e4cfb81c6c18072afef | Returns an array containing all the available Timezones that are links to other Timezones. Returns TimezoneProxy objects to avoid the overhead of loading Timezone definitions until a conversion is actually required. source://tzinfo//lib/tzinfo/timezone.rb153 | [
{
"docid": "508c6362a3c3cb2256e8ae7b32067e0a",
"score": "0.733609",
"text": "def all_linked_zones; end",
"title": ""
}
] | [
{
"docid": "fb0bdba38b56b2e7489a1ec1d366be1c",
"score": "0.8075137",
"text": "def get_timezones\n TZInfo::Timezone.all.collect { |tz| tz.name }\n end",
"title": ""
},
{
"docid": "fb0bdba38b56b2e7489a1ec1d366be1c",
"score": "0.8075137",
"text": "def get_timezones\n TZInfo... |
30f0a4cb899d307c436701b5f9a7bb06 | Returns all the moves that meet the following conditions: Array yes_words: words that are definitely to be included in the move Array maybe_words: words that might be included in the move | [
{
"docid": "22f6dd117793ce6e0a9b0ea2cbd59bb5",
"score": "0.6907031",
"text": "def _moves(yes_words, maybe_words)\n\n # Avoid variable scope problems\n maybe_words = maybe_words.dup\n\n # COMPUTE yes_words_sum\n yes_words_sum = \"\"; yes_words.each{|word| yes_words_sum += word}\n\n # how c... | [
{
"docid": "dfef731fab6e038a8bb9555b366af449",
"score": "0.7118765",
"text": "def moves(words)\n # words is an array of words/letters on the board e.g. [\"RATE\",\"ENCOUNTERED\",\"T\"]\n # Returns all possible moves\n words = words.collect{|word|word.upcase}\n\n moves = _moves([],words)\n\n ... |
af57f2fac63283e57ac9998ba8980692 | Export to a new DMG. options The Dictionary of the export options | [
{
"docid": "dc0fd172986646a24a25a4d9f72a12dd",
"score": "0.77294326",
"text": "def export options\n IESD::DMG::InstallESD.new(File.join @url, INSTALLESD_DMG).export options\n end",
"title": ""
}
] | [
{
"docid": "c965eb66571abe6eaa4c67dc3b7e48cf",
"score": "0.76270664",
"text": "def export(options = {})\n exporter = Exporter.new(self)\n self.class.process_options exporter, options\n exporter.export\n end",
"title": ""
},
{
"docid": "efb8466b8943a85f6f0173e151de9a41",
... |
208f96a33c677c905f3be2850e906b5d | PATCH/PUT /tour_packages/1 PATCH/PUT /tour_packages/1.json | [
{
"docid": "5b316a9f07dadbefccca11b6f41551db",
"score": "0.6758022",
"text": "def update\n respond_to do |format|\n if @tour_package.update(tour_package_params)\n format.html { redirect_to @tour_package, notice: 'Tour package was successfully updated.' }\n format.json { render :sho... | [
{
"docid": "a7dbdef17f027681f07548695b4dc1c9",
"score": "0.6591969",
"text": "def update\n respond_to do |format|\n if @travel_package.update(travel_package_params)\n format.html { redirect_to @travel_package, notice: 'Travel package was successfully updated.' }\n format.json { hea... |
5d3269b20d7b3780f83552f24e79863f | Indicate whether the code is for a periodical or journal. | [
{
"docid": "524123513b564ae69cdcdafe8661c78f",
"score": "0.71514285",
"text": "def journal?(code)\n JOURNAL_ITEM_TYPES.include?(code)\n end",
"title": ""
}
] | [
{
"docid": "d363922ab19166539765233548206559",
"score": "0.6852921",
"text": "def journal_magazine_periodical?\n marc_leader_06_match = record.leader.byteslice(6) == 'a'\n marc_leader_07_match = %w[b i s].include?(record.leader.byteslice(7))\n marc_008_21_match = record.... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "1745f71fd2f9f7a3e197506c7109fa3c",
"score": "0.0",
"text": "def set_affordance\n @affordance = Affordance.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.61642385",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.60448",
"text": "def action_hook; ... |
500ee862ae7783c89e51e5756cc4733b | rubocop:enable Metrics/MethodLength This creates a new element instance whenever it's called. Because of that we can't keep state in any element objects. That seems like a good thing, actually. Called by layout method on views. Hard to make shorter. rubocop:disable Metrics/MethodLength | [
{
"docid": "d94961c7f24b6ce2a2009b59cbc212f0",
"score": "0.0",
"text": "def method_missing(element, *args, &_block)\n name, selectors, rest = args\n context = RUTL::Element::ElementContext.new(destinations: rest,\n interface: @interface,\n ... | [
{
"docid": "d25c304751ca64de561db69516814756",
"score": "0.71820444",
"text": "def create_element\n scope = (self.parent ? parent.element : Element)\n\n if el = self.class.element\n scope.find el\n else\n scope.new tag_name\n end\n end",
"title": ""
},
{
... |
3d7d85eef8b8ec89ad1c8831c05ea78c | generate a standard bootstrap glyphicon | [
{
"docid": "97f3cc525e6fc2d2377074ed31b6688e",
"score": "0.7240588",
"text": "def icon(name)\n content_tag(:span, nil, class: \"glyphicon glyphicon-#{name}\")\n end",
"title": ""
}
] | [
{
"docid": "b7490a3100bd8473837df5e1a8909c88",
"score": "0.7344621",
"text": "def icon_helper(name)\n content_tag :span, '', class: \"glyphicon glyphicon-#{name}\"\n end",
"title": ""
},
{
"docid": "707c84981c241a02728d94bcb1b4bbb8",
"score": "0.73230004",
"text": "def bootstrap_... |
b2616d9d173e69ae7678704a0c8b8327 | returns a Boolean if this location has available time slots returns Boolean | [
{
"docid": "e4bfb9b78866dfbed26c29dc7a86c6c7",
"score": "0.91648585",
"text": "def has_available_time_slot?\n self.location_times.length < num_time_slots\n end",
"title": ""
}
] | [
{
"docid": "5e3acc3407fc56d7710794e62beb1b41",
"score": "0.77039355",
"text": "def timeslot_contains_reservations?\n return start_dt.blank? || end_dt.blank? || existing_reservations?\n end",
"title": ""
},
{
"docid": "71cff92f3cd2ff251f0aa40551bdfa1b",
"score": "0.7527559",
"text... |
9c2f53e65eaa8b5491ac1ea25aa0081a | DELETE /attestations/1 DELETE /attestations/1.xml | [
{
"docid": "a5df3520f4a29c6c7e301723ce17b43a",
"score": "0.7216867",
"text": "def destroy\n @attestation = Attestation.find(params[:id])\n @attestation.destroy\n\n respond_to do |format|\n format.html { redirect_to(attestations_url) }\n format.xml { head :ok }\n end\n end",
"... | [
{
"docid": "df26116eb86dbadafed7137f9e3c2f9e",
"score": "0.6848272",
"text": "def delete!\r\n return nil unless exists? \r\n xml = xml_at_top\r\n par = xml.instance_variable_get(:@parent) \r\n par['delete'] = 'delete'\r\n xml_on_delete( xml )\r\n rsp = write_xml_config!( xml.doc.... |
a255d7ef909389170ae790305cc524aa | Bootstraps the cluster (discovers all cluster nodes and metadata by connecting to the one node that was specified). Calling connect is optional, since it also happens automatically when you start making requests. | [
{
"docid": "be95220d9347d7d1c3788975501ce6fb",
"score": "0.616237",
"text": "def connect\n @bootstrap_timer ||= setup_bootstrap_timer do\n start_bootstrap if @bootstrap_state == :not_started || @bootstrap_state == :failed\n end\n start_bootstrap if @bootstrap_state == :not_started\... | [
{
"docid": "f898455a77f5da6834e07de6a3ac25b9",
"score": "0.668445",
"text": "def bootstrap_chef!\n cloud.chef.node_bootstrap!(self)\n end",
"title": ""
},
{
"docid": "44b4a41dce34089bb27dc59e2c5d7ccc",
"score": "0.63627493",
"text": "def connect\n update_cluster\n s... |
334a784860751f8701c5dac9fe0e4275 | Calculates gifts given to user | [
{
"docid": "cf1ff0a95f085201d40bd433e7e5f8fb",
"score": "0.0",
"text": "def calc_support_received\n current_event.try(:profile).try(:donations_total)\n end",
"title": ""
}
] | [
{
"docid": "055dc54618a45ada4ab2bc5ea3b98ccc",
"score": "0.63129693",
"text": "def gifts\n @gifts ||= Gift.findByAccount(self)\n end",
"title": ""
},
{
"docid": "078bc61e03571cd01c7ecb32b0480f9f",
"score": "0.56878394",
"text": "def lift_total_for_gym\n total = 0\n lift... |
342699d17da8f39b50643e37a2bdf6dc | Fix compilation with clang. Reported upstream: | [
{
"docid": "6d45db24c453bc83ac3e9e78729ad90f",
"score": "0.0",
"text": "def patches\n DATA\n end",
"title": ""
}
] | [
{
"docid": "54057c00d2a96c90ba0f319be52ecd37",
"score": "0.6274979",
"text": "def patches\n DATA if ENV.compiler == :clang\n end",
"title": ""
},
{
"docid": "3c6f0a521524f8da43518b4cb62880ef",
"score": "0.6017225",
"text": "def patches\n DATA if ENV.compiler == :clang and !bui... |
e003fe0d0c19ea139c1726593080f7c3 | Returs hash of committed changes | [
{
"docid": "b54016abc2378644fe0728a379f0b0ba",
"score": "0.71049917",
"text": "def committed_changes\n @__committed_changes || {}\n end",
"title": ""
}
] | [
{
"docid": "a7341b1977a5e69db218b98623783eb6",
"score": "0.67021286",
"text": "def commit\n @changed = nil\n end",
"title": ""
},
{
"docid": "fe143589e13a5f85b7beed2bc82cf567",
"score": "0.66471654",
"text": "def sha\n event['head_commit']['id'] if event['head_commit']... |
592deab73872b9d923465da3485ea320 | prints the query results (columns names and values) much like the mysql commandline ++++ | id | song_id | played_at | ++++ | 3 | 713 | 20071201 00:44:44 | | 4 | 174 | 20071201 00:44:44 | ++++ | [
{
"docid": "902d60acd702c56b6a431e5fe15daf38",
"score": "0.56307167",
"text": "def ascii_query(sql,*values)\n sth = self.query(sql,*values)\n rows = sth.fetch_all\n col_names = sth.column_names\n sth.finish\n DBI::Utils::TableFormatter.ascii(col_names, rows)\n end",
"titl... | [
{
"docid": "1acea3aeee1063669adc20e415ed9082",
"score": "0.6634028",
"text": "def display_songs_and_playlists(db)\n\tputs \"The song names with their playlist names\"\n\tputs \"----------------------------------------\"\n\tsong_playlist = db.execute(\"SELECT song_name,playlist_name FROM songlist INNER J... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "f878132f49e48f7f5b432ad8e05b1826",
"score": "0.0",
"text": "def contact_params\n params.require(:contact).permit(:name, :email, :phone, :address, :organization, :birthday)\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... |
c8130a6fb98572cfc8e80e72411cbf60 | Render the template within the context of the given scope. | [
{
"docid": "ba59f8dd3549e6a6a854031670ec95c3",
"score": "0.8378541",
"text": "def render(scope, &blk)\n @_template.render(scope, {}, &blk)\n end",
"title": ""
}
] | [
{
"docid": "475f0d9d26dfcf689d617184df8f56ca",
"score": "0.779902",
"text": "def evaluate( scope, locals, &block )\n\t\t\t@template.attributes.merge!( scope.to_h ) if scope.respond_to?( :to_h )\n\t\t\t@template.attributes.merge!( locals )\n\n\t\t\treturn @template.render( &block )\n\t\tend",
"title"... |
53751a6559d587d8b19af5a34e8d2ffd | GET /tasks GET /tasks.xml | [
{
"docid": "6d1c152c154a62de668582cafd4b901f",
"score": "0.0",
"text": "def index\n is_active = (params[:is_active] == false) ? false : true\n @projects = Project.find(:all, :order => 'created_at ASC', :conditions => ['is_active = ?', is_active], :include => :tasks)\n render :template => \"proj... | [
{
"docid": "b98d6e0f037b424760a46e9092d2ff7c",
"score": "0.76856315",
"text": "def my_tasks(params = {})\n get('my/tasks', params)\n end",
"title": ""
},
{
"docid": "64c3bf6ef8da4ef221f50867d1b2c771",
"score": "0.76510423",
"text": "def show_task\n @user = User.find_by_use... |
1535dab3d41443c600469f43f6c2bf2f | Executes a command in a subshell on the local running system. | [
{
"docid": "e0d9f789548c268d682b7b642ff33603",
"score": "0.0",
"text": "def run_command(cmd, use_sudo = false, log_subject = \"local\")\n cmd = \"sudo #{cmd}\" if use_sudo\n subject = \" [#{log_subject} command]\"\n\n $stdout.puts \"#{subject} (#{display_cmd(cmd)})\"\n sh = Mix... | [
{
"docid": "257cee7d6865d3fa86c41d89e54384f6",
"score": "0.7071401",
"text": "def exec_shell cmd\n result = false\n on(:local) do |host|\n execute(cmd)\n end\n end",
"title": ""
},
{
"docid": "d20d91541116f695333e8a14f824ac6e",
"score": "0.7035418",
... |
3b283facd48f3ce3449411fb3d981f28 | Return monitors matching the given type | [
{
"docid": "fbfbd6ad7f36170db9b05dbd835d6f73",
"score": "0.79240245",
"text": "def monitors_are(types)\n @monitors.select { |m| types.include? m.type }\n end",
"title": ""
}
] | [
{
"docid": "2cb5c626d5715dfd14fc7806258318b8",
"score": "0.73300076",
"text": "def monitors(monitor_type = nil)\n @monitors ||= [] unless self.frozen?\n if block_given?\n monitor = TargetHost.new\n monitor.monitor_type = monitor_type\n def monitor.groups(role = nil)\n @groups... |
1a86e1286fd589e1e06fa43503946fa9 | the cleaver way : attr_reader :time def initialize(sequence) format the sequence in a digital number with 4 dizaines 0000 i = format('%04d', sequence) sec = i[2..3].to_i % 60 min = i[2..3].to_i / 60 + i[0..1].to_i min:sec in %02d format | [
{
"docid": "d83af822516fa88a5cbf2a8c58c001c5",
"score": "0.0",
"text": "def timer\n time < 100 ? small_time : big_time\n end",
"title": ""
}
] | [
{
"docid": "37611b9e90e7399b9c85d700d40cb5b3",
"score": "0.71749455",
"text": "def initialize(seconds)\n @hour = seconds / 60 / 60\n @min = seconds / 60 % 60\n @sec = seconds % 60\n end",
"title": ""
},
{
"docid": "8406a5f9507c71f3d3da05db20a66f61",
"score": "0.6737565",
"t... |
cd5f8af95a8276a84ea2c49f19de41ab | DELETE /restrooms/1 DELETE /restrooms/1.json | [
{
"docid": "3c28f2fefa07ebc43c96366b5e255912",
"score": "0.77824956",
"text": "def destroy\n @restroom = Restroom.find(params[:id])\n authorize @restroom\n @restroom.destroy\n respond_to do |format|\n format.html { redirect_to restrooms_path, notice: 'Restroom deleted.' }\n format.... | [
{
"docid": "5cad1d44a6b4d39b8f4c27c0e8fb1f66",
"score": "0.8076836",
"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": "e88ed6a66c463ebc4... |
37d008352782bd054a27bde3de81f27d | returns number of requests processed | [
{
"docid": "944309c05e9676d855e76ad1abfc088b",
"score": "0.0",
"text": "def process_queue\n num_processed = 0\n lock do\n @commit_msg = ''\n qm.queue.each do |qe|\n result = nil\n begin\n process_entry(qe)\n result = :pass\n resc... | [
{
"docid": "f979b9f155361f5b3111ead0a1e08f59",
"score": "0.8567715",
"text": "def request_count\n requests.length\n end",
"title": ""
},
{
"docid": "cdab92d03cbb3ad6b97e8b4614db9229",
"score": "0.8195447",
"text": "def requests\n return @urls.count\n end",
"title"... |
0aa09a75c9cd1cedb679e7c8d43be932 | Straight copypaste from Jekyll::Tags::IncludeTag This really should have been a public, static method there so I could call it directly, but oh well, it's open source, so... YOLO | [
{
"docid": "68d77e65ebf15b02c789d1dd0dd406e1",
"score": "0.0",
"text": "def load_cached_partial(path, context)\n context.registers[:cached_partials] ||= {}\n cached_partial = context.registers[:cached_partials]\n\n if cached_partial.key?(path)\n cached_partial[path]\n ... | [
{
"docid": "fa62520d100d9e0fdfbd357d3ea84153",
"score": "0.6942584",
"text": "def insert_include(text, markup = T.unsafe(nil)); end",
"title": ""
},
{
"docid": "0e0b6ae184a0809a70e6229c3b8a7f20",
"score": "0.6912883",
"text": "def include string\n @include << to_tag(string)\n end... |
a42cfea5c9edb47ae49fbe8d65497eb7 | Clear the etcd server database. Used before the each test | [
{
"docid": "95cb21f6b8a31512fadb5f82133a4ee9",
"score": "0.6188264",
"text": "def reset!\n response = @client.delete(@root, recursive: true)\n\n # record initial reset index for modfied?\n @etcd_reset = true\n @etcd_index = response.etcd_index\n\n rescue Etcd::KeyNotFound => error\n @etc... | [
{
"docid": "e8a55b8549de9e038a4e69e77dc08428",
"score": "0.7115004",
"text": "def clear_database\n # TODu: I should use 4th and 5th databases...\n end",
"title": ""
},
{
"docid": "bf910f14f0534b9dd6625d6e6b47015e",
"score": "0.706974",
"text": "def clear_test_database\n log_i... |
2893b25681284540f83f6ef82e6b415a | Initializes application settings using configuration for the current Rack environment. These include settings for server, context, and middleware. | [
{
"docid": "1301f4b1ac2b6c11189bf02e385978ee",
"score": "0.69190204",
"text": "def configure\n @environment = ENV['RACK_ENV'].to_sym\n default_root = File.expand_path('../../..', __FILE__)\n @cfg = Configurator.new(Context, pwd = Dir.pwd)\n env_config = :\"#{@environment}_app... | [
{
"docid": "2161fddbf7e54a8e023ffb10f8f64434",
"score": "0.70733833",
"text": "def initialize_app_class\n puts \"RW RackWardenClassMethods.initialize_app_class self #{self}\" if !production?\n initialize_logging\n logger.debug \"RW RackWardenClassMethods.initialize_app_class environment: ... |
253c1b25f678906a300b11e9b4ae3054 | is_dark is called with a +col+ and +row+ parameter. This will return true or false based on whether that coordinate exists in the matrix returned. It would normally be called while iterating through modules. A simple example would be: instance.is_dark( 10, 10 ) => true | [
{
"docid": "c2e26f959df72b5bd02e9532c4015de5",
"score": "0.8401137",
"text": "def is_dark( row, col )\n if !row.between?(0, @module_count - 1) || !col.between?(0, @module_count - 1)\n raise QRCodeRunTimeError, \"Invalid row/column pair: #{row}, #{col}\"\n end\n @modules[row][col]\n... | [
{
"docid": "b6d9db4684d20d9001948e54a235bade",
"score": "0.81709224",
"text": "def is_dark( row, col )\n if row < 0 || @module_count <= row || col < 0 || @module_count <= col\n raise QRCodeRunTimeError, \"#{row},#{col}\"\n end\n @modules[row][col]\n end",
"title": ""
},
... |
e175131e7e1ececf24e50bcefee68309 | This method sets up the standard power cap configuration profile | [
{
"docid": "996a5d9a89dae7dc1be168953d27bc3b",
"score": "0.58675337",
"text": "def server_standard_power_cap_set(handle:, power_limit:, throttle: false,\n correction_time: 3, corrective_action: \"alert\",\n hard_cap: false, server_id: 1)\... | [
{
"docid": "e32cd46603df574810379ed20ada5ef9",
"score": "0.6835998",
"text": "def init_cap_profiles \r\n p = {}\r\n\r\n p[:default] = Capabilities.new\r\n \r\n none = Capabilities.new\r\n none.set_cap_defaults_false\r\n\r\n p[:none] = none\r\n \r\n all = Capabilit... |
153479b41f606eb04565efb49db591bc | GET /clothing GET /clothing.xml | [
{
"docid": "f8d1c84c83fba6341330c8b41e22d910",
"score": "0.0",
"text": "def index\n authorize! :view_clothing, current_account\n @tags = current_account.clothing.tag_counts_on(:tags).sort_by(&:name)\n order = filter_sortable_column_order %w{clothing_type name status clothing_logs_count last_wor... | [
{
"docid": "5fd6d2bf4ef7c9dfe3a4ac8afee442e2",
"score": "0.6365793",
"text": "def get\n @xml = @paths.map { |path|\n puts \"GET\\t#{@host + path}\"\n RestClient.get(@host + path) { |response, request, result|\n puts \"RESPONSE #{response.code}\"\n ... |
b3b19955d58de0b51ed3cb94f136080c | Create a new instance | [
{
"docid": "04efe12b341ebf6dfe413ba0d80902aa",
"score": "0.0",
"text": "def initialize(size, options = {})\n @size = size\n @buffer = []\n options[:name] ||= \"gatherer(#{size})\"\n @transformer = ->(x) { x }\n super(options)\n end",
"title": ""
}
] | [
{
"docid": "52b4fba67deb4dd7f43f3fb486fd1535",
"score": "0.813074",
"text": "def create(*args)\n new(*args)\n end",
"title": ""
},
{
"docid": "785ca7af6bc64e08d1478854d1e7c46e",
"score": "0.81220627",
"text": "def new\n @instance = Instance.new\n end",
"title": ""
}... |
60c4a0ef7fa0b0047a9eb5295349a4b9 | Returns an HRX::File for the file at `path`, relative to `root`. | [
{
"docid": "5b66f7674589e619a820c89d71752515",
"score": "0.7484851",
"text": "def _file_for(path, root)\n HRX::File.new(\n _relative_path_for(path, root),\n File.read(path, encoding: 'binary'))\n rescue HRX::Error => e\n raise Thor::Error.new(\"Error archiving #{path}: #{e.message}\")\n... | [
{
"docid": "6117eb212d7e8d2b5e337ce0366f4dde",
"score": "0.6972617",
"text": "def path_to_file(path)\n File.new(self.absolute_path(path))\n end",
"title": ""
},
{
"docid": "6117eb212d7e8d2b5e337ce0366f4dde",
"score": "0.6972617",
"text": "def path_to_file(path)\n ... |
3abd2d81ddad70dc2d7282ff725d47b0 | GET /start_male_pole_jumps/1 GET /start_male_pole_jumps/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "bdb6186db24fecae76064b70b59aa053",
"score": "0.6691602",
"text": "def set_start_male_pole_jump\n @start_male_pole_jump = StartMalePoleJump.find(params[:id])\n end",
"title": ""
},
{
"docid": "2531436d32fba55017ae29c13dee26b4",
"score": "0.6535679",
"text": "def cr... |
645a286805fc7d5dd256ff0df21ade1f | POST /systems POST /systems.xml | [
{
"docid": "7c1fad5ad71776a055641a2af59fa90c",
"score": "0.65327275",
"text": "def create\n @system = System.new(params[:system])\n @system.user = current_user\n\n respond_to do |format|\n if @system.save\n format.html { redirect_to(@system, :notice => 'System was successfully creat... | [
{
"docid": "2c504f790fdba1d771a9feb61c33ada0",
"score": "0.66651773",
"text": "def create\n @system = System.new(params[:system])\n\n respond_to do |format|\n if @system.save\n format.html { redirect_to(@system, :notice => 'System was successfully created.') }\n format.xml { re... |
e93bce60bba9412f518b6bd7327d1499 | Performs the force submitting job. | [
{
"docid": "3388f993e3a59ebf51c20957699e6d61",
"score": "0.0",
"text": "def perform_tracked(assessment, user_ids, user_ids_without_submission, submitter)\n instance = Course.unscoped { assessment.course.instance }\n\n ActsAsTenant.with_tenant(instance) do\n force_create_and_submit_submissions... | [
{
"docid": "cd2dbae81a227c2e452f9c34476274fa",
"score": "0.7252201",
"text": "def force_submit_all # rubocop:disable Metrics/AbcSize\n authorize!(:force_submit_assessment_submission, @assessment)\n attempting_submissions = @assessment.submissions.by_users(course_user_ids).with_attempting_state\n ... |
5b7fd4bae6eb29eeda447345ae62fefc | GET /businesses GET /businesses.json | [
{
"docid": "8c43d3faa277b2f216892828997a347a",
"score": "0.78230596",
"text": "def index\n @businesses = Business.all\n render json: @businesses\n end",
"title": ""
}
] | [
{
"docid": "a7627a831205add50fbdd8ab2a57efa9",
"score": "0.7535885",
"text": "def index\n @businesses = Business.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @businesses }\n end\n end",
"title": ""
},
{
"docid": "0b9509746d469... |
78aa9b92c678c6d142432415aa80c5df | places_piece on board if playable move | [
{
"docid": "f44df205ce276de948109b1ae89981a1",
"score": "0.7729511",
"text": "def place_piece\n if !@selected_destination.instance_of? String\n puts \"You have siezed a #{@selected_destination.class}.\"\n @gameboard[@destination_coor[0]][@destination_coor[1]] = @selected_pie... | [
{
"docid": "356c81204b33232d2da4e2a3aa430cb0",
"score": "0.77894765",
"text": "def place_piece!(board, current_player)\n if current_player == 'Computer'\n computer_places_piece!(brd)\n\n else\n player_places_piece!(board)\n end\nend",
"title": ""
},
{
"docid": "a4b26dd22c203124f9982... |
ddab5fb87cd8629d44ca12ebf5f22e03 | Sets the dataRecoveryCertificate property value. Specifies a recovery certificate that can be used for data recovery of encrypted files. This is the same as the data recovery agent(DRA) certificate for encrypting file system(EFS) | [
{
"docid": "0ffc8f3e5cf76e0603980609c7909c77",
"score": "0.7616211",
"text": "def data_recovery_certificate=(value)\n @data_recovery_certificate = value\n end",
"title": ""
}
] | [
{
"docid": "4d6cda1f40d7c3faf505e64be4abf61f",
"score": "0.61665577",
"text": "def certificate_data=(value)\n @certificate_data = value\n end",
"title": ""
},
{
"docid": "ecf6d802c905b0482092e7eef80bc1be",
"score": "0.57930195",
"text": "def data_recovery_ce... |
594f84b458565e601f6708961a0931f1 | Logged in as TOSCANA admin. Select task that are different. Click QAC. Click Execute Diff. | [
{
"docid": "437bdfbeda45a5d3dd8823c3ae46f62d",
"score": "0.5396733",
"text": "def test_wd_st_024\n printf \"\\n+ Test 024\"\n open_diff_administration_page\n old_row_number = get_xpath_count($diff_administration_xpath[\"recent_diff_result_row\"])\n p old_row_number\n execute_qac_task\n ... | [
{
"docid": "bb0350309efdfd73ce8f78fadb2ac468",
"score": "0.6660021",
"text": "def test_wd_st_021\n printf \"\\n+ Test 021\"\n open_diff_administration_page\n selected_pj_id = @selenium.get_selected_value($diff_administration_xpath[\"old_pj_select\"])\n tasks = Task.find_all_by_pj_id(selected... |
763ed32764dd8d614b4f84ed67f3b7ae | Create a bulk aggregation account balance Create a balance records under an aggregation accounts. | [
{
"docid": "10fcf8897f76e9a0656aa5c97b00ce5a",
"score": "0.70683044",
"text": "def create_aggregation_account_balance_bulk_using_post_with_http_info(aggregation_account_balance, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: AggregationAccountApi... | [
{
"docid": "096f3984ef2fdc288418e81e5b03a5f7",
"score": "0.6870441",
"text": "def create_aggregation_account_balance_bulk_using_post(aggregation_account_balance, opts = {})\n data, _status_code, _headers = create_aggregation_account_balance_bulk_using_post_with_http_info(aggregation_account_balance... |
0a97b87db194208ae5207820d693059f | This is called after fetching the raw value stored in the DB. | [
{
"docid": "611cde99238267f88f097ce1fc006740",
"score": "0.0",
"text": "def deserialize_value(value)\r\n value\r\n end",
"title": ""
}
] | [
{
"docid": "ceaf604d16f45f0d46060d61091271ef",
"score": "0.6305281",
"text": "def fetch\n @fetched_value\n end",
"title": ""
},
{
"docid": "afa217a8b1768020e692a62d97b9400f",
"score": "0.6112747",
"text": "def raw_value; end",
"title": ""
},
{
"docid": "15... |
e5ba84bb2249b7a240b0b93bdc9e2190 | Returns the script to export the chart in different formats for web frameworks | [
{
"docid": "6f30ca671262ac1eb80f8fb372115fe9",
"score": "0.7366554",
"text": "def extract_export_code(\n placeholder=random_canvas_id, export_type='png', file_name='chart'\n )\n js = ''\n js << \"\\n <script>\"\n js << \"\\n (function() {\"\n js << \"\\n \\tvar onload = windo... | [
{
"docid": "873be213a5cd04bceae5b620c0d68d45",
"score": "0.7274392",
"text": "def extract_export_code_iruby(\n placeholder=random_canvas_id, export_type='png', file_name='chart'\n )\n js = ''\n js << \"\\n <script>\"\n js << \"\\n (function() {\"\n js << \"\\n \\tvar chartDom... |
067d460cffcc22be3f8a64a2016761f6 | INITIALIZE We create a new Array where each bucket is a Linked List. Our count begins at zero. | [
{
"docid": "52221c7a4c4100c389d212a7e4f8855e",
"score": "0.7701503",
"text": "def initialize(num_buckets = 8)\n @store = Array.new(num_buckets) { LinkedList.new }\n @count = 0\n end",
"title": ""
}
] | [
{
"docid": "b566abc44adbc964b474c2ef7f4e24d5",
"score": "0.7182985",
"text": "def initialize(num_buckets = 20)\n @store = Array.new(num_buckets) { Array.new }\n @count = 0\n end",
"title": ""
},
{
"docid": "17a01d1d4099798e1f0eb24596d7ca0c",
"score": "0.70179343",
"text": "def... |
ac4700a5102f3e084f1115917647fb6a | Responsible for: letting us know how fast disease will spread throughout that state. | [
{
"docid": "dfd488942fcf5b257bcbdd2239e77dcb",
"score": "0.6099887",
"text": "def speed_of_spread\n speed = 0.0\n factor = case @population_density\n when 0...50 then speed += 2.5\n when 50...100 then speed += 2\n when 100...150 then speed += 1.5\n when 150...200 then speed += 1\n e... | [
{
"docid": "8aa20f34dc3faabad8691c5f2404ad9e",
"score": "0.64636475",
"text": "def speed_of_spread(population_data, state)\n speed = 0.0\n case\n when @population_data[:population_density] >= 200\n speed += 0.5\n when @population_data[:population_density] >= 150\n speed += 1\n ... |
233904dd966ae8f0c4a88a1c5bcf66fb | Hide the marker, that shows this story is selected | [
{
"docid": "1600cf25501d398de9baa9da3f65eb38",
"score": "0.9121366",
"text": "def hide_marker\n @selected_story_marker.hidden = true\n end",
"title": ""
}
] | [
{
"docid": "6b9df97b959318cb430788074f885ae5",
"score": "0.87219566",
"text": "def show_marker\n @selected_story_marker.hidden = false\n end",
"title": ""
},
{
"docid": "ffdf60f5ba04b4403fba3e4f0c275773",
"score": "0.65713686",
"text": "def hide\n self.visible = false\n e... |
b4bf04d25f0daa9549b7f535c25fb9d8 | stores result of single +map+ operation to intermediate data store | [
{
"docid": "f395bef9035818bcb3a5ed3be617023c",
"score": "0.6308187",
"text": "def map_emit key, value\n @intermediate_data[key] ||= []\n @intermediate_data[key] << value\n end",
"title": ""
}
] | [
{
"docid": "d45833df0b9e458853e5f634be22bb40",
"score": "0.7148919",
"text": "def exec\n @data.each do |record|\n map(record)\n end\n \n return @mapped unless respond_to? :reduce\n \n @reduced = {} \n @mapped.keys.each do |key|\n @reduced[key]=reduce(key,@mapped[key])\n ... |
998443bffe89c3cf2a7289264fce5414 | Enumerates the subkeys of a given registry key returns array of subkeys | [
{
"docid": "809cddc92da2b5de2f2606b7787d4621",
"score": "0.8428817",
"text": "def registry_enumkeys(key)\n\tsubkeys = []\n\tbegin\n\t\troot_key, base_key = client.sys.registry.splitkey(key)\n\t\topen_key = client.sys.registry.open_key(root_key, base_key, KEY_READ)\n\t\tkeys = open_key.enum_key\n\t\tkeys... | [
{
"docid": "203166dcf7c9b131d816b7881610f17d",
"score": "0.8477504",
"text": "def registry_subkeys_at(key_path)\n subkeys = []\n\n debug \"reading registry subkeys at #{key_path}\"\n\n found_key = @registry_cache.select{|item| item[:key_path] == key_path}.first\n\n if found_key && fo... |
6d4bc320935003e66ef4672e62c57fe9 | View your website's uptime. Returns uptime time series website performance data for the given domain. | [
{
"docid": "dd81dd4c648d9ae8669d0142b9807444",
"score": "0.52688736",
"text": "def get_uptime(opts = {})\n data, _status_code, _headers = get_uptime_with_http_info(opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "3c54e22e53e78e2812cfc612b3fadb38",
"score": "0.59840435",
"text": "def get_data\n if @url\n @page = fetch_url(@url)\n @parse_time = parse_dailydev_page\n @page = nil\n self.total_time\n end\n end",
"title": ""
},
{
"docid": "bc38ffb401c18012169b9b3891da... |