flowchart.Terminal¶
-
class
pyqtgraph.flowchart.
Terminal
(node, name, io, optional=False, multi=False, pos=None, renamable=False, removable=False, multiable=False, bypass=None)[source]¶ -
__init__
(node, name, io, optional=False, multi=False, pos=None, renamable=False, removable=False, multiable=False, bypass=None)[source]¶ Construct a new terminal.
Arguments: node the node to which this terminal belongs name string, the name of the terminal io ‘in’ or ‘out’ optional bool, whether the node may process without connection to this terminal multi bool, for inputs: whether this terminal may make multiple connections for outputs: whether this terminal creates a different value for each connection pos [x, y], the position of the terminal within its node’s boundaries renamable (bool) Whether the terminal can be renamed by the user removable (bool) Whether the terminal can be removed by the user multiable (bool) Whether the user may toggle the multi option for this terminal bypass (str) Name of the terminal from which this terminal’s value is derived when the Node is in bypass mode.
-
connected
(term)[source]¶ Called whenever this terminal has been connected to another. (note–this function is called on both terminals)
-
disconnected
(term)[source]¶ Called whenever this terminal has been disconnected from another. (note–this function is called on both terminals)
-
inputChanged
(term, process=True)[source]¶ Called whenever there is a change to the input value to this terminal. It may often be useful to override this function.
-


This criterion combines nn_log_softmax()
and nn_nll_loss()
in one single class.
It is useful when training a classification problem with C
classes.
nn_cross_entropy_loss(weight = NULL, ignore_index = -100, reduction = "mean")
| weight | (Tensor, optional): a manual rescaling weight given to each class.
If given, has to be a Tensor of size |
|---|---|
| ignore_index | (int, optional): Specifies a target value that is ignored
and does not contribute to the input gradient. When |
| reduction | (string, optional): Specifies the reduction to apply to the output:
|
If provided, the optional argument weight
should be a 1D Tensor
assigning weight to each of the classes.
This is particularly useful when you have an unbalanced training set.
The input
is expected to contain raw, unnormalized scores for each class.
input
has to be a Tensor of size either \((minibatch, C)\) or
\((minibatch, C, d_1, d_2, ..., d_K)\)
with \(K \geq 1\) for the K
-dimensional case (described later).
This criterion expects a class index in the range \([0, C-1]\) as the
target
for each value of a 1D tensor of size minibatch
; if ignore_index
is specified, this criterion also accepts this class index (this index may not
necessarily be in the class range).
The loss can be described as:
$$
\mbox{loss}(x, class) = -\log\left(\frac{\exp(x[class])}{\sum_j \exp(x[j])}\right)
= -x[class] + \log\left(\sum_j \exp(x[j])\right)
$$
or in the case of the weight
argument being specified:
$$
\mbox{loss}(x, class) = weight[class] \left(-x[class] + \log\left(\sum_j \exp(x[j])\right)\right)
$$
The losses are averaged across observations for each minibatch. Can also be used for higher dimension inputs, such as 2D images, by providing an input of size \((minibatch, C, d_1, d_2, ..., d_K)\) with \(K \geq 1\), where \(K\) is the number of dimensions, and a target of appropriate shape (see below).
Input: \((N, C)\) where C = number of classes
, or
\((N, C, d_1, d_2, ..., d_K)\) with \(K \geq 1\)
in the case of K
-dimensional loss.
Target: \((N)\) where each value is \(0 \leq \mbox{targets}[i] \leq C-1\), or \((N, d_1, d_2, ..., d_K)\) with \(K \geq 1\) in the case of K-dimensional loss.
Output: scalar.
If reduction
is 'none'
, then the same size as the target:
\((N)\), or
\((N, d_1, d_2, ..., d_K)\) with \(K \geq 1\) in the case
of K-dimensional loss.
# \dontrun{ loss <- nn_cross_entropy_loss() input <- torch_randn(3, 5, requires_grad=TRUE) target <- torch_randint(low = 1, high = 5, size = 3, dtype = torch_long()) output <- loss(input, target) output$backward() # }


I like to go camping with my brothers.
I have been camping all over we enjoy
alot of out door stuff so camping gives
easy access to jeeping, fishing, hiking,
hammocking etc...
| VideoGame | Hours | Wins/Kills |
| Starcraft 2 | 2284 | A lot |
| Overwatch | 553 | 994 Wins |
| Skyrim | 227 | Doesnt say |
| LOL | 12 | 7 |
| Minecraft | DUnno but too many | Alot of fricken creepers |
I like to go to the gym and workout.
I go 3 times a week. My favourite muscles
to workout are the big ones chest back and legs


rfc5766-turn-server - Revision 2020: /libevent.rpm
..
libevent-2.0.21-stable.tar.gz
libevent.spec
Google Code
powered by
Subversion


The Brunswick has been making headway as one of the city’s best roasts since it opened in 2015. They’ve been fine-tuning and perfecting it since then – and all their hard work has certainly paid off. You can get topside of beef for £13, chicken supreme for £12 or a nut roast for £11 – you can even swap your Yorkshire pudding for a vegan-friendly dose of sweet potato mash and olive oiled-carrots.All their roasts come with crispy roast potatoes, butter glazed carrots, sweetheart cabbage, gravy and a mini Bloody Mary.
Kirkstall Bridge Inn is famous for its roasts. Expect big, loaded plates of food, served up in a homely setting, beside the river. You can choose from three types of meat – roast lamb shoulder, British beef brisket slow-cooked with garlic and British roast pork (get there early for crackling). Whichever you choose, it’s £11.50 for adults or £5 for kids, and your plate will come loaded with all the trimmings.
 It’s hidden underground on Park Row – and it’s here that they cook up one of the most extravagant roasts in the city. It’s a two-course affair for £24.50, so you’ll start with the likes of salmon ceviche (or finish with pineapple carpaccio) – but the highlight is the roast itself. You can have roasted free-range chicken or roast sirloin of beef – it’s an extra £3.50 for the latter, but it’s what they do best, so go on, splash out. Whichever you choose, you’ll get broccoli, roast potatoes, carrots tossed in churrasco sauce and a plump Yorkshire pudding cooked in beef dripping, all doused in red wine gravy.
He’s the master of classic British food, but he puts his own stamp on it, so it stands to reason that Masterchef: The Professionals runner-up Matt Healy has branched out into roast dinners. This particular Sunday lunch comes in at £19.95, but you can expect him to take your favourite meal to new heights. For the meat-eaters, it’s 12-hour roasted beef sirloin and roast chicken, while veggies can snaffle a traditional mushroom wellington. They all come with roast potatoes, carrots, greens, cauliflower cheese and a Yorkshire pud, with their homemade gravy.
A proper old school pub that serves a proper Sunday dinner – The Adelphi is full of nooks and crannies, perfect for cosying up in. Order a pint, find yourself a spot and start the tricky task of deciding what to order. You can have 21-day aged sirloin of beef for £11.75, rosemary and garlic rubbed leg of lamb for £12.25 or orange & whiskey gammon joint for £10.75 – all with red wine jus. And if you fancy Shropshire roast chicken, you can get a half for £10.75 or a whole one to share for £19.50, both with gingerbread stuffing and chicken gravy. All their roasts come with beef dripping roasties, except the nut roast, which is served with baby potatoes and veggie gravy. You’ll also get homemade Yorkshire puddings, roasted vegetables and braised red cabbage.
The Cardigan Arms is a local institution that’s been brought back to life by Kirkstall Brewery. That means you have three irresistible reasons to go – the wonderful historic feel, the quality beer offering, and now, that cracking roast dinner. It’s served from 12pm to 5pm every Sunday and there’s something for everyone, all for £11.50. Their meats change every week, so you could have anything from thinly sliced topside of beef to roasted leg of lamb. They have a roasted root vegetable nut loaf for the veggies, and everyone gets roast potatoes, carrots, parsnips, savoy cabbage and what might well be the biggest Yorkshire pudding you’ve ever seen.


Notes-Lib
TicTacToe
VisualDewsStudio as a company wishes to bring good technology through the development of Android Applications.
/* about elechi evan*/
Lets get in touch and talk about what you like to expect from us.


