Heightfield sample format. More...
#include <PxHeightFieldSample.h>
Public Member Functions | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxU8 | tessFlag () const |
| PX_CUDA_CALLABLE PX_FORCE_INLINE void | setTessFlag () |
| PX_CUDA_CALLABLE PX_FORCE_INLINE void | clearTessFlag () |
Public Attributes | |
| PxI16 | height |
| The height of the heightfield sample. More... | |
| PxBitAndByte | materialIndex0 |
| The triangle material index of the quad's lower triangle + tesselation flag. More... | |
| PxBitAndByte | materialIndex1 |
| The triangle material index of the quad's upper triangle + reserved flag. More... | |
Heightfield sample format.
This format corresponds to the PxHeightFieldFormat member PxHeightFieldFormat::eS16_TM.
An array of heightfield samples are used when creating a PxHeightField to specify the elevation of the heightfield points. In addition the material and tessellation of the adjacent triangles are specified.
|
inline |
References materialIndex0.
|
inline |
References materialIndex0.
|
inline |
References materialIndex0.
| PxI16 PxHeightFieldSample::height |
The height of the heightfield sample.
This value is scaled by PxHeightFieldGeometry::heightScale.
| PxBitAndByte PxHeightFieldSample::materialIndex0 |
The triangle material index of the quad's lower triangle + tesselation flag.
An index pointing into the material table of the shape which instantiates the heightfield. This index determines the material of the lower of the quad's two triangles (i.e. the quad whose upper-left corner is this sample, see the Guide for illustrations).
Special values of the 7 data bits are defined by PxHeightFieldMaterial
The tesselation flag specifies which way the quad is split whose upper left corner is this sample. If the flag is set, the diagonal of the quad will run from this sample to the opposite vertex; if not, it will run between the other two vertices (see the Guide for illustrations).
| PxBitAndByte PxHeightFieldSample::materialIndex1 |
The triangle material index of the quad's upper triangle + reserved flag.
An index pointing into the material table of the shape which instantiates the heightfield. This index determines the material of the upper of the quad's two triangles (i.e. the quad whose upper-left corner is this sample, see the Guide for illustrations).


West Ham eyeing raid on Championship outfit to solve key issue
by Ron CarneWest Ham are reportedly considering a potential swoop for Stoke City goalkeeper Jack Butland after Lukasz Fabianski’s injury blow.
The Hammers return from the international break desperate for a positive result against Jose Mourinho’s Tottenham side this weekend.
SEE MORE: Jose Mourinho instructs Tottenham to rival Manchester United for potential £38.5million transfer
Having lost four of their last five Premier League outings, a run of results which has seen them slip down to 16th place in the table, Manuel Pellegrini needs to get his side back to winning ways as soon as possible.
However, that has been complicated by the setback suffered by Fabianski who had been a key figure for West Ham, with Roberto stepping in and struggling to fill the void left behind.
In turn, according to the Stoke Sentinel, it has been suggested that Butland is on the West Ham transfer radar, with the 26-year-old making 10 appearances for the Potters so far this season.
In those outings, he has conceded 21 goals and kept just one clean sheet, but given his experience of playing in the top flight as well as for England, it could be a sensible addition for West Ham to solve that issue in the current squad.
Fabianski is still undergoing rehabilitation after undergoing a procedure on his hip injury, which has forced him to miss the last five Premier League outings. In turn, with no immediate return in sight, bringing Butland in could be a key move for Pellegrini’s side.


Welcome to my website! Here are some things I enjoy.
"We should not give up and we should not allow the problem to defeat us."
"The past cannot be changed. The future is yet in your power."


Membership at Red Butte Garden gives you the opportunity to experience every season uniquely, connect with nature in a rewarding way, and maybe attend a few concerts featuring world-renowned musicians in the beautiful Red Butte Garden Amphitheatre.
Membership benefits include Garden admission for 12 months and free admission at many events and programs such as Monday Family Nights, Orchid and Bonsai Exhibits, Art Exhibits, and guided Garden tours.
Need the perfect gift for your favorite garden enthusiast? Share the beauty of the Garden through a Gift Membership at any level. Find your perfect fit below.
Please note: Garden Memberships are not refundable or transferable, and Membership does not guarantee concert tickets. For a complete list of membership policies, please refer to the Garden Policies section below:
Benefits of Garden Membership
A Year of Free Events and Programs
Garden Admission for 12 months and all four distinctive seasons *
Guided Complimentary & Specialty Tours of the Garden
Monday Family Night
Orchid & Bonsai Shows
Art Exhibits
Member-Only Day at the Annual Spring Plant Sale
Quarterly Newsletter and a monthly e-mail update of Garden events
*Unlimited Garden Admission does not include concerts or separately ticketed events.
A Year of Great Discounts
Up to 20% off adult education classes at Red Butte Garden
Seasonal Workshops
Horticulture and gardening classes
University of Utah Continuing Education Lifelong Learning classes
Better Home & Gardens or Martha Stewart Living One-Year Subscription
Has gone paperless! Watch for your certificate via email, or contact the Membership Department for a copy.
White Flower Farm 20% Off
• Contact the membership department to learn how you can claim 20% off your catalog order. www.whiteflowerfarm.com
The American Horticulture Society's Reciprocal Admissions Program offers free admission and/or additional benefits at 300 gardens throughout North America and the Cayman Islands.
Red Butte Garden Outdoor Concert Series exclusive early access and discounts for Garden-Plus level and above
Member Benefits are subject to change.
Please note that Garden Memberships are not refundable or transferable.
Garden Membership Policies
Memberships are non-refundable and non-transferable.
Member events, programs, and discounts apply to cardholders only.
Cardholder must be present to receive benefits. Photo ID may be required.
Unlimited General Admission does not include concerts, Garden After Dark, or other separately ticketed events.
Only the Garden-Plus membership level allows a guest to be named as a cardholder. All other levels have set cardholder allowances.
You may apply same-day admission costs to the purchase of a membership. Offer is only available at the Visitor Center desk on the day that admission to the Garden was purchased.
Membership purchase does not guarantee Red Butte Garden Outdoor Concert Series tickets or access to other ticketed events.
Only Garden-Plus Membership level and above receive member-rate concert tickets and member-only presale period access to the Red Butte Garden Outdoor Concert Series.
The American Horticultural Society’s Reciprocal Admissions Program offers free admission and/or additional benefits at 300 gardens throughout North America and the Cayman Islands. Institutions less than 90 miles away from Red Butte Garden or your residence are not included. Photo ID may be required for entry.
Member Benefits are subject to change without notice.
Garden admission for one guest, or the ability to add a second cardholder
This level may purchase two discounted tickets per concert
Family Membership
$75 - Great for parents or grandparents!
Member benefits for two individuals
Garden admission for up to six children age 17 and under
This level may purchase four discounted tickets per concert
Family-Plus Membership
$105 - Great for parents and caretakers!
Member benefits for three individuals
Garden admission for up to six children age 17 and under
This level may purchase four discounted tickets per concert
Circle of Friends Membership
$80 - Great for the entertainer!
Member benefits for one individual
Garden admission for three guests
This level may purchase four discounted tickets per concert
Contributor Membership
$150 - Best Value!
Member benefits for two individuals
Garden admission for six guests
This level may purchase six discounted tickets per concert
Giving Circle Membership Levels
Forget-Me-Not Membership
$250
Member benefits for two individuals
Garden admission for up to eight guests
This level may purchase six discounted tickets per concert
Blazing Star Membership
$500
Member benefits for two individuals
Garden admission for eight guests
This level may purchase eight discounted tickets per concert
Garden tour with a Garden staff member
Avant Gardener Membership
$1000
Member benefits for two individuals
Garden admission for eight guests
This level may purchase eight discounted tickets per concert
Garden tour with the Garden's Executive Director
Director's Club Membership
$2500
Member benefits for two individuals
Garden admission for eight guests
This level may purchase eight discounted tickets per concert
Exclusive behind the scenes Garden tour with the Garden's Executive Director
Corporate & Organization Memberships
Horticulture Therapy Pass
Red Butte Garden is a great place to host breakouts and meetings, or simply bring your employees to find a little piece of mind. Horticulture Therapy Passes are perfect for non-profits who frequent the Garden.
Did you know that many corporations offer employee giving programs where they match donations to Red Butte Garden? If you volunteer at the Garden, your company may also offer a volunteer grant program. To double the impact of your gift, check the University of Utah Office of Development website to see if your company offers a matching gift program or contact your employers' Human Resources Department.


