Load connectivity data¶
This page contains descriptions and examples to use HCP connectivity data! For details on HCP participants and data processing, please see our manuscript entitled Network-based atrophy modelling in the common epilepsies: a worldwide ENIGMA study
Load cortical connectivity matrices¶
The ENIGMA TOOLBOX provides structural (diffusion MRI) and functional (resting-state functional MRI) connectivity matrices obtained from the Human Connectome Project (HCP). Following the examples below, we can load connectivity data and extract seed-based connectivity.
Oh, by the way… ☝🏼
Seed-based connectivity, as well as various connectivity metrics, can be easily mapped onto the surface template! Simply follow our tutorial here!
>>> from enigmatoolbox.datasets import load_sc, load_fc
>>> from nilearn import plotting
>>> # Let's use load_sc() and load_fc() functions to return:
>>> # 68 x 68 ndarray (fc/sc: cortico-cortical connectivity matrix)
>>> # 68 x 1 ndarray (fcl/scl: name of cortical areas)
>>> # Load and plot functional connectivity data
>>> fc, fcl, _, _ = load_fc()
>>> fc_plot = plotting.plot_matrix(fc, figure=(9, 9), labels=fcl, vmax=0.8, vmin=0, cmap='Reds')
>>> # Load and plot structural connectivity data
>>> sc, scl, _, _ = load_sc()
>>> sc_plot = plotting.plot_matrix(sc, figure=(9, 9), labels=scl, vmax=10, vmin=0, cmap='Blues')
>>> # We can also extract seed-based connectivity! Let's pick the middle temporal gyrus as example seed:
>>> seed = "L_middletemporal"
>>> seed_conn_fc = fc[[i for i, item in enumerate(fcl) if seed in item],] # extract FC row corresponding to the seed
>>> seed_conn_sc = sc[[i for i, item in enumerate(scl) if seed in item],] # extract SC row corresponding to the seed
%% Add the path to the ENIGMA TOOLBOX matlab folder
addpath(genpath('/path/to/ENIGMA/matlab/'));
%% Let's use load_sc() and load_fc() functions to return:
% 68 x 68 matrix (fc/sc: cortico-cortical connectivity matrix)
% 1 x 68 cell array (fcl/scl: name of cortical areas)
%% Load and plot functional connectivity data
[fc, fcl, ~, ~] = load_fc();
f = figure,
imagesc(fc, [0 0.8]); % change axis limits here
colormap(Reds); % change colormap here
colorbar; % display colorbar
set(gca, 'YTick', 1:1:length(fcl), ... % display name of regions on y-axis
'YTickLabel', fcl)
%% Load and plot structural connectivity data
[sc, scl, ~, ~] = load_sc();
f = figure,
imagesc(sc, [0 10]); % change axis limits here
colormap(Blues); % change colormap here
colorbar; % display colorbar
set(gca, 'YTick', 1:1:length(scl), ... % display name of regions on y-axis
'YTickLabel', scl)
%% We can also extract seed-based connectivity! Let's pick the middle temporal gyrus as example seed:
seed = 'L_middletemporal'
seed_conn_fc = fc(find(strcmp(scl, seed)), :) % extract FC row corresponding to the seed
seed_conn_sc = sc(find(strcmp(scl, seed)), :) % extract SC row corresponding to the seed
Load subcortical connectivity matrices¶
Subcortico-cortical as well as subcortico-subcortical connectivity matrices are also included in the
ENIGMA TOOLBOX! As above, we can load these structural and functional matrices and extract seed-based connectivity
from subcortical seeds!
>>> from enigmatoolbox.datasets import load_sc, load_fc
>>> from nilearn import plotting
>>> # Let's use load_sc() and load_fc() functions to return:
>>> # 14 x 68 ndarray (fc/sc: subcortico-cortical connectivity matrix)
>>> # 14 x 1 ndarray (fcl/scl: name of subcortical areas)
>>> # Load and plot functional connectivity data
>>> _, _, fc, fcl = load_fc()
>>> fc_plot = plotting.plot_matrix(fc, figure=(9, 9), labels=fcl, vmax=0.5, vmin=0, cmap='Reds')
>>> # Load and plot structural connectivity data
>>> _, _, sc, scl = load_sc()
>>> sc_plot = plotting.plot_matrix(sc, figure=(9, 9), labels=scl, vmax=10, vmin=0, cmap='Blues')
>>> # As above, we can also extract seed-based connectivity! Here, we chose the left hippocampus as example seed:
>>> seed = "Lhippo"
>>> seed_conn_fc = fc[[i for i, item in enumerate(fcl) if seed in item],] # extract FC row corresponding to the seed
>>> seed_conn_sc = sc[[i for i, item in enumerate(scl) if seed in item],] # extract SC row corresponding to the seed
%% Add the path to the ENIGMA TOOLBOX matlab folder
addpath(genpath('/path/to/ENIGMA/matlab/'));
%% Let's use load_sc() and load_fc() functions to return:
% 14 x 68 matrix (fc/sc: subcortico-cortical connectivity matrix)
% 1 x 14 cell array (fcl/scl: name of subcortical areas)
%% Load and plot functional connectivity data
[~, ~, fc, fcl] = load_fc();
f = figure,
imagesc(fc, [0 0.5]); % change axis limits here
colormap(Reds); % change colormap here
colorbar; % display colorbar
set(gca, 'YTick', 1:1:length(fcl), ... % display name of regions on y-axis
'YTickLabel', fcl)
%% Load and plot structural connectivity data
[~, ~, sc, scl] = load_sc();
f = figure,
imagesc(sc, [0 10]); % change axis limits here
colormap(Blues); % change colormap here
colorbar; % display colorbar
set(gca, 'YTick', 1:1:length(scl), ... % display name of regions on y-axis
'YTickLabel', scl)
%% We can also extract seed-based connectivity! Let's pick the middle temporal gyrus as example seed:
seed = 'Lhippo'
seed_conn_fc = fc(find(strcmp(scl, seed)), :) % extract FC row corresponding to the seed
seed_conn_sc = sc(find(strcmp(scl, seed)), :) % extract SC row corresponding to the seed


Two player version of the tic-tac-toe. just click on the buttons. Press Play again! to restart
Play Again!
Next Turn: X O


University life is siloed.
Faculty are situated in different schools while fellows and students flow in and out of Boston each year, displaced and dispersed until they can one day carve out space for their own work.
DocShop brings these groups together through the workshopping and exhibition of intereactive media. It exists as a collaboratory, facilitating production of works; as a production engine for events with artists; as a think tank and research cohort.
Emanating from the Berkman Center's Digital Problem Solving Initiative, DocShop is situated at Harvard's metaLab and includes members from groups around Harvard and MIT.
DocShop will challenge the role of author and audience in convivial and participatory workshops, installations/exhibitions, and events.
Happenings are central to our mission.
Click onwards for more details about our past events and collaborations.
Sign up for our mailing list to stay engaged with our community.


This example shows how to configure Telerik TabStrip for ASP.NET MVC to load the templated contents with Ajax requests. The request is performed only once. After that the content is rendered on the page and TabStrip shows/hides it without performing additional Ajax requests.
To set the item content you should use the LoadContentFrom method.
<%= Html.Telerik().TabStrip() .Name("TabStrip") .Items(items => { items.Add() .Text("Completely Open Source") .LoadContentFrom("AjaxView_OpenSource", "TabStrip"); }) %>


Home
About
Virtualization
Containerization
Comparison
Webserver with Docker
Docker Login and Linux commands
Docker with Pycharm


