OpenLLM-France/wikimedia huggingface dataset:
# Cg Programming/Unity/Two-Sided Surfaces

This tutorial covers two-sided per-vertex lighting.
It's part of a series of tutorials about basic lighting in Unity. In this tutorial, we extend Section “Specular Highlights” to render two-sided surfaces. If you haven't read Section “Specular Highlights”, this would be a very good time to read it.

## Two-Sided Lighting

As shown by the figure of the algebraic surface, it's sometimes useful to apply different colors to the two sides of a surface. In Section “Cutaways”, we have seen how two passes with front face culling and back face culling can be used to apply different shaders to the two sides of a mesh. We will apply the same strategy here.
As mentioned in Section “Cutaways”, an alternative approach in Cg is to use a fragment input parameter with semantic VFACE to distinguish between the two sides, see Unity's documentation of shader semantics.

## Shader Code

The shader code for two-sided per-vertex lighting is a straightforward extension of the code in Section “Specular Highlights”. It requires two sets of material parameters (front and back) and duplicates all passes — one copy with front-face culling and the other with back-face culling. The shaders of the two copies are identical except that the shader for the back faces uses the negated surface normal vector and the properties for the back material.
This code consists of four passes, where the first pair of passes renders the front faces, and the second pair of passes renders the back faces using the negated normal vector and the back material properties. The second pass of each pair is the same as the first apart from the additive blending and the missing ambient color.

## Summary

Congratulations, you made it to the end of this short tutorial with a long shader. We have seen:
* How to use front-face culling and back-face culling to apply different shaders on the two sides of a mesh.
* How to change the Phong lighting computation for back-facing triangles.

## Further reading

If you still want to know more
* about the shader version for single-sided surfaces, you should read Section “Specular Highlights”.
* about front-facing and back-facing triangles in Cg, you should read Section “Cutaways”.
* about using a fragment input parameter with semantic VFACE to distinguish between front-facing and back-facing triangles, see Unity's documentation of shader semantics.
< Cg Programming/Unity
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nd4/4. Nxd4
## 4. Nxd4

Instead of accepting the gambitted pawn, white declines it and instead trades the knights in the center.
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nd4/4. Nxe5/4...Qg5
## 4...Qg5!

Accepting the gambit was a mistake, as Black now shows with the accurate 4...Qg5.
Attempting to hold on to the knight with 5. Nxf7?? will result in 5...Qxg2 in which White will lose either the rook, attempt to hold on to the rook and lose the queen with 6. Rf1 Qxe4+, or get checkmated by attempting to keep both the rook and the queen with 7. Be2 Nf3#.
Better for White is 5. Bxf7+, which loses a piece for two pawns but keeps White in the game.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
| 5 | 6 | 7 | |
| Bxf7+ Kd8 | O-O Qxe5 | c3 Ne6 | ∞ |
| Nxf7?? Qxg2 | Rf1 Qxe4+ | Qe2 Nxe2 | -/+ |
| … … | ... ... | Be2?? Nf3# | 0-1 |
| ... ... | Ng5 Qxh1+ | Bf1 Be7 | -/+ |
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nd4/4. Nxe5/4...Qg5/5. Nxf7/5...Qxg2/6. Rf1/6...Qxe4/7. Be2
## 7. Be2??

The worse of the two moves, but White was losing anyway. 7...Nf3# is the finish to this game.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
| 7 | |
| ... Nf3# | 0-1 |
When contributing to this Wikibook, please follow the Conventions for organization.
# Blackburne Shilling Gambit
### 3...Nd4

Black violates an opening principle by again moving his knight. It may be tempting for White to take the now unprotected pawn with 4. Nxe5? but after 4...Qg5, White is in trouble (though 5. Bxf7+ remains playable). To maintain an advantage, White can play 4. Nxd4, 4. c3 or 4. O-O.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. e4 e5 2. Nf3 Nc6 3. Bc4 Nd4
| 4 | 5 | 6 |
| O-O Nxf3+ | Qxf3 Nf6 | +/= |
| Nxd4 exd4 | O-O | +/= |
| c3 Nxf3+ | Qxf3 Nf6 | +/= |
| Nxe5? Qg5 | Bxf7+ Kd8 | Ng4 Nh6 | ∞ |
| Bxf7 Kxf7 | Nxe5 Ke7 | =+ |
| Nxe5? Qg5 | Nxf7?? Qxg2 | Rf1 Qxe4 | +- |
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nd4/4. Nxe5
## 4. Nxe5?!