- Introduction
- 1. Obtain and Distribute the Parcel from Unravel Server
- 2. Put the Hive Hook JAR in AUX_CLASSPATH
- 3. Configure the Gateway Automatic Deployment of Hive Instrumentation
- 4. Configure the Gateway Automatic Deployment of Spark Instrumentation
- 5. Optional - Configure YARN - MapReduce (MR) JVM Sensor Cluster-Wide
- 6. (Optional) Advanced Configuration
- Troubleshooting
- References
Introduction
This topic explains how to install the Unravel Sensor parcel on CDH clusters using Cloudera Manager (CM). The parcel includes Hive Hook and Spark instrumentation JARs. Hive Hook is used to collect information about Hive queries in Hadoop. The Spark instrumentation JARs measure Spark job performance.
These instructions apply to Unravel Sensor 4.3
Before following these instructions, follow the steps in Step 1: Install Unravel Server on CDH+CM.
- Obtain and distribute the parcel from Unravel Server.
- Put the Hive Hook JAR in
AUX_CLASSPATH
. - Configure the gateway automatic deployment of Hive instrumentation.
- Configure the gateway automatic deployment of Spark instrumentation.
confluence-information-macro confluence-information-macro-information
confluence-information-macro confluence-information-macro-information
To Upgrade the Unravel Sensor
- Check the
UNRAVEL_SENSOR
parcel status in Cloudera Manager.- If an upgrade is available complete steps 3 through 5 to perform the upgrade.
1. Obtain and Distribute the Parcel from Unravel Server
- In Cloudera Manager (CM), go to the Parcels page by clicking the parcels glyph () on the top of the page.
- Click Configuration to see the Parcel Settings pop-up.
- In the Remote Parcel Repository URLs section of the Parcel Settings pop-up, click the + glyph to add a new entry.
- Add
http://{UNRAVEL_HOST_IP
}:3000/parcels/cdh{X.Y}/ (include trailing slash) whereX.Y
is the major, minor version of CDH version you are running andUNRAVEL_HOST_IP
is the host name or LAN IP address of Unravel Server whereunravel_lr
is running. If you are running more than one version of CDH (multiple clusters) in Cloudera Manager, you can add more than one parcel directory from theUNRAVEL_HOST_IP
. - Click Save.
- Click Check for New Parcels.
- On the Parcels page, pick a target cluster in the Location box.
- In the list of Parcel Names, find the
UNRAVEL_SENSOR
parcel that matches the version of the target cluster and click Download. - Click Distribute.
- If you have an old parcel from Unravel, you can deactivate it now.
- Then click Activate on the new parcel.
2. Put the Hive Hook JAR in AUX_CLASSPATH
In Cloudera Manager, for the target cluster, click Hive | Configuration, and search for
hive-env
.In Gateway Client Environment Advanced Configuration Snippet (Safety Valve) for
hive-env.sh
enter the following exactly as shown, with no subsitutions:In Cloudera Manager, click YARN | Configuration, and search for
hadoop-env
.In Gateway Client Environment Advanced Configuration Snippet (Safety Valve) for
hadoop-env.sh
, enter the following exactly as shown, with no subsitutions:
If Sentry is Enabled:
Sentry commands may also be needed to enable access to the
Hive Hook JAR file. Grant privileges on the JAR files to the
roles that run hive queries. Log into Beeline as user
hive
and use the Hive SQL GRANT
statement to do so.
For example (substitute {ROLE}
as appropriate):
3. Configure the Gateway Automatic Deployment of Hive Instrumentation
Use Cloudera Manager to deploy the hive-site.xml
snippet, which is the content of
/usr/local/unravel/hive-hook/hive-site.xml.snip
on
Unravel Server.
confluence-information-macro confluence-information-macro-information
On a multi-host Unravel Server deployment, use host2’s/usr/local/unravel/hive-hook/hive-site.xml.snip
Set the hive-site.xml
Snippet in Cloudera
Manager, and Deploy the Hive Client Configuration to
Gateways
In Cloudera Manager (CM):
Go to Hive service.
Select the Configuration tab.
Search for
hive-site.xml
in the middle of the page.Add the xml snippet to Hive Client Advanced Configuration Snippet for ``hive-site.xml`` (Gateway Default Group) (Click View as XML).
confluence-information-macro confluence-information-macro-warning
If cluster has been configured with “Cloudera Navigator”; the
hive.exec.post.hooks
property will have exsiting value(s). Therefore append the unravel’s value into the existinghive.exec.post.hooks
property with a comma and no space. (see example below)com.cloudera.navigator.audit.hive.HiveExecHookContext,org.apache.hadoop.hive.ql.hooks.LineageLogger, com.unraveldata.dataflow.hive.hook.HivePostHook
IMPORTANT! The “Hive Client Advanced Configuration Snippet for hive-site.xml” should only have the Unravel class.However, the “HiveServer2 Advanced Configuration Snippet for hive-site.xml” should have all 3 classes: 2 from Navigator and 1 from Unravel.Add the xml snippet to HiveServer2 Advanced Configuration Snippet for
hive-site.xml
. (Click View as XML). Like above step, if properties exists, append unravel’s value.Save the changes with optional comment “Unravel snippet in
hive-site.xml
**” **Perform action Deploy Hive Client Configuration by clicking the deploy glyph () or by using the Actions pull-down menu.
Restart the Hive service. (Cloudera Manager will specify a restart which is not necessary for activating these changes. You may act on CM’s recommendation at a later time. )
Again, monitor the situation to see if all Hive queries
are failing with a class not found or permission
problems. If they are failing, you can back-out the
hive-site.xml
advanced snippet changes in Cloudera
Manager, deploy client configuration, and restart the
Hive service to revert, then refer to
Troubleshooting
below.
Check Unravel Web UI
If queries are running fine and appearing in Unravel Web UI, then you are done.
4. Configure the Gateway Automatic Deployment of Spark Instrumentation
In Cloudera Manager, select the target cluster, then select the Spark service.
Select Configuration.
Search for “
spark-defaults
”.In the Spark Client Advanced Configuration Snippet (Safety Valve) for spark-conf/spark-defaults.conf, enter the following text, substituting the highlighted text for your particular values:
confluence-information-macro confluence-information-macro-note
On a multi-host Unravel Server deployment, use the fully qualified DNS or logical host2 for
UNRAVEL_HOST_IP
which must be .confluence-information-macro confluence-information-macro-warning
Copy the text below and paste it into the Cloudera Manager’s Spark Client Advanced Configuration Snippet (Safety Valve) box for ``spark-conf/spark-defaults.conf``. Then, modify the value of
UNRAVEL_HOST_IP
andSPARK_VERSION-X.Y
.SPARK_VERSION
-X.Y
has the following possible values:spark-1.3
for Spark 1.3.x,spark-1.5
for Spark 1.5.x,spark-1.6
for Spark 1.6.x, andspark-2.0
for Spark 2.0.x.
- Save changes.
6. Deploy client configuration by clicking the deploy glyph () or by using the Actions pull-down menu. Your spark-shell will ensure new JVM containers are created with the necessary extraJavaOptions for the spark drivers and executors.
confluence-information-macro confluence-information-macro-warning
Monitor the situation to see if all Spark queries are failing with a class not found or permission problems. If they are failing, you can back-out thespark-defaults.conf
changes in Cloudera Manager, re-deploy client configuration, and then investigate and fix the issue.
confluence-information-macro confluence-information-macro-information
In the case of yarn-client mode applications, the Spark default configuration won’t be sufficient because the driver JVM starts before the configuration set through the SparkConf is applied. (See Apache’s Spark Configuration for more information.) See here for how to set up Unravel Sensor for Spark to profile specific Spark applications only, i.e., per-application profiling rather than cluster-wide profiling.
5. Optional - Configure YARN - MapReduce (MR) JVM Sensor Cluster-Wide
In Cloudera Manager (CM) go to YARN service.
Select the Configuration tab.
Search for ApplicationMaster Java Opts Baseand concatenate the following xml block properties snippet (ensure to start with a space and add below).
confluence-information-macro confluence-information-macro-note
Make sure that “-” is a minus sign. You need to modify the value of
UNRAVEL_HOST_IP
with your Unravel server IP address or a fully qualified DNS. For multi-host Unravel installation, use the IP address of Host2.Search for MapReduce Client Advanced Configuration Snippet (Safety Valve) for ``mapred-site.xml``in the middle of the page.
Enter following xml four block properties snippet to Gateway Default Group (Click View as XML).
- Save changes.
7. Deploy client configuration by clicking the deploy glyph () or by using the Actions pull-down menu.
8. Cloudera Manager will specify a restart which is not necessary to effect these changes. (click Restart Stale Services if that is visible. However, you can also perform this later when you have a planned maintenance.)
confluence-information-macro confluence-information-macro-tip
Monitor the situation and you should see in Unravel UI a Resource Usage tab showing you mappers and reducers when you view the Application page for any completed MRjob. Restart is important for MR sensor to be picked up by queries submitted via Hiveserver2.
6. (Optional) Advanced Configuration
- Configuration for high volume data: see Creating Multiple Workers for High Volume Data.
- Add LDAP users: see Integrating LDAP Authentication for Unravel Web UI.
Troubleshooting
| Symptom | Problem | Remedy |
``hadoop fs -ls /user/u
nravel/HOOK_RESULT_DIR/`` | shows directory does
|
|
Install Unravel RPM
on Unravel service
host:
``sudo rpm -U unrav
el*.rpm*`` | OR | Verify that
|
ClassNotFound error
for
com.unraveldata.dataflo
w.hive.hook.HivePreHook
during Hive query
execution |
Unravel hive
hook JAR was not
found in in
$HIVE_HOME/lib
/ . |
Check whether
UNRAVEL_SENSOR
parcel was
distributed and
activated in CM.
OR
Put the Unravel
hive-hook JAR
corresponding
to
HIVE_VER
in JAR_DEST on
each gateway by:``cd /usr/local/unr
avel/hive-hook/;``
| |
References
{+}http://www.cloudera.com/documentation/enterprise/5-3-x/topics/cm_mc_hive_udf.html#concept_nc3_mms_lr_unique_2+ see Creating Permanent Functions.
Attachments:


{% extends "layout.html" %} {% block body %}
The CLIENT_ID or CLIENT_SECRET is not configured
Please go to config.py and set the above variables before you continue


{{firstChoice}} and {{secondChoice}} keyboards.
Price: ${{keyboard.model.price}} Switch Brand: {{keyboard.switch.brand}} Type: {{keyboard.switch.type}}


{% extends 'formapi/base.html' %} {% block content %}
The sidebar shows the api calls sorted by api version.


