|
ARK2D
1.0
Game development framework for Windows, Mac OS X and Android.
|
A layer in a Tiled Map. More...
#include <TiledMapLayer.h>
Public Member Functions | |
| TiledMapLayer () | |
| void | setMap (TiledMap *map) |
| void | setName (const string &name) |
| const string & | getName () const |
| void | setWidth (unsigned int width) |
| unsigned int | getWidth () const |
| void | setHeight (unsigned int height) |
| unsigned int | getHeight () const |
| void | setVisible (bool v) |
| bool | isVisible () const |
| void | prepare () |
| unsigned int | getTileGID (unsigned int x, unsigned int y) const |
| void | setTileGID (unsigned int x, unsigned int y, unsigned int gid) |
| void | setOpacity (float f) |
| float | getOpacity () |
| void | draw (int xOffset, int yOffset) const |
| virtual | ~TiledMapLayer () |
Public Attributes | |
| TiledMap * | m_map |
| string | m_name |
| unsigned int | m_width |
| unsigned int | m_height |
| bool | m_visible |
| float | m_opacity |
| vector< TiledMapProperty > | m_properties |
| vector< std::vector< unsigned int > > | m_data |
A layer in a Tiled Map.
Definition at line 29 of file TiledMapLayer.h.
| ARK::Tiled::TiledMapLayer::TiledMapLayer | ( | ) |
Definition at line 10 of file TiledMapLayer.cpp.
|
virtual |
Definition at line 133 of file TiledMapLayer.cpp.
| void ARK::Tiled::TiledMapLayer::draw | ( | int | xOffset, |
| int | yOffset | ||
| ) | const |
Definition at line 101 of file TiledMapLayer.cpp.
| unsigned int ARK::Tiled::TiledMapLayer::getHeight | ( | ) | const |
Definition at line 40 of file TiledMapLayer.cpp.
| const std::string & ARK::Tiled::TiledMapLayer::getName | ( | ) | const |
Definition at line 28 of file TiledMapLayer.cpp.
| float ARK::Tiled::TiledMapLayer::getOpacity | ( | ) |
Definition at line 97 of file TiledMapLayer.cpp.
| unsigned int ARK::Tiled::TiledMapLayer::getTileGID | ( | unsigned int | x, |
| unsigned int | y | ||
| ) | const |
Definition at line 78 of file TiledMapLayer.cpp.
| unsigned int ARK::Tiled::TiledMapLayer::getWidth | ( | ) | const |
Definition at line 34 of file TiledMapLayer.cpp.
| bool ARK::Tiled::TiledMapLayer::isVisible | ( | ) | const |
Definition at line 46 of file TiledMapLayer.cpp.
| void ARK::Tiled::TiledMapLayer::prepare | ( | ) |
Definition at line 49 of file TiledMapLayer.cpp.
| void ARK::Tiled::TiledMapLayer::setHeight | ( | unsigned int | height | ) |
Definition at line 37 of file TiledMapLayer.cpp.
| void ARK::Tiled::TiledMapLayer::setMap | ( | TiledMap * | map | ) |
Definition at line 22 of file TiledMapLayer.cpp.
| void ARK::Tiled::TiledMapLayer::setName | ( | const string & | name | ) |
Definition at line 25 of file TiledMapLayer.cpp.
| void ARK::Tiled::TiledMapLayer::setOpacity | ( | float | f | ) |
Definition at line 94 of file TiledMapLayer.cpp.
| void ARK::Tiled::TiledMapLayer::setTileGID | ( | unsigned int | x, |
| unsigned int | y, | ||
| unsigned int | gid | ||
| ) |
Definition at line 72 of file TiledMapLayer.cpp.
| void ARK::Tiled::TiledMapLayer::setVisible | ( | bool | v | ) |
Definition at line 43 of file TiledMapLayer.cpp.
| void ARK::Tiled::TiledMapLayer::setWidth | ( | unsigned int | width | ) |
Definition at line 31 of file TiledMapLayer.cpp.
| vector< std::vector<unsigned int > > ARK::Tiled::TiledMapLayer::m_data |
Definition at line 63 of file TiledMapLayer.h.
| unsigned int ARK::Tiled::TiledMapLayer::m_height |
Definition at line 59 of file TiledMapLayer.h.
| TiledMap* ARK::Tiled::TiledMapLayer::m_map |
Definition at line 55 of file TiledMapLayer.h.
| string ARK::Tiled::TiledMapLayer::m_name |
Definition at line 57 of file TiledMapLayer.h.
| float ARK::Tiled::TiledMapLayer::m_opacity |
Definition at line 61 of file TiledMapLayer.h.
| vector<TiledMapProperty> ARK::Tiled::TiledMapLayer::m_properties |
Definition at line 62 of file TiledMapLayer.h.
| bool ARK::Tiled::TiledMapLayer::m_visible |
Definition at line 60 of file TiledMapLayer.h.
| unsigned int ARK::Tiled::TiledMapLayer::m_width |
Definition at line 58 of file TiledMapLayer.h.


About Us
Today, businesses are searching for ways to deliver service effectively to their customers. Also, some brands are looking at effective ways to make more sales and enjoy outstanding revenue generation. Sheikhs and Jargo bring you these solutions through our digital strategy and integrated marketing services. Sheikhs and Jargo Marketing Agency is an online marketing and communicative advertising agency. We generate leads, build brand awareness and work with start-up businesses to give their raw idea life. We engage the services of young professional with the actual skills in the use of modern technological tools in the industry to cluster effective service to our clients. At Sheikhs and Jargo Marketing Agency, we believe in bringing solutions to all digital marketing and advertising needs to our customer’s services.
Features
CREATIVE TEAMS
We have a team of professional and digital marketing experts with over 5 years of experience. Also, as a place of learning, we have interns working with us and growing to become experts in the digital marketing industry.
STRATEGY
We draw up the right plan and strategy streaming from past and present experience demanding on the current project and instructions at hand to bring solutions.
DELIVERY
On time service delivery in one of our major core valve as a company We have maintained and will continue to maintain the desire to deliver, proper and effective service as to our clients.
We at Sheikhs and Jargo Marketing Agency.
Our digital marketing and advertising service is designed to support and satisfy customer’s specific needs.
With full strength of hardworking and young professionals, our strategy and resources for distinct customer in the school sector, e-commerce and logistic, real estate, hospitality, health, market men and women and lots more is very handy.
You can rise above your competition with us!.
We engage the services of young professional with the actual skills in the use of modern technological tools in the industry to cluster effective service to our clients.
At Sheikhs and Jargo Marketing Agency, we believe in bringing solutions to all digital marketing and advertising needs to our customer’s services.
Sheikhs and Jargo bring you these solutions through our digital strategy and integrated marketing services.
Core Value
Also, some brands are looking at effective ways to make more sales and enjoy outstanding revenue generation.
SERVICES
We deliver durable and adequate professional digital marketing and advertising service for our customer’s satisfaction.
INTERGRITY
We deploy consistence and ethical professional standards in our business operations and delivery of service to our customers
INNOVATION
Our teams remain committed and well skilled to the use of modern technological and digital tools for effective service delivery to our clients.
SPEED
We work 24/7 to effectively deliver adequate and durable digital marketing solutions to our customers.
Why choose us?
Our digital marketing and advertising service is designed to support and satisfy customer’s specific needs. With full strength of hardworking and young professionals, our strategy and resources for distinct customer in the school sector, e-commerce and logistic, real estate, hospitality, health, market men and women and lots more is very handy.
We Offer
Business Branding
Sheikhs & Jargo marketing agency can help you define a good brand strategy knowing problems and finding lasting solutions.
Sheikhs & Jargo marketing agency, can help build a strong and reliable brand for your business that will drive engagement and establishes creativity taking over your competitive in to days world require having an effective brand for your business.
Digital Marketing
At sheikhs and Jargo marketing agency our team of young professional can create high- targeted Ads for your brand needs to meet the right customers for your business, using global digital channels such as Google, Facebook, Twitter, Instagram, YouTube and other channels.
Web Development and SEO
Sheikhs and Jargo Marketing Agency can increase your business sales and revenue return through increasing your visibility online to meet the right customers for your business. Having a modern and attractive high-performing website is great tool and strategy for your business needs.
Traditional Media Marketing
At Sheikhs and Jargo Marketing Agency we take necessary steps towards creating awareness and increasing visibility and generating leads for businesses by utilizing offline media as strategy to deliver services to our customers.
Clients
Projects
Hours Of Support
Hard Workers
Our CLients
I was very happy for the last job you guys did for me since then my business as witness up to 90% growth compare to what it was before. Really greatful!!
Contact Us
Abuja - Nigeria
<EMAIL_ADDRESS>(+234)8111551471