This looks natural, but it is not a good move as there is a strong double attack! After Qg5!, White is in a lot of trouble and has to give up a piece to have a playable game. This is known as the Blackburne-Shilling gambit. After Qg5, both e5 and g2 are attacked by the queen.

## Theory table

| 4 | 5 | 6 | 7 | |
| ... Qg5 | Bxf7 Kd8 | Ng4 Nh6 | | ∞ |
| … … | Nxf7?? Qxg2 | Rf1 Qxe4+ | Qe2 Nxe2 | -/+ |
| … … | … … | … … | Be2?? Nf3# | 0-1 |
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nd4/4. Nxe5/4...Qg5/5. Nxf7
## 5. Nxf7??

Here 5. Nxf7?? is a blunder. White would be better off losing her knight for two pawns with 5. Bxf7+, but Nxf7 loses a major piece or the game to 5...Qxg2.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
| 5 | 6 | 7 | |
| ... Qxg2 | Rf1 Qxe4+ | Qe2 Nxe2 | -/+ |
| … … | ... ... | Be2?? Nf3# | 0-1 |
| ... ... | Ng5 Qxh1+ | Bf1 Be7 | -/+ |
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nd4/4. Nxe5/4...Qg5/5. Nxf7/5...Qxg2/6. Rf1/6...Qxe4
## 6...Qxe4+

White is completely lost. Black plays 6...Qxe4+, which allows for two options.
The worse of the two options doesn't seem the worst, but 7. Be2 allows the smothered mate 7...Nf3# where the bishop is pinned.
Therefore White must give away the queen with 7. Qe2 and play on without that queen.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
| 7 | |
| Qe2 Nxe2 | -/+ |
| Be2?? Nf3# | 0-1 |
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nd4/4. Nxe5/4...Qg5/5. Nxf7/5...Qxg2/6. Rf1/6...Qxe4/7. Be2/7...Nf3
## 7...Nf3#

And White is mated.
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nd4/4. Nxe5/4...Qg5/5. Nxf7/5...Qxg2
## 5...Qxg2!

Qxg2 is the accurate followup and the dream of Blackburne Shilling Gambit players. White has to give away a major piece to stop checkmate.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
| 6 | 7 | |
| Rf1 Qxe4+ | Qe2 Nxe2 | -/+ |
| ... ... | Be2?? Nf3# | 0-1 |
| Ng5 Qxh1+ | Bf1 Be7 | -/+ |
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nd4/4. Nxe5/4...Qg5/5. Nxf7/5...Qxg2/6. Rf1
## 6. Rf1

Rf1 seems like a defense to the Gambit, but Black can play 6...Qxe4+ in which White must give away her queen or allow checkmate.
Actually better was 6. Ng5 which gives away the rook but moves the knight to safety and protects the e4-pawn. After 6...Qxh1+ White can play 7. Bf1!

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
| 6 | 7 | |
| ... Qxe4+ | Qe2 Nxe2 | -/+ |
| ... ... | Be2?? Nf3# | 0-1 |
When contributing to this Wikibook, please follow the Conventions for organization.
# Chess Opening Theory/1. d4/1...Nf6/2. c4/2...e5/3. dxe5/3...Ng4/4. e3
## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
1.d4 Nf6 2.c4 e5 3.dxe5 Ng4 4.e3
| 4 | 5 | 6 | 7 | 8 |
| Nxe5 Nh3 | d6 Nf4 | g6 Nc3 | Bg7 Be2 | O-O O-O | += |
# Indian Defence
### 2...e6