A LittleFoot example
The BitmapLEDProgram class is a simple example of a LittleFoot program.
roli_blocks_basics/visualisers/roli_BitmapLEDProgram.h
{
{
private:
juce::String getLittleFootProgram() override;
};
}
Represents an individual BLOCKS device.
Definition: roli_Block.h:31
Definition: roli_BlockConfigId.h:28
A simple Program to set the colours of individual LEDs.
Definition: roli_BitmapLEDProgram.h:31
A program that can be loaded onto a block.
Definition: roli_Block.h:242
A simple ARGB colour class for setting LEDs.
Definition: roli_LEDGrid.h:31
roli_blocks_basics/visualisers/roli_BitmapLEDProgram.cpp
{
{
{
if (x < w && y < h)
{
auto bit = (x + y * w) * 16;
}
}
else
{
jassertfalse;
}
}
juce::String BitmapLEDProgram::getLittleFootProgram()
{
juce::String program (R"littlefoot(
#heapsize: 15 * 15 * 2
void repaint()
{
for (int y = 0; y < NUM_ROWS; ++y)
{
for (int x = 0; x < NUM_COLUMNS; ++x)
{
int bit = (x + y * NUM_COLUMNS) * 16;
fillPixel (makeARGB (255,
getHeapBits (bit, 5) << 3,
getHeapBits (bit + 5, 6) << 2,
getHeapBits (bit + 11, 5) << 3), x, y);
}
}
}
)littlefoot");
return program.replace ("NUM_COLUMNS", juce::String (ledGrid->getNumColumns()))
.replace ("NUM_ROWS", juce::String (ledGrid->getNumRows()));
jassertfalse;
return {};
}
}
virtual void setDataBits(juce::uint32 startBit, juce::uint32 numBits, juce::uint32 value)=0
Sets multiple bits on the littlefoot heap.
virtual LEDGrid * getLEDGrid() const =0
If this block has a grid of LEDs, this will return an object to control it.
BitmapLEDProgram(Block &)
void setLED(juce::uint32 x, juce::uint32 y, LEDColour)
Set the colour of the LED at coordinates {x, y}.
Block & block
Definition: roli_Block.h:252
juce::uint8 getBlue() const noexcept
Definition: roli_LEDGrid.h:44
juce::uint8 getRed() const noexcept
Definition: roli_LEDGrid.h:42
juce::uint8 getGreen() const noexcept
Definition: roli_LEDGrid.h:43
The repaint() method of the LittleFoot program is called at approximately 25 Hz, and each time it simply inspects the heap (the shared area of memory used to communicate between your application code and your LittleFoot program) and sets the LEDs based on the heap's content. To update the heap, and hence the LEDs, your application code calls BitmapLEDProgram::setLED().
A more advanced example can be found in the source code of the DrumPadGridProgram class or in the BlocksSynth example.


Shaolin Cosmos Chi Kung is an Ideal Art for Modern Lifestyles
02-23-2018
Living in the Information Age where a person can learn about any subject they desire with a simple internet search means they can be highly informed before choosing a meditative practice, but it also means there are thousands of arts to choose from. Picking just one to dedicate your time to can seem confusing, so this article will cover why Shaolin Cosmos Chi Kung is a particularly excellent art for personal development in modern times.
Please note that one article cannot cover every single reason why Cosmos Chi Kung is an excellent practice, but the most predominant reasons are covered here.
Practice Sessions are Short
One of the main obstacles that people talk about in terms of maintaining a consistent, daily practice of a meditative art is their lack of time. Taking one to two hours out of their busy schedule to dedicate to an art like chi kung, yoga, tai chi, meditation, etc. seems unrealistic to many people, and perhaps it is. The beauty of Cosmos Chi Kung is that, compared to many other arts, it requires very little time to complete one full practice session. In general, the recommended time for one session of Cosmos Chi Kung is 10-20 minutes. This might seem too short to a lot of people, but the truth is that, because this style of chi kung is so efficient and effective, 10-20 minutes is plenty.
Cosmos Chi Kung is Highly Efficient
This is an art that has been passed down and fine-tuned by masters for centuries, so what we are practicing today is a very refined, effective and efficient art. Anything unnecessary has been filtered out, leaving only the most important aspects of the art in place. So, we can now practice a style of chi kung that meets our needs quickly. How quickly? 10-20 minutes a day. To be fair, the ideal amount of Cosmos Chi Kung is to practice once in the morning and once in the evening, each session lasting 10-20 minutes, but practicing just once a day will still bring great benefits.
Every Session of Chi Kung is “Triple Cultivation”
Part of what makes Cosmos Chi Kung so effective is that the practice is not divided up into different practices, with one practice focusing on the physical body, another focusing on energy, and another focusing on developing the mind. We develop every level in each session of chi kung. Not every practice session will work on each level equally, but each level will be developed.
Cosmos Chi Kung is Available to Everyone
Cosmos Chi Kung is not restricted to people of a certain class, country or religion. It is able to be practiced by people of any religion, ethnicity, gender or any other other label. There are no dietary restrictions, no special clothes are needed and you need not seek out a special temple for your practice. The main requirement is a willingness to practice once a day, following the instructions of your teacher.
Once You Learn It, You Can Practice For Life
To competently learn a genuine internal art, such as Cosmos Chi Kung, it's necessary to learn it directly from a qualified teacher. But, once you have adequately learned how to practice chi kung, you can continue your independent practice every day for the rest of your life. It's highly recommended to maintain contact with your teacher for guidance as necessary, but it's not required to continue attending courses. So, if you attend an intensive course where you learn Cosmos Chi Kung over two days, you're set! In those two days you receive the essence of a practice that will continue to blossom as you carry on your personal practice.
Cosmos Chi Kung is Highly Enjoyable
And, finally, perhaps the most important point: it is a great joy to practice Shaolin Cosmos Chi Kung! Not only is the actual practice very enjoyable, but practitioners commonly report that their overall quality of life improves after starting their practice.  It didn’t take long for chi kung to become an indispensable part of my life, and I sincerely hope you will take the time to enjoy this precious art as well.


Enabling Setup Mode
Please wait while we enable setup mode on the device. After around a minute please connect
this
machine to the
'params_ssid'
network and navigate to
http://<IP_ADDRESS>
.