Man's Mercedes stolen by armed suspects in Willowdale, police say
by Codi Wilson, CP24.comPolice are trying to identify four suspects wanted in connection with a carjacking in Willowdale last week.
Police say on Friday a 56-year-old driver was stopped at a stop sign near Finch Avenue West and Senlac Road when he was struck from behind by a dark-coloured SUV.
When the man got out of his car to assess the damage, police say occupants of the SUV also exited their vehicle.
According to investigators, one of the men from the SUV produced a handgun and pointed it at the victim.
Police allege the suspects demanded the 56-year-old’s car keys and cellphones.
The suspects, police say, then drove away in the man’s car and the SUV followed.
The stolen vehicle is a black, four-door 2015 Mercedes Benz S5A with the licence plate CHRJ 747.
The armed suspect has been described by police as a white male who is between the ages of 18 and 25. He is approximately five-foot-ten, weighs 145 to 150 pounds, and has brown eyes.
Police say he was wearing a black balaclava and a sports jacket at the time of the incident.
Anyone with information about the incident is asked to contact police or Crime Stoppers anonymously.


FAITHFUL A film review by Scott Marcus Copyright 1996 Scott Marcus
Cast: Cher, Chazz Palminteri, Ryan O'Neal, Paul Mazursky Director: Paul Mazursky Screenplay: Chazz Palminteri, based on his play Running Time: 89 minutes Grade: C
First question: why does anyone let Ryan O'Neal act in their movies anymore? And, not only let him in, but give him a starring role. He's at best a has-been, though many would consider him a never-was. Anyway, he ruined any chance this movie might have had in my mind.
The setup is about the most interesting thing the film has going for it. A couple, Margaret O'Donnell (Cher) and her husband Jack (Ryan O'Neal) are celebrating their 20th anniversary. They've each got a little surprise for the other, though. The movie is based on Palminteri's play, where it may have worked better than on the big screen.
Tony (Chazz Palminteri) shows up at the couple's mansion, claiming that someone - he believes it's the husband, Jack - has hired him to kill Maggie. Tony has problems: he constantly has to stop and talk to his psychiatrist - played adequately by director Paul Mazursky - over the phone. It's no surprise that the emotionally confused hit-man is the strongest character: Mr. Palminteri wrote the film, after all, and saves the juiciest lines for himself.
There are some very good moments, reminiscent of the film SLEUTH, when the audience doesn't know which way things are going to go, or if everyone is really who they claim to be. These moments, however, are not enough to save the film. There are numerous plot holes, and quite a few developments that make little or no sense, once the denouement comes. For instance, why are there no servants? This really bothered me. The O'Donnell's live in a huge mansion, own a Ferrari and a Rolls Royce, and yet he makes his own breakfast, and she does her own shopping.
 I just didn't see any consistent characterizations; transformations came at will, with no justification. Contrast this with SLEUTH. In that film, Michael Caine and Laurence Olivier are both extremely clever, and continually outmaneuver each other. Here, the characters mostly seem to fumble over one another, except for a few times when they act intelligently.
The bright spots of the film - Mr. Palminteri's performance, some of the dialogue, and the set-up - are not enough, ultimately, to save the film. I grade it a mediocre C.
Review written: Thursday, 4 April 1996
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


'How About Tehran?' Netizens Advise Michelle Obama Where to Host Barack’s Presidential Library
While Michelle Obama argued that there’s plenty of places around the world which would’ve been eager to host the Obama Presidential Center, many social media users either seemed reluctant to agree with her or offered the ex-FLOTUS some sarcastic suggestions.
Former First Lady of the United States Michelle Obama has apparently managed to stir quite a ruckus online as she boasted about the alleged popularity of her husband, the 44th President of the United States Barack Obama.
Speaking at the Obama Foundation Summit at the Illinois Institute of Technology earlier this week, Michelle revealed that Chicago's Jackson Park was selected as the location for the Obama Presidential Center due to its proximity to both her childhood home and to the couple’s old home, adding that, in theory, it probably could’ve been opened elsewhere.
"Barack’s presidential library could’ve been anywhere in the world, because there’s so many people who feel like he’s their president", she claimed. "New York wanted it. Hawaii wants it. Because it’s also an economic engine, because it will be a visited presidential library".
Many social media users, however, did not seem amused by her remarks.
A number of people also gave the ex-FLOTUS some suggestions about where Barack’s library might’ve been opened instead of Chicago.
The Barack Obama Presidential Library is expected to become the first fully digital presidential library.


{% extends 'layout.html' %} {% block content %}
|
Hi {{ message_content.get('name', '')|title }}, I noticed you have not been able to complete your space listing on My Cute Office. Just checking if you want to have a call to discuss any issues you may be facing? I am available on call on +91-7738888577. Alternatively, you can complete the listing by following these 3 easy steps:
Waiting eagerly to share your space details with thousands of space seekers on My Cute Office. |


PHP Software Engineer, speaker, author, conference organizer.
Board member of @grusp organizing a whole lot of conferences like phpday, jsday, vueday, rubyday, sfday, nodejsday and many more!
When not sitting or standing at a desk typing code you can find somewhere outdoors training for some ultra trail race.


Walmart worker fatally shot while on break behind store
PINELLAS PARK, Fla. (AP) - Authorities say a Walmart employee was targeted and killed while taking a break behind a Florida store.
The Tampa Bay Times reports that the shooting occurred Friday near the Walmart Neighborhood Market in Pinellas Park.
Police say the man in his early 20s was hanging out behind the store when two men in a white car pulled up, got out and opened fire.
TOP STORIES
Southern California school shooter dies
Adam Schiff cracking under 'point of order' pressure
House GOP dismisses cries of Trump witness intimidation: 'We're not here to talk about tweets'
Walmart released a statement saying they were assisting law enforcement however possible.
Surveillance cameras on the corner of the building apparently recorded the incident. No arrests were immediate reported.
Walmart remained open Friday afternoon as investigators cordoned off a back section of the parking lot. The shooting scene was directly behind the store.
Information from: Tampa Bay Times (St. Petersburg, Fla.), http://www.tampabay.com.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


