query_id
stringlengths
32
32
query
stringlengths
7
6.75k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
fdaa9e07b688473b2b0aa76012743b17
Maintain subscription status. Must be called by the user (or subclass) of this class, most likely in the thread created by start.
[ { "docid": "fdab8cbda884824cf86f6f2437c350c5", "score": "0.0", "text": "def handle_ack ack\n raise ArgumentError unless ack.control?\n op_type, tags = ack.control_op\n @sub_tracker.update op_type, tags\n end", "title": "" } ]
[ { "docid": "7eac2fdd9d3028dca74efec2aaa0b772", "score": "0.7555355", "text": "def sync_subscribed_status\n\t\tself.subscribed = self.status == 'subscribed'\n\t\ttrue # Ensure the execution chain continues.\n\tend", "title": "" }, { "docid": "ac3d1be333fc3c3beaca1f26d7ebf77a", "score": "0...
f03025671123a6268471e0587f1ac12d
Returns the value of attribute environment. source://sprockets//lib/sprockets/manifest.rb22
[ { "docid": "49f00bfaa492bf1bf2e814fe53c3b20c", "score": "0.5946017", "text": "def environment; end", "title": "" } ]
[ { "docid": "5382fa64c9f2a4b64e7b54c6cc3f2c65", "score": "0.7117829", "text": "def environment\n global_params[:environment]\n end", "title": "" }, { "docid": "fd8efbaf695c304aa7bb8c3c14ce531e", "score": "0.6895187", "text": "def env_tag\n env = provision_object...
76c9a0afcd10e67de15a5ef6984e2001
Delete queue in all usable brokers or all selected brokers that are usable === Parameters name(String):: Queue name options(Hash):: Queue declare options plus :brokers(Array):: Identity of brokers in which queue is to be deleted === Return identities(Array):: Identity of brokers where queue was deleted
[ { "docid": "98a5e3220bb4e9ef27ec9b258b14027e", "score": "0.8040815", "text": "def delete(name, options = {})\n identities = []\n u = usable\n brokers = options.delete(:brokers)\n ((brokers || u) & u).each { |i| identities << i if (b = @brokers_hash[i]) && b.delete(name, options) }\n ...
[ { "docid": "0276b293004dce2f8c847811bc3071bf", "score": "0.800236", "text": "def delete_amqp_resources(name, options = {})\n identities = []\n u = usable\n ((options[:brokers] || u) & u).each { |i| identities << i if (b = @brokers_hash[i]) && b.delete_amqp_resources(:queue, name) }\n ...
13fba01abcab444244edee948bbf614a
SN103 Id: 355 Name: Unit or Basis for Measurement Code Type: ID Min/Max: 2/2 Description: Code specifying the units in which a value is being expressed, or manner in which a measurement has been taken
[ { "docid": "91358dff8a1841b3e54bb27e14029b94", "score": "0.0", "text": "def SN103=(arg)", "title": "" } ]
[ { "docid": "f025e42d8905b2e798cd4be8fe3d7cd1", "score": "0.6321565", "text": "def unit\n data.unit\n end", "title": "" }, { "docid": "17015df1e0aeb1bfec57471d95888f52", "score": "0.6219748", "text": "def unit_str; end", "title": "" }, { "docid": "17015df1e0aeb1bfe...
00a96a6b74f7c734fb2231a02b54f85a
Es una estadi de registro
[ { "docid": "89b1f5d11e7b13c2e619ee9fae82bc73", "score": "0.0", "text": "def is_register?\n\t\ttag_name.eql?(REGISTER)\n\tend", "title": "" } ]
[ { "docid": "7e30f13f1ce28810a96fb3cba92456ef", "score": "0.7055714", "text": "def horas_no_lec\n @asignaturas = Asignatura.where('lectiva=false').order('orden')\n @lectiva = false\n @id_asig = params[:id_asig]\n @id_profe = params[:id_profe]\n @horario = Horario.new\n @horario.professo...
1a5819d5ba1c55f9a07f5ee5d4127f30
The English (or other language) friendly version of VM provisioning status
[ { "docid": "75a0d8bd6b62cd48cec6fb484befadf5", "score": "0.7975143", "text": "def display_provisioning_status\n case provisioning_status.to_s\n when 'initializing'\n 'Initializing'\n else\n 'Done'\n end\n end", "title": "" } ]
[ { "docid": "339607670a2cae5f459d1b52d60380e8", "score": "0.7674603", "text": "def display_status\n # Provisioning Status has priority\n if display_provisioning_status != 'Done'\n return display_provisioning_status\n end\n\n case status\n when 'running'\n 'Running'\n when 'sto...
e82360a1556365ac7efde2cf78e3bdd2
if we're running in Dotcom mode, we'll be lazy and just hide the content. otherwise, when running script/enterprisecutter, we'll bring these sections back
[ { "docid": "7d799cafc8332a57b9ca3d50365b6c28", "score": "0.0", "text": "def run(content, params={})\n start_replacement = '<div class=\"not-enterprise\">'\n end_replacement = '</div>'\n\n content = content.gsub(%r{<p>#{ENTERPRISE_START_STRING}</p>}, start_replacement)\n content = content.gsu...
[ { "docid": "0685b5ab14512803ead783150abfed82", "score": "0.6609231", "text": "def thing_to_hide\n @log_window.hide_background_box #hide log window black box background\n @log_window.hide #hide log window\n hide_extra_gauges if $imported[\"YEA-BattleEngine\"] #hide extra gauges\n @info_viewpo...
f6f79f02190ed6c84c34628bfa47bb96
callseq: datum.to_csv return the datum as a CSV in the format: physical_id,inode_id,filename
[ { "docid": "49d736893fa8d93f5b4e8c83d5890b95", "score": "0.8047707", "text": "def to_csv\n \"#{first_physical_block_number},#{inode_number},#{filename}\"\n end", "title": "" } ]
[ { "docid": "354006eefd3ee05d7a4ca0642113115b", "score": "0.70277804", "text": "def to_csv\n end", "title": "" }, { "docid": "f7b2a6762031367aadb2ced97bd7de73", "score": "0.69082695", "text": "def to_csv\n id.to_s << \",\" << time_in.to_s << \",\" << time_out.to_s << \",\" << da...
181b3450b5386531652c47235cb086de
Build an instance of SchemaVersionInstance
[ { "docid": "263252da80ab04241372fc9e20c76f7b", "score": "0.0", "text": "def get_instance(payload); end", "title": "" } ]
[ { "docid": "624698a2d82a32980d750c430ac9c101", "score": "0.6641963", "text": "def get_instance(payload)\n SchemaInstance.new(@version, payload)\n end", "title": "" }, { "docid": "03a8e7b10c1c05610da440e84a433440", "score": "0.59792465", "text...
13473ba53574ae7619f47c47e27d8d39
Start from the top because there is only one path from there. The solution at the top can be broken into the subproblems of the adjacent values on the next row. The solution is the minimum of those two subproblem solutions + the value at the top (or current node) as you traverse down. Base case: If you reach the bottom...
[ { "docid": "387d129e887d03a0e1559a5045068ecd", "score": "0.54563403", "text": "def minimum_total(triangle, m = 0, n = 0, memo = {})\n return triangle[m][n] if m == triangle.size - 1\n\n memo[[m+1, n]] ||= minimum_total(triangle, m + 1, n)\n memo[[m+1, n+1]] ||= minimum_total(triangle, m + 1, n + 1)\n...
[ { "docid": "37fbd9beb9d761620222accf548a307a", "score": "0.6811514", "text": "def solution(a)\n # [1, -INFINITY, -INFINITY, -INFINITY, -INFINITY, -INFINITY]\n # [1,-1, 1, 10, 0, -1] row = 1. start_val = 1\n # [1,-1, 1, 10, 0, -1] row = 2. start_val = -1\n # [1,-1, 1, 10, 0, -1] row = 3. start_val = ...
ff49baa14ccd120b7fb8f3a68dace791
GET /contacts GET /contacts.json
[ { "docid": "4ad7df2d75fc4db6fddc0db28ee450fa", "score": "0.0", "text": "def index\n @contacts = Contact.find(:all, :order => 'name')\n \n end", "title": "" } ]
[ { "docid": "8eea3a2e86364d38226af95d61abd66e", "score": "0.845876", "text": "def contacts\n get('contacts')\n end", "title": "" }, { "docid": "680464823216e7f4871a0a4894b924aa", "score": "0.83591413", "text": "def contacts()\n get('contactsList')\n end", "title": "" ...
d79d46bd2d5a279e6f95bc89f6a019ae
Count number of items that match the given tag types
[ { "docid": "f7912b534311b8fd9aadbf99965ec645", "score": "0.6685034", "text": "def count_element(*types)\n stack.select { |level| types.include? level.first }.size\n end", "title": "" } ]
[ { "docid": "13fc7c508c8f2a8565f859a530ffc3ee", "score": "0.74823916", "text": "def count(item, tag)\n items = item.downcase.split\n type = items[0]\n subtype = items[1]\n case type\n when 'objective' then count_objectives(item, tag, subtype)\n when 'endpoint' then count...
aad1eeb63047cf9684e1d7d6428de4e4
POST /guild/officers POST /guild/officers.json
[ { "docid": "a24702d58ad050e84defd1ddcd99679a", "score": "0.64992154", "text": "def create\n\t\t@guild_officer = GuildLinkOfficer.new(guild_officer_params)\n\t\t@guild_officer.guild = @guild\n\n\t\trespond_to do |format|\n\t\t\tif @guild_officer.save\n\t\t\t\tback_page = guild_officers_url\n\t\t\t\tback_...
[ { "docid": "6ee6e39dec2571ea83653b491aebcd10", "score": "0.61897254", "text": "def create\n @clientsOffers = ClientsOffers.new(params[:clientsOffers])\n\n respond_to do |format|\n if @clientsOffers.save\n format.html { redirect_to @clientsOffers, notice: 'ClientsOffers was succesfully ...
bb7ef50bb261f2b08abcec6816a9da41
Returns list of uncommited/untracked files as reported by git status.
[ { "docid": "7d3c2b99930e728d1de39cffc82d9994", "score": "0.76043624", "text": "def uncommitted_files\n files = nil\n p4 (['change','-o']).each do |line|\n files << line.strip if files\n files = [] if line.start_with?('Files:')\n end\n files ||= []\n end", "title"...
[ { "docid": "20acf3eb7ee7d233c30d04e361432735", "score": "0.8367702", "text": "def uncommitted_files\n `git status`.scan(/^#(\\t|\\s{7})(\\S.*)$/).map { |match| match.last.split.last }\n end", "title": "" }, { "docid": "20acf3eb7ee7d233c30d04e361432735", "score": "0.8367702", ...
7523a182237f378517b869e661533ed2
==> Output the final result into indicated file
[ { "docid": "68f914235ef7faf316c7ce075c322b7a", "score": "0.0", "text": "def output_to_json container, filename\n puts \"output_to_file #{filename}\"\n outputFile = File.open(filename, 'w')\n linecount = 0\n container.each do |key, value|\n linecount += 1\n print(linecount.to_s + \"\\r\") if li...
[ { "docid": "0d59b5b1ced95310528f5cb9f3207528", "score": "0.758007", "text": "def output(result)\n if options[:output]\n File.write(options[:output], result)\n else\n puts result\n end\n\n result\n end", "title": "" }, { "docid": "f48b623fd4f619f48ea92910d...
c20ada995592af9caa3500de1a26ec6e
Default string representation of the text segment.
[ { "docid": "9ad45ca8aa4f030203644ced38a95d41", "score": "0.0", "text": "def to_s\n self.word_form + self.space\n end", "title": "" } ]
[ { "docid": "5e5406b4aab60251e0d221b59875df43", "score": "0.674374", "text": "def default(text)\n text.to_s\n end", "title": "" }, { "docid": "03ef61bd34c5d2a0629ecd96742efcb0", "score": "0.6489721", "text": "def to_s\n @segment\n end", "title": "" }, { ...
1c61b2d26b80ebd8075be9ef9681f620
Validate check scheduling. Validates: publish, interval, standalone, subscribers
[ { "docid": "69ae12dcabc183686cae362a4ed4791b", "score": "0.83801675", "text": "def validate_check_scheduling(check)\n must_be_boolean_if_set(check[:publish]) ||\n invalid(check, \"check publish must be boolean\")\n unless check[:publish] == false\n if check[:cron]...
[ { "docid": "f4e5d860674b116bd8586112e19fb35d", "score": "0.6534519", "text": "def check_schedule()\n create_daily_tests()\n create_weekly_tests()\n end", "title": "" }, { "docid": "b95d7d2844c76882fb8ddb87fcbc6361", "score": "0.64340407", "text": "def run_interval_ch...
c7af5331468b1a7d0e5fa79c2cadfd8a
A helper for using the native NOW() SQL function in a default
[ { "docid": "e99f5fccb59b67901b03bbaf25a07fd0", "score": "0.7945138", "text": "def now\n SqlExpr.new('NOW()')\n end", "title": "" } ]
[ { "docid": "56dfbcce3673ca839ff24b7f1867f945", "score": "0.72920644", "text": "def db_time_now; end", "title": "" }, { "docid": "8d75b571b35e3e3ec46190aa34fec133", "score": "0.700678", "text": "def default_to_now\n { additionally: lambda { Time.zone.now.utc } }\n end", ...
e7b89396fc25241c908a2d5533cef1ee
DELETE /questionares/1 DELETE /questionares/1.json
[ { "docid": "143238e3815e8e07c3f8da5a81d3b8a6", "score": "0.7473714", "text": "def destroy\n @questionare = Questionare.find(params[:id])\n @questionare.destroy\n\n respond_to do |format|\n format.html { redirect_to questionares_url }\n format.json { head :no_content }\n end\n end"...
[ { "docid": "002f0e620d952c742bb3ab0e5bccc559", "score": "0.762618", "text": "def destroy\n @v1_question = V1::Question.find(params[:id])\n @v1_question.destroy\n\n head :no_content\n end", "title": "" }, { "docid": "e030cbcfdf71c561a228839806401f6e", "score": "0.7584445", "...
5a92488ff95f145b53a5149b745653c3
Baseline implementation for the delete_product REST call
[ { "docid": "a808ba054108370853410f235a0dcff0", "score": "0.70892525", "text": "def delete_product request_pb, options = nil\n raise ::ArgumentError, \"request must be provided\" if request_pb.nil?\n\n verb, uri, query_string_params, body = ServiceStub.transcode_delete_produ...
[ { "docid": "e0ad6e463189323c8bd24b9d5ab62176", "score": "0.78334576", "text": "def destroy\n Api.delete(\"#{BASE_PATH}/#{product_id}\")\n true\n end", "title": "" }, { "docid": "8e0ae8527df25788b7dde9dddbce8edf", "score": "0.76267856", "text": "def destroy\n if @produ...
2bf078791506d149c9cb00bebc487a89
Generate the quote node with all its containing text elements
[ { "docid": "f660de031c230a56cbec8aa49dc3166c", "score": "0.5386052", "text": "def export\n create_element(quote_tag, node_opts) do |div|\n @element.content.each do |child_element|\n div.add_child(base_class.new(child_element).export)\n end\n ...
[ { "docid": "b884d9710d87b2336807ee593cc8581d", "score": "0.67603695", "text": "def quote(node)\n cite_value = node.attr(\"citetitle\")\n cite_value = nil unless cite_value.to_s =~ URI::DEFAULT_PARSER.make_regexp\n\n blockquote_attributes = {\n anchor: node.id,\n qu...
a3229acfbf843fbe367988ab2a76e3f2
Check to see if the current user is subscribed to a thread. = Examples github = Github.new oauth_token: 'token' github.activity.notifications.subscribed? 'threadid'
[ { "docid": "14fd2e881c2f18a65ecc660a71fcdd29", "score": "0.7717471", "text": "def subscribed?(thread_id, params={})\n assert_presence_of thread_id\n normalize! params\n get_request(\"/notifications/threads/#{thread_id}/subscription\", params)\n end", "title": "" } ]
[ { "docid": "a24ff481d08da0c39e9d074e5d3d1c72", "score": "0.8167685", "text": "def subscribed?(*args)\n arguments(args, required: [:thread_id])\n\n get_request(\"/notifications/threads/#{arguments.thread_id}/subscription\", arguments.params)\n end", "title": "" }, { "docid": "ce3...
2eaa68b11e97ed9466086ee23f7f88e5
Return an hstore with only the keys in the given array: hstore_op.slice(:a) slice(hstore, a)
[ { "docid": "3f7bb043fb7c48ad5a50304325cb4c4d", "score": "0.7690572", "text": "def slice(keys)\n HStoreOp.new(function(:slice, wrap_input_array(keys)))\n end", "title": "" } ]
[ { "docid": "578f7e0ec1856e4c84c820d543f35a73", "score": "0.6606377", "text": "def slice!(*keys); end", "title": "" }, { "docid": "a8704bfae5de6e39fbd2557415964d98", "score": "0.64387524", "text": "def slice *keys\n dup.slice! *keys\n end", "title": "" }, { "docid": "d...
3f5af2d1bb47da622956e2d687284f21
5) when the Book has a complex multiple level hierarchy
[ { "docid": "35538e33f92b7f3869d16bb4c8b37929", "score": "0.52033067", "text": "def test_associations_5\n simulate('Book')\n simulate('Page')\n simulate('Line')\n simulate('Word')\n simulate('Letter')\n\n Book.class_eval do\n has_many :pages\n has_many :lines\n has_many :...
[ { "docid": "359a96f13786f958e05761f0adc6cd4c", "score": "0.6446331", "text": "def test_book_part(book_part)\n expect(book_part).to be_persisted\n expect(book_part.title).not_to be_blank\n\n book_part.child_book_parts.each do |cbp|\n next if cbp == book_part\n test_book_part(cbp)\n ...
bde7ae66ff4b47a628ebe05e9fad81aa
Split options into request options and params
[ { "docid": "3398784cc6244534b46231b1609d487f", "score": "0.7447643", "text": "def split_options(options = {})\n defaults = {\n method: :get,\n content_type: :json,\n accept: :json,\n append_json: true\n }\n options = defaults.merge(options)\n request_optio...
[ { "docid": "db1289b02e0bc0b9bf66954096d22c09", "score": "0.7073885", "text": "def options\n params.slice(*OPTIONS_KEYS).symbolize_keys\n end", "title": "" }, { "docid": "febfd616dc5d4f810c89ca4aedf09e6c", "score": "0.68689644", "text": "def parse_options options = {}, request = '...
80e43c8dc441ca91cca601908f8f7588
Whether this is visible to the given user based on the moderation state.
[ { "docid": "eb717e0dd59659fe6908d190ce3c60e7", "score": "0.8850114", "text": "def moderation_state_visible_to_user?(user)\n moderation_state_visible_to_all? || (!user.thredded_anonymous? && user_id == user.id)\n end", "title": "" } ]
[ { "docid": "05555fd1a68661aa0f31272e1645cd42", "score": "0.7851482", "text": "def viewable?(user=:false)\n (user != :false && is_visible_to_id <= user.user_level.position) || (user == :false && is_visible_to == UserLevel.find_by_name(\"Anonymous\"))\n end", "title": "" }, { "docid": "d69...
3d9fcfd52af9d17b6c4d651371d36897
this is the url that we'll put in the email with results
[ { "docid": "adcc8f981c9c682b8b2ecd9a2f43e323", "score": "0.0", "text": "def show\n render 'orders/show'\n end", "title": "" } ]
[ { "docid": "08dcc5cc6c7b7c1ba3998e248644bff8", "score": "0.6918927", "text": "def url\n\t\t\t@msg\n\t\tend", "title": "" }, { "docid": "6c7f0173801433f566e2ad0fec82069f", "score": "0.6557944", "text": "def fetch_squirrelmail(base_url)\nend", "title": "" }, { "docid": "e07...
32ab5951676d4d2b6a8bb25290a8f696
Common MEDLINE tags PMID PubMed Unique Identifier Unique number assigned to each PubMed citation.
[ { "docid": "4b787d595ccf5a354e87ee7965a723f2", "score": "0.6209587", "text": "def pmid\n @pubmed['PMID'].strip\n end", "title": "" } ]
[ { "docid": "4511d8154924fb2530d2fb83a652731c", "score": "0.6157933", "text": "def get_pubmed_id\n pub = PrimaryPublication.where(:study_id=>self.id).select('pmid');\n if pub.empty?\n return \"\"\n else\n return pub.first.pmid\n end\n end", "title"...
044e7dce36ce333a4cf2723fcc56fcc4
def slug self.id end
[ { "docid": "ae2b0f34129f11215ab56acebf1bf7d5", "score": "0.0", "text": "def slug \n sloog = self.username.gsub(\" \", \"-\").downcase\n end", "title": "" } ]
[ { "docid": "7dad1254d3a356889bd6514c9761d69a", "score": "0.91281164", "text": "def id\n slug\n end", "title": "" }, { "docid": "848679c78b1626e19fd0acf896495758", "score": "0.8580922", "text": "def slug; end", "title": "" }, { "docid": "848679c78b1626e19fd0acf89649575...
d5803add8e81c0e5439bb9e19b52f2ad
Update a template of network migration specification. Network migration specification once created and can be used as a template to indicate associated component which networks should be migrated and where. Currently migration template can be associated with compute collections which are managed by vCenter host profile...
[ { "docid": "9c20c81f06a61bb5b29b9ef255b11458", "score": "0.66542244", "text": "def update_network_migration_spec_with_http_info(template_id, network_migration_spec, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: NetworkTransportApi.update_networ...
[ { "docid": "7f0f5b4e72fa9c32bf83e2227fd2e7b6", "score": "0.70079887", "text": "def update_network_migration_spec(template_id, network_migration_spec, opts = {})\n data, _status_code, _headers = update_network_migration_spec_with_http_info(template_id, network_migration_spec, opts)\n return dat...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "109c519c6fa8cd829702d96320d52f6d", "score": "0.0", "text": "def grip_params\n params.require(:grip).permit(:name)\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...
baaff5517ac7a2ca13a87b0c41cdfea4
Rotate by the given Angle anticlockwise about the origin.
[ { "docid": "cc3a949963618c9c5e5d8fd96b8bdb6a", "score": "0.0", "text": "def rotate(th)\n x = @x*th.cos - @y*th.sin\n y = @x*th.sin + @y*th.cos\n Point.new(x,y)\n end", "title": "" } ]
[ { "docid": "22f44a64e9dd1d065e55bafccfb2b697", "score": "0.6967181", "text": "def rotate(angle)\n @direction += angle\n end", "title": "" }, { "docid": "7dcb17f0203dfc6e2d5f818fa32d4a86", "score": "0.68100214", "text": "def rotate(angle)\n \n end", "title": "" }, { ...
c6388a447a0f9a6504b2fefa69297b07
Provides a container for each of the property elements
[ { "docid": "941b7540944a61fd6fa7100cf7c9e24f", "score": "0.57923377", "text": "def profile_property_element(options={}, &proc)\n defaults = {:type => :table, :editable => false, :update => false}\n options = defaults.merge(options).symbolize_keys\n\n concat tag(:div, {:id => options[:id], :styl...
[ { "docid": "f5eb111f893b18a42dfa059c0f009b1f", "score": "0.6998946", "text": "def properties\n keys = @_properties.keys\n ret = []\n\n # example element, if there is one\n if @define\n @_properties['emptyElement'] = %($sel(\"#resources? .#{@item_id}:1:1\"))\n ...
6ad308405418f8293b5bf1145c5c8cb5
POST /books POST /books.json
[ { "docid": "9541281650d9e4ca8e4f9d2a1e4dc113", "score": "0.0", "text": "def create\n @book_request = BookRequest.new(book_request_params)\n respond_to do |format|\n if @book_request.save\n format.html { redirect_to account_reader_book_requests_path, notice: 'Book request was successful...
[ { "docid": "3622d3bdcdce424b7485f979c9b796eb", "score": "0.73853105", "text": "def create\n @books = Books.new(params[:books])\n\n respond_to do |format|\n if @books.save\n format.html { redirect_to @books, :notice => 'Book was successfully created.' }\n format.json { render :js...
16c621c74b381d10d07a94583a00085f
handle the +attr+ attribute as a "fileupload" column, generating additional methods as explained above. You should pass the attribute's name as a symbol, like this: file_column :image You can pass in an options hash that overrides the options in +DEFAULT_OPTIONS+.
[ { "docid": "b8b77bf3eb156596b1fc068ab8055715", "score": "0.7200059", "text": "def file_column(attr, options={})\n options = DEFAULT_OPTIONS.merge(options) if options\n \n my_options = FileColumn::init_options(options, \n ActiveSupport::Inflector....
[ { "docid": "560f3dd79c790edaeb4973dbd66f8bf2", "score": "0.7608237", "text": "def image_column( attr, options={} )\n options[:crop] ||= false\n options[:web_root] ||= \"/images\"\n options[:root_path] ||= File.join(RAILS_ROOT, \"public\", \"images\")\n options[:mime_extensions] ||= I...
94f0f85eccef7ba5571ed7d78dcb7b1b
shows the user resevation if the topic is user_reservation
[ { "docid": "45291dabc1d9fb6418e5283a131838b2", "score": "0.81959045", "text": "def user_reservation\n if topic_type == \"UserReservation\" then\n self.topic\n else\n nil\n end\n end", "title": "" } ]
[ { "docid": "4f061458745b238a4497e0ac0025f75d", "score": "0.8362259", "text": "def topic_is_user_reservation\n topic_type == \"UserReservation\"\n end", "title": "" }, { "docid": "2ddc87201d941c8bfcffa5773279c92b", "score": "0.6973622", "text": "def show\n if current_user && (c...
01242cfb26f51259076dc9e21cd76640
Parses out everyhting in the mzIdentML file
[ { "docid": "58df7c9350dbf7b0dcc89aacf92b64ab", "score": "0.5623219", "text": "def parse\n #Target\n doc = nokogiriDoc(@target)\n load_peptides(doc)\n \n doc.xpath(\"//xmlns:SpectrumIdentificationResult\").each do |result|\n count = result.xpath(\".//xmlns:SpectrumIdentifi...
[ { "docid": "0dfe398413ad1b1e3b8b185120a922dd", "score": "0.62365836", "text": "def parse (filename)\n\t\tf = File.open(filename)\n\t\tf.each do\t|line|\n\t\t\tnext if line =~ /^#/\n\t\t\tsym, val = line.split(':')\n\t\t\tsym_strip = sym.gsub(/\\s+/, \"\").strip\n\t\t\tval_strip = val.strip\n\t\t\tadd_ac...
cb688dec4dd857028791ca278d1da46c
Provides an asynchronous callback mechanism
[ { "docid": "ff57c277b76760b1d310013dc9759274", "score": "0.0", "text": "def notify(*args)\r\n @reactor.schedule do # just in case we are on a different event reactor\r\n if @pending && @pending.length > 0\r\n callbacks = @pending\r\n ...
[ { "docid": "a8d7928b0ddac8f0ac73a8dfba37513a", "score": "0.74686307", "text": "def callback_call; end", "title": "" }, { "docid": "bce3e1d1089bf6d6722900bd3cac0f36", "score": "0.742427", "text": "def callback\n end", "title": "" }, { "docid": "0f0df8828d29d38b86967b897de...
2a6b73fda784fbddcaa59a667e879014
Returns indent string multiplied by the depth
[ { "docid": "8cbbc488e839843f9f2d69f084e6b5aa", "score": "0.66055554", "text": "def indent(modifier = 0)\n \" \" * (@options.fetch(:log_depth, log_depth) * 2 + modifier)\n end", "title": "" } ]
[ { "docid": "faf3fedcb36f7106cb11200f764eeeee", "score": "0.81002563", "text": "def indent(depth)\n indent = \"#{depth}:\"\n depth.times do \n indent += \" .\"\n end\n indent\n end", "title": "" }, { "docid": "ae5ae7710678fa1c1d8c66cfab9f902b", "score": "0.79529536", ...
58855e365f1a7640d6dfdd8d69971763
leveraging the approach used in the [fast JSON API gem](
[ { "docid": "4dcb0aea8cfc46b4df48efa9f1938fd3", "score": "0.0", "text": "def collection?(args, collection_option = nil)\n raise(ArgumentError, \"#{name}: Unknown collection option value: #{collection_option}\") unless [true, false, nil].include? collection_option\n\n return collection_optio...
[ { "docid": "7255e465a5dc3057776289373a52af12", "score": "0.6519168", "text": "def look_up(url)\n all = RestClient.get(url)\n hash = JSON.parse(all)\nend", "title": "" }, { "docid": "38d1482c582291bd9075577544535b79", "score": "0.62644833", "text": "def api_fetch(url)\n JSON.parse(R...
dae5d33630d091be79d89bb237cbf075
GET /rams/new GET /rams/new.json
[ { "docid": "5cf465f92df4a0de2696682a1815ca76", "score": "0.761527", "text": "def new\n @ram = Ram.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @ram }\n end\n end", "title": "" } ]
[ { "docid": "2962b76cb47b3467d7d55f533330c0bc", "score": "0.72938955", "text": "def new\n @lid = Lid.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @lid }\n end\n end", "title": "" }, { "docid": "1bb56472463277b8a1f4e54204d492b1", ...
13d74d6f678f3724e4afa91e9002256a
POST /designation_types POST /designation_types.json
[ { "docid": "647af211c15d84820181e7a8e4d02e12", "score": "0.702297", "text": "def create\n @designation_type = DesignationType.new(designation_type_params)\n\n respond_to do |format|\n if @designation_type.save\n format.html { redirect_to @designation_type, notice: 'Designation type was...
[ { "docid": "d4c85346d0562cdee0a1c0fb5a1a86cf", "score": "0.7114481", "text": "def designation_type_params\n params.require(:designation_type).permit(:name)\n end", "title": "" }, { "docid": "768e3a33785f8f05cbf8d2d8b51374f1", "score": "0.6555928", "text": "def index\n @des...
7e5e3298265e7bd073660cfef9c50350
Calculates the basic Inverse Document Frequency of each token contained in a corpus of documents.
[ { "docid": "4ed5c43883021aeef4fc0452ba0b4239", "score": "0.69755477", "text": "def calculate\n _df = document_frequency\n _idf = Hash.new\n\n\n _df.each do |word, freq|\n _idf[word] = Math.log(@corpus.size/freq)\n end\n return _idf\n end", "title": "" } ]
[ { "docid": "dac7c01c9775c261356508ab7e5d1273", "score": "0.7855475", "text": "def calculate_inverse_document_frequency\n STDERR.puts \"Calculating IDF...\"\n results = Hash.new {|h, k| h[k] = 0 }\n\n terms.each do |term|\n results[term] += 1\n end\n\n log_total_count = Math.log10(tot...
24ebf98f3568afe7ec56d7de1fb16668
cdepman first even occurence Time complexity: O(n^2)
[ { "docid": "4b80c691730e8d7cca44920b296cb3c3", "score": "0.58984023", "text": "def first_even_occurrence_readable(array)\n array.each{|item| return item if array.count(item) % 2 == 0}\n nil\nend", "title": "" } ]
[ { "docid": "8fe54649e694afdf0c20c9aa8005f587", "score": "0.638569", "text": "def first_even_occurrence_efficient(array)\n hash = {};\n array.each do |item|\n hash[item] = !hash[item]\n end\n array.each do |item|\n return item if !hash[item]\n end\n nil\nend", "title": "" }, { "do...
4a6d9123b698aa257b2a88f19087f80a
Write the element for a rich string.
[ { "docid": "214706173a396ed86948546c49890448", "score": "0.0", "text": "def write_title_formula(title, is_y_axis = nil, axis = nil, layout = nil, overlay = nil) # :nodoc:\n @writer.tag_elements('c:title') do\n # Write the c:tx element.\n write_tx_formula(title.formula, axis ? axis.dat...
[ { "docid": "db11fc6a69234a8c7ad27b97417819e8", "score": "0.67191106", "text": "def write string\n end", "title": "" }, { "docid": "11357a16d1e9edcbbc553e785d3cf85e", "score": "0.64585257", "text": "def write_elem(tag, value)\n @io << \"<#{tag}>#{text(value)}</#{tag}>\"\...
07bf4dc593dd648f025def0bbd23b351
Get all cellphone senders Returns all cellphone senders
[ { "docid": "c82a10413719f732f32be0ee9939ccf9", "score": "0.81439173", "text": "def get_all_cellphone_senders(opts = {})\n data, _status_code, _headers = get_all_cellphone_senders_with_http_info(opts)\n data\n end", "title": "" } ]
[ { "docid": "d054e47768ac86eb628b30c5d817f54e", "score": "0.745669", "text": "def get_senders\n @gateway.request(\"/get/senders.php\")\n end", "title": "" }, { "docid": "be85879be9346fa41c13b937af998df5", "score": "0.7343665", "text": "def get_all_phone_senders(opts = {})\n ...
69f219549f0cc986add0f1e408880d32
===return String The Transaction ID
[ { "docid": "b3802b2402ce0d459063ae8df565aadd", "score": "0.8363221", "text": "def gettransactionid()\r\n return getvalue(SVTags::TRANSACTION_ID)\r\n end", "title": "" } ]
[ { "docid": "db1a239001ed427f8b7d6d22040be16e", "score": "0.862981", "text": "def transaction_id\n read('transaction_id')\n end", "title": "" }, { "docid": "858b66615da6f9aefc8947419da4feb8", "score": "0.8243702", "text": "def transaction_id\n @data[:transaction_i...
a3c4b5098bbc79498238d83a5c993f47
SCHEDULE UPDATED EMAIL Sent to players/parents/followers of all teams when schedule update is triggered Generic Schedule Updated Template
[ { "docid": "db5d9890281c9a4f18e42360f714fcfc", "score": "0.69583476", "text": "def member_schedule_updated(recipient_id, tenant_id, data, render_parent=false)\n @tenant = Tenant.find(tenant_id)\n valid_data, @recipient, @team, @league, @events, @team_invite_token = process_schedule_data(recipient_...
[ { "docid": "ed0f82381ea78afe6967a0043bfcdb6a", "score": "0.7217589", "text": "def workflow_updated\n @data[:owner_name] = @project_owner.try(:full_name)\n @data[:project_title] = @project.try(:title)\n @data[:workflow_link] = \"#{ENV['DOMAIN']}/#/app/projects/#{@project.id}/workflow\"\n @rec...
92449354e7f1a50b8d7301120cd750a9
For now all apps are shared with everyone
[ { "docid": "ab29901e24bcc8c5edec7b0a0b621906", "score": "0.0", "text": "def apps\n Application.all\n end", "title": "" } ]
[ { "docid": "7c3560ca56839221256b843f348f281e", "score": "0.67514634", "text": "def shared_user_app_data_allowed\n return @shared_user_app_data_allowed\n end", "title": "" }, { "docid": "c46458b6e70a26be039bcb70f4fc0f84", "score": "0.6468681", "text": "def sh...
ec90c1236c017f762d8b9491615ea5a1
We want to be able to iterate over news items
[ { "docid": "fef371d83a663910e318d4c8700d4d50", "score": "0.0", "text": "def virtual?\n false\n end", "title": "" } ]
[ { "docid": "6e0773863164f80ea7ffc4f3acac375e", "score": "0.772402", "text": "def items\n @news_feed.items\n end", "title": "" }, { "docid": "46694295fc3339271ba9df0828f61fa3", "score": "0.70307994", "text": "def index\n @news_items = NewsItem.formatted_list\n end", "t...
b02d98a10d5d2a011581b9a69f51d857
Public: Get a String representation of the institution. Returns a String.
[ { "docid": "248d968208a67c51da9e203c9aa41706", "score": "0.6810799", "text": "def inspect\n \"#<Plaid::SearchResultInstitution id=#{id.inspect}, name=#{name.inspect}, \" \\\n '...>'\n end", "title": "" } ]
[ { "docid": "c2cb2ca49366e11218baebea3e8dd458", "score": "0.71856993", "text": "def institution_name\n owner ? owner.institution.full_name : \"Unknown\"\n end", "title": "" }, { "docid": "c60924762bcf240dc935fe5e3386c0c4", "score": "0.70867985", "text": "def inspect\n \"#<Pla...
ef424079311974580e71b1f0b3689fe9
have to iterate through two ll's that are the same length in order to find intersection find length of both, get difference remove that many from the longest ll iterate through both, find the value that's the same
[ { "docid": "deb2ef1f51370838408a325c0c54b60c", "score": "0.6220592", "text": "def intersection(ll1, ll2)\n return nil if ll1 == nil || ll2 == nil\n\n ll1length = 0\n ll2length = 0\n\n ll1header = ll1.head\n ll2header = ll2.head\n\n ll1tail = nil\n ll2tail = nil\n\n until ll1 == nil\n ll1lengt...
[ { "docid": "d5dbd5bd53a46117edf9cf3e7c777454", "score": "0.70128554", "text": "def longest(a1, a2)\n (normalize(a1) + normalize(a2)).uniq.sort.join\nend", "title": "" }, { "docid": "aa5b793879fab41fb5170340627f3de7", "score": "0.6901112", "text": "def converging_node(list1, list2)\r...
5bbd9bba2a22ecb46b34f7b160b0ca13
GET /star_golds/1 GET /star_golds/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "87ba77e964e86acf7e91fcc5ebdcb5db", "score": "0.7100197", "text": "def show\n @star = Star.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @star }\n end\n end", "title": "" }, { "docid": "fd6df0810330672e9...
2a9dcf0be9ee4c71853fdc6426923d66
PATCH/PUT /brands_categories/1 PATCH/PUT /brands_categories/1.json
[ { "docid": "60a3651cae5f06dd93155bf43dfd4c78", "score": "0.71189535", "text": "def update\n respond_to do |format|\n if @brands_category.update(brands_category_params)\n format.html { redirect_to @brands_category, notice: 'Brands category was successfully updated.' }\n format.json ...
[ { "docid": "d7df55f0522862b16aacc76bfaf44b53", "score": "0.7011535", "text": "def update\n if @brand_category.update(brand_category_params)\n head :no_content\n else\n render json: @brand_category.errors, status: :unprocessable_entity\n end\n end", "title": "" }, { "docid...
2ddabcc0012488fbf1a49668cdd84174
Return the first file that exists in a list of files
[ { "docid": "8c9f81708136c2c1fceb22cd854fb239", "score": "0.75315225", "text": "def select_file(*files)\n files.each do |file|\n if File.exists?(file) then return file end\n end\n return nil\n end", "title": "" } ]
[ { "docid": "8ac0bbd6c8a54a19bd25ac29f3952958", "score": "0.7762605", "text": "def check_file(filenames)\n filenames.select{ |f| File.exists?(f) }.first\n end", "title": "" }, { "docid": "50c199d48944f5e38130a49071a25654", "score": "0.71770054", "text": "def find_file( *args )\n ...
0e4a2608042b65130f15f5fdb4b60eb7
used for writing to
[ { "docid": "0667de02375f6fec992f3c6711fa71a0", "score": "0.0", "text": "def position_of_param(param)\n case param[:mode]\n when 0\n param[:param]\n when 2\n @relative_base + param[:param]\n end\n end", "title": "" } ]
[ { "docid": "7b05a27fe0243a88a10b5f3f957bdd92", "score": "0.82376385", "text": "def write; end", "title": "" }, { "docid": "7b05a27fe0243a88a10b5f3f957bdd92", "score": "0.82376385", "text": "def write; end", "title": "" }, { "docid": "7b05a27fe0243a88a10b5f3f957bdd92", ...
86f6c90379891059cda9c59ae94f92eb
To view the details for a single zone, make a request using that zone's permalink: Spree.zone("azone") do |zone| ... end You may also query by the zone's id attribute: Spree.zone("id") do |zone| ... end Note that the API will attempt a permalink lookup before an ID lookup.
[ { "docid": "09dd1ef4b3eead857262119af21a0408", "score": "0.7921592", "text": "def zone(id, &block)\n object_query(Spree::Zone, zone_uri(id), &block)\n end", "title": "" } ]
[ { "docid": "9dfb93a24ec66c64c85282635adb4f6d", "score": "0.7479883", "text": "def show\n @zone = Zone.find(params[:id])\n end", "title": "" }, { "docid": "46f50a83be97eb4238b6031756519405", "score": "0.73830986", "text": "def zone(zone)\n raise NSOne::MissingParameter, \"z...
35de8ea0e65d1c246489b844a6e1dd61
DELETE /mcontacts/:id DELETE /mcontacts/:id.js DELETE /mcontacts/:id.xml DELETE /mcontacts/:id.json
[ { "docid": "da7bb9c6e6bd7493b9988c23d83a7e6c", "score": "0.0", "text": "def destroy\n respond_to do |format|\n if @mcontact.destroy\n flash[:notice] = \"Mcontact was successfully destroyed.\"\n format.html { redirect_to(mcontacts_url) }\n format.js # destroy.js.rjs\n ...
[ { "docid": "db31580cc47cc5b92920ab8f13760712", "score": "0.8145437", "text": "def destroy # DELETE /contacts/:id\n @contact = Contact.find(params[:id])\n @contact.destroy\n end", "title": "" }, { "docid": "71d108a327f14d15aa6e122f03f03f90", "score": "0.7904226", "text": ...
a06ad62edcdd50304568c28b4e4444a9
the beginning of the original string. The return value should be arranged in order from shortest to longest substring. Examples: substrings_at_start('abc') == ['a', 'ab', 'abc'] substrings_at_start('a') == ['a'] substrings_at_start('xyzzy') == ['x', 'xy', 'xyz', 'xyzz', 'xyzzy'] PEDAC: Understand the Problem: > Input: ...
[ { "docid": "2fdd52b6669dcdd23c0c1cc08f96c784", "score": "0.81948626", "text": "def substrings_at_start(string)\n substrings = []\n string.length.times { |i| substrings << string.slice(0, i + 1)}\n substrings\nend", "title": "" } ]
[ { "docid": "aaaf2b38460142e7d258a7e86f676a32", "score": "0.8571486", "text": "def substrings_at_start(str)\n str.chars.map.with_index { |_, idx| str.slice(0..idx) }\nend", "title": "" }, { "docid": "aaaf2b38460142e7d258a7e86f676a32", "score": "0.8571486", "text": "def substrings_at_...
044f70709219efbfd0251f91b990f5aa
PATCH/PUT /quizzes/1 PATCH/PUT /quizzes/1.json
[ { "docid": "77ba31427286b6f42c143439984b3804", "score": "0.6332713", "text": "def update\n respond_to do |format|\n if @quiz.update(quiz_params)\n format.html { redirect_to @quiz, notice: 'Quiz was successfully updated.' }\n format.json { head :no_content }\n else\n for...
[ { "docid": "d9b91c48c9b090e424e3cb9e2c5ec912", "score": "0.6749494", "text": "def update\n respond_to do |format|\n if @quizzes_question.update(quizzes_question_params)\n if params[:commit] =~ /add/i\n format.html { redirect_to edit_quiz_question_path(@question.quiz, @question) }...
0ca2c7b42f15ee516b09574009689dd4
Creates a new, unique uuid for a user
[ { "docid": "44a3102e743a4d408895f976d17186b2", "score": "0.0", "text": "def create_unique_uuid(conn)\n loop do\n uuid = SecureRandom.uuid\n break uuid unless uuid_exists?(conn, uuid)\n end\n end", "title": "" } ]
[ { "docid": "6be9ed1a3d9dacfee30708ae7e6ec082", "score": "0.73285884", "text": "def create_uuid\n self.uuid = SecureRandom.hex(12)\n end", "title": "" }, { "docid": "b1a20a6c6a2aa9bc879a0780f80e93ba", "score": "0.7156173", "text": "def create\n @user = User.where(uuid: user_par...
f1f4f64002559912b2e131a0d14fa2be
This method subtracts the payment.amount to the register.credit_extended
[ { "docid": "6be92e80a6322d9eed5a41cb74238b9b", "score": "0.87313026", "text": "def subtract_payment_from_register\n \tregister = Register.where(:creditor_id => receiver_id, :debtor_id => user_id).first\n \t\n credit_extended = register.credit_extended - self.total_amount\n register.update_attrib...
[ { "docid": "dc5f5b6f8f8def5ba37f7f301f73118e", "score": "0.7212982", "text": "def deduct_from_credit\n if self.account.has_credit? && self.payment_method != Charge::COMPED_PAYMENT\n credit_amount_string = ActionController::Base.helpers.number_to_currency(self.account.credit)\n charge_amount...
8e6d14596ff41177cb5eb9831114a8d8
create Split a running Pattern.create block into multiple patterns. The output that has been generated up until the point where this is called will be written and a new pattern will be opened to contain the remainder of the pattern content generated by the block. Each additional pattern section created by calling this ...
[ { "docid": "35558f1d17805cc2315622d8fb3f2904", "score": "0.5578119", "text": "def split(options = {})\n split_name = options.delete(:name) || ''\n pattern_close(options.merge(call_shutdown_callbacks: false))\n job.inc_split_counter(split_name)\n pattern_open(options.merge(cal...
[ { "docid": "006cdd1c1aba3bef5fc09455c3aee0ff", "score": "0.6383661", "text": "def create_parts\n return unless @index < @source.size\n char = @source.getbyte(@index).chr\n case char\n when '('\n idx = @index + 1\n if idx < @source.size and @source.getbyte(idx).chr == '...
3571fc33958e4fe218a7535cce04a60d
This method fetch all closed issues pull requests (GitLab uses the term "merge requests")
[ { "docid": "0c0e75b1c43478fb1184065a04b54662", "score": "0.8453449", "text": "def fetch_closed_issues_and_pr\n issues = []\n print \"Fetching closed issues...\\r\" if @options[:verbose]\n options = { state: \"closed\", scope: :all }\n @client.issues(@project_id, DEFAULT_REQUEST_OPTIO...
[ { "docid": "6edbd9627af7d4a9466727f3c3e41e55", "score": "0.8732524", "text": "def fetch_closed_pull_requests\n pull_requests = []\n options = { state: \"merged\", scope: :all }\n\n @client.merge_requests(@project_id, options).auto_paginate do |new_pr|\n new_pr = stringify_keys_deep...
e2d7f3f8f4074a799174ec9c3f570d9d
User returning a book
[ { "docid": "4de1c00cbc839c2904018ecb653a2a1d", "score": "0.68087184", "text": "def return\n @book = Book.find(params[:book_id])\n @book.is_borrowed = false\n @book.user = nil\n @book.save\n redirect_to request.referrer, notice: \"You're being redirected\"\n end", ...
[ { "docid": "14db97ca2136382dbde0938718a602f9", "score": "0.7613581", "text": "def retrieve_book\n @book = Book.find(params[:book_id])\n end", "title": "" }, { "docid": "772f01bff230b04c26f89cdcfbfca073", "score": "0.7500451", "text": "def book\n fetch('harry_potter.b...
15c925fe1f72d62e74b47344cff6c2ee
If we are creating a new dynamic model referring to a table that already exists, setup the options YAML text with DB column types from the database.
[ { "docid": "3b3d66839289482301e75e96350b435a", "score": "0.61839825", "text": "def set_field_types_from_columns(force: nil)\n return unless Admin::MigrationGenerator.table_or_view_exists? table_name\n\n # Ensure the new options have reloaded\n option_configs\n return if !force && db_columns....
[ { "docid": "5f06330028e6465fbfefc464910dc9e9", "score": "0.6400341", "text": "def update_config_from_table\n set_field_list_from_table force: true\n set_comments_from_table force: true\n set_field_types_from_columns force: true\n option_configs\n end", "title": "" }, { "docid": ...
833da3e333d996c621dd8c2c22a0a000
Get all the public assets and their server locations
[ { "docid": "c4beb213bf57566508b30de613eec53f", "score": "0.7407176", "text": "def map_assets\n ret = {}\n Dir.glob(\"output/public/*\").each do |asset_dir|\n dir_name = File.basename asset_dir\n ret[dir_name] = {}\n Dir.glob(\"#{asset_dir}/*\").each do |filepath|\n filename =...
[ { "docid": "c109309c71be9283cb535a048431543e", "score": "0.686753", "text": "def assets\n environments.collect {|e| e.assets }\n end", "title": "" }, { "docid": "bf9c777545d301703375556ec5effe61", "score": "0.6833751", "text": "def assets\n []\n end", "title": "" }...
1ead71c531114e2deed322c4f6671db9
rubocop:enable all rubocop:disable AbcSize, MethodLength
[ { "docid": "95859b3674b8e0f6789f766f098d5387", "score": "0.0", "text": "def decompress_v2_len str\n length = 0\n offset = 0\n while offset < str.length\n substr = str[offset, str.length]\n match_data = substr.match(/\\((\\d+)x(\\d+)\\)/)\n if match_data.nil?\n length += st...
[ { "docid": "978457f08b58776f5cfb90fcb9e1ebc7", "score": "0.63943464", "text": "def method_size_cutoff=(_arg0); end", "title": "" }, { "docid": "978457f08b58776f5cfb90fcb9e1ebc7", "score": "0.63943464", "text": "def method_size_cutoff=(_arg0); end", "title": "" }, { "docid...
d5b66d96c6e8bc61479e51ccf002a3bc
For the split subject facet Split with em dash along v,x,y,z
[ { "docid": "adb6e72553fb785d938a6d7be6601fa1", "score": "0.0", "text": "def process_subject_topic_facet(fields)\n lambda do |record, accumulator|\n return unless record.is_a? MARC::Record\n\n subjects = []\n Traject::MarcExtractor.cached(fields).collect_matching_lines(record) do |field...
[ { "docid": "8af3ca181b7563ab3f526efc5be7c3d5", "score": "0.60210836", "text": "def x_split; end", "title": "" }, { "docid": "7d2eaf7563567815c571325c568f47df", "score": "0.5649269", "text": "def subject_xfacet_to_facet(value)\n value.gsub('--', ' ').gsub(/\\s{2,}/, ' ')\n end", ...
a2099a77c85e91272ae2f9e35b937953
Only allow a trusted parameter "white list" through.
[ { "docid": "5f1839500ad47c13c1908b00979c839f", "score": "0.0", "text": "def attachment_params\n params.require(:attachment).permit(:image, :attachable_id, :attachable_type, :remove_image, :crop_x, :crop_y, :crop_w, :crop_h)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.7943618", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "f6060519cb0c56a439976f0c978690db", "score": "0.69572574", "text": "def permitted_params\n params.permit!\n end", "title"...
4a778d83c7f915f63d80fdba5362dc8c
Polls a port on a specified ip address until it is found to be open or max tries is reached
[ { "docid": "57ddef5f006a6835e2d19310f84dc993", "score": "0.8151685", "text": "def poll_port(ip, port, port_type, timer, max_tries = 10)\n\t\twhile(open_port?(ip, port) != true) do\n\t\t\tputs \"#{port_type} port not online yet..\"\n\t\t\tif max_tries == 0\n\t\t\t\tputs \"Max port checks attempts reached...
[ { "docid": "f3ca714bc0a3ce4b1d96d63e9272df35", "score": "0.7475638", "text": "def wait_for_port(port, opts={})\n ip = opts.delete(:public_ip) || public_ip\n retry_times = opts.delete(:retry_times) || 10\n pause_time = opts.delete(:pause_time) || 1\n \n ret...
4f72e5619aa2d42158336a6da06e396b
Select the method to parse out links
[ { "docid": "2b0cdc81159541bbb3594fc779653eaa", "score": "0.60742414", "text": "def get_links(text)\n if ($options.use == :uri)\n get_links_with_uri(text)\n elsif ($options.use == :hpricot)\n get_links_with_hpricot(text)\n elsif ($options.use == :nokogiri)\n get_links_...
[ { "docid": "d7d67ba0228c2889c01acb4e7d5dacec", "score": "0.76905304", "text": "def links_parser; end", "title": "" }, { "docid": "5a2485def94b46cb90fcd8668985c2dd", "score": "0.68952626", "text": "def links_parser=(_arg0); end", "title": "" }, { "docid": "e3c3425418f5bf8d...
e1eab3224802a1dbca4ace5ec89188dc
def self.has_residency(arg_client_id) where("client_id = ? and residency is not null", arg_client_id).count > 0 end
[ { "docid": "dece2ee755f42a0ceb1e42cd87ca8fd2", "score": "0.0", "text": "def valid_alien_DOE?\n if alien_DOE.present?\n if alien_DOE.to_date < Date.civil(1900,1,1)\n errors.add(:alien_DOE, \"must be after 1900.\")\n return false\n else\n ...
[ { "docid": "777fe90c589a2ac3b0fbae3e3ba14c4a", "score": "0.625542", "text": "def tiene_nota_redaccion?\n NotaEnEvaluacion.where(:usuario_ci => usuario_ci, :idioma_id => idioma_id, \n :tipo_categoria_id => tipo_categoria_id, \n :tipo_nivel_id => tipo...
73e4dfb7cfc749baefd5967b35efbc4b
this will send one email with all payments to each payee, from a particular user
[ { "docid": "81f9e4f6800ae3b129049786a69f3930", "score": "0.76282007", "text": "def reminder_email2(all_payments)\n @all_payments = all_payments\n @url = generate_url(User.find_by_email(@all_payments.first.email))\n #loaner_email = User.find(@all_payments.first.user_id).email\n\n mail(:to => ...
[ { "docid": "500a5d89e03db93db31fa2d33c7dba3d", "score": "0.7408952", "text": "def send_email(user, user_url)\n user.recipients.each do |recipient|\n @recipient = recipient\n @user = user\n @executor = user.executors.first\n @user_url = user_url\n mail( \n ...
632b8d73125ab306e8a1c84b93add17e
GET /presentations/1 GET /presentations/1.json
[ { "docid": "a324ac8ff809a25182eecee524148702", "score": "0.0", "text": "def show\n render :layout => \"presentation\"\n end", "title": "" } ]
[ { "docid": "481972badb5741820fd4815f7fc22536", "score": "0.75861156", "text": "def show\n @presentation = current_church.presentations.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @presentation }\n end\n end", "title": ""...
82f01c3328a0fdf720c48f36593dff81
Register a validation rule for the given key.
[ { "docid": "b666f2b7a5fc4856d6b9460923095f10", "score": "0.6999911", "text": "def validate(key, &validator)\n vs = (validators[key] || [])\n vs << validator\n validators[key] = vs\n end", "title": "" } ]
[ { "docid": "cf856dd49ef26913fcca60bea8693cc0", "score": "0.73656493", "text": "def add_rule(key, rule)\n\n instance = rule.new\n\n #verify the rule instance inherits ValidationRule\n if instance == nil || !instance.is_a?(ValidationRule)\n raise ValidationProfiler::Exception...
56135cc615ecf86813aa3b30ab142ce5
Allows access to the process ids created by the runner.
[ { "docid": "0ff365de5d8fb82384279d9f6e67f5c6", "score": "0.7259227", "text": "def pids\n @pids ||= []\n end", "title": "" } ]
[ { "docid": "5625276bb4967d94f31ae72352bdf293", "score": "0.7377363", "text": "def pids\n list = []\n @processes.each do |p|\n list.push(p.pid)\n end\n list\n end", "title": "" }, { "docid": "8a255a1bd4640dc9f7e11243b979aa33", "score": "0.71878374", "text...
e3a16e5759b257195afba45d918ba9e6
Merge application metadata into meeting instance and return.
[ { "docid": "5a575dd56c67bb2c40f09bfe5deb0347", "score": "0.81933564", "text": "def merge_application_meeting_metadata(meeting)\n meeting[:Meeting][:ApplicationMetadata] = application_meeting_metadata(meeting)\n meeting\n end", "title": "" } ]
[ { "docid": "f290c857813704c078facdd10b0fc7a6", "score": "0.7051463", "text": "def application_meeting_metadata(meeting)\n {}\n end", "title": "" }, { "docid": "a3028660e10d3d0e9027f638b04df566", "score": "0.7001923", "text": "def merge_application_attendee_metadata(at...
4ef0af96e94cfcf57c7d108144bd29e9
Percentage of Memory used, 0.0 .. 100.0
[ { "docid": "6637d1e0a23cd764ec65d27f484cb9f0", "score": "0.86350507", "text": "def mem_percent\n (100.0 * mem_used / mem_total).round(1)\n rescue\n 0\n end", "title": "" } ]
[ { "docid": "9b4b582eeaaa0f200d29bf31a428c3c5", "score": "0.84862155", "text": "def memory_percentage\n @memory_percentage ||= parts[2].to_f\n end", "title": "" }, { "docid": "03c4dd264aac9f6339188700515eea04", "score": "0.8451853", "text": "def memory_percent\n rss = @proc...
1da3633936c974419d2a2d941ea42dda
GET /maintenances/1 GET /maintenances/1.json
[ { "docid": "ca1703f4d97e7e7b419e4b4fabb28f64", "score": "0.58463943", "text": "def show\n @documents = @maintenance.documents\n end", "title": "" } ]
[ { "docid": "ba9166e9de939019a5760e7514de9754", "score": "0.7732917", "text": "def get_maintenances()\n results = @zabbix.raw_api(\"maintenance.get\", {\"output\" => \"extend\", \"selectHosts\" => \"extend\", \"selectGroups\" => \"extend\"} )\n pp results\n end", "title": "" }, {...
22f60d81708979184825ab522027e12d
Set the value of the Legend input for this Choreo.
[ { "docid": "f8e903799b8aad4d98768f9a015d6ff3", "score": "0.7911483", "text": "def set_Legend(value)\n set_input(\"Legend\", value)\n end", "title": "" } ]
[ { "docid": "0da865db3fc2705d37a54dfb51793a2e", "score": "0.7557695", "text": "def legend=(legend)\n Validator.validate_type(legend, 'Array')\n @parameters[:legend] = legend\n end", "title": "" }, { "docid": "1957d70f933ab61b48da49271203db2e", "score": "0.7497105", "text": "def...
7cf0be3cc0b9f11fe8bbc74052d28ba1
if := 'if' ('else' )?
[ { "docid": "d671731233ada5e19ea8e280f6e404a5", "score": "0.7436544", "text": "def if_\n\t\tnext_if(:keyword, 'if') or return\n\t\tcond = expression or raise 'missing condition for `if` statement'\n\t\tif_true = block or raise 'missing true block for `if` statement'\n\t\tif next_if(:keyword, 'else')\n\t\...
[ { "docid": "f72d3b1f613d1592f131d6dd8cb512b1", "score": "0.82311654", "text": "def if(condition, if_true, if_false); end", "title": "" }, { "docid": "f4fbc48554c0ffa1fef7e739fed6fdb9", "score": "0.76251465", "text": "def elsif_conditional?; end", "title": "" }, { "docid":...
46a8a8c20bbc295a96e527717b78fa05
title Cannot be repeated by the same artist in the same year release_year Optional if released is false release_year Must be less than or equal to the current year
[ { "docid": "d840f75a0732779a18d175b434389daa", "score": "0.0", "text": "def current_year\n Time.current.year\n end", "title": "" } ]
[ { "docid": "5e6546f1917c631a7aa8a8e206f3b99f", "score": "0.75408995", "text": "def title_unique?\n song = Song.find_by(title: self.title)\n if song && song.release_year == self.release_year\n errors.add(:title, \"Artist cannot release same song in one year.\")\n end\n end", "title": "...
d5eaf035fb342e64d9ebd4716c2430ec
GET /petrol_pump_stations/1 GET /petrol_pump_stations/1.json
[ { "docid": "a81945373733e4951b987de6ea99f9a1", "score": "0.0", "text": "def show\n end", "title": "" } ]
[ { "docid": "0d39e001e763b125f2fc0092f9d5b197", "score": "0.71741617", "text": "def index\n @petrol_pump_stations = PetrolPumpStation.all\n end", "title": "" }, { "docid": "e9b99826c75a12d72b4463df793f991b", "score": "0.66828376", "text": "def show\n @stalltalkian = Stalltalkia...
ca2a156c35727e1b3287a90f149946d2
wait for search results loaded
[ { "docid": "859837cfe465a67b68e553372da299c8", "score": "0.7197217", "text": "def results_loaded?\r\n # Watir::Wait.until { emc_loading('loading').present? }\r\n sleep 2\r\n emc_loading('loading').wait_while_present \r\n\r\n end", "title": "" } ]
[ { "docid": "95fdf90e6bcb647b2efddaef6b918192", "score": "0.83664995", "text": "def wait_for_search_results\n wait_for_spinner\n results_count\n end", "title": "" }, { "docid": "6582a0371b491a3c671eb5ab49a338b0", "score": "0.7881906", "text": "def wait_results_load\n sleep 2...
c6fa91b5cfad9beb809dcf3d476de082
Has the puzzle been solved? In other words, have all the cells been assigned numbers?
[ { "docid": "f1a8cfe1be78001069a5ed73f75633a3", "score": "0.84574145", "text": "def solved?\n all? { |cell| cell.number }\n end", "title": "" } ]
[ { "docid": "e4f6bf354ef4c772bbba49580e84cde0", "score": "0.8529565", "text": "def solved?\n\t\tall? { |cell| cell.number }\n\tend", "title": "" }, { "docid": "8bc07b233e4c2823904dc7fa5e77a15a", "score": "0.8177407", "text": "def solved?\n @cells.each_value do |value|\n return...
f2bf1debe62fc71b48204912cc31c514
gets the storage related information
[ { "docid": "b8fb655345710d972adde3bc2b363294", "score": "0.6761097", "text": "def print_storage_info()\n # cloning the database configuration\n storage_info = @db_config.clone()\n\n # hiding database password\n storage_info['password'] = 'PRIVATE'\n\n # printing information\n storage_i...
[ { "docid": "e56ff13f1e45cd4082883f230d0b086a", "score": "0.74746174", "text": "def storage() @storage; end", "title": "" }, { "docid": "47fbbd7e6c813e9bdcde429c155219e1", "score": "0.7402731", "text": "def storage\n Boom.storage\n end", "title": "" }, { "docid...
a792b9e3508f3c4c8541233c28f985c0
PATCH/PUT /registrations/1 PATCH/PUT /registrations/1.json
[ { "docid": "462a2dab8cc459f401dee2859d9c5c24", "score": "0.6451722", "text": "def update\n respond_to do |format|\n if @registration.update(registration_params)\n format.html { redirect_to @registration, notice: 'Registration was successfully updated.' }\n format.json { render :sho...
[ { "docid": "638d8b3f17f1eca730bb179a35bd6549", "score": "0.66154", "text": "def update\n respond_to do |format|\n if @registration.update(registration_params)\n\n format.html { redirect_to @registration, notice: 'Registration was successfully updated.' }\n format.json { head :no_co...
d3f03a7a47286a85a98c00227212c7e8
privato. Usato sia per articolo che preview (anche se non pubblico il project ed issue)
[ { "docid": "fac265388379b4244b89ac988d1f7419", "score": "0.0", "text": "def other_articolo_datas()\n @attachements = @articolo.attachments\n\n #singolo articolo\n @section_id = @articolo.section_id\n @icount = Issue.all_public_fs.with_filter(\"#{Section.table_name}.id = \" + @section_id.to_s...
[ { "docid": "dd6aa98ece6241968904093b56980355", "score": "0.7540045", "text": "def preview; end", "title": "" }, { "docid": "dd6aa98ece6241968904093b56980355", "score": "0.7538989", "text": "def preview; end", "title": "" }, { "docid": "dd6aa98ece6241968904093b56980355", ...
dcc5151f6f9c184cc320543ea81f45f5
"reference week", used in fugit for cron modulo notation
[ { "docid": "1abd705802fba7ef00ec84a61b3ab70d", "score": "0.0", "text": "def rday\n\n ((self - EtOrbi.make_time('2019-01-01 00:00:00', @zone)) / DAY_S)\n .floor + 1\n end", "title": "" } ]
[ { "docid": "54f5c244b729713312644322cdcf0a27", "score": "0.7614943", "text": "def week() @week end", "title": "" }, { "docid": "f2cb3a06f55e1a77697325a02da87141", "score": "0.758877", "text": "def week; end", "title": "" }, { "docid": "514899eced8a8017a59b9e238ffcf490", ...
a2099a77c85e91272ae2f9e35b937953
Only allow a trusted parameter "white list" through.
[ { "docid": "8f2b11d8523251b574d7e0bb6eb63217", "score": "0.0", "text": "def qline_params\n params.require(:qline).permit(:qgroup_id, :cat, :item, :quantity, :unit, :rate, :price, :vat_id, :vat_due, :total, :note, :linetype, :line_order)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.7943618", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "f6060519cb0c56a439976f0c978690db", "score": "0.69572574", "text": "def permitted_params\n params.permit!\n end", "title"...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "9ca24439626d26d2f35e1ed3a4123c1a", "score": "0.0", "text": "def flat_params\n params.require(:flat).permit(:name, :address)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.74939764", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "13a61145b00345517e33319a34f7d385", "score": "0.6955084", "text": "def strong_params\n params.require(:request).permit(param_whit...
a8d56a9a63f1e843fcdcc4a2b6274229
Register the macro under the given name.
[ { "docid": "c9da75d2829755d3e3f9eb15322e5613", "score": "0.81865513", "text": "def register(name)\n Assertion.register_macro name, self\n end", "title": "" } ]
[ { "docid": "279a624ffa96cc098af9f719c0a01c3c", "score": "0.7765948", "text": "def register(name, *args, &block)\n macro = Macro.new(name, args: args, block: block)\n super(name, macro, call: false, &nil)\n self\n end", "title": "" }, { "docid": "cab9077410f5...
74a9a2476144120091a712efa875ebd2
Get the value from an esign tag in the document
[ { "docid": "189ddc0ecdfa163987b2be692b82b1f2", "score": "0.0", "text": "def get_document_tag(tagname, from: nil)\n from ||= @prepared_doc\n from.match(%r{<#{tagname}>(.*)</#{tagname}>})[1]\n end", "title": "" } ]
[ { "docid": "561a4ae7bb039eb789de809dfb661ff0", "score": "0.69584143", "text": "def get_value(element)\n\t\t\tif ['input','select','textarea'].include? element.tag_name.downcase\n\t\t\t\telement.attribute('value')\n\t\t\telse\n\t\t\t\telement.text\n\t\t\tend\n\t\tend", "title": "" }, { "docid...
c657de4b70d266e9a3a784b999ea9e60
Never trust parameters from the scary internet, only allow the white list through.
[ { "docid": "db54f03143413d0c9b2bbe42d344e743", "score": "0.0", "text": "def record_params\n params.require(:record).permit(:railcar_id, :horafinal, :estado,\n :horainicio, :space_id)\n end", "title": "" } ]
[ { "docid": "3663f9efd3f3bbf73f4830949ab0522b", "score": "0.7495027", "text": "def whitelisted_params\n super\n end", "title": "" }, { "docid": "13a61145b00345517e33319a34f7d385", "score": "0.69566035", "text": "def strong_params\n params.require(:request).permit(param_whit...
063f33476343f6c7ce6f694270440528
Whether or not the Status Code is a client error. According to RFC 2616, client error status codes are in the range of 400 to 499, inclusive.
[ { "docid": "c7e8d60a5371dcd5cb2237ef574cf008", "score": "0.83365154", "text": "def client_error?\n (400...500).include?(@status_code)\n end", "title": "" } ]
[ { "docid": "dd036f48fbd0715fdba496fbb3557519", "score": "0.8468984", "text": "def client_error?\n @status.between?(400, 499) if @status\n end", "title": "" }, { "docid": "4d9b8df37c2d59f5b1e6987a10b41462", "score": "0.83947957", "text": "def is_client_error?\n code...
f74c29bdfc4a183e1ec1b91334cd5be2
Use callbacks to share common setup or constraints between actions.
[ { "docid": "c820f5b95c7d2c75ac195aaa48cc989d", "score": "0.0", "text": "def set_product_product\n @product_product = Product::Product.find(params[:id])\n end", "title": "" } ]
[ { "docid": "631f4c5b12b423b76503e18a9a606ec3", "score": "0.60339177", "text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end", "title": "" }, { "docid": "7b068b9055c4e7643d4910e8e694ecdc", "score": "0.60135007", "text": "d...
ccf82defcdd1874a1ff5df096ec758be
DELETE /tracks/1 DELETE /tracks/1.json
[ { "docid": "77a5f1e4365a659a9149610c9b277e86", "score": "0.0", "text": "def destroy\n \t@playlist = Playlist.find(params[:id])\n @playlist.destroy\n respond_to do |format|\n format.html { redirect_to tracks_url, notice: 'Playlist was successfully destroyed.' }\n format.json { head :no_c...
[ { "docid": "8b19aee3fd29210a8b42aebb3bcbe5b9", "score": "0.783509", "text": "def destroy\n @track = Track.find(params[:id])\n @track.destroy\n\n respond_to do |format|\n format.html { redirect_to tracks_url }\n format.json { head :no_content }\n end\n end", "title": "" }, ...
fae95d8bd67a7584bc927b9c47008809
Loads the configuration and authenticates the current user.
[ { "docid": "7fbd8f243d274b38e1c151a609870d42", "score": "0.63525426", "text": "def load_configuration\n # Note that the Portus user needs to authenticate through the DB.\n return nil if !::Portus::LDAP.enabled? || params[:account] == \"portus\"\n\n fill_user_params!\n return nil unle...
[ { "docid": "f089cf3402fbc90634616be431461a6b", "score": "0.72733885", "text": "def load_from_config\n @credentials = @config.read('authentication')\n end", "title": "" }, { "docid": "97983803c5c7515ac937ee42dfb0007b", "score": "0.6814572", "text": "def authenticate\n @au...
af630984682f1a0b5a68e6092af0d102
Update properties of this object
[ { "docid": "f2e637ef879f4b18199c3ae7f27f8112", "score": "0.0", "text": "def update!(**args)\n @https_latency_data = args[:https_latency_data] if args.key?(:https_latency_data)\n @report_time = args[:report_time] if args.key?(:report_time)\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...