The feed allows users to receive information they need instantly, without the need to request for it. It can also monitor progress, tasks, goals, errors, warnings, updates and let's you know when something changes to give a calm state of mind: there is no need to worry about forgetting something important, the feed will always be there!
The feed mainly consists of smart cards with actions with roughly the following categories: Results (charts), UpdatesProgress, Reminders, News, Warnings/Errors and Planning.
Whenever another user finishes a task, a calculation finishes, new results are ready or new data is available you'll instantly receive an update right here in the feed!
The Feed is installable and lives on the user's home screen, without the need for an app store. It offers an immersive full screen experience and can even re-engage users with web push notifications.
We will only show information that's relevant to you! The feed is completely personalized for you and your role, if we ever show something that's not relevant you can let us know and we'll stop showing similar information.
All information from all our solutions and connected data sources are combined into a single feed, there is no need to constantly switch because we'll gather everything right here.
We'll monitor the progress of tasks and goals and automatically notify you if we're no longer on track or if certain goals are in danger. We'll even give you steps you might take to get back on track! All your colleagues will also receive updates automatically if they are falling behind, along with steps they might take to resolve any issues.
The assistant manages your feed, allows you to interact with the feed and automatically provides updates and monitors progress. Feel free to ask the assistant for help!


Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
At this point, you've modified the initial implementation of the StockWatcher application, which simulated stock data in the client-side code. The current implementation now retrieves JSON-formatted data from your local server.
In this session, you'll make a call to a remote server instead. To do so you will have to work around SOP (Same Origin Policy) constraints.
This tutorial builds on the GWT concepts and the StockWatcher application created in the Getting Started tutorial. If you have not completed the Getting Started tutorial and are familiar with basic GWT concepts, you can import the StockWatcher project as coded to this point.
File
menu, select the Import...
menu option.Next
button.Finish
button.
If you are using ant, edit the gwt.sdk
property in StockWatcher/build.xml to point to where you unzipped GWT.
In order to actually run this tutorial, you will need either access to a server other than where StockWatcher is running, one that can run a PHP script, or be able to run a Python script on your machine.
As you modify the current implementation of StockWatcher to access data on a remote server, there are two issues to address:
The Same Origin Policy (SOP) is a browser security measure that restricts client-side JavaScript code from interacting with resources not originating from the same domain name, protocol and port. The browser considers two pages to have the same origin only if these three values are the same. For example, if the StockWatcher application is running in a web page on http://abc.com:80 it cannot interact with stock data loaded from a different domain, http://xyz.com. It can't even load stock data from the same domain if the port is different, for example, http://abc.com:81.
The idea behind SOP is that, for security reasons, the browser should not trust content loaded from arbitrary websites. A malicious web page could inject code that steals data or otherwise compromises security.
As such, for accessing JSON-formatted stock data from another domain or port, the current implementation will not work. The web browser will block the HTTP call to retrieve the JSON.
For a more detailed description of SOP and its effect on GWT, read What is the Same Origin Policy, and how does it affect GWT?
There are two options for working around SOP security:
The first option is to play by the rules of SOP and create a proxy on your local server. You can then make HTTP calls to your local server and have it go fetch the data from the remote server. This works because the code running on your web server is not subject to SOP restrictions. Only the client-side code is.
Specifically for the StockWatcher application, you could implement this strategy by writing server-side code to download (and maybe cache) the JSON-encoded stock quotes from a remote server. You could then use any mechanism we want for retrieving the data from the local server: GWT RPC or direct HTTP using RequestBuilder.
One downside to this approach is that it requires additional server-side code. Another is that the extra HTTP call increases the latency of remote calls and adds to the workload on our web server.
Another option is to dynamically load JavaScript into a <script> tag. Client-side JavaScript can manipulate <script> tags, just like any other element in the HTML Document Object Model (DOM). Client-side code can set the src attribute of a <script> tag to automatically download and execute new JavaScript into the page.
This strategy is not subject to SOP restrictions. So you can effectively use it to load JavaScript (and therefore JSON) from remote servers.
This is the strategy you'll use to get the JSON-formatted stock data from a remote server.
Dynamically loading the JavaScript into a <script> tag solves the SOP issue but introduces another. When you use this method to load JavaScript, although the browser retrieves the code asynchronously, it doesn't notify you when it's finished. Instead, it simply executes the new JavaScript. However, by definition, JSON cannot contain executable code. Put the two together and you'll realize that you can't load plain JSON data using a <script> tag.
To resolve the callback issue, you can specify the name of a callback function as an input argument of the call itself. The web server will then wrap the JSON response in a call to that function. This technique is called JSON with Padding (JSONP). When the browser finishes downloading the new contents of the <script> tag, the callback function executes.
callback125([{"symbol":"DDD","price":10.610339195026,"change":0.053085447454327}]);
Google Data APIs support this technique.
For StockWatcher, the additional requirement in the client-side code is that you include the name of the JavaScript function you're using as a callback in the HTTP request .
Now that you understand the SOP issues surrounding cross-site requests, compare this implementation to the implementation for getting JSON data from a local server. You'll have to change some of the existing implementation but you'll be able to reuse some components as well. Most of the work will be in writing the new method, getJSON, which makes the call to the remote server.
| Task | Same-Site Implementation | Cross-Site Implementation |
|---|---|---|
| Making the call | HTTP with Request Builder | Embed a script whose src attribute is the URL of the JSON data with the name of the callback function appended. |
| Server-side code | Returns JSON string | Returns a Javascript callback function with the JSON string |
| Handling the response | Use JavaScript eval() function to turn JSON string into JavaScript object | Already a JavaScript object; cast it as a StockData array |
| Data objects | Create an overlay type: StockData | Reuse the overlay type |
| Handle Errors | Create a Label widget to display error messages | Reuse the Label widget |
In this tutorial, you have two options for setting up the stock data so that StockWatcher encounters SOP restrictions.
If you have access to a web server, then you can use the following PHP script to return the JSONP.
stockPrices.php
<?php header('Content-Type: text/javascript'); header('Cache-Control: no-cache'); header('Pragma: no-cache'); define("MAX_PRICE", 100.0); // $100.00 define("MAX_PRICE_CHANGE", 0.02); // +/- 2% $callback = trim($_GET['callback']); echo $callback; echo '(['; $q = trim($_GET['q']); if ($q) { $symbols = explode(' ', $q); for ($i=0; $i<count($symbols); $i++) { $price = lcg_value() * MAX_PRICE; $change = $price * MAX_PRICE_CHANGE * (lcg_value() * 2.0 - 1.0); echo '{'; echo "\"symbol\":\"$symbols[$i]\","; echo "\"price\":$price,"; echo "\"change\":$change"; echo '}'; if ($i < (count($symbols) - 1)) { echo ','; } } } echo ']);'; ?>
http://[www.myStockServerDomain.com]/stockPrices.php?q=ABC
[{"symbol":"ABC","price":81.284083,"change":-0.007986}]
http://[www.myStockServerDomain.com]/stockPrices.php?q=ABC&callback=callback125
callback125([{"symbol":"ABC","price":53.554212,"change":0.584011}]);
If you do not have access to a remote server, but have Python installed on your local machine, you can simulate a remote server. If you make an HTTP request to a different port, you will hit the same SOP restrictions as if you were trying to access a different domain.
Use the following script to serve data from a different port on your local machine. For each stock symbol the Python script generates random price and change values in JSON format. Notice in the BaseHTTPServer.HTTPServer constructor that it will be running on port 8000. Also notice that the script supports the callback query string parameter.
quoteServer.py
#!/usr/bin/env python2.4 # # Copyright 2007 Google Inc. All Rights Reserved. import BaseHTTPServer import SimpleHTTPServer import urllib import random MAX_PRICE = 100.0 MAX_PRICE_CHANGE = 0.02 class MyHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_GET(self): form = {} if self.path.find('?') > -1: queryStr = self.path.split('?')[1] form = dict([queryParam.split('=') for queryParam in queryStr.split('&')]) body = '[' if 'q' in form: quotes = [] for symbol in urllib.unquote_plus(form['q']).split(' '): price = random.random() * MAX_PRICE change = price * MAX_PRICE_CHANGE * (random.random() * 2.0 - 1.0) quotes.append(('{"symbol":"%s","price":%f,"change":%f}' % (symbol, price, change))) body += ','.join(quotes) body += ']' if 'callback' in form: body = ('%s(%s);' % (form['callback'], body)) self.send_response(200) self.send_header('Content-Type', 'text/javascript') self.send_header('Content-Length', len(body)) self.send_header('Expires', '-1') self.send_header('Cache-Control', 'no-cache') self.send_header('Pragma', 'no-cache') self.end_headers() self.wfile.write(body) self.wfile.flush() self.connection.shutdown(1) bhs = BaseHTTPServer.HTTPServer(('', 8000), MyHandler) bhs.serve_forever()
python quoteServer.py
http://localhost:8000/?q=ABC
[{"symbol":"ABC","price":81.284083,"change":-0.007986}]
http://localhost:8000/?q=ABC&callback=callback125
callback125([{"symbol":"ABC","price":53.554212,"change":0.584011}]);
Now that you've verified that the server is returning stock data either as a JSON string or as JSONP, you can update StockWatcher to request and then handle the JSONP. The RequestBuilder code is replaced by a call to the getJson method. The first parameter is an ID number that uniquely identifies each HTTP request.
Update the query URL so that it includes both the stock codes your are querying and the name of the callback function. Each callback function will have a unique ID number.
This is the only difference that results in the implementation depending on whether the data is being served from a different domain or a different port.
private static final String JSON_URL = GWT.getModuleBaseURL() + "stockPrices?q=";
private static final String JSON_URL = "http://localhost:8000/?q=";
private static final String JSON_URL = "http://www.myStockServerDomain.com/stockPrices.php?q=";
private Label errorMsgLabel = new Label();
private int jsonRequestId = 0;
In the same-site implementation, the JSON URL was appended with the stock codes and then a HTTP GET request sent to the server. RequestBuilder was used to construct the HTTP request.
In the cross-site implementation, the JSON URL is wrapped in the callback method. The RequestBuilder code is replaced by a JSNI function, getJSON(int, String, StockWatcher). The first parameter is an ID number that uniquely identifies each HTTP request.
The getJSON function creates a JavaScript script which makes the call to the server.
/**
* Generate random stock prices.
*/
private void refreshWatchList() {
if (stocks.size() == 0) {
return;
}
String url = JSON_URL;
// Append watch list stock symbols to query URL.
Iterator<String> iter = stocks.iterator();
while (iter.hasNext()) {
url += iter.next();
if (iter.hasNext()) {
url += "+";
}
}
// Append the name of the callback function to the JSON URL.
url = URL.encode(url) + "&callback=";
// Send request to server by replacing RequestBuilder code with a call to a JSNI method.
getJson(jsonRequestId++, url, this);
}
// Send request to server and catch any errors. RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url); try { Request request = builder.sendRequest(null, new RequestCallback() { public void onError(Request request, Throwable exception) { displayError("Couldn't retrieve JSON"); } public void onResponseReceived(Request request, Response response) { if (200 == response.getStatusCode()) { updateTable(asArrayOfStockData(response.getText())); } else { displayError("Couldn't retrieve JSON (" + response.getStatusText() + ")"); } } }); } catch (RequestException e) { displayError("Couldn't retrieve JSON"); }
What follows is the most important change in this implementation. This is where you work around the SOP restrictions by using the src attribute of the <script> tag to make the call to the remote server.
This JSNI method (getJSON) creates a dynamically-loaded <script> element. The src attribute is the URL of the JSON data with the name of a callback function appended. When the script executes, it fetches the padded JSON; the JSON data is passed as an argument of the callback function. When the callback function executes, it calls the Java handleJsonResponse method and passes it the JSON data as a JavaScript object.
Not only does this implementation include some embedded handwritten JavaScript (JSNI) but it uses a bridge method, a technique for calling back into the Java source code during development. (Remember, when you compile StockWatcher, all the client-side Java code is compiled into JavaScript.)
/** * Make call to remote server. */ public native static void getJson(int requestId, String url, StockWatcher handler) /*-{ var callback = "callback" + requestId; // [1] Create a script element. var script = document.createElement("script"); script.setAttribute("src", url+callback); script.setAttribute("type", "text/javascript"); // [2] Define the callback function on the window object. window[callback] = function(jsonObj) { // [3] handler.@com.google.gwt.sample.stockwatcher.client.StockWatcher::handleJsonResponse(Lcom/google/gwt/core/client/JavaScriptObject;)(jsonObj); window[callback + "done"] = true; } // [4] JSON download has 1-second timeout. setTimeout(function() { if (!window[callback + "done"]) { handler.@com.google.gwt.sample.stockwatcher.client.StockWatcher::handleJsonResponse(Lcom/google/gwt/core/client/JavaScriptObject;)(null); } // [5] Cleanup. Remove script and callback elements. document.body.removeChild(script); delete window[callback]; delete window[callback + "done"]; }, 1000); // [6] Attach the script element to the document body. document.body.appendChild(script); }-*/;
This implementation generates callback function names sequentially in case of multiple pending requests. In particular, notice the syntax used to call the handleJsonResponse(JavaScriptObject) method:
handler.@com.google.gwt.sample.stockwatcher.client.StockWatcher::handleJsonResponse(Lcom/google/gwt/core/client/JavaScriptObject;)(jsonObj);
You can see that once the JSON object is downloaded, the callback in the JSNI method is really just delegating to the Java method handleJsonResponse.
Calling Java methods from JavaScript is somewhat similar to calling Java methods from C code in JNI. In particular, JSNI borrows the JNI mangled method signature approach to distinguish among overloaded methods. JavaScript calls into Java methods are of the following form:
[instance-expr.]@class-name::method-name(param-signature)(arguments)
| Component | Description | Example |
|---|---|---|
| [instance-expr.] | Must be present when calling an instance method and must be absent when calling a static method | handler. (StockWatcher object instance) |
| @class-name | The fully-qualified name of the StockWatcher class | @com.google.gwt.sample.stockwatcher.client.StockWatcher |
| ::method-name | The name of the method we're calling | ::handleJsonResponse |
| (param-signature) | The handleJsonResponse method signature, defined with the JNI syntax | (Lcom/google/gwt/core/client/JavaScriptObject;) |
| (arguments) | The jsonObj containing the JSON data | (jsonObj) |
For more information on manipulating Java objects from within the JavaScript implementation of a JSNI method, see the Developer's Guide, Accessing Java Methods and Fields from JavaScript.
At this point most of your work is done. The one difference is that the return value is already a JavaScript object, not a JSON string. Thus, in the asArrayOfStockData method you no longer have to use the JavaScript eval() function to convert it.
If you receive a response from the server, then call the updateTable method to populate the Price and Change fields. You will still use the overlay type (StockData) and the JsArray (asArrayOfStockData) that you wrote in the same-site implementation.
If a response does not come back from the server, you display a message. You can use the same displayError method and Label widget you created in the same-site implementation.
/** * Handle the response to the request for stock data from a remote server. */ public void handleJsonResponse(JavaScriptObject jso) { if (jso == null) { displayError("Couldn't retrieve JSON"); return; } updateTable(asArrayOfStockData (jso)); }
import com.google.gwt.core.client.JavaScriptObject;
In this implementation the response is a JavaScript object, not a string. Your next step is to modify the asArrayOfStockData method. Rather than convert the JSON string into a JavaScript array, it needs to cast the JavaScript object returned from the JSNI method as an array of StockData.
/** * Convert the string of JSON into JavaScript object. */ private final native JsArray<StockData> asArrayOfStockData(String json) /*-{ return eval(json); }-*/;
/** * Cast JavaScriptObject as JsArray of StockData. */ private final native JsArray<StockData> asArrayOfStockData(JavaScriptObject jso) /*-{ return jso; }-*/;
Whether you chose to serve the JSON-formatted stock data from a different domain or a different port, the new StockWatcher implementation should work around any SOP access restrictions and be able to retrieve the stock data.
python quoteServer.py
Before you implement mashups of your own, remember that downloading cross-site JSON is powerful, but can also be a security risk.  Take a minute to read Security for GWT Applications, which describes the potential threats to GWT applications and how you can combat them.