public interface
NetworkServerMBean
This is an MBean defining a JMX management and monitoring interface of Derby's Network Server.
This MBean is created and registered automatically at Network Server startup if all requirements are met (J2SE 5.0 or better).
Key properties for the registered MBean:
type=NetworkServer
system=
runtime system identifier
(see
description of
package org.apache.derby.mbeans
)
If a security manager is installed, accessing attributes and operations of
this MBean may require a
SystemPermission
; see individual method
documentation for details.
For more information on Managed Beans, refer to the JMX specification.
NetworkServerControl
,
SystemPermission
,
org.apache.derby.mbeans
| Modifier and Type | Method and Description |
|---|---|
int
|
getAccumulatedConnectionCount
()
Gets the accumulated number of connections.
|
int
|
getActiveConnectionCount
()
Gets the number of currently active connections.
|
long
|
getBytesReceived
()
Gets the total number of bytes read by the server since it was started.
|
int
|
getBytesReceivedPerSecond
()
Gets the number of bytes received per second by the Network
Server.
|
long
|
getBytesSent
()
Gets the total number of bytes written by the server since it was
started.
|
int
|
getBytesSentPerSecond
()
Gets the number of bytes sent per second by the Network Server.
|
int
|
getConnectionCount
()
Gets the total number of current connections (waiting or active) to the
Network Server.
|
int
|
getConnectionThreadPoolSize
()
Get the size of the connection thread pool.
|
java.lang.String
|
getDrdaHost
()
Gets the network interface address on which the Network Server is
listening.
|
boolean
|
getDrdaKeepAlive
()
Reports whether or not the Derby Network Server will send keepalive
probes and attempt to clean up connections for disconnected clients (the
value of the
derby.drda.keepAlive
property).
|
int
|
getDrdaMaxThreads
()
Reports the maximum number of client connection threads the Network
Server will allocate at any given time.
|
int
|
getDrdaPortNumber
()
Gets the port number on which the Network Server is listening for client
connections.
|
java.lang.String
|
getDrdaSecurityMechanism
()
The Derby security mechanism required by the Network Server for all
client connections.
|
java.lang.String
|
getDrdaSslMode
()
Reports whether client connections must be encrypted using Secure
Sockets Layer (SSL), and whether certificate based peer authentication
is enabled.
|
int
|
getDrdaStreamOutBufferSize
()
The size of the buffer used for streaming BLOB and CLOB from server to
client.
|
int
|
getDrdaTimeSlice
()
If the server property
derby.drda.maxThreads
is set to a
non-zero value, this is the number of milliseconds that each client
connection will actively use in the Network Server before yielding to
another connection.
|
boolean
|
getDrdaTraceAll
()
Whether server-side tracing is enabled for all client connections
(sessions).
|
java.lang.String
|
getDrdaTraceDirectory
()
Indicates the location of tracing files on the server host, if server
tracing has been enabled.
|
long
|
getStartTime
()
Gets the start time of the network server.
|
long
|
getUptime
()
Gets the time (in milliseconds) the Network Server has been running.
|
int
|
getWaitingConnectionCount
()
Gets the number of currently waiting connections.
|
void
|
ping
()
Executes the network server's
ping
command.
|
java.lang.String getDrdaHost()
Gets the network interface address on which the Network Server is
listening. This corresponds to the value of the
derby.drda.host
property.
For example, the value "
localhost
" means that the
Network Server is listening on the local loopback interface only.
The special value "
<IP_ADDRESS>
" (IPv4 environments only)
represents the "unspecified address" - also known as the anylocal or
wildcard address. In this context this means that the server is
listening on all network interfaces (and may thus be able to see
connections from both the local host as well as remote hosts, depending
on which network interfaces are available).
Requires
SystemPermission("server", "control")
if a security
manager is installed.
derby.drda.host
)
boolean getDrdaKeepAlive()
Reports whether or not the Derby Network Server will send keepalive
probes and attempt to clean up connections for disconnected clients (the
value of the
derby.drda.keepAlive
property).
If
true
, a keepalive probe is sent to the client if a "long
time" (by default, more than two hours) passes with no other data being
sent or received. This will detect and clean up connections for clients
on powered-off machines or clients that have disconnected unexpectedly.
If false, Derby will not attempt to clean up connections from disconnected clients, and will not send keepalive probes.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
derby.drda.keepAlive
)
derby.drda.keepAlive
documentation
int getDrdaMaxThreads()
Reports the maximum number of client connection threads the Network
Server will allocate at any given time. This corresponds to the
derby.drda.maxThreads
property.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
derby.drda.maxThreads
)
int getDrdaPortNumber()
Gets the port number on which the Network Server is listening for client
connections. This corresponds to the value of the
derby.drda.portNumber
Network Server setting.
Requires
SystemPermission("server", "control")
if a security
manager is installed.
java.lang.String getDrdaSecurityMechanism()
The Derby security mechanism required by the Network Server for all
client connections. This corresponds to the value of the
derby.drda.securityMechanism
property on the server.
If not set, the empty String will be returned, which means that the Network Server accepts any connection which uses a valid security mechanism.
For a list of valid security mechanisms, refer to the
documentation for the
derby.drda.securityMechanism
property
in the
Derby Server and Administration Guide
.
Requires
SystemPermission("server", "control")
if a security
manager is installed.
derby.drda.securityMechanism
)
java.lang.String getDrdaSslMode()
Reports whether client connections must be encrypted using Secure
Sockets Layer (SSL), and whether certificate based peer authentication
is enabled. Refers to the
derby.drda.sslMode
property.
Peer authentication means that the other side of the SSL connection is authenticated based on a trusted certificate installed locally.
The value returned is one of "
off
" (no SSL encryption),
"
basic
" (SSL encryption, no peer authentication) and
"
peerAuthentication
" (SSL encryption and peer
authentication). Refer to the
Derby Server and Administration
Guide
for more details.
Requires
SystemPermission("server", "control")
if a security
manager is installed.
derby.drda.sslMode
)
int getDrdaStreamOutBufferSize()
The size of the buffer used for streaming BLOB and CLOB from server to
client. Refers to the
derby.drda.streamOutBufferSize
property.
This setting may improve streaming performance when the default sizes of packets being sent are significantly smaller than the maximum allowed packet size in the network.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
derby.drda.streamOutBufferSize
)
int getDrdaTimeSlice()
If the server property
derby.drda.maxThreads
is set to a
non-zero value, this is the number of milliseconds that each client
connection will actively use in the Network Server before yielding to
another connection. If this value is 0, a waiting connection will become
active once a currently active connection is closed.
Refers to the
derby.drda.timeSlice
server property.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
derby.drda.timeSlice
)
getDrdaMaxThreads()
boolean getDrdaTraceAll()
Whether server-side tracing is enabled for all client connections
(sessions). Refers to the
derby.drda.traceAll
server
property.
Tracing may for example be useful when providing technical support information. The Network Server also supports tracing for individual connections (sessions), see the Derby Server and Administration Guide ("Controlling tracing by using the trace facility") for details.
When tracing is enabled, tracing information from each client connection will be written to a separate trace file.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
derby.drda.traceAll
)
getDrdaTraceDirectory()
java.lang.String getDrdaTraceDirectory()
Indicates the location of tracing files on the server host, if server tracing has been enabled.
If the server setting
derby.drda.traceDirectory
is set,
its value will be returned. Otherwise, the Network Server's default
values will be taken into account when producing the result.
Requires
SystemPermission("server", "control")
if a security
manager is installed.
getDrdaTraceAll()
int getConnectionCount()
Gets the total number of current connections (waiting or active) to the Network Server.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
getActiveConnectionCount()
,
getWaitingConnectionCount()
int getActiveConnectionCount()
Gets the number of currently active connections. All connections are
active if the DrdaMaxThreads attribute (
derby.drda.maxThreads
property) is 0.
If DrdaMaxThreads is > 0 and DrdaTimeSlice is 0, connections remain active until they are closed. If there are more than DrdaMaxThreads connections, inactive connections will be waiting for some active connection to close. The connection request will return when the connection becomes active.
If DrdaMaxThreads is > 0 and DrdaTimeSlice > 0, connections will be alternating beetween active and waiting according to Derby's time slicing algorithm.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
getDrdaMaxThreads()
,
getDrdaTimeSlice()
,
getWaitingConnectionCount()
int getWaitingConnectionCount()
Gets the number of currently waiting connections. This number will always be 0 if DrdaMaxThreads is 0. Otherwise, if the total number of connections is less than or equal to DrdaMaxThreads, then no connections are waiting.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
getActiveConnectionCount()
,
getDrdaMaxThreads()
,
getDrdaTimeSlice()
int getConnectionThreadPoolSize()
Get the size of the connection thread pool. If DrdaMaxThreads
(
derby.drda.maxThreads
) is set to a non-zero value, the size
of the thread pool will not exceed this value.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
getDrdaMaxThreads()
int getAccumulatedConnectionCount()
Gets the accumulated number of connections. This includes all active and waiting connections since the Network Server was started. This number will not decrease as long as the Network Server is running.
Require
SystemPermission("server", "monitor")
if a security
manager is installed.
long getBytesReceived()
Gets the total number of bytes read by the server since it was started.
Require
SystemPermission("server", "monitor")
if a security
manager is installed.
long getBytesSent()
Gets the total number of bytes written by the server since it was started.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
int getBytesReceivedPerSecond()
Gets the number of bytes received per second by the Network Server. This number is calculated by taking into account the number of bytes received since the last calculation (or since MBean startup if it is the first time this attibute is being read).
The shortest interval measured is 1 second. This means that a new value will not be calculated unless there has been at least 1 second since the last calculation.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
int getBytesSentPerSecond()
Gets the number of bytes sent per second by the Network Server. This number is calculated by taking into account the number of bytes sent since the last calculation (or since MBean startup if it is the first time this attibute is being read).
The shortest interval measured is 1 second. This means that a new value will not be calculated unless there has been at least 1 second since the last calculation.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
long getStartTime()
Gets the start time of the network server. The time is reported as
the number of milliseconds (ms) since Unix epoch (1970-01-01 00:00:00
UTC), and corresponds to the value of
java.lang.System#currentTimeMillis()
at the time the
Network Server was started.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
System.currentTimeMillis()
long getUptime()
Gets the time (in milliseconds) the Network Server has been running. In other words, the time passed since the server was started.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
getStartTime()
void ping() throws java.lang.Exception
Executes the network server's
ping
command.
Returns without errors if the server was successfully pinged.
Note that the
ping
command itself will be executed from the
network server instance that is actually running the server, and that the
result will be transferred via JMX to the JMX client invoking this
operation.
This means that this operation will test network server connectivity
from the same host (machine) as the network server, as opposed to when
the
ping
command (or method) of
NetworkServerControl
is executed from a remote machine.
This operation requires the following permission to be granted to the network server code base if a Java security manager is installed in the server JVM:
permission java.net.SocketPermission "*", "connect,resolve";
The value
"*"
will allow connections from the network
server to any host and any port, and may be replaced with a more specific
value if so desired. The required value will depend on the value of the
-h
(or
derby.drda.host
) (host) and
-p
(or
derby.drda.portNumber
) (port) settings
of the Network Server.
Requires
SystemPermission("server", "monitor")
if a security
manager is installed.
java.lang.Exception
- if the ping attempt fails (an indication that
the network server is not running properly)
NetworkServerControl.ping()
,
SocketPermission
Apache Derby 10.9 API Documentation - Copyright © 2004,2012 The Apache Software Foundation. All Rights Reserved.


