Actions, Resources, and Condition Keys for Amazon GameLift
Amazon GameLift (service prefix: gamelift
) provides the following service-specific resources, actions, and condition context
keys for use in IAM permission policies.
References:
-
Learn how to configure this service.
-
View a list of the API operations available for this service.
-
Learn how to secure this service and its resources by using IAM permission policies.
Topics
Actions Defined by Amazon GameLift
You can specify the following actions in the Action
element of an IAM policy statement. Use policies to grant permissions to perform
an operation in AWS. When you use an action in a policy, you usually allow or
deny access to the API operation or CLI command with the same name. However,
in some cases, a single action controls access to more than one operation. Alternatively,
some operations require several different actions.
The Resource column indicates whether each action supports resource-level permissions. If
there is no value for this column, you must specify all resources ("*") in the
Resource
element of your policy statement. If the column includes a resource type, then
you can specify an ARN of that type in a statement with that action. Required
resources are indicated in the table with an asterisk (*). If you specify a resource-level
permission ARN in a statement using this action, then it must be of this type.
Some actions support multiple resource types. If the resource type is optional (not
indicated as required), then you can choose to use one but not the other.
For details about the columns in the following table, see The Actions Table.
| Actions | Description | Access Level | Resource Types (*required) | Condition Keys | Dependent Actions |
|---|---|---|---|---|---|
| AcceptMatch | Registers player acceptance or rejection of a proposed FlexMatch match. | Write | |||
| CreateAlias | Defines a new alias for a fleet. | Write | |||
| CreateBuild | Creates a new game build using files stored in an Amazon S3 bucket. | Write | |||
| CreateFleet | Creates a new fleet of computing resources to run your game servers. | Write | |||
| CreateGameSession | Starts a new game session on a specified fleet. | Write | |||
| CreateGameSessionQueue | Sets up a new queue for processing new game session placement requests. | Write | |||
| CreateMatchmakingConfiguration | Creates a new FlexMatch matchmaker. | Write | |||
| CreateMatchmakingRuleSet | Creates a new matchmaking rule set for FlexMatch. | Write | |||
| CreatePlayerSession | Reserves an available game session slot for a player. | Write | |||
| CreatePlayerSessions | Reserves available game session slots for multiple players. | Write | |||
| CreateScript | Creates a new Realtime Servers script. | Write | |||
| CreateVpcPeeringAuthorization | Allows GameLift to create or delete a peering connection between a GameLift fleet VPC and a VPC on another AWS account. | Write | |||
| CreateVpcPeeringConnection | Establishes a peering connection between your GameLift fleet VPC and a VPC on another account. | Write | |||
| DeleteAlias | Deletes an alias. | Write | |||
| DeleteBuild | Deletes a game build. | Write | |||
| DeleteFleet | Deletes an empty fleet. | Write | |||
| DeleteGameSessionQueue | Deletes an existing game session queue. | Write | |||
| DeleteMatchmakingConfiguration | Deletes an existing FlexMatch matchmaker. | Write | |||
| DeleteMatchmakingRuleSet | Deletes an existing FlexMatch matchmaking rule set. | Write | |||
| DeleteScalingPolicy | Deletes a set of auto-scaling rules. | Write | |||
| DeleteScript | Deletes a Realtime Servers script. | Write | |||
| DeleteVpcPeeringAuthorization | Cancels a VPC peering authorization. | Write | |||
| DeleteVpcPeeringConnection | Removes a peering connection between VPCs. | Write | |||
| DescribeAlias | Retrieves properties for an alias. | Read | |||
| DescribeBuild | Retrieves properties for a game build. | Read | |||
| DescribeEC2InstanceLimits | Retrieves the maximum allowed and current usage for EC2 instance types. | Read | |||
| DescribeFleetAttributes | Retrieves general properties, including status, for fleets. | Read | |||
| DescribeFleetCapacity | Retrieves the current capacity setting for fleets. | Read | |||
| DescribeFleetEvents | Retrieves entries from a fleet's event log. | Read | |||
| DescribeFleetPortSettings | Retrieves the inbound connection permissions for a fleet. | Read | |||
| DescribeFleetUtilization | Retrieves utilization statistics for fleets. | Read | |||
| DescribeGameSessionDetails | Retrieves properties for game sessions in a fleet, including the protection policy. | Read | |||
| DescribeGameSessionPlacement | Retrieves details of a game session placement request. | Read | |||
| DescribeGameSessionQueues | Retrieves properties for game session queues. | Read | |||
| DescribeGameSessions | Retrieves properties for game sessions in a fleet. | Read | |||
| DescribeInstances | Retrieves information about instances in a fleet. | Read | |||
| DescribeMatchmaking | Retrieves details of matchmaking tickets. | Read | |||
| DescribeMatchmakingConfigurations | Retrieves properties for FlexMatch matchmakers. | Read | |||
| DescribeMatchmakingRuleSets | Retrieves properties for FlexMatch matchmaking rule sets. | Read | |||
| DescribePlayerSessions | Retrieves properties for player sessions in a game session. | Read | |||
| DescribeRuntimeConfiguration | Retrieves the current runtime configuration for a fleet. | Read | |||
| DescribeScalingPolicies | Retrieves all scaling policies that are applied to a fleet. | Read | |||
| DescribeScript | Retrieves properties for a Realtime Servers script. | Read | |||
| DescribeVpcPeeringAuthorizations | Retrieves valid VPC peering authorizations. | Read | |||
| DescribeVpcPeeringConnections | Retrieves details on active or pending VPC peering connections. | Read | |||
| GetGameSessionLogUrl | Retrieves the location of stored logs for a game session. | Read | |||
| GetInstanceAccess | Requests remote access to a specified fleet instance. | Read | |||
| ListAliases | Retrieves all aliases that are defined in the current region. | List | |||
| ListBuilds | Retrieves all game build in the current region. | List | |||
| ListFleets | Retrieves a list of fleet IDs for all fleets in the current region. | List | |||
| ListScripts | Retrieves properties for all Realtime Servers scripts in the current region. | List | |||
| PutScalingPolicy | Creates or updates a fleet auto-scaling policy. | Write | |||
| RequestUploadCredentials | Retrieves fresh upload credentials to use when uploading a new game build. | Read | |||
| ResolveAlias | Retrieves the fleet ID associated with an alias. | Read | |||
| SearchGameSessions | Retrieves game sessions that match a set of search criteria. | Read | |||
| StartFleetActions | Resumes auto-scaling activity on a fleet after it was suspended with StopFleetActions(). | Write | |||
| StartGameSessionPlacement | Sends a game session placement request to a game session queue. | Write | |||
| StartMatchBackfill | Requests FlexMatch matchmaking to fill available player slots in an existing game session. | Write | |||
| StartMatchmaking | Requests FlexMatch matchmaking for one or a group of players and game session placement for a resulting match. | Write | |||
| StopFleetActions | Suspends auto-scaling activity on a fleet. | Write | |||
| StopGameSessionPlacement | Cancels a game session placement request that is in progress. | Write | |||
| StopMatchmaking | Cancels a matchmaking or match backfill request that is in progress. | Write | |||
| UpdateAlias | Updates the properties of an existing alias. | Write | |||
| UpdateBuild | Updates an existing build's metadata. | Write | |||
| UpdateFleetAttributes | Updates the general properties of an existing fleet. | Write | |||
| UpdateFleetCapacity | Adjusts a fleet's capacity settings. | Write | |||
| UpdateFleetPortSettings | Adjusts a fleet's port settings. | Write | |||
| UpdateGameSession | Updates the properties of an existing game session. | Write | |||
| UpdateGameSessionQueue | Updates properties of an existing game session queue. | Write | |||
| UpdateMatchmakingConfiguration | Updates properties of an existing FlexMatch matchmaking configuration. | Write | |||
| UpdateRuntimeConfiguration | Updates how server processes are configured on instances in an existing fleet. | Write | |||
| UpdateScript | Updates the metadata and content of an existing Realtime Servers script. | Write | |||
| ValidateMatchmakingRuleSet | Validates the syntax of a FlexMatch matchmaking rule set. | Read |
Resources Defined by Amazon GameLift
Amazon GameLift does not support specifying a resource ARN in the Resource
element of an IAM policy statement. To allow access to Amazon GameLift, specify
“Resource”: “*”
in your policy.
Condition Keys for Amazon GameLift
GameLift has no service-specific context keys that can be used in the Condition
element of policy statements. For the list of the global context keys that are
available to all services, see Available Keys for Conditions in the IAM Policy Reference.


