Using this feature is dangerous!
PDF forms can bear a digital signature. Such a signature confirms that the PDF that it's been created by the author (and not someone else).
However, ngx-extended-pdf-viewer does not verify the validity of the signature. One of the test files has an invalid signature. The signature is displayed without any hint it's faulty. So use this feature carefully! Do not show the signature unless you're 100% sure it's valid. Otherwise, users may draw wrong conclusions.
To activate signatures, you must set the attribute showUnverifiedSignatures
.
You'll also have to deactivate form rendering in the default options.
The base library, pdf.js, has deliberately deactivated support for signature. The teams considers it a misleading and dangerous feature as long as the signature can't be verified. As a side effect, signatures aren't display when forms rendering is active. So you have deactivate form rendering.
If you need both signatures and forms, you can render the form yourself. as Jonny Fox shows, that's surprisingly simple.


Lipany battle
This is project visualizes schema of Lipany battle, which happened at 1436 close to the village Lipany. battle was between radical hussites againts restrained hussites.
That was my first project assigned by G4D. Main purpose of this visualization was to clearly present schema of Lipany battle in 3D. Customer ordered this assigment at G4D to impress jury, while he was vindicating his diploma thesis. His diploma thesis is related to Lipany battle and everything always look better in 3D, thats why he got idea to visualize the battle in 3D. And now thats my job to do it.
It was somehow new for me. Firstly I had to settle out with software licences. I got used to on student licence for everything. In this situation it is completly different. It is real commercial job and every licence have to be validated. Fortunately G4D company have got Autodesk 3ds Max licence purchased. On the other hand they doesn’t have licence for Lumion and Photoshop (I am glad, that I found out, that Gimp Rulezz).
Until this moment all my textures, lights, materials, render job was made in Lumion. To be honest it’s pretty easy software for this kind of job. Now I had to learn to do it everything in 3ds Max. Afterall I could say, that it definitely worth it. 3ds Max has great render settings, amazing UV texture editor and lights. Everything is much more complicated, but result is much more better.
Ground surface I got from DMR 5G, which is laser-scaned ground surface for Czechia. G4D purchased land, which I needed for this project and I had to convert it to mesh (originaly it was only in XYZ points). So to sum up: lots of XYZ points was my starting point.
Later on it was lot of modeling the surface especialy streams and roads, which was there before and aren’t there anymore. I had to deal with vertex paint, reflection at water, multi-sub object textures, environment, fog, sun, displacement, bump and so on. Totally I spent on this project around 80 hours officialy, but to be honest I spent even more, while I was learing new stuff at 3ds Max.
In the end I was bit struggling with export to .obj. G4D wanted to have whole model in .obj for their presentation on website. but unfortunately all textures and materials was complex enough, that it wasn’t easy to export object to .obj just because there were lot’s of 3ds Max specific toolset (when I exported the object it was just plain without texture). But fortunately I found out and learn how to bake textures and export was in the end successfull.
Renders
Just to clarify the course of battle: 1 - First there was two side against each other other 2 - Than radicals (blue) slightly attacks restrained hussites (red) 3 - after that radicals did pretended back up and restrained hussites attacked 4 - Next Radicals used their secret weapon - hidden cavalary (blue box) and attaced back. 5 - Restrained hussites had to surrender and their camp was conqured


src/view.js
import Stream from './stream';
/**
* A View is a kind of Stream that is useful for transforming the shape of state for
* use in components or interfaces. A View caches the result of the function, and will
* only emit state to subscribers if the new return value is distinct from the
* previous value.
*
* @extends {Stream}
*/
class View extends Stream {
/**
* constructor - Takes a source stream, and transforms it through a function.
* The view function takes state from the source stream and transforms it into
* returns a new shape of the state for use in a component or interface.
*
* @access public
* @param {Stream} source A stream to receive state from (can be a source stream or a funnel)
* @param {function} viewFn A function that takes state and returns a new shape for the state.
* @returns {View}
*/
constructor (source, viewFn) {
if (!source || !(source instanceof Stream)) {
throw new Error('Views require a source stream.');
}
if (!viewFn || (typeof viewFn !== 'function')) {
throw new Error('Views require a view function.');
}
super();
/**
* @access private
*/
this.source = source;
/**
* @access private
*/
this.sourceSubscriber = source.subscribe( state => this.next(viewFn(state)) );
/**
* @access private;
*/
this.type = 'VIEW';
}
/**
* forceState - Overrides the base Stream class's forceState.
* A View cannot receive new state through forceState.
* @access private
* @override
*/
forceState () {
throw new Error('Cannot force state on a View.')
}
/**
* destroy - Clean up subscriptions.
*
* @access public
*/
destroy () {
this.sourceSubscriber.unsubscribe();
}
}
/** @ignore Export the View class. */
export default View;


All-time high (ath) prices of cryptocurrencies, ath date, price drop since ath and percentage needed to increase of the current value up to highest price in history
1
Hollowman900017-Jul-19 04:29 PM
No one in their right mind would start a US-based crypto company now
US moving backwards and getting left behind
actionslacks17-Jul-19 04:30 PM
it might be time to get out.
Hollowman900017-Jul-19 04:30 PM
Vote mcafee?
D’s and R’s alike are fully committed to your enslavement
actionslacks17-Jul-19 04:31 PM
if you dont like it, you can leave... but we'll need a few pounds of flesh first
Komodo coin has now rebranded, and people are very excited, but what are the origins of Komodo and what are they doing now? Komodo is an open, composable mul...
Lennart17-Jul-19 04:49 PM
they like it a lot
in the end of the video they all agree that they will be buying some KMD heheh
jl777c17-Jul-19 04:56 PM
if their reaction is typical, then it seems it works very well. they seemed very surprised at all the things komodo has and that it actually works
3
alen17-Jul-19 05:09 PM
@jl777c show them trading logs on binance. They are not too strict on this yet.
차미숙17-Jul-19 05:12 PM
Btw is there any place to talk about assets like dex supernet crypto etc?
alen17-Jul-19 05:12 PM
I didnt report anything to them yet as i dont trade much..just hodling. When time comes i will see..not sure about exactly how are they doing it
jl777c17-Jul-19 05:16 PM
@차미숙 you can ask
차미숙17-Jul-19 05:23 PM
I don't have any questions I was just wondering if there is a channel for it
@jl777c
I do have some things to say though, i am very fortunate to have met James in cryptoworld(not physically though lol)
1
FlyingDutchman17-Jul-19 05:26 PM
nobody has met james in the real world. James doesnt even own a mirror, so he doesnt know what he looks like. ultimate privacy and anonymitity
1
1
차미숙17-Jul-19 05:26 PM
I wish I can someday inherit komodo assets to my children
With a trustless distribution of profits by that time
hastrup17-Jul-19 05:54 PM
@FlyingDutchmanlol
XD
PTYX17-Jul-19 06:41 PM
In the first Komodo meetup a few of us were on a beach in The Hague and we saw a buff dude with 777 tattooed on the back of his arms. At that moment, we know jl777 was with us
just a friendly reminder that everyone is responsible for reporting their own gains to relevant authorities. if you feel compelled to complain about the lack of automated govt surveillance on peer to peer systems please invest in libra. it should be released soon.
The year is now 2064.
@CryptoHayes becomes the worlds wealthiest man alive as $BTC surpasses $98K per coin.
Crypto Twitter still waiting for an alt season.
Likes
640
1
Markus17-Jul-19 08:42 PM
Kmd the new stable coin
polycryptoblog17-Jul-19 08:45 PM
@artik123 question is how far do you need to track back for source of funds
artik12317-Jul-19 08:51 PM
All the way back, unfortunately :)
Last time I had to do it it was almost 20 pages long...
polycryptoblog17-Jul-19 08:58 PM
Only to the point you first received it though. You can’t be held accountable for where someone else you got it from got it. Seems really as simple as just looking up your Dex address on the blockchain.
artik12317-Jul-19 09:00 PM
To the point were I first got BTC from fiat exchange... I'm sure it can be done manually, but I'm not sure it is worth the hustle
actionslacks17-Jul-19 09:05 PM
unfortunately for most of us in the us the only option is to send in what you got and hope for the best. no one knows how much of a hard on the irs has for crypto right now but it seems possible that coinbase is feeding them info now.
dan.17-Jul-19 09:05 PM
capital gains for stocks etc went years as the same. voluntary. i wouldnt worry about it(edited)
cryptoclueless17-Jul-19 09:06 PM
@artik123 I've used website bitcoin.tax for the last few years. It doesn't cost much and it processes all the transactions text or csv files, if you have a lot of trades its pretty easy to use. I figure do my best to report so I don't end up in jail(edited)
polycryptoblog17-Jul-19 09:07 PM
Not even sure how one classifies “gains” when exchange between two altcoins especially ones with no market
artik12317-Jul-19 09:08 PM
I do use a company that does it, but they need me to feed them with the reports that I export from exchanges
cryptoclueless17-Jul-19 09:08 PM
the website i use is less than $50 I think, lots of options in how you process the transactions too
actionslacks17-Jul-19 09:09 PM
the onus is on the citizen. overpay and dont expect anything back. I've gotten $3 refund checks before.
dan.17-Jul-19 09:09 PM
all these regulataors worried about money transmitters and transparent cryptos... they need to worry about DEX and private coins
theyre so behind the balls
actionslacks17-Jul-19 09:11 PM
they dont really care about anything but getting money from you. It's cheaper and easier for them to just cash your check and focus on non filers(edited)
artik12317-Jul-19 09:16 PM
In my opinion they do it to the ones that they can handle... they are going to regulate libra to death
dan.17-Jul-19 09:17 PM
presumably they do, but I haven't heard them specifically talk about them
if you follow the logic, spending trillions on homeland security, coupled with the ruckus theyre currently making... theyre screwed when it comes to privacy coins and dexs
artik12317-Jul-19 09:19 PM
That kind of monopoly is not going to be taken from them that easily be sure of that
Libra is a real threat
dan.17-Jul-19 09:20 PM
all im saying is
if i wanted to sound smarter than my congressional peers i'd say DEX/Privacy Coins
during these "hearings"
i truly think its not discussed because its not on the minds, not that they cant do anything


{% extends "base.html" %} {% import "bootstrap/wtf.html" as wtf %} {% block page_content %}
New user? Click here to register
Forgot your password? Click here to reset your password


There is a natural tension between the provider of an interface and the user of an interface. Providers of third-party packages and frameworks strive for broad applicability so they can work in many environments and appeal to a wide audience. Users, on the other hand, want an interface that is focused on their particular needs. This tension can cause problems at the boundaries of our systems.
Let’s look at java.util.Map as an example. As you can see by below given list, Map s have a very broad interface with plenty of capabilities. Certainly this power and ﬂexibility is useful, but it can also be a liability. For instance, our application might build up a Map and pass it around. Our intention might be that none of the recipients of our Map delete anything in the map. But right there at the top of the list is the clear() method. Any user of the Map has the power to clear it.
- clear() void – Map
- containsKey(Object key) boolean – Map
- containsValue(Object value) boolean – Map
- entrySet() Set – Map
- equals(Object o) boolean – Map
- get(Object key) Object – Map
- getClass() Class extends Object> – Object
- hashCode() int – Map
- isEmpty() boolean – Map
- keySet() Set – Map
- notify() void – Object