| | |
- H_representation(input_file, output_file)
- Computes the convex hull of the set of vectors specified in input_file
and stores the resulting polyhedron in output_file.
:param input_file: the path where the vectors are stored
:type input_file: string
:param output_file: the path to the file where the convex hull is stored
:type output_file: string
conv(x_1,...,x_k) = A*P with
A = (x_1,...,x_k) in R^{n x k}
and P = { lambda in R^{k}| lambda_i >= 0, sum_{i = 1}^k lambda_i = 1 }
- add(B, C)
- Calculates D = B+C
:param B, C: vectors
:type B,C: lists containing floats
:return D: D = B+C
- base_case(P)
- P is a polyhedron in R^1, given by P = {x in R^1| a^T*x >=b}, a in R^m.
Check if P is empty, if so construct y such that y^T*a = 0 and y^T*b>0,
otherwise return x in P.
:param P: polyhedron in R^1
:type P: list of lists
:return: False, y if is empty, such that y^T*a = 0 and y^T*b > 0,
otherwise True, x such that x in P.
- compute_x_or_y(input_file)
- P is the polyhedron stored in path input_file. P in R^n, given by
P = {x in R^n| A*x >=b}, A in R^{m x n}.
Check if P is empty, if so construct y such that y^T*A = 0 and y^T*b>0,
otherwise return x in P.
:param P: polyhedron
:type P: list of lists
:return: False, y if is empty, such that y^T*A = 0 and y^T*b > 0,
otherwise True, x such that x in P.
- dimension_reduction(C)
- :param C: polyhedron in the form A|b in R^n.
:type C: list of lists
:return: B|b', (M, (row, cols)): B|b' is the projection of A|b in R^{n-1},
M is the sparse matrix such that B|0 = M * A, b' = M* b .
- image(input_polyhedron, input_matrix, output_file)
- Computes M*P = {M*x : x in P} and stores it in a file.
:param input_polyhedron: the path to the polyhedron
:type input_polyhedron: string
:param input_matrix: the path to the matrix M
:type input_matrix: string
:param output_file: the path where M*P is stored
:type output_file: string
- inner_product(a, b)
- Returns the inner product a^Tb
:param a, b: vectors
:type a, b: lists of floats
:returns: a^T *b
:rtype: c: float
- is_greater(a, b)
- Compares if a >= b.
:param a, b: vectors
:type a,b: lists of floats
:return: False if there is a component in b, such that
b_i > a_i, otherwise True.
- matrix_vector(C, b)
- Calculates c = C*b
:param C: a sparse matrix
:param b: a vector
:type b: list of floats
:returns: c
:rtype: c: list of floats
- multiply(s, B)
- Calculates C = s*B
:param s: a scalar
:type s: float
:param B: a vector
:type B: list of floats
:returns: C
- parse(file)
- Constructs a matrix A that contains the values from file.
:param file: contains the rows and columns of A
:type file: list of strings
:returns: A in case of a matrix, A|b in case of a polyhedron
:rtype: list of lists
- printmatrix(B)
- Prints the matrix B
- projection(input_file, k, output_file)
- Reads the polyhedron contained in input_file and returns the projection
of the polyhedron in k-dimensions.
:param input_file: the path to the file containing a polyhedron
:type input_file: string
:param k: the dimension in which the polyhedron is projected
:type k: int
:param output_file: the path where the projection is stored
:type output_file: string
- read(path)
- Reads the file located at path.
:param path: The path to the document that contains Matrix/Polyhedron
:type path: string
:returns: The matrix A that is contained in the file path.
:rtype: A is a list of lists
- step(P, x)
- Calculates a new component of x_{old}, such that x_{new} in P.
:param P: polyhedron in R^m
:type P: list of lists
:param x: a vector in R^{m-1}
:type x: list of floats
:return: x_{new}: a vector such that x_{new} in P
:rtype: x_{new}: list of floats
- test()
- test3(P, z)
- # Test if y^TA = 0 and y^Tb > 0
- test4(P, z)
- # Test if Ax >= b
- transpose(A)
- Transposes the matrix A.
:param A: matrix
:type A: list of lists
- transpose_sparse(M)
- Transposes the sparse matrix M. M is given as a tuple.
The first component contains a list of triples (values, row, column)
and the second component contains the shape of M as a tuple.
:Example: ([(value_1, row_1, colum_1 ),....], (#rows, #columns))
:param M: sparse matrix
:returns: M^T
- write(A, output_file)
- Writes the matrix A in the file output_file.
:param A: a matrix
:type A: list of list
:param output_file: Where we will store the output_file
:type output_file: string
|


Bottle of lotion led to evacuation of Florida airport
DAYTONA BEACH, Fla. (AP) — Sheriff’s investigators say a “suspicious package” flagged during the screening process at Florida’s Daytona Beach International Airport turned out to be a bottle of lotion.
The incident forced about 200 passengers and workers to evacuate the airport at about 6:15 a.m. on Tuesday. Airport officials gave an all-clear more than an hour later, resuming normal operations.
Volusia County Sheriff's Office posted a statement online thanking people for their patience and saying "the object of concern was a bottle of lotion."
Sheriff Mike Chitwood said during a news conference that the item was described as a possible detonator during the screening process. The bomb squad was called. Chitwood described the incident as "better safe than sorry."
Officials said two flights were delayed because of the evacuation.
___
Information from: WNDB-AM, http://www.wndb.am/


@import gospeak.core.domain.utils.Constants @import gospeak.core.services.upload.UploadConf @import gospeak.web.pages.partials.form.ImgConf @import gospeak.web.api.ui.routes.UtilsCtrl @import gospeak.web.utils.UserReq @(field: Field, conf: ImgConf)(implicit req: UserReq[AnyContent]) @req.conf.upload match { case _: UploadConf.Url => {


{% include head.html %}
{% include navigation.html %}
{{ content | to_scholmd | fluidify }}
{% include comments.html %}


Di den buu dien trung tam, diem mau vang
Toggle
Mode of Travel:
Driving
Walking
Bicycling
Transit
Chrome ko support localhost
By HTML5
Theo IP cua ISP -> bi sai kha lon
By Smart-IP
By MaxMind


This example shows how to transfer files between two remotely connected Clients
using the FileRef
API.
Drag and drop a file in the image drop when you are connected to a peer to transfer a file.
When the transfer is finished, then the image will be displayed on the peer's screen.
Open the 'log' window in the bottom right corner to see more details.


Biocur1851.github.io
Valleylab Force Triad Bedienungsanleitung herunterladen. LigaSure Impact™ with Nano Coating. A Comparison between old and new Impact device - Duration: 2:39. Medtronic Minimally Invasive Therapies Group 9,182 views. Valleylab Mode vs. Coag.m4v - YouTube. Soma Technology, Inc. on Instagram: “Medtronic Covidien. Iv ForceTriad User’s Guide Warranty Valleylab, a division of Tyco Healthcare Group LP, warrants each product manufactured by it to be free from defects in material and workmanship under. 10 Likes, 1 Comments - Soma Technology, Inc. (@somatechnology) on Instagram: “Medtronic Covidien Valleylab Force Triad https://www.somatechnology.com/blog/products. 아마존의 눈물 دموع البنات في الأمازون Amazon Tribe Documentary Part 4 Tears Of The Girls In Amazon AvanHn - Girl In Amazon 1,358 watching. ForceTriad Energy Platform - Frank s Hospital Workshop. ForceTriad Energy Platform - medtronic.com.
The Force TriVerse™electrosurgical device allows you to access the Valleylab™ mode for a unique combination of monopolar hemostasis and dissection while using a lower power setting resulting ForceTriad Energy Platform Customer Support Calibration Procedure Troubleshooting System Service Periodic Safety Check. Attention Covidien/Valleylab Force Triad Generator Owners!! If you recently attended a Covidien/Valleylab sponsored Force Triad Generator Service School, or if you are looking for details and specifics on what test equipment will be required to fully support, diagnose, and calibrate your Force Triad generators Find great deals on eBay for valley lab force. Shop with confidence.
ForceTriad Preventive Maintenance (PM) - Rigel Uni-Therm. Object Moved This document may be found. Attention Covidien/Valleylab Force Triad Generator Owners.
User’s Guide - Frank s Hospital Workshop.


8 writes to DebugOutputPipe
System.Management.Automation (8)
engine\hostifaces\Command.cs (1)
414
mcr.
DebugOutputPipe
= GetRedirectionPipe(toType, mcr);
engine\MshCommandRuntime.cs (1)
2188
this.
DebugOutputPipe
= fromRuntime.DebugOutputPipe;
engine\runtime\Operations\MiscOps.cs (6)
273
commandProcessor.CommandRuntime.
DebugOutputPipe
= context.ExpressionDebugOutputPipe;
301
commandProcessor.CommandRuntime.
DebugOutputPipe
= context.CurrentCommandProcessor.CommandRuntime.DebugOutputPipe;
945
commandProcessor.CommandRuntime.
DebugOutputPipe
= pipe;
960
commandProcessor.CommandRuntime.
DebugOutputPipe
= pipe;
1070
commandProcessor.CommandRuntime.
DebugOutputPipe
= pipe;
1092
commandProcessor.CommandRuntime.
DebugOutputPipe
= pipe;
7 references to DebugOutputPipe
System.Management.Automation (7)
engine\MshCommandRuntime.cs (5)
497
if (
DebugOutputPipe
!= null)
500
DebugOutputPipe
.NullPipe)
511
DebugOutputPipe
.Add(debugWrap);
2186
if (fromRuntime.
DebugOutputPipe
!= null)
2188
this.DebugOutputPipe = fromRuntime.
DebugOutputPipe
;
engine\runtime\Operations\MiscOps.cs (2)
299
context.CurrentCommandProcessor.CommandRuntime.
DebugOutputPipe
!= null)
301
commandProcessor.CommandRuntime.DebugOutputPipe = context.CurrentCommandProcessor.CommandRuntime.
DebugOutputPipe
;


Menu
BICYCLES
FIXED / SINGLE SPEED
CITY BIKES
PREMIMUN SERIES
PARTS
CHAINS
TUBES
TIRES
DISC BREAKS
ACCESSORIES
LOCKS
HELMETS
ARM COVERS
JERSEYS
EXTRAS
CLASSIC BELL
BOTTLE CAGE
TRUCK GRIP
BIKE-ACCESSORIES
home
/
parts
Bike Fenders
$7.00
Quick View
BUY NOW
Cycling Helmets
$50.00
Quick View
BUY NOW
Handle Grips
$200.00
Quick View
BUY NOW
Hydration Pack Black
$200.00
Quick View
BUY NOW
Electronics
$200.00
Quick View
BUY NOW
Bike Panniers
$200.00
Quick View
BUY NOW
Timbre Bell
$200.00
Quick View
BUY NOW
Back Stands
$200.00
Quick View
BUY NOW
Disc Breaks
$200.00
Quick View
BUY NOW
Side Stands
$200.00
Quick View
BUY NOW
Mountain Bike Shoes
$200.00
Quick View
BUY NOW
Body Armours
$200.00
Quick View
BUY NOW
Mountain Bags
$200.00
Quick View
BUY NOW
Bicycle Headlight
$200.00
Quick View
BUY NOW
Water Bottles
$200.00
Quick View
BUY NOW
Bicycle Mirrors
$200.00
Quick View
BUY NOW
Categories
Frames
Back Packs
Frame Bags
Panniers
Saddle Bags
Body Armour
Sub Category1
Sub Category2
Sub Category3
Tools
Sub Category1
Sub Category2
Sub Category3
Services
Sub Category1
Sub Category2
Sub Category3
Materials
Sub Category1
Sub Category2
Sub Category3
components
Frames(20)
Foks, Suspensions (48)
Breaks and Pedals (45)
Tires,Tubes,Wheels (45)
Serevice Parts(12)
Apparels
Locks (20)
Speed Cassette (5)
Bike Pedals (7)
Handels (2)
Other (50)
Brand
Lezyne
Marzocchi
EBC
Oakley
Jagwire
Yeti Cycles
Vee Rubber
Zumba
Price
$50.00 and Under (30)
$100.00 and Under (30)
$200.00 and Under (30)
$300.00 and Under (30)
$400.00 and Under (30)


Hello there, my name is Peter Smaal. I am a disciplined person that likes to work either in teams or individually to find solutions to problems. My way of thinking is very solution-orientated, which also means that I will never give up untill I have found the solution to a problem.
I take care of the stockroom. Other activities are refiling the products in the store, unloading and loading the supply truck and making sure the new products are seperated and sorted for the right isle.
As trainee at Van Rennes Industrial Automation my job was developing human machine interfaces and SCADA systems for remote dashboarding and controlling machines such as conveyors. These dashboards were meant for the clients and for the maintenance workers of Van Rennes.
My job as a sales assistant for Pearle Opticiens was to help people in the store to find the right new glasses for them. Repairing broken glasses was also a part of my job.
The things I like to do during my free time are sports, playing music, gaming and hanging out with friends. I try to go to the gym when I have free time. Next to sports I play the guitar almost everyday. I've always wanted to be a professional at playing the guitar I'm not there quite yet though. I like to spend my weekends with friends, drinking a beer and socializing with them.
During this project we worked in groups of 2 people. The goal of the project was to create a simulation of an electric furnace using an arduino with buttons, LED's and a digital number board. The pits of the furnace were selected using the buttons and the heat could be turned up and down. It also had a child lock functionality, meaning if you pressed the button you could not use any other buttons anymore. By turning the pits on or of you activated the LED appointed to that pit. This LED would turn brighter or less bright when the heat was changed.
Click here to view the project page that includes all project files and a video.This project was worked on in a group of 3 people. The goal of the project was to program a Parallax Robot so it could navigate itself by using sensors to detect walls and obstacles. The sensors used in this project were an ultrasonic sensor and infrared sensors.
Click here to view the project page that includes all project files.This project is personally one of my favorites because it involved a lot of programming. During this project we were working in groups of 4 with the SCRUM method. The goal of the project was to program a functional ATM system (Not with real money). It did have to be able to dispose "money". The money dispenser was built with lego and servo's to push out the "bills". The back- and frontend were completely written in Java. Using Jason to talk with the database. Sadly the one that made the website for this project deleted it but the files and videos can be found with the links below.
Click here to view the project's files (Final Software release is in the "Periode 4 folder")This project was done in a group of 3 people. During the project we worked with SCRUM. For this project we had to get up with our own idea. Our idea was to create an atomated window that would close when it rained and open when the temperature was too high or the humidity was too high. We also made a user interface for the final product so the window was able to be controlled manually.
Click here to view the project's files and a video.


Focus next element in the series (maxlength)
(
)
-
Focus next element in the series (missing maxlength)
A JavaScript error gets thrown if the maxlength attribute is missing
-
-
Form field max lengths
(3 char limit)
(200 char limit)


Syntax Highlighting and Error Highlighting
The class used to specify how a particular range of text should be highlighted is called
TextAttributesKey
.
An instance of this class is created for every distinct type of item which should be highlighted (keyword, number, string and so on).
The
TextAttributesKey
defines the default attributes which are applied to items of the corresponding type (for example, keywords are bold, numbers are blue, strings are bold and green).
The mapping of the
TextAttributesKey
to specific attributes used in an editor is defined by the
EditorColorsScheme
class, and can be configured by the user if the plugin provides an appropriate configuration interface.
Highlighting from multiple
TextAttributesKey
items can be layered - for example, one key may define an item’s boldness and another its color.
Note: New functionality about Language Defaults and support for additional color schemes as detailed in Color Scheme Management.
The syntax and error highlighting is performed on multiple levels: Lexer, Parser and (External) Annotator.
Lexer
The first level of syntax highlighting is based on the lexer output, and is provided through the
SyntaxHighlighter
interface.
The syntax highlighter returns the
TextAttributesKey
instances for each token type which needs special highlighting.
For highlighting lexer errors, the standard
TextAttributesKey
for bad characters
HighlighterColors.BAD_CHARACTER
can be used.
Examples:
SyntaxHighlighter
implementation for Properties language plugin- Custom Language Support Tutorial: Syntax Highlighter
Parser
The second level of error highlighting happens during parsing.
If a particular sequence of tokens is invalid according to the grammar of the language, the
PsiBuilder.error()
method can be used to highlight the invalid tokens and display an error message showing why they are not valid.
Annotator
The third level of highlighting is performed through the
Annotator
interface.
A plugin can register one or more annotators in the com.intellij.annotator
extension point, and these annotators are called during the background highlighting pass to process the elements in the PSI tree of the custom language.
Annotators can analyze not only the syntax, but also the semantics using PSI, and thus can provide much more complex syntax and error highlighting logic.
The annotator can also provide quick fixes to problems it detects.
When the file is changed, the annotator is called incrementally to process only changed elements in the PSI tree.
To highlight a region of text as a warning or error, the annotator calls createErrorAnnotation()
or createWarningAnnotation()
on the
AnnotationHolder
object passed to it, and optionally calls registerFix()
on the returned
Annotation
object to add a quick fix for the error or warning.
To apply additional syntax highlighting, the annotator can call
AnnotationHolder.createInfoAnnotation()
with an empty message and then call
Annotation.setTextAttributes()
to specify the text attributes key for the highlighting.
Examples:
External tool
Finally, if the custom language employs external tools for validating files in the language (for example, uses the Xerces library for XML schema validation), it can provide an implementation of the
ExternalAnnotator
interface and register it in com.intellij.externalAnnotator
extension point.
The
ExternalAnnotator
highlighting has the lowest priority and is invoked only after all other background processing has completed.
It uses the same
AnnotationHolder
interface for converting the output of the external tool into editor highlighting.
Color settings
The plugin can also provide a configuration interface to allow the user to configure the colors used for highlighting specific items.
In order to do that, it should provide an implementation of
ColorSettingPage
and register it in the com.intellij.colorSettingsPage
extension point.
The Export to HTML feature uses the same syntax highlighting mechanism as the editor, so it will work automatically for custom languages which provide a syntax highlighter.
Examples:
ColorSettingsPage
for Properties language plugin- Custom Language Support Tutorial: Color Settings Page


Scuba Time is now Loading....
JavaScript must be enabled to use this app. For more information check your browser documentation.


The tick event checks the first text box to detect if the value is over zero. If so, trigger the animation, and listen for the finish event. On finish, increment the value in the second text box.


| Vessel | Status | Heading | Last Update |
| Howe Sound Queen | Temporarily Off Line | N/A | 3:48 PM |
| Each arrow icon represents one of our vessels. To view vessel name, heading and speed, move your cursor over the arrow icon. When is displayed, the ship is in port. Vessels not appearing on this map are either not yet in operation or are temporarily off line. |


This manual is for GNU CGDB (version 0.6.7, 14 January 2013), the GNU ncurses based front end to GDB.
Copyright © 2013 CGDB Team
This document is part of a free software program; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston MA 02111-1307 USA
CGDB is a curses-based interface to the GNU Debugger (GDB). The goal of CGDB is to be lightweight and responsive; not encumbered with unnecessary features.
The interface is designed to deliver the familiar GDB text interface, with a split screen showing the source as it executes. The UI is modeled on the classic Unix text editor, vi. Those familiar with vi should feel right at home using CGDB.
The library responsible for communicating with GDB is called Trivial GDB (tgdb, or more accurately, libtgdb). This abstraction allows the UI code to be independent of the debugger, as well as greatly simplifying its implementation.
Those wanting to develop other interfaces to GDB are welcome to use libtgdb as the basis for their program. Many of the headaches of parsing GDB's output and annotations can be avoided by using it.
Some features offered by CGDB are:
This chapter discusses how to start CGDB, and how to get out of it. The essentials are:
The CGDB user interface currently consists of two windows and a status bar. The source window is currently on the top and the GDB window is on the bottom. The status bar currently separates the two windows.
The interface has several modes depending on which window is focused. CGDB mode is when the source window is focused, GDB mode is when the GDB window is focused and TTY mode is when the TTY window is focused.
Beginning with CGDB version 1.0, the windows are movable, and the user will be able to create as many or as few that is desired. Currently however, all of my time is spent developing the interface between CGDB and GDB. Once this is complete, the UI of CGDB will become much more polished. If you are a ncurses developer, and have spare time to work on this task, please contact me.
The source window is the window that provides you a view of the source
code that the debugged program is made up of. It will display to the user a
single source file at a time. While the user is debugging, via next
and step
, CGDB will update the source file and line number to keep you
informed as to where GDB is debugging.
CGDB has several features that make debugging easier than using plain old GDB. One feature you will notice right away while debugging a C, C++ or ADA program, is that the source files are syntax highlighted. This allows the user to easily navigate through the source file to look for certain places in the source code. If you would like to see another source language highlighted, contact us. To understanding how to navigate through the source window look at the commands in CGDB Mode.
In addition to showing the source code, CGDB also displays to the user the
currently executing line. The line number will be highlighted green, to
represent that the particular line, is the current line being debugged by GDB.
Also, CGDB will display an arrow extending from the line number, to the
source line. You can configure what type of arrow CGDB uses with the
:set arrowstyle
configuration option. By default, the short
arrow is used. However, my personal favorite is the long
arrow.
As you navigate through the source window, the current line the cursor is on will be highlighted white. This simply helps you keep track of where you are in the file.
Also, you can set or delete breakpoints in CGDB from the source window. Simply navigate to the line that you are interested in setting a breakpoint, and hit the space bar. This will set a breakpoint on the line if one did not already exist. The line number should turn red to indicate that a breakpoint has been set. Hitting the space bar again will delete the breakpoint. If you disable the breakpoint, the line number will turn yellow, to represent the disabled breakpoint.
CGDB also supports regular expression searching within the source window. If you type / or ? you can search in the source window for a string of interest. The C library regular expression functions are used to perform this search, which honors things like ‘*’ or ‘+’.
The full list of commands that are available in the source window is in CGDB Mode.
The GDB window is how CGDB allows the user to interface with the GNU debugger. If you wish to pass a command to GDB, simply type it into this window and GDB will receive the command. This interface is intended to be 100% identical to using GDB on a terminal.
There is a limited set of keys that can be typed into this window that CGDB interprets and handles, instead of sending to GDB. They are all available in GDB Mode.
CGDB attempts to buffer commands the same way they would be if you typed them at the terminal. So, if you type several commands before a single one finishes, they will each be run in order. There will be no way to stop these commands from being run besides from typing Ctrl-C, like you would at any normal terminal when working with GDB.
The file dialog window is available to help the user view and select which file they would like to view. It provides the user with a list of all the files that make up the program being debugged. If there are no files available, because there is no program being debugged or because there is no debug symbols, then the file dialog will not open and a message will be displayed at the status bar.
You can get to the file dialog by hitting o
when you are at the source
window. Once you enter the file dialog, it is possible to leave it by hitting
q
. You can navigate the file dialog using the standard direction keys
and you can even use regular expression to find your file. This can save a
lot of time as the number of files grow.
The full list of commands that are available in the source window is in File Dialog Mode.
The TTY window is available to allow the user to pass input to the program being debugged. This window will act similar to the GDB window, except that the data you type will get sent to the program being debugged. See Sending I/O to Inferior.
You will notice that the TTY window has a terminal device between it and the program being debugged. So, if the program being debugged uses say readline, which allows command line editing, the same interface will be provided via the TTY window as at the terminal. You can see the name of the terminal device in the TTY status bar.
The full list of commands that are available in the source window is in TTY Mode.
Sending I/O to the program being debugged can be confusing. It is described better in Sending I/O to Inferior. Unless the I/O with the program being debugged is simple, I usually prefer starting the application on a separate terminal and attaching to it with CGDB.
The status bar is the general purpose way for CGDB to show the user which commands they are currently typing or report errors to the user when they occur. CGDB does not use popup's or other forms of I/O to alert the user of information or problems.
While CGDB is running, you can configure it with any of the commands that
are valid in CGDB's configuration file. Simply type : in the source
window, and you will see the colon, and the rest of the command you type
appear in the status bar. When you are finished typing the command that
you are interested in, type enter
. This will alert CGDB to execute
the command. If at any point you would like to cancel the current
command typed so far, type the cgdb mode key. This will put you back
into CGDB mode. For a description of the cgdb mode key, see
Switching Windows.
The full list of commands that are available in the source window is in Configuring CGDB.
When CGDB is invoked, the interface is in GDB mode. A ‘*’ at the right of the status bar indicates that input will be passed to GDB. To change the focus to the source window, hit the <ESC> key. The cgdb mode key is the key that is responsible for switching the user into CGDB mode from a different mode. The cgdb mode key is defaulted to the <ESC> key. To change this value, look at the configuration options for CGDB. See Configuring CGDB.
The interface is now in CGDB mode. To switch back into GDB mode, press i. This syntax is based on the popular Unix text-editor, vi.
CGDB can be controlled in a variety of different ways. Each mode that CGDB is in acts differently. Currently CGDB implicitly changes modes depending on which window is active. The following information will help you determine what commands are accessible during which modes.
When you are in the source window, you are implicitly in CGDB mode. All of the below commands are available during this mode. This mode is primarily available for the user to view the current source file, search it, or switch to a different mode.
When in GDB mode, the user is mostly interested in working with the GDB console. That is, sending commands to GDB and receiving data back from GDB. Almost all data passed into this window is directly sent to readline and then to GDB.
It is important to understand that CGDB parses the keys entered in the GDB window and has the first chance at dealing with them. If it is interested in the keys, it will handle them. Below is a list of keys that CGDB is interested in, and does not pass along any further.
Any other keys, besides the ones above, CGDB is currently not interested in. CGDB will pass along these keys to the readline library. When readline has determined that a command has been received, it alerts CGDB, and a command is then sent to GDB. This is the same method used when invoking GDB directly.
The file dialog is primarily used to allow the user to find and open a source
file that the program they are debugging is made up of. The file dialog will
be full screen, and will list each file that the debugged program is made up
of. A usual instance of the file dialog would be to open it up from the
source window using the o key, and then to search for the file of
interest. If you are looking for foo.c type /foo.c
, press enter
once to finish the regular expression and again to select the file.
The commands available in the file dialog are:
There may be several features that you find useful in CGDB. CGDB is capable of automating any of these commands through the use of the config file called cgdbrc. It looks in $HOME/.cgdb/ for that file. If it exists, CGDB executes each line in the file in order. It is as if the user typed in all the commands into the status bar after the tui was initialized.
The following variables change the behavior of some aspect of CGDB. Many of these commands may be abbreviated in some way, and all boolean commands my be negated by appending ‘no’ to the front. For example: :set ignorecase turns on case-insensitive searching; while :set noignorecase turns on case-sensitive searching.
set cgdbmodekey=<PageUp>
then the Page Up key will put CGDB into CGDB mode and the ESC
key will flow through to readline.
You can give as many or as few of the name=value pairs as you wish, in any order. ‘ctermfg’ and ‘ctermbg’ set the foreground and background colors. These can be specified by color number or by using the same color names that vim uses. When CGDB is linked with ncurses, the number you use to represent the color can be between -1 and COLORS. When CGDB is linked against curses, it must be between 0 and COLORS.
‘cterm’ sets the video attributes for color terminals. ‘term’ sets the video attributes for monochrome terminals. Some examples are,
:highlight Logo cterm=bold,underline ctermfg=Red ctermbg=Black :highlight Normal cterm=reverse ctermfg=White ctermbg=Black :hi Normal term=bold
:map a<Space>b foo
then the user could delete the
existing mapping with :unmap a<Space>b
.
:imap a<Space>b foo
then the user could delete the
existing mapping with :iunmap a<Space>b
.
CGDB is capable of using colors if the terminal it is run in supports them. Until version 0.6.1, CGDB did not allow the user to configure these colors in any way. CGDB color use is now fully configurable.
CGDB's modeled its use of color highlighting after vim. Any data that will be colored in the terminal is represented by a highlighting group. A highlighting group represents data that should be formatted using foreground colors, background colors and attributes. There are currently several types of highlighting groups in CGDB. There are syntax highlighting groups, which represent syntax highlighting of sources files. There are also User Interface groups, which represent things like CGDB's logo, or the status bar.
Each highlighting group has a default set of attributes and colors associated with it. You can modify a highlighting groups properties by using the highlight command. See Configuring CGDB.
Note that CGDB currently supports using the same background color the terminal was using before CGDB was started. However, this only works when CGDB was linked with ncurses. If you link CGDB with curses, then CGDB will force the background to Black.
Below is a list of all the highlighting groups that CDGB will use when syntax highlighting source files.
Statement
Type
Constant
Comment
PreProc
Normal
Below is a list of all the highlighting groups that CGDB will use when it is displaying it's User Interface.
StatusLine
IncSearch
Arrow
LineHighlight
arrowstyle
option
set to highlight
.
Breakpoint
DisabledBreakpoint
SelectedLineNr
Logo
CGDB supports many of the attributes that curses provides. It will apply the attributes to the output window, but it is up to the terminal you are using to support such features.
The list of attributes that CGDB currently supports is below.
normal
NONE
bold
underline
reverse
inverse
standout
blink
dim
CGDB supports several colors, depending on how many colors your terminal supports. Below is a chart of the colors that CGDB provides. The heading NR-16 is used to represent terminals that support at least 16 colors. The heading NR-8 is used to represent terminals that support at least 8 colors. The integer values for each color represent the values passed to the curses function init_pair() to ask curses to create a new color.
COLOR NAME
| NR-16
| NR-8
| NR-8 bold attribute
|
| Black | 0 | 0 | No
|
| DarkBlue | 1 | 4 | No
|
| DarkGreen | 2 | 2 | No
|
| DarkCyan | 3 | 6 | No
|
| DarkRed | 4 | 1 | No
|
| DarkMagenta | 5 | 5 | No
|
| Brown, DarkYellow | 6 | 3 | No
|
| LightGray, LightGrey, Gray, Grey | 7 | 7 | No
|
| DarkGray, DarkGrey | 8 | 0 | Yes
|
| Blue, LightBlue | 9 | 4 | Yes
|
| Green, LightGreen | 10 | 2 | Yes
|
| Cyan, LightCyan | 11 | 6 | Yes
|
| Red, LightRed | 12 | 1 | Yes
|
| Magenta, LightMagenta | 13 | 5 | Yes
|
| Yellow, LightYellow | 14 | 3 | Yes
|
| White | 15 | 7 | Yes
|
The Key User Interface is how CGDB receives input from the user. It is usually referred to as the KUI. CGDB simply asks the KUI for the next key the user typed and the KUI will provide it.
The KUI has 2 major responsibilities besides reading normal user input and providing it to CGDB. It needs to detect when the user has typed a user defined map or when the user has hit a special key on the keyboard.
A user defined map, or simply map, is used to change the meaning
of typed keys. Some users may refer to this type of functionality as a
macro. An example would be map a b
. If the user then typed
the <a> character, the KUI would detect that it was mapped to <b>
and return <b> to CGDB.
When the user types a special key on the keyboard, a key code is sent to CGDB. Typically, keys like HOME, DEL, <F1>, etc, when pressed will send several characters to the application instead of just one character like a normal key does. These characters combined are called a key sequence. The KUI is responsible for assembling the key sequences back together and reporting to CGDB that a particular key was typed by the user. The ESC key is special because typically most key codes start with that key. This usually gives all key codes a common first key in its key sequence. The KUI uses the terminfo database to determine what key sequences are sent by which keycodes. There are a few commonly used key sequences that are hard coded into CGDB.
A major challenge the KUI has to overcome is determining when a map or a
key sequence is received. The KUI sometimes will need to read more than
one character to determine this. For example, if the user has 2 maps,
map abc def
and map abd def
, the KUI would have to buffer at
least the characters <a> and <b> before it could determine if the
user was going to type a map. After the next key press, if the user types
<c> or <d> then a map was received and the KUI will return
d e f to CGDB. Otherwise, no map was received and the KUI must return
a b to CGDB.
The options timeout, ttimeout, timeoutlen and ttimeoutlen can be used to tell the KUI if it should timeout on partial mappings or key sequences, and if so, how long it should wait before timing out.
The KUI may be configured to time out on either maps or key sequences.
When the KUI is matching a partial map or key sequence it is capable of timing out. This means it will simply accepts the keys it has received so far if a certain amount of time elapses between key presses. This is obvious when the user is typing a map because the user must press each key individually. For partial key sequences, this is less obvious. That is because the user only presses a single key, but multiple characters are sent to CGDB. The table below describes how the user can configure the KUI to time out on key codes or maps. The timeout and ttimeout options control this functionality.
| timeout | ttimeout | action
|
|---|---|---|
| off | off | do not time out
|
| on | on or off | time out on maps and key codes
|
| off | on | time out on key codes
|
It is also possible to tell the KUI how long to wait before timing out on a partial match. If timeout is on, then the KUI will wait a certain amount of time for the next character, when matching a map, before it decides a match is no longer possible. If timeout or ttimeout is on, then the KUI will wait a certain amount of time for the next character, when matching a key sequence, before it decides a match is no longer possible. The timeoutlen and ttimeoutlen options can be configured by the user to tell the KUI how long to wait before timing out. The table below describes when the KUI uses which option.
| timeoutlen | mapping delay | key code delay
|
|---|---|---|
| < 0 | timeoutlen | timeoutlen
|
| >= 0 | timeoutlen | ttimeoutlen
|
A value of 0 means that the KUI will time out right away. It will not be possible to match a map or key code in this circumstance.
A common problem could be that when the user types a special key like
the left or right arrows, CGDB will go into the source mode and not
perform the action requested by the user. This typically means that the
key code delay is to small. If you try setting the option
set ttimeoutlen=1000
CGDB should start acting like the user expects.
If not, please report this to the CGDB mailing list.
CGDB fully supports the use of maps. It allows the user to change the
meaning of typed keys. For example, you could have the following map
:map <F2> ip<Space>argc<CR>
.
When the user is in CGDB mode and they hit <F2>, the value of the map will be used instead. The i key will first be received by CGDB, and it will put the user into insert mode. Next, CGDB will get p argc followed by the <Enter> key.
CGDB currently supports two mapping lists. Any mapping that was added with the map command will be used by CGDB when it is in CGDB mode. You can delete a mapping that you have created with the map command with the unmap command. If you want to have mappings in GDB mode, you can use the imap command. Similarly, iunmap will delete a mapping in the imap set. Some examples of this would be
map a<Space>b foo unmap a<Space>b imap a<CR>b foo iunmap a<CR>b
The above example could use a little more explaining for people unfamiliar with vim maps. The map takes a key and a value. They are separated by a space. Neither the key or value can have a space in them, or it is considered to be the separator between the key and value. If the user desires to have a space in either the key or value part of a map, they can use the keycode notation <Space>. Below is a table of the keycodes in keycode notation form. The keycode notation can be used in any mapping command.
| notation | meaning
|
|---|---|
| <Esc> | escape key
|
| <Up> | cursor up key
|
| <Down> | cursor down key
|
| <Left> | cursor left key
|
| <Right> | cursor right key
|
| <Home> | home key
|
| <End> | end key
|
| <PageUp> | page up key
|
| <PageDown> | page down key
|
| <Del> | delete key
|
| <Insert> | insert key
|
| <Nul> | zero
|
| <Bs> | backspace key
|
| <Tab> | tab key
|
| <NL> | linefeed
|
| <FF> | formfeed
|
| <CR> | carriage return
|
| <Space> | space
|
| <Lt> | less-than
|
| <Bslash> | backslash
|
| <Bar> | vertical bar
|
| <F1> - <F12> | function keys 1 to 12
|
| <C-...> | control keys
|
| <S-...> | shift keys
|
If the program being debugged takes input on the terminal it is recommended that the user start the program on one terminal, and attach to it with CGDB from another terminal. This is the easiest way to pass input to the debugged program.
However, if the user wishes to pass input to the program being debugged from within CGDB, there is a mechanism available for doing so. As of this writing, the technique described below does not work on windows, using a natively compiled GDB. It may work when using the GDB that comes with Cygwin.
This technique is similar to getting in and out of GDB mode. The tty window is not visible by default. This is because it is only needed if the user wishes to send data to the program being debugged. To display the tty window, hit T while in command mode. After hitting T you will notice that there is another window in the middle of the source window and the gdb window. This is called the tty window. You will also see a new status bar called the tty status bar. There will be a ‘*’ on the tty status bar after the T was hit. This is because when the window is opened with the T command, CGDB automatically puts the user into TTY mode. To get out of this window hit the cgdb mode key. This will put you back into command mode. To make the tty window appear and disappear hit the T key while in command mode. It is a toggle.
Once the tty window is already open, the user can then hit I in command mode to get into TTY mode. The user can then hit the cgdb mode key in the TTY mode to get back into command mode.
When the tty window is open, all data that comes from the program, goes there. Any data typed into the tty window will ONLY go to the program being debugged. It will not go to GDB. When the tty window is closed, all output from the debugged program will go to the GDB window AND to the tty window (for viewing later when the tty window is opened).
If the user wishes to get a new tty for the program being debugged then they can type Ctrl-T. This will delete all the buffered data waiting to be read into the debugged program. This might be useful when you rerun or start a new program.
A user can typically set there control flow behavior by using the stty
command like so stty -ixon -ixoff
. This will disable control flow on
the terminal where CGDB is started. If you want to turn control flow back
on you can type stty ixon ixoff
. If flow control is on, when the user
types Ctrl-s, the terminal stops. When the user types Ctrl-q, the
terminal restarts. When using readline, the Ctrl-s character usually does
a forward search. So, if you want to get this, or other functionality out of
readline, simply turn off control flow and start CGDB.
Building CGDB from source requires several packages. First, CGDB is hosted at http://sf.net/projects/cgdb. You can determine how to get CGDB from source by looking here: http://sourceforge.net/svn/?group_id=72581.
Once you have the source to CGDB, now you can begin to build it. You will of course need many packages to build CGDB. Below is a list of all of them that are required to build CGDB.
GNU Make
GNU GCC
GNU Readline
GNU Ncurses
Below is a list of optional packages you will need, if modifying certain files in CGDB.
GNU Flex
.l
, you will have to have
flex installed. I have used flex 2.5.4 to build CGDB.
GNU Texinfo
help2man
make cgdb.1
, and the CGDB man page will be generated.
CGDB uses autoconf/automake to build its configure scripts and makefiles. So, if you change any of the autoconf/automake files, you will need this software installed.
GNU Automake
GNU Autoconf
GNU m4
Copyright © 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software—to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and “any later version”, you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
one line to give the program's name and a brief idea of what it does. Copyright (C) yyyy name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands ‘show w’ and ‘show c’ should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than ‘show w’ and ‘show c’; they could even be mouse-clicks or menu items—whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a “copyright disclaimer” for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.


layout: true class: animated fadeIn middle numbers .footnote[ `IPS-PROD` - N. Dubray - ENSIIE - 2022 - [:book:](../index.html) ] --- # Valgrind ## Key points * `Valgrind` is a **virtual machine** * it uses JIT compilation techniques * it allows to easily instrument binary code (with or without debug symbols) * there is no need to source access nor recompilation * it provides different tools for binary code profiling * it is language-agnostic * it has a **huge impact** on execution times (x20) ## Tools provided * `Memcheck`: default tool, checks validity, adressability, memory leaks... * `None`: get the traceback of a segfault * `Helrind`: detects race conditions in multithreaded code * `Callgrind`: logs and profiles the function call tree * `Cachegrind`: profiles cache use * `exp-sgcheck`, `exp-dhat`, `exp-bbv`, etc... .block[ * Repository: [https://sourceware.org/git/?p=valgrind.git](https://sourceware.org/git/?p=valgrind.git) * Website: [http://valgrind.org](http://valgrind.org) * License: `GPLv2` ] --- # Valgrind - Memcheck example ## .hcenter[test.c] ```C #include "stdlib.h" #include "stdio.h" #define SIZE 3 int main(int argc, char **argv) { int* table = (int*)malloc(sizeof(int) * SIZE); for (int i = 0; i < SIZE; i++) { table[i] = i; } for (int i = 0; i <= SIZE; i++) { printf("table[%d]=%d\n", i, table[i]); } return 0; } ``` ## .hcenter[Shell session] ```shell $ gcc test.c -o test $ ./test table[0]=0 table[1]=1 table[2]=2 table[3]=0 ``` --- # Valgrind - Memcheck example ## .hcenter[Shell session] ```shell $ valgrind ./test ==6434== Memcheck, a memory error detector ==6434== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==6434== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==6434== Command: ./test ==6434== *table[0]=0 *table[1]=1 *table[2]=2 ==6434== Invalid read of size 4 ==6434== at 0x108756: main (in /home/dubrayn/temp/ensiie/lectures/tools/gdb/test) ==6434== Address 0x520104c is 0 bytes after a block of size 12 alloc'd ==6434== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6434== by 0x108708: main (in /home/dubrayn/temp/ensiie/lectures/tools/gdb/test) ==6434== *table[3]=0 ==6434== ==6434== HEAP SUMMARY: ==6434== in use at exit: 12 bytes in 1 blocks ==6434== total heap usage: 2 allocs, 1 frees, 1,036 bytes allocated ==6434== ==6434== LEAK SUMMARY: ==6434== definitely lost: 12 bytes in 1 blocks ==6434== indirectly lost: 0 bytes in 0 blocks ==6434== possibly lost: 0 bytes in 0 blocks ==6434== still reachable: 0 bytes in 0 blocks ==6434== suppressed: 0 bytes in 0 blocks ==6434== Rerun with --leak-check=full to see details of leaked memory ==6434== ==6434== For counts of detected and suppressed errors, rerun with: -v ==6434== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ``` --- # Valgrind - Memcheck example ## .hcenter[Shell session] ```shell $ valgrind ./test ==6434== Memcheck, a memory error detector ==6434== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==6434== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==6434== Command: ./test ==6434== table[0]=0 table[1]=1 table[2]=2 ==6434== Invalid read of size 4 ==6434== at 0x108756: main (in /home/dubrayn/temp/ensiie/lectures/tools/gdb/test) ==6434== Address 0x520104c is 0 bytes after a block of size 12 alloc'd ==6434== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6434== by 0x108708: main (in /home/dubrayn/temp/ensiie/lectures/tools/gdb/test) ==6434== table[3]=0 ==6434== ==6434== HEAP SUMMARY: ==6434== in use at exit: 12 bytes in 1 blocks ==6434== total heap usage: 2 allocs, 1 frees, 1,036 bytes allocated ==6434== ==6434== LEAK SUMMARY: ==6434== definitely lost: 12 bytes in 1 blocks ==6434== indirectly lost: 0 bytes in 0 blocks ==6434== possibly lost: 0 bytes in 0 blocks ==6434== still reachable: 0 bytes in 0 blocks ==6434== suppressed: 0 bytes in 0 blocks ==6434== Rerun with --leak-check=full to see details of leaked memory ==6434== ==6434== For counts of detected and suppressed errors, rerun with: -v *==6434== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ``` --- # Valgrind - Memcheck example ## .hcenter[Shell session] ```shell $ valgrind ./test ==6434== Memcheck, a memory error detector ==6434== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==6434== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==6434== Command: ./test ==6434== table[0]=0 table[1]=1 table[2]=2 *==6434== Invalid read of size 4 *==6434== at 0x108756: main (in /home/dubrayn/temp/ensiie/lectures/tools/gdb/test) *==6434== Address 0x520104c is 0 bytes after a block of size 12 alloc'd *==6434== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) *==6434== by 0x108708: main (in /home/dubrayn/temp/ensiie/lectures/tools/gdb/test) ==6434== table[3]=0 ==6434== ==6434== HEAP SUMMARY: ==6434== in use at exit: 12 bytes in 1 blocks ==6434== total heap usage: 2 allocs, 1 frees, 1,036 bytes allocated ==6434== ==6434== LEAK SUMMARY: ==6434== definitely lost: 12 bytes in 1 blocks ==6434== indirectly lost: 0 bytes in 0 blocks ==6434== possibly lost: 0 bytes in 0 blocks ==6434== still reachable: 0 bytes in 0 blocks ==6434== suppressed: 0 bytes in 0 blocks ==6434== Rerun with --leak-check=full to see details of leaked memory ==6434== ==6434== For counts of detected and suppressed errors, rerun with: -v ==6434== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ``` --- # Valgrind - Memcheck example ## .hcenter[Shell session] ```shell $ valgrind ./test ==6434== Memcheck, a memory error detector ==6434== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==6434== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==6434== Command: ./test ==6434== table[0]=0 table[1]=1 table[2]=2 ==6434== Invalid read of size 4 ==6434== at 0x108756: main (in /home/dubrayn/temp/ensiie/lectures/tools/gdb/test) ==6434== Address 0x520104c is 0 bytes after a block of size 12 alloc'd ==6434== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6434== by 0x108708: main (in /home/dubrayn/temp/ensiie/lectures/tools/gdb/test) ==6434== table[3]=0 ==6434== ==6434== HEAP SUMMARY: *==6434== in use at exit: 12 bytes in 1 blocks ==6434== total heap usage: 2 allocs, 1 frees, 1,036 bytes allocated ==6434== ==6434== LEAK SUMMARY: *==6434== definitely lost: 12 bytes in 1 blocks ==6434== indirectly lost: 0 bytes in 0 blocks ==6434== possibly lost: 0 bytes in 0 blocks ==6434== still reachable: 0 bytes in 0 blocks ==6434== suppressed: 0 bytes in 0 blocks ==6434== Rerun with --leak-check=full to see details of leaked memory ==6434== ==6434== For counts of detected and suppressed errors, rerun with: -v ==6434== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ``` --- # Valgrind - Memcheck example ## .hcenter[test.c] ```C #include "stdlib.h" #include "stdio.h" #define SIZE 3 int main(int argc, char **argv) { int* table = (int*)malloc(sizeof(int) * SIZE); for (int i = 0; i < SIZE; i++) { table[i] = i; } for (int i = 0; i <= SIZE; i++) { printf("table[%d]=%d\n", i, table[i]); } return 0; } ``` ## .hcenter[Shell session] ```shell *$ gcc -g test.c -o test $ ./test table[0]=0 table[1]=1 table[2]=2 table[3]=0 ``` --- # Valgrind - Memcheck example ## .hcenter[Shell session] ```shell $ valgrind ./test =6522== Memcheck, a memory error detector ==6522== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==6522== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==6522== Command: ./test ==6522== table[0]=0 table[1]=1 table[2]=2 ==6522== Invalid read of size 4 *==6522== at 0x108756: main (test.c:17) ==6522== Address 0x520104c is 0 bytes after a block of size 12 alloc'd ==6522== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6522== by 0x108708: main (test.c:8) ==6522== table[3]=0 ==6522== ==6522== HEAP SUMMARY: ==6522== in use at exit: 12 bytes in 1 blocks ==6522== total heap usage: 2 allocs, 1 frees, 1,036 bytes allocated ==6522== ==6522== LEAK SUMMARY: ==6522== definitely lost: 12 bytes in 1 blocks ==6522== indirectly lost: 0 bytes in 0 blocks ==6522== possibly lost: 0 bytes in 0 blocks ==6522== still reachable: 0 bytes in 0 blocks ==6522== suppressed: 0 bytes in 0 blocks ==6522== Rerun with --leak-check=full to see details of leaked memory ==6522== ==6522== For counts of detected and suppressed errors, rerun with: -v ==6522== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ``` --- # Valgrind - Memcheck example ## .hcenter[test.c] ```C #include "stdlib.h" #include "stdio.h" #define SIZE 3 int main(int argc, char **argv) { int* table = (int*)malloc(sizeof(int) * SIZE); for (int i = 0; i < SIZE; i++) { table[i] = i; } for (int i = 0; i <= SIZE; i++) { * printf("table[%d]=%d\n", i, table[i]); } return 0; } ``` ## .hcenter[Shell session] ```shell $ gcc -g test.c -o test $ ./test table[0]=0 table[1]=1 table[2]=2 table[3]=0 ``` --- # Valgrind - Memcheck example ## .hcenter[Shell session] ```shell $ valgrind ./test =6522== Memcheck, a memory error detector ==6522== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==6522== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==6522== Command: ./test ==6522== table[0]=0 table[1]=1 table[2]=2 ==6522== Invalid read of size 4 ==6522== at 0x108756: main (test.c:17) ==6522== Address 0x520104c is 0 bytes after a block of size 12 alloc'd ==6522== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6522== by 0x108708: main (test.c:8) ==6522== table[3]=0 ==6522== ==6522== HEAP SUMMARY: ==6522== in use at exit: 12 bytes in 1 blocks ==6522== total heap usage: 2 allocs, 1 frees, 1,036 bytes allocated ==6522== ==6522== LEAK SUMMARY: ==6522== definitely lost: 12 bytes in 1 blocks ==6522== indirectly lost: 0 bytes in 0 blocks ==6522== possibly lost: 0 bytes in 0 blocks ==6522== still reachable: 0 bytes in 0 blocks ==6522== suppressed: 0 bytes in 0 blocks *==6522== Rerun with --leak-check=full to see details of leaked memory ==6522== ==6522== For counts of detected and suppressed errors, rerun with: -v ==6522== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ``` --- # Valgrind - Memcheck example ## .hcenter[Shell session] ```shell *$ valgrind --leak-check=full ./test ==6554== Memcheck, a memory error detector ==6554== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==6554== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==6554== Command: ./test ==6554== table[0]=0 table[1]=1 table[2]=2 ==6554== Invalid read of size 4 ==6554== at 0x108756: main (test.c:17) ==6554== Address 0x520104c is 0 bytes after a block of size 12 alloc'd ==6554== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6554== by 0x108708: main (test.c:8) ==6554== table[3]=0 ==6554== ==6554== HEAP SUMMARY: ==6554== in use at exit: 12 bytes in 1 blocks ==6554== total heap usage: 2 allocs, 1 frees, 1,036 bytes allocated ==6554== *==6554== 12 bytes in 1 blocks are definitely lost in loss record 1 of 1 *==6554== at 0x4C2DB2F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) *==6554== by 0x108708: main (test.c:8) ==6554== ==6554== LEAK SUMMARY: ==6554== definitely lost: 12 bytes in 1 blocks ==6554== indirectly lost: 0 bytes in 0 blocks ==6554== possibly lost: 0 bytes in 0 blocks ==6554== still reachable: 0 bytes in 0 blocks ==6554== suppressed: 0 bytes in 0 blocks ==6554== ==6554== For counts of detected and suppressed errors, rerun with: -v ==6554== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) ``` --- # Valgrind - Memcheck example ## .hcenter[test.c] ```C #include "stdlib.h" #include "stdio.h" #define SIZE 3 int main(int argc, char **argv) { * int* table = (int*)malloc(sizeof(int) * SIZE); for (int i = 0; i < SIZE; i++) { table[i] = i; } for (int i = 0; i <= SIZE; i++) { printf("table[%d]=%d\n", i, table[i]); } return 0; } ``` ## .hcenter[Shell session] ```shell $ gcc -g test.c -o test $ ./test table[0]=0 table[1]=1 table[2]=2 table[3]=0 ``` --- # Valgrind - Memcheck example ## .hcenter[test.c] ```C #include "stdlib.h" #include "stdio.h" #define SIZE 3 int main(int argc, char **argv) { int* table = (int*)malloc(sizeof(int) * SIZE); for (int i = 0; i < SIZE; i++) { table[i] = i; } * for (int i = 0; i < SIZE; i++) { printf("table[%d]=%d\n", i, table[i]); } * free(table); return 0; } ``` ## .hcenter[Shell session] ```shell $ gcc -g test.c -o test $ ./test table[0]=0 table[1]=1 table[2]=2 ``` --- # Valgrind - Memcheck example ## .hcenter[Shell session] ```shell $ valgrind ./test ==6614== Memcheck, a memory error detector ==6614== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==6614== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==6614== Command: ./test ==6614== table[0]=0 table[1]=1 table[2]=2 ==6614== ==6614== HEAP SUMMARY: *==6614== in use at exit: 0 bytes in 0 blocks ==6614== total heap usage: 2 allocs, 2 frees, 1,036 bytes allocated ==6614== *==6614== All heap blocks were freed -- no leaks are possible ==6614== ==6614== For counts of detected and suppressed errors, rerun with: -v *==6614== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ``` ## Other detectable bugs * use of uninitialized values (with `--track-origins=yes`) * declaration of unused variables * invalid write * use of free'd resource --- # Valgrind - Conclusions :+: can easily locate some common (but specific) bugs :+: no need to recompile :+: no need to have source access :+: can be used everywhere (CLI) :warning: can not detect everything (static array overflow...) :warning: huge impact on performances :warning: slightly verbose ? :arrow_right: **My advice:** Strange bug ? Segfault ? Unexpected behavior ? **Valgrind !!!** No excuse. .hcenter.w90[![](images/xkcd_722.png)] .hcenter[[source: xkcd](https://xkcd.com/722)] :arrow_right: Nothing visible with **Valgrind** ? Time to move to... **GDB** !


Class MixedRealityToolkit
This class is responsible for coordinating the operation of the Mixed Reality Toolkit. It is the only Singleton in the entire project. It provides a service registry for all active services that are used within a project as well as providing the active profile for the project. The ActiveProfile can be swapped out at any time to meet the needs of your project.
Implements
Inherited Members
Namespace: XRTK.Services
Assembly: XRTK.dll
Syntax
[ExecuteInEditMode]
[DisallowMultipleComponent]
public sealed class MixedRealityToolkit : MonoBehaviour, IDisposable
Properties
| Improve this Doc View SourceActivePlatforms
The list of active platforms detected by the MixedRealityToolkit.
Declaration
public static IReadOnlyList<IMixedRealityPlatform> ActivePlatforms { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<IMixedRealityPlatform> |
ActiveProfile
The public property of the Active Profile, ensuring events are raised on the change of the reference
Declaration
public MixedRealityToolkitRootProfile ActiveProfile { get; set; }
Property Value
| Type | Description |
|---|---|
| MixedRealityToolkitRootProfile |
ActiveSystems
Current active systems registered with the MixedRealityToolkit.
Declaration
public static IReadOnlyDictionary<Type, IMixedRealitySystem> ActiveSystems { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyDictionary<Type, IMixedRealitySystem> |
Remarks
Systems can only be registered once by Type and are executed in a specific priority order.
AvailablePlatforms
The list of active platforms detected by the MixedRealityToolkit.
Declaration
public static IReadOnlyList<IMixedRealityPlatform> AvailablePlatforms { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<IMixedRealityPlatform> |
HasActiveProfile
Checks if there is a valid instance of the MixedRealityToolkit, then checks if there is there a valid Active Profile.
Declaration
public static bool HasActiveProfile { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Instance
Returns the Singleton instance of the classes type. If no instance is found, then we search for an instance in the scene. If more than one instance is found, we log an error and no instance is returned.
Declaration
public static MixedRealityToolkit Instance { get; }
Property Value
| Type | Description |
|---|---|
| MixedRealityToolkit |
IsApplicationQuitting
Flag stating if the application is currently attempting to quit.
Declaration
public static bool IsApplicationQuitting { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
IsInitialized
Returns whether the instance has been initialized or not.
Declaration
public static bool IsInitialized { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Modules
The list of active xrtk modules/packages currently loaded into runtime.
Declaration
public static List<Tuple<string, Version>> Modules { get; }
Property Value
| Type | Description |
|---|---|
| List<Tuple<String, Version>> |
RegisteredMixedRealityServices
Local service registry for the Mixed Reality Toolkit, to allow runtime use of the IMixedRealityService.
Declaration
public static IReadOnlyList<Tuple<Type, IMixedRealityService>> RegisteredMixedRealityServices { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<Tuple<Type, IMixedRealityService>> |
Remarks
Services can have one or more instances registered and can be executed simultaneously. Best to get them out by name or guid.
Methods
| Improve this Doc View SourceAssertIsInitialized()
Expose an assertion whether the MixedRealityToolkit class is initialized.
Declaration
public static void AssertIsInitialized()
DisableAllServiceOfType<T>()
Disable all services in the Mixed Reality Toolkit active service registry for a given type
Declaration
public static void DisableAllServiceOfType<T>()
where T : IMixedRealityService
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the system to be enabled. E.G. InputSystem, BoundarySystem |
DisableService<T>(String)
Disable a single service by name.
Declaration
public static void DisableService<T>(string serviceName)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| String | serviceName | Name of the specific service |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the system to be enabled. E.G. InputSystem, BoundarySystem |
Dispose()
Dispose the MixedRealityToolkit object.
Declaration
public void Dispose()
EnableAllServicesOfType<T>()
Enable all services in the Mixed Reality Toolkit active service registry for a given type
Declaration
public static void EnableAllServicesOfType<T>()
where T : IMixedRealityService
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the system to be enabled. E.G. InputSystem, BoundarySystem |
EnableService<T>(String)
Enables a single service by name.
Declaration
public static void EnableService<T>(string serviceName)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| String | serviceName |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the system to be enabled. E.G. InputSystem, BoundarySystem |
Finalize()
Declaration
protected void Finalize()
GetActiveServices<T>()
Retrieve all services from the Mixed Reality Toolkit active service registry for a given type and an optional name
Declaration
public static List<T> GetActiveServices<T>()
where T : IMixedRealityService
Returns
| Type | Description |
|---|---|
| List<T> | An array of services that meet the search criteria |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the system to be retrieved. E.G. InputSystem, BoundarySystem. |
GetService<T>(Boolean)
Retrieve a IMixedRealityService from the RegisteredMixedRealityServices.
Declaration
public static T GetService<T>(bool showLogs = true)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | showLogs | Should the logs show when services cannot be found? |
Returns
| Type | Description |
|---|---|
| T | The instance of the IMixedRealityService that is registered. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the service to be retrieved. |
GetService<T>(String, Boolean)
Retrieve a IMixedRealityService from the RegisteredMixedRealityServices by name.
Declaration
public static T GetService<T>(string serviceName, bool showLogs = true)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| String | serviceName | Name of the specific service to search for. |
| Boolean | showLogs | Should the logs show when services cannot be found? |
Returns
| Type | Description |
|---|---|
| T | The instance of the IMixedRealityService that is registered. |
Type Parameters
| Name | Description |
|---|---|
| T |
GetServiceAsync<T>(Int32)
Retrieve a IMixedRealityService from the RegisteredMixedRealityServices.
Declaration
public static Task<T> GetServiceAsync<T>(int timeout = 10)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | timeout | Optional, time out in seconds to wait before giving up search. |
Returns
| Type | Description |
|---|---|
| Task<T> | The instance of the IMixedRealityService that is registered. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the service to be retrieved. |
GetSystem<T>()
Retrieve a IMixedRealityService from the ActiveSystems.
Declaration
public static T GetSystem<T>()
where T : IMixedRealitySystem
Returns
| Type | Description |
|---|---|
| T | The instance of the IMixedRealitySystem that is registered. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the system to be retrieved. |
GetSystemAsync<T>(Int32)
Retrieve a IMixedRealityService from the ActiveSystems.
Declaration
public static Task<T> GetSystemAsync<T>(int timeout = 10)
where T : IMixedRealitySystem
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | timeout | Optional, time out in seconds to wait before giving up search. |
Returns
| Type | Description |
|---|---|
| Task<T> | The instance of the IMixedRealitySystem that is registered. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the system to be retrieved. |
IsServiceRegistered<T>()
Query the RegisteredMixedRealityServices for the existence of a IMixedRealityService.
Declaration
public static bool IsServiceRegistered<T>()
where T : IMixedRealityService
Returns
| Type | Description |
|---|---|
| Boolean | Returns true, if there is a IMixedRealityService registered, otherwise false. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the service to be retrieved. |
IsSystemEnabled<T>(MixedRealityToolkitRootProfile)
Is the IMixedRealitySystem enabled in the ActiveProfile?
Declaration
public static bool IsSystemEnabled<T>(MixedRealityToolkitRootProfile rootProfile = null)
where T : IMixedRealitySystem
Parameters
| Type | Name | Description |
|---|---|---|
| MixedRealityToolkitRootProfile | rootProfile | Optional root profile reference. |
Returns
| Type | Description |
|---|---|
| Boolean | True, if the system is enabled in the ActiveProfile, otherwise false. |
Type Parameters
| Name | Description |
|---|---|
| T | IMixedRealitySystem to check. |
IsSystemRegistered<T>()
Query RegisteredMixedRealityServices for the existence of a IMixedRealitySystem.
Declaration
public static bool IsSystemRegistered<T>()
where T : IMixedRealitySystem
Returns
| Type | Description |
|---|---|
| Boolean | Returns true, if there is a IMixedRealitySystem registered, otherwise false. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the IMixedRealitySystem to be retrieved. |
ResetProfile(MixedRealityToolkitRootProfile)
When a profile is replaced with a new one, force all services to reset and read the new values
Declaration
public void ResetProfile(MixedRealityToolkitRootProfile profile)
Parameters
| Type | Name | Description |
|---|---|---|
| MixedRealityToolkitRootProfile | profile |
TryCreateAndRegisterDataProvider<T>(IMixedRealityServiceConfiguration<T>, IMixedRealityService)
Creates a new instance of a data provider and registers it to the Mixed Reality Toolkit service registry for the specified platform.
Declaration
public static bool TryCreateAndRegisterDataProvider<T>(IMixedRealityServiceConfiguration<T> configuration, IMixedRealityService serviceParent)
where T : IMixedRealityDataProvider
Parameters
| Type | Name | Description |
|---|---|---|
| IMixedRealityServiceConfiguration<T> | configuration | The IMixedRealityServiceConfiguration<T> to use to create and register the data provider. |
| IMixedRealityService | serviceParent | The IMixedRealityService that the IMixedRealityDataProvider will be assigned to. |
Returns
| Type | Description |
|---|---|
| Boolean | True, if the service was successfully created and registered. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the IMixedRealityService to be registered. |
TryCreateAndRegisterService<T>(Type, out T, Object[])
Creates a new instance of a service and registers it to the Mixed Reality Toolkit service registry for the specified platform.
Declaration
public static bool TryCreateAndRegisterService<T>(Type concreteType, out T service, params object[] args)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| Type | concreteType | The concrete class type to instantiate. |
| T | service | If successful, then the new IMixedRealityService instance will be passed back out. |
| Object[] | args | Optional arguments used when instantiating the concrete type. |
Returns
| Type | Description |
|---|---|
| Boolean | True, if the service was successfully created and registered. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the IMixedRealityService to be registered. |
TryCreateAndRegisterService<T>(Type, IReadOnlyList<IMixedRealityPlatform>, out T, Object[])
Creates a new instance of a service and registers it to the Mixed Reality Toolkit service registry for the specified platform.
Declaration
public static bool TryCreateAndRegisterService<T>(Type concreteType, IReadOnlyList<IMixedRealityPlatform> runtimePlatforms, out T service, params object[] args)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| Type | concreteType | The concrete class type to instantiate. |
| IReadOnlyList<IMixedRealityPlatform> | runtimePlatforms | The runtime platform to check against when registering. |
| T | service | If successful, then the new IMixedRealityService instance will be passed back out. |
| Object[] | args | Optional arguments used when instantiating the concrete type. |
Returns
| Type | Description |
|---|---|
| Boolean | True, if the service was successfully created and registered. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the IMixedRealityService to be registered. |
TryCreateAndRegisterService<T>(IMixedRealityServiceConfiguration<T>, out T)
Creates a new instance of a service and registers it to the Mixed Reality Toolkit service registry for the specified platform.
Declaration
public static bool TryCreateAndRegisterService<T>(IMixedRealityServiceConfiguration<T> configuration, out T service)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| IMixedRealityServiceConfiguration<T> | configuration | The IMixedRealityServiceConfiguration<T> to use to create and register the service. |
| T | service | If successful, then the new IMixedRealityService instance will be passed back out. |
Returns
| Type | Description |
|---|---|
| Boolean | True, if the service was successfully created and registered. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the IMixedRealityService to be registered. |
TryGetService<T>(out T, Boolean)
Retrieve a IMixedRealityService from the RegisteredMixedRealityServices.
Declaration
public static bool TryGetService<T>(out T service, bool showLogs = true)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| T | service | The instance of the service class that is registered. |
| Boolean | showLogs | Should the logs show when services cannot be found? |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if the IMixedRealityService was found, otherwise false. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the service to be retrieved. |
TryGetService<T>(String, out T, Boolean)
Retrieve a IMixedRealityService from the RegisteredMixedRealityServices by name.
Declaration
public static bool TryGetService<T>(string serviceName, out T service, bool showLogs = true)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| String | serviceName | Name of the specific service to search for. |
| T | service | The instance of the service class that is registered. |
| Boolean | showLogs | Should the logs show when services cannot be found? |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if the IMixedRealityService was found, otherwise false. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the service to be retrieved. |
TryGetSystem<T>(out T)
Retrieve a IMixedRealitySystem from the ActiveSystems.
Declaration
public static bool TryGetSystem<T>(out T system)
where T : IMixedRealitySystem
Parameters
| Type | Name | Description |
|---|---|---|
| T | system | The instance of the system class that is registered. |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if the IMixedRealitySystem was found, otherwise false. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the system to be retrieved. |
TryGetSystemProfile<TSystem, TProfile>(out TProfile, MixedRealityToolkitRootProfile)
Try to get the
Declaration
public static bool TryGetSystemProfile<TSystem, TProfile>(out TProfile profile, MixedRealityToolkitRootProfile rootProfile = null)
where TSystem : IMixedRealitySystem where TProfile : BaseMixedRealityProfile
Parameters
| Type | Name | Description |
|---|---|---|
| TProfile | profile | The profile instance. |
| MixedRealityToolkitRootProfile | rootProfile | Optional root profile reference. |
Returns
| Type | Description |
|---|---|
| Boolean | True if a |
Type Parameters
| Name | Description |
|---|---|
| TSystem | The IMixedRealitySystem type to get the |
| TProfile | The BaseMixedRealityProfile type to get for the |
TryRegisterDataProviderConfigurations<T>(IMixedRealityServiceConfiguration<T>[], IMixedRealityService)
Registers all the IMixedRealityDataProviders defined in the provided configuration collection.
Declaration
public static bool TryRegisterDataProviderConfigurations<T>(IMixedRealityServiceConfiguration<T>[] configurations, IMixedRealityService serviceParent)
where T : IMixedRealityDataProvider
Parameters
| Type | Name | Description |
|---|---|---|
| IMixedRealityServiceConfiguration<T>[] | configurations | The list of IMixedRealityServiceConfiguration<T>s. |
| IMixedRealityService | serviceParent | The IMixedRealityService that the IMixedRealityDataProvider will be assigned to. |
Returns
| Type | Description |
|---|---|
| Boolean | True, if all configurations successfully created and registered their data providers. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the IMixedRealityDataProvider to be registered. |
TryRegisterService<T>(IMixedRealityService)
Add a service instance to the Mixed Reality Toolkit active service registry.
Declaration
public static bool TryRegisterService<T>(IMixedRealityService serviceInstance)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| IMixedRealityService | serviceInstance | Instance of the IMixedRealityService to register. |
Returns
| Type | Description |
|---|---|
| Boolean | True, if the service was successfully registered. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the IMixedRealityService to be registered. |
TryRegisterServiceConfigurations<T>(IMixedRealityServiceConfiguration<T>[])
Registers all the IMixedRealityServices defined in the provided configuration collection.
Declaration
public static bool TryRegisterServiceConfigurations<T>(IMixedRealityServiceConfiguration<T>[] configurations)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| IMixedRealityServiceConfiguration<T>[] | configurations | The list of IMixedRealityServiceConfiguration<T>s. |
Returns
| Type | Description |
|---|---|
| Boolean | True, if all configurations successfully created and registered their services. |
Type Parameters
| Name | Description |
|---|---|
| T | The interface type for the IMixedRealityService to be registered. |
TryUnregisterService<T>(T)
Removes a specific service with the provided name.
Declaration
public static bool TryUnregisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| T | serviceInstance | The instance of the IMixedRealityService to remove. |
Returns
| Type | Description |
|---|---|
| Boolean |
Type Parameters
| Name | Description |
|---|---|
| T |
TryUnregisterService<T>(String)
Removes a specific service with the provided name.
Declaration
public static bool TryUnregisterService<T>(string serviceName)
where T : IMixedRealityService
Parameters
| Type | Name | Description |
|---|---|---|
| String | serviceName | The name of the service to be removed. (Only for runtime services) |
Returns
| Type | Description |
|---|---|
| Boolean |
Type Parameters
| Name | Description |
|---|---|
| T |
TryUnregisterServicesOfType<T>()
Remove all services from the Mixed Reality Toolkit active service registry for a given type
Declaration
public static bool TryUnregisterServicesOfType<T>()
where T : IMixedRealityService
Returns
| Type | Description |
|---|---|
| Boolean |
Type Parameters
| Name | Description |
|---|---|
| T |


Info
General information about the repat family.
- Name
- (optional) A short, name of the family.
Examples: MIR, AluJ, Charlie2b.
- Title
- A short title or description for the family. Shown on the
Browse page as the family Description. Shown on the family page as a subtitle
under the Name.
Example: "Non-autonomous Internal region of HERV52, LTR52-int
subfamily."
- Description
- A longer, publicly visible description of the family.
Appropriate for details such as similarities to other families, explanations
of function or structure, and other interesting facts.
- Classification
- The hierarchical classification of the family.
Both generic ("LINE", "LTR", "SINE") and specific ("Zenon", "Helitron-1",
"tRNA_Promoter;Deu-core;L2-end") classifications are available.
- Taxa
- Clade(s) the family belongs to. This is usually a single
clade at which the repeat was introduced into the genome, except in the case
of horizontal transfer between lineages. Dfam searches and visualizations
assume the repeat family might be present in all descendants of the specified
clade(s). Adding or removing clades from this list will lead to corresponding
species being removed from graphs and statistics in the next full database
release.
Search Options
Metadata that changes how the family is searched by Dfam and RepeatMasker.
- Disabled
- Disabled families are not visible on the website, not
exported in data formats such as HMM or EMBL, nor are they counted in
statistics or adjudication. However they are not deleted: they are still
accessible via public database releases and can be un-disabled easily.
- Search Stages
- Used by RepeatMasker. This affects when
the repeat family is cut or masked in relation to other repeat families.
- Buffer Stages
- Used by RepeatMasker. See the RepeatMasker
paper for more details.
Curation Details
Dfam-specific details about the family's curation status and history.
- Curation Status
- The state of the family record in Dfam. Families
usually move from Submitted to either Accepted or Rejected, and from Accepted
to Released.
- Length
- The length in nucleotides of the family's seed alignment,
consensus sequence, and HMM.
- Target Site Duplication
- The target site duplication for this
family, if it is known. Expressed as nucleotide bases.
Examples: 'NNNNNNNN', 'TATGC'
- Curation Notes
- Additional context for the family. These notes are
not displayed on the website on in exported data formats such as HMM or EMBL,
but they are accessible via public database releases.
References
References to external sources with additional or alternative information
about the same family.
- Citations
- References to articles where the family has been
published, discussed, or described. Currently only accepts PubMed IDs.
- Aliases
- References to the same family in other databases.
Source
The origination and provenance of the family.
- Submitter
- The original uploader of the family to Dfam.
- Author(s)
- The authors of the family.