query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
481fbce0b408b8d555ea64115c7a972c | DELETE /campaign_text_blocks/1 DELETE /campaign_text_blocks/1.xml | [
{
"docid": "c136158c9d90638db9e1879be8d1ecf7",
"score": "0.77566266",
"text": "def destroy\n @campaign_text_block = CampaignTextBlock.find(params[:id])\n @campaign_text_block.destroy\n\n respond_to do |format|\n format.html { redirect_to(admin_campaign_text_blocks_url) }\n format.xml ... | [
{
"docid": "e90c7f8d1b8435c2bc5d02bab181f82e",
"score": "0.73167807",
"text": "def destroy\n @textblock = Textblock.find(params[:id])\n @textblock.destroy\n\n respond_to do |format|\n format.html { redirect_to(textblocks_url) }\n format.xml { head :ok }\n end\n end",
"title":... |
6fc1df11e2dee945f637ed7622f63c32 | POST /semester_marks POST /semester_marks.json | [
{
"docid": "1e6c039140ab2c11743ef0553110b87f",
"score": "0.74555206",
"text": "def create\n @semester_mark = SemesterMark.new(semester_mark_params)\n @semester_mark.user_id=current_user.id\n respond_to do |format|\n if @semester_mark.save\n format.html { redirect_to resume_path, not... | [
{
"docid": "57273cc0355a6ec8fb874926f441410a",
"score": "0.6861145",
"text": "def student_group_mark_params\n params.require(:student_group_mark).permit(:exam_period_id, :student_id, :class_room_subject_id, :student_group_id, :marks, :points, :comments)\n end",
"title": ""
},
{
"docid": ... |
35df9926928dadf3cf51c0452169018b | GET Handler from link on stem_count.erb | [
{
"docid": "f701f86f93ad6c54df3e0ef303c82869",
"score": "0.0",
"text": "def popup_specs\n event_id = params[\"event_id\"]\n @event_id = event_id\n @specifications = Specification.where(florist_id: session[\"found_florist_id\"]).where(event_id: event_id).where(\"item_name not like 'X1Z2-PlaCeHol... | [
{
"docid": "f0a2d603b0e8b76f04743ea0a4708c30",
"score": "0.59370387",
"text": "def get_count\n user_page = Habr::open_page(Habr::Links.userpage(@userslug))\n # get text with favs count\n user_page.css(\".left .count\").first.text.to_i\n end",
"title": ""
},
{
"docid... |
684e4eb8eaa4bdbc9e6b3a7ac955e911 | Database management: Postgres Disconnect from the current Postgres instance | [
{
"docid": "2751370d8ea68b164b6089a7219127f0",
"score": "0.82005084",
"text": "def db_disconnect_postgresql(*args)\n\t\t\tif (framework.db)\n\t\t\t\tframework.db.disconnect()\n\t\t\tend\n\t\tend",
"title": ""
}
] | [
{
"docid": "690e9a6487a4cb2b5243e99e43408da5",
"score": "0.7810332",
"text": "def postgres_logout\n\t\tip = datastore['RHOST']\n\t\tport = datastore['RPORT']\n\t\tverbose = datastore['VERBOSE']\n\t\tif self.postgres_conn\n\t\t\tself.postgres_conn.close if(self.postgres_conn.kind_of?(Connection) && self.... |
d0cb8213829d78d635fa1498697e5181 | Execute the given file using he associate app | [
{
"docid": "af796027bd066371ce17e9aab3cbaca3",
"score": "0.7903275",
"text": "def run file_name \n\t\tapplication = select_app file_name \n\t\tsystem \"#{application} #{file_name}\" \n\tend",
"title": ""
}
] | [
{
"docid": "e4aa793ced7f635f21a1c7571a408baf",
"score": "0.7920137",
"text": "def run file_name\n\t\tapplication = select_app file_name\n\t\tsystem \"#{application} #{file_name}\"\n\tend",
"title": ""
},
{
"docid": "1a2c2570bac9b34b9bf226709fef1cde",
"score": "0.7849082",
"text": "de... |
3de3f5438f5f04bee453808c4a531636 | Creates a new filesystem on the host. | [
{
"docid": "cd55fba007c5204dcddca41907f1d22e",
"score": "0.8043493",
"text": "def create_filesystem(host, mount_name)\n fs_type = filesystem_type(host)\n\n case host['platform']\n when %r{aix}\n volume_group = on(host, 'lsvg').stdout.split(\"\\n\")[0]\n on(host, \"mklv -y #{mount_name... | [
{
"docid": "b139fc9588150c9004d9ece74002dee3",
"score": "0.75162166",
"text": "def create\n if @resource[:grow_fs] == :true\n fstabentry\n growfs\n mountfs\n else\n createfs()\n fstabentry\n mountfs\n end\n end",
"title": ""
},
{
"docid": "75788402609e... |
1d33318dc64e34b336afea5b39afc2a0 | puts string that informs player that he/she has the chance to see what is inside their chosen box now | [
{
"docid": "80c9e933ec4471bb2c42de8ef398ff22",
"score": "0.0",
"text": "def finaltwoboxesdealtaken\n\t\t@output.puts \"There are two boxes left. You have taken the bankers offer, \\nso to see what you could have gotten it is assumed that you want to open your own box now.\"\n\tend",
"title": ""
}
... | [
{
"docid": "30ca92a47b9053bf19e5f0169f512a41",
"score": "0.71613353",
"text": "def displaychosenboxvaluedeal\n\t\t@output.puts \"It is time! Your chosen box is being opened...\"\n\t\t10.times do\n\t\t\tsleep 0.4 \n\t\t\t@output.print \".\"\n\t\tend\n\t\t@output.puts \"Chosen box: [#{getchosenbox}] conta... |
af46ba7381a6ba0f0bf2dd166031d3fc | GET /asset_countingreports GET /asset_countingreports.json | [
{
"docid": "a426b3f403523d972c77f87e6badb495",
"score": "0.8030673",
"text": "def index\n @asset_countingreports = AssetCountingreport.all\n end",
"title": ""
}
] | [
{
"docid": "404a6d07105ce89d573fdf42cbc10a73",
"score": "0.771996",
"text": "def index\n @asset_countingreport_entries = AssetCountingreportEntry.all\n end",
"title": ""
},
{
"docid": "cfd7b67b84949ee6eed04d609d9c97ee",
"score": "0.7183022",
"text": "def index\n @assets = Asse... |
ead44862687a273ddf35fb813528eeee | Get the 200 last posts from VDM | [
{
"docid": "ed69883b0080dba9e73324ef148cc01f",
"score": "0.0",
"text": "def vdm\n # This is not a best practice to call a rake task inside the controller\n # This is just to demonstrate the behavior of the task\n %x[rake vdm:get_posts NB_OF_VDM_TO_GET=200]\n end",
"title": ""
}
] | [
{
"docid": "fab166f989d45cfad3c105ddeef86f39",
"score": "0.697025",
"text": "def latest_articles(limit = 10)\n articles[0..limit]\n end",
"title": ""
},
{
"docid": "399858e40502d0de9ef941e251437085",
"score": "0.6964957",
"text": "def recent_feed_items(limit = 100)\n feed_item... |
3265b96ee2574fdae10ae29f033e9039 | Return the photos ordered by primary first, then by created_at. They are already ordered by created_at as per the has_many association. | [
{
"docid": "8e656f41f056ce51273ff00b2e87412e",
"score": "0.7896436",
"text": "def sorted_photos\n # The call to partition ensures that the primary photo comes first.\n # photos.partition(&:primary) => [[primary], [other one, another one]]\n # flatten yields [primary, other one, another one]\n ... | [
{
"docid": "73b7f9becd25d85bde5718b07b0ee34c",
"score": "0.73435515",
"text": "def index\n @photos = Photo.order('created_at')\n end",
"title": ""
},
{
"docid": "fd504997182b30251156f08d7db9d3e1",
"score": "0.71990174",
"text": "def index\n @photos = Photo.order('created_at DESC'... |
2a90d25ac8af5eb03585c523fd6367a7 | Retrieves the user data for a group of user_ids from Twitter. user_id_array = An array twitter user ids, one for each user to get data for Returns a Hash of objects from Twitter | [
{
"docid": "0879f8df71e7d46add8530ddcfc940af",
"score": "0.7136335",
"text": "def get_users_records user_id_array, login='buzzvoter', password='otherinbox2008'\n users_records = {}\n typho_slice_size = TWITTER_THROTTLE_LIMIT # total number of users we can lookup per Typhoeus batch\n retries = 1... | [
{
"docid": "1ed56f7b7f547c57746a89eed524711c",
"score": "0.69350356",
"text": "def users(*args)\n options = { user_id: args.join(\",\") }\n url = NSURL.URLWithString(\"https://api.twitter.com/1.1/users/lookup.json\")\n request = TWRequest.alloc.initWithURL(url, parameters:options, request... |
3d11bf1f5b1eaf7fe191a0a632077673 | redirects user to signin_path if not signed in | [
{
"docid": "6d1cadbac91453b6cf1073cf249a689e",
"score": "0.7964199",
"text": "def logged_in_user\n unless logged_in?\n redirect_to signin_path\n end\n end",
"title": ""
}
] | [
{
"docid": "ba249a6bf954a7ae5f4bd6dc247e7bb0",
"score": "0.8575996",
"text": "def signed_in_user\n redirect_to signin_path, :status => 302 unless signed_in?\n end",
"title": ""
},
{
"docid": "8c79213fa235a87c8c79a2c2facd381e",
"score": "0.8539617",
"text": "def signed_in_user... |
8abe4104da7715d0f9f0e54a47fb0266 | GET /scopes GET /scopes.json | [
{
"docid": "0a978b8efdc8ff8514d324cb98d3e5fe",
"score": "0.6907819",
"text": "def index\n @scopes = Scope.all\n end",
"title": ""
}
] | [
{
"docid": "9454215ea81a0ccb7d12afe77d8cf50b",
"score": "0.75244504",
"text": "def scopes\n params['scope']\n end",
"title": ""
},
{
"docid": "bf075114e4dfa9dab5990521210ae60f",
"score": "0.73629063",
"text": "def scopes\n @scopes ||= {}\n end",
"title": ""
... |
8a16d7c84f20f83186da101e08a049d1 | write a function that takes an array of strings and returns the string with the longest char length longest_string | [
{
"docid": "94a1933aa69824bdc706e429c12d5915",
"score": "0.8549096",
"text": "def longest_string ar\n return ar.max_by(&:length)\nend",
"title": ""
}
] | [
{
"docid": "c6192f903d28410f2b98c73290c167bd",
"score": "0.9077794",
"text": "def longest_string array\n\tarray.max_by(&:length)\nend",
"title": ""
},
{
"docid": "9019b0911bfba249364a369c2dcd409c",
"score": "0.9041199",
"text": "def longest_string(array)\n\tarray.max_by(&:length)\nen... |
acdfd5df33a85e0b1d20016223fde9ab | DELETE /queries/1 DELETE /queries/1.json | [
{
"docid": "896fb8394566db0b9818ed3b75e34b5d",
"score": "0.73034203",
"text": "def destroy\n @query = Query.find(params[:id])\n @query.destroy\n\n respond_to do |format|\n format.html { redirect_to queries_url, notice: 'Query was successfully deleted.' }\n format.json { head :no_cont... | [
{
"docid": "d2375b11675de0e152de07976b50e9c7",
"score": "0.78634304",
"text": "def delete_request(url, queries)\n results = @@client.delete url, queries\n results.to_json\nend",
"title": ""
},
{
"docid": "f97dd16c73a9bfa64785b6c9e5fa49d8",
"score": "0.75708795",
"text": "def de... |
603fe63176f0bda0b65eb9a824fc9a85 | Passes an array of fingerprint readings to the model to localize | [
{
"docid": "1a87563e827aa7d9a04e98e775350f22",
"score": "0.5311048",
"text": "def localization\n #debugger\n searched = params[:finger_print]\n @coordinates = FingerPrint.KNN(searched)\n puts @coordinates\n respond_to do |format|\n format.html \n format.json {render json: ... | [
{
"docid": "982cef50eb79681a3d86c4afb2edef6f",
"score": "0.49208415",
"text": "def locale_array=(locale_array)\n begin\n @locale_array = locale_array.map { |l| l.to_sym }\n rescue\n nil\n end\n end",
"title": ""
},
{
"docid": "9a01f68f80e7720515d6263088027492"... |
d7fc479b90fa3a39429bb97198768a19 | Returns a nicely formatted string representing the current state of the board | [
{
"docid": "96ab9706a0876f57826d4b19a874010e",
"score": "0.6788545",
"text": "def to_s\n out = \"\"\n board.each_with_index do |row, row_num|\n row.each_with_index do |val, col_num|\n out << \" #{val} \"\n out << \"|\" if col_num == 2 || col_num == 5\n end\n out << \"\... | [
{
"docid": "3c5808c1c8aeadc12a91c8134c82ce0e",
"score": "0.82371384",
"text": "def print_current_state\r\n\t\tprint \"#{@board[:A1]} | #{@board[:A2]} | #{@board[:A3]} \\n #{@board[:B1]} | #{@board[:B2]} | ##{@board[:B3]}\\n #{@board[:C1]} | #{@board[:C2]} | #{@board[:C3]}\"\r\n\tend",
"title": ""
... |
bb66a1f63a47d069bb2d7b4301eb0002 | input: original coordinate of the piece being moved. output: N/A result: moves piece to new_location | [
{
"docid": "8f146dcd56edd71c57ca0fa4e0615d9c",
"score": "0.71829075",
"text": "def move(original_location, new_location)\n oy = original_location[0]\n ox = original_location[1]\n dy = new_location[0]\n dx = new_location[1]\n\n board[dy][dx] = board[oy][ox]\n board[oy][ox] = \" \"\n e... | [
{
"docid": "b37b7639e01ddd37a86a26fb46bcad95",
"score": "0.8007995",
"text": "def move_to!(x_new, y_new)\n return raise \"Invalid move\" if !valid_move?(x_new, y_new)\n occupant = game.piece_present(x_new, y_new)\n current_piece = game.pieces.where(x_pos: x_pos, y_pos: y_pos).first\n if occu... |
ad6cc5a167a935d8988fc8335955da87 | begins the listen thread that processes any incoming messages | [
{
"docid": "9d09eb7d15d30382fba964b31faedbff",
"score": "0.0",
"text": "def nodeListen(socket)\n t1 = Thread.new {\n puts \"thread active\"\n while(true)\n\n mesg,sender = socket.recvmsg(65536)\n\n p socket.recvfrom(16)\n ans = socket.recvfrom(16)\n message = JSON.parse(mesg)\n # ... | [
{
"docid": "1b7f26bb83641f4058ad8e734c3e28af",
"score": "0.7680387",
"text": "def listen\n Thread.new do\n listen!\n end\n end",
"title": ""
},
{
"docid": "cca1483d408509bc5170b3632ef10c59",
"score": "0.75319505",
"text": "def start_listening\n\t\t... |
a91136b31a5056416c30061b1d0c43fb | Returns a list of CacheParameterGroup descriptions === Parameters (optional) name The name of an existing cache parameter group options (optional): :marker marker provided in the previous request :max_records the maximum number of records to include | [
{
"docid": "510f6d176e365d13601233e7e08cca48",
"score": "0.87400323",
"text": "def describe_cache_parameter_groups(name = nil, options = {})\n request({\n 'Action' => 'DescribeCacheParameterGroups',\n 'CacheParameterGroupName' => name,\n 'Marker... | [
{
"docid": "b4b0441db538434cc8feff2368e8c821",
"score": "0.7095483",
"text": "def getParameterGroup\n MU::Cloud::AWS.elasticache(region: @region, credentials: @credentials).describe_cache_parameter_groups(\n cache_parameter_group_name: @config[\"parameter_group_name\"]\n ).c... |
c87fc18c51282dfc1b81bc143f7fd39f | Whether the response failed due to a timeout | [
{
"docid": "73b2cbd573314faa0d7eea652fe8899c",
"score": "0.7385681",
"text": "def timed_out?\n @timed_out\n end",
"title": ""
}
] | [
{
"docid": "fe876c32a9c9720ce393bd38737bd806",
"score": "0.8459948",
"text": "def timeout?\n response_code == 'Timeout'\n end",
"title": ""
},
{
"docid": "baec7b54b3460b1d7782ff36ef6e8a10",
"score": "0.8400215",
"text": "def timed_out?\n @response.timed_out? || @resp... |
dd708d0b6ae2e4ea0e54530156adce4d | I worked on this challenge [with: David Lange]. Your Solution Below | [
{
"docid": "90c2be8e00ac5dd39af52da6e866fef0",
"score": "0.0",
"text": "def leap_year? (year)\n\tif (year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0)\n\t\treturn true\n\telse\n\t\treturn false\n\tend\nend",
"title": ""
}
] | [
{
"docid": "aa89b26c8848588848ff622b5d313173",
"score": "0.6375061",
"text": "def solution\n 31875000\nend",
"title": ""
},
{
"docid": "b9960478999684c2b536f76e22f6fc63",
"score": "0.6304806",
"text": "def solution4(input)\n end",
"title": ""
},
{
"docid": "61a5aa5387... |
25d5658142b427f178667141a746b7be | Setter for the TCP urgent field. | [
{
"docid": "1f9279ba35a4b78e311b89eea3aeb1e8",
"score": "0.5034825",
"text": "def tcp_urg=(i); typecast i; end",
"title": ""
}
] | [
{
"docid": "8836e97b6d767a1d323f3b60a1e55259",
"score": "0.55657923",
"text": "def urgency(urgency)\n raise \"Invalid urgency: #{urgency}\" unless VALID_URGENCIES.include?(urgency)\n\n set_class_attribute(:urgency, urgency)\n end",
"title": ""
},
{
"docid": "bae11acd4c892e075193... |
15d0cf845daba2af15d7e7fa83bf4450 | DELETE /asset_types/1 DELETE /asset_types/1.json | [
{
"docid": "24ac3eaead56a2f5029e649561f37130",
"score": "0.7300144",
"text": "def destroy\n @asset_type.destroy\n flash[:notice] = \"Deleted Successfully\"\n redirect_to new_asset_type_path\n end",
"title": ""
}
] | [
{
"docid": "42c188d9f4d0294f9e6ba64af111211f",
"score": "0.81697714",
"text": "def destroy\n @asset_type = AssetType.find(params[:id])\n @asset_type.destroy\n\n respond_to do |format|\n format.html { redirect_to asset_types_url }\n format.json { head :no_content }\n end\n end",
... |
92634d3d0a91047a703f859215360494 | Allow env to override This is a global killswitch for the server, as other callers check it (eg, when using sections for authorization, for showing navbar links, for allowing controller endpoints). | [
{
"docid": "991629d3baf9fb1f52997c5205c17633",
"score": "0.0",
"text": "def enabled_sections?\n return EnvironmentVariable.is_true('ENABLED_SECTIONS') if ENV.has_key?('ENABLED_SECTIONS')\n return true if [SOMERVILLE, DEMO].include?(@district_key)\n false\n end",
"title": ""
}
] | [
{
"docid": "d1388980b6cc6f9e905aa58d2708f578",
"score": "0.6711216",
"text": "def switch!\n @env = {}\n end",
"title": ""
},
{
"docid": "8ab771b08abe8c8233d1166548d62f8f",
"score": "0.6282474",
"text": "def rack_env_whitelist; end",
"title": ""
},
{
"docid": "ecbe3aea... |
3b1297273c7964caf955ac25ae9e0d88 | Write the results of the workflow to the filesystem | [
{
"docid": "466f1345ec83f8a23b252ed2c4831d51",
"score": "0.5555347",
"text": "def communicate_results(directory, results)\n zip_results(directory)\n\n # if results.is_a? Hash\n # File.open(\"#{@options[:output_directory]}/data_point_out.json\", 'w') { |f| f << JSON.pretty_generate(results) }\n... | [
{
"docid": "debc6ea4e70146dc2d3d78d972ced2df",
"score": "0.73991203",
"text": "def work_received(results)\n # write results to disk\n @@output_file.puts results\n end",
"title": ""
},
{
"docid": "ecffeba119a8b532a6582b06309732d3",
"score": "0.6840318",
"text": "def write_to_fi... |
2166ac05dd535e85493fa67d555340ea | return the reward if complete or the penalty if expired | [
{
"docid": "5ba06e482bf0d42df006fe7320e685df",
"score": "0.0",
"text": "def total_payout\n # make sure we have rep_parent\n node = self.get_rep_parent\n \n # get total payout of children\n child_payout = 0\n node.children.each do |child|\n child_payout = child_payout + child.total... | [
{
"docid": "67bea1622065e533f3615d04dff93118",
"score": "0.7176495",
"text": "def reward\n @reward ||= 0\n end",
"title": ""
},
{
"docid": "3d8e3a648174ffbf54b223d089ed12a5",
"score": "0.66492736",
"text": "def allows_reward?\n true\n end",
"title": ""
},
{
"d... |
ebd0ddf361f350f8607fb9bd4fbd72e0 | Loads the list of mails on folders, +options+ can have these values: size, page, attribute = ALL|NONE|GLOBALLISTER|SECONDARY|EXPLORER Returns a list of elements It returns nil if no element with this elementKey was found | [
{
"docid": "ceb6fb7956ebafbd6df085130fbd3f09",
"score": "0.65605515",
"text": "def mails(element_key, options = {})\n parameter = { query: options }\n parameter[:basic_auth] = @auth\n\n response = self.class.get(\"/elements/#{element_key}/mails\", parameter)\n return response['Elemen... | [
{
"docid": "6db92521c27cead1059497b5adf95a57",
"score": "0.5391285",
"text": "def mailboxes\n if @mailboxes.nil?\n list_mailboxes\n end\n @mailboxes\n end",
"title": ""
},
{
"docid": "6db92521c27cead1059497b5adf95a57",
"score": "0.5391285",
"text": "def mailb... |
46f514b6d7259a1c8d83db8ed5871a56 | post /api/v1/gps add a new gps waypoint and a new truck using background job return success if all parameters are present and OK. error 400 in all other case. | [
{
"docid": "2cd8da6aa8497a58aea0a6c7f919c0d6",
"score": "0.7377653",
"text": "def add\r\nbegin\r\nif(params[:longitude] && params[:latitude] && params[:sent_at] && params[:vehicle_identifier])\r\nGpsWaypointJob.perform_async(GpsParameters())\r\n\r\n\r\nrender json: {status: 'sucess',data: :ok}\r\nelse\r... | [
{
"docid": "b54beebac8e14b67ff19c7c3758b8f93",
"score": "0.6717584",
"text": "def create\n @gps_truck = GpsTruck.new(gps_truck_params)\n\n respond_to do |format|\n if @gps_truck.save\n format.html { redirect_to @gps_truck, notice: 'Gps truck was successfully created.' }\n format... |
d03d34114dae607c7796a505679387e7 | s1 = 1 1 + 1 1 + 1 1 + //etc def second_sum output = 0 | [
{
"docid": "41f8b56dc6b7b7c25551d478e3a2d03d",
"score": "0.728735",
"text": "def second_sum\n ( @num * (@num + 1) ) / 2\n end",
"title": ""
}
] | [
{
"docid": "75bbb43322fdf3b8be67509076eb783e",
"score": "0.7287736",
"text": "def second_sum\n (@num * (@num + 1)) / 2\n end",
"title": ""
},
{
"docid": "9d68eab51cf901a91d026e018ccafe30",
"score": "0.6910624",
"text": "def sum\n @sum = 0\n @sequence.each do |n|\n if n... |
10145e3dcb6a6a70088567e69a135561 | Returns the wfc server url. | [
{
"docid": "4743a2bebd16aeadb744cbda9a7240fb",
"score": "0.0",
"text": "def wcs_path\n return unless @config && visibility && file_set && raster_file_set?\n \"#{path}/#{@config[visibility][:workspace]}/wcs\"\n end",
"title": ""
}
] | [
{
"docid": "a469b38983f741b9f27614d9a4b81025",
"score": "0.7546797",
"text": "def server_url\n url\n end",
"title": ""
},
{
"docid": "1e32e63b432003d3ae9e9e0d2c160a02",
"score": "0.7432039",
"text": "def webserver_url\n \"http://#{webserver_host}:#{webserver_port}\"\n ... |
be35e6bbecc74b1f09b1d7599fbc33c9 | The time associated w/the metrics | [
{
"docid": "cf20f682f5c29cc46abb6a665b3416da",
"score": "0.0",
"text": "def timestamp\n Time.at(@metadata[:agent_time].to_i)\n end",
"title": ""
}
] | [
{
"docid": "8128755a1899fc25ea9c4954d2988c90",
"score": "0.7989638",
"text": "def time\n stats[\"time\"]\n end",
"title": ""
},
{
"docid": "9eb8852aab240de9b6216a9953075567",
"score": "0.77561605",
"text": "def time\n results[\"timeMillis\"]\n end",
"title... |
ba3b1c921efd29de5a08bdd7bdb85bb6 | END PART 1 PART 2 | [
{
"docid": "d240862651186909cd695496ef08db08",
"score": "0.0",
"text": "def attack(position)\n if self[position] == (:S)\n self[position] = :H\n puts \"should print 'you sunk my battleship!'\"\n return true\n end\n self[position] = :X\n false\... | [
{
"docid": "2d184052a6e6071e93a993d5d03d315d",
"score": "0.7120254",
"text": "def part_end\n end",
"title": ""
},
{
"docid": "281e9a43f3408650bd69047a8fabab55",
"score": "0.69215083",
"text": "def end; end",
"title": ""
},
{
"docid": "281e9a43f3408650bd69047a8fabab55",... |
47af99cd30a6c81aca5043b629b658c9 | Counts the number of each atom in the peptide sequence. | [
{
"docid": "34338a4438dfd071388dda72c2cb3dd1",
"score": "0.7316654",
"text": "def countAtoms(seq)\n\t\t\t\to = 0\n\t\t\t\tn = 0\n\t\t\t\tc = 0\n\t\t\t\th = 0\n\t\t\t\ts = 0\n\t\t\t\tp = 0\n\t\t\t\tse = 0\n\t\t\t\tseq.each_char do |aa|\n\t\t\t\t\to = o + MS::Feature::AA::ATOM_COUNTS[aa][:o]\n\t\t\t\t\tn ... | [
{
"docid": "1b489a49a0fc4985c456a14617c2a84f",
"score": "0.6997997",
"text": "def acidic_count(amino_acid_sequence)\n count = 0\n comp = amino_acid_sequence.composition\n ACIDIC_AMINO_ACIDS.each do |acidic|\n if comp[acidic]\n count += comp[acidic]\n end\n end\... |
08df6a223907542713c29939e28f827c | A new instance will be created from the passed in hash. This hash of passed in values will be converted to methods on this instance. The parent clouds describe_instances list will be searched for the first one matching any of this instance's provided unique identifiers. If an instance is found, this instance's properti... | [
{
"docid": "224819459480577ef63379dd6a91e04a",
"score": "0.0",
"text": "def initialize(opts={})\n opts.delete(:id) # metavirt passes an id that we do not want to set\n set_vars_from_options(opts) if opts.is_a?(Hash)\n @target_host = public_ip || internal_ip || ip #set this for the... | [
{
"docid": "77f974efafc21803fa3f54566b8469c7",
"score": "0.6373915",
"text": "def from_hash(hash, options = {})\n instance = new\n instance.client = extract_client!(options)\n\n hash.inject(instance) do |instance, (key, value)|\n method = :\"#{Util.underscore(key)}=\"\n\n ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "9b5c41c1b7ee7e9fd2e047b6ac6d959a",
"score": "0.0",
"text": "def classe_gramatical_params\n params.require(:classe_gramatical).permit(:nome, :sigla, :flgStatus, :inseridoPor, :dataDeInsercao, :atualizadoPor, :dataDeAtualizacao, :idioma_id)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.6980384",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6782743",
"text": "def strong_params\n params.requi... |
3cbb9e517efbce5d3231aed97b2b1d54 | DELETE /information_requests/1 DELETE /information_requests/1.json | [
{
"docid": "66f632c00b6f1cf6b3a497607ef8ac1e",
"score": "0.7634073",
"text": "def destroy\n @information_request = InformationRequest.find(params[:id])\n @information_request.destroy\n\n respond_to do |format|\n format.html { redirect_to information_requests_url }\n format.json { head... | [
{
"docid": "9b46fa4c2212d18c7dc001de0822c9fe",
"score": "0.74168605",
"text": "def destroy\n @info_request.destroy\n respond_to do |format|\n format.html { redirect_to info_requests_url, notice: 'Info request was successfully destroyed.' }\n format.json { head :no_content }\n end\n e... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "7de9e8f3a1b3578cfba703e38fcf0c61",
"score": "0.0",
"text": "def set_subscriber\n @subscriber = Subscriber.find_by(id:params[:id])\n rescue Exception => e\n render_default_error e, 401\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;... |
c3c491ad05c1e6fe8ecff511e5e83a10 | Returns number of sub errors | [
{
"docid": "de237c4d6bcba861b263ba4c095ff702",
"score": "0.6424869",
"text": "def size\n errors.size\n end",
"title": ""
}
] | [
{
"docid": "ad72ae0dfbf00bd03696310f80fd5867",
"score": "0.7632455",
"text": "def error_count\n return @errors.size\n end",
"title": ""
},
{
"docid": "8821f0856761692401664661a8fd4aa8",
"score": "0.75811887",
"text": "def total_error\n @errors.size\n end",
"title": ""
}... |
cdd758ff6cf29bb4efdbac64000633ef | The method to use for quick start samples. Normally this is simply the first nonclientstreaming method defined, but it can be overridden via a gem config. | [
{
"docid": "f37ed8f8ee44285c35f2c3d66d9efe5a",
"score": "0.6429378",
"text": "def quick_start_method\n gem_config = @api.configuration[:gem]\n preferred_method = gem_config[:quick_start_method] if gem_config\n result = methods.find { |meth| meth.name == preferred_method } if preferr... | [
{
"docid": "dc34ee943631937a64f2d5823031e476",
"score": "0.61112595",
"text": "def before_stream\n end",
"title": ""
},
{
"docid": "47cc688ce98a55c3a25a76f39a5e0533",
"score": "0.6003792",
"text": "def run\n raise 'not setup!' unless setup?\n klass = @setup[0].node ? B... |
6dc4a9d89c2c1f20350b16a7cddbb84a | PUT /dog_parks/1 PUT /dog_parks/1.json | [
{
"docid": "3dea5c1e5752b397e7e828229ea6a72c",
"score": "0.65171486",
"text": "def update\n @dog_park = DogPark.find(params[:id])\n\n respond_to do |format|\n if @dog_park.update_attributes(params[:dog_park])\n format.html { redirect_to @dog_park, notice: 'Dog park was successfully upd... | [
{
"docid": "e47cedb6c347c31ec4a5f3a7c358bbb9",
"score": "0.6605538",
"text": "def update\n @dog.update(dog_params)\n render json: {dog: @dog}\n end",
"title": ""
},
{
"docid": "222ba1d2e4d37f12357c9928442fa34a",
"score": "0.6568188",
"text": "def update\n @pet = P... |
9351a769460c892e658085f90fa06bae | DELETE /splats/1 DELETE /splats/1.json | [
{
"docid": "65892c4f8b34c8ad712aed84f9da15a5",
"score": "0.77545214",
"text": "def destroy\n @splat = Splat.find(params[:id])\n @splat.destroy\n\n respond_to do |format|\n format.html { redirect_to splats_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "57c523140da2a4fc2d0a94b58eddcdb5",
"score": "0.6678788",
"text": "def destroy\n @spt.destroy\n respond_to do |format|\n format.html { redirect_to spts_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "e922125fa94fb320d14a4d0f415... |
763907b175a214e721d182a351dd50f8 | XXX need to fix documentation | [
{
"docid": "b4b52280af6637c0a57c884ef29b5a90",
"score": "0.0",
"text": "def initialize(stream, options = {})\n @stream = HTMLInputStream.new(stream, options)\n\n @states = {\n :data => :dataState,\n :entityData => :entityDataState,\n :tagOpen => :tagOpenState,\n :cl... | [
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",
"score": "0.66693646",
"text": "def bodystmt; end",
"title": ""
},
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",
"score": "0.66693646",
"text": "def bodystmt; end",
"title": ""
},
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3... |
cc49d3cc372c21a7508932e83f28a41c | Get the local or global defined failed authentication handler for the JWT handler. | [
{
"docid": "0b23ad6ae7bf6807e07c7c318a2a0b69",
"score": "0.74999833",
"text": "def failed_handler\n config(:failed, :failed_auth_handler)\n end",
"title": ""
}
] | [
{
"docid": "c317fa3fc72441c1c16d808a888d3b1e",
"score": "0.66269183",
"text": "def handle_authentication_failure\n end",
"title": ""
},
{
"docid": "1377c452ccac6d0d3e1f6977f6791d81",
"score": "0.62895966",
"text": "def malformed_handler\n config(:malformed, :malformed_aut... |
7d589e2793ff64d6271c1b3469d2327a | applies discount to total | [
{
"docid": "0860321d07e9e5ecf0559032afe35c65",
"score": "0.85456055",
"text": "def apply_discount\n # checks if there is any discount\n if discount == 0\n \"There is no discount to apply.\"\n else\n #applies discount\n @total = @total * (1-@discount/100.0)\n # converts back to int... | [
{
"docid": "8b386418e37eeb9e16a0874c7d58bb4d",
"score": "0.85625416",
"text": "def apply_discount\n if @discount == 0\n \"There is no discount to apply.\"\n else\n @discounted_price = (self.total * @discount * 0.01)\n @total -= @discounted_price\n \"After the discount, the total come... |
960e2004b596d0737d18db5f1f066033 | Before refactoring def test_get_name | [
{
"docid": "b788bc674b2df75f1bb51de9ee910018",
"score": "0.72960025",
"text": "def test_get_name\n assert_equal(\"Red Devils\", @team.name())\n end",
"title": ""
}
] | [
{
"docid": "edf8246771315c9b62554266009a8757",
"score": "0.7902718",
"text": "def test__getting_name\n result = get_name(@person5)\n assert_equal(\"Kenny\", result)\n end",
"title": ""
},
{
"docid": "9b0fd4aadfba6ef0a585c41a57a33792",
"score": "0.78168124",
"text": "def test_g... |
23428e18fb414169820cdf0f2f58cad0 | Is this a crew role, for use with the adminCrew position | [
{
"docid": "b9808378f671d143a3dc6f29027fd25f",
"score": "0.0",
"text": "def crew?\n name == \"Crew\"\n end",
"title": ""
}
] | [
{
"docid": "d7ff84743d8326bd6e79de59991c3957",
"score": "0.874635",
"text": "def crew?\n self.role == \"crew\"\n end",
"title": ""
},
{
"docid": "18e9f62d0aa3b3927754468135282c54",
"score": "0.77140063",
"text": "def role?\n true\n end",
"title": ""
},
{
"docid": ... |
05f99761925676e0c63e7584214bbced | Given a set of nonoverlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Submission Details 151 / 151 test cases passed. Status: Accepted Runtime: 132 ms Submitted: 0 minutes ago | [
{
"docid": "6205965a534defff5cbf27e4a870e5ac",
"score": "0.0",
"text": "def overlaps(first, second)\n return first.start.between?(second.start, second.end) ||\n first.end.between?(second.start, second.end) ||\n second.start.between?(first.start, first.end) ||\n second.en... | [
{
"docid": "f871e075d06d9bff961e218dde7eda88",
"score": "0.797851",
"text": "def insert(intervals, new_interval)\n intervals << new_interval\n intervals.select { |x| x.end < new_interval.start } +\n [intervals.select { |x| overlaps?(x, new_interval) }.reduce { |acc, x|\n Interval.new([ac... |
4d4e61f1bc6a08a0669520a690a34dd4 | Is this webhook event firing for the magic label? | [
{
"docid": "21607ae528a30aabe8d6be5049e26717",
"score": "0.8132144",
"text": "def event_for_magic_label?\n args[:label_name] == config['magic_label_name']\n end",
"title": ""
}
] | [
{
"docid": "544749696dac2ef9d83723325f183b33",
"score": "0.8136121",
"text": "def event_for_magic_label?\n args[:label_name] == config[\"magic_label_name\"]\n end",
"title": ""
},
{
"docid": "ce0e61eb609f842d1282b24395f89470",
"score": "0.6998315",
"text": "def labeled?\n gi... |
e754d38702e1b1778da5752dcb7f1a35 | Returns the current validation context on the stack if valid for this model, nil if no RuleSets are defined for the model (and no context names are on the validation stack), or :default if the current context is invalid for this model or no contexts have been defined for this model and no context name is on the stack. | [
{
"docid": "c8bd2cae83c4067a119b0df53a3360f2",
"score": "0.76637477",
"text": "def current_context\n context = Validation::Context.current\n valid_context?(context) ? context : :default\n end",
"title": ""
}
] | [
{
"docid": "db11a2fc9898e055780d46b2e2cb9a1b",
"score": "0.6260482",
"text": "def context(context_name)\n rule_sets[context_name]\n end",
"title": ""
},
{
"docid": "ddf52d1b7416b59648790f4d33e879a3",
"score": "0.6192094",
"text": "def context\n @context ||= Activ... |
e097285433aaef00984f34aaec0e35fa | TODO 's nach Aufgabenstellung | [
{
"docid": "df2f356044f33e2bbfd52402a1f2e536",
"score": "0.0",
"text": "def initialize(produkt, preis)\n @produkt = produkt\n @preis = preis\n end",
"title": ""
}
] | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.76511735",
"text": "def private; end",
"title": ""
},
{
"docid": "65ffca17e416f77c52ce148aeafbd826",
"score": "0.68218815",
"text": "def schubert; end",
"title": ""
},
{
"docid": "0b8b7b9666e4ed32bfd448198778e4e9"... |
438afc237d01e394bf53606f2bf479e5 | Test for available modes. | [
{
"docid": "8009776b9cf032291fe14f1e65e00d7a",
"score": "0.7026118",
"text": "def test_defined_modes\n modes = Malody::Mode.constants\n defined_modes = modes & Malody::Chart.constants\n defined_ids = defined_modes.map do |mode| Malody::Mode.const_get(mode) end\n refute_empty defined_modes, \... | [
{
"docid": "59140f698706f14cb8dbf969f57894e5",
"score": "0.7959945",
"text": "def modes?\n !@modes.nil? && !@modes.empty?\n end",
"title": ""
},
{
"docid": "2a0a03c01b60962b64d0c98a0b229004",
"score": "0.7736076",
"text": "def support?(mode)\n @modes.keys.include... |
7255d4664f0737537d62472276f8a1ad | Implement reversible action before you use it! | [
{
"docid": "ef3568cae1a2f0df3909e45f66bfe2a9",
"score": "0.0",
"text": "def remove_max_length(table, *arr_cn_len)\n execute sql_remove_max_length(table, *arr_cn_len)\n end",
"title": ""
}
] | [
{
"docid": "482e0cf01577c15f52986464e29bdaf3",
"score": "0.68050635",
"text": "def reverse!() end",
"title": ""
},
{
"docid": "482e0cf01577c15f52986464e29bdaf3",
"score": "0.68050635",
"text": "def reverse!() end",
"title": ""
},
{
"docid": "09242cc6d0b6c504a6eced0fa9b650... |
7971e3a7e5fe4c461681963f2796e5f3 | Adds he given double precision float (float32) to this format's buffer. The endianness is controlled by setting .endian to :little or :big Floats should be an (array of) number, not a string. Returns the new position index, and the old position index | [
{
"docid": "0ce24787d3fa5c7ec2d8fb62c59ae2f3",
"score": "0.5479271",
"text": "def float(*floats)\n format = ( little_endian? ? 'E*' : 'G*')\n return string(singles.pack(format))\n end",
"title": ""
}
] | [
{
"docid": "307590681e894bd86ad6e60160c44b1f",
"score": "0.6459472",
"text": "def float32(val)\n raise ArgumentError, \"float32() requires a Numeric argument\" \\\n unless val.is_a?(Numeric)\n\n @io.write([val].pack(\"g\"))\n\n self\n end",
"tit... |
1e2989ead56384f06f9a4e8779c33fb2 | expects objects in the form of ["klass", "id"] | [
{
"docid": "6f3eb33d3ebb10b35d45885f14001a84",
"score": "0.64951",
"text": "def retrieve_objects(objects)\n objects.map do |klass, id|\n klass.classify.constantize.find(id)\n rescue ActiveRecord::RecordNotFound\n # record has already been deleted, no prob...\n logger.debug 'record a... | [
{
"docid": "4093ffbe311eec8e6afe0989b1b7c848",
"score": "0.64185655",
"text": "def collect_objects\n results = []\n generate_objects! if object_ids.nil?\n begin\n object_ids.each do |model_name, ids|\n results << model_name.to_s.constantize.find(ids)\n end\n results.flatte... |
b00b28cdacdb297610aa19f78554ea7d | Updates the marker for the given receipt type to point to the specified event. | [
{
"docid": "4e52a83d1192a9f3b09f325858d17e4f",
"score": "0.5640344",
"text": "def set_receipt(room, event, type = 'm.read', data = {})\n make_request(\n :post,\n \"/rooms/#{room}/receipt/#{type}/#{event}\",\n content: data\n ).code == 200\n end",
"title"... | [
{
"docid": "6341fc5499df6e9819ba2c9cfdf9d638",
"score": "0.57976377",
"text": "def marker_type= marker_type\n @marker_type = marker_type\n end",
"title": ""
},
{
"docid": "0ce3a59e3a73f95ccccca1d9d3cf5905",
"score": "0.57517165",
"text": "def update_event(event); end"... |
0d9952ec7fa5f6fbcd44e8f75d256e0e | End run Go through each row in the CSV and find columns that match the regex pattern. Add these matches to an array for printing | [
{
"docid": "307cc9e166d6cd000008b09ad9d1418a",
"score": "0.7660174",
"text": "def grep_csv(file)\n csv = CSV.read(file)\n csv.each do |row|\n if row[@opts[:col]] =~ @regex\n @matches.push(row)\n end\n end\n end",
"title": ""
}
] | [
{
"docid": "4789aabe450d68a16327df3677cc04a7",
"score": "0.62689835",
"text": "def csv_process_row_fields(pattern_data, row, index)\n orig_row = @csv_row_arr.clone\n\n # counting back from the end, remove blank cels. \n # but if there are blank cells in the middle, leave them (ick!... |
cb006c148fee6ff6a755f7616ca41878 | sum of digits is divisable by 3 | [
{
"docid": "b3e6fba4c6b2e0551877ec7799dd4c79",
"score": "0.0",
"text": "def test_that_some_other_big_number_is_not_a_prime\n assert_equal false, PrimeUtil.prime?(453969)\n end",
"title": ""
}
] | [
{
"docid": "ca6f3f5935ad0bf2a0f726027c67de69",
"score": "0.75410247",
"text": "def sum3(pos_nums)\n pos_nums.digits.sum\nend",
"title": ""
},
{
"docid": "27914f8fab4b108c116b66986bb17be5",
"score": "0.7331094",
"text": "def sum_of_3s_and_5s\n a = []\n (1...1000).each do |num|\n ... |
7804f9c173a1ed807b04dca37d3383a1 | Determine whether the application is running on Google App Engine Standard Environment. | [
{
"docid": "bcb6174fe695971406bcd8807824e445",
"score": "0.8394453",
"text": "def app_engine_standard?\n app_engine? && env[\"GAE_ENV\"] == \"standard\"\n end",
"title": ""
}
] | [
{
"docid": "aa473b63b99c560e468994aaeba43115",
"score": "0.77977496",
"text": "def app_engine?\n env[\"GAE_INSTANCE\"] ? true : false\n end",
"title": ""
},
{
"docid": "4aee7d5c526e4858c5802ea90acbea0b",
"score": "0.74828863",
"text": "def app_engine_flexible?\n ap... |
b70d3b75a034b3238f8e309072dd82ba | Rotate a range, subset of pages in a PDF document Rotate a range of specific pages in a PDF document by a multiple of 90 degrees | [
{
"docid": "e30edb6c8c147db5dadbb72a726d1940",
"score": "0.6920452",
"text": "def edit_pdf_rotate_page_range(input_file, rotation_angle, page_start, page_end, opts = {})\n data, _status_code, _headers = edit_pdf_rotate_page_range_with_http_info(input_file, rotation_angle, page_start, page_end, opts... | [
{
"docid": "78658a2cfa717404bdbd37eb7c439911",
"score": "0.65086627",
"text": "def rotate(angle, x, y, &block)\n cur_page.rotate(angle, x, y, &block)\n end",
"title": ""
},
{
"docid": "b65f31608dacbe7ffae3cd3d333180e8",
"score": "0.6292974",
"text": "def edit_pdf_rotate_page_... |
031a696c1db19453a60ec72aa7b56ee4 | Defreshen all items in the collection If you want to defresh the collection by yourself, call this | [
{
"docid": "1adca1a70d6aafa1ad79618b631c4e8c",
"score": "0.6026248",
"text": "def defreshen(actor)\n each { |item| item.defresh_for(actor) if item.respond_to?(:defresh_for) and !item.fresh_visit }\n true\n end",
"title": ""
}
] | [
{
"docid": "e08eb65c0d496a29625ff2b7c356ca2e",
"score": "0.75214815",
"text": "def reset\n @collection = []\n end",
"title": ""
},
{
"docid": "e08eb65c0d496a29625ff2b7c356ca2e",
"score": "0.75214815",
"text": "def reset\n @collection = []\n end",
"title": ... |
99b420330f18c5d6a32e31fd18b7ba40 | cette methode va getter l'addresse email | [
{
"docid": "6c560c037ed89bc6c6f5b53a82f3aaf4",
"score": "0.0",
"text": "def get_all_the_urls_of_val_doise_townhalls(page_url)\n tab = []\n doc = Nokogiri::HTML(open(page_url))\n tab_lien = doc.css(\"a\").select{|link| link['class']==\"lientxt\"}\n lien =\"http://annuaire-des-mairies.com/\"\... | [
{
"docid": "0f0e89a71af110d828a6f3b8a357b5a7",
"score": "0.82392",
"text": "def email; @email; end",
"title": ""
},
{
"docid": "63697a93595a2d87f82c3b6ee44b3c6e",
"score": "0.8051719",
"text": "def email\n\t\treturn @email\n\tend",
"title": ""
},
{
"docid": "aed70181934b2... |
731231b6e2f5f64dfd80a64fd95d8394 | GET /aircraft_documents GET /aircraft_documents.json | [
{
"docid": "1ef9726988cf770b07a88b95bb15cb15",
"score": "0.7733749",
"text": "def index\n @aircraft_documents = AircraftDocument.all\n end",
"title": ""
}
] | [
{
"docid": "df1a4689ef59e8c193f61deac26a89d4",
"score": "0.69409686",
"text": "def get_document\n @bookalope.http_get(@url + '/files/document')\n end",
"title": ""
},
{
"docid": "d09d3eedcae2b990a7e254a077b5d6b2",
"score": "0.6876762",
"text": "def index\n if @documentable = f... |
a8713ccb998920e555fdc7875d312b99 | Tell Ruby ISBNdb to use a specified key. If the key does not exist, it is added to the set and set as the current key. | [
{
"docid": "615544b51ec062ce7e6214db1d8149ff",
"score": "0.61481375",
"text": "def use_key(key)\n @current_index = @access_keys.index(key) || @access_keys.push(key).index(key)\n current_key\n end",
"title": ""
}
] | [
{
"docid": "793aab5ef9a448f17083e9029fbc0b3a",
"score": "0.65889233",
"text": "def add_key(key)\n @key = key\n end",
"title": ""
},
{
"docid": "70477166d04f2c707f4205d89e8b13f7",
"score": "0.6573516",
"text": "def redis_kv_set key\n\t\nend",
"title": ""
},
{
"d... |
8070f41f7b57cc3efb7735a64e1b76b7 | requires_access_to target_platform debian_ruby_name Convert all gems that are required by package build with the debian packager | [
{
"docid": "c2134d49cdc61d9bf0279592f8720e33",
"score": "0.6825289",
"text": "def convert_gems(gems, options = Hash.new)\n Packager.info \"#{self.class} Convert gems: #{gems} with options #{options.reject { |k,v| k==:deps }}\"\n if gems.empty?\n ... | [
{
"docid": "4dba44b5aa9c612f83c24cbfa14f0a85",
"score": "0.6635777",
"text": "def convert_gems(gems, options = Hash.new)\n Packager.info \"Convert gems: #{gems} with options #{options.reject { |k,v| k==:deps }}\"\n if gems.empty?\n return\n ... |
08d2db0314d3e7b035cc0fff4c1cbeb0 | The above assumes you have a single attachment in your model like this: has_one_attached :avatar (change attachment name accordingly). Put this method in the model which has the attachment. | [
{
"docid": "d23cb8b6c17900b10cbcd55ae30a398a",
"score": "0.0",
"text": "def photos\n if self.images.attached?\n self.images.collect { |image| [ \"url\", Rails.application.routes.url_helpers.rails_blob_path(image, only_path: true) ] }\n else\n nil\n end\nend",
"title": ""
}
] | [
{
"docid": "f09a869d7a11a9bf69ddca48486dd5b4",
"score": "0.6629285",
"text": "def default_avatar\n not object.avatar.present?\n end",
"title": ""
},
{
"docid": "95b72f745fc31f7ecf3e9f59ae788da4",
"score": "0.6626883",
"text": "def avatar\n avatar_id.nil? ? Photo.last : Photo.f... |
5cb1c45fb91eb0030da7ab7d84220e2a | The number of days to retain Performance Insights data. This setting is only for nonAurora MultiAZ DB clusters. Valid Values: `7` month 31, where month is a number of months from 123. Examples: `93` (3 months 31), `341` (11 months 31), `589` (19 months 31) `731` Default: `7` days | [
{
"docid": "54124d08aca0e5c11b6ddf2a9732a15e",
"score": "0.6108436",
"text": "def performance_insights_retention_period\n data[:performance_insights_retention_period]\n end",
"title": ""
}
] | [
{
"docid": "530b16a5efd602eedcd3a8492dfaab8c",
"score": "0.65840477",
"text": "def retention_days\n @retention_days.nil? ? 0 : @retention_days.to_i\n end",
"title": ""
},
{
"docid": "6fe3f136bdc16ac553c515ee5c3be826",
"score": "0.6233624",
"text": "def days\n self.to_i * 8... |
637b398cdeae376b7cba6ef22c440011 | Returns true if the supervisor requests a watchdog | [
{
"docid": "d3de58b81720089f7b4ff99d9c535a7d",
"score": "0.7729143",
"text": "def watchdog_enabled?\n memoize(:watchdog_enabled?) do\n break if ENV.has_key?('WATCHDOG_PID') && ENV.has_key?('WATCHDOG_USEC')\n break if ENV['WATCHDOG_PID'].to_i != Process.pid\n break if ENV['WATCHDOG_USEC... | [
{
"docid": "fbcc5e8f67e9650e553cbffa03d47b27",
"score": "0.77096874",
"text": "def watchdog?\n ENV.include?(\"WATCHDOG_USEC\") &&\n (!ENV.include?(\"WATCHDOG_PID\") || ENV[\"WATCHDOG_PID\"].to_i == $$)\n end",
"title": ""
},
{
"docid": "0353d0876fc9b3ff75926cc25f78951d",
"... |
3c69390e8a112138ad3fe774c30024d7 | Returns a Promise. Lock the account with the provided +address+ | [
{
"docid": "4ef544183e3aa591bbdc0ed033d66b14",
"score": "0.8590834",
"text": "def lock_account!(address)\n make_promise(@core.web3.JS[:personal], 'lockAccount', address)\n end",
"title": ""
}
] | [
{
"docid": "b6fe84c1b8314b4218262ed51f32f775",
"score": "0.6531391",
"text": "def lock(address)\n payload = Base58.decode(address).to_s(16)\n public_key_hash = payload.slice(0, payload.length - 4)\n self.public_key_hash = public_key_hash\n end",
"title": ""
},
{
"docid": "e3723e97c... |
be7c43f7424580c5ef3c2947eb916cf7 | returns the path to the command as specified by line or nil if the command does not exist, or it did not produce the right result | [
{
"docid": "fcedc917edafe8bfbb551af03598de82",
"score": "0.6606889",
"text": "def where_with_output(line, output)\n cmd = line.split[0]\n p = where(cmd)\n return unless p\n out = %x(#{File.join(p,line)})\n if out =~ output\n return p\n else\n return\n end\n end",
"tit... | [
{
"docid": "a453f4a25cec2d86670b3eab9968d099",
"score": "0.6760287",
"text": "def which(cmd)\n # Get the possible exetensions (for windows case).\n exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']\n # Look for the command within the executable paths.\n ENV['PATH'].split(File::PATH_SE... |
200840607a0a5396e8910b599c7b7702 | Los filtros de la busqueda avanzada y de los resultados | [
{
"docid": "5e82a01b096fcf6c0ef53af180f03806",
"score": "0.623928",
"text": "def filtros_iniciales\n @reinos = Especie.select_grupos_iconicos.where(nombre_cientifico: Busqueda::GRUPOS_REINOS)\n @animales = Especie.select_grupos_iconicos.where(nombre_cientifico: Busqueda::GRUPOS_ANIMALES)\n @pla... | [
{
"docid": "ca414ff0150d2c9bfa275ef6e28e1026",
"score": "0.74915487",
"text": "def busca\n\t\t@anuncios = Anuncio.where(\"descricao LIKE :filtro OR titulo LIKE :filtro OR categoria LIKE :filtro\", {:filtro => \"%#{params[:filtro]}%\"})\n\tend",
"title": ""
},
{
"docid": "be17789db7943738941b... |
d39efaad0ff1d40fac6e57bda2a4e41c | Override the devise valid_password? method so that we can use Django passwords here as well. Import them straight in and we will check for Devise passwords, otherwise check against Django's format. | [
{
"docid": "615b03f6a1b242f64b4a85f75b657e68",
"score": "0.6861039",
"text": "def valid_password?(password)\n begin\n super(password)\n rescue BCrypt::Errors::InvalidHash\n type, salt, enc_pass = encrypted_password.split('$')\n Digest::SHA1.hexdigest(\"#{salt}#{password}\") == enc_p... | [
{
"docid": "a439706996251e64d6bb2c3d7784e584",
"score": "0.7733573",
"text": "def valid_password?(password)\n if !has_devise_password? && ldap_password?\n if verify_legacy_password(ldap_password, password)\n convert_password_to_devise(password)\n else\n return false\... |
1c3b77cd64faa667df9f24f67f59677c | start file processing worker. | [
{
"docid": "5e157a30be31db6ccca19c9d0ed8d393",
"score": "0.0",
"text": "def start_search_worker\n if Rails.application.credentials.dig(:heroku, Rails.env.to_sym).present?\n FileProcessingWorker.new.perform(id)\n else\n FileProcessingWorker.perform_async(id)\n end\n end",
"title":... | [
{
"docid": "ae48d2eaad726595739469a51191df09",
"score": "0.7141836",
"text": "def run\n STDERR.puts \"Started #{Time.new}\";\n @fhin = File.open(@file, 'r');\n @fhout = File.open(@file + \".out\", 'w');\n process_file();\n @fhout.close();\n @fhin.close();\n STDERR.puts \"Finished #... |
e8859f08563ee9fe68326187dae20fe2 | callseq: ary.nitems > integer Returns the number of non+nil+ elements in _ary_. May be zero. [1, nil, 3, nil, 5].nitems => 3 | [
{
"docid": "a383cc351a11ccb41164985e7749dde3",
"score": "0.74115914",
"text": "def nitems\n `for(var i=0,l=this.length,result=0;i<l;++i){if(this[i]!==nil){result++;};}`\n return `result`\n end",
"title": ""
}
] | [
{
"docid": "9a4b99b3fc792d9b70960b005f60c239",
"score": "0.8112723",
"text": "def nitems\n # TODO - seems like this could be optimized \n # to run without unpacking each item...\n count = self.length\n nil_array = self.nil_value\n each do |array|\n count -= 1 if array == nil_array\n ... |
fe2ae79ba63c09d8a6b1559e0b843c55 | => return data responsables claim | [
{
"docid": "e132e02fc24f4453872c062b304abf00",
"score": "0.0",
"text": "def data_responsables\n team.data_responsables\n end",
"title": ""
}
] | [
{
"docid": "e1892c7a78665eb95c4bb4fd8db76aae",
"score": "0.7023846",
"text": "def get_data()\t\n\tend",
"title": ""
},
{
"docid": "4df587f9f9bef67d92d559efb869cf7a",
"score": "0.6925267",
"text": "def data\n retrieve_data\n end",
"title": ""
},
{
"docid": "d034e8e7906... |
b387967335bc132c9c7764e5896fef49 | Hide the main heading; it is output by the view rather than letting the layout do it so that both heading and body text can be wrapped in a single DIV for CSS styling of the whole text block, if required. | [
{
"docid": "f5303e68518af4bcf52b76acd67fd571",
"score": "0.7100032",
"text": "def skip_main_heading?\n true\n end",
"title": ""
}
] | [
{
"docid": "da1ced1779e80536f8aaeceead8008df",
"score": "0.7028706",
"text": "def skip_main_heading?\n false\n end",
"title": ""
},
{
"docid": "52f39addebf6bff9be772be8fb9ba124",
"score": "0.6103869",
"text": "def hide; end",
"title": ""
},
{
"docid": "52f39addebf6bff... |
dc2f120b86ff3d9974e559448c74b118 | converts temperature in celcius to fahrenheit | [
{
"docid": "658d3eef93272196757679ca67876519",
"score": "0.0",
"text": "def ctof (temp)\n temp * 9.0/5.0 + 32.0\nend",
"title": ""
}
] | [
{
"docid": "52b4d9a8a77085ac39d8983515df33b4",
"score": "0.8676823",
"text": "def convert_fahrenheit_to_celsius (temperaturef)\n tempc = ((temperaturef.to_i - 32) * 5/9)\n puts \"The temperature in celsius is #{tempc}\"\n end",
"title": ""
},
{
"docid": "ea6dc0dd9c07c0e244c54b7fb9... |
fa062d81c32dca29f0748d427abb04f7 | => output: [["cars", "racs", "scar"], ["four"], ["for"], ["potatoes"], ["creams", "scream"]] HINT: you can quickly tell if two words are anagrams by sorting their letters, keeping in mind that upper vs lowercase doesn't matter | [
{
"docid": "7fb2c1224dc9ce9aa56035e27e73ccf7",
"score": "0.7848394",
"text": "def combine_anagrams(words)\n\tsorted = Hash.new\n\tk=0\n\twords.each { |c| sorted[k]=c.downcase.chars.sort.join; k=k+1 }\n\tanagram = Array.new\n\ta = Array.new\n\tb = Array.new\n\ti=0\n\tsorted.invert.each { |w,y| a[i] = so... | [
{
"docid": "16444018e09c20f261def0b563825534",
"score": "0.86746496",
"text": "def combine_anagrams(words)\n Array anagrams = []\n words.each {|x|\n flag = false\n anagrams.collect {|y|\n if x.downcase.chars.to_a.sort == y[0].downcase.chars.to_a.sort then\n ... |
0fc23e68c361ddcd7c8327f915b6ed67 | parser rule column_name (in plsql.ruby.g) 988:1: column_name : sql_identifier ; | [
{
"docid": "639a13f7168c389aca52299f5fd9b238",
"score": "0.7810742",
"text": "def column_name\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 185 )\n return_value = ColumnNameReturnValue.new\n\n # $rule.start = the first token seen before matc... | [
{
"docid": "25a41718649fff9793e8885cea67cf12",
"score": "0.7041373",
"text": "def probable_column_name(c)\n case c\n when Symbol\n _, c, a = split_symbol(c)\n (a || c).to_sym\n when SQL::Identifier\n c.value.to_sym\n when SQL::QualifiedIdentifier\n col = c... |
0274d3e72a89ec4e65e2cc180c74303b | used to render rss. | [
{
"docid": "504d0703fe36ff3b94be3823d3ff99a8",
"score": "0.0",
"text": "def show\n index\n end",
"title": ""
}
] | [
{
"docid": "2c58f9a4af35079f9fd83548b24412eb",
"score": "0.7829048",
"text": "def rss\n\t\theaders[\"Content-Type\"] = \"text/xml; charset=utf-8\"\n\t\trender :layout => false\n\tend",
"title": ""
},
{
"docid": "5a6087c7b18755f4c63e89e6f807c86a",
"score": "0.73836446",
"text": "def r... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "5ac104a80f1ba9e109bbd9ee16c12df5",
"score": "0.0",
"text": "def boi_duong_qpan_params\n params.require(:boi_duong_qpan).permit(:name, :description, :enabled)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74768823",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "36956168ba2889cff7bf17d9f1db41b8",
"score": "0.71700543",
"text": "def set_param_whitelist(*param_list)\n self.param_whitelist... |
b21c05ec7f6bc5d0dba4c0de745ea41b | Determine if the catalog build was successful. | [
{
"docid": "279f70e39116956b75cea0ee37c3b2b3",
"score": "0.6018558",
"text": "def valid?\n !@catalog.nil?\n end",
"title": ""
}
] | [
{
"docid": "0f2b4721c85ee6922a84cde34ecf8f29",
"score": "0.6787731",
"text": "def succeeded?\n File.exists?(File.join(self.target_path, @actual_tar_name))\n end",
"title": ""
},
{
"docid": "3bdc0695f1f0b9c691cfa97c71a5b929",
"score": "0.6479615",
"text": "def is_built\n ... |
6ed19e5cd13f51f92d3269d1fda97959 | k <= minimum productsum <= 2k | [
{
"docid": "9e4dc6ae53a17510086d8716a1971beb",
"score": "0.0",
"text": "def all_factorizations(num)\n Prime.prime_division(num)\nend",
"title": ""
}
] | [
{
"docid": "90fec84480bb188666a29302006aa406",
"score": "0.6921905",
"text": "def sum_mults(n, k)\n n = (n - 1) / k\n return k * n * (n + 1) / 2\nend",
"title": ""
},
{
"docid": "3a9f1b2cfef63078b14d44b8ccfa43c0",
"score": "0.6827259",
"text": "def recessive k, m, n\n all = k + ... |
0cac0dab7bd43510abcddf9ffe6c5e82 | Never trust parameters from the scary internet, only allow the allowed list through. | [
{
"docid": "a930a59565c6b981b4a022928b0d2cfc",
"score": "0.0",
"text": "def member_params\n params.require(:member).permit(:first_name, :last_name, :belt_id, :school_id, :comment, :is_active, :is_teacher, :is_quark, :is_kid, :is_teen)\n end",
"title": ""
}
] | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.7503485",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "09edac0c32ae61b998679363610353e6",
"score": "0.7364273",
"text": "def url_allowlist; end",
"title": ""
},
{
"docid"... |
78b8cf25db5deaf2e8a01294c5edd7a4 | Loads the specified attributes file and merges the results into attrs. A block may be given to specify attrs as well; it will be evaluated in the context of an Attributes instance. | [
{
"docid": "e29f22b32c67fdb8d120d9a7fd0f96ff",
"score": "0.67735535",
"text": "def attributes(attributes_name=nil, &block)\r\n attributes = _package_.load_attributes(attributes_name)\r\n \r\n if block_given?\r\n attributes.instance_eval(&block)\r\n end\r\n \r\n @attr... | [
{
"docid": "7e7bbbd5bea3d02566adaf82643e48f3",
"score": "0.7025532",
"text": "def ingest_attributes attr_file\n attr_files_array = attr_file.force_array\n attrs = {}\n attr_files_array.each do |f|\n if f.include? \":\"\n file = f.split(\":\")\n filename = file[0]\n block_name = file... |
a25bf63639221551176e34b8af7d81bf | POST /scan_files POST /scan_files.json | [
{
"docid": "82361fc2cc045b874ef57a4025a5d865",
"score": "0.58926785",
"text": "def create\n @scan_file = ScanFile.new(scan_file_params)\n\n respond_to do |format|\n if @scan_file.save\n scanr = ScanrCustom.new 'YOUR_TOKEN', 'eng'\n @scan_file.result = scanr.ocr @scan_file.avatar... | [
{
"docid": "dda487064c1cab7cda40536481c8541c",
"score": "0.65356797",
"text": "def create\n params[:upload].each do | upload |\n file = File.join(\"tmp/\", (0...10).map{(65+rand(26)).chr}.join+\"-\"+upload.original_filename)\n FileUtils.mv upload.tempfile.path, file\n Scan.create_by_fi... |
a82d5eef81415110802924873ae65fef | Should not exists since it identifies types with multiple sub types. Iterates over the sub types. def each_type(&ruby_block) No ruby block? Return an enumerator. return to_enum(:each_type) unless ruby_block A ruby block? Apply it on the base. | [
{
"docid": "849e56f59e07c652f92820773d73d4ec",
"score": "0.8473261",
"text": "def each_type_deep(&ruby_block)\n # No ruby block? Return an enumerator.\n return to_enum(:each_type_deep) unless ruby_block\n # A ruby block? First apply it to current.\n ruby_block... | [
{
"docid": "e658c8c765abca5878a0affd6d0b1813",
"score": "0.94944143",
"text": "def each_type(&ruby_block)\n # No ruby block? Return an enumerator.\n return to_enum(:each_type) unless ruby_block\n # A ruby block? Apply it on each sub type.\n @types.each(&ruby_b... |
c49e51e8b1176074965740a3c88b7918 | when mark authenticates to the service | [
{
"docid": "476e6c1cd5f193fb2720fe9cb7f32aa7",
"score": "0.0",
"text": "def submit\n\n logger.tagged(@mark.notification_tag, [controller_name, action_name].join('|')) {\n logger.info 'Data Submission Attempt' }\n\n respond_to do |format|\n if params[:id]\n if configatron.campaigns... | [
{
"docid": "7084fe77c7c433c1759507f1cdb9dda8",
"score": "0.72053987",
"text": "def preauthenticate; end",
"title": ""
},
{
"docid": "67979b1bf24a7499f7c6a62186b1dcf7",
"score": "0.71079224",
"text": "def token_authenticated?; end",
"title": ""
},
{
"docid": "11aff64932830... |
e7e96c23682c43bc36767d8cd794192c | getting quantity of seconds from DateTime objects | [
{
"docid": "69965ec29d9bf1aa3a8b940cc00db911",
"score": "0.72944564",
"text": "def quantity_of_seconds(time)\n time.hour * 60 + time.minute * 60 + time.second + time.second_fraction\nend",
"title": ""
}
] | [
{
"docid": "010ed923a6e169790d1127cea7fbc764",
"score": "0.72232616",
"text": "def seconds(num)\n t = current_time + num\n {\n type: :datetime,\n value: t.iso8601\n }\n end",
"title": ""
},
{
"docid": "980e9857bc1008d3ed1c5ea8d52b2051",
"score": "0.7148663... |
058566ce29592101c2b0ed621805eae6 | Test for removing form field | [
{
"docid": "ba0caaf262a074caaea94aaa77aa7f26",
"score": "0.59858537",
"text": "def test_delete_form_field\n filename = 'FormFilled.docx'\n remote_name = 'TestDeleteFormField.docx'\n index = 0\n\n st_request = PutCreateRequest.new remote_test_folder + test_folder + '/' + remote_name, ... | [
{
"docid": "dfcfab9549f82f19e03fbdd221dc04c0",
"score": "0.71643376",
"text": "def remove_field(key)\n @pdf_form.removeField(key.to_s)\n end",
"title": ""
},
{
"docid": "0da904ac00154be93b39880d4f786aa4",
"score": "0.70429033",
"text": "def delete_field!(field_name); end",
... |
a66662afa466c80f9ba9c117af84f317 | Return array of params hashes for ants default: empty array Should be redefined in child class | [
{
"docid": "eb582726b71fb055d206c38e8accbec8",
"score": "0.0",
"text": "def search_ants(params)\n []\n end",
"title": ""
}
] | [
{
"docid": "ef037e61f2c352891e6c1e4ed553eab1",
"score": "0.7694537",
"text": "def params_for_ant\n params.inject({}) do |hash,kv| \n if !inherited_params || inherited_params.include?(kv[0])\n hash[kv[0]]=kv[1]\n end\n hash\n end\n end",
"title": ""
},
{... |
718d2e9a0eca69662172bb0939944b31 | Public: Run in Incremental mode which only includes opeartions like Additions to both services. Returns: Void | [
{
"docid": "b06cc23bb255f61cbd1a324be1898cc0",
"score": "0.0",
"text": "def run\n # Process Starting Time\n starting = Process.clock_gettime(Process::CLOCK_MONOTONIC)\n\n # Get records from national service. They'll be fetched from a certain time onwards.\n new_nat_assertions = natio... | [
{
"docid": "2fe1dc6e7693494134bc3695e0075f4f",
"score": "0.5920361",
"text": "def start\n run_all if @options[:all_on_start]\n end",
"title": ""
},
{
"docid": "b8ae36376bae8a77d1fe99c48c19e52f",
"score": "0.5916442",
"text": "def start\n run_all if options[:all_on_start]... |
ed73f219fab61cef69b625fc3e69bb03 | update_item Updates input during the item selection. | [
{
"docid": "51488ad90b92e4bf2e69c5b1ef065c13",
"score": "0.6557012",
"text": "def update_item\n # set last active\n @last_active = false\n # if B is pressed\n if Input.trigger?(Input::B)\n # play cancel sound\n $game_system.se_play($data_system.cancel_se)\n # set active\n ... | [
{
"docid": "1096285d6f3f7ba88621bfa943e82110",
"score": "0.7454876",
"text": "def update_roster_item(item)\n @gui.item_update item\n end",
"title": ""
},
{
"docid": "9b5d76b2cfd0166cf07715459116b54e",
"score": "0.7412705",
"text": "def update_item_selection\n @item_window.... |
484240532019cb73832e479f6ab389e5 | Perform Author: Ankit Date: 19/01/2019 Reviewed By: | [
{
"docid": "e4d8459e9ea5fdd4f8e9aad5ffe0a305",
"score": "0.0",
"text": "def perform\n\n handle_errors_and_exceptions do\n\n r = validate\n return r unless r.success?\n\n r = fetch_token\n return r unless r.success?\n\n r = add_token_to_response\n return r u... | [
{
"docid": "80a62870302f2e702d9f678c713e4922",
"score": "0.64877474",
"text": "def author\n 'Department of Veterans Affairs'\n end",
"title": ""
},
{
"docid": "d75068b86709676dedc080169325ce09",
"score": "0.6122377",
"text": "def show_review_author_text(review)\r\n ... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "60b5c85dd21676f4408a1a88f21ccd6e",
"score": "0.0",
"text": "def contact_group_params\n params.require(:contact_group).permit(:name, :last_contact)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74768823",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "36956168ba2889cff7bf17d9f1db41b8",
"score": "0.71700543",
"text": "def set_param_whitelist(*param_list)\n self.param_whitelist... |
1344fdcf6a8cc5af8a26ee120f5c62a2 | Returns the default set of global config directories. | [
{
"docid": "6468ce3f8fa81f0c69141928827a4528",
"score": "0.84740704",
"text": "def default_global_dirs\n paths = ::ENV[TOYS_PATH_ENV].to_s.split(::File::PATH_SEPARATOR)\n paths = [::Dir.home, \"/etc\"] if paths.empty?\n paths\n .compact\n .uniq\n .select { |path| ::Fi... | [
{
"docid": "10cbf76a4c144b6ac3dbdd5ab5b6b3e3",
"score": "0.78257674",
"text": "def default_dirs\n @default_dirs ||= Hash[default_locations.collect do |destination, path|\n [destination, {\n :bin_dir => File.join(path, ConfigMap[:bindir].split(File::SEPARATOR).last),\n :gem_... |
361fe285ecce970077ba687412e78561 | PUT /companies/1 PUT /companies/1.json | [
{
"docid": "513ac1af3d3275256e14905baafdcbab",
"score": "0.6736851",
"text": "def update\n @company = Company.find(params[:id])\n\n respond_to do |format|\n if @company.update_attributes(params[:company])\n format.html { redirect_to @company, notice: 'La compania fue editada correctame... | [
{
"docid": "1c35f89f4e93251128bbf53c08021b3d",
"score": "0.79837877",
"text": "def update\n @company_id = company_params[:company_id]\n @reponse = HTTParty.put(\"https://rails-api-ipo.herokuapp.com/api/v1/companies/#{@company_id}.json\",\n :body => {:company_name => company_params[:company_name... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "c0b0cd47424ae77028cc25806104cc55",
"score": "0.0",
"text": "def update!(**args)\n @entry_point_config = args[:entry_point_config] if args.key?(:entry_point_config)\n @url = args[:url] if args.key?(:url)\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... |
814df2037467d07f4ec0a112c7c9c21f | respond to checkjira command same as interval except we answer with 'no issues found' if there are no issues | [
{
"docid": "2b8d1ecd445946364d6bdd791568bbfd",
"score": "0.74821305",
"text": "def checkjira_command(msg)\n begin\n msg.speak \"no new issues since I last checked #{@lastlast} ago\" if !check_jira(msg)\n rescue \n msg.speak \"sorry, we had trouble connecting to JIRA.\"\n end\n end",
... | [
{
"docid": "f6bc9bb15079184982af5742c4559f30",
"score": "0.640689",
"text": "def issues_worked\n search_criteria_present!\n\n query = \"q=type:issue+org:#{org}+assignee:#{username}+updated:>=#{datetime}\"\n url = \"#{SEARCH_ENDPOINT}?#{results_size}&#{query}\"\n response = HT... |
8b3c1063ad0a9c86d6fcee2077c84b0e | ======== Board Membership ======== | [
{
"docid": "2541bc67647f25b09b6613ce7509fcee",
"score": "0.6904001",
"text": "def member_of?(board)\n board.members.include? self\n end",
"title": ""
}
] | [
{
"docid": "f159c01278ecbbf1f975ebad26579ed4",
"score": "0.66532886",
"text": "def board\n end",
"title": ""
},
{
"docid": "458a08a02bae544ea337bc7f61f14dce",
"score": "0.6599938",
"text": "def board\n\n end",
"title": ""
},
{
"docid": "5108ae7db52b93a7f09fab34ae290256"... |