query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
6e11562152a097972dc6410e3f2ca475 | Returns the value of attribute if_not_exists | [
{
"docid": "d6308b124b17090163a45d82e6c4035f",
"score": "0.7122428",
"text": "def if_not_exists; end",
"title": ""
}
] | [
{
"docid": "d224e140668d24cbfbddbada7c5d0ae6",
"score": "0.6851578",
"text": "def if_not_exists=(_); end",
"title": ""
},
{
"docid": "d376224c20e09a1ce7722e14974b3c0d",
"score": "0.64880866",
"text": "def does_not_exist!\n @exists = false\n false\n end",
"title": ""
... |
1097a7e7758f08d32addfc88ea3fdcab | GET /users GET /users.json | [
{
"docid": "d0896dfec2c40ae379331cb07034d25a",
"score": "0.0",
"text": "def index\n @users = User.order(:name)\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @users.where(\"LOWER(name) like ?\", \"%#{params[:q]}%\").map{|user| user.as_json.except(\"p... | [
{
"docid": "9f7c735ace683c5c2b12c914cc9ad8a8",
"score": "0.84081405",
"text": "def get\n users = User.all.as_json\n render(json: users.as_json, status: :ok)\n end",
"title": ""
},
{
"docid": "543509c6588e2f79a8dbcd1cdcdaf7b9",
"score": "0.836071",
"text": "def users\... |
a5dce20aa10dd510dba5266b51d2e795 | Log in as a particular agent. | [
{
"docid": "8d94ed2b69238bf80ef45ce3493781ad",
"score": "0.7805113",
"text": "def log_in_as(agent)\n session[:agent_id] = agent.id\n end",
"title": ""
}
] | [
{
"docid": "89b151f5e167bbb77cbbf2c335531fb7",
"score": "0.7641982",
"text": "def log_in_as(agent, password: 'password', remember_me: '1')\n post agents_login_path, params: { session: { email: agent.email,\n password: password,\n ... |
950ae126dc2a45ede205e31de6dafbfd | Builds a List flush to +margin+ | [
{
"docid": "b8572fcdfcf08a9589379803cf208fd3",
"score": "0.74732697",
"text": "def build_list margin\n p :list_start => margin if @debug\n\n list = RDoc::Markup::List.new\n\n until @tokens.empty? do\n type, data, column, = get\n\n case type\n when :BULLET, :LABEL, :LALPHA, :NOTE,... | [
{
"docid": "f88079b9a6b203dc46c7874d55b4dbb1",
"score": "0.7264258",
"text": "def build_list margin\n p :list_start => margin if @debug\n\n list = RDoc::Markup::List.new\n label = nil\n\n until @tokens.empty? do\n type, data, column, = get\n\n case type\n when *LIST_TOKENS the... |
2ffdeb95bb33df639c66784d88cf0d23 | gain_power, should take an argument of a number and INCREASE the power_level by that number | [
{
"docid": "762f38f47d4141dbb3c9b692827e128c",
"score": "0.75000083",
"text": "def gain_power(num1, num2)\n puts num1 + num2 # <=something is wrong here...\n # how to reference variable power_level?\n end",
"title": ""
}
] | [
{
"docid": "aebca67ada34adba2d24042ff72865f9",
"score": "0.88253075",
"text": "def gain_power(number)\n @@power_level = @@power_level + number\n end",
"title": ""
},
{
"docid": "9434d573cd05212ca3ed67e67f56d5d1",
"score": "0.82448596",
"text": "def gain_power(i)\n power_le... |
8b799d6c18bbbce64db563e27e727b95 | By default just return a HTTP status code and an empty response | [
{
"docid": "0be64acb42e1b623966c51be8a9d7b9a",
"score": "0.0",
"text": "def default_page_out_of_bounds_response\n head :bad_request\n end",
"title": ""
}
] | [
{
"docid": "cdf8590b9796c16bc11f3cd098a417f0",
"score": "0.79420614",
"text": "def default_status\n 200\n end",
"title": ""
},
{
"docid": "cdf8590b9796c16bc11f3cd098a417f0",
"score": "0.79420614",
"text": "def default_status\n 200\n end",
"title": ... |
45eddeac48fb3afffbf25234bc472c2a | :callseq: def_single_delegator(accessor, method, new_name=method) Defines a method _method_ which delegates to _accessor_ (i.e. it calls the method of the same name in _accessor_). If _new_name_ is provided, it is used as the name for the delegate method. Returns the name of the method defined. | [
{
"docid": "1a5e85120939b69dc89f0d09c123aae3",
"score": "0.7471794",
"text": "def def_single_delegator(accessor, method, ali = method)\n gen = Forwardable._delegator_method(self, accessor, method, ali)\n\n ret = instance_eval(&gen)\n singleton_class.__send__(:ruby2_keywords, ali) if RUBY_VERSIO... | [
{
"docid": "2359de536c4932bdedc56bbc4615df82",
"score": "0.66777164",
"text": "def define_delegator(method_name)\n target_name = @target_name\n @scope.send(:define_method, method_name) do |*args|\n send(target_name).public_send(method_name, *args)\n end\n end",
"title": ""
... |
b558a9de29444c5368d92e34dc30b0e8 | Returns provider class responsible for Spree payment method action implementations. | [
{
"docid": "bba2f9198044ed084a2539d55cfda1ff",
"score": "0.67842466",
"text": "def provider_class\n ::Spree::PAYONE::Provider::Payment::OnlineBankTransfer\n end",
"title": ""
}
] | [
{
"docid": "788a72deb0684a4043e6dae46088667b",
"score": "0.7195949",
"text": "def provider_class\n Spree::PayU::Provider\n end",
"title": ""
},
{
"docid": "4ef01032f216d6a2388f1848f13ead51",
"score": "0.71931016",
"text": "def provider_class\n ::Spree::PAYONE::Provider::... |
281f6a5a0759b8d3a68098dc26379c7c | Launch School 101109 Small Problems Exercises (2nd time through) | [
{
"docid": "699d3ec4784d5f646b043235e21d298b",
"score": "0.0",
"text": "def word_cap(str)\n str.split.map { |element| element.capitalize }.join(' ')\nend",
"title": ""
}
] | [
{
"docid": "1517341070b97466b43a18633f066374",
"score": "0.67007124",
"text": "def exercise_119 (number)\n end",
"title": ""
},
{
"docid": "ba17e15839a624ee4b18b1c7ddad7f07",
"score": "0.6555063",
"text": "def problem_8\nend",
"title": ""
},
{
"docid": "83e9a7757aeca... |
8caa4bd6a33f826e9e793501b213617d | PACKAGING ============================================================ Load the gemspec using the same limitations as github | [
{
"docid": "a943c95dab1eefe489366cdb56b7f9f6",
"score": "0.65290236",
"text": "def spec\r\n @spec ||=\r\n begin\r\n require 'rubygems/specification'\r\n data = File.read('ruby-batch.gemspec')\r\n spec = nil\r\n Thread.new { spec = eval(\"$SAFE = 3\\n#{data}\") }.join\r\n spe... | [
{
"docid": "0b9906f29743ae580ad7150a3179cc01",
"score": "0.7705445",
"text": "def gemspec; end",
"title": ""
},
{
"docid": "0b9906f29743ae580ad7150a3179cc01",
"score": "0.7705445",
"text": "def gemspec; end",
"title": ""
},
{
"docid": "0b9906f29743ae580ad7150a3179cc01",
... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "399e5ae50d247564b5553d8aa92bf763",
"score": "0.0",
"text": "def update!(**args)\n @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)\n @language_code = args[:language_code] if args.key?(:language_code)\n @mid = args[:mid] if args.key?(:mid)\n ... | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.73066413",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72631145",
"text": "def update... |
a413ef030d3232205851cf5ad47c8703 | GET /users/1 GET /users/1.xml | [
{
"docid": "616cbe3bdafeb00a545222e8ddef1e20",
"score": "0.0",
"text": "def show\n redirect_to users_path\n \n end",
"title": ""
}
] | [
{
"docid": "156ffeeb9dfbc9b33c5e4e53037c1d05",
"score": "0.72072804",
"text": "def index\n @users = LinkedData::Client::Models::User.all\n respond_to do |format|\n format.html\n format.xml { render xml: @users.to_xml }\n end\n end",
"title": ""
},
{
"docid": "78c91061ae58... |
c46c69176be67e185ee37644f1de7aa6 | Generates random name suffix, an academic degree | [
{
"docid": "106b31bd586b6368fd566f6a786d8afa",
"score": "0.0",
"text": "def suffix\n fetch_sample(SUFFIXES)\n end",
"title": ""
}
] | [
{
"docid": "31fcb7e043c7643a612be4ec8698ed20",
"score": "0.74953425",
"text": "def random_name\n letters = ('AA'..'ZZ').to_a.sample()\n digits = ('000'..'999').to_a.sample()\n letters + digits\n end",
"title": ""
},
{
"docid": "9cefba15cf6b0a12b49a98cc9a61242b",
"... |
a89599796715e9b3a33b4e8286e88d0d | Constructor for the FA | [
{
"docid": "b4f962323791f85a3228ff718cbca83f",
"score": "0.0",
"text": "def initialize\n @start = nil \t\t# start state \n @state = { } \t\t# all states\n @final = { } \t\t# final states\n @transition = { }\t# transitions\n @alphabet = [ ] \t# symbols on transitions\n ... | [
{
"docid": "ac05a838d851efbfb535e00ea7d0d628",
"score": "0.6864821",
"text": "def initialize a, f\n @a = a\n @f = f\n end",
"title": ""
},
{
"docid": "7a035e7b1fa5cf1ebf9948011d3f4cf5",
"score": "0.646923",
"text": "def initialize(a, b, c, d, e, f)\n\t\t@nombre=a\n\t\t@p... |
d79482f6259c7c9d1d89bf6891ed00a3 | POST /knowledges POST /knowledges.json | [
{
"docid": "a736bda722fba5dc0f6bbc9dcae5cf46",
"score": "0.0",
"text": "def create\n @knowledge = Knowledge.new(params[:knowledge])\n @identities=Identity.all\n @identities_choose=[]\n @timelines_choose=[]\n @timelines=[]\n @categories_choose=[]\n @categories=[]\n if params[:know... | [
{
"docid": "6cffa9126e695912ccf784ae4a2fe952",
"score": "0.60486805",
"text": "def create\n @knowledge = current_user.knowledges.new(params[:knowledge])\n\n respond_to do |format|\n if @knowledge.save\n format.html { redirect_to @knowledge, notice: 'Knowledge was successfully created.'... |
f7453789dd4ab943616835addb6499fe | Removes any clients that have not been updated in the last +expire_after_seconds+ seconds that was set in initialize. | [
{
"docid": "34830bc8401788092cd71e63fc05dd71",
"score": "0.76558226",
"text": "def purge_expired_clients\n oldest_allowed_time = Time.now - @expire_after_seconds\n \n @clients.keys.each do |key|\n if @clients[key].expired?(oldest_allowed_time)\n @reactor.log(:inf... | [
{
"docid": "5bc63be0dbb1556f2dbda1a1d3accdb5",
"score": "0.6053998",
"text": "def clean_expired\n collection.remove({'expires' => {'$lt' => Time.now}})\n end",
"title": ""
},
{
"docid": "021d63e4b4240c70c71af62093a90ba9",
"score": "0.5946069",
"text": "def gc\n now = T... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "a2088fc4ba33b9ba097e031056096619",
"score": "0.0",
"text": "def animal_found_params\n params.require(:animal_found).permit(:image, :specie, :sex, :founddate, :foundplace, :contact, :ps)\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... |
6df3c70fc12cf7d80d2b1a00de5b8ea6 | Permanently remove the data hash associated with the id used in the receiver's creation from permanent storage. | [
{
"docid": "9dd8abe460ceeff4270f8ae81e847f35",
"score": "0.0",
"text": "def remove\n\t\tsuper\n\t\tself.close\n\t\tfile = self.session_file\n\t\tif File.exists?( file )\n\t\t\tFile.delete( file )\n\t\telse\n\t\t\traise Arrow::SessionError,\n\t\t\t\t\"Session file #{file} does not exist in the data store... | [
{
"docid": "012d9c6e0aa81b507714f6c91abbf24d",
"score": "0.68154514",
"text": "def remove_hashcode\n update_attribute(:hashcode, nil)\n end",
"title": ""
},
{
"docid": "b30f1b40efbb7be564a7464d214f7058",
"score": "0.6684911",
"text": "def delete_storage\n Frivol::Helpers.delet... |
8e5f28b68201f44975e53df3cc402ed0 | Adds block content to specified parent UI object (Optional) Only expressions that receive a content block should implement | [
{
"docid": "499c199f640f446fffeeb1e57d55202a",
"score": "0.783177",
"text": "def add_content(parent, &block)\n # No Op by default\n end",
"title": ""
}
] | [
{
"docid": "53a17f3544b3747a07bb1f9de5094a80",
"score": "0.7508222",
"text": "def add_content(parent, expression, &block)\n if block_given? && expression.is_a?(ParentExpression)\n dsl_stack.push(expression.class.dsl)\n parent_stack.push(parent) \n expression.add... |
a04900e46f7bac0ad39ed0c4fc15cd89 | def total_travel_time intCoordinates = JSON.parse(self.coordinates) sum_travel_time = 0 intCoordinates.each_with_index do |coordinate, index| next_coordinate = intCoordinates[index+1] if next_coordinate != nil distance = Haversine.distance(coordinate[0], coordinate[1], next_coordinate[0], next_coordinate[1]).to_miles w... | [
{
"docid": "d14553fff91074895ae9e1ea008a301b",
"score": "0.92407775",
"text": "def total_travel_time\n coordinates = JSON.parse(self.coordinates)\n sum_travel_time = 0\n total_distance = 0\n array = []\n coordinates.each_with_index do |coordinate_pair, index| \n ... | [
{
"docid": "0f0a3efc4ab31041b0dce580314c1a4c",
"score": "0.69659853",
"text": "def scanDistTimeSpeed(json)\n tripPos = json['tripPos'] ;\n pickUpPos = Geo2D::Point.sureGeoObj([tripPos['pickUp']['x'],\n tripPos['pickUp']['y']]) ;\n dropOffPos = Geo... |
7dd4dcaa2dc9a8c09c4f297120316d97 | POST /assignments POST /assignments.json | [
{
"docid": "f70c773d3c406ba83be07d0b52cc718d",
"score": "0.6649831",
"text": "def create\n respond_to do |format|\n if @assignment.save\n format.html { redirect_to @assignment, :notice => 'Assignment was successfully created.' }\n format.json { render :json => @assignment, :status ... | [
{
"docid": "6036033b73732a6b5794f660654178da",
"score": "0.69726187",
"text": "def create\n @assignment = Assignment.new(assignment_params)\n @assignment.creator_id = current_user.id\n\n # THIS IS ONLY FOR CREATING ASSIGNMENT FOR THE VERY FIRST TIME\n # if users wants to add more users to th... |
bd4cf333ee35bb4dd18a348402b1c15b | Define a pluralization exception. ==== Parameters singular:: singular form of the word plural:: plural form of the word | [
{
"docid": "9e6e951840d2549c915e2a931a79bff0",
"score": "0.62609106",
"text": "def plural_word(singular, plural)\n @plural_of[singular] = plural\n @plural_of[singular.capitalize] = plural.capitalize\n end",
"title": ""
}
] | [
{
"docid": "abdb6a516f9ec7670aaea96f7f8457d6",
"score": "0.6980499",
"text": "def pluralize\n self[-1] == 's' ? \"#{self}es\" : \"#{self}s\"\n end",
"title": ""
},
{
"docid": "8a0ba4ced60536b8af493ba20f0dadee",
"score": "0.6857458",
"text": "def pluralize(singularStr, num)\n i... |
01c22ac2a0f1e976505f7d1ce830fe19 | Sets network objects in order to connect to the endpoint. | [
{
"docid": "4ac1fed9578dd2e8b394f92d3701896c",
"score": "0.0",
"text": "def set_request(endpoint)\n puts \"\\nSet request to: #{endpoint}\\n\\n\"\n @url = URI(endpoint)\n @http = Net::HTTP.new(@url.host, @url.port)\n @http.use_ssl = true\n @request = Net::HTTP::Get.new(@url)\n ... | [
{
"docid": "946d26095238735115035d061764a127",
"score": "0.6690845",
"text": "def connect\n networks = @networks.select {|network| not network.connected? }\n \n EventMachine.run do\n networks.each do |network|\n network.delegate = self\n network.connect\n e... |
a2ac6fe7650fac4bde3584011441ddfc | The response code of the request. | [
{
"docid": "35df2b67591fbeb171be29854d9568e3",
"score": "0.87216306",
"text": "def response_code\n @status\n end",
"title": ""
}
] | [
{
"docid": "b9751edda8e7229698f9b9db8744e3ec",
"score": "0.8795517",
"text": "def response_code\n status_code\n end",
"title": ""
},
{
"docid": "4d4b8155b46a4478597bf871939d8723",
"score": "0.8734735",
"text": "def code\n http_response.code\n end",
"title": ""... |
c76b86561ac36e4721c3199630406fe0 | Registers an instance of a CFSM with the event_class processor. Used by the constructor of the CFSM. | [
{
"docid": "04de489edf70d270344a12632996ae05",
"score": "0.6211793",
"text": "def register_cfsm( cfsm )\n ( @cfsms[ cfsm.class ] ||= Array.new ).push( cfsm )\n end",
"title": ""
}
] | [
{
"docid": "5cece65ac9b3f3d4b6fd44b15da016c4",
"score": "0.6230226",
"text": "def register_events(klass, state, other_params, &exec_block)\n @klass_being_defined = klass\n @state_being_defined = state\n\n # if an initial state has not been set, then set it. In practice, means the first st... |
05750c63a913adcde29e8e243ec9d716 | GET /gameboards/1 GET /gameboards/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "62cf92c5a4f7380a3ff1ce83344065cd",
"score": "0.75478655",
"text": "def show \n boardgame = Boardgame.find(params[:id])\n render json: boardgame\n end",
"title": ""
},
{
"docid": "d42a1d54643e99fd934c51eb9822091b",
"score": "0.7522744",
"text": "def show\n... |
520eb00634469947009ff41e86400aa9 | Whether objects are identical to each other | [
{
"docid": "f210b6589b67fc4dd2065be8a64142e4",
"score": "0.0",
"text": "def eql?(other)\n self.class == other.class && self == other\n end",
"title": ""
}
] | [
{
"docid": "784c435f8fc805781a2152d0f854d335",
"score": "0.79315263",
"text": "def identical?; end",
"title": ""
},
{
"docid": "784c435f8fc805781a2152d0f854d335",
"score": "0.79315263",
"text": "def identical?; end",
"title": ""
},
{
"docid": "2650044e29f8cfdcfb568fed6dbd... |
fb21e84afbf049a83576bca345f5c927 | Ensures that the default rule obeys its assertion | [
{
"docid": "54fea75f8ac9d2b54d5ac18f8833ca02",
"score": "0.6161613",
"text": "def test_default_assert\n @acl.deny!(nil, nil, nil, MockAssertion.new(false))\n assert_equal true, @acl.allowed?\n assert_equal true, @acl.allowed?(nil, nil, 'some_privilege')\n end",
"title": ""
}
] | [
{
"docid": "2051eda4cb05a2ac58610d3830f3ec4d",
"score": "0.6697004",
"text": "def test_default_rule_set\n @acl.allow!\n assert_equal true, @acl.allowed?\n @acl.deny!\n assert_equal false, @acl.allowed?\n end",
"title": ""
},
{
"docid": "a5b64e1dda7970d0b08f303a8e39685b",
"sc... |
c562f7b0b54f87a7aaeb2607de52d952 | Decode the numeric character reference, such as 8212, to a Unicode glyph so it may be used in an XPath expression. Examples decode_char 60 => "<" Returns the decoded String that corresponds to the numeric character reference | [
{
"docid": "7d1f98df5f5d38df63344d3df6d19b59",
"score": "0.6390701",
"text": "def decode_char number\n [number].pack 'U1'\n end",
"title": ""
}
] | [
{
"docid": "edecbbdf32101f4922143eb9b9f0e936",
"score": "0.74728674",
"text": "def decode_char(char)\n char_value = char.ord\n value = DECODING_TABLE[char_value - 45]\n\n raise ArgumentError, 'Invalid encoding' if value.nil? || value.negative?\n\n value\n end",
"title": ""
}... |
9f20d257dd5a8fba8c5a0052b2c31674 | Throw an exception if dependencies are found. We only return the dependency list since we throw an exception on circular dependencies. | [
{
"docid": "4d18f6c1421280ebf80402c41b525ff2",
"score": "0.0",
"text": "def resolve!\n dl, cl = resolve\n raise GraphException(\"Circular Dependency Detected: %s\" % cl) unless cl.nil?\n dl\n end",
"title": ""
}
] | [
{
"docid": "8687a56b4c4eb9f08506a4901bc3541a",
"score": "0.67496675",
"text": "def enumerate_dependencies\n raise DependencyEnumerationNotImplementedError\n end",
"title": ""
},
{
"docid": "f93b184e43f67a6ac4cab151aef1f42b",
"score": "0.6612601",
"text": "def dependencies... |
94aca09564789f1a0194663c6c09aea0 | Some properties shouldn't be included in an allprop request but it's nice to do some sanity checking so keeping a list is good | [
{
"docid": "11c2425cbaf4be0d0f48a10e4b7a4949",
"score": "0.0",
"text": "def properties\n gather_properties(false).inject([]) do |ret, (namespace, proplist)|\n proplist.each do |prop|\n ret << { name: prop, ns_href: namespace, children: [], attributes: [] }\n end\n ... | [
{
"docid": "3341ffc02e345084985698572147f185",
"score": "0.6794829",
"text": "def get_all\n props=available_properties\n get *props\n end",
"title": ""
},
{
"docid": "223462d937720213a6e765807e99d15c",
"score": "0.6675078",
"text": "def list_invalid_properties\n invalid_p... |
ccf61930ca8d0c8099475160f6130678 | Delete an Existing Section and Its Associated Rules Removes serviceinsertion section from the system. ServiceInsertion section with rules can only be deleted by passing \"cascade&x3D;true\" parameter. | [
{
"docid": "d8e2fa29e485959d056920a846d1d109",
"score": "0.6364848",
"text": "def delete_service_insertion_section_with_http_info(section_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ManagementPlaneApiServicesServiceInsertionApi.delete_serv... | [
{
"docid": "7ef9ebdbecb974c09aaf4bbde1bb251d",
"score": "0.6895533",
"text": "def delete_service_insertion_section(section_id, opts = {})\n delete_service_insertion_section_with_http_info(section_id, opts)\n nil\n end",
"title": ""
},
{
"docid": "310e605381801743f38fc1d66a949d28... |
955682ca468c5e008cd668bc3b2b61f7 | Public: View partner's root admin detail by click root admin email/username Examples | [
{
"docid": "b9d71911f439ba325b14573932e3bcd0",
"score": "0.65548337",
"text": "def view_root_admin_detail(search_key)\n find(:xpath, \"//a[text()='#{search_key}']\").click\n end",
"title": ""
}
] | [
{
"docid": "18bcfc546e7246be8308a9aa7642dc6b",
"score": "0.6841317",
"text": "def go_to_admin_page\n user_name.click\n admin_link.click\n end",
"title": ""
},
{
"docid": "ab6175b2205d44702c610bd36ce9fbfd",
"score": "0.67544657",
"text": "def display_resource(admin)\r\n ... |
44a8ceed87759deb1c5b978051c7c717 | Never trust parameters from the scary internet | [
{
"docid": "05f488b59593c3742ca2bf3a8112c759",
"score": "0.0",
"text": "def survey_assignment_params\n params.require(:survey_assignment)\n .permit(:survey_id, :send_before, :send_date_relative_to,\n :send_date_days, :courses_user_role, :published,\n :follow... | [
{
"docid": "18afb42e150844bd18f1e85299b3d366",
"score": "0.6356325",
"text": "def magic_params_not_truly_understood\n \"timekey=1&custom_search=0\"\n end",
"title": ""
},
{
"docid": "da6c876ecbcaca1e732b80b99d350d30",
"score": "0.63462347",
"text": "def query_string_ignore; e... |
58aa81f219e0a96ac5e60eb98b67d927 | Delete the specified option. Just a shortcut for settings.set(:name, nil). | [
{
"docid": "60e61822f80ed821cecb536111a73c16",
"score": "0.6280896",
"text": "def remove(name)\n set(name, nil)\n end",
"title": ""
}
] | [
{
"docid": "d230f7e31193ea84fc9d187b79be3de2",
"score": "0.77402306",
"text": "def delete_option(name)\n if option = options(:reload).find_by_name(name.to_s)\n option = option.destroy\n options(:reload)\n option\n end\n end",
"title": ""
},... |
69b1e6c7708c56c4ef98b6ecbcb3c0cd | HACK: hacky implementation right here right now | [
{
"docid": "10923fa54cf139e10fcc7a354f527ffc",
"score": "0.0",
"text": "def mod_codes\n return @mod_codes if @mod_codes\n\n @mod_codes = []\n snapshots.each do |s|\n s.content.each.each do |i|\n i.mod_codes.each do |mod_code|\n @mod_codes << {:mod_code => mod_co... | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.665668",
"text": "def private; end",
"title": ""
},
{
"docid": "bc658f9936671408e02baa884ac86390",
"score": "0.5860367",
"text": "def anchored; end",
"title": ""
},
{
"docid": "0b8b7b9666e4ed32bfd448198778e4e9",
... |
586c088d6db5fa0fcf9ae87c115e4935 | Helpers that provide the final structure of an offering plus related answers for each question: | [
{
"docid": "d8de669e657b587ed9d65ca6da63ee8e",
"score": "0.52268994",
"text": "def report_json(answers)\n runnable = @offering.runnable\n if @activity_id\n runnable = Activity.find(@activity_id)\n end\n\n if runnable.is_a?(ExternalActivity) && runnable.template\n runnable = runnab... | [
{
"docid": "e5efe40aec12f6ef25798af238bbed64",
"score": "0.64362586",
"text": "def answers\n record_collection.map.with_index(1) do |person, index|\n [\n Separator.new(\"#{name}_index_title\", index:),\n FreeTextAnswer.new(:person_full_name, person.full_name),\n ... |
731df24d5dbab592a4f72150bdbe24e7 | PUT /prizes/1 PUT /prizes/1.json | [
{
"docid": "97510980040b29e497414e4b4f648db0",
"score": "0.61921686",
"text": "def update\n @prize = Prize.find(params[:id])\n\n respond_to do |format|\n if @prize.update_attributes(params[:prize])\n format.html { redirect_to @prize, notice: 'Prize was successfully updated.' }\n ... | [
{
"docid": "a4530fa50876643fa2a05de5c23da8fb",
"score": "0.61975837",
"text": "def update\n respond_to do |format|\n if @prize.update(prize_params) && @prize.inventory.update(qty_available: @prize.qty_available)\n format.html { redirect_to admin_prize_path(@prize), notice: t(:updated, sco... |
bb8131918eada115df5f38c2d11da645 | validates :customer_company_id , presence: true validates :name , presence: true validates :first_last_name , presence: true | [
{
"docid": "08a56e0ed39bd6263f7a3a0b473086cf",
"score": "0.0",
"text": "def full_name\n \"#{name} #{first_last_name} #{second_last_name}\"\n end",
"title": ""
}
] | [
{
"docid": "6ee7fb0848477ec634cea019c17ee8cc",
"score": "0.66956395",
"text": "def valid_attributes\n {\n company_id: company.id\n }\n end",
"title": ""
},
{
"docid": "66bbe03605106d05337f1fb310f5b92c",
"score": "0.6668644",
"text": "def validate\n validates_presence... |
c244f9b88e3541335f3b215f1546f9f6 | FIXME: Urgh. Global variables. Need to eliminate these! | [
{
"docid": "7fd2e22f13428d59a448fd3b198b687b",
"score": "0.0",
"text": "def reset_global_classes\n SheetNames.instance.clear\n SharedStrings.instance.clear\n end",
"title": ""
}
] | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.7150872",
"text": "def private; end",
"title": ""
},
{
"docid": "3d8e32cf91d050f42553f552c35f4cee",
"score": "0.6874897",
"text": "def global; end",
"title": ""
},
{
"docid": "0b8b7b9666e4ed32bfd448198778e4e9",
... |
a678e3f7895f8eddfe67277701111d2b | POST /direccionusuarios POST /direccionusuarios.json | [
{
"docid": "69456168db1eeffe0d9602cd1db7af4a",
"score": "0.65892506",
"text": "def create\n @direccionusuario = Direccionusuario.new(params[:direccionusuario])\n\n respond_to do |format|\n if @direccionusuario.save\n format.html { redirect_to @direccionusuario, notice: 'Direccionusuari... | [
{
"docid": "5c59423470262fe98adee25cde455b9e",
"score": "0.6440713",
"text": "def create\n params[:direccion][:usuario_id] = current_usuario.id\n\n format_direccion_params\n\n @direccion = Direccion.new(params[:direccion])\n\n if @direccion.save\n render 'direcciones/show'\n ... |
7ff92862c76b55b5a3014b17e39f63de | POST /catalogs POST /catalogs.json | [
{
"docid": "aceac9bec1f337ccf3638afb427a35a4",
"score": "0.60797757",
"text": "def create\n @catalog = Catalog.new(catalog_params)\n @catalog.textbook_id = session[:textbook_id]\n @catalog.user_id = current_user.id\n\n respond_to do |format|\n if @catalog.save\n session[:new_cata... | [
{
"docid": "92dd45ef71df8a96ffaca939d7ede19a",
"score": "0.7375994",
"text": "def create\n @catalog = Catalog.new(catalog_params)\n\n respond_to do |format|\n if @catalog.save\n format.html { redirect_to '/catalogs', notice: 'Catalog was successfully updated.' }\n format.json { ... |
1bcbaeb5a86c12e7b7234ede828475a0 | Extracts a players name. It's slightly more complicated because so many players were scattered by the desert | [
{
"docid": "872bba71c39948c84f401decef1938b7",
"score": "0.67759967",
"text": "def getName(player)\n if player[\"permAttr\"].include?(\"SCATTERED\")\n player[\"state\"][\"unscatteredName\"]\n else\n player[\"name\"]\n end\nend",
"title": ""
}
] | [
{
"docid": "617edf1b8e4fa673c56efd148c30a079",
"score": "0.72701997",
"text": "def getPlayerNames(players)\n players.collect do |player|\n player.name\n end\n end",
"title": ""
},
{
"docid": "57a992302e54c667da6ab405d1e2727e",
"score": "0.7250427",
"text":... |
8cf6bb133874553981634d5d85ef5517 | GET /servers/1 GET /servers/1.json | [
{
"docid": "5d95bfbe4e74ab1938a9a2d0b9549818",
"score": "0.65457726",
"text": "def show\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @server }\n end\n end",
"title": ""
}
] | [
{
"docid": "5470e53212426fc808d7cf3d24680747",
"score": "0.77584976",
"text": "def servers\n response = get \"server\"\n data = JSON.parse response.body\n data[\"servers\"][\"server\"]\n end",
"title": ""
},
{
"docid": "9169d5bb8ca2efc7681814498e1c0242",
"score": ... |
b9d3188b09afdd5cea9c081978d840a5 | Test for getting drawin objects | [
{
"docid": "531fab95ab6a922d14cf6e112c2bf311",
"score": "0.5479201",
"text": "def test_get_document_drawing_objects\n filename = 'test_multi_pages.docx'\n remote_name = 'TestGetDocumentDrawingObjects.docx'\n\n st_request = PutCreateRequest.new remote_test_folder + test_folder + '/' + remo... | [
{
"docid": "a4a4b82c76cbddb926dd3cca12da96a8",
"score": "0.61519283",
"text": "def drawings; end",
"title": ""
},
{
"docid": "abca22c0896b784cf06e5a838c1caeed",
"score": "0.5837669",
"text": "def has_drawing?; end",
"title": ""
},
{
"docid": "a4ca3ff95947eefa961d4a72aaa73... |
3d1afdfcb03b8d6dbcc7fd74d177adff | PATCH/PUT /tuition_statuses/1 PATCH/PUT /tuition_statuses/1.json | [
{
"docid": "e687b32242f4ecac9a8607da1aa489da",
"score": "0.6785879",
"text": "def update\n respond_to do |format|\n if @tuition_status.update(tuition_status_params)\n format.html { redirect_to @tuition_status, notice: 'Tuition status was successfully updated.' }\n format.json { ren... | [
{
"docid": "b212ededef956ae42fe3057638e2e119",
"score": "0.6890222",
"text": "def update\n @status = current_user.statuses.find(params[:id])\n if params[:status] && params[:status].has_key?(:user_id)\n params[:status].delete(:user_id) \n end\n respond_to do |format|\n if @status.up... |
496be75c61cf5a359a2a78518af94bbd | Submission Details 29 / 29 test cases passed. Status: Accepted Runtime: 132 ms Submitted: 0 minutes ago You are here! Your runtime beats 50.00% of ruby submissions. Even Steven | [
{
"docid": "49351c065057dea1aed83925f02dff2e",
"score": "0.0",
"text": "def word_break(s, word_dict)\n result = []\n dictionary = word_dict.inject({}) { |acc, x|\n acc[x] ||= true\n acc\n }\n\n n = s.size\n can_break = Array.new(n + 1) { false }\n can_break[n] = true\n ... | [
{
"docid": "359faf4bb738944cd4ea5220166509dc",
"score": "0.6687641",
"text": "def mt_51_char_first_name\r\n# This is a negative test for the Mt4 CI Demo form\r\n $test_count = $test_count + 1\r\n $test_count1 = $test_count \r\n $results.puts \"\"\r\n $results.puts \"Starting MT4 51 char invalid form... |
b98b9637eca93986db156bdd58657a94 | Is local fetching enabled? | [
{
"docid": "34daf0f5ba1290666d7569f954654948",
"score": "0.0",
"text": "def local?\n options[:domain] == :local || options[:domain] == :both\n end",
"title": ""
}
] | [
{
"docid": "94596f687c7ef859ff1a31c358f08429",
"score": "0.7340015",
"text": "def fetchable?\n @fetchable\n end",
"title": ""
},
{
"docid": "af19127511ebfcb65487e32526344ca3",
"score": "0.7317867",
"text": "def fetch?\n true\n end",
"title": ""
},
{
"docid": "... |
c7f608a9990018ecfbd91ff51faf369e | GET Modifies the starting location passed via URL (QR Codes) | [
{
"docid": "54391a3109886bbc00eccf872a964ed5",
"score": "0.53085655",
"text": "def start\n unless params[:location].blank? or cookies[:origin].present?\n params[:location].slice!(0) if params[:location][0].upcase == \"R\" # Remove proceeding R if present\n start_location = params[:location]... | [
{
"docid": "6465891401ffbe939f5bca9ab38a017f",
"score": "0.6063354",
"text": "def qrcode\n \"#{self.short_url}.qrcode\"\n end",
"title": ""
},
{
"docid": "31193e9465170bf8b2ebc15b87df27af",
"score": "0.5992996",
"text": "def show\n @qrcode = Qrcode.find(params[:id])\n para... |
bf37860d5d5cdb186c62f1ecad248971 | List Services for infra Paginated list of Services for infra. | [
{
"docid": "99abc0450421eb106a5e013400bf94f1",
"score": "0.0",
"text": "def list_services_for_tenant_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: PolicyApi.list_services_for_tenant ...\"\n end\n if @api_client.config.c... | [
{
"docid": "1c01d83635a27954cd320212dc87d094",
"score": "0.74385226",
"text": "def index\n @page_count, @services = Locomotive::Service.paginated(:page => (params[:page] || 1).to_i)\n display @services\n end",
"title": ""
},
{
"docid": "43ad96e510b75ddd3460a80ac60a7163",
"sc... |
731eaf0cf0e1a81dc5ca9d86f4c9cc7e | Returns the body of the response of the API Call to get an specific question. Raises QuizException if the status is not 200 | [
{
"docid": "4caea49ebd412474abe47fbd28b5afc8",
"score": "0.7421037",
"text": "def get_question(question)\n questionResp = @connection.get(\"#{Quiz::QUESTION}?id=#{question}\")\n raise QuizException.new(\"Failed to get question, API responded with status #{quizResp.status} and error #{quizR... | [
{
"docid": "c89b8b2a67525ea8fafaecd7feda0479",
"score": "0.7089223",
"text": "def get_question()\n\t\t# build the url\n\t\turl = @base_address + '/question'\n\t\t# make the request, the response will be the return value of the method\n\t\t@question = RestClient.get url\n\tend",
"title": ""
},
{
... |
f6208dd395a2e2e715e8862c16239f6e | if tile has more than one intratile paths, connections using those paths cannot be identified with just a hex name | [
{
"docid": "e75e885b54b28ae3558d68c8a190a120",
"score": "0.5635767",
"text": "def ambiguous_connection?\n @ambiguous_connection ||= @paths.count { |p| p.nodes.size > 1 } > 1\n end",
"title": ""
}
] | [
{
"docid": "c2375129737c0f59406798746458c9e2",
"score": "0.565871",
"text": "def render_path\n # If the star and target are disconnected there will only be one path\n # The path should not render in that case\n unless state.path.size == 1\n state.path.each_key do | cell |\n # Render... |
77cd68afc432558bfcc1543135e1c4a1 | GET /books GET /books.json | [
{
"docid": "b36eb7cf735edc58276235a34a64f516",
"score": "0.0",
"text": "def index\n @raw_query_param = params[:query]\n where_query = \"\n REPLACE(REPLACE(REPLACE(REPLACE(LOWER(books.title), 'č', 'c'), 'š', 's'), 'ž', 'z'), ' ', '') LIKE :query OR\n REPLACE(REPLACE(REPLACE(REPLACE(LOWER(... | [
{
"docid": "0dcef7df140be07467764e06d44a75c9",
"score": "0.7966849",
"text": "def index\n @books = get_books()\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @books }\n end\n end",
"title": ""
},
{
"docid": "60973656e5d53c2355cc3aaa79... |
d062a42f9a9ab80f61c9b105a562fbf7 | DELETE /spring_letters/1 DELETE /spring_letters/1.json | [
{
"docid": "c5fd29d27354c11e4cf31bb6a256403b",
"score": "0.7346637",
"text": "def destroy\n @spring_letter.destroy\n respond_to do |format|\n format.html { redirect_to admin_spring_letters_url, notice: 'Spring letter was successfully destroyed.' }\n format.json { head :no_content }\n ... | [
{
"docid": "46e14a7ccd23f3409079e015a359397f",
"score": "0.72909635",
"text": "def destroy\n @letter.destroy\n respond_to do |format|\n format.html { redirect_to root_path }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "82f414bbc9a50899b62de3... |
a945eb4700ad1eb2984a9e598eb820d5 | Build the JSON response | [
{
"docid": "14d87e6db05f4eca8c33ade5f2ceb23e",
"score": "0.60626704",
"text": "def json_response(entry, status = 200)\n json = entry_submission.to_json(entry)\n render_response(json, status, 'application/json')\n end",
"title": ""
}
] | [
{
"docid": "3564da23cd25c49c23851e955e2a6a84",
"score": "0.76296294",
"text": "def build_response\n { status: :success, data: {} }\n end",
"title": ""
},
{
"docid": "37647cc0104b859dcb53b1256cb2781f",
"score": "0.71188194",
"text": "def build_response\n enrich_object... |
83d3131d948284a082809818793fe125 | PUT /feedbacks/1 PUT /feedbacks/1.json | [
{
"docid": "d97fd66c7d8019c07e552de6def88213",
"score": "0.71118873",
"text": "def update\n @feedback = Feedback.find(params[:id])\n\n respond_to do |format|\n if @feedback.update_attributes(params[:feedback])\n format.html { redirect_to @feedback, notice: 'Feedback was successfully up... | [
{
"docid": "d7e3523b3cfdad8e224ae64bf8cbd5a9",
"score": "0.7388445",
"text": "def update\n respond_to do |format|\n if @feedback.update(feedback_params)\n format.json { head :no_content }\n else\n format.json { render json: @feedback.errors, status: :unprocessable_entity }\n ... |
c1aa4376ae3073e328cb338ab4284320 | Refresh the flag if the room doesn't exist or the user list is empty | [
{
"docid": "d57c827b1695abf3937a2a935aa361be",
"score": "0.54776466",
"text": "def refresh_live_status\n # only check if flag is live\n if self.live?\n is_live = NuveHook::Nuve.live_room?(self.hash_token)\n unless is_live\n self.set_status(:pending)\n ... | [
{
"docid": "19e645d571a7f92935cb0df76a386c4e",
"score": "0.7048682",
"text": "def room_empty\n @guest_list.length == 0\n end",
"title": ""
},
{
"docid": "40e86f400d5a6dc7626562bc97d3b8b4",
"score": "0.6960307",
"text": "def no_users_ready!\n RoomUser.where(room_id: id).update_... |
64e30dd5f3109461b953d3bf6826a97a | DELETE /proyectos/1 DELETE /proyectos/1.json | [
{
"docid": "586b2ec4bc191be6d3e9a0fcef469bd0",
"score": "0.7202633",
"text": "def destroy\n @proyecto.destroy\n respond_to do |format|\n format.html { redirect_to proyectos_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.72127426",
"text": "def delete(path)\n begin\n response = client[path].delete :accept => 'application/json'\n rescue Exception => e\n puts e.inspect\n end\n end",
"title": ""
},
{
"docid": ... |
df66ae5493331483970019a5c8b2706d | Creates a new group object to perform operations base_name: is the dn of the base root. Returns a new Group object. Returns nil if the dn is not in the server. | [
{
"docid": "c822b6e19446def4cd4351c778bc2bda",
"score": "0.68426347",
"text": "def group(base_name)\n entry = domain(base_name).bind\n return unless entry\n\n if @virtual_attributes.enabled?\n VirtualGroup.new(self, entry)\n else\n Group.new(self, entry)\n end\n ... | [
{
"docid": "b3b8db5fd486f561f92444f445748df1",
"score": "0.71146464",
"text": "def get_or_create_group(name)\n require_relative 'group'\n Group.new(@api, @api.do_request(\"POST\", get_base_api_path() + \"/groups\", {'name' => name}))\n end",
"title": ""
},
{
"docid": "b3b8db... |
fd304c9e9b10f151c82036d197904bdb | Remove one or more zones from a load balancer. Returns a list of updated availability zones for the load balancer. elb.disable_availability_zones_for_load_balancer("testkd1", "useast1c") => ["useast1a"] | [
{
"docid": "49cc06ec175e142283c66f1b59d683c6",
"score": "0.7716844",
"text": "def disable_availability_zones_for_load_balancer(load_balancer_name, *availability_zones)\n availability_zones.flatten!\n request_hash = amazonize_list(\"AvailabilityZones.member\", availability_zones)\n request... | [
{
"docid": "61a6e4a50c5d992a72c4622b84b420b8",
"score": "0.7996026",
"text": "def disable_availability_zones_for_load_balancer( options = {} )\n raise ArgumentError, \"No :load_balancer_name provided\" if options[:load_balancer_name].nil? || options[:load_balancer_name].empty?\n raise Argu... |
345b3effd08f2eabfff9e1221e450bfa | creates an option object | [
{
"docid": "2a14c8493951d29a9ab31c3e9b4fd030",
"score": "0.6776094",
"text": "def create_option(dichotomy, head = nil, key)\n Option.create(text: add_tool_tip_span(dichotomy), page: @href, head: head, key: key, child_obj:{})\n end",
"title": ""
}
] | [
{
"docid": "78ee74305978eebbaf3f877980dce552",
"score": "0.79122204",
"text": "def new\n @option = Option.new\n end",
"title": ""
},
{
"docid": "8ca3ba96a77502ef7bccdcae5ed70dcb",
"score": "0.7856267",
"text": "def option_from_object obj\n build_option obj, obj\n end",
... |
ae3535f0fc9e85df54911383ab13253e | Simplified mechanism for loading data bag item with some reasonable error handling | [
{
"docid": "7aedc2e3e5b3d52018218cd85d03038c",
"score": "0.0",
"text": "def databag_path_prefix(databag_name, item_id)\n \"databag.#{databag_name}.#{item_id}\"\n end",
"title": ""
}
] | [
{
"docid": "207409e09cdecc45d8fb8199116d65b8",
"score": "0.6661904",
"text": "def load(data_bag, name, opts = {})\n data = {\n 'data_bag' => data_bag,\n 'id' => name\n }.merge(\n Chef::DataBagItem.load(data_bag, name).to_hash\n )\n item = from_hash(... |
b94b0c0671ebf189dac03a75405b0ec6 | action params to Hash example: class FooService < Sails::Service::Base def foo(name, age) you can use params in any instance methods puts params[:name] puts params[:age] end end | [
{
"docid": "f9e4fa2e6f273f78fe6955d4c368476d",
"score": "0.6112161",
"text": "def params\n @params ||= {}\n end",
"title": ""
}
] | [
{
"docid": "a9c7a26321aece97177c8759acb05ab5",
"score": "0.66856587",
"text": "def params() request.params end",
"title": ""
},
{
"docid": "943c3d582e4ec7f3b19ffb26483bf3da",
"score": "0.66654396",
"text": "def params_to_api_args(type)\n args = params.to_unsafe_h.symbolize_keys.... |
5e00386e0eafed4c761d9ccb8a0d9114 | Sends photo consent email message using UserMailer. === Return [TrueClass|FalseClass] Email successfully sent? | [
{
"docid": "e8865deb081739d3bd3ae8ce34e2684b",
"score": "0.8319378",
"text": "def send_photo_consent_mail\n UserMailer.with(user: current_user).consent_email.deliver_now!\n return true\n rescue Exception\n return false\n end",
"title": ""
}
] | [
{
"docid": "26b0be696495e111f3eb16b77ad7c9e3",
"score": "0.67798066",
"text": "def send_admin_photo_email\n Mailer.admin_photo_email(user, business).deliver\n end",
"title": ""
},
{
"docid": "3f85887625148301107246419917a43f",
"score": "0.6744474",
"text": "def new_photo_email(us... |
d4a7fb87a7900f6f800e4fa066584e9e | DELETE /attachments/1 DELETE /attachments/1.json | [
{
"docid": "b2e052f06425905b12675f99faf17f85",
"score": "0.7016565",
"text": "def destroy\n @attachment.destroy\n redirect_to '/examples', notice: 'Attachment was successfully destroyed.'\n end",
"title": ""
}
] | [
{
"docid": "3bd44d013e292eb4ae4e001b644f288b",
"score": "0.7849054",
"text": "def destroy\n @attachment.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "447e3f5d7bd989c5e252406885a31c86",
"score": "0.7847585",
... |
89d107d80fc29c5fdc8d1ad5de786c5d | Performs an absolute mouse move | [
{
"docid": "8b5cd61d74787bba081bf92dd223b3f3",
"score": "0.73486066",
"text": "def absolute(x, y)\n xdo do |xdo|\n Libxdo.xdo_mousemove(xdo, x, y, 0)\n Libxdo.xdo_mouse_wait_for_move_to(xdo, x, y)\n end\n end",
"title": ""
}
] | [
{
"docid": "a0dce69ff003b060d8f805b6ab0661ec",
"score": "0.75613564",
"text": "def mousemove_relative(x, y)\n @logger.info(\"mousemove not supported\")\n end",
"title": ""
},
{
"docid": "0c230786ffcac4a52c3d21715da9e432",
"score": "0.75371945",
"text": "def move_relative x,y\n\t\... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "f0411b8732e0245c679bbd78f36b1d90",
"score": "0.0",
"text": "def set_resource\n @resource = Resource.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
88d7770c060861aaf9fb8894ce9a48d1 | PUT /resarch_carts/1 PUT /resarch_carts/1.json | [
{
"docid": "99ac3993a837c0ff6e13ae56d1deb023",
"score": "0.7475768",
"text": "def update\n @resarch_cart = ResarchCart.find(params[:id])\n\n respond_to do |format|\n if @resarch_cart.update_attributes(params[:resarch_cart])\n format.html { redirect_to @resarch_cart, notice: 'Resarch ca... | [
{
"docid": "8fc0fcb59352fef95d83f7225fc25231",
"score": "0.6948961",
"text": "def update_cart\n @cart.add_item(params[:sku], 1) if params[:q] == \"add\"\n @cart.reduce_qty_of(params[:sku]) if params[:q] == \"reduce\"\n @cart.remove_item(params[:sku]) if params[:q] == \"remove\"\n\n respond_t... |
bd4dd8e50e5a8a8617100ad7849fe6df | crossrecord checks assuming that each permission is >= 0, the sum of them must be > 0 or each would be 0 which would be a useless permissions record | [
{
"docid": "bd337eac5b338778717ab05c4f73d2e7",
"score": "0.63139886",
"text": "def minimum_permissions\n if( to_index + to_create + to_read + to_update + to_delete )== 0\n errors.add( :base, I18n.t( 'permission4_groups.msg.none_given' ))\n end\n end",
"title": ""
}
] | [
{
"docid": "2a0ba05dce9ba51eefcb19cba0671d33",
"score": "0.62183183",
"text": "def dc_user_can(permission, table=params[:table])\r\n if @permissions.nil?\r\n @permissions = {}\r\n add_permissions_for # default permission\r\n table_name = ''\r\n# permission can be set for table or object embedd... |
946f5d26121a47582a2c1b7f2e32dd45 | GET /recipe_lists/1 GET /recipe_lists/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "f9976986d8bfeae0ed90bcbfcce4c437",
"score": "0.7564559",
"text": "def list\n \n recipes = Recipe.all\n render :json => recipes.to_json\n\n end",
"title": ""
},
{
"docid": "af89512af805c0c864dddb3d0c7f8f12",
"score": "0.7298504",
"text": "def index\n @recipe_l... |
dafb7a3fd352432619df1227f6e2500d | Select all user's edges with the relationships required ====== Params: +user_id+:: +Integer+ to find to get edges +relationships+:: +Array+ relationships required to select edges Returns Edges selected | [
{
"docid": "488787e1bfc375dccd1b8e2c57d62df7",
"score": "0.8355454",
"text": "def get_edges(user_id, relationships)\n user = get_user user_id\n return [] if user.nil? \n\n user.edges.select do |e|\n id = (e.origin.id == user.id) ? e.destiny.id : e.origin.id\n\n con... | [
{
"docid": "25d7b9250ddb9f4fc21e091964fc9ff2",
"score": "0.56615156",
"text": "def relationships\n ['user']\n end",
"title": ""
},
{
"docid": "62182d29d8a57aadec47899c2d7c2259",
"score": "0.55388105",
"text": "def target_relationships\n relationships.select { |rel| rel... |
f5db90e31ee3c96fad4b78afdab991d2 | we will insert in database all the subclasses of `mainclass` and possible next matching keys | [
{
"docid": "7523e5ff26c0ff659f7ab9c3add22473",
"score": "0.6651704",
"text": "def insert_subclasses(mainclass)\n subclasses(mainclass).each do |subclass|\n class_instance = instance(subclass)\n request_key = class_instance.request\n breakpoints.insert(request_key, subclass)\n ... | [
{
"docid": "a0279ee6deae7f9aebb100d1cf2d0ff9",
"score": "0.59751487",
"text": "def sti_subclass_added(key)\n if sti_key_array\n key_array = Array(key)\n Sequel.synchronize{sti_key_array.push(*key_array)}\n superclass.sti_subclass_added(key)\n end\n ... |
2389d96397bc35941bcc39971c989c3c | Assigns a connection to the supplied thread, if one is available. The calling code should already have the mutex when calling this. | [
{
"docid": "5e67b54c938147af81f91d0c6d796d03",
"score": "0.7354313",
"text": "def _acquire(thread)\n if conn = available\n @allocated[thread] = conn\n end\n end",
"title": ""
}
] | [
{
"docid": "57fd8fb8a50c2b5a49710bbd48adcf5e",
"score": "0.75386924",
"text": "def assign_connection(thread)\n # Thread safe as instance variable is only assigned to local variable\n # and not operated on outside mutex.\n allocated = @allocated\n do_make_new = false\n to_disconnect = nil\... |
9b8eb8e83bb856e261354f0106add676 | d. Create a method to set ranking, given a ranking value. | [
{
"docid": "b14b45e00d06cdfa38f4dd411e4e3404",
"score": "0.77894044",
"text": "def set_ranking(new_ranking)\n @ranking = new_ranking\n\nend",
"title": ""
}
] | [
{
"docid": "97feea48badd7f499485c79446319571",
"score": "0.81363577",
"text": "def set_rank\n end",
"title": ""
},
{
"docid": "b91bec7185d4c28643d742756a958cbd",
"score": "0.80104357",
"text": "def ranking(rank)\n @ranking = rank\n end",
"title": ""
},
{
"docid": "... |
2fe419bc74305f3ba280f67655e851be | Basic list with symbol to retrieve field, label and value | [
{
"docid": "f21f0598be9371627654f7d7191364de",
"score": "0.0",
"text": "def test_filter_with_meth\n html = filter %w(a b b c e e f), :to_s\n assert_equal %q{<select class=\"filter_select\" id=\"filter-to_s\" name=\"filter[to_s]\" onchange=\";if($('filter_button')) $('filter_button').disabled = fal... | [
{
"docid": "8cd018e364902fd63e3085571b29402e",
"score": "0.67728025",
"text": "def values_label_fields\r\n labels = []\r\n (1..5).each do |i|\r\n labels << @browser.label(id: \"lbl_val_#{i}\")\r\n end\r\n end",
"title": ""
},
{
"docid": "5f9c297ad8a07e2c7440dd9871aa106e",
... |
2c2c446a3acf38675eed928e1cd68856 | Add result type +:mytaxa_scan+ at +base+ (no +_opts+ supported). | [
{
"docid": "ff2c9b897f94cf8274b71b1bca01dc11",
"score": "0.819279",
"text": "def add_result_mytaxa_scan(base, _opts)\n if is_nonmulti?\n return nil unless\n result_files_exist?(base, %w[.pdf .wintax .mytaxa .reg]) or\n result_files_exist?(base, \".nomytaxa.txt\")\n r... | [
{
"docid": "7fbd2b63a6db746aef8c5e3570d78509",
"score": "0.7138686",
"text": "def add_result_mytaxa(base, _opts)\n if is_multi?\n return nil unless result_files_exist?(base, \".mytaxa\") or\n result_files_exist?(base, \".nomytaxa.txt\")\n r = MiGA::Result.new(\"#{base}.json\"... |
2b3dd39cae08415ada6842451c68d506 | Get the page number that the object belongs to | [
{
"docid": "7ed10b3b871e038ae3fd0db70d0ce11a",
"score": "0.63752264",
"text": "def page(order = :id)\n ((self.class.order(order => :desc)\n .pluck(order).index(send(order)) + 1)\n .to_f / self.class.default_per_page).ceil\n end",
"title": ""
}
] | [
{
"docid": "c565283bf5d68a4fae6752ca3a3e77c5",
"score": "0.8130441",
"text": "def PageNo()\n\t\t#Get current page number\n\t\treturn @page;\n\tend",
"title": ""
},
{
"docid": "849515379c7b2ac2018acc5ec0b31f12",
"score": "0.76175594",
"text": "def page\r\n @page || 1\r\n end",
... |
7df0520e4470814658672fc03ebe09a1 | GET /neckalace_energized_bor_x_transformers/1 GET /neckalace_energized_bor_x_transformers/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "560052aba1af4b996d303bcbb9c380be",
"score": "0.7560918",
"text": "def index\n @neckalace_energized_bor_x_transformers = NeckalaceEnergizedBorXTransformer.all\n end",
"title": ""
},
{
"docid": "e991a645fdd59f7b367bb3760c0f7245",
"score": "0.717579",
"text": "def index\... |
87e212cc6bc6f9ccd2e270a7671a2e03 | match ip address prefixlist pre1 pre2 | [
{
"docid": "caa8df55923d7c857f6af75112443dcf",
"score": "0.66533726",
"text": "def match_ipv4_addr_prefix_list\n str = config_get('route_map', 'match_ipv4_addr_prefix_list', @get_args)\n str.empty? ? default_match_ipv4_addr_prefix_list : str.split\n end",
"title": ""
}
] | [
{
"docid": "d3a191a924ae398cf74224bc62cabf9d",
"score": "0.67726487",
"text": "def ip_match_func(*args)\n ip_match(args[0], args[1])\n end",
"title": ""
},
{
"docid": "d95439ad72b96d17a0fadee0e1d6f578",
"score": "0.6273555",
"text": "def match_ipv4_route_src_prefix_li... |
b33e8ba043dc6a77b4423b3af67ae194 | Builds the object from hash | [
{
"docid": "6af36c72c40af81ba5386079e2148e16",
"score": "0.0",
"text": "def build_from_hash(attributes)\n return nil unless attributes.is_a?(Hash)\n self.class.swagger_types.each_pair do |key, type|\n if type =~ /\\AArray<(.*)>/i\n # check to ensure the input is an array given ... | [
{
"docid": "da5b02ceb9bf503ea3a6f61c2d096a77",
"score": "0.80110514",
"text": "def build(hash)\n obj = new\n hash.each_pair do |k,v|\n obj[k] = v if variables[k]\n end\n return obj\n end",
"title": ""
},
{
"docid": "795e2d6be19d924e231b866fbebec323",... |
1e8943998199ff13b2ecece9d92ebc76 | Discard all commands issued after MULTI. Only call this method when `multi` was called without a block. | [
{
"docid": "432a772c6502878f50c8039955347de1",
"score": "0.5161621",
"text": "def discard; end",
"title": ""
}
] | [
{
"docid": "40d20d0e3d843ae701feabe4bf881025",
"score": "0.634083",
"text": "def cancel\n @multi.cancel!\n end",
"title": ""
},
{
"docid": "44ab25b0f8321c60c39ce63c9d12ab6b",
"score": "0.6199845",
"text": "def discard\n send_command([:discard])\n end",
"title"... |
bf1bd5c2f746576786a39e8eb0c2f39b | get a particular address component. Generally :street1, :street2, :city, :state, :zip, :country are supported. This method will return the address as one line if h1 is nil. This is needed to support geocoder geolocation encoding (geocoder will call address, expecting a street address) | [
{
"docid": "44c3a9b24a0f8a693eb310d535435182",
"score": "0.0",
"text": "def [](key)\n self.address_hash[key]\n end",
"title": ""
}
] | [
{
"docid": "e66bc7281d6cf9d3834f48548f31a09f",
"score": "0.71283144",
"text": "def address_one_line\n \"%s, %s, %s %s\" % [self.address_line_1, self.city, self.state_abbr, self.zipcode]\n end",
"title": ""
},
{
"docid": "a348a1d2c27e561b69e5464eddbff719",
"score": "0.6988867",
... |
1df62c0d078e1853bf680b566495fe6b | Determine whether the single address provided is a replica set member. | [
{
"docid": "0897a3afd5a0133e6b6c950b740cdab4",
"score": "0.7807794",
"text": "def single_rs_member?\n ClusterConfig.instance.single_server? && ClusterConfig.instance.replica_set_name\nend",
"title": ""
}
] | [
{
"docid": "f7bd6ae61e47299d62d2ecfc6a922172",
"score": "0.8017018",
"text": "def replica_set_member?\n ok? && !(standalone? || mongos?)\n end",
"title": ""
},
{
"docid": "1ce9b5bf2cc952f837fbc8a6eaf7b43e",
"score": "0.78459996",
"text": "def replicaset?\n replicaset... |
dfaf5fd92ac09fe229ec86946f313e0f | Runs block between paused/resumed on onboard speaker | [
{
"docid": "593da23ae7a047d9d035d12b2d0facd5",
"score": "0.0",
"text": "def priority t=nil, &b\n p DS: default_sink\n default_sink.pause\n b.call\n default_sink.resume\n end",
"title": ""
}
] | [
{
"docid": "aaf21804900a805ca25572c3cc931309",
"score": "0.7253818",
"text": "def pause_inscription\n @paused = true\n end",
"title": ""
},
{
"docid": "4308faa816fadf142955a950ed9646aa",
"score": "0.697977",
"text": "def paused?; end",
"title": ""
},
{
"docid": "4308f... |
c050839e26c108c991d74b16c98382dc | DELETE /projects/1 DELETE /projects/1.json | [
{
"docid": "eb9b0e31953ee63fcb043ee6a331e345",
"score": "0.75030017",
"text": "def destroy\n authorize! :destroy, @project\n @project.destroy\n\n head :no_content\n end",
"title": ""
}
] | [
{
"docid": "2395db8e8b2d56dc1e97347626464cb3",
"score": "0.78940606",
"text": "def destroy\n @project.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "5d7a1cc2cfd84c0e660f50d58157424f",
"score": "0.78581154",
... |
209a425f52666dc7dc71723e40fd3110 | Freeze the app (set using run) and all middleware instances when building the application in to_app. | [
{
"docid": "1f5b1e167accba4e7090accf9220ff31",
"score": "0.790372",
"text": "def freeze_app\n @freeze_app = true\n end",
"title": ""
}
] | [
{
"docid": "0cd24be91688edc87a3ab3a9313c503d",
"score": "0.7904983",
"text": "def freeze_app\n @freeze_app = true\n end",
"title": ""
},
{
"docid": "95401199c6f52ec97ae6ce5116e7d879",
"score": "0.7803469",
"text": "def freeze_app; end",
"title": ""
},
{
... |
801ef02c41743b2ed3390f7b6b20ef20 | Normalize deadline to the end of the day if a date or string is given | [
{
"docid": "e94c03a80ff210e40ed462e6162c30bd",
"score": "0.6637091",
"text": "def deadline=(day_or_time)\n if day_or_time.is_a?(Date) || day_or_time.is_a?(String)\n day_or_time = Time.zone.parse(day_or_time) if day_or_time.is_a?(String)\n day_or_time = day_or_time.end_of_day\n end\n s... | [
{
"docid": "ce35ca124e1d332b6f4f31e4aa30ee8c",
"score": "0.66233164",
"text": "def format_date date\n begin\n DateTime.parse(job_params[:deadline])\n rescue ArgumentError\n nil\n end\n end",
"title": ""
},
{
"docid": "6700d793cd7380d181f0309c1f99953e",
"score": "0.657... |
8074cdc18b22dacc1c9ddf012fb83221 | PUT /relationships/organization_users/1 PUT /relationships/organization_users/1.json | [
{
"docid": "1375b2668eac4514ef43b0b1cf98455f",
"score": "0.6972928",
"text": "def update\n @relationships_organization_user = Relationships::OrganizationUser.find(params[:id])\n\n authorize! :update, @relationships_organization_user\n\n respond_to do |format|\n if @relationships_organizati... | [
{
"docid": "33994b54501b573a293b5a604e476742",
"score": "0.734488",
"text": "def update_user\n validate_params :id, :user\n @user = User.find(params[:id])\n org = params[:user].delete(:own_organization_attributes)\n @user.update_attributes(params[:user])\n @user.own_organization.update_at... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "daaa7e38ee3de917dfe82be8f03e6685",
"score": "0.0",
"text": "def update!(**args)\n @options = args[:options] if args.key?(:options)\n end",
"title": ""
}
] | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.73066413",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72631145",
"text": "def update... |
f359aaa5e3ec03111e0e3c0fac9e8909 | Get a path to the given daybased calendar page, based on the +day_link+ blog setting. | [
{
"docid": "38cd08c12d3af93ba356b578f9fe6f45",
"score": "0.8353715",
"text": "def blog_day_path(year, month, day, blog_name = nil)\n build_url blog_controller(blog_name).calendar_pages.link(year, month, day)\n end",
"title": ""
}
] | [
{
"docid": "908684589e56b885eba42b5a3f5092cc",
"score": "0.8194394",
"text": "def blog_day_path(year, month, day, key=nil)\n sitemap.find_resource_by_path(::Middleman::Blog::CalendarPages.link(blog_controller(key).options, year, month, day)).try(:url)\n end",
"title": ""
},
{
"do... |
bd59375a43e1a4aa0245eb6e1fff8819 | PATCH/PUT /assets/1 PATCH/PUT /assets/1.json | [
{
"docid": "a2d876b6bba2b351a34f71635a771bcf",
"score": "0.66845167",
"text": "def update\n authorize! :update, @asset\n\n respond_to do |format|\n if @asset.update(asset_params)\n format.html { redirect_to @asset, notice: 'Asset was successfully updated.' }\n format.json { head... | [
{
"docid": "b38c8323f10dfd3ed64147cbe3d89ddb",
"score": "0.71421367",
"text": "def update\n @asset = Asset.find(params[:id])\n if @asset.update_attributes(asset_params)\n head :no_content\n else\n render json: @asset.errors, status: :unprocessable_entity\n end\n end",
"title":... |
a482d436f39babc3db7f16575f6265f7 | CE play with dst, json parsing | [
{
"docid": "e6cfa6e213c62c11990b2adad2342224",
"score": "0.57219124",
"text": "def dstParse (num, arr)\n\t\t\trawDst = JSON.parse(arr[num])\n\t\t\tspringDate = rawDst['springForward'].split(\"-\")\n\t\t\tfallDate = rawDst['fallBack'].split(\"-\")\n\t\t\tdstArr = []\n\t\t\tdstArr[0] = springDate[1].to_i\... | [
{
"docid": "35e5a12cd285c0900f90bc69f7f9bd00",
"score": "0.59836185",
"text": "def setup\n a = '{\n \"content\": {\n \"class\": \"batatas\",\n \"assetId\": \"e473a2f7-dc12-42d3-9933-fd5bd67a32e0\",\n \"totalLicenses\": 10,\n \"type\": \"EST\",\n \"offerId\": \"51d4f5d9-ba88-427a-b43... |
1f94ca749460a1a1b42e8bb4d4218ae7 | Saves the spec for the given pod into the spec repo. pod repo push REPO_NAME SPEC_NAME.podspec | [
{
"docid": "560b5aad3f72f9d01bafc689c2809293",
"score": "0.85310274",
"text": "def save_spec(pod)\n file_name = \"#{pod.name}.podspec.json\"\n File.open(file_name, 'w') { |file| file.write(\"#{pod.spec}\") }\n system(\"pod repo push #{$pod_repo_name} #{file_name}\")\n\n # Cleanup spec file\n FileUt... | [
{
"docid": "072bf14b0480c2c7f3cbe9d495c49c55",
"score": "0.65763843",
"text": "def store_podspec(name, podspec, _external_source = false, json = false)\n file_name = json ? \"#{name}.podspec.json\" : \"#{name}.podspec\"\n output_path = specifications_root + file_name\n\n spec =\n c... |
56d6abf27c64d7ee646fdc38e9fa894f | POST /beginners POST /beginners.json | [
{
"docid": "5bbe039ebc71506f27bbfe33cc9edefc",
"score": "0.7478115",
"text": "def create\n @beginner = current_user.beginners.new(beginner_params)\n\n respond_to do |format|\n if @beginner.save\n format.html { redirect_to @beginner, notice: 'Beginner was successfully created.' }\n ... | [
{
"docid": "651f7db17a92fc25fbccf6f99ab7327d",
"score": "0.7196667",
"text": "def create\n @beginner = Beginner.new(params[:beginner])\n\n respond_to do |format|\n if @beginner.save\n format.html { redirect_to @beginner, notice: 'Beginner was successfully created.' }\n format.js... |
578621215ea66306155633d41bfb5f93 | def check_permutation(str1,str2) return false if str1.gsub(/[^azAZ]/,"").chars.sort != str2.gsub(/[^azAZ]/,"").chars.sort true end Check Permutation: Given two strings,write a method to decide if one is a permutation of the other. | [
{
"docid": "c1b754899703300567cb18fb106beba9",
"score": "0.84882283",
"text": "def check_permutation(str1,str2)\n hash = Hash.new 0\n str1.chars.each do |let|\n hash[let] += 1\n end\n str2.chars.each do |let|\n hash[let] -= 1\n return false if hash[let] < 0\n end\n true\nend",
"title"... | [
{
"docid": "cb6a14a661bde8bf6a5fbb89004f6faf",
"score": "0.8917887",
"text": "def check_permutation_brute_force?(str_1, str_2)\n str_1.chars.sort == str_2.chars.sort\nend",
"title": ""
},
{
"docid": "5a20d8b8a69bfc26d248151eaa4227c6",
"score": "0.8898815",
"text": "def is_permutatio... |
8cd0ffaa006c14dd573763f64b744f8a | GET /career_specialties/new GET /career_specialties/new.json | [
{
"docid": "f9b03c96ed73b02bd8fdb0b84a37c74c",
"score": "0.77558345",
"text": "def new\n @career_specialty = CareerSpecialty.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @career_specialty }\n end\n end",
"title": ""
}
] | [
{
"docid": "ad5a9f7045c71ff5ea9272a5be9ddcbc",
"score": "0.728732",
"text": "def new\n @speciality = Speciality.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @speciality }\n end\n end",
"title": ""
},
{
"docid": "b4a12b5e23b9e... |
6885a3d4d92d4bed0ed0d648f79379d2 | click on people tab | [
{
"docid": "236e893b53d737b278ba00027c20fcae",
"score": "0.65973777",
"text": "def clickPeopleLink()\n sleep(5)\n @driver.find_element(:xpath, \"//*[@id='main-content']/nav/div[2]/div/a[3]\").click\n wait = Selenium::WebDriver::Wait.new(:timeout => 10)\n wait.until { @driver.find_ele... | [
{
"docid": "14221d4110ca5e6e5ece54119f0f5bfa",
"score": "0.74167734",
"text": "def click_tab(tab_name)\n tab(tab_name).click\n end",
"title": ""
},
{
"docid": "0d0db9cb84ea2cf02157c3505c24edb7",
"score": "0.6933186",
"text": "def click_on_tab(text)\n find('.app-body .ui-tabs... |
8f2727d2d463887bc7d7d4131d9d273b | =begin Push element x to the back of queue. :type x: Integer :rtype: Void =end | [
{
"docid": "bed0ad1864f8f1544d38b1551f2b8b43",
"score": "0.6981006",
"text": "def push(x)\n old_last = @last\n @last = Node.new(x)\n if(@first == nil)\n @first = @last\n else\n old_last.next = @last\n end\n @size += 1\n end",
"title": ""
}
] | [
{
"docid": "6efe0d99f91c8bd3898e2cc31b0f8270",
"score": "0.8498538",
"text": "def push(x)\n @queue.push(x)\n i = 0 \n while i < @size\n @queue.push(@queue.shift)\n i += 1\n end\n \n @size += 1\n re... |
50f9f185a7e0a4b735aeced6110bd841 | Calculates hash code according to all attributes. | [
{
"docid": "e972597a5d989c54934ccd1abc622413",
"score": "0.0",
"text": "def hash\n [id, start_time, end_time, connected_time, name, user_uri, user_id, external_contact_id, external_organization_id, queue_id, group_id, team_id, queue_name, purpose, participant_type, consult_participant_id, address, ... | [
{
"docid": "08105588814074a5aed46dbb236c8d02",
"score": "0.791457",
"text": "def hash_code; Digest::SHA256.hexdigest(@attributes.values.join); end",
"title": ""
},
{
"docid": "706cbdb4c78e6b67e29589df0a4b1b5c",
"score": "0.73099273",
"text": "def attr_hash\n md5 = Digest::MD5.ne... |
dfc70532da76ddc60610e672485f7dee | Pour mettre dans le rescue des scripts (cf. manuel) | [
{
"docid": "0eff95a6b0648bc595db52f900616272",
"score": "0.0",
"text": "def error e\n log(\"ERREUR: #{e.message}\")\n log(\"BACKTRACE ERREUR: #{e.backtrace.join(RC)}\")\n self << {error: e.message, backtrace: e.backtrace}\n end",
"title": ""
}
] | [
{
"docid": "a11eb7d0088b221901dbf6d963545574",
"score": "0.77387714",
"text": "def rescueing; end",
"title": ""
},
{
"docid": "8f58b306a8219da794fe3b7854794cd1",
"score": "0.71422637",
"text": "def on_rescue(exceptions, variable, statements, consequent); end",
"title": ""
},
... |