Week 3 wraps up for Drive Car Of The Year 2020
Check out the winners the Drive.com.au team has picked.
by William Stopford- shares
The third week of Drive Car of the Year 2020 is over and the winners of five different SUV categories have been announced.
This week, winners were chosen in the large, upper large, off-road, small luxury and medium luxury SUV categories. What do you think of this week's slate of winners?
Read the full list of contenders and winners below. The Drive.com.au team will announce the Drive Car of the Year 2020 overall winner on 22 November.
Drive Car of the Year 2020: Large SUV
- Hyundai Santa Fe (WINNER)
- Ford Everest
- Holden Acadia
- Isuzu MU-X
- Kia Sorento
- Mitsubishi Pajero Sport
- Skoda Kodiaq
- Toyota Prado
Read the article here at Drive.com.au
Drive Car of the Year 2020: Upper large SUV
- Toyota LandCruiser (WINNER)
- Land Rover Discovery
- Nissan Patrol
Read the article here at Drive.com.au
Drive Car of the Year 2020: Off-road SUV
- Jeep Wrangler (WINNER)
- Suzuki Jimny
- Toyota LandCruiser 70 Series
Read the article here at Drive.com.au
Drive Car of the Year 2020: Small luxury SUV
- Audi Q3 (WINNER)
- BMW X2
- Jaguar E-Pace
- Lexus UX
- Volvo XC40
Read the article here at Drive.com.au
Drive Car of the Year 2020: Medium luxury SUV
- Volvo XC60 (WINNER)
- Alfa Romeo Stelvio
- BMW X3
- Lexus NX
- Range Rover Evoque
- Porsche Macan
Read the article here at Drive.com.au
Next week's winners will come from a diverse group of categories, covering everything from dual-cab utes to electric vehicles to sports cars. Stay tuned!
CLICK HERE to see the full list of categories and contenders for each.
1
6
nextprevious
Week 3 wraps up for Drive Car Of The Year 2020


The following certificates have been configured as Trust Anchors. See project README for details how to configure your own set of Trust Anchors.


Sir Kiel Nighthawk:
Nice to meet you, young Warrior. I am Kiel Nighthawk of the Gryphon Knights. It is our duty to protect Giran Castle and its neighborhood from the green dragon, Antharas, and the creatures of Devil's Island.
Quest


TrendMender
This extension adds -trending to the Twitter trending topic links, so the results aren't filled with tweets like "Me looking to see why Emilio Estevez is trending" with a Spongebob reaction gif


The form is created using the different form elements. There is a distinction between simple elements and element groups (complex elements). Element groups are collections of multiple elements. Below you can find a simple explanation for the usage of the editor. For each element, you can select whether it is mandatory, add a hint which is shown to the right of an element.
| Element | Description |
|---|---|
| Text field |
A simple text field. You can configure min/max lenghts and add a regular expression which the result has to match. |
| Text area |
An expanded text field for entering larger texts. You can configure its height. |
| File upload |
A field for uploading files with a configurable maximum file size (in KB). If no size is entered, the default is 3 MB (3072 KB). |
| Radio buttons |
A list of options from which one can be selected. You can added and remove an unlimited (within reason) number of items. |
| Check boxes |
A list of options from which one or more can be selected. You can added and remove an unlimited (within reason) number of items. |
| Select box |
A list of options displayed as a drop-down-box from which one can be selected. You can added and remove an unlimited (within reason) number of items. |
| Date field |
A simple field for date input. You can configure a minimum and a maximum date. |
| User-Mail |
Displays two fields: A text field for the users e-mail address and a check box which allows the users to control if they want to receive a copy of the submitted form. |
| Hint |
Not actually a form element as such. Will only display the entered text (as a help or hint for users). |


{% extends '_layouts/layout_2-3.html' %} {% block page_title %}Access and download your GP record{{serviceName}}{% endblock %} {% block pageTitle %}Access and download your GP record{% endblock %} {% block content %}
The NHS is busy designing new digital services to help you take control of your own health and care needs to ease the pressure on our frontline services.
GP online services already offer you the ability to do certain transactions online, including book GP appointments, order repeat prescriptions and access information in your GP record.
Currently you have multiple ways to access these online services. We are testing whether patients feel it would be easier and more straight forward to access all these services in one place.
Therefore we aim to transform the patient journey by enabling you to stay on NHS.UK to access your online services. By doing this, we hope to improve your experience and gain valuable insight in several key areas.
We hope to use these findings to help us improve the existing service.
We designed a GP online service to be piloted on NHS.UK, with the focus on providing you with the ability to access to your GP record, book an appointment, and order repeat prescriptions.
This trial is now live in a small selection of GP practices around the country. It will improve our understanding of your needs and help us assess your experience of our services, in order to meet those needs.
During the trial stage, we’ll be gathering feedback on your experience of accessing your GP record, and other GP online services. We’ll use what we learn to improve these services.
Once we’ve reviewed the feedback, we’ll use our learnings in the design of future services. We then expect to share the learnings from the project with a wider audience, including any relevant research that we have done.


---
layout: page
title: How to Use the Kit
---
How to use the Exploration of Egalitarianism Kit
In this section you can find the materials you need to use the Exploration of Egalitarianism Kit. With this experience, we aim to provide an opportunity for young people to engage with heritage and foster a sense of historical empathy in a manner that is compelling, impactful and relevant to their lives. Over the course of this experience we hope that participants will learn about the site through historical contextualisation, partake in perspective taking (for both historical figures and for their peers today), and develop an affective connection with the past.
You will need:
Thank you for using the Emotive Exploration of Egalitarianism
Digital Education Kit!
Sincerely, The Emotive Team