2...e6 is a move with several purposes. First, it opens a diagonal for the development of Black's dark-squared bishop. It also challenges White's ambition in the center by attacking the d5 square. By doing so, Black prepares to play ...d5 while discouraging White from playing d5 themself.
A disadvantage for Black of systems with ...e6 is that the pawn on e6 blocks the c8-h3 diagonal on which Black's light-squared bishop may wish to operate. Finding a useful way to develop this piece, either through a queenside fianchetto or a future reopening of the c8-h3 diagonal, is a perennial challenge for Black players after ...e6. However, the inactivity of the light-squared bishop, while sometimes problematic, is rarely fatal in the early going, and should not discourage Black players from choosing 2...e6 or ...e6 on a later move.
White has three main choices here:
* 3. Nc3 - more aggressive in trying to establish a center via e2-e4, but also allows the 3...Bb4 pin (Nimzo-Indian). Black may also play a Benoni (3...c5) or QGD (3...d5).
* 3. Nf3 - Less aggressive but solid. White may face a Queen's Indian (3...b6), Benoni, Bogo-Indian (3...Bb4+), or QGD.
* 3. g3 - This usually leads to a Catalan, or sometimes a Symmetrical English or Benoni. The Catalan offers good chances for White to obtain powerful piece play in a more open game than the typical 1. d4 openings.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. d4 Nf6 2. c4 e6
| | 3 |
| | Nc3 ... | = |
| | Nf3 ... | = |
| | g3 ... | = |
| Neo-Indian Attack | Bg5 ... | = |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Chess Opening Theory/1. d4/1...Nf6/2. c4/2...e5/3. dxe5/3...Ng4/4. e3/4...Nxe5
## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
1.d4 Nf6 2.c4 e5 3.dxe5 Ng4 4.e3 Nxe5
| | 4 | 5 | 6 | 7 | 8 |
| Shereshevsky variation | Nh3 d6 | Nf4 g6 | Nc3 Bg7 | Be2 O-O | O-O Nbd7 | = |
# Neo-Indian Attack

The pinning of the f6 knight looks similar to the Torre Attack, but here White cannot force the doubling of pawns.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. d4 Nf6 2. c4 e6 3.Bg5
| 3 | 4 | 5 | 6 |
| Bg5 h6 | Bh4 c5 | d5 d6 | Nc3 Be7 | = |
| ... Bb4+ | Nd2 h6 | Bh4 c5 | a3 Bd2+ | = |
When contributing to this Wikibook, please follow the Conventions for organization.
# Indian Defence
### 3. Nc3

With 3.Nc3, White develops a piece and continues to fight for the center of the board. On c3, the knight controls the important d5 and e4 squares. Black can choose from four main continuations. One of the main continuations is Bb4, which activates the dark squared bishop and pins the white knight. This is known as the Nimzo-Indian Defense.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. d4 Nf6 2. c4 e6 3. Nc3
| | 3 |
| Nimzo-Indian Defence | ... Bb4 | = |
| Queen's Gambit Declined by transposition | ... d5 | |
| Modern Benoni Defence | ... c5 | = |
| Queen's Indian Defence | ... b6 | = |
| Black Knights Tango by transposition | ... Nc6 | += |
When contributing to this Wikibook, please follow the Conventions for organization.
# Nimzo-Indian Defence
### 3...Bb4

3...Bb4 introduces the Nimzo-Indian Defence. Black develops their dark-squared bishop as actively as possible and pins the white knight. If not handled properly, this pin can cause problems for White for several reasons. The most positionally significant of these is that the pin nullifies White's control of the e4 square. White would like to play e4 at some point, but Black's knight on f6 dominates the square for now, since the c3 knight cannot recapture when pinned. Consequently, Black may be able to install their knight on e4 or otherwise use the square for his own purposes if White does not fight for it.
A second implication of the pin is that Black is threatening to exchange bishop for knight and double White's pawns. The resulting position would be unbalanced, with White trying to open the position to utilize the power of his two bishops, and Black working to keep the position closed and exploit White's pawn weaknesses. White must decide how they feel about this prospect when choosing their next moves.
The Nimzo-Indian Defence is quite popular and there are a number of systems available to each side. White's fourth move options are listed below. Note that perhaps the most obvious move, 4. Bd2, breaking the pin and eliminating Black's threat to double White's pawns, is not among them. This is not because 4.Bd2 loses immediately; it does not. However, it is rarely seen in top level chess because it is far less ambitious than White's other choices.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation. .
1. d4 Nf6 2. c4 e6 3. Nc3 Bb4
| | 4 | 5 | 6 | 7 |
| Rubinstein System | e3 O-O | Bd3 d5 | Nf3 c5 | O-O dxc4 | = |
| Fianchetto Variation | g3 c5 | Nf3 cxd4 | Nxd4 O-O | Bg2 d5 | cxd5 Nxd5 | = |
| Classical Variation or Capablanca Variation | Qc2 O-O | a3 Bxc3+ | Qxc3 b6 | Nf3 Bb7 | = |
| Kasparov Variation | Nf3 b6 | Bg5 Bb7 | e3 h6 | Bh4 Bxc3+ | = |
| 4.f3 Variation | f3 c5 | d5 Nh5 | g3 Bxc3+ | bxc3 f5 | ∞ |
| Sämisch Variation | a3 Bxc3+ | bxc3 c5 | e3 Nc6 | Bd3 O-O | = |
| Leningrad Variation | Bg5 c5 | d5 d6 | e3 exd5 | cxd5 Nbd7 | ∞ |
| Spielmann Variation | Qb3 c5 | dxc5 Nc6 | Bg5 h6 | Bxf6 Qxf6 | = |
| 4.g4 Variation | g4 c5 | dxc5 Nxg4 | a6 Bxc3+ | bxc3 Qh4 | Nh3 | ∞ |
When contributing to this Wikibook, please follow the Conventions for organization.