<p>
Simple HTML Portfolio Template is an Open Source page to create an easy site for your work. No fluff or unnecessary code bloat. It's minimal and built to be easily customized and maintained. Visit Github to get the template and start making it your own. Watch the tutorial video for a quick explanation on what does what.
I'm making this template Open Source because I want to empower creatives to support themselves. I hope it helps make your first impression for your followers most triumphant! If you have any questions, suggestions, or feedback please send them my way. This is as much for me as it is for you. If you use it, send me a link! I'd love to see your work.
Enjoy!
- Nick Culbertson
@MobyPixel
• Clean Mobile-First Design
• Attractive Social Media Embeds
• Supports Light & Dark Mode
• Easy to Use
• Fully Customizable & Open Source
Tap the email address to send a message. We look forward to hearing from you.


██╗ ██╗ ██████╗ ██╗ ██╗
██║ ██║██╔═████╗██║ ██║
███████║██║██╔██║███████║
╚════██║████╔╝██║╚════██║
██║╚██████╔╝ ██║
╚═╝ ╚═════╝ ╚═╝
File not Found
(\_/)
(='.'=)
('')('')
On this the White Rabbit blew three blasts on the trumpet,
and then unrolled the parchment scroll, and read as follows:
‘The Queen of Hearts, she made some tarts,
All on a summer day:
The Knave of Hearts, he stole those tarts,
And took them quite away!’
Alice's Adventures in Wonderland, Lewis Carroll


Classes
The following classes are available globally.
-
StraaS.io CirCall manager
See moreDeclaration
Objective-C
@interface STSCircallManager : NSObject
Swift
class STSCircallManager : NSObject
-
An object that displays the video content from a stream object.
See moreDeclaration
Objective-C
@interface STSCircallPlayerView : UIView
Swift
class STSCircallPlayerView
-
Configs for publishing the local stream.
See moreDeclaration
Objective-C
@interface STSCircallPublishConfig : NSObject
Swift
class STSCircallPublishConfig : NSObject
-
Configs for publishing the stream from url(RTSP).
See moreDeclaration
Objective-C
@interface STSCircallPublishWithUrlConfig : NSObject
Swift
class STSCircallPublishWithUrlConfig : NSObject
-
The CirCall stream.
See moreDeclaration
Objective-C
@interface STSCircallStream : NSObject
Swift
class STSCircallStream : NSObject
-
Configs for preparing a local stream.
See moreDeclaration
Objective-C
@interface STSCircallStreamConfig : NSObject
Swift
class STSCircallStreamConfig : NSObject
-
LIVEhouse.in data model base class
See moreDeclaration
Objective-C
@interface LHDataObject : NSObject
Swift
class LHDataObject : NSObject


Elon Musk
The man who is changing the world.
Here's a timeline of Elon Musk's life:
- June 28, 1971 - Born in Pretoria, South Africa
- 1980 - Parents Divorce
- 1981 - Interest in Computing
- 1983 - Sold his first video game, Blastar
- June 1989 Moved to Canada to attend Queen's University
- 1992 - Went to University of Pennsylvania to Study Business and Physics
- 1995 - Started Zip2, a Web Software Company
- February 1999 - Sold Zip2 to Compaq for US$307 million
- March 1999 - Cofounded X.com, a financial service and payment company
- 2000 - X.com merged with Confinity to form PayPal, Musk married his first wife
- October 2000 - Musk got Fired from PayPal
- 2001 - Interest in Space Exploration
- October 2001 - Went to Moscow to buy ICBMs to send payloads to Mars
- February 2002 - Got an idea to build affordable Rockets University
- May 2002 - Founded SpaceX, a space exploration company
- October 2002 - eBay acquired PayPal
- July 2003 - Tesla, Inc was incorporated
- 2004 - Musk's wife gave birth to twin sons
- February 2004 - Musk joined Tesla
- 2006 - Musk's wife gave birth to triplets, Cofounded SolarCity and SpaceX Success
- 2007 - Musk became the CEO of Tesla
- 2008 - Musk and Wife, Justine Separated
- 2010 - Musk married his second wife, Talulah Riley
- 2010 - Donated a 25-kW Solar power system
- 2011 - Expressed his hope to send human to Mars
- July 2011 - Donated US$250,000 to Japan
- 2012 - Announced SolarCity and Tesla Collaboration
- May 25, 2012 - SpaceX's vehicle docked with ISS for the first time
- 2013 - SolarCity became the second largest solar power provider
- May 2013 - Withdrew his support on the U.S. political action committee (PAC)
- August 12, 2013 - Unveiled a concept for a high-speed transportation system
- 2014 - Announced Open-Sourcing Tesla Technology
- June 17, 2014 - Committed to building a SolarCity advanced production facility in Buffalo
- January 2015 - Made a cameo in The Simpsons episode
- January 2015 - Donated US$10 million to the Future of Life Institute
- June 2015 - Announced Hyperloop design competition
- November 2015 - Made a cameo in The Big Bang Theory episode
- December 2015 - Announced creation on OpenAi, Artificial Intelligence company
- 2016 - Dating, SolarCity Acquisition, Neuralink
- September 2016 - Revealed Mars colonization exploration architecture details
- May 12, 2017 - Hyperloop One announced first successful test run
- July 2017 - Purchased x.com domain from PayPal
- 2018 - Left the OpenAI board
- May 7, 2018 - Musk and Grimes announced that they were dating
- July 2018 - Attempted to provide assistance to rescuers during the Tham Luang cave rescue
- September 2018 - Charged by the U.S Exchange Commission for a false tweet on taking Tesla private
- September 2018 - Warned about the dangers of AI
- September 2018 - Appeared puffing from a cannabis-laced cigarette
- October 2018 - Donated over $480,000 to install new water fountains at all Flint, Michigan schools.
- October 2018 - Filed an 'intent to use' trademark application for Teslaquila
- January 2019 - Traveled to China for the groundbreaking of Tesla's Shanghai Gigafactory
- Present - Still working on to make this world a better place
"When something is important enough, you do it even if the odds are not in your favor."
-- Elon Musk