|
iDreamSky Game Engine
v1.0.0
|
This is the sub class for Scene Collision Object. 更多...
#include <SceneCollision.h>
複合項目 | |
| class | Brush |
| class | BrushList |
| class | CastInfo |
| class | Data |
| class | HeightField |
| class | HeightFieldList |
| class | Resource |
| class | ResourceImporter |
公開方法(Public Methods) | |
| SceneCollision () | |
| SceneCollision Constructor. 更多... | |
| ~SceneCollision () | |
| SceneCollision Destructor. 更多... | |
| bool | construct (const char *name_) |
| This function construct the scene collision. 更多... | |
| bool | append (const char *name_) |
| This function append the scene collision. 更多... | |
| void | destruct () |
| This function destruct the scene collision. | |
| bool | test (Vector3 &point_) |
| This function test if a point intersect with any brush or height field in this scene. 更多... | |
| bool | testSphere (SceneCollision::CastInfo &castInfo_) |
| This function test if a point intersect with any brush or height field in this scene. 更多... | |
| 公開方法(Public Methods) 繼承自 Magnum::Collision | |
| Collision (Type type_) | |
| The constructor. 更多... | |
| void | setID (unsigned int ID_) |
| set the ID of this Instance of Collision. 更多... | |
| void | setSubID (unsigned int SubID_) |
| set the subID of this Instance of Collision. 更多... | |
| void | setPosition (const Vector3 &position_) |
| set the Position of this Instance of Collision. 更多... | |
| void | setTransform (const Matrix4 &transform_) |
| set the Position/Rotation of this Instance of Collision. 更多... | |
| void | setVelocity (const Vector3 &velocity_) |
| set the Velocity of this Instance of Collision. 更多... | |
| unsigned int | getID () const |
| get the ID of this Instance of Collision. 更多... | |
| unsigned int | getSubID () const |
| get the subID of this Instance of Collision. 更多... | |
| Vector3 | getPosition () const |
| get the Position of this Instance of Collision. 更多... | |
| const Matrix4 & | getTransform () const |
| get the Position/Rotation of this Instance of Collision. 更多... | |
| const Vector3 & | getVelocity () const |
| get the Velocity of this Instance of Collision. 更多... | |
| Type | getType () const |
| get the Type of this Instance of Collision. 更多... | |
| void | setCallBack (Functor1< ContactInfo > &cb_) |
| set the Collision Event Handler 更多... | |
| void | setAttribute (unsigned int attribute_) |
| set the Attribute of this Collision Instance 更多... | |
| void | setCategory (unsigned int category_) |
| Functor1< ContactInfo > & | getCallBack () |
| get the Collision Event Handler 更多... | |
| unsigned int | getAttribute () const |
| get the Attribute of this Collision Instance 更多... | |
| unsigned int | getCategory () const |
| bool | getEnabled () const |
| void | setEnabled (bool enabled_) |
| virtual bool | isInside (const Vector3 &world_point) |
| This is a pure virtual function. 更多... | |
| void | defaultCollisionResponse (const ContactInfo &info) |
| preform default Response when this Instance collide with other 更多... | |
| virtual bool | test (float dt, Collision *other_, Collision::ContactInfo &info_) |
| This is a pure virtual function. 更多... | |
靜態公開方法(Static Public Methods) | |
| static SceneCollision & | instance () |
額外的繼承成員 | |
| 公開型態 繼承自 Magnum::Collision | |
| enum | Type { CT_SPHERE3 = 0, CT_SCENE, CT_NUM_COLLISION } |
| enum supported Collision Shape(Type) 更多... | |
| SceneCollision::SceneCollision | ( | ) |
| SceneCollision::~SceneCollision | ( | ) |
| bool SceneCollision::append | ( | const char * | name_ | ) |
This function append the scene collision.
| name_,const | char *, the name of the resource |
| bool SceneCollision::construct | ( | const char * | name_ | ) |
This function construct the scene collision.
| name_,const | char *, the name of the resource |
| bool SceneCollision::test | ( | Vector3 & | point_ | ) |
This function test if a point intersect with any brush or height field in this scene.
| point_,Vector3,the | time elapse. |
| bool SceneCollision::testSphere | ( | SceneCollision::CastInfo & | castInfo_ | ) |
This function test if a point intersect with any brush or height field in this scene.
| castInfo_,SceneCollision::CastInfo,the | cast info. |