Info
Welcome to the generated API reference. Get Postman Collection
general
Display a listing of the resource.
Example request:
curl -X GET \
-G "http://localhost/student" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/student"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "All Student",
"result": [
{
"id": 1,
"nama": "Muhammad Farras Jibran",
"kelas": [
{
"id": 1,
"kelas": "XII RPL 1",
"created_at": "2021-02-11T03:00:53.000000Z",
"updated_at": "2021-02-11T03:00:53.000000Z"
}
],
"nisn": "31231231",
"ttl": "2003-08-06",
"anak_ke": "2",
"agama": "Islam",
"alamat": "Jln.Hj Abdul Ghani II",
"no_hp_siswa": "081213517643",
"no_hp_ayah": "081218498025",
"nama_ayah": "Untung Sumardi",
"pekerjaan_ayah": "PNS",
"no_hp_ibu": "-",
"nama_ibu": "Yoyoh Sobiroh",
"pekerjaan_ibu": "IRT",
"foto_siswa": "http:\/\/localhost:8000\/upload\/foto_siswa\/U-1613016955.png",
"no_hp_wali": null,
"nama_wali": null,
"pekerjaan_wali": null,
"alamat_wali": null,
"created_at": "2021-02-11T02:58:44.000000Z",
"updated_at": "2021-02-11T04:15:55.000000Z"
}
]
}
HTTP Request
GET student
student/store
Example request:
curl -X POST \
"http://localhost/student/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/student/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST student/store
student/get/{id}
Example request:
curl -X GET \
-G "http://localhost/student/get/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/student/get/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "Student Detail",
"data": {
"id": 1,
"nama": "Muhammad Farras Jibran",
"kelas": [
{
"id": 1,
"kelas": "XII RPL 1",
"created_at": "2021-02-11T03:00:53.000000Z",
"updated_at": "2021-02-11T03:00:53.000000Z"
}
],
"nisn": "31231231",
"ttl": "2003-08-06",
"anak_ke": "2",
"agama": "Islam",
"alamat": "Jln.Hj Abdul Ghani II",
"no_hp_siswa": "081213517643",
"no_hp_ayah": "081218498025",
"nama_ayah": "Untung Sumardi",
"pekerjaan_ayah": "PNS",
"no_hp_ibu": "-",
"nama_ibu": "Yoyoh Sobiroh",
"pekerjaan_ibu": "IRT",
"foto_siswa": "http:\/\/localhost:8000\/upload\/foto_siswa\/U-1613016955.png",
"no_hp_wali": null,
"nama_wali": null,
"pekerjaan_wali": null,
"alamat_wali": null,
"created_at": "2021-02-11T02:58:44.000000Z",
"updated_at": "2021-02-11T04:15:55.000000Z"
}
}
HTTP Request
GET student/get/{id}
student/update/{id}
Example request:
curl -X POST \
"http://localhost/student/update/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/student/update/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST student/update/{id}
student/delete/{id}
Example request:
curl -X DELETE \
"http://localhost/student/delete/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/student/delete/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE student/delete/{id}
Display a listing of the resource.
Example request:
curl -X GET \
-G "http://localhost/kelas" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/kelas"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "All Kelas",
"result": [
{
"id": 1,
"kelas": "XII RPL 1",
"created_at": "2021-02-11T03:00:53.000000Z",
"updated_at": "2021-02-11T03:00:53.000000Z"
}
]
}
HTTP Request
GET kelas
kelas/store
Example request:
curl -X POST \
"http://localhost/kelas/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/kelas/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST kelas/store
kelas/get/{id}
Example request:
curl -X GET \
-G "http://localhost/kelas/get/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/kelas/get/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "Kelas Detail",
"data": {
"id": 1,
"kelas": "XII RPL 1",
"created_at": "2021-02-11T03:00:53.000000Z",
"updated_at": "2021-02-11T03:00:53.000000Z"
}
}
HTTP Request
GET kelas/get/{id}
kelas/update/{id}
Example request:
curl -X PUT \
"http://localhost/kelas/update/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/kelas/update/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT kelas/update/{id}
kelas/delete/{id}
Example request:
curl -X DELETE \
"http://localhost/kelas/delete/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/kelas/delete/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE kelas/delete/{id}
Display a listing of the resource.
Example request:
curl -X GET \
-G "http://localhost/attendance" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/attendance"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "All Attendance",
"result": []
}
HTTP Request
GET attendance
attendance/store
Example request:
curl -X POST \
"http://localhost/attendance/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/attendance/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST attendance/store
attendance/get/{id}
Example request:
curl -X GET \
-G "http://localhost/attendance/get/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/attendance/get/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "Attendance Detail",
"data": null
}
HTTP Request
GET attendance/get/{id}
attendance/update/{id}
Example request:
curl -X PUT \
"http://localhost/attendance/update/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/attendance/update/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT attendance/update/{id}
attendance/delete/{id}
Example request:
curl -X DELETE \
"http://localhost/attendance/delete/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/attendance/delete/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE attendance/delete/{id}
excul
Example request:
curl -X GET \
-G "http://localhost/excul" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/excul"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "All Extracurricular",
"result": []
}
HTTP Request
GET excul
excul/store
Example request:
curl -X POST \
"http://localhost/excul/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/excul/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST excul/store
excul/get/{id}
Example request:
curl -X GET \
-G "http://localhost/excul/get/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/excul/get/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "Extracurricular Detail",
"data": []
}
HTTP Request
GET excul/get/{id}
excul/update/{id}
Example request:
curl -X PUT \
"http://localhost/excul/update/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/excul/update/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT excul/update/{id}
excul/delete/{id}
Example request:
curl -X DELETE \
"http://localhost/excul/delete/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/excul/delete/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE excul/delete/{id}
bk
Example request:
curl -X GET \
-G "http://localhost/bk" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/bk"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "All Konseling",
"result": []
}
HTTP Request
GET bk
bk/store
Example request:
curl -X POST \
"http://localhost/bk/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/bk/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST bk/store
bk/get/{id}
Example request:
curl -X GET \
-G "http://localhost/bk/get/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/bk/get/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"status": 200,
"message": "Konseling Detail",
"data": []
}
HTTP Request
GET bk/get/{id}
bk/update/{id}
Example request:
curl -X PUT \
"http://localhost/bk/update/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/bk/update/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT bk/update/{id}
bk/delete/{id}
Example request:
curl -X DELETE \
"http://localhost/bk/delete/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/bk/delete/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE bk/delete/{id}


| Name | Kind | Description |
| DA_choix_emploi_du_temps | activity diagram | |
| DA_Inserer_film | activity | |
| DA_Insertion | activity diagram | |
| DA_suppr_resa | activity diagram | |
| DA_suppr_resa | activity | |
| Date | attribute | |
| date | attribute | |
| DC_hebergement | class view | |
| DC_hebergement | class diagram | |
| DC_hebergement | class view | |
| DC_hebergement | deployment view | |
| DC_Planning | class diagram | |
| DC_Planning | deployment view | |
| DC_Planning | class view | |
| DCU_hebergement | use case diagram | |
| DCU_herbergement | use case view | |
| DCU_Planning | use case diagram | |
| DCU_Planning | use case view | |
| decision activity node | decision activity node | |
| decision activity node | decision activity node | |
| DP_Analyse | class view | |
| DP_Analyse | class diagram | |
| DS_affectation_resa | sequence diagram | |
| DS_choix_emploi_temps | sequence diagram | |
| DS_génération | sequence diagram | |
| Duree | attribute |


| Psy::Matrix::Block |
Psy::Matrix::Block
Version 0.01
Contains meta-data for blocks. Internal use only for all intents and purposes.
use Psy::Matrix::Block my $foo = block->new; # see _init
Accessor for a -label of -blk.
Accessor for the starting (nucleotide) position of this block, ** as originally read from the matrix **. All blocks are included.
As literalStart. All blocks are included.
Accessor for the starting position of this block, as originally read from the matrix. Bracketed blocks are _excluded_ in calculating this position.
Ad excludedStart. Bracketed blocks are _excluded_ in calculating this position.
Accessor for bracketed property. 1 == bracketed
Length including gaps.
Prints a line containing the various metadata.
| Psy::Matrix::Block |


| Path: | model_graph.rb |
| Last Update: | Mon Sep 18 00:44:21 EDT 2006 |
When run from the trunk of a Rails project, produces DOT output which can be rendered into a graph by programs such as dot and neato and viewed with Graphviz (an Open Source viewer). I use the Mac OS X version, but there’s a Darwinports (aka, Macports) version, too. Or get the source and build it yourself. You can also import a DOT file with OmniGraffle, but it doesn’t support all the edge decorations that I’m using.
| DOT format: | www.graphviz.org/doc/info/lang.html |
| Graphviz license: | www.graphviz.org/License.php |
| Mac OS X Graphviz: | www.pixelglow.com/graphviz/ |
| Darwinports Graphviz: | darwinports.opendarwin.org/darwinports/dports/graphics/graphviz/Portfile |
| Graphviz source code: | www.graphviz.org/Download.php |
This is certainly a work-in-progress.
rake model_graph
then open tmp/model_graph.dot with a viewer. Using ‘model_graph.rb DEBUG=on’ will write a bunch of the raw information obtained from reflecting on the ActiveRecord model classes into the output as comments (including some things that don’t actually affect the final graph).
See the documentation for ModelGraph#do_graph for some additional options.
The ordering within DOT is based on the tail-to-head relationship of edges, but these are somewhat arbitrarily determined by the current reflection on ActiveRecord associations. The use of the EDGES= and NODES= options is only a partial fix.
Inspired by: Matt Biddulph at August 2, 2006 02:57 PM URL: www.hackdiary.com/archives/000093.html
This is released under the MIT License. Please send comments or enhanncement ideas to Rob[at]AgileConsultingLLC[dot]com or Rob_Biedenharn[at]alum[dot]mit[dot]edu
Copyright © 2006 Rob Biedenharn
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


FAERS Summary
Please select a condition from the product label to review spontaneous reports
Loading
Condition Name
Count
PRR


"Young makes the most amazing projects I have ever seen!"
My very first website! This project was used to demonstrate very basic html concepts and learn how to commit/push to github. It is coded in HTML.
This website project was used to learn proper formatting when creating websites. It is coded in HTML.
This is website about an awesome cat, Darius. It was made to learn and show techniques for styling webpages by applying a CSS file. It is written in HTML with a CSS style sheet language.
This is a website about Paradise Island Resort. It was made to learn About CSS styling techniques, branching, and github pages. It is written in HTML with a CSS style sheet language.
This a webpage advertising ramen touring vacationss in Japan. It was made to learn about the various ways to utilize bootstrap. It is written in HTML with a CSS style sheet language.
This was a website made to attempt to recreate the webpage for Wikipedia. As can be seen, it is still very much a work in progress. It is written in HTML with a CSS style sheet language.


History Hub
About
Classes
Events
Blog
Learn More
FAQ
404
Contact Us:
Login
Logout
Create an Event
Home
Create an Event
Comment
Write Comment


