query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
c9929eb912034645e7864a3d86aeb1df | takes in an array of active_reccords and restricts the range of dates to those specified in the params | [
{
"docid": "f0d772e99a41fcd75df70d987e7799b9",
"score": "0.7025736",
"text": "def restrict_date_range( objects )\n # set start_date to either passed param, or beginning of time\n start_date = params[:start_date].blank? ? Date.new(0) : Date.strptime(params[:start_date], \"%Y-%m-%d\")\n ... | [
{
"docid": "f511699c881a06eb5347230d29e62b6d",
"score": "0.64511836",
"text": "def get_drs_from_range(start_date, end_date)\n self.delta_requests.select do |dr|\n begin\n dr.start_time > start_date and dr.start_time < end_date\n rescue\n false\n end\n end\n end",
... |
61a9d2a6b7a0cbcb8f3437a4cc4cba9d | Loads from yaml into the corpus. | [
{
"docid": "a91adb2f6732e3c14c7f832ea1543019",
"score": "0.0",
"text": "def add_yaml(fileName)\n\t\ttemp = YAML.load_file fileName\n\t\ttemp.each_pair do |key, value|\n\t\t\tfor val in value do\n\t\t\t\tadd key[0], key[1], val\n\t\t\tend\n\t\tend\n\tend",
"title": ""
}
] | [
{
"docid": "b19516e1228e294002b5a70c74ec8e2b",
"score": "0.7348072",
"text": "def load_yml(filename); end",
"title": ""
},
{
"docid": "64f2042977e9ebfb8561d5622c8679f8",
"score": "0.7324419",
"text": "def load_yaml(filename); end",
"title": ""
},
{
"docid": "f0d871e086c68... |
ec13fb6b917bb3e7a5fee1a5a0c812e0 | Accepts String versions of class names eg. ExampleClass | [
{
"docid": "4235f741d1228836203c405a48f801c3",
"score": "0.0",
"text": "def save_mapping(class_name, mapped_class_name=nil)\n if mapped_class_name\n # Save mapping so we can look it up from both directions\n @map.insert(class_name, mapped_class_name)\n mapped_class_name\n ... | [
{
"docid": "980801e29385ec6d62270104f165eecc",
"score": "0.75225323",
"text": "def string_class(opts)\n opts = check_params(opts,[:class_names])\n super(opts)\n end",
"title": ""
},
{
"docid": "f73a30b882d5324e6e86dae7ee0600f8",
"score": "0.73808086",
"text": "def modify... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "9d5dafcb0ff55ae4efeb2c2c0b734327",
"score": "0.0",
"text": "def set_aradah\n @aradah = Aradah.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;... |
8bd7d12df3ebef25a5e2556a7e01c3b8 | Returns the size of the node, in bytes | [
{
"docid": "af3d056b8fb6e4fe9e48f6c847a5c107",
"score": "0.0",
"text": "def size\n @contents.bytesize\n end",
"title": ""
}
] | [
{
"docid": "2bea480c519d9d28cfbaaafba8516423",
"score": "0.87056416",
"text": "def node_byte_size; end",
"title": ""
},
{
"docid": "e0100b0e05d6f9b3d3af2c58d82055c2",
"score": "0.8616487",
"text": "def size\n @node.size\n end",
"title": ""
},
{
"docid": "426d35e33... |
f51f43560190d0b33e28cd08ac5943e0 | paths inside received data hash to required Pipefy entities | [
{
"docid": "f66822ca271237936ad2d733feff21d0",
"score": "0.0",
"text": "def organization_attributes(data)\n data.except('pipes')\n end",
"title": ""
}
] | [
{
"docid": "0558dad8645b503842ab69dcff8866bd",
"score": "0.5962816",
"text": "def hash\n path.hash\n end",
"title": ""
},
{
"docid": "6b1f29632490e7c866109449295d6525",
"score": "0.5941429",
"text": "def hash\n\t\t\t@path.hash\n\t\tend",
"title": ""
},
{
"docid": "e6b... |
d867f6fae0a6065b2f5613f4e2b99681 | Calculate the width & height of a flash video file using plugin from here | [
{
"docid": "27a4da8ab3e0d3e42a7f75b9f28e69bf",
"score": "0.76894045",
"text": "def flash_dimensions(path)\n instance = ImageSpec.new(@video.attachment.path)\n width = instance.width\n height = instance.height\n return width, height\n end",
"title": ""
}
] | [
{
"docid": "a3fc8785f4c112be5aad702a93c998dd",
"score": "0.72543675",
"text": "def video_dimensions(file)\n dim = Paperclip.run('ffmpeg', '-i :source 2>&1', :source => File.expand_path(file.path), :expected_outcodes => [0,1], :swallow_stderr => false)\n $1 if dim =~ /(\\d+x\\d+)/\n end",
... |
65280308c25615d65c65ea825d56cefb | Public: initialize player at the specified position. window Window at which to draw player's image. relative_position relative coordinates of the player's center. | [
{
"docid": "15044b66b9dcf1378c0e434a9fa73ec2",
"score": "0.7343485",
"text": "def initialize(window, relative_position)\n @relative_position = relative_position\n @image = Gosu::Image.new(window, \"./media/Player.png\")\n super @image.width, @image.height, Gosu::Color::NONE, relative_position\n... | [
{
"docid": "5fb1f00522bb26411848e8d88a6a156a",
"score": "0.6786954",
"text": "def create_player_window\n @player_window = Window_PlayerInfo.new(0, 0, Graphics.width)\n @player_window.player = @player\n end",
"title": ""
},
{
"docid": "644995297e288704f5bf12cdfcedb4c9",
"score": "0... |
c7972e1beed61aec2ecf2b6e41ba15b2 | yell convert the given message to uppercase adds an exclamation point to the end of the given message | [
{
"docid": "e821cedeed1143c52fd69773d997815b",
"score": "0.0",
"text": "def yell(string)\n return string.upcase + \"!\"\nend",
"title": ""
}
] | [
{
"docid": "43a6673740d6771d3f72d90c14a8dbd4",
"score": "0.72369146",
"text": "def yell message\n \"#{message.upcase!}!\"\nend",
"title": ""
},
{
"docid": "8eba4a63ebdf1c8d93d9c8969a5ded7c",
"score": "0.72298473",
"text": "def shout(message)\n return message.upcase\nend",
"ti... |
ce86eed889efd605f9f1d3ee4a5d480c | GET /items/1 GET /items/1.json | [
{
"docid": "2c57598f48c120a5a403ab1f3ac14626",
"score": "0.0",
"text": "def show\n @item = Item.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "41699dd17c12d7e8d1afd1406f087302",
"score": "0.80987954",
"text": "def item(id)\n get(\"/item/#{id}.json\")\n end",
"title": ""
},
{
"docid": "eb354ffc8205e277e16c339add996ccd",
"score": "0.74948645",
"text": "def show\n item = Item.find(params[:id])\n render js... |
2b7c3e9bc5bb07e4902a4974bf2174fd | This method should loop over the array and output each element using puts | [
{
"docid": "b7c360e5991a2b48564ef8ec595cd592",
"score": "0.7329087",
"text": "def output_array(array)\n count = 0\n while count < array.length do\n puts array[count]\n count += 1\n end\nend",
"title": ""
}
] | [
{
"docid": "f3556639343eb12b576b1b5148fa49ed",
"score": "0.8159329",
"text": "def display_arr(arr)\n arr.each do |element|\n print \"#{element} \"\n end\n print \"\\n\"\n end",
"title": ""
},
{
"docid": "f5416a3f04baf675981f7e6573df8d27",
"score": "0.8114814",
"text": ... |
aa11ccc3d9636564eb20ed25fe7b6b6a | Retrieves all the actions for the user with the given Id. This will return all time based actions that are active, and inactive as well as nontime based actions. | [
{
"docid": "29812f7d2a0782f369ce25a608756aa4",
"score": "0.71743006",
"text": "def retrieve_actions(user_id)\n start.uri('/api/user/action')\n .url_parameter('userId', user_id)\n .get()\n .go()\n end",
"title": ""
}
] | [
{
"docid": "1ef3c17a43086ea7ee7d9db5638142cd",
"score": "0.7134462",
"text": "def retrieve_actions(user_id)\n start.uri('/api/user/action')\n .url_parameter('userId', user_id)\n .get()\n .go()\n end",
"title": ""
},
{
"docid": "42c8ad40c42d55eb977ae85c17... |
9d7a29cb360135ffdcea1a9960ccccea | Returns the rows of the specified entity, assuming at least some of the parameters have valid values to perform a WHERE query search. Returns nil in case none of the parameters where useful. | [
{
"docid": "52d6a8b3f21d95cf9c6a5707eeb42d55",
"score": "0.5889447",
"text": "def find_possible_entity_rows( entity, email, first_name, last_name, year_of_birth, logger )\n if email && entity.where( email: email ).count > 0\n entity.where( email: email )\n\n elsif first_name && last_name && y... | [
{
"docid": "47d180fcb430a6de3f3f9488bfbbb7e4",
"score": "0.61585325",
"text": "def where(params)\n results = DBConnection.execute(<<-SQL, params.values)\n SELECT\n *\n FROM\n #{table_name}\n WHERE\n #{sql_criteria(params.keys)}\n SQL\n\n parse_all(results)\n ... |
b30115969a9b05954bd6719206792d34 | vi: set ft=ruby : | [
{
"docid": "7cc0268e471c7c4b952ae405fda0377d",
"score": "0.0",
"text": "def parse_environment(env)\n parsed = { # We may want to change these defaults\n name: \"Oyster\",\n gui: false, # Whether to show a GUI\n cpus: \"1\", # Number of CPUs\n memory: \"512\", # Megabytes\n cpulimit: \"0\... | [
{
"docid": "e3b5aa7fb9019ba714796fec13e3bb5f",
"score": "0.5853188",
"text": "def enable_indent\n \tVim.command(\"set filetype=#{@filetype}\")\n end",
"title": ""
},
{
"docid": "7aa8cf3a94ceb07fde09c2dbbb1bb333",
"score": "0.56426823",
"text": "def default_vimrc\n <<-EOS.uni... |
a8ad2fecfedd7329d841c19120b71ac6 | Create a new Xattr instance with path. Use :no_follow => true in options to work on symlink itself instead of following it. | [
{
"docid": "baf7b12b376dd753121ab08f61b46312",
"score": "0.573661",
"text": "def initialize(path, options = {})\n @path =\n if path.respond_to?(:to_path)\n path.to_path\n elsif path.respond_to?(:to_str)\n path.to_str\n else\n path\n end\n raise Errno::ENOEN... | [
{
"docid": "f3343821c381edb8f7c2984851238aaa",
"score": "0.5561766",
"text": "def mkpath(*args)\n args[0] = {} unless args[0]\n args[0] = args[0].merge(mode: 0700) unless args[0][:mode]\n FileUtils.mkpath(self.to_s, *args)\n end",
"title": ""
},
{
"docid": "53891801986564cd... |
2a739a7874c3fa72bc96a2ea56b126a5 | Returns an RSS feed | [
{
"docid": "15b85e49d8b62bf7eb414e88a9ce8657",
"score": "0.0",
"text": "def read\n begin\n Feedjira::Feed.fetch_and_parse(@url)\n rescue\n false\n end\n end",
"title": ""
}
] | [
{
"docid": "477903bd332bba1a7b18289ac3a70e68",
"score": "0.811082",
"text": "def rss\n @rss ||= build_rss\n end",
"title": ""
},
{
"docid": "6044c23890d92f61e8412d72556ad301",
"score": "0.8088404",
"text": "def get_rss\n #version = \"1.0\" # [\"0.9\", \"1.0\", \"2.0\"]\n... |
39cbe212ba0211096299eee768769416 | Do not use this. Instead, implment self.describe_io in your command subclass, and call the method ActionCommandself.describe_io from within it, returning its result. | [
{
"docid": "4a00526c8a6140f4a8649f17fe1b2d71",
"score": "0.5430987",
"text": "def initialize(action, desc)\n @action = action\n @desc = desc\n @input = []\n @output = []\n\n # universal parameters.\n # input(:help, 'Help on this command', OPTIONAL)\n end",
"title": "... | [
{
"docid": "8e64308f08fbd9ffe921b96bca10da51",
"score": "0.6658012",
"text": "def describe(doc = nil)\n if @current_description\n Actions::Interface.warn(\n \"the last #describe call was not followed by an action \"\\\n ... |
bf4895f84d2e301b4dec8c051dc3a393 | Read a &39;niatelemetry.HttpsAclEpgDetails&39; resource. | [
{
"docid": "e12abaf326b94e1a325e6324cf3ec87b",
"score": "0.48893818",
"text": "def get_niatelemetry_https_acl_epg_details_by_moid_with_http_info(moid, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: NiatelemetryApi.get_niatelemetry_https_acl_epg_d... | [
{
"docid": "3b390753adf670c211c8a87c0a7f15c6",
"score": "0.6198767",
"text": "def readmeta\n read('eai:acl', 'eai:attributes')\n end",
"title": ""
},
{
"docid": "44d8dc9c1f2c9522cdd1db565e4fc521",
"score": "0.5879434",
"text": "def get_niatelemetry_https_acl_epg_details_list_... |
a4da2fdd27eebb80da64ca5362b32975 | Executes the specified action handling errors, logging and debug history. If +log+ is +true+, log the action execution (default behavior). This method if part of the action execution chain and is intended for advanced use (e.g. in complex actions). To execute an Action directly, the exec_action method is preferred. For... | [
{
"docid": "24228cdbf70d74db583316e79dd20809",
"score": "0.6749998",
"text": "def exec_parsed_action(action, args, log = true, text = nil)\n\t\t\taction = get_action(action, args, text)\n\t\t\tret = nil\n\t\t\tif log\n\t\t\t\t@logger.log_cmd(action) do\n\t\t\t\t\tReadline::HISTORY << action.text\n\t\t\t... | [
{
"docid": "381e781b4c3efc8e4acb42a3ce706324",
"score": "0.65063006",
"text": "def log_action actions, opts={}\n make_log_action_call actions, opts\n end",
"title": ""
},
{
"docid": "1042831989a7530ec1898e1005a74962",
"score": "0.5869469",
"text": "def perform(action, options... |
c58db917e2341c2d865cbf7835ce8026 | POST /admin/open_hours POST /admin/open_hours.json | [
{
"docid": "c7b1310095555d3664f245684ff48171",
"score": "0.76889217",
"text": "def create\n @open_hour = OpenHour.new(open_hour_params)\n\n respond_to do |format|\n if @open_hour.save\n format.html { redirect_to [:admin, @open_hour], notice: 'Open hour was successfully created.' }\n ... | [
{
"docid": "282a6639dcd9e461bd8672dfa8cdd0c0",
"score": "0.70030075",
"text": "def open_hour_params\n params.require(:open_hour).permit(:store_id, :day, :open, :close, :valid_from, :valid_through)\n end",
"title": ""
},
{
"docid": "7bcb6962e0e1dbe80ecb0594fe429cd2",
"score": "0.6... |
bfbfbeec378ac7a0c93d0a2c62f3f35b | assumption: you cannot update addresses here, only add new ones or search for old ones | [
{
"docid": "03a09afcacd215524f1bce2f8b3af134",
"score": "0.0",
"text": "def finalize_check_out\n manage_address_create\n\n manage_order_create\n\n # Or's work in sequence, so with this if check we avoid having lots of \n # nested if's.\n if (!@billing_address.valid? || !@shipping_address.... | [
{
"docid": "b2cc958e2dce3fea4426999c6805baec",
"score": "0.6946323",
"text": "def touch_addresses\n if changes.include?(:bill_address_id) && self.bill_address.present?\n self.bill_address.touch\n end\n\n if changes.include?(:ship_address_id) && self.ship_address.present?\n self.ship_a... |
69beaa3e957d1fc356539d0314d703e1 | Custom attribute writer method checking allowed values (enum). | [
{
"docid": "0c0337be2b8f2f7104a8068d2fda41ad",
"score": "0.0",
"text": "def object_type=(object_type)\n validator = EnumAttributeValidator.new('String', [\"connector.FileMessage\"])\n unless validator.valid?(object_type)\n fail ArgumentError, \"invalid value for \\\"object_type\\\", mus... | [
{
"docid": "af6d0e33773bc681443214ce777b13e1",
"score": "0.7088127",
"text": "def write_attribute_with_enum(attr, value)\n write_attribute_without_enum attr, converted_enum(attr, value)\n end",
"title": ""
},
{
"docid": "85eec95603dc239e3d18923b2c672b31",
"score": "0.6482... |
7add14291ac6143d9ff18ad552c49da8 | For graphing to a dot graph node | [
{
"docid": "8c4f9528a1b148cea3c3df0f6a16dfc1",
"score": "0.0",
"text": "def to_graph_node(graph, parentnode)\n opts = {}\n label = @start.to_s\n newparent = graph.node(nil, label , opts)\n parentnode >> newparent\n unless @start.terminal?\n for subrule in @start.children\n ... | [
{
"docid": "cf78da1095f4947319ae7495647c1ea7",
"score": "0.7271884",
"text": "def dot(attrs_to_show=['github','host'])\n return dot2(attrs_to_show=['github','host'])\n\n # creation of initial self node\n nodes = {self.id=>self}\n # creation of nodes from sources\n self.sources.each do |n|... |
d9bbb6e7bad851ba392e98347b1c989a | GET /products GET /products.json | [
{
"docid": "80959099f6163b71b23b0dc326ac329f",
"score": "0.0",
"text": "def index\n @products = current_user.products\n end",
"title": ""
}
] | [
{
"docid": "4c948d8fbfd34ece8315e7650ae3a026",
"score": "0.79418325",
"text": "def index\n @products = Product.all\n render json: @products\n end",
"title": ""
},
{
"docid": "c94ac951ea74c2c2f12ae8ea06b2bbeb",
"score": "0.79321074",
"text": "def index\n @products = Product.... |
ad8889cd63b2ae55cd5b859b352408a3 | Create a new destination resolver using the destination map for routing | [
{
"docid": "2e27bb6f5e0f6992e3f2384d7ac4899a",
"score": "0.63333285",
"text": "def initialize(destination_map)\n @destination_map = destination_map\n end",
"title": ""
}
] | [
{
"docid": "fc0ce0af140a249790ba4e7e3d2b9877",
"score": "0.6081456",
"text": "def route_for(options = {})\n options = options.with_indifferent_access\n\n origin = ensure_place options[:origin]\n destination = ensure_place options[:destination]\n\n raise ArgumentError, 'Must provide o... |
67e697eb99dbaf5eafa9a37572756903 | url encode or decode url for keys? | [
{
"docid": "a58c9a69337d846cc3ed25c0870506ad",
"score": "0.68016076",
"text": "def key_for(url)\n url.to_s.downcase.gsub(\"https\",'http').gsub(/\\s+/,' ')\n end",
"title": ""
}
] | [
{
"docid": "f5d73eb91194f04ec17964c1e3bc66b8",
"score": "0.7553541",
"text": "def encode_key(key)\n @uri_parser.escape(key, /[^-_.a-zA-Z0-9]/n) # //n switch means explicit 'ASCII-8BIT' pattern\n end",
"title": ""
},
{
"docid": "2bfdb9d1cb466049fcc0e37b7df466b1",
"score": "0.74556... |
be63dc50947c7d6a365bcdae89dc9d34 | GET /forces GET /forces.json | [
{
"docid": "9946fe76dfabc9736823d87c0aae43a6",
"score": "0.707449",
"text": "def index\n @forces = Force.all\n end",
"title": ""
}
] | [
{
"docid": "cc0ec9906230fa4cef095a3d0e03c93d",
"score": "0.5768447",
"text": "def create\n @force = Force.new(force_params)\n\n respond_to do |format|\n if @force.save\n format.html { redirect_to @force, notice: 'Force was successfully created.' }\n format.json { render :show, s... |
e3a737752999a8a66bd1677e82d8d254 | Implement the +each+ method required by Enumerable module. | [
{
"docid": "0d2ef26bbd3c7c1692b07395518eacd5",
"score": "0.0",
"text": "def each(&block)\n all.each(&block)\n end",
"title": ""
}
] | [
{
"docid": "fa197dd671547363fa39daaa717b0c2c",
"score": "0.820471",
"text": "def each\r\n raise NotImplementedError\r\n end",
"title": ""
},
{
"docid": "704fb2c22a8538bab759b4069ebf5bfa",
"score": "0.8201433",
"text": "def _each\n end",
"title": ""
},
{
"... |
1042e1c6f184e0a4757a6b8f8c6bb712 | Create a model using attributes | [
{
"docid": "49edab21cb1ec4042c9e7348916ffae5",
"score": "0.7287518",
"text": "def create!(attributes = {})\n klass.create(attributes)\n end",
"title": ""
}
] | [
{
"docid": "9d479e5091ab8e45e4ca3d991c07b4a4",
"score": "0.81540656",
"text": "def create(attributes = {})\n model = new(attributes)\n model.save\n model\n end",
"title": ""
},
{
"docid": "b5083723d897de4bdf376e3058668716",
"score": "0.780389",
"text": "def ... |
af790dcb76c917d932a5fcc13db2bbb4 | a macro that runs an example file and then asserts that the output matches the expected output which is specified after the __END__ in that same file | [
{
"docid": "9b091b78546e9500d030b81e571fb4e6",
"score": "0.70749557",
"text": "def examples filenames\n filenames.each do |file|\n eg(\"#{file}.rb\") { Assert(run_example(file) == expected_output_for(file)) }\n end\nend",
"title": ""
}
] | [
{
"docid": "e9e3607284c48f87ad2abd980c9deea5",
"score": "0.7238829",
"text": "def expected_output_for name\n File.read(\"examples/#{name}.rb\").split('__END__').last.lstrip + \"\\n\"\nend",
"title": ""
},
{
"docid": "b6070f174deabd562102cbde352c32b4",
"score": "0.65729266",
"text": ... |
2c3f12ddec10dfcbfe7000b5bcaf10b4 | Useful Set of Methods for Storing Objects for session initiation | [
{
"docid": "617b6bc53771f9d719121bb05dab17a0",
"score": "0.0",
"text": "def deny_access_to_save_object serialized_object, path = request.path\n flash[:warning] = \"Du musst dich zuerst einloggen bevor du weitermachen kannst!\"\n session[:return_to] = path\n session[:stored_object] = serialized_... | [
{
"docid": "44e8e63366a75a56990e2e5b40810d87",
"score": "0.6387505",
"text": "def initialize(session); end",
"title": ""
},
{
"docid": "c670b9377e33bd9e91ec752be77f89cf",
"score": "0.6302341",
"text": "def session\n @session ||= OpenStruct.new\n end",
"title": ""
},
{
... |
3600ec52405b2b0cbced2d8ca631aa1d | DELETE /post349s/1 DELETE /post349s/1.xml | [
{
"docid": "4c6c4efe0e8d6331dbee6916f46e3b57",
"score": "0.69378036",
"text": "def destroy\n @post349 = Post349.find(params[:id])\n @post349.destroy\n\n respond_to do |format|\n format.html { redirect_to(post349s_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
}
... | [
{
"docid": "275349bb6fd88d8cefabbfeb43df8930",
"score": "0.70216113",
"text": "def destroy\n @post445 = Post445.find(params[:id])\n @post445.destroy\n\n respond_to do |format|\n format.html { redirect_to(post445s_url) }\n format.xml { head :ok }\n end\n end",
"title": ""
},... |
fecdbe385e922368cdfe17d17814ffc4 | POST /estampas POST /estampas.json | [
{
"docid": "5be11b4602c48478b131ade672e55a54",
"score": "0.68107146",
"text": "def create\n @estampa = Estampa.new(estampa_params)\n\n respond_to do |format|\n if @estampa.save\n format.html { redirect_to @estampa, notice: 'Estampa was successfully created.' }\n format.json { re... | [
{
"docid": "7dce417fb0effc3d28a13ca46d612d2b",
"score": "0.6919961",
"text": "def create\n @estampado = Estampado.new(params[:estampado])\n\n respond_to do |format|\n if @estampado.save\n format.html { redirect_to @estampado, notice: 'Estampado was successfully created.' }\n for... |
5823c75f7437cf9f59a185b6d2ebf8b8 | GET /posts/1 GET /posts/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "915c0178f9e4347098d8a463c2cbe6b0",
"score": "0.77110183",
"text": "def show\n @posts = Post.find(params[:id])\n render json: @posts\n end",
"title": ""
},
{
"docid": "ad221611c85e1ec63d3385d6179e41a2",
"score": "0.73537844",
"text": "def show\n render json: Post... |
0ad6b7a8a022623cf085a00146a2cb26 | send invitations to external authors for a given set of works | [
{
"docid": "fd63fcfc978e0a6702af501d6cb255d5",
"score": "0.81813455",
"text": "def send_external_invites(work_ids, archivist)\n @external_authors = ExternalAuthor.select(\"DISTINCT external_authors.*\").joins(:external_creatorships).where(\"creation_id IN (?) AND creation_type = 'Work'\", work_ids)\n... | [
{
"docid": "29239036ea9b01997d7a95a075c30498",
"score": "0.82273614",
"text": "def send_external_invites(works)\n if params[:importing_for_others]\n @external_authors = works.collect(&:external_authors).flatten.uniq\n if !@external_authors.empty?\n @external_authors.each do |external... |
10f6d4fbab7fb4cd665076df679442d8 | Determines the correct length for the padding, so that the next field is 8byte aligned. | [
{
"docid": "663ab6429b77b20ef656efb5ba38af0a",
"score": "0.72520703",
"text": "def pad_length(prev_element)\n offset = (prev_element.abs_offset + prev_element.to_binary_s.length) % 8\n (8 - offset) % 8\n end",
"title": ""
}
] | [
{
"docid": "0ba07a3c2dd6cc5d47708f0f594f9d73",
"score": "0.78024596",
"text": "def pad_length\n offset = (lp_data.abs_offset + lp_data.to_binary_s.length) % 4\n (4 - offset) % 4\n end",
"title": ""
},
{
"docid": "1b4367510836a627a16ada3d9732b205",
"score": "0.744... |
ed563701de941efd6e1e8c2b3a4f805d | PATCH/PUT /transacaos/1 PATCH/PUT /transacaos/1.json | [
{
"docid": "2712cd9a491765b6690662867d72cd02",
"score": "0.6099239",
"text": "def update\n respond_to do |format|\n if @transacao.update(transacao_params)\n format.html { redirect_to @transacao, notice: 'A transação foi atualizada com sucesso.' }\n format.json { render :show, statu... | [
{
"docid": "618b5784cc58ddee8139d7e3e02cb7cd",
"score": "0.6690314",
"text": "def update\n @taco = Taco.find(params[:id])\n\n if @taco.update(taco_params)\n head :no_content\n else\n render json: @taco.errors, status: :unprocessable_entity\n end\n end",
"title": ""
},
{
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "8d108186f4625dd7cb2dbb4d038ea46c",
"score": "0.0",
"text": "def set_built_year\n begin\n @make = Make.find_by slug: params[:make_id]\n @make = Make.find_by id: params[:make_id] if @make.nil?\n @car_model = @make.car_models.where(id: params[:car_model_id]).first\n ... | [
{
"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;... |
73081221c5d8c0d1730b4da96fa3ea68 | for user remembered memories | [
{
"docid": "b7a5c69761b8883d7f3cebf7b01d8bb5",
"score": "0.0",
"text": "def emailconform\n userid = params[:userid]\n #text = params[:text]\n msg = Array.new\n if !userid.nil?\n #u = User.find_by_id(userid)\n Email.user_conform(userid).deliver\nmsg={\"message\"=>\"Message successfully sent!\"}\n e... | [
{
"docid": "17224122ae80e39b0993419db65fafa7",
"score": "0.71177673",
"text": "def remember_me\n # Сколько дней хранить данные об авторизации\n remember_me_for 3.days\n end",
"title": ""
},
{
"docid": "17224122ae80e39b0993419db65fafa7",
"score": "0.71177673",
"text": "def reme... |
d07e7705b21ce986af43987eef4aad23 | Called when the cookbook collection is returned from the server. | [
{
"docid": "c337d33c4b289373832406b123127d1b",
"score": "0.7133986",
"text": "def cookbook_resolution_complete(cookbook_collection); end",
"title": ""
}
] | [
{
"docid": "4eec656981a73bb1d65e2e0366a7d851",
"score": "0.6757748",
"text": "def cookbook_resolution_complete(cookbook_collection)\n end",
"title": ""
},
{
"docid": "6c4a28971be305bc991a6e785af73ed1",
"score": "0.6126684",
"text": "def cookbook_collection(node)\n if chef_r... |
aa65526b2a2dc61d382825e1f7a8a737 | Given a string, detect whether or not it is a pangram. Return True if it is, False if not. Ignore numbers and punctuation. | [
{
"docid": "cc3f15ed05e024cca7c90315fcdb761f",
"score": "0.58604825",
"text": "def panagram?(string)\n alphabet = (\"a\"..\"z\").to_a\n str_array = string.downcase.chars.sort\n str_array.delete_if { |char| alphabet.include?(char) == false }\n str_array = str_array.uniq\n if str_array == alphabet\n ... | [
{
"docid": "3f90af70cb3e7075a65d44ed572a8cf6",
"score": "0.85398364",
"text": "def pangram?(string)\n str = string.downcase\n ('a'..'z').all? {|char| str.include?(char)}\nend",
"title": ""
},
{
"docid": "490e42d6c9e6b02ece3a9cf881a74d8f",
"score": "0.84394693",
"text": "def is_pang... |
1caa856c008b6a5c7f41a4618fe91fdf | send_email(person, from_email, body, subject) | [
{
"docid": "3ef54eae09228dbf9aad0f4f8bc5d8ac",
"score": "0.70106685",
"text": "def email_us(subject, body)\n unless ENV['RACK_ENV'] == 'development'\n recipient = \"The Awesome Team <openhsv@gmail.com>\"\n\n # First, instantiate the Mailgun Client with your API key\n mg_client = Mailgu... | [
{
"docid": "505dba375a42f219d0a5ccc9ee4dcc56",
"score": "0.8129016",
"text": "def send_email(to, subject, content)\r\n\r\n end",
"title": ""
},
{
"docid": "1115e8d36d9d1b77e64e61daa7712e37",
"score": "0.7506253",
"text": "def send_email( params )\n puts \"From: #{params[:from]}\"... |
45b955939279cd2c7faadd34fbf51cc8 | GET /memberimages/new GET /memberimages/new.json | [
{
"docid": "e2ab68ed45b5c8a4f35923ef1728c03b",
"score": "0.809626",
"text": "def new\n @memberimage = Memberimage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @memberimage }\n end\n end",
"title": ""
}
] | [
{
"docid": "49402bbc48d58ef26442a10901326072",
"score": "0.79680955",
"text": "def new\n @image_member = ImageMember.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @image_member }\n end\n end",
"title": ""
},
{
"docid": "36082cbe2... |
0a69e5ab24d7da4576a6f31a9775bc90 | GET /news/new GET /news/new.json | [
{
"docid": "da3213e82d30ac2d4e6717250669aae5",
"score": "0.7670369",
"text": "def new\n @news = News.new\n\t@conferences = Conference.all\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @news }\n end\n end",
"title": ""
}
] | [
{
"docid": "b07319ec09915764633db02e44945fe4",
"score": "0.83100635",
"text": "def new\n @news = News.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @news }\n end\n end",
"title": ""
},
{
"docid": "b07319ec09915764633db02e44945fe4... |
928299c1b98148310fae84bf97b5c02b | GET /inquries GET /inquries.json | [
{
"docid": "57fd33e62bc0943bc1696b0ec7630d7e",
"score": "0.74658144",
"text": "def index\n @inquries = Inqury.all\n end",
"title": ""
}
] | [
{
"docid": "fb9888b9e3936dde878a2245070fca39",
"score": "0.64838773",
"text": "def index\n @team = Team.find(params[:team_id])\n @injuries = Injury.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @injuries }\n end\n end",
"title": ""
... |
152f5df6f04b13239397c9ecba3d0363 | PATCH/PUT /notices/1 PATCH/PUT /notices/1.json | [
{
"docid": "bb4c5d5a49339395e392cba1e0d0b33b",
"score": "0.6500278",
"text": "def update\n respond_to do |format|\n if @notice.update(notice_params)\n format.html { redirect_to @notice, notice: 'Notice was successfully updated.' }\n format.json { render :show, status: :ok, location... | [
{
"docid": "1d54cb1a6baa04232bdb4ff521bcf162",
"score": "0.68025035",
"text": "def update\n @notice = Notice.find(params[:notice_id])\n respond_to do |format|\n if @notice.update(notice_params)\n format.json { render json: @notice, status: :ok }\n else\n format.json { rende... |
49aada749cf6f9a3968ed84efb95b766 | GET /water_types/new GET /water_types/new.xml | [
{
"docid": "37a2e289d3b99c0c644fa18a524c0b10",
"score": "0.7615363",
"text": "def new\n @water_type = WaterType.new\n @title = \"water type\"\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @water_type }\n end\n end",
"title": ""
}
] | [
{
"docid": "35ad7c9c2d8c1b5fc54560c101b5d472",
"score": "0.72888494",
"text": "def new\n @type = Type.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @type }\n end\n end",
"title": ""
},
{
"docid": "35ad7c9c2d8c1b5fc54560c101b5d4... |
18b6e0ab92a9d3101679cdb6cd6a8bd0 | GET /github_projects GET /github_projects.xml | [
{
"docid": "66c0bfa70621bfe63fe5885d2fd3858f",
"score": "0.7625464",
"text": "def index\n\t\t@github_projects = GithubProject.all\n\n\t\trespond_to do |format|\n\t\t\tformat.html # index.html.erb\n\t\t\tformat.xml\t{ render :xml => @github_projects }\n\t\tend\n\tend",
"title": ""
}
] | [
{
"docid": "dc8505687156cb859adc07f1e0435407",
"score": "0.7660972",
"text": "def projects\n return get(\"/projects/list\")\n end",
"title": ""
},
{
"docid": "d0b43a945df8ac3143faff08578a6c1d",
"score": "0.75392705",
"text": "def projects\n get_request 'projects'\n end",
... |
e2fd8106e9de6d2931d396bd953a767e | Rendering inheritance over pages | [
{
"docid": "34e0be45afa2b9364423035c0dcdd3a2",
"score": "0.0",
"text": "def renderings_for_page(page)\n rs = page.renderings_for_grid(self)\n end",
"title": ""
}
] | [
{
"docid": "a49adfb03483b0d8c7dd8a830df24a08",
"score": "0.61372536",
"text": "def template_page(site); end",
"title": ""
},
{
"docid": "fad063cc30b9319f2fdc92c43cc64433",
"score": "0.60532844",
"text": "def render\n raise NotImplementedError, 'this should be overridden by concr... |
fe3e94de284a2148e74b69f3ef03ae1f | Update a Baas client | [
{
"docid": "6aeca320e299850844ca53fb7a1c83f3",
"score": "0.6804792",
"text": "def update_baas_client_using_put(nucleus_client_id, opts = {})\n data, _status_code, _headers = update_baas_client_using_put_with_http_info(nucleus_client_id, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "2af8018e0bd0adc1fb1767c641d0b726",
"score": "0.763588",
"text": "def update\n if @client.update(client_params)\n render_success_format(\"correctly edited client\", @client)\n end\n rescue StandardError => e\n Airbrake.notify(e)\n raise e\n end",
"title": ""
},
{
... |
ecc335f1438c5b6dc4be6cd16797569c | backcalculate market value of PORTFOLIO at any given point in time | [
{
"docid": "169456ecddc3fe54e4dcb8d1f2b80e4c",
"score": "0.6056777",
"text": "def market_value_on(date)\n\t\tholdings_hash = holdings_on(date)\n\n\t\tmarket_value = 0\n\t\tholdings_hash.each do |stock_id, num_shares|\n\t\t\tstock = Stock.find(stock_id)\n\n\t\t\tif !stock.nil?\n\t\t\t\tprice = stock.get_... | [
{
"docid": "83207471892370715e0311e2ec101b86",
"score": "0.63331544",
"text": "def market_value\n Money.new(positions.sum{|p| p.market_value}, currency)\n end",
"title": ""
},
{
"docid": "a41c9044ab49388835b9748392a36ed0",
"score": "0.63101",
"text": "def portfolio_return\r\n \r\... |
7f2f27e9439c22bba0282d15006f4f72 | Renders the partial for the post's type | [
{
"docid": "0c06f2d289be8b6253fca14ae3dc80a9",
"score": "0.80648065",
"text": "def template_for(post)\n render(\n :partial => \"#{post.type.pluralize}/#{post.type}\",\n :locals => { :post => post }\n )\n end",
"title": ""
}
] | [
{
"docid": "83d919383ad5c51a6ecfd99731e2b2e4",
"score": "0.6388933",
"text": "def render_content_type_partial(object, engage)\n if engage == false\n if object.class.name == \"Job\"\n render 'website/jobs/job', job: object\n elsif object.class.name == \"Post\"\n render 'website... |
9bc48e3f04cafd0a775ee75088eca7d1 | confirmation not working issue with multiple ways to login need to create conditional validation which permits no password if login is done through Twitter | [
{
"docid": "ce297cf3b89395c27667d18ebe6a62e2",
"score": "0.0",
"text": "def is_admin?\n true if admin_rights == \"true\"\n end",
"title": ""
}
] | [
{
"docid": "4cb8e67bd902071825faf15e16875b49",
"score": "0.7115346",
"text": "def check_twitter_credentials\n if session['twitter_token'].blank? || session['twitter_secret'].blank?\n redirect_to new_user_registration_path, :error => \"Debes linkear tu cuenta de twitter antes de continuar\" and r... |
36eabf2be384fe45429319c36a6e164c | Return a title on a perpage basis. | [
{
"docid": "1205b4748584726c50218871acc4b7d0",
"score": "0.0",
"text": "def title\n base_title = \"VM Next alfa\"\n if @title.nil?\n base_title\n else\n \"#{base_title} | #{@title}\"\n end\n end",
"title": ""
}
] | [
{
"docid": "8043c004aaf0669f8680ed8029a7fcae",
"score": "0.80161846",
"text": "def page_title\n title.page\n end",
"title": ""
},
{
"docid": "2a90c2e273a0465d83ad96d074d2dee0",
"score": "0.7638187",
"text": "def page_title\n @page.title\n end",
"title": ""
},
... |
dc58737da2b0530de4dc088a2e785caa | PUT /kisallis/1 PUT /kisallis/1.json | [
{
"docid": "d99447175dcb07b4ccf48bad85f602b2",
"score": "0.6125193",
"text": "def update\n @kisalli = Kisalli.find_by_key(params[:id])\n\n respond_to do |format|\n if @kisalli.update_attributes(params[:kisalli])\n format.html { redirect_to @kisalli, notice: 'Kisalli was successfully up... | [
{
"docid": "d37b39a795a6e081d6480942ece1c538",
"score": "0.6783215",
"text": "def put!\n request! :put\n end",
"title": ""
},
{
"docid": "6eccf0cb1ebc7404a9ae8d73fad0c91a",
"score": "0.6493571",
"text": "def put(*args)\n request :put, *args\n end",
"title": ""
},
... |
f290919ec20e19002af05127c7404144 | Checks if access is not expired by given date | [
{
"docid": "ac1d12b8f9a1fe9737c951b90787a69e",
"score": "0.0",
"text": "def expired? to_date = Time.now\n order && (\n expiration_date = self.expires(order.payment_date || Time.now)\n !(expiration_date && expiration_date > to_date)\n )\n end",
"title": ""
}
] | [
{
"docid": "6c201b60a2292e10f7eded408bf1185f",
"score": "0.7766658",
"text": "def check_for_access_period\n if user_signed_in? && current_user.access_until && current_user.access_until < Date.current && current_user.role.nil?\n redirect_to expired_path, :notice => \"Expired account\"\n end\n ... |
b664bdaab1fc1f99963d0be30224c13c | Set the network user ID field This overwrites the nuid field set by the collector | [
{
"docid": "aa77773a91c3b663ef7d1629b0d0371b",
"score": "0.83203083",
"text": "def set_network_user_id(nuid)\n @standard_nv_pairs['tnuid'] = nuid\n self\n end",
"title": ""
}
] | [
{
"docid": "8e8af647e921638a480e27bbc6bf4b8b",
"score": "0.85550165",
"text": "def set_network_user_id(nuid)\n @details['tnuid'] = nuid\n self\n end",
"title": ""
},
{
"docid": "931bfd6981c413ff80ad0b9a96467e54",
"score": "0.6908807",
"text": "def set_user_id(user_id)\n ... |
bb231a33bc53a66c68029b03f68614a4 | check stripe columns in user field to determine if user can sell | [
{
"docid": "4493034a4a061e63384f7a9dd3aa0632",
"score": "0.5722003",
"text": "def can_receive_payments?\n uid? && provider? && access_code? && publishable_key?\n end",
"title": ""
}
] | [
{
"docid": "5e0dcf8ceb2d924b47c885cb0849220d",
"score": "0.6981317",
"text": "def can_bill? usr\r\n check_invoice(usr, true, 'seller_name')\r\n end",
"title": ""
},
{
"docid": "9884b9362662fd0af8096b95b9a6bd52",
"score": "0.6732194",
"text": "def buy?\n record.user == user\n ... |
e67694d2a7f9bc49e562c146ecf23c40 | delete his session and redirect to home | [
{
"docid": "5d67644e1cee5546c5763e1e8f0e2e8d",
"score": "0.0",
"text": "def logout\n session[:user_id] = nil\n flash[:notice] = \"You've logged out. Good bye!\" \n redirect_to :controller => :home \n end",
"title": ""
}
] | [
{
"docid": "676fc5f8a32f4314fbee63dc26789e55",
"score": "0.8506909",
"text": "def destroy\r\n session.clear\r\n redirect_to root_path\r\n end",
"title": ""
},
{
"docid": "a14cc32279efe0e1c3c0f4f33788b5ba",
"score": "0.84483993",
"text": "def destroy\n\t\t# reset_sess... |
030ab8615a124b7b5ec13b43c05428f9 | runtime: O(b) VI.2 The following code computes a^b. What is its runtime? | [
{
"docid": "75e41878229da7af2d9ac4a2609fd76c",
"score": "0.62707096",
"text": "def power(a, b)\n if b < 0\n 0\n elsif b == 0\n 1\n else\n a * power(a, b - 1)\n end\nend",
"title": ""
}
] | [
{
"docid": "0fc3003b1807a629440403c42496944d",
"score": "0.6590695",
"text": "def tetration(a,b)\n\t\t_r = 1\n\t\tfor i in 0..b-1\n\t\t\t_r = a**_r \n\t\tend\n\t\treturn _r\n\tend",
"title": ""
},
{
"docid": "df07b8970e714d761cc63058512e2a27",
"score": "0.65803415",
"text": "def powe... |
c491a0413f3cc3b1aa9e7918cf14a2dd | get age by person for couple rate | [
{
"docid": "f23ba56123f9be0efa66d8a6f16fecf7",
"score": "0.7418251",
"text": "def get_age_by_person(person)\n if self.traveler_type == \"Couple\"\n if person == \"Traveler #2\"\n @ages['Adult'][1]\n elsif person == \"Couple\"\n @ages['Adult'].max\n end\n else\n @a... | [
{
"docid": "ff79ae259a5127b14bc1cf08cd81be41",
"score": "0.67386246",
"text": "def current_age_for_birth_year(birthyear)\n age_of_person = 2003-birthyear\n return age_of_person\nend",
"title": ""
},
{
"docid": "60633168fab861547bd87c2b4be7ba90",
"score": "0.6536053",
"text": "def c... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "f2251fcc22a76782f183fa5180021787",
"score": "0.0",
"text": "def post_params\n params.require(:post).permit(:description, :image, :image_remote_url, :title, :country, :tag_list, :link, :domain, :top, :hide, :category, :event)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
d67e0067ff1bf9bbc1c8ad69292c7a08 | Specific to the weekday & month select tags | [
{
"docid": "46316e20aef07097b324cc9a66fec699",
"score": "0.0",
"text": "def process_format(format,values)\n case format\n when :short then values.map { |w| w[0..2] }\n when :numeric then Range.new(1,values.length).to_a\n when :long then values\n when :lowercase... | [
{
"docid": "fbbadf3cd5a659bf2dd1f7d27828c9bb",
"score": "0.683655",
"text": "def day_select_options(day)\n unless @day_select_options\n @day_select_options = (1..31).map do |d|\n \"<option value='#{d}'>#{d}</option>\"\n end.join(\"\")\n end\n set_selected_option(@day_select_o... |
9afbecbabd48ca55f272b7d8bdbb2ea9 | this action serves both the in place json update and the html update | [
{
"docid": "a3ee6ab153593cab451639fd9305335a",
"score": "0.0",
"text": "def update\n isolate_download_attribute_params\n super do |success, _failure|\n success.json { manage_download_attribute }\n success.html do\n manage_download_attribute\n redirect_to admin_c... | [
{
"docid": "dfa8ac7965df1bb4b09ad4597b03fd30",
"score": "0.7175776",
"text": "def update\n #formats as js since it's getting parsed on the front end\n respond_to do |format|\n format.js\n end\n end",
"title": ""
},
{
"docid": "4893bfeb5f466c1021f3e4b94fffb9ae",
"score": "0... |
f808cdefd68913844073b9fb205b988b | Adds a new rating | [
{
"docid": "5c290206ef4bfc26d64fa2828c119d6c",
"score": "0.82167774",
"text": "def add(rating)\n @rating_list[rating.movie_id] = rating\n end",
"title": ""
}
] | [
{
"docid": "c38e612cec452dfffc0a05c0ca08fb08",
"score": "0.77990323",
"text": "def add_rating(rating)\n if @count < TRAINING_SET_SIZE\n add_movie(rating)\n add_user(rating)\n @count += 1\n else\n @test_set << rating\n end\n end",
"title": ""
},
{
"docid": "0da0f... |
a84f643d526b2d61c667e0eaff1d03ef | DELETE /product_stock_adjusts/1 DELETE /product_stock_adjusts/1.json | [
{
"docid": "9be65c55afa4bf10d9fe2828062f2940",
"score": "0.74556726",
"text": "def destroy\n @product_stock_adjust.destroy\n respond_to do |format|\n format.html {redirect_to product_stock_adjusts_url, notice: 'Product Journal was successfully removed.' }\n format.json { head :no_content... | [
{
"docid": "61f2cde106c831e3c612ada5b980f7e6",
"score": "0.72831357",
"text": "def destroy\n @product_stock_update.destroy\n respond_to do |format|\n format.html { redirect_to product_stock_updates_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"d... |
58ef16ebd658dc077c8de662be08ef0b | Add a IDB to this section | [
{
"docid": "bf78325604bca5171d0904d60594056e",
"score": "0.59024525",
"text": "def <<(idb)\n @interfaces << idb\n idb.section = self\n self\n end",
"title": ""
}
] | [
{
"docid": "1d6596d3a2c4a1abb901ce8aa09395a5",
"score": "0.61323947",
"text": "def add_to_database\n id = self.class.data_store.keys.sort.last.to_i + 1\n instance_variable_set(:@id, id)\n self.class.data_store[id] = self\n end",
"title": ""
},
{
"docid": "a57e99317a1ac601520492c46e... |
62348455ae60a18f6f63b8aa0c9104ec | GET /documents/new def new | [
{
"docid": "69d6a569fa8b8c208968034867aa1487",
"score": "0.0",
"text": "def update\n @document = Document.rename_file(@document, params[:document][:filename]) if params[:document][:filename].present?\n if @document.update(document_params)\n redirect_to category_folder_path(@document.folder.ca... | [
{
"docid": "1a97f3a1d8a8cf6a81e9dc47f8934dd2",
"score": "0.83838165",
"text": "def new\n @title = t('view.documents.new_title')\n @document = Document.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @document }\n end\n end",
"title": "... |
dd3d200d6471cb6133eb699a2c2f7803 | => "hello Dave" This is a cute function | [
{
"docid": "af39768e18325afb3d324dac85d99c51",
"score": "0.0",
"text": "def factorial(n)\n\traise ArgumentError if n.nil? || n < 0\n\n\tif n == 0 || n == 1\n\t\t1\n\telse\n\t\tn * factorial(n-1)\n\tend\nend",
"title": ""
}
] | [
{
"docid": "352b6d8106c9fe0c1110e0eaa32e48bc",
"score": "0.6987651",
"text": "def eat\n \"Nom. Nom. Nom.\"\n end",
"title": ""
},
{
"docid": "724e3904adeb42a97095df760972426f",
"score": "0.69117546",
"text": "def single_quote\n # single quote string here\n 'Hello World and othe... |
5680e314fb577b24fdb8398d02c6944d | def retail_update_order head :ok end def retail_update_user head :ok end | [
{
"docid": "a7a562d72e7bdba13a9a4e7f8f615747",
"score": "0.0",
"text": "def export_all_orders\n RetailImport.export_all_orders\n flash[:notice] = 'Successfully exported'\n redirect_to :back\n end",
"title": ""
}
] | [
{
"docid": "ba5a882c8b2dbce1dc8153798b2594c2",
"score": "0.68251276",
"text": "def update\n head :ok\n end",
"title": ""
},
{
"docid": "ba5a882c8b2dbce1dc8153798b2594c2",
"score": "0.68251276",
"text": "def update\n head :ok\n end",
"title": ""
},
{
"docid": "0648... |
3c0cea336c723962096a695126867d0f | Provide a detailed, user friendly representation | [
{
"docid": "f790826e8ca2030a63e87de21a36d0f2",
"score": "0.0",
"text": "def inspect\n values = @properties.map{|k, v| \"#{k}: #{v}\"}.join(\" \")\n \"<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsInstance #{values}>\"\n end",
"title": ""
}
] | [
{
"docid": "80363631cebade0e9ef3f8882509b99d",
"score": "0.68170065",
"text": "def details; end",
"title": ""
},
{
"docid": "10e71201c7d33f56a89616b30aa39d6b",
"score": "0.68142146",
"text": "def to_s; description end",
"title": ""
},
{
"docid": "3a05240b53527a0d76b85fb73... |
a5107610c5cebc51876f8ce899255ca0 | Helpers Make this folder inactive (cascade to user feeds) Do this with alias method chain | [
{
"docid": "9a3ce62d7659596b6351b2854b8e2cbd",
"score": "0.6407379",
"text": "def inactivate_with_feeds\n inactivate_without_feeds\n unless user_feeds.nil?\n user_feeds.each do |feed|\n #Nullify the folder relationship\n feed.folder_id = nil\n feed.save\n end\n en... | [
{
"docid": "7ccf8756f1296a8ab80618abfeb7c789",
"score": "0.5712966",
"text": "def activate_inbox\r\n flash[:success] = !@content.archived? ? \"Folder is already active\".t : (\"Activated folder '%s'\" / [@content.title_long])\r\n @content.update_attribute(:archived, false)\r\n redirect_to conte... |
fe80b58aa445f72c37586d8162bbb61a | new_password = create_hash_digest("password1") puts new_password == "password" new_password = create_hash_digest("password1") puts new_password == "password2" | [
{
"docid": "abd780b9d2f91140584d67cdae4775d2",
"score": "0.0",
"text": "def create_secure_users(users)\n users.each do |user_record|\n user_record[:password] = create_hash_digest(user_record[:password])\n end\n\n users\nend",
"title": ""
}
] | [
{
"docid": "d0801c2d21a2f5e918d80a283f1fa1ac",
"score": "0.7334649",
"text": "def create_password_hash(password); end",
"title": ""
},
{
"docid": "6e9442b5f1c700fb2afb0e9e99c3174e",
"score": "0.72866035",
"text": "def hash_password(newpass)\n Digest::MD5.hexdigest(newpass)\n ... |
dcbf50d453e5c2d543a6b20d11e059f2 | When the player wants to register an item | [
{
"docid": "f02616a61be0d988b8e6cb02c76eb378",
"score": "0.6342225",
"text": "def register_item\n item_id = @item_list[@index]\n validate_meth = method(:set_shortcut)\n last_proc = proc do\n if (index = $bag.shortcuts.index(item_id)) && index < 4\n $bag.shortcuts[index] = ... | [
{
"docid": "711827998714ffd141dc35fac72cc7e6",
"score": "0.6784172",
"text": "def add(item)\n @register.add(item)\n end",
"title": ""
},
{
"docid": "6f224753eff9eff22b146282addb45c3",
"score": "0.6736072",
"text": "def on_equip_ok\n if $game_party.target_actor.equippable?(item... |
c8226a9d1c06e6e6fc633f3117a1d1b2 | Retrieve payment refunds for a specific virtual credit card that has been previously issued. | [
{
"docid": "d1f74f64dcd0f04ca68da633c3127e98",
"score": "0.7506076",
"text": "def get_by_virtual_card_id(organization, virtual_card_id)\n HttpClient::Preconditions.assert_class('organization', organization, String)\n HttpClient::Preconditions.assert_class('virtual_card_id', virtual... | [
{
"docid": "749fc837b68468956948c3a8f91633ba",
"score": "0.6940833",
"text": "def refunds\n Refund.all(token)\n end",
"title": ""
},
{
"docid": "2e890120104584a9ef083ba107e949a4",
"score": "0.69024026",
"text": "def refunds request_options = {}\n request_url = \"/1/charg... |
8440366462e97248c9b5ec7c712e202f | Define Cucumber Rake task | [
{
"docid": "a2b99017676255de37e51fff668e97b6",
"score": "0.724846",
"text": "def initialize(task_name = 'cucumber', desc = 'Run Cucumber features')\n @task_name = task_name\n @desc = desc\n @fork = true\n @libs = ['lib']\n @rcov_opts = %w[--rails --exclude osx\\/objc,g... | [
{
"docid": "65caf070aa0d6e8328d9aa04e46ff712",
"score": "0.7592947",
"text": "def cucumber_task framework, type, n\n test_file \"test/cucumber_#{type}_#{n}.feature\"\n task :clean do rm_f \"test/cucumber.rb\" end\nend",
"title": ""
},
{
"docid": "028b4bf63d265f3c9162ae4b0b46131a",
"sco... |
a0770856fadc581fd22ed0af61f9d282 | GET /games GET /games.xml | [
{
"docid": "a1a0964bd2e8e103ff2c59d817de7d3e",
"score": "0.0",
"text": "def index\n @current_user = Player.find_by_id(session['user']) unless session['user'].nil?\n @archive_games = Game.find(:all)\n @active_games = Game.active_games\n @my_games = GamePlayerList.get_games(session['user'])\n\... | [
{
"docid": "f1cd8edbd07f0dbb6e7be17daf50c35a",
"score": "0.7729492",
"text": "def index\n @games = @user.games\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render xml: @games}\n end\n end",
"title": ""
},
{
"docid": "dc8090157718879b8f74841d1eb... |
01152fed5e3797a1365798f0dd3462e6 | Generates code for definition of block | [
{
"docid": "1516b26deffbcbfa72b8316f74128527",
"score": "0.74335104",
"text": "def block_definition(block_node)\n buff_code \"__blocks['#{block_node.name}'] = __create_block('#{block_node.name}', #{location_node(block_node)}) do\"\n\n code_indent do\n visit_node_children(block_node)\n ... | [
{
"docid": "496f2d642ddce87d60d3549f93d05dd9",
"score": "0.74757814",
"text": "def block_name \n :CodeBlock \n end",
"title": ""
},
{
"docid": "496f2d642ddce87d60d3549f93d05dd9",
"score": "0.74757814",
"text": "def block_name \n :CodeBlock \n ... |
456cf48fad21702ef8739dbca95b1986 | Execute the given stored procedure with the give name. If a block is given, the stored procedure should return rows. | [
{
"docid": "12d4d22070236426490a8f6dfb3bc20c",
"score": "0.0",
"text": "def call_sproc(name, opts = OPTS)\n args = opts[:args] || []\n sql = \"{call #{name}(#{args.map{'?'}.join(',')})}\"\n TinyTds::Java.synchronize do\n cps = conn.prepareCall(sql)\n\n i = 0\n ... | [
{
"docid": "4b313ce22ec13f482b9ce10c5b45bc1e",
"score": "0.71383107",
"text": "def execute_stored_proc(proc_name, *params)\r\n\t\t\t\tproc_str = \"CALL \" << proc_name.to_s << \"(\"\r\n\t\t\t\tparams.each { |param| proc_str << param.to_s << \", \" }\r\n\t\t\t\tproc_str = proc_str[0..-3] << \")\" # Remo... |
e76ea1f7d6726317d69aa874c7091ad5 | Begins the transaction (and turns off autocommitting) | [
{
"docid": "4c09e70c5ad96d9c9d5a11518fdcd768",
"score": "0.810699",
"text": "def begin_db_transaction\n puts_log \"begin_db_transaction\"\n log(\"begin transaction\", \"TRANSACTION\") {\n # Turns off the auto-commit\n IBM_DB.autocommit(@connection, IBM_DB::SQL_AUTOCOMMIT_OFF)... | [
{
"docid": "f139383b58cd042fc6f6b7b4c76bc57b",
"score": "0.83521247",
"text": "def begin_db_transaction\n @connection.autocommit = false\n end",
"title": ""
},
{
"docid": "59fa321064ba750eb947877fe8ade798",
"score": "0.8004817",
"text": "def begin_db_transaction\n original... |
e091de2cf097a1771ee786de2d2c4cfb | Gets the IMAP password | [
{
"docid": "4dbcea8635238e228bf90b25976177e2",
"score": "0.71393186",
"text": "def password\n @account.incoming_server.authentication.password\n end",
"title": ""
}
] | [
{
"docid": "17b74bef546e68664774d9f02d35a97d",
"score": "0.73125786",
"text": "def password\n Cproton.pn_messenger_get_password(@impl)\n end",
"title": ""
},
{
"docid": "7d4b7d19d5eb01712a0ba764694daba1",
"score": "0.7256112",
"text": "def get_pass(password)\n return Base6... |
1903453a860e9caa0c60fe88d69162e4 | This is not working because of a rails bug with integrations see | [
{
"docid": "fb8eca063cc98c7be3119fdbd49330f2",
"score": "0.0",
"text": "def test_search_tabs\n new_session do |s|\n s.search_for( 'china' )\n assert_match( /#{movies(:in_china_they_eat_dogs).name}/, s.response.body )\n assert_match( /#{people(:china_doll).name}/, s.response.body )\... | [
{
"docid": "5570a0393df05f465d49f2e1953a5cd4",
"score": "0.61513036",
"text": "def define_integration\n end",
"title": ""
},
{
"docid": "8b8f2a21a5f29a0a3a0b03b468100fc1",
"score": "0.60690403",
"text": "def load_integrations; end",
"title": ""
},
{
"docid": "5c47abbd3... |
15047e9f4656c178d76e65fc3f4d6bab | even if a key matches an include, withhold the key/value pair if the value matches an exclude | [
{
"docid": "3963722c590419e3087e01569cbfc399",
"score": "0.6898272",
"text": "def test_pre_filter_hash_still_applies_exclusions_to_hash_values\n input = {one: 1, two: 2}\n options = {include: /one|two/, exclude: /1/}\n expected = {two: 2}\n result = NewRelic::Agent::AttributePreFiltering.pre... | [
{
"docid": "36f3749bcd1181518b5e8e3355be0e4f",
"score": "0.7108478",
"text": "def filter_hash(options, exclude=[])\n ex = exclude.inject({}) {|h,k| h[k.to_s] = true; h }\n options.inject({}) {|h,kv| h[kv[0]] = kv[1] unless ex[kv[0].to_s]; h }\n end",
"title": ""
},
{
"docid": "4935962... |
31ac87177352d0872f429d1ffe86837f | Returns the list of a table's column names, data types, and default values. The underlying query is roughly: SELECT column.name, column.type, default.value, column.comment FROM column LEFT JOIN default ON column.table_id = default.table_id AND column.num = default.column_num WHERE column.table_id = get_table_id('table_... | [
{
"docid": "2ddf997519aefef43f0fd77970832bba",
"score": "0.67316014",
"text": "def column_definitions(table_name)\n select_rows(<<~SQL, 'SCHEMA')\n SELECT a.attname, format_type(a.atttypid, a.atttypmod),\n pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,\... | [
{
"docid": "6aac16412e3943989995f3e8c823974c",
"score": "0.73270285",
"text": "def columns(table_name) #:nodoc:\n table_structure(table_name).map do |field|\n case field[\"dflt_value\"]\n when /^null$/i\n field[\"dflt_value\"] = nil\n when /^'(.*)'$/m\n ... |
f492ebdafce2af7439531ffa7f813d5c | these check fronts, backs of words for quotes | [
{
"docid": "27d27dc2bd79780b86c194e2cab1ba96",
"score": "0.69608825",
"text": "def fr_quotes(word)\n /\\A\\\"|\\'/.match(word) != nil\nend",
"title": ""
}
] | [
{
"docid": "aedd44d64eb6b56f1fd8428c7fddb1db",
"score": "0.71121067",
"text": "def fr_quotes(word)\n /\\A\\\"|\\'/.match(word) != nil\n end\n\n def bk_quotes(word)\n /\\Z\\\"|\\'/.match(word) != nil\n end\n\n # Checks fronts, backs of word for parentheses\n def fr_parens(word)\n /\\A\\(|\\... |
b0c621c9987a07d3ac89046118a0e012 | Edit a document Edit metadata of a specific document. | [
{
"docid": "6d149f48fdd02e3eab656e3d99911c3e",
"score": "0.0",
"text": "def users_id_user_transactionsclusters_id_transactions_cluster_documents_id_document_put(id_user, id_transactions_cluster, id_document, opts = {})\n data, _status_code, _headers = users_id_user_transactionsclusters_id_transacti... | [
{
"docid": "35f58f2fe5af061beb687f474934a3de",
"score": "0.73370767",
"text": "def edit_metadata\n not_authorized if Revs::Application.config.disable_editing == true\n @document=SolrDocument.find(params[:id])\n updates=params[:document]\n updates.each {|field,value| @document.send(\"... |
c8aad8dc96096533cb6ddb92db6a770a | Write a method that accepts two arrays of numbers, and returns an array of every sum of every combination of single numbers from first and second array. For example, if the method receives [1, 5, 10] and [100, 500, 1000], the method should return this array: [101, 501, 1001, 105, 505, 1005, 110, 510, 1010]. | [
{
"docid": "952612ae68137609cb7b2dd3fdb98933",
"score": "0.8324957",
"text": "def sum_combinations(numbers1, numbers2)\n result = []\n numbers1.each do |number1|\n numbers2.each do |number2|\n result << number1 + number2\n end\n end\n result\nend",
"title": ""
}
] | [
{
"docid": "623dc22a7bfcc00e874932655a63a3ea",
"score": "0.87582564",
"text": "def combinations_of_numbers(array_one, array_two)\n sums = []\n array_one.each do |number_one|\n array_two.each do |number_two|\n sums << number_one + number_two\n end\n end\n return sums\nend",
"title": ""... |
5a696c28000f4e49354a46b80e8fe0d2 | returns the reverse. The one caveat: Don't use the reverse method that already comes with Ruby! | [
{
"docid": "994ff4739e2d3b4a93ee35593f7ebf4f",
"score": "0.0",
"text": "def reverse_a_string(string)\n new_array = []\n \n string_to_array = string.chars\n string_length = string_to_array.length \n \n string_length.times do \n new_array << string_to_array.pop\n end\n new_array.join(\"\")\nend... | [
{
"docid": "2df8f1ab9ad63fa5bac7ff4acd35a3fe",
"score": "0.83299476",
"text": "def reverse() end",
"title": ""
},
{
"docid": "2df8f1ab9ad63fa5bac7ff4acd35a3fe",
"score": "0.83299476",
"text": "def reverse() end",
"title": ""
},
{
"docid": "482e0cf01577c15f52986464e29bdaf3... |
295e431091c1afe9a5a0d1c8188b83aa | Use callbacks to share common setup or constraints between actions. Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "4fcc67655ce08214d2baba1bb313ee6f",
"score": "0.0",
"text": "def course_idea_params\n params.require(:course_idea).permit(:name,:email,:what,:format_of_idea)\n end",
"title": ""
}
] | [
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.60858154",
"text": "def action_hook; end",
"title": ""
},
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6080073",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n... |
1bff6ded245ced6b0148c3aeb37776a7 | This section is all about getting the players from the playerdiv Get players from current playerdiv | [
{
"docid": "ed2689cd4dd82695cae49afff55f8ef5",
"score": "0.0",
"text": "def playerdiv_users(playerdiv)\n users = Hash.new\n results = User.joins(:playerdivs).where(:playerdivs => {:division_id => playerdiv})\n results.each do |r|\n users[r.name] = r.id\n end\n return users\nend",
"title": ""... | [
{
"docid": "cddaa4f8e403d9394c486bb7fd0302b8",
"score": "0.7321858",
"text": "def players\n getPlayers\n end",
"title": ""
},
{
"docid": "d7c4d6c3d2c9120b151bbdb18aaf0818",
"score": "0.7081932",
"text": "def getPlayers()\n return @players\n end",
"title": ""
},
... |
5446512cef82ac23171d624cb4e9ee55 | POST /exercises POST /exercises.json | [
{
"docid": "25197ca788fe86e5767993a4d26e3ced",
"score": "0.62779427",
"text": "def create\n @exercise = Exercise.new(exercise_params)\n @exercise.add_attributes(params[:exercise])\n @exercise.user = current_user\n respond_to do |format|\n if @exercise.save\n format.html { redirec... | [
{
"docid": "cd4936f92950522d29c5ee094567b09e",
"score": "0.699617",
"text": "def create\n @exercise = Exercise.new(exercise_params)\n\n if @exercise.save\n render :show, status: :created\n else\n render json: @exercise.errors, status: :unprocessable_entity\n end\n end",
"title... |
f461b5b9fa5e39f4399ad8843850d022 | PATCH/PUT /articols/1 PATCH/PUT /articols/1.json | [
{
"docid": "982fff6cd3b547d7dbc43fcbc60ec19a",
"score": "0.67983454",
"text": "def update\n respond_to do |format|\n if @articol.update(articol_params)\n format.html { redirect_to @articol, notice: 'Articol was successfully updated.' }\n format.json { render :show, status: :ok, loc... | [
{
"docid": "2572fb900123dab962d92dfd5cd31505",
"score": "0.6498733",
"text": "def update\n spice = Spice.find_by(id: params[:id])\n spice.update(spice_params)\n render json: spice\nend",
"title": ""
},
{
"docid": "2f01903ec0af946e7e6751228d914c23",
"score": "0.6368597",
"tex... |
e82e5f1626b5dc2f783f5bf02426b873 | This is the server endpoint which handles all incoming OpenID requests. Associate and CheckAuth requests are answered directly functionality therefor is provided by the rubyopenid gem. Handling of CheckId requests dependents on the users login state (see handle_checkid_request). Yadis requests return information about ... | [
{
"docid": "a26316344fd0c09feee36392efb4bf97",
"score": "0.6155667",
"text": "def show\n clear_checkid_request\n\n respond_to do |format|\n format.html do\n if openid_request.is_a?(OpenID::Server::CheckIDRequest)\n handle_checkid_request\n elsif openid_request\n ... | [
{
"docid": "681328ab34a62398bd7102f4257e5f09",
"score": "0.6789845",
"text": "def index\n return render(:text => \"This is an OpenID server endpoint.\") unless openid_request\n\n if checkid_request?\n if consumer_site_is_authorized?\n log_the_action\n inform_the_consumer_site :i... |
de184f23a5848341b3a45b7fdbbb6353 | Problem 19: Counting Sundays | [
{
"docid": "c2d628f621921e4bf57b08b05622e659",
"score": "0.7247064",
"text": "def count_sundays_in_twentieth_century()\r\n\tstart_date = Date.new(1901, 1, 1)\r\n\tend_date = Date.new(2000, 12, 31)\r\n\r\n\tselector = (start_date..end_date).select{ |check| check.sunday? && check.day == 1 }\r\n\treturn ... | [
{
"docid": "99658e3b6deddd0701d2dd56411122a1",
"score": "0.807545",
"text": "def count_sundays(first, last)\r\n (first..last).select { |n| n.sunday? && n.mday == 1 }.size\r\nend",
"title": ""
},
{
"docid": "11122f0683f740b2c3811e424e042ba6",
"score": "0.793194",
"text": "def sundays... |
38bf35416800b31a6d59133437aa0521 | GET /enters/1 GET /enters/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "4007a85565ceea01c943916e12262247",
"score": "0.6533681",
"text": "def show\n @trainer = Trainer.find(params[:id])\n @clients = @trainer.users.as_json\n end",
"title": ""
},
{
"docid": "2de50035daa7089cbf3315c912eba697",
"score": "0.64996916",
"text": "def index\n ... |
faa18410f9eb2518603f0410025130b0 | GET /attributes GET /attributes.json | [
{
"docid": "bf882f8bcd28988e74f757dd83b89d22",
"score": "0.0",
"text": "def index \n @q = Attribute.ransack(params[:q], auth_object: 'own')\n @attributes = @q.result.paginate(:page => params[:page], :per_page => 10)\n respond_to do |format|\n format.html\n format.js { @attributes.t... | [
{
"docid": "0c70fad043b5b78e1add0a699a0e5946",
"score": "0.7854273",
"text": "def get_attributes\n @client.raw('get', '/config/attributes')\n end",
"title": ""
},
{
"docid": "8ae6c0deef6c7e6d4fca00fe67d30d22",
"score": "0.742154",
"text": "def index\n\t\t@attributes = Attribute.a... |
44f0cadbc92be8d18f61c5174b712fac | skip_before_action :authenticate_user!, :only => [ :top ] | [
{
"docid": "8574fb6fd462bff6b6a4622d4fcc0688",
"score": "0.0",
"text": "def index\n redirect_to fresh_ideas_path\n end",
"title": ""
}
] | [
{
"docid": "d40f2ca8834595418d321425377ad658",
"score": "0.70457375",
"text": "def skip_authorization_check(*args)\n before_action(*args) do |controller|\n controller.instance_variable_set(:@_authorized, true)\n end\n end",
"title": ""
},
{
"docid": "306b6... |
acafa8e1c4d79c0b5a9d232c6ee9afd4 | GET /spikings GET /spikings.json | [
{
"docid": "4e1ed3e1b8c990b1505a4b65ce230366",
"score": "0.71790016",
"text": "def index\n @spikings = Spiking.all\n end",
"title": ""
}
] | [
{
"docid": "7bf278041bd23f7564ff918e871cb1cc",
"score": "0.69912547",
"text": "def index\n @sightings = Sighting.all\n render json: @sightings\n end",
"title": ""
},
{
"docid": "32f7211d782de45a2518463ccd7ba745",
"score": "0.68513536",
"text": "def index\n @pricings = Prici... |
5e26e10c98feab8065cf898ff3dec944 | create channel disabled alert for all the members | [
{
"docid": "7ab59df85a1b20a0ab97960f9f7db8c5",
"score": "0.68110937",
"text": "def create_disabled_changed_alert\n if @property_channel.disabled?\n PropertyChannelDisabledAlert.create_for_property(@property_channel)\n else\n PropertyChannelEnabledAlert.create_for_property(@property_chann... | [
{
"docid": "90bb53e993d10a108355a9e690b7d72c",
"score": "0.60356975",
"text": "def do_notify_disabled(transition)\n if user && Rails.application.settings.enforce_rules\n UserMailer.access_revoked(user, self).deliver_later\n end\n end",
"title": ""
},
{
"docid": "4e6ee630ac774c179... |
6a7f3fa15091f601e71038ac60fa89df | mc_id [Fixnum] only properties of given management company will be returned, zero means all management companies | [
{
"docid": "d8c485dbba0d25ab24237cd04804e8eb",
"score": "0.5573876",
"text": "def call(mc_id: 0)\n message = xml_builder.properties(management_company_id: mc_id)\n result = remote_call(message)\n if result.success?\n result_hash = to_safe_hash(result.value)\n prope... | [
{
"docid": "f71801208ff41d293354ab21a85475fb",
"score": "0.60523117",
"text": "def getcrowdsaleMP(propertyid, verbose = nil)\n @api.request 'getcrowdsale_MP', propertyid, verbose\n end",
"title": ""
},
{
"docid": "6d59d67003f6e9c9471cb4a554c87fe7",
"score": "0.59169084",
"text": ... |