Wyx is a turn-based role playing game with emphasis on tactical combat and randomization. The player frequently makes meaningful and interesting choices that will determine the outcome of combat with AI controlled enemies. The player also explores tile-based maps, revealing enemies and treasure, as well as other features and hazards, and will have the ability to manipulate the battlefield to his advantage.
All information about a battle is available to the player before the outcome of the battle is decided. This includes enemy strength and abilities, terrain details, and full descriptions of the player character’s equipment, skills and spells.
Combat is one of the major apects of the game. Patterns in positioning, skills and spells, and weapons determine which entities are attacked. Choices of skills, spells, and equipment determine damage and defense, as well as other effects.
Attempting to move into a square that is occupied by an enemy will attack it using the attacker’s currently equipped melee weapon (this is called bumping). The player has two weapon sets that can be swapped at any time (along with skills and spells), allowing for a variety of setups.
Each weapon family (e.g. Axe, Sword, Mace) has a distinct attack pattern. The simplest attack pattern is just the single square that the enemy occupies. A more complex attack pattern might be the three squares currently “in front” of the attacker (determined by the direction of the bump), resembling a horizontal swiping attack.
Notes:
Example: Sword
Example: Axe
Notes:
The actual number of Use slots, Inventory slots, and Floor slots is still to be determined.
If there are more items on the floor than Floor slots, what happens?
It might look better if Inventory was a toggleable window, perhaps in the center of the screen. The game would pause while it was active. This would save space in the main panel, and would make it easier to allow more inventory slots.
The player can choose between a number of heroes, each with strengths and weaknesses, as well as preferences for certain tactics over others.
There are a large variety of enemies to fight. Each family of enemy will have slightly different tactical tendencies. The different kinds of enemies within a family will also have different tactics.
For example, a Skeleton Warrior will charge straight toward the player and attempt to bump head-on, while a Skeleton Mage will charge straight toward the player until it is within spell throwing range and attempt to bombard the player from maximum range. Neither will run when hurt.
In contrast, a Goblin Warrior will attempt to take cover behind pillars while making forward progress toward the player, and a Goblin Mage will step out from behind barriers to cast spells, and then hide again. Both will run when below 10% health.
Each weapon family has a distinct tactical attack pattern, whether melee or otherwise.
Armor is primarily defensive in nature, although an armor item may have any number of triggered effects (triggered when the defending character is bumped) or passive effects (such as permanent buffs or debuffs while worn).
Accessories can be either offensive or defensive in nature, or may even be strictly utilitarian. Rings, hats, cloaks, talismans — these are all considered Accessories.
Health potions have a special slot in the interface, and don’t take up inventory space. They can be used by clicking or by hotkey.
Other consumables must be placed in a Use slot before being used.
Skills and Spells are found in the form of scrolls and books. These are placed in a Use slot before being used. They may add additional patterns to melee attacks, or may provide extra defenses. They may have ranged attacks, or may manipulate the terrain, or perform any number of other actions. They may buff the player character or debuff an enemy (or vice versa).
Some examples:
Spin Attack:
Note:


TO PLAY: To begin the game, each player reaches to one of the center cards on the table and turns it face up. The players can now start placing cards. Cards placed on one of the piles must be either one greater or one less than the face value of the uppermost card on the pile. The order of the cards is the standard Ace-10, Jack, Queen, King, where the values loop from highest back to lowest (i.e. aces placed on kings, kings placed on aces). After a card has been placed in a pile, the player picks up one of the remaining 15 cards (at the game's start) so he always has 5 cards in his hand If neither of the players can place another card in a center pile, both players pick up a card from the piles placed to either side of the center piles and places it in the nearest center pile. If both players still cannot move, they repeat this process until all cards are gone, in which case, cards from the bottom of the center piles are placed on top.The game ends when one player runs out of cards in his hand.


{% extends "students/course/detail.html" %} {% block extrabreadcrumbs %} Assignments/ Assignment:{{ assignment.id }}/ {% endblock %} {% block subcontent %}
Assignment Due: {{ assignment.due_date }}


Varsity Blues A Film Review by Matt Lawrence Copyright 1998 Matt Lawrence http://www.filmcritic.com
What makes a good football movie? God knows it's been done before. I don't think there's anything left to be done. Necessary Roughness, North Dallas Forty, even this year's Waterboy are all basically the same. The only thing left to do is to make them as good as the others. I'm tired of seeing the final tackle in slow motion while the team looks on in anguish. I'm tired of hearing the dramatic music that's a dead giveaway that someone's about to get injured. I'm tired of the fact that writers think that it's suspenseful to watch a field goal being kicked with 2 seconds to go. I'm tired of the same stuff been done! In Varsity Blues, James Van Der Beek stars as Jonathan Moxon, a second string quarterback who never gets any playing time because of the star quarterback of a small town in Texas. This town is obsessed with football and treats like a second religion. For two hours we are treated to the adventures of Moxon who has to deal with his football hating girlfriend, an evil legendary coach (Jon Voight) and other teenage challenges. And to be honest, it's a little boring. Why does every football movie have a really heated halftime scene from the locker room? Can't they express their feelings before the game? After? The movie isn't that bad but don't expect to see anything new. Van Der Beek's accent is one of the phoniest I've ever heard. Voight surprisingly doesn't over-act, but the character is too evil for a common small town. Gee, do you think Jon Voight has been typecast? If Oscar night rolls around and Blues doesn't win any, don't be surprised.
Rating: **
Starring: James Van Der Beek, Jon Voight, Scott Caan, Amy Smart and Paul Walker Director: Brian Robbins Written by: John Gatins and W. Peter Iliff Producer: Elysa Koplovitz, Tova Laiter, Brian Robbins and Michael Tollin
http://www.varsitybluesmovie.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


CBIO (CSCI) 4835/6835: Introduction to Computational Biology
This week, we're moving into image processing. In this lecture, we'll touch on some core concepts around computer vision, or the field dedicated to machine understanding of images. By the end of this lecture, you should be able to
Whenever you hear about or refer to an image analysis task, you've stepped firmly into territory occupied by computer vision, or the field of research associated with understanding images and designing algorithms to do the same.
You can probably name numerous examples of computer vision already, but just to highlight a couple:
This is all to underscore: computer vision is an extremely active area of research and application!
From the perspective of the computer, the simplest constituent of an image is a pixel.
A pixel is a picture element.
(There are many other image formats and representations, but they tend to be variations on this theme)
In either grayscale or color, the pixels are arranged in rectangular arrays, one for each color channel (1 for grayscale, 3 for RGB).
(What could these arrays possibly be in Python?)
Let's jump in and get our hands dirty! First, let's use a relevant image:
I've stored this image in the course GitHub repository under lectures/Lecture22
( https://github.com/eds-uga/cbio4835-sp17 ) if you're interested.
Here's how to load the images in Python:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
# Loads the image (just like a text file!)
img = mpimg.imread("Lecture22/image1.png")
print(type(img))
<class 'numpy.ndarray'>
Just a regular NumPy array!
Let's see if we can visualize it.
plt.imshow(img)
<matplotlib.image.AxesImage at 0x11b078b38>
This shows the whole image, all three channels.
As evidenced by the .shape
property of the NumPy array, there are three dimensions to this image:
Each slice of the third dimension is a color channel, of which there are 3: one for red, one for green, and one for blue (hence: RGB).
We can plot them separately!
# First, separate out the channels.
r = img[:, :, 0]
g = img[:, :, 1]
b = img[:, :, 2]
# Now, plot each channel separately.
f = plt.figure(figsize = (12, 6))
f.add_subplot(1, 3, 1)
plt.imshow(np.array(r), cmap = "gray")
f.add_subplot(1, 3, 2)
plt.imshow(np.array(g), cmap = "gray")
f.add_subplot(1, 3, 3)
plt.imshow(np.array(b), cmap = "gray")
<matplotlib.image.AxesImage at 0x11bd20828>
For comparison, here's the original:
plt.imshow(img)
<matplotlib.image.AxesImage at 0x11c587f98>
Image analysis of any kind is usually done on a single channel.
(Why?)
Since images are stored as NumPy arrays, all the usual NumPy functionality (besides slicing, as we saw earlier) is available to you.
print(np.max(img))
print(np.min(img))
1.0 0.0
print(np.mean(img))
print(np.median(img))
0.131524 0.0705882
print(np.median(r))
print(np.median(g))
print(np.median(b))
0.207843 0.00784314 0.0745098
Recall that our img
object was loaded from a PNG image; this is the only format type that Matplotlib natively supports (more on that later).
When you read an image into Python, it will automatically detect the format and read it into the closest approximate Python data format it can. However, you can always manually convert it once it's in Python.
For instance, we use a slightly different approach to instead read in our image as grayscale:
import scipy.ndimage as ndimg
img_gray = ndimg.imread("Lecture22/image1.png", flatten = True) # The "flatten" arg is critical
print(img_gray.shape)
(480, 640)
Note how there are only 2 dimensions now--just a height and width.

Fair warning: doing this alters the image! You may want to copy the image structure first...
for i in range(img_gray.shape[0]):
for j in range(120, 130):
img_gray[i, j] = 255
plt.imshow(img_gray, cmap = "gray")
<matplotlib.image.AxesImage at 0x11e9140f0>
Another very useful way of obtaining information about an image is to view the histogram of pixel values.
You can do this regardless of whether it's a grayscale or RGB image, though in the latter case it's useful to plot the pixel values separated by channel.
First, let's re-import the image as grayscale and take a look at how the pixel values show up in a histogram:
img_gray = ndimg.imread("Lecture22/image1.png", flatten = True)
_ = plt.hist(img_gray.flatten(), bins = 25)
This tells us some very useful information--primarily, that most of the pixel values are centered around what seems like a pretty low number (20-30), so by and large the image is very dark (which we saw).
There do seem to be a few light spots on an island around 120-140, but that's it.
Let's take a look now at each channel individually.
fig = plt.figure(figsize = (16, 4))
plt.subplot(131)
_ = plt.hist(r.flatten(), bins = 25, range = (0, 1), color = 'r')
plt.subplot(132)
_ = plt.hist(g.flatten(), bins = 25, range = (0, 1), color = 'g')
plt.subplot(133)
_ = plt.hist(b.flatten(), bins = 25, range = (0, 1), color = 'b')
Recall what each channel represented:
There seems to be very little HSP27, while there is tons of actin and the quantity of DAPI falls somewhere in between.
...oh wait, did you see the scales for each one?
x = np.linspace(0, 1, 25)
plt.plot(x, np.histogram(r.flatten(), bins = 25)[0], color = 'r', label = 'Actin')
plt.plot(x, np.histogram(g.flatten(), bins = 25)[0], color = 'g', label = 'HSP27')
plt.plot(x, np.histogram(b.flatten(), bins = 25)[0], color = 'b', label = 'DAPI')
plt.legend()
<matplotlib.legend.Legend at 0x11f2b7c88>
So, yes:
While we're on the topic of histograms, there is a convenient way to try and "reshape" the pixel histograms so as to make the resulting image a bit sharper. This is called histogram equalization.
The idea is simple enough: re-map the pixel values in the image so that the corresponding histogram is perfectly flat.
Basically it tries to fill in the "valleys" and flatten the "peaks" of the pixel histograms we saw earlier--this has the effect of bringing out very dim signal and dampening oversaturated signal.
Let's see an example, using one of the image channels.
from PIL import Image, ImageOps
img_pil = Image.open("Lecture22/image1.png")
beq = ImageOps.equalize(img_pil.split()[2])
f = plt.figure(figsize = (12, 6))
f.add_subplot(1, 2, 1)
plt.imshow(b, cmap = 'gray')
f.add_subplot(1, 2, 2)
plt.imshow(np.array(beq), cmap = 'gray')
<matplotlib.image.AxesImage at 0x11f356438>
We can directly see why these two images look different (and, specifically, what histogram equalization did) by recomputing the channel histograms:
plt.plot(img_pil.split()[2].histogram(), 'b')
plt.plot(beq.histogram(), 'k')
[<matplotlib.lines.Line2D at 0x11f1b1a90>]
Autocontrast is another tool that modifies the pixel histograms to try and make the resulting images more viewable. In this case, the goal of autocontrast is to maximize (normalize) image contrast.
This function calculates a histogram of the input image, removes cutoff percent of the lightest and darkest pixels from the histogram, and remaps the image so that the darkest remaining pixel becomes black (0), and the lightest becomes white (255).
In essence, you choose some percentage cut-off (say: 50%, or 0.5), removes that fraction of pixels that are both darkest and lightest (assumes they're noise and throws them away), then remaps the remaining pixels.
Here's what it might look like:
bcon = ImageOps.autocontrast(img_pil.split()[2], 0.5)
f = plt.figure(figsize = (12, 6))
f.add_subplot(1, 2, 1)
plt.imshow(b, cmap = "gray")
f.add_subplot(1, 2, 2)
plt.imshow(np.array(bcon), cmap = "gray")
<matplotlib.image.AxesImage at 0x11f4f6b70>
In this case, we're trying to chop off pixel values at both ends of the histogram (lightest and darkest) and reshuffling the others around to make them more visible, hopefully improving contrast.
The effects on the underlying histograms look like:
plt.plot(img_pil.split()[2].histogram(), 'r')
plt.plot(bcon.histogram(), 'k')
[<matplotlib.lines.Line2D at 0x11f441978>]
It closely mimics the original histogram, but because some values at the tails were thrown away, all the other values were reshuffled--you end up with more pixels some of the middle values, which is (presumably) the signal you're interested in.
Thresholding is the process by which you define a pixel threshold--say, the value 100--and set every pixel below that value to 0, and every pixel above that value to 255.
In doing so, you binarize the image, as each pixel takes on only one of two possible values.
Remember boolean indexing?
(head on over to slide 40 of Lecture 8--January 31--if you're a little fuzzy on the details)
In short, you can create masks based on certain boolean conditions so you can modify certain parts of the array while holding the others constant.
Here's the example straight from the lecture:
x = np.random.standard_normal(size = (7, 4))
print(x)
[[ -6.49979242e-02 2.08316539e-01 -7.06011870e-01 -9.82043350e-01] [ -1.09983995e+00 -1.18645041e+00 -9.53307184e-01 6.89604810e-02] [ -2.64952299e+00 -5.97906503e-01 -4.66659443e-01 2.37222881e-01] [ -1.72373952e+00 1.03769970e+00 9.85069452e-01 -7.08066133e-01] [ 1.47547962e+00 1.34952992e+00 1.24486749e+00 1.81284437e+00] [ 6.33840445e-01 -9.44929143e-01 -1.70004374e-03 -2.09578017e+00] [ -6.91257130e-01 -6.03497503e-01 1.00038630e+00 8.05767208e-01]]
If we just want the positive numbers, we can define a mask using the condition you'd find in an if
statement:
mask = x < 0 # For every element of x, ask: is it < 0?
print(mask)
[[ True False True True] [ True True True False] [ True True True False] [ True False False True] [False False False False] [False True True True] [ True True False False]]
The mask is just a bunch of True
and False
values.
Now we can use the mask to modify the parts of the original array that correspond to True
in the mask:
x[mask] = 0.0
print(x)
[[ 0. 0.20831654 0. 0. ] [ 0. 0. 0. 0.06896048] [ 0. 0. 0. 0.23722288] [ 0. 1.0376997 0.98506945 0. ] [ 1.47547962 1.34952992 1.24486749 1.81284437] [ 0.63384045 0. 0. 0. ] [ 0. 0. 1.0003863 0.80576721]]
Back to images! Let's use a threshold on our blue channel:
b_thresh = np.array(bcon) > 120 # Every pixel greater than 120 is "True", otherwise it's "False"
f = plt.figure(figsize = (12, 6))
f.add_subplot(1, 2, 1)
plt.imshow(np.array(bcon), cmap = "gray")
f.add_subplot(1, 2, 2)
plt.imshow(b_thresh, cmap = "gray")
<matplotlib.image.AxesImage at 0x11c502048>
Any ideas how we might, say, count the number of cells?
There is an entire ecosystem of computer vision packages for Python.
Some are very general (a lot like scipy.ndimage
and PIL
) while some are very specific to certain classes of problems.
You could spend an entire career with just one or two of these packages, but very briefly I'll name a few of the most popular.
(We'll make use of some of them on Thursday)
scikit-image
¶If scipy.ndimage
or PIL
proves to be insufficient for your needs, this should be the first stop you take in looking for alternatives.
It has a wealth of general-purpose image processing routines built-in. It's actively developed and very easy to use, and integrates well with NumPy and SciPy.
It also comes with a bunch of basic tutorials and sample data to help you get your feet wet.
mahotas
¶This is another excellent general-purpose image processing library, though it has a slight preference for bio-imaging applications. After all, its author is a computational biologist!
Like scikit-image
, it's actively developed, easy to use, and integrates fully with the NumPy + SciPy scientific computing environment for Python.
This is probably your first stop if you're looking for some basic bioimaging tools; we'll make use of it Thursday, most likely.
OpenCV (for "Open Computer Vision") is the Grand Daddy of image processing packages.
You'll want to use this if computer vision is a significant part of your day-to-day career. It's not for the faint of heart, however: it's a C++ library with Python bindings, which means you have to install from source, and that can be painful depending on how (un)comfortable you are with compiling things from scratch.
(though if you use the Anaconda distribution of Python, and you connect it to the conda-forge channel, you can download pre-built OpenCV packages that WAY SIMPLIFY this process)
That said, OpenCV has everything:
The list goes on and on.
It's well-maintained, well-documented, and while it can be a little tricky to use, it has a huge community of developers and users ready to help.
Like scikit-image
, it also provides a ton of tutorials for typical use-cases, though OpenCV's definition of "typical" is a little different: they're actually pretty in-depth!
Thursday's lecture--
Stay tuned!


C++ Reference
General C++
Standard C Library
C++
C++ Standard Template Library
Questions? Check out the FAQ, look at these other language references, or contact us.
Last modified on 4/14/2008 by Nate Kohl, with help from a lot of people.
C++ ReferenceGeneral C++Standard C LibraryC++C++ Standard Template LibraryQuestions? Check out the FAQ, look at these other language references, or contact us. Last modified on 4/14/2008 by Nate Kohl, with help from a lot of people. |


I am the only one working on this project
This proposal was last updated on 11/8/2020
This project will be a sound board that will play different sound files
The user will be able to click a button and the file assigned to that button will play
I would also like the user to be able to upload their own mp3 files and play them as well, though this might not be implemented yet
This is an html project
For the most part, this project is me practicing webpage design and layout using what we learned from the html tutorials
We have not messed with sound files nor directly uploading files in this class


NMR services cancelled till November 24
by Staff ReporterCiting inclement weather conditions, the Salem Division of Southern Railway cancelled train services running on the Nilgiri Mountain Railway (NMR) section till November 24.
An official release on Tuesday said that Train No. 56136/56137 passenger train between Mettupalayam and Udhagamandalam would be cancelled from November 20 to November 24. Train No. 06171 and Train No. 06172 NMR special trains between Mettupalayam and Udhagamandalam would be cancelled on November 23 and November 24 respectively.
A railway official said the trains on NMR section were running on Monday and Tuesday and the cancellation would come to effect from Wednesday. Although the boulders and debris were cleared from the tracks, the weather conditions were not conducive for operation of trains.


AnylineVideoView Class Reference
| Inherits from | UIView |
|---|---|
| Conforms to | ALImageProvider |
| Declared in | AnylineVideoView.h |
Overview
The AnylineVideoView renders the CapturePreview from the Camera on the screen. It also handles an efficient way to extract frames from the Video and provide them to Anyline with the ALImageProvider protocol. It should be initialised via ALUIConfiguration.
This View also provides appropriate cutoutView and flashButton subViews as configured in the ALUIConfiguration.
flashButton
The FlashButton subview. Can be configured in the ALUIConfiguration.
@property (nonatomic, strong, readonly) ALFlashButton *flashButton
Declared In
AnylineVideoView.h
cutoutView
The CutoutView subview. Configurable with an ALUIConfiguration.
@property (nonatomic, strong, readonly) ALCutoutView *cutoutView
Declared In
AnylineVideoView.h
watermarkRect
Returns the bounding Rect of the visible WatermarkView with the correct location on the Module View.
@property (nonatomic, readonly) CGRect watermarkRect
Discussion
Warning: May be nil before the layout process is completed or the license is not community.
Declared In
AnylineVideoView.h
– initWithFrame:configuration:
Initialises a new AnylineVideoView with a frame and a configuration.
- (instancetype)initWithFrame:(CGRect)frame configuration:(ALUIConfiguration *)configuration
Parameters
frame |
The frame where the view should be positioned. |
|---|---|
configuration |
The configuration used to load the video view and the subviews. |
Return Value
A new instance of AnylineVideoView.
Declared In
AnylineVideoView.h
– initWithFrame:
Initialises a new AnylineVideoView with a frame. The CaptureView will be initialised with the default 720p video. No FlashButton or CutoutView will be initialised.
- (instancetype)initWithFrame:(CGRect)frame
Parameters
frame |
The frame where the view should be positioned. |
|---|
Return Value
A new instance of AnylineVideoView.
Declared In
AnylineVideoView.h
– initWithCoder:configuration:
Initialises a new AnylineVideoView with a coder and a configuration.
- (instancetype)initWithCoder:(NSCoder *)aDecoder configuration:(ALUIConfiguration *)configuration
Parameters
configuration |
The configuration used to load the video view and the subviews. |
|---|---|
frame |
The coder to initialise the view. |
Return Value
A new instance of AnylineVideoView
Declared In
AnylineVideoView.h
– initWithCoder:
Initialises a new AnylineVideoView with a coder. The CaptureView will be initialised with the default 720p video. No FlashButton or CutoutView will be initialised.
- (instancetype)initWithCoder:(NSCoder *)aDecoder
Parameters
frame |
The coder to initialise the view. |
|---|
Return Value
A new instance of AnylineVideoView.
Declared In
AnylineVideoView.h


MDOC.SAMPLES
Section: Environments, Tables, and Troff Macros (7)
Index
Return to Main Contents
BSD mandoc
NAME
mdoc.samples
- tutorial sampler for writing
BSD manuals with
-mdoc
SYNOPSIS
man mdoc.samples
DESCRIPTION
A tutorial sampler for writing
BSD manual pages with the
-mdoc
macro package, a
content -based
and
domain -based
formatting
package for
troff(1).
Its predecessor, the
-man7
package,
addressed page layout leaving the
manipulation of fonts and other
typesetting details to the individual author.
In
-mdoc
page layout macros
make up the
page structure domain
which consists of macros for titles, section headers, displays
and lists.
Essentially items which affect the physical position
of text on a formatted page.
In addition to the page structure domain, there are two more domains,
the manual domain and the general text domain.
The general text domain is defined as macros which
perform tasks such as quoting or emphasizing pieces of text.
The manual domain is defined as macros that are a subset of the
day to day informal language used to describe commands, routines
and related
BSD files.
Macros in the manual domain handle
command names, command-line arguments and options, function names,
function parameters, pathnames, variables, cross
references to other manual pages, and so on.
These domain
items have value
for both the author and the future user of the manual page.
It is hoped the consistency gained
across the manual set will provide easier
translation to future documentation tools.
Throughout the
UNIX
manual pages, a manual entry
is simply referred
to as a man page, regardless of actual length and without
sexist intention.
GETTING STARTED
Since a tutorial document is normally read when a person
desires to use the material immediately, the assumption has
been made that the user of this document may be impatient.
The material presented in the remained of this document is
outlined as follows:
-
TROFF IDIOSYNCRASIES
- "Macro Usage"
-
- "Passing Space Characters in an Argument"
-
- "Trailing Blank Space Characters (a warning)"
-
- "Escaping Special Characters"
-
-
THE ANATOMY OF A MAN PAGE
- "A manual page template"
-
-
TITLE MACROS
-
INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS
- "What's in a name..."

Theoretically, one should not have to learn the dirty details of
troff(1)
to use
-mdoc
however, there are a few
limitations which are unavoidable and best gotten out
of the way.
And, too, be forewarned, this package is
not
fast.
Macro Usage
As in
troff(1),
a macro is called by placing a
`.'
(dot character)
at the beginning of
a line followed by the two character name for the macro.
Arguments may follow the macro separated by spaces.
It is the dot character at the beginning of the line which causes
troff(1)
to interpret the next two characters as a macro name.
To place a
`.'
(dot character)
at the beginning of a line in some context other than
a macro invocation, precede the
`.'
(dot) with the
`\&'
escape sequence.
The
`\&'
translates literally to a zero width space, and is never displayed in the
output.
In general,
troff(1)
macros accept up to nine arguments, any
extra arguments are ignored.
Most macros in
-mdoc
accept nine arguments and,
in limited cases, arguments may be continued or extended
on the
next line (See
Sx Extensions ) .
A few macros handle quoted arguments (see
Sx Passing Space Characters in an Argument
below).
Most of the
-mdoc
general text domain and manual domain macros are special
in that their argument lists are
parsed
for callable macro names.
This means an argument on the argument list which matches
a general text or manual domain macro name and is determined
to be callable will be executed
or called when it is processed.
In this case,
the argument, although the name of a macro,
is not preceded by a
`.'
(dot).
It is in this manner that many macros are nested; for
example
the option macro,
`.[,]
'
may
call
the flag and argument macros,
`-
'
and
`file ...
'
to specify an optional flag with an argument:
- [-s bytes
]
-
is produced by
.[-s bytes
]
To prevent a two character
string from being interpreted as a macro name, precede
the string with the
escape sequence
`\&'
:
- [-s bytes
]
-
is produced by
.[\&-s \&bytes
]
Here the strings
`-
'
and
`file ...
'
are
not interpreted as macros.
Macros whose argument lists are parsed for callable arguments
are referred to
as parsed and macros which may be called from an argument
list are referred to as callable
throughout this document and in the companion quick reference
manual
mdoc(7).
This is a technical
faux pas
as almost all of the macros in
-mdoc
are parsed, but as it was cumbersome to constantly refer to macros
as being callable and being able to call other macros,
the term parsed has been used.
Passing Space Characters in an Argument
Sometimes it is desirable to give as one argument a string
containing one or more blank space characters.
This may be necessary
to defeat the nine argument limit or to specify arguments to macros
which expect particular arrangement of items in the argument list.
For example,
the function macro
`.Fn expects
'
the first argument to be the name of a function and any
remaining arguments to be function parameters.
As
ANSI C
stipulates the declaration of function parameters in the
parenthesized parameter list, each parameter is guaranteed
to be at minimum a two word string.
For example,
Fa int foo .
There are two possible ways to pass an argument which contains
an embedded space.
Implementation note
Unfortunately, the most convenient way
of passing spaces in between quotes by reassigning individual
arguments before parsing was fairly expensive speed wise
and space wise to implement in all the macros for
AT&T
troff.
It is not expensive for
groff
but for the sake of portability, has been limited
to the following macros which need
it the most:
- Configuration declaration (section 4
-
Sx SYNOPSIS )
-
Begin list (for the width specifier).
- Emphasized text.
-
- Fn Functions (sections two and four).
-
- List items.
-
-
- Literal text.
-
- Symbolic text.
-
- %B
-
Book titles.
- %J
-
Journal names.
- %O
-
Optional notes for a reference.
- %R
-
Report title (in a reference).
- %T
-
Title of article in a book or journal.
One way of passing a string
containing blank spaces is to use the hard or unpaddable space character
`\
,'
that is, a blank space preceded by the escape character
`\'
This method may be used with any macro but has the side effect
of interfering with the adjustment of text
over the length of a line.
Troff
sees the hard space as if it were any other printable character and
cannot split the string into blank or newline separated pieces as one
would expect.
The method is useful for strings which are not expected
to overlap a line boundary.
For example:
- Fn fetch char *str
-
is created by
`.Fn fetch
'
char\ *str
- Fn fetch char *str
-
can also be created by
`.Fn fetch
'
\*qchar *str\*q
If the
`\'
or quotes
were omitted,
`.Fn would
'
see three arguments and
the result would be:
Fn fetch char *str
For an example of what happens when the parameter list overlaps
a newline boundary, see the
Sx BUGS
section.
Trailing Blank Space Characters
Troff
can be confused by blank space characters at the end of a line.
It
is a wise preventive measure to globally remove all blank spaces
from <blank-space><end-of-line> character sequences.
Should the need
arise to force a blank character at the end of a line,
it may be forced with an unpaddable space and the
`\&'
escape character.
For example,
`string\\& .'
Escaping Special Characters
Special characters
like the newline character
`\n'
,
are handled by replacing the
`\'
with
`\e'
(e.g.,
`\en'
)
to preserve
the backslash.
THE ANATOMY OF A MAN PAGE
The body of a man page is easily constructed from a basic
template found in the file
/usr/share/misc/mdoc.template
Several example man pages can also be found
in
/usr/share/examples/mdoc
A manual page template
.\" The following requests are required for all man pages.
.Dd Month day, year
.Os OPERATING_SYSTEM [version/release]
.Dt DOCUMENT_TITLE [section number] [volume]
.Sh NAME
.Nm name
.Nd one line description of name
.Sh SYNOPSIS
.Sh DESCRIPTION
.\" The following requests should be uncommented and
.\" used where appropriate. This next request is
.\" for sections 2 and 3 function return values only.
.\" .Sh RETURN VALUE
.\" This next request is for sections 1, 6, 7 & 8 only
.\" .Sh ENVIRONMENT
.\" .Sh FILES
.\" .Sh EXAMPLES
.\" This next request is for sections 1, 6, 7 & 8 only
.\" (command return values (to shell) and
.\" fprintf/stderr type diagnostics)
.\" .Sh DIAGNOSTICS
.\" The next request is for sections 2 and 3 error
.\" and signal handling only.
.\" .Sh ERRORS
.\" .Sh SEE ALSO
.\" .Sh CONFORMING TO
.\" .Sh HISTORY
.\" .Sh AUTHORS
.\" .Sh BUGS
The first items in the template are the macros
(., ., .
)
the document date,
the operating system the man page or subject source is developed
or modified for,
and the man page title
(in uppercase
)
along with the section of the manual the page
belongs in.
These macros identify the page,
and are discussed below in
Sx TITLE MACROS .
The remaining items in the template are section headers
(.
;
)
of which
Sx NAME ,
Sx SYNOPSIS
and
Sx DESCRIPTION
are mandatory.
The
headers are
discussed in
Sx PAGE STRUCTURE DOMAIN ,
after
presentation of
Sx MANUAL DOMAIN .
Several content macros are used to demonstrate page layout macros;
reading about content macros before page layout macros is
recommended.
TITLE MACROS
The title macros are the first portion of the page structure
domain, but are presented first and separate for someone who
wishes to start writing a man page yesterday.
Three header macros designate the document title or manual page title,
the operating system,
and the date of authorship.
These macros are one called once at the very beginning of the document
and are used to construct the headers and footers only.
- .
-
The document title is the
subject of the man page and must be in
CAPITALS
due to troff
limitations.
The section number may be 1, ..., 8,
and if it is specified,
the volume title may be omitted.
A volume title may be arbitrary or one of the following:
- AMD UNIX Ancestral Manual Documents
-
- SMM UNIX System Manager's Manual
-
- URM UNIX Reference Manual
-
- PRMUNIX Programmer's Manual
-
The default volume labeling is
URM
for sections 1, 6, and 7;
SMM
for section 8;
PRM
for sections 2, 3, 4, and 5.
- .operating_system release#
-
The name of the operating system
should be the common acronym, for example,
BSD
or
FreeBSD
or
ATT
The release should be the standard release
nomenclature for the system specified, for example, 4.3, 4.3+Tahoe, V.3,
V.4.
Unrecognized arguments are displayed as given in the page footer.
For instance, a typical footer might be:
.4.3BSD
or
.FreeBSD 2.2
or for a locally produced set
.CS Department
The Berkeley default,
`.without
'
an argument, has been defined as
BSD
in the
site-specific file
/usr/share/tmac/mdoc/doc-common
It really should default to
LOCAL
Note, if the
`.macro
'
is not present, the bottom left corner of the page
will be ugly.
- .month day, year
-
The date should be written formally:
January 25, 1989
INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS
What's in a name...
The manual domain macro names are derived from the day to day
informal language used to describe commands, subroutines and related
files.
Slightly different variations of this language are used to describe
the three different aspects of writing a man page.
First, there is the description of
-mdoc
macro request usage.
Second is the description of a
UNIX
command
with
-mdoc
macros and third,
the description of a command to a user in the verbal sense;
that is, discussion of a command in the text of a man page.
In the first case,
troff(1)
macros are themselves a type of command;
the general syntax for a troff command is:
.Va argument1 argument2 ... argument9
The
`.is
'
a macro command or request, and anything following it is an argument to
be processed.
In the second case,
the description of a
UNIX
command using the content macros is a
bit more involved;
a typical
Sx SYNOPSIS
command line might be displayed as:
filter
[-flag
]
infile outfile
Here,
filter
is the command name and the
bracketed string
-flag
is a
flag
argument designated as optional by the option brackets.
In
-mdoc
terms,
infile
and
outfile
are
called
arguments
The macros which formatted the above example:
.Nm filter
.Op Fl flag
.Ar infile outfile
In the third case, discussion of commands and command syntax
includes both examples above, but may add more detail.
The
arguments
infile
and
outfile
from the example above might be referred to as
operands
or
file arguments
Some command-line argument lists are quite long:
- make
-
[-eiknqrstv
]
[-D variable
]
[-d flags
]
[-f makefile
]
-words
[-I directory
]
[-j max_jobs
]
[variable=value
]
-words
[target ...
]
Here one might talk about the command
make
and qualify the argument
makefile
as an argument to the flag,
-f
or discuss the optional
file
operand
target
In the verbal context, such detail can prevent confusion,
however the
-mdoc
package
does not have a macro for an argument
to
a flag.
Instead the
`file ...
'
argument
macro is used for an operand or file argument like
target
as well as an argument to a flag like
variable
The make command line was produced from:
.Nm make
.Op Fl eiknqrstv
.Op Fl D Ar variable
.Op Fl d Ar flags
.Op Fl f Ar makefile
.Op Fl I Ar directory
.Op Fl j Ar max_jobs
.Op Ar variable=value
.Bk -words
.Op Ar target ...
.Ek
The
`.and
'
`.macros
'
are explained in
Sx Keeps .
General Syntax
The manual domain and general text domain macros share a similar
syntax with a few minor deviations:
`.file ...
'
`.-
'
`.man mdoc.samples
'
and
`.differ
'
only when called without arguments;
`.Fn and
'
`.impose
'
an order on their argument lists
and the
`.[and]
'
`.Fn macros
'
have nesting limitations.
All content macros
are capable of recognizing and properly handling punctuation,
provided each punctuation character is separated by a leading space.
If a request is given:
.sptr, ptr),
The result is:
sptr, ptr),
The punctuation is not recognized and all is output in the
literal font. If the punctuation is separated by a leading
white space:
.sptr , ptr ) ,
The result is:
sptr , ptr
The punctuation is now recognized and is output in the
default font distinguishing it from the strings in literal font.
To remove the special meaning from a punctuation character
escape it with
`\&'
Troff
is limited as a macro language, and has difficulty
when presented with a string containing
a member of the mathematical, logical or
quotation set:
{+,-,/,*,%,<,>,<=,>=,=,==,&,`,',"}
The problem is that
troff
may assume it is supposed to actually perform the operation
or evaluation suggested by the characters.
To prevent the accidental evaluation of these characters,
escape them with
`\&'
Typical syntax is shown in the first content macro displayed
below,
`.
'
MANUAL DOMAIN
Address Macro
The address macro identifies an address construct
of the form addr1[,addr2[,addr3]].
Usage: .address ... [ .,:;()[]?! ]
- .addr1
-
addr1
- .addr1
-
addr1
- .addr1 , file2
-
addr1 , file2
- .f1 , f2 , f3:
-
f1 , f2 , f3
- .addr ) ),
-
addr ) )
It is an error to call
`.without
'
arguments.
`.is
'
callable by other macros and is parsed.
Author Name
The
`.An macro
'
is used to specify the name of the author of the item being
documented, or the name of the author of the actual manual page.
Any remaining arguments after the name information are assumed
to be punctuation.
Usage: .An author_name [ .,:;()[]?! ]
- .An Joe Author
-
An Joe Author
- .An Joe Author,
-
An Joe Author ,
- .An Joe Author Aq<EMAIL_ADDRESS>-
An Joe Author Aq<EMAIL_ADDRESS>- .An Joe Author ) ),
-
An Joe Author ) ) ,
The
`.An macro
'
is parsed and is callable.
It is an error to call
`.An without
'
any arguments.
Argument Macro
The
`.file ...
'
argument
macro may be used whenever
a command-line argument is referenced.
Usage: .argument ... [ .,:;()[]?! ]
- .file ...
-
file ...
- .file1
-
file1
- .file1
-
file1
- .file1 file2
-
file1 file2
- .f1 f2 f3:
-
f1 f2 f3
- .file ) ),
-
file ) )
If
`.file ...
'
is
called without arguments,
`file ...
'
is
assumed.
The
`.file ...
'
macro
is parsed and is callable.
Configuration Declaration (section four only)
The
`.macro
'
is used to demonstrate a
config(8)
declaration for a device interface in a section four manual.
This macro accepts quoted arguments (double quotes only).
- device le0 at scode?
-
produced by:
`.device
'
le0 at scode? .
Command Modifier
The command modifier is identical to the
`.-
'
(flag)
command with the exception
the
`.macro
'
does not assert a dash
in front of every argument.
Traditionally flags are marked by the
preceding dash, some commands or subsets of commands do not use them.
Command modifiers may also be specified in conjunction with interactive
commands such as editor commands.
See
Sx Flags .
Defined Variables
A variable which is defined in an include file is specified
by the macro
`.
'
Usage: .defined_variable ... [ .,:;()[]?! ]
- .MAXHOSTNAMELEN
-
MAXHOSTNAMELEN
- .TIOCGPGRP )
-
TIOCGPGRP
It is an error to call
`.without
'
arguments.
`.is
'
parsed and is callable.
Errno's (Section two only)
The
`.Er errno
'
macro specifies the error return value
for section two library routines.
The second example
below shows
`.Er used
'
with the
`.Bq general
'
text domain macro, as it would be used in
a section two manual page.
Usage: .Er ERRNOTYPE ... [ .,:;()[]?! ]
- .Er ENOENT
-
Er ENOENT
- .Er ENOENT );
-
Er ENOENT ) ;
- .Bq Er ENOTDIR
-
Bq Er ENOTDIR
It is an error to call
`.Er without
'
arguments.
The
`.Er macro
'
is parsed and is callable.
Environment Variables
The
`.macro
'
specifies an environment variable.
Usage: .argument ... [ .,:;()[]?! ]
- .DISPLAY
-
DISPLAY
- .PATH
-
PATH
- .PRINTER ) ),
-
PRINTER ) )
It is an error to call
`.without
'
arguments.
The
`.macro
'
is parsed and is callable.
Function Argument
The
`.Fa macro
'
is used to refer to function arguments (parameters)
outside of the
Sx SYNOPSIS
section of the manual or inside
the
Sx SYNOPSIS
section should a parameter list be too
long for the
`.Fn macro
'
and the enclosure macros
`.Fo and
'
`.Fc must
'
be used.
`.Fa may
'
also be used to refer to structure members.
Usage: .Fa function_argument ... [ .,:;()[]?! ]
- .Fa d_namlen ) ),
-
Fa d_namlen ) ) ,
- .Fa iov_len
-
Fa iov_len
It is an error to call
`.Fa without
'
arguments.
`.Fa is
'
parsed and is callable.
Function Declaration
The
`.Fd macro
'
is used in the
Sx SYNOPSIS
section with section two or three
functions.
The
`.Fd macro
'
does not call other macros and is not callable by other
macros.
Usage: .Fd include_file (or defined variable)
In the
Sx SYNOPSIS
section a
`.Fd request
'
causes a line break if a function has already been presented
and a break has not occurred.
This leaves a nice vertical space
in between the previous function call and the declaration for the
next function.
Flags
The
`.-
'
macro
handles command-line flags.
It prepends
a dash,
`-'
,
to the flag.
For interactive command flags, which
are not prepended with a dash, the
`.(command
'
modifier)
macro is identical, but without the dash.
Usage: .-argument ... [ .,:;()[]?! ]
- .-
-
-
- .-cfv
-
-cfv
- .-cfv
-
-cfv
- .-s v t
-
-s v t
- .--,
-
--
- .-xyz ),
-
-xyz )
The
`.-
'
macro
without any arguments results
in a dash representing stdin/stdout.
Note that giving
`.-
'
a
single dash, will result in two dashes.
The
`.-
'
macro
is parsed and is callable.
Functions (library routines)
The .Fn macro is modeled on ANSI C conventions.
Usage: .Fn [type] function [[type] parameters ... [ .,:;()[]?! ]]
- .Fn getchar
-
Fn getchar
- .Fn strlen ) ,
-
Fn strlen ) ,
- .Fn \*qint align\*q \*qconst * char *sptrs\*q
-
Fn int align const * char *sptrs ,
It is an error to call
`.Fn without
'
any arguments.
The
`.Fn macro
'
is parsed and is callable,
note that any call to another macro signals the end of
the
`.Fn call
'
(it will close-parenthesis at that point).
For functions that have more than eight parameters (and this
is rare), the
macros
`.Fo (function
'
open)
and
`.Fc (function
'
close)
may be used with
`.Fa (function
'
argument)
to get around the limitation.
For example:
.Fo "int res_mkquery"
.Fa "int op"
.Fa "char *dname"
.Fa "int class"
.Fa "int type"
.Fa "char *data"
.Fa "int datalen"
.Fa "struct rrec *newrr"
.Fa "char *buf"
.Fa "int buflen"
.Fc
Produces:
Fo int res_mkquery
Fa int op
Fa char *dname
Fa int class
Fa int type
Fa char *data
Fa int datalen
Fa struct rrec *newrr
Fa char *buf
Fa int buflen
Fc
The
`.Fo and
'
`.Fc macros
'
are parsed and are callable.
In the
Sx SYNOPSIS
section, the function will always begin at
the beginning of line.
If there is more than one function
presented in the
Sx SYNOPSIS
section and a function type has not been
given, a line break will occur, leaving a nice vertical space
between the current function name and the one prior.
At the moment,
`.Fn does
'
not check its word boundaries
against troff line lengths and may split across a newline
ungracefully.
This will be fixed in the near future.
Function Type
This macro is intended for the
Sx SYNOPSIS
section.
It may be used
anywhere else in the man page without problems, but its main purpose
is to present the function type in kernel normal form for the
Sx SYNOPSIS
of sections two and three
(it causes a line break allowing the function name to appear
on the next line).
Usage: .Ft type ... [ .,:;()[]?! ]
- .Ft struct stat
-
Ft struct stat
The
`.Ft request
'
is not callable by other macros.
Interactive Commands
The
`.macro
'
designates an interactive or internal command.
Usage: .argument ... [ .,:;()[]?! ]
- .:wq
-
:wq
- .do while {...}
-
do while {...}
- .setenv , unsetenv
-
setenv , unsetenv
It is an error to call
`.without
'
arguments.
The
`.macro
'
is parsed and is callable.
Name Macro
The
`.man mdoc.samples
'
macro
is used for the document title or subject name.
It has the peculiarity of remembering the first
argument it was called with, which should
always be the subject name of the page.
When called without
arguments,
`.man mdoc.samples
'
regurgitates
this initial name for the sole purpose
of making less work for the author.
Note:
a section two
or three document function name is addressed with the
`.man mdoc.samples
'
in
the
Sx NAME
section, and with
`.Fn in
'
the
Sx SYNOPSIS
and remaining sections.
For interactive commands, such as the
`while'
command keyword in
csh(1),
the
`.macro
'
should be used.
While the
`.is
'
nearly identical
to
`.man mdoc.samples
'
it can not recall the first argument it was invoked with.
Usage: .argument ... [ .,:;()[]?! ]
- .mdoc.sample
-
mdoc.sample
- .\-mdoc
-
-mdoc
- .foo ) ),
-
foo ) )
- .man mdoc.samples
-
man mdoc.samples
The
`.man mdoc.samples
'
macro
is parsed and is callable.
Options
The
`.[macro]
'
places option brackets around the any remaining arguments on the command
line, and places any
trailing punctuation outside the brackets.
The macros
`.]
'
and
`.[may
'
be used across one or more lines.
Usage: .[options ... [ .,:;()[]?! ]]
- .[[
- .[-k
]
-
]
]
-
[-k
]
- .[-k ) .
]
-
[-k
]
- .[-k kookfile
]
-
[-k kookfile
]
- .[-k kookfile ,
]
-
[-k kookfile
]
- .[objfil [corfil
]
]
-
[objfil [corfil
]
]
- .[-c objfil [corfil ,
]
]
-
[-c objfil [corfil
]
]
- .[word1 word2]
-
[word1 word2]
The
`.]
'
and
`.[macros:
'
.Oo
.Op Fl k Ar kilobytes
.Op Fl i Ar interval
.Op Fl c Ar count
.Oc
Produce:
[[-k kilobytes
]
[-i interval
]
[-c count
]
]
The macros
`.[,]
'
`.]
'
and
`.[are
'
parsed and are callable.
Pathnames
The
`.macro
'
formats pathnames or filenames.
Usage: .pathname [ .,:;()[]?! ]
- ./usr/share
-
/usr/share
- ./tmp/fooXXXXX )
-
/tmp/fooXXXXX )
The
`.macro
'
is parsed and is callable.
Variables
Generic variable reference:
Usage: .variable ... [ .,:;()[]?! ]
- .count
-
count
- .settimer
-
settimer
- .int *prt ):
-
int *prt )
- .char s ] ) ),
-
char s ] ) )
It is an error to call
`.without
'
any arguments.
The
`.macro
'
is parsed and is callable.
Manual Page Cross References
The
`.macro
'
expects the first argument to be
a manual page name, and the second argument, if it exists,
to be either a section page number or punctuation.
Any
remaining arguments are assumed to be punctuation.
Usage: .man_page[1,...,8][ .,:;()[]?! ]
- .mdoc
-
mdoc
- .mdoc
-
mdoc,
- .mdoc(7)
-
mdoc(7)
- .mdoc(7)))
-
mdoc(7))),
The
`.macro
'
is parsed and is callable.
It is an error to call
`.without
'
any arguments.
GENERAL TEXT DOMAIN
AT&T Macro
Usage: .At [v6 | v7 | 32v | V.1 | V.4] ... [ .,:;()[]?! ]
- .At
-
AT&T System
- .AT&T System
v6 .
-
AT&T System
v6 .
The
`.AT&T System
'
macro
is
not
parsed and
not
callable
It accepts at most two arguments.
BSD Macro
Usage: .BSD [Version/release] ... [ .,:;()[]?! ]
- .Bx
-
BSD
- .BSD 4.3 .
-
BSD 4.3
The
`.BSD macro
'
is parsed and is callable.
FreeBSD Macro
Usage: .Fx Version.release ... [ .,:;()[]?! ]
- .Fx 2.2 .
-
Fx 2.2 .
The
`.Fx macro
'
is
not
parsed and
not
callable
It accepts at most two arguments.
UNIX Macro
Usage: .UNIX
- .Ux
-
UNIX
The
`.UNIX
'
macro
is parsed and is callable.
Enclosure and Quoting Macros
The concept of enclosure is similar to quoting.
The object being to enclose one or more strings between
a pair of characters like quotes or parentheses.
The terms quoting and enclosure are used
interchangeably throughout this document.
Most of the
one line enclosure macros end
in small letter
`q'
to give a hint of quoting, but there are a few irregularities.
For each enclosure macro
there is also a pair of open and close macros which end
in small letters
`o'
and
`c'
respectively.
These can be used across one or more lines of text
and while they have nesting limitations, the one line quote macros
can be used inside
of them.
Quote Close Open Function Result
.Aq .Ac .Ao Angle Bracket Enclosure<string>
.Bq .Bc .Bo Bracket Enclosure [string]
.Dq .Dc .Do Double Quote ``string''
.Ec .Eo Enclose String (in XX) XXstringXX
.Pq .Pc .Po Parenthesis Enclosure (string)
.Ql Quoted Literal `st' or string
.Qq .Qc .Qo Straight Double Quote "string"
.Sq .Sc .So Single Quote `string'
Except for the irregular macros noted below, all
of the quoting macros are parsed and callable.
All handle punctuation properly, as long as it
is presented one character at a time and separated by spaces.
The quoting macros examine opening and closing punctuation
to determine whether it comes before or after the
enclosing string
This makes some nesting possible.
- .Ec , .Eo These macros expect the first argument to be the
-
opening and closing strings respectively.
- .`The'
-
quoted literal macro behaves differently for
troff
than
nroff.
If formatted with
nroff,
a quoted literal is always quoted.
If formatted with
troff, an item is quoted only if the width
of the item is less than three constant width characters.
This is to make short strings more visible where the font change
to literal (constant width) is less noticeable.
- .The prefix macro is not callable, but it is parsed:
-
- .( Fa name2
-
becomes
( Fa name2
The
`.(no
'
space) macro performs the analogous suffix function.
Examples of quoting:
- .Aq Aq
- .Aq ctype.h ),
-
-
Aq Ar ctype.h ) ,
- .Bq Bq
- .Bq Greek , French .
-
-
Bq Em Greek , French .
- .````
- .``string abc .''
-
''
''
-
``string abc''
- .``'^[A-Z]'''
-
``'^[A-Z]'''
- .`man'
-
mdoc
`man'
mdoc
- .Qq Qq
- .Qq string ) ,
-
-
Qq string ) ,
- .Qq string ),
-
Qq string Ns ),
- .``
- .`string'
-
'
'
-
`string'
For a good example of nested enclosure macros, see the
`.[option]
'
macro.
It was created from the same
underlying enclosure macros as those presented in the list
above.
The
`.
'
and
`.
'
extended
argument list macros
were also built from the same underlying routines and are a good
example of
-mdoc
macro usage at its worst.
No-[or Normal Text Macro]
The macro
`.is
'
a hack for words in a macro command line which should
not
be formatted and follows the conventional syntax
for content macros.
Space Macro
The
`.macro
'
eliminates unwanted spaces in between macro requests.
It is useful for old style argument lists where there is no space
between the flag and argument:
- .[-I directory
]
-
produces
[-I directory
]
Note: the
`.macro
'
always invokes the
`.macro
'
after eliminating the space unless another macro name
follows it.
The macro
`.is
'
parsed and is callable.
Section Cross References
The
`.Sx macro
'
designates a reference to a section header
within the same document.
It is parsed and is callable.
- .Sx FILES
-
Sx FILES
References and Citations
The following macros make a modest attempt to handle references.
At best, the macros make it convenient to manually drop in a subset of
refer style references.
- .Rs
-
Reference Start.
Causes a line break and begins collection
of reference information until the
reference end macro is read.
- .Re
-
Reference End.
The reference is printed.
- .%A
-
Reference author name, one name per invocation.
- .%B
-
Book title.
- .%C
-
City/place.
- .%D
-
Date.
- .%J
-
Journal name.
- .%N
-
Issue number.
- .%O
-
Optional information.
- .%P
-
Page number.
- .%R
-
Report name.
- .%T
-
Title of article.
- .%V
-
Volume(s).
The macros beginning with
`%'
are not callable, and are parsed only for the trade name macro which
returns to its caller.
(And not very predictably at the moment either.)
The purpose is to allow trade names
to be pretty printed in
troffNs/NsXrditroff
output.
Return Values
The
`.Rv macro
'
generates text for use in the
Sx RETURN VALUE
section.
Usage: .Rv [-std function]
`.Rv -std
'
atexit
will generate the following text:
Rv -std atexit
The
-std
option is valid only for manual page sections 2 and 3.
Trade Names (or Acronyms and Type Names)
The trade name macro is generally a small caps macro for
all uppercase words longer than two characters.
Usage: .symbol ... [ .,:;()[]?! ]
- .DEC
-
DEC
- .ASCII
-
ASCII
The
`.macro
'
is parsed and is callable by other macros.
Extended Arguments
The
`.
'
and
`.
'
macros
allow one to extend an argument list
on a macro boundary.
Argument lists cannot
be extended within a macro
which expects all of its arguments on one line such
as
`.[]
'
Here is an example of
`.
'
using
the space mode macro to turn spacing off:
.Sm off
.It Xo Sy I Ar operation
.No \en Ar count No \en
.Xc
.Sm on
Produces
-
I operation
\n count \n
-
Another one:
.Sm off
.It Cm S No / Ar old_pattern Xo
.No / Ar new_pattern
.No / Op Cm g
.Xc
.Sm on
Produces
- S / old_pattern
/ new_pattern
/ [g
]
-
Another example of
`.
'
and
using enclosure macros:
Test the value of a variable.
.It Xo
.Ic .ifndef
.Oo \&! Oc Ns Ar variable
.Op Ar operator variable ...
.Xc
Produces
-
.ifndef
[! variable
]
[operator variable ...
]
-
All of the above examples have used the
`.
'
macro
on the argument list of the
`.
'
(list-item)
macro.
The extend macros are not used very often, and when they are
it is usually to extend the list-item argument list.
Unfortunately, this is also where the extend macros are the
most finicky.
In the first two examples, spacing was turned off;
in the third, spacing was desired in part of the output but
not all of it.
To make these macros work in this situation make sure
the
`.
'
and
`.
'
macros
are placed as shown in the third example.
If the
`.
'
macro
is not alone on the
`.
'
argument
list, spacing will be unpredictable.
The
`.(no
'
space macro)
must not occur as the first or last macro on a line
in this situation.
Out of 900 manual pages (about 1500 actual pages)
currently released with
BSD only fifteen use the
`.
'
macro.
PAGE STRUCTURE DOMAIN
Section Headers
The first three
`.
section
'
header macros
list below are required in every
man page.
The remaining section headers
are recommended at the discretion of the author
writing the manual page.
The
`.
macro
'
can take up to nine arguments.
It is parsed and but is not callable.
- .
NAME
The
`.
NAME
'
macro is mandatory.
If not specified,
the headers, footers and page layout defaults
will not be set and things will be rather unpleasant.
The
Sx NAME
section consists of at least three items.
The first is the
`.man mdoc.samples
'
name
macro naming the subject of the man page.
The second is the Name Description macro,
`. - ,
'
which separates the subject
name from the third item, which is the description.
The
description should be the most terse and lucid possible,
as the space available is small.
.Sh SYNOPSIS
The
Sx SYNOPSIS
section describes the typical usage of the
subject of a man page.
The macros required
are either
`.Nm'
,
`.Cd'
,
`.Fn'
,
(and possibly
`.Fo'
,
`.Fc'
,
`.Fd'
,
`.Ft'
macros).
The function name
macro
`.Fn'
is required
for manual page sections 2 and 3, the command and general
name macro
`.man mdoc.samples
'
is
required for sections 1, 5, 6, 7, 8.
Section 4 manuals require a
`.Nm'
,
`.Fd'
or a
`.Cd'
configuration device usage macro.
Several other macros may be necessary to produce
the synopsis line as shown below:
cat
[-benstuv
]
[-
]
file ...
The following macros were used:
.cat
.[-benstuv
]
.[-
]
.file ...
Note
The macros
`.[,]
'
`.-
'
and
`.file ...
'
recognize
the pipe bar character
`|'
so a command line such as:
".[-a | -b
]
will not go orbital.
Troff
normally interprets a | as a special operator.
See
Sx PREDEFINED STRINGS
for a usable |
character in other situations.
- .
DESCRIPTION
In most cases the first text in the
Sx DESCRIPTION
section
is a brief paragraph on the command, function or file,
followed by a lexical list of options and respective
explanations.
To create such a list, the
`.
'
begin-list,
`.
- list-item
'
- and
`.
'
end-list
macros are used (see
Sx Lists and Columns
below).
The following
`.
section
'
headers are part of the
preferred manual page layout and must be used appropriately
to maintain consistency.
They are listed in the order
in which they would be used.
- .
ENVIRONMENT
The
Sx ENVIRONMENT
section should reveal any related
environment
variables and clues to their behavior and/or usage.
.Sh EXAMPLES
There are several ways to create examples.
See
the
Sx EXAMPLES
section below
for details.
.Sh FILES
Files which are used or created by the man page subject
should be listed via the
`.macro
'
in the
Sx FILES
section.
.Sh SEE ALSO
References to other material on the man page topic and
cross references to other relevant man pages should
be placed in the
Sx SEE ALSO
section.
Cross references
are specified using the
`.macro.
'
Cross references in the
Sx SEE ALSO
section should be sorted by section number, and then
placed in alphabetical order and comma separated. For example:
ls(1),
ps(1),
group(5),
passwd(5).
At this time
refer(1)
style references are not accommodated.
.Sh CONFORMING TO
If the command, library function or file adheres to a
specific implementation such as
St -p1003.2
or
St -ansiC
this should be noted here.
If the
command does not adhere to any standard, its history
should be noted in the
Sx HISTORY
section.
.Sh HISTORY
Any command which does not adhere to any specific standards
should be outlined historically in this section.
.Sh AUTHORS
Credits, if need be, should be placed here.
.Sh DIAGNOSTICS
Diagnostics from a command should be placed in this section.
.Sh ERRORS
Specific error handling, especially from library functions
(man page sections 2 and 3) should go here.
The
`.Er macro
'
is used to specify an errno.
.Sh BUGS
Blatant problems with the topic go here...
User specified
`.
sections
'
may be added,
for example, this section was set with:
.Sh PAGE STRUCTURE DOMAIN
Paragraphs and Line Spacing.
- .
- The
`.
'
paragraph
command may
be used to specify a line space where necessary.
The macro is not necessary after a
`.
or
'
`.
macro
'
or before
a
`.
'
macro.
(The
`.
'
macro
asserts a vertical distance unless the -compact flag is given).
Keeps
The only keep that is implemented at this time is for words.
The macros are
`.(begin-keep)
'
and
`.(end-keep).
'
The only option that
`.accepts
'
is
-words
and is useful for preventing line breaks in the middle of options.
In the example for the make command-line arguments (see
Sx What's in a name ) ,
the keep prevented
nroff
from placing up the
flag and the argument
on separate lines.
(Actually, the option macro used to prevent this from occurring,
but was dropped when the decision (religious) was made to force
right justified margins in
troff
as options in general look atrocious when spread across a sparse
line.
More work needs to be done with the keep macros, a
-line
option needs to be added.)
Examples and Displays
There are five types of displays, a quickie one line indented display
`.D1'
,
a quickie one line literal display
`.
,
'
and a block literal, block filled and block ragged which use
the
`.
'
begin-display
and
`.
'
end-display
macros.
- .D1
(D-one) Display one line of indented text.
- This macro is parsed, but it is not callable.
-ldghfstru
The above was produced by:
.
-ldghfstru
- .
(D-ell)
- Display one line of indented
literal
text.
The
`.
example
'
macro has been used throughout this
file.
It allows
the indent (display) of one line of text.
Its default font is set to
constant width (literal) however
it is parsed and will recognized other macros.
It is not callable however.
% ls -ldg /usr/local/bin
The above was produced by
.
% ls -ldg /usr/local/bin
- .
- Begin-display.
The
`.
'
display
must be ended with the
`.
'
macro.
Displays may be nested within displays and
lists.
`.
'
has
the following syntax:
".
The display-type must be one of the following four types and
may have an offset specifier for indentation:
`.
'
- -ragged
- Display a block of text as typed,
right (and left) margin edges are left ragged.
- -filled
- Display a filled (formatted) block.
The block of text is formatted (the edges are filled -
not left unjustified).
- -literal
- Display a literal block, useful for source code or
simple tabbed or spaced text.
- -file file_name
- The filename following the
-file
flag is read and displayed.
Literal mode is
asserted and tabs are set at 8 constant width character
intervals, however any
troff/NsNm-mdoc
commands in file will be processed.
- -offset string
- If
-offset
is specified with one of the following strings, the string
is interpreted to indicate the level of indentation for the
forthcoming block of text:
- left
- Align block on the current left margin,
this is the default mode of
`.
'
- center
- Supposedly center the block.
At this time
unfortunately, the block merely gets
left aligned about an imaginary center margin.
- indent
- Indents by one default indent value or tab.
The default
indent value is also used for the
`.D1'
display so one is guaranteed the two types of displays
will line up.
This indent is normally set to 6n or about two
thirds of an inch (six constant width characters).
- indent-two
- Indents two times the default indent value.
- right
- This
left
aligns the block about two inches from
the right side of the page.
This macro needs
work and perhaps may never do the right thing by
troff.
- ".Ed"
- End-display.
Font Modes
There are five macros for changing the appearance of the manual page text:
- .Text may be stressed or emphasized with the
`.
- macro.
'
The usual font for emphasis is italic.
Usage: .argument ... [ .,:;()[]?! ]
- .does not
does not
- .exceed 1024 .
exceed 1024
- .vide infra ) ) ,
vide infra ) )
- The
`.macro
'
is parsed and is callable.
It is an error to call
`.without
'
arguments.
- .The
`.
- literal
'
macro may be used for special characters,
variable constants, anything which should be displayed as it
would be typed.
Usage: .argument ... [ .,:;()[]?! ]
- .\en
\n
- .M1 M2 M3;
M1 M2 M3
- .cntrl-D ),
cntrl-D )
- .1024 ...
1024 ...
- The
`.macro
'
is parsed and is callable.
- .The symbolic emphasis macro is generally a boldface macro in
- either the symbolic sense or the traditional English usage.
Usage: .symbol ... [ .,:;()[]?! ]
- .Important Notice
Important Notice
- The
`.macro
'
is parsed and is callable.
Arguments to
`.may
'
be quoted.
- .Bf Begin font mode.
- The
`.Bf font
'
mode must be ended with the
`.Ef macro.
'
Font modes may be nested within other font modes.
`.Bf has
'
the following syntax:
".Bf font-mode
The font-mode must be one of the following three types:
`.Bf
'
- | -emphasis
- Same as if the
`.macro
'
was used for the entire block of text.
- | -literal
- Same as if the
`.macro
'
was used for the entire block of text.
- | -symbolic
- Same as if the
`.macro
'
was used for the entire block of text.
- ".Ef"
- End font mode.
Tagged Lists and Columns
There are several types of lists which may be initiated with the
`.Bl'
begin-list macro.
Items within the list
are specified with the
`.It'
item macro and
each list must end with the
`.El'
macro.
Lists may be nested within themselves and within displays.
Columns may be used inside of lists, but lists are unproven
inside of columns.
In addition, several list attributes may be specified such as
the width of a tag, the list offset, and compactness
(blank lines between items allowed or disallowed).
Most of this document has been formatted with a tag style list
(-tag
)
For a change of pace, the list-type used to present the list-types
is an over-hanging list
(-ohang
)
This type of list is quite popular with
TeX
users, but might look a bit funny after having read many pages of
tagged lists.
The following list types are accepted by
`.Bl'
:
- -bullet
- -item
- -enum
- These three are the simplest types of lists.
Once the
`.Bl'
macro has been given, items in the list are merely
indicated by a line consisting solely of the
`.It'
macro.
For example, the source text for a simple enumerated list
would look like:
.Bl -enum -compact
.It
Item one goes here.
.It
And item two here.
.It
Lastly item three goes here.
.El
The results:
-
Item one goes here.
-
And item two here.
-
Lastly item three goes here.
A simple bullet list construction:
.Bl -bullet -compact
.It
Bullet one goes here.
.It
Bullet two here.
.El
Produces:
-
Bullet one goes here.
-
Bullet two here.
- -tag
- -diag
- -hang
- -ohang
- -inset
- These list-types collect arguments specified with the
`.
- macro
'
- and create a label which may be
inset
into the forthcoming text,
hanged
from the forthcoming text,
overhanged
from above and not indented or
tagged
This
list was constructed with the
`-ohang
'
list-type.
The
`.
- macro
'
- is parsed only for the inset, hang
and tag list-types and is not callable.
Here is an example of inset labels:
- Tag
- The tagged list (also called a tagged paragraph) is the
most common type of list used in the Berkeley manuals.
- Diag
- Diag lists create section four diagnostic lists
and are similar to inset lists except callable
macros are ignored.
- Hang
- Hanged labels are a matter of taste.
- Ohang
- Overhanging labels are nice when space is constrained.
- Inset
- Inset labels are useful for controlling blocks of
paragraphs and are valuable for converting
-mdoc
manuals to other formats.
Here is the source text which produced the above example:
.Bl -inset -offset indent
.It Em Tag
The tagged list (also called a tagged paragraph) is the
most common type of list used in the Berkeley manuals.
.It Em Diag
Diag lists create section four diagnostic lists
and are similar to inset lists except callable
macros are ignored.
.It Em Hang
Hanged labels are a matter of taste.
.It Em Ohang
Overhanging labels are nice when space is constrained.
.It Em Inset
Inset labels are useful for controlling blocks of
paragraphs and are valuable for converting
.Nm -mdoc
manuals to other formats.
.El
Here is a hanged list with two items:
- Hanged
- labels appear similar to tagged lists when the
label is smaller than the label width.
- Longer hanged list labels
- blend in to the paragraph unlike
tagged paragraph labels.
And the unformatted text which created it:
.Bl -hang -offset indent
.It Em Hanged
labels appear similar to tagged lists when the
label is smaller than the label width.
.It Em Longer hanged list labels
blend in to the paragraph unlike
tagged paragraph labels.
.El
The tagged list which follows uses an optional width specifier to control
the width of the tag.
- SL
- sleep time of the process (seconds blocked)
- PAGEIN
- number of disk
I/O 's
resulting from references
by the process to pages not loaded in core.
- UID
- numerical user-id of process owner
- PPID
- numerical ID of parent of process process priority
(nonpositive when in noninterruptible wait)
The raw text:
.Bl -tag -width "PAGEIN" -compact -offset indent
.It SL
sleep time of the process (seconds blocked)
.It PAGEIN
number of disk
.Tn I/O Ns 's
resulting from references
by the process to pages not loaded in core.
.It UID
numerical user ID of process owner
.It PPID
numerical ID of parent of process process priority
(nonpositive when in noninterruptible wait)
.El
Acceptable width specifiers:
- -width Fl
- sets the width to the default width for a flag.
All callable
macros have a default width value.
The
`.-
'
value is presently
set to ten constant width characters or about five sixth of
an inch.
- -width 24n
- sets the width to 24 constant width characters or about two
inches.
The
`n'
is absolutely necessary for the scaling to work correctly.
- -width ENAMETOOLONG
- sets width to the constant width length of the
string given.
- -width \*qint mkfifo\*q
- again, the width is set to the constant width of the string
given.
If a width is not specified for the tag list type, the first
time
`.
'
is
invoked, an attempt is made to determine an appropriate
width.
If the first argument to
`.It'
is a callable macro, the default width for that macro will be used
as if the macro name had been supplied as the width.
However,
if another item in the list is given with a different callable
macro name, a new and nested list is assumed.
PREDEFINED STRINGS
The following strings are predefined as may be used by
preceding with the troff string interpreting sequence
`\*(xx'
where
xx
is the name of the defined string or as
`\*x'
where
x
is the name of the string.
The interpreting sequence may be used any where in the text.
- String Nroff Troff
- <= Ta <= Ta <=
- >= Ta >= Ta >=;
- Rq Ta '' Ta ”
- Lq Ta `` Ta “
- ua Ta ^ Ta ^
- aa Ta ' Ta '
- ga Ta ` Ta `
- q Ta Ta "
- Pi Ta pi Ta Pi
- Ne Ta != Ta !=
- Le Ta <= Ta <=
- Ge Ta >= Ta >=;
- Lt Ta < Ta >
- Gt Ta > Ta <
- Pm Ta +- Ta ±
- If Ta infinity Ta ∞
- Na Ta NaN Ta NaN
- Ba Ta | Ta |
Note
The string named
`q'
should be written as
`\*q'
since it is only one char.
DIAGNOSTICS
The debugging facilities for
-mdoc
are limited, but can help detect subtle errors such
as the collision of an argument name with an internal
register or macro name.
(A what?)
A register is an arithmetic storage class for
troff
with a one or two character name.
All registers internal to
-mdoc
for
troff
and
ditroff
are two characters and
of the form <upper_case><lower_case> such as
`file ...
'
<lower_case><upper_case> as
`aR'
or
<upper or lower letter><digit> as
`C1'
And adding to the muddle,
troff
has its own internal registers all of which are either
two lowercase characters or a dot plus a letter or metacharacter
character.
In one of the introduction examples, it was shown how to
prevent the interpretation of a macro name with the escape sequence
`\&'
This is sufficient for the internal register names also.
If a nonescaped register name is given in the argument list of a request,
unpredictable behavior will occur.
In general, any time huge portions
of text do not appear where expected in the output, or small strings
such as list tags disappear, chances are there is a misunderstanding
about an argument type in the argument list.
Your mother never intended for you to remember this evil stuff - so here
is a way to find out whether or not your arguments are valid: The
`.Db (debug)
'
macro displays the interpretation of the argument list for most
macros.
Macros such as the
`.
'
(paragraph)
macro do not contain debugging information.
All of the callable macros do,
and it is strongly advised whenever in doubt,
turn on the
`.Db macro.
'
Usage: .Db [on | off]
An example of a portion of text with
the debug macro placed above and below an
artificially created problem (a flag argument
`aC'
which should be
`\&aC'
in order to work):
.Db on
.Op Fl aC Ar file )
.Db off
The resulting output:
DEBUGGING ON
DEBUG(argv) MACRO: `.Op' Line #: 2
Argc: 1 Argv: `Fl' Length: 2
Space: `' Class: Executable
Argc: 2 Argv: `aC' Length: 2
Space: `' Class: Executable
Argc: 3 Argv: `Ar' Length: 2
Space: `' Class: Executable
Argc: 4 Argv: `file' Length: 4
Space: ` ' Class: String
Argc: 5 Argv: `)' Length: 1
Space: ` ' Class: Closing Punctuation or suffix
MACRO REQUEST: .Op Fl aC Ar file )
DEBUGGING OFF
The first line of information tells the name of the calling
macro, here
`.[,]
'
and the line number it appears on.
If one or more files are involved
(especially if text from another file is included), the line number
may be bogus.
If there is only one file, it should be accurate.
The second line gives the argument count, the argument
(`-
'
)
and
its length.
If the length of an argument is two characters, the
argument is tested to see if it is executable (unfortunately, any
register which contains a nonzero value appears executable).
The third line gives the space allotted for a class, and the
class type.
The problem here is the argument aC should not be
executable.
The four types of classes are string, executable, closing
punctuation and opening punctuation.
The last line shows the entire
argument list as it was read.
In this next example, the offending
`aC'
is escaped:
.Db on
.Em An escaped \&aC
.Db off
DEBUGGING ON
DEBUG(fargv) MACRO: `.Em' Line #: 2
Argc: 1 Argv: `An' Length: 2
Space: ` ' Class: String
Argc: 2 Argv: `escaped' Length: 7
Space: ` ' Class: String
Argc: 3 Argv: `aC' Length: 2
Space: ` ' Class: String
MACRO REQUEST: .Em An escaped &aC
DEBUGGING OFF
The argument
`\&aC'
shows up with the same length of 2 as the
`\&'
sequence produces a zero width, but a register
named
`\&aC'
was not found and the type classified as string.
Other diagnostics consist of usage statements and are self explanatory.
GROFF, TROFF AND NROFF
The
-mdoc
package does not need compatibility mode with
groff.
The package inhibits page breaks, and the headers and footers
which normally occur at those breaks with
nroff,
to make the manual more efficient for viewing on-line.
At the moment,
groff
with
-T ascii
does eject the imaginary remainder of the page at end of file.
The inhibiting of the page breaks makes
nroffNs'd
files unsuitable for hardcopy.
There is a register named
`cR'
which can be set to zero in the site dependent style file
/usr/src/share/tmac/doc-nroff
to restore the old style behavior.
FILES
- /usr/share/tmac/doc.tmac
- manual macro package
- /usr/share/misc/mdoc.template
- template for writing a man page
- /usr/share/examples/mdoc/*
- several example man pages
BUGS
Undesirable hyphenation on the dash of a flag
argument is not yet resolved, and causes
occasional mishaps in the
Sx DESCRIPTION
section.
(line break on the hyphen).
Predefined strings are not declared in documentation.
Section 3f has not been added to the header routines.
`.man mdoc.samples
'
font
should be changed in
Sx NAME
section.
`.Fn needs
'
to have a check to prevent splitting up
if the line length is too short.
Occasionally it
separates the last parenthesis, and sometimes
looks ridiculous if a line is in fill mode.
The method used to prevent header and footer page
breaks (other than the initial header and footer) when using
nroff occasionally places an unsightly partially filled line (blank)
at the would be bottom of the page.
The list and display macros to not do any keeps
and certainly should be able to.

Time: 02:55:22 GMT, September 18, 2014


| Package | Description |
|---|---|
| org.apache.beam.runners.core |
Provides utilities for Beam runner authors.
|
| org.apache.beam.sdk.testing |
Defines utilities for unit testing Apache Beam pipelines.
|
| org.apache.beam.sdk.transforms |
Defines
PTransform s for transforming
data in a pipeline. |
| org.apache.beam.sdk.transforms.windowing | |
| org.apache.beam.sdk.util |
Defines utilities that can be used by Beam runners.
|
| Modifier and Type | Method and Description |
|---|---|
abstract PaneInfo |
ReduceFn.OnTriggerContext.paneInfo()
Returns the
PaneInfo for the trigger firing being processed. |
| Modifier and Type | Method and Description |
|---|---|
ReadableState<PaneInfo> |
PaneInfoTracker.getNextPaneInfo(ReduceFn.Context context,
boolean isFinal)
Return a (
ReadableState for) the pane info appropriate for context . |
| Modifier and Type | Method and Description |
|---|---|
void |
OutputWindowedValue.outputWindowedValue(OutputT output,
org.joda.time.Instant timestamp,
Collection<? extends BoundedWindow> windows,
PaneInfo pane)
Outputs a value with windowing information to the main output.
|
<SideOutputT> |
OutputWindowedValue.sideOutputWindowedValue(TupleTag<SideOutputT> tag,
SideOutputT output,
org.joda.time.Instant timestamp,
Collection<? extends BoundedWindow> windows,
PaneInfo pane)
Outputs a value with windowing information to a side output.
|
void |
PaneInfoTracker.storeCurrentPaneInfo(ReduceFn.Context context,
PaneInfo currentPane) |
| Modifier and Type | Method and Description |
|---|---|
abstract PaneInfo |
ValueInSingleWindow.getPane()
Returns the pane of this
ValueInSingleWindow in its window. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ValueInSingleWindow<T> |
ValueInSingleWindow.of(T value,
org.joda.time.Instant timestamp,
BoundedWindow window,
PaneInfo paneInfo) |
| Modifier and Type | Method and Description |
|---|---|
abstract PaneInfo |
OldDoFn.ProcessContext.pane()
Returns information about the pane within this window into which the
input element has been assigned.
|
abstract PaneInfo |
DoFn.ProcessContext.pane()
Returns information about the pane within this window into which the
input element has been assigned.
|
| Modifier and Type | Field and Description |
|---|---|
static PaneInfo |
PaneInfo.NO_FIRING
PaneInfo to use for elements on (and before) initial window assignemnt (including
elements read from sources) before they have passed through a GroupByKey and are
associated with a particular trigger firing. |
static PaneInfo |
PaneInfo.ON_TIME_AND_ONLY_FIRING
PaneInfo to use when there will be exactly one firing and it is on time. |
| Modifier and Type | Method and Description |
|---|---|
static PaneInfo |
PaneInfo.createPane(boolean isFirst,
boolean isLast,
PaneInfo.Timing timing) |
static PaneInfo |
PaneInfo.createPane(boolean isFirst,
boolean isLast,
PaneInfo.Timing timing,
long index,
long onTimeIndex)
Factory method to create a
PaneInfo with the specified parameters. |
PaneInfo |
PaneInfo.PaneInfoCoder.decode(InputStream inStream,
Coder.Context context) |
static PaneInfo |
PaneInfo.decodePane(byte encodedPane) |
| Modifier and Type | Method and Description |
|---|---|
void |
PaneInfo.PaneInfoCoder.encode(PaneInfo value,
OutputStream outStream,
Coder.Context context) |
| Modifier and Type | Method and Description |
|---|---|
abstract PaneInfo |
WindowedValue.getPane()
Returns the pane of this
WindowedValue in its window. |
PaneInfo |
WindowingInternals.pane()
Access the pane of the current window(s).
|
| Modifier and Type | Method and Description |
|---|---|
static <T> WindowedValue<T> |
WindowedValue.of(T value,
org.joda.time.Instant timestamp,
BoundedWindow window,
PaneInfo pane)
Returns a
WindowedValue with the given value, timestamp, and window. |
static <T> WindowedValue<T> |
WindowedValue.of(T value,
org.joda.time.Instant timestamp,
Collection<? extends BoundedWindow> windows,
PaneInfo pane)
Returns a
WindowedValue with the given value, timestamp,
and windows. |
void |
WindowingInternals.outputWindowedValue(OutputT output,
org.joda.time.Instant timestamp,
Collection<? extends BoundedWindow> windows,
PaneInfo pane)
Output the value at the specified timestamp in the listed windows.
|
<SideOutputT> |
WindowingInternals.sideOutputWindowedValue(TupleTag<SideOutputT> tag,
SideOutputT output,
org.joda.time.Instant timestamp,
Collection<? extends BoundedWindow> windows,
PaneInfo pane)
Output the value to a side output at the specified timestamp in the listed windows.
|
static <T> WindowedValue<T> |
WindowedValue.valueInEmptyWindows(T value,
PaneInfo pane)
Deprecated.
a value in no windows technically is not "in" a PCollection. It is allowed to drop
it at any point, and benign runner implementation details could cause silent data loss.
|
static <T> WindowedValue<T> |
WindowedValue.valueInGlobalWindow(T value,
PaneInfo pane)
Returns a
WindowedValue with the given value in the GlobalWindow using the
default timestamp and the specified pane. |
Copyright © 2016 The Apache Software Foundation. All rights reserved.


|
Elektra
0.8.18
|
#include <stdlib.h>
#include <string.h>
#include <exported_symbols.h>
#include <kdberrors.h>
#include <kdbmodule.h>
Functions | |
| int | elektraModulesInit (KeySet *modules, Key *error) |
| Loading Modules for Elektra. More... | |
| elektraPluginFactory | elektraModulesLoad (KeySet *modules, const char *name, Key *error) |
| Load a library with the given name. More... | |
| int | elektraModulesClose (KeySet *modules, Key *error) |
| Close all modules. More... | |
| int elektraModulesClose | ( | KeySet * | modules, |
| Key * | error | ||
| ) |
Close all modules.
Iterates over all modules and closes each of them.
Finish all affairs with the modules. Delete all keys where the appropriate module could be closed.
If it is not possible to close a module, still try to close all other modules, but report the error with the error key.
| modules | all modules in this keyset will be closed |
| error | a key to append the error information if it is not null |
| int elektraModulesInit | ( | KeySet * | modules, |
| Key * | error | ||
| ) |
Loading Modules for Elektra.
Unfortunately there is no portable way to load modules, plugins or libraries. So Elektra needed a framework which abstracts the loading of modules. Depending of the operating system the build system chooses different source files which actually implement the loading of a module.
The goals are:
Initialises the module loading system.
Most operating systems will have to do nothing here. Anyway you are required to add the key system/elektra/modules if it was successful.
On error -1 is returned and if error != 0 error information is added to it.
| modules | an empty keyset |
| error | a key to append the error information if it is not null |
| elektraPluginFactory elektraModulesLoad | ( | KeySet * | modules, |
| const char * | name, | ||
| Key * | error | ||
| ) |
Load a library with the given name.
Make sure that you first lookup if this module was already loaded. If it was, just return the pointer and you are done.
Otherwise load the module/library given by name. You need to take care that a proper name is used. The name does not have any path, pre- or postfixes.
The next step is to fetch the symbol elektraPluginFactory.
If everything was successful append all information to the keyset modules and return the pointer. Take care that you can close the module with that information. All information needs to be stored within system/elektra/modules/name You might want to use an struct and store it there as binary key.
If anything goes wrong don't append anything to modules. Instead report the error to the error key and return with 0.
| modules | where to get existing modules from a new module will be added there |
| name | the name for the plugin to load. Note that it does not have any prefixes or postfixes, you need to add them yourself. |
| error | the key to add warnings or report errors |


about/info
portfolio
megan kaluza
body positive app
elements
sketch
app design
prototyping
ux/ui
inVision: live prototype
© M|KC ⚬ 2022


home
documentation
downloads
google group
forums
bugs
feedback
Home
»
ebean
»
docs
Kickstart projects
Maven kickstart project
http://github.com/ebean-orm-demo/demo-maven-config
Demo project
http://github.com/ebean-orm-demo/demo-order
WEB Based (Wicket) Demo project
http://github.com/pmendelson/demo-wicket-order
Documentation
Getting started
(with ebean.properties)
Gives steps for getting started with ebean using a ebean.properties file for configuration.
Getting started
(programmatic configuration)
Gives steps for getting started with ebean programmatic configuration via ServerConfig.
Getting started
(spring configuration)
Getting started with ebean in a Spring environment. This covers using Spring configuration of EbeanServer instances and use of Spring transaction management.
Javadoc of Ebean API
Standard javadoc of Ebean's public API. The javadoc is also included in the sourceforge download.
Reference guide (pdf)
This is the PDF reference guide for using Ebean.
Functional documentation
Transparent Encryption support
Ebean supports transparent encryption and decryption of properties. It can do this DB encryption functions (so that properties can still be used in WHERE clauses) or using Java client side encryption.
Queries
Introduction to Ebean's query language and query functionality.
Transactions
Introduction to transaction demarcation.
Save and Delete
Introduction to save and delete functionality.
JAX-RS Integration
JAX-RS Integration to help develop RESTful (well REST like) API's to Entities.
home
|
back to top
Introduction
User Guide (pdf)
Install/Configure
Public JavaDoc
Whitepapers
General
Database Specific
Byte Code
Deployment Annotations
Features
Top Bugs
Top Enhancements
woResponse