Add a booking. The prefix (pos/neg) is beeing checked if it is identical
 with the last one
 === Parameter
 booking<Booking>:: KingDta::Booking object
 === Raises
 error if the prefix within the bookings has changed
435270
def add ( booking )
      raise Exception.new("The file has alreay been closed, cannot add new booking") if @closed
      #the first booking decides wether all values are po or negative
      @value_pos = booking.pos?  if bookings.empty?
      raise Exception.new("The prefix within bookings changed from #{@value_pos} to #{booking.pos?}") if @value_pos != booking.pos?
      bookings << booking
    end
12194
def add(*args)
      args.flatten! # allow [] as a param
      args.each do |arg|
        arg = arg.to_sym if arg.is_a? String
        @set << arg unless @set.include? arg # avoid duplicates
      end
    end
1101467
def add(self, handler, priority=10):
        
        self.container.add_handler(handler, priority=priority)
        return handler
639754
def added=(value)
      set_attribute 'added', case value
      when Time; value.strftime '%Y-%m-%d'
      when String; value
      else
        raise ArgumentError
      end
    end
515258
public static UpdateOnCloseHandler addUpdateOnCloseHandler(Record record, Record recordToUpdate, boolean bRefreshAfterUpdate, boolean bUpdateOnClose, boolean bUpdateOnUpdate)
    {
        UpdateOnCloseHandler listener = (UpdateOnCloseHandler)record.getListener(UpdateOnCloseHandler.class);
        while (listener != null)
        {
            if (listener.getRecordToUpdate() == recordToUpdate)
                break;  // Found, don't add again
            listener = (UpdateOnCloseHandler)listener.getListener(UpdateOnCloseHandler.class);
        }
        if (listener == null)
            record.addListener(listener = new UpdateOnCloseHandler(recordToUpdate, bRefreshAfterUpdate, bUpdateOnClose, bUpdateOnUpdate)); // Make sure this is updated with booking
        return listener;
    }
1243155
def add(self, personID, edgeID, pos, depart=DEPART_NOW, typeID="DEFAULT_PEDTYPE"):
        
        if depart > 0:
            depart *= 1000
        self._connection._beginMessage(tc.CMD_SET_PERSON_VARIABLE, tc.ADD, personID,
                                       1 + 4 + 1 + 4 + len(typeID) + 1 + 4 + len(edgeID) + 1 + 4 + 1 + 8)
        self._connection._string += struct.pack("!Bi", tc.TYPE_COMPOUND, 4)
        self._connection._packString(typeID)
        self._connection._packString(edgeID)
        self._connection._string += struct.pack("!Bi", tc.TYPE_INTEGER, depart)
        self._connection._string += struct.pack("!Bd", tc.TYPE_DOUBLE, pos)
        self._connection._sendExact()
271988
def add_prefix(network):
    
    p = new_prefix()
    p.prefix = str(network['network'])
    p.type = "assignment"
    p.description = network['description']
    p.tags = ['ipplan-import']
    p.comment = ""

    if 'additional' in network:
        p.comment += network['additional']
    if len(network['comment']) > 0:
        p.comment += network['comment']
    return p
795580
def _add_request_entry(self, entry=()):
        
        if not self._lookup_request_entry(entry):
            self.request_entry.append(entry)
893793
def add_hook(name = nil, cascade = false, &hook)
    if name == nil or name == true or name == false
      cascade = name
      assign_self_hook(cascade, &hook)
    else
      assign_hook(name_to_a(name), cascade, &hook)
    end
  end
692398
public function updateBookingInfo(BookingInfo $bookingInfo)
    {
        if (is_null($this->bookingInfo) || !$this->bookingInfo->sameAs($bookingInfo)) {
            $this->apply(
                $this->createBookingInfoUpdatedEvent($bookingInfo)
            );
        }
    }
642441
def add(other)
      case other
      when LinExpr
        @terms.merge!(other.terms) { |_, c1, c2| c1 + c2 }
      when Variable
        if @terms.key? other
          @terms[other] += 1.0
        else
          @terms[other] = 1.0
        end
      else
        fail TypeError
      end

      self
    end
28615
def add_record(self, record):
        
        record.setdefault('_oai', {}).setdefault('sets', [])

        assert not self.has_record(record)

        record['_oai']['sets'].append(self.spec)
694256
function add(key, value, postfix) {
  if (value > 0) {
    key.push(value + postfix);
  }

  return key;
}
1137686
def add(self, *args, **kwargs):
        
        return self._apply(operator.add, *args, **kwargs)
848721
def add_option(self, option):
        
        assert isinstance(option, Option)
        repeatable = defines.OptionRegistry.LIST[option.number].repeatable
        if not repeatable:
            ret = self._already_in(option)
            if ret:
                raise TypeError("Option : %s is not repeatable", option.name)
            else:
                self._options.append(option)
        else:
            self._options.append(option)
1373546
def add_prefix(self, prefix, flags, prf):
        
        self._req('prefix add %s %s %s' % (prefix, flags, prf))
        time.sleep(1)
        self._req('netdataregister')
1315060
def add(options = {})
      self.options = options

      raise(ArgumentError, 'Mandatory param :name missing') unless options[:name]

      if options[:feature]
        features << options
        SafetyCone::ViewHelpers.add_method(options[:feature])
      else
        paths[make_key] = options
      end
    end