query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
d509567f0ecc7e9e9e29338bde0f9a28 | return true if we have a map and a reduce function defined | [
{
"docid": "f398fcdc63fb873fa0ec5a03b2b33472",
"score": "0.80401707",
"text": "def mapreduce?\n !(map.nil? && reduce.nil?)\n end",
"title": ""
}
] | [
{
"docid": "89510375bbf39b8a6028900fd52ff47d",
"score": "0.57959974",
"text": "def returns_accumulator_anywhere?(return_values, accumulator_name); end",
"title": ""
},
{
"docid": "13d22644a67c91c1a5ce3f0c7275c27f",
"score": "0.578343",
"text": "def map?\n marc_leader_06_ma... |
c79ce96da5285009e440a89ce556a739 | 4: We'll get to the callback phase by setting our accept/reject URL in the ebay application settings(/auth/ebay/callback) 5: Request an eBay Auth Token with the returned username&secret_id parameters. 6: Request the user info from eBay | [
{
"docid": "1e96842c86d2708c85f5e8da1759a6d4",
"score": "0.704655",
"text": "def callback_phase\n @user_info = get_user(@auth_token = fetch_auth_token(session['omniauth.ebay.session_id']))\n super\n end",
"title": ""
}
] | [
{
"docid": "7c3901c57cb0f560f09745850112473f",
"score": "0.72311664",
"text": "def callback_phase\n @auth_token = get_auth_token(request.params[\"username\"], request.params[\"sid\"])\n @user_info = get_user_info(request.params[\"username\"], @auth_token)\n ap @user_info\n su... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "f4c3599f04d7f07f91fe90efb6f4184e",
"score": "0.0",
"text": "def update!(**args)\n @inputs = args[:inputs] if args.key?(:inputs)\n @metadata = args[:metadata] if args.key?(:metadata)\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... |
01e79c1c4389d60c53e55597a3473a4e | initiation date of this blood oath in the format YYYYMMDD. | [
{
"docid": "5f08d45a2050417b88233e3db3e4e0ae",
"score": "0.0",
"text": "def initialize(follower, cult, initiation_date) #BloodOath.new(follower, cult, initiation_date)\n @follower = follower\n @cult = cult\n @initiation_date = initiation_date #string; format YYYY-MM-DD\n @@al... | [
{
"docid": "b52993de5e255248a7bdc4bbe1fba6e9",
"score": "0.7465111",
"text": "def initiation_date\n end",
"title": ""
},
{
"docid": "9572d1f6e0daf979c98b3a4db169f2a4",
"score": "0.7447701",
"text": "def initiation_date\n @init_date\n end",
"title": ""
},
{
"doc... |
739a770464a84da7a0f147c3df1cc712 | TODO: Put in more options checking (make sure type is correct, and limit is passed if type is set) | [
{
"docid": "cef6b4a2b9de9e742213833fda492071",
"score": "0.0",
"text": "def sell(options)\n require_options options, :type, :coin_amount\n\n response = @client.protected_run :post, 'user/orders/sell',\n body: options\n Order.new JSON.parse(response.bo... | [
{
"docid": "87c53ff959d4bd1ec2db7fa2ce3ad83b",
"score": "0.73882985",
"text": "def limit ; options.limit ; end",
"title": ""
},
{
"docid": "bcfaecbfc5f7e5d26844f62c51d6e64b",
"score": "0.73004067",
"text": "def limits(options); end",
"title": ""
},
{
... |
346ceb4525d5a5c001b94fbac5dcd23a | Call this method to modify defaults in initializer. | [
{
"docid": "c457b21da713fed6da69f37062eec47d",
"score": "0.0",
"text": "def config\n self.configuration ||= Configuration.new\n block_given? ? yield(self.configuration) : self.configuration\n end",
"title": ""
}
] | [
{
"docid": "b8beccccbbd86a5f0a7f0525f2646b30",
"score": "0.84645045",
"text": "def set_defaults; end",
"title": ""
},
{
"docid": "4f8ead504572f8c159abcb8f3b6d595a",
"score": "0.8422869",
"text": "def set_defaults\n end",
"title": ""
},
{
"docid": "ff88a99a81019731cf4... |
89c51357d0e6958cb8a1dd7fdfc79f80 | DELETE /adjustments/1 or /adjustments/1.json | [
{
"docid": "0ea5cdbbc9ca0c8743c94f1edab87ca9",
"score": "0.667056",
"text": "def destroy\n authorize @adjustment\n @adjustment.destroy\n respond_to do |format|\n format.html { redirect_to adjustments_url, notice: \"Adjustment was successfully destroyed.\" }\n format.json { head :no_co... | [
{
"docid": "089211cdb8b70788497d35efa57a9e93",
"score": "0.74002004",
"text": "def destroy\n @adjustment.destroy\n respond_to do |format|\n format.html { redirect_to admin_adjustments_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "697c2b... |
2034a381495c1da6b46efd2a99bd0146 | Public: Find or pick a new manifest filename for target build directory. dirname String dirname Examples find_directory_manifest("/app/public/assets") => "/app/public/assets/.sprocketsmanifestabc123.json" Returns String filename. source://sprockets//lib/sprockets/manifest_utils.rb36 | [
{
"docid": "60af77471034f4ae1293f36d8db8aeac",
"score": "0.804537",
"text": "def find_directory_manifest(dirname); end",
"title": ""
}
] | [
{
"docid": "02f6a77e324da9cd88aeedb1351f769a",
"score": "0.82543147",
"text": "def find_directory_manifest(dirname)\n entries = File.directory?(dirname) ? Dir.entries(dirname) : []\n entry = entries.find { |e| e =~ MANIFEST_RE } ||\n generate_manifest_path\n File.join(dirname, en... |
4c18ab663cb2e03b62935aa016042e9a | GET /user_send_mails/1 GET /user_send_mails/1.json | [
{
"docid": "2b7c840301500e60e7b6daaf591ff8ad",
"score": "0.74691236",
"text": "def show\n @user_send_mail = UserSendMail.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @user_send_mail }\n end\n end",
"title": ""
}
] | [
{
"docid": "892427400b43f2bd2b0789e0828be1fa",
"score": "0.69217426",
"text": "def show\n @users_mail = UsersMail.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @users_mail }\n end\n end",
"title": ""
},
{
"docid": ... |
05b9fd98e970259872f7353a05b37b7a | Creates configuration values for Devise and for the given module. Devise::Models.config(Devise::Models::DatabaseAuthenticatable, :stretches) The line above creates: 1) An accessor called Devise.stretches, which value is used by default; 2) Some class methods for your model Model.stretches and Model.stretches= which hav... | [
{
"docid": "8803e29e04a08d5f5451f47f4ee620af",
"score": "0.5426884",
"text": "def config(mod, *accessors); end",
"title": ""
}
] | [
{
"docid": "095cbb7adf3b29eca56047827742a0da",
"score": "0.6104608",
"text": "def config_setup\n [\n Project,\n Affiliate,\n Employee,\n EmployeeSession,\n Ldaper,\n User,\n UserSession,\n Company,\n Admin\n ].each do |model|\n ... |
d05eed5074c7fc79872e85e0ea48ab5d | Create the cities based on the database of greffe | [
{
"docid": "0fbfdd5fd1f398f37281f4fd9cc9e1ba",
"score": "0.64067566",
"text": "def generate_city_association\n city = self.find_or_create_city\n self.update_columns(city_id: city.id)\n end",
"title": ""
}
] | [
{
"docid": "46bb04c89486ac701b6b5a59311dee70",
"score": "0.6851548",
"text": "def data_for_cities( cities )\n ## fix: move to model? why? why not?\n \n ## add virtual column like kind for metro, metro|city, city, district\n \n ## todo add region.title if present \n \n data = []\n ci... |
fb14b942aa963672b4015593af867cc3 | Creates and returns a shipping label for this order based on the provided external label. The label document is copied from the shipping label service to permanent storage. | [
{
"docid": "aee2c679de41faf2bc57bd8a30f9c9fe",
"score": "0.820898",
"text": "def create_shipping_label_from_external_label!(label)\n options = {\n url: label.url,\n tracking_number: label.tracking_number,\n tx_id: label.tx_id,\n expires_at: ShippingLabel.default_expire_a... | [
{
"docid": "6e6078141dbd337e4afafe67b1f74221",
"score": "0.72184",
"text": "def create_shipment_from_external_label!(label)\n shipment = build_shipment(\n tracking_number: label.tracking_number,\n carrier_name: SHIPPING_LABELS.carrier_name\n )\n shipment.suppress_tracking_nu... |
4edccb67b9b60c0f18aed0198bb24af4 | Sign up to an event. | [
{
"docid": "0a331065371e14d5246ab664315dd444",
"score": "0.7546881",
"text": "def sign_up(event)\n event_volunteers.create(event_id: event.id, attending: true)\n end",
"title": ""
}
] | [
{
"docid": "2413561859e9e151f7db531ff79b96e4",
"score": "0.7451724",
"text": "def create\n\t\t@signup = SignUp.new(user_id: session[:user_id], event_id: session[:event_id])\n\t\tsession[:event_id] = nil\n\n\t\tif !current_user.event_ids.include? @signup[:event_id]\n\t\t\t@signup.save\n\t\tend\n\t\t\n\t\... |
770872a2264204c9aa02cfa3d866c600 | Return the first of the attributeType's names, if it has any, or +nil+. | [
{
"docid": "01bac2741a859387482d28de9901861c",
"score": "0.0",
"text": "def name\n\t\treturn self.names.first\n\tend",
"title": ""
}
] | [
{
"docid": "d7594395ba6974ecaeaebf42dbbebc5e",
"score": "0.67818254",
"text": "def attribute_names\n attributes.map(&:first)\n end",
"title": ""
},
{
"docid": "d14b36be4c3556c51a3d23b85aedd13b",
"score": "0.6752398",
"text": "def attribute_names\n attribute_types.keys\... |
9b1a5a9531046648ed7ebc9fd4409d63 | Returns true if this is a SNAME record or false if not | [
{
"docid": "f178bed0e63d2ba0727e7c2ae438bef7",
"score": "0.6956429",
"text": "def is_sname?(); @type == GRT_SNAME; end",
"title": ""
}
] | [
{
"docid": "8a898c483aa41ae55664b5827573bfd7",
"score": "0.6748607",
"text": "def is_named? n\n n && n.downcase == @name\n end",
"title": ""
},
{
"docid": "158f2529154e45bf439a990d52de5221",
"score": "0.6672632",
"text": "def is_srfname?(); @type == GRT_SRFNAME; end",
... |
afc1b2cfc2ff6450eb5373de50829285 | Validations Callbacks Delegates Scopes Methods | [
{
"docid": "64f8bc1eb7c7e49a3e4f1934c766e24f",
"score": "0.0",
"text": "def active?\n self.employee_authenticate && self.employee_profile\n end",
"title": ""
}
] | [
{
"docid": "311526caf75b30eb1800eac4ee5f4120",
"score": "0.7373708",
"text": "def valid_scope(valid_scopes, scope)\n\t\tend",
"title": ""
},
{
"docid": "8f581807475f7b39e47ed13e43362688",
"score": "0.6841833",
"text": "def validate_with_callbacks\n run_callbacks(:before_valida... |
c39a58c4304cbb116f181c5a3094c345 | Append a path to the list of view paths for the current LookupContext. ==== Parameters path If a String is provided, it gets converted into the default view path. You may also provide a custom view path (see ActionView::PathSet for more information) source://actionview//lib/action_view/view_paths.rb112 | [
{
"docid": "24e41b1f4857c33470cef13bcc0ddaed",
"score": "0.7561368",
"text": "def append_view_path(path); end",
"title": ""
}
] | [
{
"docid": "bee06d0af3de8e4987b053acb545bddd",
"score": "0.86343825",
"text": "def append_view_path(path)\n lookup_context.append_view_paths(Array(path))\n end",
"title": ""
},
{
"docid": "e61a921aa71fd739bf6915fc7a0c7127",
"score": "0.84274036",
"text": "def append_view_path... |
2bf967370e075e0d44c051a38a44774f | The type of error, defaults to +:invalid+ unless specified source://activemodel//lib/active_model/error.rb123 | [
{
"docid": "e8aec1294781b37104977c808a46cd71",
"score": "0.0",
"text": "def type; end",
"title": ""
}
] | [
{
"docid": "d2196734e7e3ee41b90e606b3ac2e486",
"score": "0.75862455",
"text": "def validation_error(type, what, reason); end",
"title": ""
},
{
"docid": "d2196734e7e3ee41b90e606b3ac2e486",
"score": "0.75862455",
"text": "def validation_error(type, what, reason); end",
"title": ""... |
749cdf484ba22f5f55b1469bc288363c | Convenience method to access values within the deliberation's characteristics hash. | [
{
"docid": "ef143dbf20b34f25b72bab5cf07b5212",
"score": "0.6741066",
"text": "def [](characteristic)\n characteristics[characteristic]\n end",
"title": ""
}
] | [
{
"docid": "907fd2748e37419f451256a5b805b3ba",
"score": "0.5669364",
"text": "def capability_data(capability)\n @data[\"data\"][capability]\n end",
"title": ""
},
{
"docid": "159052227c2d3eb250c4d5d337e8f503",
"score": "0.56600094",
"text": "def _read_attribute(key); end",
"t... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "1d3d84475263fa110aa46d58cc411e71",
"score": "0.0",
"text": "def set_cabinet_map_layer\n @cabinet_map_layer = MapLayer.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... |
484de6e907bc14f6d661c931e76b662b | Convert from hex value (e.g. FFF000) to Float (0.0..1.0) | [
{
"docid": "a21885efb86a68c9b2f652323da71cf4",
"score": "0.7564948",
"text": "def hex_to_f(hex_color)\n hex_color = (hex_color[1..]).chars.each_slice(2).map(&:join)\n a = []\n\n hex_color.each do |el|\n a.push(el.to_i(16))\n end\n\n a.push(255)\n i_to_f(a)\n end",... | [
{
"docid": "53e8a1c98e140f57acef5619457e304c",
"score": "0.8313345",
"text": "def hex_to_float(txt)\n # Numerals::Format[:hexbin].read(txt, type: Float)\n # txt.scanf(\"%A\").first\n Float(txt)\nend",
"title": ""
},
{
"docid": "fa41694bcf1e833f4b60126a8c6ef410",
"score": "0.75791657",... |
91579a37e1903dd0e503140792e7cfef | instantiates a new service object that represents the service that dispatched. | [
{
"docid": "0fc7e654f63748728c888810d46d6d63",
"score": "0.7431832",
"text": "def service\n @service ||= ServiceStore.instantiate_service!( self.service_id, request )\n end",
"title": ""
}
] | [
{
"docid": "31bbd7ebac5fdd1707526301ebda6010",
"score": "0.77794933",
"text": "def new_dispatch_object!(service, status)\n service_id = if service.kind_of?(Service)\n service.service_id\n else\n service.to_s\n end\n \n ds = DispatchedService.new\n ds.service_id = service_id\n... |
2d3d546bbd9e729c4ecd81bea2585dce | Test Cases gamma_fnc(0) => returns nil gamma_fnc(1) => returns 1 gamma_fnc(4) => returns 6 gamma_fnc(8) => returns 5040 4 Write a function ice_cream_shop(flavors, favorite) that takes in an array of ice cream flavors available at the ice cream shop, as well as the user's favorite ice cream flavor. Recursively find out ... | [
{
"docid": "ca44c57922488430a6a45075a9b3a1b4",
"score": "0.6095046",
"text": "def ice_cream_shop(flavors, favorite)\n if flavors.length <= 1\n return flavors.first == (favorite) \n end \n flavors.delete(flavors.first)\n ice_cream_shop(flavors, favorite)\nend",
"title": ""
}
] | [
{
"docid": "2819cb47540f87aca863ad3d51820dce",
"score": "0.72829485",
"text": "def ice_cream_shop(flavors, favorite)\n return false if flavors.empty?\n if flavors[0] != favorite\n ice_cream_shop(flavors[1..-1], favorite) \n else\n return true\n end\nend",
"title": ""
},
... |
13c045773bd37f96fe0d20d60aa8eca3 | GET /ingredientsources/1 GET /ingredientsources/1.json | [
{
"docid": "10892bdab2da53692b6ef1865158120f",
"score": "0.7481312",
"text": "def show\n @ingredientsource = Ingredientsource.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @ingredientsource }\n end\n end",
"title": ""
}
... | [
{
"docid": "d96d0c8932845649a7b3519b464cb22b",
"score": "0.64942807",
"text": "def new\n @ingredientsource = Ingredientsource.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @ingredientsource }\n end\n end",
"title": ""
},
{
"docid... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "c5d2cecb3a48f6b3c2c0deacaf9f3c0f",
"score": "0.0",
"text": "def mrpjob_params\n params.require(:mrpjob).permit(:name, :description)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7498391",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6958937",
"text": "def strong_params\n params.require(:request).permit(param_white... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "e0896d08440df35b3696e1cc4fbd8a8c",
"score": "0.0",
"text": "def set_test_run\n @test_run = TestRun.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
20aaa69642269352a4aa259204dc3525 | Check for the existance of a directory and create if it doesn't exist. | [
{
"docid": "e9fe61ded7fdec025198ff787ee37364",
"score": "0.85547",
"text": "def check_and_create_directory(dir)\n dir.tap do\n dir.exist? || dir.mkpath\n end\n end",
"title": ""
}
] | [
{
"docid": "6369ff75c1ec4069d158a4d6a91d768c",
"score": "0.8460037",
"text": "def check_or_create(dir)\n if not File.directory?(dir)\n puts \"Creating #{ dir }...\"\n Dir.mkdir(dir)\n end\n end",
"title": ""
},
{
"docid": "a24c20504154bbedcad18377d3e60b51",
"sc... |
f9b0f50d39077213131f481bf2738312 | PATCH/PUT /buyings/1 PATCH/PUT /buyings/1.json | [
{
"docid": "303320b4c5d5c397dea0f9b49ad6273b",
"score": "0.6841587",
"text": "def update\n respond_to do |format|\n if @buying.update(buying_params)\n format.html { redirect_to @buying, notice: 'Buying was successfully updated.' }\n format.json { render :show, status: :ok, location... | [
{
"docid": "d7b48960ba637be384dd3e3510a907e8",
"score": "0.6609617",
"text": "def update\n @buy = Buy.find(params[:id])\n @buy.update_attributes(params[:buy])\n respond_with(@buy)\n end",
"title": ""
},
{
"docid": "9fd2998d9529d0d41e3b9b2d03d124d1",
"score": "0.65813744",
"... |
9ee01b292594c0b21c058a2193a6cf5a | Get all bookings matching a filter | [
{
"docid": "d9a3533b2eecf481ff66d80fbef73347",
"score": "0.6144107",
"text": "def filter_bookings_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: BookingApi.filter_bookings ...\"\n end\n # resource path\n local_var_p... | [
{
"docid": "4f143dfd25596d79c91ef9ddeca62c07",
"score": "0.7448636",
"text": "def filter_bookings(opts = {})\n data, _status_code, _headers = filter_bookings_with_http_info(opts)\n return data\n end",
"title": ""
},
{
"docid": "860817a7770a93c2c33cfb3df4bea4bb",
"score": "0.... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "c1a47d2e4c1b9c1a83ea28c537140880",
"score": "0.0",
"text": "def update!(**args)\n @name_pattern = args[:name_pattern] if args.key?(:name_pattern)\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... |
07c836159d862931b456ebfc4a5f6a2f | GET /duser_metrics GET /duser_metrics.json | [
{
"docid": "908df261b7a0b3a687cda624ed07ce3c",
"score": "0.74945486",
"text": "def index\n @duser_metrics = DuserMetric.where(\"duser_id = ?\" , current_duser.id)\n end",
"title": ""
}
] | [
{
"docid": "9a7f8c8c8713af598f06cc6c9835e75b",
"score": "0.68101084",
"text": "def get_metrics_list\n\t\tjson_metrics_list \"#{@base_url}/metrics/index.json\"\n\tend",
"title": ""
},
{
"docid": "b909cc1f42c797dc36aefd2227233f39",
"score": "0.67823404",
"text": "def set_duser_metric\n... |
7031dbb2935c3adf127405dcd2b57cfb | PUT /matchups/1 PUT /matchups/1.xml | [
{
"docid": "ef3ed00812cb599309181eb534183913",
"score": "0.5993863",
"text": "def update\n @matchup = Matchup.find(params[:id])\n if params[:winner]\n @matchup.winner = params[:winner]\n end\n\n respond_to do |format|\n if @matchup.update_attributes(params[:matchup])\n forma... | [
{
"docid": "c2c0b673628fdc28b181d18c0afd2d5b",
"score": "0.65167445",
"text": "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post 'update', opts\n end",
"title": ""
},
{
"docid": "f201145e53905399a8555ad503ddd784",
"score": "0.60... |
e87bae4d38044204811f88a67b0d2775 | Returns nil for a closed connection | [
{
"docid": "e007e7c96fc6a296218807d5837de7f4",
"score": "0.0",
"text": "def read_data\n\t\tbegin\n\t\t\treturn if @socket.closed?\n\t\t\tbytes = @socket.read(2)\n\t\t\traise IOError.new(\"no byte header\") unless bytes && bytes.bytesize==2\n\t\t\tbytes = bytes.unpack('n').first\n\t\t\treturn if @socket.... | [
{
"docid": "69a2d1bb19229a71789cfa46de1c726e",
"score": "0.7263786",
"text": "def connection_closed\n end",
"title": ""
},
{
"docid": "6373970b06e74223daec62af296983f8",
"score": "0.6984118",
"text": "def close\n connection.close if connection\n end",
"title": ""
},
{
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "bdcd52f7e22e397d39129e790488e1eb",
"score": "0.0",
"text": "def set_kase\n @kase = Kase.find(params[:id])\n raise ActiveRecord::RecordNotFound.new('Not Found') unless has_access?(authenticated_user, @kase)\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;... |
53308e5b01fa338ed759f592ce411f3e | DELETE /games_picks/1 DELETE /games_picks/1.json | [
{
"docid": "8f23cee0fcfcc78496a99b1529565fa3",
"score": "0.70647526",
"text": "def destroy\n @games_pick.destroy\n respond_to do |format|\n format.html { redirect_to games_picks_url, notice: 'Games pick was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "78ec7688c345c79be957dd89117b70be",
"score": "0.70109165",
"text": "def destroy\n @game.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "689d5a07a403c4b765ba178e4aff08a3",
"score": "0.69505435",
"te... |
05813f0f1317683efa0722ab1af02b69 | request_session_token This method exchanges a previously received single use token with a session token. Raises error if an invalid response is received. | [
{
"docid": "6812e11b957c48284d4ca37fba3d8e50",
"score": "0.6639505",
"text": "def request_session_token\n url = URI::HTTPS.build({:host => GOOGLE_HOST_URL,\n :path => GOOGLE_AUTHSUB_SESSION_TOKEN_PATH})\n begin\n response = get(url)\n rescue\n raise AuthSubError, \"Invalid session ... | [
{
"docid": "5911c7755349760a986f9c4e949c20ee",
"score": "0.6874188",
"text": "def start_session_token\n reportCommonErrors(\"start_session_token error \") do\n # ready only the number of bytes we expect\n @body = request.body.read SESSION_START_BODY\n\n # we expect 1 line to be start s... |
0b2b17350e7b9487a7f1217c3c335e0e | DELETE /event_days/1 DELETE /event_days/1.json | [
{
"docid": "07c3eeb6bc950416c4a548297a5a612f",
"score": "0.73425823",
"text": "def destroy\n event = @event_day.destroy\n @event_day.destroy\n respond_to do |format|\n format.html { redirect_to :back, notice: 'Event day was successfully destroyed.' }\n format.json { head :no_content }... | [
{
"docid": "8a1728557c00d3268d401c5cbf15416e",
"score": "0.71910596",
"text": "def destroy\n @day.destroy\n respond_to do |format|\n format.html { redirect_to days_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "d118d1ad7dfcafd3157e16115e... |
89a88e787dcf55629ca41fb9f40f0f9c | Obtiene la lista de prospectos. | [
{
"docid": "149701cdc062e598f72a30171cc953de",
"score": "0.0",
"text": "def prospects_get_prospects_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: ProspectsApi.prospects_get_prospects ...\"\n end\n # resource path\n ... | [
{
"docid": "ff979782a50c2c772bedc24504bb3699",
"score": "0.7268365",
"text": "def lista_prospecto\n\t\tprospectos = Prospecto.where(\"tipo = ? and estado_id = ?\", params[:tipo], 2)\n\n\t listaprospectos = prospectos.map do |prospecto|\n\t \tcontenidos = Contenido.find_by(prospecto_id: prospecto... |
e5b12ced391b8f9ad21c8716699f4db8 | DELETE /preceeds/1 DELETE /preceeds/1.json | [
{
"docid": "1cfbc3b39d32c0986501dc9b59ce1132",
"score": "0.6667436",
"text": "def destroy\n @preceed = Preceed.find(params[:id])\n @preceed.destroy\n\n respond_to do |format|\n format.html { redirect_to preceeds_url }\n format.json { head :no_content }\n end\n end",
"title": "... | [
{
"docid": "d42d524667fe775a6fd2f8ed58ac62b5",
"score": "0.66619396",
"text": "def delete(*rest) end",
"title": ""
},
{
"docid": "d1f0a8e8c97a0438790f1ddeeecaca29",
"score": "0.65935135",
"text": "def delete_json(path)\n url = [base_url, path].join\n resp = HTTParty.delete(url,... |
ab5cd59b6e3fab23d4bb22318c8f273b | Can the driver specify a write concern that won't be overridden? (mongos 4.0+ overrides the write concern) | [
{
"docid": "0cba7418e4d854c6f5d8419b5a41ae50",
"score": "0.8391057",
"text": "def require_set_write_concern\n before do\n if ClusterConfig.instance.topology == :sharded && ClusterConfig.instance.short_server_version >= '4.0'\n skip \"mongos 4.0+ overrides write concern\"\n end\n e... | [
{
"docid": "5d3593b50612c631e6501cab814e1cc3",
"score": "0.76675326",
"text": "def write_concern\n @write_concern ||= WriteConcern.get(\n options[:write_concern] || options[:write] || database.write_concern)\n end",
"title": ""
},
{
"docid": "6bfcb06e3e93c71ff64d60323e74f53d",... |
b73c15de54a85621229c7111b3cdc2cb | If nothing is passed in, will add one empty line. | [
{
"docid": "1217bc8396e8a42f8ff0c94357884199",
"score": "0.0",
"text": "def write_lines(*strings)\n strings = [\"\"] if strings.empty?\n strings.each do |s|\n line = \"#{current_indent}#{s}\"\n line = \"\" if line.empty?\n @target << \"#{line}\\n\"\n end\n end",
... | [
{
"docid": "678bf9cb14372f5055b9621cbd1e7ff4",
"score": "0.82951844",
"text": "def blank_line\n self << \"\"\n end",
"title": ""
},
{
"docid": "2adc223ba183048cf29f6d2982906534",
"score": "0.80811167",
"text": "def inserts_blank_line()\n return \"\"\nend",
"title": ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "4026d4b6e09b6905c13f91d730b6d178",
"score": "0.0",
"text": "def set_graveyard\n @graveyard = Graveyard.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "0669a6a7fabfe1dd04a06ff68f8bb5dd",
"score": "0.0",
"text": "def computer_skill_params\n params.require(:computer_skill).permit!\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69780594",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.678054",
"text": "def strong_params\n params.requi... |
9c108428b836bded6bef2e8b49408d57 | Pulse builds can take between 20 minutes to 67 hours to complete | [
{
"docid": "a5be0ca9a2d2fb79a76a68bb7ff1dd9a",
"score": "0.0",
"text": "def end_time\n @start_time + (DEFAULT_TIMEOUT_IN_HOURS * ONE_HOUR_IN_SECONDS)\n end",
"title": ""
}
] | [
{
"docid": "39b01998d792dc41250a36e5f3e6ff73",
"score": "0.6532836",
"text": "def report_builds\n t = Time.now\n\n apply_build_statuses\n\n # reset within 1 cycle in case of clock drift\n @time_since = t - @config['polling_interval'].to_i\n end",
"title": ""
},
{
"docid": "74f1a... |
216a80874277243b13928d0649a421bb | PATCH/PUT /subscribed_customers/1 PATCH/PUT /subscribed_customers/1.json | [
{
"docid": "134cc80bf4f4778b5892800735c3d9d4",
"score": "0.74035263",
"text": "def update\n respond_to do |format|\n if @subscribed_customer.update(subscribed_customer_params)\n format.html { redirect_to @subscribed_customer, notice: 'Subscribed customer was successfully updated.' }\n ... | [
{
"docid": "9befce453483ca4920c8f1c62a831a6c",
"score": "0.71472317",
"text": "def update!\n !! api_request(:put, \"/subscribers/#{self.customer_id}.xml\", :body => self.to_xml(:exclude => [:customer_id]))\n end",
"title": ""
},
{
"docid": "1177c9ee3146e83cfa931294a92ec762",
"sco... |
5df1a104a3441e7c27e51ee7943d457b | require 'pry' require 'openuri' go to proxynova.com and grab their list of countries with proxies found within the last 24h | [
{
"docid": "051b90ec28722bea0fdb415962fe6987",
"score": "0.5804551",
"text": "def getCountries(url)\n page = Nokogiri::HTML(RestClient.get(url))\n rawLinks = page.css(\"li a\")\n selection = []\n for link in rawLinks\n if link[\"href\"].include? \"country\"\n selection.push [link.text.strip,... | [
{
"docid": "a0067c80227352f5c16c1f43746c7490",
"score": "0.6123613",
"text": "def getProxy(url)\n eliteTable = []\n page = Nokogiri::HTML(RestClient.get(url))\n rawProxies = page.css('[id=\"tbl_proxy_list\"] tbody tr')\n rawProxies.each do |row|\n #ignore the table row with the ads in it :)\n ... |
e7555d16f04921c652c760edf4adffd0 | we get 3, 5, 6, and 9. The sum of these multiples is 23. Find the __sum__ of all the multiples of 3 or 5 below 1000. | [
{
"docid": "d7c8dda1b22742e7ee37deaa3ec33eab",
"score": "0.0",
"text": "def collect_multiples(limit)\n (1...limit).select {|e| e%3 == 0 || e%5 ==0}\nend",
"title": ""
}
] | [
{
"docid": "140e5b6fe34c66cb09c05480e9827a94",
"score": "0.8540018",
"text": "def find_sum_of_multiples_of_3_and_5_below_1000\n answer = 0\n for number in 1...1000\n answer += number if number % 3 == 0 || number % 5 == 0\n end\n answer\nend",
"title": ""
},
{
"docid": "64503a01b40ff75... |
29ea7ecd914d0bb5f52ab15e82d3fce7 | added tag_cloud_with_styles to display all tags on tag_cloud.html.erb | [
{
"docid": "f4a09c2d8d92fc430b40b0e3092bd5cf",
"score": "0.7695481",
"text": "def tag_cloud_with_styles(options = {})\n options.assert_valid_keys(:limit, :conditions, :sort)\n options.reverse_merge! :sort => :name\n sort = options.delete(:sort)\n tags = Tag.where('taggings_count > 0').order(... | [
{
"docid": "0cfb9d1b8420decd63523122d1817b48",
"score": "0.7545307",
"text": "def sidebar_tagcloud\n tags = Tag.filter(:id => EntriesTags.select(:tag_id)).select(:name).map(:name)\n cloud = []\n\n tagcloud(tags, 0.8, 2.0).each do |tag, weight|\n style = \"font-size: %0.2fem\" % wei... |
be606ce02fd193273d7cd550bdbd870b | Returns the original HTML as a string. | [
{
"docid": "0a8f0347e57e49dd6e65a64854b7ddc1",
"score": "0.68582845",
"text": "def to_s\n @doc.to_html\n end",
"title": ""
}
] | [
{
"docid": "2a65612bf3274dc8947e4f775b6a8e51",
"score": "0.75936735",
"text": "def to_original_html\n output(\"\", :preserve => true)\n end",
"title": ""
},
{
"docid": "5f9be64e914f0ba2fd4ac11c2f4d8ab5",
"score": "0.74336493",
"text": "def to_html; to_s; end",
"title": ""... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "0f2701c8584358ce13e0a202907fb1f5",
"score": "0.0",
"text": "def datum_params\n params.require(:datum).permit(:permit_no, :route, :carriageway, :footpath, :verge, :amount_paid, :date_paid,:Renewal_date, :Remarks,:invoice, :permit, :wayleave_file)\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... |
c4e15c19394ba551d8e545836b0ac5fd | p consecutive_collapse([3, 4, 1]) == [1] p consecutive_collapse([1, 4, 3, 7]) == [1, 7] p consecutive_collapse([9, 8, 2]) == [2] p consecutive_collapse([9, 8, 4, 5, 6]) == [6] p consecutive_collapse([1, 9, 8, 6, 4, 5, 7, 9, 2]) == [1, 9, 2] p consecutive_collapse([3, 5, 6, 2, 1]) == [1] p consecutive_collapse([5, 7, 9,... | [
{
"docid": "a25542d532c6282818c8668fdafe1223",
"score": "0.0",
"text": "def pretentious_primes(array, num)\n array.map! do |ele|\n # debugger\n primes = []\n if num < 0\n # debugger\n (0...ele).to_a.reverse.each do |number|\n # debugger\n ... | [
{
"docid": "70f143d20f760463da640788727f0e65",
"score": "0.8361058",
"text": "def consecutive_collapse(numbers)\n numbers.length.times { numbers = collapse(numbers)}\n numbers \nend",
"title": ""
},
{
"docid": "f7a93ca67c5621965f28b6e9f1e3dee9",
"score": "0.8231457",
"text": "d... |
4863dc870869a68081f00971da738bb5 | Sets the JavaFX Group that will hold all JavaFX nodes which are rendered onto the game surface(Scene) is a JavaFX Group object. | [
{
"docid": "0261048650cee6b6b17db48bbcdf28cf",
"score": "0.57878876",
"text": "def setSceneNodes sceneNodes\n @sceneNodes = sceneNodes\n end",
"title": ""
}
] | [
{
"docid": "87e9ca1ce35fb90ff59d4e68d5df07d4",
"score": "0.6094113",
"text": "def group(name)\n @_group = name\n end",
"title": ""
},
{
"docid": "13bbcdcfda150015fb90227124ae18ec",
"score": "0.60660315",
"text": "def set_main_group(group)\r\n #@main_group = group\r\n\t\t@g... |
fda33cd567255644ac4ab1e498f4486b | DELETE /managers/1 DELETE /managers/1.json | [
{
"docid": "14834e3c3d8cfaf451ff3f2f4f4fd418",
"score": "0.77453154",
"text": "def destroy\n authorize! :destroy, Manager\n @manager.destroy\n respond_to do |format|\n format.html { redirect_to store_managers_path }\n format.json { head :no_content }\n end\n end",
"title": ""
... | [
{
"docid": "d69f2e658cbaa456522543d95f9286cb",
"score": "0.7957474",
"text": "def destroy\n\n @manager = Manager.find(params[:id])\n @manager.destroy\n\n respond_to do |format|\n format.html { redirect_to managers_url }\n format.json { head :ok }\n end\n end",
"title": ""
},... |
02a05807841c4330f3e8431a7e4e2b27 | Example on how to do notes_contents=(notes) def post_ids=(ids) ids.each do |id| post = Post.find(id) self.posts << post end end this way doesn't work def note_contents=(ids) ids.each do |id| note = Note.find(id) self.notes << note end end | [
{
"docid": "868246619433f304ac2bb5763a5f28c4",
"score": "0.74711305",
"text": "def note_contents=(contents)\n contents.each do |content|\n if content != \"\"\n note = Note.find_or_create_by(content: content)\n self.notes << note\n end\n end\n end",
"title": ""
}
] | [
{
"docid": "f56668c8799100d3e323c2847a3befe6",
"score": "0.8497406",
"text": "def note_ids=(ids)\n ids.each do |id|\n note = Note.find(id)\n self.notes << note\n end\n end",
"title": ""
},
{
"docid": "be6a0fea54412f3c9cb568dbc10b6a8d",
"score": "0.7830927",
"text": "... |
7b3d87422fa5f638edb020e699d824cc | DELETE /hanzis/1 DELETE /hanzis/1.json | [
{
"docid": "0742060a55f6f43e294a20deb9775e39",
"score": "0.6863321",
"text": "def destroy\n query = \"select word_id from hanzis_words where hanzi_id = #{@hanzi.id}\"\n results = ActiveRecord::Base.connection.execute(query)\n results.each do |w|\n Word.find(w[0]).destroy\n end\n\n @h... | [
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.72634",
"text": "def delete(path)\n begin\n response = client[path].delete :accept => 'application/json'\n rescue Exception => e\n puts e.inspect\n end\n end",
"title": ""
},
{
"docid": "44... |
829929cf622e02f03d1645997c2aa651 | Let the user decide what data he wants to transfer | [
{
"docid": "ab75084a8ba3e9838eccde53adcf4c64",
"score": "0.0",
"text": "def decide\n h2{ \"Please approve <b>#{_h(@oid_request.trust_root)}</b>\" }\n p \"You never logged into that site with us. Do you want us to confirm that you do have an account here?\"\n \n when_sreg_is_required... | [
{
"docid": "b76693d76cfdb2e2ea27ff2637afa5e4",
"score": "0.6154864",
"text": "def recieve_data(input_data)\n\t\t\n\tend",
"title": ""
},
{
"docid": "68742f0fb65ad6c69cdf5ab3a37d00e8",
"score": "0.5906619",
"text": "def transfer; end",
"title": ""
},
{
"docid": "68742f0fb6... |
b0f546abde0dfe4f379e8d894ce3fdf9 | callback methods after OpenID authentcation | [
{
"docid": "7da8b578e4fc7377e8749d81fb8cd9ad",
"score": "0.75952166",
"text": "def auth_callback\n \t@response = params\n \tclient.redirect_uri = openid_auth_callback_url\n client.authorization_code = params['code']\n\n @access_token = client.access_token! client_auth_method: client_auth_method\... | [
{
"docid": "2421d9db29819bb19cdf38e29629576e",
"score": "0.74570125",
"text": "def openid_check_authentication(request); end",
"title": ""
},
{
"docid": "b3b23872c5ac71fb83ed6c0e85cfb6a5",
"score": "0.7311259",
"text": "def successful_openid_authentication( identity_url, registration... |
cedc87f7276bf3b5a520acdc77a56715 | Extract the version from a Maven POM file | [
{
"docid": "8aa681347f1d6da09b30b591e7e1f332",
"score": "0.79545",
"text": "def lookup_version_from_mvn_pom(mvn_pom_file)\n mvn_pom_version = '0.0.0'\n has_hadoop = false\n has_spark = false\n if File.readable?(mvn_pom_file)\n doc = File.open(mvn_pom_file) { |f| Nokogiri::XML(f) }\n mvn_pom_fu... | [
{
"docid": "ac9a0daac56adc02926e421258b2ee41",
"score": "0.7382112",
"text": "def maven_version\n @config_source['maven.version'] || 'unknown'\n end",
"title": ""
},
{
"docid": "96e7d30a62c4a1125a57b0ccd1e72e0d",
"score": "0.6934569",
"text": "def version\n return @version unl... |
a0b312d8c5fcb5784a10318618140165 | Get the sha of a dir | [
{
"docid": "2c02804ce8694a64a81eacc8d2a5bec3",
"score": "0.7822715",
"text": "def get_tree_sha(dir)\n get_trees['tree'].find { |t| t['path'] == dir }['sha']\n end",
"title": ""
}
] | [
{
"docid": "f795a6f73f714fe94fda7078179b87ee",
"score": "0.7691372",
"text": "def get_tree_sha(dir, tree = get_trees)\n tree['tree'].find { |t| t['path'] == dir }['sha']\n end",
"title": ""
},
{
"docid": "9d50cba77050e61828362ca896091f8d",
"score": "0.7187473",
"text": "def s... |
8870bae0f5292f30274050a3da628190 | Finds self's root element | [
{
"docid": "38934803e99fa56bf2f1aaf4db0528d8",
"score": "0.7573888",
"text": "def find_root_element\n if parent\n parent.find_root_element\n else\n self\n end\n end",
"title": ""
}
] | [
{
"docid": "0b021bf3387021a74a64f501afb04bfd",
"score": "0.71163875",
"text": "def root\n @elements[@root_name]\n end",
"title": ""
},
{
"docid": "34a35ac77661b0ad0ea1b5417761edf7",
"score": "0.70901656",
"text": "def root\n @elements[@root]\n end",
"title": ""
... |
1e06de9008307dccc6336e37d48511d6 | returns a list of all classes associated with a role | [
{
"docid": "b2652e0249faa5b9fcf5e4308d6c4c03",
"score": "0.7332109",
"text": "def get_classes_from_role(role, options)\n certname = options[:certname_for_facts]\n global_config = get_global_config\n global_config = find_facts(certname).merge(global_config)\n get_class... | [
{
"docid": "2667ba7b200db9a0f86ce1dd1eebd25f",
"score": "0.7020362",
"text": "def roles\n Jak.role_klass.where(id: grants.pluck(:role_ids).compact.flatten)\n end",
"title": ""
},
{
"docid": "e08ea5e1fcdd85709345fd8a740c0891",
"score": "0.68798536",
"text": "def recipe_classes... |
b3d93a9a0af69dd3d9116c474c83ce9f | A RomanNumeral is based on String, with basic checking to make sure the characters are in the proper set. | [
{
"docid": "94d6abb1a88b49e6860368534687ee0e",
"score": "0.5993515",
"text": "def initialize(numeral)\n bad_char = /[^#{ROMAN_CHARS}]+/.match(numeral)\n if bad_char\n raise \"Could not instantiate numeral: Position \" + bad_char.begin(0).to_s + \" in the string is an illegal character '\" + b... | [
{
"docid": "c681586498afafbd51b79068d5dc6d2c",
"score": "0.7560236",
"text": "def validate_roman roman_str\n\tif roman_str.scan(/^M{0,3}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/).empty?\n\t\tabort(\"Invalid Roman Language\")\n\tend\nend",
"title": ""
},
{
"docid": "438d2bce4cf86516e... |
eafff4791130e474d34a5677259d6a7b | insert an item into a sorted singlylinked list | [
{
"docid": "414fb1cd5d6f8c0a2be58c54a20614cd",
"score": "0.7931477",
"text": "def sorted_add(item)\n if @head.nil? or (item < @head.data)\n @head = Node.new(item, @head)\n else \n curr = @head\n until (curr.nxt.nil? or (item < curr.nxt.data)) do\n curr = curr.nxt\n end\n... | [
{
"docid": "96d3eadcd53d3cf62a47b15336f0b04b",
"score": "0.7562649",
"text": "def unsorted_add(item)\n @head = Node.new(item,@head)\n end",
"title": ""
},
{
"docid": "2e2d0ba1eb727ca396268bfec646c9aa",
"score": "0.735913",
"text": "def double_sorted_add(item)\n raise NotImplem... |
60dc4019b60317b9927c14abc42269fc | Adds a new or overrides cookie if user wants to be remembered, stores that cookie with the browser memory and saves that cookie with the current user account | [
{
"docid": "3a25bea08105b6cb4597d251ee294727",
"score": "0.0",
"text": "def sign_in(user)\n remember_token = User.new_remember_token\n cookies.permanent[:remember_token] = remember_token\n user.update_attribute(:remember_token, User.hash(remember_token))\n self.current_user = user\n end",
... | [
{
"docid": "e6a57fc6e37753d6db8d263b9da8de6b",
"score": "0.7678527",
"text": "def remember!(cookies)\n# cookie_expiration = 20.years.from_now\n cookie_expiration = Time.now + 2.years\n\n cookies[:remember_me] = { :value => \"1\",\n :expires => cookie_expiration }... |
220fe05227773dec1865fa3e2445fd90 | POST /sivic_bancos POST /sivic_bancos.json | [
{
"docid": "6b3d0129502fb8885f4c0b950220ca93",
"score": "0.6961086",
"text": "def create\r\n @sivic_banco = SivicBanco.new(sivic_banco_params)\r\n\r\n respond_to do |format|\r\n if @sivic_banco.save\r\n format.html { redirect_to @sivic_banco, notice: 'Registro inserido com sucesso.' }\... | [
{
"docid": "a5422a759f9d35f83d6f330418e1ae87",
"score": "0.6756584",
"text": "def create\n @socio_dados_banco = SocioDadosBanco.new(socio_dados_banco_params)\n\n respond_to do |format|\n if @socio_dados_banco.save\n format.html { redirect_to @socio_dados_banco, notice: 'Socio dados ban... |
676ef7aa5c037d1c8af960cf025e0a76 | a rails console utility for testing user/host/destination | [
{
"docid": "fda8cdd15b2e9a0cd866528f5f060070",
"score": "0.0",
"text": "def pull_request_where\n\t\tALF_CFG[\"where\"]\n\tend",
"title": ""
}
] | [
{
"docid": "3244e9daad970a3074cc7942b23218a4",
"score": "0.56870097",
"text": "def show_help()\n puts 'Usage: rails runner create_user.rb <email> <password> <name> <admin>'\n puts 'The <admin> argument admits the values \"true\" and \"false\" (without quotes)'\nend",
"title": ""
},
{
"... |
58e324d5a23c017f9ee4c21050f78666 | DELETE /support_contacts/1 DELETE /support_contacts/1.json | [
{
"docid": "b33a606aadd489a49f45d7d47ba9419c",
"score": "0.7585601",
"text": "def destroy\n @support_contact.destroy\n respond_to do |format|\n format.html { redirect_to support_contacts_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "c140bb4bd134f54aedab6cedc4581acf",
"score": "0.76803833",
"text": "def destroy\n @contact.destroy\n\n render json: @contact, status: :ok\n end",
"title": ""
},
{
"docid": "17bbac4c2997ecb6a6d6dceb6947218c",
"score": "0.7628612",
"text": "def destroy\n puts \"del... |
4c0d609a83fef9f086455a65dce70638 | this function takes a person as an input and checks to see if they need to be contacted based on their lastContactedDate | [
{
"docid": "f2561ecd9b5372dc9d61b3264ea17451",
"score": "0.6518458",
"text": "def is_stale(person, days = 30)\n\t# get the persons last contacted date\n\tdate = person[\"lastContactedDate\"]\n\t# check if person needs to be contacted\n\tif date.nil?\n\t\ttrue\n\telse\n\t\tdate = Date.strptime(date, \"%Y... | [
{
"docid": "77e05a3af8ba570e149b66f3b64693a1",
"score": "0.6375474",
"text": "def in_contact_list?(person)\n contact_by_name(person.name) != nil\n end",
"title": ""
},
{
"docid": "c3a4ea50051a80f466789519e4fd97b4",
"score": "0.6074359",
"text": "def contacted_recently?\n !cont... |
e0186314616ad4e8e68f446ae8efd153 | GET /flyers GET /flyers.json | [
{
"docid": "f093f2571fa70e8780a14bc7e9a1e553",
"score": "0.0",
"text": "def index\n \n end",
"title": ""
}
] | [
{
"docid": "ca5bc320fccf31090d333d4f70ec3581",
"score": "0.76341265",
"text": "def show\n @flyer = Flyer.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @flyer }\n end\n end",
"title": ""
},
{
"docid": "04d7eb4837665... |
28b16039bd4a339a47aa1a91187f6c0a | Build the policy simulation screen | [
{
"docid": "2a10aa1c08df546a97ffa5a4032a822c",
"score": "0.7341307",
"text": "def policy_sim_build_screen(records = [])\n @edit ||= {}\n @right_cell_text = _(\"%{vm_or_template} Policy Simulation\") % {:vm_or_template => ui_lookup(:table => vm_or_instance(records.first || session[:tag_items].first... | [
{
"docid": "f9cc1793980f631e63ab6ecf6cddd45b",
"score": "0.6233409",
"text": "def protect_build_screen\n drop_breadcrumb(\n :name => _(\"'%{model}' Policy Assignment\") % {:model => Dictionary.gettext(session[:pol_db].to_s,\n ... |
9298dc651b49115fb435e5dc785f1b1e | If a group name was provided, adds that group to all commands in the command set. | [
{
"docid": "8d3a2bd0e16193a98b1a49715e41327f",
"score": "0.7545649",
"text": "def apply_group_name_to_commands\n return false if group == DEFAULT_GROUP_NAME\n each { |command_name, command| command.group(group) }\n true\n end",
"title": ""
}
] | [
{
"docid": "f9f0b299535d835aeada311bb4ae79ae",
"score": "0.7463326",
"text": "def groupadd(group, options={})\n via = options.delete(:via) || run_method\n invoke_command \"grep '#{group}:' /etc/group || #{sudo} /usr/sbin/groupadd #{group}\", :via => via\n end",
"title": ""
},
{
"docid... |
8c6139f729cb6397c6f720ebe79f424a | Constructor Returns an instance of a TLV. | [
{
"docid": "308587b6eb0f78d241cc1913c483aa67",
"score": "0.59158796",
"text": "def initialize(type, value = nil, compress=false)\n @type = type\n @compress = compress\n\n if (value != nil)\n if (type & TLV_META_TYPE_STRING == TLV_META_TYPE_STRING)\n if (value.kind_of?(Integer))\... | [
{
"docid": "2af18da6e3681bc43e71ba93a74e4eda",
"score": "0.65321743",
"text": "def create(type_class: Int8Enum, length_class: Int8, value_class: String,\n aliases: {}, header_in_length: false, field_order: 'TLV', field_in_length: 'V')\n Deprecation.deprecated_option(self, 'cre... |
95ae74c69bceae53a447c5ac806d2197 | Sets up the deployment repository for the project. | [
{
"docid": "5f72604a16a0d969d65efefada95c3cf",
"score": "0.0",
"text": "def setup!(env=:production)\n invoke [:setup], env\n end",
"title": ""
}
] | [
{
"docid": "5105a2ce3031df8b560abb48d71f54a2",
"score": "0.6988035",
"text": "def deploy_setup\n FileUtils.chdir(PROJECT_ROOT)\n `git checkout master`\n `git fetch origin \"+refs/heads/*:refs/remotes/origin/*\"`\n `git remote add repo git@github.com:sensu-plugins/#{ define_plugin }.git`\n `git conf... |
57cd47a59ad3cc69653b31f81489ed99 | iterates through array of words and assignes a number within a hash | [
{
"docid": "b4ce9af47a36d0596fa60de64e351647",
"score": "0.0",
"text": "def word_occurences(string)\n word_hash = Hash.new(0)\n words = string.downcase.split\n words.each do |word|\n word_hash[word] += 1\n end\n word_hash\nend",
"title": ""
}
] | [
{
"docid": "be0e8b350ffd41ff81a76eb9673712eb",
"score": "0.73706716",
"text": "def setVal(words, array)\n\t\n\t#Creating a hash for alphabets\n\n\n \n\n r = (@my_hash[(words.at(0))[0].upcase.to_sym]).to_i \n c = (words.at(0))[1].to_i\n\n array[r][c] = (words.at(1)).to_i\n\nend",
"title": ... |
6559f899145957bad7e233df2d299fc4 | Entrypoint for rendering. Called by ActionView::RenderingHelperrender. Returns ActionView::OutputBuffer. | [
{
"docid": "1a22732d58f76d4652fd1046285eedc8",
"score": "0.0",
"text": "def render_object(view_context, &block)\n self.class.compile\n @content = view_context.capture(&block) if block_given?\n validate!\n rendered_template\n end",
"title": ""
}
] | [
{
"docid": "88792247c9c10d80934bd297a631d31b",
"score": "0.74141675",
"text": "def process\n write_to_output(render)\n end",
"title": ""
},
{
"docid": "b8914df59175be33373e5a1e7b685381",
"score": "0.732072",
"text": "def render\n r = renderer\n render! r\n\n outgoing... |
fb0b26e2eb9a2f01c58ab4f850a5106d | Retrieve the quest name | [
{
"docid": "4b9bbc289e2725e85822563c5dae43af",
"score": "0.76050925",
"text": "def name(quest_id = Class)\n return super() if quest_id == Class\n\n return nil.to_s unless id_valid?(quest_id)\n return text_get(45, quest_id)\n end",
"title": ""
}
] | [
{
"docid": "74ad1e911a2430c2bb47ef41ae7d3ae2",
"score": "0.71428835",
"text": "def current_quest(player_name)\n return lookup(player_name).current_quest_id\n end",
"title": ""
},
{
"docid": "27dc3177d787c4d70cdea5a1311595f7",
"score": "0.70136726",
"text": "def quest; @quest; end... |
42505d4b16190910223e4fa0216de8ab | Record that an attempt was made to execute this command whether or not it was successful. | [
{
"docid": "994ef4341564e008e6a45b1a097e4ee7",
"score": "0.72476405",
"text": "def execution_attempted! #:nodoc:\n @execution_attempted = true\n end",
"title": ""
}
] | [
{
"docid": "3c9bebb8a0e204aa2bf0c2dbe5ae7461",
"score": "0.6744505",
"text": "def has_successful_execution(cmd)\n @commands << cmd\n end",
"title": ""
},
{
"docid": "b7b15925833eb91fe442626d67b84b87",
"score": "0.6358301",
"text": "def succeed!\n self.success = tru... |
5fe4a9fffd7cc3b10bb4bf8159932c90 | The number of bits the processor can handle. | [
{
"docid": "e5cfb1473df2cb4bd35bd56fccacdc86",
"score": "0.725905",
"text": "def bits; 32; end",
"title": ""
}
] | [
{
"docid": "fabacf4317b2a7435a0f94ce89314dd7",
"score": "0.80909276",
"text": "def num_bits(*) end",
"title": ""
},
{
"docid": "a712f32aaee6fb59cd49796ba699f8fb",
"score": "0.7782109",
"text": "def size_in_bits\n @bit_strength ||= getBitStrength()\n end",
"title": ""
},... |
458f04b13aa654647122b837158936c3 | redefine your position_taken? method here, so that you can use it in the valid_move? method above. | [
{
"docid": "d31d0b193c8dbb75af03d05d7a2f6c40",
"score": "0.0",
"text": "def position_taken?(board, i)\n if board[i] == \"X\" || board[i] == \"O\"\n return true \n else\n return false \n end\nend",
"title": ""
}
] | [
{
"docid": "f1b5882b1e94341642347a5613e1d1a2",
"score": "0.8490366",
"text": "def valid_move?(position)\n end",
"title": ""
},
{
"docid": "d2a173acad26f0c45b2c44cf63a2b56e",
"score": "0.80382085",
"text": "def valid_move?(board, index)\n return !position_taken?(board, index)\nend",... |
06d6d1542e4500519327985da433de7d | Sorry for the dutch. PICO is in dutch... | [
{
"docid": "b4434c1eedefc3a3986351b1db95ffb6",
"score": "0.0",
"text": "def area_name\n return 'Nederland' if type == Embeds::Pico::AreaType::Country\n\n area.sub(/\\A[^_]*/, '').humanize\n end",
"title": ""
}
] | [
{
"docid": "fad4037aa9cc9f1599490903066ec687",
"score": "0.67628926",
"text": "def mozart_italian; end",
"title": ""
},
{
"docid": "487d57e61b80ad1873561b38f68c36eb",
"score": "0.659297",
"text": "def gluck_french; end",
"title": ""
},
{
"docid": "9965b4f2be52c04c7b2b3a52... |
1606a8a1a32928f75a8d590a91435f76 | PUT /email_templates/1 PUT /email_templates/1.xml | [
{
"docid": "e1d0bc6034c9900b86543809479beb8f",
"score": "0.6452854",
"text": "def update\n @email_template = EmailTemplate.find(params[:id])\n\n respond_to do |format|\n if @email_template.update_attributes(params[:email_template])\n flash[:notice] = 'EmailTemplate was successfully upd... | [
{
"docid": "9f66e88d9c4d8d20f9efbaa6daa668a5",
"score": "0.68358594",
"text": "def update\n @templates = EmailTemplate.find(:all) \n @email_template = EmailTemplate.find(params[:id])\n @page_title = t('email_templates.new.title', :email_template_name => @email_template.name) \n respond_to do... |
c63087a452635bd8277abf0ba84ddba7 | Gets checksums for the given package | [
{
"docid": "cd2bf62f6edafd26ecb998cc29a37be6",
"score": "0.52127814",
"text": "def delete_checksums\n # puts \"Del: #{@basename}\"\n @pkgdb.query(\"delete from checksums where basename = '#{@basename}'\")\n end",
"title": ""
}
] | [
{
"docid": "c9eedb2ae768528ebf1090eb8066c1db",
"score": "0.76629245",
"text": "def generate_checksums(package)\n File.open(package, \"r\") do |pkg|\n {\n \"MD5sum\" => checksum(pkg.rewind && pkg, :md5),\n \"SHA1\" => checksum(pkg.rewind && pkg, :sha1),\n ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "c9492b89be710126815ee2d92b13f9c2",
"score": "0.0",
"text": "def fish_params\n params.require(:fish).permit(:name, :level, :season_begin,:season_end)\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... |
101c3bee7bb63d01684ff9acf5fcfe24 | Returns the next logical grouping of data. For example, if given a state and a county, return the cities in that county. | [
{
"docid": "195fd4f70aa035ed13309bcbe0995f2e",
"score": "0.47010556",
"text": "def fill_next_full\n return ['state', GeographyHelper.get_states] unless geography_params[:state].present?\n return ['county', GeographyHelper.get_counties(geography_params[:state])] unless geography_params[:county].pre... | [
{
"docid": "acbc64518460da11889efed751ae1492",
"score": "0.5698775",
"text": "def next_group\n @cesure.groups(self.index + 1)\n end",
"title": ""
},
{
"docid": "7282b1e50b3bd8679a14677fd7544713",
"score": "0.5418875",
"text": "def grouped_by_nation\n data.group_by ... |
a918798747beb56c065ed07875b14a8c | Prepends seq (with key) to the front of the alignment. (Like Arrayunshift) | [
{
"docid": "cce22b83c71fbdfd5f24303d53e5e406",
"score": "0.75283825",
"text": "def unshift(key, seq)\n #(Array-like)\n self.store(key, seq)\n k = @keys.pop\n @keys.unshift(k)\n k\n end",
"title": ""
}
] | [
{
"docid": "a2a3a92f824971a0ea1ddc7084dc6fae",
"score": "0.6887289",
"text": "def do_unshift (opts)\n\tif params = opts[:parameters]\n\t case @original\n\t when ::Array\n\t\t@template.use :array_growth, params.size(:seq)\n\t\t@original.unshift *params.values(:seq)\n\t when Sarah\n\t\t@template.... |
271182288f790abcb04e3e49d1d4d79a | puts parenthetical_matcher("Sometimes (when I nest them (my parentheticals) too much (like this (and this))) they get confusing.", 10) | [
{
"docid": "9b84c327babbf356abf4d16a73dc30fd",
"score": "0.0",
"text": "def parentheses_checker(string)\n opening_par = {\n '{' => 1,\n '(' => 2,\n '[' => 3\n }\n closing_par = {\n '}' => 1,\n ')' => 2,\n ']' => 3\n }\n\n stack = []\n\n string.each_char do |char|\n if opening_... | [
{
"docid": "840796112893a8e9eb76b6274e9c60a3",
"score": "0.69721127",
"text": "def parenthetical_matcher(sentence, pos)\n\n par_number = 0\n test_number = nil\n sentence.each_char.with_index do |char, idx|\n if char == '('\n par_number += 1\n elsif char == ')'\n par_number -=1\n ... |
ba83b9ebab7946c9b11c3b8189c62279 | PATCH/PUT /actionables/1 PATCH/PUT /actionables/1.json | [
{
"docid": "3cb82303f4119f6fd4b8bc07ea5be351",
"score": "0.68141884",
"text": "def update\n respond_to do |format|\n if @actionable.update(actionable_params)\n format.html { redirect_to @actionable, notice: 'Actionable was successfully updated.' }\n format.json { render :show, stat... | [
{
"docid": "c683ac991b0deb040ffd668ec221a573",
"score": "0.6737716",
"text": "def update\n head :forbidden\n\n #@action = Action.find(params[:id])\n\n #if @action.update_attributes(params[:action])\n # head :no_content\n # else\n # render json: @action.errors, status: :unprocessable... |
f5d0f73e7618ad7c6b42b9a5d161476c | Filter users 98% or more similar to u and return them in an array Lower the shreshould, longer it takes to calculate. | [
{
"docid": "71e1304f04c2e5bb799490e2517aa5f8",
"score": "0.6884578",
"text": "def top_sim_user(u)\n\t\tsim_users = []\n\t\tsim_hash_descend = most_similar(u)\n\t\tsim_hash_descend.each do |k, v|\n\t\t\tif v.to_f > 98\n\t\t\t\tsim_users.push(k)\n\t\t\telse\n\t\t\t\tbreak\n\t\t\tend\n\t\tend\n\t\treturn s... | [
{
"docid": "18c92d5db8980370ea101cef63786d2a",
"score": "0.7134834",
"text": "def comparing_all_to_u(u)\n #make an array that will hold how similar ea user is to u\n user_sims = Array.new(943)\n #now calc each user's sim to u and put val in index \n #corresponding to the user... |
8fd546689e1c9b480bdeb5056a52b11b | TODO: handle nested code blocks | [
{
"docid": "c00b539ab989816ee8d9f89ecca37e3d",
"score": "0.0",
"text": "def all_ordered_nodes(klasses)\n ret = []\n all_nodes(Object).each do |node|\n break if block_given? && node.is_any_of?(klasses) && yield(node)\n ret << node\n end\n ret = ret.select { |node| node.is_any_of?(kl... | [
{
"docid": "4a3e8a373e2aa039d44bae283b2035d6",
"score": "0.70057064",
"text": "def render_source_block(block)\n @code_i += 1\n '\n <section class=\"code\">\n <pre class=\"html\" id=\"s' + @code_i.to_s + '\">\n' + convert_tags(block) + '\n </pre>\n </section>\n'\n end",
"... |
132a201823e1edd2071f12c21f1a8584 | This is used to create ordered_list_ids for sections under project item | [
{
"docid": "0471f978b7e71c8344887cd5c65ae386",
"score": "0.7275199",
"text": "def ordered_list_ids_with_sections(sections)\n # @sections = section.project.sections\n # @sections = project.sections\n section_hash = {}\n head = nil\n\n sections.each do |section|\n ... | [
{
"docid": "8ef2676e9b30af41e1347ca4a9f63607",
"score": "0.75211453",
"text": "def ordered_list_ids(project)\n # @sections = section.project.sections\n @sections = project.sections\n section_hash = {}\n head = nil\n\n @sections.each do |section|\n section_ha... |
767ebcbabbdbd24b0361a530a41f5f89 | POST /meanings POST /meanings.json | [
{
"docid": "1d2464e695011424810cb324ecac2b8f",
"score": "0.581831",
"text": "def create\n @meaning = Meaning.new(params[:meaning])\n @meaning.user = current_user\n\n respond_to do |format|\n if @meaning.save\n format.html { redirect_to @meaning.word, notice: 'Meaning was successfull... | [
{
"docid": "3dd6df1ac46b38304e0f436cabaf851a",
"score": "0.59860563",
"text": "def create\n @average = Average.new(params[:average])\n\n respond_to do |format|\n if @average.save\n format.html { redirect_to @average, notice: 'Average was successfully created.' }\n format.json { ... |
6fd1f311d60282e96a8643a4623531f0 | Titleize Write a method that capitalizes each word in a string like a book title. Do not capitalize words like 'a', 'and', 'of', 'over' or 'the'. | [
{
"docid": "45682380189f3b54676b1d71c7261f7f",
"score": "0.8441356",
"text": "def titleize(title)\n capitalized_title = []\n uncapitalized_words = %w[a and of over the]\n title.split(' ').each.with_index do |word, idx|\n if uncapitalized_words.include?(word)\n if idx == 0\n capitalized... | [
{
"docid": "fcd06d4caa6ee843563d26db82b60b8d",
"score": "0.86128074",
"text": "def titleize(s)\n #get array of words in the s\n words_in_s = s.split \" \"\n\n #make a string with all the words capitalized\n titlized_s = \"\"\n words_in_s.each do |w|\n titlized_s << w.capitalize\n titlized_s <... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "2929a3afb677faf7566eae5d85a2f602",
"score": "0.0",
"text": "def update!(**args)\n @normalized_bounding_boxes = args[:normalized_bounding_boxes] if args.key?(:normalized_bounding_boxes)\n @time_offset = args[:time_offset] if args.key?(:time_offset)\n end",
"title"... | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.73066413",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72631145",
"text": "def update... |
035807e8085568af234240226eef6a3b | =begin :rtype: IntegerBalls =end | [
{
"docid": "73bb83b857241b9baaf52c3d3d105f1e",
"score": "0.0",
"text": "def pick_index()\n j = @rando.rand(@total_sum)\n left = 0\n right = @sums.length - 1\n\n until left == right - 1 do\n median = (left + right) / 2\n\n if @sums[median] <= j\n ... | [
{
"docid": "d81c310a620da7a9ad6f3de904592c9a",
"score": "0.5969763",
"text": "def get_rand_ball\n\t\tfor i in 0...10\n\t\t\tneeds_regen = false\n\t\t\t\n\t\t\tnew_ball = Ball.new(@random.rand(0..$win_width), @random.rand(0..$win_height), 2, 2)\n\t\t\t@balls.each do |ball|\n\t\t\t\tneeds_regen = true if ... |
a33c1f5e598154253183634f708c333b | Return the title of the page | [
{
"docid": "a68653b461209e22897838fa9f4273cf",
"score": "0.0",
"text": "def title\n\t\tbase_titre = \"Simple App du Tutoriel Ruby on Rails\"\n\t\t@title.nil? ? base_titre : \"#{base_titre} | #{@title}\"\n\tend",
"title": ""
}
] | [
{
"docid": "a48b4df2c3211068f73473525263498c",
"score": "0.9021427",
"text": "def page_title\n page.title\n end",
"title": ""
},
{
"docid": "963c66d8fb415e62cf78790ff75f82b6",
"score": "0.87450486",
"text": "def title\n @title_pages.each { |tp| tp.title and return tp... |
d73e25003aeafd7fd84e660c30c6226e | Runs a GET request on the client's connection. | [
{
"docid": "5c883b46dccb06f69d1efd06e224bfbb",
"score": "0.0",
"text": "def get(uri)\n path = [uri.path, uri.query].compact.join('?')\n response = connection.get(path)\n yield response if block_given?\n response.body\n end",
"title": ""
}
] | [
{
"docid": "7805ec1e82944389ee413dcc56466f7f",
"score": "0.7557685",
"text": "def send_GET_request path\n Net::HTTP.start(@url.hostname, @url.port, :use_ssl => @url.scheme == 'https', :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|\n request = Net::HTTP::Get.new(path)\n request.b... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "bee55f9fcbd48d36f9cd3ee4b543d27e",
"score": "0.0",
"text": "def set_invegetable_dish\n @invegetable_dish = InvegetableDish.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60320485",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6013371",
"text": "de... |
f3a7f3e90469304a223d897294995870 | define ListView_SetBkImage(hwnd, plvbki) (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)(plvbki)) | [
{
"docid": "5c28cf88c2f7f848c7537b59a7dc0888",
"score": "0.86592346",
"text": "def ListView_SetBkImage(hwnd, plvbki) send_listview_message(hwnd, :SETBKIMAGE, lparam: plvbki) end",
"title": ""
}
] | [
{
"docid": "9ad505579bd0b64a02750e0200fc73a0",
"score": "0.7915206",
"text": "def ListView_GetBkImage(hwnd, plvbki) send_listview_message(hwnd, :GETBKIMAGE, lparam: plvbki) end",
"title": ""
},
{
"docid": "07d8c47830d68c1c201e190e613c0138",
"score": "0.68213624",
"text": "def ListVie... |
8bd1d9846ec1c2c9def236c569c9afb9 | all the paths we should look into | [
{
"docid": "6b29a4528154d9c33b9f3bf6b7808149",
"score": "0.0",
"text": "def in_dirs(dirs_a)\n @dirs += dirs_a\n self\n end",
"title": ""
}
] | [
{
"docid": "32e9221894e68241453d261d57d2003b",
"score": "0.79278183",
"text": "def paths; end",
"title": ""
},
{
"docid": "32e9221894e68241453d261d57d2003b",
"score": "0.79278183",
"text": "def paths; end",
"title": ""
},
{
"docid": "32e9221894e68241453d261d57d2003b",
... |
18d9decca3950b1977df178a2a2116ea | DELETE /users/1 DELETE /users/1.xml | [
{
"docid": "a493f408bc10fd713a0316320ef16f92",
"score": "0.68964374",
"text": "def destroy\n @user.destroy\n\n respond_to do |format|\n format.html { redirect_to(users_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
}
] | [
{
"docid": "f2aa64556d41c1306c893cf55febd02e",
"score": "0.7177572",
"text": "def delete\n @user = User.find(params[:id])\n @user.rvsps.delete_all()\n @user.destroy\n\n respond_to do |format|\n format.html { redirect_to(users_url) }\n format.xml { head :ok }\n end\n end",
... |