Unofficial Quake 3 Map Specs
This document describes the Quake 3 BSP file format. This is an unofficial
document. Quake 3 is a registered trademark of id Software, which does not sponsor,
authorize, or endorse this document.
This document describes the Quake 3 BSP file format as the author
understands it. While every effort has been made to ensure that the
contents of this document are accurate, the author does not guarantee that
any portion of this document is actually correct. In addition, the author
cannot be held responsible the consequences of the any use or misuse of the
information contained in this document.
Copyright © 2000 Kekoa Proudfoot. All rights
reserved.
File structure
Quake 3 BSP files are IBSP files, and therefore have a structure similar to
previous BSP files from id Software. Every IBSP file begins with a header,
which in turn contains a lump directory. The lump directory describes the
layout of the rest of the file, which contains some number of lumps. Each
lump stores a particular kind of map data.
| Header / Directory |
| Lump |
| Lump |
| Lump |
| ... |
|
|
|
The layout of an IBSP file. An IBSP file
consists of a header followed by a number of lumps. The header contains a
directory which identifies the locations and sizes of the lumps.
|
Data types
Quake 3 BSP files contains only four basic data types. They are:
| Type
| Description
|
|---|
|
| ubyte | unsigned byte |
| int | 4-byte integer, little-endian |
| float | 4-byte IEEE float, little-endian |
| string[n] | string of n ASCII bytes, not necessarily null-terminated |
All data in a BSP file is organized into records composed of these four data
types.
Header and Directory
The header record looks like this:
header
| string[4] magic
| Magic number. Always "IBSP".
|
| int version
| Version number. 0x2e for the BSP files distributed with Quake 3.
|
| direntry[17] direntries
| Lump directory, seventeen entries.
|
Each direntry locates a single lump in the BSP file:
direntry
| int offset
| Offset to start of lump, relative to beginning of file.
|
| int length
| Length of lump. Always a multiple of 4.
|
Lumps
There are 17 lumps in a Quake 3 BSP file. In the order that they
appear in the lump directory, they are:
| Index
| Lump Name
| Description
|
|---|
| 0 | Entities
| Game-related object descriptions.
|
| 1 | Textures
| Surface descriptions.
|
| 2 | Planes
| Planes used by map geometry.
|
| 3 | Nodes
| BSP tree nodes.
|
| 4 | Leafs
| BSP tree leaves.
|
| 5 | Leaffaces
| Lists of face indices, one list per leaf.
|
| 6 | Leafbrushes
| Lists of brush indices, one list per leaf.
|
| 7 | Models
| Descriptions of rigid world geometry in map.
|
| 8 | Brushes
| Convex polyhedra used to describe solid space.
|
| 9 | Brushsides
| Brush surfaces.
|
| 10 | Vertexes
| Vertices used to describe faces.
|
| 11 | Meshverts
| Lists of offsets, one list per mesh.
|
| 12 | Effects
| List of special map effects.
|
| 13 | Faces
| Surface geometry.
|
| 14 | Lightmaps
| Packed lightmap data.
|
| 15 | Lightvols
| Local illumination data.
|
| 16 | Visdata
| Cluster-cluster visibility data.
|
Entities
The entities lump stores game-related map information, including
information about the map name, weapons, health, armor, triggers, spawn
points, lights, and .md3 models to be placed in the map. The lump contains
only one record, a string that describes all of the entities:
entities
| string[length] ents
| Entity descriptions, stored as a string.
|
The length of the entity string is given by the size of the lump
itself, as specified in the lump directory.
The meanings, formats, and parameters of the various entity descriptions
are currently outside the scope of this document. For more information
about entity descriptions, see the documentation to Q3Radiant, the Quake 3
level editor.
Textures
The textures lump stores information about surfaces and volumes, which are
in turn associated with faces, brushes, and brushsides. There are a total
of length / sizeof(texture) records in the lump, where
length is the size of the lump itself, as specified in the lump
directory.
texture
| string[64] name
| Texture name.
|
| int flags
| Surface flags.
|
| int contents
| Content flags.
|
Planes
The planes lump stores a generic set of planes that are in turn referenced
by nodes and brushsides. There are a total of length /
sizeof(plane) records in the lump, where length is the size
of the lump itself, as specified in the lump directory.
plane
| float[3] normal
| Plane normal.
|
| float dist
| Distance from origin to plane along normal.
|
Note that planes are paired. The pair of planes with
indices i and i ^ 1 are coincident planes with opposing normals.
Nodes
The nodes lump stores all of the nodes in the map's BSP tree. The BSP tree
is used primarily as a spatial subdivision scheme, dividing the world into
convex regions called leafs. The first node in the lump is the tree's root
node. There are a total of length / sizeof(node) records
in the lump, where length is the size of the lump itself, as
specified in the lump directory.
node
| int plane
| Plane index.
|
| int[2] children
| Children indices. Negative numbers are leaf indices: -(leaf+1).
|
| int[3] mins
| Integer bounding box min coord.
|
| int[3] maxs
| Integer bounding box max coord.
|
Leafs
The leafs lump stores the leaves of the map's BSP tree. Each leaf is a
convex region that contains, among other things, a cluster index (for
determining the other leafs potentially visible from within the leaf), a
list of faces (for rendering), and a list of brushes (for collision
detection). There are a total of length / sizeof(leaf)
records in the lump, where length is the size of the lump itself,
as specified in the lump directory.
leaf
| int cluster
| Visdata cluster index.
|
| int area
| Areaportal area.
|
| int[3] mins
| Integer bounding box min coord.
|
| int[3] maxs
| Integer bounding box max coord.
|
| int leafface
| First leafface for leaf.
|
| int n_leaffaces
| Number of leaffaces for leaf.
|
| int leafbrush
| First leafbrush for leaf.
|
| int n_leafbrushes
| Number of leafbrushes for leaf.
|
If cluster is negative, the leaf is outside the map or otherwise
invalid.
Leaffaces
The leaffaces lump stores lists of face indices, with one list per leaf.
There are a total of length / sizeof(leafface) records in
the lump, where length is the size of the lump itself, as
specified in the lump directory.
leafface
Leafbrushes
The leafbrushes lump stores lists of brush indices, with one list per leaf.
There are a total of length / sizeof(leafbrush) records in
the lump, where length is the size of the lump itself, as
specified in the lump directory.
leafbrush
Models
The models lump describes rigid groups of world geometry. The first model
correponds to the base portion of the map while the remaining models
correspond to movable portions of the map, such as the map's doors,
platforms, and buttons. Each model has a list of faces and list of
brushes; these are especially important for the movable parts of the map,
which (unlike the base portion of the map) do not have BSP trees associated
with them. There are a total of length / sizeof(models)
records in the lump, where length is the size of the lump itself,
as specified in the lump directory.
model
| float[3] mins
| Bounding box min coord.
|
| float[3] maxs
| Bounding box max coord.
|
| int face
| First face for model.
|
| int n_faces
| Number of faces for model.
|
| int brush
| First brush for model.
|
| int n_brushes
| Number of brushes for model.
|
Brushes
The brushes lump stores a set of brushes, which are in turn used for
collision detection. Each brush describes a convex volume as defined by
its surrounding surfaces. There are a total of length /
sizeof(brushes) records in the lump, where length is the
size of the lump itself, as specified in the lump directory.
brush
| int brushside
| First brushside for brush.
|
| int n_brushsides
| Number of brushsides for brush.
|
| int texture
| Texture index.
|
Brushsides
The brushsides lump stores descriptions of brush bounding surfaces. There
are a total of length / sizeof(brushsides) records in the
lump, where length is the size of the lump itself, as specified in
the lump directory.
brushside
| int plane
| Plane index.
|
| int texture
| Texture index.
|
Vertexes
The vertexes lump stores lists of vertices used to describe faces. There
are a total of length / sizeof(vertex) records in the lump,
where length is the size of the lump itself, as specified in the
lump directory.
vertex
| float[3] position
| Vertex position.
|
| float[2][2] texcoord
| Vertex texture coordinates. 0=surface, 1=lightmap.
|
| float[3] normal
| Vertex normal.
|
| ubyte[4] color
| Vertex color. RGBA.
|
Meshverts
The meshverts lump stores lists of vertex offsets, used to describe
generalized triangle meshes. There are a total of length /
sizeof(meshvert) records in the lump, where length is the
size of the lump itself, as specified in the lump directory.
meshvert
| int offset
| Vertex index offset, relative to first vertex of
corresponding face.
|
Effects
The effects lump stores references to volumetric shaders (typically fog)
which affect the rendering of a particular group of faces. There are a
total of length / sizeof(effect) records in the lump,
where length is the size of the lump itself, as specified in the
lump directory.
effect
| string[64] name
| Effect shader.
|
| int brush
| Brush that generated this effect.
|
| int unknown
| Always 5, except in q3dm8, which has one effect with -1.
|
Faces
The faces lump stores information used to render the surfaces of the map.
There are a total of length / sizeof(faces) records in the
lump, where length is the size of the lump itself, as specified in
the lump directory.
face
| int texture
| Texture index.
|
| int effect
| Index into lump 12 (Effects), or -1.
|
| int type
| Face type. 1=polygon, 2=patch, 3=mesh, 4=billboard
|
| int vertex
| Index of first vertex.
|
| int n_vertexes
| Number of vertices.
|
| int meshvert
| Index of first meshvert.
|
| int n_meshverts
| Number of meshverts.
|
| int lm_index
| Lightmap index.
|
| int[2] lm_start
| Corner of this face's lightmap image in lightmap.
|
| int[2] lm_size
| Size of this face's lightmap image in lightmap.
|
| float[3] lm_origin
| World space origin of lightmap.
|
| float[2][3] lm_vecs
| World space lightmap s and t unit vectors.
|
| float[3] normal
| Surface normal.
|
| int[2] size
| Patch dimensions.
|
There are four types of faces: polygons, patches, meshes, and billboards.
Several components have different meanings depending on the face type.
For type 1 faces (polygons), vertex and n_vertexes
describe a set of vertices that form a polygon. The set always contains a
loop of vertices, and sometimes also includes an additional vertex near the
center of the polygon. For these faces, meshvert and
n_meshverts describe a valid polygon triangulation. Every three
meshverts describe a triangle. Each meshvert is an offset from the first
vertex of the face, given by vertex.
For type 2 faces (patches), vertex and n_vertexes
describe a 2D rectangular grid of control vertices with dimensions given by
size. Within this rectangular grid, regions of 3×3 vertices
represent biquadratic Bezier patches. Adjacent patches share a line of
three vertices. There are a total of
(size[0] - 1) / 2 by
(size[1] - 1) / 2 patches. Patches in the grid start at (i, j) given by:
i = 2n, n in [ 0 .. (size[0] - 1) / 2 ), and
j = 2m, m in [ 0 .. (size[1] - 1) / 2 ).
For type 3 faces (meshes), meshvert and n_meshverts are
used to describe the independent triangles that form the mesh. As with
type 1 faces, every three meshverts describe a triangle, and each meshvert
is an offset from the first vertex of the face, given by vertex.
For type 4 faces (billboards), vertex describes the single vertex
that determines the location of the billboard. Billboards are used for
effects such as flares. Exactly how each billboard vertex is to be
interpreted has not been investigated.
The lm_ variables are primarily used to deal with lightmap data.
A face that has a lightmap has a non-negative lm_index. For such
a face, lm_index is the index of the image in the lightmaps lump
that contains the lighting data for the face. The data in the lightmap
image can be located using the rectangle specified by lm_start and
lm_size.
For type 1 faces (polygons) only, lm_origin and lm_vecs
can be used to compute the world-space positions corresponding to lightmap
samples. These positions can in turn be used to compute dynamic lighting
across the face.
None of the lm_ variables are used to compute texture coordinates
for indexing into lightmaps. In fact, lightmap coordinates need not be
computed. Instead, lightmap coordinates are simply stored with the
vertices used to describe each face.
Lightmaps
The lightmaps lump stores the light map textures used make surface lighting
look more realistic. There are a total of length /
sizeof(lightmap) records in the lump, where length is the
size of the lump itself, as specified in the lump directory.
lightmap
| ubyte[128][128][3] map
| Lightmap color data. RGB.
|
Lightvols
The lightvols lump stores a uniform grid of lighting information used to
illuminate non-map objects. There are a total of length /
sizeof(lightvol) records in the lump, where length is the
size of the lump itself, as specified in the lump directory.
Lightvols make up a 3D grid whose dimensions are:
nx = floor(models[0].maxs[0] / 64) - ceil(models[0].mins[0] / 64) + 1
ny = floor(models[0].maxs[1] / 64) - ceil(models[0].mins[1] / 64) + 1
nz = floor(models[0].maxs[2] / 128) - ceil(models[0].mins[2] / 128) + 1
lightvol
| ubyte[3] ambient
| Ambient color component. RGB.
|
| ubyte[3] directional
| Directional color component. RGB.
|
| ubyte[2] dir
| Direction to light. 0=phi, 1=theta.
|
Visdata
The visdata lump stores bit vectors that provide cluster-to-cluster
visibility information. There is exactly one visdata record, with a
length equal to that specified in the lump directory.
visdata
| int n_vecs
| Number of vectors.
|
| int sz_vecs
| Size of each vector, in bytes.
|
| ubyte[n_vecs * sz_vecs] vecs
| Visibility data. One bit per cluster per vector.
|
Cluster x is visible from cluster y if the (1 << y % 8) bit of
vecs[x * sz_vecs + y / 8] is set.
Note that clusters are associated with leaves.
|
Known Issues and Missing Items
|
[top]
|
|
This document is very brief. I have gathered more information, but have
not had time to write it up. Occasionally, I add more information to this
document.
At some point I put together a page that describes triangle meshes and other q3 leaf elements. I forget
the exact reason I created that page, but you might find it interesting.
Feel free to ask for clarification, but please accept my apologies if I
can't find the time to answer.
Copyright © 2000 Kekoa
Proudfoot. All rights reserved.
Keywords: quake 3 quake3 q3 arena quake3arena q3arena map bsp file spec specs format


