query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
82e3c1bf32bf8ae98f4c8e4a0cae2278 | Returns the url for this bucket. | [
{
"docid": "2109c51545f0bd03ed2bd5cc2271b2c7",
"score": "0.81028503",
"text": "def url\n if client.dns_compatible_bucket_name?(name)\n \"http://#{name}.s3.amazonaws.com/\"\n else\n \"http://s3.amazonaws.com/#{name}/\"\n end\n end",
"title": ""
}
] | [
{
"docid": "cb6aa34b2afc2a83cdfee6f6e5168e47",
"score": "0.8346097",
"text": "def url\n segments = [ @bucket.client.prefix, escape(@bucket.name)]\n segments << escape(@key) if @key\n @bucket.client.http.path(*segments).to_s\n end",
"title": ""
},
{
"docid": "bda33fe49551d4f... |
cd4de615f7fd0872a210853135e9783a | 53:1: atom returns [val] : ( NUMBER | SYMBOL | TRUE | FALSE | NIL | STRING ); | [
{
"docid": "d8c6e0cedb97996ca40a4fd264fea80a",
"score": "0.7385498",
"text": "def atom()\n \t _retval_val = nil \n \t_NUMBER4 = nil\n \t_SYMBOL5 = nil\n \t_STRING6 = nil\n\n\n\n\n # 54:2: ( NUMBER | SYMBOL | TRUE | FALSE | NIL | STRING )\n alt3 = 6\n # 53:1: atom returns... | [
{
"docid": "a7d8ff08ff40eb457c7beb881ceb7345",
"score": "0.69889975",
"text": "def parse_atom\n tok = @tokenizer.token\n if tok.is_identifier?\n return AST::Identifier.new(tok)\n elsif tok.is_number?\n return AST::Number.... |
78487d8fdcf25fa04571e46299070b2a | determines if highcards are needed which cards should be in the winning hand called in called in get_hand | [
{
"docid": "959d0174287ba4d9aaef0ec5eed69add",
"score": "0.0",
"text": "def determine_high_card hsh,num\n arr = []\n num1 = 2\n\n hsh.each_value {|card| arr << card}\n arr.flatten!\n arr.sort! {|x,y| y.number <=> x.number}\n while arr.length > num\n a... | [
{
"docid": "f744add1830cdf2ae92e4d3398bd2b8f",
"score": "0.7553122",
"text": "def shouldHit\n # If 17 or above, lock the hand so it cannot receive any more cards\n \tif @hands[0].checkHand > 16 or @hands[0].checkHand < 0\n \t @hands[0].lock\n \tend\n \t@hands[0].canGetCards\n end",
"title":... |
fcd56760745e8b9c14017e5ee84e6667 | PUT /costs/1 PUT /costs/1.xml | [
{
"docid": "b1bd6f7ba194cdd14ecbfb5cd0c1b1b7",
"score": "0.6591407",
"text": "def update\n @cost = Cost.find(params[:id])\n\n respond_to do |format|\n if @cost.update_attributes(params[:cost])\n format.html { redirect_to(@cost, :notice => 'Cost was successfully updated.') }\n fo... | [
{
"docid": "c2c0b673628fdc28b181d18c0afd2d5b",
"score": "0.6198418",
"text": "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post 'update', opts\n end",
"title": ""
},
{
"docid": "580c1a9ce11e5f994ead341d0245fe0a",
"score": "0.616... |
68fff95d04e1b60ead66f64545b71e31 | Returns mobile_talk url (mobile) | [
{
"docid": "77d3ee6d93eaa5a0eacfddb886749815",
"score": "0.865422",
"text": "def url_mobile_talk\n\t\t\t@data[\"content_urls\"][\"mobile\"][\"talk\"]\n\t\tend",
"title": ""
}
] | [
{
"docid": "6a0b9bb72fc834da53a0570de8701895",
"score": "0.7899114",
"text": "def mobile_url\r\n infoxml = get_info\r\n return infoxml.at('mobileurl').inner_text\r\n end",
"title": ""
},
{
"docid": "a27f39ad38df3d623f48062195c3c0c7",
"score": "0.7478462",
"text": "def mo... |
c7fd62823edee51666964a72654aac01 | Check that no monkeys are added if not necessary | [
{
"docid": "f85e136926af72bfe760669b292ca877",
"score": "0.5576218",
"text": "def test_add_more_monkeys_not_necessary\n ml = MonkeyList::new 100\n orig_count = ml.monkeys.count\n ml.add_more_monkeys_if_necessary 5\n new_count = ml.monkeys.count\n assert_equal orig_count, new_count\n end"... | [
{
"docid": "16c45865251d582a1b641e5c9523a6f8",
"score": "0.6197416",
"text": "def no_monkey\n if title.present? && title.downcase.include?(\"monkey\")\n errors.add(:title, \"No monkeys please!\")\n end\n end",
"title": ""
},
{
"docid": "16c45865251d582a1b641e5c9523a6f8",
"sco... |
6137d4b9dec3a5b7bea0625f536d9289 | Write a program which takes a number and prints "Valid" if the number is between 1 and 10 (inclusive) and "Invalid" otherwise. | [
{
"docid": "deb9fd310a0f8165272aa2339d579f9a",
"score": "0.84838474",
"text": "def num_checker\n number = gets.to_i\n if number.between?(1, 10)\n puts \"valid\"\n else\n puts \"invalid\"\n end\nend",
"title": ""
}
] | [
{
"docid": "ace0ae283cba23f9eb5ad72083fea1e4",
"score": "0.88335425",
"text": "def isValid(num)\n if num >= 1 && num <= 10\n puts \"Valid\"\n else\n puts \"Invalid\"\n end\nend",
"title": ""
},
{
"docid": "4ba8d84c58e0129793325516e45847fc",
"score": "0.87151814",
... |
24685bc2680ee8e98253b57f67efeac1 | Perform any changes to the string that need to happen before it is rendered to the canvas. Returns an array of subset "chunks", where each chunk is an array of two elements. The first element is the font subset number, and the second is either a string or an array (for kerned text). For Adobe fonts, there is only ever ... | [
{
"docid": "e9273592ce24df53f74b71f53f74d0e0",
"score": "0.5655166",
"text": "def encode_text(text, options = {})\n [[0, options[:kerning] ? kern(text) : text]]\n end",
"title": ""
}
] | [
{
"docid": "80402878ffb02f4cc80cf928327f0dd4",
"score": "0.5524111",
"text": "def chunk text\n\t\t\t@chunks ||= []\n\t\t\t@chunks << text\n\t\tend",
"title": ""
},
{
"docid": "fee247c18f96ab4855ed6aaf265e8b14",
"score": "0.54535335",
"text": "def splitText text\n res = Array.new... |
ca6628fb3bdfac339e0b6a205296f102 | PUT /articles/1 PUT /articles/1.json | [
{
"docid": "beff7c6519460be43e7497b3b36c7e5d",
"score": "0.0",
"text": "def update\n @article = Article.find(params[:id])\n params[:article][:image] = nil if params[:delete_image?]\n\n respond_to do |format|\n if @article.update_attributes(params[:article])\n format.html { redirect_... | [
{
"docid": "127193a9b695d95bf6538bf269cb1be9",
"score": "0.7546864",
"text": "def update\n article = Article.find(params[:id])\n article.update(article_params)\n render json: { article: article }\n end",
"title": ""
},
{
"docid": "b9fefa1ab0f08e5efdb3775b6bf7e045",
"score": "0.... |
550f29245660a8619f2ec05eb3dae494 | Get Latest Mined Zilliqa Block Through this endpoint users can obtain information on the latest block that has been mined on the Zilliqa blockchain. Data could include the current and previous block hashes, transaction count, and more. | [
{
"docid": "7e8f4b0eb5918552f92203e66aa83438",
"score": "0.72400415",
"text": "def get_latest_mined_zilliqa_block(network, opts = {})\n data, _status_code, _headers = get_latest_mined_zilliqa_block_with_http_info(network, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "30636e8cbefe086b1ce5d5d9a9ec8f28",
"score": "0.8032725",
"text": "def get_latest_block\n @conn.get(\"/#{API_VERSION}/#{block_chain}/blocks/latest\")\n end",
"title": ""
},
{
"docid": "0d76417da903c7446cb4937583ba6e2b",
"score": "0.7795902",
"text": "def latestBloc... |
19bfe25021e18c127189b174309b8963 | Alias method : update movement | [
{
"docid": "3e055a138ad8114fcb5f854c5053ecc6",
"score": "0.7651783",
"text": "def update_move\n update_last_coordinate\n super\n move_animation(diff_x, diff_y)\n end",
"title": ""
}
] | [
{
"docid": "38407c9a88fe9a155059c0d1797a29de",
"score": "0.83938885",
"text": "def update_movement\n raise 'Not implemented!'\n end",
"title": ""
},
{
"docid": "ea0b7232f59f3d4bd2a9723cfd5630d9",
"score": "0.81066114",
"text": "def update()\n self.move()\n end",
"title": ... |
9e6179fe710a4fc1ef49c0626efe6c04 | 5.4.8.2. "derivedContent" Insertion (without Content) | [
{
"docid": "24d7beb3a41367ba5d0f40dfad16a3ef",
"score": "0.0",
"text": "def xref_check(xml)\n ret = []\n xml.xpath(\"//xref | //relref\").each do |x|\n t = xml.at(\".//*[@anchor = '#{x['target']}']\") ||\n xml.at(\".//*[@pn = '#{x['target']}']\") or\n ret << ... | [
{
"docid": "8f41924c0452e91ddda21b586103112b",
"score": "0.6307309",
"text": "def insert; end",
"title": ""
},
{
"docid": "28b3939e16d42af6c2396eff16061691",
"score": "0.6168624",
"text": "def add_item_with_content(content,insert_position=nil)\n # aggregates = get_values('aggr... |
4e73334b9e07b0449502dea44dac6be5 | GET /keiyakus GET /keiyakus.json | [
{
"docid": "addc27d44d9dbc56da73da2c80ffd985",
"score": "0.6359866",
"text": "def index\n #@keiyakus = Keiyaku.all\n @keiyakus = Keiyaku.page(params[:page]).per(100).order(:id)\n end",
"title": ""
}
] | [
{
"docid": "80ec9eadb45ee74efe3b6b240ef28fa2",
"score": "0.6772167",
"text": "def index\n @kraje = Kraj.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @kraje }\n end\n end",
"title": ""
},
{
"docid": "e7454af3ccf112ad0d077e4a48d... |
9e25d4440ab1999386d911d16791a823 | The deserialization information for the current model | [
{
"docid": "9be485ff6f1727e8e8f32d4fd4c5cfe9",
"score": "0.0",
"text": "def get_field_deserializers()\n return super.merge({\n \"metricDevices\" => lambda {|n| @metric_devices = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::UserExperienceAnalyti... | [
{
"docid": "8c867fd2c80799d10790d2085d14eba7",
"score": "0.6510734",
"text": "def deserialized\n @deserialized ||= @serializer.deserialize @serialized_object\n end",
"title": ""
},
{
"docid": "be6df54ff4d9ca8c6dd1eaa5e0a0615d",
"score": "0.63224316",
"text": "def get_fiel... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "46c37ad96d3b7cfaf865d9abc7affb75",
"score": "0.0",
"text": "def matiere_params\n params[:matiere][:ecole_id] = ecole.id if ecole?\n params.require(:matiere).permit(:libelle, :ecole_id, :user_id)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
8a7f388a54c6faf99941d3679a2b305b | Instructs a worker to start its process | [
{
"docid": "924c42f5d681a7f3f6a8fd8c24bb7de1",
"score": "0.7657063",
"text": "def start!\n process.start\n end",
"title": ""
}
] | [
{
"docid": "73e5f3ff80734259e9c4e87bcf07a164",
"score": "0.8068249",
"text": "def starting(worker)\n end",
"title": ""
},
{
"docid": "7c5a8b51b3d16cd494ee774a9b843879",
"score": "0.7756289",
"text": "def start\n @worker.start\n end",
"title": ""
},
{
"d... |
71927b73576182e633f64f9d7d6b994a | arr = [0, 1, 5, 7] p a = bad_two_sum?(arr, 6) => should be true p b = bad_two_sum?(arr, 10) time complexity = n^2 | [
{
"docid": "71dca17dd09c630805bb784d39872e31",
"score": "0.79943925",
"text": "def okay_two_sum?(array, target)\n i = 0\n j = array.length - 1\n while i < j\n case array[i] + array[j] <=> target_sum\n when 0\n return true\n when 1\n j -= 1\n when -1\n i += 1\n end\n end... | [
{
"docid": "fb936a26f7f0c2c4f880611976ad590d",
"score": "0.87907755",
"text": "def bad_two_sum?(arr, target_sum)\n\n arr.each_with_index do |el1, i1|\n arr.each_with_index do |el2, i2|\n return true if ((i2 > i1) && (el1 + el2 == target_sum)) #time complexity = n^2\n end... |
4f046397a157b7e20b2b7969e467d1f2 | Looks if there is local variable var_name assignment between the nodes | [
{
"docid": "f7f9b6210cd230a4e49bb09465dffeb5",
"score": "0.81721437",
"text": "def real_local_variable?(nodes, var_name)\n for node in nodes\n if node.is_a? AssignLocalVarNode and var_name == node.name\n # Standard local variables created by an assignment\n return true\n elsif... | [
{
"docid": "8e2eb895bb8d49da3df00a43668a5e2b",
"score": "0.7493908",
"text": "def local_variable?(var_name, search_parent_defs:false)\n\n # _result is never standard local variable\n if var_name == '_result'\n return false\n end\n\n if real_local_variable? children, var_name\n retu... |
eb3677424e0d2acee1ef8ddc7e1af0e3 | DELETE /bugs/1 or /bugs/1.json | [
{
"docid": "99125f997ba521eae7ebeaf6c2404ad9",
"score": "0.7051096",
"text": "def destroy\n @bug.destroy\n respond_to do |format|\n format.html { redirect_to project_path(@project), notice: \"Bug was successfully destroyed.\" }\n format.json { head :no_content }\n end\n end",
"ti... | [
{
"docid": "832c417bb5cfcd55f6722867bd4c8e0a",
"score": "0.745174",
"text": "def destroy\n @bug = Bug.find(params[:id])\n @bug.destroy\n\n respond_to do |format|\n format.html { redirect_to bugs_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"d... |
8614b9ed720342af8a5bcb72b05e9d1b | originally lifted from knifecloud/lib/chef/knife/cloud/fog/service.rb | [
{
"docid": "bcdf5b5f882c952779e612c463bc2265",
"score": "0.0",
"text": "def create_server(options = {})\n begin\n add_custom_attributes(options[:server_def])\n server = connection.servers.create(options[:server_def])\n\n print \"\\nWaiting For Server\"\n ... | [
{
"docid": "f5287cb0c45824170fac9b9b9737891f",
"score": "0.69729495",
"text": "def create_service(resource, actions)\n service_name = get_service_name()\n\n case resource.service_type\n when \"upstart\"\n service service_name do\n provider Chef::Provider::Service::Upstart\n ... |
3a1ea11e3767d68aa05ad2c2a38496d7 | Initialize a new instance of this Resource using the provided values | [
{
"docid": "4fa5f13aeb11bd11fdea9272f2589ffd",
"score": "0.0",
"text": "def initialize(attributes = {}) # :nodoc:\n @saved = false\n self.attributes = attributes\n end",
"title": ""
}
] | [
{
"docid": "ba6b3b200572a62a011eb39f6face8be",
"score": "0.7375597",
"text": "def initialize_resource attributes={}\n resource_class.new(attributes.update(known_attributes)).tap do |resource|\n resource.prefix_options = query_params\n end\n end",
"title": ""
},
{
... |
aaaae53c5b59b74c0f0f794e5df2e2c1 | Scan the model with | [
{
"docid": "bcad69a097d277637425d7bbfa122f29",
"score": "0.71744156",
"text": "def scan_model(criteria = nil)\n # binding.break\n criteria ||= create_scanner(:nullscanner)\n scan_result = ole_run_scan(criteria)\n return [] unless scan_result\n # binding.break\n scan_en... | [
{
"docid": "3f5653f2e949212863f8963848cf933a",
"score": "0.73399574",
"text": "def scan(criteria = nil,model = nil)\n model = model || active_model_reference\n model.scan(criteria)\n end",
"title": ""
},
{
"docid": "3987b9c61d100798744d5f83e2901348",
"score": "0.69402903",... |
850c75dabb56d362d070daea946b3799 | DEFAULT_CHECKSUM_TYPE defined in config/initializers/hyhull.rb | [
{
"docid": "deb9946ffe2bdc39542090aff43b04ab",
"score": "0.0",
"text": "def add_file_content(file_data)\n begin \n if file_data\n #Array() will return file_data in array if not already in one..\n file_data = Array(file_data)\n new_asset_datastreams = []\n file_da... | [
{
"docid": "58c48484556c9e9a8e89d973bdff228a",
"score": "0.6980391",
"text": "def checksum_type\n CHECKSUM_TYPES.detect { |type| instance_variable_defined?(\"@#{type}\") }\n end",
"title": ""
},
{
"docid": "e64a02de5072eb257871d676f727466b",
"score": "0.61908484",
"text": "def ig... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "acb68061ad732650a5553912dfc66076",
"score": "0.0",
"text": "def transfer_params\n attributes = [\"account_number_from\",\n \"account_number_to\",\n \"amount_pennies\",\n \"country_code_from\",\n \"country_code_to\",\n ... | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.7121987",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "b32229655ba2c32ebe754084ef912a1a",
"score": "0.70541996",
"text": "def expected_permitted_parameter_names; end",
"title": "... |
a626a12faff7837f4d61d1299a4713fe | POST /components POST /components.json | [
{
"docid": "d0d8b9b70b5ce37bc457fb26611e047f",
"score": "0.6784777",
"text": "def create\n @component = Component.new(params[:component])\n\n respond_to do |format|\n if @component.save\n format.html { redirect_to @component, notice: 'Component was successfully created.' }\n ... | [
{
"docid": "9d2eaec94ef9bbab04f3c90b052bc427",
"score": "0.6949398",
"text": "def create\n @component = Component.new(component_params)\n\n respond_to do |format|\n if @component.save\n format.html { redirect_to @component, notice: \"Component was successfully created.\" }\n for... |
aa771006ca012798cee66e051ca10c2e | Returns a string of the tags for a user | [
{
"docid": "aeab23a3be4afa84926a7149dec76c47",
"score": "0.61739814",
"text": "def tag_list\n tags.map(&:name).join(\", \")\n end",
"title": ""
}
] | [
{
"docid": "6e4532e83059efc0f3a7ae4e8f536914",
"score": "0.8771098",
"text": "def get_user_tags\n tags = []\n current_user.tags.each do |tag|\n tags << '\"' + tag.name + '\"'\n end\n tags.join(',')\n end",
"title": ""
},
{
"docid": "7497305703b8841fc9c3d6a8fb909e6c",
"s... |
14488d77f500d5a328ec5ee0cb8ec2e7 | GET /categories/1 GET /categories/1.xml | [
{
"docid": "f4d3f5dd35ed633f1eca6388367c5109",
"score": "0.64921486",
"text": "def show\n begin\n @category = @account.categories.find(params[:id])\n rescue ActiveRecord::RecordNotFound\n @category = @account.categories.find_by_name(params[:id]) \n end\n \n respond_to do |format... | [
{
"docid": "bd7f457291ea26e7a11c69e4c64b3fd9",
"score": "0.7703538",
"text": "def fetch_categories\n xml = \"Request categories.\"\n respond_with_raw get(\"#{BASE_URL}/v1/categories?api_key=#{API_KEY}&format=json\", :body => xml)\n end",
"title": ""
},
{
"docid": "8fb11c432a8bb2c5fc11... |
183a48aaeed5db1e8597dff7222847da | GET /vods/new GET /vods/new.xml | [
{
"docid": "38356ffe2209f8bcaafc718ff10f6cae",
"score": "0.7302512",
"text": "def new\n @vod = Vod.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @vod }\n end\n end",
"title": ""
}
] | [
{
"docid": "80f1c49b7b183f3dd443f80820e5daa0",
"score": "0.73175806",
"text": "def new\n @vdig = Vdig.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @vdig }\n end\n end",
"title": ""
},
{
"docid": "5a974af5a6680ad84d8ee699cab080... |
d5409602c3817f3593167938acf5b51a | I spent [] hours on this challenge. Complete each step below according to the challenge directions and include it in this file. Also make sure everything that isn't code is commented in the file. 0. Pseudocode What is the input?a positive integer What is the output? (i.e. What should the code return?)a positive integer... | [
{
"docid": "31a96684ef85f1019194acc3c489eadb",
"score": "0.0",
"text": "def separate_comma(num)\r\n\tstr_num = num.to_s.reverse\r\n\r\n\tif str_num.length < 4\r\n\t\treturn str_num\r\n\telse\r\n\t\ti = 3\r\n\t\twhile i < str_num.length\r\n\t\t\tstr_num.insert(i, ',')\r\n\t\t\ti += 4\r\n\t\tend\r\n\tend\... | [
{
"docid": "9a146fc7e049996dd62a05f0c9e5401a",
"score": "0.86049706",
"text": "def separate_comma(number)\n if(number < 1000) # if number is 3 digits return number else move on to computation\n return number.to_s\n else\n # create variables one to hold copy of argument being passed, empty... |
86840bd98c25bfb9e62c8d26528b1394 | Does the dirty work of transforming a Mustache template into an interpolationfriendly Ruby string. | [
{
"docid": "b80b1a60d6b09abf3f0dad66ad1467f7",
"score": "0.0",
"text": "def compile(src = @source)\n \"\\\"#{compile_sections(src)}\\\"\"\n end",
"title": ""
}
] | [
{
"docid": "b1b1fb2715225d6528da4522f20e4dc1",
"score": "0.7206767",
"text": "def replace_mustache(string, vars)\n Mustache.render(string, vars)\n end",
"title": ""
},
{
"docid": "46b85f3717d721653e9025c506a2352f",
"score": "0.6902196",
"text": "def render_inlined_str... |
669b4080b6db84c895577491c7de6600 | Default method, subclasses must override this | [
{
"docid": "92e6ff2eb5fe4b1c5158a5c6ed592179",
"score": "0.0",
"text": "def run\n super\n\n uri = _get_entity_name\n\n ###\n ### If deny_list or hidden, just return\n ###\n if @entity.hidden || @entity.deny_list\n _log \"this is a hidden /... | [
{
"docid": "2290804b238fc95bfd6b38f87c6d2895",
"score": "0.77684987",
"text": "def override; end",
"title": ""
},
{
"docid": "c294800a6c72a962070b4ca27d34a2fc",
"score": "0.7488381",
"text": "def default()\n #This is a stub, used for indexing\n end",
"ti... |
80f00732d3e86298df4fc423fc775276 | def crean_schedule_parts user = current_user otherside_clear user.othersides.includes(:schedules,:journals,:details).each do |otherside| if otherside.schedules.empty? && otherside.journals.empty? && otherside.details.empty? otherside.destroy end end event_clear user.events.each do |event| if event.schedules.empty? even... | [
{
"docid": "ff97bbad5c15489ddd8a6db226ee00d3",
"score": "0.0",
"text": "def judge_sub_or_others(otherside)\n if Detail.where(otherside_id: otherside.id).any? && Journal.where(otherside_id: otherside.id).empty?\n true\n elsif Detail.where(otherside_id: otherside.id).empty? && Journal.where(oth... | [
{
"docid": "987a4bee05343b9172ca9a8890cc06ed",
"score": "0.6689476",
"text": "def nice_destroy\n today = Time.zone.today\n hour = Time.zone.now.hour\n Inscription.where(user_id:current_user.id).each do |inscription|\n cour = inscription.cour \n cour.nombre_eleves = cour.nombre_eleves ... |
581c6ba6e1e972ceed53b6a7466d1a50 | Disegna il tipo d'armatura | [
{
"docid": "f81b7b1f1af622340628af14f6450210",
"score": "0.0",
"text": "def draw_armor_type\n name = Vocab::EQ_TYPE\n value = $data_system.armor_types[@item.atype_id]\n draw_detail(value, name)\n end",
"title": ""
}
] | [
{
"docid": "752979d106a8e85a217c824c5b854dc3",
"score": "0.6617939",
"text": "def determina_tipo\n carattere_stringa = @contenuto[@posizione_iniziale]\n\n case carattere_stringa\n when \"\\\"\" then @tipo = :doppio_apice\n when \"'\" then @tipo = :singolo_api... |
54f911f693c7ee1eb72fbe0142304c97 | CONSTRUCTOR Logical port class variables: | [
{
"docid": "692f986501509ae723393d22a312baae",
"score": "0.6844509",
"text": "def initialize(nsx_client, id = nil, data = nil)\n super(nsx_client)\n # lpid can be:\n # - Logical port attach ID\n if id\n initialize_with_id(id)\n else... | [
{
"docid": "8026d9b0a12e2164df6f847e9c0e3807",
"score": "0.72743076",
"text": "def initialize\n super\n self.port_str = \"/dev/ttyACM0\" if @port_str #may be different for you\n self.baud_rate = 9600 if @baud_rate\n self.data_bits = 8 if @data_bits\n self.stop_bits = 1 if @stop_... |
8f7efa443c65db2d460ec1c0970a9e71 | Calls the check/chackmate functions from the board class outputs the result | [
{
"docid": "801f1fdd08fa16aaf7f6d56bf0f18b41",
"score": "0.61725926",
"text": "def check_or_checkmate(color)\n\t\tresult = @board.check_or_checkmate(color)\n\t\tif result == 'CHECK' or result == 'CHECKMATE'\n\t\t\tputs \"\"\n\t\t\tputs \"#{result}!\"\n\t\t\tputs \"\"\n\t\tend\n\t\tresult\n\tend",
"t... | [
{
"docid": "fe96c1b73fc0de5adfd18b7094b06e2a",
"score": "0.68760294",
"text": "def check\n call\n @bingo_board.each do |sub_array|\n if @call_column == \"B\"\n if sub_array[0] == @call_number\n sub_array[0] = \"X\"\n end\n elsif @call_column == \"I\"\n if su... |
72530f59773c2ac0c3d4033510086b4f | Redefine body to render all parts | [
{
"docid": "f944a96e22c76b7736f9332e55cdb69a",
"score": "0.0",
"text": "def render\n parts.map(&:content)\n end",
"title": ""
}
] | [
{
"docid": "4dce65e1f718daf23c1ccc1b63dc1fae",
"score": "0.72361636",
"text": "def body\n render layout: false\n end",
"title": ""
},
{
"docid": "3c70be522abad79b6f810df4dd1c7e74",
"score": "0.6840823",
"text": "def render_body(context, options); end",
"title": ""
}... |
7706618513dd4f94f2213d7c2f9e3856 | GET /clients/:client_id/visits/1 GET /clients/:client_id/visits/1.json | [
{
"docid": "d50fd749e3bec1f4f7613c620cfdc412",
"score": "0.6851382",
"text": "def show\n begin\n @visit = Visit.find(params[:id])\n @client = Client.find(params[:client_id])\n @disclaimer = Disclaimer.get_disclaimer\n cookies[:last_visit] = @visit.id\n cookies[:last_client] =... | [
{
"docid": "dd0ed25d819c5ddb6b8cd1c8b2c0e032",
"score": "0.695158",
"text": "def index\n @site = Site.find(params[:site_id])\n @visits = @site.visits\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @visits }\n end\n end",
"title": ""
},... |
ce1b69c0f34cd0a919b2d02c428abe25 | Public: Gets an existing entity in the table. ==== Attributes +table_name+ String. The table name +partition_key+ String. The partition key +row_key+ String. The row key +options+ Hash. Optional parameters. ==== Options Accepted key/value pairs in options parameter are: +:timeout+ Integer. A timeout in seconds. +:reque... | [
{
"docid": "0c9e74c3c076483431c13ad95a7f1a07",
"score": "0.804798",
"text": "def get_entity(table_name, partition_key, row_key, options={})\n options[:partition_key] = partition_key\n options[:row_key] = row_key\n results = query_entities(table_name, options)\n results.length... | [
{
"docid": "2de80ce970e373575cd95d9c0f1e1e4b",
"score": "0.8040466",
"text": "def get_entity(table_name, partition_key, row_key, options = {})\n options[:partition_key] = partition_key\n options[:row_key] = row_key\n results = query_entities(table_name, options)\n results.len... |
d95cc8e82896ac202b084809c3f72637 | Attempts to extract the appropriate filename from the IO object. | [
{
"docid": "5dd38adf7c6b72adea3eaa79e66107c7",
"score": "0.82905567",
"text": "def extract_filename(io)\n if io.respond_to?(:original_filename)\n io.original_filename\n elsif io.respond_to?(:path) && io.path\n File.basename(io.path)\n end\n end",
"title": ""
}
] | [
{
"docid": "ce2ed94e7df7998276c5a2807927efa8",
"score": "0.83456707",
"text": "def extract_filename(io)\n if io.respond_to?(:original_filename)\n io.original_filename\n elsif io.respond_to?(:path)\n File.basename(io.path)\n end\n end",
"title":... |
4682d5524911a02628a727d0c538105e | checking logged or not | [
{
"docid": "60b6bd956f4ab5d7e513e2bbb7fcf28f",
"score": "0.0",
"text": "def require_login\n redirect_to login_path unless logged_in?\n # add some flash\n end",
"title": ""
}
] | [
{
"docid": "0d0d9e3e0d0ea5ded0f1b227eaade289",
"score": "0.85447764",
"text": "def logged?; false end",
"title": ""
},
{
"docid": "0d0d9e3e0d0ea5ded0f1b227eaade289",
"score": "0.85447764",
"text": "def logged?; false end",
"title": ""
},
{
"docid": "0d0d9e3e0d0ea5ded0f1b2... |
3404a970bc70ee32fb67fe0830baccfe | Returns the value of the DocumentRoot | [
{
"docid": "3d0f47b76e19ac07d1fe18545366ce60",
"score": "0.5947943",
"text": "def document_root\n end",
"title": ""
}
] | [
{
"docid": "f714e5e846f689939012a1ddc73f9d11",
"score": "0.7718632",
"text": "def document_root\n @hash[\"DocumentRoot\"]\n end",
"title": ""
},
{
"docid": "2033ea06f8f16383ba62b1728f7bc5bf",
"score": "0.72687244",
"text": "def root\n return nil unless self.document\n ... |
74093b4644d1e779468ea0102e83c57a | Description: Initializes the instance of table row object. Input: how Attribute to identify the table row element. what Value of that attribute. | [
{
"docid": "f102908c56b944a2b3806e90cb8f5f2a",
"score": "0.0",
"text": "def initialize(container, how, what)\r\n @how = how \r\n @what = what \r\n @container = container\r\n #super nil\r\n end",
"title": ""
}
] | [
{
"docid": "227d846766a495f4ac1265863019c411",
"score": "0.68235624",
"text": "def initialize(row)\n @row = row\n end",
"title": ""
},
{
"docid": "9fc1add4f7fee41411640b1964c6eeb6",
"score": "0.67850226",
"text": "def initialize(row)\n @row = row\n end",
... |
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": "6a5682a6a411640df1df2fe1d8b52fe1",
"score": "0.0",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = DeleteInventoryItemsResultSet.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... |
af218ac6f1bd159f1fc56cb692c3a8c2 | require "pry" require "pp" What would be the return value of the following method invocation? | [
{
"docid": "1b648760d7ae3b97baefcd009617703c",
"score": "0.0",
"text": "def foo(param = \"no\")\n \"yes\"\nend",
"title": ""
}
] | [
{
"docid": "7f7977924bb920bf9904c8a92aedeb50",
"score": "0.75263864",
"text": "def pp *args\n require 'pp'\n super\n nil\n end",
"title": ""
},
{
"docid": "5f107c0351b06ad9e2d68514df3543ff",
"score": "0.74868006",
"text": "def pp *args\n require 'pp'\n super\n... |
51669e355ff0aba9198b49003808791e | function: create_question params: qstForm return: isQuestionCreate(boolean) | [
{
"docid": "2c56ae083722ef51b57e0e4a4d1c8c53",
"score": "0.75223005",
"text": "def create_question(qstForm)\n @qstNo = QuestionDao.get_max_qstNo(qstForm.qstGroup, qstForm.qstType)\n if @qstNo\n qstForm.qstNo = @qstNo + 1 \n else\n ... | [
{
"docid": "5684ff43434ec12f557be5abed68fbee",
"score": "0.8456848",
"text": "def create_question(question)\n isQuestionCreate = question.save\n end",
"title": ""
},
{
"docid": "2939668b6e40790f9317b191efe438a4",
"score": "0.82778233",
"text": "def create_question\n... |
671b23730d3126e58565ac71684e3e00 | puts get_sandwich("Breadjambread") > jam puts get_sandwich("breadbreadlettuce") puts get_sandwich("breadapplejambread") | [
{
"docid": "a281471c63d5e51e0da6c88473e6912c",
"score": "0.0",
"text": "def shift_left(list)\n overflow = list[0]\n point = 0\n\n list.size.times do\n list[point] = list[point + 1]\n point += 1\n end\n\n list[list.size - 1] = overflow\n \n return list\nend",
"title... | [
{
"docid": "3a64f9e08234a4e3c261ad7bdf537691",
"score": "0.6784572",
"text": "def get_sandwich(sandwich) #Get Sandwich ===> Complete \n i = 0\n bread1end = 0\n bread2start = 0 \n inside = ... |
4a8f370f619038557044f9166373a16e | Renderiza formulario de busca de livros | [
{
"docid": "49ef23333184c57caf551cbdd161ff1a",
"score": "0.0",
"text": "def search\n end",
"title": ""
}
] | [
{
"docid": "e95c6a392c134a6216c43bd8f8f2603c",
"score": "0.6103432",
"text": "def index\n @formulario_fields = FormularioField.all\n end",
"title": ""
},
{
"docid": "661dacd93887e54b9fc58c7f99a6e2af",
"score": "0.6074737",
"text": "def index\n @locadoras = Locadora.all\n pr... |
7013c7b25c6227509baedc80efebfe88 | Returns true if current section should be highlighted; used globally. A section is only selected if one of the following controller/actions is active: articles/show, admin/articles/edit sections/show, admin/sections/show, admin/sections/edit Basically, whenever article id OR section id is available | [
{
"docid": "9ca690a1dc9e34c24d465b718170fb80",
"score": "0.7919456",
"text": "def section_selected?(section_name)\n if article_id_present?\n current_article.section.name == section_name\n elsif section_id_present?\n current_section.name == section_name\n else # none of the necessary c... | [
{
"docid": "8355f2c115a7f911c9f5ef69be18fd5e",
"score": "0.6691903",
"text": "def should_highlight_section?(umlaut_request, section_id)\n $stderr.warn \"should_highlight_section? is deprecated, use `section_highlighter(umlaut_request).should_highlight_section?(section_id)`\"\n highlighted_sections... |
0c066cade8df63824774d497a1b928d0 | Find the closest index in HashRing with value <= the given value source://redis//lib/redis/hash_ring.rb73 | [
{
"docid": "38ee5dfbf39586080fc24d8216213eed",
"score": "0.0",
"text": "def binary_search(ary, value); end",
"title": ""
}
] | [
{
"docid": "99830fb1e1c5f23ce48ff4ead3be1dbb",
"score": "0.6855728",
"text": "def key_for_min_value(hash)\n aa = 1000000000\n i = nil\n hash.each do |key, value|\n if value <= aa\n aa = value\n i = key\n end\n end\n return i\nend",
"title": ""
},
{
"doc... |
efeb3fd73b20f015b8aacd549f8367bb | Shuts down this connection to the server | [
{
"docid": "bbf0f2f4602b0fece3f05c691ccab146",
"score": "0.74287134",
"text": "def shutdown\n @active = false\n client.close_connection\n end",
"title": ""
}
] | [
{
"docid": "34997762696ad2896fc5cd6ddc1478d3",
"score": "0.7633642",
"text": "def shutdown\n @connection.close\n end",
"title": ""
},
{
"docid": "7f9fbdb6be0f830f1a940e9a3c50ed94",
"score": "0.7486142",
"text": "def shutdown!\n @manager.disconnect(@raw_conn)\n end",
"... |
8149641813c7705a74ed1568ae8f79d0 | Add a filter to the query | [
{
"docid": "4fdf09626c3c6088417367c5b3800dfd",
"score": "0.6695673",
"text": "def addFilter(expression)\r\n if expression.is_a? Nagios::MkLiveStatus::Filter\r\n if @filters == nil\r\n @filters=Array.new\r\n end\r\n \r\n @filters.push(expression)\r\n else\r\n raise Q... | [
{
"docid": "62af3b474094b3e72b5d1282dfa7b2c9",
"score": "0.8004565",
"text": "def filter(filter)\n @query[:q] << \"filter:#{filter}\"\n self\n end",
"title": ""
},
{
"docid": "624157ad8d5ed3905edb537a9ec1d6fe",
"score": "0.77398235",
"text": "def apply_filters(query)\n ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "104a4c772921e128b416a5eb1764c9e8",
"score": "0.0",
"text": "def set_disclosure\n @disclosure = Disclosure.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... |
0c8905b457fd59ddc79c58cf92aa22b6 | DATABASE STATEMENTS ====================================== ++ Mysql2Adapter doesn't have to free a result after using it, but we use this method to write stuff in an abstract way without concerning ourselves about whether it needs to be explicitly freed or not. | [
{
"docid": "332c9b4f202c213b878bffdcf2238288",
"score": "0.58788615",
"text": "def execute_and_free(sql, name = nil, async: false) # :nodoc:\n sql = transform_query(sql)\n check_if_write_query(sql)\n\n mark_transaction_written_if_write(sql)\n yield raw_execute(sql, name, asyn... | [
{
"docid": "34f510cc81fb4e7236fae7c011d3f12f",
"score": "0.60829854",
"text": "def flushdb; end",
"title": ""
},
{
"docid": "52ec7115fd691fe31d511aa45083b7c9",
"score": "0.5959344",
"text": "def commit(q)\n\t\tdbh=Mysql.init\n\t\tdbh.real_connect(@host, @user, @password, @db,@port,n... |
d2ff15864f1a9fe7e81625972b24a3cf | Generates the javascript code for a given action | [
{
"docid": "e6a375e95ef73bcf1bb486ed80f5d371",
"score": "0.79030854",
"text": "def generate_js_for_action(waw_kernel, action, buffer)\n action_js = <<-THEEND\n function #{action.id}(request_data, form) {\n $.ajax({type: \"POST\", url: \"#{action.url}\", data: request_data, dat... | [
{
"docid": "f63022024b3c971d5dd50cbd2e154337",
"score": "0.6919479",
"text": "def js(action)\n best_asset( action, Tension::JS )\n end",
"title": ""
},
{
"docid": "73753ad7b4f6bb1ba8cb5a5c028d5779",
"score": "0.6826991",
"text": "def generate_action_code(action)\n ca... |
1c8f020eca279ad96a62f370aa4187b7 | Return the shortest route array. | [
{
"docid": "d1871d6a082aae90f5b58dd5d5cd9fef",
"score": "0.58801657",
"text": "def route\n @shortest_route.unshift @goal\n end",
"title": ""
}
] | [
{
"docid": "eecde74d212e02fb033bf6ccef3cfe18",
"score": "0.7508442",
"text": "def shortestRoute()\n sh = 99999\n frm = 0\n to = 0\n ROUTE_DATA.each do |r|\n if r[RTE_DIST] < sh\n sh = r[RTE_DIST]\n frm = r[RTE_FROM]\n to = r[RTE_TO] \n end\n end\n return ... |
0b3b07484a772590f5d21279fe3eed99 | true if this rule matches the Phrases somewhere. | [
{
"docid": "7a261688e81333717983a7bb46668934",
"score": "0.0",
"text": "def matches?(sequence)\n (0..(sequence.size-length)).each do |pos|\n return pos if matches_at?(pos, sequence)\n end\n return false\n end",
"title": ""
}
] | [
{
"docid": "1bf27afd2ba9d862eeee870342ab525b",
"score": "0.74150866",
"text": "def phrases_match(phrases)\n @phrases.zip(phrases).each do |mine, theirs|\n return false if mine.is_a?(NounPhrase) != theirs.is_a?(NounPhrase)\n if mine.is_a?(NounPhrase)\n return f... |
953fbf9e32b3be9d024755123818b824 | This yields the root of node linked objects mainly the node in the "source tree" | [
{
"docid": "3a3081915f546b073fc1272686954a63",
"score": "0.0",
"text": "def bw_r\n bw_a[-1]\n end",
"title": ""
}
] | [
{
"docid": "abc679d159c1357ed9d2ef92b408b9f2",
"score": "0.6633178",
"text": "def get_tree_source\n return @root\n end",
"title": ""
},
{
"docid": "7d46a74246b1a609cfbe34f67f3c6e31",
"score": "0.65182203",
"text": "def nodes\n @root.node_list.map{|n| n[0]}\n end",
... |
caf1909396deaf9fac321b9d652df3cd | PATCH/PUT /appointments/1 PATCH/PUT /appointments/1.json | [
{
"docid": "a7320f42922f8df9533886f087c74dad",
"score": "0.6574869",
"text": "def update\n respond_to do |format|\n if @appointment.update(appointment_params)\n format.html { redirect_to @appointment, notice: 'A consulta foi atualizado com sucesso.' }\n format.json { render :show, ... | [
{
"docid": "9969f3bbabcb400237523098e0c7e748",
"score": "0.7602109",
"text": "def update\n if @appointment[:errors].nil?\n @appointment[:appointment].update(new_params)\n render json: @appointment, status: 200\n else\n render json: @appointment, status: 404\n end\n end",
"ti... |
dcc1f97ed0308d0dfd0e828f171eb0ed | GET /ephemeris or /ephemeris.json | [
{
"docid": "1bea2f6c271a106fd97fe7177514484c",
"score": "0.5807142",
"text": "def index\n #binding.pry\n search = params['search'] # esto trae el parametro de busqueda\n @ephemeris = search.present? ? Ephemeri.by_categoria(search['categoria']) : Ephemeri.all\n \n end",
"title": ""
... | [
{
"docid": "e94fd4bb4e6e641f92a8d7d102c31012",
"score": "0.6389772",
"text": "def ephem\n\t\tprepare_response\n\t\tcheck_datetime\n\t\tif @response[:status] == 200\n\t\t\tbegin\n\t\t\t\tephems = []\n\t\t\t\tlist = []\n\t\t\t\tbodies = Hash[Body.pluck(\"id\", \"name\")]\n\t\t\t\tif @end_datetime\n\t\t\t\... |
594aee12c35479008ca5cf9c5410f242 | Return the index sequence for the lane barcode | [
{
"docid": "09f5b313f1db7dfe8bbda4c223f06472",
"score": "0.8452624",
"text": "def getIndexSequence(laneBarcode)\n if !laneIndexed?(laneBarcode)\n return \"\"\n else\n tag = laneBarcode.gsub(/^[1-8]-ID/, \"\")\n return @pipelineHelper.findBarcodeSequence(\"ID\" + tag.to_s) \n end\... | [
{
"docid": "0f7cb5626b2e2a8578d9d3dce55f0dba",
"score": "0.63176095",
"text": "def index_input\n line_numbers = []\n i = 0\n @input.each do |instr|\n line_numbers << i\n # Only increments index if instruction is not a label\n unless /\\(.+\\)/ =~ instr\n i +=... |
4badec2af0b4befaebcea8a4096a8c1d | Note INSERT IGNORE INTO, thats because voicemail boxes should have unique constraint set, so if one tries to insert duplicate record, no exception would be risen and INSERT stetement would be ignored | [
{
"docid": "ec3573b4457cc080e58ea916101bab9f",
"score": "0.0",
"text": "def create_vm(mailbox, pass, fullname, email)\n vm = (self.voicemail_box.blank? ? VoicemailBox.new : self.voicemail_box)\n vm.device_id = self.id\n vm.mailbox = mailbox\n vm.password = pass\n vm.callback = ''\n vm.... | [
{
"docid": "aac3b75e20a1dc40e4cd183c4a18f86b",
"score": "0.65386885",
"text": "def insert_if_does_not_exist user_data\n check_and_insert_user user_data\n check_and_insert_song user_data\n check_and_insert_connections user_data\n end",
"title": ""
},
{
"docid": "de9b70d453cf768cd764... |
bd8ff2fbee65c548f5fa33f5182987f1 | Returns true if placing the disc of current player at row,col is valid; else returns false | [
{
"docid": "127d28a397958b99af70cc517d4049ea",
"score": "0.76113814",
"text": "def isValidMove(row, col)\n \treturn isValidMoveForDisc(row, col, @disc)\n end",
"title": ""
}
] | [
{
"docid": "09b6874bd99893f167ade55105545a62",
"score": "0.7593572",
"text": "def valid?(position)\n row, col = position\n position.all? {|i| i >= 0 && i< @grid.length}\n \n end",
"title": ""
},
{
"docid": "534adfe9e0a102c819afaa95d8e6d6d8",
"score": "0.75356525",
... |
dc2864ed7d09965f3af5ef98fef12fb8 | Get class name without module namespacing | [
{
"docid": "df6ce5dfa330616857a1d04ae0c40a25",
"score": "0.82867634",
"text": "def class_name\n name.split('::').last\n end",
"title": ""
}
] | [
{
"docid": "d25da90ef209082d408e5495937cc2e7",
"score": "0.82739604",
"text": "def bare_class_name\n name.split('::').last\n end",
"title": ""
},
{
"docid": "4d990abb8697e1050a5cf18ca0361b08",
"score": "0.8174453",
"text": "def class_name\n return self.class.name... |
da28442d1060a3be28f15bb9621632ce | Implements "Law of the Unconcious Statistician" expectation calculation of a function g(X) for the distribution. If no function g is supplied, it defaults to X, i.e., it calculates E[X], the mean of the distribution. | [
{
"docid": "4cb4712c7b0a0a44bb9e81d970c15042",
"score": "0.59085536",
"text": "def E(g = ->(value) { value }) # default function is x itself ==> E[X]\n @x.map { |x| g[x] * @p[x] }.inject(:+) # sum g * p for all x\n end",
"title": ""
}
] | [
{
"docid": "b63c9f551984d208c86c2697fd401999",
"score": "0.5888395",
"text": "def gauss(x, omega = 1.0)\n Math.exp(- x * x / (2.0 * omega * omega)) / (omega * Math.sqrt(2 * Math::PI));\nend",
"title": ""
},
{
"docid": "e0d2e696220ed35c21d6fc6927ff546a",
"score": "0.5796191",
"text... |
950e888dbfc3d4a7a77bb187cd5a6452 | Called by BezierEditor when the selection or geometry has updated. The viewport graphics then needs updating. | [
{
"docid": "24850e16125e161c53c6a9c7ce75763a",
"score": "0.66298115",
"text": "def refresh_viewport\r\n update_gizmo()\r\n false\r\n end",
"title": ""
}
] | [
{
"docid": "919c6ae9cb37c6563b6aa48a953371a0",
"score": "0.6775253",
"text": "def refresh_viewport\r\n #puts 'MergeTool.refresh_viewport'\r\n #update_gizmo()\r\n nil\r\n end",
"title": ""
},
{
"docid": "7c2b1f6aab869f1d871ffab56f883862",
"score": "0.6518234",
"text"... |
bf52f8250749654c2ac5d3ffe2100aa3 | GET /managements/new GET /managements/new.xml | [
{
"docid": "d323265c86c275b63e805433c76f5eee",
"score": "0.0",
"text": "def new\n\n @management = Management.new\n\n respond_to do |format|\n if !params[:treatment].nil?\n @treatment = params[:treatment]\n format.html # new.html.erb\n format.xml { render :xml => @managem... | [
{
"docid": "d8c9869452137d7b8c5091069906a4ce",
"score": "0.70579505",
"text": "def new\n @mentee = Mentee.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @mentee }\n end\n end",
"title": ""
},
{
"docid": "c47c28583dcbe1cfbf7d1421... |
9175b360e7c545d15d1ce53930f8e4ca | TODO: selectable docs to be displayed in client section GET /docs | [
{
"docid": "b079436c8bbdb4e8b31f7de673146800",
"score": "0.73390085",
"text": "def index\n @docs = Doc.all\n end",
"title": ""
}
] | [
{
"docid": "bc27fba30db11c2850301a53553bd8fb",
"score": "0.75423187",
"text": "def list_documents \r\n suburl = \"&action=list_documents\"\r\n call_target_url(suburl)\r\n end",
"title": ""
},
{
"docid": "e7331f428149fa9deafe46c35787d1a8",
"score": "0.7530314",
"text": "def doc... |
82eac077a29162fb5ad6bee083603090 | correct_punctuation = "I stepped on a Corn Flake, now I'm a cereal killer." incorrect_punctuation = "i wondered why the baseball was getting bigger. Then it hit me." first_word_capitalized_and_ends_with_punctuation_2?(correct_punctuation) | [
{
"docid": "9438a2e6f1a8b8c65cccc6a18c474cd8",
"score": "0.0",
"text": "def valid_phone_number?(phone)\n #phone.match(/([0-9] *?){10}|(\\([0-9]{3}\\)(([0-9]{3}-[0-9]{4})|[0-9]{7})\\b)/) ? true : false\n #three OR statements\n #first: test to see if there are 9 numbers with an optional space \n #seco... | [
{
"docid": "65aa947b8e10642f0ec2299586504283",
"score": "0.8789311",
"text": "def first_word_capitalized_and_ends_with_punctuation?(punctuation)\n if punctuation.match(/\\A[A-Z].*\\W\\z/) # if first word of second sentence is not capitalized and/or first\n # sentence does not include punctuation it ... |
9c296056693ff7b4423e8930a839fb8b | Substract the total cost of this view with the total cost of the other view A CostMissingException will be raised if one of the element in either view is missing a cost | [
{
"docid": "9292c58b1647976e50a9371106ac5853",
"score": "0.8586018",
"text": "def substract_cost_from(other_view)\n if other_view.nil?\n return self.total_cost\n else\n e = CostMissingException.new \"Cost missing for some items\"\n\n begin\n this_cost = self.total... | [
{
"docid": "4ffe25d7267121443f214c6e22c2deff",
"score": "0.7081167",
"text": "def total_cost\n e = CostMissingException.new \"Cost missing for some items\"\n \n total = 0\n self.each {|entity|\n if entity.cost.nil?\n e.view.add entity\n else \n total ... |
bce28131022d56741540542680742870 | Convert the given level into a level number. | [
{
"docid": "6fa9e54dcfef328f2a1c6ec1bb83f39c",
"score": "0.79129654",
"text": "def level_num( level )\n l = levelify(level) rescue level\n case l\n when 'all'; 0\n when 'off'; LEVELS.length\n else begin; Integer(l); rescue ArgumentError; LEVELS[l] end end\n end",
"title":... | [
{
"docid": "e6ed1869aef3c1b3958a75a22e3b12b1",
"score": "0.87512916",
"text": "def level_to_number(level)\n LEVEL_NAMES[level.to_s.downcase.to_sym] ||\n raise(ArgumentError, \"Invalid level #{level.inspect}\")\n end",
"title": ""
},
{
"docid": "08174cd0452881f54ef0da5f32... |
79e025e83e5ce3ea3425168adf8fee41 | Appends a global after block to all behaviours. See append_before for filtering semantics. | [
{
"docid": "2812bacf2d0061c94810456ddb2c842f",
"score": "0.6855417",
"text": "def append_after(*args, &proc)\n scope, options = scope_and_options(*args)\n example_group = ExampleGroupFactory.get(\n get_type_from_options(options)\n )\n example_group.append_after(scope... | [
{
"docid": "70c7186e61748b75bf47fb968a9fbb39",
"score": "0.7616044",
"text": "def after(&block)\n @after << block\n end",
"title": ""
},
{
"docid": "c0adcf53eedd9efd76c1705a63f243cf",
"score": "0.7497589",
"text": "def after(&block)\n define_before_or_after_method_... |
1311bcedf80d7213b26e80907da37db2 | PUT /cores/1 PUT /cores/1.xml | [
{
"docid": "457f304367bcfceb29c93f213f11505f",
"score": "0.0",
"text": "def update\n @cor = Cor.find(params[:id])\n\n respond_to do |format|\n if @cor.update_attributes(params[:cor])\n flash[:notice] = 'Cor was successfully updated.'\n format.html { redirect_to(@cor) }\n ... | [
{
"docid": "fbd7c46b15ae2792fd842ba0d764b7d0",
"score": "0.56781226",
"text": "def put uri, args = {}; Request.new(PUT, uri, args).execute; end",
"title": ""
},
{
"docid": "b58dcb674745e5d70f3957b6c801fb4a",
"score": "0.5475496",
"text": "def update\n id = params[:id]\n p = {:s... |
7a656045b1d2e05933038437846d8775 | import posts to LinkedIn | [
{
"docid": "3ee8cd4be7dd1fec1d0cf13a41e6ebfd",
"score": "0.72208613",
"text": "def import_posts_to_li settings, posts, agent\n puts '********* Post to LinkedIn **************'\n\n posts.each do |post|\n agent.get (settings[:group_url])\n form = agent.page.forms_with(:action => '/groups').first\n... | [
{
"docid": "893cd17468f907fdbf6801115dd3d96a",
"score": "0.62129295",
"text": "def import_blog\n raw = Feedzirra::Feed.fetch_and_parse(self.feed)\n if (raw && raw.entries)\n raw.entries[0..4].each do |i|\n slug = slug_process(i.url.split('/').last.gsub(/\\...*/, '') + \"_\" + self.auth... |
b90742b4d963c183e57f038661172272 | Default implementation for build_committed_hook. To use this hook, define a build_committed_hook(build) method in your plugin Params: build: build that holds info that can be used for your plugins | [
{
"docid": "b032eb96a54440515ab758e3ee01b294",
"score": "0.7908566",
"text": "def build_committed_hook(build)\n {not_implemented: 'Build Committed Hook'}\n end",
"title": ""
}
] | [
{
"docid": "75e776595b57c07431036fa0065516a9",
"score": "0.7829683",
"text": "def run_build_commited_hook(build)\n run_hook(build.project) do |plugin|\n plugin.build_committed_hook(build)\n end\n end",
"title": ""
},
{
"docid": "edc0793b70de5b0195d6f2bd79b392ed",
"score": "0.... |
af87405477d8280e73b9579a181900f9 | GET /statuses/1 GET /statuses/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "d4d6f0a85b0d027980ce7fd7f095c381",
"score": "0.71040684",
"text": "def retweets(id)\n get(\"/statuses/retweets/#{id}.json\")\n end",
"title": ""
},
{
"docid": "79b67dd685669f9224db01a5b714deac",
"score": "0.69599247",
"text": "def get_single_tweet(status_id)\n ... |
1e1c0460af39daa4224a8426f77cd275 | create create a new systematic review project | [
{
"docid": "8f7868ea997e1d1c875cf165fdc87538",
"score": "0.0",
"text": "def create\n redirect_to action: \"index\"\n \t# @project = Project.new(params[:project])\n # if defined?(params[:key_questions]) && !params[:key_questions].nil?\n\t # if @saved = @project.save\n\t\t\t# \t#params[:key_ques... | [
{
"docid": "4df5a4ed1ef9d7f26511df6911e28a87",
"score": "0.7474544",
"text": "def create\n @admin_review_project = Admin::ReviewProject.create_new_review_project(params[:admin_review_project])\n redirect_to @admin_review_project, notice: 'Review project was successfully created.'\n end",
"tit... |
de074a616643bf5d20d624f6a2ca1b84 | Has the user been given a tour of the given page? | [
{
"docid": "5f9cbdff8d4270cda553ad0fbd7f2ce6",
"score": "0.6761486",
"text": "def has_toured?(page, fte_only)\n\t\ttours.present? && tours.include?(\"#{page}-#{fte_only}\")\n\t\t# false\n\tend",
"title": ""
}
] | [
{
"docid": "b22b47ba5430d5810d4a37d96bd0351c",
"score": "0.6849121",
"text": "def on_tour?\n (@upcoming_events_count || @events.size) > 0\n end",
"title": ""
},
{
"docid": "fcf0af58316c117540ca20d72423e1ee",
"score": "0.6525873",
"text": "def visited?(url)\n ! visited_page... |
4d39714f4941dafdbb71d9fa3949bf45 | Updates an existing Contact | [
{
"docid": "dfe17273a23b1e983c16517f73459273",
"score": "0.8103434",
"text": "def update_contact(id, data)\n update(\"contacts\", id, data).first\n end",
"title": ""
}
] | [
{
"docid": "0ae8e66702224c0dbf1161d471cdb8cd",
"score": "0.81958985",
"text": "def update\n @contact = Contact.find(params[:id])\n @contact.update(contact_params)\n @contact.save\n redirect_to contacts_new_path\n end",
"title": ""
},
{
"docid": "6f496a3df61162b96d7d7bd4e12acc53"... |
99fc44870d4079ac28b3202094b26727 | attr_accessor :childstats attr_accessor :childquirks attr_accessor :childtraits attr_accessor :childconsang consang is the consanguinity seed, a representation of the genome of the organism. This tracks magebloodline, inbreeding, and appearance. | [
{
"docid": "42ee9e81fd079694e6c65042c131ea60",
"score": "0.4825556",
"text": "def initialize(name, stats, traits, quirks, consang, magic, age, longevity)\n @name = name\n @stats = stats\n @traits = traits\n @quirks = quirks\n\t\t@consang = consang\n @magic = magic\n end",
"title": ""... | [
{
"docid": "f57d1a4a3250132e7c0b787fc9b5a181",
"score": "0.5702467",
"text": "def config\n {\n terminating_sex: :boy,\n percent_families_wanting_children: 0.75,\n chance_of_having_another_child: 0.25,\n min_num_of_families: 10,\... |
6ca689278a01a6f1b87058a54250e98c | GET /biddings/1 GET /biddings/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "e27729d4ea768b422214fdf952e2065f",
"score": "0.70949924",
"text": "def get_brandings\n request :get,\n '/v3/brandings.json'\n end",
"title": ""
},
{
"docid": "a7aed0159e7cfff04dbbff9323321681",
"score": "0.68993294",
"text": "def index\n @biddings = Bidd... |
aae476fb13f66ed36b411d7b9e11a853 | POST /schools POST /schools.json | [
{
"docid": "508d3e6b8d6da77e500eb13579155ef8",
"score": "0.0",
"text": "def create\n @school = School.new(params[:school])\n @school.user_id=current_user.id\n #@school.user_id=12\n respond_to do |format|\n if @school.save\n format.html { redirect_to @school, notice: 'School was s... | [
{
"docid": "af26cfbbbd0cb9c039d642da825648a4",
"score": "0.7096692",
"text": "def create\n @school = School.new(schools_params)\n\n respond_to do |format|\n if @school.save\n format.html { redirect_to @school, notice: 'School was succesfully created.' }\n format.json { render :s... |
ec1ac3a527d6ec51b062731da17dab25 | THIS IS REALLY.. REALLY UGLY. GOTTA THING OF A BETTER WAY TO DO IT | [
{
"docid": "39e9ade37fb27f7facf5b0408f49d9e0",
"score": "0.0",
"text": "def to_param\n \"#{id}-#{try(:first_name).try(:parameterize)}-#{try(:middle_name).try(:parameterize)}-#{try(:last_name).try(:parameterize)}\"\n end",
"title": ""
}
] | [
{
"docid": "b6b2bcc0062aeb115edab7b10cbe6930",
"score": "0.59496695",
"text": "def desired; end",
"title": ""
},
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",
"score": "0.5929785",
"text": "def bodystmt; end",
"title": ""
},
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",... |
dcfc15fd11d2a36ad5d32b42938acc5f | PUT /post322s/1 PUT /post322s/1.xml | [
{
"docid": "c83d271fc8d8fcf878c680db4ffe3c5b",
"score": "0.61005884",
"text": "def update\n @post322 = Post322.find(params[:id])\n\n respond_to do |format|\n if @post322.update_attributes(params[:post322])\n format.html { redirect_to(@post322, :notice => 'Post322 was successfully updat... | [
{
"docid": "e631b376ae2ccb776680432bf94b01cc",
"score": "0.69109386",
"text": "def put(uri, xml)\r\n req = Net::HTTP::Put.new(uri)\r\n req[\"content-type\"] = \"application/xml\"\r\n req.body = xml\r\n request(req)\r\n end",
"title": ""
},
{
"docid": "c2c0b673628fdc28b... |
66e21a458b23cce0f48c359b9d8b7d7d | Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context | [
{
"docid": "e3061c29e5b1c24792771045ed903e06",
"score": "0.0",
"text": "def context; end",
"title": ""
}
] | [
{
"docid": "d1758edd04b6374162470ca44c3f1250",
"score": "0.68721235",
"text": "def context\n unless @instance_context\n @instance_context = AuthTokenPromotionContext.new(@version )\n end\n @instance_context\n... |
b56985db2faec2f64ecdc9860ae23273 | DELETE /admin/products/1 DELETE /admin/products/1.json | [
{
"docid": "4646deda861e045fcfe96347196415c8",
"score": "0.7304126",
"text": "def destroy\n @product.destroy\n\n render json: @product, status: :ok#, location: @collection\n end",
"title": ""
}
] | [
{
"docid": "0830d13d7433544d13ba973a511077c6",
"score": "0.77522016",
"text": "def deleteProd()\n if(!authenticateAdmin(params[:admin_id], params[:admin_auth_key]))\n render json: {status: false, reason: \"Authentication Failed\", data: \"\"}\n return\n end\n p = Product.find(params[:... |
3e26466fc81ab1be422d2523c35e6592 | GET /key_activities GET /key_activities.json | [
{
"docid": "391ce386f20dec2f05e5e1123275d979",
"score": "0.7432551",
"text": "def index\n @key_activities = KeyActivity.all\n end",
"title": ""
}
] | [
{
"docid": "d267af8dacd7e9798ee4fab575f48a47",
"score": "0.7534245",
"text": "def activities\n get_call('activities.json')\n end",
"title": ""
},
{
"docid": "27e037574473aa2cbaf3d351d7e87b56",
"score": "0.73292565",
"text": "def all_activities\n get('activities.json')\n ... |
f4f9169f72507d96eeec451be5d1ce56 | Gets the tokenLifetimePolicies property value. The tokenLifetimePolicies assigned to this service principal. | [
{
"docid": "b9dce54a78f80fff8bdd920c4188842d",
"score": "0.82040495",
"text": "def token_lifetime_policies\n return @token_lifetime_policies\n end",
"title": ""
}
] | [
{
"docid": "ef670c1f17994d4497f839b9283f0287",
"score": "0.75524265",
"text": "def token_lifetime_policies=(value)\n @token_lifetime_policies = value\n end",
"title": ""
},
{
"docid": "ef670c1f17994d4497f839b9283f0287",
"score": "0.75524265",
"text": "def to... |
9f34f34a82db98d2e6ceeebe0627e48c | calculates the distance between two points change the return type to change units | [
{
"docid": "9c07c5e68d38b939b646e967bdf09c52",
"score": "0.0",
"text": "def haversine_distance(lat1, lon1, lat2, lon2)\n rad_per_degree = 0.017453293 # Math::PI/180\n\t \n # the great circle distance d will be in whatever units R is in\n\t \n rmiles = 3956 # radius of the great circ... | [
{
"docid": "0eea48cb9ff0657fb79d212f4033bfd2",
"score": "0.77699435",
"text": "def distance(point2)\n end",
"title": ""
},
{
"docid": "fe9bf647010d2dd6e6181134610e48a8",
"score": "0.7438932",
"text": "def distance(p0, p1)\n a = factory.point(p0.x, p0.y)\n b = factory.poi... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "3ec59094ad17aec10d8830041042d992",
"score": "0.0",
"text": "def set_program\n @program = Program.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... |
c21d09a5ce8df57ed351fa10f738e0c9 | Destructively convert all keys to `Symbol`s, as long as they respond to `to_sym`. | [
{
"docid": "f85d6a20608ceb0285938166949d18f9",
"score": "0.72492754",
"text": "def deep_symbolize_keys!\n deep_transform_keys! { |key| key.to_sym rescue key }\n end",
"title": ""
}
] | [
{
"docid": "752b0027c22540c2609d583b2ae4a762",
"score": "0.799223",
"text": "def symbolize_keys!\n transform_keys!(&:to_sym)\n end",
"title": ""
},
{
"docid": "a2a90933e3f822ff74e6d86e58541d9e",
"score": "0.78799325",
"text": "def symbolize_keys\n transform_keys { |key| key.to... |
45bc1e87d596fd1f85ae0ce4abd1fb7c | Returns the title and if no title has been added returns a fallback | [
{
"docid": "4186518acde9a943ccbff19ebc73d390",
"score": "0.0",
"text": "def title\n\t\tself[:title] || \"Deployment ##{id}\"\n\tend",
"title": ""
}
] | [
{
"docid": "230bc0d5d21f0898cc6004a059fef6c1",
"score": "0.78907657",
"text": "def get_title\n if @title == nil\n return 'Azalo'\n else\n return @title\n end\n end",
"title": ""
},
{
"docid": "f7d9a225571a0b163c50bdf3625081ae",
"score": "0.7833303",
"text": "def get... |
23348c91ba4eac3e5350234b809a0299 | are banned or have customer with orders or (right now we check for not anonymous) have ticket_type with catalog_item has a customer with tickets | [
{
"docid": "ff8ee092b2cf818fdc304a0562d279a2",
"score": "0.0",
"text": "def gtags_sql\n sql = <<-SQL\n SELECT json_strip_nulls(array_to_json(array_agg(row_to_json(g))))\n\n FROM (\n SELECT\n upper(gtags.tag_uid) as reference,\n gtags.... | [
{
"docid": "eeaff2e9953c7bb0bb403c6e4ac07562",
"score": "0.64188147",
"text": "def check_customer_order(user)\n CustomerOrder.where(user: self, customer: customers).exists? #este metodo sirve para oculta o mostrar los botones agregar o no a mi lista de index users\n #tambien busca si se encuentra ... |
83c668a59294a1c19ccd70855c8686d8 | Creates a user upon validity. | [
{
"docid": "6e09e36f02fa8ca2fccb088c500d7991",
"score": "0.7228554",
"text": "def create_user_if_valid(user_fields)\n ActiveRecord::Base.transaction do\n begin\n @user = User.create!(user_fields)\n if @user\n UserMailer.notify_admin(@user).deliver\n flash[:notice]... | [
{
"docid": "202a2ec5884e8441a48a2d281bac8172",
"score": "0.7732611",
"text": "def create_user\n # provide the interface asking for name, destination and duration\n # then, create and store the User object\n end",
"title": ""
},
{
"docid": "5418ee7a06c663a17c1a799472c13057",
"score... |
91c85419f1c2d8e23c460eafa6f33043 | Initializes an empty TaskMatcher object | [
{
"docid": "5085dec48da180c36c11a1e7050a2209",
"score": "0.0",
"text": "def initialize(instance = nil)\n super()\n\n @instance = instance\n @model = []\n @predicates = []\n @neg_predicat... | [
{
"docid": "9f58e13bf9f8d323579abd226c58e3af",
"score": "0.7084424",
"text": "def initialize\n @tasks = {}\n @default_task\n end",
"title": ""
},
{
"docid": "922d1981def9303dfd282591f54d885c",
"score": "0.69415176",
"text": "def initialize\n @tasks = {}\n end",
"ti... |
1b8e48671930cb749c3887f184bc8303 | Motivation: even if NULL is stored in the workflow_state database column, the current_state is correctly recognized in the Ruby code. The problem arises when you want to SELECT records filtering by the value of initial state. That's why it is important to save the string with the name of the initial state in all the ne... | [
{
"docid": "87c86ac58472769c6c3487f011a71b37",
"score": "0.67695373",
"text": "def write_initial_state\n write_attribute self.class.workflow_column, current_state.to_s\n end",
"title": ""
}
] | [
{
"docid": "b3cdd69d043385d5e353ad374474847e",
"score": "0.65525246",
"text": "def write_initial_state\n write_attribute self.class.workflow_column, current_state.value\n end",
"title": ""
},
{
"docid": "009b09a4f9ccfd752b6b70060f9347c0",
"score": "0.6530515",
"text":... |
e36ea33ccd7b01934a88ba7c6a985bfc | Exact dupe of people controller | [
{
"docid": "c0b9c165599cec98f36e8baa15971b56",
"score": "0.0",
"text": "def destroy_alias\n alias_id = params[:alias_id]\n Alias.destroy(alias_id)\n render :update do |page|\n page.visual_effect(:puff, \"alias_#{alias_id}\", :duration => 2)\n end\n end",
"title": ""
}
] | [
{
"docid": "d2cbb8e2872ae11a514f86a0c865e3ab",
"score": "0.58063984",
"text": "def index\n @submissions_unmatched = Submission.order('created_at DESC').where('person_id is ?', nil)\n @submissions = Submission.paginate(page: params[:page]).order('created_at DESC').includes(:person)\n end",
"ti... |
55d1a03047734447b98d115c70aefd9e | Method to show a review brings comments in with it and also formats the review info to indicate if ti belongs to current user | [
{
"docid": "aee7eebed4e1d357526851d260c8b6bb",
"score": "0.7376557",
"text": "def show\n @user = current_user\n @review = Review.joins(:movie).includes(:movie)\n .find_by_id(params[:id])\n\n @comments = @review.review_comments.map do |comment|\n if @user != nil\n belongs_to_use... | [
{
"docid": "5fb789eab4861145460f6efe8887ef33",
"score": "0.7114532",
"text": "def show\n @comment = Comment.new\n @comments = @review.comments.order(created_at: :desc)\n @user = User.find(@review.user_id)\n unless @review.nil?\n # %表示\n @rate = { \"達成\" => @review.rate, \"未達成\" => ... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "0406b030b0d1827dfacc71f6c71821ad",
"score": "0.0",
"text": "def set_anonymous_user\n @anonymous_user = AnonymousUser.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... |
076bd1695644a1aa9671bce6d2707c1e | Render the view for the current state. Usually called at the end of a state method. ==== Options :view Specifies the name of the view file to render. Defaults to the current state name. :template_format Allows using a format different to :html. :layout If set to a valid filename inside your cell's view_paths, the curre... | [
{
"docid": "6502b03494e1ac8ce3dde1e714e32bc7",
"score": "0.6794784",
"text": "def render(options={}, &block)\n if options[:nothing]\n return \"\" \n end\n \n if options[:text]\n options.reverse_merge!(:render_children => false)\n end\n \n options.reverse_... | [
{
"docid": "7595a27297306f1f161c2f7ef07846cd",
"score": "0.7621247",
"text": "def render_view_for_state(state)\n view_class = Class.new(ActionView::Base)\n action_view = view_class.new(template_root, {}, @controller)\n action_view.for_cells = true\n\n view_file = find_view_file_for_... |
540a1201bcfc63dcea886e47cc85c459 | Creates a tmp directory on the HDFS filesystem.\n\nAvailable since API v2.\n | [
{
"docid": "acdff25ad437bd7ca3eb93c70ff48036",
"score": "0.0",
"text": "def api_v11_clusters_cluster_name_services_service_name_commands_hdfs_create_tmp_dir_post_with_http_info(service_name, cluster_name, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Callin... | [
{
"docid": "7eee156d5744bb7ffcb054cad175f504",
"score": "0.7672386",
"text": "def create_tmp_folder\n %x{ mkdir -p #{tmp_path} }\n end",
"title": ""
},
{
"docid": "273b5922e1ccaac86a683b6a6782ce68",
"score": "0.7626224",
"text": "def make_tmp_dir\n if(!File.directory... |