query_id
stringlengths
32
32
query
stringlengths
7
6.75k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
23a5f9acd3f3e7da06e898037c15c039
Generate a new token for an OpenTok session.
[ { "docid": "e2fc72b7f13b4a0e596e1cccc3c79976", "score": "0.74815667", "text": "def opentok_token(opts = {})\n token_options = { role: OpenTok::RoleConstants::MODERATOR }\n token_options[:session_id] = opts[:session_id] || opentok_session\n token_options[:metadata] = opts[:metadata] if opts[:met...
[ { "docid": "0aedc9023e4d6b4493fb5b7b4b623a9e", "score": "0.7518149", "text": "def generate_token(opts = {})\n { :session_id => nil, :create_time => nil, :expire_time => nil, :role => nil, :connection_data => nil }.merge!(opts)\n\n create_time = opts[:create_time].nil? ? Time.now : opts[:create...
088e6e9738a2274b032058af25313d62
Shortcut method to find if Origen was invoked from within an application or from the global Origen install. This is just the opposite of in_app_workspace?
[ { "docid": "cca723b09867278fb1fc67af861172e2", "score": "0.6600406", "text": "def running_globally?\n @running_globally ||= !in_app_workspace?\n end", "title": "" } ]
[ { "docid": "9e000cc125a9d992b566a9384d6d2678", "score": "0.63453925", "text": "def in_app_workspace?\n return @in_app_workspace if defined? @in_app_workspace\n\n @in_app_workspace ||= begin\n path = Pathname.new(Dir.pwd)\n path = path.parent until path.root? || File.exist...
50f9f185a7e0a4b735aeced6110bd841
Calculates hash code according to all attributes.
[ { "docid": "01a0a5425ff0f986b2782148e8e8ad27", "score": "0.0", "text": "def hash\n [id_transacao, descricao_tipo_transacao, id_tipo_evento, descricao_tipo_evento, id_evento, id_conta, complemento, valor_brl, valor_usd, numero_parcela, quantidade_parcelas, data_hora_transacao, nome_estabelecimento, ...
[ { "docid": "d63333ed15c27e3f7526f0c6f8099546", "score": "0.7118691", "text": "def attr_hash\n Digest::MD5.hexdigest(\"#{@name}:#{@ruby_type}\")\n end", "title": "" }, { "docid": "23cdf6a080837fbe407633be0799ea0e", "score": "0.70400536", "text": "def hash() end", "title": ...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "332828c3f66bcaf344be8e2e9515f2e0", "score": "0.0", "text": "def set_nominate\n @nominate = Nominate.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...
8f00782cd890ea7387b8a7e33c3bcd6c
Getting a list of recipients with filtering Fetches details of all recipients.
[ { "docid": "b647836159240a391865ba5e79fd2ae3", "score": "0.655714", "text": "def get_recipients_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: RecipientsApi.get_recipients ...'\n end\n # resource path\n local_var_pat...
[ { "docid": "bbe7f43fb07eb785ebfb14f99a2322cf", "score": "0.8071515", "text": "def fetch_all_recipients\n response = @http.get(\n ENV['RECIPIENTS_URL'],\n content_type: 'application/json',\n authorization: \"Bearer #{@token}\"\n )\n incoming = JSON.parse(response.body)['recipients...
0203df81a0432e52b65dd69fd15b3ec7
Whether there is a next page of query data.
[ { "docid": "885cfb1a73cfc7a233d8351ff40005ad", "score": "0.65897673", "text": "def next?\n !token.nil?\n end", "title": "" } ]
[ { "docid": "a3b65263864f30611c2d43b8c7ce541f", "score": "0.8889728", "text": "def next_page?\n return (@query[:startPage] * (@query[:count] + 1)) < @total_results\n end", "title": "" }, { "docid": "1afc86c660bf0854e7039d7c08f28516", "score": "0.84284735", "text": "def has_nex...
a35506ae609493ef66dcd1541b30bf9b
Container Mapping: Extra Configuration & Profiles
[ { "docid": "e722035caafb71b0ce2be6f3d72dc249", "score": "0.0", "text": "def extra_config(hash)\n security = {\n 'security.privileged' => 'false',\n 'security.nesting' => 'false'\n }\n\n security.each_key do |key|\n item = \"LXD_SECURITY_#{key.spl...
[ { "docid": "8c3be978d8d2463dbcbac02091256b7f", "score": "0.6190146", "text": "def configure_container(container)\n container.use :env, inferrer: -> { Hanami.env }\n container.use :notifications\n\n container.configure do |config|\n config.inflector = configuration.inflector...
59fc150d39bf3660fb5a8e0ad7605b96
Internal method used to emit a selfclosing HTML/XML element, including a tag name and optional attributes (passed in via the default hash). Using the arcane powers of Ruby, there are magic methods that call +empty_element+ for all the standard HTML tags, like +img+, +br+, and so forth. Look at the source of empty_tags ...
[ { "docid": "a7dda394149b40faba9680a6d729bb3d", "score": "0.6085501", "text": "def empty_element(*args, &block)\n __empty_element__(*args, &block)\n end", "title": "" } ]
[ { "docid": "30178af17a8729d7ba0992c139666720", "score": "0.73447156", "text": "def self_closing_tag name, attrs = {}\n \"<#{name}#{optional_attrs(attrs)}/>\\n\"\n end", "title": "" }, { "docid": "d3c90344d1c00d17c57e97a371f23192", "score": "0.7074959", "text": "def self_c...
c8f8ee03465221e42b1a94aea4d70408
execute this executable on the given target
[ { "docid": "3afcb4dff16f00c79b15730e611a60a7", "score": "0.6434379", "text": "def execute(target, *args)\n case @thing\n when String, Symbol\n if (args.length > 0)\n target.send(@thing, *args)\n else\n target.send(@thing)\n end\n when Proc\n i...
[ { "docid": "e7dd49cc112ab0d326a635b6a8e0dffa", "score": "0.709389", "text": "def target_exec(script_on_target)\n execsuccess = true\n print_status(\"Executing script #{script_on_target}\")\n # Lets give the target a few seconds to catch up...\n Rex.sleep(3)\n\n # Error handling for proces...
10ddc705844a6f414991505a5d2d0462
completeOnline This operation completes the transaction online. The completion is forwarded to the processor. This implies that the processor may take some actions based on the completion.
[ { "docid": "edcc2994c085cb02e67136dc34cf4aad", "score": "0.0", "text": "def transaction_completion_service_complete_online_with_http_info(space_id, id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: TransactionCompletionService.transaction_compl...
[ { "docid": "159be833788822a3e45f5c2d11b5a204", "score": "0.6094346", "text": "def complete!\n update_status :complete\n end", "title": "" }, { "docid": "9c21cf3aaa1e0dd9415d852605f683ee", "score": "0.59579706", "text": "def complete!\n change_status!(OrderStatus.comple...
32db33731451bf0754b1387f0190acdf
Options: files, published, updated, origin, origin_dynamic
[ { "docid": "f5fc16f2c9e7fe38e1517102ca07efae", "score": "0.0", "text": "def initialize(opts = {})\n opts = opts.inject({}){ |r, (k,v)| r[k.to_sym] = v; r }\n \n self.files = []\n \n opts.fetch(:files, []).each do |file|\n self.files << Metalink4File.new(file)\n end\n\n self.publi...
[ { "docid": "28c951299ba6dcd137fa55e7c62d7c58", "score": "0.6070612", "text": "def public_file_server; end", "title": "" }, { "docid": "28c951299ba6dcd137fa55e7c62d7c58", "score": "0.6070612", "text": "def public_file_server; end", "title": "" }, { "docid": "1a0931b3acd44f...
aaa9500daa58efc4a9e8cc71fe73780b
Detects markup format from filename
[ { "docid": "6fc18af24f7baca0083197b738c03f49", "score": "0.77264667", "text": "def detect_format(filename)\n case(filename)\n when /\\.rdoc/i\n :rdoc\n when /\\.(md|mkdn?|mdown|markdown)/i\n :markdown\n when /\\.textile/i\n :textile\n end\n en...
[ { "docid": "b2affa434193c9d3872af26375f03f2a", "score": "0.7465942", "text": "def file_detect_format filename\n string_detect_format File.read(filename)\n end", "title": "" }, { "docid": "803b483bd8b4c3a8f92e718996642c66", "score": "0.72729206", "text": "def markup?(filename)...
568cc1e12d8b3dd9ea49b0f517d30ac9
TODO : Generates a grid from a picture
[ { "docid": "23627c3c1e42ba8ee6231548ad6b3331", "score": "0.0", "text": "def picture()\n\n\tend", "title": "" } ]
[ { "docid": "df1b3b98eff3d94ef8a7777f70dfae1f", "score": "0.77746", "text": "def genPictureGrid(path)\n\t\t@grid.picture(path)\n\tend", "title": "" }, { "docid": "1e7f6c5220de0f517de457c040682e5f", "score": "0.7394232", "text": "def make_grid_image(w, h, col = [128, 200, 0, 128])\r\n ...
b316c01acefb30d2ac34c4aab182571d
POST /vampires POST /vampires.json
[ { "docid": "60b168667cae1c7a83ea9c3c98a09883", "score": "0.6820031", "text": "def create\n @vampire = Vampire.new(params[:vampire])\n\n respond_to do |format|\n if @vampire.save\n format.html { redirect_to @vampire, notice: 'Vampire was successfully created.' }\n format.json { r...
[ { "docid": "dd27ce6df283907bfe79f885c74da4d7", "score": "0.6337627", "text": "def new\n @vampire = Vampire.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @vampire }\n end\n end", "title": "" }, { "docid": "6dc95d6f2f712bc2da00d410...
066675d4dedb4f6f6bebce652b9d552f
Execute the Choreo using the specified InputSet as parameters, wait for the Choreo to complete and return a ResultSet containing the execution results.
[ { "docid": "deb8c0da659ff6174fb96d04acb3043f", "score": "0.0", "text": "def execute(input_set = nil)\n resp = super(input_set)\n results = ListVirtualMFADevicesResultSet.new(resp)\n return results\n end", "title": "" } ]
[ { "docid": "c4ca32683e8ce75eb6a187d63df8fa77", "score": "0.76639634", "text": "def execute(input_set = nil)\n resp = super(input_set)\n results = DoneResultSet.new(resp)\n return results\n end", "title": "" }, { "docid": "6f7a7d9be674ad4cf17d6743eb1f7836", "scor...
854ca1bfb68bdbf0ab2cdb6855f58dd6
Generate a given number of sentences. If a range is passed, it will generate a random number of sentences within that range.
[ { "docid": "8735b41d8ca3f1d1da4d7d317fe16b89", "score": "0.527163", "text": "def sentences(total)\n (1..interpret_value(total)).map do\n words(5..20).capitalize\n end.join('. ')\n end", "title": "" } ]
[ { "docid": "2ef98ac81572a2f2e49c2e9eb9a11e51", "score": "0.7285845", "text": "def any_sentence(options = {})\n min = 11\n max = 21\n\n if options[:max]\n min = 1\n max = options[:max]\n elsif options[:min]\n min = options[:min]\n max = min ...
3c65efcde3daf9417648a081cf79c3a3
Decrement the limits by the given amount.
[ { "docid": "36a2a02812305eed81fffaebfde5f3c5", "score": "0.760553", "text": "def decrement(amount = 1, time: Time.now)\n limits.all? { |limit| limit.decrement(amount, time: time) }\n end", "title": "" } ]
[ { "docid": "fa94db8a8001af2a20a131adb8c3f1e7", "score": "0.77021503", "text": "def decrease(amount)\n @value -= amount\n @value = 0 if @value < 0\n end", "title": "" }, { "docid": "8ca4cc445c572672aa87f8dd544004c4", "score": "0.72299916", "text": "def decrement\n @amo...
aef54cc9cfa0e13f9d347e0a8b9cb0cb
incoming position is the label
[ { "docid": "bb06415495b6d21587a60273505af2d8", "score": "0.0", "text": "def position_changed(position)\n @branch.precheck\n end", "title": "" } ]
[ { "docid": "3d772442906da82c6389ca501e686aa0", "score": "0.7708025", "text": "def position_label\n $log.debug \"XXX: LABEL row #{@label.row}, #{@label.col} \"\n @label.row @row unless @label.row #if @label.row == -1\n @label.col @col-(@label.name.length+1) unless @label.col #if @label.c...
201ba3a8fc53ad5791a6b8fd5fb66249
Enumerate the objects matching self in the plan
[ { "docid": "44cb33d2448cc6d37d38b6b2518544f9", "score": "0.5555468", "text": "def each_in_plan(plan, &block)\n return enum_for(__method__, plan) unless block_given?\n\n evaluate(plan).each_in_plan(plan, &block)\n end", "title": "" } ]
[ { "docid": "2fe8c2245d5a5974c420e3761f1065d8", "score": "0.64024335", "text": "def each_in_plan(plan)\n return enum_for(__method__, plan) unless block_given?\n\n seen = Set.new\n seen.compare_by_identity\n @ops.each do |op|\n ...
2c81cf3a5ca3cb976ad15d6be93912ba
POST /inspection_periods POST /inspection_periods.xml
[ { "docid": "110a0c48b172d441346dcd844c540b74", "score": "0.6406328", "text": "def create\n @inspection_period = InspectionPeriod.new(params[:inspection_period])\n\n respond_to do |format|\n if @inspection_period.save\n flash[:notice] = 'InspectionPeriod was successfully created.'\n ...
[ { "docid": "d2eb5c909f7302adacd6842252fa86ea", "score": "0.57269675", "text": "def period_params\n params.require(:period).permit(:start_date, :finish_date, :days)\n end", "title": "" }, { "docid": "c034b16ea3a3fa80827c12bd335b8de7", "score": "0.56686187", "text": "def period...
c33f58488976ef7435545f0aef8f3c47
extracts the error code
[ { "docid": "6729734285de61cdc8f3e673e7b55a97", "score": "0.81605303", "text": "def error_code(e)\n deter_fault(e).try(:[], :error_code)\n end", "title": "" } ]
[ { "docid": "afe692e52e9f9b6bbf262433ed37d66e", "score": "0.8235115", "text": "def code\n @errorcode\n end", "title": "" }, { "docid": "92e3be998f3843ab922dfe9815498b45", "score": "0.81917524", "text": "def error_code\n /^%ERROR:(.*)$/\n end", "title": "" }, ...
480ecd7223b0c510da25b3e616153c9e
The most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this term gave the name to the cellular phone) and every phone connects to the BTS with the strongest signal (in a little simplified view). Of course, BTSes need some attention and techn...
[ { "docid": "0533370f5ff52bd5f0695e1900f67313", "score": "0.0", "text": "def trail_zero\n n = gets.chomp.to_i\n r = 0\n while n > 1\n r += n/5\n n /= 5\n end\n return r\nend", "title": "" } ]
[ { "docid": "c452bc78f4aa0d75daa2b04840128522", "score": "0.55315125", "text": "def shortest_path_binary_matrix(grid,sr,sc,tr,tc)\n\t# Return -1 if any of source or target is not equal to 1.\n\tif grid[sr][sc] != 1 || grid[tr][tc] != 1\n\t\treturn -1\n\tend\n @rows = grid.size # Find total rows in ma...
d27980ff19cc3d451b385fd16473f636
GET /continents/1 GET /continents/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "5ed506eea63d906f5404f6262dc6a77a", "score": "0.68060327", "text": "def list_continents()\n path = '/locale/continents'\n\n params = {\n }\n \n headers = {\n \"content-type\": 'application/json',\n }\n\n ...
7b6afcdb0b3be3150e336480f329f249
Use Twilio to send out text alerts
[ { "docid": "520b2d5ec10181407178ca348dd8d358", "score": "0.8017833", "text": "def send_text_alerts(account_sid, account_token, api_version, phone_nums = [], message)\n phone_nums.each do |phone_num|\n send = false\n last_sent = DB.get_record(phone_num)\n \n if last_sent\n if Time.now >...
[ { "docid": "0ad2f427f1deb8c490136bb1d5b322dd", "score": "0.7958634", "text": "def alert\n message_body = params[\"Body\"]\n from_number = params[\"From\"]\n boot_twilio\n sms = @client.messages.create(\n from: ENV['TWILIO_NUMBER'],\n to: from_number,\n body: \"Hello there, tha...
027f2aed2b1d98a259e8fe197ad93156
Returns true if an identifier exists in the external management system
[ { "docid": "d6cbd7c761c240f02a353c199291fd08", "score": "0.70034564", "text": "def exists?(id)\n @identifiers.key? id\n end", "title": "" } ]
[ { "docid": "22282cee4f9a6e1f87ec6815e2d49217", "score": "0.7007379", "text": "def id_exists?(id)\n err = \"\"\n Open3.popen3(\"#{XDo::XWININFO} -id #{id}\"){|stdin, stdout, stderr| err << stderr.read}\n return false unless err.empty?\n return true\n end", "title": ""...
eb5064aacda45bf23ca86cc2a1e147db
A function put in to update all myspace searches to better urls, and css searches
[ { "docid": "0a57249e037c32d5605c659f7a6ba3d0", "score": "0.64265734", "text": "def update_to_new_myspace_searchnames\n \n logger.debug\"Updating Myspace Search Names\"\n myspace = \"myspace\"\n http = \"http\"\n \n @all_event_searches = EventSearch.all\n \n\t@all_event_searches.each do |aes|\n\t\...
[ { "docid": "afad06deadc5d84d444ac468b07b2f54", "score": "0.59113497", "text": "def set_irregular_wiki_urls\n Park.where(wiki_url: nil).each do |park|\n google_doc = Nokogiri::HTML(open(\"https://www.google.com/search?q=\" + set_google_query(park)))\n google_results = google_doc.css(\"h3.r a...
00affc781f7fae81e82c0e12776c0e96
Deletes all nodes and connected relationships from Cypher.
[ { "docid": "94c07fe7a6d2bdbd0dace11ba5be2277", "score": "0.72015744", "text": "def delete_all\n neo4j_query(\"MATCH (n:`#{mapped_label_name}`) OPTIONAL MATCH (n)-[r]-() DELETE n,r\")\n end", "title": "" } ]
[ { "docid": "39ce8b5884dd7b246dbef19418810601", "score": "0.7087441", "text": "def delete_all\n Neo.db.execute_query(\"#{initial_match} OPTIONAL MATCH (n0)-[r]-() DELETE n0,r\")\n end", "title": "" }, { "docid": "443e758781bfee48f099f771f3589725", "score": "0.69335574", "text"...
61df4e1a233712d94e2bbce707bc2960
Return Discovered Node Information Returns information about a specific discovered node.
[ { "docid": "e46ea4a0b4668208dcbf1f773625aa3b", "score": "0.603278", "text": "def read_discovered_node_with_http_info(node_ext_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: FabricApi.read_discovered_node ...\"\n end\n # verify the ...
[ { "docid": "689dc0ee54a164611bf05b5b2fb7a504", "score": "0.6838473", "text": "def get_node_info(node_name)\n get_uri = \"/restconf/operational/opendaylight-inventory:nodes/node/\"\\\n \"#{node_name}\"\n response = @rest_agent.get_request(get_uri)\n check_response_for_success(response) do |...
2cbb3cf8e713751d31617a978793be9a
Returns all available sessions on the Appium server instance
[ { "docid": "1bafca079d997e7b60dc650f9c607332", "score": "0.7575965", "text": "def sessions\n execute :get_all_sessions\n end", "title": "" } ]
[ { "docid": "21e0680bb781cecce41561ec9def2415", "score": "0.81254715", "text": "def sessions\n ipc_returning(command('list-sessions'), Session)\n end", "title": "" }, { "docid": "6f58a5ddad0f0a1f1ca799a467bf57d1", "score": "0.7819868", "text": "def list_sessions\n respons...
ee26e0cbaecdc748a027efba041b4379
create a cart (after new)
[ { "docid": "295f3adb6a5f5dcd9576854499a23024", "score": "0.72827864", "text": "def create\n return unless check_permission\n\n @cart = Cart.new(cart_params)\n @cart.current_user_id = session[:login_id]\n\n if @cart.save\n redirect_to @cart\n else\n render 'new'\n end\n end",...
[ { "docid": "4a0f2f6d4eb9d6981bd9b9db9a00b27a", "score": "0.8045291", "text": "def create\n create_cart\n redirect_to current_cart\n end", "title": "" }, { "docid": "2ed05351f8959b1c59c31fd25ed18632", "score": "0.78698874", "text": "def create\n response, status = BeyondAp...
3ae962fb84df14d845d7db3ae9e003cd
Creates links to paginate by 20, 50, 100, or all releases.
[ { "docid": "78f9b69d0bf2a18f56f236a606996ca5", "score": "0.613366", "text": "def pagination_toggle(params)\n content_tag(:div,\n content_tag(:span, 'View:') << ' ' <<\n pagination_link('20', params) << ' ' <<\n pagination_link('50', params) << ' ' <<\n pagination_link('100', param...
[ { "docid": "275522bd823e1b183479dd31c2339e77", "score": "0.6896676", "text": "def pagination_link(amount_to_paginate, params)\n content_tag(:a,\n amount_to_paginate.to_s.capitalize,\n :href => releases_path(:p => amount_to_paginate,\n ...
ec0db30d1b63a5febfbdb8a58bdc6ac4
GET /companies/1 GET /companies/1.json
[ { "docid": "f1c2ce51f36b80dd2820ac8d0da3bce2", "score": "0.0", "text": "def show\n redirect_to action: :edit\n end", "title": "" } ]
[ { "docid": "64a989c42306e451f5c5357fba4725c0", "score": "0.78169864", "text": "def companies\n @companies = AccountingEntity.find(params[:id]).companies\n\n respond_to do |format|\n format.html { render \"companies/index.html\" } # show.html.erb\n format.json { render json: @companies }\...
8ee77ce508ca86af5f274ccddfcb55a3
words = input.split("") string_container = "" words.each do | letter| string_container += (letter.ord + 1).chr end string_container your code goes here end puts solve_cipher("ifmmp") puts solve_cipher("p| uhdo qdph lv grqdog gxfn", 3) should return "hello"
[ { "docid": "e5e53f206f18b5de5f760a785667abb9", "score": "0.8581565", "text": "def solve_cipher(input, shift)\n words = input.split(\"\")\n \n string_container = \"\" \n words.each do | letter|\n \tif letter == \" \"\n \t\tstring_container += \" \"\n\n \telse\n \tstring_container += (letter.ord + s...
[ { "docid": "80f320ad76460a3a2b7a06a88bd09d7a", "score": "0.8068368", "text": "def solve_cipher(input)\n\n\tputs \"\\n\\nCAESAR'S CYPHER -- ITERATION 1\\n\"\n\t \n\t#Char -> convert string to characters \n\t#map() -> convert all the items \n\t#ord -> Return the Integer ordinal of a one-character string\...
ad25d4bf012e005bab7aae36a3a178dd
Prints the current game board The board should have the same dimensions each time and you should use the "reputs" helper to print over the previous board
[ { "docid": "97008b579541767d5c0ae929b9bb3020", "score": "0.8034477", "text": "def print_board\n reputs('|')\n clear_screen!\n move_to_home!\n @players.each_with_index do |value,index|\n p board[index]\n puts\n end\n\n end", "title": "" } ]
[ { "docid": "7e35ed1f9911536028911790e7e79637", "score": "0.85916215", "text": "def print_board\n\t\tputs \"**********************************\"\n\t\tputs \"| ♔ ♚ ♕ ♛ ♖ ♜ ♗ ♝ ♘ ♞ ♙ ♟ |\"\n\t\tputs \"| Actual board |\"\n\t\tputs \"| ♔ ♚ ♕ ♛ ♖ ♜ ♗ ♝ ♘ ♞ ♙ ♟ |\"\n\t\tputs \"*...
e2d8b89eb6fb21a6a8e50ccea2e36eda
Arreglo para salas (nombreSala,usuariosLista) Metodo de busqueda por medio de socket/ Devuelve uno objeto usuario si se encuentra, si no, nil
[ { "docid": "0dbe79d81a388612ecc7d803557c7cca", "score": "0.6996037", "text": "def buscaUsuarioPorSocket(arreglo,socketUsuario)\n arreglo.each do |usr|\n if(usr.socket.equal? socketUsuario)\n return usr\n else\n next\n end\n end\n return nil\n end", "title": "" ...
[ { "docid": "ba8bad61dde11dbd2f666bd66213a6da", "score": "0.7238647", "text": "def accionIdentify(comando,usuariosLista,socketUsuario)\n orden=comando.split(\" \")\n username=orden[1]\n if(username==nil)\n socketUsuario.puts \"Necesitas ingresar un nombre\"\n elsif (nombreExiste?(usernam...
85a2687ca9518137e02fc2bf1d7dc725
Rmove keyvalue pair if the is only one element in the array
[ { "docid": "be32b0aef47bc2c6a3e4bce9368df4d5", "score": "0.0", "text": "def indexed_list_delete_single(indexed_list)\n indexed_list.delete_if{|key, filename_arr|\n filename_arr.size == 1\n }\nend", "title": "" } ]
[ { "docid": "fd70a06ee2067cc818027146b83251f1", "score": "0.6023942", "text": "def shift\n unless empty?\n key = keys.first\n val = delete(key)\n [key, val]\n end\n end", "title": "" }, { "docid": "e83b04ffebd43823ebda20c0fc257e8b", "score": "0.5953678", ...
d2033560d0b72344a4160586f9561222
Register a test method to Roger::Test so it can be used in the Rogerfile
[ { "docid": "ccc691db80bddf21aa1f306c36c886f7", "score": "0.57140166", "text": "def register(name, test, cli = nil)\n if map.key?(name)\n raise ArgumentError, \"Another test has already claimed the name #{name.inspect}\"\n end\n\n raise ArgumentError, \"Name must be a symbol...
[ { "docid": "46f056c878f0cb0be75d894f4e1a5691", "score": "0.7774728", "text": "def register_test(test:)\n @tests << {\n test: test\n }\n end", "title": "" }, { "docid": "93799dd2fbf175fd6de54594e5b334d8", "score": "0.6816471", "text": "def test(name) # FIXME: Remove this.\...
b5c535293e11d346e28acb896e22a1cb
GET /products_cities/1 GET /products_cities/1.json
[ { "docid": "679c1070c6b564f6e3ac8c56aa072b3a", "score": "0.6321405", "text": "def show\n @products_cities = ProductsCity.find_by_sql [\"SELECT pc.id, pc.product_id, pc.status, pc.city_id, pc.category_id, pc.created_at, pc.updated_at, p.product_name, ct.city_name, cate.category_name, p.logo, pr.price ...
[ { "docid": "a42672db56eb7f67cdd97b948dac6829", "score": "0.74762183", "text": "def cities\n self.class.get(\"/v1/cities\")\n end", "title": "" }, { "docid": "f00b025f7a4a01b6811779c7b39a360a", "score": "0.7332461", "text": "def index\n \n render json: @cities\n end", ...
9e2602fdb5fe03c94b1c66f42fc90a28
POST /events or /events.json
[ { "docid": "bee47165dabce14f04af7ea68848174b", "score": "0.0", "text": "def create\n @event = Event.new(event_params)\n @event.user_id = current_user.id\n\n params[:movies].each do |item1|\n a = nil\n i = 0\n list = Movie.all\n while a == nil && i<(list).length-1\n if...
[ { "docid": "d70601f4de46b4b99300c06b1751c4f2", "score": "0.75324076", "text": "def create_event event, data={}\n data[:event] = event\n post '/event', data\n end", "title": "" }, { "docid": "b017821afcf02eb5bf3310a314f7428d", "score": "0.75299096", "text": "def cre...
af630984682f1a0b5a68e6092af0d102
Update properties of this object
[ { "docid": "c185ed47a60d985c65611053ee48e075", "score": "0.0", "text": "def update!(**args)\n end", "title": "" } ]
[ { "docid": "150fa2bdc1fc43d28ac45e2278a1f797", "score": "0.7012568", "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...
da6de06aaee1d8ab4518ad63a3b550b3
Get filter name by field
[ { "docid": "88a1f3f0c6341ddca8ae76a4fe7537e8", "score": "0.85356957", "text": "def get_filter_name(field, model = nil)\n field_name = model.present? ? \"#{model.table_name}.#{field}\" : field\n \"#{name}[#{filter_param_name}][#{field_name}]\"\n end", "title": "" } ]
[ { "docid": "7b792c354ea4d25c98ac3610b79f7104", "score": "0.7092277", "text": "def query_name\n if filters.one?\n filters.keys.first.to_s\n else\n filters.keys.join('_and_')\n end\n end", "title": "" }, { "docid": "0d63fec38a1c00f65cb15a47b65198c1",...
21fc2b4272a5a8ee9d7c32ba9a5b464d
Equivalent to the pin_groups method but considers virtual pins rather than regular pins
[ { "docid": "bf5d30facbd6fb8b46340448349e7eda", "score": "0.6895982", "text": "def virtual_pin_groups(id = nil, options = {}, &_block)\n id, options = nil, id if id.is_a?(Hash)\n if id\n pin = Origen.pin_bank.find(id, options.merge(virtual_pin: true))\n unless pin\n puts ...
[ { "docid": "cce66ac853129b96beb595369102ffb1", "score": "0.63084745", "text": "def get_pin_objects(grp)\n pins = []\n if Origen.top_level.pin(grp).is_a?(Origen::Pins::Pin) ||\n Origen.top_level.pin(grp).is_a?(Origen::Pins::FunctionProxy)\n pins << Origen.top_leve...
89a3287e44b246458ad9ca6691fb81ae
GET /swas/1 GET /swas/1.json
[ { "docid": "7c110bb036692f316c2f4de2a853e4d5", "score": "0.74490327", "text": "def show\n @swa = Swa.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @swa }\n end\n end", "title": "" } ]
[ { "docid": "ff75d4328c5ba7f5bec861b86aef42da", "score": "0.6925152", "text": "def show\n @siswa = Siswa.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @siswa }\n end\n end", "title": "" }, { "docid": "5f1f035bd65cde...
a2099a77c85e91272ae2f9e35b937953
Only allow a trusted parameter "white list" through.
[ { "docid": "e51f667ab1b98c31b4a3cc4875a6355a", "score": "0.0", "text": "def project_params\n params.require(:project).permit(:title, :description, :results, :project_status_id, :categories, :collaborators, documents: [])\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.79439425", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "f6060519cb0c56a439976f0c978690db", "score": "0.69581985", "text": "def permitted_params\n params.permit!\n end", "title...
51f8118cb4bbcf7b7f46c32279046a04
set should have :def_proc
[ { "docid": "7004f5f8dd71e9cd17b562b1eb7b408a", "score": "0.0", "text": "def initialize(spcfg, atrb = Hashx.new)\n super(spcfg)\n update(atrb)\n @par = self[:par]\n @id = self[:cid]\n verbose { \"Config\\n\" + path }\n end", "title": "" } ]
[ { "docid": "857faf0105cd3e9b854b88c3fe2206e7", "score": "0.63085663", "text": "def default_command_set_proc\n @command_set_proc_obj = closure_obj = {\n :command_called => false,\n :proc_called => false,\n }\n proc do\n closure_obj[:proc_called] = true\n command(\"test\", \"t...
d7f6d2727ae9d5d86de76a25b36c977d
PUT /post472s/1 PUT /post472s/1.xml
[ { "docid": "f560bedcbd47fcf3eff8d85db6603c2f", "score": "0.61563903", "text": "def update\n @post472 = Post472.find(params[:id])\n\n respond_to do |format|\n if @post472.update_attributes(params[:post472])\n format.html { redirect_to(@post472, :notice => 'Post472 was successfully updat...
[ { "docid": "c2c0b673628fdc28b181d18c0afd2d5b", "score": "0.66278785", "text": "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post 'update', opts\n end", "title": "" }, { "docid": "e631b376ae2ccb776680432bf94b01cc", "score": "0.65...
ec0bea63e01c19b76beeef799dcd350b
DEMANDE AU JOUEUR SON NOM ET INITIALISATION OBJET DE LA CLASSE HumanPlayer
[ { "docid": "f03c23ba5bcda579221c375237470b93", "score": "0.67131007", "text": "def init_player\r\n puts \" ----------------------- \"\r\n puts \"Veuillez saisir un nom de joueur :\"\r\n puts \"\"\r\n print \"> \"\r\n nom_joueur = gets.chomp.to_s\r\n puts \" ----------------------- \"\r\n ...
[ { "docid": "aa0cc9b07804498d0d175920b24ebb50", "score": "0.6987604", "text": "def initialiser_humain\n puts 'Quel est ton nom?'\n print '> '\n nom = gets.chomp\n human1 = HumanPlayer.new(nom)\n puts \"Humain #{nom} créé!\"\n human1\nend", "title": "" }, { "docid": "93e1d17a3ca15cd333ce...
9a1fa5ebc150f682f26c1c832407436b
Subject can be set in your I18n file at config/locales/en.yml with the following lookup: en.notifier.contact_acknowledge.subject
[ { "docid": "ee838508162158a41e7dc6887c5d3cb5", "score": "0.0", "text": "def contact_acknowledge(message)\n @message = message\n @greeting = 'Hi'\n\n mail to: message.email,\n from: APP_CONFIG['email_from'],\n subject: 'Contact Confirmation from Music Bee'\n end", "title": "...
[ { "docid": "8928fe4f050d7ebd3e9aa992b07e320a", "score": "0.75773966", "text": "def subject_for\n ActiveSupport::Deprecation.warn \"subject_for\"\n I18n.t(:\"subject\", scope: [:notifications, :mailer],\n default: [:subject])\n end", "title": "" }, { "docid": ...
2ade02c5e8994a98314a590e70dbba61
PATCH/PUT /first_reviews/1 PATCH/PUT /first_reviews/1.json
[ { "docid": "310420e328c6ed626caa4339e6bbba5e", "score": "0.7156854", "text": "def update\n respond_to do |format|\n if @first_review.update(first_review_params)\n format.html { redirect_to team_path(@first_review.team_id), notice: 'First review was successfully updated.' }\n format...
[ { "docid": "f1f33b87e30d1e5a560bd5a12db6306f", "score": "0.7116417", "text": "def update\n @review = Review.find(params[:id])\n @review.update(review_params)\n render json: @review\n end", "title": "" }, { "docid": "9bce974e8efc85f1fb551bd1c0feaba1", "score": "0.6755925", "...
ed825fc7de6fd1c7cce872b670101d72
POST /clients or /clients.json
[ { "docid": "2de9a5f492476067df19ada3377f8981", "score": "0.6796346", "text": "def create\n @client = Client.new(client_params)\n\n respond_to do |format|\n if @client.save\n format.html { redirect_to @client, notice: \"Client was successfully created.\" }\n format.json { render ...
[ { "docid": "5a9b702fa7d00d174a626f7d00acc016", "score": "0.70459324", "text": "def create\n @client = Client.new(client_params)\n\n respond_to do |format|\n if @client.save\n format.html { redirect_to clients_url, notice: 'El cliente se creó correctamente' }\n format.json { rend...
1a872fbd2b63e0d9efae1f670e52faec
Create a load balancer serverssl profile Create a load balancer serverssl profile.
[ { "docid": "220633cd53e6078afdf7cdcbfef6ddd3", "score": "0.7414101", "text": "def create_load_balancer_server_ssl_profile_with_http_info(lb_server_ssl_profile, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: ServicesApi.create_load_balancer_serve...
[ { "docid": "59ddd302a1819edba1e5d73ded528e8b", "score": "0.7891588", "text": "def create_load_balancer_server_ssl_profile(lb_server_ssl_profile, opts = {})\n data, _status_code, _headers = create_load_balancer_server_ssl_profile_with_http_info(lb_server_ssl_profile, opts)\n data\n end", ...
ee3e2297d1b5749823ac1f6e6919cbaf
returns the full title on a perpage basis
[ { "docid": "c8bc07451a99d4939be7ca975503dcb4", "score": "0.0", "text": "def full_title(page_title)\n\t\tbase_title = CONFIG[:title] || \"Ruby on Rails Template\"\n\t\tif page_title.empty?\n\t\t\tbase_title\n\t\telse\n\t\t\t\"#{base_title} | #{page_title}\"\n\t\tend\n\tend", "title": "" } ]
[ { "docid": "963c66d8fb415e62cf78790ff75f82b6", "score": "0.80438805", "text": "def title\n @title_pages.each { |tp| tp.title and return tp.title }\n nil\n end", "title": "" }, { "docid": "a48b4df2c3211068f73473525263498c", "score": "0.77581966", "text": "def page_title\n...
36220577b6e629b6e432611c2702b120
Removes indents from markdown for better printing
[ { "docid": "d6559efaa1a25bd3f7d868a33f4123dc", "score": "0.7900651", "text": "def unindent_markdown(markdown)\n return nil if markdown.nil?\n\n natural_indent = markdown.lines.collect { |l| l.index(/[^ ]/) }.select { |l| !l.nil? && l.positive? }.min || 0\n markdown.lines.map { |l| l[natural_indent..-...
[ { "docid": "c2c42affff23837bd3feb5562b0524df", "score": "0.69229984", "text": "def tomdoc\n lines = raw.split(\"\\n\")\n\n # remove remark symbol\n if lines.all?{ |line| /^\\s*#/ =~ line }\n lines = lines.map do |line|\n line =~ /^(\\s*#)/ ? line.sub($1, '') : nil\n ...
12de6d06d775358d84dc5adb07a3167c
RiPPER wRaPPER A ruby wrapper of cdparanoia, flac, and metaflac for ripping CDs to FLAC
[ { "docid": "b5cde0c50547ed5f9ff3583df420c184", "score": "0.0", "text": "def bashEscapeString(string)\n\tstring.gsub(\"'\"){\"'\\\\''\"}\t\t# shells require string-ending ', escaped \\' and restarting with '\nend", "title": "" } ]
[ { "docid": "f0eaa560a9b4646de4dc780f4dd9aee1", "score": "0.594879", "text": "def encode_flac(outputfile)\n wavtemp = Tempfile.new('wavfile')\n info = self.get_tags\n track = info['tracknumber'].gsub(/\\D/,'')\n system(\n 'flac',\n '-s',\n '-d',\n '-f',\n '-o',\n wavtemp.path,\n ...
4e40c0d886017f3620ad2e18127e0238
Creates and returns a hashmap of userid to a second hashmap of user data, mapping "bets" to an array of all of their bets for the specified year, "points" to the total number of points they would score if the season ended today, and "user" to the actual user object.
[ { "docid": "017adfbce0e9b3d4295afa09bcd9f73d", "score": "0.77885807", "text": "def buildUserToBetsMap(year, teamToStandingsMap)\n allBets = MlbWinBet.joins(:mlb_win)\n .where(\"mlb_wins.year = \" + year.to_s)\n .order(:user_id, \"amount DESC\")\n userToB...
[ { "docid": "15941e37bc6575301da30a1389cf4625", "score": "0.5735289", "text": "def compute_user_rate(user)\n user_rate = Hash.new(0)\n user_movies = @data.select { |item| item[0].to_i == user }.each { |item| user_rate[item[1].to_i] = item[2].to_i }\n user_rate\n end", "title": "" }, { ...
f93a445c8eed9218b5655bf1d56e5296
Manage the claims counter manually because `cache_counter` isn't a great idea for HABTM
[ { "docid": "ee4445b35fd3e08652f8df3f0ce0fe45", "score": "0.71388274", "text": "def update_claims_count(save = false)\n self.claims_count = self.claims.count\n self.save! if save == true\n end", "title": "" } ]
[ { "docid": "3b173cfdcbefe816731099cd50529f45", "score": "0.6684969", "text": "def update_cache_counters\n role_method = :\"#{self.role}_comments_count=\"\n if commentable.respond_to?(role_method)\n commentable.send role_method, commentable.comments.where(role: self.role).count\n en...
6172d6ee25e90a24935de998a1da222b
Whether this class of objects is in fact loanable, not whether it's on loan or not.
[ { "docid": "b6bfbfc2e3175027bea0b0dfbb822ca3", "score": "0.8041248", "text": "def object_loanable_check\n loan_item_object && loan_item_object.respond_to?(:is_loanable?)\n end", "title": "" } ]
[ { "docid": "c753709bbae331d21792d28b1bb8461e", "score": "0.78029406", "text": "def loaned?(artefact)\n !loans.find_by_artefact_id_and_active(artefact.id, true).blank?\n end", "title": "" }, { "docid": "14c9f5ee1e05d8514db300af505b4609", "score": "0.76570904", "text": "def loan_ob...
82a289f08e729f277ee14dceb1e1a2a3
TODO: toggle sending on and off
[ { "docid": "f4880e44f7d66b108b4c180a49117894", "score": "0.0", "text": "def sms(message)\n return unless Settings.active\n\n message.update(from: from)\n client.set_sms_attributes(attributes: { 'DefaultSenderID' => from })\n client.publish(phone_number: message.to, message: message.b...
[ { "docid": "e9d720859c96b8430d5091532c0b59db", "score": "0.74573183", "text": "def sent\n end", "title": "" }, { "docid": "2a4c500447a00468c80f3cafdd88e707", "score": "0.70747924", "text": "def sent\n \n end", "title": "" }, { "docid": "1ebba3ba8199a6235ae165340f9062...
35930a7c8b913ce142c2a876fdcf632e
returns array of length 2
[ { "docid": "a304ddc14fac356d3e54a94fbc42ca4c", "score": "0.0", "text": "def sequence_slice_params(other,return_first: false)\n found = (0..length).map do |pos|\n if other[pos].nil?\n next\n end\n\n if(self[pos] == other[0])\n match_length = self[pos..-1].match_length_recu...
[ { "docid": "6b5d0abb5122876a4bfd80766bc6b9b8", "score": "0.6822434", "text": "def double_array(array)\n result = []\n 2.times { result << array }\n result.flatten\nend", "title": "" }, { "docid": "5a45d83925eb7973e3d35c7bc6fae93b", "score": "0.67229444", "text": "def rover_inputs\...
c235973c8fbf5d93ebcdcaa88917e0bb
This method fetches the table name associated with a specified column for a ResultSet object. ==== Parameters column:: A reference to the column number to fetch the details for. Column numbers start at zero.
[ { "docid": "41786dcb034e356c9afc779bbfd9a5e8", "score": "0.6145515", "text": "def column_table(column)\r\n end", "title": "" } ]
[ { "docid": "b349c022e98000c11d622295c2825362", "score": "0.66934574", "text": "def column_by_name(table_name, column_name)\n unless table = table_by_name(table_name)\n return nil\n end\n\n object_by_two_fields(:each_column,\n \"TABLE_ID\", table[\"ID\"],\n ...
7805d9e8d668426633a451e50e69461d
Gets the passcodeMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a passcode is required.
[ { "docid": "83434eb5bc958693c1760b69f66423a6", "score": "0.80373365", "text": "def passcode_minutes_of_inactivity_before_lock\n return @passcode_minutes_of_inactivity_before_lock\n end", "title": "" } ]
[ { "docid": "0b8f427cb1c2c64fd4a8cf3bda89f405", "score": "0.79715425", "text": "def passcode_minutes_of_inactivity_before_lock=(value)\n @passcode_minutes_of_inactivity_before_lock = value\n end", "title": "" }, { "docid": "e9e1aaf032861dc1ea0f80adfa92cc0f", "sco...
0b9401d4e08d061ca302492436c6d2c8
Delete an entry from the cache
[ { "docid": "68147293c715dd2905dc64ab0c818d2a", "score": "0.8207399", "text": "def delete(entry)\n deleted_index = @cache.delete(key_for(entry))\n if deleted_index\n @cache.each do |key, index|\n @cache[key] -= 1 if index > deleted_index\n end\n ...
[ { "docid": "427c0afe4f2a3b2f348a2a67b1dee5a9", "score": "0.8548668", "text": "def delete(entry)\n if index = @cache.delete(entry)\n entries.delete_at(index)\n end\n end", "title": "" }, { "docid": "747efa3dd8b884752262ff2600e3311e", "score": "0.7882938", "text": "...
61f738819ff3ea8fa42a7a194cb1e3d4
Returns true if a commit was successful
[ { "docid": "c642fd5a865b4b30d50afef3c32c55be", "score": "0.0", "text": "def success?\n @success\n end", "title": "" } ]
[ { "docid": "84ba5436d6e66edcbf3b152a4360ca6b", "score": "0.7772792", "text": "def commit!\n rsp = post(\"<commit/>\")\n success?(rsp.body) or log_error(rsp.body)\n end", "title": "" }, { "docid": "f4ea05c8c9cc73d39b7f02a72684c139", "score": "0.74023545", "text": "def git...
ea70d43774d10212bbeb9ee8f9b597cd
inbound here will be an instance of Mail::Part upon passing attachments to action mailer, things are assigned a content id (CID), as well as retaining their filename and we'll return the original filename based on what type of attachment this is
[ { "docid": "8287d702d600d5424cc786bbc44661f0", "score": "0.636745", "text": "def initialize (attachment, *rest)\n @path = ''\n if rest.detect {|opt| opt[:inline] }\n @original_filename = attachment.cid\n else\n @original_filename = attachment.filename\n end\n @cont...
[ { "docid": "a8a6a126cd454c6240e03dd8e2fd133f", "score": "0.71367484", "text": "def original_filename\n File.basename(attachment.path)\n end", "title": "" }, { "docid": "902501d1e7d46814294ba133a147b3a5", "score": "0.71009773", "text": "def part_filename(part)\n # This is how T...
a4d298c808acdcd3e55cfd19effee2e9
Returns the content of a spreadsheetcell. (1,1) is the upper left corner. (1,1), (1,'A'), ('A',1), ('a',1) all refers to the cell at the first line and first row.
[ { "docid": "9cc14b29c6ccf6d1d9e03f36749b897c", "score": "0.60385", "text": "def cell(row, col, sheet = nil)\n key = normalize(row, col)\n safe_send(sheet_for(sheet).cells[key], :value)\n end", "title": "" } ]
[ { "docid": "99344405f7a545be85866e63b8d1ee0e", "score": "0.70303756", "text": "def read_cell_content(row, idx)\n cell = row.at(idx)\n cell = row[idx] if row[idx].class == ::Spreadsheet::Link\n cell = cell.value if cell.class == ::Spreadsheet::Formula\n cell\n end", "title": ""...
ec769846feaeb2c3ec8f708dd5aeccf3
POST /discursos POST /discursos.json
[ { "docid": "80bc58e762c5977d7a21f5c36bdea474", "score": "0.627557", "text": "def create\n @discurso = Discurso.new(discurso_params)\n\n respond_to do |format|\n if @discurso.save\n format.html { redirect_to @discurso, notice: 'Discurso was successfully created.' }\n format.json ...
[ { "docid": "ddc8c5e2f667d3a2c7a632372ab3d987", "score": "0.61216795", "text": "def destroy\n @discurso.destroy\n respond_to do |format|\n format.html { redirect_to discursos_url, notice: 'Discurso was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "ti...
5311f327c39f8440dd4d75c6e3c392be
Fails unless +matcher+ =~ +obj+. source://minitest//lib/minitest/assertions.rb291
[ { "docid": "91b5a0d5e587d5779cc56807dda3c79e", "score": "0.7426445", "text": "def assert_match(matcher, obj, msg = T.unsafe(nil)); end", "title": "" } ]
[ { "docid": "f707ad541f16a00e81f4f2f6c6bd3a93", "score": "0.82603073", "text": "def refute_match matcher, obj, msg = nil\n msg = message(msg) {\"Expected #{mu_pp matcher} to not match #{mu_pp obj}\"}\n assert_respond_to matcher, :\"=~\"\n matcher = Regexp.new Regexp.escape matcher if Strin...
48c1064f37308ec75c316b492089be20
Takes board argument Uses won? to determine which player won(if at all)
[ { "docid": "cede3d53b8a7044b9609015dc0cc26e0", "score": "0.0", "text": "def winner(board)\n win_char = nil\n if won?(board).class == Array\n win_char = board[won?(board)[0]]\n end\n return win_char\nend", "title": "" } ]
[ { "docid": "660cbc061e4d354057fc0455e152a7fe", "score": "0.8287288", "text": "def winner(board)\n return who_won(board) if won?(board)\n end", "title": "" }, { "docid": "b68228a797acd7f159eb8b622ef3b15c", "score": "0.82771885", "text": "def winner\n board.position(won?[0]+1) i...
540bc5769e3fd8ed10ad6622ef2dc2b5
Display a prompt for our main menu
[ { "docid": "e5280f641b1f50bd01b92279e1998578", "score": "0.0", "text": "def main_prompt_options(curr_user)\n\tprompt = TTY::Prompt.new\n\toptions = [\n\t\t\t{\"Show all movies\" => -> do get_movie_list(curr_user) end},\n\t\t\t{\"Find Movies\" => -> do find_movie_api(curr_user) end},\n\t\t\t{\"Add movie ...
[ { "docid": "47fc900c9fa9e6182bdaad2b035c5090", "score": "0.8203777", "text": "def main_menu_prompt\n system 'clear'\n\n prompt = TTY::Prompt.new\n\n font = Figlet::Font.new('./fonts/isometric3.flf')\n\n figlet = Figlet::Typesetter.new(font)\n\n puts figlet['Chess!']\n puts\n\n promp...
e23a4086bcfd09e66f048a87639d5eee
will get post, get, etc.
[ { "docid": "b8d5ec9bfc935c08c89f17168ed1d3bf", "score": "0.0", "text": "def app # def app is something that Rack::Test is looking for, won't run without it\n FilmFile\n end", "title": "" } ]
[ { "docid": "9d4a27a7b2ed4d844162111f1a1729a5", "score": "0.79958016", "text": "def get; end", "title": "" }, { "docid": "9d4a27a7b2ed4d844162111f1a1729a5", "score": "0.79958016", "text": "def get; end", "title": "" }, { "docid": "9d4a27a7b2ed4d844162111f1a1729a5", "sc...
97611b390f47b223807b4ec1250bdd63
Lowerlevel function to build an openurl URL. used by other helpers, you shouldn't need to call this directly from application code.
[ { "docid": "edbeb486b0cf0c04a6712e2da2947648", "score": "0.70048726", "text": "def alma_build_openurl(query)\n query_defaults = {\n rfr_id: 'info:sid/primo.exlibrisgroup.com',\n }\n\n URI::HTTPS.build(\n host: alma_domain,\n path: \"/view/uresolver/#{alma_institut...
[ { "docid": "6e9e1ef2574ad16895a3c59aded68faa", "score": "0.73990494", "text": "def build_as_url\n URI(build_as_string)\n rescue Urb::InvalidUrl => e\n URI('/')\n end", "title": "" }, { "docid": "5dce7c299d519d945e49f6337d75bd6b", "score": "0.7305697", "text": "def bui...
d238dc9c3167fe5c237d4fc9500c5cca
Parse options, check arguments, then process the command
[ { "docid": "e8f660851a79b4606161c675feae1acb", "score": "0.7566804", "text": "def run\n\t\tif parsed_options? && arguments_valid?\n\t\t\toutput_options if @options[:verbose]\n\t\t\toutput_arguments if @options[:verbose]\n\t\t\tprocess_arguments\n\t\t\tprocess_command\n\t\telse\n\t\t\toutput_usage\n\t\te...
[ { "docid": "63a9de70cdbd85fd4d85b4013cc38171", "score": "0.8107569", "text": "def run\n if parsed_options? && arguments_valid? \n process_arguments \n process_command\n else\n output_options\n end\n end", "title": "" }, { "docid": "f14bedc57a0590d3853070e9...
b95bab85cc09aa9d164c4b34d68ca18b
c. i. Create a method to add a new student to the schools student array. ii. Then use it to add yourself to the school students array.
[ { "docid": "20583ac4a5370ab8109184c198763b64", "score": "0.0", "text": "def add_student(stdnt_name, grade, semester, stdnt_hashlist = STDNT_LIST)\n stdnt_hashlist << {:name => stdnt_name, :grade => grade, :semester => semester}\nend", "title": "" } ]
[ { "docid": "da23e26152c4d4c8b9c69a544566917c", "score": "0.7912626", "text": "def add_student(new_student, new_grade, new_semester, school_name)\n\tschool_name[:students].push({:name => new_student, :grade => new_grade, :semester => new_semester})\nend", "title": "" }, { "docid": "40d22cd46a...
341f7597a6912e9cdebf2d031d5a7369
Returns an array of fontsizes for implicit headings in the document
[ { "docid": "3480422ca8479ca4280dc5f4c9827fed", "score": "0.75215006", "text": "def font_sizes\n @font_sizes ||= begin\n sizes = []\n doc.css(\"[style]\").each do |element|\n sizes.push element.font_size.round(-1) unless element.font_size.nil?\n end\n sizes.uniq.sort\n en...
[ { "docid": "b124b8f91e93214167aaae32fc539c1c", "score": "0.75746334", "text": "def font_sizes\n @font_sizes ||= begin\n sizes = []\n @document.tree.css(\"[style]\").each do |element|\n sizes.push element.font_size.round(-1) unless element.font_size.nil?\n end\n ...
1de7b3ddcfad420bd8ea9957e2a9f913
Retrieve the total list of all transactions.
[ { "docid": "5a6d54ae04288bdc6e3f2277a947f127", "score": "0.0", "text": "def txns\n @txns.fetch\n end", "title": "" } ]
[ { "docid": "d5e73f9f3a9a059195d209639d037a36", "score": "0.7484813", "text": "def total_transactions\n return self.transactions.count\n end", "title": "" }, { "docid": "d1806a800cbb5180c1bf4041f8a18f48", "score": "0.7345167", "text": "def all_transactions\n json_respon...
01d56145b1d0c0f2a4585cb6ce19caca
extract the result. it's a private method because it's not publicfacing, and nobody knows that it exists but this object. for the sake of good habits, stick to the ruby style guide we don't like to camelCase things here. we snake_case.
[ { "docid": "4fead16f52a4e45a15562ec8a31ef8bf", "score": "0.6038788", "text": "def extract_result(response)\n full_response = response.to_h #returns full response in form of hash\n author = full_response.dig(\"ItemLookupResponse\",\"Items\",\"Item\",\"ItemAttributes\",\"Author\")\n title = full_...
[ { "docid": "c05c67e68424b68ea7ffceaf63627d3a", "score": "0.65056", "text": "def result\n attributes.fetch(:result)\n end", "title": "" }, { "docid": "80b9e9a52e6c70db0a49eda1d535b617", "score": "0.64418966", "text": "def process_result(result)\n if method_name =~ /...
924e208d05bb2b3e16bea8491e934bc2
calculate order arrival time (low limit)
[ { "docid": "c35a55bdecd4b9797b535bea08fa1809", "score": "0.6931959", "text": "def order_arrive_from(order)\n m = Setting::get('Order arrive since')\n if m == ''\n m = 35\n else\n m = m.to_i\n end\n order.updated_at + m.minutes\n end", "title": "" } ]
[ { "docid": "5a1b0458d3506271e890bbc14cf64b86", "score": "0.6800641", "text": "def order_arrive_to(order)\n m = Setting::get('Order arrive before')\n if m == ''\n m = 55\n else\n m = m.to_i\n end\n order.updated_at + 55.minutes\n end", "title": "" }, { "docid": "0ef7...
693b42229934adaf86788ad1003333e8
All the squares that the piece can capture.
[ { "docid": "10b7ee3c5f6495f7ef29198423f48463", "score": "0.7116941", "text": "def capture_squares(square, game_state)\n potential_capture_squares(square, game_state).occupied_by_opponent(player_number)\n end", "title": "" } ]
[ { "docid": "449bb36de0704f09d0cd47005aed705c", "score": "0.69281346", "text": "def threatening_squares(color)\n squares = []\n find_pieces(color).each do |piece|\n squares += piece.squares_threatening\n end\n squares\n end", "title": "" }, { "docid": "205af572c5b21d14e203e5...
b5ff425c9940ea8b3d8bf2a1374a92e9
Called successively to dig for the filter (Array or Participant).
[ { "docid": "9e3299d9fd6d213e2a555171efa747be", "score": "0.53490025", "text": "def narrow_filter(fi, workitem)\n\n if fi.is_a?(Array) or fi.respond_to?(:consume) or fi.respond_to?(:filter)\n\n fi\n\n elsif fi.is_a?(Hash)\n\n workitem ? fi['out'] || fi['reply'] : fi['in'] || fi['a...
[ { "docid": "a6c5cf8a0bd910af463f8a2258f5b731", "score": "0.65687084", "text": "def filter\n end", "title": "" }, { "docid": "08ecfc5d5251841112a950c6a2dcc756", "score": "0.6523126", "text": "def filter; end", "title": "" }, { "docid": "08ecfc5d5251841112a950c6a2dcc756"...
546dc25ea553e521b67199bbf775dab6
count_down(num) string iteration loop str = "jumpstart is fun!" i = 0 index variable while i < str.length if str[i] == 't' i += 1 next end p str[i] i += 1 end
[ { "docid": "268de6877fe9313a28f2268f12835db6", "score": "0.0", "text": "def count_a(str)\n count = 0\n i = 0\n while i < str.length\n if str[i].downcase == 'a'\n count += 1 # HEY! I found one, add it to my count.\n end\n i += 1 # move to next char in string\n end\n return count\nend",...
[ { "docid": "fb2a1b3b6be7d4845de0e51a19c93cbf", "score": "0.66555876", "text": "def example(str)\n i = 3\n loop do\n puts str\n i -= 1\n break if i == 0\n end\nend", "title": "" }, { "docid": "96ad10bb1c21ae2657949ff4d3e6fe0b", "score": "0.6456969", "text": "def number_cou...
96785e663ee230b745bc4d1186f86a67
load_and_authorize_resource :comment, :through => :issue
[ { "docid": "5deee3e3cb88f35a03a010a0bb832b2f", "score": "0.5555236", "text": "def create\n # no longer needed, since authorization via CanCan loads these resources\n # @project = Project.find(params[:project_id])\n # @issue = Issue.find(params[:issue_id])\n # @comment = Comment.new\n\n @p...
[ { "docid": "ad0ddad6c488f8300848269c89cf8969", "score": "0.6955794", "text": "def set_and_authorize_comment\n @comment = Comment.find(params[:id])\n authorize @comment\n end", "title": "" }, { "docid": "bb9976a3faf573fbdc478db052651777", "score": "0.6724303", "text": "def find...
f7722a5e5dea3536d4c36cff0d3a4e00
:player_two, :player_one, :round_num, :max_rounds, :record :breaker, :player_hash
[ { "docid": "9dc13489ccb7537592c1ef9291218106", "score": "0.0", "text": "def initialize\n\t\t\tputs \"Welcome to your new game of Mastermind.\"\n#\t\t\t@game_name = self.name\n##\t\t\twho_is_playing\n##\t\t\t@round_num = 0\n##\t\t\t@max_rounds = 12\n##\t\t\t@record = Hash.new\n###\t\t\tgame_play\n\t\t\te...
[ { "docid": "1f83584f5ff4fdeec10d63d36da756b7", "score": "0.6978143", "text": "def player_hash; end", "title": "" }, { "docid": "6100ffc9fe1153eef44bba957f388403", "score": "0.66634595", "text": "def player_info(player_hash, numbers, shoes, point, rebound, assist, steal, block, slam_d...
26192092bc99cde5baf969cb2697708b
Subject can be set in your I18n file at config/locales/en.yml with the following lookup: en.user_mailer.password_reset.subject
[ { "docid": "ffcf994f332b9ce8260b481fc8b9dfb4", "score": "0.62745494", "text": "def password_reset(user)\n @user = user\n mail to: user.email, subject: \"Password reset\"\n end", "title": "" } ]
[ { "docid": "ea740e704e8f1173fb87b45dfcaaf989", "score": "0.73718417", "text": "def subject_for(key)\n I18n.t(:subject, scope: [:mailer, key])\n end", "title": "" }, { "docid": "542885bb44aabef24a05ce9d9749449c", "score": "0.7290297", "text": "def subject_for(key)\n I18n.t(...
5d67520d73c3645a257566037bf9baa8
PATCH/PUT /visas/1 PATCH/PUT /visas/1.json
[ { "docid": "507817874092513424a6de141eaf1e57", "score": "0.6776993", "text": "def update\n\t\trespond_to do |format|\n\t\t\tif @visa.update(visa_params)\n\t\t\t\tformat.html { redirect_to @visa, notice: 'Visa was successfully updated.' }\n\t\t\t\tformat.json { render :show, status: :ok, location: @visa ...
[ { "docid": "b366c0180546e8e04ef65fb400f9b24e", "score": "0.68434507", "text": "def update\n respond_to do |format|\n if @my_visa.update(my_visa_params)\n format.html { redirect_to @my_visa, notice: 'My visa was successfully updated.' }\n format.json { render :show, status: :ok, loc...
af630984682f1a0b5a68e6092af0d102
Update properties of this object
[ { "docid": "c2cc24e132f5981d111d38ad7c39e09c", "score": "0.0", "text": "def update!(**args)\n @end_time = args[:end_time] if args.key?(:end_time)\n @start_time = args[:start_time] if args.key?(:start_time)\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...
9b1d3865a8a81799b2b97abd53054089
def coinciden_preguntas_dinosaurio? errores = 0 preguntas.each do |pregunta| errores += 1 unless dinosaurio.id == pregunta.dinosaurio_id end errores == 0 end
[ { "docid": "c3687bc5ecfeb814c3a22183f1007353", "score": "0.532589", "text": "def cargar_resultados\n preguntas.each do |pregunta|\n pregunta.respuestas.each do |respuesta|\n # resultados = ResultadoPregunta.where(recorrido: recorrido.id, pregunta: pregunta, respuesta: respuesta).count\n ...
[ { "docid": "3521c8c03c824a92019cc037dad60b08", "score": "0.6599447", "text": "def tem_naipe_da_rodada_ou_trunfo?\n return true if primeiro_jogador?\n @cartas.each do |carta|\n naipe = carta.naipe\n if naipe == naipe_da_rodada or naipe == naipe_do_trunfo\n return true\n end\n ...
3336bc4f030acfdd5c958bcfc30abf93
open requests, obtain lock on file
[ { "docid": "60a117a3a89010ae8bfcff82da5a59f4", "score": "0.7386252", "text": "def open_request(client, filename)\n # obtain lock\n lock_request = \"LOCK:#{filename}\"\n @lockServer.puts lock_request\n answer = @lockServer.gets\n # if lock obtained\n if(answer.include?('OK'))\n put...
[ { "docid": "a3a5bc30d92c2b0e3493d8f4905a4c96", "score": "0.6318328", "text": "def retrieve_messages\n if FileTest::file? request_file and not is_locked? request_file\n\n lock_file request_file\n\n requests = File.read(request_file).split(\"\\n\")\n requests.each do |req...
2931360b15d15e069c3424d6af50d21d
sprawdzenie uprawnien do edytowania wybranego elementu
[ { "docid": "b54294ed153ab7bc6ead48b13c5ac276", "score": "0.0", "text": "def can_edit?(page)\n role = Hash.new(false)\n role.merge! @project.user_role(current_user.id).attributes\n role[page]\n end", "title": "" } ]
[ { "docid": "bc34515c98b9c5fffa929cb373185091", "score": "0.578431", "text": "def elemento\n \n @elemento\n end", "title": "" }, { "docid": "5edd04cbe34ec8be51d31ead45354020", "score": "0.5474519", "text": "def element=(element); end", "title": "" }, { "do...
21cadf493d520f5a0d12e0a461b3d5f2
Instantiates a new node. The value is optional so that a new tree containing no value can be instantiated.
[ { "docid": "a6c9e535532cb74e937a8768504f8c86", "score": "0.7104193", "text": "def initialize(value, hash_value = nil)\n store_in_self(value, hash_value) if value\n @left = EmptyNode.new\n @right = EmptyNode.new\n end", "title": "" } ]
[ { "docid": "f8f8f1086aa1281ac194a4b3360349ef", "score": "0.8532878", "text": "def create_node(value)\n node = Node.new(value)\n end", "title": "" }, { "docid": "c33a14f54100eb001255b7108f719fc8", "score": "0.8462501", "text": "def create_node(value)\n Node.new(value)\n en...
44c7678e4e2984a7f7eb9e6e8769a811
Using pop with args
[ { "docid": "b65e71e160af61e95d8eb75063fd828e", "score": "0.8010758", "text": "def pop_with_args(array)\n array.pop(2)\nend", "title": "" } ]
[ { "docid": "197b702bd61b173791346c8404660bfa", "score": "0.8469104", "text": "def pop(*args)\n #This is a stub, used for indexing\n end", "title": "" }, { "docid": "197b702bd61b173791346c8404660bfa", "score": "0.8469104", "text": "def pop(*args)\n #This is a stub, us...
6b0a8cf0339054812ec49a5a76da53e3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Gain Rank Dropping Item ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ { "docid": "ab922531ad36176f3267a5c2f1099f01", "score": "0.75761396", "text": "def gain_rankdrop_item(item, *args, &block)\n # Select which rank to drop, depending on percentile.\n d = rand(100)\n count = 0\n for i in 0...item.maidr_dropping_ranks.size\n drop = item.maidr_dropping_ranks...
[ { "docid": "65d44c6f0c48a0dec1bb0dbee796272a", "score": "0.7318924", "text": "def lose_item(item_id, n)\n # Reverse the numerical value and call it gain_item\n gain_item(item_id, -n)\n end", "title": "" }, { "docid": "65d44c6f0c48a0dec1bb0dbee796272a", "score": "0.7318924", "t...
c80b069811e09d5adc8f22a4bd535cf2
DELETE /relassignproperties/1 DELETE /relassignproperties/1.json
[ { "docid": "a54dcde049a33ea7074edbd1213caea4", "score": "0.737042", "text": "def destroy\n @relassignproperty.destroy\n respond_to do |format|\n format.html { redirect_to relassignproperties_url, notice: 'Relassignproperty was successfully destroyed.' }\n format.json { head :no_content }...
[ { "docid": "b550937bba6022cce6950db1251e3677", "score": "0.6660355", "text": "def remove_all_properties\n \n begin\n \n if(@filename == '')\n raise('PDF file name not specified.')\n end \n \n ...
b293e8f7efea1d34c8183d2f29a3e9b9
Marks current profile as active and saves it
[ { "docid": "d026f7acabaa355ae01f9b471cbd30b5", "score": "0.85893434", "text": "def set_profile_active_and_save!\n self.status = 'active'\n self.save\n end", "title": "" } ]
[ { "docid": "f8ffb5c2fc890dcfcaccf5fb4b9c09d3", "score": "0.77442753", "text": "def activate\n @activated = true\n update_attributes({:activated_at => Time.now.utc, :activation_code => nil})\n save!\n \n profile.active = true\n profile.save!\n end", "title": "" }, { "docid"...
be68bd21ecd991d246d897d7dc360e78
divide num1 by num2, and return the result as a string with properly formatted commas and 4 significant digits after the decimal place. For example: if num1 is 123456789 and num2 is 10000 the output should be "12,345.6789". The output must contain a number in the one's place even if it is a zero.
[ { "docid": "ba298fb6040e1f28ba39bd935e6053bf", "score": "0.64269704", "text": "def formatted_division(num1, num2)\r\n\r\nend", "title": "" } ]
[ { "docid": "0f2adc94f3928baccf9a05b11f3cfd11", "score": "0.78775054", "text": "def FormattedDivision(num1, num2)\n\n\tdiv \t=\tnum1.to_f\t/\tnum2.to_f\n\tmils\t=\tdiv.to_i\t/ \t1000000\n\tthous\t=\tdiv.to_i\t% \t1000000\t\t/ \t1000\n\trest\t=\tdiv \t\t% \t1000\n\tdiv \t= \tdiv.round(4)\n\trest\t= \tres...
07f569d1c88cec53b3ebddacfd382ce0
Retuns the number of votes cast by user
[ { "docid": "4291780f121afaf527562ecb0a3270dd", "score": "0.0", "text": "def vote_count(period = [0, 1.days_in_seconds])\n time_1 = Time.now - period[1]\n time_2 = Time.now - period[0]\n\n self.votes.where(:updated_at.lte => time_2).and(:updated_at.gte => time_1).count\n end"...
[ { "docid": "74e3b6563bfba17053cc95454f8bff34", "score": "0.7849058", "text": "def votes_cast_count\n total_votes\n end", "title": "" }, { "docid": "edbc2556b57d94b32f86fce229239225", "score": "0.7076031", "text": "def vote_count\n votes.sum('direction')\n end", "title": "...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "0f6c54c403912904d50ff60e3f68da0c", "score": "0.0", "text": "def wine_params\n params.require(:wine).permit(:name, :price_retail, :appellation_id, :varietal_id)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.7496024", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "13a61145b00345517e33319a34f7d385", "score": "0.69581187", "text": "def strong_params\n params.require(:request).permit(param_whit...
c0ca9527f76038cbc1e6ed931434c50b
Parses the result files and sends data back to the GUI. Args: result_files: A hash of test file name => result file pairs. coverage_required: A boolean value specifying if coverage is required.
[ { "docid": "9a7d9ba400bead4f21faff6b5494084b", "score": "0.7781764", "text": "def display_results(result_files, coverage_required)\n total_pass = 0\n total_warn = 0\n total_fail = 0\n total_small = 0\n total_medium = 0\n total_large = 0\n\n result_files.each_pair do |test_file, resu...
[ { "docid": "26aeb207a6bd3e186b41a4885a575e7f", "score": "0.6202468", "text": "def run_tests(test_list_str, results_path)\n # Load each test case file\n test_case_paths = test_list_str.split(',')\n test_case_paths.each { |path| load path.strip }\n\n result_files = {}\n\n # Go through each ...
050ec2a17038140cdf46580c2df45b2a
Sets the current menu item
[ { "docid": "e76b4ac35164ec0ff2bf3937c5b0244d", "score": "0.7174713", "text": "def select_menu(menu_item)\n session[:active_menu] = menu_item\n end", "title": "" } ]
[ { "docid": "196f9c8189c87d45016aab241ecdfc3c", "score": "0.75892395", "text": "def setCurrentItem(menuitem, submenuitem)\n @current_title = CDK::MENU.wrapped(menuitem, @menu_items)\n @current_subtitle = CDK::MENU.wrapped(\n submenuitem, @subsize[@current_title])\n end", "title"...
81dcc73bf6a3069df3731fd92a44b8e8
GET /shop_items GET /shop_items.json
[ { "docid": "93cc1e83d42b2deac5f0662799dc146d", "score": "0.8036444", "text": "def index\n @shop_items = ShopItem.all\n render json: @shop_items\n end", "title": "" } ]
[ { "docid": "37d0768281530126496eb6cdf4478e67", "score": "0.74551976", "text": "def index\n @shop_items = ShopItem.all\n end", "title": "" }, { "docid": "5ea9f992167250e15e0a540ff50b1a00", "score": "0.74517024", "text": "def shop_item (shop_id, item_id, params={})\r\n url = a...
117ddbd3ca71203c7bade3a068267a57
fundion EjecutarMixed: esta funcion esta encargada de ejecutar utilizando como funcion aptitud una mezcla entre pasar las mas variables y las mejores Nosostros lo que haremos es escoger los mejores cromosomas, y de esos escoger los mas variables por el metodo de las aptitudes repetidas
[ { "docid": "678e8df01262a1b4c5290d764bea4e3b", "score": "0.6431881", "text": "def EjecutarMixed(mejores,mutacion)\n\t\tcandidato = nil\n\t\ti = 0\n\t\thayCandidato = false\n\t\t\n\t\twhile hayCandidato == false do\n\t\n\t\t##Se muta todos los cormosomas\n\t\t#realizar mutación\n\t\t\tself.each_with_in...
[ { "docid": "85d7a5182fc521dddc6f1b7c11ed65cb", "score": "0.6618581", "text": "def nombre_metodo argumentos,variables\n #Sentencias a ejecutar\nend", "title": "" }, { "docid": "4a05ebcf33b4fd8fd16c626ede99a68a", "score": "0.5287382", "text": "def inicializar\n categoria = gets.to...