## References

* Kasparov, Garry, & Keene, Raymond 1989 Batsford chess openings 2. ISBN 0-8050-3409-9.
# Shereshevsky Variation
## 5. Nh3

White plans on putting his knight on f4, to prevent d5 by black. Additionally, he'll fianchetto his dark squared bishop to b2.

## Theory table

For explanation of theory tables, see theory table and for notation, see algebraic notation.
1. d4 Nf6 2.c4 e5 3.dxe5 Ng4 4.e3 Nxe5 5.Nh3
| 6 | 7 | 8 | 9 |
| ... d6 | Nf4 g6 | Nc3 Bg7 | Be2 O-O | = |
| ... d5 | cxd5 Bxh3 | gxh3 Bb4+ | Nc3 O-O | = |
| ... Bb4+ | Bd2 Bxd2 | Qxd2 d6 | Nf4 O-O | += |
When contributing to this Wikibook, please follow the Conventions for organization.
# Vector files (2D & 3D scalable line drawings)

Vector files present special challenges partly because they are used for everything from 3 dimensional models of aircraft to scalable desktop icons. So to talk about one format for all the different uses would be misleading. Instead we'll break vector file formats down by their purpose.
| File type | Reviewed formats |
| 3 Dimensional models (architectural, animation, engineering...) | DWG, DXF, VRML, IFC |
| 2 Dimensional drawings (architectural, engineering...) | SVG, DXF, DWG |

## 3 Dimensional models

3D computer graphics can model or represent almost anything found in the physical world, and much more. Because of the variety of uses progress has been slow on adopting standard formats for exchanging and storing data. Many good programs can import and export in several propriety formats, although the quality of the resulting file can be suspect because in many cases developers have had to experiment and guess their way into how the external format works.
In the fields of architecture, engineering and building, some formats (and families of formats) have begun to emerge as contenders for the role of an industry-wide standards. One such format (are there others?) is the Industry Foundation Classes format (IFC) which is now compulsory for state supported building projects in Denmark and many state supported Finnish projects ref.
Until the adoption of Object Class formats like IFC, the main contenders for being called a standard are the proprietary but open Drawing Exchange Format (DXF) from AutoDesk and the W3C recommendation Virtual Reality Modeling Language (VRML).
Because the use of AutoCAD (an AutoDesk product) is so widespread there has been a very successful attempt at supporting their format in other products. The Open Design Alliance has produced the commercially licensed OpenDWG (DWG format) as a format compatible with AutoCADs own DWG format. Many competitors of AutoCAD now offer support for DWG via this format.
The OpenSource 3D modeling application Blender can export in both DXF and VRML.

## 2 Dimensional drawings

Two-dimensional vector graphic formats can be divided into two groups. Commercial products like AutoCAD and ArchiCAD use 2D (and 3D) vector information to make highly advanced, multiple layered drawings for architects and engineers.
In the graphics and to some extent the animation industry, formats like the proprietary Flash format and the open source standard SVG are popular. Many Adobe programs use a variety of formats which could well be very good working files in the parent program, but can be a problem to open later when, especially when a copy of that program is no longer available.
(this section needs expansion)

### Recommendations

* 3 Dimensional Models: Keep the original working file and make a copies in the DXF (to protect metadata) and VRML (to secure visual elements) formats.
* 2 Dimensional Drawings: Keep the original working file and make a copy in the DXF format or SVG format depending on which is best suited.

### References

CAD Standards (not fully incorporated in this section yet)
# Choosing The Right File Format/Appendix
## Related Reading

