public abstract class ExternalContext
extends java.lang.Object
This class allows the Faces API to be unaware of the nature of its containing application environment. In particular, this class allows Jakarta Server Faces based applications to run in either a Jakarta Servlet or a Portlet environment.
The documentation for this class only
specifies the behavior for the Jakarta Servlet implementation of
ExternalContext
. The Portlet implementation of
ExternalContext
is specified under the revision of the
Portlet Bridge
Specification for JavaServer Faces JSR that corresponds to
this version of the Jakarta Server Faces specification. See the Preface of the
"prose document", linked
from the javadocs, for a reference.
If a reference to an
ExternalContext
is obtained during application startup or shutdown
time, any method documented as "valid to call this method during
application startup or shutdown" must be supported during application startup or shutdown
time. The result of calling a method during application startup or shutdown time
that does not have this designation is undefined.
An ExternalContext can be injected into a CDI
managed bean using @Inject ExternalContext externalContext;
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BASIC_AUTH
String identifier for BASIC authentication.
|
static java.lang.String |
CLIENT_CERT_AUTH
String identifier for CLIENT_CERT authentication.
|
static java.lang.String |
DIGEST_AUTH
String identifier for DIGEST authentication.
|
static java.lang.String |
FORM_AUTH
String identifier for FORM authentication.
|
| Constructor and Description |
|---|
ExternalContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResponseCookie(java.lang.String name,
java.lang.String value,
java.util.Map<java.lang.String,java.lang.Object> properties)
Adds the cookie represented by the arguments to the response. |
void |
addResponseHeader(java.lang.String name,
java.lang.String value)
Add the given name and value to the response header. |
abstract void |
dispatch(java.lang.String path)
Dispatch a request to the specified resource to create output
for this response.
|
abstract java.lang.String |
encodeActionURL(java.lang.String url)
Return the input URL, after performing any rewriting needed to
ensure that it will correctly identify an addressable action in the
current application.
|
java.lang.String |
encodeBookmarkableURL(java.lang.String baseUrl,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
The purpose of this method is to generate a query string from the collection of Parameter objects provided by the parameters argument and append that query string to the baseUrl. |
abstract java.lang.String |
encodeNamespace(java.lang.String name)
Return the specified
name, after prefixing it with a namespace that ensures that it
will be unique within the context of a particular page.
|
java.lang.String |
encodePartialActionURL(java.lang.String url)
Return the input URL, after performing any rewriting needed to ensure that it can be used in a partial page submission (ajax request) to correctly identify an addressable action in the current application. |
java.lang.String |
encodeRedirectURL(java.lang.String baseUrl,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
The purpose of this method is to generate a query string from the collection of Parameter
objects provided by the parameters argument and append that query string to the baseUrl.
|
abstract java.lang.String |
encodeResourceURL(java.lang.String url)
Return the input URL, after performing any rewriting needed to
ensure that it will correctly identify an addressable resource in the
current application.
|
abstract java.lang.String |
encodeWebsocketURL(java.lang.String url)
Return the websocket URL, after performing any rewriting needed to
ensure that it will correctly identify an addressable websocket in the
current application.
|
java.lang.String |
getApplicationContextPath()
Return the name of the container context for this application. |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getApplicationMap()
Return a mutable
Map representing the application scope attributes
for the current application. |
abstract java.lang.String |
getAuthType()
Return the name of the authentication scheme used to authenticate
the current user, if any; otherwise, return
null . |
ClientWindow |
getClientWindow()
Return the |
abstract java.lang.Object |
getContext()
Return the
application environment object instance for the current
appication.
|
java.lang.String |
getContextName()
Return the name of the container context for this application. |
Flash |
getFlash()
Return the threadsafe |
abstract java.lang.String |
getInitParameter(java.lang.String name)
Return the value of
the specified application initialization parameter (if any).
|
abstract java.util.Map<java.lang.String,java.lang.String> |
getInitParameterMap()
Return an
immutable
Map whose keys are the set of application
initialization parameter names configured for this application,
and whose values are the corresponding parameter values. |
java.lang.String |
getMimeType(java.lang.String file)
Returns the MIME type of the
specified file or |
java.lang.String |
getRealPath(java.lang.String path)
Returns a String containing the real path for a given virtual path. |
abstract java.lang.String |
getRemoteUser()
Return the login name of the user making the current request
if any; otherwise, return
null . |
abstract java.lang.Object |
getRequest()
Return the environment-specific object instance for the current
request.
|
java.lang.String |
getRequestCharacterEncoding()
Return the character encoding currently being used
to interpret this request.
|
int |
getRequestContentLength()
Return the result
of calling |
java.lang.String |
getRequestContentType()
Return the MIME Content-Type for this request.
|
abstract java.lang.String |
getRequestContextPath()
Return the portion of the request URI that identifies the web
application context for this request.
|
abstract java.util.Map<java.lang.String,java.lang.Object> |
getRequestCookieMap()
Return an immutable
Map whose keys are the set of
cookie names included in the current request, and whose
values (of type javax.servlet.http.Cookie )
are the first (or only) cookie for each cookie name
returned by the underlying request. |
abstract java.util.Map<java.lang.String,java.lang.String> |
getRequestHeaderMap()
Return an immutable
Map whose keys are the set of
request header names included in the current request, and whose
values (of type String) are the first (or only) value for each
header name returned by the underlying request. |
abstract java.util.Map<java.lang.String,java.lang.String[]> |
getRequestHeaderValuesMap()
Return an immutable
Map whose keys are the set of
request header names included in the current request, and whose
values (of type String[]) are all of the value for each
header name returned by the underlying request. |
abstract java.util.Locale |
getRequestLocale()
Return the preferred
Locale in which the client
will accept content. |
abstract java.util.Iterator<java.util.Locale> |
getRequestLocales()
Return an
Iterator over the preferred
Locale s specified in the request, in decreasing
order of preference. |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getRequestMap()
Return a mutable
Map representing the request
scope attributes for the current application. |
abstract java.util.Map<java.lang.String,java.lang.String> |
getRequestParameterMap()
Return an immutable
Map whose keys are the set of
request parameters names included in the current request, and whose
values (of type String) are the first (or only) value for each
parameter name returned by the underlying request. |
abstract java.util.Iterator<java.lang.String> |
getRequestParameterNames()
Return an
Iterator over the names of all request
parameters included in the current request. |
abstract java.util.Map<java.lang.String,java.lang.String[]> |
getRequestParameterValuesMap()
Return an immutable
Map whose keys are the set of
request parameters names included in the current request, and whose
values (of type String[]) are all of the values for each
parameter name returned by the underlying request. |
abstract java.lang.String |
getRequestPathInfo()
Return the extra path information (if any) included in the
request URI; otherwise, return
null . |
java.lang.String |
getRequestScheme()
Returns the name of the scheme used to make this request, for example, http, https, or ftp. |
java.lang.String |
getRequestServerName()
Returns the host name of the server to which the request was sent. |
int |
getRequestServerPort()
Returns the port number to which the request was sent. |
abstract java.lang.String |
getRequestServletPath()
Return the Jakarta Servlet path information (if any) included in the
request URI; otherwise, return
null . |
abstract java.net.URL |
getResource(java.lang.String path)
Return a
URL for the application resource mapped to the
specified path, if it exists; otherwise, return
null . |
abstract java.io.InputStream |
getResourceAsStream(java.lang.String path)
Return an
InputStream for an application resource mapped to
the specified path, if it exists; otherwise, return
null . |
abstract java.util.Set<java.lang.String> |
getResourcePaths(java.lang.String path)
Return the
Set of resource paths for all application resources
whose resource path starts with the specified argument. |
abstract java.lang.Object |
getResponse()
Return the environment-specific object instance for the current
response.
|
int |
getResponseBufferSize()
Return the buffer size for the current response. |
java.lang.String |
getResponseCharacterEncoding()
Returns the name of
the character encoding (MIME charset) used for the body sent in
this response.
|
java.lang.String |
getResponseContentType()
Return the MIME Content-Type for this response.
|
java.io.OutputStream |
getResponseOutputStream()
Returns an |
java.io.Writer |
getResponseOutputWriter()
Returns a |
abstract java.lang.Object |
getSession(boolean create)
If the
create parameter is true ,
create (if necessary) and return a session instance associated
with the current request. |
java.lang.String |
getSessionId(boolean create)
Return the id of the current session
or the empty string if no session has been created and the
|
abstract java.util.Map<java.lang.String,java.lang.Object> |
getSessionMap()
Return a mutable
Map representing the session
scope attributes for the current application. |
int |
getSessionMaxInactiveInterval()
Returns the maximum time interval, in seconds, that the Jakarta Servlet container will keep this session open between client accesses. |
abstract java.security.Principal |
getUserPrincipal()
Return the
Principal object containing the name of
the current authenticated user, if any; otherwise, return
null . |
void |
invalidateSession()
Invalidates this session then unbinds any objects bound to it. |
boolean |
isResponseCommitted()
Check if the current response has been committed. |
boolean |
isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
abstract boolean |
isUserInRole(java.lang.String role)
Return
true if the currently authenticated user is
included in the specified role. |
abstract void |
log(java.lang.String message)
Log the specified
message to the application object.
|
abstract void |
log(java.lang.String message,
java.lang.Throwable exception)
Log the specified
message and exception to the application object.
|
abstract void |
redirect(java.lang.String url)
Redirect a request
to the specified URL, and cause the
responseComplete() method to be called on the
FacesContext instance for the current request. |
void |
responseFlushBuffer()
Flushes the buffered response content to the client. |
void |
responseReset()
Resets the current response. |
void |
responseSendError(int statusCode,
java.lang.String message)
Sends an HTTP status code with message. |
void |
setClientWindow(ClientWindow window)
Associate this instance with a |
void |
setRequest(java.lang.Object request)
Set the environment-specific request to be returned by
subsequent calls to
getRequest() . |
void |
setRequestCharacterEncoding(java.lang.String encoding)
Overrides the name of the character
encoding used in the body of this request.
|
void |
setResponse(java.lang.Object response)
Set the environment-specific response to be returned by
subsequent calls to
getResponse() . |
void |
setResponseBufferSize(int size)
Set the buffer size for the current response. |
void |
setResponseCharacterEncoding(java.lang.String encoding)
Sets the character encoding (MIME charset) of the response being sent
to the client, for example, to UTF-8.
|
void |
setResponseContentLength(int length)
Set the content length of the response. |
void |
setResponseContentType(java.lang.String contentType)
Sets the content type of the response being sent to the client, if the response has not been committed yet. |
void |
setResponseHeader(java.lang.String name,
java.lang.String value)
Set the response header with the given name and value. |
void |
setResponseStatus(int statusCode)
Sets the HTTP status code for the response. |
void |
setSessionMaxInactiveInterval(int interval)
Specifies the time, in seconds, between client requests before the Jakarta Servlet container will invalidate this session. |
public static final java.lang.String BASIC_AUTH
String identifier for BASIC authentication.
public static final java.lang.String CLIENT_CERT_AUTH
String identifier for CLIENT_CERT authentication.
public static final java.lang.String DIGEST_AUTH
String identifier for DIGEST authentication.
public static final java.lang.String FORM_AUTH
String identifier for FORM authentication.
public void addResponseCookie(java.lang.String name, java.lang.String value, java.util.Map<java.lang.String,java.lang.Object> properties)
Adds the cookie represented by the arguments to the response.
Jakarta Servlet: This must be accomplished by calling the
javax.servlet.http.HttpServletResponse
method
addCookie()
. The Cookie
argument must
be constructed by passing the name
and
value
parameters. If the properties
arugument is non-null
and not empty, the
Cookie
instance must be initialized as described
below.
Key in "values" Map |
Expected type of value. | Name of setter method on Cookie instance to be
set with the value from the Map . |
|---|---|---|
| comment | String | setComment |
| domain | String | setDomain |
| maxAge | Integer | setMaxAge |
| secure | Boolean | setSecure |
| path | String | setPath |
| httpOnly | Boolean | setHttpOnly |
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
name
- To be passed as the first argument to the
Cookie
constructor.value
- To be passed as the second argument to the
Cookie
constructor.properties
- A Map
containg key/value pairs to be passed
as arguments to the setter methods as described above.java.lang.IllegalArgumentException
- if the properties
Map
is not-null
and not empty and contains
any keys that are not one of the keys listed above.public abstract void dispatch(java.lang.String path) throws java.io.IOException
Dispatch a request to the specified resource to create output for this response.
Jakarta Servlet: This must be accomplished by calling the
javax.servlet.ServletContext
method
getRequestDispatcher(path)
, and calling the
forward()
method on the resulting object.
If the call to getRequestDisatcher(path)
returns null
, send aServletResponse SC_NOT_FOUND
error code.
path
- Context relative path to the specified resource,
which must start with a slash ("/") characterFacesException
- thrown if a ServletException
occursjava.io.IOException
- if an input/output error occurspublic abstract java.lang.String encodeActionURL(java.lang.String url)
Return the input URL, after performing any rewriting needed to ensure that it will correctly identify an addressable action in the current application.
Encoding the ClientWindow
Call
ClientWindow.isClientWindowRenderModeEnabled(javax.faces.context.FacesContext)
. If the result isfalse
take no further action and return the rewritten URL. If the result istrue
, callgetClientWindow()
. If the result is non-null
, callClientWindow.getId()
and append the id to the query string of the URL, making the necessary allowances for a pre-existing query string or no query-string.Call
ClientWindow.getQueryURLParameters(javax.faces.context.FacesContext)
. If the result is non-null
, for each parameter in the map, unconditionally add that parameter to the URL.The name of the query string parameter is given by the value of the constant
ResponseStateManager.CLIENT_WINDOW_URL_PARAM
.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletResponse
method
encodeURL(url)
.
url
- The input URL to be encodedjava.lang.NullPointerException
- if url
is null
public abstract java.lang.String encodeNamespace(java.lang.String name)
Return the specified name, after prefixing it with a namespace that ensures that it will be unique within the context of a particular page.
Jakarta Servlet: The input value must be returned unchanged.
name
- Name to be encodedpublic abstract java.lang.String encodeResourceURL(java.lang.String url)
Return the input URL, after performing any rewriting needed to ensure that it will correctly identify an addressable resource in the current application.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletResponse
method
encodeURL(url)
.
url
- The input URL to be encodedjava.lang.NullPointerException
- if url
is null
public abstract java.lang.String encodeWebsocketURL(java.lang.String url)
Return the websocket URL, after performing any rewriting needed to ensure that it will correctly identify an addressable websocket in the current application.
Jakarta Servlet: This must ensure that the input URL is prefixed
with the correct websocket scheme, domain and port and then
encoded by encodeResourceURL(String)
.
url
- The input URL to be encoded.java.lang.NullPointerException
- if url
is null
.public abstract java.util.Map<java.lang.String,java.lang.Object> getApplicationMap()
Return a mutable
Map
representing the application scope attributes
for the current application. The returned Map
must
implement the entire contract for a modifiable map as described
in the JavaDocs for java.util.Map
. Modifications
made in the Map
must cause the corresponding changes
in the set of application scope attributes. Particularly the
clear()
, remove()
, put()
,
putAll()
, and get()
operations must
take the appropriate action on the underlying data structure.
For any of the Map
methods that cause an element
to be removed from the underlying data structure, the following
action regarding managed-beans must be taken. If the element to
be removed is a managed-bean, and it has one or more public
no-argument void return methods annotated with
javax.annotation.PreDestroy
, each such method must
be called before the element is removed from the underlying data
structure. Elements that are not managed-beans, but do happen to
have methods with that annotation must not have those methods
called on removal. Any exception thrown by the
PreDestroy
annotated methods must by caught and not
rethrown. The exception may be logged.
It is valid to call this method
during application startup or shutdown. If called at startup or shutdown time, this
method returns a Map
that is backed by the same
container context instance (ServletContext
or
PortletContext
) as the one returned by calling
getApplicationMap()
on the
ExternalContext
returned by the
FacesContext
during an actual request.
Jakarta Servlet: This must be the set of attributes available via
the javax.servlet.ServletContext
methods
getAttribute()
, getAttributeNames()
,
removeAttribute()
, and setAttribute()
.
ServletContext
.public abstract java.lang.String getAuthType()
Return the name of the authentication scheme used to authenticate
the current user, if any; otherwise, return null
.
For standard authentication schemes, the returned value will match
one of the following constants:
BASIC_AUTH
, CLIENT_CERT_AUTH
,
DIGEST_AUTH
, or FORM_AUTH
.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getAuthType()
.
public Flash getFlash()
Return the threadsafe Flash
for this application. The default implementation will throw
UnsupportedOperationException
. Compliant Jakarta Server Faces
runtimes must provide an implementation of this method.
Flash
for this application.public java.lang.String getMimeType(java.lang.String file)
Returns the MIME type of the
specified file or null
if the MIME type is not
known. The MIME type is determined by the container.
It is valid to call this method
during application startup or shutdown. If called during application
startup or shutdown, this method calls through to the
getMimeType()
method on the same container
context instance (ServletContext
or
PortletContext
) as the one used when calling
getMimeType()
on the
ExternalContext
returned by the
FacesContext
during an actual request.
Jakarta Servlet: This must be the value returned by the
javax.servlet.ServletContext
method
getMimeType()
.
file
- The file for which the mime type should be obtained.public abstract java.lang.Object getContext()
Return the application environment object instance for the current appication.
It is valid to call this method
during application startup or shutdown. If called during application
startup or shutdown, this returns the same container context instance
(ServletContext
or PortletContext
) as
the one returned when calling getContext()
on the
ExternalContext
returned by the
FacesContext
during an actual request.
Jakarta Servlet: This must be the current application's
javax.servlet.ServletContext
instance.
ServletContext
.public java.lang.String getContextName()
Return the name of the container context for this application.
Return the result of calling
getServletContextName()
on the
ServletContext
instance for this application. It is
valid to call this method during application startup or shutdown.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
ServletContext
.public java.lang.String getApplicationContextPath()
Return the name of the container context for this application.
Jakarta Servlet:
Return the result of calling
getContextPath()
on the
ServletContext
instance for this application.
It is valid to call this method during application startup or shutdown.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
public abstract java.lang.String getInitParameter(java.lang.String name)
Return the value of the specified application initialization parameter (if any).
Jakarta Servlet: This must be the result of the
javax.servlet.ServletContext
method
getInitParameter(name)
.
It is valid to call this method during application startup or shutdown. If called during application startup or shutdown, this method calls through to the actual container context to return the init parameter value.
name
- Name of the requested initialization parameterjava.lang.NullPointerException
- if name
is null
public abstract java.util.Map<java.lang.String,java.lang.String> getInitParameterMap()
Return an
immutable Map
whose keys are the set of application
initialization parameter names configured for this application,
and whose values are the corresponding parameter values. The
returned Map
must implement the entire contract for
an unmodifiable map as described in the JavaDocs for
java.util.Map
.
It is valid to call this method
during application startup or shutdown. If called during application
startup or shutdown, this method returns a Map
that is backed by
the same container context instance (ServletContext
or PortletContext
) as the one returned by calling
getInitParameterMap()
on the
ExternalContext
returned by the
FacesContext
during an actual request.
Jakarta Servlet: This result must be as if it were synthesized
by calling the javax.servlet.ServletContext
method getInitParameterNames
, and putting
each configured parameter name/value pair into the result.
public abstract java.lang.String getRemoteUser()
Return the login name of the user making the current request
if any; otherwise, return null
.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getRemoteUser()
.
public abstract java.lang.Object getRequest()
Return the environment-specific object instance for the current request.
Jakarta Servlet: This must be the current request's
javax.servlet.http.HttpServletRequest
instance.
public void setRequest(java.lang.Object request)
Set the environment-specific request to be returned by
subsequent calls to getRequest()
. This may be used to
install a wrapper for the request.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
request
- the request object to be set.public java.lang.String getRequestScheme()
Returns the name of the scheme used to make this request, for example, http, https, or ftp.
Jakarta Servlet: This must be the value returned by the
javax.servlet.ServletRequest
method
getScheme()
.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
public java.lang.String getRequestServerName()
Returns the host name of the server to which the request was sent.
Jakarta Servlet: This must be the value returned by the
javax.servlet.ServletRequest
method
getServerName()
.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
public int getRequestServerPort()
Returns the port number to which the request was sent.
Jakarta Servlet: This must be the value returned by the
javax.servlet.ServletRequest
method
getServerPort()
.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
public void setRequestCharacterEncoding(java.lang.String encoding) throws java.io.UnsupportedEncodingException
Overrides the name of the character encoding used in the body of this request.
Calling this method after the request has been accessed will have no
no effect, unless a Reader
or Stream
has been
obtained from the request, in which case an IllegalStateException
is thrown.
Jakarta Servlet: This must call through to the
javax.servlet.ServletRequest
method
setCharacterEncoding()
.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
encoding
- the encoding name to be set.java.io.UnsupportedEncodingException
- if this is not a valid
encodingpublic java.lang.String getRealPath(java.lang.String path)
Returns a String containing the real path for a given virtual path.
It is valid to call this method
during application startup or shutdown. If called during application
startup or shutdown, this method calls through to the
getRealPath()
method on the same container
context instance (ServletContext
or
PortletContext
) as the one used when calling
getRealPath()
on the
ExternalContext
returned by the
FacesContext
during an actual request.
Jakarta Servlet: This must be the value returned by the
javax.servlet.ServletContext
method
getRealPath()
.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
path
- The context of the requested initialization parameterpublic abstract java.lang.String getRequestContextPath()
Return the portion of the request URI that identifies the web application context for this request.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getContextPath()
.
public abstract java.util.Map<java.lang.String,java.lang.Object> getRequestCookieMap()
Return an immutable Map
whose keys are the set of
cookie names included in the current request, and whose
values (of type javax.servlet.http.Cookie
)
are the first (or only) cookie for each cookie name
returned by the underlying request. The returned
Map
must implement the entire contract for an unmodifiable
map as described in the JavaDocs for java.util.Map
.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getCookies()
, unless null
was returned,
in which case this must be a zero-length array.
public abstract java.util.Map<java.lang.String,java.lang.String> getRequestHeaderMap()
Return an immutable Map
whose keys are the set of
request header names included in the current request, and whose
values (of type String) are the first (or only) value for each
header name returned by the underlying request. The returned
Map
must implement the entire contract for an unmodifiable
map as described in the JavaDocs for java.util.Map
. In
addition, key comparisons must be performed in a case insensitive
manner.
Jakarta Servlet: This must be the set of headers available via
the javax.servlet.http.HttpServletRequest
methods
getHeader()
and getHeaderNames()
.
public abstract java.util.Map<java.lang.String,java.lang.String[]> getRequestHeaderValuesMap()
Return an immutable Map
whose keys are the set of
request header names included in the current request, and whose
values (of type String[]) are all of the value for each
header name returned by the underlying request. The returned
Map
must implement the entire contract for an unmodifiable
map as described in the JavaDocs for java.util.Map
. In
addition, key comparisons must be performed in a case insensitive
manner.
Jakarta Servlet: This must be the set of headers available via
the javax.servlet.http.HttpServletRequest
methods
getHeaders()
and getHeaderNames()
.
public abstract java.util.Locale getRequestLocale()
Return the preferred Locale
in which the client
will accept content.
Jakarta Servlet: This must be the value returned by the
javax.servlet.ServletRequest
method
getLocale()
.
Locale
of the current request.public abstract java.util.Iterator<java.util.Locale> getRequestLocales()
Return an Iterator
over the preferred
Locale
s specified in the request, in decreasing
order of preference.
Jakarta Servlet: This must be an Iterator
over the values returned by the javax.servlet.ServletRequest
method getLocales()
.
Iterator
of Locale
s of the current request.public abstract java.util.Map<java.lang.String,java.lang.Object> getRequestMap()
Return a mutable Map
representing the request
scope attributes for the current application. The returned
Map
must implement the entire contract for a
modifiable map as described in the JavaDocs for
java.util.Map
. Modifications made in the
Map
must cause the corresponding changes in the set
of request scope attributes. Particularly the
clear()
, remove()
, put()
,
putAll()
, and get()
operations must
take the appropriate action on the underlying data structure.
For any of the Map
methods that cause an element
to be removed from the underlying data structure, the following
action regarding managed-beans must be taken. If the element to
be removed is a managed-bean, and it has one or more public
no-argument void return methods annotated with
javax.annotation.PreDestroy
, each such method must
be called before the element is removed from the underlying data
structure. Elements that are not managed-beans, but do happen to
have methods with that annotation must not have those methods
called on removal. Any exception thrown by the
PreDestroy
annotated methods must by caught and not
rethrown. The exception may be logged.
Jakarta Servlet: This must be the set of attributes available via
the javax.servlet.ServletRequest
methods
getAttribute()
, getAttributeNames()
,
removeAttribute()
, and setAttribute()
.
public abstract java.util.Map<java.lang.String,java.lang.String> getRequestParameterMap()
Return an immutable Map
whose keys are the set of
request parameters names included in the current request, and whose
values (of type String) are the first (or only) value for each
parameter name returned by the underlying request. The returned
Map
must implement the entire contract for an unmodifiable
map as described in the JavaDocs for java.util.Map
.
Jakarta Servlet: This must be the set of parameters available via
the javax.servlet.ServletRequest
methods
getParameter()
and getParameterNames()
.
public abstract java.util.Iterator<java.lang.String> getRequestParameterNames()
Return an Iterator
over the names of all request
parameters included in the current request.
Jakarta Servlet: This must be an Iterator
over the
values returned by the javax.servlet.ServletRequest
method getParameterNames()
.
Iterator
for the names of the current request parameters.public abstract java.util.Map<java.lang.String,java.lang.String[]> getRequestParameterValuesMap()
Return an immutable Map
whose keys are the set of
request parameters names included in the current request, and whose
values (of type String[]) are all of the values for each
parameter name returned by the underlying request. The returned
Map
must implement the entire contract for an unmodifiable
map as described in the JavaDocs for java.util.Map
.
Jakarta Servlet: This must be the set of parameters available via
the javax.servlet.ServletRequest
methods
getParameterValues()
and
getParameterNames()
.
public abstract java.lang.String getRequestPathInfo()
Return the extra path information (if any) included in the
request URI; otherwise, return null
.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getPathInfo()
.
public abstract java.lang.String getRequestServletPath()
Return the Jakarta Servlet path information (if any) included in the
request URI; otherwise, return null
.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getServletPath()
.
public java.lang.String getRequestCharacterEncoding()
Return the character encoding currently being used to interpret this request.
Jakarta Servlet: This must return the value returned by the
javax.servlet.ServletRequest
method
getCharacterEncoding()
.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
public java.lang.String getRequestContentType()
Return the MIME Content-Type for this request. If not
available, return null
.
Jakarta Servlet: This must return the value returned by the
javax.servlet.ServletRequest
method
getContentType()
.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
public int getRequestContentLength()
Return the result
of calling getContentLenth()
on the
ServletRequest
instance for this request.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
public java.lang.String getResponseCharacterEncoding()
Returns the name of the character encoding (MIME charset) used for the body sent in this response.
Jakarta Servlet: This must return the value returned by the
javax.servlet.ServletResponse
method
getCharacterEncoding()
.
Portlet: if this method is called
during a lifecycle phase other than RENDER_RESPONSE, this must
return null
. If called during RENDER_RESPONSE,
return the response encoding of the portlet response.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
public java.lang.String getResponseContentType()
Return the MIME Content-Type for this response. If not
available, return null
.
Jakarta Servlet: This must return the value returned by the
javax.servlet.ServletResponse
method
getContentType()
.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
public abstract java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException
Return a
URL
for the application resource mapped to the
specified path, if it exists; otherwise, return
null
.
It is valid to call this method
during application startup or shutdown. If called during application
startup or shutdown, this method calls through to the
getResource()
method on the same container
context instance (ServletContext
or
PortletContext
) as the one used when calling
getResource()
on the
ExternalContext
returned by the
FacesContext
during an actual request.
Jakarta Servlet: This must be the value returned by the
javax.servlet.ServletContext
method
getResource(path)
.
path
- The path to the requested resource, which must
start with a slash ("/" characterjava.net.MalformedURLException
- if the specified path
is not in the correct formjava.lang.NullPointerException
- if path
is null
public abstract java.io.InputStream getResourceAsStream(java.lang.String path)
Return an
InputStream
for an application resource mapped to
the specified path, if it exists; otherwise, return
null
.
It is valid to call this method
during application startup or shutdown. If called during application
startup or shutdown, this method calls through to the
getResourceAsStream()
method on the same container
context instance (ServletContext
or
PortletContext
) as the one used when calling
getResourceAsStream()
on the
ExternalContext
returned by the
FacesContext
during an actual request.
Jakarta Servlet: This must be the value returned by the
javax.servlet.ServletContext
method
getResourceAsStream(path)
.
path
- The path to the requested resource, which must
start with a slash ("/" characterInputStream
for the application resource.java.lang.NullPointerException
- if path
is null
public abstract java.util.Set<java.lang.String> getResourcePaths(java.lang.String path)
Return the
Set
of resource paths for all application resources
whose resource path starts with the specified argument.
It is valid to call this method
during application startup or shutdown. If called during application
startup or shutdown, this method calls through to the
getResourcePaths()
method on the same container
context instance (ServletContext
or
PortletContext
) as the one used when calling
getResourcePaths()
on the
ExternalContext
returned by the
FacesContext
during an actual request.
Jakarta Servlet: This must be the value returned by the
javax.servlet.ServletContext
method
getResourcePaths(path).
path
- Partial path used to match resources, which must
start with a slash ("/") characterSet
of resource paths for the application resources.java.lang.NullPointerException
- if path
is null
public abstract java.lang.Object getResponse()
Return the environment-specific object instance for the current response.
Jakarta Servlet: This is the current request's
javax.servlet.http.HttpServletResponse
instance.
javax.servlet.http.HttpServletResponse
.public void setResponse(java.lang.Object response)
Set the environment-specific response to be returned by
subsequent calls to getResponse()
. This may be used to
install a wrapper for the response.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
response
- the response instance to be set.public java.io.OutputStream getResponseOutputStream() throws java.io.IOException
Returns an OutputStream
suitable for writing binary data to the user-agent.
Jakarta Servlet: This must return the value returned by the
javax.servlet.ServletResponse
method
getOutputStream()
.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
OutputStream
for the current response.java.io.IOException
- any IO related exception.public java.io.Writer getResponseOutputWriter() throws java.io.IOException
Returns a Writer
suitable for writing character data to the user-agent.
Jakarta Servlet: This must return the value returned by the
ServletResponse.getWriter()
.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
Writer
for the current response.java.io.IOException
- any IO related exception.public void setResponseCharacterEncoding(java.lang.String encoding)
Sets the character encoding (MIME charset) of the response being sent to the client, for example, to UTF-8.
Jakarta Servlet: This must call through to the
javax.servlet.ServletResponse
method
setCharacterEncoding()
.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
encoding
- the character encoding to be sent by the current response.public void setResponseContentType(java.lang.String contentType)
Sets the content type of the response being sent to the client, if the response has not been committed yet.
Jakarta Servlet: This must call
setContentType()
on the underlying
javax.servlet.ServletResponse
instance.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
contentType
- The content type to be set as the contentType
of the response.public abstract java.lang.Object getSession(boolean create)
If the create
parameter is true
,
create (if necessary) and return a session instance associated
with the current request. If the create
parameter
is false
return any existing session instance
associated with the current request, or return null
if
there is no such session.
Jakarta Servlet: This must return the result of calling
getSession(create)
on the underlying
javax.servlet.http.HttpServletRequest
instance.
create
- Flag indicating whether or not a new session should be
created if there is no session associated with the current requestpublic java.lang.String getSessionId(boolean create)
Return the id of the current session
or the empty string if no session has been created and the
create
parameter is false
.
Jakarta Servlet: If create
is true, obtain
a reference to the HttpSession
for the current request
(creating the session if necessary) and return its id. If
create
is false
, obtain a reference to the
current session, if one exists, and return its id. If no session exists,
return the empty string.
create
- Flag indicating whether or not a new session should be
created if there is no session associated with the current requestpublic int getSessionMaxInactiveInterval()
Returns the maximum time interval, in seconds, that
the Jakarta Servlet container will keep this session open between client accesses.
After this interval, the Jakarta Servlet container will invalidate the session.
The maximum time interval can be set with the
setSessionMaxInactiveInterval(int)
method.
A return value of zero or less indicates that the session will never timeout.
Jakarta Servlet: This must return the result of calling
getMaxInactiveInterval
on the underlying
javax.servlet.http.HttpSession
instance.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
public abstract java.util.Map<java.lang.String,java.lang.Object> getSessionMap()
Return a mutable Map
representing the session
scope attributes for the current application. The returned
Map
must implement the entire contract for a
modifiable map as described in the JavaDocs for
java.util.Map
. Modifications made in the
Map
must cause the corresponding changes in the set
of session scope attributes. Particularly the
clear()
, remove()
, put()
,
and get()
operations must take the appropriate
action on the underlying data structure. Accessing attributes
via this Map
must cause the creation of a session
associated with the current request, if such a session does not
already exist.
For any of the Map
methods that cause an element
to be removed from the underlying data structure, the following
action regarding managed-beans must be taken. If the element to
be removed is a managed-bean, and it has one or more public
no-argument void return methods annotated with
javax.annotation.PreDestroy
, each such method must
be called before the element is removed from the underlying data
structure. Elements that are not managed-beans, but do happen to
have methods with that annotation must not have those methods
called on removal. Any exception thrown by the
PreDestroy
annotated methods must by caught and not
rethrown. The exception may be logged.
Jakarta Servlet: This must be the set of attributes available via
the javax.servlet.http.HttpSession
methods
getAttribute()
, getAttributeNames()
,
removeAttribute()
, and setAttribute()
.
public abstract java.security.Principal getUserPrincipal()
Return the Principal
object containing the name of
the current authenticated user, if any; otherwise, return
null
.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
getUserPrincipal()
.
Principal
object.public ClientWindow getClientWindow()
Return the ClientWindow
set in a preceding
call to setClientWindow(javax.faces.lifecycle.ClientWindow)
, or null
if no such call has
been made.
ClientWindow
.public void invalidateSession()
Invalidates this session then unbinds any objects bound to it.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpSession
method
invalidate()
.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
public abstract boolean isUserInRole(java.lang.String role)
Return true
if the currently authenticated user is
included in the specified role. Otherwise, return false
.
Jakarta Servlet: This must be the value returned by the
javax.servlet.http.HttpServletRequest
method
isUserInRole(role)
.
role
- Logical role name to be checkedjava.lang.NullPointerException
- if role
is null
public abstract void log(java.lang.String message)
Log the specified message to the application object.
It is valid to call this method
during application startup or shutdown. If called during application
startup or shutdown, this calls the log()
method on the same
container context instance (ServletContext
or
PortletContext
) as the one used during a call to
log()
on the ExternalContext
returned
by the FacesContext
during an actual request.
Jakarta Servlet: This must be performed by calling the
javax.servlet.ServletContext
method
log(String)
.
message
- Message to be loggedjava.lang.NullPointerException
- if message
is null
public abstract void log(java.lang.String message, java.lang.Throwable exception)
Log the specified message and exception to the application object.
It is valid to call this method
during application startup or shutdown. If called during application
startup or shutdown, this calls the log()
method on the same
container context instance (ServletContext
or
PortletContext
) as the one used when calling
log()
on the ExternalContext
returned
by the FacesContext
during an actual request.
Jakarta Servlet: This must be performed by calling the
javax.servlet.ServletContext
method
log(String,Throwable)
.
message
- Message to be loggedexception
- Exception to be loggedjava.lang.NullPointerException
- if message
or exception
is null
public abstract void redirect(java.lang.String url) throws java.io.IOException
Redirect a request
to the specified URL, and cause the
responseComplete()
method to be called on the
FacesContext
instance for the current request.
The implementation must determine if
the request is an Ajax
request by obtaining a
PartialViewContext
instance from the FacesContext
and
calling PartialViewContext.isAjaxRequest()
.
Jakarta Servlet: For
non Ajax
requests, this must be accomplished by calling
the javax.servlet.http.HttpServletResponse
method
sendRedirect()
.
PartialResponseWriter
instance from the
FacesContext
.setResponseContentType(java.lang.String)
with text/xml
setResponseCharacterEncoding(java.lang.String)
with UTF-8
addResponseHeader(java.lang.String, java.lang.String)
with Cache-Control
,
no-cache
PartialResponseWriter.startDocument()
PartialResponseWriter.redirect(java.lang.String)
with the url
argument.PartialResponseWriter.endDocument()
url
- Absolute URL to which the client should be redirectedjava.lang.IllegalArgumentException
- if the specified url is relativejava.lang.IllegalStateException
- if, in a portlet environment,
the current response object is a RenderResponse
instead of an ActionResponse
java.lang.IllegalStateException
- if, in a Jakarta Servlet environment,
the current response has already been committedjava.io.IOException
- if an input/output error occurspublic void setResponseHeader(java.lang.String name, java.lang.String value)
Set the response header with the given name and value.
Jakarta Servlet:This must be performed by calling the
javax.servlet.http.HttpServletResponse
setHeader
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
name
- The name of the response header.value
- The value of the response header.public void addResponseHeader(java.lang.String name, java.lang.String value)
Add the given name and value to the response header.
Jakarta Servlet:This must be performed by calling the
javax.servlet.http.HttpServletResponse
addHeader
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
name
- The name of the response header.value
- The value of the response header.public void setResponseBufferSize(int size)
Set the buffer size for the current response.
Jakarta Servlet: This must be performed by calling the
javax.servlet.http.HttpServletResponse
setBufferSize
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
size
- the new buffer sizepublic int getResponseBufferSize()
Return the buffer size for the current response.
Jakarta Servlet: This must be performed by calling the
javax.servlet.http.HttpServletResponse
getBufferSize
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
public boolean isResponseCommitted()
Check if the current response has been committed.
Jakarta Servlet: This must be performed by calling the
javax.servlet.http.HttpServletResponse
isCommitted
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
public void responseReset()
Resets the current response.
Jakarta Servlet: This must be performed by calling the
javax.servlet.http.HttpServletResponse
reset
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
public void responseSendError(int statusCode, java.lang.String message) throws java.io.IOException
Sends an HTTP status code with message.
Jakarta Servlet: This must be performed by calling the
javax.servlet.http.HttpServletResponse
sendError
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
statusCode
- an HTTP status codemessage
- an option message to detail the cause of the codejava.io.IOException
- any IO related exceptions.public void setResponseStatus(int statusCode)
Sets the HTTP status code for the response.
Jakarta Servlet: This must be performed by calling the
javax.servlet.http.HttpServletResponse
setStatus
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
statusCode
- an HTTP status codepublic void setSessionMaxInactiveInterval(int interval)
Specifies the time, in seconds, between client requests before the Jakarta Servlet container will invalidate this session.
An interval value of zero or less indicates that the session should never timeout.
Jakarta Servlet: This must call
setMaxInactiveInterval
on the underlying
javax.servlet.http.HttpServletRequest
instance.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.
interval
- the value to be set.public void setClientWindow(ClientWindow window)
Associate this instance with a ClientWindow
.
window
- the window with which this instance is associated.public void responseFlushBuffer() throws java.io.IOException
Flushes the buffered response content to the client.
Jakarta Servlet: This must be performed by calling the
javax.servlet.http.HttpServletResponse
flushBuffer
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
java.io.IOException
- any IO related exception.public void setResponseContentLength(int length)
Set the content length of the response.
Jakarta Servlet: This must be performed by calling the
javax.servlet.http.HttpServletResponse
setContentLength
method.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
length
- the value to be set.public java.lang.String encodeBookmarkableURL(java.lang.String baseUrl, java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
The purpose of this method is to generate a query string from the collection of Parameter objects provided by the parameters argument and append that query string to the baseUrl. This method must be able to encode the parameters to a baseUrl that may or may not have existing query parameters. The parameter values should be encoded appropriately for the environment so that the resulting URL can be used as the target of a link (e.g., in an href attribute) in a Jakarta Server Faces response. It's possible for an ExternalContext implementation to override this method in any way that would make the URL bookmarkable in that environment.
See encodeActionURL(java.lang.String)
for the required specification of how to encode the ClientWindow
.
The default implementation throws
UnsupportedOperationException
and is provided for
the sole purpose of not breaking existing applications that
extend this class.
baseUrl
- The base URL onto which the query string generated by this method will be appended. The URL may contain query parameters.parameters
- The collection of Parameter objects, representing name=value pairs that are used to produce a query stringpublic java.lang.String encodeRedirectURL(java.lang.String baseUrl, java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
See encodeActionURL(java.lang.String)
for the required specification of how to encode the ClientWindow
.
baseUrl
- The base URL onto which the query string generated by this method will be appended. The URL may contain query parameters.parameters
- The collection of Parameter objects, representing name=value pairs that are used to produce a query stringpublic java.lang.String encodePartialActionURL(java.lang.String url)
Return the input URL, after performing any rewriting needed to ensure that it can be used in a partial page submission (ajax request) to correctly identify an addressable action in the current application.
See encodeActionURL(java.lang.String)
for the required specification of how to encode the ClientWindow
.
Jakarta Servlet:Returns the same encoded URL as the
encodeActionURL(String url)
method.
Portlet:Returns an encoded URL that, upon HTTP POST, will invoke the RESOURCE_PHASE of the portlet lifecycle.
url
- The input URL to be encodedjava.lang.NullPointerException
- if url
is null
public boolean isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
Jakarta Servlet: This must return the result of calling
isSecure
on the underlying
javax.servlet.http.HttpServletRequest
instance.
The default implementation throws
UnsupportedOperationException
and is provided
for the sole purpose of not breaking existing applications that extend
this class.


Give Us a Call @
973-118-9095
HOME
SERVICES
TRACK RECORD
FREE TRIAL
CONTACT US
Register Here for Free Trial
First Name
E-mail
Phone Number
Age
@999 Copyright - Stock Market Tips,2014


The field of text-conditioned image generation has made unparalleled progress with the recent advent of latent diffusion models. While remarkable, as the complexity of given text input increases, the state-of-the-art diffusion models may still fail in generating images which accurately convey the semantics of the given prompt. Furthermore, it has been observed that such misalignments are often left undetected by pretrained multi-modal models such as CLIP.
To address these problems, in this paper we explore a simple yet effective decompositional approach towards both evaluation and improvement of text-to-image alignment. In particular, we first introduce a Decompositional-Alignment-Score which given a complex prompt decomposes it into a set of disjoint assertions. The alignment of each assertion with generated images is then measured using a VQA model. Finally, alignment scores for different assertions are combined aposteriori to give the final text-to-image alignment score. Experimental analysis reveals that the proposed alignment metric shows significantly higher correlation with human ratings as opposed to traditional CLIP, BLIP scores.
Furthermore, we also find that the assertion level alignment scores provide a useful feedback which can then be used in a simple iterative procedure to gradually increase the expressivity of different assertions in the final image outputs. Human user studies indicate that the proposed approach surpasses previous state-of-the-art by 8.7% in overall text-to-image alignment accuracy.
Decompositional Alignment Score: Traditional methods for evaluating text-to-image alignment, for example, CLIP1, BLIP-22 and BLIP2-ITM (which provides a binary image-text matching score between 0 and 1) often fail to distinguish between good (right) and bad (left) image outputs and can give high scores even if the generated image is not an accurate match for input prompt (missing yellow car). In contrast, by breaking down the prompt into a set of disjoint assertions and then evaluating their alignment with the generated image using a VQA model2, the proposed Decompositional-Alignment Score (DA-score) shows much better correlation with human ratings.
Method comparisons w.r.t correlation with human ratings:
We compare the correlation of different text-to-image alignment scores with those obtained from human subjects, as the number of subjects in the input prompt is varied.
We observe that the proposed alignment score (DA-score) provides a better match for human-ratings over traditional text-to-image alignment scores like CLIP, BLIP and BLIP2.
Method Overview:
Given a text prompt P and an initially generated output I, we first generate a set of disjoint assertions ai regarding the content of the caption. The alignment of the output image I with each of these assertions is then calculated using a VQA model. Finally, we use the assertion-based-alignment scores ui(I,P) as feedback to increase the weightage wi (of the assertion with least alignment score) in a parameterized diffusion model formulation. This process can then be performed in an iterative manner to gradually improve the quality of the generated outputs until a desirable threshold for the overall alignment score Omega(Ik,P) is reached.
Variation of alignment accuracy with prompt difficulty. We observe that while the accuracy of all methods decreases with increasing prompt difficulty, the proposed iterative refinement approach consistently performs better than prior works.
@article{singh2023divide,
title={Divide, Evaluate, and Refine: Evaluating and Improving Text-to-Image Alignment with Iterative VQA Feedback},
author={Singh, Jaskirat and Zheng, Liang},
journal={arXiv preprint arXiv:2307.04749},
year={2023}
}


% include("/common/head.html"){} %>
<% include("/common/user_header.html"){} %>
系统出现未知错误
<% include("/common/user_footer.html"){} %>


Your account has been created on {{ user.metadata?.creationTime | moment: 'll' }}.
{{ msgs.providers || 'Providers' }}:
"{{ provider }}"
Your email {{ user.emailVerified ? 'has been verified already' : 'has not been verified yet '}}.
Here you can change the credentials used for signin-in.


So I've been tracking the Solaris 11 Express Support repo updates for a while. I had issue today where I couldn't make a network connection to my virtual box guests. They would ping but no ssh and no http connection. The later being important as my VB guest is running a local mirror repo. while I could connect to the guest from other machines on the network I could connect to them from the the machine hosting the guests.
To cut the 3 hours I wasted chasing this problem turns out if I reverted my BE to the previous one... no problems everything works as expected. A quick check to the Oracle support rep sees there is now an SRU5 so I did an update nothing to lose. Update completed and my network connectivity to my guest has returned
Solaris 11 Express SRU4 not compatible with VirtualBox 4.0.4.


twgl.js
- offscreencanvas
Sorry but your browser doesn't appear to support WebGL
Sorry but your browser doesn't appear to support
OffscreenCanvas


Firefox OS workshop
Setting up the environment
Development workflow
Introduction to JS
How does the browser work?
Events
Testing
Performance tips
Building blocks & UI
Layout
Animation in the web
FirefoxOS specifics
Good practices
@michalbe
@rik24d


Location: Legarda-Burnham, Baguio, 2600 Benguet, Philippines
Originally intended to serve as a much-needed green park, to provide a bustling city with a peaceful environment with wide open green spaces, Burnham Park under Filipino administration is now more of an amusement park with boating, bicycle and skating areas, sports and gaming areas, plus a few eateries.
The park features a man-made lake situated at the center where tourists can enjoy boating with rented boats.
Read MoreOutlook Drive, Baguio, Luzon, Philippines
There is no doubt that the Mines View Park is one of the most popular and most visited park in the city. From the observation deck of the park a breathtaking panoramic view of Benguet's gold and copper mines and the surrounding mountains unfolds before you. It is a spectacular sight to behold and should not be missed when visiting Baguio.
Read MoreLocation: Leonard Wood Rd, Baguio, Benguet
The Baguio Botanical Garden is located east of Baguio's downtown area. You will find it between Teacher's Camp and the Pacdal Circle. Its main entrance is along Leonard Wood Road and just across the street from Gilberto's Hotel and Baguio Vacation Hotel. It is quite a large park and about the same size as Burnham Park
Read MoreWhen I was in Baguio Museum, I read an article written by some writer whose name I could not recall, describing Baguio as a “Melting Pot”. Based on Wikipedia’s definition, a melting pot is a metaphor for a heterogeneous society becoming more homogeneous, the different elements “melting together” into a harmonious whole with a common culture. To me that absolutely made sense. That’s exactly what Baguio is. An assimilation of various people with different cultures all drawn together in harmonious coalescence.
Baguio City is the kind of place which I easily fell in love with. Primarily, what separates Baguio from other cities in the Philippines is its cool weather and its pine-scented air. Aside from that, there are a whole lot of other reasons why the city is so endearing. Themed Parks are everywhere. The people are so warm. The culture is artful and lovely. It’s like an entirely different world. It’s beautiful and it’s something I couldn’t get enough with.
The Diocese is one of the oldest ecclesiastical territories in the Philippines. It was established as the Apostolic Prefecture of Mountain Provinces on July 15, 1932. The territory that the Diocese of Baguio now spans was split from the bishopric of Nueva Segovia.
On June 10, 1945, the apostolic prefecture was elevated to the Apostolic Vicariate of Mountain Provinces (or Montagnosa), entitling it to a titular bishop. The prefecture received a papal visit from John Paul II in February 1981.


Advanced AI Week3 notes
Bayesian Probability Theory
Frequency Interpretation: Counting
Probabilities –> relative frequencies
The probability of the event E: $\lim_{n \to \infty} k_n (E) / n$
- Problem:
- Frequency Interpretation is Circular (unlikely occurance)
- Reference Class Problem (No identical similar)
- Limited to I.I.D. (non-i.i.d. data)
Objective Interpretation: Uncertain Events
Objectivist probabilities –> real aspects of the world
Axioms 3.1 (Kolmogorov ‘s axioms of probability theory)
Let $\Omega$ be the sample space. Events are subsets of $\Omega$.
If A and B are events, then A $\cap$ B, A $\cup$ B, and A \ B are events.
$\Omega$ and {} are events.
There is a function p which assigns nonnegative reals, called proabilities, to each event.
p($\Omega$) = 1, p({}) = 0.
p(A $\cup$ B) = p(A) + p(B) - p(A $\cap$ B).
For a decreasing sequence A1 $\supset$ A2 $\supset$ A3 … of events with $\bigcap_n$ An = {} we have $\lim_{n \to \infty}$ p(An) = 0.
Definition 3.2 (Conditional probability)
If A and B are events with p(A) > 0, then $p (B | A) := \frac{p (A \cap) B}{p(A)}$
p($\cdot$ | A) is also a probability measure, if p($\cdot$) satisfies the Kolmogorov axioms.
Theorem 3.3 (Bayes’ rule 1)
If A and B are events with p(A) > 0 and p(B) > 0, then $p(B | A) = \frac{p(A | B) p(B)}{p(A)}$
Subjective Interpretation: Degree of Belief
Axioms 3.4 (Cox’s (1946) axioms for beliefs)
The degree of belief in event B given that event A occurred: function Bel(B|A).


Grace 'will be missed forever'
The lives of a family ripped apart in a "barbaric way" by a lying killer received justice yesterday as the jury returned a guilty verdict for the man accused of murdering Grace Millane.
The British backpacker was strangled to death on the eve of her 22nd birthday by her Tinder date in his downtown Auckland apartment on December 1 last year.
He then went about trying to cover it up and dumped her body in the Waitākere Ranges.
Millane's parents, seated in the first row of the public gallery, broke down in tears and embraced each other as they heard the word "guilty" from the jury foreperson.
David and Gillian Millane spoke to dozens of journalists from around the world after the verdict.
David said their lives had been ripped apart.
"This will be with us for the rest of our lives," he said. "Grace was a beautiful, talented, loving daughter. Grace was our sunshine and she will be missed forever."

Millane's parents thanked several people, including Auckland Police, specifically Detective Inspector Scott Beard, Detective Sergeant Greg Brand and Detective Toni Jordan.
"We would like to thank the Crown prosecution team: Brian [Dickey], Robin [McCoubrey], and Litia [Tuiburelevu]. They never flinched away from the more intimate details of the case and were compassionate and thoughtful where the family matters arose.
"The press contingent ... you attended court every day with my wife and I and reported truthfully, respectfully all the events as they unfolded."
The Millanes also thanked the people of New Zealand.
"They've opened their hearts to Grace and her family, I cannot express our gratitude enough for all the offers of gifts and kindness that we've received over the last year."
The Millanes will now return to England and "try pick up the pieces of ours lives" and live day-to-day without their beloved daughter.
Millane's parents left the court on the 12th day of the trial as they had entered on the 1st - holding hands and in tears.
The jury's decision was unanimous. But even some of the members of the jury broke down and sobbed as they left the courtroom for the final time.
Different narratives
After hearing from nearly 39 witnesses over nearly three weeks they were presented with two different narratives about what happened to Millane on that fateful night.
Dickey and his team said it was murder.
They used some of the six terabytes of CCTV footage collected by police to track the killer's movements, his internet search history, expert witness, and those who knew the murderer's inclination to dominate women.
He strangled Millane to death in his CityLife hotel room and then took "trophy" photos of her body, Dickey told them.

The defence, however, used expert evidence and those who knew Millane to say it was an accidental death during erotic asphyxiation.
The killer had "freaked out", his chief of defence Ian Brookie said, before then lying to police and trying cover it up.
The 27-year-old murderer, who had shed tears throughout the trial, appeared anxious as he walked into the dock to hear his fate this afternoon.
But this time the man, who cannot be named for legal reasons, held back his tears.
He gulped and took a big breath before hearing the foreperson deliver justice for the Millane family.
"This jury having found you guilty of the murder of Grace Emmie Rose Millane, you are convicted," Justice Simon Moore told him.
Leaving the dock with his head down, the killer will return to court on February 21 at 9am to be sentenced.
The murderer's stepbrother told the Herald after the verdict he shed tears but was "so glad for Grace's family".
"It doesn't make anything better, but [it's] good to know the jury and New Zealand justice system made the right call."
Justice Moore told the jury "it is never easy to judge a fellow man".
"It is evident each of you has thought very hard and very careful," he said. "This has been a particularly difficult trial."
The judge discharged them all from sitting on a jury for the next seven years.
During their deliberation the jury knocked on the courtroom door about 4.45pm to ask a question.
They asked: "Does 'when he applied pressure' [to Millane's neck] refer to when he started to apply pressure at the beginning or can it refer to any time when he applied pressure?"
Justice Moore answered: "It is not limited to the beginning. It can be at any time during the application of force leading to death."
It may have been a hint as to which way they were leaning because just an hour later they returned with their guilty verdict.
Beard said because of the ongoing court process police were unable to comment about the case.


Module
| coroutine |
Coroutine Manipulation. |
| debug |
The Debug Library. |
| global |
Lua global variables. |
| io |
Input and Output Facilities. |
| math |
Mathematical Functions. |
| os |
Operating System Facilities. |
| package |
The package library provides basic facilities for loading and building modules in Lua. |
| string |
String Manipulation. |
| table |
Table Manipulation This library provides generic functions for table manipulation. |


| Trees | Indices | Help |
|---|
|
|
This module provides the entry point to the vert.x platform
Author: Scott Horn
|
|||
|
Context An HTTP and websockets server |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__email__ =<EMAIL_ADDRESS>|
|||
__credits__ = "Based entirely on work by Tim Fox http://tfox.org"
|
|
Deploy a verticle. The actual deploy happens asynchronously Keyword arguments:
|
Deploy a worker verticle. The actual deploy happens asynchronously Keyword arguments:
|
Deploy a module. The actual deploy happens asynchronously Keyword arguments:
|
Undeploy a verticle Keyword arguments:
|
Undeploy a module Keyword arguments:
|
Get config for the verticle
|
Get environment variables for the verticle
|
Sets a one-shot timer that will fire after a certain delay. Keyword arguments:
|
Sets a periodic timer. Keyword arguments:
|
Cancels a timer. Keyword arguments:
|
Put the handler on the event queue for this loop so it will be run asynchronously ASAP after this event has been processed Keyword arguments:
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed Jul 17 20:24:58 2013 | http://epydoc.sourceforge.net |


This is my page.
Hello there, awesome person!
It is a beautiful day today!
Below is a list of my favorite sites!
This is Facebook!
This is Amazon!
This is Gmail!


Comparing methods of deploying Python applications
I had a cry last month about deploying a Python application to end-users being more fiddly and difficult than I expected it to be. I'm talking about py2exe, Freeze, and their ilk.
As a quick follow-up, I recently posted to comp.lang.python about a spreadsheet I've made, comparing comparing the solutions I've found thus far:
http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdg&output=html
Each column represents a method of distributing a Python application to an end-user without them having to worry about what Python is or whether they have an appropriate version of it installed. 'Bundle' represents manually bundling an interpreter with your application. 'Bootstrap' represents a sort of fanciful vision of manually creating a compiled installer which downloads and installs an interpreter if required, before running your Python application on it. The other columns represent the various splendid projects like py2exe which perform the bundling process for you.
Each row represents a reason to choose between them. By my criteria, which are no doubt idiosyncratic, cx_freeze or maybe PyInstaller are starting to look like good contenders for future projects.
Obviously feedback about any wrong-headedness on my part is appreciated.


Extensive experience of .Net application development using C#. Primary work included developing MS Office Add ins using Visual Studio Tools for Office (VSTO). Additional experience include creating and consuming WCF and REST services. Experience in how to use git.Also has experience in design and development of applications using .NET and Web technologies like CSS, JavaScript and HTML.
A VSTO Based plugin development for MS Office Suite.
Design and development of math4office.com website using .NET and Web technologies like CSS, JavaScript and HTML.
A google chrome extension that solves any type of math expression inside a text area in a web page.
 In the winter, I am an avid skiier and novice ice climber. I enjoy biking and kayaking.
When forced indoors, I follow a number of sci-fi and fantasy genre movies and television shows, I am an aspiring chef, and I spend a large amount of my free time exploring the latest technolgy advancements in the front-end web development world.


Recognizing Industry Leaders in Engineering and Construction
NAC ANNUAL MEETING OCTOBER 11-13, 2018
The 2018 Annual Meeting will be held in San Diego, CA at the U.S. Grant Hotel. Visit the Events Page for more information.
As NAC members, these acknowledged construction industry leaders are presented with a unique opportunity to help the industry and the United States make important decisions on issues with far-reaching effects: how to provide a motivated, technically savvy workforce, how to improve the industry's image, how to make safety the number one priority always, how strategies for future success can be planned now to benefit the entire world tomorrow, and many others.
The National Academy of Construction is a premier group of leaders. This diverse expertise stands ready as a collective voice for the industry. The strategies that will be needed going forward, in infrastructure, in capital projects, and in business both nationally and globally, need the guidance that Academy leadership represents. Our aim is to utilize the knowledge, experience, and talents of our members in support of the industry and the nation.


useful.bas documentation
useful.bas is just a standard basic module. It's what I've been writing useful
functions in whenever I need one. To use it just save it to your hard drive, and add it to your
project. Feel free to add more if you want, but do send any funky additions to the vbsupport list.
There are quite a lot of functions in it so here's a list.
|
|
|
|
Takes a single letter string variable as an arguement and returns its position within the alphabet as an integer.
Usage:
IntegerVariable = AlphabetPosition(SingleLetterString)
Top of Page
|
|
This function takes two arrays of variant type as arguments and checks whether the first
contains the second. Returns an integer representing the start point
of array b within array a, or -999 if no match is found.
Usage:
IntegerVariable = ArrayAContainsArrayB(VariantArray_A,VariantArray_B)
Top of Page
|
|
This function takes one variant array as an argument returns a the arithmetic mean of all the
numeric elements within the array as a Double. Note non-numeric array items are ignored
Usage:
DoubleVariable = ArrayMean(VariantArray)
Top of Page
|
|
Takes two variant arrays as arguments and returns a boolean representing wether the two argument arrays were identical. Useful for checking you haven't used the same trial before.
Usage:
BooleanVariable = ArraysAreIdentical(VariantArray_A,VariantArray_B)
Top of Page
|
|
Takes two variant arrays as args and checks whether they share an element at the same subscript.
It checks relative to the start of each array, so it doesn't matter if the two arrays don't share the same base.
Good for checking lists for whether they share serial positions.
Usage:
BooleanVariable = ArraysSharePosition(VariantArray_A,VariantArray_B)
Top of Page
|
|
Takes an array of numeric values and calculates the sample standard deviation.
The standard deviation is returned as a double.
Usage:
DoubleVariable = ArrayStdDev(VariantArray)
Top of Page
|
|
Calculates the squares of all the numeric elements in an array and returns them as an array to a variant.
Note: Again all non-numeric array elements are ignored. They come back as zeros.
Usage:
VariantVariable = ArraySqr(VariantArray)
Top of Page
|
|
These two do the same thing basically. ArrSum takes a vairant array and returns the arithmetic sum of all the numeric elements in it.
SumOf takes a comma-separated list of numbers to be summed.
Both return doubles.
Usage:
DoubleVariable = ArrSum(VariantArray)
DoubleVariable = SumOf(var1, var2, var3, ..., varN)
Top of Page
|
|
Takes two variant arrays, which must be of the same dimensions and returns the dot-product of the two vectors.
Usage:
VariantVariable = DotProduct(VariantArray)
Top of Page
|
|
Takes an integer variable and returns its factorial as a Long.
Usage:
LongVariable = Factorial(IntegerVariable)
Top of Page
|
|
Gives a random number which, over repeated calls to this function will give a zero-centred gaussian
distribution with a standard deviation specified as a double-precision argument.
Very useful for modelling noise on anything.
Usage:
DoubleVariable = GaussianDeviate(Double_StandardDeviation)
Top of Page
|
|
Takes an integer and returns whether it is an even number or not as a boolean
Usage:
BooleanVariable = IsEven(IntegerVariable)
Top of Page
|
|
Takes a single item (non-array) variant and an array as arguments and looks through the array for the item.
Returns a boolean indicating whether the item was present or not.
Usage:
BooleanVariable = IsInArray(VariantVariable,VariantArray)
Top of Page
|
|
These two do the same thing basically. Use wichever fits best with the data structures in your program.
Largest takes a vairant array and returns the value of the largest.
LargestN takes a comma-separated list of numbers and returns the value of the largest.
Both return doubles.
Usage:
DoubleVariable = Largest(VariantArray)
DoubleVariable = LargestN(var1, var2, var3, ..., varN)
Top of Page
|
|
This is the converse of AlphabetPosition.
Takes an integer between 1 and 26 and returns the corresponding letter.
Usage:
StringVariable = LetterAtPosition(IntegerVariable)
Top of Page
|
|
This function picks N items at random from a one-dimensioned array which has
at least N entries. It won't pick the same item more than once, unless that item
has multiple entries in the large array.
The array needs to be 1-based (have its lowest subscript as 1).
The function returns a 1-based variant array.
Usage:
VariantVariable = PickNfromX(IntegerVariable, VariantArray)
Top of Page
|
|
Similar to PickNfromX, but always returns an array of equal dimensions to the one
given, and has the option of specifying order restrictions.
Takes a variant array and optionally, a boolean specifying whether to restrict arrays
returned to those which don't contain three or more items in the same order as in
the input array.
Usage:
VariantVar = ShuffleArray(VariantArray, [optional]BooleanVariable)
Top of Page
|
|
Takes a comma-separated list of numbers and returns the value of the smallest as a double.
Usage:
DoubleVariable = SmallestN(var1, var2, var3, ..., varN)
Top of Page
|
|
Takes a variant array of numeric variables as an argument and returns the array
subscript of the largest one as an integer. Useful for modelling winner-takes all competition.
Usage:
IntegerVariable = SubscriptOfLargest(VariantArray)
Top of Page
|


The woman who narrated that the most recent behaviour her 10-year-old nephew demonstrated was intentionally hurting her baby with a poisonous insect.
Read her story below:


Try it Out
Write the coefficients of all the terms in the equation with a space
What Is an Opamp
An Operational Amplifier (in short opamp) is an electronic circuit element designed for DC
amplification and are therefore used extensively in signal conditioning, filtering or to perform
mathematical operations such as add, subtract, integration and differentiation.
For a detailed info on opamp, you can refer to Wikipedia.
What does this Opamp designer do?
One of the applications of Opamp is to build mathematical circuits.
Given a set of input voltages we can get the output voltage as a linear combination of the input voltages.
For example :
Vout = 2V1 + 5V2 - 4V3
What this tool does is, given a linear combination of equations, it will design an optimal opamp circuit which implelemnts the equation


Internet Cleanup Foundation
To benefit society, we believe information on the internet must be exchanged safely. Anyone must be able to verify this safety on their own. We create tools to do so.
Mission & Vision
Vision: verify safety independently
A lot of sensitive information is (required to be) given out to organizations. These organizations have the obligation to handle this data responsibly. In many cases the owner of the data is asked to trust those organization, blindly.
Our mission is to remove blind trust from of the equation: everybody should be able to determine themselves if their data is handled responsibly.
Mission: give the means to verify
The Internet Cleanup Foundation develops tools that helps the public in making sure that organizations which are required to protect information of others is doing their job correctly.
Hundreds of issues solved and counting
Fail map is the project that spawned this foundation. It is a geographical map that shows how well digital safety is implemented in organizations tasked with handling personal data.
By using the judgemental term "failure", organizations are quicker to respond to their failure. Combined with the extremely clear visual aesthetic of the fail map, anyone can determine who is doing their job.
The map knows four colors:
- Red: insecure, obvious problems
- Orange: bound to be insecure soon
- Green: cannot find anything insecure
- Gray: nothing to check
The information on the map is gathered automatically, every day. This process can only look at a very basic level of safety, representative of the rest of the tested organization. The basic and often mandated level of safety originates from best practices, standards bodies, governments, companies and groups with technical know-how.
Link: https://www.faalkaart.nl
Foundation Facts
The foundation
The Internet Cleanup Foundation is a registered not for profit foundation registered in The Netherlands, Europe.
Boardmembers
Chairman: Elger Jonker
Treasurer: Twan van Someren
Secretary: Eelko Neven
Organization profile
The Internet Cleanup Foundation is a technology first organization. We work with technology every day: building new things and exploring the limits of what it can do. The foundation and it's volunteers have a deep passion for technology and it's effect on society.
Highlights policy plan 2017
- Improve and develop fail map software
- More checks
- Checks with open source tools
- Using open streetmaps
- Internationally applicable
- Easy installation (no knowledge)
- Support different visualizations
- Build a community around this cause
- Get national media coverage on the results of fail map
- Become an ANBI
- Speak at conferences at least four times
ANBI Information
The Internet Cleanup Foundation is in the process of becoming an ANBI, a non-profit entity which invests in the common good of society.
Facts and figures
Name: Stichting Internet Cleanup Foundation
Goal: To increase confidentiality, integrity and availability (cia) of information on the internet and everything related to this subject in the broadest sense. The foundation does this by:
- measuring the quality of cia.
- supporting the creation of measurement tools that allow for independently measuring cia.
- communicating the results and goal of the foundation at conferences and via (internet) media.
- increasing accessibility of (strengthening) cia and related subjects.
Chamber of Commerce number: 66636000
RSIN: 856640426
Bank account: NL45 RABO 03 1209 5678
Postal address: Elisabethpark 19, 4872BM, Etten-Leur
Internet address: https://internetcleanup.foundation
Statutes: Download PDF (Warning: in Dutch)
Annual financial statement: the financial statement will be published before end Q1 2018. There was little/no activity in 2016, this will be added to the financial statement of 2017.
Reward policy for the board
The board does not enjoy financial compensation for their board activities. On request travel expenses are reimbursed. Expenses for the foundation, which are planned, and made individually can be reimbursed.
Support the cause
Volunteer
The foundation has a full time position and is supported by a group of volunteers. Any contribution to promote, develop on or any other thing that moves this project forward is welcome.
Github Repo: https//github.com/failmap/
Financial donations
Financial donations are welcome on our bank account: NL45 RABO 03 1209 5678. Please contact us to get a written statement verifying your donation.
Sponsoring options
It's possible to sponsor Internet Cleanup Foundation. We use servers, domains, ip-space and other digital facilities and want to expand this. It is also possible to sponsor physical facilities, travel expenses and other supporting assets.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.


App\Containers\Settings\Models\Setting
Class Setting
- Author: Mahmoud Zalt<EMAIL_ADDRESS>Synopsis
class Setting
extends Model
{
- // members
- protected string $table = 'settings';
- public bool $timestamps = false;
- protected array $fillable = ;
- protected array $hidden = ;
Hierarchy
Extends
- App\Ship\Parents\Models\Model
Members
protected
- $fillable
—
array
The attributes that are mass assignable. - $table
—
string
The database table used by the model.
public
- $timestamps — App\Containers\Settings\Models\bool


{% extends "base.html" %} {% block content %}
Yeah! Click that header! That'll randomize you a card just for your very own, and you can start playing. All you do when you're there is tap at the squares to mark as seen, or to undo your marking. Each move is saved, so no worries on the data-loss front! I hope!
{% endif %} {% if g.user == card.owner %}Need to make changes? That's cool! Hopefully it's something small, though, right? If you change the meaning of a slot, that's fine, but everyone who marked that slot while playing will still have it marked!


File
public class File
A file in GridFS
-
The ObjectID for this file
Declaration
Swift
public let id: ObjectId
-
The amount of bytes in this file
Declaration
Swift
public let length: Int64
-
The amount of data per chunk
Declaration
Swift
public let chunkSize: Int32
-
The date on which this file has been uploaded
Declaration
Swift
public let uploadDate: Date
-
The file’s MD5 hash
Declaration
Swift
public let md5: String
-
The file’s name (if any)
Declaration
Swift
public let filename: String?
-
The file’s content-type (MIME) (if any)
Declaration
Swift
public let contentType: String?
-
The aliases for this file (if any)
Declaration
Swift
public let aliases: [String]?
-
The metadata for this file (if any)
Declaration
Swift
public let metadata: Value?
-
Finds all or specific chunks
Returns the bytes you selected
Declaration
Swift
public func read(from start: Int = 0, to end: Int? = nil) throws -> [Byte]
Parameters
start
The
Byte
where you start fetchingend
The
Byte
where you stop fetching -
Undocumented
Declaration
Swift
public class File
-
A GridFS Byte Chunk that’s part of a file
See moreDeclaration
Swift
public class Chunk


Name
Likes
Dislike
Action
{{technology.name}}
{{technology.likes}}
{{technology.dislikes}}
Like
Dislike