this is a paragraph
this is a paragraph
Avoid losing floppy disks with important school/work projects on them. Use the web to keep your content so you can access it from anywhere in the world. It's also a quick way to write reminders or notes to yourself. With simple html skills, (the ones you have gained so far) it is easy. Avoid losing floppy disks with important school/work projects on them. Use the web to keep your contentsobyo can access it from anywhere in the world. It's also a quick way to write reminders or notes to yourself.
With simple html skills, (the ones you have gained so far) it is easy For instance, let's sayyou had a HUGE school or work project to complete. Off hand, the easiest way to transfer the documents from your house could be a 3.5" floppy disk. However, there is an alternative. Place your documents, photos, essays, or videos onto your web server and access them from anywhere in the worldFor instance let's say you had a HUGE school or work project to complete. Off hand, the easiest way to transfer the documents from your house could be a 3.5" floppy disk. However, there is an alternative.
Place your documents, photos, essays, or videos onto your web server and access them from anywhere in the world


PiggyTutorials's documentation page includes the configuration documentation.
PiggyTutorials is a simple plugin to create a tutorial for your server.PiggyTutorials has been discontinued - it will no longer recieve any updates.
array
integer


Watches
Timepiece
$15,995
Buy
Road Rage
$7995
Buy
Air Queen
$10,995
Buy
Restless
$5995
Buy
Milton Submariner
$4995
Buy
P.A. Explorer
$5995
Buy
Luminor Flyback
$12,995
Buy
DW Clockwork
$5995
Buy
Curren Day-Date
$9995
Buy