When developing software that exchanges data with other components or services you may be confronted with the proper simulation of those foreign services during integration testing. This is because you need to connect with a foreign service that is simply not available on your local machine or in a test environment.
For unit testing purpose you can use mocks that help out to simulate proper responses. There will be times where your software is deployed to a test environment in order to perform some acceptance tests with your stack holders before going to a final release. Usually this is also done with the customer exploring the software through manual testing. In these situations traditional service mocking is not a good option and you need a real simulator instance that receives requests and responds with proper test data.
This is exactly what the Citrus simulator project provides for you. Standalone simulation and complex request/response processing with solid validation capabilities. The Citrus simulator provides a very easy and reliable definition of inbound and outbound messages for different scenarios. Good news is that this is not only for Http REST interfaces but also for SOAP WebService, JMS, RMI, mail messaging and many more. So you can use the simulator whenever you need to integrate with another service that is simply not available on your local machine or in your test environment.
The citrus-simulator project is a side project of the test framework Citrus. The simulator uses Citrus to define server APIs and the logic to respond with predefined messages according to defined scenarios.
In general the simulator is nothing but a normal Spring Boot web application that you can start on your local machine. The simulator waits for incoming requests and each request executes a predefined scenario that will create a response message for the client. Which scenario to execute is identified based on a mapping key that is extracted from the incoming request.
Let’s have a simple example project to demonstrate the simulator concepts.
User login sample
Let’s say you are in charge of developing an application that connects with a user login service for proper authentication. Your service comes as a Microservice web application and is ready for deployment in the acceptance test environment.
Unfortunately the user authentication service is not ready yet and is not deployed in that test environment. Without the user login service your application is not able to work properly as each user interaction needs to be authenticated with foreign service calls first. This means the foreign user login service needs to be simulated so users can explore your application in that test environment.
Spring Boot simulator
We start to simulate that user login service by creating a new Spring Boot project. Of course you can use any build system you like when building the simulator application. Most popular tools would be Gradle or Maven. Here we show how to setup everything using Gradle.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.6.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
jar {
group = "com.consol.citrus.simulator"
baseName = 'user-login-simulator'
version = '1.0.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework.boot:spring-boot-starter-web")
compile("com.consol.citrus:citrus-simulator-starter:1.0.0")
compile("com.consol.citrus:citrus-simulator-ui:1.0.0")
testCompile("junit:junit")
}
The build script defines a typical Spring Boot project with its dependencies and plugin configuration. In addition to that we add the citrus-simulator-starter dependency. The citrus-simulator-ui dependency is optional and provides a detailed Angular2 user interface that you can open with your browser once the simulator is up and running.
Let’s add the Spring Boot main class for the application com.consol.citrus.simulator.Simulator.java
:
package com.consol.citrus.simulator;
@SpringBootApplication
public class Simulator extends SimulatorRestAdapter{
public static void main(String[] args) {
SpringApplication.run(Simulator.class, args);
}
@Override
public String urlMapping(SimulatorRestConfigurationProperties simulatorRestConfiguration) {
return "/services/rest/v1/**";
}
@Override
public EndpointAdapter fallbackEndpointAdapter() {
return new StaticEndpointAdapter() {
@Override
protected Message handleMessageInternal(Message message) {
return new HttpMessage().status(HttpStatus.INTERNAL_SERVER_ERROR);
}
};
}
}
The main class is a typical Spring Boot application that uses @SpringBootApplication
annotation with auto configuration of needed components. As we have added the citrus-simulator-starter dependency to the project we also get auto
configuration of all simulator related beans and components. The application can use a SimulatorRestAdapter
extension in order to overwrite some simulator components such as the default fallbackEndpointAdapter
. This adapter defines a
default Http 500
internal server error response when something went wrong on the simulator request processing. Also we give the url mapping that defines how clients connect with the user login REST API later on using the base
URL http://localhost:8080/services/rest/v1/**
.
Now we can add a first a default scenario that responds to incoming requests.
package com.consol.citrus.simulator;
import com.consol.citrus.http.message.HttpMessage;
import com.consol.citrus.simulator.scenario.*;
import org.springframework.http.HttpStatus;
@Scenario("DEFAULT_SCENARIO")
public class DefaultScenario extends AbstractSimulatorScenario {
@Override
public void run(ScenarioDesigner designer) {
designer.send()
.message(new HttpMessage("No scenario found for this request")
.status(HttpStatus.NOT_FOUND));
}
}
The scenario uses the annotation @Scenario("DEFAULT_SCENARIO")
and extends AbstractSimulatorScenario
. In the run
method we can use the Citrus Java DSL designer to create some response generating logic.
This default scenario is activated when no other scenario is matching the incoming request. So we send back a Http 404 NOT FOUND
as we obviously did not match a scenario. Now let’s build and start the simulator application.
Build and run
You can build and run the simulator application from command line using the Gradle binaries.
./gradlew build bootRun
You will see the application starting up. Usually you will see some console log output. The web server should start within seconds. Once the application is up and running you can open your browser and point to http://localhost:8080. You will see the simulator user interface.
You can access the simulated REST services on http://localhost:8080/services/rest/. Up to now we only have the default scenario so we constantly get Http 404 NOT FOUND
responses.
Let’s add some scenarios representing the user login service.
User login REST API
The user login service defines following REST API:
{
"swagger": "2.0",
"info": {
"description": "This is a user login service",
"version": "1.0.0",
"title": "User Login Service"
},
"host": "user-login-service",
"basePath": "/v1",
"schemes": [
"http"
],
"paths": {
"/user": {
"post": {
"operationId": "createUser",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Created user object",
"required": true,
"schema": {
"$ref": "#/definitions/User"
}
}
],
"responses": {
"default": {
"description": "successful operation"
}
}
}
},
"/user/login": {
"get": {
"operationId": "loginUser",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "username",
"in": "query",
"description": "The user name for login",
"required": true,
"type": "string"
},
{
"name": "password",
"in": "query",
"description": "The password for login in clear text",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "string"
},
"headers": {
"X-Rate-Limit": {
"type": "integer",
"format": "int32",
"description": "calls per hour allowed by the user"
},
"X-Expires-After": {
"type": "string",
"format": "date-time",
"description": "date in UTC when token expires"
}
}
},
"400": {
"description": "Invalid username/password supplied"
}
}
}
},
"/user/logout": {
"get": {
"operationId": "logoutUser",
"produces": [
"application/xml",
"application/json"
],
"parameters": [],
"responses": {
"default": {
"description": "successful operation"
}
}
}
},
"/user/{username}": {
"get": {
"operationId": "getUserByName",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "username",
"in": "path",
"description": "The name that needs to be fetched. Use user1 for testing. ",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/User"
}
},
"400": {
"description": "Invalid username supplied"
},
"404": {
"description": "User not found"
}
}
}
}
},
"definitions": {
"User": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
}
},
"xml": {
"name": "User"
}
}
}
}
There are 4 operations defined:
- Http POST user/
- Http GET user/login
- Http GET user/logout
- Http GET user/{username}
Let’s create basic scenarios for these operations in the simulator.
User login scenarios
@Scenario("CREATE_USER")
@RequestMapping(value = "/services/rest/v1/user", method = RequestMethod.POST)
public class CreateUserScenario extends AbstractSimulatorScenario {
@Override
public void run(ScenarioDesigner scenario) {
scenario
.http()
.receive()
.post()
.payload(new ClassPathResource("templates/user-control.json"));
scenario
.http()
.send()
.response(HttpStatus.OK);
}
}
The scenario for Http POST
requests on request path /v1/user
uses the Spring @RequestMapping
annotation. The simulator scenario mapper will automatically
route incoming requests to this scenario based on that information.
The scenario itself receives the incoming request using the Citrus Java DSL. The receive operation validates the Http POST
request method and gives an expected control Json message body as external file resource. The
user-control.json
defines the expected user object on this operation:
{
"id": "@isNumber()@",
"username": "@notEmpty()@",
"password": "@notEmpty()@"
}
The control user object verifies that the elements id
, username
and password
are present. In addition to that we can use Citrus validation matchers in order to validate the element values. The scenario produces a proper response
only in case the incoming request matches the expected control Json object. The simulator scenario is able to use the full Citrus validation power for comparing message data in Json, XML and plaintext message format. JsonPath and XPath expression evaluation and validation
is also possible here.
Now let’s define a proper response message for the scenario. We send back a Http 200 OK
response. This is how the scenario is able to control the response generation with Citrus.
We continue with the remaining scenarios for all other operations defined in the REST API:
@Scenario("GET_USER")
@RequestMapping(value = "/services/rest/v1/user/{username}", method = RequestMethod.GET)
public class GetUserScenario extends AbstractSimulatorScenario {
@Override
public void run(ScenarioDesigner scenario) {
scenario
.http()
.receive()
.get();
scenario
.http()
.send()
.response(HttpStatus.OK)
.payload(new ClassPathResource("random-user.json"));
}
}
The get user operation needs to send back a proper user object in Json fomrat. We can load an external file resource as message payload for that.
{
"id": "citrus:randomNumber(10)",
"username": "citrus:randomEnumValue('amy', 'penny', 'sheldon', 'leonard', 'rajesh', 'howard', 'bernadette')",
"password": "citrus:randomString(10)"
}
The usage of Citrus functions makes it easy to create a random user object that meets the REST API object definitions. Let’s add the remaining login and logout scenarios.
@Scenario("USER_LOGIN")
@RequestMapping(value = "/services/rest/v1/user/login", method = RequestMethod.GET)
public class UserLoginScenario extends AbstractSimulatorScenario {
@Override
public void run(ScenarioDesigner scenario) {
scenario
.http()
.receive()
.get()
.queryParam("@assertThat(allOf(containsString(username=),containsString(password=))@");
scenario
.http()
.send()
.response(HttpStatus.OK)
.contentType("text/plain")
.header("X-Rate-Limit", "10")
.header("X-Expires-After", "citrus:currentDate(YYYY-MM-DD'T'hh:mm:ss, +1h)")
.payload("citrus:randomString(40)");
}
}
The login operation verifies the presence of Http query parameter username
and password
. As response the scenario defines some header information X-Rate-Limit
and X-Expires-After
where latter is the
expire date time one hour from now calculated with the Citrus function citrus:currentDate(YYYY-MM-DD'T'hh:mm:ss, +1h)
. As payload we send back a 40 character random token as plaintext string.
@Scenario("USER_LOGOUT")
@RequestMapping(value = "/services/rest/v1/user/logout", method = RequestMethod.GET)
public class UserLogoutScenario extends AbstractSimulatorScenario {
@Override
public void run(ScenarioDesigner scenario) {
scenario
.http()
.receive()
.get();
scenario
.http()
.send()
.response(HttpStatus.OK);
}
}
Last not least the logout operation that completes the REST API for the user login service. Now the simulator is able to respond to all operations that are defined in the REST API. Clients are now able to call the operations via Http REST. The simulator will verify the incoming request data and create proper response messages.
You can test the simulator by pointing your browser to the following URLs:
http://localhost:8080/services/rest/v1/user/test
http://localhost:8080/services/rest/v1/user/login?username=christoph&password=secr3t
http://localhost:8080/services/rest/v1/user/logout
You should always get proper Http 200 OK
response messages. The login request should get a new login token in the response every time. In case we send some invalid request we should get Http 500
responses and for
unsupported request paths we should get a Http 404
response. Try that with following test URLs.
http://localhost:8080/services/rest/v1/unsupported
http://localhost:8080/services/rest/v1/user/login
http://localhost:8080/services/rest/v1/user/login?username=pwd_missing
With the above test requests we triggered some activities on the simulator. Let’s review those activities in the web based user interface.
Simulator user interface
The simulator provides a web based Angular2 user interface so users can review the status and all activities on the simulator. We have already seen the dashboard that gives an overview of the simulator status:
In addition to that you can view detailed information available scenarios and their execution activity.
Auto generate scenarios
Up to now we have added simulator scenarios manually. We could have also used auto generated scenarios based on the given Swagger Open API specification of the REST API. Just add a HttpScenarioGenerator
bean
to the application:
package com.consol.citrus.simulator;
@SpringBootApplication
public class Simulator extends SimulatorRestAdapter{
public static void main(String[] args) {
SpringApplication.run(Simulator.class, args);
}
@Override
public String urlMapping(SimulatorRestConfigurationProperties simulatorRestConfiguration) {
return "/services/rest/v1/**";
}
@Override
public EndpointAdapter fallbackEndpointAdapter() {
return new StaticEndpointAdapter() {
@Override
protected Message handleMessageInternal(Message message) {
return new HttpMessage().status(HttpStatus.INTERNAL_SERVER_ERROR);
}
};
}
@Bean
public static HttpScenarioGenerator scenarioGenerator() {
HttpScenarioGenerator generator = new HttpScenarioGenerator(
new ClassPathResource("swagger/user-login-api.json"));
generator.setContextPath("/services/rest");
return generator;
}
}
The HttpScenarioGenerator
reads the Open API specification file at runtime and generates scenarios for each operation. The generated scenarios do also
verify the request data according to the rules defined in the specification. The response messages hold dynamic data objects generated from the API schema definitions.
What’s next?!
The Citrus simulator project brings everything to manage standalone simulation of interfaces that you need to connect to during software development. The sample above showed REST API simulation. Same logic is possible with SOAP web services, JMS and many other messaging transports. The integration with Citrus framework capabilities enables us to create even very complex scenarios with intermediate message handling and consecutive message calls as well as content based routing.
You can find the complete sample sources on github (https://github.com/citrusframework/citrus-simulator-demo). Also please explore all other simulator sample projects and find out how the simulator works best for you and your requirements.
Of course any feedback is very welcome!


Environment SetupTo build the real world applications, connecting with the databases is the necessity for the programming languages. However, python allows us to connect our application to the databases like MySQL, SQLite, MongoDB, and many others. In this section of the tutorial, we will discuss Python - MySQL connectivity, and we will perform the database operations in python. We will also cover the Python connectivity with the databases like MongoDB and SQLite later in this tutorial. Install mysql.connectorTo connect the python application with the MySQL database, we must import the mysql.connector module in the program. The mysql.connector is not a built-in module that comes with the python installation. We need to install it to get it working. Execute the following command to install it using pip installer. Or follow the following steps. 1. Click the link: https://files.pythonhosted.org/packages/8f/6d/fb8ebcbbaee68b172ce3dfd08c7b8660d09f91d8d5411298bcacbd309f96/mysql-connector-python-8.0.13.tar.gz to download the source code. 2. Extract the archived file. 3. Open the terminal (CMD for windows) and change the present working directory to the source code directory. 4. Run the file named setup.py with python (python3 in case you have also installed python 2) with the parameter build. 5. Run the following command to install the mysql-connector. This will take a bit of time to install mysql-connector for python. We can verify the installation once the process gets over by importing mysql-connector on the python shell. Hence, we have successfully installed mysql-connector for python on our system.
Next TopicDatabase Connection
|
Environment SetupTo build the real world applications, connecting with the databases is the necessity for the programming languages. However, python allows us to connect our application to the databases like MySQL, SQLite, MongoDB, and many others. In this section of the tutorial, we will discuss Python - MySQL connectivity, and we will perform the database operations in python. We will also cover the Python connectivity with the databases like MongoDB and SQLite later in this tutorial. Install mysql.connectorTo connect the python application with the MySQL database, we must import the mysql.connector module in the program. The mysql.connector is not a built-in module that comes with the python installation. We need to install it to get it working. Execute the following command to install it using pip installer. Or follow the following steps. 1. Click the link: https://files.pythonhosted.org/packages/8f/6d/fb8ebcbbaee68b172ce3dfd08c7b8660d09f91d8d5411298bcacbd309f96/mysql-connector-python-8.0.13.tar.gz to download the source code. 2. Extract the archived file. 3. Open the terminal (CMD for windows) and change the present working directory to the source code directory. 4. Run the file named setup.py with python (python3 in case you have also installed python 2) with the parameter build. 5. Run the following command to install the mysql-connector. This will take a bit of time to install mysql-connector for python. We can verify the installation once the process gets over by importing mysql-connector on the python shell. Hence, we have successfully installed mysql-connector for python on our system.
Next TopicDatabase Connection
|
Environment SetupTo build the real world applications, connecting with the databases is the necessity for the programming languages. However, python allows us to connect our application to the databases like MySQL, SQLite, MongoDB, and many others. In this section of the tutorial, we will discuss Python - MySQL connectivity, and we will perform the database operations in python. We will also cover the Python connectivity with the databases like MongoDB and SQLite later in this tutorial. Install mysql.connectorTo connect the python application with the MySQL database, we must import the mysql.connector module in the program. The mysql.connector is not a built-in module that comes with the python installation. We need to install it to get it working. Execute the following command to install it using pip installer. Or follow the following steps. 1. Click the link: https://files.pythonhosted.org/packages/8f/6d/fb8ebcbbaee68b172ce3dfd08c7b8660d09f91d8d5411298bcacbd309f96/mysql-connector-python-8.0.13.tar.gz to download the source code. 2. Extract the archived file. 3. Open the terminal (CMD for windows) and change the present working directory to the source code directory. 4. Run the file named setup.py with python (python3 in case you have also installed python 2) with the parameter build. 5. Run the following command to install the mysql-connector. This will take a bit of time to install mysql-connector for python. We can verify the installation once the process gets over by importing mysql-connector on the python shell. Hence, we have successfully installed mysql-connector for python on our system.
Next TopicDatabase Connection
|
Environment SetupTo build the real world applications, connecting with the databases is the necessity for the programming languages. However, python allows us to connect our application to the databases like MySQL, SQLite, MongoDB, and many others. In this section of the tutorial, we will discuss Python - MySQL connectivity, and we will perform the database operations in python. We will also cover the Python connectivity with the databases like MongoDB and SQLite later in this tutorial. Install mysql.connectorTo connect the python application with the MySQL database, we must import the mysql.connector module in the program. The mysql.connector is not a built-in module that comes with the python installation. We need to install it to get it working. Execute the following command to install it using pip installer. Or follow the following steps. 1. Click the link: https://files.pythonhosted.org/packages/8f/6d/fb8ebcbbaee68b172ce3dfd08c7b8660d09f91d8d5411298bcacbd309f96/mysql-connector-python-8.0.13.tar.gz to download the source code. 2. Extract the archived file. 3. Open the terminal (CMD for windows) and change the present working directory to the source code directory. 4. Run the file named setup.py with python (python3 in case you have also installed python 2) with the parameter build. 5. Run the following command to install the mysql-connector. This will take a bit of time to install mysql-connector for python. We can verify the installation once the process gets over by importing mysql-connector on the python shell. Hence, we have successfully installed mysql-connector for python on our system.
Next TopicDatabase Connection
|


This is a Hot Spot image. Move your mouse pointer over the image
and when the mouse pointer changes to the shape of a hand click
the left mouse button once for extra help.
This dialog box means Ameol could not open your database index file (admin.adb). This can happen if your hard disk has become corrupt, you have moved your database or your database is on a network drive which is currently not available to you. Click any of the buttons on the image above to see what options you can choose.


1. This program is managed by Future Retail Limited (hereinafter referred to as “FRL”)
2. The game is made for entertainment and fun purpose.
3. The user has to score minimum 100 points to unlock a coupon.
4. This game will enable user to avail shopping coupons of worth Rs 150 off on shopping of Rs 1000/-
5. Only 1 coupons can be applied in a single bill at a time.
6. User can register with a unique and valid name and mobile number.
7. Details entered if not valid will not be considered and the user will not receive any coupons and rewards. Please ensure that the mobile number is not on DND, to receive the coupon through SMS
8. One mobile number will receive maximum 1 coupon.
9. Each user will receive coupons after successfully scoring the minimum 100 points
10. The eligible mobile numbers will receive the Big Bazaar shopping coupons within 48 hours of submitting the score, through an SMS. Please ensure that the mobile number is not on DND, to receive the coupon through SMS
11. Any data breaching and hacking is subject to strict and legal action against the user.
12. The customers can redeem the coupons at the nearest Big Bazaar, fbb stores across India
13. The coupons can be redeemed only between Sabse Sasta Din starting 23rd Jan to 27th January 2019 only.
14. The coupon is not valid on items like oil, ghee, sugar, patanjali products & baby food and other statutary products.
15. FRL shall not be liable in the event it fails to fulfil any of its obligations under this terms and conditions due to flood, earthquake, storm, cyclone or any other acts of god of similar nature, war, strike, lockout, or governmental or judicial or quasi-judicial policies/intervention/direction /prohibition or change in law or for any technology/network failure or any other reasons beyond its control.
16. An entrant to this activity indicating his/her agreement to be bound by these terms and conditions.
17. If FRL finds out any illicit activities, fake profiles or bot users creating multiple accounts or tampering the gaming, those users will not be counted or gratified
18. In case of any dispute, the decision of FRL shall be final and binding on all concerned and Courts in Mumbai shall have exclusive Jurisdiction.
19. FRL reserves the right to modify these Terms and Conditions and such changes shall be deemed effective immediately.


Draggable Events
My Event 1
My Event 2
My Event 3
My Event 4
My Event 5
show owner
inspired by
full calendar
×
编辑


Parts Class
This class handles the email Parts data.
Important: All of these functions are available through the message object returned by the Peeker class. Notated here as: $e
Function Reference
parts()
Get the email and extract and decode all the parts into a nice array property parts_array. Calls body class body() function which calls the extract_parts() function. Note: you must call this ( or body() ) before any detectors will work.
$e->parts();
get_parts_count()
Returns the count of parts found - not including meta parts like nodes - just real parts.
$e->get_parts_count();
get_parts_array()
Returns the array of parts built by the parts() function.
$e->get_parts_array();
Detectors - All Return TRUE or FALSE
has_attachment()
TRUE if the message has an attachment.
$e->has_attachment();
has_at_least_one_attachment_with_disposition($disp)
TRUE if the message has an attachment with specified disposition. Disposition can be inline or attachment. This is for detecting if an image has been attached to the message and it expects the client to render it inline without calling out to a webserver to get it.
$e->has_at_least_one_attachment_with_disposition();
has_at_least_one_attachment($subtype)
TRUE if any attachment is of the specified subtype (e.g., jpg, pdf, xls, etc...). Function expects the 3-letter version of the file type.
$e->has_at_least_one_attachment('jpg'); // detector for moblog
Callbacks
insert_HTML($str)
Brute force. Looks for marker in HTML and inserts the string so it appears inside the html just before the closing body tags.
$e->insert_HTML('<br />This email is confidential');
insert_PLAIN($str)
Appends string to the end of the PLAIN text.
$e->insert_PLAIN("--\nThis is my signature");
rewrite_html_transform_img_tags($base_url='')
Attempts to change the HTML that points to local resources (cid: style img tags) so that the HTML points to remote resources instead. Pass the base_url where the images will be. If it is not passed, the img tags will be re-written as relative paths.
$e->rewrite_html_transform_img_tags();
render_first_jpeg()
Testing. Show the first jpeg attached to the email. Renders it to the browser (sends jpeg header) so it will not work if other data has already been sent.
$e->render_first_jpeg();
save_header_string($file_name='header_string.txt')
Save the header string somewhere as a file.
$e->save_header_string();
save_body_string($file_name='body_string.txt')
Save the raw, undecoded body string somewhere as a file.
$e->save_body_string();
save_PLAIN($file_name='PLAIN.txt')
Save the PLAIN string somewhere as a text file.
$e->save_PLAIN();
save_HTML($file_name='HTML.html')
Save the HTML string somewhere as an HTML file.
$e->save_HTML();
save_all_attachments($dir=NULL)
Dumps all the attachments to the filesystem.
$e->save_all_attachments();
get_file_name_array()
Returns the array containing all the filenames of the attached files.
$e->get_file_name_array();


ANTACID- aluminum hydroxide and magnesium carbonate tablet, chewable
Meijer Distribution Inc
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
Active ingredient (in each tablet)
Aluminum hydroxide 160 mg
Magnesium carbonate 105 mg
Uses
relieves
- acid indigestion
- heartburn
- sour stomach
- upset stomach associated with these symptoms
Warnings
Ask a doctor before use if you have
- kidney disease
- a magnesium or sodium-restricted diet
Ask a doctor or pharmacist before use if you are
now taking a prescription drug. Antacids may interact with certain prescription drugs.
When using this product
do not take more than 16 tablets in a 24-hour period or use the maximum dosage for more than 2 weeks
Keep out of reach of children.
Directions
- chew 2 to 4 tablets four times a day or as directed by a doctor
- take after meals and at bedtime or as needed
- for best results follow by a half glass of water or other liquid
- do not swallow whole
Other information
- each tablet contains: magnesium 50 mg and sodium 32 mg
- store at 20°-25°C
Inactive ingredients
alginic acid, calcium stearate, flavor, mannitol, sodium bicarbonate, starch, sucrose, water
Questions or comments?
1-800-719-9260
Principal Display Panel
Compare to Gaviscon® Extra Strength Antacid active ingredients
Extra Strength
Antacid Tablets
Original Flavor
Fast Acting Heartburn Relief
Long Lasting Antacid Barrier


Highly accelerated region 1A/1B
Embryonic ventral forebrain-2 long ncRNA
growth arrested DNA-damage inducible gene 7
Metastasis associated lung adenocarcinoma transcript 1
Maternally expressed 3 conserved region 2
Polled intersex syndrome regulated transcript 1
Myocardial infarction associated transcript exon 1
Myocardial infarction associated transcript exon 5 conserved region 1
Myocardial infarction associated transcript exon 5 conserved region 2
Myocardial infarction associated transcript exon 5 conserved region 3
Non-coding RNA LOC285194
X-chromosome inactivation gene exon 1
X-chromosome inactivation gene exon 4
Taurine upregulated gene 1 conserved region 1
Taurine upregulated gene 1 conserved region 2
Non-coding RNA BC040587
Heat shock gene hsromega conserved region 1
Heat shock gene hsromega conserved region 2
Embryonic ventral forebrain RNA 1 conserved region 1
Embryonic ventral forebrain RNA 1 conserved region 2
LincRNA-p21 conserved region 1
LincRNA-p21 conserved region 2
Taurine upregulated gene 1 conserved region 3
Taurine upregulated gene 1 conserved region 4
Prostate cancer antigen RNA 3 conserved region 2
HOTAIR conserved region 1
HOTAIR conserved region 2
HOTAIR conserved region 3
CDKN2B antisense RNA 1 intronic convserved region
Maternal intergenic circadian oscillating RNA 1
Bithoraxoid conserved region 1
Bithoraxoid conserved region 2
Bithoraxoid conserved region 3
Bithoraxoid conserved region 4
Bithoraxoid conserved region 5
Bithoraxoid conserved region 6
Bithoraxoid conserved region 7
KCNQ1 overlapping transcript 1 conserved region 1
KCNQ1 overlapping transcript 1 conserved region 2
KCNQ1 overlapping transcript 1 conserved region 3
KCNQ1 overlapping transcript 1 conserved region 5
SOX2 overlapping transcript exon 1
SOX2 overlapping transcript exon 2
SOX2 overlapping transcript exon 3
SOX2 overlapping transcript exon 4
Nuclear enriched abundant transcript 1 conserved region 1
Nuclear enriched abundant transcript 1 conserved region 2
Nuclear enriched abundant transcript 1 conserved region 3
Rhabdomyosarcoma 2 associated transcript conserved region 1
Rhabdomyosarcoma 2 associated transcript conserved region 2
Rhabdomyosarcoma 2 associated transcript conserved region 3
Rhabdomyosarcoma 2 associated transcript conserved region 4
Rhabdomyosarcoma 2 associated transcript conserved region 5
Rhabdomyosarcoma 2 associated transcript conserved region 6
Rhabdomyosarcoma 2 associated transcript conserved region 7
Rhabdomyosarcoma 2 associated transcript conserved region 8
Rhabdomyosarcoma 2 associated transcript conserved region 9
Rhabdomyosarcoma 2 associated transcript conserved region 10
H19 conserved region 1
H19 conserved region 2
H19 conserved region 3
HOX antisense intergenic RNA myeloid 1 conserved region 1
HOX antisense intergenic RNA myeloid 1 conserved region 2
HOX antisense intergenic RNA myeloid 1 conserved region 3
HOX antisense intergenic RNA myeloid 1 conserved region 4
HOX antisense intergenic RNA myeloid 1 conserved region 5
Prostate-specific transcript 1
Pregnancy induced noncoding RNA
ZEB2 antisense RNA 1 conserved region 1
ZEB2 antisense RNA 1 conserved region 2
ZEB2 antisense RNA 1 conserved region 3
ZEB2 antisense RNA 1 conserved region 4
Viral integration site 1
SPRY4-IT1 conserved region 1
SPRY4-IT1 conserved region 2
HOXA transcript at the distal tip, conserved region 1
HOXA transcript at the distal tip, conserved region 2
HOXA transcript at the distal tip, conserved region 3
HOXA transcript at the distal tip, conserved region 4
CDKN2B antisense RNA 1 convserved region 2
CDKN2B antisense RNA 1 convserved region 3
Sphinx_ conserved region 1
Sphinx conserved region 2
Yellow-achaete intergenic RNA conserved region 1
Yellow-achaete intergenic RNA conserved region 2
Yellow-achaete intergenic RNA conserved region 3
CLRN1 antisense RNA 1 conserved region
DAOA antisense RNA 1 conserved region 1
DAOA antisense RNA 1 conserved region 2
DiGeorge syndrome critical region gene 5 conserved region
Highly up-regulated in liver cancer conserved region
Disrupted in schizophrenia 2 conserved region
Deleted in lymphocytic leukemia 1 conserved region 1
Deleted in lymphocytic leukemia 1 conserved region 2
Deleted in lymphocytic leukemia 2 conserved region 1
Deleted in lymphocytic leukemia 2 conserved region 2
Deleted in lymphocytic leukemia 2 conserved region 3
Deleted in lymphocytic leukemia 2 conserved region 4
Deleted in lymphocytic leukemia 2 conserved region 5
Deleted in lymphocytic leukemia 2 conserved region 6
DLG2 antisense RNA 1 conserved region 1
DLG2 antisense RNA 1 conserved region 2
FAM13A antisense RNA 1 conserved region 1
FAM13A antisense RNA 1 conserved region 2
FAS antisense RNA 1 conserved region
FMR1 antisense RNA 1 conserved region 1
FMR1 antisense RNA 1 conserved region 2
FTX transcript, XIST regulator conserved region 1
FTX transcript, XIST regulator conserved region 2
FTX transcript, XIST regulator conserved region 3
FTX transcript, XIST regulator conserved region 5
FTX transcript, XIST regulator conserved region 4
JPX transcript, XIST activator conserved region 1
JPX transcript, XIST activator conserved region 2
Ghrelin opposite strand RNA conserved region
GNAS antisense RNA 1 conserved region 1
GNAS antisense RNA 1 conserved region 2
GNAS antisense RNA 1 conserved region 3
GNAS antisense RNA 1 conserved region 4
GNAS antisense RNA 1 conserved region 5
HOXB13 antisense RNA 1 conserved region 1
HOXB13 antisense RNA 1 conserved region 2
HTT antisense RNA 1 conserved region 1
HTT antisense RNA 1 conserved region 2
HTT antisense RNA 1 conserved region 3
HOXA11 antisense RNA 1 conserved region 1
HOXA11 antisense RNA 1 conserved region 2
HOXA11 antisense RNA 1 conserved region 3
HOXA11 antisense RNA 1 conserved region 4
HOXA11 antisense RNA 1 conserved region 5
HOXA11 antisense RNA 1 conserved region 6
Hydatidiform mole associated and imprinted conserved region 1
Maternally expressed 8 exon 1
Maternally expressed 8 exon 2
Maternally expressed 8 exon 3
MEST intronic transcript 1, antisense RNA conserved region 1
MEST intronic transcript 1, antisense RNA conserved region 2
MEST intronic transcript 1, antisense RNA conserved region 3
MER1 repeat containing imprinted transcript 1 conserved region 1
Neighbour of BRCA1 gene 2 converved region
Non-protein coding RNA, upstream of F2R/PAR1 conserved region 1
Non-protein coding RNA, upstream of F2R/PAR1 conserved region 2
NPPA antisense RNA 1 conserved region 1
NPPA antisense RNA 1 conserved region 2
NPPA antisense RNA 1 conserved region 3
Prostate androgen-regulated transcript 1 conserved region 1
Prostate androgen-regulated transcript 1 conserved region 2
Prostate androgen-regulated transcript 1 conserved region 3
XIST RNA A repeat
Pvt1 oncogene conserved region 1
Pvt1 oncogene conserved region 2
Pvt1 oncogene conserved region 3
Pvt1 oncogene conserved region 4
Pvt1 oncogene conserved region 5
Pvt1 oncogene conserved region 6
Pvt1 oncogene conserved region 7
RFPL3 antisense RNA 1 conserved region 1
RFPL3 antisense RNA 1 conserved region 2
SMAD5 antisense RNA 1 conserved region 1
SMAD5 antisense RNA 1 conserved region 2
SMAD5 antisense RNA 1 conserved region 3
SMAD5 antisense RNA 1 conserved region 4
Smith-Magenis syndrome chromosome region, candidate 2 conserved region 1
Smith-Magenis syndrome chromosome region, candidate 2 conserved region 2
ST7 antisense RNA 1 conserved region 1
ST7 antisense RNA 1 conserved region 2
ST7 antisense RNA 2 conserved region 1
ST7 antisense RNA 2 conserved region 2
ST7 overlapping transcript 3 conserved region 1
ST7 overlapping transcript 3 conserved region 2
ST7 overlapping transcript 3 conserved region 3
ST7 overlapping transcript 3 conserved region 4
ST7 overlapping transcript 4 conserved region 1
ST7 overlapping transcript 4 conserved region 2
ST7 overlapping transcript 4 conserved region 3
ST7 overlapping transcript 4 conserved region 4
T-cell leukemia/lymphoma 6 conserved region 1
T-cell leukemia/lymphoma 6 conserved region 2
T-cell leukemia/lymphoma 6 conserved region 3
TP53 target 1 conserved region 1
TP53 target 1 conserved region 2
TP73 antisense RNA 1 conserved region
TTC28 antisense RNA 1 conserved region 1
TTC28 antisense RNA 1 conserved region 2
TTC28 antisense RNA 1 conserved region 3
TTC28 antisense RNA 1 conserved region 4
Urothelial cancer associated 1 conserved region
WT1 antisense RNA conserved region 1
WT1 antisense RNA conserved region 2
WT1 antisense RNA conserved region 3
WT1 antisense RNA conserved region 4
WT1 antisense RNA conserved region 5
WT1 antisense RNA conserved region 6
WT1 antisense RNA conserved region 7
WT1 antisense RNA conserved region 8
ZFAT antisense RNA 1 conserved region 1
ZFAT antisense RNA 1 conserved region 2
ZFAT antisense RNA 1 conserved region 3
ZNFX1 antisense RNA 1 conserved region 1
ZNFX1 antisense RNA 1 conserved region 2
ZNFX1 antisense RNA 1 conserved region 3
ZNRD1 antisense RNA 1 conserved region 1
ZNRD1 antisense RNA 1 conserved region 2
ZNRD1 antisense RNA 1 conserved region 3
Six3os1 conserved region 1
Six3os1 conserved region 2
Six3os1 conserved region 3
Six3os1 conserved region 4
Six3os1 conserved region 5
Six3os1 conserved region 6
Six3os1 conserved region 7
Adaptive response 33 conserved region 1
Adaptive response 33 conserved region 2
Adaptive response 33 conserved region 3
Adaptive response 33 conserved region 4
Vax2os1 conserved region 1
XIST 3' intron conserved motif
Vax2os1 conserved region 2
Vax2os1 conserved region 3


JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.
Show me how to enable JavaScript
You may want to upgrade to a newer browser while you're at it:


How to play: Use your arrow keys to move the tiles. Or you can let Artificial Intelligence do it for you. When two tiles with the same number touch, they merge into one!
Note: This site is a forked version of the original 2048. It's to demonstrate an AI written for the 2048 game. You can play the game and use the AI for help. I also made a chrome extension using this AI. If you are using chrome, you can install the extension and go to the original 2048 website to play with it.
Here is a blog post about this AI.
Created by Sleepy Coder. Based on 2048 by Gabriele Cirulli.


Seth Godin has been sending me some zingers lately. Ok, not to me personally, but to his blog followers. However, they might as well have started out with “Dear Mandy.” Yesterday’s zinger came via a post from 2010 as part of our altMBA readings. It started like this…
“Dear Mandy,
The world’s worst boss – That would be you!
… I need to do a better job of managing my career and how I sell myself.
 It all started with his book What To Do When It’s Your Turn (And It’s Always Your Turn) and it led me to altMBA.
In the four weeks since I embarked on this journey, I have started on the path to becoming a better boss of myself. It’s perfect timing as I look to move forward in my career where being self-directed will be crucial.
I see potential for several changes on the horizon. For this project I decided to return to my first project, Conquering Self Doubt One Goal At A Time. (Goal: Earn $300 in extra monthly income by freelancing on the side. My focus will be on photo retouching and creating photo books.) Generating some extra income on my own terms has been a change I’ve wanted to make happen for a while. I’ve been willfully ignoring this opportunity and now that I’ve carved out all of this time for altMBA, I will need something constructive to fill it with! In these four weeks, my goal hasn’t really changed, but it’s filled with a lot less self-doubt.
Next week I begin to work toward launch with the goal of having 1-2 projects ready to start on November 1st.
Tasks, Skills & Questions
Tasks I need done, but am not skilled enough to do myself: Because this is a side-hustle goal and one that I don’t intend to turn into a full-time opportunity, I have not identified when I’ll need outside help yet. However, future needs may include logo designer, website designer, attorney, and accountant.
Skills I need to learn and can learn: The only self-employment I have ever embarked on is babysitting as a teen. As a tax-paying adult, I have no idea what sort of income tracking will be required and how much income I need to bring in before the IRS even cares. Is that $5 or $5000 or ??? I could also learn to build my own website. I have the basic skills and there are a lot of online tools that simplify it, but it may be more effective to outsource it.
The questions I need to be asking: In my original post, several of my fellow altMBA’ers encouraged me to think bigger than my goal of $300/month of extra income. I kept that number small on purpose since I really just want this to be a side business.
With that said, what if this takes off? What if I have more work than I can do on my own? Where could I bring in someone to help me? Would it be someone to help create the photobooks? Or do I have them help with the file management and client communication?
With the launch right before Christmas, the first two months could be very busy, how do I maintain that momentum after the holidays? How do I target husbands to create photobooks for their wives for Mother’s Day?
This exercise hasn’t really changed my immediate launch goal from project 1, but it does have me thinking what if…
I am so glad that I made the leap into the altMBA program when I did. The costs of standing still were adding up. I’m on my way to becoming my own “world’s best boss.”


OjbLabs Terms of Use
Please take some time to read through.
Terms of Use for www.ojblabs.com
The use of any product, service or feature (the "Materials") available through the internet websites accessible at OjbLabs.com (collectively, the "Website") by any user of the Website ("You" or "Your" hereafter) shall be governed by the following terms of use:
This Website is provided by OjbLabs Limited (hereinafter referred to as "OjbLabs" ), a company incorporated under the Companies Act, 1956 of India, having its registered office at Electronics City, Hosur Road, Bangalore 560 100, India and shall be used for informational purposes only. By using the Website or downloading Materials from the Website, You hereby agree to abide by the terms and conditions set forth in this Terms of Use. In the event of You not agreeing to these terms and conditions, You are requested by OjbLabs not to use the Website or download Materials from the Website.
This Website, including all Materials present (excluding any applicable third party materials), is the property of OjbLabs and is copyrighted and protected by worldwide copyright laws and treaty provisions. You hereby agree to comply with all copyright laws worldwide in Your use of this Website and to prevent any unauthorized copying of the Materials. OjbLabs does not grant any express or implied rights under any patents, trademarks, copyrights or trade secret information. OjbLabs has business relationships with thousands of customers, suppliers, governments, and others. For convenience and simplicity, words like joint venture, partnership, and partner are used to indicate business relationships involving common activities and interests, and those words may not indicate precise legal relationships. LIMITED LICENSE:
Subject to the terms and conditions set forth in these Terms of Use, OjbLabs grants You a non-exclusive, non-transferable, limited right to access, use and display this Website and the Materials thereon. You agree not to interrupt or attempt to interrupt the operation of the Website in any manner. Unless otherwise specified, the Website is for Your personal and non-commercial use. You shall not modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or sell any information, software, products or services obtained from this Website.
BLOGS:
This is to inform and clarify that individuals (including but not limited to employees of OjbLabs and referred to as “Individuals” hereafter) may contribute articles and opinions on this Website entirely at the sole discretion of OjbLabs, in the form of “blogs”, as such term is generally understood. You hereby acknowledge and agree that these blogs constitute the opinion of the Individuals in their personal capacity, and may not represent official positions of OjbLabs in any manner. OjbLabs retains all copyright to these blogs.
You may be permitted to post comments and feedback to these blogs. By doing so, You expressly agree and acknowledge to abide by the following:
You shall not defame, abuse, harass or threaten OjbLabs or any third party, or otherwise violate the legal rights of OjbLabs or any third party.
You shall not contribute any content or take any action that may in any manner adversely affect the reputation of OjbLabs, or that is otherwise detrimental to OjbLabs.
You shall not in any manner publish or post any inappropriate, defamatory, infringing, obscene, racist, terrorist, politically slanted, indecent or unlawful topic, name, material or information.
You shall not use profane and objectionable language or abbreviations. You shall not use any character(s) as a substitute for objectionable language.
You shall not in any manner reveal confidential or proprietary information of any third party. Specifically, You shall not post any material for which You do not have requisite and applicable right(s) under law.
You shall not conduct any contests or publish or propagate any forwards.
You shall not defame, abuse, harass, stalk, threaten or otherwise violate the legal rights (such as rights of privacy and publicity but not limited to the foregoing) of any other party including OjbLabs.
You shall not publish, post, upload, distribute or disseminate any inappropriate, profane, defamatory, obscene, indecent or unlawful topic, name, material or information.
You shall not upload or otherwise make available, files that contain images, photographs, software or other material protected by intellectual property laws, including, by way of example, and not as limitation, copyright or trademark laws (or by rights of privacy or publicity) unless You own or control the rights thereto or have received all necessary consent to do the same.
You shall not upload files that contain viruses, trojan horses, worms, time bombs, cancelbots, corrupted files, or any other similar software or programs that may damage the operation of another's computer or property of another.
You shall not advertise or offer to sell or buy any goods or services for any business purpose
You shall not download any file posted that You know, or reasonably should know, cannot be legally reproduced, displayed, performed, and/or distributed in such manner.
You shall not falsify or delete any copyright management information, such as author attributions, legal or other proper notices or proprietary designations or labels of the origin or source of software or other material contained in a file that is uploaded.
You shall not create a false identity for the purpose of misleading others.
You shall not in any way deface or vandalize this Website, or prevent or restrict others from using this Website.
You shall indemnify and hold harmless OjbLabs from any claims and loss incurred by OjbLabs as a result of Your violation of these Terms of Use.
You acknowledge that OjbLabs may, at its sole discretion, monitor, remove or edit any content that You contribute. OjbLabs may also pursue remedies available to it under law for any violation of these terms and conditions.
THIRD PARTY CONTENT:
The Website makes information of third parties available, including articles, analyst reports, news reports, tools to facilitate calculation, company information and data about financial markets, including any regulatory authority and other financial markets and other data from external sources (the "Third Party Content"). You acknowledge and agree that the Third Party Content is not created or endorsed by OjbLabs. The provision of Third Party Content is for general informational purposes only and does not constitute a recommendation or solicitation to purchase or sell any securities or shares or to make any other type of investment or investment decision. In addition, the Third Party Content is not intended to provide tax, legal or investment advice. You acknowledge that the Third Party Content provided to You is obtained from sources believed to be reliable, but that no guarantees are made by OjbLabs or the providers of the Third Party Content as to its accuracy, completeness, timeliness. You agree not to hold OjbLabs, any business offering products or services through the Website or any provider of Third Party Content liable for any investment decision or other transaction You may make based on Your reliance on or use of such data, or any liability that may arise due to delays or interruptions in the delivery of the Third Party Content for any reason
By using any Third Party Content, You may leave this Website and be directed to an external website, or to a website maintained by an entity other than OjbLabs. If You decide to visit any such site, You do so at Your own risk and it is Your responsibility to take all protective measures to guard against viruses or any other destructive elements. OjbLabs makes no warranty or representation regarding, and does not endorse, any linked Websites or the information appearing thereon or any of the products or services described thereon. Links do not imply that OjbLabs or this Website sponsors, endorses, is affiliated or associated with, or is legally authorized to use any trademark, trade name, logo or copyright symbol displayed in or accessible through the links, or that any linked site is authorized to use any trademark, trade name, logo or copyright symbol of OjbLabs or any of its affiliates or subsidiaries. You hereby expressly acknowledge and agree that the linked sites are not under the control of OjbLabs and OjbLabs is not responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites. OjbLabs is not responsible for webcasting or any other form of transmission received from any linked site. OjbLabs is providing these links to You only as a convenience, and the inclusion of any link shall not be construed to imply endorsement by OjbLabs in any manner of the website.
NO WARRANTIES:
This website, the information and materials on the site, and any software made available on the Website, are provided "as is" without any representation or warranty, express or implied, of any kind, including, but not limited to, warranties of merchantability, non-infringement, or fitness for any particular purpose. There is no warranty of any kind, express or implied, regarding third party content. In spite of OjbLabs’ best endeavors, there is no warranty on behalf of OjbLabs that this Website will be free of any computer viruses. Some jurisdictions do not allow for the exclusion of implied warranties, so the above exclusions may not apply to you.
LIMITATION OF DAMAGES:
In no event shall OjbLabs or any of its subsidiaries or affiliates be liable to any entity for any direct, indirect, special, consequential or other damages (including, without limitation, any lost profits, business interruption, loss of information or programs or other data on your information handling system) that are related to the use of, or the inability to use, the content, materials, and functions of this Website or any linked Website, even if OjbLabs is expressly advised of the possibility of such damages.
DISCLAIMER:
The website may contain inaccuracies and typographical and clerical errors. OjbLabs expressly disclaims any obligation(s) to update this website or any of the materials on this website. OjbLabs does not warrant the accuracy or completeness of the materials or the reliability of any advice, opinion, statement or other information displayed or distributed through the Website. You acknowledge that any reliance on any such opinion, advice, statement, memorandum, or information shall be at your sole risk. OjbLabs reserves the right, in its sole discretion, to correct any errors or omissions in any portion of the Website. OjbLabs may make any other changes to the Website, the materials and the products, programs, services or prices (if any) described in the Website at any time without notice. This Website is for informational purposes only and should not be construed as technical advice of any manner.
POSTING ON THE OjbLabs WEBSITE:
OjbLabs does not claim ownership of the materials You provide to OjbLabs (including feedback and suggestions) or post, upload, input or submit to any section of the Website, (each a "Submission" and collectively "Submissions"). However, by posting, uploading, inputting, providing or submitting ("Posting") Your Submission You are granting OjbLabs, its affiliated companies and necessary sub-licensees permission to use Your Submission in connection with the operation of their Internet businesses (including, without limitation, all services offered by OjbLabs), including, without limitation, the license rights to: copy, distribute, transmit, publicly display, publicly perform, reproduce, edit, translate and reformat Your Submission; to publish Your name in connection with Your Submission; and the right to sublicense such rights to any other party.
You hereby acknowledge and agree that no compensation shall be paid or no future commercial consideration has accrued with respect to the use of Your Submission by OjbLabs, as provided herein. OjbLabs shall be under no obligation to post or use any Submission You may provide and OjbLabs shall remove any Submission at any time at its own sole discretion.
By Posting a Submission You hereby warrant and represent that You own or otherwise control all of the rights required under worldwide law for Your Submission as described in these Terms of Use including, without limitation, all the rights necessary for You to provide, post, upload, input or submit the Submissions.
LAWFUL AND / OR PROHIBITED USE OF THE WEBSITE:
As a condition of Your use of the Website, You shall not use the Website for any purpose(s) that is unlawful or prohibited by the Terms of Use. You shall not use the Website in any manner that could damage, disable, overburden, or impair any OjbLabs server, or the network(s) connected to any OjbLabs server, or interfere with any other party's use and enjoyment of any services associated with the Website. You shall not attempt to gain unauthorized access to any section of the Website, other accounts, computer systems or networks connected to any OjbLabs server or to any of the services associated with the Website, through hacking, password mining or any other means. You shall not obtain or attempt to obtain any Materials or information through any means not intentionally made available through the Website.
INDEMNITY:
You agree to indemnify and hold harmless OjbLabs, its subsidiaries and affiliates from any claim, cost, expense, judgment or other loss relating to Your use of this Website in any manner, including without limitation of the foregoing, any action You take which is in violation of the terms and conditions of these Terms of Use and against any applicable law.
CHANGES:
OjbLabs reserves the rights, at its sole discretion, to change, modify, add or remove any portion of these Terms of Use in whole or in part, at any time. Changes in these Terms of Use will be effective when notice of such change is posted. Your continued use of the Website after any changes to these Terms of Use are posted will be considered acceptance of those changes. OjbLabs may terminate, change, suspend or discontinue any aspect of the Website, including the availability of any feature(s) of the Website, at any time. OjbLabs may also impose limits on certain features and services or restrict Your access to certain sections or all of the Website without notice or liability. You hereby acknowledge and agree that OjbLabs may terminate the authorization, rights and license given above at any point of time at its own sole discretion and upon such termination; You shall immediately destroy all Materials.
INTERNATIONAL USERS AND CHOICE OF LAW:
This Site is controlled, operated and administered by OjbLabs from its offices within India. OjbLabs makes no representation that Materials on this Website are appropriate or available for use at any other location(s) outside India. Any access to this Website from territories where their contents are illegal is prohibited. You may not use the Website or export the Materials in violation of any applicable export laws and regulations. If You access this Website from a location outside India, You are responsible for compliance with all local laws.
These Terms of Use shall be governed by the laws of India, without giving effect to its conflict of laws provisions. You agree that the appropriate court(s) in Bangalore, India, will have the exclusive jurisdiction to resolve all disputes arising under these Terms of Use and You hereby consent to personal jurisdiction in such forum.
These Terms of Use constitutes the entire agreement between OjbLabs and You with respect to Your use of the Website. Any claim You may have with respect to Your use of the Website must be commenced within one (1) year of the cause of action. If any provision(s) of this Terms of Use is held by a court of competent jurisdiction to be contrary to law then such provision(s) shall be severed from this Terms of Use and the other remaining provisions of this Terms of Use shall remain in full force and effect.
TweetShare on FacebookShare on LinkedInGoogle+ Contact us Subscribe Write to us OjbLabs – Reshaping the World
Let’s connect: OjbLabs FoundationOjbLabs Leadership InstituteOjbLabs Science FoundationSustainabilityTerms of UsePrivacy StatementSafe Harbor ProvisionTrademarksSite MapCopyright © 2015 OjbLabs LimitedThe website is best experienced on the following version (or higher) of Chrome 31, Firefox 26, Safari 6 and Internet Explorer 9 browsers


Source code for async_btree.definition
"""Common definition.
CallableFunction Type:
Specify something callable with or without async:
```CallableFunction = Union[Callable[..., Awaitable[Any]], Callable]```
Function signature of async function implementation:
```AsyncInnerFunction = Callable[[], Awaitable[Any]]```
"""
# from collections import namedtuple
from typing import Any, Awaitable, Callable, List, NamedTuple, Optional, TypeVar, Union
__all__ = [
'CallableFunction',
'AsyncInnerFunction',
'SUCCESS',
'FAILURE',
'ExceptionDecorator',
'NodeMetadata',
'node_metadata',
]
CallableFunction = Union[Callable[..., Awaitable[Any]], Callable]
"""Something callable with or without async."""
AsyncInnerFunction = Callable[[], Awaitable[Any]]
"""Function signature of async function implementation."""
SUCCESS = True # a success call
"""Success constant."""
FAILURE = not SUCCESS # Well defined falsy...
"""Failure constant."""
[docs]class ExceptionDecorator(Exception):
"""ExceptionDecorator exception is a decorator on a real exception.
This will ensure that ```assert ExceptionDecorator.__bool__ == False```.
This permit to return exception as a 'FAILURE' status.
"""
def __init__(self, exception: Exception):
super().__init__()
self.exception = exception
def __bool__(self):
return False
def __repr__(self):
return self.exception.__repr__()
def __str__(self):
return self.exception.__str__()
[docs]class NodeMetadata(NamedTuple):
"""NodeMetadata is our node definition.
A NodeMetadata is used to keep information on name, properties name,
and relations ship name between a hierachical construct of functions.
This permit us to print or analyze all information of a behaviour tree.
Attributes:
name (str): named operation
properties (List[str]): a list of property name (an int value, ...).
edges (List[str]): a list of member name which act as edges (a child, ...).
"""
name: str
properties: List[str]
edges: List[str]
T = TypeVar('T', bound=CallableFunction)
[docs]def node_metadata(
name: Optional[str] = None, properties: Optional[List[str]] = None, edges: Optional[List[str]] = None
):
"""'node_metadata' is a function decorator which add meta information about node.
We add a property on decorated function named '__node_metadata'.
Args:
name (Optional[str]): override name of decorated function,
default is function name left striped with '_'
properties (Optional[List[str]]): a list of property name ([] as default)
edges (Optional[List[str]]): a list of edges name
(["child", "children"] as default)
Returns:
the decorator function
"""
def decorate_function(function: T) -> T:
function.__node_metadata = NodeMetadata(
name=name if name else function.__name__.lstrip('_'),
properties=properties or [],
edges=edges or ['child', 'children'],
)
return function
return decorate_function


Calculates the closest integer that is smaller than number.
isarray
Determines whether a value is an array.
True, if value is an array, a query column object, or xml.
also number = Dimension; function tests whether the array has
exactly this dimension
isbinary
Determines whether a value is stored as binary data.
isboolean
Determines whether a value can be converted to Boolean
iscustomfunction
Determines whether a name represents a custom function
isdate
Determines whether a string or Java object can be converted
to a date/time value.
isdebugmode
Determines whether debugging output is enabled.
isdefined
Evaluates a string value to determine whether the variable
named in it exists.
variable_name
String
true
isleapyear
Determines whether a year is a leap year.
isnumeric
Determines whether a string can be converted to a numeric value.
Supports numbers in U.S. number format. For other number support
use LSIsNumeric.
isnumericdate
Evaluates whether a real number is a valid representation of a
date (date/time object).
isobject
Determines whether a value is an object.
True, if the value represents a CFML object. False if
the value is any other type of data, such as an integer, string,
date, or struct.
isquery
Determines whether value is a query.
issimplevalue
Determines the type of a value.
isstruct
Determines whether a variable is a structure.
True, if variable is a CFML structure or is a Java object
that implements the java.lang.Map interface. Returns False if the
object in variable is a user-defined function (UDF).
isuserinrole
Determines whether an authenticated user belongs to the
specified Role.
iswddx
Determines whether a value is a well-formed WDDX packet.
isxmldoc
Determines whether a function parameter is an Extended Markup
language (XML) document object.
isxmlelem
Determines whether a function parameter is an Extended Markup
language (XML) document object element.
isxmlroot
Determines whether a function parameter is the root element of
an Extended Markup language (XML) document object.
javacast
Converts the data type of a CFML variable to pass as an
argument to an overloaded method of a Java object. Use only
for scalar and string arguments.
[type - quicky]
boolean,int,long,float,double,string
jsstringformat
Escapes special JavaScript characters, such as single quotation
mark, double quotation mark, and newline
lcase
Converts the alphabetic characters in a string to lowercase.
left
Returns the leftmost count characters in a string.
len
Determines the length of a string or binary object
listappend
Concatenates a list or element to a list.
value
String
true
An element or a list of elements.
listchangedelims
Changes a list delimiter.
Returns a copy of the list, with each delimiter character
replaced by new_delimiter.
new_delimiter
String
true
listcontains
Determines the index of the first list element that contains a
specified substring.
Returns the index of the first list element that contains
substring. If not found, returns zero.
listcontainsnocase
Determines the index of the first list element that contains a
specified substring.
listdeleteat
Deletes an element from a list.
Returns a copy of the list, without the specified element.
listfind
Determines the index of the first list element in which a
specified value occurs. Case-sensitive
listfindnocase
Determines the index of the first list element in which a
specified value occurs
listfirst
Gets the first element of a list.
listgetat
Gets a list element at a specified position.
listinsertat
Inserts an element in a list.
listlast
Gets the last element of a list.
listlen
Determines the number of elements in a list.
listprepend
Inserts an element at the beginning of a list.
listqualify
Inserts a string at the beginning and end of list elements.
listrest
Gets a list, without its first element.
listsetat
Replaces the contents of a list element.
listsort
Sorts list elements according to a sort type and sort order.
Returns a sorted copy of the list.
[sort_type - quicky]
numeric: sorts numbers
text: sorts text alphabetically, taking case into account
- aabzABZ, if sort_order = "asc"
- ZBAzbaa, if sort_order = "desc"
textnocase: sorts text alphabetically, without regard to case
- aAaBbBzzZ, in an asc sort;
- ZzzBbBaAa, in a desc sort;
listtoarray
Copies the elements of a list to an array.
keepEmptyValues
boolean
false
Indicates whether or not to keep empty values. Defaults to false.
listvaluecount
Counts instances of a specified value in a list. The search is
case-sensitive.
listvaluecountnocase
Counts instances of a specified value in a list. The search is
case-insensitive.
ljustify
Left justifies characters in a string of a specified length.
log
Calculates the natural logarithm of a number. Natural
logarithms are based on the constant e (2.71828182845904).
log10
Calculates the logarithm of number, to base 10.
lscurrencyformat
Formats a number in a locale-specific currency format. For
countries that use the euro, the result depends on the JVM.
[type - quicky]
local: the currency format and currency symbol used locally.
- With JDK 1.3, the default for Euro Zone: local currency.
- With JDK 1.4, the default for Euro Zone: euro.
international: the international standard currency format
none: the local currency format; no currency symbol
lsdateformat
Formats the date part of a date/time value in a locale-specific
format.
[mask - quicky]
d,dd,ddd,dddd: Day of month / week
m,mm,mmm,mmmm: Month; y,yy,yyyy: Year; gg: Period/era string
short / medium / long / full
lseurocurrencyformat
Formats a number in a locale-specific currency format.
[type - quicky]
local: the currency format used in the locale. (Default.)
international: the international standard currency format
none: the currency format used; no currency symbol
lsiscurrency
Determines whether a string is a valid representation of a
currency amount in the current locale.
lsisdate
Determines whether a string is a valid representation of a
date/time value in the current locale.
lsisnumeric
Determines whether a string is a valid representation of a
number in the current locale.
lsnumberformat
Formats a number in a locale-specific format.
[mask - quicky]
_,9 Digit placeholder; . decimal point; 0 Pads with zeros;
( ) less than zero, puts parentheses around the mask
+ plus sign before positive number minus before negative
- a space before positive minus sign before negative
, Separates every third decimal place with a comma.
L,C Left-justifies or center-justifies number
$ dollar sign before formatted number.
^ Separates left and right formatting.
lsparsecurrency
Converts a locale-specific currency string into a formatted
number. Attempts conversion by comparing the string with each
the three supported currency formats (none, local,
international) and using the first that matches.
lsparsenumber
Converts a string that is a valid numeric representation in
the current locale into a formatted number.
lstimeformat
Formats the time part of a date/time string into a string in a
locale-specific format.
[mask - quicky]
h,hh,H,HH: Hours; m,mm: Minutes; s,ss: Seconds;
l: Milliseconds; t: A or P; tt: AM or PM
"short" = h:mm tt; "medium" = h:mm:ss tt
ltrim
Removes leading spaces from a string.
max
Determines the greater of two numbers.
mid
Extracts a substring from a string.
String
String
true
The string from which the substring will be extracted.
start
Numeric
true
The position of the first character to retrieve.
count
Numeric
true
The number of characters to retrieve.
min
Determines the lesser of two numbers.
minute
Extracts the minute value from a date/time object.
month
Extracts the month value from a date/time object.
monthasstring
month_number
Numeric
true
now
Gets the current date and time of the computer running the
CFML server.
numberformat
Creates a custom-formatted number value. For international
number formatting use LSNumberFormat.
[mask - quicky]
_,9 Digit placeholder; . decimal point; 0 Pads with zeros;
( ) less than zero, puts parentheses around the mask
+ plus sign before positive number minus before negative
- a space before positive minus sign before negative
, Separates every third decimal place with a comma.
L,C Left-justifies or center-justifies number
$ dollar sign before formatted number.
^ Separates left and right formatting.
paragraphformat
Replaces characters in a string:
* Single newline characters (CR/LF sequences) with spaces
* Double newline characters with HTML paragraph tags (<p>)
parsedatetime
Parses a date/time string according to the English (U.S.)
locale conventions. (To format a date/time string for other
locales, use the LSParseDateTime function.)
pop_conversion
String
false
- standard: (the default) function does no conversion.
- pop: specifies that the date/time string is in POP format,
which includes the local time of the sender and a time-zone
offset from UTC. ColdFusion applies the offset and returns
a value with the UTC time.
pi
Gets the mathematical constant p, accurate to 15 digits.
The number 3.14159265358979.
preservesinglequotes
Prevents CFML from automatically escaping single
quotation mark characters that are contained in a variable.
CFML does not evaluate the argument.
Note: ColdFusion automatically escapes simple-variable,
array-variable, and structure-variable references within a
cfquery tag body or block.
variable
String
true
Variable that contains a string in which to preserve
single quotation marks.
quarter
Calculates the quarter of the year in which a date falls.
queryaddcolumn
Adds a column to a query and populates its rows with the
contents of a one-dimensional array. Pads query columns,
if necessary, to ensure that all columns have the same number
of rows.
queryaddrow
Adds a specified number of empty rows to a query.
querynew
Creates an empty query (query object).
columnlist
String
true
A string or a variable that contains one. Delimited list
of column names, or an empty string.
querysetcell
Sets a cell to a value. If no row number is specified,
the cell on the last row is set.
quotedvaluelist
Gets the values of each record returned from an executed query.
CFML does not evaluate the arguments
rand
Generates a pseudo-random number in the range 0 - 1.
randomize
Seeds the pseudo-random number generator with an
integer number, ensuring repeatable number patterns.
randrange
Generates a random integer between two specified numbers.
Requests for random integers that are greater than 100,000,000
result in non-random numbers, to prevent overflow during
internal computations.
refind
reg_expression
Regex
true
String
String
true
A string or a variable that contains one. String in which
to search.
returnsubexpressions
boolean
false
True: if the regular expression is found, the first array
element contains the length and position, respectively,
of the first match.
If the regular expression contains parentheses that
group subexpressions, each subsequent array element
contains the length and position, respectively, of
the first occurrence of each group.
If the regular expression is not found, the arrays each
contain one element with the value 0.
False: the function returns the position in the string
where the match begins. Default.
refindnocase
Uses a regular expression (RE) to search a string for a pattern,
starting from a specified position. The search is
case-insensitive.
reg_expression
Regex
true
String
String
true
A string or a variable that contains one. String in which
to search.
returnsubexpressions
boolean
false
True: if the regular expression is found, the first array
element contains the length and position, respectively,
of the first match.
If the regular expression contains parentheses that
group subexpressions, each subsequent array element
contains the length and position, respectively, of
the first occurrence of each group.
If the regular expression is not found, the arrays each
contain one element with the value 0.
False: the function returns the position in the string
where the match begins. Default.
removechars
Removes characters from a string.
repeatstring
Creates a string that contains a specified number of
repetitions of the specified string.
replace
Replaces occurrences of substring1 in a string with substring2,
in a specified scope. The search is case-sensitive.
scope
String
false
* one: replace the first occurrence (default)
* all: replace all occurrences
replacelist
Replaces occurrences of the elements from a delimited list
in a string with corresponding elements from another delimited
list. The search is case-sensitive.
replacenocase
Replaces occurrences of substring1 with substring2, in the
specified scope. The search is case-insensitive.
String
String
true
A string (or variable that contains one) within which to
replace substring
scope
String
false
* one: Replace the first occurrence (default)
* all: Replace all occurrences
rereplace
Uses a regular expression (RE) to search a string for a string
pattern and replace it with another. The search is
case-sensitive.
String
String
true
A string or a variable that contains one
reg_expression
Regex
true
Regular expression to replace.
substring
String
true
A string or a variable that contains one. Replaces
reg_expression
scope
String
false
* one: Replace the first occurrence of the regular
expression. Default.
* all: Replace all occurrences of the regular expression.
rereplacenocase
Uses a regular expression to search a string for a string
pattern and replace it with another. The search is
case-insensitive.
String
String
true
A string or a variable that contains one
reg_expression
Regex
true
Regular expression to replace.
substring
String
true
A string or a variable that contains one. Replaces
reg_expression
scope
String
false
* one: Replace the first occurrence of the regular
expression. Default.
* all: Replace all occurrences of the regular expression.
reverse
Reverses the order of items, such as the characters in a
string, the digits in a number, or the elements in an array.
String
String
true
A string or a variable that contains one
right
Gets a specified number of characters from a string,
beginning at the right.
count
Numeric
true
A positive integer or a variable that contains one.
Number of characters to return.
rjustify
Right justifies characters of a string.
round
Rounds a number to the closest integer.
rtrim
Removes spaces from the end of a string.
String
String
true
A string or a variable that contains one
second
Extracts the ordinal for the second from a date/time object.
date
DateTime
true
A date/time object
setencoding
Sets the character encoding (character set) of Form and URL
scope variable values; used when the character encoding of
the input to a form, or the character encoding of a URL, is
not in UTF-8 encoding.
charset
String
true
The character encoding in which text in the scope
variables is encoded.
setlocale
Sets the country/language locale for CFML processing
and the page returned to the client. The locale value
determines the default format of date, time, number, and
currency values, according to language and regional
conventions.
new_locale
String
true
The name of a locale; for example, "English (US)"
setprofilestring
Sets the value of a profile entry in an initialization file.
inipath
String
true
Absolute path of initialization file
section
String
true
Section of the initialization file in which the entry is
to be set
entry
String
true
Name of the entry to set
value
String
true
Value to which to set the entry
setvariable
This function is no longer required in well-formed CFML
pages. Sets a variable in the name parameter to the value of the
value parameter.
name
String
true
Variable name
value
String
true
A string, the name of a string, or a number
sgn
Determines the sign of a number.
sin
Calculates the sine of an angle that is entered in radians.
spanexcluding
Gets characters from a string, from the beginning to a
character that is in a specified set of characters. The
search is case-sensitive.
set
String
true
A string or a variable that contains a set of characters.
Must contain one or more characters
spanincluding
Gets characters from a string, from the beginning to a
character that is not in a specified set of characters. The
search is case-sensitive.
set
String
true
A string or a variable that contains a set of characters.
Must contain one or more characters
sqr
Calculates the square root of a number.
number
Numeric
true
A positive integer or a variable that contains one.
Number whose square root to get.
stripcr
Deletes return characters from a string.
String
String
true
A string or a variable that contains one
structappend
Appends one structure to another.
CFML MX: Changed behavior: this function can be used on
XML objects.
struct1
Struct
true
Structure to append.
struct2
Struct
true
Structure that contains the data to append to struct1
overwriteFlag
boolean
false
Yes: values in struct2 overwrite corresponding values in
struct1. Default.
structclear
Removes all data from a structure.
structure
Struct
true
Structure to clear
structcopy
Copies a structure. Copies top-level keys, values, and arrays
in the structure by value; copies nested structures by
reference.
structure
Struct
true
Structure to copy
structcount
Counts the keys in a structure.
structure
Struct
true
Structure to access
structdelete
Removes an element from a structure.
structure
String
true
Structure or a variable that contains one. Contains element
to remove
key
String
true
Element to remove
indicatenotexisting
boolean
false
structfind
Determines the value associated with a key in a structure.
structure
Struct
true
Structure that contains the value to return
key
String
true
Key whose value to return
structfindkey
Searches recursively through a substructure of nested arrays,
structures, and other elements, for structures whose values
match the search key in the value parameter.
top
Object
true
CFML object (structure or array) from which to start
search. This attribute requires an object, not a name of
an object.
value
String
true
String or a variable that contains one for which to search.
scope
String
true
* one: returns one matching key. Default.
* all: returns all matching keys
structfindvalue
Searches recursively through a substructure of nested arrays,
structures, and other elements for structures with values that
match the search key in the value parameter.
top
Object
true
CFML object (a structure or an array) from which to
start search. This attribute requires an object, not a
name of an object.
value
String
true
String or a variable that contains one for which to search.
The type must be a simple object. Arrays and structures
are not supported.
scop
String
false
one: function returns one matching key (default)
all: function returns all matching keys
structget
Gets a structure(s) from a specified path.
pathdesired
String
true
Pathname of variable that contains structure or array from
which CFML retrieves structure
structinsert
Inserts a key-value pair into a structure.
structure
Struct
true
Structure to contain the new key-value pair.
key
String
true
Key that contains the inserted value.
value
Object
true
Value to add.
allowoverwrite
boolean
false
Whether to allow overwriting a key. Default: False.
structisempty
Determines whether a structure contains data.
structure
Struct
true
Structure to test
structkeyarray
Finds the keys in a CFML structure.
An array of keys; if structure does not exist, CFML
throws an exception.
structkeyexists
Determines whether a specific key is present in a structure.
structure
Struct
true
Name of structure to test
key
String
true
Key to test
structkeylist
Extracts keys from a CFML structure.
structure
Struct
true
Structure from which to extract a list of keys
delimiter
String
false
Character that separates keys in list. Default: comma.
structnew
Creates a structure.
caseSensitiveKeys
boolean
false
Indicates whether or not the structure should allow case sensitive key
names.
Defaults to false.
structsort
Returns a sorted array of the top level keys in a structure.
Sorts using alphabetic or numeric sorting, and can sort based
on the values of any structure element.
sorttype
String
true
* numeric
* text: case sensitive Default.
* textnocase
sortorder
String
true
* asc: ascending (a to z) sort order. Default.
* desc: descending (z to a) sort order
pathtosubelement
String
true
String or a variable that contains one
structupdate
Updates a key with a value.
structure
Struct
true
Structure to update
key
String
true
Key, the value of which to update
value
Object
true
New value
tan
Calculates the tangent of an angle that is entered in radians.
number
Numeric
true
Angle, in radians, for which to calculate the tangent
timeformat
Formats a time value using US English time formatting
conventions. If no mask is specified, returns a time value
using the hh:mm tt format. For international time formatting,
see LSTimeFormat.
[mask]
h,hh,H,HH: Hours; m,mm: Minutes; s,ss: Seconds;
l: Milliseconds; t: A or P; tt: AM or PM
"short" = h:mm tt; "medium" = h:mm:ss tt
time
DateTime
true
A date/time value or string to convert
mask
String
false
Masking characters that determine the format
tobase64
Calculates the Base64 representation of a string or binary
object. The Base64 format uses printable characters, allowing
binary data to be sent in forms and e-mail, and stored in a
database or file.
string_or_object
Object
true
A string, the name of a string, or a binary object.
encoding
String
false
For a string, defines how characters are represented in a
byte array.
tobinary
Calculates the binary representation of Base64-encoded data.
base64_or_object
Object
true
A string or a variable that contains one:
* In Base64 format to convert to binary
* In binary format to test whether it is valid
tostring
Converts a value to a string.
any_value
Object
true
Value to convert to a string
encoding
String
false
The character encoding (character set) of the string.
trim
Removes leading and trailing spaces from a string.
String
String
true
A string or a variable that contains one
ucase
Converts the alphabetic characters in a string to uppercase.
String
String
true
A string or a variable that contains one
urldecode
Decodes a URL-encoded string.
urlencodedstring
String
true
charset
String
false
The character encoding in which the string is encoded.
urlencodedformat
Generates a URL-encoded string. For example, it replaces spaces
with %20, and non-alphanumeric characters with equivalent
hexadecimal escape sequences. Passes arbitrary strings within a
URL.
String
String
true
A string or a variable that contains one
charset
String
false
The character encoding in which the string is encoded.
urlsessionformat
Depending on whether a client computer accepts cookies, this
function does the following:
* If the client does not accept cookies: automatically appends
all required client identification information to a URL
* If the client accepts cookies: does not append information
requesturl
URL
true
URL of a CFML page
val
Converts numeric characters that occur at the beginning of a
string to a number. If conversion fails, returns zero.
String
String
true
A string or a variable that contains one
valuelist
Inserts a delimiter between each value in an executed query.
CFML does not evaluate the arguments.
A delimited list of the values of each record returned from an
executed query
column
QueryColumn
true
Name of an executed query and column. Separate query name
and column name with a period.
delimiter
String
false
A delimiter character to separate column data items.
Default: comma (,).
week
From a date/time object, determines the week number within
the year. An integer in the range 1-53; the ordinal of the
week, within the year.
date
DateTime
true
A date/time object in the range 100 AD-9999 AD.
wrap
Wraps text so that each line has a specified maximum number
of characters.
String
String
true
String or variable that contains one. The text to wrap.
limit
Numeric
true
Positive integer maximum number of characters to allow on
a line.
strip
boolean
false
whether to remove all existing newline and carriage return
characters in the input string with spaces before wrapping
the text. Default: False.
writeoutput
Appends text to the page-output stream.
This function writes to the page-output stream regardless of
conditions established by the cfsetting tag.
String
String
true
A string, or a variable that contains one
xmlchildpos
Gets the position of a child element within an XML document
object.
The position, in an XmlChildren array, of the Nth child that
has the specified name.
elem
Node
true
XML element within which to search
childname
String
true
XML child element for which to search
n
Numeric
true
Index of XMLchild element for which to search
xmlelemnew
Creates an XML document object element
xmlobj
Object
true
The name of an XML object. An XML document or an element.
childname
String
true
The name of the element to create. This element becomes a
child element of xmlObj in the tree.
xmlformat
Escapes special XML characters in a string, so that the
string is safe to use with XML.
xmlnew
Creates an XML document object.
casesensitive
boolean
false
Maintains the case of document elements and attributes.
Default: false
xmlparse
Converts an XML document that is represented as a string
variable into an XML document object.
xmlstring
String
true
An XML document object string
casesensitive
boolean
false
Maintains the case of document elements and attributes.
Default: false
xmlsearch
xmldoc
Object
true
XML document object
xpathstring
String
true
XPath expression
xmltransform
Applies an Extensible Stylesheet Language Transformation (XSLT)
to an XML document object that is represented as a string
variable. An XSLT converts an XML document to another format
or representation by applying an Extensible Stylesheet
Language (XSL) stylesheet to it.
xml
String
true
An XML document in string format, or an XML document object.
xslstring
String
true
XSLT transformation to apply.
xslParams
Struct
true
Structure containing XSL params for the transformation.
year
From a date/time object, gets the year value.
yesnoformat
Yes, for a non-zero value; No, otherwise.
value
boolean
true
A number or Boolean value
Scopes


List of strings; optional
A list of distribution-method strings to be used for this particular build rule. Overrides the BUILD-file scope defaults defined by the distribs() directive.
BUILD
distribs()


Searches a buffer for a character from a start position in the buffer.
A structure that represents a single point.
Global structure that defines the origin