Gets the Observer id of arg

@method id
@param  {Mixed}  Object or String
@return {String} Observer id
489474
function ( arg ) {
		var id;

		if ( arg === global ) {
			id = "window";
		}
		else if ( !server && arg === document ) {
			id = "document";
		}
		else if ( !server && arg === document.body ) {
			id = "body";
		}
		else {
			utility.genId( arg );
			id = arg.id || ( typeof arg.toString === "function" ? arg.toString() : arg );
		}

		return id;
	}
1169529
private static int  js_indexOf(int methodId, String target, Object[] args) {
        String searchStr = ScriptRuntime.toString(args, 0);
        double position = ScriptRuntime.toInteger(args, 1);

        if (position > target.length() && methodId != Id_startsWith && methodId != Id_endsWith) {
            return -1;
        }

        if (position < 0) position = 0;
        else if (position > target.length()) position = target.length();
        else if (methodId == Id_endsWith && (position != position  || position > target.length())) position = target.length();

        if (Id_endsWith == methodId) {
            if (args.length == 0 || args.length == 1 || (args.length == 2 && args[1] == Undefined.instance)) position = target.length();
            return target.substring(0, (int)position).endsWith(searchStr) ? 0 : -1;
        }
        return methodId == Id_startsWith
                ? target.startsWith(searchStr, (int)position) ? 0 : -1
                : target.indexOf(searchStr, (int)position);
    }
450827
function getSetObj(time, timeup, arg) {
        var o;
        o = { time: time , timeup: timeup };
        if ('object' === typeof arg) J.mixin(o, arg);
        else if ('string' === typeof arg || 'number' === typeof arg) {
            o[arg] = true;
        }
        o.done = true;
        return o;
    }
967215
def oid(v = nil)
      return BSON::ObjectId.new if v.nil?; BSON::ObjectId.from_string(v) rescue v
    end
914789
static function getObjectId ($object)
    {
        // Get dump content
        ob_start();
        var_dump($object);
        $dumpContent = ob_get_clean();

        // Extract first line, and from first line the object ID
        $firstLine   = strtok($dumpContent, "\n");
        preg_match('/[^#]+#([0-9]+)/', $firstLine, $m);
        $id = $m[1];

        // Return the ID
        return $id;
    }
458311
function ( arg, obj ) {
		if ( $[arg] !== undefined || !obj instanceof Object ) {
			throw new Error( label.error.invalidArguments );
		}
		
		$[arg] = obj;

		return $[arg];
	}
324611
function _getIdentifier(data) {
        let identifier;
        if (typeof data === 'string') { // name of the mock
            identifier = data;
        } else if (data.name) { // the data containing the name of the mock
            identifier = data.name;
        } else {
            identifier = data.expression + '$$' + data.method;
        }
        return identifier;
    }
656809
protected String getObjectId(IPersistable object) {
        // The format of the object id is <type>/<path>/<objectName>
        String result = object.getType();
        if (object.getPath().charAt(0) != '/') {
            result += '/';
        }
        result += object.getPath();
        if (!result.endsWith("/")) {
            result += '/';
        }
        String name = object.getName();
        if (name == null) {
            name = PERSISTENCE_NO_NAME;
        }
        if (name.charAt(0) == '/') {
            // "result" already ends with a slash
            name = name.substring(1);
        }
        return result + name;
    }
213134
static int getRegisteredID (Connection connection, Object object) {
		ObjectSpace[] instances = ObjectSpace.instances;
		for (int i = 0, n = instances.length; i < n; i++) {
			ObjectSpace objectSpace = instances[i];
			// Check if the connection is in this ObjectSpace.
			Connection[] connections = objectSpace.connections;
			for (int j = 0; j < connections.length; j++) {
				if (connections[j] != connection) continue;
				// Find an ID with the object.
				int id = objectSpace.objectToID.get(object, Integer.MAX_VALUE);
				if (id != Integer.MAX_VALUE) return id;
			}
		}
		return Integer.MAX_VALUE;
	}
1220251
protected function getId(&$object)
    {
        if (is_array($object)) {
            if (isset($object['_id']) && $object['_id']) {
                return $object['_id'];
            }

            return $object['_id'] = new ObjectId();
        }

        if (is_object($object) && !$object instanceof ObjectId) {
            if (isset($object->_id) && $object->_id) {
                return $object->_id;
            }

            return $object->_id = new ObjectId();
        }

        return $object;
    }
1237417
function argsObject(val) {
  return _.object(val.split('|').map(function(pair) {
    return pair.split(':').map(function(v) {
      return v.trim();
    });
  }));
}
452043
public UUID getIdOrFail(final Object object) throws ObjectToIdMappingException {
        Optional<UUID> id = getId(object);
        if (!id.isPresent()) {
            throw new ObjectToIdMappingException(format(
                    "An id for the object [%s] was expected to be known but it was not. %s", object.toString(),
                    SYNCRONISM_LOST));
        }
        return id.get();
    }
501916
function getName(instance) {
  var publicInstance = instance && instance.getPublicInstance();
  if (!publicInstance) {
    return undefined;
  }
  var constructor = publicInstance.constructor;
  if (!constructor) {
    return undefined;
  }
  return constructor.displayName || constructor.name || undefined;
}
869001
function getPenId() {
	var url = getParsedUrl();
	var splitPath = url.path.split('/');
	var id = splitPath[splitPath.length - 1];
	return id;
}
1270347
def observe_id(self):
        """"""
        if self._observe_id is None:
            hasher = hashlib.sha256()
            hasher.update(self.viewset_class.__module__.encode('utf8'))
            hasher.update(self.viewset_class.__name__.encode('utf8'))
            hasher.update(self.viewset_method.encode('utf8'))
            # Arguments do not need to be taken into account as they are
            # derived from the request path, which is already accounted for.
            for key in sorted(self.GET.keys()):
                hasher.update(key.encode('utf8'))
                hasher.update(self.GET[key].encode('utf8'))
            hasher.update(self.path.encode('utf8'))
            hasher.update(self.path_info.encode('utf8'))
            if self._force_auth_user is not None:
                hasher.update(
                    (str(self._force_auth_user.id) or 'anonymous').encode('utf8')
                )
            else:
                hasher.update(b'anonymous')
            self._observe_id = hasher.hexdigest()

        return self._observe_id
957797
private Object getId(OWLClass oc) {
        if(oc.isAnonymous()) return null;

        String id = oc.toStringID();

        if(id.equals("<"+OWLImporter.THING_IRI+">") ||
                id.equals(OWLImporter.THING_IRI)) {
            return NamedConcept.TOP;
        } else if(id.equals("<"+OWLImporter.NOTHING_IRI+">") ||
                id.equals(OWLImporter.NOTHING_IRI)) {
            return NamedConcept.BOTTOM;
        } else {
            return id;
        }
    }
457098
public String getId() {

    String id = this.argument.id();
    if ((id == null) || (id.length() == 0)) {
      id = this.argument.name();
    }
    return id;
  }