text:
WebdriverIO Dot Reporter
========================

> A WebdriverIO plugin to report in dot style.

![Dot Reporter](/img/dot.png "Dot Reporter")

## Installation

The easiest way is to keep `@wdio/dot-reporter` as a devDependency in your `package.json`.

```json
{
  "devDependencies": {
    "@wdio/dot-reporter": "^5.0.0"
  }
}
```

You can simple do it by:

```bash
npm install @wdio/dot-reporter --save-dev
```

Instructions on how to install `WebdriverIO` can be found [here](/docs/gettingstarted.html).

## Configuration

Following code shows the default wdio test runner configuration. Just add `'dot'` as reporter
to the array.

```js
// wdio.conf.js
module.exports = {
  // ...
  reporters: ['dot'],
  // ...
};
```

## Development

All commands can be found in the package.json. The most important are:

Watch changes:

```sh
$ npm run watch
```

Run tests:

```sh
$ npm test

# run test with coverage report:
$ npm run test:cover
```

Build package:

```sh
$ npm build
```

----

For more information on WebdriverIO see the [homepage](https://webdriver.io).


text:
void octree::getBoundaries(tree_structure &tree, real4 &r_min, real4 &r_max) {
  //Start reduction to get the boundary's of the system
  boundaryReduction.set_arg<int>(0, &tree.n);
  boundaryReduction.set_arg<cl_mem>(1, tree.bodies_Ppos.p());
  boundaryReduction.set_arg<cl_mem>(2, devMemRMIN.p());
  boundaryReduction.set_arg<cl_mem>(3, devMemRMAX.p());
  boundaryReduction.setWork(tree.n, NTHREAD_BOUNDARY, NBLOCK_BOUNDARY);  //256 threads and 120 blocks in total
  boundaryReduction.execute(execStream->s());
  devMemRMIN.d2h();     //Need to be defined and initialized somewhere outside this function
  devMemRMAX.d2h();     //Need to be defined and initialized somewhere outside this function
  r_min = make_real4(+1e10, +1e10, +1e10, +1e10);
  r_max = make_real4(-1e10, -1e10, -1e10, -1e10);
  //Reduce the blocks, done on host since its
  //A faster and B we need the results anyway
  for (int i = 0; i < 120; i++) {
    r_min.x = std::min(r_min.x, devMemRMIN[i].x);
    r_min.y = std::min(r_min.y, devMemRMIN[i].y);
    r_min.z = std::min(r_min.z, devMemRMIN[i].z);
    r_max.x = std::max(r_max.x, devMemRMAX[i].x);
    r_max.y = std::max(r_max.y, devMemRMAX[i].y);
    r_max.z = std::max(r_max.z, devMemRMAX[i].z);
  }
  rMinLocalTree = r_min;
  rMaxLocalTree = r_max;
}

void octree::sort_bodies(tree_structure &tree, bool doDomainUpdate) {
  //We assume the bodies are already onthe GPU
  devContext.startTiming(execStream->s());
  real4 r_min = {+1e10, +1e10, +1e10, +1e10};
  real4 r_max = {-1e10, -1e10, -1e10, -1e10};
  if (doDomainUpdate) {
    getBoundaries(tree, r_min, r_max);
    //Sync the boundary over the various processes
    if(this->mpiGetNProcs() > 1) {
      this->sendCurrentRadiusInfo(r_min, r_max);
    }
    rMinGlobal = r_min;
    rMaxGlobal = r_max;
  }
  r_min = rMinGlobal;
  r_max = rMaxGlobal;
  //Compute the boundarys of the tree
  real size = 1.001f * std::max(r_max.z - r_min.z,
		       std::max(r_max.y - r_min.y, r_max.x - r_min.x));
  tree.corner = make_real4(0.5f*(r_min.x + r_max.x) - 0.5f*size,
			   0.5f*(r_min.y + r_max.y) - 0.5f*size,
			   0.5f*(r_min.z + r_max.z) - 0.5f*size, size);
  tree.domain_fac = size/(1 << MAXLEVELS);
  float idomain_fac = 1.0f/tree.domain_fac;
  float domain_fac  = tree.domain_fac;
  tree.corner.w = domain_fac;
  //Call the GPUSort function, since we made it general
  //into a uint4 so we can extend the tree to 96bit key
  //we have to convert to 64bit key to a 96bit for sorting
  //and back from 96 to 64
  my_dev::dev_mem<uint4> srcValues(devContext);
  //The generalBuffer1 has size uint*4*N*3
  //this buffer gets part: 0-uint*4*N
  srcValues.cmalloc_copy(tree.generalBuffer1, tree.n, 0);
  //Compute the keys directly into srcValues
  // will be sorted into tree.bodies_key below
  build_key_list.set_arg<cl_mem>(0, srcValues.p());
  build_key_list.set_arg<cl_mem>(1, tree.bodies_Ppos.p());
  build_key_list.set_arg<int>(2, &tree.n);
  build_key_list.set_arg<real4>(3, &tree.corner);
  build_key_list.setWork(tree.n, 128); //128 threads per block
  build_key_list.execute(execStream->s());
  // If srcValues and buffer are different, then the original values
  // are preserved, if they are the same srcValues will be overwritten
  if(tree.n > 0)
    gpuSort(devContext, srcValues, tree.bodies_key,srcValues, tree.n, 32, 3, tree);
  devContext.stopTiming("Sorting", 0, execStream->s());
  //Call the reorder data functions
  devContext.startTiming(execStream->s());
  static int oneRunFull = 0;
  //JB this if statement is required untill I fix the order
  //of functions in main.cpp
  if(oneRunFull == 1) {
    my_dev::dev_mem<real4> real4Buffer1(devContext);
    my_dev::dev_mem<int>   intBuffer1(devContext);
    int genBufOffset = real4Buffer1.cmalloc_copy(tree.generalBuffer1, tree.n, 0);
        genBufOffset = intBuffer1.cmalloc_copy(tree.generalBuffer1, tree.n, genBufOffset);
    dataReorderR4.set_arg<int>(0, &tree.n);
    dataReorderR4.set_arg<cl_mem>(1, tree.bodies_key.p());
    dataReorderR4.setWork(tree.n, 512);
    //Position, velocity and acc0
    dataReorderR4.set_arg<cl_mem>(2, tree.bodies_Ppos.p());
    dataReorderR4.set_arg<cl_mem>(3, real4Buffer1.p());
    dataReorderR4.set_arg<cl_mem>(4, tree.bodies_ids.p());
    dataReorderR4.set_arg<cl_mem>(5, intBuffer1.p());
    dataReorderR4.set_arg<cl_mem>(6, tree.oriParticleOrder.p());
    dataReorderR4.execute(execStream->s());
    tree.bodies_Ppos.copy_devonly(real4Buffer1,  tree.n);
    tree.bodies_ids.copy_devonly (intBuffer1,    tree.n);
  } else {
    oneRunFull = 1;
    my_dev::dev_mem<real4>  real4Buffer1(devContext);
    my_dev::dev_mem<real4>  real4Buffer2(devContext);
    my_dev::dev_mem<real4>  real4Buffer3(devContext);
    int genBufOffset1 = real4Buffer1.cmalloc_copy(tree.generalBuffer1, tree.n, 0);
        genBufOffset1 = real4Buffer2.cmalloc_copy(tree.generalBuffer1, tree.n, genBufOffset1);
        genBufOffset1 = real4Buffer3.cmalloc_copy(tree.generalBuffer1, tree.n, genBufOffset1);
    dataReorderCombined.set_arg<int>(0, &tree.n);
    dataReorderCombined.set_arg<cl_mem>(1, tree.bodies_key.p());
    dataReorderCombined.setWork(tree.n, 512);
    //Position, velocity and acc0
    dataReorderCombined.set_arg<cl_mem>(2, tree.bodies_pos.p());
    dataReorderCombined.set_arg<cl_mem>(3, real4Buffer1.p());
    dataReorderCombined.set_arg<cl_mem>(4, tree.bodies_vel.p());
    dataReorderCombined.set_arg<cl_mem>(5, real4Buffer2.p());
    dataReorderCombined.set_arg<cl_mem>(6, tree.bodies_acc0.p());
    dataReorderCombined.set_arg<cl_mem>(7, real4Buffer3.p());
    dataReorderCombined.execute(execStream->s());
    tree.bodies_pos.copy(real4Buffer1,  tree.n);
    tree.bodies_vel.copy(real4Buffer2,  tree.n);
    tree.bodies_acc0.copy(real4Buffer3, tree.n);
    //Acc1, Predicted position and velocity
    dataReorderCombined.set_arg<cl_mem>(2, tree.bodies_acc1.p());
    dataReorderCombined.set_arg<cl_mem>(3, real4Buffer1.p());
    dataReorderCombined.set_arg<cl_mem>(4, tree.bodies_Ppos.p());
    dataReorderCombined.set_arg<cl_mem>(5, real4Buffer2.p());
    dataReorderCombined.set_arg<cl_mem>(6, tree.bodies_Pvel.p());
    dataReorderCombined.set_arg<cl_mem>(7, real4Buffer3.p());
    dataReorderCombined.execute(execStream->s());
    tree.bodies_acc1.copy(real4Buffer1, tree.n);
    tree.bodies_Ppos.copy(real4Buffer2, tree.n);
    tree.bodies_Pvel.copy(real4Buffer3, tree.n);
    //These can reuse the real4Buffer1 space :-)
    my_dev::dev_mem<float2>  float2Buffer(devContext);
    my_dev::dev_mem<int> sortPermutation(devContext);
    genBufOffset1 = float2Buffer.cmalloc_copy(tree.generalBuffer1, tree.n, 0);
    genBufOffset1 = sortPermutation.cmalloc_copy(tree.generalBuffer1, tree.n, genBufOffset1);
    dataReorderF2.set_arg<int>(0,    &tree.n);
    dataReorderF2.set_arg<cl_mem>(1, tree.bodies_key.p());
    dataReorderF2.set_arg<cl_mem>(2, tree.bodies_time.p());
    dataReorderF2.set_arg<cl_mem>(3, float2Buffer.p()); //Reuse as destination1
    dataReorderF2.set_arg<cl_mem>(4, tree.bodies_ids.p());
    dataReorderF2.set_arg<cl_mem>(5, sortPermutation.p()); //Reuse as destination2
    dataReorderF2.setWork(tree.n, 512);
    dataReorderF2.execute(execStream->s());
    tree.bodies_time.copy(float2Buffer, float2Buffer.get_size());
    tree.bodies_ids.copy(sortPermutation, sortPermutation.get_size());
  } //end if
  devContext.stopTiming("Data-reordering", 1, execStream->s());
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>RawBaggageAtoms.SimpleBaggageContents</title>
<meta name="date" content="2016-12-22">
<link rel="stylesheet" type="text/css" href="../../../../../../../javadoc-stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

edu.brown.cs.systems.tracingplane.atom_layer.impl

Class RawBaggageAtoms.SimpleBaggageContents

java.lang.Object

edu.brown.cs.systems.tracingplane.atom_layer.impl.RawBaggageAtoms.SimpleBaggageContents

Enclosing class:

RawBaggageAtoms

static class RawBaggageAtoms.SimpleBaggageContents
extends java.lang.Object

Field Summary

Fields

Modifier and Type
Field and Description

(package private) java.util.List<java.nio.ByteBuffer>
atoms

(package private) int
refcount

Constructor Summary

Constructors

Constructor and Description

SimpleBaggageContents()

SimpleBaggageContents(java.util.List<java.nio.ByteBuffer> atoms)

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

(package private) void
deref()

(package private) boolean
editableInPlace()

(package private) void
ref()

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

refcount

volatile int refcount

atoms

java.util.List<java.nio.ByteBuffer> atoms

Constructor Detail

SimpleBaggageContents

public SimpleBaggageContents()

SimpleBaggageContents

public SimpleBaggageContents(java.util.List<java.nio.ByteBuffer> atoms)

Method Detail

ref

void ref()

deref

void deref()

editableInPlace

boolean editableInPlace()

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
Google Plus Mini App allows user to view his/her profile, circles, friends by integrating with **Google Plus (G+) Domain APIs**.

# Application Navigation and Views

* **Login View:**
This view will be shown when user starts the application. It will have **Sign in with Google** Button that redirects user to *Oauth2** module for authentication. It wil show account picker for accounts already integrated with the phone and user can directly use them as well.
Login Access token is generated using following code
```java
token = GoogleAuthUtil
		.getToken(
				firstActivitySignIn.this,
				mEmail,
				"oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/plus.circles.read https://www.googleapis.com/auth/plus.profiles.read");
```
* **User Profile View:**
It will show user profile which will be featch user information from Google Plus using Google Plus Domain APIs. It will display **Profile Picture, Name, Occupation, Organization, and About Me**.
User details are requested by following code
```java
Person mePerson = plusDomains.people().get("me").execute();
```
* **Circle View:**
It will show list of circle of user and upon selecting specific circle friend list in that circle will be displayed.
Circle List view are requested by following code
```java
Person mePerson = plusDomains.people().get("me").execute();

					PlusDomains.Circles.List listCircles = plusDomains
							.circles().list("me");
					listCircles.setMaxResults(5L);
					CircleFeed circleFeed = listCircles.execute();
					List<Circle> circles = circleFeed.getItems();
```
* **Friend Profile View:**
It will show friends profile information like **Profile Picture, Name, Occupation, Organization, and About Me**. It also has Email friend button which will open Implicit Intent to built-in Email Clients to send email.
We can access friends profile using follwing code
```java
Person person = plusDomains.people().get(friendId).execute();
```

# Screenshots

####Login Screen
![Login Screen](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/Login%20Screen.png?raw=true "Login Screen")

####Account Picker
![Account Picker](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/Account%20Picker.png?raw=true "Account Picker")

####User Dashboard
![User Dashboard](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/User%20Dashboard.png?raw=true "User Dashboard")

####Circle Listing
![Circle Listing](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/Circle%20listing.png?raw=true "Circle Listing")

####Select Circle
![Circle Listing](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/Select%20Circle.png?raw=true "Select Circle")

####Get Friend Details
![Get Friend Details](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/Get%20Friend%20details.png?raw=true "Get Friend Details")

####Circle Friend Data with Detailed Information
![Circle Friend Data with Detailed Information](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/Circle%20Friend%20Data%20with%20info.png?raw=true "Circle Friend Data with Detailed Information")

####Circle Friend Data with No Information
![Circle Friend Data with No Information Information](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/Circle%20Friend%20Data%20with%20no%20info.png?raw=true "Circle Friend Data with No Information")

####Email Friend
![Email Friend](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/Send%20Email%20Intent%20picker.png?raw=true "Email Friend")

####Send Email
![Send Email](https://github.com/deepmehtait/Android-Programming/blob/master/Google-Plus-Mini/Screenshots/Send%20Email.png?raw=true "Send Email")


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">

    <context:component-scan base-package="springWebGallery.controllers"/>
    <context:component-scan base-package="springWebGallery.db.dao"/>

    <mvc:annotation-driven/>
    <mvc:resources mapping="/static/**" location="/static/"/>

    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/views/"/>
        <property name="suffix" value=".jsp"/>
    </bean>

    <!-- Ajax Handlers -->
    <bean id="ajaxAuthenticationSuccessHandler" class="springWebGallery.ajaxHandlers.AjaxAuthenticationSuccessHandler"/>
    <bean id="ajaxAuthenticationFailureHandler" class="springWebGallery.ajaxHandlers.AjaxAuthenticationFailureHandler"/>

    <!-- Upload files -->
    <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>

    <!-- Database configuration -->
    <import resource="db/database-config.xml"/>

</beans>


text:
editLink: false
---

# oc

##### All missed: 725

### [validation-nova-inline](https://github.com/Laravel-Lang/lang/blob/main/locales/oc/validation-nova-inline.php)

##### Missing: 2

attached

This field is already attached.

relatable

This field may not be associated with this resource.

### [validation-nova](https://github.com/Laravel-Lang/lang/blob/main/locales/oc/validation-nova.php)

##### Missing: 2

attached

This :attribute is already attached.

relatable

This :attribute may not be associated with this resource.

### [passwords](https://github.com/Laravel-Lang/lang/blob/main/locales/oc/passwords.php)

##### Missing: 1

throttled

Please wait before retrying.

### [validation-inline](https://github.com/Laravel-Lang/lang/blob/main/locales/oc/validation-inline.php)

##### Missing: 11

accepted_if

This field must be accepted when :other is :value.

current_password

The password is incorrect.

declined

This value must be declined.

declined_if

This value must be declined when :other is :value.

enum

The selected value is invalid.

mac_address

The value must be a valid MAC address.

prohibited

This field is prohibited.

prohibited_if

This field is prohibited when :other is :value.

prohibited_unless

This field is prohibited unless :other is in :values.

prohibits

This field prohibits :other from being present.

required_array_keys

This field must contain entries for: :values.

### [validation](https://github.com/Laravel-Lang/lang/blob/main/locales/oc/validation.php)

##### Missing: 11

accepted_if

The :attribute must be accepted when :other is :value.

current_password

The password is incorrect.

declined

The :attribute must be declined.

declined_if

The :attribute must be declined when :other is :value.

enum

The selected :attribute is invalid.

mac_address

The :attribute must be a valid MAC address.

prohibited

The :attribute field is prohibited.

prohibited_if

The :attribute field is prohibited when :other is :value.

prohibited_unless

The :attribute field is prohibited unless :other is in :values.

prohibits

The :attribute field prohibits :other from being present.

required_array_keys

The :attribute field must contain entries for: :values.

### [oc](https://github.com/Laravel-Lang/lang/blob/main/locales/oc/oc.json)

##### Missing: 698

30 Days

60 Days

90 Days

:amount Total

:days day trial

:resource Details

:resource Details: :title

A fresh verification link has been sent to your email address.

A new verification link has been sent to the email address you provided during registration.

Accept Invitation

Action

Actions

Add

Add a new team member to your team, allowing them to collaborate with you.

Add additional security to your account using two factor authentication.

Add row

Add Team Member

Add VAT Number

Added.

Address

Address Line 2

Administrator

Administrator users can perform any action.

Afghanistan

Albania

Algeria

All of the people that are part of this team.

All resources loaded.

All rights reserved.

Already registered?

American Samoa

An error occured while uploading the file.

An error occurred while uploading the file.

An unexpected error occurred and we have notified our support team. Please try again later.

Andorra

Angola

Anguilla

Another user has updated this resource since this page was loaded. Please refresh the page and try again.

Antarctica

Antigua and Barbuda

API Token

API Token Permissions

API Tokens

API tokens allow third-party services to authenticate with our application on your behalf.

Apply

Apply Coupon

April

Are you sure you want to delete the selected resources?

Are you sure you want to delete this file?

Are you sure you want to delete this resource?

Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.

Are you sure you want to delete your account? Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.

Are you sure you want to detach the selected resources?

Are you sure you want to detach this resource?

Are you sure you want to force delete the selected resources?

Are you sure you want to force delete this resource?

Are you sure you want to log out?

Are you sure you want to restore the selected resources?

Are you sure you want to restore this resource?

Are you sure you want to run this action?

Are you sure you want to stop impersonating?

Are you sure you would like to delete this API token?

Are you sure you would like to leave this team?

Are you sure you would like to remove this person from the team?

Argentina

Armenia

Aruba

Attach

Attach & Attach Another

Attach :resource

August

Australia

Austria

Azerbaijan

Bahamas

Bahrain

Bangladesh

Barbados

Before proceeding, please check your email for a verification link.

Belarus

Belgium

Belize

Benin

Bermuda

Bhutan

Billing Information

Billing Management

Bolivia

Bolivia, Plurinational State of

Bonaire, Sint Eustatius and Saba

Bosnia and Herzegovina

Botswana

Bouvet Island

Brazil

British Indian Ocean Territory

Browser Sessions

Bulgaria

Burkina Faso

Burundi

Cambodia

Cameroon

Canada

Cancel

Cancel Subscription

Cape Verde

Card

Cayman Islands

Central African Republic

Chad

Change Subscription Plan

Changes

Chile

China

Choose

Choose :field

Choose :resource

Choose an option

Choose date

Choose File

Choose Type

Christmas Island

City

click here to request another

Click to choose

Close

Cocos (Keeling) Islands

Code

Colombia

Comoros

Confirm

Confirm Password

Confirm Payment

Confirm your :amount payment

Congo

Congo, Democratic Republic

Congo, the Democratic Republic of the

Constant

Cook Islands

Costa Rica

could not be found.

Country

Coupon

Create

Create & Add Another

Create :resource

Create a new team to collaborate with others on projects.

Create Account

Create API Token

Create New Team

Create Team

Created.

Croatia

Cuba

Curaçao

Current Password

Current Subscription Plan

Currently Subscribed

Customize

Cyprus

Côte d'Ivoire

Dark

Dashboard

December

Decrease

Delete

Delete Account

Delete API Token

Delete File

Delete Resource

Delete Selected

Delete Team

Denmark

Detach

Detach Resource

Detach Selected

Details

Disable

Djibouti

Do you really want to leave? You have unsaved changes.

Dominica

Dominican Republic

Done.

Download

Download Receipt

E-Mail Address

Ecuador

Edit

Edit :resource

Edit Attached

Editor

Editor users have the ability to read, create, and update.

Egypt

El Salvador

Email

Email Address

Email Addresses

Email Password Reset Link

Enable

Ensure your account is using a long, random password to stay secure.

Equatorial Guinea

Eritrea

Error

Estonia

Ethiopia

ex VAT

Extra Billing Information

Extra confirmation is needed to process your payment. Please confirm your payment by filling out your payment details below.

Extra confirmation is needed to process your payment. Please continue to the payment page by clicking on the button below.

Failed to load :resource!

Falkland Islands (Malvinas)

Faroe Islands

February

Fiji

Finish enabling two factor authentication.

Finland

For your security, please confirm your password to continue.

Forbidden

Force Delete

Force Delete Resource

Force Delete Selected

Forgot Password

Forgot your password?

Forgot Your Password?

Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.

France

French Guiana

French Polynesia

French Southern Territories

Full name

Gabon

Gambia

Georgia

Germany

Ghana

Gibraltar

Go back

Go Home

Go to page :page

Great! You have accepted the invitation to join the :team team.

Greece

Greenland

Grenada

Guadeloupe

Guam

Guatemala

Guernsey

Guinea

Guinea-Bissau

Guyana

Haiti

Have a coupon code?

Having second thoughts about cancelling your subscription? You can instantly reactive your subscription at any time until the end of your current billing cycle. After your current billing cycle ends, you may choose an entirely new subscription plan.

Heard Island and McDonald Islands

Hello!

Hide Content

Hold Up!

Honduras

Hong Kong

Hungary

I accept the terms of service

I agree to the :terms_of_service and :privacy_policy

Iceland

ID

If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.

If you already have an account, you may accept this invitation by clicking the button below:

If you did not create an account, no further action is required.

If you did not expect to receive an invitation to this team, you may discard this email.

If you did not receive the email

If you did not request a password reset, no further action is required.

If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:

If you need to add specific contact or tax information to your receipts, like your full business name, VAT identification number, or address of record, you may add it here.

Impersonate

Increase

India

Indonesia

Iran, Islamic Republic of

Iraq

Ireland

Isle of Man

Israel

It looks like you do not have an active subscription. You may choose one of the subscription plans below to get started. Subscription plans may be changed or cancelled at your convenience.

Italy

Jamaica

Jane Doe

January

Japan

Jersey

Jordan

July

June

Kazakhstan

Kenya

Key

Kiribati

Korea, Republic of

Kosovo

Kuwait

Kyrgyzstan

Last active

Last used

Latvia

Leave

Leave Team

Lebanon

Lens

Lesotho

Liberia

Liechtenstein

Light

Lithuania

Load :perPage More

Log in

Log In

Log Out

Log Out Other Browser Sessions

Login

Logout

Luxembourg

Macao

Macedonia, the former Yugoslav Republic of

Madagascar

Malawi

Malaysia

Maldives

Mali

Malta

Manage Account

Manage and log out your active sessions on other browsers and devices.

Manage API Tokens

Manage Role

Manage Team

Managing billing for :billableName

March

Marshall Islands

Martinique

Mauritania

Mauritius

May

Mayotte

Mexico

Micronesia, Federated States of

Moldova

Moldova, Republic of

Monaco

Mongolia

Montenegro

Month To Date

Monthly

monthly

Montserrat

Morocco

Mozambique

Myanmar

Name

Namibia

Nauru

Nepal

Netherlands

Netherlands Antilles

Nevermind, I'll keep my old plan

New

New :resource

New Caledonia

New Password

New Zealand

Next

Nicaragua

Niger

Nigeria

Niue

No

No :resource matched the given criteria.

No additional information...

No Current Data

No Data

no file selected

No Increase

No Prior Data

No Results Found.

Norfolk Island

Northern Mariana Islands

Norway

Not Found

Nova User

November

October

of

Oh no

Oman

Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.

Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.

Only Trashed

Original

Our billing management portal allows you to conveniently manage your subscription plan, payment method, and download your recent invoices.

Page Expired

Pagination Navigation

Pakistan

Palau

Panama

Papua New Guinea

Paraguay

Password

Pay :amount

Payment Cancelled

Payment Confirmation

Payment Information

Payment Method

Payment Successful

Pending Team Invitations

Per Page

Permanently delete this team.

Permanently delete your account.

Permissions

Peru

Philippines

Photo

Please accept the terms of service.

Please click the button below to verify your email address.

Please confirm access to your account by entering one of your emergency recovery codes.

Please confirm access to your account by entering the authentication code provided by your authenticator application.

Please confirm your password before continuing.

Please copy your new API token. For your security, it won't be shown again.

Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.

Please provide a maximum of three receipt emails addresses.

Please provide the email address of the person you would like to add to this team.

Please provide your name.

Poland

Portugal

Press / to search

Preview

Previewing

Previous

Privacy Policy

Profile

Profile Information

Puerto Rico

Qatar

Quarter To Date

Receipt Email Addresses

Receipts

Recovery Code

Regards

Regenerate Recovery Codes

Register

Reload

Remember me

Remember Me

Remove

Remove Photo

Remove Team Member

Replicate

Resend Verification Email

Reset Filters

Reset Password

Reset Password Notification

resource

Resource Row Dropdown

Resources

resources

Restore

Restore Resource

Restore Selected

results

Resume Subscription

Return to :appName

Role

Romania

Run Action

Russian Federation

Rwanda

Réunion

Saint Barthélemy

Saint Kitts and Nevis

Saint Martin (French part)

Saint Pierre and Miquelon

Saint Vincent and the Grenadines

Samoa

San Marino

Sao Tome and Principe

Saudi Arabia

Save

Saved.

Search

Select

Select a different plan

Select A New Photo

Select Action

Select All

Select All Matching

Send Password Reset Link

Senegal

September

Serbia

Server Error

Service Unavailable

Setup Key

Seychelles

Show All Fields

Show Content

Show Recovery Codes

Showing

Sierra Leone

Signed in as

Singapore

Slovakia

Slovenia

Solomon Islands

Somalia

Something went wrong.

Sorry! You are not authorized to perform this action.

Sorry, your session has expired.

South Africa

South Georgia and the South Sandwich Islands

South Sudan

Spain

Sri Lanka

Standalone Actions

Start Polling

State / County

Stop Impersonating

Stop Polling

Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.

Subscribe

Subscription Information

Subscription Pending

Sudan

Suriname

Svalbard and Jan Mayen

Sweden

Switch Teams

Switzerland

System

Taiwan

Taiwan, Province of China

Tajikistan

Tanzania

Tanzania, United Republic of

Team Details

Team Invitation

Team Members

Team Name

Team Owner

Team Settings

Terms of Service

Thailand

Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn't receive the email, we will gladly send you another.

Thanks for your continued support. We've attached a copy of your invoice for your records. Please let us know if you have any questions or concerns.

Thanks,

The :attribute must be a valid role.

The :attribute must be at least :length characters and contain at least one number.

The :attribute must be at least :length characters and contain at least one special character and one number.

The :attribute must be at least :length characters and contain at least one special character.

The :attribute must be at least :length characters and contain at least one uppercase character and one number.

The :attribute must be at least :length characters and contain at least one uppercase character and one special character.

The :attribute must be at least :length characters and contain at least one uppercase character, one number, and one special character.

The :attribute must be at least :length characters and contain at least one uppercase character.

The :attribute must be at least :length characters.

The :attribute must contain at least one letter.

The :attribute must contain at least one number.

The :attribute must contain at least one symbol.

The :attribute must contain at least one uppercase and one lowercase letter.

The :resource was created!

The :resource was deleted!

The :resource was restored!

The :resource was updated!

The action ran successfully!

The file was deleted!

The given :attribute has appeared in a data leak. Please choose a different :attribute.

The government won't let us show you what's behind these doors

The HasOne relationship has already been filled.

The password is incorrect.

The payment was successful.

The provided coupon code is invalid.

The provided password does not match your current password.

The provided password was incorrect.

The provided two factor authentication code was invalid.

The provided VAT number is invalid.

The receipt emails must be valid email addresses.

The resource was attached!

The resource was prevented from being saved!

The resource was updated!

The selected country is invalid.

The selected plan is invalid.

The team's name and owner information.

There are no available options for this resource.

There are no fields to display.

There are no new notifications

There is no active subscription.

There was a problem executing the action.

There was a problem fetching the resource.

There was a problem submitting the form.

These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.

This account does not have an active subscription.

This copy of Nova is unlicensed.

This coupon code can only be used by new customers.

This device

This file field is read-only.

This image

This is a secure area of the application. Please confirm your password before continuing.

This password does not match our records.

This password reset link will expire in :count minutes.

This payment was already successfully confirmed.

This payment was cancelled.

This resource no longer exists

This subscription cannot be resumed. Please create a new subscription.

This subscription has expired and cannot be resumed. Please create a new subscription.

This user already belongs to the team.

This user has already been invited to the team.

Timor-Leste

to

To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code.

Today

Toggle navigation

Togo

Tokelau

Token Name

Tonga

Too Many Requests

total

Total:

Trashed

Trinidad and Tobago

Tunisia

Turkey

Turkmenistan

Turks and Caicos Islands

Tuvalu

Two Factor Authentication

Two factor authentication is now enabled. Scan the following QR code using your phone's authenticator application or enter the setup key.

Uganda

Ukraine

Unauthorized

United Arab Emirates

United Kingdom

United States

United States Minor Outlying Islands

Update

Update & Continue Editing

Update :resource

Update :resource: :title

Update attached :resource: :title

Update Password

Update Payment Information

Update Payment Method

Update your account's profile information and email address.

Uruguay

Use a recovery code

Use an authentication code

Uzbekistan

Value

Vanuatu

VAT Number

Venezuela

Venezuela, Bolivarian Republic of

Verify Email Address

Verify Your Email Address

View

View Receipt

Wallis and Futuna

We are processing your subscription. Once the subscription has successfully processed, this page will update automatically. Typically, this process should only take a few seconds.

We are unable to process your payment. Please contact customer support.

We have emailed your password reset link!

We were unable to find a registered user with this email address.

We will send a receipt download link to the email addresses that you specify below. You may separate multiple email addresses using commas.

We're lost in space. The page you were trying to view does not exist.

Welcome Back!

Western Sahara

When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application.

Whoops

Whoops!

Whoops! Something went wrong.

With Trashed

Write

Year To Date

Yearly

Yemen

Yes

You are already subscribed.

You are currently within your free trial period. Your trial will expire on :date.

You are logged in!

You are receiving this email because we received a password reset request for your account.

You have been invited to join the :team team!

You have enabled two factor authentication.

You have not enabled two factor authentication.

You may accept this invitation by clicking the button below:

You may cancel your subscription at any time. Once your subscription has been cancelled, you will have the option to resume the subscription until the end of your current billing cycle.

You may delete any of your existing tokens if they are no longer needed.

You may not delete your personal team.

You may not leave a team that you created.

Your :invoiceName invoice is now available!

Your card was declined. Please contact your card issuer for more information.

Your current payment method is :paypal.

Your current payment method is a credit card ending in :lastFour that expires on :expiration.

Your registered VAT Number is :vatNumber.

Zambia

Zimbabwe

Zip / Postal Code

Åland Islands


text:
from django import forms
from joboard.widgets import PlaceMultiWidget
import os
from django.conf import settings

class PlaceMultiField(forms.MultiValueField):
    widget = PlaceMultiWidget

    def __init__(self, *args, **kwargs):
        cities = [(city,city) for city in (u'上海市',u'北京市')]

        f = open(os.path.join(settings.BASE_DIR, 'region_sh'))
        districts = [(u'上海市',distrct) for distrct in f.readlines()]

        fields = (
            forms.ChoiceField(choices=cities),
            forms.ChoiceField(choices=districts),
            forms.CharField(),
        )
        super(PlaceMultiField, self).__init__(fields, *args, **kwargs)

    def compress(self, data_list):
        if data_list:
            return ' '.join(data_list)
        return ''

    def to_python(self, value):
        if not value:
            return None
        return value

    def get_db_prep_value(self, value, connection, prepared=False):
        return value


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
EventMethodModel.Parameter (Apache FOP 1.0 API)
</TITLE>

<META NAME="keywords" CONTENT="org.apache.fop.events.model.EventMethodModel.Parameter class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

fop 1.0

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.apache.fop.events.model

Class EventMethodModel.Parameter

java.lang.Object
  org.apache.fop.events.model.EventMethodModel.Parameter

All Implemented Interfaces:
java.io.Serializable, org.apache.xmlgraphics.util.XMLizable

Enclosing class:
EventMethodModel

public static class EventMethodModel.Parameter
extends java.lang.Object
implements java.io.Serializable, org.apache.xmlgraphics.util.XMLizable

Represents an event parameter.

See Also:
Serialized Form

Constructor Summary

EventMethodModel.Parameter(java.lang.Class type,
                           java.lang.String name)

          Creates a new event parameter.

Method Summary

 java.lang.String
getName()

          Returns the parameter name.

 java.lang.Class
getType()

          Returns the parameter type.

 void
toSAX(org.xml.sax.ContentHandler handler)

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EventMethodModel.Parameter

public EventMethodModel.Parameter(java.lang.Class type,
                                  java.lang.String name)

Creates a new event parameter.

Parameters:
type - the parameter type
name - the parameter name

Method Detail

getType

public java.lang.Class getType()

Returns the parameter type.

Returns:
the parameter type

getName

public java.lang.String getName()

Returns the parameter name.

Returns:
the parameter name

toSAX

public void toSAX(org.xml.sax.ContentHandler handler)
           throws org.xml.sax.SAXException

Specified by:
toSAX in interface org.apache.xmlgraphics.util.XMLizable

Throws:

org.xml.sax.SAXException

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

fop 1.0

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.


text:
from django.shortcuts import get_object_or_404
from django.core.exceptions import ObjectDoesNotExist

from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
from rest_framework import viewsets

from .serializers import ReportSerializer
from .models import Report
from apps.markets.models import Market
from apps.users.models import User

class ReportViewSet(viewsets.ModelViewSet):
    serializer_class = ReportSerializer
    queryset = Report.objects.all()

    def destroy(self, request, pk=None):
        market = get_object_or_404(Market, id=pk)
        report = Report.objects.filter(market=market)
        report.delete()
        return Response(status=status.HTTP_200_OK)

    def retrieve(self, request, pk=None):
        market = get_object_or_404(Market, id=pk)
        report = Report.objects.filter(market=market)
        return Response(ReportSerializer(report, many=True).data)


text:
Simple webpack script for Angular 2 and TypeScript building

### Installation
You need Node and Git installed globally.
```sh
$ git clone https://github.com/Carl-fridrix-zendolf-IV/simple-webpack.git
$ cd simple-webpack
$ npm install
```

### How to use?
Enter all your Angular2 code in src folder.
Then for running in your browser use this command:
```sh
$ npm start
```
and open http://localhost:8080/webpack-dev-server/

For building production code use this command:
```sh
$ npm run build
```
and in build folder you will see bundle.min.js file which have all your Angular2 logic.

### License
MIT


text:
#import <DevToolsInterface/PBXProjectModule.h>

#import "NSToolbarDelegate-Protocol.h"
#import "NSWindowDelegate-Protocol.h"
#import "PBXSelectionTarget-Protocol.h"

@class NSBox, NSMutableArray, NSMutableDictionary, NSView, PBXModule, PBXProjectDocument, XCBarModule, XCControlView, XCExtendedSegmentedControl, XCExtendedTabView, XCPerspectivesSpecification;

@interface XCPerspectiveModule : PBXProjectModule <NSWindowDelegate, NSToolbarDelegate, PBXSelectionTarget>
{
    NSBox *_perspectiveControl;
    NSBox *_perspectivePalette;
    XCControlView *_contentView;
    XCExtendedSegmentedControl *_perspectiveButtons;
    XCControlView *_perspectiveButtonsControlView;
    XCControlView *_paletteControlView;
    PBXModule *_activeNonRetainedModule;
    XCExtendedTabView *_perspectivesTabView;
    long long _activePerspective;
    XCPerspectivesSpecification *_specification;
    BOOL _respectUpdateNotifications;
    NSView *_sheetSourceView;
    PBXProjectDocument *_docToReleaseOnDealloc;
    NSMutableDictionary *_perspectiveToolbarItems;
    NSMutableDictionary *_previousToolbars;
    NSMutableDictionary *_perspectiveToolbarIdArrays;
    unsigned long long _toolbarDisplayMode;
    unsigned long long _toolbarSizeMode;
    BOOL _toolbarIsVisible;
    NSMutableArray *_preferredWidths;
    XCBarModule *_favoritesModule;
}

+ (void)setSheetSourceView:(id)arg1;
+ (void)initialize;
+ (void)_loadSpecificationsIfNeeded;
+ (void)openForProjectDocument:(id)arg1;
- (BOOL)perspectivesBarVisible;
- (void)setBottomPerspectivesBarVisible:(BOOL)arg1;
- (void)setPerspectivesBarVisible:(BOOL)arg1;
- (void)alertDidEnd:(id)arg1 returnCode:(long long)arg2 contextInfo:(void *)arg3;
- (void)setAsDefaultLayout:(id)arg1;
- (id)moduleToolbar:(id)arg1 itemForItemIdentifier:(id)arg2 willBeInsertedIntoToolbar:(BOOL)arg3;
- (id)moduleToolbarDefaultItemIdentifiers;
- (id)moduleToolbarAllowedItemIdentifiers;
- (void)activateToolbarInWindow:(id)arg1 atIndex:(long long)arg2;
- (void)recordToolbarInWindow:(id)arg1 atIndex:(long long)arg2;
- (void)loadToolbarConfiguration:(id)arg1 atIndex:(long long)arg2;
- (id)_userDefaultsToolbarConfigIdentifier:(id)arg1;
- (void)configureToolbarOnWindow:(id)arg1;
- (void)_perspectiveChosen:(id)arg1;
- (id)moduleForAction:(SEL)arg1;
- (id)performAction:(id)arg1 withSelection:(id)arg2;
- (void)markActiveModules;
- (id)loadPerspectiveContainingService:(Class)arg1;
- (void)showModule:(id)arg1;
- (void)loadPerspectiveWithName:(id)arg1;
- (void)loadPerspectiveAtIndex:(long long)arg1;
- (void)activatePerspectiveWithName:(id)arg1;
- (void)activatePerspectiveAtIndex:(long long)arg1;
- (id)_sheetSourceView;
- (void)setSheetSourceView:(id)arg1;
- (struct CGRect)window:(id)arg1 willPositionSheet:(id)arg2 usingRect:(struct CGRect)arg3;
- (id)keyModules;
- (id)tabForModule:(id)arg1;
- (id)moduleForTab:(id)arg1;
- (id)activeTabModule;
- (BOOL)isMainModule;
- (unsigned long long)moduleWindowStyleMask;
- (id)mainEditor;
- (id)guid;
- (void)moduleDidChangeLabel:(id)arg1;
- (void)moduleWindowWillClose:(id)arg1;
- (BOOL)windowShouldClose:(id)arg1;
- (void)updateSpecification:(id)arg1;
- (void)_perspectiveSpecificationReadyForInfo:(id)arg1;
- (void)_modulesChanged:(id)arg1;
- (void)_activePerspectiveChanged:(id)arg1;
- (void)setWantsModuleWindow:(BOOL)arg1;
- (void)removeNotificationObservers;
- (void)addNotificationObservers;
- (void)becomeActive;
- (void)removeSubmodule:(id)arg1;
- (id)type:(Class)arg1 inPerspective:(id)arg2 matchingFunction:(void *)arg3 usingData:(void *)arg4;
- (id)type:(Class)arg1 inPerspective:(id)arg2;
- (BOOL)isModule:(id)arg1 inPerspectiveWithIdentifier:(id)arg2;
- (id)typeInActivePerspective:(Class)arg1;
- (BOOL)isModuleInSelectedPerspective:(id)arg1;
- (id)identifierForPerspectiveContainingModule:(id)arg1;
- (void)windowWillShow;
- (BOOL)wantsModuleWindow;
- (void)viewDidLoad;
- (void)markAsLastActive;
- (void)dealloc;
- (void)configureWithSpecification:(id)arg1;
- (void)_loadProjectPerspective;

@end


text:
var L = require('leaflet');

function geoFilter(crds, items, max_distance){
    var out = [];
    var point = L.latLng(crds);

    for (var i=0;i<items.length;i++){
        var itemPoint = L.latLng(items[i].geometry.coordinates);
        if (point.distanceTo(itemPoint) <= max_distance) out.push(items[i]);
    }
    return out;
}

module.exports = geoFilter;


text:
package com.pie.tlatoani.Chunk;

import ch.njol.skript.lang.ExpressionType;
import com.pie.tlatoani.Core.Registration.Registration;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.block.Block;

/**
 * Created by Tlatoani on 8/8/17.
 */
public class ChunkMundo {

    public static void load() {
        Registration.registerEffect(EffLoadChunk.class, "(0¦load|1¦unload) chunk %chunk%")
                .document("Load Chunk", "1.8", "Loads or unloads the specified chunk.");
        Registration.registerExpression(ExprChunkCoordinate.class, Number.class, ExpressionType.PROPERTY,
                "chunk( |-)(0¦x|1¦z)[( |-)coord] of %chunk%",
                "%chunk%'s chunk( |-)(0¦x|1¦z)[( |-)coord]")
                .document("Coordinate of Chunk", "1.8", "The x or z-coordinate of the specified chunk");
        Registration.registerExpression(ExprChunkWorld.class, World.class, ExpressionType.PROPERTY,
                "chunk world of %chunk%",
                "%chunk%'s chunk world")
                .document("World of Chunk", "1.8", "The world in which the specified chunk is located");
        Registration.registerExpression(ExprChunk.class, Chunk.class, ExpressionType.COMBINED,
                "chunk %number%, %number% [in %world%]",
                "chunks [from] %number%, %number% to %number%, %number% [in %world%]",
                "chunk at %location%",
                "chunks from %location% to %location%")
                .document("Chunk at Coordinates", "1.8", "The first is the chunk at the specified coordinates."
                        , "The second is the chunks between the specified coordinates."
                        , "The third is the chunk that contains the specified location."
                        , "The fourth is the chunks between the specified locations.");
        Registration.registerExpression(ExprChunkBlock.class, Block.class, ExpressionType.PROPERTY,
                "block %number%, %number%, %number% (of|in) %chunk%",
                "(0¦layer %-number%|1¦top|2¦bottom|3¦sea level) (0¦south|4¦north)(0¦east|8¦west) (0¦center|16¦corner) of %chunk%")
                .document("Block in Chunk", "1.8", "The first is the block at the specified coordinates within the specified chunk"
                        + " The second is a center or corner block of a layer, one of the three defaults or a specified number, of the specified chunk.");
        Registration.registerExpression(ExprChunkBlocks.class, Block.class, ExpressionType.PROPERTY,
                "[all] blocks (of|in) %chunk%",
                "blocks [from] %number%, %number%, %number% to %number%, %number%, %number% (of|in) %chunk%",
                "(0¦layer %-number%|1¦top|2¦bottom|3¦sea level) (of|in) %chunk%",
                "[[blocks] from] (0¦layer %-number%|1¦top|2¦bottom|3¦sea level) to (0¦layer %-number%|4¦top|8¦bottom|12¦sea level) (of|in) %chunk%",
                "layers [from] %number% to %number% (of|in) %chunk%")
                .document("Blocks in Chunk", "1.8", "The first is all of the blocks in the specified chunk."
                        , "The second is the blocks between two coordinates of the specified chunk."
                        , "The third is a layer, one of the three defaults or a specified number, of the specified chunk."
                        , "The fourth is the layers between two specified numbers of the specified chunk.");
        Registration.registerExpressionCondition(CondSlimey.class, ExpressionType.PROPERTY, "%chunks% (0¦is|0¦are|1¦isn't|1¦is not|1¦aren't|1¦are not) slimey")
                .document("Chunk is Slimey", "1.8", "Checks whether the specified chunk is slimey.");
        Registration.registerExpressionCondition(CondChunkLoaded.class, ExpressionType.PROPERTY, "[chunk[s]] %chunks% (0¦is|0¦are|1¦isn't|1¦is not|1¦aren't|1¦are not) loaded")
                .document("Chunk is Loaded", "1.8", "Checks whether the specified chunk is loaded.");
    }

}


text:
<!doctype html>

    <meta charset="utf-8">
    <title>goo</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" type="text/css" href="assets/css/owfont-regular.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/weather-icons.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/custom.css">


text:
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/** @file

    @author	Eric Espie
    @version	$Id: racemain.cpp,v 1.13 2005/08/17 20:48:39 berniw Exp $
*/

#include <stdlib.h>
#include <stdio.h>
#include <tgfclient.h>
#include <raceman.h>
#include <robot.h>
#include <racescreens.h>
#include <exitmenu.h>

#include "raceengine.h"
#include "raceinit.h"
#include "racegl.h"
#include "raceresults.h"
#include "racestate.h"
#include "racemanmenu.h"

#include "racemain.h"

static char buf[1024];
static char path[1024];
static char path2[1024];

/***************************************************************/
/* ABANDON RACE HOOK */

static void *AbandonRaceHookHandle = 0;

static void
AbandonRaceHookActivate(void * /* vforce */)
{
	// Shutdown current event.
	ReEventShutdown();

	/* Return to race menu */
	ReInfo->_reState = RE_STATE_CONFIG;

	GfuiScreenActivate(ReInfo->_reGameScreen);
}

static void *
AbandonRaceHookInit(void)
{
	if (AbandonRaceHookHandle) {
		return AbandonRaceHookHandle;
	}

	AbandonRaceHookHandle = GfuiHookCreate(0, AbandonRaceHookActivate);

	return AbandonRaceHookHandle;
}

static void *AbortRaceHookHandle = 0;

static void
AbortRaceHookActivate(void * /* dummy */)
{
	GfuiScreenActivate(ReInfo->_reGameScreen);

	ReInfo->_reSimItf.shutdown();
	if (ReInfo->_displayMode == RM_DISP_MODE_NORMAL) {
		ReInfo->_reGraphicItf.shutdowncars();
	}
	ReInfo->_reGraphicItf.shutdowntrack();
	ReRaceCleanDrivers();

	FREEZ(ReInfo->_reCarInfo);
	/* Return to race menu */
	ReInfo->_reState = RE_STATE_CONFIG;
}

static void *
AbortRaceHookInit(void)
{
	if (AbortRaceHookHandle) {
		return AbortRaceHookHandle;
	}

	AbortRaceHookHandle = GfuiHookCreate(0, AbortRaceHookActivate);

	return AbortRaceHookHandle;
}

int
ReRaceEventInit(void)
{
	void *params = ReInfo->params;

	if (getTextOnly()==false)
		RmLoadingScreenStart(ReInfo->_reName, "data/img/splash-qrloading.png");
	ReInitTrack();
	if (getTextOnly()==false)
	{
		RmLoadingScreenSetText("Loading Track 3D Description...");
		ReInfo->_reGraphicItf.inittrack(ReInfo->track);
	}
	// GIUSE - VISION HERE!!
	else if (getVision())
	{
//		RmLoadingScreenSetText("Loading Track 3D Description...");
		ReInfo->_reGraphicItf.inittrack(ReInfo->track);
	}
	ReEventInitResults();

	if (GfParmGetEltNb(params, RM_SECT_TRACKS) > 1) {
		ReNewTrackMenu();
		return RM_ASYNC | RM_NEXT_STEP;
	}
	return RM_SYNC | RM_NEXT_STEP;
}

int
RePreRace(void)
{
	tdble dist;
	char *raceName;
	char *raceType;
	void *params = ReInfo->params;
	void *results = ReInfo->results;

	raceName = ReInfo->_reRaceName = ReGetCurrentRaceName();
	if (!raceName) {
		return RM_QUIT;
	}

	dist = GfParmGetNum(params, raceName, RM_ATTR_DISTANCE, NULL, 0);
	if (dist < 0.001) {
		ReInfo->s->_totLaps = (int)GfParmGetNum(params, raceName, RM_ATTR_LAPS, NULL, 30);
	} else {
		ReInfo->s->_totLaps = ((int)(dist / ReInfo->track->length)) + 1;
	}
	ReInfo->s->_maxDammage = (int)GfParmGetNum(params, raceName, RM_ATTR_MAX_DMG, NULL, 10000);

	raceType = GfParmGetStr(params, raceName, RM_ATTR_TYPE, RM_VAL_RACE);
	if (!strcmp(raceType, RM_VAL_RACE)) {
		ReInfo->s->_raceType = RM_TYPE_RACE;
	} else if (!strcmp(raceType, RM_VAL_QUALIF)) {
		ReInfo->s->_raceType = RM_TYPE_QUALIF;
	} else if (!strcmp(raceType, RM_VAL_PRACTICE)) {
		ReInfo->s->_raceType = RM_TYPE_PRACTICE;
	}

	ReInfo->s->_raceState = 0;

	/* Cleanup results */
	sprintf(path, "%s/%s/%s", ReInfo->track->name, RE_SECT_RESULTS, raceName);
	GfParmListClean(results, path);

	return RM_SYNC | RM_NEXT_STEP;
}

/* return state mode */
static int
reRaceRealStart(void)
{
	int i, j;
	int sw, sh, vw, vh;
	tRobotItf *robot;
	tReCarInfo *carInfo;
	char *dllname;
	char key[256];
	int foundHuman;
	void *params = ReInfo->params;
	void *results = ReInfo->results;
	tSituation *s = ReInfo->s;

	if (getTextOnly()==false)
		RmLoadingScreenSetText("Loading Simulation Engine...");
	dllname = GfParmGetStr(ReInfo->_reParam, "Modules", "simu", "");
	sprintf(key, "%smodules/simu/%s.%s", GetLibDir (), dllname, DLLEXT);
	if (GfModLoad(0, key, &ReRaceModList)) return RM_QUIT;
	ReRaceModList->modInfo->fctInit(ReRaceModList->modInfo->index, &ReInfo->_reSimItf);

	if (ReInitCars()) {
		return RM_QUIT;
	}

	/* Blind mode or not */
	// GIUSE - VISION HERE!! - or visual based ;)
	if (getTextOnly()==false)
	{
		ReInfo->_displayMode = RM_DISP_MODE_NORMAL;
		ReInfo->_reGameScreen = ReScreenInit();

		foundHuman = 0;
		for (i = 0; i < s->_ncars; i++) {
			if (s->cars[i]->_driverType == RM_DRV_HUMAN) {
				foundHuman = 1;
				break;
			}
		}
		if (!foundHuman) {
			if (!strcmp(GfParmGetStr(params, ReInfo->_reRaceName, RM_ATTR_DISPMODE, RM_VAL_VISIBLE), RM_VAL_INVISIBLE)) {
				ReInfo->_displayMode = RM_DISP_MODE_NONE;
				ReInfo->_reGameScreen = ReResScreenInit();
			}
		}
	}
	// GIUSE - VISION HERE!!
	else if (getVision())
	{
		ReInfo->_displayMode = RM_DISP_MODE_NORMAL;
		ReInfo->_reGameScreen = ReScreenInit();

//		foundHuman = 0;
//		for (i = 0; i < s->_ncars; i++) {
//			if (s->cars[i]->_driverType == RM_DRV_HUMAN) {
//				foundHuman = 1;
//				break;
//			}
//		}
//		if (!foundHuman) {
//			if (!strcmp(GfParmGetStr(params, ReInfo->_reRaceName, RM_ATTR_DISPMODE, RM_VAL_VISIBLE), RM_VAL_INVISIBLE)) {
				ReInfo->_displayMode = RM_DISP_MODE_NONE;
				ReInfo->_reGameScreen = ReResScreenInit();
//			}
//		}
  }	else
	{
		ReInfo->_displayMode = RM_DISP_MODE_NONE;
  }

	if (!(ReInfo->s->_raceType == RM_TYPE_QUALIF) ||
	((int)GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_DRIVER, NULL, 1) == 1))
	{
		if (getTextOnly()==false)
			RmLoadingScreenStart(ReInfo->_reName, "data/img/splash-qrloading.png");
	}

	for (i = 0; i < s->_ncars; i++) {
		sprintf(buf, "Initializing Driver %s...", s->cars[i]->_name);
		RmLoadingScreenSetText(buf);
		robot = s->cars[i]->robot;
		robot->rbNewRace(robot->index, s->cars[i], s);
	}
	carInfo = ReInfo->_reCarInfo;

	ReInfo->_reSimItf.update(s, RCM_MAX_DT_SIMU, -1);
	for (i = 0; i < s->_ncars; i++) {
		carInfo[i].prevTrkPos = s->cars[i]->_trkPos;
	}

	if (getTextOnly()==false)
		RmLoadingScreenSetText("Running Prestart...");
	for (i = 0; i < s->_ncars; i++) {
		memset(&(s->cars[i]->ctrl), 0, sizeof(tCarCtrl));
		s->cars[i]->ctrl.brakeCmd = 1.0;
	}

	for (j = 0; j < ((int)(1.0 / RCM_MAX_DT_SIMU)); j++) {
		ReInfo->_reSimItf.update(s, RCM_MAX_DT_SIMU, -1);
	}

	if (ReInfo->_displayMode != RM_DISP_MODE_NORMAL) {
		if (ReInfo->s->_raceType == RM_TYPE_QUALIF) {
			ReUpdateQualifCurRes(s->cars[0]);
		} else if (getTextOnly()==false) {
			sprintf(buf, "%s on %s", s->cars[0]->_name, ReInfo->track->name);
			ReResScreenSetTitle(buf);
		}
	}

	if (getTextOnly()==false)
		RmLoadingScreenSetText("Ready.");

	ReInfo->_reTimeMult = 1.0;
//	ReInfo->_reLastTime = -1.0;
//	ReInfo->s->currentTime = -2.0;
// GIUSE - let's start immediately, to save time for evolution
	ReInfo->_reLastTime = 0.0;
	ReInfo->s->currentTime = 0.0;
	ReInfo->s->deltaTime = RCM_MAX_DT_SIMU;

	ReInfo->s->_raceState = RM_RACE_STARTING;

	if (getTextOnly()==false)
	{
		GfScrGetSize(&sw, &sh, &vw, &vh);
		ReInfo->_reGraphicItf.initview((sw-vw)/2, (sh-vh)/2, vw, vh, GR_VIEW_STD, ReInfo->_reGameScreen);

		if (ReInfo->_displayMode == RM_DISP_MODE_NORMAL) {
			/* RmLoadingScreenSetText("Loading Cars 3D Objects..."); */
			ReInfo->_reGraphicItf.initcars(s);
		}

		GfuiScreenActivate(ReInfo->_reGameScreen);
	}
  // GIUSE - VISION HERE!!
  else if (getVision())
	{
		GfScrGetSize(&sw, &sh, &vw, &vh);
		ReInfo->_reGraphicItf.initview((sw-vw)/2, (sh-vh)/2, vw, vh, GR_VIEW_STD, ReInfo->_reGameScreen);

//		if (ReInfo->_displayMode == RM_DISP_MODE_NORMAL) {
//			/* RmLoadingScreenSetText("Loading Cars 3D Objects..."); */
			ReInfo->_reGraphicItf.initcars(s);
//		}

//		GfuiScreenActivate(ReInfo->_reGameScreen);
	}

	return RM_SYNC | RM_NEXT_STEP;
}

/***************************************************************/
/* START RACE HOOK */

static void	*StartRaceHookHandle = 0;

static void
StartRaceHookActivate(void * /* dummy */)
{
	reRaceRealStart();
}

static void *
StartRaceHookInit(void)
{
	if (StartRaceHookHandle) {
		return StartRaceHookHandle;
	}

	StartRaceHookHandle = GfuiHookCreate(0, StartRaceHookActivate);

	return StartRaceHookHandle;
}

/* return state mode */
int
ReRaceStart(void)
{
	int i;
	int nCars;
	int maxCars;
	char *prevRaceName;
	char *gridType;
	char *raceName = ReInfo->_reRaceName;
	void *params = ReInfo->params;
	void *results = ReInfo->results;

	FREEZ(ReInfo->_reCarInfo);
	ReInfo->_reCarInfo = (tReCarInfo*)calloc(GfParmGetEltNb(params, RM_SECT_DRIVERS), sizeof(tReCarInfo));

	/* Drivers starting order */
	GfParmListClean(params, RM_SECT_DRIVERS_RACING);
	if (ReInfo->s->_raceType == RM_TYPE_QUALIF) {
		i = (int)GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_DRIVER, NULL, 1);
		if (getTextOnly()==false)
		{
			if (i == 1) {
			RmLoadingScreenStart(ReInfo->_reName, "data/img/splash-qrloading.png");
			RmLoadingScreenSetText("Preparing Starting Grid...");
			} else {
				RmShutdownLoadingScreen();
			}
		}

		sprintf(path, "%s/%d", RM_SECT_DRIVERS, i);
		sprintf(path2, "%s/%d", RM_SECT_DRIVERS_RACING, 1);
		GfParmSetStr(params, path2, RM_ATTR_MODULE, GfParmGetStr(params, path, RM_ATTR_MODULE, ""));
		GfParmSetNum(params, path2, RM_ATTR_IDX, NULL, GfParmGetNum(params, path, RM_ATTR_IDX, NULL, 0));
	} else {
		if (getTextOnly()==false)
		{
			RmLoadingScreenStart(ReInfo->_reName, "data/img/splash-qrloading.png");
			RmLoadingScreenSetText("Preparing Starting Grid...");
		}

		gridType = GfParmGetStr(params, raceName, RM_ATTR_START_ORDER, RM_VAL_DRV_LIST_ORDER);
		if (!strcmp(gridType, RM_VAL_LAST_RACE_ORDER)) {
			/* Starting grid in the arrival of the previous race */
			nCars = GfParmGetEltNb(params, RM_SECT_DRIVERS);
			maxCars = (int)GfParmGetNum(params, raceName, RM_ATTR_MAX_DRV, NULL, 100);
			nCars = MIN(nCars, maxCars);
			prevRaceName = ReGetPrevRaceName();
			if (!prevRaceName) {
				return RM_QUIT;
			}
			for (i = 1; i < nCars + 1; i++) {
				sprintf(path, "%s/%s/%s/%s/%d", ReInfo->track->name, RE_SECT_RESULTS, prevRaceName, RE_SECT_RANK, i);
				sprintf(path2, "%s/%d", RM_SECT_DRIVERS_RACING, i);
				GfParmSetStr(params, path2, RM_ATTR_MODULE, GfParmGetStr(results, path, RE_ATTR_MODULE, ""));
				GfParmSetNum(params, path2, RM_ATTR_IDX, NULL, GfParmGetNum(results, path, RE_ATTR_IDX, NULL, 0));
			}
		} else if (!strcmp(gridType, RM_VAL_LAST_RACE_RORDER)) {
			/* Starting grid in the reversed arrival order of the previous race */
			nCars = GfParmGetEltNb(params, RM_SECT_DRIVERS);
			maxCars = (int)GfParmGetNum(params, raceName, RM_ATTR_MAX_DRV, NULL, 100);
			nCars = MIN(nCars, maxCars);
			prevRaceName = ReGetPrevRaceName();
			if (!prevRaceName) {
				return RM_QUIT;
			}
			for (i = 1; i < nCars + 1; i++) {
				sprintf(path, "%s/%s/%s/%s/%d", ReInfo->track->name, RE_SECT_RESULTS, prevRaceName, RE_SECT_RANK, nCars - i + 1);
				sprintf(path2, "%s/%d", RM_SECT_DRIVERS_RACING, i);
				GfParmSetStr(params, path2, RM_ATTR_MODULE, GfParmGetStr(results, path, RE_ATTR_MODULE, ""));
				GfParmSetNum(params, path2, RM_ATTR_IDX, NULL, GfParmGetNum(results, path, RE_ATTR_IDX, NULL, 0));
			}
		} else {
			/* Starting grid in the drivers list order */
			nCars = GfParmGetEltNb(params, RM_SECT_DRIVERS);
			maxCars = (int)GfParmGetNum(params, raceName, RM_ATTR_MAX_DRV, NULL, 100);
			nCars = MIN(nCars, maxCars);
			for (i = 1; i < nCars + 1; i++) {
				sprintf(path, "%s/%d", RM_SECT_DRIVERS, i);
				sprintf(path2, "%s/%d", RM_SECT_DRIVERS_RACING, i);
				GfParmSetStr(params, path2, RM_ATTR_MODULE, GfParmGetStr(params, path, RM_ATTR_MODULE, ""));
				GfParmSetNum(params, path2, RM_ATTR_IDX, NULL, GfParmGetNum(params, path, RM_ATTR_IDX, NULL, 0));
			}
		}
	}

	if (!strcmp(GfParmGetStr(params, ReInfo->_reRaceName, RM_ATTR_SPLASH_MENU, RM_VAL_NO), RM_VAL_YES)) {
		if (getTextOnly()==false)
		{
			RmShutdownLoadingScreen();
			RmDisplayStartRace(ReInfo, StartRaceHookInit(), AbandonRaceHookInit());
		}
    // GIUSE - VISION HERE!!
		if (getVision())
		{
//			RmShutdownLoadingScreen();
			RmDisplayStartRace(ReInfo, StartRaceHookInit(), AbandonRaceHookInit());
		}
		return RM_ASYNC | RM_NEXT_STEP;
	}

	return reRaceRealStart();
}

/***************************************************************/
/* BACK TO RACE HOOK */

static void	*BackToRaceHookHandle = 0;

static void
BackToRaceHookActivate(void * /* dummy */)
{
	ReInfo->_reState = RE_STATE_RACE;
	GfuiScreenActivate(ReInfo->_reGameScreen);
}

static void *
BackToRaceHookInit(void)
{
	if (BackToRaceHookHandle) {
		return BackToRaceHookHandle;
	}

	BackToRaceHookHandle = GfuiHookCreate(0, BackToRaceHookActivate);

	return BackToRaceHookHandle;
}

/***************************************************************/
/* RESTART RACE HOOK */

static void	*RestartRaceHookHandle = 0;

static void
RestartRaceHookActivate(void * /* dummy */)
{
	ReRaceCleanup();
	ReInfo->_reState = RE_STATE_PRE_RACE;
	GfuiScreenActivate(ReInfo->_reGameScreen);
}

static void *
RestartRaceHookInit(void)
{
	if (RestartRaceHookHandle) {
		return RestartRaceHookHandle;
	}

	RestartRaceHookHandle = GfuiHookCreate(0, RestartRaceHookActivate);

	return RestartRaceHookHandle;
}

/***************************************************************/
/* QUIT HOOK */

static void	*QuitHookHandle = 0;
static void	*StopScrHandle = 0;

static void
QuitHookActivate(void * /* dummy */)
{
	if (StopScrHandle) {
		GfuiScreenActivate(TorcsExitMenuInit(StopScrHandle));
	}
}

static void *
QuitHookInit(void)
{
	if (QuitHookHandle) {
		return QuitHookHandle;
	}

	QuitHookHandle = GfuiHookCreate(0, QuitHookActivate);

	return QuitHookHandle;
}

int
ReRaceStop(void)
{
	void	*params = ReInfo->params;

	if (RESTART!=1)
	{

		if (!strcmp(GfParmGetStr(params, ReInfo->_reRaceName, RM_ATTR_ALLOW_RESTART, RM_VAL_NO), RM_VAL_NO)) {
			StopScrHandle = RmTriStateScreen("Race Stopped",
						"Abandon Race", "Abort current race", AbortRaceHookInit(),
						"Resume Race", "Return to Race", BackToRaceHookInit(),
						"Quit Game", "Quit the game", QuitHookInit());
		} else {
			StopScrHandle = RmFourStateScreen("Race Stopped",
						"Restart Race", "Restart the current race", RestartRaceHookInit(),
						"Abandon Race", "Abort current race", AbortRaceHookInit(),
						"Resume Race", "Return to Race", BackToRaceHookInit(),
						"Quit Game", "Quit the game", QuitHookInit());
		}
	}
	return RM_ASYNC | RM_NEXT_STEP;
}

int
ReRaceEnd(void)
{
	int curDrvIdx;
	void *params = ReInfo->params;
	void *results = ReInfo->results;

	if (getTextOnly()==false)
	{
		ReRaceCleanup();
		if (ReInfo->s->_raceType == RM_TYPE_QUALIF) {
			curDrvIdx = (int)GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_DRIVER, NULL, 1);
			curDrvIdx++;
			if (curDrvIdx > GfParmGetEltNb(params, RM_SECT_DRIVERS)) {
				GfParmSetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_DRIVER, NULL, 1);
				return ReDisplayResults();
			}
			GfParmSetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_DRIVER, NULL, curDrvIdx);
			return RM_SYNC | RM_NEXT_RACE;
		}
		return ReDisplayResults();
	}
	// GIUSE - VISION HERE!!
	else if (getVision())
	{
		ReRaceCleanup();
		if (ReInfo->s->_raceType == RM_TYPE_QUALIF) {
			curDrvIdx = (int) 1 + GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_DRIVER, NULL, 1);
			if (curDrvIdx > GfParmGetEltNb(params, RM_SECT_DRIVERS)) {
				GfParmSetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_DRIVER, NULL, 1);
			}
			else
			{
			  GfParmSetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_DRIVER, NULL, curDrvIdx);
			  return RM_SYNC | RM_NEXT_RACE;
			}
		}
		return RE_STATE_EXIT;
	}
	else
	{
		int i;
		tRobotItf *robot;
		int nCars;

		nCars = ReInfo->s->_ncars;
		for (i = 0; i < nCars; i++) {
			robot = ReInfo->s->cars[i]->robot;
			if (robot->rbShutdown) {
				robot->rbShutdown(robot->index);
			}
			//GfParmReleaseHandle(ReInfo->s->cars[i]->_paramsHandle);
			free(robot);
		}
		return RE_STATE_EXIT;
	}
}