* Read
* Recommended Data Formats for Preservation Purposes in the FCLA Digital Archive.
* Digital preservation: a time bomb for Digital Libraries - Margaret Hedstrom
* Digital Preservation in Wikipedia
* Guidelines for the Preservation of Digital Heritage (PDF) UNESCO, March 2003.
* European Interoperability Framework for pan-European eGovernment Services pdf(1449Kb), 2004. Includes the EU definition of Open Standards (p 9) and outlines reasons for giving strong consideration to OpenSource software (p 10).
* Public Sector Use of Open IT Standards and Open Source Software in the Norwegian public sector
* The Interoperability Framework is the Danish e-Government Interoperability Framework for exchange, storage and availability of electronic information
* Openformats.org
* Wikipedia:Comparison of document markup languages
* "Holding My Data Hostage: Why software licenses should not expire" article by Michael Herf 2001-05-08
* "Planning for longevity" article by Jack Ganssle 2004-07-01

## Standards organisation

* World Wide Web Consortium (W3C)
* Organization for the Advancement of Structured Information Standards (Oasis)
* International Standards Organisation (ISO)
* American National Standards Institute (ANSI)
* PDF-Archive Committee

## File types for further research

Feel free to expand this list.
* Contact lists (ldap for external address books, ldif -Lightweight Directory Interchange Format)
* Audio files (Ogg Vorbis) and the problems with mp3 as proprietary format Frauenhofer Patents
* Video files: Moving Pictures Experts Group MPEG-2 & MPEG-4 include Frauenhofer Patents
* 3D Modeling: ASCII Alias/Wavefront OBJ. What is SQL DDL?
* Financial records
* Calendars: ScheduleWorld
* Diagrams: SVG, DOT graph descriptions or Dia diagrams and flowcharts over Microsoft Visio files

## File formats for portability

* Addressbook information: LDIF
# Choosing The Right File Format
## Table of Contents

* Introduction (jan 2 2006)
* Quick Guide to recommended formats (jan 2 2006)
* Is there a problem? (jan 2 2006)
* A general look at File Formats (jan 2 2006)
* Recommendations in detail (jan 2 2006)
** Texts and Documents (jan 2 2006)
** Web pages (jan 2 2006)
** Images (Raster Graphics) (jan 2 2006)
** Vector Formats (jan 2 2006)
*** Vector formats for graphics (jan 2 2006)
*** Vector Formats for 3D modeling (jan 2 2006)
*** Vector Formats for AEC (Architecture, Engineering and Construction) (jan 2 2006)
** Audio File Formats (jan 2 2006)
** Video and Multi-media Data Formats (jan 2 2006)
** Databases & Spreadsheets (jan 2 2006)
* Appendix (jan 2 2006)

## Further reading

* FOSS Open Standards/Comparison of File Formats
* Minimizing Hard Disk Drive Failure and Data Loss
# Chemical Sciences: A Manual for CSIR-UGC National Eligibility Test for Lectureship and JRF/Membrane introduction mass spectrometry

Membrane introduction mass spectrometry (MIMS) is a method of introducing analytes into the mass spectrometer's vacuum chamber via a semipermeable membrane. Usually a thin, gas permeable, hydrophobic membrane is used, for example polydimethylsiloxane. Samples can be almost any fluid including water, air or sometimes even solvents. The great advantage of the method of sample introduction is its simplicity. MIMS can be used to measure a variety of analytes in real-time, with little or no sample preparation. MIMS is most useful for the measurement of small, non-polar molecules, since molecules of this type have a greater affinity for the membrane material than the sample.

## References

* ↑ Johnson RC, Cooks RG, Allen TM, Cisper ME, Hemberger PH (2000). "Membrane introduction mass spectrometry: trends and applications". Mass spectrometry reviews. 19 (1): 1–37. doi:10.1002/(SICI)1098-2787(2000)19:1<1::AID-MAS1>3.0.CO;2-Y. PMID 10715830.{{cite journal}}: CS1 maint: multiple names: authors list (link)
* ↑ Demeestere K, Dewulf J, De Witte B, Van Langenhove H (2007). "Sample preparation for the analysis of volatile organic compounds in air and water matrices". Journal of chromatography. A. 1153 (1–2): 130–44. doi:10.1016/j.chroma.2007.01.012. PMID 17258752.{{cite journal}}: CS1 maint: multiple names: authors list (link)