| CONSOLE_CODES(4) | Linux Programmer's Manual | CONSOLE_CODES(4) |
After all the normal output processing has been done, and a stream of characters arrives at the console driver for actual printing, the first thing that happens is a translation from the code used for processing to the code used for printing.
If the console is in UTF-8 mode, then the incoming bytes are first assembled into 16-bit Unicode codes. Otherwise, each byte is transformed according to the current mapping table (which translates it to a Unicode value). See the Character Sets section below for discussion.
In the normal case, the Unicode value is converted to a font index, and this is stored in video memory, so that the corresponding glyph (as found in video ROM) appears on the screen. Note that the use of Unicode (and the design of the PC hardware) allows us to use 512 different glyphs simultaneously.
If the current Unicode value is a control character, or we are currently processing an escape sequence, the value will treated specially. Instead of being turned into a font index and rendered as a glyph, it may trigger cursor movement or other control functions. See the Linux Console Controls section below for discussion.
It is generally not good practice to hard-wire terminal controls into programs. Linux supports a terminfo(5) database of terminal capabilities. Rather than emitting console escape sequences by hand, you will almost always want to use a terminfo-aware screen library or utility such as ncurses(3), tput(1), or reset(1).
Control characters
A character is a control character if (before transformation according to the mapping table) it has one of the 14 codes 00 (NUL), 07 (BEL), 08 (BS), 09 (HT), 0a (LF), 0b (VT), 0c (FF), 0d (CR), 0e (SO), 0f (SI), 18 (CAN), 1a (SUB), 1b (ESC), 7f (DEL). One can set a "display control characters" mode (see below), and allow 07, 09, 0b, 18, 1a, 7f to be displayed as glyphs. On the other hand, in UTF-8 mode all codes 00–1f are regarded as control characters, regardless of any "display control characters" mode.
If we have a control character, it is acted upon immediately and then discarded (even in the middle of an escape sequence) and the escape sequence continues with the next character. (However, ESC starts a new escape sequence, possibly aborting a previous unfinished one, and CAN and SUB abort any escape sequence.) The recognized control characters are BEL, BS, HT, LF, VT, FF, CR, SO, SI, CAN, SUB, ESC, DEL, CSI. They do what one would expect:
BEL (0x07, ^G) beeps;
BS (0x08, ^H) backspaces one column (but not past the beginning of the line);
HT (0x09, ^I) goes to the next tab stop or to the end of the line if there is no earlier tab stop;
LF (0x0A, ^J), VT (0x0B, ^K) and FF (0x0C, ^L) all give a linefeed, and if LF/NL (new-line mode) is set also a carriage return;
CR (0x0D, ^M) gives a carriage return;
SO (0x0E, ^N) activates the G1 character set;
SI (0x0F, ^O) activates the G0 character set;
CAN (0x18, ^X) and SUB (0x1A, ^Z) interrupt escape sequences;
ESC (0x1B, ^[) starts an escape sequence;
DEL (0x7F) is ignored;
CSI (0x9B) is equivalent to ESC [.
ESC- but not CSI-sequences
| ESC c | RIS | Reset. |
| ESC D | IND | Linefeed. |
| ESC E | NEL | Newline. |
| ESC H | HTS | Set tab stop at current column. |
| ESC M | RI | Reverse linefeed. |
| ESC Z | DECID | DEC private identification. The kernel returns the string ESC [ ? 6 c, claiming that it is a VT102. |
| ESC 7 | DECSC | Save current state (cursor coordinates, attributes, character sets pointed at by G0, G1). |
| ESC 8 | DECRC | Restore state most recently saved by ESC 7. |
| ESC [ | CSI | Control sequence introducer |
| ESC % | Start sequence selecting character set | |
| ESC % @ | Select default (ISO 646 / ISO 8859-1) | |
| ESC % G | Select UTF-8 | |
| ESC % 8 | Select UTF-8 (obsolete) | |
| ESC # 8 | DECALN | DEC screen alignment test - fill screen with E's. |
| ESC ( | Start sequence defining G0 character set | |
| ESC ( B | Select default (ISO 8859-1 mapping) | |
| ESC ( 0 | Select VT100 graphics mapping | |
| ESC ( U | Select null mapping - straight to character ROM | |
| ESC ( K | Select user mapping - the map that is loaded by | |
| the utility mapscrn(8). | ||
| ESC ) | Start sequence defining G1 | |
| (followed by one of B, 0, U, K, as above). | ||
| ESC > | DECPNM | Set numeric keypad mode |
| ESC = | DECPAM | Set application keypad mode |
| ESC ] | OSC | (Should be: Operating system command) ESC ] P nrrggbb: set palette, with parameter given in 7 hexadecimal digits after the final P :-(. Here n is the color (0–15), and rrggbb indicates the red/green/blue values (0–255). ESC ] R: reset palette |
ECMA-48 CSI sequences
CSI (or ESC [) is followed by a sequence of parameters, at most NPAR (16), that are decimal numbers separated by semicolons. An empty or absent parameter is taken to be 0. The sequence of parameters may be preceded by a single question mark.
However, after CSI [ (or ESC [ [) a single character is read and this entire sequence is ignored. (The idea is to ignore an echoed function key.)
The action of a CSI sequence is determined by its final character.
| @ | ICH | Insert the indicated # of blank characters. |
| A | CUU | Move cursor up the indicated # of rows. |
| B | CUD | Move cursor down the indicated # of rows. |
| C | CUF | Move cursor right the indicated # of columns. |
| D | CUB | Move cursor left the indicated # of columns. |
| E | CNL | Move cursor down the indicated # of rows, to column 1. |
| F | CPL | Move cursor up the indicated # of rows, to column 1. |
| G | CHA | Move cursor to indicated column in current row. |
| H | CUP | Move cursor to the indicated row, column (origin at 1,1). |
| J | ED | Erase display (default: from cursor to end of display). |
| ESC [ 1 J: erase from start to cursor. | ||
| ESC [ 2 J: erase whole display. | ||
| ESC [ 3 J: erase whole display including scroll-back | ||
| buffer (since Linux 3.0). | ||
| K | EL | Erase line (default: from cursor to end of line). |
| ESC [ 1 K: erase from start of line to cursor. | ||
| ESC [ 2 K: erase whole line. | ||
| L | IL | Insert the indicated # of blank lines. |
| M | DL | Delete the indicated # of lines. |
| P | DCH | Delete the indicated # of characters on current line. |
| X | ECH | Erase the indicated # of characters on current line. |
| a | HPR | Move cursor right the indicated # of columns. |
| c | DA | Answer ESC [ ? 6 c: "I am a VT102". |
| d | VPA | Move cursor to the indicated row, current column. |
| e | VPR | Move cursor down the indicated # of rows. |
| f | HVP | Move cursor to the indicated row, column. |
| g | TBC | Without parameter: clear tab stop at current position. |
| ESC [ 3 g: delete all tab stops. | ||
| h | SM | Set Mode (see below). |
| l | RM | Reset Mode (see below). |
| m | SGR | Set attributes (see below). |
| n | DSR | Status report (see below). |
| q | DECLL | Set keyboard LEDs. |
| ESC [ 0 q: clear all LEDs | ||
| ESC [ 1 q: set Scroll Lock LED | ||
| ESC [ 2 q: set Num Lock LED | ||
| ESC [ 3 q: set Caps Lock LED | ||
| r | DECSTBM | Set scrolling region; parameters are top and bottom row. |
| s | ? | Save cursor location. |
| u | ? | Restore cursor location. |
| ` | HPA | Move cursor to indicated column in current row. |
ECMA-48 Set Graphics Rendition
The ECMA-48 SGR sequence ESC [ parameters m sets display attributes. Several attributes can be set in the same sequence, separated by semicolons. An empty parameter (between semicolons or string initiator or terminator) is interpreted as a zero.
| param | result |
| 0 | reset all attributes to their defaults |
| 1 | set bold |
| 2 | set half-bright (simulated with color on a color display) |
| 4 | set underscore (simulated with color on a color display) (the colors used to simulate dim or underline are set using ESC ] ...) |
| 5 | set blink |
| 7 | set reverse video |
| 10 | reset selected mapping, display control flag, and toggle meta flag (ECMA-48 says "primary font"). |
| 11 | select null mapping, set display control flag, reset toggle meta flag (ECMA-48 says "first alternate font"). |
| 12 | select null mapping, set display control flag, set toggle meta flag (ECMA-48 says "second alternate font"). The toggle meta flag causes the high bit of a byte to be toggled before the mapping table translation is done. |
| 21 | set underline; before Linux 4.17, this value set normal intensity (as is done in many other terminals) |
| 22 | set normal intensity |
| 24 | underline off |
| 25 | blink off |
| 27 | reverse video off |
| 30 | set black foreground |
| 31 | set red foreground |
| 32 | set green foreground |
| 33 | set brown foreground |
| 34 | set blue foreground |
| 35 | set magenta foreground |
| 36 | set cyan foreground |
| 37 | set white foreground |
| 38 | 256/24-bit foreground color follows, shoehorned into 16 basic colors (before Linux 3.16: set underscore on, set default foreground color) |
| 39 | set default foreground color (before Linux 3.16: set underscore off, set default foreground color) |
| 40 | set black background |
| 41 | set red background |
| 42 | set green background |
| 43 | set brown background |
| 44 | set blue background |
| 45 | set magenta background |
| 46 | set cyan background |
| 47 | set white background |
| 48 | 256/24-bit background color follows, shoehorned into 8 basic colors |
| 49 | set default background color |
| 90..97 | set foreground to bright versions of 30..37 |
| 100.107 | set background, same as 40..47 (bright not supported) |
Commands 38 and 48 require further arguments:
| ;5;x | 256 color: values 0..15 are IBGR (black, red, green, ... white), 16..231 a 6x6x6 color cube, 232..255 a grayscale ramp |
| ;2;r;g;b | 24-bit color, r/g/b components are in the range 0..255 |
ECMA-48 Mode Switches
ECMA-48 Status Report Commands
DEC Private Mode (DECSET/DECRST) sequences
These are not described in ECMA-48. We list the Set Mode sequences; the Reset Mode sequences are obtained by replacing the final 'h' by 'l'.
Linux Console Private CSI Sequences
The following sequences are neither ECMA-48 nor native VT102. They are native to the Linux console driver. Colors are in SGR parameters: 0 = black, 1 = red, 2 = green, 3 = brown, 4 = blue, 5 = magenta, 6 = cyan, 7 = white; 8–15 = bright versions of 0–7.
| ESC [ 1 ; n ] | Set color n as the underline color. |
| ESC [ 2 ; n ] | Set color n as the dim color. |
| ESC [ 8 ] | Make the current color pair the default attributes. |
| ESC [ 9 ; n ] | Set screen blank timeout to n minutes. |
| ESC [ 10 ; n ] | Set bell frequency in Hz. |
| ESC [ 11 ; n ] | Set bell duration in msec. |
| ESC [ 12 ; n ] | Bring specified console to the front. |
| ESC [ 13 ] | Unblank the screen. |
| ESC [ 14 ; n ] | Set the VESA powerdown interval in minutes. |
| ESC [ 15 ] | Bring the previous console to the front (since Linux 2.6.0). |
| ESC [ 16 ; n ] | Set the cursor blink interval in milliseconds (since Linux 4.2). |
There are two character sets, called G0 and G1, and one of them is the current character set. (Initially G0.) Typing ^N causes G1 to become current, ^O causes G0 to become current.
These variables G0 and G1 point at a translation table, and can be changed by the user. Initially they point at tables a) and b), respectively. The sequences ESC ( B and ESC ( 0 and ESC ( U and ESC ( K cause G0 to point at translation table a), b), c) and d), respectively. The sequences ESC ) B and ESC ) 0 and ESC ) U and ESC ) K cause G1 to point at translation table a), b), c) and d), respectively.
The sequence ESC c causes a terminal reset, which is what you want if the screen is all garbled. The oft-advised "echo ^V^O" will make only G0 current, but there is no guarantee that G0 points at table a). In some distributions there is a program reset(1) that just does "echo ^[c". If your terminfo entry for the console is correct (and has an entry rs1=\Ec), then "tput reset" will also work.
The user-defined mapping table can be set using mapscrn(8). The result of the mapping is that if a symbol c is printed, the symbol s = map[c] is sent to the video memory. The bitmap that corresponds to s is found in the character ROM, and can be changed using setfont(8).
The mouse tracking escape sequences generated by xterm(1) encode numeric parameters in a single character as value+040. For example, '!' is 1. The screen coordinate system is 1-based.
The X10 compatibility mode sends an escape sequence on button press encoding the location and the mouse button pressed. It is enabled by sending ESC [ ? 9 h and disabled with ESC [ ? 9 l. On button press, xterm(1) sends ESC [ M bxy (6 characters). Here b is button-1, and x and y are the x and y coordinates of the mouse when the button was pressed. This is the same code the kernel also produces.
Normal tracking mode (not implemented in Linux 2.0.24) sends an escape sequence on both button press and release. Modifier information is also sent. It is enabled by sending ESC [ ? 1000 h and disabled with ESC [ ? 1000 l. On button press or release, xterm(1) sends ESC [ M bxy. The low two bits of b encode button information: 0=MB1 pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release. The upper bits encode what modifiers were down when the button was pressed and are added together: 4=Shift, 8=Meta, 16=Control. Again x and y are the x and y coordinates of the mouse event. The upper left corner is (1,1).
Control-character handling
The VT102 also recognized the following control characters:
NUL (0x00) was ignored;
ENQ (0x05) triggered an answerback message;
DC1 (0x11, ^Q, XON) resumed transmission;
DC3 (0x13, ^S, XOFF) caused VT100 to ignore (and stop transmitting) all codes except XOFF and XON.
VT100-like DC1/DC3 processing may be enabled by the terminal driver.
The xterm(1) program (in VT100 mode) recognizes the control characters BEL, BS, HT, LF, VT, FF, CR, SO, SI, ESC.
Escape sequences
VT100 console sequences not implemented on the Linux console:
| ESC N | SS2 | Single shift 2. (Select G2 character set for the next |
| character only.) | ||
| ESC O | SS3 | Single shift 3. (Select G3 character set for the next |
| character only.) | ||
| ESC P | DCS | Device control string (ended by ESC \) |
| ESC X | SOS | Start of string. |
| ESC ^ | PM | Privacy message (ended by ESC \) |
| ESC \ | ST | String terminator |
| ESC * ... | Designate G2 character set | |
| ESC + ... | Designate G3 character set |
The program xterm(1) (in VT100 mode) recognizes ESC c, ESC # 8, ESC >, ESC =, ESC D, ESC E, ESC H, ESC M, ESC N, ESC O, ESC P ... ESC \, ESC Z (it answers ESC [ ? 1 ; 2 c, "I am a VT100 with advanced video option") and ESC ^ ... ESC \ with the same meanings as indicated above. It accepts ESC (, ESC ), ESC *, ESC + followed by 0, A, B for the DEC special character and line drawing set, UK, and US-ASCII, respectively.
The user can configure xterm(1) to respond to VT220-specific control sequences, and it will identify itself as a VT52, VT100, and up depending on the way it is configured and initialized.
It accepts ESC ] (OSC) for the setting of certain resources. In addition to the ECMA-48 string terminator (ST), xterm(1) accepts a BEL to terminate an OSC string. These are a few of the OSC control sequences recognized by xterm(1):
| ESC ] 0 ; txt ST | Set icon name and window title to txt. |
| ESC ] 1 ; txt ST | Set icon name to txt. |
| ESC ] 2 ; txt ST | Set window title to txt. |
| ESC ] 4 ; num; txt ST | Set ANSI color num to txt. |
| ESC ] 10 ; txt ST | Set dynamic text color to txt. |
| ESC ] 4 6 ; name ST | Change log file to name (normally disabled |
| by a compile-time option) | |
| ESC ] 5 0 ; fn ST | Set font to fn. |
It recognizes the following with slightly modified meaning (saving more state, behaving closer to VT100/VT220):
| ESC 7 DECSC | Save cursor |
| ESC 8 DECRC | Restore cursor |
It also recognizes
| ESC F | Cursor to lower left corner of screen (if enabled by | |
| xterm(1)'s hpLowerleftBugCompat resource) | ||
| ESC l | Memory lock (per HP terminals). | |
| Locks memory above the cursor. | ||
| ESC m | Memory unlock (per HP terminals). | |
| ESC n | LS2 | Invoke the G2 character set. |
| ESC o | LS3 | Invoke the G3 character set. |
| ESC | | LS3R | Invoke the G3 character set as GR. |
| ESC } | LS2R | Invoke the G2 character set as GR. |
| ESC ~ | LS1R | Invoke the G1 character set as GR. |
It also recognizes ESC % and provides a more complete UTF-8 implementation than Linux console.
CSI Sequences
Old versions of xterm(1), for example, from X11R5, interpret the blink SGR as a bold SGR. Later versions which implemented ANSI colors, for example, XFree86 3.1.2A in 1995, improved this by allowing the blink attribute to be displayed as a color. Modern versions of xterm implement blink SGR as blinking text and still allow colored text as an alternate rendering of SGRs. Stock X11R6 versions did not recognize the color-setting SGRs until the X11R6.8 release, which incorporated XFree86 xterm. All ECMA-48 CSI sequences recognized by Linux are also recognized by xterm, however xterm(1) implements several ECMA-48 and DEC control sequences not recognized by Linux.
The xterm(1) program recognizes all of the DEC Private Mode sequences listed above, but none of the Linux private-mode sequences. For discussion of xterm(1)'s own private-mode sequences, refer to the Xterm Control Sequences document by Edward Moy, Stephen Gildea, and Thomas E. Dickey available with the X distribution. That document, though terse, is much longer than this manual page. For a chronological overview,
details changes to xterm.
The vttest program
demonstrates many of these control sequences. The xterm(1) source distribution also contains sample scripts which exercise other features.
Some older kernel versions (after 2.0) interpret 8-bit control sequences. These "C1 controls" use codes between 128 and 159 to replace ESC [, ESC ] and similar two-byte control sequence initiators. There are fragments of that in modern kernels (either overlooked or broken by changes to support UTF-8), but the implementation is incomplete and should be regarded as unreliable.
Linux "private mode" sequences do not follow the rules in ECMA-48 for private mode control sequences. In particular, those ending with ] do not use a standard terminating character. The OSC (set palette) sequence is a greater problem, since xterm(1) may interpret this as a control sequence which requires a string terminator (ST). Unlike the setterm(1) sequences which will be ignored (since they are invalid control sequences), the palette sequence will make xterm(1) appear to hang (though pressing the return-key will fix that). To accommodate applications which have been hardcoded to use Linux control sequences, set the xterm(1) resource brokenLinuxOSC to true.
An older version of this document implied that Linux recognizes the ECMA-48 control sequence for invisible text. It is ignored.
| 2020-02-09 | Linux |


My first computer, a BBC Microcomputer Model B, was powered by a 6502 processor and I spent many hours writing and debugging assembly language programs for it (I was the author of CodeKit, co-author of SupaStore and lots of other stuff). I managed to hold on to my BBC until 1989 when my wife insisted that I got rid of it before I bought my first Intel based PC.
Sometime in 1998 I found an emulator called 'pcBBC' on the web. It was very good BBC emulator and it reawakened my interest in 6502 assembly programming. Unfortunate pcBBC did not survive the various updates to Microsoft Windows and now I use BeebEm.
The assembler that I started with (AS65) runs under DOS (or in a DOS window) and can assemble a 16Kb ROM almost instantly (on a Pentium III 500Mhz). When I was developing on my BBC I used to break for a cup of tea (or two) when the assembler was running!
More recently I have written my own Java based 6502 assembler which supports relocatable code and some simple structured programming constructs (e.g. if/then/else).
Originally this was all in one HTML file but it grew too big for any of my editors to handle without crashing so I had to cut it up into 8 sections.
Click on any of the above links or the links at the bottom of each page to move between the sections.
|
|
Next >> |


Every player will have been on both sides by the end of the game, but you will now choose the path you take to get there.
Join the Resistance!
Join the Horde!
A Possessed Human is human in every way, except they secretly aid the horde, and can infect any human just by touching them.
The Possessed Human is a powerful asset, both for leaking intel to the horde, and for assassinating high-value Resistance members.
A Possessed Human will turn into a regular zombie when he or she strikes, thus making the victim the new Possessed Human. The possession travels through the Resistance, from one person to the next, leaving a trail of zombies in its wake.
Are you interested in being the Possessed Human?

Almost there!
Before you're in the game, we're going to help you understand the rules.
 It's not long, and should only take 4-5 minutes.
This is not a quiz; you're not scored, and we give you the answers right there. This is just to help everyone get on the same page with the rules.
So, hit next, and off we go!


This post is a continuation of many articles about WebGL. The last one was about using Canvas2D for rendering text over a WebGL canvas. If you haven't read it you might want to check that out before continuing.
In the last article we went over how to use a 2d canvas to draw text over your WebGL scene. That techinque works and is easy to do but it has a limitation that the text can not be obscured by other 3d objects. To do that we actually need to draw the text in WebGL.
The simplest way to do that is to make textures with text in them. You could for example go into photoshop or some other paint program and draw an image with some text in it.
Then make some plane geometry and display it. This is actually how some games I've worked on did all their text. For example Locoroco only had about 270 strings. It was localized into 17 languages. We had an Excel sheet with all the languages and a script that would launch Photoshop and generate a texture, one for each message in each language.
Of course you can also generate the textures at runtime. Since WebGL is in the browser again we can rely on the Canvas 2D api to help generate our textures.
Starting with the examples from the previous article let's add a function to fill a 2D canvas with some text
var textCtx = document.createElement("canvas").getContext("2d");
// Puts text in center of canvas.
function makeTextCanvas(text, width, height) {
textCtx.canvas.width = width;
textCtx.canvas.height = height;
textCtx.font = "20px monospace";
textCtx.textAlign = "center";
textCtx.textBaseline = "middle";
textCtx.fillStyle = "black";
textCtx.clearRect(0, 0, textCtx.canvas.width, textCtx.canvas.height);
textCtx.fillText(text, width / 2, height / 2);
return textCtx.canvas;
}
Now that we need to draw 2 different things in WebGL, the 'F' and our text, I'm going
to switch over to using some helper functions as described in a previous article.
If it's not clear what programInfo
, bufferInfo
, etc are see that article.
So, let's create the 'F' and a unit quad.
// Create data for 'F'
var fBufferInfo = primitives.create3DFBufferInfo(gl);
// Create a unit quad for the 'text'
var textBufferInfo = primitives.createPlaneBufferInfo(gl, 1, 1, 1, 1, makeXRotation(Math.PI / 2));
A unit quad is a quad (square) that's 1 unit big. This one is centered over the origin. createPlaneBufferInfo
creates a plane in the xz plane. We pass in a matrix to rotate it and give us an xy plane unit quad.
Next create 2 shaders
// setup GLSL programs
var fProgramInfo = createProgramInfo(gl, ["3d-vertex-shader", "3d-fragment-shader"]);
var textProgramInfo = createProgramInfo(gl, ["text-vertex-shader", "text-fragment-shader"]);
And create our text texture
// create text texture.
var textCanvas = makeTextCanvas("Hello!", 100, 26);
var textWidth = textCanvas.width;
var textHeight = textCanvas.height;
var textTex = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, textTex);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, textCanvas);
// make sure we can render it even if it's not a power of 2
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
Setup uniforms for both the 'F' and text
var fUniforms = {
u_matrix: makeIdentity(),
};
var textUniforms = {
u_matrix: makeIdentity(),
u_texture: textTex,
};
Now when we compute the matrixes for the F we save off the F's view matrix
var matrix = makeIdentity();
matrix = matrixMultiply(matrix, preTranslationMatrix);
matrix = matrixMultiply(matrix, scaleMatrix);
matrix = matrixMultiply(matrix, rotationZMatrix);
matrix = matrixMultiply(matrix, rotationYMatrix);
matrix = matrixMultiply(matrix, rotationXMatrix);
matrix = matrixMultiply(matrix, translationMatrix);
matrix = matrixMultiply(matrix, viewMatrix);
var fViewMatrix = copyMatrix(matrix); // remember the view matrix for the text
matrix = matrixMultiply(matrix, projectionMatrix);
Drawing the F looks like this
gl.useProgram(fProgramInfo.program);
setBuffersAndAttributes(gl, fProgramInfo.attribSetters, fBufferInfo);
copyMatrix(matrix, fUniforms.u_matrix);
setUniforms(fProgramInfo.uniformSetters, fUniforms);
// Draw the geometry.
gl.drawElements(gl.TRIANGLES, fBufferInfo.numElements, gl.UNSIGNED_SHORT, 0);
for the text we just need the position of the origin of the F. We also need to scale our unit quad to match the dimensions of the texture. Finally we need to multply by the projection matrix.
// scale the F to the size we need it.
// use just the view position of the 'F' for the text
var textMatrix = makeIdentity();
textMatrix = matrixMultiply(textMatrix, makeScale(textWidth, textHeight, 1));
textMatrix = matrixMultiply(
textMatrix,
makeTranslation(fViewMatrix[12], fViewMatrix[13], fViewMatrix[14]));
textMatrix = matrixMultiply(textMatrix, projectionMatrix);
And then render the text
// setup to draw the text.
gl.useProgram(textProgramInfo.program);
setBuffersAndAttributes(gl, textProgramInfo.attribSetters, textBufferInfo);
copyMatrix(textMatrix, textUniforms.u_matrix);
setUniforms(textProgramInfo.uniformSetters, textUniforms);
// Draw the text.
gl.drawElements(gl.TRIANGLES, textBufferInfo.numElements, gl.UNSIGNED_SHORT, 0);
So here it is
You'll notice that sometimes parts of our text cover up parts of our Fs. That's because we're drawing a quad. The default color of the canvas is transparent black (0,0,0,0) and we're drawing that color in the quad. We could instead blend our pixels.
gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
This makes it take the source pixel (the color from our fragement shader) and combined it
with the dest pixel (the color in the canvas) according to the blend function. We've set the
blend function to SRC_ALPHA
for source and ONE_MINUS_SRC_ALPHA
for dest.
result = dest * (1 - src_alpha) + src * src_alpha
so for example if the dest is green 0,1,0,1
and the source is red 1,0,0,1
we'd have
src = [1, 0, 0, 1]
dst = [0, 1, 0, 1]
src_alpha = src[3] // this is 1
result = dst * (1 - src_alpha) + src * src_alpha
// which is the same as
result = dst * 0 + src * 1
// which is the same as
result = src
For the parts of the texture with transparent black 0,0,0,0
src = [0, 0, 0, 0]
dst = [0, 1, 0, 1]
src_alpha = src[3] // this is 0
result = dst * (1 - src_alpha) + src * src_alpha
// which is the same as
result = dst * 1 + src * 0
// which is the same as
result = dst
Here's the result with blending enabled.
You can see it's better but it's still not perfect. If you look close you'll sometimes see this issue
What's happening? We're currently drawing an F then its text, the the next F then it's text repeated. We still have a depth buffer so when we draw the text for a F, even though blending made some pixels stay the background color the depth buffer was still updated. When we draw the next F if that parts of that F are behind those pixels from some previously drawn text they won't be drawn.
We've just run into one of the most difficult issues of rendering 3D on a GPU. Transparency has issues.
The most common solution for pretty much all transparent rendering is to draw all the opaque stuff first, then after, draw all the transparent stuff sorted by z distance with the depth buffer testing on but depth buffer updating off.
Let's first separate drawing of the opaque stuff (the Fs) from the transparent stuff (the text). First we'll declare something to remember the text positions.
var textPositions = [];
And in the loop for rendering the Fs we'll remember those positions
matrix = matrixMultiply(matrix, viewMatrix);
-var fViewMatrix = copyMatrix(matrix); // remember the view matrix for the text
textPositions.push([matrix[12], matrix[13], matrix[14]]); // remember the position for the text
Before we draw the 'F's we'll disable blending and turn on writing to the depth buffer
gl.disable(gl.BLEND);
gl.depthMask(true);
For drawing the text we'll turn on blending and turn off writing to the depth buffer.
gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
gl.depthMask(false);
And then draw text at all the positions we saved
textPositions.forEach(function(pos) {
// draw the text
// scale the F to the size we need it.
// use just the position of the 'F' for the text
var textMatrix = makeIdentity();
textMatrix = matrixMultiply(textMatrix, makeScale(textWidth, textHeight, 1));
textMatrix = matrixMultiply(textMatrix, makeTranslation(pos[0], pos[1], pos[2]));
textMatrix = matrixMultiply(textMatrix, projectionMatrix);
// setup to draw the text.
gl.useProgram(textProgramInfo.program);
setBuffersAndAttributes(gl, textProgramInfo.attribSetters, textBufferInfo);
copyMatrix(textMatrix, textUniforms.u_matrix);
setUniforms(textProgramInfo.uniformSetters, textUniforms);
// Draw the text.
gl.drawElements(gl.TRIANGLES, textBufferInfo.numElements, gl.UNSIGNED_SHORT, 0);
});
And now it mostly works
Notice we didn't sort like I mentioned above. In this case since we're drawing mostly opaque text there's probably going to be no noticable difference if we sort so I'll save that for some other article.
Another issue is the text is intersecting its own 'F'. There really isn't a specific solution for that. If you were making an MMO and wanted the text of each player to always appear you might try to make the text appear above the head. Just translate it +Y some number of units, enough to make sure it was always above the player.
You can also move it forward toward the cameara. Let's do that here just for the hell of it. Because 'pos' is in view space that means it's relative to the eye (which is at 0,0,0 in view space). So if we normalize it we get a unit vector pointing from the eye to that point which we can then multiply by some amount to move the text a specific number of units toward or away from the eye.
// because pos is in view space that means it's a vector from the eye to
// some position. So translate along that vector back toward the eye some distance
+var fromEye = normalize(pos);
+var amountToMoveTowardEye = 150; // because the F is 150 units long
+var viewX = pos[0] - fromEye[0] * amountToMoveTowardEye;
+var viewY = pos[1] - fromEye[1] * amountToMoveTowardEye;
+var viewZ = pos[2] - fromEye[2] * amountToMoveTowardEye;
var textMatrix = makeIdentity();
textMatrix = matrixMultiply(textMatrix, makeScale(textWidth, textHeight, 1));
*textMatrix = matrixMultiply(textMatrix, makeTranslation(viewX, viewY, viewZ));
textMatrix = matrixMultiply(textMatrix, projectionMatrix);
Here's that.
You still might notice an issue with the edges of the letters.
The issue here is the Canvas2D api produces only premultiplied alpha values. When we upload the contents of the to a texture WebGL tries to unpremultiply the values but it can't do this perfectly because premultiplied alpha is lossy.
To fix that lets well WebGL not to unpremultiply
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
This tells WebGL to supply premultiplied alpha values to gl.texImage2D
and gl.texSubImage2D
.
If the data passed to gl.texImage2D
is already premultiplied as it is for canvas2d data then
WebGL can just pass it through.
We also need to change the blending function
-gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
+gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
The old one multipled the src color by its alpha. That's what SRC_ALPHA
means. But
now our texture's data has already been multiplied by its alpha. That's what premultipled means.
So we don't need to GPU to do the multiplication. Setting it ot ONE
means multiply by 1.
The edges are gone now.
What if you want to keep the text a fixed size but still sort correctly? Well, if you remember
from the perspective article our perspective matrix is going
to scale our object by -Z
to make it get smaller in the distance. So, we can just scale
by -Z
times some desired-scale to compensate.
...
// because pos is in view space that means it's a vector from the eye to
// some position. So translate along that vector back toward the eye some distance
var fromEye = normalize(pos);
var amountToMoveTowardEye = 150; // because the F is 150 units long
var viewX = pos[0] - fromEye[0] * amountToMoveTowardEye;
var viewY = pos[1] - fromEye[1] * amountToMoveTowardEye;
var viewZ = pos[2] - fromEye[2] * amountToMoveTowardEye;
+var desiredTextScale = -1 / gl.canvas.height; // 1x1 pixels
+var scale = viewZ * desiredTextScale;
var textMatrix = makeIdentity();
*textMatrix = matrixMultiply(textMatrix, makeScale(textWidth * scale, textHeight * scale, 1));
textMatrix = matrixMultiply(textMatrix, makeTranslation(viewX, viewY, viewZ));
textMatrix = matrixMultiply(textMatrix, projectionMatrix);
...
If you want to draw different text at each F you should make a new texture for each F and just update the text uniforms for that F.
// create text textures, one for each F
var textTextures = [
"anna", // 0
"colin", // 1
"james", // 2
"danny", // 3
"kalin", // 4
"hiro", // 5
"eddie", // 6
"shu", // 7
"brian", // 8
"tami", // 9
"rick", // 10
"gene", // 11
"natalie",// 12,
"evan", // 13,
"sakura", // 14,
"kai", // 15,
].map(function(name) {
var textCanvas = makeTextCanvas(name, 100, 26);
var textWidth = textCanvas.width;
var textHeight = textCanvas.height;
var textTex = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, textTex);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, textCanvas);
// make sure we can render it even if it's not a power of 2
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
return {
texture: textTex,
width: textWidth,
height: textHeight,
};
});
Then at render time select a texture
textPositions.forEach(function(pos, ndx) {
+// select a texture
+var tex = textTextures[ndx];
// scale the F to the size we need it.
// use just the position of the 'F' for the text
var textMatrix = makeIdentity();
*textMatrix = matrixMultiply(textMatrix, makeScale(tex.width, tex.height, 1));
and set the uniform for the texture before drawing
textUniforms.u_texture = tex.texture;
We've been using black to draw the text into the canvas. It would be more useful if we rendered the text in white. Then we could multiply the text by a color and make it any color we want.
First we'll change the text shader to multiply by a color
varying vec2 v_texcoord;
uniform sampler2D u_texture;
+uniform vec4 u_color;
void main() {
* gl_FragColor = texture2D(u_texture, v_texcoord) * u_color;
}
And when we draw the text into the canvas use white
textCtx.fillStyle = "white";
Then we'll make some colors
// colors, 1 for each F
var colors = [
[0.0, 0.0, 0.0, 1], // 0
[1.0, 0.0, 0.0, 1], // 1
[0.0, 1.0, 0.0, 1], // 2
[1.0, 1.0, 0.0, 1], // 3
[0.0, 0.0, 1.0, 1], // 4
[1.0, 0.0, 1.0, 1], // 5
[0.0, 1.0, 1.0, 1], // 6
[0.5, 0.5, 0.5, 1], // 7
[0.5, 0.0, 0.0, 1], // 8
[0.0, 0.0, 0.0, 1], // 9
[0.5, 5.0, 0.0, 1], // 10
[0.0, 5.0, 0.0, 1], // 11
[0.5, 0.0, 5.0, 1], // 12,
[0.0, 0.0, 5.0, 1], // 13,
[0.5, 5.0, 5.0, 1], // 14,
[0.0, 5.0, 5.0, 1], // 15,
];
At draw time we select a color
// set color uniform
textUniforms.u_color = colors[ndx];
Colors
This techinque is actually the technique most browsers use when they are GPU accelerated. They generate textures with your HTML content and all the various styles you've applied and as long as that content doesn't change they can just render the texture again when you scroll etc..


For a large number of files, a minimum of 2GB free RAM, and Chrome browser are recommended. The processed files may be downloaded in multiple batches. You can use "Extract All" zip option to unzip them in one location.
The process is completely offline. Files will not leave your computer.
Visit repository for more info and source code.
File any issues here.


Before Change
// First line of docstring.
// TODO: This is repetitive of Optionable.get_description(). We should probably just
// make Goal an Optionable, for uniformity.
return namesake_task.__doc__.partition("\n")[0].strip()
return ""
def register_options(self, options):
After Change
namesake_task = self._task_type_by_name.get(self.name)
if namesake_task and namesake_task.__doc__:
// First line of docstring.
return namesake_task.__doc__
return ""
@property
def description_first_line(self):


Welcome to the Sandbox!
Test out your html/css and client side javascript
Your current balance is
$1000
Homepage
Projects
Blog
About
Click the image to turn it into something else!


Output files
Gsf generates plots of the MCMC covariance matrices, star formation histories, and SED in default. It also generates the following files, so you can make your own plots of these quantities;
summary_<ID>.fits
chain_<ID>_corner.cpkl
SFH_<ID>.fits
gsf_spec_<ID>.asdf
See this notebook for how to use these files.
1.summary file
stores statistical values (16/50/84th) for fitting parameters (e.g., amplitude) as well as primary physical parameters (e.g.,stellar mass). The header also contains meta info such as calculation time.
2.chain file
stores MCMC-chains.
3.SFH file
stores star formation rates (logSFR), stellar masses (logMstel), and metallicity (logZ) as a function of lookback time (time). Star formation rate is the average SFR in the last TSET_SFR (default: 0.1Gyr) of the posetrior SFH.
4.Spectral file
stores the best fit model spectra for each age/tau component, as well as observed fluxes and error.


To sign up, you will need to install GPG on your computer.
To understand why, please read our FAQ.
GPG installation instructions (Recommended option for either Windows or OSX)
We'll install Mailvelope, an in-browser extension that supports GPG. You'll need a current version of either Firefox or Chrome.
When the small popup appears, click Allow or Add as prompted.
In the upper right corner of your browser, on the toolbar, click the Mailvelope icon, then click Keyring.
Click Generate Key.
Enter your real name and an e-mail address that you have access to.
Important: do not forget your password. If you lose it, you will be forever unable to decrypt your feedback.
Uncheck Upload public key to Mailvelope Key Server. Click Generate.
Refresh the page. In the upper right corner of your browser, click the Mailvelope icon, then click Keyring. Click on the key you just created. You may need to refresh for it to appear.
On the Export tab, copy the text of your key and paste into the field above. The output will look similar to the screenshot below. You can now sign up!
GPG installation instructions (alternate option for Mac OSX)
These roughly follow this detailed tutorial.
You'll need OS X 10.12 or higher.
Open the downloaded .dmg file and double-click the Install icon to run. Important: on the Installation Type page, click the Customize button, and uncheck "GPGMail" to avoid requests for money. Then continue the installation.
A popup may request access to your contacts. Access is not required.
Generate a new keypair.
Important: Do not forget your passphrase. There is no way to recover it. Without it, you will be unable to decrypt your feedback.
In the GPG Keychain window, select the row containing your new key, as shown in the screenshot below.
Press command-C to copy the public key. Paste this into the field above. The output will look similar to the screenshot below. You can now sign up!


Bibi Af is a highly experienced mobile beauty therapist who has over 20 years of experience, working in the industry. She obtained her diploma in 1998.
Bibi Af is a highly experienced mobile beauty therapist who has over 20 years of experience, working in the industry. She obtained her diploma in 1998. Her career started in a Beauty salon in Rose-Hill where she was a beauty therapist for four years. Bibi Af then opened her own salon in Grand Bay. She worked for a few more years and then decided to switch to home service. Her customers are diversed with the majority of foreigners and expats. In 2013 she left Mauritius to travel and work as a beauty therapist in Paris for a year followed by 3 more years in London. Bibi Af returned to Mauritius in 2017 to occupy the same position of mobile beauty therapist... with more experience and now with a team of 3 people.
With over 2 decades of experience, working in the beauty industry, Bibi Af knows exactly what you need to feel that extra bit special
With over 2 decades of experience, working in the beauty industry, Bibi Af knows exactly what you need to feel that extra bit special
Feel free to contact us for more info:
Take a look at what our clients are saying about Af Esthétique's services
Bibi Af is very professional. She makes you feel at ease and her technique is great. She is really good at getting rid of those knots.
Home service is so convenient for me as I've just had a baby recently. I looked online and found Af Esthétique. I give Bibi Af a rating of 5 stars. She's the best I've known so far.


You enable prepopulation and add, modify, and delete prepopulation shares in the Configure > Optimization > CIFS Prepopulation page.The prepopulation operation effectively performs the first Steelhead appliance read of the data on the prepopulation share. Later, the Steelhead appliance handles read and write requests as effectively as with a warm data store. With a warm data store, RiOS sends only new or modified data, dramatically increasing the rate of data transfer over the WAN.The first synchronization, or the initial copy, retrieves data from the origin file server and copies it to the RiOS data store on the Steelhead appliance. Subsequent synchronizations are based on the synchronization interval.The RiOS v8.5 Management Console includes policies and rules to provide more control over which files the system transfers to warm the RiOS data store. A policy is a group of rules that select particular files to prepopulate; for example, you can create a policy that selects all PDF files larger than 300 Megabytes created since January 1st of 2013.The AWS Cloud Steelhead does not support CIFS Prepopulation. The ESX Cloud Steelhead supports CIFS Prepopulation if it is deployed with WCCP or PBR (not with the Discovery Agent).
Prewarms the RiOS data store. In this setup, the primary interface of the Steelhead appliance acts as a client and prerequests data from the share you want to use to warm the data store. This request goes through the LAN interface to the WAN interface out to the server-side Steelhead appliance, causing the in-path interface to see the data as a normal client request.When data is requested again by a client on the local LAN, RiOS sends only new or modified data over the WAN, dramatically increasing the rate of data transfers. Enable Transparent Prepopulation Support using RCU Opens port 8777 to allow manual warming of the RiOS data store using the Riverbed Copy Utility (RCU) to prepopulate your shares.
3. Click Apply to apply your settings.
4. When prepopulation is enabled, you can add shares and schedule automatic unattended synchronization as described in this table.
Specify the path to the data on the origin server or the UNC path of a share to which you want to make available for prepopulation. Set up the prepopulation share on the remote box pointing to the actual share in the headend data center server. For example:Important: The share and the origin-server share names cannot contain any of these characters: Optionally, include a comment to help you administer the share in the future. Comments cannot contain an ampersand (&). Use this time format: H:M:S Specify a limit on the amount of data in the synchronization job and select either MB or GB from the drop-down list. The default is MB. Select either current files for syncing or use the latest share snapshot (if no snapshots are available, the system uses the current files). Enable Scheduled Synchronization Enables subsequent synchronization jobs after the initial synchronization. Select the type of synchronization the system performs after the initial synchronization.Incremental Sync - The origin-file server retrieves only new data that was modified or created after the previous synchronization and sends it to the Steelhead appliance. Full Sync - The origin-file server retrieves all data and sends it to the Steelhead appliance. Full synchronization is useful on Steelhead appliances that are frequently evicting the prepopulated data from the RiOS data store because of limited memory. If the schedule for a full synchronization and an incremental synchronization coincide, the system performs a full synchronization.Start Date/Time - Specify a base start date and time from which to schedule synchronizations. Recurring Every - Specify how frequently scheduled synchronizations should occur relative to the start date and time. Leave blank to run the synchronization once.
5. Click Save to save your settings permanently.After you add a share, the CIFS prepopulation page includes the share in the Share table. The Share table provides an editable list of shares along with each share’s remote pathname, the date and time the next synchronizations will occur, the status, and any comments about the share.After adding a CIFS prepopulation share, you can edit it from the Configuration tab. You can create a policy (group of rules) to apply to the share, and you can schedule a date and time for share synchronization.
Specifies the path to the data on the origin server or the UNC path of a share available for prepopulation. This control is not editable under the share Configuration tab. Optionally, include a comment to help you administer the share in the future. Comments cannot contain an ampersand (&). Use this time format: H:M:S Select to synchronize the current files or select the latest share snapshot (if no snapshots are available, the system uses the current files).
5. Click Apply to apply your configuration.
6. Click Save to save your settings permanently.
4. Click Add a Policy.
Displays the controls to add a policy. A policy is a group of rules applied to a share. There are no limits on the number of policies or the number of rules within a policy.RiOS does not validate rules or policies; use caution to avoid including or excluding everything. Click to add a new rule to a policy. You can add rules that prepopulate the RiOS data store according to filename, file size, or the time of the last file access, creation, or modification. Synchronize files that match all of the following rules Select a filter from the drop-down list and type or select a value for the rule from the drop-down list. The control changes dynamically according to the rule type.File extension or name matches *.txt; *.PDF Modify time is within, when syncing 02:00:00 File size is greater than 300 MB File extension/name matches *.txt Creation Time is newer than 2013/01/01 00:00:00
6. Click Apply to apply your configuration.
7. Click Save to save your settings permanently.
Enable Scheduled Synchronization Enables subsequent synchronization jobs after the initial synchronization. Select the type of synchronization the system performs after the initial synchronization.Incremental Sync - The origin file server retrieves only new data that was modified or created after the previous synchronization and sends it to the Steelhead appliance. Full Sync - The origin file server retrieves all data and sends it to the Steelhead appliance. Full synchronization is useful on Steelhead appliances that are frequently evicting the prepopulated data from the RiOS data store because of limited memory. If the schedule for a full synchronization and an incremental synchronization coincide, the system performs a full synchronization.Start Date/Time - Specify a base start date and time from which to schedule synchronizations. Recurring Every - Specify how frequently scheduled synchronizations should occur relative to the start date and time. Leave blank to synchronize once.
5. Click Apply to apply your configuration.
6. Click Save to save your settings permanently.After adding a CIFS prepopulation share, you can view CIFS prepopulation share logs from the Edit Prepopulation Share page. View the prepopulation share log to see more detail regarding recent synchronizations, the initial copy of the share, or the last share synchronization.
4.
Creates a log of what would be synchronized using the current settings, without actually synchronizing anything. After adding a CIFS prepopulation share, you can view CIFS prepopulation share logs to see more detail regarding recent synchronizations, the initial copy of the share, or the last share synchronization.
Contains logs for the last few share synchronizations. The log includes how many directories, files, and bytes were received and how long it took to receive them. The log also lists any errors or deletions. Includes how many directories, files, and bytes were received initially and how long it took to receive them. The log also lists any errors or deletions. Includes a log of what would have been synchronized with the current share configuration, without actually synchronizing anything.Configuring CIFS Optimization Viewing CIFS Prepopulation Share Log Reports


vignettes/use_case.Rmd
use_case.Rmd
Summer pulses (e.g., mungbeans) are a high value crop for Queensland grain growers. However, temperatures above 40C, particularly during flowering, can have a severe detrimental effect on crop yields (Kaushal et al. 2016). A key strategy that plants use to minimise the impact of heat stress is evaporative cooling. Ensuring crops are well watered prior to a heat stress event (so to facilitate high rates of evaporative cooling) is a potential strategy to ensure that irrigated crops avoid heat stress. However, this requires farmers to recognise a heat stress event is coming and commence irrigating with enough time to water the entire crop prior to the event occurring.
The WINS for pulses project provides warnings when heat stress events are likely to occur so that farmers can irrigate their crops prior to the event to minimise any resulting yield loss. It does this by using the get_precis_forecast()
function from bomrang along with functionality from mailR (Rahul 2015).
install.packages("bomrang")
install.packages("mailR")
library(dplyr) # filter()
library(bomrang)
library(mailR)
For this to work we require a list of alert subscribers. Here we create a dummy set of subscribers, locations, and email addresses.
subscribers_list <-
data.frame(cbind(
c(1, 2, 3),
c("Joe", "John", "Jayne"),
c("Blogs", "Doe", "Doe"),
c("Dalby", "Toowoomba", "Warwick"),
c(
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>)
)
)
colnames(subscribers_list) <-
c("Entry","Name","Surname","Location","email")
head(subscribers_list)
## Entry Name Surname Location email
## 1 1 Joe Blogs Dalby<EMAIL_ADDRESS>## 2 2 John Doe Toowoomba<EMAIL_ADDRESS>## 3 3 Jayne Doe Warwick<EMAIL_ADDRESS>We also need to specify our email address and password. For this project we are using a gmail account to send the email alerts.
Finally we need to set a forecast temperature threshold that will trigger an alert to be sent.
We then use bomrang to access the latest précis forecast for Queensland.
Now we use a for()
loop that searches through the Queensland précis forecast data frame and subsets it based on location each subscriber has nominated and the temperature threshold we have set. As part of the for()
loop there is an if()
statement that uses the mailR package to send an email to the subscribers if the forecast maximum temperatures are greater than or equal to the threshold. This email informs the recipient of the dates that high temperatures are expected.
QLD_hotdates <-
QLD_forecast %>%
filter(maximum_temperature >= threshold_temp)
for (x in seq_len(nrow(subscribers_list))) {
subscriber_location <- subscribers_list[["Location"]][x]
if (subscriber_location %in% QLD_hotdates[["town"]]) {
hot_dates <-
paste(gsub("00:00:00", "", QLD_hotdates$start_time_local), collapse = ", ")
body_text <-
paste(
"\nHello ", as.character(subscribers_list$Name[x]), ".\n",
"\nYour mungbean crops at ", subscriber_location,
"\nare forecast to be exposed to heat stress on the\n",
"\nfollowing dates: ", hot_dates, ".\n",
"\nConsider irrigating your crops beforehand to\n"
"\nfacilitate transpirational cooling.\n",
"\nFrom the WINS team\n"
)
recipient <-
as.character(subscribers_list$email[x])
send.mail(
from = our_email,
to = recipient,
subject = "Mungbean Heat Stress Warning",
body = body_text,
smtp = list(
host.name = "smtp.gmail.com",
port = 465,
user.name = our_email,
passwd = our_password,
ssl = TRUE
),
authenticate = TRUE,
send = TRUE
)
}
}
The process is automated to run on a Cron job such that the précis forecast is automatically downloaded and thresholds are calculated on a daily basis with email alerts being sent automatically.
While mungbean heat stress is illustrated here, other thresholds can be implemented, e.g., frost events for sugarcane harvest using this same functionality.
Kaushal, N., Bhandari, K., Siddique, K. H., & Nayyar, H. (2016). Food crops face rising temperatures: An overview of responses, adaptive mechanisms, and approaches to improve heat tolerance. Cogent Food & Agriculture, 2(1), 1134380.
Rahul P (2015). mailR: A Utility to Send emails from R. R package version 0.4.1.https://CRAN.R-project.org/package=mailR


I've been taking Ultram (Tramadol) for the past year. It's just like taking a couple vicodin's. I usually have to take about 4-5 Ultrams at once, but I can feel the side effects if I take just a couple. I love sleeping on them, I wake up on and off all night, and when I do awaken, I'm always really happy. I also have some really cool dreams when I go to sleep on them. Ultrams seem to cure anxiety and have somewhat of a sedative effect, but not enough to knock me out. I can socialize normally on them, I might even be a little more socialable then usual.
As far as getting addicted to them, I have to admit I woke up a couple mornings and didn't want to get out of bed unless I had any. They seem to make my day a little easier and more enjoyable. Ultram usually kicks in about an hour after I first take it, and depending on how many you take, they seem to last alot longer then any other opiate I've ever taken. I've gone to bed at 8pm after taking 5 of them and woke up at 8am and still felt like I was groovin.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


TinyRadius is a simple, small and fast Java Radius library capable of sending and receiving Radius packets of all types. It is released under the terms of the LGPL.
SourceForge Project Overview | JavaDoc API documentation | Download current release
TinyRadius comes with small sample applications which show how to integrate it as a Radius server and a Radius client.
If you do not need to set special attribute values, you can just use the method authenticate() from the RadiusClient:
RadiusClient rc = new RadiusClient(host, sharedSecret); if (rc.authenticate(userName, password)) { ...
1. Create a RadiusClient object with the host name and shared secret of the Radius server you wish to contact. You may set additional details (port numbers, for example) using methods of this object.
RadiusClient rc = new RadiusClient(host, shared);
2. Create the Access-Request Radius packet. Pass the user name and password in the constructor. The User-Name attribute will be added on construction of the object, while the User-Password attribute (PAP) or the CHAP-Password and CHAP-Challenge attributes (CHAP) will be generated when encoding the packet because the request authenticator of the packet is required to encrypt the password.
AccessRequest ar = new AccessRequest(user, pass); ar.setAuthProtocol(AccessRequest.AUTH_CHAP); // or AUTH_PAP
3. Set further attributes. Note that TinyRadius resolves the attribute type from the given type name and that it converts the IP address and the name of the constant (Login-User) to the right values. Please also note how the Vendor-Specific (WISPr) sub-attribute "WISPr-Location-ID" is set. This call results in the creation of a Vendor-Specific attribute with the proper vendor ID and the addition of a sub-attribute to this attribute.
ar.addAttribute("NAS-Identifier", "this.is.my.nas-identifier.de"); ar.addAttribute("NAS-IP-Address", "<IP_ADDRESS>"); ar.addAttribute("Service-Type", "Login-User"); ar.addAttribute("WISPr-Location-ID", "ger,de.sample-location");
4. Send the packet and receive the response.
RadiusPacket response = rc.authenticate(ar); if (response.getPacketType() == RadiusPacket.ACCESS_ACCEPT) { ...
You need to subclass org.tinyradius.util.RadiusServer
.
Provide an implementation for the following methods:
String getSharedSecret(InetAddress client);
This method should check whether the passed client is allowed to communicate with the Radius server. If this is the case, it should return the shared secret that secures the communication to the client.
String getUserPassword(String userName);
This method returns the password for the given user. If you have not access to the password (in the case of CHAP) or you need finer control (you want to set attributes for the response packet, for example), you have to override the following method.
RadiusPacket accessRequestReceived(AccessRequest request, InetAddress client); RadiusPacket accountingRequestReceived(AccountingRequest request, InetAddress client);
Override this methods for fine control about the way Accounting-Request and Access-Request packets are handled. Just return the Radius packet to be sent as a response or null if the request should be ignored.
After implementing your own server class, you can start and stop the server using the methods start() and stop(). For start(), you pass whether the server should listen on the auth and/or the acct port. This method spawns new threads.
RadiusServer server = new MyRadiusServer(); server.start(true, true); server.stop();
You need to subclass org.tinyradius.proxy.RadiusProxy
.
In addition to implementing the abstract methods from RadiusServer
,
you have to provide an implementation for the following method.
RadiusEndpoint getProxyServer(RadiusPacket packet, RadiusEndpoint client);
Using the provided client endpoint (containing the client's IP address, the port number as well as the shared secret) you have to decide whether the given Radius packet should be forwarded or if the TinyRadius server itself shall handle the packet.
If you return null
, the packet will be dealt with as
usual. Otherwise, the packet will be proxied (adding a Proxy-State attribute)
to the returned Radius server.
For a complete example, please check the three classes TestProxy
,
TestServer
and TestClient
, which can be used to
set up an easy proxying Radius infrastructure only with TinyRadius and
only using "localhost".
Please do not hesitate to contact me if you have got questions or suggestions.
Matthias Wuttke


---
layout: post
title: Test Post, PDF Attachment
categories: []
tags:
- pdf
- posterous
- test
status: publish
type: post
published: true
meta:
_original_post_id: ''
_original_import_author: John Duprey
author:
---
Here is a formated post that tests PDF attachments!


Amet reprehenderit adipisicing eiusmod anim dolore ea do nostrud ut laboris irure ipsum cupidatat in.
We cover all areas of contract law including breach of contract, misrepresentation, fraud, illegal contracts, and contract formation.
We help owners of intangible, intellectual assets maintain the rights to their ideas and inventions as well as trademarks.
Our patent law team helps to create and enforce official U.S. patents on inventions, techniques, and unique processes.
We represent U.S. citizens who have disputes with the Internal Revenue Service. Our tax law team has over 40 years of experience.
We are a group of legal professionals with experience in over seventeen areas of law.
Our firm has jurisdictions to practice law in the following areas:
Our firm has nine locations across three different states. We serve clients in the Western United States.
Please tell me about your case and I will let you know what I can do to help you.


Rigoberta Menchú was born on January 9, 1959 to a poor Indian peasant family and raised in the Quiche branch of the Mayan culture. In her early years she helped with the family farm work, either in the northern highlands where her family lived, or on the Pacific coast, where both adults and children went to pick coffee on the big plantations.
Rigoberta Menchú soon became involved in social reform activities through the Catholic Church, and became prominent in the women's rights movement when still only a teenager. Such reform work aroused considerable opposition in influential circles, especially after a guerilla organization established itself in the area. The Menchú family was accused of taking part in guerrilla activities and Rigoberta's father, Vicente, was imprisoned and tortured for allegedly having participated in the execution of a local plantation owner. After his release, he joined the recently founded Committee of the Peasant Union (CUC).
In 1979, Rigoberta, too, joined the CUC. That year her brother was arrested, tortured and killed by the army. The following year, her father was killed when security forces in the capital stormed the Spanish Embassy where he and some other peasants were staying. Shortly afterwards, her mother also died after having been arrested, tortured and raped. Rigoberta became increasingly active in the CUC, and taught herself Spanish as well as other Mayan languages than her native Quiche. In 1980, she figured prominently in a strike the CUC organized for better conditions for farm workers on the Pacific coast, and on May 1, 1981, she was active in large demonstrations in the capital. She joined the radical 31st of January Popular Front, in which her contribution chiefly consisted of educating the Indian peasant population in resistance to massive military oppression.
In 1981, Rigoberta Menchú had to go into hiding in Guatemala, and then flee to Mexico. That marked the beginning of a new phase in her life: as the organizer abroad of resistance to oppression in Guatemala and the struggle for Indian peasant peoples' rights. In 1982, she took part in the founding of the joint opposition body, The United Representation of the Guatemalan Opposition (RUOG).
In 1983, she told her life story to Elisabeth Burgos Debray. The resulting book, called in English, I, Rigoberta Menchú, is a gripping human document which attracted considerable international attention.
In 1986, Rigoberta Menchú became a member of the National Coordinating Committee of the CUC, and the following year she performed as the narrator in a powerful film called When the Mountains Tremble, about the struggles and sufferings of the Maya people.
Over the years, Rigoberta Menchú has become widely known as a leading advocate of Indian rights and ethno-cultural reconciliation, not only in Guatemala but in the Western Hemisphere generally, and her work has earned her several international awards, including the Nobel Peace Prize in 1992 and the Prince of Asturias Award in 1998.
"We are not myths of the past, ruins in the jungle, or zoos. We are people and we want to be respected, not to be victims of intolerance and racism."
 They can't think, they don't know anything, they say. But we have hidden our identity because we needed to resist, we wanted to protect what governments have wanted to take away from us."
"I am like a drop of water on a rock. After drip, drip, dripping in the same place, I begin to leave a mark, and I leave my mark in many people's hearts."
"Peace cannot exist without justice, justice cannot exist without fairness, fairness cannot exist without development, development cannot exist without democracy, democracy cannot exist without respect for the identity and worth of cultures and peoples."
For further information on Rigoberta Menchù and her extraordinary life, you can visit the pages below:


This Graph Entry Point is for test purposes. To run the test program, you have to open the file Graph.gwt.xml, and uncomment the line
<entry-point class='com.chap.links.client.GraphEntryPoint'/>
such that the entry point is defined.

Startdate: Enddate:


RENTER's HUB
SERVICE DETAILS
RENTASTIC.COM
Facebook
Google
Username
Password
Forgot Password?
-------------------------Dont't have an account?-------------------------


Only apply insulin
Only aplly histrelin
Apply alternative 1 and alternite 2 simultaneously
Choose range of criteria A: 30 - 80
Choose range of criteria B: 30 - 80
Choose range of criteria C: 30 - 80
Choose value between: #{mcda.crta_min} and #{mcda.crta_max}
Choose value between #{mcda.crtb_min} and #{mcda.crtb_max}
Choose value between #{mcda.crtc_min} and #{mcda.crtc_max}
Choose the importance of Criterias
Final Score:
Total Score:


{% extends "nav_bar.html" %} {% block title%} Annotation {% endblock %} {% block content %}
Whatever the field this bottom up approach will identify any named entity specific to the problem at hand. Even highly specialized medical data can be parsed through research and specialized models.
This Machine Learning solution starts from the ground up. By identifying important text elements models are able to extract information from even the most specialized data sets.
As the model learns from annotations it can be used to pre-label data and speed up annotation process up to 4x.
Models are constantly tracking performance for each defined entity. If the model struggles with certain elements they can be excluded from predictions.
Models will instantly identify useful entities and parse them into usable information. Extraction tool can be run on entire datasets to uncover further insights from raw text.
Identify numeric entities and instantly see distributions in your dataset.
Fits in easily with Dataturks annotation services. Simply add one click to the pipeline to get automated annotation, metric tracking, and a production ready models.


If certain keys feel different from the rest, their velocity sensitivity can be tweaked by selecting calibration 31. Pressing a key shows its key name in the display, along with its current calibration value, which has a \+10 range. Move the {_parameter_control} up to increase the velocity sensitivity, or down to decrease it, until it feels similar to the other keys. Any keys not actually adjusted with the slider retain their previous calibrations.
If you make a mess of the velocity calibrations, you can reset all keys to zero by selecting calibration 32. The display says "Press again to reset", so press 32 a second time. These changes are still not permanent until you exit calibration mode by pressing STORE, though.


{% extends "teacher/base.html" %} {% block metadata %} {% endblock metadata %} {% block topbar %} Attendance {% endblock topbar %} {% block header %}
This is your dashboard. You can view classes, access reporting, and manage classes and accounts.


{% include 'navbar.html' %}
Create Guide
{% csrf_token %}
Step 0: Title
Step 1: Write a summary
Step 2: Upload your audio file
Step 3: Upload score
Step 4: Add page turns
Page Number
Starting Time (inclusive)
Ending Time (noninclusive)
Add new row
Delete last row
Step 5: Add guide text
Guide Text
Starting Time (inclusive)
Ending Time (noninclusive)
Add new row
Delete last row
Submit Guide


Installing plugins:
$ rails plugin install continuous_builder asset_timestamping
Specifying revisions:
* Subversion revision is a single integer. * Git revision format: - full - 'refs/tags/1.8.0' or 'refs/heads/experimental' - short: 'experimental' (equivalent to 'refs/heads/experimental') 'tag 1.8.0' (equivalent to 'refs/tags/1.8.0')
This is Free Software, copyright 2005 by Ryan Tomayko<EMAIL_ADDRESS>and is licensed MIT: (www.opensource.org/licenses/mit-license.php)
Required Files
- open-uri
- fileutils
- tempfile
- active_support/core_ext/kernel
- optparse
Namespace
- MODULE Rails
- MODULE Rails::Commands
- CLASS Plugin
- CLASS Rails::Commands::Info
- CLASS Rails::Commands::Install
- CLASS Rails::Commands::Plugin
- CLASS Rails::Commands::Remove
- CLASS RailsEnvironment
- CLASS RecursiveHTTPFetcher


DINOSAUR (Walt Disney) Voices: D. B. Sweeney, Julianna Margulies, Alfre Woodard, Ossie Davis, Samuel E. Wright, Della Reese, Joan Plowright, Max Casella. Screenplay: Producer: Pam Marsden. Directors: Eric Leighton and Ralph Zondag. MPAA Rating: PG (violence, adult themes) Running Time: 82 minutes. Reviewed by Scott Renshaw.
For approximately five minutes, the computer-animated DINOSAUR is undeniably spectacular. The story creeps up without dialogue, following the fate of one little dinosaur egg from its trampled, abandoned nest across an astonishing primeval landscape. Creatures of the water nudge the leathery ovum along in lakes teeming with life; creatures of the air carry it over plateaus and through verdant valleys. Seven years removed from the revolutionary screen creations of JURASSIC PARK, I didn't think it would be possible for the mere sight of digital dinosaurs to seize the imagination, but it happens in DINOSAUR nonetheless. With its entirely visual storytelling, DINOSAUR's prologue offers a giddiness-inducing prospect: an introduction to a lost world as quietly, primally engrossing as Kubrick's "dawn of man" prologue to 2001: A SPACE ODYSSEY.

I knew going into DINOSAUR that it was a Disney film aimed at kids, so I can't say I was expecting anything more profound than the story it ultimately provided. That didn't make its presence any less disappointing. That story follows an Iguanodon named Aladar (voiced by D. B. Sweeney), orphaned in true Disney protagonist fashion after hatching from the aforementioned egg to a family of primitive Lemurs. He lives happily with his adopted mother Plio (Alfre Woodard), grandfather Yar (Ossie Davis) and brother Zini (Max Casella) until a meteor shower wreaks havoc on the lemur's habitat. Aladar and his family find themselves back in the realm of the dinosaurs, joined with a herd migrating across a decimated landscape in hopes of finding their nesting ground spared from the meteors' destruction.
Along the way, of course, conflicts develop. The Aladar clan befriends and helps a pair of geriatric dinos -- Brachiosaur Baylene (Joan Plowright) and Styrachosaur Eema (Della Reese) -- much to the consternation of the herd's proto-Darwinian Iguanodon leader Kron (Samuel E. Wright, erstwhile Sebastian from THE LITTLE MERMAID). Aladar, previously isolated from any others of his kind, swoons over Kron's sweet-natured sister Neera (Julianna Margulies), further provoking Kron's wrath. There are confrontations with a pack of hungry Velociraptors and with a pair of equally hungry Carnotaurs (think T. rex, only with even worse dispositions and devilish horns). There are close calls, narrow escapes and grand battles.
Yaaaaaaawwn. Disney's animated features have generally been pretty formulaic, so it's no shock to discover that DINOSAUR features a by-the-numbers script. This variation, however, is so relentlessly somber and dreary that there's nothing left but formula. The personalities of the principal characters are so bland and the vocal performances so uninspired that the characters threaten to disappear into the backgrounds -- no small feat considering the overwhelming brown-ness of the desolate post-apocalyptic scenery. Even the minor characters like Zini and Eema -- those theoretically present to provide a little comic relief -- can't inject any life into the film. In recent Disney films, the musical numbers have come off as purely obligatory, but I found myself pleading for a snappy tune to breathe some life into the film. It's hard to imagine what young viewers would find to embrace in this grim production, and even harder to imagine what would keep an adult awake.
There's no denying that the technology involved in the creation of DINOSAUR is extraordinary, mixing the computerized cast with some real-world settings so seamlessly that it's virtually impossible to tell where reality and hard drive overlap. Apparently, however, co-director Ralph Zondag has become no more adept at dinosaur-driven storytelling than he was for the limp 1993 animated feature WE'RE BACK! That film seemed rushed into theaters to capitalize on that summer's Jurassic juggernaut. This one misses its opportunity to step out of the Spielbergian shadow, gradually devolving into a series of all-too-familiar set pieces. That's a sad end to a film that begins with so much promise. Of course no one would risk millions on DINOSAUR without anthropomorphized animals. Better to recycle Disney's orphan fetish without a whiff of personality or humor, its early grandeur slowly but steadily fading into extinction.
On the Renshaw scale of 0 to 10 'saur losers: 5.
Visit Scott Renshaw's Screening Room http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the Screening Room for details, or reply to this message with subject "Subscribe".
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


MillarRJ,
NichollsZR,
FriedlingsteinP,
AllenMR
2017A modified impulse-response representation of the global near-surface air temperature
and atmospheric concentration response to carbon dioxide emissions
.
Atmos. Chem. Phys.
17,
7213–
7228. (
10.5194/acp-17-7213-2017)


This field is requiredThis field is required
{{c}}
{{c}}
This field is requiredThis field is requiredThis field is requiredThis field is requiredThis field is requiredThis field is required
Edit
Other Images
Points analysis
Charts
Click to expand chart panel
Plot Chart
This field is requiredLineBarPieDoughnutPolarAreaTernaryScatter


CPUID
Section: Linux Programmer's Manual (4)Updated: 2009-03-31
Index Return to Main Contents
NAME
cpuid - x86 CPUID access deviceDESCRIPTIONS
CPUID provides an interface for querying information about the x86 CPU.This device is accessed by lseek(2) or pread(2) to the appropriate CPUID level and reading in chunks of 16 bytes. A larger read size means multiple reads of consecutive levels.
The lower 32 bits of the file position is used as the incoming %eax, and the upper 32 bits of the file position as the incoming %ecx, the latter intended for "counting" eax levels like eax=4.
This driver uses /dev/cpu/CPUNUM/cpuid, where CPUNUM is the minor number, and on an SMP box will direct the access to CPU CPUNUM as listed in /proc/cpuinfo.
This file is protected so that it can only be read by the user root, or members of the group root.
NOTES
The CPUID instruction can be directly executed by a program using inline assembler. However this device allows convenient access to all CPUs without changing process affinity.Most of the information in cpuid is reported by the kernel in cooked form either in /proc/cpuinfo or through subdirectories in /sys/devices/system/cpu. Direct CPUID access through this device should only be used in exceptional cases.
The cpuid driver is not auto-loaded. On modular kernels you might need to use the following command to load it explicitly before use:
$ modprobe cpuid
There is no support for CPUID functions that require additional input registers.
Very old x86 CPUs don't support CPUID.
SEE ALSO
Intel Corporation, Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2A: Instruction Set Reference, A-M, 3-180 CPUID reference.Intel Corporation, Intel Processor Identification and the CPUID Instruction, Application note 485.
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.
Index
This document was created by man2html, using the manual pages.
Time: 05:33:53 GMT, December 24, 2015


A cafe traditionally serves Tea, Coffee, soft drinks and usually a good selection of cakes. Some places offer sandwiches, light bites and even meals. Pubs focus more on alcohol and “nibbles"- being crisps, peanuts, pork scratching etc. Some pubs do offer meals also but usually a different caliber of food. A “good" pub meal is homemade food, traditional English food such as burgers, Sunday dinners, pies etc. The atmosphere is different in cafes and pubs. Cafes are great for meeting up with family, mums and children, friends or elderly relatives. A decent cafe has a relaxed ambience with soft background music and a friendly face serving you your drinks etc. Whereas a pub, although can have equally a relaxing atmosphere, as it is focused more on alcohol can have a more upbeat atmosphere. Some pubs play loud music or have live bands playing and a pub is commonly frequented on a night time. Some pubs have TV screens for football games and other popular culture. A lot have pool tables darts boards, gambling machines and some offer a pub quiz once a week too.
A café setting is known as a casual social environment where you can find people reading newspapers and magazines, playing board games, studying or chatting with others about current events. It is known also regarded as a place where information can be exchanged. It shares some characteristics of a bar and some characteristics of a restaurant given its selection of foods and beverages served, but is distinct from a cafeteria which is a type of restaurant where customers can choose from many
An entertainment venue and bar that usually operates late into the night. A nightclub is generally distinguished from regular bars, pubs or taverns by the inclusion of a stage for live music, one or more dance floor areas and a DJ booth, where a DJ plays recorded music. The upmarket nature of nightclubs can be seen in the inclusion of VIP areas in some nightclubs, for celebrities and their guests. Nightclubs are much more likely than pubs or sports bars to use bouncers to screen prospective clubgoers for entry.
A café setting is known as a casual social environment where you can find people reading newspapers and magazines, playing board games, studying or chatting with others about current events. It is known also regarded as a place where information can be exchanged. It shares some characteristics of a bar and some characteristics of a restaurant given its selection of foods and beverages served, but is distinct from a cafeteria which is a type of restaurant where customers can choose from many
An entertainment venue and bar that usually operates late into the night. A nightclub is generally distinguished from regular bars, pubs or taverns by the inclusion of a stage for live music, one or more dance floor areas and a DJ booth, where a DJ plays recorded music. The upmarket nature of nightclubs can be seen in the inclusion of VIP areas in some nightclubs, for celebrities and their guests. Nightclubs are much more likely than pubs or sports bars to use bouncers to screen prospective clubgoers for entry.


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 8
Dietary
This moist lemon cake with its sugary crust is so good it won't last long. Make one extra and freeze (un-iced) for another day.
Preheat the oven to 180C/350F/Gas 4. Grease the base and sides of a 20-22cm/8-8½in round cake tin and line the bottom with baking parchment.
In a mixing bowl cream together the butter and sugar until light and fluffy using an electric hand whisk or wooden spoon. Slowly beat in the eggs, one at a time. When the eggs are fully incorporated, fold in the flour, then the almonds and lemon zest.
Scrape the mixture into the tin and tap the sides to release any air bubbles. Bake for 35-40 minutes, or until the sponge is lightly golden-brown, coming away from the sides of the tin and a skewer inserted into the middle of the cake comes out clean.
While the cake is still hot and still in the tin, stab it with a chopstick or some such weapon all over the cake, making 15 or so holes. Drizzle the lemon juice into the holes and all over the cake then leave in the tin to cool.
When you're ready to serve the cake, make the icing. To make the icing, mix the lemon juice, a little at a time, into the icing sugar to make a smooth paste. Remove the cake from the tin and smooth the icing on the top, then serve.
You need JavaScript to view this clip.
How to cream butter by hand


This package contains basic definitions: Type definitions of Logic and Strength, interface definitions (connectors) for digital electrical components, and partial models for connection patterns which are often used.
| Name | Description |
|---|---|
| Logic | Logic values and their coding according to IEEE 1164 STD_ULOGIC type |
| UX01 | 4-valued subtype of IEEE 1164 STD_ULOGIC type |
| Strength | Output strengths of registers |
| DigitalSignal | Digital port (both input/output possible) |
| DigitalInput | Input DigitalSignal as connector |
| DigitalOutput | Output DigitalSignal as connector |
| SISO | Single input, single output |
| MISO | Multiple input - single output |
| MIMO | Multiple input - multiple output |
| MemoryBase | Base model for memory elements |


| Service | Url | Status | Created At | |
|---|---|---|---|---|
| {{service.label}} | {{service.id}} | {{service.url}} | {{service.status}} | {{service.createdAt}} |
No registered services.
| Service | Url | Status | Created At | |
|---|---|---|---|---|
| {{service.label}} | {{service.id}} | {{service.url}} | {{service.status}} | {{service.createdAt}} |
No registered services.


I am a coding enthusiast who likes building websites and mobile apps. After graduating with a Computer Science degree, I was working for EY as a Guidewire Developer which involved tailoring the platform according to the clients business needs led me to learn and explore other full stacks.
I recently graduated from Coding Dojo, Silicon Valley bootcamp and I am excited to enter the world of web development. I dedicated 1200+ hours learning MEAN and Python full stack as well as creating iOS apps using Swift in 3 months.
I'm a foodie! I love to travel, dance and code! Get in touch to know more about me.


Using EntityFramework Core for configuration and operational data¶
IdentityServer is designed for extensibility, and one of the extensibility points is the storage mechanism used for data that IdentityServer needs. This quickstart shows how to configure IdentityServer to use EntityFramework (EF) as the storage mechanism for this data (rather than using the in-memory implementations we had been using up until now).
Note
In addition to manually configuring EF support, there is also an IdentityServer template to create a new project with EF support. Use dotnet new is4ef
to create it. See here for more information.
IdentityServer4.EntityFramework¶
There are two types of data that we are moving to the database. The first is the configuration data (resources and clients). The second is operational data that IdentityServer produces as it’s being used (tokens, codes, and consents). These stores are modeled with interfaces, and we provide an EF implementation of these interfaces in the IdentityServer4.EntityFramework Nuget package.
Get started by adding a reference to the IdentityServer4.EntityFramework Nuget package the IdentityServer project.
Using SqlServer¶
Given EF’s flexibility, you can then use any EF-supported database. For this quickstart we will use the LocalDb version of SqlServer that comes with Visual Studio.
Database Schema Changes and Using EF Migrations¶
The IdentityServer4.EntityFramework package contains entity classes that map from IdentityServer’s models. As IdentityServer’s models change, so will the entity classes in IdentityServer4.EntityFramework. As you use IdentityServer4.EntityFramework and upgrade over time, you are responsible for your own database schema and changes necessary to that schema as the entity classes change. One approach for managing those changes is to use EF migrations, and this quickstart will show how that can be done. If migrations are not your preference, then you can manage the schema changes in any way you see fit.
Note
SQL scripts for SqlServer are maintained for the entities in IdentityServer4.EntityFramework. They are located here.
EF Tooling for Migrations¶
In addition to tracking schema changes with EF migrations, we will also use it to create the initial schema in the database. This requires the use of the EF Core tooling (more details here). We will add those now, and unfortunately this must be done by hand-editing your .csproj file. To edit the .csproj by right-click the project and select “Edit projectname.csproj”:
Note
Depending on how you created your initial project for the IdentityServer host, you might already have these tools configured in your csproj file. If they are, you can skip to the next section.
And then add the below snippet before the end </Project> element:
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
</ItemGroup>
It should look something like this:
Save and close the file. To test that you have the tools properly installed, you can open a command shell in the same directory as the project and run dotnet ef. It should look like this:
Configuring the stores¶
The next step is to replace the current calls to AddInMemoryClients
, AddInMemoryIdentityResources
, and AddInMemoryApiResources
in the ConfigureServices
method in Startup.cs.
We will replace them with this code:
const string connectionString = @"Data Source=(LocalDb)\MSSQLLocalDB;database=IdentityServer4.Quickstart.EntityFramework-2.0.0;trusted_connection=yes;";
var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;
// configure identity server with in-memory stores, keys, clients and scopes
services.AddIdentityServer()
.AddDeveloperSigningCredential()
.AddTestUsers(Config.GetUsers())
// this adds the config data from DB (clients, resources)
.AddConfigurationStore(options =>
{
options.ConfigureDbContext = builder =>
builder.UseSqlServer(connectionString,
sql => sql.MigrationsAssembly(migrationsAssembly));
})
// this adds the operational data from DB (codes, tokens, consents)
.AddOperationalStore(options =>
{
options.ConfigureDbContext = builder =>
builder.UseSqlServer(connectionString,
sql => sql.MigrationsAssembly(migrationsAssembly));
// this enables automatic token cleanup. this is optional.
options.EnableTokenCleanup = true;
options.TokenCleanupInterval = 30;
});
You might need these namespaces added to the file:
using Microsoft.EntityFrameworkCore;
using System.Reflection;
The above code is hard-coding a connection string, which you should feel free to change if you wish.
Also, the calls to AddConfigurationStore
and AddOperationalStore
are registering the EF-backed store implementations.
The “builder” callback function passed to these APIs is the EF mechanism to allow you to configure the DbContextOptionsBuilder
for the DbContext
for each of these two stores.
This is how our DbContext
classes can be configured with the database provider you want to use.
In this case by calling UseSqlServer
we are using SqlServer.
As you can also tell, this is where the connection string is provided.
The “options” callback function in UseSqlServer
is what configures the assembly where the EF migrations are defined.
EF requires the use of migrations to define the schema for the database.
Note
It is the responsibility of your hosting application to define these migrations, as they are specific to your database and provider.
We’ll add the migrations next.
Adding migrations¶
To create the migrations, open a command prompt in the IdentityServer project directory. In the command prompt run these two commands:
dotnet ef migrations add InitialIdentityServerPersistedGrantDbMigration -c PersistedGrantDbContext -o Data/Migrations/IdentityServer/PersistedGrantDb
dotnet ef migrations add InitialIdentityServerConfigurationDbMigration -c ConfigurationDbContext -o Data/Migrations/IdentityServer/ConfigurationDb
It should look something like this:
You should now see a ~/Data/Migrations/IdentityServer folder in the project. This contains the code for the newly created migrations.
Note
If your database project is a separate class library and you fixed the error ‘Unable to create an object of type ‘<your-name>DbContext’. Add an implementation of ‘IDesignTimeDbContextFactory’ to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time.’ by adding implementations of the IDesignTimeDbContextFactory, you will also need implementations of the factory for both the PersistedGrantDbContext as well as the ConfigurationDbContext.
Initialize the database¶
Now that we have the migrations, we can write code to create the database from the migrations. We will also seed the database with the in-memory configuration data that we defined in the previous quickstarts.
In Startup.cs add this method to help initialize the database:
private void InitializeDatabase(IApplicationBuilder app)
{
using (var serviceScope = app.ApplicationServices.GetService<IServiceScopeFactory>().CreateScope())
{
serviceScope.ServiceProvider.GetRequiredService<PersistedGrantDbContext>().Database.Migrate();
var context = serviceScope.ServiceProvider.GetRequiredService<ConfigurationDbContext>();
context.Database.Migrate();
if (!context.Clients.Any())
{
foreach (var client in Config.GetClients())
{
context.Clients.Add(client.ToEntity());
}
context.SaveChanges();
}
if (!context.IdentityResources.Any())
{
foreach (var resource in Config.GetIdentityResources())
{
context.IdentityResources.Add(resource.ToEntity());
}
context.SaveChanges();
}
if (!context.ApiResources.Any())
{
foreach (var resource in Config.GetApiResources())
{
context.ApiResources.Add(resource.ToEntity());
}
context.SaveChanges();
}
}
}
And then we can invoke this from the Configure
method:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
// this will do the initial DB population
InitializeDatabase(app);
// the rest of the code that was already here
// ...
}
Now if you run the IdentityServer project, the database should be created and seeded with the quickstart configuration data. You should be able to use SQL Server Management Studio or Visual Studio to connect and inspect the data.
Note
The above InitializeDatabase
helper API is convenient to seed the database, but this approach is not ideal to leave in to execute each time the applicaion runs. Once your database is populated, consider removing the call to the API.
Run the client applications¶
You should now be able to run any of the existing client applications and sign-in, get tokens, and call the API – all based upon the database configuration.
Note
The code as it stands in this section still relies upon Config.cs and its fictitious users Alice and Bob. If your user list is short and static, an adjusted version of Config.cs may suffice, however you may wish to manage a larger and more fluid user list dynamically within a database. ASP.NET Identity is one option to consider, and a sample implementation of this solution is listed among the quickstarts in the next section.


Quick Start: How to Write and Run Tests
This example shows how to write and run a couple of test cases for the MATLAB fliplr function.
Contents
Make a folder for your tests
To get started, create a folder (directory) that will contain your tests, and then make that your working folder. The test directory in this example is example_quick_start.
cd example_quick_start
Write each test case as a simple M-file
Write each test case as an M-file function that returns no output arguments. The function name should start with "test". ("Test" works, too.) The test case passes if the function runs with no error.
Here's a test-case M-file that verifies the correct output for a vector input.
type testFliplrVector
function testFliplrVector %testFliplrVector Unit test for fliplr with vector input in = [1 4 10]; out = fliplr(in); expected_out = [10 4 1]; if ~isequal(out, expected_out) error('testFliplrVector:notEqual', 'Incorrect output for vector.'); end
The function testFliplrVector calls the function being tested and checks the output against the expected output. If the output is different than expected, the function calls error.
Here's another test-case M-file that verifies the correct fliplr output for a matrix input.
type testFliplrMatrix
function testFliplrMatrix %testFliplrMatrix Unit test for fliplr with matrix input in = magic(3); assertEqual(fliplr(in), in(:, [3 2 1]));
This function is simpler than testFliplrVector because it uses the utility testing function assertEqual. assertEqual checks to see whether its two inputs are equal. If they are equal, assertEqual simply returns silently. If they are not equal, assertEqual calls error.
Run all the tests using runtests
To run all your test cases, simply call runtests. runtests automatically finds all the test cases in the current directory, runs them, and reports the results to the Command Window.
runtests
Starting test run with 2 test cases. .. PASSED in 0.010 seconds.


{{slide.text}}
{{sharepoint}}
Most of the world accesses the internet on multiple devices.
Percentage of users that are frustrated with page load times.


Steps and activities for conducting a climate change vulnerability and adaptation assessment. Source: Reference [ 23].
✓
Define the geographical range and health outcomes of interest
✓
Identify the questions to be addressed and steps to be used
✓
Identify the policy context for the assessment
✓
Establish a project team and a management plan
✓
Establish a stakeholder process
❖
Develop a communications plan
✓
Establish baseline conditions by describing the human health risks of current climate variability and recent climate change and the public health policies and programs to address the risks
✓
Describe current risks of climate-sensitive health outcomes, including the most vulnerable populations and regions
✓
Identify vulnerable populations and regions
❖
Describe risk distribution using spatial mapping
✓
Analyze the relationships between current and past weather/climate conditions and health outcomes
✓
Identify trends in climate-change-related exposures
✓
Take account of interactions between environmental and socioeconomic determinants of health
✓
Describe the current capacity of health and other sectors to manage the risks of climate-sensitive health outcomes
✓
Estimate future health risks and impacts under climate change
❖
Describe how the risks of climate-sensitive health outcomes, including the most vulnerable populations and regions, may change over coming decades, irrespective of climate change
✓
Estimate the possible additional burden of adverse health outcomes due to climate change
✓
Identify and prioritize policies and programs to address current and projected health risks
✓
Identify additional public health and health-care policies and programs to prevent likely future health burdens
✓
Identify resources for implementation and potential barriers to be addressed
❖
Estimate the costs of action and of inaction to protect health
❖
Identify possible actions to reduce the potential health risks of adaptation and greenhouse gas mitigation policies and programs implemented in other sectors
❖
Develop and propose health adaptation plans
❖
Establish an iterative process for managing and monitoring the health risks of climate change