November 15
And now abides faith, hope, charity, these three; but the greatest of these is charity. 1 Corinthians 13:13
What do you do when you're facing a particularly stubborn problem? A problem that resists your every effort to solve it? Put the power of love to work on it! The power of love is the greatest power in the universe. It's beyond defeat. It never fails (1 Cor. 13:8). The Bible says God is love. So when you release love into a situation, you have released God into it. Think about that! When you start releasing love into a situation, Jesus becomes responsible for its success.
What is this love I'm talking about? First Corinthians 13 tells us it's patient and kind.
It's not jealous or haughty or conceited or rude. It doesn't insist on its own way. It's not touchy or resentful and it pays no attention to a suffered wrong.
Love rejoices when right and truth prevail and it bears up under anything and everything that comes. It's ever ready to believe the best of every person. Its hopes are fadeless under all circumstances and it endures everything without weakening (The Amplified Bible). The person who refuses to love is missing out on the very best God has to offer.
Don't you miss out on any of it. Release love every moment into every situation, every prayer and every thought until it totally consumes your life. It will strengthen you and cast out every fear that has robbed you of God's greater blessings. It will drive the devil out of your affairs and set you free from every torment of darkness. Put love to work on the stubborn problems in your life. It's the one solution they'll never be able to resist.
Scripture Reading: 1 Corinthians 13


