query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
c3129fb7dfe4490d3ccf21f4e3170c63 | the url for getting a new token | [
{
"docid": "cf02170174be985643a15f54fc6c1de2",
"score": "0.76298404",
"text": "def token_url\n \"#{api_url}/authentication/token\"\n end",
"title": ""
}
] | [
{
"docid": "88472e6ff78718f5613408ab6c224bb7",
"score": "0.77664524",
"text": "def token_url\n url_for action: :show, id: 'token'\n end",
"title": ""
},
{
"docid": "46d4b0b3c410b09bfb8d3ccff7426e3f",
"score": "0.762917",
"text": "def token_url\n \"#{@url}/auth/realms/#{@re... |
90a05a6f5328558a43dcf5b1336acff0 | Public: Returns only userdefined metadata for the specified directory. ==== Attributes +share+ String. The name of the file share. +directory_path+ String. The path to the directory. +options+ Hash. Optional parameters. ==== Options Accepted key/value pairs in options parameter are: +:timeout+ Integer. A timeout in sec... | [
{
"docid": "3d251afc4953ba57aab05b54ae332b10",
"score": "0.8214099",
"text": "def get_directory_metadata(share, directory_path, options = {})\n # Query\n query = { \"comp\" => \"metadata\" }\n query[\"timeout\"] = options[:timeout].to_s if options[:timeout]\n\n # Call\n options[:request_l... | [
{
"docid": "79ce7311ec74e845593e09e8c94ce0e8",
"score": "0.84135693",
"text": "def directory_metadata(share, directory, key = access_key, options = {})\n raise ArgumentError, \"No access key specified\" unless key\n\n query = {:restype => 'directory', :comp => 'metadata'}.merge(options).to... |
5feeb36c5e0245d708935411b061a55e | returns the first 'count' number unique imported values | [
{
"docid": "86a62cc1e43b4cb24e95ed34d5c353b4",
"score": "0.5398135",
"text": "def imported_values(count)\r\n values = self.sheetcells.find(:all, :order => \"import_value\",\r\n :limit => count,\r\n :group => \"import_value\... | [
{
"docid": "5e595879631e0cdd18be04351dd7c982",
"score": "0.6481573",
"text": "def unique_count; end",
"title": ""
},
{
"docid": "0acaa02d18112e8ffd088201965626fc",
"score": "0.63683707",
"text": "def uniq_count()\n\treturn @file.split.uniq.length\n end",
"title": ""
},
{
... |
eb0e27b195a0338a10fe9414ce1bbeaf | svcprop returns multivalue entries delimited with a space | [
{
"docid": "b2d7d9f212c3806cedfcc3dd5eab1113",
"score": "0.0",
"text": "def delimiter\n \" \"\n end",
"title": ""
}
] | [
{
"docid": "1fa9c278d6382c0fdfc904e67263017d",
"score": "0.59434044",
"text": "def property_details(separator = ': ')\n variant_properties.collect {|vp| [vp.property.display_name ,vp.description].join(separator) }\n end",
"title": ""
},
{
"docid": "d3c94ef8cab304d8e72f12674263f218",
... |
8ae2b78c03296e8e403995508cc4abea | GET /human_tribes GET /human_tribes.json | [
{
"docid": "2718a183c3e4ee0ece3cef2197743987",
"score": "0.7138092",
"text": "def index\n @human_tribes = HumanTribe.all\n end",
"title": ""
}
] | [
{
"docid": "60d5de0cfead4034e27b92c2b12101eb",
"score": "0.60761267",
"text": "def index\n @thief_talents = ThiefTalent.all\n\n render json: @thief_talents\n end",
"title": ""
},
{
"docid": "5d505eb218236bb8be41fe6286e76c85",
"score": "0.5936852",
"text": "def index\n @trib... |
9109c977a6e757f695af7934369d3e5f | List all aggregation accounts Get information for all aggregation accounts for all clients defined for your firm. | [
{
"docid": "f1c2cd561ea762885ac4e764e5ba4f9e",
"score": "0.6805498",
"text": "def get_aggregation_account_all_using_get(opts = {})\n data, _status_code, _headers = get_aggregation_account_all_using_get_with_http_info(opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "08888b989af9fcff0d8d5209859ba7c8",
"score": "0.6483619",
"text": "def all\n @dealing_platform.gather 'accounts', :accounts, Account\n end",
"title": ""
},
{
"docid": "40fb0c141b2285438eeb044d817285d5",
"score": "0.6445491",
"text": "def get_aggregation_account... |
ffdb6aa6bc53bb3260b499af4587c86d | Helper to read timeout properties, validating them. | [
{
"docid": "c679da653b65c105e918d89191e3a9f1",
"score": "0.63701403",
"text": "def read_timeout_property(value, default)\n case value\n when nil then default\n when false then false\n when 0 then false\n else\n unless value.is_a?(Numeric) && value.positive?\n rai... | [
{
"docid": "a969fae6fee91284c89b1d0fa79ef335",
"score": "0.6735412",
"text": "def read_state_timeout\n case\n when opening? && @open_timeout\n [:open, @opening_at, @open_timeout]\n when pinging? && @ping_timeout\n [:pong, @ping_at, @ping_timeout]\n when closing? && @close_timeout\n... |
d33535fd3c242f109a35bfbdd62c04cb | logs in tutor/student to gain access to protected API endpoints | [
{
"docid": "5746029b19c116b3dd40873ca75948c8",
"score": "0.0",
"text": "def request_spec_login(user)\n login_params = {user: {email: user.email, password: user.password}}\n post \"/users/sign_in\", login_params\n end",
"title": ""
}
] | [
{
"docid": "7ba9b16d23a3e9aad20bfc9a167b93d9",
"score": "0.66549915",
"text": "def login\n\n end",
"title": ""
},
{
"docid": "7ba9b16d23a3e9aad20bfc9a167b93d9",
"score": "0.66549915",
"text": "def login\n\n end",
"title": ""
},
{
"docid": "eb01d5f2fb0aafec8f12c8340a7872... |
7c7e23290d28289f5f2e4c9e258296a0 | Random AI for beginners | [
{
"docid": "c4a5bd9703a723518d7236c4df8dae77",
"score": "0.6592538",
"text": "def rando_choice\n @ai_choice = [1,2,3].sample\n if @ai_choice == 1\n @ai_shoot = \"Rock\"\n elsif @ai_choice == 2\n @ai_shoot = \"Paper\"\n elsif @ai_choice == 3\n @ai_shoot = \"Scissors\"\n end\... | [
{
"docid": "bbe536f63074f292ff20d9327776bd3f",
"score": "0.76952267",
"text": "def actionAI\n rand(3)\n end",
"title": ""
},
{
"docid": "92cf336ec1625fd2211bf4b36e4bce68",
"score": "0.7113278",
"text": "def simple_ai_move \n return rand(3)\n end",
"title": ""
},
{
... |
07bf9ba657ad219c5cb63b2d6f720dd6 | Obtain a future proxy or explicitly invoke a named future method | [
{
"docid": "9d043d1730044712f4133fc30ac25aa6",
"score": "0.83450216",
"text": "def future(method_name = nil, *args, &block)\n if method_name\n @future_proxy.method_missing method_name, *args, &block\n else\n @future_proxy\n end\n end",
"title": ""
}
] | [
{
"docid": "dcf384448dd93faf8b416dd1b95efa92",
"score": "0.7570805",
"text": "def future(mailbox, meth, *args, &block)\n proxy = Proxy::Future.new(mailbox, \"UnknownClass\")\n proxy.method_missing(meth, *args, &block)\n end",
"title": ""
},
{
"docid": "191c81105534678b7fe5... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "600f53844eae2453b7afdeabf5b4dd4d",
"score": "0.0",
"text": "def featureimg_params\n params.fetch(:featureimg, {}).permit!\n# params.require(:featureimg).permit(:name, :user_id, :feature_img)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.6981269",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6783559",
"text": "def strong_params\n params.requi... |
bb7d8716d61c7b2656223f7e53a578a1 | Like `continue?`, but doesn't abort | [
{
"docid": "3c13ece0bff38c814c45f8d325acd07d",
"score": "0.0",
"text": "def flow? msg\n log(msg + ' [y/n]', :warning)\n ['y', 'yes'].include?(gets.chomp.downcase)\nend",
"title": ""
}
] | [
{
"docid": "8c06a803301d11c0a9fc743ef4df87c9",
"score": "0.8135557",
"text": "def continue; end",
"title": ""
},
{
"docid": "b4570da8f9f2ce10de3c6545348e8557",
"score": "0.7853782",
"text": "def continue?; CONTINUE == @level; end",
"title": ""
},
{
"docid": "526edb2acfd35... |
750a59c972982133ca1bc78ba9af8875 | Compare images by converting first pixel in each image to a string. Checks next pixel only if first pixel matches. | [
{
"docid": "0cf1a23dd32c10a6936682e61c216ff0",
"score": "0.55366063",
"text": "def match_position_by_pixel_strings\n\n catch :found_match do\n search_rows.times do |y|\n search_cols.times do |x|\n\n catch :try_next_position do\n puts \"Checking search image a... | [
{
"docid": "6ebf2ac2477e019b77c04e0731bfe114",
"score": "0.6279725",
"text": "def similarity\n size1 = pixel_count(@image_path_1)\n size2 = pixel_count(@image_path_2)\n\n if size1 < size2\n big = @image_path_2\n small = @image_path_1\n else\n big = @image_path_1\n small =... |
1d1df44e376ca7b2e23d4ee24dcb3540 | PUT /messages/1 PUT /messages/1.json | [
{
"docid": "a88fdda02c54dcf13917c78e8928d520",
"score": "0.0",
"text": "def update\n @message = Message.find(params[:id])\n commit = params[:commit]\n if commit == Message::Commit::REJECT\n @message.update_attribute(:msg_state, Message::State::REJECTED)\n end\n\n respond_to do |forma... | [
{
"docid": "0721a62a337f3985296b73ef8cc0c937",
"score": "0.71835774",
"text": "def update\n respond_to do |format|\n @message.update!(message_params)\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "86404a152661843b6ec98c0576bc26c3",
"score": "... |
be62dcdd1ae436eb8f5cda3dc4d66829 | Get Number of Items | [
{
"docid": "d9a53db3885a9130e94fc5a6b98356ca",
"score": "0.0",
"text": "def item_max\r\n $game_troop.alive_members.size\r\n end",
"title": ""
}
] | [
{
"docid": "6b9af555ab96439c278a956f34d2e658",
"score": "0.8874782",
"text": "def count_items\n @items.size\n end",
"title": ""
},
{
"docid": "3a5b0bdb1271d49a6c59da770729d968",
"score": "0.884315",
"text": "def count\r\n items.size\r\n end",
"title": ""
},
... |
21b4db8b83f1da38687c2eefc0a12580 | extend Reserve::ClassMethods include Reserve::InstanceMethods | [
{
"docid": "353e31b40ba686f4e6eb2a29614fe83f",
"score": "0.0",
"text": "def neighborhood_openings(start_date, end_date)\n self.listings.select {|l| l.reservations.where(\"checkout < start_date OR checkin > end_date\")}\n end",
"title": ""
}
] | [
{
"docid": "18ac3668f09979b4ed03c092065ee112",
"score": "0.59273595",
"text": "def set_reserve\n @reserve = Reserve.find(params[:id])\n end",
"title": ""
},
{
"docid": "d27ad0eabe4c952af35b2f9c32c0816b",
"score": "0.59143984",
"text": "def reserve(*args)\n @reservations << Res... |
0ff47d9dacde17c972d4546a65145b88 | Initializes a node name set | [
{
"docid": "68578bf798c2673dc747171baaf92fad",
"score": "0.0",
"text": "def initialize(relationship, mapper_registry)\n @relationship = relationship\n @relationship_set = source_relationship_set(mapper_registry)\n @relations = mapper_registry.relation_map\n ... | [
{
"docid": "c371498a68913030b8eba2206c40cde3",
"score": "0.71159804",
"text": "def initialize(node)\n self.node = node\n self.name = self.node.keys.first\n end",
"title": ""
},
{
"docid": "2fc5f7c63093a1ebe7cecfacf51a5cf3",
"score": "0.7072889",
"text": "def initia... |
ea3687c924f064be5cca8863b0226db7 | calculate the luminence values of each row | [
{
"docid": "c09c28a9a533839c7409dcc4a4d368bd",
"score": "0.8368741",
"text": "def luminence\n averages = self.average_attributes\n luminence_values = []\n averages.map do |row|\n luminence_values << (row[0] * 0.2126) + (row[1] * 0.7152) + (row[2] * 0.0722)\n end\n luminence_values\n ... | [
{
"docid": "7c441d861d4f7b8c1cb09f44ba5d5f0f",
"score": "0.7545503",
"text": "def measure_luminence\n luminence = self.luminence\n length = luminence.length\n self.lum = ((((luminence.reduce(:+))/length)/ 255) * 10).ceil\n end",
"title": ""
},
{
"docid": "3e61873d6a19c9f974fa23922a... |
e809e1c55267e72eba6cb72dc4ac9adb | GET /registrations GET /registrations.json | [
{
"docid": "ac390140f7685801586fed00843cc796",
"score": "0.71471363",
"text": "def index\n @registrations = Registration.all\n end",
"title": ""
}
] | [
{
"docid": "6734eb020efb21348daddb1af7db2d80",
"score": "0.7808819",
"text": "def index\n @user = User.find(params[:user_id])\n @registrations = @user.registrations\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @registrations }\n end\n end"... |
fcb19a1513cb4f21c6d91def59cf7934 | By default, the reference gives up its url, but may want to use something else, like image data | [
{
"docid": "657d982db79be97b23ce41e5e22290d6",
"score": "0.6683531",
"text": "def digested_reference\n url\n end",
"title": ""
}
] | [
{
"docid": "2f22130a91024f9ef9d9da3bb941005d",
"score": "0.78839177",
"text": "def imgurl\n picref.imgurl if picref\n end",
"title": ""
},
{
"docid": "470f9da51716846b527d8abc791059fb",
"score": "0.716987",
"text": "def image_url\n self.filename.url \n end",
"title": ""
... |
60008266a83c4f7afdcd7f6125131d8f | Parse the text into an array of fragments using the text formatter. | [
{
"docid": "3622ee46f4ca190378e3110a232c1134",
"score": "0.6406412",
"text": "def parse_text string, options = {}\n return [] if string.nil?\n\n if (format_option = options[:inline_format])\n format_option = [] unless ::Array === format_option\n text_formatter.format stri... | [
{
"docid": "625890172b885077bbc3409917391e07",
"score": "0.75295717",
"text": "def parse_text formatted_text, colorp=nil, attr=nil\n l = []\n formatted_text.each { |e| \n l << convert_to_chunk(e, colorp, attr)\n }\n return l\n end",
"title": ""
},
{
... |
344544b1c44423d67aa2dca5c7e79f58 | DELETE /team_groups/1 DELETE /team_groups/1.json | [
{
"docid": "e85545527cdd308250a97cdc51d08bc2",
"score": "0.77887523",
"text": "def destroy\n @team_group.destroy\n respond_to do |format|\n format.html { redirect_to team_groups_url, notice: 'Team group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "da5794f3d3bd6b23fd97fe6e3fd6300e",
"score": "0.80537385",
"text": "def destroy\n @team_group = TeamGroup.find(params[:id])\n @team_group.destroy\n\n respond_to do |format|\n format.html { redirect_to team_groups_url }\n format.json { head :no_content }\n end\n end",
... |
9971bd32cd9e41cb95b548ea69758126 | Takes params Assigns already existing images to target Removes already existing images from params | [
{
"docid": "38c04386258640ad6c14d497a2d6e1ed",
"score": "0.74376446",
"text": "def load_existing_images\n target = controller_name.singularize\n if params[target][:images_attributes].nil?\n true\n else\n params[target][:images_attributes].each do |k,v|\n if v[:file] && img = Im... | [
{
"docid": "a3e6c648f68af2f7c05311f08d91c6bc",
"score": "0.6520153",
"text": "def delete!\n begin\n target_images.each do |ti|\n ti.delete!\n end\n rescue NoMethodError\n end\n ImageBuild.delete(@uuid)\n end",
"title": ""
... |
d0111119591626d6d8b80d97c6c091fb | (after two weeks, does it really matter?) | [
{
"docid": "cac73483cb4b50a6135675ee0449b999",
"score": "0.0",
"text": "def to_s()\n self.name\n end",
"title": ""
}
] | [
{
"docid": "61c610c71f4113c09324310008a26033",
"score": "0.6867037",
"text": "def fortnights ; self * 2.weeks ; end",
"title": ""
},
{
"docid": "bb42ee0e5994cdac7fd19a51c3259ce9",
"score": "0.65855724",
"text": "def beginning_of_week; end",
"title": ""
},
{
"docid": "bb42... |
feaab828d352c4acafff445cacbfc0fe | update the address of this service's backend server. This should be done when we're failing over to the standby server. For now it's assumed there is only a single backend address for each service. | [
{
"docid": "c9709996aaa2ee6c6fe0af8de805f684",
"score": "0.7288856",
"text": "def update_backend_address(new_address)\n current_version = @service.version\n\n if get_backend(current_version).address != new_address\n new_version = current_version.clone\n new_backend = get_backend(new_vers... | [
{
"docid": "b2766ea0e10fefca2fcdb461e44d0ec6",
"score": "0.6738489",
"text": "def backend_address\n current_version = @service.version\n get_backend(current_version).address\n end",
"title": ""
},
{
"docid": "b2766ea0e10fefca2fcdb461e44d0ec6",
"score": "0.6738489",
"text": "de... |
d7ae751b7d9d1e4d9d48ed45fee839dc | The default port for IMAPS connections, port 993 source://netimap//lib/net/imap.rb755 | [
{
"docid": "1fc64094a96dc46f54fe5aad4257c650",
"score": "0.0",
"text": "def default_tls_port; end",
"title": ""
}
] | [
{
"docid": "c8d63493f309b75f14c68a489982885c",
"score": "0.86827654",
"text": "def default_imap_port; end",
"title": ""
},
{
"docid": "c8d63493f309b75f14c68a489982885c",
"score": "0.86827654",
"text": "def default_imap_port; end",
"title": ""
},
{
"docid": "f580feb9739844... |
09cefb0679e88b375c75ddc3fe5dc086 | send a cancel shipment request => 'anularEnvio' service | [
{
"docid": "ba5cac0f78e09bf777b97c34f0986780",
"score": "0.81088233",
"text": "def cancel_shipment opts={}\n\t \t\tserver_url = \"http://b2b.correos.cl:8008/ServicioAnulacionExterno/cch/ws/enviosCEP/externo/implementacion/ServicioExternoAnulacionEnvio.asmx\"\n\n\t\t\t#check params\n\t\t\tCityboxApi.che... | [
{
"docid": "1868413939df6c427a1b95d5d82a4f56",
"score": "0.7431701",
"text": "def cancel\n ChangeRequestMailer.cancel(ChangeRequest.first,\"http://localhost:3000\")\n end",
"title": ""
},
{
"docid": "6af8de28fe814581cb3039c09a92058d",
"score": "0.73252594",
"text": "def cancel\n ... |
25ad2604106e89f196881f8a2633e5da | Define a method that will take an array of integers You will then want to iterate over the array with a loop Find the length of the array Use a series of if statements to determine if a number is divisible by 3 and not 5, 5 and not 3, or both 3 and 5 if divisible by 3 and not 5 replace with fizz, if divisible by 5 and ... | [
{
"docid": "2fab8eb3cc4291ff4e980d50183f6fcb",
"score": "0.77698696",
"text": "def super_fizzbuzz(array)\n length = array.length\n # print length\n i = 0\n while i < length\n if (array[i] % 3 == 0 && array[i] % 5 != 0)\n array[i] = \"Fizz\"\n elsif (array[i] % 5 == 0) && (array[i] % 3 != ... | [
{
"docid": "9e3f1b7e4b49d6923ff549a1bfdece30",
"score": "0.76157224",
"text": "def super_fizzbuzz(array)\n new_array = []\n array.each do |x|\n if x % 3 == 0 && x % 5 == 0\n new_array << \"FizzBuzz\"\n elsif x % 3 == 0\n new_array << \"Fizz\"\n elsif x % 5 == 0\n new_array << \... |
73ffee95359afd0037b5146e2f2969f6 | True if this Ftor is equal to +other+, when both have been converted to Arrays via to_a. In other words, a componentbycomponent equality check. | [
{
"docid": "7d62e7aadb0da61b738ee6a9b0303265",
"score": "0.7315021",
"text": "def ==(other)\n\t\tto_a() == other.to_a\n\tend",
"title": ""
}
] | [
{
"docid": "0404a0563e28206c215fdaaf2b8eeaa8",
"score": "0.7689981",
"text": "def ==(other)\n return false unless other.respond_to? :to_a\n\n to_a == other.to_a\n end",
"title": ""
},
{
"docid": "80af52b92165a8bcb51ee16dfc5ebd8b",
"score": "0.7683888",
"text": "def ==(ot... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "6083c938a3709d1fd9a22bba5e86da98",
"score": "0.0",
"text": "def user_params\n params.require(:user).permit(:name, :password, :nausea, :happiness, :tickets, :height, :admin)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69795185",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6782116",
"text": "def strong_params\n params.requ... |
3c29f3793ebc07da7474d1c803a7926a | Override for Deferred support | [
{
"docid": "55bbf0c3062c0378053e9e43f8dc27aa",
"score": "0.0",
"text": "def [] key\n result = super\n if result.is_a?(Deferred)\n result = eval_or_yield self, &result.block\n end\n result\n end",
"title": ""
}
] | [
{
"docid": "068139613ba6ae73fbab77cda49e7592",
"score": "0.73070717",
"text": "def defer\r\n\t\t\treturn Deferred.new\r\n\t\tend",
"title": ""
},
{
"docid": "e76c824470935fec13fc81b4a2a2f56f",
"score": "0.7003182",
"text": "def set_deferred_success(*args); end",
"title": ""
},
... |
bf80f058423831e94fa73592a57ae730 | fin de la funcion verificar_reconexion_de_usuario | [
{
"docid": "a0822bb214c7cedecaad0dbd12a9ecf0",
"score": "0.0",
"text": "def verificar_datos_cliente_id_y_tipo_cliente\n\n @cliente_id = params['cliente_id'] # params.permit(:tipo_cliente) #params['cliente_id'] #require(:ciudadt).permit(:cliente_id)\n @tipo_cliente = params['tipo_cliente'] # \"klk\... | [
{
"docid": "e23b26082629a1d9f09891c5472daaea",
"score": "0.68829346",
"text": "def valida_usuario(correo, clave)\n data = Usuario.find_by(correo: correo, estado: ACTIVO, validado: VALIDADO)\n if data.blank?\n data1 = Usuario.find_by(correo: correo, estado: ACTIVO)\n if data1.blank? != tr... |
da4e61843f72ed810740b80303e1a9f2 | GET /weeksheets/new GET /weeksheets/new.json | [
{
"docid": "a54c770238057e7aee92ca904704f9bb",
"score": "0.77349824",
"text": "def new\n @weeksheet = Weeksheet.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @weeksheet }\n end\n end",
"title": ""
}
] | [
{
"docid": "a57c1df63dd1421a7120f9d09e0ca7bc",
"score": "0.73063415",
"text": "def new\n @worksheet = Worksheet.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @worksheet }\n end\n end",
"title": ""
},
{
"docid": "1fa98041929385454... |
101a4fbc34f281b2bec640b8849aee2c | Prints out a message prompt for the user == Parameters | [
{
"docid": "95ed1627aeccc940eb711c4469e02907",
"score": "0.0",
"text": "def prompt(section)\n puts\n puts '---------------------------------------------'\n puts \" Ready to install #{ section }? [y|n]\"\n puts '---------------------------------------------'\nend",
"title": ""
}
] | [
{
"docid": "8511c4997b7c699d32eaf3c6b532b217",
"score": "0.7414028",
"text": "def prompt_s; end",
"title": ""
},
{
"docid": "3ce2d84d684335f2d617c2c9825a8a16",
"score": "0.7330452",
"text": "def prompt(message)\n print message\nend",
"title": ""
},
{
"docid": "11eaae3e71... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "dfb9abda90a73af1cbe67b926ffec94d",
"score": "0.0",
"text": "def venue_params\n params.require(:venue).permit(:counter, :name)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
bef82c9ba91e55920917e2fd2bc80faa | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Set Name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | [
{
"docid": "470070f7ad28e66eb4c0a760f3dff3ad",
"score": "0.0",
"text": "def name=(new_name)\n @name = new_name\n $game_party.quests.add_to_sort_array(:alphabet, @id) if $game_party && \n $game_party.quests\n end",
"title": ""
}
] | [
{
"docid": "9a6b6544680425dd166657b2f5004742",
"score": "0.8696684",
"text": "def set_name(name)\n end",
"title": ""
},
{
"docid": "ab4b0a512eb6697dd0a5e43f0bedd4dc",
"score": "0.8612463",
"text": "def set_name\n @name = name\n end",
"title": ""
},
{
"docid": "... |
9f8802656b2be74e82057844a6b30649 | DELETE /paramuns/1 DELETE /paramuns/1.json | [
{
"docid": "774de2417e997616bfbf615ba45e0866",
"score": "0.0",
"text": "def destroy\n @dateDuJour = Time.now\n @current_time = Time.now\n @cptProjet = 0 # décompte des projets Actifs en dépassement de franchise\n @cptProjetold = 0 # décompte des projets InActifs en dépassement de fra... | [
{
"docid": "822ddea2e45bf78350003645efcbdb54",
"score": "0.7456548",
"text": "def delete uri, args = {}; Request.new(DELETE, uri, args).execute; end",
"title": ""
},
{
"docid": "718fd485f95a30a8c897e2403defb29f",
"score": "0.7429446",
"text": "def delete(path, params={}); make_reques... |
1ff4f0907a3a2882a6150a34f47f3540 | POST /articles POST /articles.xml | [
{
"docid": "401fba796d8cf360c7b55b4c56d1839a",
"score": "0.0",
"text": "def create\n \n @article = Article.new(params[:article])\n \n # 이미지 업로드 처리 ===============================================================================\n if params[:article][:image_file] != nil\n \n @art... | [
{
"docid": "d85710a2a98585aaf11d4a7bb02ec459",
"score": "0.6919453",
"text": "def create\n @articles = Article.root_articles\n @article = Article.new(params[:article])\n respond_to do |format|\n if @article.save\n flash[:notice] = 'Article was successfully created.'\n format.... |
0bdc65e19d99df9b5d53d4e46f2a30e2 | will be called for you when your client is messaged | [
{
"docid": "0231cafdc2503caea6dd6453aaa9f75b",
"score": "0.0",
"text": "def do_privmsg(server, source, command, args)\n raise IrcException.new(\"not implemented\")\n end",
"title": ""
}
] | [
{
"docid": "77d7b9b4766cb6a1b2902ee4f0b3fa6d",
"score": "0.7616852",
"text": "def onmessage(&blk); super; end",
"title": ""
},
{
"docid": "ee82fab1da93a2dced5224ddb64d7cd9",
"score": "0.74855953",
"text": "def on_message client, data\n controller(client).on_message(data)\n ... |
8087b0b7c09bd9343e1dbef12f398159 | Prompt the user to confirm the configuration or edit. | [
{
"docid": "29768c8a0a8eae1382b74bb110afe6a7",
"score": "0.71408075",
"text": "def confirm_with_user\n confirmed = Helper::Util.confirm \"Is this OK? \", true\n return if confirmed\n\n loop do\n Helper::Util.clear\n\n print_identification\n\n say \"<%= col... | [
{
"docid": "e88ba94cfdb71ab6845c0b9e36ee82c7",
"score": "0.71332407",
"text": "def confirm\n options.fetch(:confirm, nil)\n end",
"title": ""
},
{
"docid": "50daf35d5ba57de08ec1fd7c97bc4b84",
"score": "0.7084867",
"text": "def confirm(question)\n CLI::UI.confir... |
07a997c524da2e995d52dc04c4ff739c | Se asignan las coordenadas x e y | [
{
"docid": "7fa774a0775fd97a8a1ec8bc986b73be",
"score": "0.0",
"text": "def initialize(x,y)\n # los comentarios locales a los métodos no generan documentación\n @x, @y = x, y\n end",
"title": ""
}
] | [
{
"docid": "080d5cdc679c6246582f71c570e95df2",
"score": "0.7319939",
"text": "def coordinates; end",
"title": ""
},
{
"docid": "080d5cdc679c6246582f71c570e95df2",
"score": "0.7319939",
"text": "def coordinates; end",
"title": ""
},
{
"docid": "84ecb719930b90c2615243039bc7... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "fb319bb28febe43789955143fa011ed4",
"score": "0.0",
"text": "def adoption_dog_params\n params.require(:dog).permit(:name, :age, :breed_id, :color, :description, :address, :image, :adopted)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74964964",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6957765",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "238705c4afebc0ee201cc51adddec10a",
"score": "0.0",
"text": "def special_device_list_params\n params.require(:special_device_list).permit(:name)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69795185",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6782116",
"text": "def strong_params\n params.requ... |
6a70477693b15b97d760da0ffd33a2f8 | callseq: Integer.fizzbuzz? > true or false Returns +true+ if a given integer value is divisible by both three and five (given value is a _FizzBuzz_), or +false+ otherwise. Example: 3.fizzbuzz? => false 5.fizzbuzz? => false 15.fizzbuzz? => true See also: FizzBuzz::[] and FizzBuzz::is_fizzbuzz? | [
{
"docid": "0885023bdb98078fd4dc265ba7a52201",
"score": "0.77512914",
"text": "def fizzbuzz?\n FizzBuzz.is_fizzbuzz?(self)\n end",
"title": ""
}
] | [
{
"docid": "1cd09d7e9d17049fbe39d7484614fac1",
"score": "0.8358757",
"text": "def fizz?(integer)\n integer % 3 == 0\nend",
"title": ""
},
{
"docid": "a1a72b8ad58d2d5afb50ec9e161daebd",
"score": "0.83008766",
"text": "def return_fizzbuzz(num)\n num % 3 == 0 && num % 5 == 0\n end"... |
e6ea7764142e6eb558214417b412ee75 | POST /user_accesses POST /user_accesses.json | [
{
"docid": "d975b1533679937fa9b14d3af33190d9",
"score": "0.5911297",
"text": "def create\n @user_access = UserAccess.new(user_access_params)\n\n respond_to do |format|\n if @user_access.save\n format.html { redirect_to @user_access, notice: 'User access was successfully created.' }\n ... | [
{
"docid": "40bc7485c28c4f88591b4e9d3286ad0a",
"score": "0.696157",
"text": "def index\n @accesses = current_user.accesses\n end",
"title": ""
},
{
"docid": "bf15b5b056c55031529b0efd38967ab4",
"score": "0.6779089",
"text": "def index\n @user_accesses = UserAccess.all\n end",
... |
77cd68afc432558bfcc1543135e1c4a1 | GET /books GET /books.json | [
{
"docid": "5608b90d2e7c0b1e721accc863520475",
"score": "0.0",
"text": "def index\n if params[:search].present?\n @books = Book.search_by_name(params[:search]).order(name: :ASC).page params[:page]\n elsif params[:status].present?\n case params[:status]\n when \"Draft\"\n @boo... | [
{
"docid": "a613f6e6f0318023e97fa4ad7cee0b91",
"score": "0.79133517",
"text": "def index\n base_url = 'https://www.googleapis.com/books/v1/volumes?q=fiction&maxResults=20'\n and_key = '&key='\n key = ENV['GOOGLE_BOOKS_API_KEY'] \n googleurl = base_url + and_key + key\n\n response = RestClient.get(g... |
aa18bbc19466ddc4be795d1cf7b5e458 | Gets and removes first attack for a victim in waiting attack list | [
{
"docid": "c28042e1c7d647e9b4080cb9a2be87aa",
"score": "0.57054514",
"text": "def get_first_attack(id)\n\t\t\t\tbegin\n\t\t\t\t\tattack = find(XSSF_WAITING_ATTACKS_DB, XSSF_WAITING_ATTACKS_HASH, {\"VICTIM_ID\" => id.to_i})\n\n\t\t\t\t\tif (attack)\n\t\t\t\t\t\tupdate_all(XSSF_VICTIM_DB, XSSF_VICTIM_HAS... | [
{
"docid": "28f0bf03d908d0f1ff2350940bea49ae",
"score": "0.5428692",
"text": "def tunnel_victim(id)\n\t\t\t\tbegin\n\t\t\t\t\tdelete(XSSF_WAITING_ATTACKS_DB, XSSF_WAITING_ATTACKS_HASH, {\"VICTIM_ID\" => id.to_i})\n\t\t\t\t\tctx = update_all(XSSF_VICTIM_DB, XSSF_VICTIM_HASH, {\"TUNNELED\" => true}, {\"ID... |
c446d0f535a183e37c71a48b63507811 | generate both question and answer | [
{
"docid": "17a844090f7b03a1629c6ed7ac47ffad",
"score": "0.77614945",
"text": "def generate_question()\n num1 = rand(1..30)\n num2 = rand(1..30)\n @answer = num1 + num2\n @name = \"What does #{num1} plus #{num2} equal?\"\n end",
"title": ""
}
] | [
{
"docid": "c44b83573cb54e38b2c5f3c5d8ddece7",
"score": "0.8240039",
"text": "def generate_question\n generate_numbers\n generate_operator\n generate_answer\n \"What does #{@num1} #{@operator[@num3]} #{@num2} equal? \"\n end",
"title": ""
},
{
"docid": "8dd265172304142057dd3b2d2... |
0048991951d1e83936074aef3cb182a6 | Sets the string and current parsing position for the parser. | [
{
"docid": "014808bf574390f8a58efc9104fc0d1d",
"score": "0.73816484",
"text": "def set_string string, pos\n @string = string\n @string_size = string ? string.size : 0\n @pos = pos\n end",
"title": ""
}
] | [
{
"docid": "006e47b080228b490f96f689c85f86cf",
"score": "0.751787",
"text": "def set_string string, pos\n @string = string\n @string_size = string ? string.size : 0\n @pos = pos\n @position_line_offsets = nil\n end",
"title": ""
},
{
"docid": "31907981a6831ce15edde16ef... |
503e76435328ce648119d345b54d5df8 | send a GET request to the default Solr request handler with the indicated Solr parameters | [
{
"docid": "64a0a4793cf06e3b124cafcab4578313",
"score": "0.0",
"text": "def solr_resp_doc_ids_only(solr_params)\n solr_response(solr_params.merge(doc_ids_only))\nend",
"title": ""
}
] | [
{
"docid": "c9542366c40411bc8ab2251836e9cb3f",
"score": "0.75708324",
"text": "def solr_get(opts = {})\r\n send_request_cgi_opts = {\r\n 'method' => 'GET',\r\n 'connection' => 'Keep-Alive',\r\n 'uri' => opts['uri']\r\n }\r\n\r\n # @auth_string defaults to \"\"... |
fc7112728a5a8a380efe49ca34aa3af7 | GET /stories/new GET /stories/new.json | [
{
"docid": "95d34a6e1dfb40d77e1ea7d4586f8c2d",
"score": "0.6995118",
"text": "def new\n @story = Story.new\n\n @css.push('stories.css')\n\n @genders = [ [t('gender.F'), 'F'], [t('gender.M'), 'M'] ]\n\n @types = DiscriminationType.sorted.map{|x| [x.name, x.id]}\n\n respond_to do |format|\n... | [
{
"docid": "c1de4196d7641700bac9b72866e27e81",
"score": "0.79095167",
"text": "def new\n @story = Story.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @story }\n end\n end",
"title": ""
},
{
"docid": "c1de4196d7641700bac9b72866e27... |
097c049109325441101786060ef62bcf | Used when rendering a faceted link in catalogshow. Determines the blacklight search argument for the resulting catalogindex search. | [
{
"docid": "a89622bf3bc6ff77cbc7d425b395a043",
"score": "0.0",
"text": "def search_arg_from_facet(args)\n facet = args[:facet]\n search_arg = \"f[\" << facet << \"][]\"\n\n if person_facet?(facet)\n search_arg = \"f[\" << Solrizer.solr_name('person', :facetable) << \"][]\"\n end\n\n ... | [
{
"docid": "d57306990c9abee8c6ba7e89d7fc0bab",
"score": "0.63152087",
"text": "def search_catalog_link(text, search_query, search_field, link_class=nil, exact_match=false)\n search_query = \"\\\"#{search_query}\\\"\".html_safe if exact_match \n link_to text, catalog_index_path(:q => search_query, :s... |
5ed54edacd25eaca39744def15fd7865 | create a new assignment for the next available onduty date eg. curl i X POST d "user_id=2" | [
{
"docid": "b384e205696b63a76a37ad9139406ed6",
"score": "0.6296502",
"text": "def create\n begin\n if (params[:user_id])\n assignment = Assignment.createAssignment(params[:user_id].to_i)\n generate_response(assignment, @@display_options, 201)\n else\n raise ... | [
{
"docid": "847d37526a4adb0aaabeba10964a990e",
"score": "0.7188806",
"text": "def create_assignment\n data = get_new_assigned_users\n exp_date = get_task_expiry_date\n \n assigned_users = data[:assigned_users]\n assigned_users.each do |u|\n at = {\n user_id: u[:user_id],\n ... |
824cd3f3d1ecefdafa1e8771e03673c5 | Given a raw stub file hash, converts it to the format used internally. | [
{
"docid": "3026c0a4855c947f924d9e9b577dbdbe",
"score": "0.4723742",
"text": "def parse!(stub_hash)\n stub_hash.each do |path, verbs|\n next if ['version', 'consumer', 'producer'].include?(path)\n\n verbs.each do |verb, contexts|\n contexts.each do |context, s... | [
{
"docid": "bc770dcd2242769879c532321b198710",
"score": "0.6383234",
"text": "def stub2hash\r\n # TODO: Maybe add some additional marker in the files like\r\n # \"[hex string]:git-media\"\r\n # to really be able to say that a file is a stub\r\n return self[0..-2] if self && self[-1]==\"\\n\"... |
f1216f59713542a4592273b62d1cddf6 | GET /invoicedetails GET /invoicedetails.json | [
{
"docid": "acd4fa7a718df11876fe76c42e86ebfa",
"score": "0.68374735",
"text": "def index\n @invoicedetails = Invoicedetail.limit(100).all\n end",
"title": ""
}
] | [
{
"docid": "f7ddcecbd4b29253e8251dc69b9cc2bb",
"score": "0.80954427",
"text": "def show\n @invoicedetail = Invoicedetail.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @invoicedetail }\n end\n end",
"title": ""
},
{
... |
13f9872d2ed123ecbc72a6ee2a420b59 | DELETE /houses/1 DELETE /houses/1.json | [
{
"docid": "f2bb0773a488cfdd03106ccff8e7a1da",
"score": "0.69776803",
"text": "def destroy\n @house.destroy\n end",
"title": ""
}
] | [
{
"docid": "a4e7460f8998214af2102bfaf66787a3",
"score": "0.775449",
"text": "def destroy\n @house = House.find(params[:id])\n @house.destroy\n\n respond_to do |format|\n format.html { redirect_to houses_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
... |
79da31aa696f9e03dc7c33ffdece69d3 | GET /channels/new GET /channels/new.json | [
{
"docid": "2d31b9b331f8467bf95962ca94246139",
"score": "0.8098567",
"text": "def new\n @channel = Channel.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @channel }\n end\n end",
"title": ""
}
] | [
{
"docid": "bb9697e8431c37cde45d0b28bcbf5646",
"score": "0.8419546",
"text": "def new\n @channel = current_user.channels.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @channel }\n end\n end",
"title": ""
},
{
"docid": "2318c8a003... |
21b810858a510d923205e1ff9bcfa6b5 | GET /bookings GET /bookings.json | [
{
"docid": "bbdf5528fb6929874b3a95a0a02ef705",
"score": "0.0",
"text": "def index\n year = Integer(params[:booking]['date(1i)'])\n month = Integer(params[:booking]['date(2i)'])\n day = Integer(params[:booking]['date(3i)'])\n\n #duration = params[:duration]\n capacity = params[:capacity]\n... | [
{
"docid": "ac8355d07e1353ac36659b08db8f2002",
"score": "0.8231102",
"text": "def index\n @bookings = Booking.all\n\n render json: @bookings\n end",
"title": ""
},
{
"docid": "d65ce9f0532219b10f9792ac07754e3b",
"score": "0.80220497",
"text": "def index\n @bookings = Booking... |
031f68d5a0736c99ab56f846c051cb5f | Retrieve the file's version as a symbol. my_pdf.version => :"1.4" | [
{
"docid": "b757c5d53d55ab6fca6e456c890a5260",
"score": "0.6885834",
"text": "def version\n @version ||= File.open(@filename) do |io|\n io.read(8)[5..-1].to_sym\n end\n end",
"title": ""
}
] | [
{
"docid": "781a69d84292b58fb5158207e5e2bce9",
"score": "0.73403907",
"text": "def pdf_version\n @buffer.seek(0)\n m, version = *@buffer.read(8).match(/%PDF-(\\d.\\d)/)\n raise MalformedPDFError, 'invalid PDF version' if version.nil?\n return version.to_f\n end",
"title": ""
... |
6743fd2a3d7382bbcb15cfd30c3605d3 | Returns the value of attribute options. source://yard//lib/yard/templates/template.rb8 | [
{
"docid": "711b44c4f487bac2449db3191172dfa2",
"score": "0.0",
"text": "def options; end",
"title": ""
}
] | [
{
"docid": "9bc6484d2bd8217543194e3dc0a92149",
"score": "0.7485918",
"text": "def attribute\n options[:attribute]\n end",
"title": ""
},
{
"docid": "9bc6484d2bd8217543194e3dc0a92149",
"score": "0.7485918",
"text": "def attribute\n options[:attribute]\n end",
"titl... |
91b164b6bdc2a6e02d6f15b6626c182d | Whether the label should be included, requirements is 'Product Dimensions' and 'Amazon Best Sellers Rank' | [
{
"docid": "37ce7cc35e60cd350944e4ed859e3c21",
"score": "0.77370507",
"text": "def include_details_label?(label)\n is_product_dimensions?(label) || is_sellers_rank?(label)\n end",
"title": ""
}
] | [
{
"docid": "063445eb9a34e8096734009805cc8f4b",
"score": "0.7004283",
"text": "def product?\n data.public_labels && data.public_labels.include?('product')\n end",
"title": ""
},
{
"docid": "5614fce50ade54647fd938af9ef5080e",
"score": "0.69603777",
"text": "def can_provide_labels?;... |
4d8ffdf9f0abce8282e8cb40d2fa3976 | Get books from a user's shelf | [
{
"docid": "9bb5d3189039f13824e5e83af53c2d0f",
"score": "0.7009742",
"text": "def shelf(user_id, shelf_name, options = {})\n options = options.merge(shelf: shelf_name, v: 2)\n data = request(\"/review/list/#{user_id}.xml\", options)\n reviews = data[\"reviews\"][\"review\"]\n\n books... | [
{
"docid": "25472ad5e51ba80714544a9baaa7cc84",
"score": "0.8157821",
"text": "def shelf\n @books = current_user.books\n end",
"title": ""
},
{
"docid": "3ef214a1ea894a6f23fa168def191ddf",
"score": "0.74476177",
"text": "def showOne\n @user = User.find(params[:id])\n @booksh... |
71edc75dc5792381c64fc1d076ccd225 | FIXME this is duplicated from ExampleGroupMethods | [
{
"docid": "6b42a0f974bd6dc18ef72182176a8966",
"score": "0.0",
"text": "def build_description_from(*args)\n text = args.inject(\"\") do |description, arg|\n description << \" \" unless (description == \"\" || arg.to_s =~ /^(\\s|\\.|#)/)\n description << arg.to_s\n end\n ... | [
{
"docid": "593dc5f5413c3e636cbc51ab4a9a916f",
"score": "0.78868556",
"text": "def example_group; end",
"title": ""
},
{
"docid": "593dc5f5413c3e636cbc51ab4a9a916f",
"score": "0.78868556",
"text": "def example_group; end",
"title": ""
},
{
"docid": "40800702ab978e2bee776b... |
b8c5ff4a61fe62737ed423825f838fa1 | GET /recordtltkts/1 GET /recordtltkts/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "585bdef0fab8e1513a7de543242288cd",
"score": "0.7081841",
"text": "def index\n @recordtltkts = Recordtltkt.all\n end",
"title": ""
},
{
"docid": "a6fe8460ac62d865b9160e6316f8c3f8",
"score": "0.62110156",
"text": "def index\n @ts = T.all\n\n respond_to do |format|... |
d960eb2d88987b1143f04513849d80f4 | GET /hurdle_times/1 GET /hurdle_times/1.json | [
{
"docid": "1f75e5869969c56dd42b87fdf6379c6d",
"score": "0.70653903",
"text": "def show\n @hurdle_time = HurdleTime.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @hurdle_time }\n end\n end",
"title": ""
}
] | [
{
"docid": "ce06fde3acac268da5586ce3c349aade",
"score": "0.70287323",
"text": "def index\n\n @hurdle_times = HurdleTime.order('time, hurdle_match_id, lane')\n\n if params[:hurdle_match_id]\n @hurdle_times = @hurdle_times.where(:hurdle_match_id => params[:hurdle_match_id])\n end\n\n resp... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "aa7556a83251b88b17a3dc29a5c7428f",
"score": "0.0",
"text": "def set_product_detail\n @product_detail = @shoping_card.product_details.where(source_id: params[:source_id], source_type: params[:source_type]).sample\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;... |
bcce72d0870bd01234edce708d637030 | parse the array into hash in order to search by id | [
{
"docid": "3e99ff1b8f2d1d28613021cdbf91881d",
"score": "0.0",
"text": "def show_contact(id)\r\n contacts_in_array = load_contacts\r\n contacts = {}\r\n contacts_in_array.each do |contact|\r\n id_from_array = contact.shift\r\n data_from_array = contact\r\n contacts[id... | [
{
"docid": "310dd97b4838d3ed92f2e8c71920b1e9",
"score": "0.6629674",
"text": "def find_by_id(input, value)\n hash = nil\n input.each do |input|\n if input[:id] == value\n hash = input\n end\n end\n hash\nend",
"title": ""
},
{
"docid": "0925c5fdffd5db59c9129e6da3dfde40",
"... |
ca7cf8a1a667226148000c755dc7ec45 | DELETE /orders/1 DELETE /orders/1.xml | [
{
"docid": "5c88af6d1cec2d111e94bae4dfe27ba2",
"score": "0.6687246",
"text": "def destroy\n @order = current_user.orders.find(params[:id])\n @order.destroy\n\n respond_to do |format|\n format.html { redirect_to(\"/customers/#{@order.customer.id}\") }\n format.xml { head :ok }\n en... | [
{
"docid": "21d6750007e787d77b3dcba4fbf6afcf",
"score": "0.70455605",
"text": "def destroy\n @order = Order.find(params[:id])\n @order.destroy\n\n respond_to do |format|\n format.html { redirect_to(orders_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
},
{
... |
789756555e0adb70a48b8eecc46018e4 | Provide a user friendly representation source://twilioruby//lib/twilioruby/rest/chat/v2/service/channel/webhook.rb461 | [
{
"docid": "84c2aa104b8a70acbe3f11eca76559b3",
"score": "0.0",
"text": "def to_s; end",
"title": ""
}
] | [
{
"docid": "57a8227be05873919cd7ec532d6c3638",
"score": "0.6943515",
"text": "def to_s\n context = @solution.map{|k, v| \"#{k}: #{v}\"}.join(',')\n \"#<Twilio.Conversations.V1.WebhookContext #{context}>\"\n end",
"title": ""
},
{
... |
cd3c75c7e7f59ec9bbf8031712c7823a | new_field Menu option 2 | [
{
"docid": "72aeaad213caf688a9cc4d4ef42743bc",
"score": "0.0",
"text": "def harvest\n # When you harvest, you must collect food from every one of your fields and record how much total food you have collected. It should display all of this information.\n # (Harvest Crops + Add to total harvested)\n... | [
{
"docid": "a11d4ff60c448574ad3aa3dc8afd3b65",
"score": "0.64639497",
"text": "def new\n @menu = \"option\"\n @board = \"option\"\n @section = \"new\"\n \n @option = Option.new\n @select_main_option = Option.all(:order => [ :priority.asc ]) \n\n render 'admin/options/option'\n ... |
6f1c537426334c93b0b1fa02b549bc85 | problem 14: Number shuffle fucking perfect. I have done. oh yeah. | [
{
"docid": "c35a29e1963232d2e7f9bc060fd910f8",
"score": "0.0",
"text": "def num_of_num(number)\n\tnumber_of_num=1\n\tnumber_size=number.to_s.size\n while number_size > 1 do\n number_of_num = number_of_num * \tnumber_size\n number_size = number_size - 1 \n end\n return number_of_num\nend",
... | [
{
"docid": "8eee7fb6beaf0d62150466933466b52e",
"score": "0.77159387",
"text": "def shuffle_function1(game, index)\n r = Math.tan(game.seed + index / game.seed - index) - Math.sin(game.seed / index) + 336 * Math.sin(8 * index)\n n = r - r.floor\n (10 * n).floor\nend",
"title": ""
},
{
"doc... |
a230406204fecfffe56f49108965dc49 | action to delete the category | [
{
"docid": "d35678f368074704ddaaaea3b89654a2",
"score": "0.7695687",
"text": "def destroy\n\t\t\n\t\t@category = Category.find(params[:id])\n\t\t@category.destroy\n\t\tredirect_to categories_url\n\tend",
"title": ""
}
] | [
{
"docid": "5b0fdf8d8c0ddd731e9342e7410000c9",
"score": "0.8070607",
"text": "def destroy\n @category.destroy\n head :no_content\n end",
"title": ""
},
{
"docid": "6ffdf49f612976b678c22709841c96fa",
"score": "0.8040519",
"text": "def destroy\n @category.delete\n end",
... |
d4ef8baa251715b4b9cbdd394d404bab | Internal: Recognize a Decimal Digit Returns true if the string character is a digit. | [
{
"docid": "f707bebe8b2785340ef60c1865d044d4",
"score": "0.7720894",
"text": "def is_digit(c)\n c =~ /[0-9]/\nend",
"title": ""
}
] | [
{
"docid": "59d8bb2173674323afdbf8f9c5ca9714",
"score": "0.81410986",
"text": "def is_digit(char)\n char.match?(/[0-9]/)\n end",
"title": ""
},
{
"docid": "56cb2c2f30b950be8120dd769ff103c2",
"score": "0.8005756",
"text": "def charIsDigit\n c = getChar\n return (c >=... |
7179ebe8f1e4ab3bd41a191a9bb345ba | GET /inspections/1 GET /inspections/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "d2250081ed07ef9744b642ba92ad283c",
"score": "0.8015896",
"text": "def show\n @inspection = Inspection.find(params[:id])\n\n render json: @inspection\n end",
"title": ""
},
{
"docid": "739e756fcda172bab1924602d26fe318",
"score": "0.77597106",
"text": "def show\n ... |
39d5131d21dd96365680ed491ab4003c | Get the total cost of a specific lifter's gym memberships | [
{
"docid": "9e2b00ed28b4e9888a16146f1b0557a6",
"score": "0.75809604",
"text": "def total_cost\n memberships.map{|membership| membership.cost}.sum\n end",
"title": ""
}
] | [
{
"docid": "7b6e7b4624a96cf37d2c0a0a2a6c1db5",
"score": "0.8522966",
"text": "def gym_cost\n # binding.pry\n memberships.map { |m| m.cost }.sum\n end",
"title": ""
},
{
"docid": "06e34c514fa3bf66a0b0cd3380c785cc",
"score": "0.82035476",
"text": "def gym_membership\n members... |
d21b740a6eb1092e0c79f3123ca56ca4 | Kick off a node scan | [
{
"docid": "c3de227451dd14086a3f6c4d9d744d44",
"score": "0.63092196",
"text": "def node_scan(api_key, instance, node_id, tag)\n response = `curl -X POST -s -k -H 'Authorization: Token token=\"#{api_key}\"' -H 'Accept: application/json' -H 'Content-Type: application/json' #{instance}/api/v2/nodes/#{no... | [
{
"docid": "25ab20078c901097990564875e868d2b",
"score": "0.66200835",
"text": "def run\n super\n\n ###\n ### TODO SECURITY - more sanity checking on to_scan\n ###\n\n # Get range, or host\n to_scan = [_get_entity_name]\n _log \"Scan list is: #{to_scan}\"\n\n to_scan.each do |scan... |
fe203d07298db6c36646dc4a5682f28f | POST /tasks POST /tasks.xml | [
{
"docid": "021d2fee3120a3aa6bb7e375ffacca02",
"score": "0.6430136",
"text": "def create\n @task = Task.new(params[:task])\n\n respond_to do |format|\n if @task.save\n flash[:notice] = 'Task was successfully created.'\n format.html { redirect_to(@task) }\n format.xml { r... | [
{
"docid": "fc13fd81aaeac4e0b897e21dd845bad0",
"score": "0.7630986",
"text": "def create_task\n @user = User.find_by_username(session['user'])\n @access_token = OAuth::AccessToken.new(UsersController.consumer, @user.token, @user.secret)\n @response = UsersController.consumer.request(:post, \"/a... |
00c64fe6f9a4ef7d1f1a107229dcd02c | Return the links that the resource has | [
{
"docid": "e9e0cca2e2fb2223acf4a5330c15726f",
"score": "0.0",
"text": "def links\n @payout_links ||= Links.new(@links)\n end",
"title": ""
}
] | [
{
"docid": "df7003ae63344c3e8cc7ef81c9dea11b",
"score": "0.80679655",
"text": "def get_links\n @links.get_all\n end",
"title": ""
},
{
"docid": "9f6ae752e286bd34f7cf1ca3c88ef9c4",
"score": "0.80605316",
"text": "def links\n return @links\n end",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "e56d28a70d06dbc9aa3941c08474bbb8",
"score": "0.0",
"text": "def set_asset_activity\n @asset_activity = AssetActivity.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.6032574",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6015663",
"text": "def... |
7f24ba1659d54c7670d1d6b5d196eb0d | options: :from => source language / ommitable(auto detect) :to => target language / multiple acceptable / required ex. translate("I love ruby.", :to => [:fr, :ja]) | [
{
"docid": "14ad552939ea6eb1dd719613642689ae",
"score": "0.54603046",
"text": "def translate(texts, opts={})\n texts = Array(texts)\n if opts[:to].instance_of?(Array)\n return multiple_translate(texts, opts)\n end\n\n opts.merge!(:to => set_target(texts)) if opts[:to].nil?\n\n result... | [
{
"docid": "08ef3266d97707e323229b526ddc8a0e",
"score": "0.7284953",
"text": "def translate(*args, **opts); end",
"title": ""
},
{
"docid": "dd9f057f0206ce158e9ccce48449ecda",
"score": "0.72022665",
"text": "def translate(text:, from: nil, to:, **opts) # rubocop:disable Lint/UnusedMe... |
8357c383a8618f92100e9587e6ce9204 | GET /pontodetrocas/1 GET /pontodetrocas/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "121d477554ed2da5933060722f113c9f",
"score": "0.6892825",
"text": "def index\n @casos = Caso.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @casos }\n end\n end",
"title": ""
},
{
"docid": "3f38c6d00619b661defcd6b6cea... |
c666ea6740bcb047ba07863819dcedfe | POST /pull_roles POST /pull_roles.json | [
{
"docid": "2a6a4b75a7c81302292423fa972cffe0",
"score": "0.5570297",
"text": "def create\n @pull_role = PullRole.new(pull_role_params)\n\n respond_to do |format|\n if @pull_role.save\n format.html { redirect_to @pull_role, notice: 'Pull role was successfully created.' }\n format... | [
{
"docid": "da23034fecebbf2d7d9d8f9a5e37a015",
"score": "0.69272107",
"text": "def set_pull_role\n @pull_role = PullRole.find(params[:id])\n end",
"title": ""
},
{
"docid": "20296c6488e8e42c13946a8d62c083db",
"score": "0.69049025",
"text": "def index\n @pull_roles = PullRo... |
40073a93ced9ed357084187f7a4c4d5e | Purchase the item straight away Parameters: money: Amount to be charged as an Integer value in cents authorization: the PSL cross reference from the previous authorization options: Returns: ActiveMerchant::Billing::Response object | [
{
"docid": "644eac1fdd2665ae5bf5b7c688f56007",
"score": "0.7069298",
"text": "def purchase(money, credit_card, options = {})\n post = {}\n\n add_amount(post, money, DISPATCH_NOW, options)\n add_credit_card(post, credit_card)\n add_address(post, options)\n add_invoice(p... | [
{
"docid": "1d62b05d94fba2bb4f8baee537058987",
"score": "0.80293477",
"text": "def purchase(money, credit_card, options = {})\n # since pingpp is offsite payment, this method is placehodler only.\n # in this way, we could go through spree payment process.\n return Gateway::AlipayResponse.... |
aafaf82f9e47449e37588d532110b70a | PUT /games/1 PUT /games/1.json | [
{
"docid": "3dbd9953071ee27d4be1df82fb138ab0",
"score": "0.0",
"text": "def update\n @game = Game.find(params[:id])\n\n respond_to do |format|\n if @game.update_attributes(params[:game])\n format.html { redirect_to :controller=>\"records\",:action => \"index\",:id =>@game.id }\n ... | [
{
"docid": "5af53471ff55ef34c43a5f170769ad10",
"score": "0.761389",
"text": "def update\n @game.update(game_params)\n render json: @game, status: 200\n end",
"title": ""
},
{
"docid": "ca80e32e1ab5b34f1f02c5507ae69821",
"score": "0.7487331",
"text": "def update\n @game = Ga... |
221f6188859ecf190bfaf7a14b7b33a5 | some_method(x: 1, y: 2) | [
{
"docid": "e82d856ff3956a2dec935d8d710c0866",
"score": "0.74863225",
"text": "def some_method(x: nil,y: nil,z: nil)\n p x,y,z\nend",
"title": ""
}
] | [
{
"docid": "1f4f24e248732241c27339243ff470a9",
"score": "0.73932284",
"text": "def go(x:, y:)\n p x, y\nend",
"title": ""
},
{
"docid": "8a0e531b1f1a566addd2d796b1f038c9",
"score": "0.7376439",
"text": "def go(x:, y:)\nend",
"title": ""
},
{
"docid": "e0b785076d6cf17ea7d... |
311faaef4b1fbdcbf78e29994eb277e2 | Returns an array of all custom fields enabled for project issues (explictly associated custom fields and custom fields enabled for all projects) | [
{
"docid": "6c54d2a1fb63291da1420152251f734c",
"score": "0.7796227",
"text": "def custom_fields_for_issues(tracker)\r\n tracker.custom_fields.find(:all, :include => :projects, \r\n :conditions => [\"is_for_all=? or project_id=?\", true, self.id])\r\n #(CustomField.for... | [
{
"docid": "7e522d1513e24d29389c30e797a34f29",
"score": "0.7143908",
"text": "def getCustomfields(projectId)\r\n\t\t\t\r\n\t\t\t\turl = getBaseURL+\"projects/\"+String(projectId)+\"/bugs/customfields/\"\r\n\t\t\t\t\r\n\t\t\t\tresponse = ZohoHTTPClient.get(url, getQueryMap)\r\n\t\t\t\t\r\n\t\t\t\treturn ... |
2aabf461565c84a7225cabaaf842d664 | validates :password, :presence => true | [
{
"docid": "36d8720f856aa8ffb8f6785f6cb8212e",
"score": "0.0",
"text": "def has_categories? \n false\n end",
"title": ""
}
] | [
{
"docid": "7992a3c6e70fb4d387d7c90adf118359",
"score": "0.87399393",
"text": "def validate\n # Only validate the presence of a password when it's required\n if self.password_required and self.password.blank?\n errors.add(:password, \" can't be blank\")\n end\n end",
"title": ""
},
... |
a34eae97fd257f3c582bed74f2f57bb2 | POST /invoices POST /invoices.json | [
{
"docid": "ba914da304ad8cf07119c71e361bd0e9",
"score": "0.0",
"text": "def create\n @invoice = Invoice.new(params[:invoice])\n\n respond_to do |format|\n if @invoice.save\n format.html { redirect_to @invoice, notice: 'Invoice was successfully created.' }\n format.js { render 's... | [
{
"docid": "a721341fd23fce1b8c0db9e696384d08",
"score": "0.7803755",
"text": "def create\n @invoice = Invoice.new(invoice_params)\n\n if @invoice.save\n render json: @invoice, status: :created, location: @invoice\n else\n render json: @invoice.errors, status: :unprocessable_entity\n ... |
02467d0a72438da21ad4c8fd3c64233d | Access to Issues::Components API | [
{
"docid": "32ce2823c8c16739e371cdaf3c1d7876",
"score": "0.7838302",
"text": "def components\n @components ||= ApiFactory.new 'Issues::Components'\n end",
"title": ""
}
] | [
{
"docid": "c886d052018920dc738e025fa50cf73d",
"score": "0.74101067",
"text": "def issues\n return IssuesAPI.new(self)\n end",
"title": ""
},
{
"docid": "04d1dfab6745c13cba87245b2d19f5f0",
"score": "0.70836353",
"text": "def lookup_jira_issues\n # /rest/api/2/project/DP\n p... |
b1e8c3a4dfebd39fbaf67e30536bea6e | Make the delegate class trackable | [
{
"docid": "dff41950bcf7687c2a3c73ed274fd57e",
"score": "0.5530163",
"text": "def enable_tracking\n collection.send :include, Mongoid::History::Trackable\n collection.track_history\n\n class << self\n delegate :history_tracks, to: :document\n delegate :track_histor... | [
{
"docid": "043a81b331e22b63a228f0705044a2f0",
"score": "0.68450874",
"text": "def delegate; end",
"title": ""
},
{
"docid": "043a81b331e22b63a228f0705044a2f0",
"score": "0.68450874",
"text": "def delegate; end",
"title": ""
},
{
"docid": "61af1270e79f670c1bbda81e18db65e9... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a4a31d4cde2095834bdaa9510f64e1a3",
"score": "0.0",
"text": "def set_quotation_detail_large_classification\n\t \n\t @quotation_detail_large_classification = QuotationDetailLargeClassification.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60339177",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60135007",
"text": "d... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "6721ee8c8fc7c68d7db5fd0ca8a5f826",
"score": "0.0",
"text": "def set_product\n @product = Product.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60339177",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60135007",
"text": "d... |
dff1f4bd639af5fe5218df5fd9e8ff48 | DELETE /locadoras/1 DELETE /locadoras/1.json | [
{
"docid": "af6d137b1432d5cbc6bd45e52cd0cf9c",
"score": "0.724213",
"text": "def destroy\n @locadora.destroy\n respond_to do |format|\n format.html { redirect_to locadoras_url, notice: 'Locadora excluída com sucesso.' }\n format.json { head :no_content }\n end\n end",
"title": ""... | [
{
"docid": "7795a66b32dc43dd4be6ad582e6b2f52",
"score": "0.73820186",
"text": "def destroy\n @locacao = Locacao.find(params[:id])\n @locacao.destroy\n\n respond_to do |format|\n format.html { redirect_to locacoes_url }\n format.json { head :ok }\n end\n end",
"title": ""
},
... |
7c39ca02f0e255b594ed4cb57c7749f4 | PATCH/PUT /dato_laborals/1 PATCH/PUT /dato_laborals/1.json | [
{
"docid": "8537bd119399c8647a31353042808d5c",
"score": "0.6162868",
"text": "def update\n @agente = Agente.find(params[:agente_id])\n respond_to do |format|\n if @dato_laboral.update(dato_laboral_params)\n format.html { redirect_to agente_path(@agente), notice: 'Los datos laborales fu... | [
{
"docid": "3f15ce11d3bd81a0ec9893d5e0502503",
"score": "0.69635475",
"text": "def update\n @laboratorio = Laboratorio.find(params[:id])\n\n respond_to do |format|\n if @laboratorio.update_attributes(params[:laboratorio])\n format.html { redirect_to @laboratorio, notice: 'Laboratorio w... |
9125ab785097b700b4fb037bd400d5a8 | GET /course_templates GET /course_templates.xml | [
{
"docid": "a7734c0c90fdf3c7d0578e0612cac8cc",
"score": "0.7459847",
"text": "def index\n @course_templates = CourseTemplate.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @course_templates }\n end\n end",
"title": ""
}
] | [
{
"docid": "23071e79733f7c33c2368b9ca7ad2e25",
"score": "0.670394",
"text": "def show\n @course_template = CourseTemplate.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @course_template }\n end\n end",
"title": ""
},
... |
7b30093d70fcacc5b891f92970189257 | DELETE /metabolites/1 DELETE /metabolites/1.xml | [
{
"docid": "1465addfbf654ca33d41d800720dff47",
"score": "0.7291476",
"text": "def destroy\n @metabolite = Metabolite.find(params[:id])\n @metabolite.destroy\n\n respond_to do |format|\n format.html { redirect_to(metabolites_url) }\n format.xml { head :ok }\n end\n end",
"titl... | [
{
"docid": "df26116eb86dbadafed7137f9e3c2f9e",
"score": "0.6357605",
"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.... |
df6d5d5e102eb0f870b932e905cf7300 | Instantiates an ActiveCouch::Base object, based on the result obtained from the GET URL | [
{
"docid": "f16305cb41449007dec4702dca443deb",
"score": "0.6031244",
"text": "def instantiate_object(result)\n hash = JSON.parse(result)\n self.new(hash)\n end",
"title": ""
}
] | [
{
"docid": "0f0cfe207255bf5da02123c76527fc75",
"score": "0.76528215",
"text": "def retrieve\n self.class.new( CouchDB.get( uri ) )\n end",
"title": ""
},
{
"docid": "b99b18d0e10e281fcd8fa3099adc4901",
"score": "0.63333464",
"text": "def fetch\n @result = Resu... |
e713f264dbf0fd45df7feca4b445a9ed | Returns the time in minutes this user has played this game in the last two weeks | [
{
"docid": "9df97f5219b6f9cb139bb70ce9a2b86a",
"score": "0.5967268",
"text": "def recent_playtime(app_id); end",
"title": ""
}
] | [
{
"docid": "bcc25602563275942343bba6c69d04ab",
"score": "0.6645317",
"text": "def weeks\n\t\t\t\treturn TimeFunctions.calculate_seconds( self, :weeks )\n\t\t\tend",
"title": ""
},
{
"docid": "bcc25602563275942343bba6c69d04ab",
"score": "0.6645317",
"text": "def weeks\n\t\t\t\treturn ... |
1e7232e5d10887dfe758832b0802fea7 | PATCH/PUT /checkouts/1 PATCH/PUT /checkouts/1.json | [
{
"docid": "8753bb62e2e9c4605fff905778f55a28",
"score": "0.68095195",
"text": "def update\n respond_to do |format|\n if @checkout.update(checkout_params)\n format.html { redirect_to @checkout, notice: 'Checkout was successfully updated.' }\n format.json { render :show, status: :ok,... | [
{
"docid": "685003f3c684360ff224debba97b3ab9",
"score": "0.6814302",
"text": "def update\n @checkout = Checkout.find(params[:id])\n\n respond_to do |format|\n if @checkout.update_attributes(params[:checkout])\n format.html { redirect_to @checkout, notice: 'Checkout was successfully upd... |
959dd914d16e240ca714e82f755082f4 | relay ntlm type1 message for SMB | [
{
"docid": "5e2bc86e620a2575b0f1f3e29bd6a410",
"score": "0.66533744",
"text": "def smb_relay_toservert1(hash)\n rsock = Rex::Socket::Tcp.create(\n 'PeerHost' => datastore['RHOST'],\n 'PeerPort' => datastore['RPORT'],\n 'Timeout' => 3,\n 'Context' =>\n {\n 'Msf' ... | [
{
"docid": "bbafd0f5bab270761f9a3d98dad03ed5",
"score": "0.67027795",
"text": "def smb_relay_toservert1(hash)\n rsock = Rex::Socket::Tcp.create(\n 'PeerHost' => datastore['RHOST'],\n 'PeerPort' => datastore['RPORT'],\n 'Timeout' => 3,\n 'Context' =>\n {\n 'Msf' ... |