query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
69beaa3e957d1fc356539d0314d703e1 | Custom attribute writer method checking allowed values (enum). | [
{
"docid": "989ceed76fa61dc2c687bd2971f8d928",
"score": "0.0",
"text": "def period_apply_to=(period_apply_to)\n validator = EnumAttributeValidator.new('String', [\"Time\", \"Expense\", \"Both\"])\n unless validator.valid?(period_apply_to)\n fail ArgumentError, \"invalid value for 'perio... | [
{
"docid": "af6d0e33773bc681443214ce777b13e1",
"score": "0.7088127",
"text": "def write_attribute_with_enum(attr, value)\n write_attribute_without_enum attr, converted_enum(attr, value)\n end",
"title": ""
},
{
"docid": "85eec95603dc239e3d18923b2c672b31",
"score": "0.6482... |
650d6cd0807664d4adf5d1bfccce0550 | Private: The list of files and directories to be deleted during cleanup process Returns an Array of the file and directory paths source://jekyll4.2.2/lib/jekyll/cleaner.rb:24 | [
{
"docid": "ba479c7cf6442a0caab8e7c6292656af",
"score": "0.0",
"text": "def obsolete_files; end",
"title": ""
}
] | [
{
"docid": "b6d5727ff824c3a7a1383261950e4e0f",
"score": "0.6981779",
"text": "def cleanup_dirs\n @cleanup_dirs ||= ['.']\n end",
"title": ""
},
{
"docid": "e3158401c5d2cdc5c9940bd839558c36",
"score": "0.68267465",
"text": "def clean_debris \n objdirs = File.join(\"... |
41fc94503ea66f16eb12fc8643dec024 | Private method to check if the user is the correct user | [
{
"docid": "e64b3b49fc8aa924d005f1c25202b880",
"score": "0.0",
"text": "def correct_user\r\n @appointment = current_user.appointments.find_by_id(params[:id])\r\n redirect_to help_url if @appointment.nil?\r\n end",
"title": ""
}
] | [
{
"docid": "6c9c758d8eb9ecf1ebeb1cb6c83132e1",
"score": "0.8169072",
"text": "def check_correct_user(user)\n \tcurrent_user?(user)\n end",
"title": ""
},
{
"docid": "e9072253568fdec1ec816c1eac03c31a",
"score": "0.7907332",
"text": "def correct_user(user)\n user == current_user\n... |
b3204f6eca72712e686625800a082324 | handles nonhtml responses in DEV mode when there are exceptions | [
{
"docid": "0bccb4ebecf7ec0d038bab2233a04dbc",
"score": "0.0",
"text": "def rescue_action_locally(exception)\n if api_format?\n render :text => \"Error: #{exception.message}\", :status => :internal_server_error\n else\n super\n end\n end",
"title": ""
}
] | [
{
"docid": "d84c36e25f2138249030f51c9898e8d4",
"score": "0.7002191",
"text": "def render_error_response_for(service_response)\n http_code = service_response.http_code\n @page_assets_data = {specific_js_required: 0}\n\n # Clean critical data\n service_response.data = {}\n\n if request.xhr?... |
559d3d55d86e5d1b215e66a1904d798e | The value of the parameter specified by this key. Each is one of 3 things: null < That key was not specified ParsedHeaderValue.EMPTY (tested using ==) < The value was not specified [Other] Note: The q parameter is never present. | [
{
"docid": "5a1403958a67303750d4c13d69b1da6e",
"score": "0.0",
"text": "def parameter(key=nil)\n if key.class == String && !block_given?\n return @j_del.java_method(:parameter, [Java::java.lang.String.java_class]).call(key)\n end\n raise ArgumentError, \"Invalid arguments when call... | [
{
"docid": "efd344d5bd37e8df232d9ff22c19fdfd",
"score": "0.6298689",
"text": "def value_for(key)\n return '' unless self.param_values && self.param_values[key]\n self.param_values[key]\n end",
"title": ""
},
{
"docid": "8c7f4dd17a6f18977b3a4648874580aa",
"score": "0.62... |
53c98c6fa004bcad790bb333e411aade | This endpoint will only retrieve 7 days worth of audits for certain services. Please use /query to get a full list and older audits. | [
{
"docid": "6eb0c3ab3a51d8f61c774223997a74ff",
"score": "0.0",
"text": "def post_audits_query_realtime_with_http_info(body, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: AuditApi.post_audits_query_realtime ...\"\n end\n \n \n ... | [
{
"docid": "f37f39da965b1c7473769c991c0e3566",
"score": "0.62126756",
"text": "def index\n raise unless current_user.is_department_admin?\n\n start = 7.days.ago.at_midnight.at_beginning_of_day\n stop = Date.today.tomorrow.at_beginning_of_day\n\n created_events = Event.where(\"created_at > ? ... |
6a919abf0bac4a05ff4f9245a0bbbb2b | Does the SQL definition specify a clause to filter a previous set of results? | [
{
"docid": "2270fef95257602561357248e97c0edd",
"score": "0.73605645",
"text": "def filter_previous_clause?\n sql.include?(':filter_previous') || sql.include?(':ids_filter_previous')\n end",
"title": ""
}
] | [
{
"docid": "b487f1d130d7eff163e0945185357d03",
"score": "0.63542014",
"text": "def substitute_filter_previous(sql)\n if current_user && requested\n\n if sql.include?(':filter_previous') && filtering_ids\n # Substitute in inner join SQL to satisfy the filtering directly,\n #... |
de16caef67a03a25dfa3c9ba94b98536 | New vote. Add +4 carma to author, +1 to author | [
{
"docid": "2526000ba53b4cc84563069546a46f90",
"score": "0.6836335",
"text": "def new_vote(vote, votable, voter)\n vote == 'up' ? votable.upvote_by(voter) : votable.downvote_by(voter)\n change_carma(vote, votable, voter,\n ex_up: 2, ex_down: -1, ph_up: 4, ph_down: -2, usr: 1)\n ... | [
{
"docid": "20443ae8f9ef18ce8f66499f6ebc2b2e",
"score": "0.75789016",
"text": "def create_initial_vote_for_author\n votes.create(:user => user, :value => 1)\n end",
"title": ""
},
{
"docid": "6e7c657dd2015ee315fadacae1268922",
"score": "0.7361577",
"text": "def add_vote\n ... |
babe36c74467886e170f6fe3a3cde501 | GET /limpezas GET /limpezas.json | [
{
"docid": "58fc32675254d3b67c220857b12f35b2",
"score": "0.69795656",
"text": "def index\n @limpezas = Limpeza.all\n end",
"title": ""
}
] | [
{
"docid": "fc73f983604c4ea1b86ae6e93ed2ffa5",
"score": "0.67793703",
"text": "def index\n @viajes = Viaje.all\n render json: @viajes\n end",
"title": ""
},
{
"docid": "9cadc562754ec30b5ab47ed4287edf71",
"score": "0.6750358",
"text": "def index\n @maquinas = Maquina.all\n\n... |
c5df23f5971ca8d81b207321de16109f | Just returns the value of 'uname a' | [
{
"docid": "0d6891bb4cdd01f871d4d6db461f33ba",
"score": "0.78638965",
"text": "def get_uname\n `uname -a`\n end",
"title": ""
}
] | [
{
"docid": "a91fca671b1016822d93f3a0bceda1ed",
"score": "0.75000405",
"text": "def uname\n shell(%w[uname])\n end",
"title": ""
},
{
"docid": "69855e0d27cb893c52e6084df6af6597",
"score": "0.73231316",
"text": "def username\n if @username.nil?\n if os_type(:nice, :... |
f99de675444517bc38f53327bd237bd8 | DELETE /water_types/1 DELETE /water_types/1.xml | [
{
"docid": "a121338af3d832c73bf911a70e1e96f8",
"score": "0.6047963",
"text": "def destroy\n if !signed_in_and_master?\n flash[:notice] = \"Sorry. Only technical manager can delete data. Please, contact Roberto SPURIO to do it.\"\n redirect_to water_types_path\n else\n\n @title = \... | [
{
"docid": "f6f68dfddef97d4aa5d184c0356300bc",
"score": "0.66651165",
"text": "def destroy\n @attrib_type = AttribType.find(params[:id])\n @attrib_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(attrib_types_url) }\n format.xml { head :ok }\n end\n end",
"... |
6697e8013fb68d949535da15f59c5e43 | Set a torrent's upload limit A limit of 0 means unlimited. torrent_hash: string limit: integer (bytes) | [
{
"docid": "5db0049040cda6467177f25419a6eaf0",
"score": "0.9185114",
"text": "def set_upload_limit torrent_hash, limit\n query = [\"hashes=#{torrent_hash}\", \"limit=#{limit}\"]\n\n options = {\n body: query.join('&')\n }\n\n self.class.post('/command/setTorrentsUpLimit', opti... | [
{
"docid": "86a29604b41a3ee19787b84763869913",
"score": "0.82679546",
"text": "def set_download_limit torrent_hash, limit\n query = [\"hashes=#{torrent_hash}\", \"limit=#{limit}\"]\n\n options = {\n body: query.join('&')\n }\n\n self.class.post('/command/setTorrentsDlLimit', o... |
62a607e6657129c8953bf060d013fe17 | 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 whether or not the shop offers their favorite flavor. | [
{
"docid": "fc0e33818047ad2beef63e85af213694",
"score": "0.81605864",
"text": "def ice_cream_shop(flavors, favorite)\n if flavors.empty?\n false\n elsif flavors.first == favorite\n true\n else\n ice_cream_shop(flavors[1..-1], favorite)\n end\nend",
"title": ""
}
] | [
{
"docid": "4fcb6b5c02a2796aaf9b150b313c3e0e",
"score": "0.8366438",
"text": "def ice_cream_shop(flavors, favorite)\n return false if flavors.empty?\n return true if flavoris[0] == favorite\n ice_cream_shop(flavors[1..-1], favorite)\nend",
"title": ""
},
{
"docid": "3f65d862449e9dffcf47f3... |
f2cf8eb74b4c3b56521e74382847c54b | get(index): Get a value from the array at the specified index. Throw an OutOFBoundsException if the user tries to get a value at an index outside the bounds of the fixed array. | [
{
"docid": "965e60ca8191537419a9d1514000b64f",
"score": "0.7484066",
"text": "def get(index)\n\t\traise OutOfBoundsException if index >= @size\n\t\t@data[index] \n\tend",
"title": ""
}
] | [
{
"docid": "3c35716ab2abdd21e6c1885211aa2328",
"score": "0.85320807",
"text": "def get(index)\n index = index.to_i\n raise OutOfBoundsException unless valid_index?(index)\n array[index]\n end",
"title": ""
},
{
"docid": "f453a9d615c5cdf48267f30adb8044fb",
"score": "0.750289",
... |
3e1e4eba8c8e2c16113b0a2e7367035c | Renew the authentication tokens Use this API when an alarm complaining JWT expiry is raised while deploying partner service VM. The OVF for partner service needs to be downloaded from partner services provider. It might be possible that the authentication token for this communication is expired when the service VM depl... | [
{
"docid": "13f39046b432b942ef8966176fc618a8",
"score": "0.0",
"text": "def renew_authentication_tokens_for_policy_service_instance_reauth_0(tier_0_id, locale_service_id, service_instance_id, opts = {})\n renew_authentication_tokens_for_policy_service_instance_reauth_0_with_http_info(tier_0_id, loc... | [
{
"docid": "c24e5fa99f6c0528c8cc6a4c31fa99cc",
"score": "0.6821502",
"text": "def renew_token\n body_params = token_request_body\n body_params << [\"refresh_token\", current_user.refresh_token]\n body_params << [\"grant_type\", \"refresh_token\"]\n\n get_token(body_params)\n redirect_to s... |
61f091047e84738d4bc3117b7979801c | all pins related to this brand | [
{
"docid": "1852b6e0d8f8ae4a2a3124ba23b98d50",
"score": "0.6601265",
"text": "def pins\n pins = []\n #(Pin.types - [self.class.name]).each do |type|\n # send(type.downcase.pluralize.to_sym).each{|p| pins << p.pin}\n #end\n %w(itineraries posts).each do |pinnable_type|\n send(pinnab... | [
{
"docid": "c4ca342c025a8887451c69db2be1c502",
"score": "0.64069",
"text": "def show\n # @pins = pins.as_json(include: { user: { only: [:username, :avatar] } })\n pinSearch = PinSearch.new\n pins = pinSearch.searchPins(@pin.parent_provider).take(8)\n @pins = {\n pi... |
1648b97e1c61e6cebb85b6e18cf94b75 | some other number, and then computes the sum of those multiples. For instance, if the supplied number is 20, the result should be 98 (3 + 5 + 6 + 9 + 10 + 12 + 15 + 18 + 20). You may assume that the number passed in is an integer greater than 1. input: integer output: the sum of all the multiples of 3 and 5 derived fro... | [
{
"docid": "81db74895831e4e6f61c9631009722e7",
"score": "0.81251955",
"text": "def multisum(num)\n multiples = []\n\n num.downto(0) do |n|\n if n % 3 == 0 || n % 5 == 0\n multiples << n\n end\n end\n\n multiples.sum\nend",
"title": ""
}
] | [
{
"docid": "f39192879fa51cc2e830edb20be9187a",
"score": "0.86197",
"text": "def multisum(input_integer)\n full_array = (1..input_integer).to_a\n multiples = full_array.select { |x| x % 3 == 0 || x % 5 == 0 }\n sum = multiples.reduce(:+)\nend",
"title": ""
},
{
"docid": "19428b605972b545fd... |
c3edba9999e46b50e92ed4511353b8c1 | GET /books/1 GET /books/1.json | [
{
"docid": "81fbb6f9be1c98dd95bbe62c3f2ce8d1",
"score": "0.0",
"text": "def show\n\n end",
"title": ""
}
] | [
{
"docid": "0dcef7df140be07467764e06d44a75c9",
"score": "0.7607299",
"text": "def index\n @books = get_books()\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @books }\n end\n end",
"title": ""
},
{
"docid": "cb4ed5eefdf1702a83001f8b23... |
39e5376e78a38494cdadcfa48269d008 | Shut down this producer. After the call completes, the producer will not accept any more data, but will finish processing any data it has buffered internally. If block = true is passed, this call will block and wait for the producer to shut down before returning. This wait times out after duration has passed. | [
{
"docid": "b7a76261f090b660a36c4cc7411ded64",
"score": "0.6775135",
"text": "def shutdown(block = false, duration = 2, unit = TimeUnit::SECONDS)\n # NOTE: Since a write_lock is exclusive, this prevents any data from being\n # added to the queue while the SHUTDOWN tokens are being inserted... | [
{
"docid": "bbf0774e6222d9f8fb126741be3e25c4",
"score": "0.5811657",
"text": "def shutdown &block\n @available.shutdown(&block)\n end",
"title": ""
},
{
"docid": "6d70ae61df48353ddaf8106920f8499f",
"score": "0.53412545",
"text": "def stop(&block) # allows callback\n if block\n... |
870dd41241d5dccf71bea9960fa374f2 | >> make_change(39) => [25, 10, 1, 1, 1, 1] | [
{
"docid": "3e0cab90cf2b4ad29aa97f0543ce3690",
"score": "0.73534507",
"text": "def make_change num\n\tcoins = [25, 10, 5, 1]\n\tchange = []\n\tcoins.each do |coin|\n\t\twhile num / coin >= 1\n\t\t\tnum = num - coin\n\t\t\tchange << coin\n\t\tend\n\tend\n\tp change\nend",
"title": ""
}
] | [
{
"docid": "8ec21b6aee2cc3dd5fcf21cec11cbaca",
"score": "0.7625456",
"text": "def make_change(amt, arr = [25, 10, 5, 1])\nend",
"title": ""
},
{
"docid": "fb70f1ec46c084946f75bf9f72584cb7",
"score": "0.72850335",
"text": "def make_change(change_amount, change_options)\n if change_am... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "e42ebdc2369e23be1059455ba0ff55cc",
"score": "0.0",
"text": "def extraction_params\n params.\n require(:extraction).\n permit(:projects_users_role_id,\n citations_project_ids: [],\n extractions_key_questions_project_ids: [],\n key_questions_projec... | [
{
"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... |
73950e81baaaeddee830e51650390ee4 | POST /appartments POST /appartments.xml | [
{
"docid": "1e00574159392bb7bf911d7bbf5f980d",
"score": "0.5663781",
"text": "def create\n @appartment = Appartment.new(params[:appartment])\n\n respond_to do |format|\n if @appartment.save\n format.html { redirect_to(@appartment, :notice => 'Appartment was successfully created.') }\n ... | [
{
"docid": "5bb1460d0b49d1e376454d600f8e4f82",
"score": "0.62576705",
"text": "def create\n @appartament = Appartament.new(appartament_params)\n\n respond_to do |format|\n if @appartament.save\n format.html { redirect_to @appartament, notice: \"Appartament was successfully created.\" }... |
770c2c439d945db5d87e9ae2a4228950 | Private: Spawns a new thread to work on the scheduled jobs | [
{
"docid": "800d62fbf4b2d5348e332cbcc24ae247",
"score": "0.651301",
"text": "def spawn_worker\n thread = Thread.new do\n while (command = @jobs.pop) != :stop_working\n job, args = command\n job.call(*args)\n end\n end\n\n @workers << thread\n end",
"... | [
{
"docid": "7adf0af85ebd42c1e64732af30809571",
"score": "0.6780583",
"text": "def handle_sending_scheduled_messages\n\t\t@executor.submit do \n\t\t\tbegin\n\t\t\t\twait_for_full_minute = false\n\t\t\t\twaiting_for_sec = 60 - Time.now.strftime(\"%S\").to_i\n\t\t\t\twait_for_full_minute = true if wai... |
db0f581e29fa9c473fc5b0abf36602d8 | draw image pattern in png file and export | [
{
"docid": "7ea49792c3a14de474f05e2978121d4a",
"score": "0.71789294",
"text": "def draw_and_save_image\n\t\tcolor = @avatar[:color]\n\t\tpng = ChunkyPNG::Image.new(250, 250, ChunkyPNG::Color::WHITE)\n\t\tcolor = ChunkyPNG::Color.rgba(color[:r], color[:g], color[:b], color[:alpha])\n\t\t@colorable_grid.e... | [
{
"docid": "c94734ff049b1d35ec180ccca1d296ca",
"score": "0.6904963",
"text": "def draw_image(data, row_number, digit)\n size = 28\n png = ChunkyPNG::Image.new(size, size, ChunkyPNG::Color::WHITE)\n data.each_with_index do |value, index|\n png[index % size, index / size] = ChunkyPNG::Color.rgb(255 ... |
baa49b9feed1b1d0755d1ed1c6e5ab8b | GET /shifts GET /shifts.json Regular index is watch shifts by default | [
{
"docid": "124438b7d4bb28c9a51ac0933d1ac2ff",
"score": "0.6747623",
"text": "def index\n unless ( params[:organization_id].blank? )\n @organization = Organization.find(params[:organization_id])\n @shifts = @organization.shifts\n else\n @shifts = Shift\n end\n\n if (params[:ty... | [
{
"docid": "3026a08963a0631ff5dcfdcdb928e705",
"score": "0.8230999",
"text": "def index\n @shifts = Shift.all\n @serializedShifts = json_shifts(@shifts)\n end",
"title": ""
},
{
"docid": "f2c5a24414a59b83156096692bf9ec62",
"score": "0.79267126",
"text": "def index\n @shifts... |
c8c46ed621e950c49424a01c42f1fe49 | Returns the set of TimezonePeriod instances that are valid for the given local time as an array. If you just want a single period, use period_for_local instead and specify how ambiguities should be resolved. Returns an empty array if no periods are found for the given time. source://tzinfo//lib/tzinfo/timezone.rb272 | [
{
"docid": "c6627761e44145116825022261ac0adc",
"score": "0.5324997",
"text": "def periods_for_local(local); end",
"title": ""
}
] | [
{
"docid": "a9bca75192c8856a90d20d916d9cc6e5",
"score": "0.72374445",
"text": "def periods_for_local(local)\n local = local.to_ri_cal_date_time_value\n candidate_standard = last_before_local(standard, local)\n candidate_daylight = last_before_local(daylight, local)\n ... |
5162496d0c544e7cf4ca60d0fe44e93c | invalid domain not unique strings | [
{
"docid": "a45f03e5c20541ab5598504393fee8e0",
"score": "0.0",
"text": "def test_add_option04g\n assert_raise ( RuntimeError ) {\n ArgumentManager.add_option(\n [ 'y' ],\n :type => :string,\n :domain => ['foo', 'foo']\n )\n }\n end",
"title": ""
}
] | [
{
"docid": "d2fb323a7e5ac9916aad69cbfd1f8aab",
"score": "0.6713614",
"text": "def cleanse_domain(domain)\n domain.downcase!\n domain = domain.sub(/^https?\\:\\/\\//, '').sub(/^www./,'')\n domain = domain.split(\"/\").first\n domain = domain.split(\"@\").last\n\n domain = PublicS... |
318f0f58b7aac8245496dc3ed3227bc0 | Returns a boolean whether indicating whether the library can be found by attempting to reference the function passed (+main+ by default). Params: library the library to be included as a string function a method to base the inclusion of the library on. +main+ by default. paths an optional list of search paths if the lib... | [
{
"docid": "f9e80f9ae20757070ce3153f46a49968",
"score": "0.759101",
"text": "def has_library?(library, function = \"main\", *paths)\n logger.info \"Checking for library: #{library}\"\n return true if library_already_loaded?(library)\n return true if RUBY_PLATFORM =~ /mswin/ # TODO: find a... | [
{
"docid": "3f75a3554e247f6fa377ef263a6d11fb",
"score": "0.7194693",
"text": "def include_library(library, function = \"main\", *paths)\n paths.each do |library_dir|\n @library_paths << library_dir\n end\n @loaded_libs << library if has_library?(library, function)\n end",
"t... |
e25f083115ace574cc37796932ff6ed8 | Ideally, this software will listen for a connection to the toribash lobby, and act as a relay for commands to be passed through | [
{
"docid": "a3ea015cb7aac623b054b86bc4dbb804",
"score": "0.0",
"text": "def resolve_domain(domain)\n # Just to avoid repeating this.\n puts \"Resolving #{domain} to IP address..\"\n addr = IPSocket::getaddress domain\n puts \" # => #{addr}\"\n addr\nend",
"title": ""
}
] | [
{
"docid": "d7500be103902883f599eb9f8296c2e4",
"score": "0.6666809",
"text": "def initialize\n register_script \"Relay chat between two or more channels on one or more networks.\"\n\n register_event :PRIVMSG, :on_privmsg\n register_event :JOIN, :on_join\n register_event :PART, :on_part\n regi... |
7a626db4ffe3c7e2b0985159235da763 | save_record_to_database Parameters:: (tag) params: record Return:: Save record to database Author:: | [
{
"docid": "4791ccfe5db366945f286b91c6425eed",
"score": "0.6369141",
"text": "def save_record_to_database(record)\n #if ScraperWiki.select(\"* from swdata where council_reference='#{record['council_reference']}'\").empty?\n ScraperWiki.save_sqlite(['council_reference'], record)\n #else\n # puts \... | [
{
"docid": "b541d27f1a19dd0dda5ce6fb8247d8ab",
"score": "0.7422247",
"text": "def save_record(record)\n record.save\n end",
"title": ""
},
{
"docid": "b541d27f1a19dd0dda5ce6fb8247d8ab",
"score": "0.7422247",
"text": "def save_record(record)\n record.save\n end",
"... |
ab03ff6eb8491e5788690b5e4304b380 | Gets participations for this game | [
{
"docid": "98b0dc7a4d47de2954977fa8697bfc7d",
"score": "0.63887066",
"text": "def get_particpations\n participations = Participation.find_all_by_game_id self.id\n participations.each do |participation|\n yield participation\n end\n end",
"title": ""
}
] | [
{
"docid": "def3432e278b64d6e8a6e5ec54f095ec",
"score": "0.7866831",
"text": "def participation\n\t\tin_progress_game_ids = Game.where(in_progress: true).ids\n\t\tself.participations.find_by game_id: in_progress_game_ids\n\tend",
"title": ""
},
{
"docid": "571ee6859f17724b02762d1b135e6bc6",
... |
bec629f127a3d40c7b7aff007a6b05c8 | Returns dummy response if JSON schema is defined for the current link | [
{
"docid": "975b5a39d7d3bbb9ff371517e4bb1b21",
"score": "0.0",
"text": "def call\n if has_link_for_current_action?\n dummy_response\n else\n @app.call(@env)\n end\n end",
"title": ""
}
] | [
{
"docid": "9ce89167c4f35fff02d5983b96b53901",
"score": "0.62949336",
"text": "def show\n link = get_link\n if link\n render json: link\n else\n render json: nil, status: :not_found\n end\n end",
"title": ""
},
{
"docid": "0dbe216493e434665147ae4372be79a1",
"score"... |
1dfb23bd6092e28ddaefa4cc8199e975 | Gets the eventDetail property value. Readonly. If present, represents details of an event that happened in a chat, a channel, or a team, for example, members were added, and so on. For event messages, the messageType property will be set to systemEventMessage. | [
{
"docid": "ebe6873dcf4da93d0f9d2f5e6ed38b12",
"score": "0.7430039",
"text": "def event_detail\n return @event_detail\n end",
"title": ""
}
] | [
{
"docid": "6f869528bd797ebb362c503b2f73ee3d",
"score": "0.73317313",
"text": "def event_detail=(value)\n @event_detail = value\n end",
"title": ""
},
{
"docid": "6f869528bd797ebb362c503b2f73ee3d",
"score": "0.73317313",
"text": "def event_detail=(value)\n ... |
6f7e6525b526d6aa63c6a49f50706e0a | GET /recordeds/1 GET /recordeds/1.json | [
{
"docid": "8d9d460349d5109cb37b098e520c1b45",
"score": "0.0",
"text": "def show\n authorize @recorded\n end",
"title": ""
}
] | [
{
"docid": "08a82860cdab7ec8c45eb8a395dcf546",
"score": "0.6781499",
"text": "def set_recorded\n @recorded = Recorded.find(params[:id])\n end",
"title": ""
},
{
"docid": "743a8dd402f361aa6431a09dc6734453",
"score": "0.66374505",
"text": "def get_recordings()\n @client.ma... |
c2c11625525b2c0693d6a20de75c17fa | Update Product Information to Database | [
{
"docid": "fbba1ff3cda8bca1ec5fa51b43820ac1",
"score": "0.6812527",
"text": "def update_product\n begin\n @product = Product.find(params[:id])\n if @product.update_attributes(params[:product])\n redirect_to product_stock_path\n else\n flash[:notice] = \"Please enter corr... | [
{
"docid": "dbc4cbeb5bc513342967b7e0130bd883",
"score": "0.7969872",
"text": "def update_product(connection, *args)\n commit(connection, \"updateProduct\", *args)\n end",
"title": ""
},
{
"docid": "2afea75daf29d2525bfe7b3a2f3dce2c",
"score": "0.7721108",
"text": "def upda... |
af5e6ad39078e2c7a7776d1dc7f7470f | returns an Array of this follower's cults | [
{
"docid": "08bd5b6514f1955858f4987d3d270495",
"score": "0.8044876",
"text": "def cults\n follower_bos = BloodOath.all.select {|b_o_instance| b_o_instance.follower == self}\n follower_cults = follower_bos.map {|b_o_instance| b_o_instance.cult}\n follower_cults.uniq\n end",
"title": ""
}
... | [
{
"docid": "06a729a598adb7aa4adb94daa42cb4af",
"score": "0.80221474",
"text": "def fellow_cult_members\n self.cults.map{|follower_cults|\n self.class.all.select {|followers| followers.cults.include?(follower_cults)}}.flatten.uniq\n end",
"title": ""
},
{
"docid": "f8a50a6af6... |
8e973f32e8c7da815c379b29fb19f92b | Binds the given function across +Left+. | [
{
"docid": "32ac8e4235bd7be76ac33600102694fb",
"score": "0.63401127",
"text": "def bind(lam = nil, &blk)\n if !either_value.left? then either_value else (lam || blk).call(either_value.left_value) end\n end",
"title": ""
}
] | [
{
"docid": "77d5ca15fae60a1fee7c50659b4ea83c",
"score": "0.7136167",
"text": "def bind f\n case self\n when Left then Left.new(get)\n when Right then f.curry.(get)\n end\n end",
"title": ""
},
{
"docid": "0861cd07fe712e556a7d0b6b05a55eca",
"score": "0.62316126",
... |
56480aaa759232b3e9c4ab92d246f432 | PUT /bank_deposit_account_types/1 PUT /bank_deposit_account_types/1.xml | [
{
"docid": "f331cfe48c18bd9525e1b0bae980c29c",
"score": "0.6773135",
"text": "def update\n\n respond_to do |format|\n if @bank_deposit_account_type.update_attributes(params[:bank_deposit_account_type])\n format.html { redirect_to(@bank_deposit_account_type, :notice => t('scaffold.notice.u... | [
{
"docid": "216d434bfe6d2a8e78439556fa0cc09a",
"score": "0.616844",
"text": "def update\n @accounttype = Accounttype.find(params[:id])\n\n respond_to do |format|\n if @accounttype.update_attributes(params[:accounttype])\n format.html { redirect_to(@accounttype, :notice => 'Accounttype ... |
efd226b1a19f43b11dcdf799d500c6e1 | Before show, edit, update, destroy set the current bug | [
{
"docid": "d21b6b52d97dbd3e40384a739024caee",
"score": "0.0",
"text": "def index\n #get all bugs\n @bugs = Bug.all\n end",
"title": ""
}
] | [
{
"docid": "a919859bcfca28f197240d2ce043e56b",
"score": "0.7193843",
"text": "def set_bug\n @bug = Bug.find(params[:bug_id])\n end",
"title": ""
},
{
"docid": "c44a9324d42583a96a33e0e3aaeb2966",
"score": "0.7187961",
"text": "def set_bug\n @bug = Bug.find(params[:id])\n ... |
e799584ad3cbad73d5ba08c99010305f | Returns the full path of the associated image file. If the record doesn't have an image key, returns nil. | [
{
"docid": "70ddb284bd6af68973a5433fa4ac07f0",
"score": "0.6815675",
"text": "def full_image_path(flavor = :original, ext = nil)\n image_key ? File.join(ImageProcessing.image_directory, image_path(flavor, ext)) : nil\n end",
"title": ""
}
] | [
{
"docid": "42bf11de3559ff8fbacfa1ebe4010434",
"score": "0.76013553",
"text": "def image_path\n self[:image_path]\n end",
"title": ""
},
{
"docid": "bb8ad8292aa3d39b75ddc8d094a8de61",
"score": "0.73155457",
"text": "def image_path\n self['image-path']\n end",
"tit... |
92ae86efdae4e2bdabc8dcafefbf8f2c | implicit way to call block in your own method | [
{
"docid": "77924288e7d8819baaba4932ae7e3f5d",
"score": "0.0",
"text": "def two_times_implicit\n\treturn \"No block\" unless block_given?\n\tyield\n\tyield\nend",
"title": ""
}
] | [
{
"docid": "3abcf397d44d426cd1a1c04f580f817c",
"score": "0.85592026",
"text": "def block; end",
"title": ""
},
{
"docid": "3abcf397d44d426cd1a1c04f580f817c",
"score": "0.85592026",
"text": "def block; end",
"title": ""
},
{
"docid": "3abcf397d44d426cd1a1c04f580f817c",
... |
60769d5379ab81af9dc4fd86955786f4 | Create a &39;fabric.SwitchControlPolicy&39; resource. | [
{
"docid": "6ebedbd977cc3aa07ca01c1c18249c68",
"score": "0.6403058",
"text": "def create_fabric_switch_control_policy_with_http_info(fabric_switch_control_policy, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: FabricApi.create_fabric_switch_contr... | [
{
"docid": "ec8a8ace2e3885bdb1b0159d1ab49f92",
"score": "0.63956636",
"text": "def create_fabric_switch_control_policy(fabric_switch_control_policy, opts = {})\n data, _status_code, _headers = create_fabric_switch_control_policy_with_http_info(fabric_switch_control_policy, opts)\n data\n en... |
589829fce1b595b2116bca0043a17f8b | Builds a base Faraday connection with base URL constructed from connection settings and passes it the given block | [
{
"docid": "1a47e3ef9fdac86441badcfbe907ccdb",
"score": "0.7536106",
"text": "def base_connection(settings = FmRest.default_connection_settings, faraday_options = nil, &block)\n settings = ConnectionSettings.wrap(settings)\n\n host = settings.host!\n\n # Default to HTTPS\n sc... | [
{
"docid": "b100d148ee09b0407adce35a16759a0f",
"score": "0.77850866",
"text": "def __build_connection(host, options={}, block=nil)\n client = ::Faraday::Connection.new(__full_url(host), options, &block)\n Connections::Connection.new :host => host, :connection => client\n e... |
092d18ec0cee2cb0b0dee03f67e066bd | comment = (/.?$/ | multi_comment) | [
{
"docid": "a6ed2264f3e847f999ed6dd10f43831a",
"score": "0.75384885",
"text": "def _comment\n\n _save = self.pos\n while true # choice\n _tmp = scan(/\\A(?-mix:--.*?$)/)\n break if _tmp\n self.pos = _save\n _tmp = apply(:_multi_comment)\n break if _tmp\n self.pos = _s... | [
{
"docid": "4e34dda6e21580d1ce0b599eaf1ce400",
"score": "0.766912",
"text": "def _comment\n\n _save = self.pos\n while true # choice\n _tmp = scan(/\\A(?-mix:--.*?$)/)\n break if _tmp\n self.pos = _save\n _tmp = apply(:_multi_comment)\n break if _tmp\n self.pos = _save\n break... |
4bbabf65b4a3b4ea98bb03d3658b84d6 | Oracle does not support INTERSECT ALL or EXCEPT ALL | [
{
"docid": "ac42a1eb90acaa7add3f5aaca1779d87",
"score": "0.6940285",
"text": "def supports_intersect_except_all?\n false\n end",
"title": ""
}
] | [
{
"docid": "261bb3fa513c165086991f2c6c136062",
"score": "0.67612207",
"text": "def intersect_all(other)\n set_operation(other, :intersect, distinct: false)\n end",
"title": ""
},
{
"docid": "28fbcd7af66008e303d04aad70b63ec4",
"score": "0.6411937",
"text": "def supports_inters... |
8cb219da767091af4e757604159619ba | don't mess with the files | [
{
"docid": "670c7b208623af653db9b92b6fdd97b3",
"score": "0.0",
"text": "def clean_cache(version) end",
"title": ""
}
] | [
{
"docid": "763f6b48ab33ff31486f5bf0f8bc4470",
"score": "0.7026112",
"text": "def files; end",
"title": ""
},
{
"docid": "763f6b48ab33ff31486f5bf0f8bc4470",
"score": "0.7026112",
"text": "def files; end",
"title": ""
},
{
"docid": "763f6b48ab33ff31486f5bf0f8bc4470",
"... |
841535bf2d7d1d24507926b4d5140644 | GET /specimens GET /specimens.json | [
{
"docid": "43e7995efe5a94f5e0c413bd742d2355",
"score": "0.0",
"text": "def index\n #get the list of digital specimens from api\n if not(params.key?(\"page\"))\n session[:num_page] = session.fetch(:num_page, 1)\n else\n session[:num_page] = params[:page].to_i\n end\n if not(para... | [
{
"docid": "4c1af637df04786cb44c6dc9068cf0db",
"score": "0.69100285",
"text": "def index\n @specifications = Specification.all\n\n render json: @specifications, each_serializer: Website::V1::SpecificationSerializer\n end",
"title": ""
},
{
"docid": "7592ec02f3abefb946c82035204216cf",
... |
cb2a2f4e5a7144eca7adf63adff4850d | This helper converts markdown content to html, using the HtmlProcessor (see /lib) | [
{
"docid": "9f50b8d9b67803991df178833cbce56a",
"score": "0.7772009",
"text": "def markdown(text)\n return text unless text.present?\n HtmlProcessor.new(text, format: :markdown).html.html_safe\n end",
"title": ""
}
] | [
{
"docid": "07985c556f78104ece417f1a61a3fe82",
"score": "0.81474805",
"text": "def markdown_to_html( content )\r\n @markdown_libs.first[1].call( content )\r\n end",
"title": ""
},
{
"docid": "2fca5658a057f91c10cb74d3e83bae9f",
"score": "0.8127407",
"text": "def convert_markdown\n... |
686d0137425b6d4aa7b4cc0cdf6fd4c6 | ==Judge the real value differ between two ip addr | [
{
"docid": "f73323dc2b26733423b17cd912a0b33f",
"score": "0.6551113",
"text": "def -(another)\r\n raise \"I can differ two IPAddr only!\" if not another.is_a?(IPAddr)\r\n @addr - another.to_i\r\n end",
"title": ""
}
] | [
{
"docid": "8fe84078e2fa40f0580d62c60406ccfb",
"score": "0.6940305",
"text": "def nip_test(a_ip, b_ip)\n 0.upto(3) { |x| return false if (a_ip[x] != b_ip[x]) }\n true\n end",
"title": ""
},
{
"docid": "b53353f53f34b77e32c955aa7c99e797",
"score": "0.6386409",
"text": "def compa... |
29a0a67fed4d2470cf6e4f6d71b966bc | unit test for move to_move valid move > return road invalid move > return nil this method will move the driver to the new location and will return the road that they used to get to that location | [
{
"docid": "829fbada7486d4473a655910091d3438",
"score": "0.6825092",
"text": "def test_move\r\n\t\t@my_sim.driver.location = @my_sim.cathedral\r\n\t\tassert_equal \"Bar St\", @my_sim.move(3)\r\n\tend",
"title": ""
}
] | [
{
"docid": "c3f86d8d9870b7fdd7013310a5870a5a",
"score": "0.7331811",
"text": "def test_check_move_valid\n\t\td1 = Minitest::Mock::new 'driver 1'\n\t\td1.expect(:location, 'Hillman', [nil])\n\t\t@methods.add_driver d1\n\t\tresult = @methods.check_valid_move 'Downtown'\n\t\tassert_equal 1, result\n\tend",... |
5697155c9382181b278d2b56735514c7 | GET /operaziones GET /operaziones.json | [
{
"docid": "0e6b8a1787da42f8e043dbfe410ec31a",
"score": "0.70893526",
"text": "def index\n @operaziones = Operazione.all\n end",
"title": ""
}
] | [
{
"docid": "175f140fd9b085a3ae73f970271f0558",
"score": "0.7234003",
"text": "def index\n @operaciones = Operacione.all\n end",
"title": ""
},
{
"docid": "9d32459946fc5f18b04a93e28d96b26b",
"score": "0.7058792",
"text": "def index\n @operarios = Operario.all\n end",
"titl... |
3044571e9a24fc1f86e4c07a59ca88ff | DELETE /recipes/1 DELETE /recipes/1.json | [
{
"docid": "b7063ea2015fa06257f4c6e2403dcafa",
"score": "0.72441834",
"text": "def destroy\n \n @recipe.destroy\n respond_to do |format|\n format.html { redirect_to recipes_url, notice: 'Recipe was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"ti... | [
{
"docid": "5f5b6c6e05c9c2eb62b85555320e5697",
"score": "0.7972597",
"text": "def delete\n @recipe = Recipe.find(params[:id])\n @recipe.delete\n render :json => {\n message: \"recipe deleted\"\n }\n end",
"title": ""
},
{
"docid": "812e340e56d25efd1e743be843840b8d",
"sc... |
8d0cd49b117563b8ddcd8b7b89767aa4 | PUT /coach_motivation_types/1 PUT /coach_motivation_types/1.xml | [
{
"docid": "c2a9989eb0a3987136d9315dad2eadd8",
"score": "0.7355707",
"text": "def update\n @coach_motivation_type = CoachMotivationType.find(params[:id])\n\n respond_to do |format|\n if @coach_motivation_type.update_attributes(params[:coach_motivation_type])\n flash[:notice] = 'CoachMo... | [
{
"docid": "894bf6b42887d654d97b6cc8e15231a4",
"score": "0.6598775",
"text": "def update\n @user_motivation_type = UserMotivationType.find(params[:id])\n\n respond_to do |format|\n if @user_motivation_type.update_attributes(params[:user_motivation_type])\n flash[:notice] = 'UserMotivat... |
0b630632d6fc20b5360da2fad869d278 | Pauses during rt and accounts for interrupted time | [
{
"docid": "aeab4d1eb608d94d36c2bf1ad4c738fc",
"score": "0.702913",
"text": "def pause_for_roundtime\n if $_api_current_rt > 0\n api_sleep $_api_current_rt + $rt_adjust\n end\nend",
"title": ""
}
] | [
{
"docid": "96fd7556a4a4d3f23327ea07b8f6963f",
"score": "0.6628746",
"text": "def pause\n \tsleeper(25)\n end",
"title": ""
},
{
"docid": "96fd7556a4a4d3f23327ea07b8f6963f",
"score": "0.6628746",
"text": "def pause\n \tsleeper(25)\n end",
"title": ""
},
{
... |
1634c329b991d7ee6fbd186851f5ec53 | GET /blood_types GET /blood_types.json | [
{
"docid": "82d64b80e100421992718de10862ad97",
"score": "0.72313994",
"text": "def index\n add_breadcrumb \"<i class='fa fa-info-circle'></i> #{I18n.t(\"activerecord.models.blood_type\", count: 2)}\".html_safe, blood_types_path\n @blood_types = BloodType.all\n respond_to do |format|\n form... | [
{
"docid": "73053c0735f7f0c2d82d965c37567823",
"score": "0.77973634",
"text": "def index\n @blood_types = BloodType.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render :json => @blood_types }\n end\n end",
"title": ""
},
{
"docid": "7261d5... |
7d7023ae9416072e016e3040b35a82f9 | [Rules::UnderPopulation, Rules::StayAlive, Rules::OverPopulation, Rules::Reproduction] | [
{
"docid": "ed8887e065559d942d96ce3be1bd582d",
"score": "0.0",
"text": "def initialize(playground)\n @playground = playground\n end",
"title": ""
}
] | [
{
"docid": "91bf43ad752038ba16409d5a700b3a5b",
"score": "0.70944434",
"text": "def rules_for_fight\n rules.uniq\n end",
"title": ""
},
{
"docid": "d46231b863fd9d28c2c0977c3eb52559",
"score": "0.6743328",
"text": "def rules\n @rules ||= []\n end",
"title": ""
},
{
... |
1ba873277865be6f157d1c96da9d4b8a | Initialize an Rds instance ==== Notes options parameter must include values for :name, :storage_size ==== Examples rds = Cloudster::Rds.new( :name => 'MySqlDB', :instance_class => 'db.t1.micro', :storage_class => '100', :username => 'admin', :password => 'admin123', :engine => 'MySQL', :multi_az => true ) ==== Paramete... | [
{
"docid": "1d215330623da14496a75fbcf31b2efa",
"score": "0.6967745",
"text": "def initialize(options = {})\n require_options(options, [:name, :storage_size])\n options[:username] ||= 'root'\n options[:password] ||= 'root'\n options[:engine] ||= 'MySQL'\n options[:instance_class]... | [
{
"docid": "ece91f6fdb9e7a43dd8e124cf5c157f8",
"score": "0.63640064",
"text": "def initialize opt={}\n opt[:type] = \"AWS::RDS::DBInstance\"\n super opt\n\n @instance_class = opt[:instance_class] || 'db.t2.micro'\n @engine = opt[:engine] || 'postgres'\n @allocated_storage = opt[:allocated... |
9d1b9f7a1b6567b7fc023d4a186b2adf | Start Map Event. [REP] | [
{
"docid": "222b0337f0506ac706bcc647e57ac303",
"score": "0.71529883",
"text": "def start_map_event(x, y, triggers, normal)\n return if $game_map.interpreter.running?\n $game_map.effectus_event_pos[y * $game_map.width + x].each do |event|\n if event.trigger_in?(triggers) && event.normal_priori... | [
{
"docid": "12f4af9b4debe0ff8f9fdbb4cb2ddd67",
"score": "0.7483769",
"text": "def setup_starting_map_event\n return nil unless @effectus_event_starting\n event = @effectus_event_starting\n event.clear_starting_flag\n @interpreter.setup(event.list, event.id)\n @effectus_event_starting = ni... |
ec265f520a36a2c183e60ea2f0522395 | Convert Markdown source to HTML. | [
{
"docid": "0d939e4c9c5bc06081aa7adbe0278553",
"score": "0.7882719",
"text": "def markdown_to_html(src)\n render_options = {\n prettify: true,\n }\n renderer = MarkdownRenderer.new(render_options)\n extensions = {\n no_intra_emphasis: true,\n autolink: true,\n ... | [
{
"docid": "2fca5658a057f91c10cb74d3e83bae9f",
"score": "0.7891726",
"text": "def convert_markdown\n self.html_content = Raptor::Markdown.render(self.content)\n end",
"title": ""
},
{
"docid": "385c861bb189ec8460c434000304d8dc",
"score": "0.78337073",
"text": "def markdown_to_htm... |
d5816e132ee9e50f5b472ccae7db29e0 | Retrieve connections from parent | [
{
"docid": "bb022c85fd1432dc127a34c164aa9ce8",
"score": "0.7116736",
"text": "def determine_connection(c)\n parent.connections[c] unless c.nil?\n end",
"title": ""
}
] | [
{
"docid": "e164ddd9849fa93fcc39be554884307a",
"score": "0.785857",
"text": "def connections\n @connections\n end",
"title": ""
},
{
"docid": "ec7a4481c18b71118c59c36407699ef3",
"score": "0.7581082",
"text": "def connections\n $connections\n end",
"title": ""
},
{
... |
c179fa3f85ef304b64284140a6fe5740 | Validate the credit card fields (this is only called at certain points from the controller) def validate_cc_fields! NOTE: these errors don't show up if they are added to individual virtual fields, so I've added them to :base self.errors.add(:credit_card_number, "Credit card number is required." ) unless self.credit_car... | [
{
"docid": "5732d67afaf94c2afa0226bec67d6931",
"score": "0.0",
"text": "def shipping_method\n #shipping = Shipping.find(self.shipping_method_id)\n self.shipping.display_text\n end",
"title": ""
}
] | [
{
"docid": "d27471c01f05b258096e2b5526f4a341",
"score": "0.81142646",
"text": "def validate\n #errors.add(:cc_number, \"There appears to be a typo in your Credit Card number.<br/>Please re-enter your card number.<br/> If you continue to have trouble, please <a url='/contactus.htm'>Contact Us.</a>\") ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "183fed603707f8bb9b47ef727da9b7c8",
"score": "0.0",
"text": "def set_productlist\n @productlist = Productlist.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... |
50b304f7bed474c6a2ec50eb5334a310 | Convert string to number | [
{
"docid": "e36af0b7ff10801ec431c6027c29686f",
"score": "0.7242484",
"text": "def string_to_number(str)\n\tres = 0\n\tfor i in 0..str.length-1 do\n\t\tres = (10 * res) + str[i].ord - '0'.ord\n\tend\n\tres\nend",
"title": ""
}
] | [
{
"docid": "c6b5a0e212b1e8bd1fdcdb6431d42934",
"score": "0.8215766",
"text": "def string_to_number(s)\n number = s.to_i\n return number\n end",
"title": ""
},
{
"docid": "2f1413d9982e45007cffc5c038e38637",
"score": "0.8088461",
"text": "def to_number(string)\n Integer(s... |
403aa93275e2dfccf3920b8a23b1837a | Patch version, as defined by the gemspec's Version module. For 1.5.3, this would return 5. | [
{
"docid": "1010a8a55c40720e7437d1bcc0d04978",
"score": "0.7634909",
"text": "def patch_version\n @version_helper.patch\n end",
"title": ""
}
] | [
{
"docid": "5c7eb80bede5fadd312b65e7c2ceccf4",
"score": "0.76565504",
"text": "def bump_patch_version()\n Jeweler::Commands::Version::BumpPatch.build_for(self).run\n end",
"title": ""
},
{
"docid": "76530e487afb825f6e8b5f79cc4b37b6",
"score": "0.76459306",
"text": "def patch(vers... |
cf25cf4b40737a9654ec807f453e7f05 | human readable description of modeling approach | [
{
"docid": "2cd2cb810e458afb45d1ba4986337d89",
"score": "0.0",
"text": "def modeler_description\n return 'Thermostat offset fault. A positive value means the zone air temperature reading is higher than the actual value. A negative value means the reading is lower than the actual value. A “0.0” value ... | [
{
"docid": "400f38055c710e3f9ca3606b0d0e6dcf",
"score": "0.7710149",
"text": "def modeler_description\n return 'Gather orientation and story specific construction, fenestration (including overhang) specific information'\n end",
"title": ""
},
{
"docid": "7f312e0afd1fe5a95907a214078a6c88"... |
d209d32320ac96aea0e781941f560038 | Turns an SQL query into a regular expression: Handles quotes (differing depending on DBMS). Handles round brackets (escaping with backslash to make them literals). Removes line breaks and double spaces (allowing use of intendation and line continuation) Returns the regular expression created from the provided +sql+ str... | [
{
"docid": "49682cd93560cdfe0f5026c322f071f4",
"score": "0.8074571",
"text": "def sql_to_regexp(sql)\n Regexp.new(sql.strip.squeeze(\" \") \\\n .gsub(\"(\", \"\\\\(\").gsub(\")\", \"\\\\)\") \\\n .gsub(\"'\", 'E?.') \\\n .gsub('\"', 'E?.'))\nend",
"title": ""
}
] | [
{
"docid": "f73a19093955f66f570ebfdfbf7b0551",
"score": "0.6211381",
"text": "def tokens(sql)\n sql.scan(%r{\n (\n -- .* (?# matches \"--\" style comments to the end of line or string )\n | - (?# matches sing... |
9124aacbc130d01d85732e88ec390275 | Finds an institution, an event category, and an event type by their IDs. | [
{
"docid": "3ff6090e130d9a9b4f9bdb9a8074883a",
"score": "0.64666665",
"text": "def call(institution_id:, event_type_id:, event_category_id:)\n institution = fetch_institution(institution_id)\n event_category = fetch_event_category(institution, event_category_id)\n event_type = fetch_event_type(... | [
{
"docid": "c856717a99172be9bf20272478c80509",
"score": "0.53305936",
"text": "def get_related_event_types(category, id, quantity)\n all_events = KeventerReader.instance.catalog_events()\n\n all_events.select{|e| e.event_type.categories.any?{|c| c == category}}\n .select{|e| e.event_type.id... |
2d09d2661ea7f7cf893298fa4ee3c172 | Replaces all ISO88591 or CP1252 characters by their UTF8 equivalent resulting in a valid UTF8 string. Passing +true+ will forcibly tidy all bytes, assuming that the string's encoding is entirely CP1252 or ISO88591. source://activesupport//lib/active_support/multibyte/unicode.rb32 | [
{
"docid": "64183f56a7faa886d168f1c5b9b0166a",
"score": "0.0",
"text": "def tidy_bytes(string, force = T.unsafe(nil)); end",
"title": ""
}
] | [
{
"docid": "afe7c42b371ecd54af424163e140a618",
"score": "0.7519814",
"text": "def fixup_utf8\n @fixup_utf8 = true\n end",
"title": ""
},
{
"docid": "90d0b9dd22013f6eab3542484170e8da",
"score": "0.74861926",
"text": "def convert_to_valid_utf8!(string, possible_encodings = [])\... |
ac796e9ba9c5101155b7f8bba476be98 | START OF USER INPUT | [
{
"docid": "0e332b071ad0f94c8471150047561929",
"score": "0.0",
"text": "def main_menu #INITIAL GAME PLAY OPTIONS\n options = { #ITEMS TO APPEAR IN THE MENU\n \"1\": \"Travel the Trail\", \n \"2\": \"Learn about the Trail\", \n \"3\": \"Ask for help\",\n \"4\": \"... | [
{
"docid": "6f23763c2d2cad750280bdbe919e77eb",
"score": "0.7227081",
"text": "def input_start\n @phase = :input\n end",
"title": ""
},
{
"docid": "f052d64dcc71c0c1adafdce77f9a7008",
"score": "0.7120194",
"text": "def input_start\n @input_start\n end",
"title": ""
},... |
fab9e6d9e2619feff1bccfaf77b1239c | Restart, start or stop the SNMP service Restart, start or stop the SNMP service | [
{
"docid": "b76cbe65938e517122c8ce6d39f514ec",
"score": "0.0",
"text": "def create_snmp_service_action_start_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ManagementPlaneApiNsxComponentAdministrationApplianceManagementApi.create_s... | [
{
"docid": "2e000d3fa7fe7feb4d08c8c9b11ef23f",
"score": "0.69781893",
"text": "def restart\n stop if service.loaded?\n start\n end",
"title": ""
},
{
"docid": "b98d294221b077f4a8b9b3bc384fc7a8",
"score": "0.69508374",
"text": "def reloadServiceNanny\n puts \"restart ser... |
9ddf232c0ee9e0a6de22df69803d8809 | string The String whose \n becomes removed. Examples chomp("Hej\n") => "Hej" Returns the new string without \n at the end. | [
{
"docid": "c3618a18c022d21d9cc45213e0f2b3ce",
"score": "0.7382403",
"text": "def chomp(string)\n return string.chomp\nend",
"title": ""
}
] | [
{
"docid": "4006d8af724e3cc16671020ec4b7c0c0",
"score": "0.8043064",
"text": "def chomp(str)\n\tif str[-1] == \"\\n\"\n\t\treturn str[0..-2]\n\tend\n\treturn str\nend",
"title": ""
},
{
"docid": "036a1c4991945636a0f56aeb629c9017",
"score": "0.80127335",
"text": "def chomp(string)\n ... |
08a7cb2c65ea30b8a618699df68f24ce | GET /site_contacts/1 GET /site_contacts/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "23a75b816c359a76aa81e45de349804c",
"score": "0.7546023",
"text": "def contacts\n respond_with_entity(api.get('/api/v1/profile/contacts'),\n NexaasID::Entities::Profile::Contacts)\n end",
"title": ""
},
{
"docid": "4f84d5755375d4e363bb8c72b1540ab6",
... |
179d2e3de0fa5996b44b9be3dae4de4a | PUT /authorships/1 PUT /authorships/1.json | [
{
"docid": "fe450775c7a4fcd429d956df7104c0d8",
"score": "0.5955217",
"text": "def update\n @authorship = Authorship.in_conference(current_conference).find(params[:id])\n @authorship.conference_confirm = current_conference\n\n # respond_to do |format|\n if @authorship.update_attributes(para... | [
{
"docid": "b0e7740ff66f1a67c21ef02de40b08f5",
"score": "0.68776304",
"text": "def set_authorship\n @authorship = Authorship.find(params[:id])\n end",
"title": ""
},
{
"docid": "c6324b2b533547697309b86a31225ffa",
"score": "0.6601956",
"text": "def update\n @authorship = Au... |
29a9f0c0e65ceeb385f421a80ff59ef0 | Generate the entire Gnip rule string for this instance. Add rule to batch. Reset Gnip rule vars in preparation for next rule addition. | [
{
"docid": "1b101b46cfa670eaf251ff76aa1346fa",
"score": "0.6642598",
"text": "def batch\n # Add location rule, if set\n unless hashtags_format_gnip.empty? && location_format_gnip.empty? && places_format_gnip.empty?\n @batch << { 'value' => hashtags_format_gnip << location_format_gnip <<... | [
{
"docid": "a682eea0519180c924093477625afbff",
"score": "0.5888432",
"text": "def to_s\n 'rule: ' + @symbol.to_s\n end",
"title": ""
},
{
"docid": "da4d9d0ba09bcd1cd7c2bfe2468c227f",
"score": "0.5698739",
"text": "def to_s\n '!' + rule.embed\n end",
"title": ""
... |
c042b709a90688665da791a7b1c783de | A lookup for finding a Slice module's slice file path | [
{
"docid": "a9bd3712f1c57552ce08bc36623dbe8c",
"score": "0.0",
"text": "def files\n @files ||= {}\n end",
"title": ""
}
] | [
{
"docid": "ebc42bbe1a5223086e2c04dd7c9216c3",
"score": "0.63571334",
"text": "def dir_for(type) self.slice_paths[type].first end",
"title": ""
},
{
"docid": "59d54c8b729c207b3b8585dc5cae7bf2",
"score": "0.6318599",
"text": "def path_section\n $1 if @basename.to_s =~ /\\.(\\d\\w... |
12a48fdee6cf18499c10d10dc2c1ccf0 | Write a method that takes an argument of your name and prints your name | [
{
"docid": "31f0e8efc4a62742d0807493f8ce2365",
"score": "0.84392214",
"text": "def print_name(name)\n p \"My name is #{name}\"\nend",
"title": ""
}
] | [
{
"docid": "271f853b34712d1c9445fcbf8b1987ca",
"score": "0.8998113",
"text": "def print_name(name)\n puts name\nend",
"title": ""
},
{
"docid": "271f853b34712d1c9445fcbf8b1987ca",
"score": "0.8998113",
"text": "def print_name(name)\n puts name\nend",
"title": ""
},
{
"d... |
bf036677b7193a7832c01d03cc36650d | Jobs thread mode functions (obsolete) | [
{
"docid": "d7db2a7a5c4130cb5078da056a6602c9",
"score": "0.60878676",
"text": "def submit_job_threads(ar_module, options)\n self.started = true\n self.save\n\n #spawn_block do\n Thread.new do\n #ensure we have a new connection with the db pool; each thread needs a new\n # connectio... | [
{
"docid": "5472e6569f147637ee48625c99ea301c",
"score": "0.78267276",
"text": "def run_with_threads; end",
"title": ""
},
{
"docid": "66978ca3f56b9174b77da3e4cb7f4b1b",
"score": "0.72407436",
"text": "def jobs; end",
"title": ""
},
{
"docid": "66978ca3f56b9174b77da3e4cb7f... |
1eda6bca85b25b7837975e076d92d15c | Fails unless the block throws +sym+ | [
{
"docid": "06a3fa4336b025742d184c41e3ece870",
"score": "0.6236262",
"text": "def assert_throws sym, msg = nil\n default = \"Expected #{mu_pp(sym)} to have been thrown\"\n caught = true\n value = catch(sym) do\n begin\n yield\n rescue ThreadError => e # wtf?!?... | [
{
"docid": "480d6fb8b23ad2efa68163c666ebc657",
"score": "0.7226669",
"text": "def is_not_thrown(sym, msg=nil, &blk)\n ThrowFailure.refute(sym, :message=>msg, :backtrace=>caller, &blk)\n end",
"title": ""
},
{
"docid": "37bd4c66971a3a9f5f37f03006184d56",
"score": "0.72187865",... |
33781e8fb4ab22ab974232a70a3d09ae | GET /pages/1 GET /pages/1.json | [
{
"docid": "590c8653b8d3c7133b78b99379d03e74",
"score": "0.65337515",
"text": "def show\n if params[:id]\n @page = current_site.pages.find(params[:id])\n else\n @page = current_site.pages.first()\n end\n @post = Post.new\n\n respond_to do |format|\n format.html # show.html.... | [
{
"docid": "64e61b39be3e009082a46bd86ef7f8cc",
"score": "0.77815366",
"text": "def index\n @pages = Page.page params[:page]\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @pages }\n end\n end",
"title": ""
},
{
"docid": "0e06be4547a... |
5c5ce327f33590765d295d8a61047aa8 | Create MEGAN parsable CSV file from a Novoalign FASTA output file. | [
{
"docid": "d3bde46c73e0928a0157665bda375ec5",
"score": "0.6241943",
"text": "def novoToMeganCsv(novoFile)\n\toutput = File.open( \"#{novoFile}.csv\", 'wb' )\n\tCSV.foreach(novoFile) do |row|\n\t\trowSplit = row.to_s.split(\"\\t\")\n\t\toutput.write(\"#{rowSplit[NOVOFILE::READ_HEADER]},#{NOVOFILE::HUMAN... | [
{
"docid": "d51a352378ebf358dc9ca37719a1ad1c",
"score": "0.6386666",
"text": "def fasta2Nexus(alignFile, nuc = isNuc?(alignFile), nexFile = nil)\n seqs = Hash.new\n Bio::FlatFile.new(Bio::FastaFormat, File.new(alignFile)).each do |seq|\n seqs[seq.entry_id] = seq.seq\n end\n if nuc\n ty... |
adf4a2904434919e627d1ec70ee504ff | used to quickly look up hotel color without quering the database | [
{
"docid": "a345c91f1b698e1070eb5237a65e026b",
"score": "0.7162427",
"text": "def get_hotel_color(hotel)\n HOTEL_COLORS[hotel]\n end",
"title": ""
}
] | [
{
"docid": "0452246dcab6aff454fd45914ca14ac3",
"score": "0.6276971",
"text": "def _color\n\t\tcolor = Color.where(:inki_model_name => self.class.to_s, :model_id => self.id).first\n\t\tif color\n\t\t\tcolor.rgb_id\n\t\tend\n\tend",
"title": ""
},
{
"docid": "ab9ebbf22d129223fd7b33686e842e31",... |
e661bcbe83442e4f17e5cb2e4fda03db | Fetch the dummy root category. This is needed to ensure the NestedSet works properly. | [
{
"docid": "44b82b44e3bb3390f66a362abe5b6c9a",
"score": "0.5687711",
"text": "def root\r\n\t\t\tself.find(:first, :conditions => 'parent_id IS NULL')\r\n\t\tend",
"title": ""
}
] | [
{
"docid": "93af8ca991f26e90fb5df8a462d884d5",
"score": "0.6464906",
"text": "def first_category\n categories.live.root\n end",
"title": ""
},
{
"docid": "c244af51def4cadf68d96eedd8d6efa4",
"score": "0.62833065",
"text": "def set_root_category\n @root_category = RootCategory... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "0f5a515a17ca30539dac318168c3edd8",
"score": "0.0",
"text": "def set_metal\n @metal = Metal.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... |
66aaab71ff89e42bb66eb2c15472639f | refresh_iterations is how many iterations to wait betwee recalculating the velocity display_iterations is how many iterations to wait between display updates | [
{
"docid": "80b03998fd1dc6fcf8b4da514392ae51",
"score": "0.5538281",
"text": "def initialize max_iterations, job=\"Working\", refresh_iterations=100, display_iterations=10\n $stdout.sync = true\n @max_iterations = max_iterations\n @job = job\n @i = 0\n @spinner_index =... | [
{
"docid": "c9f3dd2a07a4bf4c0edc7e398e7977bf",
"score": "0.693904",
"text": "def refresh()\r\n # time_at_start_of_redraw = Process.clock_gettime(Process::CLOCK_MONOTONIC)\r\n # Sketchup.active_model.active_view.refresh\r\n # @redraw_delay = Process.clock_gettime(Process::CLOCK_MONOT... |
fc363847ee3f1b5bf5e935ae85b1381c | Returns the source object, if any. | [
{
"docid": "bf52eb21f334f6157529eaaa97aba2f6",
"score": "0.692142",
"text": "def source\n source_id && self.class.dependent_class.constantize.find(source_id)\n end",
"title": ""
}
] | [
{
"docid": "d778234ac9f9af053f87bcb0d6a32d1e",
"score": "0.81929773",
"text": "def source_object\n Source.find_by_name(source)\n end",
"title": ""
},
{
"docid": "d778234ac9f9af053f87bcb0d6a32d1e",
"score": "0.81929773",
"text": "def source_object\n Source.find_by_name(source)\... |
5b91f920e182be18d78f22473355fbd3 | Add a gem specification to the source index. | [
{
"docid": "3dad53fbb1b3842cecfa97532019ed6d",
"score": "0.70830184",
"text": "def add_spec(gem_spec, name = T.unsafe(nil)); end",
"title": ""
}
] | [
{
"docid": "b01b3b8520425a9116be09f8a2a47ec7",
"score": "0.74391115",
"text": "def add_spec(gem_spec)\n @gems[gem_spec.full_name] = gem_spec\n end",
"title": ""
},
{
"docid": "711c0159c3b94bbaeacbb63f966db20d",
"score": "0.7245897",
"text": "def add(gemspec)\n @specs << ... |
efd91a789cdb1670f18a3685ce80667b | GET /boards GET /boards.json | [
{
"docid": "ed51524504e90f676e7251f39ded5d0e",
"score": "0.7474448",
"text": "def index\n\n respond_to do |format|\n format.html { @boards = Board.where network_id: current_user.network_id }\n format.json { @boards = Board.where network_id: current_user.network_id }\n\n end\n end",
... | [
{
"docid": "ea3299e54cb35af5ca2c0297873bbd76",
"score": "0.8206462",
"text": "def get_all_boards\n request(Net::HTTP::Get, \"/api/#{API_VERSION}/#{RESOURCE_NAME}\", nil, nil, false)\n end",
"title": ""
},
{
"docid": "8c4a007aecc67eaaf38769c8e9cc1156",
"score": "0.80803424",
... |
4e00505234a326de4e18701679671853 | find class first singleton method or first instance_method | [
{
"docid": "d278931cfbc0cea3bd2459524bad2223",
"score": "0.0",
"text": "def based_on_klass_method(klass)\n _class = eval(klass)\n\n regroup_klass = if !(method = _class.instance_methods(:false)[0]).nil?\n klass + '.allocate'\n elsif !(method = _class.methods(:false)[0]).nil?\n ... | [
{
"docid": "4f50d1caef1e07e87b9373a5c7a8cd68",
"score": "0.6353777",
"text": "def find_instance_method_named(name)\n @method_list.find {|meth| meth.name == name && !meth.singleton}\n end",
"title": ""
},
{
"docid": "2cdff32bdee5f0c928755f96ad75a6f3",
"score": "0.62938493",
"t... |
01bf40fbd1cb64b03e17406ea29c80c5 | Resize the image to fit within the specified dimensions while retaining the original aspect ratio. Will only resize the image if it is larger than the specified dimensions. The resulting image may be shorter or narrower than specified in the smaller dimension but will not be larger than the specified values. === Parame... | [
{
"docid": "6f5906e001b5ae47638175cfddd9c151",
"score": "0.7338801",
"text": "def resize_to_limit(new_width, new_height)\n ::ImageScience.with_image(self.current_path) do |img|\n if img.width > new_width or img.height > new_height\n resize_to_fit(new_width, new_height)\n end\... | [
{
"docid": "aae35a437aa80106a5da576ac06face8",
"score": "0.79511565",
"text": "def scale_to_fit(width, height)\n @image.change_geometry(\"#{width}x#{height}\") { |cols, height, img| img.resize!(cols, height) }\n self\n end",
"title": ""
},
{
"docid": "8f2d453babfb8c7dcfdaec1c3e29c8de"... |
2be4e46f1caac09dca0e240ea65d0d9c | define a user_data script to bootstrap this instance | [
{
"docid": "87635ceeb2a8cccac818081df52c628b",
"score": "0.7225857",
"text": "def bootstrap(&block)\n self.bootstrap_mode = 'user_data'\n user_data_suffix = yield if block\n self.user_data = [create_remote_directories, @user_data_commands, user_data_suffix].compact.join(\"\\n\")\n end"... | [
{
"docid": "beabdf38c7bf8850e9cf4e7a6767638d",
"score": "0.67891794",
"text": "def user_init; end",
"title": ""
},
{
"docid": "d5d0a0fecd80d443ff6c44b7ae2bbd3e",
"score": "0.673523",
"text": "def prepared_user_data\n if transport.name.casecmp('winrm') == 0\n debug(\"I... |
be5452d04e75f72cc9f937c0dc14f2f6 | if one character at this position can be determined, we can get the other messages' characters via xor as well. The method sets the plain characters for each method in this case. | [
{
"docid": "9289b08fa6e8d3f7d3547334c14a01af",
"score": "0.6540853",
"text": "def analyze_position(pos)\n # get one message for which we know the character at this\n # position already\n message = known_message(pos)\n return if message.nil?\n\n # binary string representation of ... | [
{
"docid": "75820eff54d0d71c53ed5b7f34b24a1f",
"score": "0.6372364",
"text": "def repeatingXOR(plainText, key)\n #Convert hex\n hexPlain = ASCIIToHex(plainText)\n hexKey = ASCIIToHex(key)\n \n pPos = 0\n kPos = 0\n \n xorOutput = \"\"\n \n begin\n xorOutput.concat(he... |
dfedfc263949bdb2cb778b0ab52c4a9f | returns true if s is a subword of the string. both the string and s must be sorted! | [
{
"docid": "3f25d4728e32ecda1130d4d9411ca0cd",
"score": "0.84422046",
"text": "def subword?(s)\n i = j = 0\n while j < s.length\n i += 1 while i < length and self[i] != s[j]\n i < length or return false\n j += 1\n i += 1\n end\n true\n end",
"title": ""
}
] | [
{
"docid": "6c0ed0bb26d425f2aec85c68e625ad83",
"score": "0.72121817",
"text": "def is_substring_repeated(s)\n #multiply word twice\n double_word = s*2\n #remove first and last string\n updated_word = double_word[1..(double_word.length-2)]\n #check if string is substring of word\n updated_word.incl... |
b3d9a9cabbe2db326d54569d598217ef | GET /sheets/new GET /sheets/new.json | [
{
"docid": "511b7d34a22df70f7fc4eafcb6d3e63c",
"score": "0.7594207",
"text": "def new\n @sheet = Sheet.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @sheet }\n end\n end",
"title": ""
}
] | [
{
"docid": "3af82dc4002790cf2399ac8a65c5c8ad",
"score": "0.7774718",
"text": "def new\n @spreadsheet = @package.spreadsheets.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @spreadsheet }\n end\n end",
"title": ""
},
{
"docid": "74... |
7c64a15f2b5d28b82995ac8b4f8fdf05 | Add +addr+ to allow posting to userpost only lists, when +addr+ isn't a subscriber. | [
{
"docid": "bfcb02d216bcf5722d4d875c90dfb08b",
"score": "0.67892426",
"text": "def add_allowed( *addr )\n\t\treturn self.subscribe( *addr, section: 'allow' )\n\tend",
"title": ""
}
] | [
{
"docid": "36b91a37879862cf956a31a3527f3265",
"score": "0.6256853",
"text": "def add_blacklisted( *addr )\n\t\treturn self.subscribe( *addr, section: 'deny' )\n\tend",
"title": ""
},
{
"docid": "20d023a089f067ce198a01625f9797ae",
"score": "0.6155463",
"text": "def add_address(addr)\... |
007ccf5552f5618f97a050bd9bba150c | Get the distinct values for a specified field across a single collection. | [
{
"docid": "617a4079fecf8eacfc5da014dd421c22",
"score": "0.55143887",
"text": "def distinct(key)\n @collection.distinct(self, key)\n end",
"title": ""
}
] | [
{
"docid": "3586502ddac62e923ff1da4254274a05",
"score": "0.8625812",
"text": "def distinct(field)\n database.command(\n :distinct => collection.name,\n :key => field.to_s,\n :query => selector\n ).documents.first['values']\n end",
"title": ""
},
{
... |
3a42dd138865ab069c5126da4b735036 | Returns true if the given user is the current user. | [
{
"docid": "b4651ce2a39fd78ccf836aac5799c473",
"score": "0.0",
"text": "def current_baby?(baby)\n baby && baby == current_baby\n end",
"title": ""
}
] | [
{
"docid": "84c6b2e049268695723756efd9b10df0",
"score": "0.9062532",
"text": "def is_current_user(user)\n if user == current_user\n return true\n else\n return false\n end\n end",
"title": ""
},
{
"docid": "21abbcf141f242198fee27d55f5226d7",
"score": "0.8867281",
... |
cbf299e23fbe463a807dd26dd3554c1b | Display the found letters surrounded by dashes | [
{
"docid": "8a71cccdf1ea9be6a710b385b6f8e1bc",
"score": "0.6798133",
"text": "def display_word\n if @turn == 0\n \t @word_to_guess.length.times { @word_uncomplete << '-'}\n end\n print @word_uncomplete.join('')\n puts \" Letters already played: \" + @letters_played.join(',') if @turn != ... | [
{
"docid": "fdeacc0e8d2c4a847cf28177e402cec4",
"score": "0.8042033",
"text": "def display_word\n dash_string = \"\"\n @disp_letters.each do |l|\n dash_string += l\n end\n puts dash_string\n end",
"title": ""
},
{
"docid": "ade74499750eb858360b0cca5413f82f",
"score": "0... |
91fe94d8cef2a7abbc82d427f94c92d0 | Updates pricing data in the db based on the search results already stored in the db | [
{
"docid": "e28b9e2ff9576a02624e0375d49933c2",
"score": "0.6174438",
"text": "def updatePrices\n\n puts \"Updating Search Result Prices\"\n\n SITE_CONFIG.each do |site, opts|\n\n SearchResult.order_by([[:updated_at, :desc]]).where(site_name: site).limit(GOOGLE_SERP_LIMIT * 10).each do |searchResult... | [
{
"docid": "e12d4760c007099472ac997b657a0ac9",
"score": "0.6204322",
"text": "def update_price\n self.update(daily_price: new_daily_price)\n end",
"title": ""
},
{
"docid": "9e49206df67c01a25aa83b0026074108",
"score": "0.6180715",
"text": "def index\n # if(current_user.email.eq... |
e6385c83643f520be31a9b68be876580 | Creates a new Node. | [
{
"docid": "369120f37d7f3649cfec73f12d75ce91",
"score": "0.0",
"text": "def initialize word = nil, parent = nil\n self.parent = parent\n self.children_tree = {}\n\n unless word.nil? || word.empty?\n self.letter = word.slice! 0\n self.terminal = word.empty?\n ... | [
{
"docid": "f8f8f1086aa1281ac194a4b3360349ef",
"score": "0.81667125",
"text": "def create_node(value)\n node = Node.new(value)\n end",
"title": ""
},
{
"docid": "a1fbf61c1c1b6baf9f2c59beb5c16ac8",
"score": "0.81076825",
"text": "def create\n Souffle::Log.info \"#{@node.log_pre... |
2a31f81126ab56c2e0e54e491e09fdd4 | DELETE /refdttypes/1 DELETE /refdttypes/1.xml | [
{
"docid": "6580bc4c100f72be33a500dd3ee87811",
"score": "0.7614405",
"text": "def destroy\n @refdttype = Refdttype.find(params[:id])\n @refdttype.destroy\n\n respond_to do |format|\n format.html { redirect_to(refdttypes_url) }\n format.xml { head :ok }\n end\n end",
"title": ... | [
{
"docid": "8ee12022bfc8d6d6a1d7adea9fb5f0df",
"score": "0.6749098",
"text": "def destroy\n @doc_type = DocType.find(params[:id])\n @doc_type.destroy\n\n respond_to do |format|\n format.html { redirect_to(doc_types_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
... |