Participants Experience
What is GirlScript Summer of Code? GSSoC is only for Girls?
Sanskriti
Read Blog
My experience in GSSOC’21 | Kickstart to Open Source
Chirag Agrawal
Read Blog
GirlScript Summer Of Code 2021 !! First Open Source Program !!
Rohan Kulkarni
Read Blog
My first Open Source Contribution – GirlScript Summer of Code
Srishti Arya
Read Blog
First steps in GirlScript Summer of Code'21
Vybhav72954
Read Blog
As a participant of GSSoC '21
Himanshu Singh
Read Blog
Kickstart to Open Source | GSSoC ’21
Raveena Bhasin
Read Blog


This specification defines asm.js, a strict subset of JavaScript that can be used as a low-level, efficient target language for compilers. This sublanguage effectively describes a sandboxed virtual machine for memory-unsafe languages like C or C++. A combination of static and dynamic validation allows JavaScript engines to employ an ahead-of-time (AOT) optimizing compilation strategy for valid asm.js code.
This specification is working towards a candidate draft for asm.js version 1. Mozilla's SpiderMonkey JavaScript engine provides an optimizing implementation of this draft.
case
and default
validation rules
mut
doublish
to double?
for symmetry with float?
Math.fround
and singleton fround
type
float
support for operators and Math
functions
float
to legal result types for ConditionalExpression
Math.min
and Math.max
Math.abs
is signed
unsigned
is not an extern
type
!
operator to UnaryExpression operators
~~
to Unary Operators section
-NumericLiteral
cases everywhere
unknown
, which is no longer needed
%
is intish
This specification defines asm.js, a strict subset of JavaScript that can be used as a low-level, efficient target language for compilers. The asm.js language provides an abstraction similar to the C/C++ virtual machine: a large binary heap with efficient loads and stores, integer and floating-point arithmetic, first-order function definitions, and function pointers.
The asm.js programming model is built around integer and floating-point arithmetic and a virtual heap represented as a typed array. While JavaScript does not directly provide constructs for dealing with integers, they can be emulated using two tricks:
As an example of the former, if we have
an Int32Array
view of the heap called HEAP32
, then we can load the
32-bit integer at byte offset p
:
HEAP32[p >> 2]|0
The shift converts the byte offset to a 32-bit element offset, and
the bitwise coercion ensures that an out-of-bounds access is coerced
from undefined
back to an integer.
As an example of integer arithmetic, addition can be performed by taking two integer values, adding them with the built-in addition operator, and coercing the result back to an integer via the bitwise or operator:
(x+y)|0
This programming model is directly inspired by the techniques pioneered by the Emscripten and Mandreel compilers.
The asm.js sub-language is defined by a static type system that can be checked at JavaScript parse time. Validation of asm.js code is designed to be "pay-as-you-go" in that it is never performed on code that does not request it. An asm.js module requests validation by means of a special prologue directive, similar to that of ECMAScript Edition 5's strict mode:
function MyAsmModule() { "use asm"; // module body }
This explicit directive allows JavaScript engines to avoid performing pointless and potentially costly validation on other JavaScript code, and to report validation errors in developer consoles only where relevant.
Because asm.js is a strict subset of JavaScript, this specification only defines the validation logic—the execution semantics is simply that of JavaScript. However, validated asm.js is amenable to ahead-of-time (AOT) compilation. Moreover, the code generated by an AOT compiler can be quite efficient, featuring:
Code that fails to validate must fall back to execution by traditional means, e.g., interpretation and/or just-in-time (JIT) compilation.
Using an asm.js module requires calling its function to obtain an object containing the module's exports; this is known as linking. An asm.js module can also be given access to standard libraries and custom JavaScript functions through linking. An AOT implementation must perform certain dynamic checks to check compile-time assumptions about the linked libraries in order to make use of the compiled code.
This figure depicts a simple architecture of an AOT implementation that otherwise employs a simple interpreter. If either dynamic or static validation fails, the implementation must fall back to the interpreter. But if both validations succeed, calling the module exports executes the binary executable code generated by AOT compilation.
Within an asm.js module, all code is fully statically typed and limited to the very restrictive asm.js dialect. However, it is possible to interact with recognized standard JavaScript libraries and even custom dynamic JavaScript functions.
An asm.js module can take up to three optional parameters, providing access to external JavaScript code and data:
ArrayBuffer
to act as the asm.js heap.
These objects allow asm.js to call into external JavaScript (and to share its heap buffer with external JavaScript). Conversely, the exports object returned from the module allows external JavaScript to call into asm.js.
So in the general case, an asm.js module declaration looks like:
function MyAsmModule(stdlib, foreign, heap) { "use asm"; // module body... return { export1: f1, export2: f2, // ... }; }
Function parameters in asm.js are provided a type annotation by means of an explicit coercion on function entry:
function geometricMean(start, end) { start = start|0; // start has type int end = end|0; // end has type int return +exp(+logSum(start, end) / +((end - start)|0)); }
These annotations serve two purposes: first, to provide the function's type signature so that the validator can enforce that all calls to the function are well-typed; second, to ensure that even if the function is exported and called by external JavaScript, its arguments are dynamically coerced to the expected type. This ensures that an AOT implementation can use unboxed value representations, knowing that once the dynamic coercions have completed, the function body never needs any runtime type checks.
The following is a small but complete example of an asm.js module.
function GeometricMean(stdlib, foreign, buffer) { "use asm"; var exp = stdlib.Math.exp; var log = stdlib.Math.log; var values = new stdlib.Float64Array(buffer); function logSum(start, end) { start = start|0; end = end|0; var sum = 0.0, p = 0, q = 0; // asm.js forces byte addressing of the heap by requiring shifting by 3 for (p = start << 3, q = end << 3; (p|0) < (q|0); p = (p + 8)|0) { sum = sum + +log(values[p>>3]); } return +sum; } function geometricMean(start, end) { start = start|0; end = end|0; return +exp(+logSum(start, end) / +((end - start)|0)); } return { geometricMean: geometricMean }; }
In a JavaScript engine that supports AOT compilation of asm.js, calling the module on a proper global object and heap buffer would link the exports object to use the statically compiled functions.
var heap = new ArrayBuffer(0x10000); // 64k heap init(heap, START, END); // fill a region with input values var fast = GeometricMean(window, null, heap); // produce exports object linked to AOT-compiled code fast.geometricMean(START, END); // computes geometric mean of input values
By contrast, calling the module on a standard library object
containing something other than the true Math.exp
or
Math.log
would fail to produce AOT-compiled code:
var bogusGlobal = { Math: { exp: function(x) { return x; }, log: function(x) { return x; } }, Float64Array: Float64Array }; var slow = GeometricMean(bogusGlobal, null, heap); // produces purely-interpreted/JITted version console.log(slow.geometricMean(START, END)); // computes bizarro-geometric mean thanks to bogusGlobal
Validation of an asm.js module relies on a static type system that classifies and constrains the syntax. This section defines the types used by the validation logic.
Validation in asm.js limits JavaScript programs to only use operations that can be mapped closely to efficient data representations and machine operations of modern architectures, such as 32-bit integers and integer arithmetic.
The types of asm.js values are inter-related by a subtyping relation, which can be represented pictorially:
The light boxes represent arbitrary JavaScript values that may flow freely between asm.js code and external JavaScript code.
The dark boxes represent types that are disallowed from escaping into external (i.e., non-asm.js) JavaScript code. (These values can be given efficient, unboxed representations in optimized asm.js implementations that would be unsound if they were allowed to escape.)
The meta-variables σ and τ are used to stand for value types.
The void
type is the type of functions that
are not supposed to return any useful value. As JavaScript functions,
they produce the undefined
value, but asm.js code is not
allowed to make use of this value; functions with return
type void
can only be called for effect.
The double
type is the type of ordinary
JavaScript double-precision floating-point numbers.
The signed
type is the type of signed
32-bit integers. While there is no direct concept of integers in
JavaScript, 32-bit integers can be represented as doubles, and integer
operations can be performed with JavaScript arithmetic, relational,
and bitwise operators.
The unsigned
type is the type of unsigned
32-bit integers. Again, these are not a first-class concept in
JavaScript, but can be represented as floating-point numbers.
The int
type is the type of 32-bit integers
where the signedness is not known. In asm.js, the type of a variable
never has a known signedness. This allows them to be compiled as
32-bit integer registers and memory words. However, this
representation creates an overlap between signed and unsigned numbers
that causes an ambiguity in determining which JavaScript number they
represent. For example, the bit pattern 0xffffffff
could
represent<PHONE_NUMBER> or -1, depending on the signedness. For this
reason, values of the int
type are disallowed from
escaping into external (non-asm.js) JavaScript code.
The fixnum
type is the type of integers in the
range [0, 231)—that is, the range of integers such
that an unboxed 32-bit representation has the same value whether it is
interpreted as signed or unsigned.
Even though JavaScript only supports floating-point arithmetic, most operations can simulate integer arithmetic by coercing their result to an integer. For example, adding two integers may overflow beyond the 32-bit range, but coercing the result back to an integer produces the same 32-bit integer as integer addition in, say, C.
The intish
type represents the result of a
JavaScript integer operation that must be coerced back to an integer
with an explicit coercion
(ToInt32
for signed integers
and ToUint32
for unsigned integers). Validation requires all intish
values to be immediately passed to an operator or standard library
that performs the appropriate coercion or else dropped via an
expression statement. This way, each integer operation can be
compiled directly to machine operations.
The one operator that does not support this approach is
multiplication. (Multiplying two large integers can result in a large
enough double that some lower bits of precision are lost.) So asm.js
does not support applying the multiplication operator to integer
operands. Instead, the
proposed Math.imul
function is recommended as the proper means of implementing integer
multiplication.
The double?
type represents operations that
are expected to produce a double
but may also produce
undefined
, and so must be coerced back to a number
via ToNumber.
Specifically, reading out of bounds from a typed array
produces undefined
.
The float
type is the type of 32-bit
floating-point numbers.
The float?
type represents operations that
are expected to produce a float
but, similar
to double?
, may also produce undefined
and
so must be coerced back to a 32-bit floating point number
via fround.
Specifically, reading out of bounds from a typed array
produces undefined
.
Similar to integers, JavaScript can almost support 32-bit floating-point arithmetic, but requires extra coercions to properly emulate the 32-bit semantics. As proved in When is double rounding innocuous? (Figueroa 1995), both the 32- and 64-bit versions of standard arithmetic operations produce equivalent results when given 32-bit inputs and coerced to 32-bit outputs.
The floatish
type,
like intish
, represents the result of a JavaScript 32-bit
floating-point operations that must be coerced back to a 32-bit
floating-point value with an
explicit fround
coercion. Validation requires all floatish
values to be
immediately passed to an operator or standard library that performs
the appropriate coercion or else dropped via an expression
statement. This way, each 32-bit floating-point operation can be
compiled
directly to machine operations.
extern
type represents the root
of all types that can escape back into external JavaScript—in
other words, the light boxes in the above diagram.
Variables and functions defined at the top-level scope of an asm.js module can have additional types beyond the value types. These include:
ArrayBufferView
types IntnArray
, UintnArray
, and FloatnArray
;
…
) → τ) ∧ … ∧ ((σ′, σ′…
) → τ′);
fround
of Math.fround
; and
Function
.
The "∧" notation for function types serves to represent
overloaded functions and operators. For example,
the Math.abs
function is
overloaded to accept either integers or floating-point numbers, and
returns a different type in each case. Similarly, many of
the operators have overloaded types.
The meta-variable γ is used to stand for global types.
Validating an asm.js module depends on tracking contextual information about the set of definitions and variables in scope. This section defines the environments used by the validation logic.
An asm.js module is validated in the context of a global environment. The global environment maps each global variable to its type as well as indicating whether the variable is mutable:
The meta-variable Δ is used to stand for a global environment.
In addition to the global environment, each function body in an asm.js module is validated in the context of a variable environment. The variable environment maps each function parameter and local variable to its value type:
{ x : τ, … }
The meta-variable Γ is used to stand for a variable environment.
Looking up a variable's type
is defined by:
mut
γ or x : imm
γ
occurs in Δ
If x does not occur in either environment then the Lookup function has no result.
Validation of an asm.js module is specified by reference to the ECMAScript grammar, but conceptually operates at the level of abstract syntax. In particular, an asm.js validator must obey the following rules:
;
) are always ignored, whether in
the top level of a module or inside an asm.js function body.
eval
or arguments
.
These rules are otherwise left implicit in the rest of the specification.
All variables in asm.js are explicitly annotated with type information so that their type can be statically enforced by validation.
Every parameter in an asm.js function is provided with an explicit
type annotation in the form of a coercion. This coercion serves two
purposes: the first is to make the parameter type statically apparent
for validation; the second is to ensure that if the function is
exported, the arguments dynamically provided by external JavaScript
callers are coerced to the expected type. For example, a bitwise OR
coercion annotates a parameter as having type int
:
function add1(x) { x = x|0; // x : int return (x+1)|0; }
In an AOT implementation, the body of the function can be
implemented fully optimized, and the function can be given two entry
points: an internal entry point for asm.js callers, which are
statically known to provide the proper type, and an external dynamic
entry point for JavaScript callers, which must perform the full
coercions (which might involve arbitrary JavaScript computation, e.g.,
via implicit calls to valueOf
).
There are three recognized parameter type annotations:
=
x:Identifier|0;
=
+
x:Identifier;
=
f:Identifier(
x:Identifier);
The first form annotates a parameter as type int
, the
second as type double
, and the third as
type float
. In the latter case,
Lookup(Δ, Γ, f) must
be fround
.
An asm.js function's formal return type is determined by
the last statement in the function body, which for
non-void
functions is required to be
a ReturnStatement. This distinguished return statement may
take one of five forms:
return +
e:Expression;
return
e:Expression|0;
return
n:-
NumericLiteral;
return
f:Identifier(
arg:Expression);
return;
The first form has return type double
. The second has
type signed
. The third has return
type double
if n is composed of a floating-point
literal, i.e., a numeric literal with the character .
in
its source; alternatively, if n is composed of an integer
literal and has its value in the range [-231,
231), the return statement has return
type signed
. The fourth form has return
type float
, and the fifth has return
type void
.
If the last statement in the function body is not
a ReturnStatement, or if the function body has no non-empty
statements (other than the initial declarations and
coercions—see Function
Declarations), the function's return type is void
.
The type of a function declaration
function
f:Identifier(
x:Identifier…) {
x:Identifier =
AssignmentExpression;
…
var
y:Identifier =
-
NumericLiteral Identifier(
-
NumericLiteral)
,
… …
body:Statement…}
is (σ,…) → τ where σ,… are the
types of the parameters, as provided by
the parameter type
annotations, and τ is the formal return type, as provided by
the return type annotation. The
variable f is stored in
the global environment with
type imm
(σ,…) → τ.
The types of variable declarations are determined by their initializer, which may take one of two forms:
-
NumericLiteral(
n:-
NumericLiteral)
In the first case, the variable type is double
if n's source contains the character .
;
otherwise n may be an integer literal in the range
[-231, 232), in which case the variable type
is int
.
In the second case, the variable type
is float
. Lookup(Δ, Γ, f)
must be fround
and n must be a floating-point
literal with the character .
in its source.
A global variable declaration is a VariableStatement node in one of several allowed forms. Validating global variable annotations takes a Δ as input and produces as output a new Δ′ by adding the variable binding to Δ.
A global program variable is initialized to a literal:
var
x:Identifier =
n:-
NumericLiteral;
var
x:Identifier =
f:Identifier(
n:-
NumericLiteral);
The global variable x is stored in
the global environment with
type mut
τ, where τ is determined in the same way
as local variable type
annotations.
A standard library import is of one of the following two forms:
var
x:Identifier =
stdlib:Identifier.
y:Identifier;
var
x:Identifier =
stdlib:Identifier.Math.
y:Identifier;
The variable stdlib must match the first parameter of
the module declaration. The global
variable x is stored in
the global environment with
type imm
γ, where γ is the type of
library y or Math.
y as specified by
the standard library types.
A foreign import is of one of the following three forms:
var
x:Identifier =
foreign:Identifier.
y:Identifier;
var
x:Identifier =
foreign:Identifier.
y:Identifier|0;
var
x:Identifier =
+
foreign:Identifier.
y:Identifier;
The variable foreign must match the second parameter of
the module declaration. The global
variable x is stored in
the global environment with
type imm Function
for the first form, mut
int
for the second, and mut double
for the third.
A global heap view is of the following form:
var
x:Identifier = new
stdlib:Identifier.
view:Identifier(
heap:Identifier);
The variable stdlib must match the first parameter of
the module declaration and the
variable heap must match the third. The
identifier view must be one of the
standard ArrayBufferView
type names. The global variable x is stored in
the global environment with
type imm
view.
A function table is a VariableStatement of the form:
var
x:Identifier = [
f0:Identifier,
f:Identifier,
…];
The function table x is stored in
the global environment with
type imm
((σ,…) → τ)[n]
where (σ,…) → τ is the type of f in the
global environment and n is the length of the array literal.
To ensure that a JavaScript function is a proper asm.js module, it must first be statically validated. This section specifies the validation rules. The rules operate on JavaScript abstract syntax, i.e., the output of a JavaScript parser. The non-terminals refer to parse nodes defined by productions in the ECMAScript grammar, but note that the asm.js validator only accepts a subset of legal JavaScript programs.
The result of a validation operation is either a success, indicating that a parse node is statically valid asm.js, or a failure, indicating that the parse node is statically invalid asm.js.
The ValidateModule rule validates an asm.js module, which is either a FunctionDeclaration or FunctionExpression node.
Validating a module of the form
function
f:Identifieropt(
stdlib:Identifier
foreign:Identifier ,,
heap:Identifier opt opt opt) {
"use asm";
var:VariableStatement…
fun:FunctionDeclaration…
table:VariableStatement…
exports:ReturnStatement}
succeeds if:
The ValidateExport rule validates an asm.js module's export declaration. An export declaration is a ReturnStatement returning either a single asm.js function or an object literal exporting multiple asm.js functions.
Validating an export declaration node
return
{
x:Identifier :
f:Identifier,
… };
succeeds if for each f, Δ(f) = imm
γ where γ is a function type (σ,…) →
τ.
Validating an export declaration node
return
f:Identifier;
succeeds if Δ(f) = imm
γ where
γ is a function type (σ,…) → τ.
The ValidateFunctionTable rule validates an asm.js module's function table declaration. A function table declaration is a VariableStatement binding an identifier to an array literal.
Validating a function table of the form
var
x:Identifier = [
f:Identifier,
…];
succeeds if:
imm
((σ,…) → τ)[n]; and
The ValidateFunction rule validates an asm.js function declaration, which is a FunctionDeclaration node.
Validating a function declaration of the form
function
f:Identifier(
x:Identifier,
…) {
x:Identifier =
AssignmentExpression;
…
var
y:Identifier =
-
NumericLiteral Identifier(
-
NumericLiteral)
,
… …
body:Statement…}
succeeds if:
imm
(σ,…) → τ;
The ValidateStatement rule validates an asm.js statement. Each statement is validated in the context of a global environment Δ, a variable environment Γ, and an expected return type τ. Unless otherwise explicitly stated, a recursive validation of a subterm uses the same context as its containing term.
Validating a Block statement node
{
stmt:Statement… }
succeeds if ValidateStatement succeeds for each stmt.
Validating an ExpressionStatement node
;
succeeds if ValidateCall
succeeds for cexpr with actual return type void
.
Validating an ExpressionStatement node
;
succeeds if ValidateExpression succeeds for expr with some type σ.
Validating an EmptyStatement node always succeeds.
Validating an IfStatement node
if (
expr:Expression )
stmt1:Statement else
stmt2:Statement
succeeds
if ValidateExpression
succeeds for expr with a subtype of int
and ValidateStatement
succeeds for stmt1 and stmt2.
Validating an IfStatement node
if (
expr:Expression )
stmt:Statement
succeeds
if ValidateExpression
succeeds for expr with a subtype of int
and ValidateStatement
succeeds for stmt.
Validating a ReturnStatement node
return
expr:Expression ;
succeeds if ValidateExpression succeeds for expr with a subtype of the expected return type τ.
Validating a ReturnStatement node
return ;
succeeds if the expected return type τ is void
.
Validating an IterationStatement node
while (
expr:Expression )
stmt:Statement
succeeds
if ValidateExpression
succeeds for expr with a subtype of int
and ValidateStatement
succeeds for stmt.
Validating an IterationStatement node
do
stmt:Statement while (
expr:Expression ) ;
succeeds
if ValidateStatement
succeeds for stmt
and ValidateExpression
succeeds for expr with a subtype of int
.
Validate an IterationStatement node
for (
init:ExpressionNoInopt ;
test:Expressionopt ;
update:Expressionopt )
body:Statement
succeeds if:
int
(if
present);
Validating a BreakStatement node
break
Identifieropt ;
always succeeds.
Validating a ContinueStatement node
continue
Identifieropt ;
always succeeds.
Validating a LabelledStatement node
:
body:Statement
succeeds if ValidateStatement succeeds for body.
Validating a SwitchStatement node
switch (
test:Expression )
{
case:CaseClause… default:DefaultClauseopt }
succeeds if
signed
;
Cases in a switch
block are validated in the context
of a global environment Δ, a variable
environment Γ, and an expected return type τ. Unless
otherwise explicitly stated, a recursive validation of a subterm uses
the same context as its containing term.
Validating a CaseClause node
case
n:-
NumericLiteral :
stmt:Statement…
succeeds if
.
character;
The default case in a switch
block is validated in the
context of a global environment Δ, a variable
environment Γ, and an expected return type τ. Unless
otherwise explicitly stated, a recursive validation of a subterm uses
the same context as its containing term.
Validating a DefaultClause node
default :
stmt:Statement…
succeeds if ValidateStatement succeeds for each stmt.
Each expression is validated in the context of a global environment Δ and a variable environment Γ, and validation produces the type of the expression as a result. Unless otherwise explicitly stated, a recursive validation of a subterm uses the same context as its containing term.
Validating an Expression node
,
… ,
exprn:AssignmentExpression
succeeds with type τ if for every i < n, one of the following conditions holds:
void
; or
and ValidateExpression succeeds for exprn with type τ.
Validating a NumericLiteral node
double
if the source contains a .
character; or
validates as type double
;
fixnum
if the source does not contain a .
character and its numeric value is in the range [0, 231); or
unsigned
if the source does not contain a .
character and its numeric value is in the range [231, 232).
Note that the case of negative integer constants is handled under UnaryExpression.
Note that integer literals outside the range [0, 232) are invalid, i.e., fail to validate.
Validating an Identifier node
succeeds with type τ if Lookup(Δ, Γ, x) = τ.
Validating a CallExpression node succeeds with
type float
if ValidateFloatCoercion
succeeds.
Validating a MemberExpression node succeeds with type τ if ValidateHeapAccess succeeds with load type τ.
Validating an AssignmentExpression node
=
expr:AssignmentExpression
succeeds with type τ if ValidateExpression succeeds for the nested AssignmentExpression with type τ and one of the following two conditions holds:
Validating an AssignmentExpression node
=
rhs:AssignmentExpression
succeeds with type τ if ValidateExpression succeeds for rhs with type τ and ValidateHeapAccess succeeds for lhs with τ as one of its legal store types.
Validating a UnaryExpression node of the form
-
NumericLiteral
succeeds with type signed
if
the NumericLiteral source does not contain a .
character and the numeric value of the expression is in the range
[-231, 0).
Validating a UnaryExpression node of the form
+
cexpr:CallExpression
succeeds with type double
if ValidateCall succeeds
for cexpr with actual return type double
.
Validating a UnaryExpression node of the form
+
-
~
!
arg:UnaryExpression
succeeds with type τ if the type of op is … ∧ (σ) → τ ∧ … and ValidateExpression succeeds with a subtype of σ.
Validating a UnaryExpression node of the form
~~
arg:UnaryExpression
succeeds with type signed
if ValidateExpression
succeeds for arg with a subtype of either double
or float?
.
Validating a MultiplicativeExpression node
*
/
%
rhs:UnaryExpression
succeeds with type τ if:
Validating a MultiplicativeExpression node
*
n:-
NumericLiteral-
NumericLiteral *
expr:UnaryExpression
succeeds with type intish
if the source of n
does not contain a .
character and -220
< n < 220
and ValidateExpressionexpr with a subtype of int
.
Validating an AdditiveExpression node
+
-
… +
-
exprn
succeeds with type intish
if:
int
;
Otherwise, validating an AdditiveExpression node
+
-
rhs:MultiplicativeExpression
succeeds with type double
if:
double
;
Validating a ShiftExpression node
<<
>>
>>>
rhs:AdditiveExpression
succeeds with type τ if
Validating a RelationalExpression node
<
>
<=
>=
rhs:ShiftExpression
succeeds with type τ if
Validating an EqualityExpression node
==
!=
rhs:RelationalExpression
succeeds with type τ if
Validating a BitwiseANDExpression node
&
rhs:EqualityExpressionsucceeds with type signed
if ValidateExpression
succeeds for lhs and rhs with
a subtype of intish
.
Validating a BitwiseXORExpression node
^
rhs:BitwiseANDExpressionsucceeds with type signed
if ValidateExpression
succeeds for lhs and rhs with
a subtype of intish
.
Validating a BitwiseORExpression node
|0
succeeds with type signed
if ValidateCall succeeds
for cexpr with actual return type signed
.
Validating a BitwiseORExpression node
|
rhs:BitwiseXORExpressionsucceeds with type signed
if ValidateExpression
succeeds for lhs and rhs with
a subtype of intish
.
Validating a ConditionalExpression node
?
cons:AssignmentExpression :
alt:AssignmentExpression
succeeds with type τ if:
int
, double
, or float
;
int
;
Validating a parenthesized expression node
(
expr:Expression )
succeeds with type τ if ValidateExpression succeeds for expr with type τ.
Each function call expression is validated in the context of a global environment Δ and a variable environment Γ, and validates against an actual return type τ, which was provided from the context in which the function call appears. A recursive validation of a subterm uses the same context as its containing term.
Validating a CallExpression node
(
arg:Expression,
…)
with actual return type τ succeeds if one of the following conditions holds:
…
)
→ τ ∧ …
and ValidateExpression
succeeds for the first n argi expressions
with subtypes of their corresponding σi and
the remaining arg expressions with subtypes of σ.
Alternatively, validating the CallExpression succeeds with
any actual return type τ other than float
if Lookup(Δ, Γ, f)
= Function
and ValidateExpression
succeeds for each arg with a subtype of extern
.
Validating a CallExpression node
[
index:Expression &
n:-
NumericLiteral](
arg:Expression,
…)
succeeds with actual return type τ if:
.
character;
intish
; and
Each heap access expression is validated in the context of a global
environment Δ and a variable environment Γ, and validation
produces a load type as well as a set of legal store
types as a result. These types are determined by
the heap view types corresponding to
each ArrayBufferView
type.
Validating a MemberExpression node
[
n:-
NumericLiteral]
succeeds with load type σ and store types { τ, … } if:
ArrayBufferView
type;
.
character;
Validating a MemberExpression node
[
expr:Expression >>
n:-
NumericLiteral]
succeeds with load type σ and store types { τ, … } if:
ArrayBufferView
type;
intish
;
.
character;
A call to the fround
coercion is validated in the
context of a global environment Δ and a variable environment
Γ and validates as the type float
.
Validating a CallExpression node
(
cexpr:CallExpression)
succeeds with type float
if Lookup(Δ,
Γ, f) = fround
and ValidateCall succeeds for
cexpr with actual return type float
.
Alternatively, validating a CallExpression node
(
arg:Expression)
succeeds with type float
if Lookup(Δ,
Γ, f) = fround
and ValidateExpression
succeeds for arg with type τ, where τ is a subtype
of floatish
, double?
, signed
,
or unsigned
.
An AOT implementation of asm.js must perform some internal dynamic checks at link time to be able to safely generate AOT-compiled exports. If any of the dynamic checks fails, the result of linking cannot be an AOT-compiled module. The dynamically checked invariants are:
return
statement without throwing;
ArrayBuffer
;
byteLength
must be either 2n for n in [12, 24) or 224 · n for n ≥ 1;
If any of these conditions is not met, AOT compilation may produce invalid results so the engine should fall back to an interpreted or JIT-compiled implementation.
| Unary Operator | Type |
|---|---|
+ |
(signed ) → double ∧( unsigned ) → double ∧( double? ) → double ∧( float? ) → double
|
- |
(int ) → intish ∧( double? ) → double ∧( float? ) → floatish
|
~ |
(intish ) → signed |
! |
(int ) → int |
Note that the special combined operator ~~
may be used
as a coercion from double
or float?
to signed
; see Unary
Expressions.
| Binary Operator | Type |
|---|---|
+ |
(double , double ) → double ∧( float? , float? ) → floatish
|
- |
(double? , double? ) → double ∧( float? , float? ) → floatish
|
* |
(double? , double? ) → double ∧( float? , float? ) → floatish
|
/ |
(signed , signed ) → intish ∧( unsigned , unsigned ) → intish ∧( double? , double? ) → double ∧( float? , float? ) → floatish
|
% |
(signed , signed ) → intish ∧( unsigned , unsigned ) → intish ∧( double? , double? ) → double
|
| , & , ^ , << , >> |
(intish , intish ) → signed |
>>> |
(intish , intish ) → unsigned |
< , <= , > , >= , == , != |
(signed , signed ) → int ∧( unsigned , unsigned ) → int ∧( double , double ) → int ∧( float , float ) → int
|
| Standard Library | Type |
|---|---|
Infinity NaN
|
double |
Math.acos Math.asin Math.atan Math.cos Math.sin Math.tan Math.exp Math.log
|
(double? ) → double |
Math.ceil Math.floor Math.sqrt
|
(double? ) → double ∧( float? ) → float
|
Math.abs |
(signed ) → signed ∧( double? ) → double ∧( float? ) → float
|
Math.min Math.max
|
(int , int … ) → signed ∧( double , double … ) → double
|
Math.atan2 Math.pow
|
(double? , double? ) → double |
Math.imul |
(int , int ) → signed |
Math.fround |
fround |
Math.E Math.LN10 Math.LN2 Math.LOG2E Math.LOG10E Math.PI Math.SQRT1_2 Math.SQRT2 |
double |
| View Type | Element Size (Bytes) | Load Type | Store Types |
|---|---|---|---|
Uint8Array |
1 | intish |
intish |
Int8Array |
1 | intish |
intish |
Uint16Array |
2 | intish |
intish |
Int16Array |
2 | intish |
intish |
Uint32Array |
4 | intish |
intish |
Int32Array |
4 | intish |
intish |
Float32Array |
4 | float? |
floatish , double? |
Float64Array |
8 | double? |
float? , double? |
Thanks to Martin Best, Brendan Eich, Andrew McCreight, and Vlad Vukićević for feedback and encouragement.
Thanks to Benjamin Bouvier, Douglas Crosher, and Dan Gohman for
contributions to the design and implementation, particularly for
float
.
Thanks to Jesse Ruderman and C. Scott Ananian for bug reports.
Thanks to Michael Bebenita for diagrams.