{% include head.html %}
{% include nav.html %}
Andrew Sayre
father, leader, runner, technologist, science nerd
{% include section.html %} {% include footer.html %} {% include scripts.html %}


C++ | Action RPG | AI | Pipeline
Spite - Ragnars Mjöd was my sixth project at the Game Assembly. The game was created in our own C++ and DirectX11 engine, Yellowsnow over the span of 10 weeks at 50% work time. The projects reference game was no surpise, Diablo 3.
"After an all night bender with your friends you wake up alone in the snow and surrounded by the undead. Battle draugr and ice giants to recover your stolen mead!"
The Draugr's behaviour tree can be found here.
The biggest obstacle to overcome of the project was maintaining the base enemy, the Draugr. The draugr were melee entities which the level designers spawned A LOT of. As there were a lot of enemies, I had to do several optimization to reduce risk of low framerate. One solution was that all enemies entity ID:S were placed in a grid, reducing the amount of enemies to check around them when using steering behaviours. Another one was that when enemies were far away from the player, they had leaders that would do pathfinding and checking sight to the player, while the "minions" were idling.
The way leaders were determined was by a simple function that was called when enemies were spawned or when their current leader was killed. Below is the code for finding a nearby leader. The game had a PollingStation, which the enemies used to get entity IDs from. In this case, they asked for a list of all current leader IDs. If there was none nearby, they become the leader and add themselves to the list. If they were previously following a leader, they changed their state to engaged, moving towards the player.
Another issue that needed to be solved for the Draugr was that when there were so many melee entities, I could not have 50 units all grouping around the player trying to attack whilst trying to separate at the same time. To solve that issue, I placed 12 attack slots that the Draugr could fight at. This would only allow twelve characters to attack the player at the same time, which brings me to the next issue; making sure the others wait for their turn.
The solution to that issue was to check in front of the Draugr, seeing if there were any other units waiting for their turn. Below is a node in the behaviour tree, that was called only a few times per second. First, they would check if they had an attack slot, and would in that case ignore if there were any others waiting ahead of them. They would also ignore checking if there were any others waiting in front of them at a certain distance, which would allow them to try move closer, creating more circular formations surrounding the player. If they were close enough, they would also ignore the fact and just hit the player instead. Finally, if none of the above statements were given, they would raycast and check if there was another enemy waiting in front of them.


The gallery has visitors from all walks of life - tourists, researchers, students, art majors, artists, designers and literally anyone; but not all of them are equipped with knowledge in art history. Some may have visited the gallery but came out equally clueless as before they entered. Due to their lack of art history, not all visitors appreciate the multitude of collections held by the National Gallery of Scotland.Considering making visitors fully engage with the gallery, we decided to go for an interactive installation.
The context of enquiry is “Would you find it interesting if you can experience music with another sensory organ? Would this change the way you see paintings?” In light of this, we would like to consider how we can make the gallery more meaningful to those with the disability in vision and those without prior knowledge of art history; would our project be able to bring another meaning to the paintings they see?
Arduino - Processing
Starting from observing the visitors in the gallery, we came up with the idea to make an installation. By choosing the right components and putting them together, I did several prototypes and tried many different sensors. Also, I applied my java knowledge to finish the code for Arduino. This project enabled me to solve the problems in both the technical part and the concept part.


This project was created to help quickly generate flashcards based on translations provided in a simple spreadsheet. The advantage of this approach is that adding, editing and deleting the words to be shown on the flashcards is a simple and quick process, allowing teachers, students and anyone else to maintain an effective tool that may not be available for many languages.
If you wish to discuss setting up this tool for your own use, additional features, or anything else, please use the contact methods provided at the bottom of the page, email me or visit me at http://jonathanennis.com.


US judge voids Trump-backed 'conscience' rule for healthcare workers
NEW YORK: A federal judge in Manhattan on Wednesday declared void a rule backed by the Trump administration that would make it easier for doctors and nurses to avoid performing abortions on religious or moral grounds.
The 147-page decision by U.S. District Judge Paul Engelmayer on the so-called "conscience" rule came in a lawsuit by more than 20 U.S. states and municipalities, which said enforcement could undermine their ability to provide effective healthcare without jeopardizing billions of dollars a year in aid.
(Reporting by Jonathan Stempel in New York; Editing by Chizu Nomiyama)


DROP DEAD GORGEOUS A film review by Steve Rhodes Copyright 1999 Steve Rhodes RATING (0 TO ****): *** 1/2
"If you were a tree, what kind of tree would you be?" asks the deadly serious judge. It's the start of the local contest for Miss Teen Princess America in Mount Rose, Minnesota (population 5,076). The absolutely-confident-of-victory Rebecca Leeman (Denise Richards) whips out an answer guaranteed to please the judges, who were most likely handpicked by her mother, Gladys Leeman (Kirstie Alley), a previous winner. Becky's tree would have a good, solid Christian trunk and provide shade for the handicapped. (There is also something about providing for world peace and fighting world hunger, I believe. You can only write so fast at a screening, and this movie literally bursts with creative wit.)
As deftly directed by Michael Patrick Jann and brightly scripted by Lona Williams, DROP DEAD GORGEOUS is a chirpy satire done, à la WAITING FOR GUFFMAN, as a pseudo-documentary. The actors play every scene with complete earnestness, which adds immensely to the comedic effect. The biting, sardonic script works on both the verbal and the visual level. Becky, for example, dances in a costume that has a Mount Rushmore headdress with her head sandwiched between Teddy Roosevelt and Abraham Lincoln. She remarks that only in America could we make an old mountain handsome by carving on it.
The ensemble casting has eight contestants vying for the local title. The script and the direction outshine the cast, although all of the acting is quite good.
With food as big as the vast Minnesota farmland, the locals are a well-fed lot. One older contest winner brags in a commercial that she couldn't have done it without the help of St. Paul Pork Products. More recent winners seem to have taken a different attitude toward their food intake. Last year's winner, for example, now resides at the Dakota County Eating Disorders Clinic and has to be wheeled onto the stage this year by her nurse since she is too weak to walk. Her secret to winning included a 400-calorie a day regiment and lots of hard work.
The all-American city where the movie takes place is the home of the oldest living Lutheran, now deceased. Gladys tells us that it's no sin city, as their video stores don't have any back rooms. Guns are a different matter. Among many extracurricular activities, Becky is the proud Vice President of the Lutheran Sisterhood Gun Club. The press kit, which manages to be almost as funny as the movie itself, provides various definitions for the phrases used in the story. "God given talent" is defined to be "synonymous with the size of your gun."  The script uses these incidents as just the backdrop upon which to paint the story.
Each of the contestants for the crown and for the right to compete at the state level has her own hilarious story. One of the plumper ones, whose talent is imitating dog snarls, she shares her own tragedy with us. Showing us her bitten side, she tells the sad story of the German Shepherd she had to give away. It seems that carrying beef jerky in your pocket while walking a massive canine isn't a particularly wise idea.
The would-be beauty queens possess a wide variety of talent to dazzle the judges, none of whom has ever judged a contest before. Many of their gifts are quite unusual. One does wrestling-match cheerleading, and another performs dramatic readings from SOYLENT GREEN.
Becky's main competition comes from Amber (Kirsten Dunst), who practices her tap dancing while preparing bodies at the local funeral home.
In order to enhance the documentary feel, the cameraman, interviewer and soundman frequently are shown as if they accidentally got into the frame. There is never any doubt, however, as there is in 20 DATES, that the story is completely concocted.
So who will win the contest, and how many will make it through to the final competition? The picture, which relishes its political incorrectness, takes us on a fascinating journey to find out. The only problem with the movie is that it goes on about 10 minutes after its natural ending point. This last part is cute, but a crisper script would have had a bit more impact. In movies, especially comedies, shorter is almost always better. Still, this is only a minor quibble. The film, as delivered, is a delightful, biting comedy that sets a perfect tone and never loses it.
DROP DEAD GORGEOUS runs 1:35. It is rated PG-13 for sexual situations, a little violence and some profanity and would be fine for kids around 12 and up.
Email<EMAIL_ADDRESS>Web: www.InternetReviews.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