## String conversions
**doctest** needs to be able to convert types you use in assertions and logging expressions into strings (for logging and reporting purposes).
Most built-in types are supported out of the box but there are three ways that you can tell **doctest** how to convert your own types (or other, third-party types) into strings.
## ```operator<<``` overload for ```std::ostream```
This is the standard way of providing string conversions in C++ - and the chances are you may already provide this for your own purposes. If you're not familiar with this idiom it involves writing a free function of the form:
```
std::ostream& operator<< (std::ostream& os, const T& value) {
os << convertMyTypeToString(value);
return os;
}
```
(where ```T``` is your type and ```convertMyTypeToString``` is where you'll write whatever code is necessary to make your type printable - it doesn't have to be in another function).
You should put this function in the same namespace as your type.
Alternatively you may prefer to write it as a member function:
```
std::ostream& T::operator<<(std::ostream& os) const {
os << convertMyTypeToString(*this);
return os;
}
```
## ```doctest::toString``` overload
If you don't want to provide an ```operator<<``` overload, or you want to convert your type differently for testing purposes, you can provide an overload for ```doctest::toString()``` for your type.
```
namespace doctest {
String toString(const T& value) {
return convertMyTypeToString(value);
}
}
```
Again ```T``` is your type and ```convertMyTypeToString``` is where you'll write whatever code is necessary to make your type printable. Note that the function must be in the **doctest** namespace which itself must be in the global namespace.
## ```doctest::StringMaker``` specialisation
There are some cases where overloading ```toString``` does not work as expected. Specialising ```StringMaker``` gives you more precise and reliable control - but at the cost of slightly more code and complexity:
```
namespace doctest {
template<> struct StringMaker {
static String convert(const T& value) {
return convertMyTypeToString(value);
}
};
}
```
------
- Check out the [**example**](../../examples/stringification/main.cpp) which shows how to stringify ```std::vector``` and other types.
- Note that the type ```String``` is used when specializing ```StringMaker``` or overloading ```toString()``` - it is the string type **doctest** works with. ```std::string``` is not an option for the library because then it would have to drag the `````` header with it.
- To support the ```operator<<(std::ostream&...``` stringification the library has to offer a forward declaration of ```std::ostream``` and that is what the library does - but it is forbidden by the standard. It currently works everywhere - on all tested compilers - but if the user wishes to be 100% standards compliant - then the [**```DOCTEST_CONFIG_USE_IOSFWD```**](configuration.html#doctest_config_use_iosfwd) identifier can be used to force the inclusion of ``````. The reason the header is not included by default is that on MSVC (for example) it drags a whole bunch of stuff with it - and after the preprocessor is finished the translation unit has grown to 42k lines of C++ code - while Clang and the libc++ are so well implemented that including `````` there results in 400 lines of code.
---
[Home](readme.html#reference)


The file broker APIs can be used to filter the scope of HomeGroup searches so that only a specific user's shared files are searched. If your PC is part of a HomeGroup, then the users on your HomeGroup are shown below. Select the user to return all files shared by that user.


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
CWP-23290 of 2016 (O&M) 1 IN THE HIGH COURT OF PUNJAB AND HARYANA AT CHANDIGARH CWP-23290 of 2016 (O&M) Date of Decision:- 17.04.2017 M/s Sada Shiv Stone Crusher ... Petitioner Versus State of Haryana and others ... Respondents CORAM: HON'BLE MR. JUSTICE S.S.SARON HON'BLE MR. JUSTICE DARSHAN SINGH Present:- Mr. Madan Pal, Advocate, counsel for the petitioner. Mr. Randhir Singh, Addl. A.G. Haryana. ***** S.S.SARON, J.
The petitioner by way of the present petition under Article 226/227 of the Constitution of India made a prayer for directing the respondents to constitute an appellate authority in terms of Section 31 of the Air (Prevention and Control of Pollution) Act, 1981 ('Air Act'-for short) and also to take appropriate decision on his appeal (Annexure P-9).
Mr. Randhir Singh, Additional Advocate General, Haryana has submitted an order dated 14.04.2017 passed by the Additional Chief Secretary to Government of Haryana, Environment Department whereby in exercise of powers conferred by sub-section (1) read with sub section (2) of Section 31 of the Air Act, an Appellate Authority of the Haryana State Pollution Control Board, Panchkula has been constituted. A President and 1 of 2 ::: Downloaded on - 21-04-2017 21:35:27 ::: CWP-23290 of 2016 (O&M) 2 two Members have been appointed as Appellate Authority.
Keeping in view the fact, that an Appellate Authority has been constituted, the present petition has been rendered infructuous and is dismissed being infructuous.
The petitioner may approach the Appellate Authority for deciding his appeal (Annexure P-9).
( S.S.SARON )
JUDGE
( DARSHAN SINGH )
April 17, 2017 JUDGE
mohan
Whether speaking /reasoned Yes / No
Whether Reportable Yes / No
2 of 2
::: Downloaded on - 21-04-2017 21:35:28 :::


ms
Super
Cat
Apple
Pear
Pig
Cola
Soccer
Phone
Build
Book
School
Note
Human
Code
Operate
Man
Program
Bement
car
Glass
Fish


{% extends 'base.html' %} {% block title %}CatChat{% endblock %} {% block content %}
Written by Grey Li Fork me on Github 2017 © helloflask.com


 See the signs now Cant you see them? See the signs You see them All the signs we see them Cant you see them? |
|
|


LuaBridge is a lightweight and dependency-free library for mapping data, functions, and classes back and forth between C++ and Lua, a powerful, fast, lightweight, embeddable scripting language. LuaBridge has been tested and works with Lua revisions starting from 5.1.5, although it should work in any version of Lua from 5.1.0 and later. It also works transparently with LuaJIT.
LuaBridge offers the following features:
#include
!
LuaBridge is distributed as a a collection of header files. You simply add
one line, #include "LuaBridge/LuaBridge.h"
where you want to
pass functions, classes, and variables back and forth between C++ and Lua.
There are no additional source files, no compilation settings, and no
Makefiles or IDE-specific project files. LuaBridge is easy to integrate.
C++ concepts like variables and classes are made available to Lua through a process called registration. Because Lua is weakly typed, the resulting structure is not rigid. The API is based on C++ template metaprogramming. It contains template code to automatically generate at compile-time the various Lua C API calls necessary to export your program's classes and functions to the Lua environment.
To expose Lua objects to C++, a class called LuaRef
is provided.
The implementation allows C++ code to access Lua objects such as numbers
or strings, but more importantly to access things like tables and their
values. Using this class makes idioms like calling Lua functions simple
and clean.
LuaBridge tries to be efficient as possible when creating the "glue" that exposes C++ data and functions to Lua. At the same time, the code was written with the intention that it is all as simple and clear as possible, without resorting to obscure C++ idioms, ugly preprocessor macros, or configuration settings. Furthermore, it is designed to be "header-only", making it very easy to integrate into your projects.
Because LuaBridge was written with simplicity in mind there are some features that are not available. Although it comes close to the highest possible performance, LuaBridge is not quite the fastest, OOLua slightly outperforms LuaBridge in some tests. LuaBridge also does not try to implement every possible feature, LuaBind explores every corner of the C++ language (but it requires Boost).
LuaBridge does not support:
TypeListValues
specializations).
std::list
, std::vector
,
std::array
, std::map
, std::unordered_map
,
std::pair
or std::optional
by including List.h
,
Vector.h
, Array.h
, Map.h
,
UnorderedMap.h
, Pair.h
or Optional.h
respectively)
std::shared_ptr
.
The official repository is located at https://github.com/vinniefalco/LuaBridge.
The master branch contains published library versions. Release versions are marked with tags.
These repositories are also available:
| LuaBridgeUnitTests | A stand alone command line application to exercise LuaBridge functionality. |
| LuaBridgeUnitDemo | A stand alone GUI application that provides an interactive console. |
LuaBridge is published under the terms of the MIT License:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The original version of LuaBridge was written by Nathan Reed. The project
has been taken over by Vinnie Falco, who added new functionality and wrote
the new documentation. Vinnie also incorporated LuaRef
and
other Lua to C++ binding contributions from Nigel Atkinson.
For questions, comments, or bug reports feel free to open a Github issue or contact Vinnie Falco directly at the email address indicated below.
Older versions of LuaBridge up to and including 0.2 (available separately) are distributed under the BSD 3-Clause License. See the corresponding license file in those versions (distributed separately) for more details.
In order to expose C++ data and functions to Lua, each piece of exported information must be registered. There are five types of objects that LuaBridge can register:
| Namespaces | A Lua table that contains other registrations. |
| Data | Global or static variables, data members, and static data members. |
| Functions | Regular functions, member functions, and static member functions. |
| CFunctions | A regular function, member function, or static member function that
uses the lua_CFunction calling convention. |
| Properties | Global properties, property members, and static property members. These appear like data to Lua, but are implemented in C++ using functions to get and set the values. |
Both data and properties can be marked as read-only at the time of
registration. This is different from const
; the values of these
objects can be modified on the C++ side, but Lua scripts cannot change them.
Code samples that follow are in C++ or Lua, depending on context. For brevity
of exposition code samples in C++ assume the traditional variable
lua_State* L
is defined, and that a using namespace luabridge
using-directive is in effect.
All LuaBridge registrations take place in a namespace. When we refer to a namespace we are always talking about a namespace in the Lua sense, which is implemented using tables. The namespace need not correspond to a C++ namespace; in fact no C++ namespaces need to exist at all unless you want them to. LuaBridge namespaces are visible only to Lua scripts; they are used as a logical grouping tool. To obtain access to the global namespace we write:
getGlobalNamespace (L);
This returns an object on which further registrations can be performed. The subsequent registrations will go into the global namespace, a practice which is not recommended. Instead, we can add our own namespace by writing:
getGlobalNamespace (L) .beginNamespace ("test");
This creates a table in _G
called "test". Since we have not
performed any registrations, this table will be empty except for some
bookkeeping key/value pairs. LuaBridge reserves all identifiers that start
with a double underscore. So __test
would be an invalid name
(although LuaBridge will silently accept it). Functions like
beginNamespace
return the corresponding object on which we can
make more registrations. Given:
getGlobalNamespace (L) .beginNamespace ("test") .beginNamespace ("detail") .endNamespace () .beginNamespace ("utility") .endNamespace () .endNamespace ();
The results are accessible to Lua as test
, test.detail
,
and test.utility
. Here we introduce the endNamespace
function; it returns an object representing the original enclosing namespace.
All LuaBridge functions which create registrations return an object upon which
subsequent registrations can be made, allowing for an unlimited number of
registrations to be chained together using the dot operator. Adding two objects
with the same name, in the same namespace, results in undefined behavior
(although LuaBridge will silently accept it).
A namespace can be re-opened later to add more functions. This lets you split up the registration between different source files. These are equivalent:
getGlobalNamespace (L) .beginNamespace ("test") .addFunction ("foo", foo) .endNamespace (); getGlobalNamespace (L) .beginNamespace ("test") .addFunction ("bar", bar) .endNamespace ();
and
getGlobalNamespace (L) .beginNamespace ("test") .addFunction ("foo", foo) .addFunction ("bar", bar) .endNamespace ();
These are registered into a namespace using addProperty
and addFunction
.
When registered functions are called by scripts, LuaBridge automatically takes
care of the conversion of arguments into the appropriate data type when doing
so is possible. This automated system works for the function's return value,
and up to 8 parameters although more can be added by extending the templates.
Pointers, references, and objects of class type as parameters are treated
specially, and explained later.
If we have:
int globalVar; static float staticVar; std::string stringProperty; std::string getString () { return stringProperty; } void setString (std::string s) { stringProperty = s; } int foo () { return 42; } void bar (char const*) { } int cFunc (lua_State* L) { return 0; }
These are registered with:
getGlobalNamespace (L) .beginNamespace ("test") .addProperty ("var1", &globalVar) .addProperty ("var2", &staticVar, false) // read-only .addProperty ("prop1", getString, setString) .addProperty ("prop2", getString) // read only .addFunction ("foo", foo) .addFunction ("bar", bar) .addFunction ("cfunc", cFunc) .endNamespace ();
Variables can be marked read-only by passing false
in
the second optional parameter. If the parameter is omitted, true is
used making the variable read/write. Properties are marked read-only by
omitting the set function. After the registrations above, the following Lua
identifiers are valid:
test -- a namespace test.var1 -- a lua_Number property test.var2 -- a read-only lua_Number property test.prop1 -- a lua_String property test.prop2 -- a read-only lua_String property test.foo -- a function returning a lua_Number test.bar -- a function taking a lua_String as a parameter test.cfunc -- a function with a variable argument list and multi-return
Note that test.prop1
and test.prop2
both refer to the
same value. However, since test.prop2
is read-only, assignment
attempts will generate a run-time error. These Lua statements have the stated effects:
test.var1 = 5 -- okay test.var2 = 6 -- error: var2 is not writable test.prop1 = "Hello" -- okay test.prop1 = 68 -- okay, Lua converts the number to a string test.prop2 = "bar" -- error: prop2 is not writable test.foo () -- calls foo and discards the return value test.var1 = foo () -- calls foo and stores the result in var1 test.bar ("Employee") -- calls bar with a string test.bar (test) -- error: bar expects a string not a table
LuaBridge does not support overloaded functions nor is it likely to in the future. Since Lua is dynamically typed, any system that tries to resolve a set of parameters passed from a script will face considerable ambiguity when trying to choose an appropriately matching C++ function signature.
A class registration is opened using either beginClass
or
deriveClass
and ended using endClass
. Once
registered, a class can later be re-opened for more registrations using
beginClass
. However, deriveClass
should only be
used once. To add more registrations to an already registered derived class,
use beginClass
on it.
These declarations:
struct A { static int staticData; static float staticProperty; static float getStaticProperty () { return staticProperty; } static void setStaticProperty (float f) { staticProperty = f; } static void staticFunc () { } static int staticCFunc (lua_State *L) { return 0; } std::string dataMember; char dataProperty; char getProperty () const { return dataProperty; } void setProperty (char v) { dataProperty = v; } std::string toString () const { return dataMember; } void func1 () { } virtual void virtualFunc () { } int cfunc (lua_State* L) { return 0; } }; struct B : public A { double dataMember2; void func1 () { } void func2 () { } void virtualFunc () { } }; int A::staticData; float A::staticProperty;
are registered using:
getGlobalNamespace (L) .beginNamespace ("test") .beginClass <A> ("A") .addStaticProperty ("staticData", &A::staticData) .addStaticProperty ("staticProperty", &A::getStaticProperty, &A::setStaticProperty) .addStaticFunction ("staticFunc", &A::staticFunc) .addStaticFunction ("staticCFunc", &A::staticCFunc) .addProperty ("data", &A::dataMember) .addProperty ("prop", &A::getProperty, &A::setProperty) .addFunction ("func1", &A::func1) .addFunction ("virtualFunc", &A::virtualFunc) .addFunction ("__tostring", &A::toString) // Metamethod .addFunction ("cfunc", &A::cfunc) .endClass () .deriveClass <B, A> ("B") .addProperty ("data", &B::dataMember2) .addFunction ("func1", &B::func1) .addFunction ("func2", &B::func2) .endClass () .endNameSpace ();
Method registration works just like function registration. Virtual methods
work normally; no special syntax is needed. const methods are detected and
const-correctness is enforced, so if a function returns a const object (or
a container holding to a const object) to Lua, that reference to the object
will be considered const and only const methods can be called on it.
It is possible to register Lua metamethods (except __gc
).
Destructors are registered automatically for each class.
As with regular variables and properties, class properties can be
marked read-only by passing false in the second parameter, or omitting the set
set function. The deriveClass
takes two template arguments: the
class to be registered, and its base class. Inherited methods do not have to
be re-declared and will function normally in Lua. If a class has a base class
that is **not** registered with Lua, there is no need to declare it as a
subclass.
Remember that in Lua, the colon operator ':
' is used for
method call syntax:
local a = A () a.func1 () -- error: func1 expects an object of a registered class a.func1 (a) -- okay, verbose, this how OOP works in Lua a:func1 () -- okay, less verbose, equivalent to the previous
Sometimes when registering a class which comes from a third party library, the data is not exposed in a way that can be expressed as a pointer to member, there are no get or set functions, or the get and set functions do not have the right function signature. Since the class declaration is closed for changes, LuaBridge allows for a property member proxy. This is a pair of get and set flat functions which take as their first parameter a pointer to the object. This is easily understood with the following example:
// Third party declaration, can't be changed struct Vec { float coord [3]; };
Taking the address of an array element, e.g. &Vec::coord [0]
results in an error instead of a pointer-to-member. The class is closed for
modifications, but we want to export Vec objects to Lua using the familiar
object notation. To do this, first we add a "helper" class:
struct VecHelper { template <unsigned index> static float get (Vec const* vec) { return vec->coord [index]; } template <unsigned index> static void set (Vec* vec, float value) { vec->coord [index] = value; } };
This helper class is only used to provide property member proxies.
Vec
continues to be used in the C++ code as it was before.
Now we can register the Vec
class with property member proxies for
x
, y
, and z
:
getGlobalNamespace (L) .beginNamespace ("test") .beginClass <Vec> ("Vec") .addProperty ("x", &VecHelper::get <0>, &VecHelper::set <0>) .addProperty ("y", &VecHelper::get <1>, &VecHelper::set <1>) .addProperty ("z", &VecHelper::get <2>, &VecHelper::set <2>) .endClass () .endNamespace ();
It is also possible to use std::function <>
instances as proxies:
getGlobalNamespace (L) .beginNamespace ("test") .beginClass <Vec> ("Vec") .addProperty ("x", std::function <float (const Vec*)> ( [] (const Vec* vec) {return vec->coord [0];}), std::function <void (Vec*, float)> ( [] (Vec* vec, float v) {vec->coord [0] = v;})) // ... same for "y" and "z" .endClass () .endNamespace ();
Where it is not possible or inconvenient to add a member to be registered, LuaBridge also allows for a function member proxy. This is a flat function which take as its first parameter a pointer to the object:
// Third party declaration, can't be changed struct Vec { float coord [3]; };
The class is closed for modifications, but we want to extend Vec objects with our member function. To do this, first we add a "helper" function:
void scale (float value) { value->coord [0] *= value; value->coord [1] *= value; value->coord [2] *= value; };
Now we can register the Vec
class with a member function
scale
:
getGlobalNamespace (L) .beginNamespace ("test") .beginClass <Vec> ("Vec") .addFunction ("scale", &scale) .endClass () .endNamespace ();
It is also possible to use std::function <>
instances as proxies:
getGlobalNamespace (L) .beginClass <Vec> ("Vec") .addFunction ("scaleX", std::function <void (Vec*, float)> ( [] (Vec* vec, float v) {vec->coord [0] *= v;})) .endClass ()
A single constructor may be added for a class using addConstructor
.
LuaBridge cannot automatically determine the number and types of constructor
parameters like it can for functions and methods, so you must provide them.
This is done by specifying the signature of the desired constructor function
as the first template parameter to addConstructor
. The parameter
types will be extracted from this (the return type is ignored). For example,
these statements register constructors for the given classes:
struct A { A (); }; struct B { explicit B (char const* s, int nChars); }; getGlobalNamespace (L) .beginNamespace ("test") .beginClass <A> ("A") .addConstructor <void (*) (void)> () .endClass () .beginClass <B> ("B") .addConstructor <void (*) (char const*, int)> () .endClass () .endNamespace ();
Constructors added in this fashion are called from Lua using the fully
qualified name of the class. This Lua code will create instances of
A
and B
.
a = test.A () -- Create a new A. b = test.B ("hello", 5) -- Create a new B. b = test.B () -- Error: expected string in argument 1
In the Lua C API, all operations on the lua_State
are performed
through the Lua stack. In order to pass values back and forth between C++
and Lua, LuaBridge uses specializations of this template class concept:
template <class T> struct Stack { static void push (lua_State* L, T t); static T get (lua_State* L, int index); static bool isInstance (lua_State* L, int index); };
When a specialization of Stack
exists for a given type
T
we say that the T
is convertible.
Throughout this document and the LuaBridge API, these types can be used
anywhere a convertible type is expected.
The Stack template class specializations are used automatically for variables, properties, data members, property members, function arguments and return values. These basic types are supported:
bool
char
, converted to a string of length one.
char const*
and std::string
strings.
float
, and double
,
converted to Lua_number
.
User-defined types which are convertible to one of the basic types are
possible, simply provide a Stack <>
specialization in the
luabridge
namespace for your user-defined type, modeled after
the existing types. For example, here is a specialization for a
juce::String
:
template <> struct Stack <juce::String> { static void push (lua_State* L, juce::String s) { lua_pushstring (L, s.toUTF8 ()); } static juce::String get (lua_State* L, int index) { return juce::String (luaL_checkstring (L, index)); } static bool isInstance (lua_State* L, int index) { return lua_type (L, index) == LUA_TSTRING; } };
Sometimes it is convenient from within a bound function or member function
to gain access to the lua_State*
normally available to a lua_CFunction.
With LuaBridge, all you need to do is add a lua_State*
as the last
parameter of your bound function:
void useState (lua_State* L); getGlobalNamespace (L).addFunction ("useState", &useState);
You can still include regular arguments while receiving the state:
void useStateAndArgs (int i, std::string s, lua_State* L); getGlobalNamespace (L).addFunction ("useStateAndArgs", &useStateAndArgs);
When the script calls useStateAndArgs
, it passes only the integer
and string parameters. LuaBridge takes care of inserting the lua_State*
into the argument list for the corresponding C++ function. This will work
correctly even for the state created by coroutines. Undefined behavior results
if the lua_State*
is not the last parameter.
The same is applicable for properties.
An object of a registered class T
may be passed to Lua as:
T |
Passed by value (a copy), with Lua lifetime. |
T const |
Passed by value (a copy), with Lua lifetime. |
T* |
Passed by reference, with C++ lifetime. |
T& |
Passed by reference, with C++ lifetime. |
T const* |
Passed by const reference, with C++ lifetime. |
T const& |
Passed by const reference, with C++ lifetime. |
The creation and deletion of objects with C++ lifetime is controlled by
the C++ code.  Specifically, the object's destructor is not called (since C++ owns
it). Care must be taken to ensure that objects with C++ lifetime are not
deleted while still being referenced by a lua_State*
, or else
undefined behavior results. In the previous examples, an instance of A
can be passed to Lua with C++ lifetime, like this:
A a; push (L, &a); // pointer to 'a', C++ lifetime lua_setglobal (L, "a"); push (L, (A const*) &a); // pointer to 'a const', C++ lifetime lua_setglobal (L, "ac"); push <A const*> (L, &a); // equivalent to push (L, (A const*) &a) lua_setglobal (L, "ac2"); push (L, new A); // compiles, but will leak memory lua_setglobal (L, "ap");
When an object of a registered class is passed by value to Lua, it will have
Lua lifetime. A copy of the passed object is constructed inside the
userdata. When Lua has no more references to the object, it becomes eligible
for garbage collection. When the userdata is collected, the destructor for
the class will be called on the object. Care must be taken to ensure that
objects with Lua lifetime are not accessed by C++ after they are garbage
collected, or else undefined behavior results. An instance of B
can be passed to Lua with Lua lifetime this way:
B b; push (L, b); // Copy of b passed, Lua lifetime. lua_setglobal (L, "b");
Given the previous code segments, these Lua statements are applicable:
print (test.A.staticData) -- Prints the static data member. print (test.A.staticProperty) -- Prints the static property member. test.A.staticFunc () -- Calls the static method. print (a.data) -- Prints the data member. print (a.prop) -- Prints the property member. a:func1 () -- Calls A::func1 (). test.A.func1 (a) -- Equivalent to a:func1 (). test.A.func1 ("hello") -- Error: "hello" is not a class A. a:virtualFunc () -- Calls A::virtualFunc (). print (b.data) -- Prints B::dataMember. print (b.prop) -- Prints inherited property member. b:func1 () -- Calls B::func1 (). b:func2 () -- Calls B::func2 (). test.B.func2 (a) -- Error: a is not a class B. test.A.func1 (b) -- Calls A::func1 (). b:virtualFunc () -- Calls B::virtualFunc (). test.B.virtualFunc (b) -- Calls B::virtualFunc (). test.A.virtualFunc (b) -- Calls B::virtualFunc (). test.B.virtualFunc (a) -- Error: a is not a class B. a = nil; collectgarbage () -- 'a' still exists in C++. b = nil; collectgarbage () -- Lua calls ~B() on the copy of b.
When Lua script creates an object of class type using a registered constructor, the resulting value will have Lua lifetime. After Lua no longer references the object, it becomes eligible for garbage collection. You can still pass these to C++, either by reference or by value. If passed by reference, the usual warnings apply about accessing the reference later, after it has been garbage collected.
When C++ objects are passed from Lua back to C++ as arguments to functions, or set as data members, LuaBridge does its best to automate the conversion. Using the previous definitions, the following functions may be registered to Lua:
void func0 (A a); void func1 (A* a); void func2 (A const* a); void func3 (A& a); void func4 (A const& a);
Executing this Lua code will have the prescribed effect:
func0 (a) -- Passes a copy of a, using A's copy constructor. func1 (a) -- Passes a pointer to a. func2 (a) -- Passes a pointer to a const a. func3 (a) -- Passes a reference to a. func4 (a) -- Passes a reference to a const a.
In the example above, all functions can read the data members and property
members of a
, or call const member functions of a
.
Only func0
, func1
, and func3
can
modify the data members and data properties, or call non-const member
functions of a
.
The usual C++ inheritance and pointer assignment rules apply. Given:
void func5 (B b); void func6 (B* b);
These Lua statements hold:
func5 (b) - Passes a copy of b, using B's copy constructor. func6 (b) - Passes a pointer to b. func6 (a) - Error: Pointer to B expected. func1 (b) - Okay, b is a subclass of a.
When a pointer or pointer to const is passed to Lua and the pointer is null
(zero), LuaBridge will pass Lua a nil
instead. When Lua passes a
nil
to C++ where a pointer is expected, a null (zero) is passed
instead. Attempting to pass a null pointer to a C++ function expecting a
reference results in lua_error
being called.
LuaBridge supports a shared lifetime model: dynamically allocated
and reference counted objects whose ownership is shared by both Lua and C++.
The object remains in existence until there are no remaining C++ or Lua
references, and Lua performs its usual garbage collection cycle. A container
is recognized by a specialization of the ContainerTraits
template class. LuaBridge will automatically recognize when a data type is
a container when the corresponding specialization is present. Two styles of
containers come with LuaBridge, including the necessary specializations.
This is an intrusive style container. Your existing class declaration must be
changed to be also derived from RefCountedObject
. Given
class T
, derived from RefCountedObject
, the container
RefCountedObjectPtr <T>
may be used. In order for
reference counts to be maintained properly, all C++ code must store a
container instead of the pointer. This is similar in style to
std::shared_ptr
although there are slight differences. For
example:
// A is reference counted. struct A : public RefCountedObject { void foo () { } }; struct B { RefCountedObjectPtr <A> a; // holds a reference to A }; void bar (RefCountedObjectPtr <A> a) { a->foo (); }
This is a non intrusive reference counted pointer. The reference counts are kept in a global hash table, which does incur a small performance penalty. However, it does not require changing any already existing class declarations. This is especially useful when the classes to be registered come from a third party library and cannot be modified. To use it, simply wrap all pointers to class objects with the container instead:
struct A { void foo () { } }; struct B { RefCountedPtr <A> a; }; RefCountedPtr <A> createA () { return new A; } void bar (RefCountedPtr <A> a) { a->foo (); } void callFoo () { bar (createA ()); // The created A will be destroyed // when we leave this scope }
If you have your own container, you must provide a specialization of
ContainerTraits
in the luabridge
namespace for your
type before it will be recognized by LuaBridge (or else the code will not
compile):
template <class T> struct ContainerTraits <CustomContainer <T> > { typedef typename T Type; static T* get (CustomContainer <T> const& c) { return c.getPointerToObject (); } };
Standard containers like std::shared_ptr
or
boost::shared_ptr
will not work. This is because of type
erasure; when the object goes from C++ to Lua and back to C++, there is no
way to associate the object with the original container. The new container is
constructed from a pointer to the object instead of an existing container.
The result is undefined behavior since there are now two sets of reference
counts.
When a constructor is registered for a class, there is an additional
optional second template parameter describing the type of container to use.
If this parameter is specified, calls to the constructor will create the
object dynamically, via operator new, and place it a container of that
type. The container must have been previously specialized in
ContainerTraits
, or else a compile error will result. This code
will register two objects, each using a constructor that creates an object
with Lua lifetime using the specified container:
class C : public RefCountedObject { C () { } }; class D { D () { } }; getGlobalNamespace (L) .beginNamespace ("test") .beginClass <C> ("C") .addConstructor <void (*) (void), RefCountedObjectPtr <C> > () .endClass () .beginClass <D> ("D") .addConstructor <void (*) (void), RefCountedPtr <D> > () .endClass (); .endNamespace ()
Mixing object lifetime models is entirely possible, subject to the usual caveats of holding references to objects which could get deleted. For example, C++ can be called from Lua with a pointer to an object of class type; the function can modify the object or call non-const data members. These modifications are visible to Lua (since they both refer to the same object). An object store in a container can be passed to a function expecting a pointer. These conversion work seamlessly.
The setGlobal
function can be used to assign any convertible
value into a global variable.
Because Lua is a dynamically typed language, special consideration is required to map values in Lua to C++. The following sections describe the classes and functions used for representing Lua types. Only the essential operations are explained; To gain understanding of all available functions, please refer to the documentation comments in the corresponding source files.
The LuaRef
class is a container which references any Lua type.
It can hold anything which a Lua variable can hold: nil,
number, boolean, string, table, function, thread, userdata, and
lightuserdata. Because LuaRef
uses the Stack
template specializations to do its work, classes, functions, and data
exported to Lua through namespace registrations can also be stored (these
are instances of userdata). In general, a LuaRef
can represent
any convertible C++ type as well as all Lua types.
A LuaRef
variable constructed with no parameters produces a
reference to nil:
LuaRef v (L); // References nil
To construct a LuaRef
to a specific value, the two parameter
constructor is used:
LuaRef v1 (L, 1); // A LUA_TNUMBER LuaRef v2 (L, 1.1); // Also a LUA_TNUMBER LuaRef v3 (L, true); // A LUA_TBOOLEAN LuaRef v4 (L, "string"); // A LUA_TSTRING
The functions newTable
and getGlobal
create
references to new empty table and an existing value in the global table
respectively:
LuaRef v1 = newTable (L); // Create a new table LuaRef v2 = getGlobal (L, "print") // Reference to _G ["print"]
A LuaRef
can hold classes registered using LuaBridge:
class A; //... LuaRef v (L, new A); // A LuaBridge userdata holding a pointer to A
Any convertible type may be assigned to an already-existing LuaRef
:
LuaRef v (L); // Nil v = newTable (L); // An empty table v = "string" // A string. The previous value becomes // eligible for garbage collection.
A LuaRef
is itself a convertible type, and the convertible
type Nil
can be used to represent a Lua nil.
LuaRef v1 (L, "x"); // assign "x" LuaRef v2 (L, "y"); // assign "y" v2 = v1; // v2 becomes "x" v1 = "z"; // v1 becomes "z", v2 is unchanged v1 = newTable (L); // An empty table v2 = v1; // v2 references the same table as v1 v1 = Nil (); // v1 becomes nil, table is still // referenced by v2.
Values stored in a LuaRef
object obey the same rules as
variables in Lua: tables, functions, threads, and full userdata values are
objects. The LuaRef
does not actually contain
these values, only references to them. Assignment, parameter
passing, and function returns always manipulate references to such values;
these operations do not imply any kind of copy.
A universal C++ conversion operator is provided for implicit conversions
which allow a LuaRef
to be used where any convertible type is
expected. These operations will all compile:
void passInt (int); void passBool (bool); void passString (std::string); void passObject (A*); LuaRef v (L); //... passInt (v); // implicit conversion to int passBool (v); // implicit conversion to bool passString (v); // implicit conversion to string passObject (v); // must hold a registered LuaBridge class or a // lua_error() will be called.
Since Lua types are dynamic, the conversion is performed at run time using
traditional functions like lua_toboolean
or
lua_tostring
. In some cases, the type information may be
incorrect especially when passing objects of registered class types.
When performing these conversions, LuaBridge may raise a Lua error by
directly or indirectly calling lua_error
To be bullet-proof,
such code must either be wrapped in a lua_pcall
, or you must
install a Lua panic function that throws an exception which you
can catch.
When an explicit conversion is required (such as when writing templates),
use the cast
template function or an explicit C++ style cast.
void passString (std::string); LuaRef v (L); // The following are all equivalent: passString (std::string (v)); passString ((std::string)v); passString (static_cast <std::string> (v)); passString (v.cast <std::string> ());
As tables are the sole data structuring mechanism in Lua, the
LuaRef
class provides robust facilities for accessing and
manipulating table elements using a simple, precise syntax. Any convertible
type may be used as a key or value. Applying the array indexing operator
[]
to a LuaRef
returns a special temporary object
called a table proxy which supports all the operations which can
be performed on a LuaRef
. In addition, assignments made to
table proxies change the underlying table. Because table proxies are
compiler-created temporary objects, you don't work with them directly. A
LuaBridge table proxy should not be confused with the Lua proxy table
technique described in the book "Programming in Lua"; the LuaBridge table
proxy is simply an intermediate C++ class object that works behind the
scenes to make table manipulation syntax conform to C++ idioms.  The table // is still referenced by v[3].
Table proxies and LuaRef
objects provide a convenient syntax
for invoking lua_pcall
on suitable referenced object. This
includes C functions, Lua functions, or Lua objects with an appropriate
__call
metamethod set. The provided implementation supports
up to eight parameters (although more can be supported by adding new
functions). Any convertible C++ type can be passed as a parameter in its
native format. The return value of the function call is provided as a
LuaRef
, which may be nil.
LuaRef same = getGlobal (L, "same"); // These all evaluate to true same (1,1); !same (1,2); same ("text", "text"); !same (1, "text"); same (1, 1, 2); // third param ignored
function same (arg1, arg) return arg1 == arg2 end
Table proxies support all of the Lua call notation that LuaRef
supports, making these statements possible:
LuaRef v = getGlobal (L, "t"); t[1](); t[2]("a", "b"); t[2](t[1]); // Call t[3] with the value in t[2] t[4]=t[3](); // Call t[3] and store the result in t[4]. t [t[5]()] = "wow"; // Store "wow" at the key returned by // the call to t[5]
t = {} t[1] = function () print ("hello") end t[2] = function (u, v) print (u, v) end t[3] = "foo"
When LuaRef
is used to call into Lua using the ()
operator it issues a protected call using lua_pcall
. LuaBridge
uses the C++ exception handling mechanism, throwing a LuaException
object:
LuaRef f (L) = getGlobal (L, "fail"); try { f (); } catch (LuaException const& e) { std::cerr && e.what (); }
function fail () error ("A problem occurred") end
The metatables and userdata that LuaBridge creates in the lua_State*
are
protected using a security system, to eliminate the possibility of undefined
behavior resulting from scripted manipulation of the environment. The
security system has these components:
__index
and __newindex
metamethods, so these class tables are immutable from Lua.
__metatable
set to a boolean value. Scripts
cannot obtain the metatable from a LuaBridge object.
This security system can be easily bypassed if scripts are given access to
the debug library (or functionality similar to it, i.e. a raw getmetatable
).
The security system can also be defeated by C code in the host, either by
revealing the unique lightuserdata key to another module or by putting a
LuaBridge metatable in a place that can be accessed by scripts.
When a class member function is called, or class property member accessed,
the this
pointer is type-checked. This is because member functions exposed
to Lua are just plain functions that usually get called with the Lua colon
notation, which passes the object in question as the first parameter. Lua's
dynamic typing makes this type-checking mandatory to prevent undefined
behavior resulting from improper use.
If a type check error occurs, LuaBridge uses the lua_error
mechanism to trigger a failure. A host program can always recover from
an error through the use of lua_pcall
; proper usage of
LuaBridge will never result in undefined behavior.
/// Gets a global Lua variable reference. /// LuaRef getGlobal(lua_State* L, const char* name);
/// Sets a global Lua variable. /// template<class V> void setGlobal(lua_State* L, V* varPtr, const char* name);
/// Gets the global namespace registration object. /// Namespace getGlobalNamespace(lua_State* L);
/// Begins or continues class registration, returns this class object. /// template<class T> Class<T> beginClass(const char* name);
/// Begins derived class registration, returns this class object. /// template<class T, class Base> Class<T> deriveClass(const char* name);
/// Begin or continues namespace registration, returns this namespace object. /// template<class T> Namespace beginNamespace(const char* name);
/// Ends namespace registration, returns the parent namespace object. /// template<class T> Namespace endNamespace();
/// Registers a function. /// template<class R, class... Params>> Namespace addFunction(const char* name, R (*fn)(Params...));
/// Registers a function. /// template<class R, class... Params>> Namespace addFunction(const char* name, std::function<R (Params...)> fn);
/// Registers a function with an extra Lua state parameter. /// template<class R, class... Params>> Namespace addFunction(const char* name, R (*fn)(Params..., lua_State*))
/// Registers a C-function. /// Namespace addFunction(const char* name, int (*fn)(lua_State*));
/// Registers a property with a getter and setter. /// template<class V> Namespace addProperty(const char* name, V (*getFn)(), void (*setFn)(V));
/// Registers a property with a getter and setter. /// template<class V> Namespace addProperty(const char* name, std::function<V ()> getFn, std::function<void (V)> setFn);
/// Registers a property with a C-function getter and setter. /// Namespace addProperty(const char* name, int (*getFn)(lua_State*), int (*setFn)(lua_State*));
/// Registers a read-only property with a getter function. /// template<class V> Namespace addProperty(const char* name, V (*getFn)());
/// Registers a read-only property with a getter function. /// template<class V> Namespace addProperty(const char* name, std::function<V ()> getFn);
/// Registers a read-only property with a C-function getter. /// Namespace addProperty(const char* name, int (*getFn)(lua_State*));
/// Registers a variable, writable or read-only. /// template<class V> Namespace addVariable(const char* name, V* varPtr, bool isWritable = true);
/// Ends class registration, returns the parent namespace object. /// template<class T> Namespace endClass();
/// Registers a member function. /// template<class R, class... Params>> Namespace addFunction(const char* name, R (T::* fn)(Params...));
/// Registers a function. /// template<class R, class... Params>> Namespace addFunction(const char* name, std::function<R (Params...)> fn);
/// Registers a function with an extra Lua state parameter. /// template<class R, class... Params>> Namespace addFunction(const char* name, R (T::* fn)(Params..., lua_State*))
/// Registers a C-function. /// Namespace addFunction(const char* name, int (*fn)(lua_State*));
/// Registers a property with a getter and setter. /// template<class V> Namespace addProperty(const char* name, V (T::* getFn)(), void (T::* setFn)(V));
/// Registers a property with a getter and setter. /// template<class V> Namespace addProperty(const char* name, std::function<V ()> getFn, std::function<void (V)> setFn);
/// Registers a property with a C-function getter and setter. /// Namespace addProperty(const char* name, int (*getFn)(lua_State*), int (*setFn)(lua_State*));
/// Registers a read-only property with a getter member function. /// template<class V> Namespace addProperty(const char* name, V (T::* getFn)());
/// Registers a read-only property with a getter function. /// template<class V> Namespace addProperty(const char* name, std::function<V ()> getFn);
/// Registers a read-only property with a C-function getter. /// Namespace addProperty(const char* name, int (*getFn)(lua_State*));
/// Registers a member variable, writable or read-only. /// template<class V> Namespace addData(const char* name, V T::* varPtr, bool isWritable = true);
/// Registers a function. /// template<class R, class... Params>> Namespace addStaticFunction(const char* name, R (*fn)(Params...));
/// Registers a function. /// template<class R, class... Params>> Namespace addStaticFunction(const char* name, std::function<R (Params...)> fn);
/// Registers a function with an extra Lua state parameter. /// template<class R, class... Params>> Namespace addStaticFunction(const char* name, R (*fn)(Params..., lua_State*))
/// Registers a C-function. /// Namespace addStaticFunction(const char* name, int (*fn)(lua_State*));
/// Registers a property with a getter and setter. /// template<class V> Namespace addStaticProperty(const char* name, V (*getFn)(), void (*setFn)(V));
/// Registers a property with a getter and setter. /// template<class V> Namespace addStaticProperty(const char* name, std::function<V ()> getFn, std::function<void (V)> setFn);
/// Registers a property with a C-function getter and setter. /// Namespace addStaticProperty(const char* name, int (*getFn)(lua_State*), int (*setFn)(lua_State*));
/// Registers a read-only property with a getter function. /// template<class V> Namespace addStaticProperty(const char* name, V (*getFn)());
/// Registers a read-only property with a getter function. /// template<class V> Namespace addStaticProperty(const char* name, std::function<V ()> getFn);
/// Registers a read-only property with a C-function getter. /// Namespace addStaticProperty(const char* name, int (*getFn)(lua_State*));
/// Registers a variable, writable or read-only. /// Namespace addStaticData(const char* name, T* varPtr, bool isWritable = true);
/// Creates a nil reference. /// LuaRef(lua_State* L);
/// Returns native Lua string representation. /// std::string tostring() const;
/// Dumps reference to a stream. /// void print(std::ostream& stream) const;
/// Returns the Lua state. /// lua_State* state() const;
/// Place the object onto the Lua stack. /// void push(lua_State* L);
/// Return the lua_type. /// int type() const;
/// Perform the explicit type conversion. /// template<class T> T cast() const;
/// Check if the Lua value is convertible to the type T. /// template<class T> bool isInstance() const;
/// Converts the C++ value into the Lua value at the top of the Lua stack. /// void put (lua_State* L, T value);
/// Converts the Lua value at the index into the C++ value of the type T. /// T get (lua_State* L, int index);
/// Checks if the Lua value at the index is convertible into the C++ value of the type T. /// bool isInstance (lua_State* L, int index);


{% load static %}
DATAEXP
Welcome to the Database Exploration System
Explore System
Fluid Experience
Well-Designed Interface
Text used for bombasting.
Text used for bombasting.
Text used for bombasting.
Text used for bombasting.
Text used for bombasting.
Text used for bombasting.
Get Started
Result Exihibition
Precise Prediction
Data Science Technology
Text used for boasting.
Text used for boasting.
Text used for boasting.
Text used for boasting.
Text used for boasting.
Text used for boasting.
Get Started
Admin
Control Panel
Great UI
Appraising text.
Appraising text.
Appraising text.
Appraising text.
Appraising text.
Appraising text.
Get started
{% if messages %} {% for message in messages %} {% if message.tags %} {% endif %} {% endfor %} {% endif %}


Joey Chuang
A foodie and a big fan of bubble tea from Taoyuan City, Taiwan. I am now a graduate student major in Computer Engineering at Columbia University, New York, US. Love to connect with poeple and share life moments!
A foodie and a big fan of bubble tea from Taoyuan City, Taiwan. I am now a graduate student major in Computer Engineering at Columbia University, New York, US. Love to connect with poeple and share life moments!
Deal with long-tail federated dataset and segment accurate mask for 1230 classes using pytorch and mmdetection
Develop MRT fare query system and apply Floyd-Warshall algorithm to compute the shortest path throught C++
Implement Proxy server for Client-Server Session using Python featured with Error handling, Cache verification and Multi-threading
I have played piano since I was eight and this song is my favorite - Waltz Op. 64 No. 2 by Chopin
I go to Wushi Port, Yilan with my friends every year. I am the most experienced one among this bunch of nooooooobs!
I tried to become a taiko youtuber, but I failed XD


| 006:060 Khan | : |
It is He, Who takes your souls by night (when you are asleep), and has knowledge of all that you have done by day, then he raises (wakes) you up again that a term appointed (your life period) be fulfilled, then in the end unto Him will be your return. Then He will inform you what you used to do. |
| 006:060 Maulana | : |
And He it is Who takes your souls at night, and He knows what you earn by day, then He raises you up therein that an appointed term may be fulfilled. Then to Him is your return, then He will inform you of what you did. |
| 006:060 Pickthal | : |
He it is Who gathereth you at night and knoweth that which ye commit by day. Then He raiseth you again to life therein, that the term appointed (for you) may be accomplished. And afterward unto Him is your return. Then He will proclaim unto you what ye used to do. |
| 006:060 Rashad | : |
He is the One who puts you to death during the night, and knows even the smallest of your actions during the day. He resurrects you every morning, until your life span is fulfilled, then to Him is your ultimate return. He will then inform you of everything you had done. |
| 006:060 Sarwar | : |
It is He who keeps you alive in your sleep at night and knows all that you do during the day.  He will let you know all about what you had done in your worldly life. |
| 006:060 Shakir | : |
And He it is Who takes your souls at night (in sleep), and He knows what you acquire in the day, then He raises you up therein that an appointed term may be fulfilled; then to Him is your return, then He will inform you of what you were doing. |
| 006:060 Sherali | : |
And HE it is who takes your soul by night and knows what you do by day, then HE raises you up again therein, that the appointed term may be completed. Then to HIM is your return. Then will HE inform you of what you used to do. |
| 006:060 Yusufali | : |
It is He who doth take your souls by night, and hath knowledge of all that ye have done by day: by day doth He raise you up again; that a term appointed be fulfilled; In the end unto Him will be your return; then will He show you the truth of all that ye did. |
Concepts/Themes Covered: أركان الإسلام > التوحيد > توحيد الله تعالي > إليه ترجع الأمور Pillars of Islam> Islamic> Oneness of Allah>All Matters Return to Him(for decision) أركان الإسلام > التوحيد > توحيد الله تعالي > علمه جلّ شأنه Pillars of Islam> Islamic> Oneness of Allah> His Glory's Knowledge أركان الإسلام > التوحيد > توحيد الله تعالي > وحدانيته Pillars of Islam> Islamic> Oneness of Allah> Singularity and Being Unique الإيمان > اليوم الآخر > الحشر Faith> The Hereafter> The Day of Resurrection
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


Spring 2014 Lectures and Events
| Date | Room | Speaker | Title | Host |
| January 10 4:30pm |
LC 412 | Benjamin Antieau University of Washington |
Division algebras and representations of Lie groups |
Colloquium |
| January 17 3:30pm |
LC 405 | Jesse Kass University of South Carolina |
What is the canonical model of a space curve? | |
| January 23 4:30pm |
LC 412 | Claudiu Raicu Princeton University |
Syzygies of line bundles on Segre-Veronese varieties |
Colloquium |
| January 31 3:30pm |
LC 405 | Ralph Howard University of South Carolina |
Characterizing C^1 hypersurfaces of R^n |
|
| February 14 4:30pm |
LC 412 | Nathan Ilten University of California-Berkeley |
Linear spaces of singular matrices |
Colloquium |
| February 20 11:00am |
LC 312 | Michael Griffin Emory University |
A framework of Rogers-Ramanujan identities and their arithmetic properties |
Frank Thorne |
| February 21 3:30pm |
LC 405 | Michael Griffin Emory University |
Elliptic curves and mock modular forms |
Frank Thorne |
| February 28 3:30pm |
LC 405 | David Zureick-Brown Emory University |
The Canonical Ring of a Stacky Curve |
Frank Thorne |
| March 3 3:30pm |
LC 312 | Carrie Finch Washington and Lee University |
Nexus numbers modulo m |
Michael Filaseta |
| March 28 3:30pm |
LC 405 | Anna Kazanova University of Georgia |
A family of type A conformal block bundles of rank one on M_{0,n} |
Jesse Kass |
| April 11 3:30pm |
LC 405 | Michael Burr Clemson University |
Asymptotic purity for very general hypersurfaces of products of projective spaces |
Matthew Ballard |
| April 25 3:30pm |
LC 405 | Yongqiang Zhao University of Waterloo |
TBA |
Frank Thorne |
| April 26-27 | Southeast Regional Meeting on Numbers | Wofford University | ||
| April 28 3:30pm |
LC 405 | Riad Masri Texas A&M University |
TBA |
Frank Thorne |


{{extend '../../base/components.html'}} {{block 'content'}} {{include './select.code.html'}} {{/block}}