Parameter file¶
Parameter file syntax¶
The parameter file is split up to blocks of parameters. Each parameter block begins with a line
# Block: BLOCKNAME
Anything in the parameter file followed by a #
sign is taken to be a comment, except for the block
name definitions. Block name definitions begin with a #
followed by the word Block
, a colon and then the
actual name of the block.
Block names are followed by the lines containing the parameters and their values. Each parameter definition contains three parts, name of the parameter, value and some explanatory comment:
PARAMETER_NAME = PARAMETER_VALUE # PARAMETER_DESCRIPTION
Long expressions and comments can be broken into multiple lines with a backslash (\) at the end of of the broken line.
In reality a parameter block for the radiation sources can looks like this:
# -----------------------------------------------------------------------------
# Block: Radiation sources
# -----------------------------------------------------------------------------
incl_cont_stellarsrc = False # # Switches on (True) or off (False) continuous stellar sources )
incl_disc_stellarsrc = True # # Switches on (True) or off (False) discrete stellar sources)
mstar = [1.0*ms] # # Mass of the star(s)
pstar = [0.0, 0.0, 0.0] # # Position of the star(s) (cartesian coordinates)
rstar = [2.0*rs] # # Radius of the star(s)
tstar = [4000.0] # # Effective temperature of the star(s) [K]
List of blocknames
Radiation sources
Grid parameters
Dust opacity
Gas line RT
Code parameters
Model
These block-names should not be modified as the reader function will look for these strings.
Radiation sources¶
incl_disc_stellarsrc : listSwitches on (True) or off (False) discrete stellar radiation sources. mstar : listMass of the star. Each element of the list contains the mass of an individual star as a float. pstar : listCoordinates of the star. Each element of the list contains a three element vector containing the 3D cartesian coordinates of each individual star. rstar : listStellar radius. Each element of the list contains the radius of an individual star as a float. tstar : listEffective temperature. Each element of the list contains the effective temperature of an individual star as a float. incl_cont_stellarsrc : listSwitches on (True) or off (False) continuous stellar radiation sourcesNOTE, the model should have the appropriate functions (getStellarsrcDensity(), getStellarsrcTemplates())
Grid¶
crd_sys : {‘sph’, ‘car’}Coordinate system type nw : listNumber of wavelength points in the wavelength grid,nw[i]
sets the number of grid points in the[wbound[i], wbound[i+1])
interval (or on the[wbound[-2], wbound[-1]]
for the last interval) nx : listNumber of grid cells in the first spatial coordinate,nx[i]
sets the number of grid points in the[xbound[i], xbound[i+1])
interval (or on the[xbound[-2], xbound[-1]]
for the last interval) ny : listNumber of grid cells in the second spatial coordinate,ny[i]
sets the number of grid points in the[ybound[i], ybound[i+1])
interval (or on the[ybound[-2], ybound[-1]]
for the last interval) nz : listNumber of grid cells in the third spatial coordinate,nz[i]
sets the number of grid points in the[zbound[i], zbound[i+1])
interval (or on the[zbound[-2], zbound[-1]]
for the last interval) wbound : listBoundaries of the wavelength grid xbound : listBoundaries of the spatial grid in the first coordinate,nx[i]
sets the number of grid points in the[xbound[i], xbound[i+1])
interval (or on the[xbound[-2], xbound[-1]]
for the last interval) xres_nlev : floatRadial grid refinement in spherical coordinate system xres_nspan : floatRadial grid refinement in spherical coordinate system xres_nstep : intRadial grid refinement in spherical coordinate system ybound : listBoundaries of the spatial grid in the second coordinate,ny[i]
sets the number of grid points in the[ybound[i], ybound[i+1])
interval (or on the[ybound[-2], ybound[-1]]
for the last interval) zbound : listBoundaries of the spatial grid in the third coordinate,nz[i]
sets the number of grid points in the[zbound[i], zbound[i+1])
interval (or on the[zbound[-2], zbound[-1]]
for the last interval)
Separable mesh refinement¶
Spatial and wavelength grid definitions allow ‘separable mesh refinement’, i.e. refinement of the wavelength or the spatial mesh along individual axes. Let us take now the wavelength grid for an example. If we wish to cover the \(10^{-2}-10^4\mu{\rm m}\) interval with 200 grid points we should set
wbound = [0.01, 1e4]
andnw = [200]
. This results in a logarithmic wavelength grid betweenwbound[0]
andwbound[1]
containingnw[0]
grid points. This wavelenght grid might be fine enough to sample the radiation field of the sources and the thermal emission of the dust in the model, but too coarse to study e.g. the shape of the silicate features in the mid-infrared. If we are interested in the silicate feature around \(10\mu{\rm m}\) only, we can refine this region in the wavelength grid by settingwbound = [0.01, 7.5, 13.5, 1e4]
andnw = [50,100,50]
. This grid setup will result in 50, 100, 50 grid points in the \([0.01\mu{\rm m},7.5\mu{\rm m})\), \([7.5\mu{\rm m},13.5\mu{\rm m})\) , \([13.5\mu{\rm m},10^4\mu{\rm m}]\) intervals, respectively.Note, the number of grid points are defined always on a right-open interval, except in the last, rightmost interval, where the interval is closed.
Grid refinement at the inner boundary¶
Even for logarithmic radial grids the innermost parts of the model can still be optically thick for centrally concentrated density distributions. With the use of thexres_nlev
,xres_nspan
andxres_nstep
parameters we can introduce additional grid refinement in the radial grid of a spherical coordinate system. The grid refinement is done in the following way. First a logarithmic radial grid is set up on the basis of thenx
andxbound
parameters. Then the interval between the innermost cell interface and thexres_nspan
th cell interface (i.e.xres_nspan
-1 grid cell) will be taken and split intoxres_nlev
grid cells. Then the innermost grid cell will be split intoxres_nlev
‘new’ grid cells, then again the innermost, refined grid cell will be taken and split intoxres_nlev
cells. The splitting of the innermost cell will be donexres_nstep
times.
Dust opacity¶
dustkappa_ext : strFile name tag in the dust opacity file. Dust opacity files should have names like e.g.,dustkappa_EXT.inp
, where thedustkappa_ext
parameter should contain the ‘EXT’ tags from the file name (e.g. fordustkappa_ext = 'silicate'
the dust opacity file should bedustkappa_silicate.inp
. gdens : floatBulk density of the material gsdist_powex : floatGrain size distribution power exponent gsmax : floatMaximum grain size in the distribution gsmin : floatMinimum grain size in the distribution lnk_fname : listFile name list (including full path) containing optical constants (NOTE, the file should contain three columns: wavelength [micron], n, k) mixabun : listIf multiple species specified their mass absorption coefficients can be mixed according to the mixing ratios (mass fractions) in mixabun. ngs : floatNumber of grain sizes in the grain size distribution
Gas lines¶
gasspec_colpart_abun : floatAbundance of the collisional partner gasspec_colpart_name : floatName of the collisional partner gasspec_mol_abun : floatMolecular abundance gasspec_mol_dbase_type : {‘leiden’, ‘linelist’}Database type of the molecular data (see the RADMC-3D manual for the definitions of various formats). gasspec_mol_name : strName of the molecular species whose lines should be calculated
Code¶
istar_sphere : intIf 0 discrete stars are taken to be point-like, if 1 the finite extent of the star is taken into account itemdecoup : intAllows (0) or prevents (1) the decoupling of the temperature of different dust species lines_mode : intLine mode (for the definitions of the individual line modes see the RADMC-3D manual):
- 1 - LTE
- 2 - User-defined populations I
- 3 - LVG populations
- 4 - Optically thin NLTE level populations method
- 5 - User-defined populations II
nphot : intNumber of photons in the thermal Monte Carlo simulations nphot_scat : intNumber of photons used for the scattering Monte Carlo simulations when images are calculated nphot_spec : intNumber of photons used for the scattering Monte Carlo simultaions when SEDs/spectra are calculated rto_style : intOutput format: 1 - Formatted ASCII, 3 - C-style binary scattering_mode_max : intScattering mode :
- 0 - Scattering is switched off
- 1 - Isotropic scattering
- 2 - Anysotropic scattering with Henyey-Greenstein phase function
- 3 - Anysotropic scattering with tabulated phase function
- 4 - Anysotropic scattering with polarization but the full scattering matrix is only used for the last scattering
- 5 - Anysotropic scattering with scattering matrix, full treatment
tgas_eq_tdust : intDust temperature is taken to be the gas kinetic temperature modified_random_walk : intSwitches on (1) and off (0) modified random walk


Sink or Swim is a retired Youtube Channel that Michael Oladosu and I created together to review tv shows and movies.
He handled all the editing while I handled all the visual assets for the channel, including the logo, animations, and static images.
Tools used: procreate, adobe photoshop adobe after effects
Warning: flashing images
"Sink" rating animation
"Swim" rating animation
Logo ideation
Final logo
Typography
Endcard


At Dynaso we have carefully chosen the following three core values as the basis of our corporate
culture, which have guided us to the success over the past decade, and these values also define
how we conduct our business, and help us to create value for our clients, our people and our
organization.
Client Value Creation
Helping our clients achieve their goals is our foremost objective and business value. We each have
a huge responsibility no matter our role, as we understand that our service affects deeply whether
clients’ product can be timely launched, whether their business plans can be moving forward as
scheduled, and whether their insight on market would be actual and objective.
Great Place for Employees’ development
We are committed to hiring and retaining the right and talent people in every position, and we make
developing others and ourselves as priority for leadership team. We strive to create an open,
diverse and inclusive environment where everyone can make the best use of their potentials,
succeed professionally and achieve a higher personal value.
Keeping Entrepreneurial Spirit
Our clients reasonably expect us to be more informed, knowledgeable and responsive to meet their
request; while we also expect ourselves to be aggressive and innovative, and consistently looking
for new ideas to achieve our goals, which implies we shall be business focused, keep alert while
adaptable to changes, learning fast and continuously deepening our knowledge of our business,
moving quickly and decisively to meet the challenges.


| Methods' Summary |
| mouseButtonDown |
is called by a status bar if the mouse position is within the controller
and a mouse button has been pressed. If the controller has captured the
mouse input this function is also called when the mouse position is not
within the controller.
|
| mouseMove |
is called by a status bar if the mouse position is within the controller
and a mouse has been moved. If the controller has captured the
mouse input this function is also called when the mouse position is not
within the controller.
|
| mouseButtonUp |
is called by a status bar if the mouse position is within the controller
and a mouse button has been released. If the controller has captured the
mouse input this function is also called when the mouse position is not
within the controller.
|
| command |
is called by a status bar if a command event is available for a controller.
|
| paint |
is called by a status bar if the controller has to update the visual
representation.
|
| click |
is called by a status bar if the user clicked with mouse into the
field of the corresponding control.
|
| doubleClick |
is called by a status bar if the user double-clicked with mouse
into the field of the corresponding control.
|
| Methods' Details |
mouseButtonDown
| boolean |
| mouseButtonDown( |
[in] ::com::sun::star::awt::MouseEvent |
aMouseEvent ); |
- Description
- is called by a status bar if the mouse position is within the controller
and a mouse button has been pressed. If the controller has captured the
mouse input this function is also called when the mouse position is not
within the controller.
- Parameter aMouseEvent
- current information about the mouse pointer.
- Returns
- return true if the event should not be processed and false
if the event should be processed by the status bar.
|
|
mouseMove
| boolean |
| mouseMove( |
[in] ::com::sun::star::awt::MouseEvent |
aMouseEvent ); |
- Description
- is called by a status bar if the mouse position is within the controller
and a mouse has been moved. If the controller has captured the
mouse input this function is also called when the mouse position is not
within the controller.
- Parameter aMouseEvent
- current information about the mouse pointer.
- Returns
- return true if the event should not be processed and false
if the event should be processed by the status bar.
|
|
mouseButtonUp
| boolean |
| mouseButtonUp( |
[in] ::com::sun::star::awt::MouseEvent |
aMouseEvent ); |
- Description
- is called by a status bar if the mouse position is within the controller
and a mouse button has been released. If the controller has captured the
mouse input this function is also called when the mouse position is not
within the controller.
- Parameter aMouseEvent
- current information about the mouse pointer.
- Returns
- return true if the event should not be processed and false
if the event should be processed by the status bar.
|
|
command
| void |
| command( |
[in] ::com::sun::star::awt::Point |
aPos, |
| [in] long |
nCommand, |
| [in] boolean |
bMouseEvent, |
| [in] any |
aData ); |
- Description
- is called by a status bar if a command event is available for a controller.
- Parameter aPos
- the current mouse position in pixel.
- Parameter nCommand
- describes which command has been invoked.
See ::com::sun::star::awt::Command for
possible values.
- Parameter bMouseEvent
- true if the command is based on a mouse event, otherwise false.
- Parameter aData
- for future use only.
|
|
paint
| void |
| paint( |
[in] ::com::sun::star::awt::XGraphics |
xGraphics, |
| [in] ::com::sun::star::awt::Rectangle |
rOutputRectangle, |
| [in] long |
nStyle ); |
- Description
- is called by a status bar if the controller has to update the visual
representation.
- Parameter xGraphics
- a reference to a ::com::sun::star::awt::XGraphics
which has to be used to update the visual representation.
- Parameter nCommand
- a ::com::sun::star::awt::Rectangle which
determine the output rectangle for all drawing operations
- Parameter nStyle
- reserved for future use.
|
|
click
| void |
| click( |
[in] ::com::sun::star::awt::Point |
aPos ); |
- Description
- is called by a status bar if the user clicked with mouse into the
field of the corresponding control.
- Parameter aPos
- the current mouse position in pixel.
|
|
doubleClick
| void |
| doubleClick( |
[in] ::com::sun::star::awt::Point |
aPos ); |
- Description
- is called by a status bar if the user double-clicked with mouse
into the field of the corresponding control.
- Parameter aPos
- the current mouse position in pixel.
|
|
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


{% extends 'base.html' %} {% block title %}Login{% endblock %} {% block content %}
{{ message }}
You are already logged in. To sign into another account, first sign out.


Hosea 4:18
Their drink is sour: they have committed whoredom continually: her rulers with shame do love, Give ye.


Thank you for visiting the website for Dalhousie's Community Outreach class. This class provides students with invaluable experience working with real-world projects and actual clients to ensure the clients' needs are met. This experience is all gained through group work and in-class guidance that provides students with a safe first experience with actual projects.
In this class, students are placed in groups that consist of second, third and fourth year students, distributed evenly to ensure a fair and productive mix of skill, learning and leadership development. These groups are overseen and mentored by exceptional and experienced Teaching Assistants that will ensure both that the students meet the learning outcomes and that the clients leave happy with a product that will be valuable to them. Student groups will communicate directly with the client in order to fully understand client expectations, desired features and receive feedback and provide deliverables at specified increments. The students themselves will manage the deliverables and expectations and present the final product at the end of the designated semester.
The course welcomes any client project that requires a development component. We are constantly accepting new project applications and encourage you to view past completed project here. If you think you have a project that would match the courses students well, please feel free to complete a RFP (Requirement for Project). We are excited to work with you.
This course is focused on providing opportunities for students to learn and grow in their skills while providing clients with a quality applications. If you have a project in the works and are looking for a great team, we suggest contacting us to see if we can provide you with what you're looking for. We are always open to coordinating with new clients and taking on new projects and look forward to hearing from you.
Do you want to see what the students have produced before deciding to become a client with us? Check out our Past Projects page to see what kind of projects we take on and the results that we produce. If there is something you're looking to have done that you don't see, send us an email and we can discuss the fit for this course.
READ MORE...If you're a student looking for information on this course, such as how the course will run, the syllabus, or any other information, checkout your student dashboard. All students registered for the course will have an account already created for them!
LOGIN NOWIf you're a student or client looking for information regarding Dalhousie's Faculty of Computer Science, such as general information, faculty and staff information, contact information, or any other information, checkout the links below.
Dalhousie Faculty of Computer Science


{% extends "include/base.html" %} {% block title %} Favorite Color {% endblock %} {% block content %}
{{ message|default:"You don't have a favorite color." }}
What's you favorite color? {% endblock %} {% block footer %} {{ block.super }} {# Get the block from base.html #} {% include 'include/footer.html' %} {% endblock %}


Royal Mint releases coin for Remembrance Day 2019
It marks 100 years of remembrance
by Neil Shaw, Jamie HawkinsThe Royal Mint has released a new coin for this year's Remembrance Sunday.
This year marks 100 years since the first Remembrance Day which was held in the grounds of Buckingham Palace by George V on November 11, 2019, a year after the guns had fallen silent.
World War One officially ended with the signing of the Treaty of Versailles on June 28, 1919.
Many countries changed the name of Armistice Day to Remembrance Day during World War Two, while the US changed the name to Veteran's Day.
A spokesman for the Royal Mint said: "The coin commemorates 100 years since the first formal Remembrance service and features a red Flanders poppy and the iconic phrase from the fourth stanza of Laurence Binyon's poem 'For the Fallen'."
The £5 coin is now on sale from the Royal Mint.
The fourth stanza of the poem reads: "They shall grow not old, as we that are left grow old: Age shall not weary them, nor the years condemn. At the going down of the sun and in the morning We will remember them."


V
- any type to be returned by the visit method. Use Void
with
return null
if no return type is needed.public interface ElementVisitor<V>
| 限定符和类型 | 方法和说明 |
|---|---|
<T> V |
visit(Binding<T> binding)
Visit a mapping from a key (type and optional annotation) to the strategy for getting
instances of the type.
|
V |
visit(InjectionRequest request)
Visit a request to inject the instance fields and methods of an instance.
|
<T> V |
visit(MembersInjectorLookup<T> lookup)
Visit a lookup of the members injector.
|
V |
visit(Message message)
Visit an error message and the context in which it occurred.
|
V |
visit(PrivateElements elements)
Visit a collection of configuration elements for a private binder.
|
<T> V |
visit(ProviderLookup<T> lookup)
Visit a lookup of the provider for a type.
|
V |
visit(ScopeBinding binding)
Visit a registration of a scope annotation with the scope that implements it.
|
V |
visit(StaticInjectionRequest request)
Visit a request to inject the static fields and methods of type.
|
V |
visit(TypeConverterBinding binding)
Visit a registration of type converters for matching target types.
|
V |
visit(TypeListenerBinding binding)
Visit an injectable type listener binding.
|
<T> V visit(Binding<T> binding)
V visit(ScopeBinding binding)
V visit(TypeConverterBinding binding)
V visit(InjectionRequest request)
V visit(StaticInjectionRequest request)
<T> V visit(ProviderLookup<T> lookup)
<T> V visit(MembersInjectorLookup<T> lookup)
V visit(PrivateElements elements)
V visit(TypeListenerBinding binding)


R4Scene Class Reference
| Inherits from | R4Node : UIResponder |
| Declared in | R4Scene.h |
Overview
An R4Scene object represents a scene of content. A scene is the root node in a tree of R4 nodes (R4Node). These nodes provide content that the scene animates and renders for display. To display a scene, you present it from an R4View object.
For more info and to learn more about non-documented items refer to the SKNode class reference.
Tasks
-
– initWithSize:
-
+ sceneWithSize:
-
size
property -
scaleMode
property -
backgroundColor
property -
anchorPoint
property -
view
property -
currentCamera
property -
sceneManager
property -
– update:
-
– didEvaluateActions
-
– didSimulatePhysics
-
– didMoveToView:
-
– willMoveFromView:
-
– didChangeSize:
Properties
currentCamera
The active camera the scene is looked from. Use this property to reposition the camera or change its properties.
@property (nonatomic, strong) R4CameraNode *currentCamera
Discussion
Changing this property will cause scene to be rendered from the view point of new camere in next frame.
Default value is R4CameraNode object with position (0.0, 1.0, 2.0) and looking at scene origin (0.0, 0.0, 0.0).
Declared In
R4Scene.h
scaleMode
Defines how the scene is mapped to the view that presents it.
@property (nonatomic) R4SceneScaleMode scaleMode
Discussion
It is possible for a scene’s size to differ from the size of the view it is presented in. The default value is R4SceneScaleModeResizeFill.
Declared In
R4Scene.h
sceneManager
The active scene manager responsible for optimizing rendering process.
@property (nonatomic, strong) id<R4SceneManager> sceneManager
Discussion
Defaults to an instance of R4DefaultSceneManager class that perform basic sorting by material.
Declared In
R4Scene.h


Fall 2019: STA 4321 / 5325
Lecture: 8:30am - 9:20am on Monday, Wednesday, and Friday in TUR L011.
Instructor: Aaron Molstad (amolstad@ufl.edu), 202 Griffin-Floyd
Office hours: Monday, Wednesday from 9:45 - 10:45am, Tuesday from 9:40 - 10:40am
Teaching assistant: Xiaoda Qu (quxiaoda@ufl.edu), 234 Griffin-Floyd
TA office hours: Tuesday, Thursday from 10:40 - 11:40am.
Syllabus: [pdf]
| Lecture | Topics (suggested reading) | |||
| 1 (8/21) | Syllabus, basic set theory | |||
| 2 (8/23) | Basic set theory, sample spaces and events, probability (2.1 - 2.5) [notes] | |||
| 3 (8/26) | Probability, counting, permutations (2.6) [notes] | |||
| 4 (8/28) | Counting rules, examples | |||
| 5 (8/30) | Conditional probability, dependence |
Homework 1 (due Wednesday, September 4th): [pdf]


Olympic Medals Analysis Charts and Information
Winter Olympic Medals Analysis Charts and Information
Please take a moment and have a look to Winter Olympics Medal Charts for last 100 years!
Data Point 1
Population Growth in the same period of Time
Data Point 2
Most Medal Winners by Gender In Canada
Data Point 3
Countries with Most Gold Medals (horizontal Chart)
Data Point 4
Countries with Most Gold Medals (Vertical Chart)
Data Point 5
Gold Medals Achieved in Canada by Gender
Data Point 6
Women Vs Men by their Gold Medals in Canada
Data Point 8
Medals by Sports in Canada
Data Point 9
Medals by Sports in USA
Data Point 7
Canada Medals Vs USA Medals


Bézier Curve
Number of control point:
Maximum: 20
Accuracy:
Clear Drawing:
Warning: Turn this option off may cause lagging issue.
Especially if accuracy is above 5000.
Color and Thickness
Color
Thickness
Background:
Control Point:
Control Line:
Drawing Line:
Curve Point:
Coordinator (range 0 ~ 600):
All Random!
X
Y
Lauqerm
Does not support canvas


Replacing Slow R Code with CUDA
The Problem
Suppose we have a vector and a collection of random samples. For each , we want to calculate
Naive R Solution
If you were new to R, you might do something like this:
If you’ve had any experience with R, you probably recoiled in horror at the sight of those nested for loops. For loops are notoriously slow in R, and the function above is doing iterations with them. In fact, that’s probably the single worst way I could have written that function. If and are small then it doesn’t matter much, but even if (not big at all for practical applications), look what happens to the runtime:
Unit: seconds
expr min lq mean median uq max neval
func1(x, s) 1.608869 1.650864 1.718337 1.67365 1.77996 2.070576 100
It takes about 1.7 seconds on average to run. This is not ideal, especially in my research, where I need and at least, and then I need it to run tens of thousands of times.
A Faster R Solution
Let’s try a different approach. R has vectorized functions, like mean(x)
, which are much, much faster than doing the equivalent calculation with a loop.
The calculation is taken care of in one line, mean(cos(x*s))
. The function is wrapped in Vectorize
, which tells R to apply the function to every element of x
, one at a time. If we run this one with , we get
Unit: milliseconds
expr min lq mean median uq max neval
func2(x, s) 27.50761 29.18643 31.93724 31.30861 33.46475 50.32115 100
That’s more like it. This runs in about 30 milliseconds, 50 times faster than the first function. Let’s bump up the sizes to and see what happens.
Unit: seconds
expr min lq mean median uq max neval
func2(x, s) 1.956879 2.039474 2.186676 2.151696 2.296424 3.011084 100
Hmm. The evaluation time has climbed up to more than 2 seconds. It doesn’t sound like much, but it really adds up when you’re calling this function thousands of times.
Parallelization with CUDA
We could rewrite the function in C, a lower-level language than R, but this only speeds things up by a factor of 2 or 3 at best. The main reason why this is so slow is that R (and ordinary C as well) is single-threaded. This means that R can only do one thing at a time. It takes , calculates , then takes , calculates , and so on until it hits . But there’s no reason that things must be evaluated so sequentially. It would save a lot of time if we could do that calculation for lots of different ’s simultaneously. This is called parallelization.
CUDA is an API developed by Nvidia for doing parallel computing on a GPU (graphics processing unit). GPUs are designed with parallel computing in mind. They are essentially made up of thousands of little processors that are organized in such a way that they can split up a task, execute part of it, and recombine the results. Here is a CUDA file that accomplishes our task. I named it mc.cu
.
Using CUDA in R
To use this in R, we need to compile it as a shared library object. I do this in two steps, although I'm not sure if it's strictly necessary. First I compile the source code (the mc.cu
file above) into an object file called mc.o
.
Then, in order for R to use it, I turn it into a shared library file called mc.so
.
I used a makefile so I wouldn't have to remember what to do every time. The makefile looks like this:
At this point, here is the structure of my directory.
.
├── bin
│ └── mc.o
├── makefile
├── mc.so
└── src
├── mc.cu
└── mc.h
Now, in an R session, first we need to load that compiled library with dyn.load()
, and then we can write a wrapper function around the call to C.
Finally, we can use this function just like any other regular R function. When I tried this with and , it ran in about half a second. Pretty amazing if you ask me.
user system elapsed
0.284 0.176 0.463
NOTE: If you don’t have an Nvidia GPU in your computer, this will not work for you. I don’t have one in mine, so I needed to use Penn State’s ICS-ACI computing cluster, which was an adventure in itself. I have written another blog post about how to do that.


{% extends "base.html" %} {% load crispy_forms_tags %} {% load url %} {% block title %} Create Display Set - {{ block.super }} {% endblock %} {% block breadcrumbs %}
{% endblock %} {% block content %}Use this form to create a new display set in a reader study from this result. Users with read access to the selected reader study will be able to see this algorithm's inputs and outputs, please select the reader study carefully.
{% crispy form %} {% endblock %}


If this were a complete tutorial, this page would explain
Click the back button or this link to return.


Frequently Asked Questions (FAQ)¶
ISB-CGC Accounts and Cloud Projects¶
Do I have to request an ISB-CGC account before I can try out the web interface? No, you can just “sign in” to the web-app using your Google identity.
I want to be able to run big jobs using Google Compute Engine on the TCGA data hosted by the ISB-CGC. What should I do? You will need to request a Google Cloud Platform (GCP) project. Please see Your Own GCP project for more details about requesting a project.
Can I use any email address as a Google identity? Yes, you can. If your email address is not already linked to a Google account, you can create a Google account with your current email address. Please note, however that although these two accounts will then share the same name, they will still be two separate accounts, with two separate passwords, etc. (It is also possible that your institutional email address is already a Google account, if your institution uses Google Apps. This is how to find out).
How do I connect my GCP project to the ISB-CGC? Your GCP project gives you access to all of the technologies that make up the Google Cloud Platform (GCP). These technologies include BigQuery, Cloud Storage, Compute Engine, Google Genomics, etc. The ISB-CGC makes use of a variety of these technologies to provide access to the TCGA data, without necessarily inserting an extra interface layer between you and the GCP. Although one component of the ISB-CGC is a web-app (running on Google App Engine), some users may prefer not to go through the web-app to access other components of the ISB-CGC. For example, the open-access TCGA data that we have loaded into BigQuery tables can be accessed directly via the BigQuery web interface or from Python or R. Similarly, the ISB-CGC programmatic API is a REST service that can be used from many different programming languages.
The connection between your GCP project (whether it is an ISB-CGC sponsored and funded project or your own personal project) and the ISB-CGC is your Google identity (also referred to as your “user credentials”). Access to all ISB-CGC hosted data is controlled using access control lists (ACLs) which define the permissions attached to each dataset, bucket, or object.
Data Access¶
Does all TCGA data require dbGaP authorization prior to access? No, generally only the low-level sequence (DNA and RNA) and SNP-array data (CEL files) require dbGaP authorization. All of the “high-level” molecular data, as well as the clinical data are open-access and much of this has been made available in a convenient set of BigQuery tables.
Where can I find the TCGA data that ISB-CGC has made publicly available in BigQuery tables? The BigQuery web interface can be accessed at bigquery.cloud.google.com. If you have not already added the ISB-CGC datasets to your BigQuery “view”, click on the blue arrow next to your username in the left side-bar, select “Switch to Project”, then “Display Project...”, and enter “isb-cgc” (without quotes) in the text box labeled “Project ID”. All ISB-CGC public BigQuery datasets and tables will now be visible in the left side-bar of the BigQuery web interface. Note that in order to use BigQuery, you need to be a member of a Google Cloud Project.
How can I apply for access to the low-level DNA and RNA sequence data? In order to access the TCGA controlled-access data, you will need to apply to dbGaP. Please also review our section on Understanding Data Security.
I have dbGaP authorization. How do I provide this information to the ISB-CGC platform? In order for us to verify your dbGaP authorization, you first need to associate your Google identity (used to sign-in to the web-app) with a valid NIH login (eg your eRA Commons id). After you have signed in, click on your avatar (next to your name in the upper-right corner) and you will be taken to your account details page where you can verify your dbGaP authorization. You will be redirected to the NIH iTrust login page and after you successfully authenticate you will be brought back to the ISB-CGC web-app. After you successfully authenticate, we will verify that you also have dbGaP authorization for the TCGA controlled-access data. We also ask that you review our section on Understanding Data Security.
My professor has dbGaP authorization. Do I have to have my own authorization too?  (This video explains how an authorized user of controlled-access data can assign a downloader role to someone in his/her institution.)
I already authenticated using my eRA Commons id but now I want to use a different Google identity to access the ISB-CGC web-app. Can I re-authenticate using the same eRA Commons id? Yes, but you will first need to sign-in using your previous Google identity and “unlink” your eRA Commons id from that one before you can link it with your new Google identity. An eRA Commons id cannot be associated with more than one Google identity within the ISB-CGC platform at any one time.
Can I authenticate to NIH programmatically? No, the current NIH authentication flow requires web-based authentication and must therefore be done from within the ISB-CGC web-app. Once you have authenticated to NIH via the web-app, and your dbGaP authorization has been verified, the Google identity associated with your account will have access to the controlled-data for 24 hours.
Python Users¶
I want to write python scripts that access the TCGA data hosted by the ISB-CGC. Do you have some examples that can get me started? Yes, of course! The best place to start is with our examples-Python repository on github. You can run any of those examples yourself by signing in to your Google Cloud Project and deploying an instance of Google Cloud Datalab.
R and Bioconductor Users¶
I want to use R and Bioconductor packages to work with the TCGA data. How can I do that? You can run RStudio locally or deploy a dockerized version on a Google Compute Engine VM. You can find some great examples to get you started in our examples-R repository on github, and also in the documentation from the Google Genomics workshop at BioConductor 2015.


Brand
Brand
Analytics
Users
Messages
Payments
Analytics
Number of views
Number of likes
Number of comments


Authors: @erictune, @caesarxuchao, @enisoc Thanks to: {@dbsmith, @smarterclayton, @deads2k, @cheftako, @jpbetz, @mbohlool, @mml, @janetkuo} for comments, data, prior designs, etc.
[TOC]
This document proposes a detailed plan for bringing Webhooks to Beta. Highlights include (incomplete, see rest of doc for complete list) :
This plan is compatible with the original design doc.
Mutating Webhook: Webhook that can change a request as well as accept/reject.
Non-Mutating Webhook: Webhook that cannot change request, but can accept or reject.
Webhook: encompasses both Mutating Webhook and/or Non-mutating Webhook.
Validating Webhook: synonym for Non-Mutating Webhook
Static Admission Controller: Compiled-in Admission Controllers, (in plugin/pkg/admission).
Webhook Host: a process / binary hosting a webhook.
Many names were considered before settling on mutating. None of the names considered were completely satisfactory. The following are the names which were considered and a brief explanation of the perspectives on each.
Google able to staff development, test, review, and documentation. Community help welcome, too, esp. Reviewing.
Intent is Beta of Webhooks (both kinds) in 1.9.
Not in scope:
We will do webhooks beta before initializers beta because:
Based on experience and feedback from the alpha phase of both Webhooks and Initializers, we believe Webhooks Beta should support mutation because:
After the release of 1.9, we will advise users who currently use initializers to:
We will continue to support Initializers as an Alpha API in 1.9.
We will make a user guide and extensively document these webhooks. We will update some existing examples, maybe https://github.com/caesarxuchao/example-webhook-admission-controller (since the initializer docs point to it, e.g. https://github.com/kelseyhightower/kubernetes-initializer-tutorial), or maybe https://github.com/openshift/generic-admission-server.
We will clearly document the reasons for each and how users should decide which to use.
There should be prometheus variables to show:
Adding a webhook dynamically adds a key to a map-valued prometheus metric. Webhook host process authors should consider how to make their webhook host monitorable: while eventually we hope to offer a set of best practices around this, for the initial release we won’t have requirements here.
GenericAdmissionWebhook Admission Controller is split and renamed.
MutatingAdmissionWebhook
ValidatingAdmissionWebhook
--admission-control
flag’s order.ExternalAdmissionHookConfiguration API is split and renamed.
MutatingAdmissionWebhookConfiguration
ValidatingAdmissionWebhookConfiguration
The ValidatingAdmissionWebhookConfiguration
stays the same as ExternalAdmissionHookConfiguration
except it moves to v1beta1.
The MutatingAdmissionWebhookConfiguration
is the same API as ValidatingAdmissionWebhookConfiguration
. It is only visible via the v1beta1 version.
We will change from having a Kubernetes service object to just accepting a DNS name for the location of the webhook.
The Group/Version called
admissionregistration.k8s.io/v1alpha1
with kinds
InitializerConfiguration and ExternalAdmissionHookConfiguration.
InitializerConfiguration will not join admissionregistration.k8s.io/v1beta1
at this time.
Any webhooks that register with v1alpha1 may or may not be surprised when they start getting versioned data. But we don’t make any promises for Alpha, and this is a very important bug to fix.
At kubernetes.io, we will document the ordering requirements or just recommend a particular order for --admission-control
. A starting point might be MutatingAdmissionWebhook,NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,ValidatingAdmissionWebhook,ResourceQuota
.
There might be other ordering dependencies that we will document clearly, but some important properties of a valid ordering:
System administrators will likely need to know something about the webhooks they intend to run in order to make the best ordering, but we will try to document a good “first guess”.
Validation continues to happen after all the admission controllers (e.g. after mutating webhooks, static admission controllers, and non-mutating admission controllers.)
TODO: we should move ResourceQuota after Validation, e.g. as described in #1137. However, this is a longstanding bug and likely a larger change than can be done in 1.9–a larger quota redesign is out of scope. But we will likely make an improvement in the current ordering.
The main reason for parallel is reducing latency due to round trip and conversion. We think this can often mitigated by consolidating multiple webhooks shared by the same project into one.
Reasons not to allow parallel are complexity of reasoning about concurrent patches, and CRD not supporting PATCH.
ValidatingAdmissionWebhook
is already parallel, and there are no responses to merge. Therefore, it stays parallel.
MutatingAdmissionWebhook
will run in serial, to ensure conflicts are resolved deterministically.
The order is the sort order of all the WebhookConfigs, by name, and by index within the Webhooks list.
We don’t plan to make mutating webhooks parallel at this time, but we will revisit the question in the future and decide before going to GA.
When a webhook is persistently failing to allow e.g. pods to be created, then the error message from the apiserver must show which webhook failed.
When a core controller, e.g. ReplicaSet, fails to make a resources, it must send a helpful event that is visible in kubectl describe
for the controlling resources, saying the reason create failed.
Some Kubernetes resources are mounted in the api type system at multiple places (e.g., during a move between groups). Additionally, some resources have multiple active versions. There’s not currently a way to easily tell which of the exposed resources map to the same “storage location”. We will not try to solve that problem at the moment: if the system administrator wishes to hook all deployments, they must (e.g.) make sure their hook is registered for both deployments.v1beta1.extensions AND deployments.v1.apps.
This is likely to be error-prone, especially over upgrades. For GA, we may consider mechanisms to make this easier. We expect to gather user feedback before designing this.
Webhooks will receive the admission review subject in the exact version which the user sent it to the control plane. This may require the webhook to understand multiple versions of those types.
All communication to webhooks will be JSON formatted, with a request body of type admission.k8s.io/v1beta1. For GA, we will likely also allow proto, via a TBD mechanism.
We will not take any particular steps to make it possible to know whether an apiserver is safe to upgrade, given the webhooks it is running. System administrators must understand the stack of webhooks they are running, watch the Kubernetes release notes, and look to the webhook authors for guidance about whether the webhook supports Kubernetes version N. We may choose to address this deficency in future betas.
To follow the debate that got us to this position, you can look at this potential design for the next steps: https://docs.google.com/document/d/1BT8mZaT42jVxtC6l14YMXpUq0vZc6V5MPf_jnzDMMcg/edit
The Response for MutatingAdmissionWebhook
must have content-type, and it must be one of:
application/json
application/protobuf
application/strategic-merge-patch+json
application/json-patch+json
application/merge-json-patch+json
If the response is a patch, it is merged with the versioned response from the previous webhook, where possible without Conversion.
We encourage the use of patch to avoid the “old clients dropping new fields” problem.
Bootstrapping (both turning on a cluster for the first time and making sure a cluster can boot from a cold start) is made more difficult by having webhooks, which are a dependency of the control plane. This is covered in its own design doc.
There are two categories of webhooks: security critical (e.g., scan images for vulnerabilities) and nice-to-have (set labels).
Security critical webhooks cannot work with Kubernetes types they don’t have
built-in knowledge of, because they can’t know if e.g. Kubernetes 1.11 adds a
backwards-compatible v1.Pod.EvilField
which will defeat their functionality.
They therefore need to be updated before any apiserver. It is the responsibility of the author of such a webhook to release new versions in response to new Kubernetes versions in a timely manner. Webhooks must support two consecutive Kubernetes versions so that rollback/forward is possible. When/if Kubernetes introduces LTS versions, webhook authors will have to also support two consecutive LTS versions.
Non-security-critical webhooks can either be turned off to perform an upgrade, or can just continue running the old webhook version as long as a completely new version of an object they want to hook is not added. If they are metadata-only hooks, then they should be able to run until we deprecate meta/v1. Such webhooks should document that they don’t consider themselves security critical, aren’t obligated to follow the above requirements for security-critical webhooks, and therefore do not guarantee to be updated for every Kubernetes release.
It is expected that webhook authors will distribute config for each Kubernetes version that registers their webhook for all the necessary types, since it would be unreasonable to make system administrators understand all of the webhooks they run to that level of detail.
Webhooks should work with Custom Resources created by CRDs.
They are particularly needed for Custom Resources, where they can supplement the validation and defaulting provided by OpenAPI. Therefore, the webhooks will be moved or copied to genericapiserver for 1.9.
Webhooks should work with Custom Resources on Aggregated API Servers.
Aggregated API Servers should watch apiregistraton on the main APIserver, and should identify webhooks with rules that match any of their resources, and call those webhooks.
For example a user might install a Webhook that adds a certain annotation to every single object. Aggregated APIs need to support this use case.
We will build the dynamic admission stack into the generic apiserver layer to support this use case.
This section summarizes recommendations for Posting static admission controllers to Webhooks.
See also Details of Porting Admission Controllers and this Backup Document.
Here is an estimate of how each kind of admission controller would be moved (or not). This is to see if we can cover the use cases we currently have, not necessarily a promise that all of these will or should be move into another process.
For “Divide”, the backend may well be different port of same binary, sharing a SharedInformer, so data is not cached twice.
For all Kubernetes built-in webhooks, the backend will likely be compiled into kube-controller-manager and share the SharedInformer.
Mutating Webhooks, Non-mutating webhooks, Initializers, and Finalizers (collectively, Object Lifecycle Extensions) serve to:
Specific Use cases:
Good further discussion of use cases here
This section summarizes which Kubernetes static admission controllers can readily be ported to Object Lifecycle Extensions.
| Admission Controller | How | Why |
| PodSecurityPolicy | Use Mutating Webhook and Non-Mutating Webhook. | Requires User.Info, so needs webhook.
Mutating will set SC from matching PSP. Non-Mutating will check again in case any other mutators or initializers try to change it. |
| ResourceQuota | Leave static | A Redesign for Resource Quota has been proposed, to allow at least object count quota for other objects as well. This suggests that Quota might need to remain compiled in like authn and authz are. |
| AlwaysPullImages | Use Mutating Webhook (could implement using initializer since the thing is it validating is forbidden to change by Update Validation of the object) | Needs to |
| AntiAffinity | Move to pod validation | Since this is provided by the core project, which also manages the pod business logic, it isn't clear why this is even an admission controller. Ask Scheduler people. |
| DefaultTolerationSeconds | Move to pod defaulting or use a Mutating Webhook. | It is very simple. |
| eventratelimit | Non-mutating webhook | Simple logic, does not mutate. Alternatively, have rate limit be a built-in of api server. |
| DenyEscalatingExec | Non-mutating Webhook. | It is very simple. It is optional. |
| OwnerReferences- PermissionEnforcement (gc) | Leave compiled in | Garbage collection is core to Kubernetes. Main and all aggregated apiservers should enforce it. |
| ImagePolicy | Non-mutating webhook | Must use webhook since image can be updated on pod, and that needs to be checked. |
| LimitRanger | Mutating Webhook | Fast |
| NamespaceExists | Leave compiled in | This has been on by default for years, right? |
| NamespaceLifecycle | Split:
Cleanup, leave compiled in.
Protection of system namespaces: use non-mutating webhook |
|
| NodeRestriction | Use a non-mutating webhook | Needs webhook so it can use User.Info. |
| PersistentVolumeClaimResize | Move to validation | This should be in the validation logic for storage class. |
| PodNodeSelector | Move to non-mutating webhook | Already compiled in, so fast enough to use webhook. Does not mutate. |
| podtolerationrestriction | Move to non-mutating webhook | Already compiled in, so fast enough to use webhook. Does not mutate. |
| serviceaccount | Move to mutating webhook. | Already compiled in, so fast enough to use webhook. Does mutate by defaulting the service account. |
| storageclass | Move to mutating webhook. |
| Admission Controller | How | Why |
| pkg/authorization/admission/restrictusers" | Non-mutating Webhook or leave static | Verification only. But uses a few loopback clients to check other resources. |
| pkg/build/admission/jenkinsbootstrapper | Non-mutating Webhook or leave static | Doesn't mutate Build or BuildConfig, but creates Jenkins instances. |
| pkg/build/admission/secretinjector | Mutating webhook or leave static | uses a few loopback clients to check other resources. |
| pkg/build/admission/strategyrestrictions | Non-mutating Webhook or leave static | Verifications only. But uses a few loopback clients, and calls subjectAccessReview |
| pkg/image/admission | Non-Mutating Webhook | Fast, checks image size |
| pkg/image/admission/imagepolicy | Mutating and non-mutating webhooks | Rewriting image pull spec is mutating.
acceptor.Accepts is non-Mutating |
| pkg/ingress/admission | Non-mutating webhook, or leave static. | Simple, but calls to authorizer. |
| pkg/project/admission/lifecycle | Initializer or Non-mutating webhook? | Needs to update another resource: Namespace |
| pkg/project/admission/nodeenv | Mutating webhook | Fast |
| pkg/project/admission/requestlimit | Non-mutating webhook | Fast, verification only |
| pkg/quota/admission/clusterresourceoverride | Mutating webhook | Updates container resource request and limit |
| pkg/quota/admission/clusterresourcequota | Leave static. | Refactor with the k8s quota |
| pkg/quota/admission/runonceduration | Mutating webhook | Fast. Needs a ProjectCache though. Updates pod.Spec.ActiveDeadlineSeconds |
| pkg/scheduler/admission/podnodeconstraints | Non-mutating webhook or leave static | Verification only. But calls to authorizer. |
| pkg/security/admission | Use Mutating Webhook and Non-Mutating Webhook. | Similar to PSP in k8s |
| pkg/service/admission/externalip | Non-mutating webhook | Fast and verification only |
| pkg/service/admission/endpoints | Non-mutating webhook or leave static | Verification only. But calls to authorizer. |
Istio Pod Injector:
| Function | How | Why |
| Istio Pod Injector | Mutating Webhook | Containers can only be added at pod creation time.
Because the change is complex, showing intermediate state may help debugging. Fast, so could also use webhook. |
| Istio Mixer CRD Validation | Non-Mutating Webhook | |
| Service Catalog PodPreset | Initializer | Containers can only be added at pod creation time.
Because the change is complex, showing intermediate state may help debugging. Fast, so could also use webhook. |
| Allocate Cert for Service | Initializer | Longer duration operation which might fail, with external dependency, so don't use webhook.
Let user see initializing state. Don't let controllers that depend on services see the service before it is ready. |
| Mutating and Non-Mutating Webhooks | Initializers (and Finalizers) |
|
|
|
|
|
|
|
|
|
|
|
|
Use Examples:
|
Use Examples:
|


--- layout: post title: Web 2.0 vs limited spectrum? date: 2005-12-07 00:00:00 categories: digital-media interfaces-&-interaction mobile software-development ---
Interesting point I'd not considered from Christopher Kobayashi, on the Keitai-L list: "Kind of spooky to think that there's web connections in the background
without the user pressing a link/button. Basically meaning that
they'll be charged without them knowing it.
If you're on a unlimited data plan this wouldn't matter much, but what
about the poor souls not on this plan. Bad people can make things
expensive, or is there a limit to this..."


--- layout: site title: Home permalink: / --- {% include timeline_include.html class="active" %} {% include main_shared_content_include.html %} {% include intro_include.html %} {% include photos_include.html %} {% include friends_include.html %}


Lab 07 - Create Guided Decision Table
Lab Goal
To create a guided decision table for shipping pricing for Cool Store
Creating Decision Table
- We will create a guided decision table
AUTHORING -> PROJECT AUTHORING -> NEW ITEM -> GUIDED DECISION TABLE
RESOURCE NAME: Shipping Rules
Creating Decision Table
- Presented with wizard to setup your decision table
- This is the Summary view
Creating Decision Table
- Imports - used to add your model types
- we only need to add a
ShoppingCart
Creating Decision Table
- Now we need to add facts to help define our column constraints
- select
ShoppingCart
and add to 'Chosen Patterns'
- add
Binding
for this: '$sc'
- ignore 'From Entry Point', not using event streams in table
Creating Decision Table
- Next we define constraints on our shopping cart
- need to define what the first two columns will be applied to
- need a column for total shipping bottom to top range
- select $sc.ShoppingCart to see 'Available fields'
- select 'cartItemTotal:Double' and use arrow button to add to 'Conditions'
- note: Error will show that conditions need to be defined yet
Creating Decision Table
- To finish, must define conditions
- select 'cartItemTotal' to bring up fields to edit at bottom
- fill in 'Column header (description):'
'Total >='
- select 'Operator:'
'greater than or equal to'
from list
Creating Decision Table
- Now complete the same again for the 'Total <=' column
- select 'cartItemTotal ' to bring up fields to edit at bottom
- fill in 'Column header (description): '
'Total>'
- select 'Operator:'
'less than'
from list
Creating Decision Table
- Next adding an action to update facts
- Update the ShoppingCart shippingTotal in the last column of the table
- select '$sc:ShoppingCart' to view 'Available fields'
- select 'shippingTotal:Double' field
- add to 'Chosen fields' with arrow button
- note: Error will show that definitions are not complete
Creating Decision Table
- Select 'shippingTotal' in 'Chosen fields to expose definitions
- add 'Column header (description):'
'Shipping Total'
- the rest of the fields can be left empty
Creating Decision Table
- Leave 'Add Actions to insert Facts' alone, not needed
- View 'Columns to expand' to ensure box checked
- click 'Finish' button to display empty decision table
Creating Decision Table
- Expand the '+ Decision table' along with exposed columns
- use 'Add row...' button to add 5 empty rows to table
- double click each field to add values as shown in image below
Creating Decision Table
- Finally we want to set a few options
- click '+ New column'
- select 'Add a new Metadata \ Attribute column' from pop-up
- click 'OK'
Creating Decision Table
- select from 'Attribute' drop down menu:
- Repeat adding new metadata \ attribute column as a new column
- select from 'Attribute' drop down menu
'ruleflow-group'
- two options are available and two columns added
Creating Decision Table
- finalize the options
- no-loop: check 'Default value:' box and hide column
- ruleflow-group: add to field 'shipping-rules' hide column
- final decision table show below
Creating Decision Table
- Save the rule.
- Ensure your package builds:
TOOLS -> PROJECT EDITOR -> BUILD & DEPLOY
- (should see green pop-up 'Build Successful')
- JBoss BRMS & BPM Suite Articles
- JBoss BPM Suite Demos
- JBoss bpmPaaS Demos


This starter kit will help your development team quickly and easily embed Izenda into your application.
Easily integrate your users, roles, and tenants with Izenda.
Learn more »
Our flexible API allows you to apply row-level security to your data sources. Filter data by user, role, tenant, or your own custom logic.
Review best practices to help ensure a safe and secure deployment of Izenda.


Configure > HTTP/3
HTTP/3 uses QUIC as the transport protocol.
A listen
directive with a type
attribute set to quic
instructs the standalone server to bind to a UDP port on which QUIC packets will be sent and received.
The binding must have an ssl
attribute, as QUIC uses TLS/1.3 as the handshake protocol.
The example below setups a server that listens to both TCP port 443 and UDP port 443 using the same certificate and private key.
First listen
directive binds the server to TCP port 443 with specified credentials, marking that directive as an YAML alias called &listen_ssl
.
Then, it reuses (YAML merge) the first listen directive, adding type: quic
to create a UDP port 443 binding for accepting QUIC connections.
listen: &listen_ssl
port: 443
ssl:
certificate-file: /path/to-ssl-certificate-file
key-file: /path/to/ssl-key-file
listen:
<<: *listen_ssl
type: quic
Fine-tuning QUIC Behavior
To fine tune the behavior of QUIC, the quic
attribute should be used in place of the type
attribute specifying quic
.
The quic
attribute accepts following parameters.
- amp-limit
- Amount of data that can be sent to the client before the client address is validated; see section 8.1 of RFC 9000. Default is 3.
- handshake-timeout-rtt-multiplier
- Handshake timeout in the unit of round-trip time. Default is 400.
- max-initial-handshake-packets
- Maximum number of Initial packets to be sent before the handshake is deemed to have failed. Default is 1,000.
- max-streams-bidi
- Maximum number of client-initated bi-directional streams. This parameter controls the HTTP request concurrency of a HTTP/3 connection. Default is 100.
- max-udp-payload-size
- See Section 18.2 of RFC 9000. Default is 1,472.
- qpack-encoder-table-capacity
- Size of the QPACK encoder table. Default is 4,096.
- retry
- A boolean flag (
OFF
orON
) indicating if a Retry packet should be used for validating the client address. Use of Retry packets mitigate denial-of-service attacks at the cost of incurring one additional round-trip for processing the handshake. - sndbuf, rcvbuf
- Size of send and receive buffers, in the unit of bytes. Unlike the TCP counterparts that are per-connection, these buffers are associated to the listening port and applies to all the connections bound to that port.
The example below reuses a previous binding but sets the retry
parameter to ON
.
listen:
<<: *listen_ssl
quic:
retry: ON
Also, properties such as congestion controller and initial congestion window can be tuned using the top-level attribute of listen
.
HTTP/3 Directives
Aside from QUIC-level properties, configuration directives listed below are provided for tuning HTTP/3 behavior.
- Description:
-
Maximum duration to retain HTTP/3 connections in half-closed state, in seconds.
When a graceful shutdown of h2o is initiated, h2o at first sends a GOAWAY frame indicating the clients that it is initiating shutdown, then after one second, starts rejecting new HTTP requests (a.k.a. half-closed state).
This directive controls how long h2o should wait for the peer to close the QUIC connection in this half-closed state, before exitting.
If set to zero, this timeout is disabled. h2o will not shut down until all QUIC connections are closed by the clients or times out.
- Level:
- global
- Default:
http3-graceful-shutdown-timeout: 0
- Description:
-
If Generic Segmentation Offload should be used when sending QUIC packets.
- Level:
- global
- Default:
http3-gso: ON
- Description:
-
Idle timeout in the unit of seconds.
Unlike idle timeout of HTTP/1 and HTTP/2, this value should be small because it is faster to re-establish a new connection using 0-RTT than migrating to a different port due to NAT rebinding.
- Level:
- global
- Default:
http3-idle-timeout: 30
- Description:
-
Default window size for HTTP request body.
- Level:
- global
- Default:
http3-input-window-size: 16777216


| Author | Tijs van Roon@RedSam, Copyright © 2010, all rights reserved. |
| Adapted-by | |
| Compiler | >=2.4m |
Analog Devices AD9833 Direct-Digital-Synthesis (DDS) chip library. The library assumes that the AD9833 chip is clocked 25Mhz (MCLK). If not, read the last section to know how to change the constants to your needs. The library is probably a very good start for other Analog DDS chips as well since all work from the same principal. Setup: Assure that you are using a 25 Mhz oscillator on the dds chip. Otherwise change the constant. See below (in the source) on how to do this.
No dependency found
const _dds_control_sleep = 0b_0000_0000_1100_0000
const _dds_control_reset = 0b_0000_0001_0000_0000
const dword _dds_const_int = 10
const dword _dds_const_dec = 12_371_825
const _dds_control_base = 0b_0010_0000_0000_1000
const _dds_control_triangle = 0b_0000_0000_0000_0010
const _dds_control_sine = 0b_0000_0000_0000_0000
const _dds_control_square = 0b_0000_0000_0110_0000
const _dds_control_sleep = 0b_0000_0000_1100_0000
Sleep on, DAC off
const _dds_control_reset = 0b_0000_0001_0000_0000
reset
const dword _dds_const_int = 10
No documentation found
const dword _dds_const_dec = 12_371_825
No documentation found
const _dds_control_base = 0b_0010_0000_0000_1000
Info on the Control Word: --------------------------------------------------- bit we use descr 15/14 xx register select: 00 = control, 01 = freq0, 10 = freq1, 11 = phase0&1 (use bit 13 13 1 B28: 0 = select LSB/MSB via bit 12, 1 = write MSB&LSB in consecutive write, B28: 0 = write phase0, 1 = write phase1 12 0 HLB: select LSB/MSB: ignored in 28-bit mode 11 0 FSELECT: 0 = freq0, 1 = freq1 10 0 PSELECT: 0 = phase0, 1 = phase1 9 0 reserved 8 x RESET: 1 = reset state, 0 = no reset. 1 on init, 0 on running 7 0 SLEEP1: 0 = MCLK enabled, 1 = MCLK disabled (device freezes) 6 0 SLEEP12: 0 = DAC on, 1 = DAC disabled 5 x OPBITEN: 0 = DAC (sine/triangle), 1 = MSB (square) 4 0 reserved 3 0 DIV2: 0 = MSB/2, 1 = MSB 2 0 reserved 1 x MODE: 0 = Sine, 1 = triangle 0 0 reserved init: 0b_0010_0001_0000_1000 square:0b_0010_0000_0011_1000 triang:0b_0010_0000_0000_1010 sine: 0b_0010_0000_0000_1000 write freq0: write 0b_01mm_mmmm_mmmm CONTROL: 0b_0010_000R_SDO0_10M0
const _dds_control_triangle = 0b_0000_0000_0000_0010
DAC ON, MSB off, Mode=triangle
const _dds_control_sine = 0b_0000_0000_0000_0000
DAC ON, MSB off, Mode=sine
const _dds_control_square = 0b_0000_0000_0110_0000
DAC off, MSB on
| 16f628 | 16f628_dds_ad9833.jal |


Note: The name on your account is {{ userRecord.profile.account.fullName }}.
{% endif %}{{userRecord.profile.userdata.email | e}}
{% if env.isOwner and userRecord.profile.userdata.email != userRecord.profile.account.email %}Note: The email on your account is {{ userRecord.profile.account.email }}.
{% endif %} {% endif %}It is very useful to know what type of KBase user you are.
{% else %}No user class assigned
{% endif %}It is very useful to know what type of roles you are fulfilling with your KBase account.
{% else %}No roles assigned
{% endif %}{{affiliation.title | e}} ({{affiliation.start_year| e}}-{% if affiliation.end_year %}{{affiliation.end_year | e}}{% else %}present{% endif %}) @ {{affiliation.institution | e}}
{% endfor %} {% elif env.isOwner %}Show your colors! Please add one or more affiliations.
{% else %}No affiliations recorded for this user
{% endif %}


List of Plays
As you like it
Comedy
Hamlet
Tragedy
Twelfth Night
Comedy
All's Well that Ends Well
Comedy
If you like these email me at my
email


 Rule #2: use your words.
1. How to become a member
Membership is not yet open to the public. Membership will be by nomination, application, and approval. In order for an application to be approved, there needs to be both a quorum of +1s and no more than one -1. That is, an applicant must both have the approval of enough of the membership and no more than one disapproval.
2. Guests
Members are welcome to bring guests to the Attic at any time. Guests are expected to abide by all Seattle Attic policies, particularly the Code of Conduct and any relevant safe working procedures. Any member may ask a guest to leave at any time.
Open Evenings are an opportunity for prospective members to find out more about the Attic, meet our current members, and check out the space. If we seem to be a good fit for each other, we can talk about membership.
3. Kids
Our formal policy for members and guests under 18 is pending finding legal answers. We intend to eventually have a policy of parental supervision for ages 14 and under and parental waiver for ages 15 and up on a case by case basis. For now, parental disclaimer and/or parental supervision is required for all underage guests and members of the Attic.
4. Donations
Seattle Attic does not accept donations of CRTs or any other items we will have to pay a hazmat fee to dispose of.
Do not just leave anything bigger than a breadbox at the space as a donation--these items must be accepted by a member.
Broken items are accepted on a case by case basis and are the responsibility of the individual member who accepts the broken item. Said item will be stored in their storage space.
5. Photography
Ask permission before taking pictures of anyone, directly or in the background.
Ask permission to put a picture of someone on the internet or in any publication, with or without names. Permission for publication is not included in permission for taking the photo.
6. Allergies and food safety
Members will be asked to disclose severe food/other relevant substance allergies so that extra care can be taken to make the space safer for them.
Bring ingredient lists for food items you intend to share.
Refrain from wearing strong scents (e.g. Axe body spray, heavy perfume) while at the Attic out of courtesy for other members--each room is a small space.
7. Noise
Between 9 a.m. and 5 p.m., noise should be kept to normal office volumes in order to not disturb our neighbors.
Otherwise, negotiate noise levels with others present. If part of the group wants quiet work time, the door between the two halves of the space can be shut.
8. Attic Library
We have two kinds of books: for reference and for circulation.
Do not mark your book for circulation if you want to guarantee that it will never walk off permanently.


| | |
- __builtin__.object
-
- Config
- Item
-
- Choice
- Comment
- Menu
- Symbol
- exceptions.Exception(exceptions.BaseException)
-
- Internal_Error
- Kconfig_Syntax_Error
class Choice(Item) |
| |
Represents a choice statement. A choice can be in one of three modes:
"n" - The choice is not visible and no symbols can be selected.
"m" - Any number of symbols can be set to "m". The rest will be "n". This
is safe since potentially conflicting options don't actually get
compiled into the kernel simultaneously with "m".
"y" - One symbol will be "y" while the rest are "n".
Only tristate choices can be in "m" mode, and the visibility of the choice
is an upper bound on the mode, so that e.g. a choice that depends on a
symbol with value "m" will be in "m" mode.
The mode changes automatically when a value is assigned to a symbol within
the choice.
See Symbol.get_visibility() too. |
| |
- Method resolution order:
- Choice
- Item
- __builtin__.object
Methods defined here:
- __init__(self)
- Choice constructor -- not intended to be called directly by
Kconfiglib clients.
- __str__(self)
- Returns a string containing various information about the choice
statement.
- get_config(self)
- Returns the Config instance this choice is from.
- get_def_locations(self)
- Returns a list of (filename, linenr) tuples, where filename (string)
and linenr (int) represent a location where the choice is defined. For
the vast majority of choices (all of them as of Linux 3.7.0-rc8) this
list will only contain one element, but its possible for named choices
to be defined in multiple locations.
- get_help(self)
- Returns the help text of the choice, or None if the choice has no
help text.
- get_items(self)
- Gets all items contained in the choice in the same order as within
the configuration ("items" instead of "symbols" since choices and
comments might appear within choices. This only happens in one place as
of Linux 3.7.0-rc8, in drivers/usb/gadget/Kconfig).
- get_mode(self)
- Returns the mode of the choice. See the class documentation for
an explanation of modes.
- get_name(self)
- For named choices, returns the name. Returns None for unnamed
choices. No named choices appear anywhere in the kernel Kconfig files
as of Linux 3.7.0-rc8.
- get_parent(self)
- Returns the menu or choice statement that contains the choice, or
None if the choice is at the top level. Note that if statements are
treated as syntactic sugar and do not have an explicit class
representation.
- get_prompts(self)
- Returns a list of prompts defined for the choice, in the order they
appear in the configuration files. Returns the empty list for choices
with no prompt.
This list will have a single entry for the vast majority of choices
having prompts, but having multiple prompts for a single choice is
possible through having multiple 'choice' entries for it (though I'm
not sure if that ever happens in practice).
- get_referenced_symbols(self, refs_from_enclosing=False)
- See Symbol.get_referenced_symbols().
- get_selection(self)
- Returns the symbol selected (either by the user or through
defaults), or None if either no symbol is selected or the mode is not
"y".
- get_selection_from_defaults(self)
- Like Choice.get_selection(), but acts as if no symbol has been
selected by the user and no 'optional' flag is in effect.
- get_symbols(self)
- Returns a list containing the choice's symbols.
A quirk (perhaps a bug) of Kconfig is that you can put items within a
choice that will not be considered members of the choice insofar as
selection is concerned. This happens for example if one symbol within a
choice 'depends on' the symbol preceding it, or if you put non-symbol
items within choices.
As of Linux 3.7.0-rc8, this seems to be used intentionally in one
place: drivers/usb/gadget/Kconfig.
This function returns the "proper" symbols of the choice in the order
they appear in the choice, excluding such items. If you want all items
in the choice, use get_items().
- get_type(self)
- Returns the type of the choice. See Symbol.get_type().
- get_user_selection(self)
- If the choice is in "y" mode and has a user-selected symbol, returns
that symbol. Otherwise, returns None.
- get_visibility(self)
- Returns the visibility of the choice statement: one of "n", "m" or
"y". This acts as an upper limit on the mode of the choice (though bool
choices can only have the mode "y"). See the class documentation for an
explanation of modes.
- is_optional(self)
- Returns True if the choice has the 'optional' flag set (and so will
default to "n" mode).
Methods inherited from Item:
- is_choice(self)
- Returns True if the item is a choice. Short for
isinstance(item, kconfiglib.Choice).
- is_comment(self)
- Returns True if the item is a comment. Short for
isinstance(item, kconfiglib.Comment).
- is_menu(self)
- Returns True if the item is a menu. Short for
isinstance(item, kconfiglib.Menu).
- is_symbol(self)
- Returns True if the item is a symbol. Short for
isinstance(item, kconfiglib.Symbol).
Data descriptors inherited from Item:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Comment(Item) |
| |
Represents a comment statement. |
| |
- Method resolution order:
- Comment
- Item
- __builtin__.object
Methods defined here:
- __init__(self)
- Comment constructor -- not intended to be called directly by
Kconfiglib clients.
- __str__(self)
- Returns a string containing various information about the
comment.
- get_config(self)
- Returns the Config instance this comment is from.
- get_location(self)
- Returns the location of the comment as a (filename, linenr) tuple,
where filename is a string and linenr an int.
- get_parent(self)
- Returns the menu or choice statement that contains the comment, or
None if the comment is at the top level. Note that if statements are
treated as syntactic sugar and do not have an explicit class
representation.
- get_referenced_symbols(self, refs_from_enclosing=False)
- See Symbol.get_referenced_symbols().
- get_text(self)
- Returns the text of the comment.
- get_visibility(self)
- Returns the visibility of the comment. See also
Symbol.get_visibility().
Methods inherited from Item:
- is_choice(self)
- Returns True if the item is a choice. Short for
isinstance(item, kconfiglib.Choice).
- is_comment(self)
- Returns True if the item is a comment. Short for
isinstance(item, kconfiglib.Comment).
- is_menu(self)
- Returns True if the item is a menu. Short for
isinstance(item, kconfiglib.Menu).
- is_symbol(self)
- Returns True if the item is a symbol. Short for
isinstance(item, kconfiglib.Symbol).
Data descriptors inherited from Item:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Config(__builtin__.object) |
| |
Represents a Kconfig configuration, e.g. for i386 or ARM. This is the
set of symbols and other items appearing in the configuration together with
their values. Creating any number of Config objects -- including for
different architectures -- is safe; Kconfiglib has no global state. |
| |
Methods defined here:
- __getitem__(self, name)
- Returns the symbol with name 'name'. Raises KeyError if the symbol
does not appear in the configuration.
- __init__(self, filename='Kconfig', base_dir=None, print_warnings=True, print_undef_assign=False)
- Creates a new Config object, representing a Kconfig configuration.
Raises Kconfig_Syntax_Error on syntax errors.
filename (default: "Kconfig"): The base Kconfig file of the
configuration. For the Linux kernel, you'll probably want "Kconfig"
from the top-level directory, as environment variables will make
sure the right Kconfig is included from there
(arch/<architecture>/Kconfig). If you are using Kconfiglib via 'make
scriptconfig', the filename of the base base Kconfig file will be in
sys.argv[1].
base_dir (default: None): The base directory relative to which 'source'
statements within Kconfig files will work. For the Linux kernel this
should be the top-level directory of the kernel tree. $-references
to existing environment variables will be expanded.
If None (the default), the environment variable 'srctree' will be
used if set, and the current directory otherwise. 'srctree' is set
by the Linux makefiles to the top-level kernel directory. A default
of "." would not work with an alternative build directory.
print_warnings (default: True): Set to True if warnings related to this
configuration should be printed to stderr. This can be changed later
with Config.set_print_warnings(). It is provided as a constructor
argument since warnings might be generated during parsing.
print_undef_assign (default: False): Set to True if informational
messages related to assignments to undefined symbols should be
printed to stderr for this configuration. Can be changed later with
Config.set_print_undef_assign().
- __iter__(self)
- Convenience function for iterating over the set of all defined
symbols in the configuration, used like
for sym in conf:
...
The iteration happens in the order of definition within the Kconfig
configuration files. Symbols only referred to but not defined will not
be included, nor will the special symbols n, m, and y. If you want to
include such symbols as well, see config.get_symbols().
- __str__(self)
- Returns a string containing various information about the Config.
- eval(self, s)
- Returns the value of the expression 's' -- where 's' is represented
as a string -- in the context of the configuration. Raises
Kconfig_Syntax_Error if syntax errors are detected in 's'.
For example, if FOO and BAR are tristate symbols at least one of which
has the value "y", then config.eval("y && (FOO || BAR)") => "y"
This function always yields a tristate value. To get the value of
non-bool, non-tristate symbols, use Symbol.get_value().
The result of this function is consistent with how evaluation works for
conditional expressions in the configuration as well as in the C
implementation. "m" and m are rewritten as '"m" && MODULES' and 'm &&
MODULES', respectively, and a result of "m" will get promoted to "y" if
we're running without modules.
Syntax checking is somewhat lax, partly to be compatible with lax
parsing in the C implementation.
- get_arch(self)
- Returns the value the environment variable ARCH had at the time the
Config instance was created, or None if ARCH was not set. For the
kernel, this corresponds to the architecture being built for, with
values such as "i386" or "mips".
- get_base_dir(self)
- Returns the base directory relative to which 'source' statements
will work, passed as an argument to Config.__init__().
- get_choices(self)
- Returns a list containing all choice statements in the
configuration, in the order they appear in the Kconfig files.
- get_comments(self)
- Returns a list containing all comments in the configuration, in the
order they appear in the Kconfig files.
- get_config_filename(self)
- Returns the filename of the most recently loaded configuration file,
or None if no configuration has been loaded.
- get_config_header(self)
- Returns the (uncommented) textual header of the .config file most
recently loaded with load_config(). Returns None if no .config file has
been loaded or if the most recently loaded .config file has no header.
The header consists of all lines up to but not including the first line
that either
1. Does not start with "#"
2. Has the form "# CONFIG_FOO is not set."
- get_defconfig_filename(self)
- Returns the name of the defconfig file, which is the first existing
file in the list given in a symbol having 'option defconfig_list' set.
$-references to symbols will be expanded ("$FOO bar" -> "foo bar" if
FOO has the value "foo"). Returns None in case of no defconfig file.
Setting 'option defconfig_list' on multiple symbols currently results
in undefined behavior.
If the environment variable 'srctree' was set when the Config was
created, get_defconfig_filename() will first look relative to that
directory before looking in the current directory; see
Config.__init__().
WARNING: A wart here is that scripts/kconfig/Makefile sometimes uses
the --defconfig=<defconfig> option when calling the C implementation of
e.g. 'make defconfig'. This option overrides the 'option
defconfig_list' symbol, meaning the result from
get_defconfig_filename() might not match what 'make defconfig' would
use. That probably ought to be worked around somehow, so that this
function always gives the "expected" result.
- get_kconfig_filename(self)
- Returns the name of the (base) kconfig file this configuration was
loaded from.
- get_mainmenu_text(self)
- Returns the text of the 'mainmenu' statement (with $-references to
symbols replaced by symbol values), or None if the configuration has no
'mainmenu' statement.
- get_menus(self)
- Returns a list containing all menus in the configuration, in the
order they appear in the Kconfig files.
- get_srcarch(self)
- Returns the value the environment variable SRCARCH had at the time
the Config instance was created, or None if SRCARCH was not set. For
the kernel, this corresponds to the particular arch/ subdirectory
containing architecture-specific code.
- get_srctree(self)
- Returns the value the environment variable srctree had at the time
the Config instance was created, or None if srctree was not defined.
This variable points to the source directory and is used when building
in a separate directory.
- get_symbol(self, name)
- Returns the symbol with name 'name', or None if no such symbol
appears in the configuration. An alternative shorthand is conf[name],
where conf is a Config instance, though that will instead raise
KeyError if the symbol does not exist.
- get_symbols(self, all_symbols=True)
- Returns a list of symbols from the configuration. An alternative for
iterating over all defined symbols (in the order of definition) is
for sym in config:
...
which relies on Config implementing __iter__() and is equivalent to
for sym in config.get_symbols(False):
...
all_symbols (default: True): If True, all symbols -- including special
and undefined symbols -- will be included in the result, in an
undefined order. If False, only symbols actually defined and not
merely referred to in the configuration will be included in the
result, and will appear in the order that they are defined within
the Kconfig configuration files.
- get_top_level_items(self)
- Returns a list containing the items (symbols, menus, choices, and
comments) at the top level of the configuration -- that is, all items
that do not appear within a menu or choice. The items appear in the
same order as within the configuration.
- load_config(self, filename, replace=True)
- Loads symbol values from a file in the familiar .config format.
Equivalent to calling Symbol.set_user_value() to set each of the
values.
"# CONFIG_FOO is not set" within a .config file is treated specially
and sets the user value of FOO to 'n'. The C implementation works the
same way.
filename: The .config file to load. $-references to existing
environment variables will be expanded. For scripts to work even when
an alternative build directory is used with the Linux kernel, you
need to refer to the top-level kernel directory with "$srctree".
replace (default: True): True if the configuration should replace the
old configuration; False if it should add to it.
- set_print_undef_assign(self, print_undef_assign)
- Determines whether informational messages related to assignments to
undefined symbols should be printed to stderr for this configuration.
print_undef_assign: If True, such messages will be printed.
- set_print_warnings(self, print_warnings)
- Determines whether warnings related to this configuration (for
things like attempting to assign illegal values to symbols with
Symbol.set_user_value()) should be printed to stderr.
print_warnings: True if warnings should be printed.
- unset_user_values(self)
- Resets the values of all symbols, as if Config.load_config() or
Symbol.set_user_value() had never been called.
- write_config(self, filename, header=None)
- Writes out symbol values in the familiar .config format.
Kconfiglib makes sure the format matches what the C implementation
would generate, down to whitespace. This eases testing.
filename: The filename under which to save the configuration.
header (default: None): A textual header that will appear at the
beginning of the file, with each line commented out automatically.
None means no header.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Item(__builtin__.object) |
| |
Base class for symbols and other Kconfig constructs. Subclasses are
Symbol, Choice, Menu, and Comment. |
| |
Methods defined here:
- is_choice(self)
- Returns True if the item is a choice. Short for
isinstance(item, kconfiglib.Choice).
- is_comment(self)
- Returns True if the item is a comment. Short for
isinstance(item, kconfiglib.Comment).
- is_menu(self)
- Returns True if the item is a menu. Short for
isinstance(item, kconfiglib.Menu).
- is_symbol(self)
- Returns True if the item is a symbol. Short for
isinstance(item, kconfiglib.Symbol).
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Menu(Item) |
| |
Represents a menu statement. |
| |
- Method resolution order:
- Menu
- Item
- __builtin__.object
Methods defined here:
- __init__(self)
- Menu constructor -- not intended to be called directly by
Kconfiglib clients.
- __str__(self)
- Returns a string containing various information about the menu.
- get_config(self)
- Return the Config instance this menu is from.
- get_items(self, recursive=False)
- Returns a list containing the items (symbols, menus, choice
statements and comments) in in the menu, in the same order that the
items appear within the menu.
recursive (default: False): True if items contained in items within the
menu should be included recursively (preorder).
- get_location(self)
- Returns the location of the menu as a (filename, linenr) tuple,
where filename is a string and linenr an int.
- get_parent(self)
- Returns the menu or choice statement that contains the menu, or
None if the menu is at the top level. Note that if statements are
treated as syntactic sugar and do not have an explicit class
representation.
- get_referenced_symbols(self, refs_from_enclosing=False)
- See Symbol.get_referenced_symbols().
- get_symbols(self, recursive=False)
- Returns a list containing the symbols in the menu, in the same order
that they appear within the menu.
recursive (default: False): True if symbols contained in items within
the menu should be included recursively.
- get_title(self)
- Returns the title text of the menu.
- get_visibility(self)
- Returns the visibility of the menu. This also affects the visibility
of subitems. See also Symbol.get_visibility().
- get_visible_if_visibility(self)
- Returns the visibility the menu gets from its 'visible if'
condition. "y" if the menu has no 'visible if' condition.
Methods inherited from Item:
- is_choice(self)
- Returns True if the item is a choice. Short for
isinstance(item, kconfiglib.Choice).
- is_comment(self)
- Returns True if the item is a comment. Short for
isinstance(item, kconfiglib.Comment).
- is_menu(self)
- Returns True if the item is a menu. Short for
isinstance(item, kconfiglib.Menu).
- is_symbol(self)
- Returns True if the item is a symbol. Short for
isinstance(item, kconfiglib.Symbol).
Data descriptors inherited from Item:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Symbol(Item) |
| |
Represents a configuration symbol - e.g. FOO for
config FOO
... |
| |
- Method resolution order:
- Symbol
- Item
- __builtin__.object
Methods defined here:
- __init__(self)
- Symbol constructor -- not intended to be called directly by
Kconfiglib clients.
- __str__(self)
- Returns a string containing various information about the symbol.
- get_assignable_values(self)
- For string/hex/int symbols and for bool and tristate symbols that
cannot be modified (see is_modifiable()), returns the empty list.
Otherwise, returns a list containing the user values that can be
assigned to the symbol (that won't be truncated). Usage example:
if "m" in sym.get_assignable_values():
sym.set_user_value("m")
This is basically a more convenient interface to
get_lower/upper_bound() when wanting to test if a particular tristate
value can be assigned.
- get_config(self)
- Returns the Config instance this symbol is from.
- get_def_locations(self)
- Returns a list of (filename, linenr) tuples, where filename (string)
and linenr (int) represent a location where the symbol is defined. For
the vast majority of symbols this list will only contain one element.
For the following Kconfig, FOO would get two entries: the lines marked
with *.
config FOO *
bool "foo prompt 1"
config FOO *
bool "foo prompt 2"
- get_help(self)
- Returns the help text of the symbol, or None if the symbol has no
help text.
- get_lower_bound(self)
- For string/hex/int symbols and for bool and tristate symbols that
cannot be modified (see is_modifiable()), returns None.
Otherwise, returns the lowest value the symbol can be set to with
Symbol.set_user_value() (that will not be truncated): one of "n" or
"m", arranged from lowest to highest. This corresponds to the lowest
value the symbol could be given in e.g. the 'make menuconfig'
interface.
See also the tri_less*() and tri_greater*() functions, which could come
in handy.
- get_name(self)
- Returns the name of the symbol.
- get_parent(self)
- Returns the menu or choice statement that contains the symbol, or
None if the symbol is at the top level. Note that if statements are
treated as syntactic and do not have an explicit class
representation.
- get_prompts(self)
- Returns a list of prompts defined for the symbol, in the order they
appear in the configuration files. Returns the empty list for symbols
with no prompt.
This list will have a single entry for the vast majority of symbols
having prompts, but having multiple prompts for a single symbol is
possible through having multiple 'config' entries for it.
- get_ref_locations(self)
- Returns a list of (filename, linenr) tuples, where filename (string)
and linenr (int) represent a location where the symbol is referenced in
the configuration. For example, the lines marked by * would be included
for FOO below:
config A
bool
default BAR || FOO *
config B
tristate
depends on FOO *
default m if FOO *
if FOO *
config A
bool "A"
endif
config FOO (definition not included)
bool
- get_referenced_symbols(self, refs_from_enclosing=False)
- Returns the set() of all symbols referenced by this symbol. For
example, the symbol defined by
config FOO
bool
prompt "foo" if A && B
default C if D
depends on E
select F if G
references the symbols A through G.
refs_from_enclosing (default: False): If True, the symbols referenced
by enclosing menus and ifs will be included in the result.
- get_selected_symbols(self)
- Returns the set() of all symbols X for which this symbol has a
'select X' or 'select X if Y' (regardless of whether Y is satisfied or
not). This is a subset of the symbols returned by
get_referenced_symbols().
- get_type(self)
- Returns the type of the symbol: one of UNKNOWN, BOOL, TRISTATE,
STRING, HEX, or INT. These are defined at the top level of the module,
so you'd do something like
if sym.get_type() == kconfiglib.STRING:
...
- get_upper_bound(self)
- For string/hex/int symbols and for bool and tristate symbols that
cannot be modified (see is_modifiable()), returns None.
Otherwise, returns the highest value the symbol can be set to with
Symbol.set_user_value() (that will not be truncated): one of "m" or
"y", arranged from lowest to highest. This corresponds to the highest
value the symbol could be given in e.g. the 'make menuconfig'
interface.
See also the tri_less*() and tri_greater*() functions, which could come
in handy.
- get_user_value(self)
- Returns the value assigned to the symbol in a .config or via
Symbol.set_user_value() (provided the value was valid for the type of
the symbol). Returns None in case of no user value.
- get_value(self)
- Calculate and return the value of the symbol. See also
Symbol.set_user_value().
- get_visibility(self)
- Returns the visibility of the symbol: one of "n", "m" or "y". For
bool and tristate symbols, this is an upper bound on the value users
can set for the symbol. For other types of symbols, a visibility of "n"
means the user value will be ignored. A visibility of "n" corresponds
to not being visible in the 'make *config' interfaces.
Example (assuming we're running with modules enabled -- i.e., MODULES
set to 'y'):
# Assume this has been assigned 'n'
config N_SYM
tristate "N_SYM"
# Assume this has been assigned 'm'
config M_SYM
tristate "M_SYM"
# Has visibility 'n'
config A
tristate "A"
depends on N_SYM
# Has visibility 'm'
config B
tristate "B"
depends on M_SYM
# Has visibility 'y'
config C
tristate "C"
# Has no prompt, and hence visibility 'n'
config D
tristate
Having visibility be tri-valued ensures that e.g. a symbol cannot be
set to "y" by the user if it depends on a symbol with value "m", which
wouldn't be safe.
You should probably look at get_lower/upper_bound(),
get_assignable_values() and is_modifiable() before using this.
- has_ranges(self)
- Returns True if the symbol is of type INT or HEX and has ranges that
limit what values it can take on.
- is_allnoconfig_y(self)
- Returns True if the symbol has the 'allnoconfig_y' option set.
- is_choice_selection(self)
- Returns True if the symbol is contained in a choice statement and is
the selected item. Equivalent to
sym.is_choice_symbol() and sym.get_parent().get_selection() is sym
- is_choice_symbol(self)
- Returns True if the symbol is in a choice statement and is an actual
choice symbol (see Choice.get_symbols()).
- is_defined(self)
- Returns False if the symbol is referred to in the Kconfig but never
actually defined.
- is_from_environment(self)
- Returns True if the symbol gets its value from the environment.
- is_modifiable(self)
- Returns True if the value of the symbol could be modified by calling
Symbol.set_user_value().
For bools and tristates, this corresponds to the symbol being visible
in the 'make menuconfig' interface and not already being pinned to a
specific value (e.g. because it is selected by another symbol).
For strings and numbers, this corresponds to just being visible. (See
Symbol.get_visibility().)
- is_special(self)
- Returns True if the symbol is one of the special symbols n, m, y, or
UNAME_RELEASE, or gets its value from the environment.
- set_user_value(self, v)
- Sets the user value of the symbol.
Equal in effect to assigning the value to the symbol within a .config
file. Use get_lower/upper_bound() or get_assignable_values() to find
the range of currently assignable values for bool and tristate symbols;
setting values outside this range will cause the user value to differ
from the result of Symbol.get_value() (be truncated). Values that are
invalid for the type (such as a_bool.set_user_value("foo")) are
ignored, and a warning is emitted if an attempt is made to assign such
a value.
For any type of symbol, is_modifiable() can be used to check if a user
value will currently have any effect on the symbol, as determined by
its visibility and range of assignable values. Any value that is valid
for the type (bool, tristate, etc.) will end up being reflected in
get_user_value() though, and might have an effect later if conditions
change. To get rid of the user value, use unset_user_value().
Any symbols dependent on the symbol are (recursively) invalidated, so
things will just work with regards to dependencies.
v: The user value to give to the symbol.
- unset_user_value(self)
- Resets the user value of the symbol, as if the symbol had never
gotten a user value via Config.load_config() or
Symbol.set_user_value().
Methods inherited from Item:
- is_choice(self)
- Returns True if the item is a choice. Short for
isinstance(item, kconfiglib.Choice).
- is_comment(self)
- Returns True if the item is a comment. Short for
isinstance(item, kconfiglib.Comment).
- is_menu(self)
- Returns True if the item is a menu. Short for
isinstance(item, kconfiglib.Menu).
- is_symbol(self)
- Returns True if the item is a symbol. Short for
isinstance(item, kconfiglib.Symbol).
Data descriptors inherited from Item:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |


---
layout: archive
title: Lean Prover Zulip Chat Archive
permalink: 113488general/58529prettyprintingunderscores.html
---
The archive URL format has changed. Please find this page at:
https://leanprover-community.github.io/archive/stream/113488-general/topic/pretty.20printing.20underscores.html