int
RePostRace(void)
{
	int curRaceIdx;
	void *results = ReInfo->results;
	void *params = ReInfo->params;

	//ReUpdateStandings();

	curRaceIdx = (int)GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_RACE, NULL, 1);
	if (curRaceIdx < GfParmGetEltNb(params, RM_SECT_RACES)) {
		curRaceIdx++;
		GfOut("Race Nb %d\n", curRaceIdx);
		GfParmSetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_RACE, NULL, curRaceIdx);
		ReUpdateStandings();
		return RM_SYNC | RM_NEXT_RACE;
	}

	ReUpdateStandings();
	GfParmSetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_RACE, NULL, 1);
	return RM_SYNC | RM_NEXT_STEP;
}

int
ReEventShutdown(void)
{
	int curTrkIdx;
	void *params = ReInfo->params;
	int nbTrk = GfParmGetEltNb(params, RM_SECT_TRACKS);
	int ret = 0;
	void *results = ReInfo->results;

	ReInfo->_reGraphicItf.shutdowntrack();

	int curRaceIdx = (int)GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_RACE, NULL, 1);
	curTrkIdx = (int)GfParmGetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_TRACK, NULL, 1);

	if (curRaceIdx == 1) {
		if (curTrkIdx < nbTrk) {
			// Next track.
			curTrkIdx++;
		} else if (curTrkIdx >= nbTrk) {
			// Back to the beginning.
			curTrkIdx = 1;
		}
	}

	GfParmSetNum(results, RE_SECT_CURRENT, RE_ATTR_CUR_TRACK, NULL, curTrkIdx);

	if (curTrkIdx != 1) {
		ret =  RM_NEXT_RACE;
	} else {
		ret =  RM_NEXT_STEP;
	}

	if (nbTrk != 1) {
		ReDisplayStandings();
		return RM_ASYNC | ret;
	}
	FREEZ(ReInfo->_reCarInfo);

	return RM_SYNC | ret;
}