You'll miss a lot on this web site unless you enable Javascript
in your browser.
What is the Toolbox? [show]
The TLA Toolbox is an IDE (integrated development environment)
for the TLA+ tools. You can use it to:
Obtaining the Toolbox [show]
First, make sure you have a Java runtime, version 1.8 or later.
Then download and install the Toolbox. You may then have to
install pdflatex.
Downloading the Toolbox [show]
Below is a link to a page from which you can download the versions
of the Toolbox for various systems, the name of the file indicating
which system it is for. For example,
TLAToolbox-1.4.5-linux.gtk.x86_64.zip
is for 64-bit Linux.
Please thank Microsoft and HP for the open-source release of the
code by reading the following agreement.
By installing, copying, or otherwise using this software, you agree to be bound by the terms of its license. Read the license. You can download the Toolbox from either of these sites: -- DOWNLOAD FROM GITHUB -- -- ALTERNATE DOWNLOAD SITE -- Put the downloaded zip file in a convenient folder. Installing the Toolbox [show]
Here are the instructions for the different operating systems.
WindowsDownload the zip file into a convenient folder. Extract the contents of the file by right-clicking on it in the File Explorer and selecting Extract All. You can choose what folder to put the extracted files in; the default is a subfolder of the folder containing the zip file. Select the Show extracted files when complete option and click on Extract. The extracted files will be in a subfolder named toolbox Open that subfolder. You can run the Toolbox by double-clicking on the file calledtoolbox or toolbox.exe .
But before doing that, you probably want to make it easier to
run the Toolbox later by doing one of the following:
Mac OSDownload the file and, if necessary, unzip it by double-clicking on it. (Depending on how your browser and system are set up, the downloaded file may already be unzipped.) This results in an application bundle called TLA+ Toolbox.app, which you can move to the Applications folder. The Toolbox can be started by double-clicking that application. When you open the application for the first time, you will likely need to control-click (right-click) on the application, choose Open from the drop-down menu, and confirm that you want to open the application in the subsequent dialog box. This is due to Apple's security settings since the Toolbox is not distributed through the App Store.
For Homebrew users, a Toolbox Cask is available with the name
LinuxExtract the contents of the zip file to a convenient directory. Open thetoolbox subdirectory. You can then run the
Toolbox by executing the toolbox file in that
subdirectory.
Installing pdflatex [show]
To run the TLA+ pretty-printer (with the Toolbox's Produce PDF
Version command), the
pdflatex program must be
installed on your computer. That program is distributed as
part of a LaTeX installation, and it will already be installed if
you use TeX or LaTeX. It may also be installed if
you're running Linux. Run the command
pdflatex -helpin a command shell / terminal window to see if it's already installed. If it isn't, you should install LaTeX on your computer. The LaTeX Project has links to various sources of LaTeX. Here are ones that we recommend for different operating systems. Whatever method you use, you should check with a command shell that it is installed. (Open a new command shell after you install LaTeX.) WindowsMikTeX comes with detailed installation instructions.Mac OSThe MacTeX web page points to simple instructions for downloading the fileMacTeX.pkg . It claims that running the file
provides straightforward instructions for installing LaTeX.
You can ignore instructions on how to write a LaTeX document.
If you already use a manager for open-source software packages such as MacPorts or Homebrew, you can use it to install LaTeX. Please refer to the instructions of your package manager for details. LinuxThe provider of your Linux software should also be able to provide you with LaTeX for it.Running the Toolbox [show]
When you run the Toolbox, the instructions that appear on the
welcome screen tell you what to do next: namely, read the indicated
help page. For now, the help pages are the only
user manual that exists for the Toolbox. Read it. Even
after using the Toolbox for a while, you're unlikely to have
discovered all its features. Read all the help
pages. You never know what you might find in them.
If You Find a Problem [show]
The Toolbox works well, and users are generally happy with it.
However, there are a number of minor bugs that haven't yet been
fixed. The current bug repository, where you can look for known
bugs and report new ones, is:
The GitHub Repository tlaplus Issues page Bugs from before 2013, including many that were considered not worth the trouble of fixing, are in: Implementing the Toolbox has involved a lot of work by few people. They were able to build a sophisticated tool in a short time by using Eclipse. However, this required compromises, and there are some annoying (but not serious) inconveniences in the Toolbox because they either didn't have the time or the Eclipse expertise to fix them. So, please try to be helpful instead of angry if something doesn't work right. Report the problem if it's not already in the bug list, and help us fix it if you can. Thanks. Release History [show]
Version 1.6.0 of 11 July 2019
[details]
- Users can choose to have the Toolbox send us anonymous statistics about how they use TLC. We encourage you to do so. - The Toolbox's interface for running TLC has been redesigned to make it easier to use. - Installing the Toolbox now automatically installs Java, so there is no need to install it manually. - Features have been added to make error-trace exploration expressions more powerful and easier to write. Click on ?in the menu for adding an exploration expression for details. - There is now a TLC profiler to help find errors in a spec and to help optimize model checking. See Profiling in the Features section of the TLC Options Page help page.
Version 1.5.7 of 18 July 2018
[details]
Version 1.5.6 of 30 January 2018
[details]
Version 1.5.5 of 5 January 2018
[details]
Version 1.5.4 of Approximately 7 October 2017
[details]
Version 1.5.3 of 14 April 2017
[details]
Version 1.5.2 of 21 December 2015
[details]
Version 1.5.1 of 1 June 2015
[details]
Version 1.5.0 of 11 May 2015
[details]
Ancient Release History [show]
Version 1.4.8 of 25 February 2014
- Added a feature to Renumber Proof command. - Disallowed <*> and <+> in names of named proof steps. - Minor bug fixes to Toolbox and TLC. - Corrected definition of Tail in standard Sequences module.
Version 1.4.7 of 24 April 2013
Version 1.4.6 of 18 April 2013
Version 1.4.5 of 22 February 2013
Version 1.4.4 of 30 November 2012
Version 1.4.3.c of 24 May 2012
Version 1.4.3 of 10 April 2012
Version 1.4.2 of 17 February 2012
Version 1.4.1 of 19 January 2012
Version 1.4.0 of 16 September 2011
Version 1.3.1 of 5 April 2011
Version 1.2.1 of 2 October 2010
Version 1.1.2 of 6 May 2010
Version 1.1.1 of 22 Mar 2010
Version 1.1.0 of 4 February 2010
|


@import models.user.User @(title: String, user: Option[User] = None)(implicit lang: Lang) @main(title) { @navbar(user, Some("/labelingGuide/occlusion"))
@Html(Messages("labeling.guide.occlusion.summary"))
Another rare case when you should use the "Can't See the Sidewalk" label is when a long stretch of sidewalk is totally blocked from view by a short wall between the road and sidewalk. Label this using the same technique as for extended missing sidewalks.


Spending habits by Irish consumers on Black Friday revealed
by Jack QuannThe most popular time for shopping online on Black Friday is 10.00am.
That is according to a new survey from AIB, which examined people's shopping habits.
It found shoppers in Monaghan spent the most on clothing on Black Friday - while those in Tipperary spent the most (€118) on jewellery.
And shoppers in Sligo spent their money on electrical goods.
The data was compiled from over one million debit card transactions from Irish consumers, and has been anonymised and aggregated.
Speaking about the data, AIB's chief digital and innovation officer Fergal Coburn said: "These insights give us a real understanding as to how Irish consumers are spending their money.
"More recently we are seeing an increase in digital wallet usage, with more shoppers using Apple, Google or FitBit Pay to carry out their transactions.
"This year we have seen a trend in consumers using their digital wallets more as they reach for their phone over their card."
Apple, Fitbit and Google Pay allow shoppers to spend up to €5,000 with a tap of their device.
These accounted for 4% of all transactions last Black Friday and is expected to increase this year.
The spending data reveals that brick and mortar stills wins out - with 69% of us spending in store versus 31% online.
However, there is an increase in the volume of online spending during Black Friday compared with the previous Friday.
On Black Friday, online spend is up 216% and in store spending is up 46% compared with the previous week.
The data also reveals that 36% of us are shopping online on so-called Cyber Monday.
Looking at different types of goods, during Black Friday there was an increase of 285% in in-store spend and a 290% increase in online spend in electrical goods.
Jewellery saw an increase of 89% in store, but over triple the increase (275%) in online spend.
And there was an in-store increase of 104% in spending on clothes during Black Friday, and a fourfold increase (466%) in online spending.
In-store spend on health and beauty increased by 60% - while online spend increased by 234% for the segment.
During Black Friday last year, 41% of all transactions were carried out using contactless - while 2.7% were carried out using Apple Pay and 1.1% using Google Pay.