text:
Q3Map2

Q3Map2 has now been integrated with the GtkRadiant Project. Windows, Mac and Linux binaries for both 32-bit and 64-bit systems can be download from the project page. The Q3Map2 source code is now available through the GtkRadiant GitHub Repository.

Official Support Forum @Splashdamage

Current stable version is 2.5.17

Q3Map2 is a BSP compiler for games based on the id Tech 3 engine. It compiles .map files, which are editable with an editor, into .bsp files, which are binary files for the game and are not editable. It currently supports the following platforms:

 * Nexuiz
 * Open Arena
 * Quake 3 Arena/Team Arena
 * Quake Live
 * Return to Castle Wolfenstien
 * Soldier of Fortune II
 * Star Trek Elite Force
 * Star Wars Jedi Knight: Jedi Academy
 * Star Wars Jedi Knight II: Jedi Outcast
 * Tenebrae (Quake1 Engine Modification Project)
 * Tremulous
 * Urban Terror
 * War§ow
 * Wolfenstein: Enemy Territory
 * World of Padman
 * Xonotic

Q3Map2 was designed to replace the Q3Map.exe that comes with QERadiant, GtkRadiant and GMAX Tempest. However, there are significant enhancements that require a little twiddling to use, such as faster lighting and enhanced surface production.

Fun Facts:
 * Q3Map2 started out as a bugfix for Q3Map, the original Quake 3 map compiler.

 * The bicycle-riding, AIDS LifeCycle participant, wonder-coding superhero, ydnar is the man behind Q3Map2.

Usage
Q3Map2 is a command-line utility. In general, users make use of Q3Map2 in one of three ways:
 * Using the bsp menu from within GtkRadiant (Wikibook)
 * Writing their own batch file (or comparable shell script if on Linux)
 * Downloading a Q3Map2 front end, such as Q3Map2Build, Q3Map2Toolz or Q3map2GUI

It should be noted that the default command lines given in the GtkRadiant bsp menu are by no means a complete showcase of the available Q3Map2 options and switches. You may edit the bsp menu command lines from the GtkRadiant preferences, but for total control of your Q3Map2 compile writing a batch file or using one of the front ends is probably a better idea.

Q3Map2 command lines generally follow the format:

"C:\path\to\Q3Map2.exe" [ ] [ [ ...]] "C:\path\to\maps\mapname.map"

General options
-connect
 * Enables output of Q3Map2 logging to a remote host. This switch allows all other (non-solitary) switches.

-info
 * Analyzes a compiled bsp and outputs information to the screen or log. This switch is solitary, and allows for only the path to a compiled bsp (not .map, it should be noted) afterward.

-game
 * Enables support for games other than Quake III: Arena. This switch allows all other (non-solitary) switches.

-fs_game
 * Enables support for game mods other than the basic game defined in your -game switch. This switch allows all other (non-solitary) switches.

-fs_basepath <"C:\path\to\game\directory">
 * Required in order for Q3Map2 to read assets directories of games other than Quake III: Arena. This switch allows all other (non-solitary) switches.

-convert [-format ]
 * Converts a compiled .bsp to another format. This switch is solitary, and allows for only the path to a compiled bsp (not .map, it should be noted) afterward.
 * With no -format sub-switch, -convert converts a compiled .bsp to an .ase model. Q3Map2 -convert outputs mapname.ase to the "maps" directory.
 * Other formats are available via the -format sub-switch:
 * map "decompiles" a .bsp back to a .map (most entities are lost, as is texture alignment information). Q3Map2 -convert -format map outputs mapname_c.map in the "maps" directory.
 * quake3 "cross-compiles" a .bsp from some other game's .bsp format (this "other" game is specified in the -game switch) to Quake III: Arena. For example, to cross-compile from Wolfenstein: Enemy Territory to Quake III: Arena, "-game et -convert -format quake3" would be used.  This feature is still a work in progress, and should be treated as experimental for the time being; differences in surfaceparm bitflags can cause weirdness in cross-compiled .bsps.  Q3Map2 -convert -format quake3 outputs mapname_c.bsp in the "maps" directory.
 * the other game shortnames work similarly to quake3, but for their respective games instead.

-scale
 * Scales a compiled .bsp by the prescribed factor. For example, Q3Map2 -scale 0.25 will output a new .bsp that is 25% of the original .bsp's size, while Q3Map2 -scale 2.0 will output a new .bsp that is twice as large.  Q3Map2 -scale outputs mapname_s.bsp in the "maps" directory.  This switch is solitary, and allows for only the path to a compiled bsp (not .map, it should be noted) afterward.

-export
 * Exports internal lightmaps from a compiled .bsp to external .tga images. This switch is solitary, and allows for only the path to a compiled bsp (not .map, it should be noted) afterward.

-import
 * Imports external .tga lightmaps back into a compiled .bsp. Imported lightmaps will only work on the unmodified BSP they were exported from.  This switch is solitary, and allows for only the path to a compiled bsp (not .map, it should be noted) afterward.

-exportents
 * Exports entities from an existing BSP to a .ent file. Example usage: q3map2 -game quakelive -exportents -v mymap.bsp

-onlyents
 * Only change the entities in a .bsp using a .ent file. For example: q3map2.exe -game quakelive -fs_basepath "D:\Program Files (x86)\Steam\steamapps\common\Quake Live" -onlyents "D:\ql stuff\pak00\maps\hellsgate.ent" . Will output hellsgate.bsp with updated entities (the original hellsgate.bsp should also be in the folder with your .ent file).

-threads
 * Specifies a number of threads to use during compiling. On Windows, Q3Map2 automatically detects the number of CPUs present, and sets the threadcount accordingly.  The -threads switch can be used to override this behavior.
 * Linux users will need to manually set -threads in order to activate SMP support in Q3Map2.

-v
 * Enables verbose mode. This is generally a good idea.

-rename
 * Used to fix an issue with misc_model entities in SOF2. If your misc_models show up unlit and completely black, use the -rename switch.

Major switches
-bsp
 * Compiles a .map file into a binary space partition (BSP) file for use with the Quake III: Arena engine. Also writes a .prt (portal information) file and a .srf (surface) file.  It is not necessary to add -bsp to your command line; it is the default switch.

-vis
 * Creates visibility sets based on the portal file.

-light
 * Calculates lighting data. With no -light sub-switches enabled, less than desirable output will be achieved.

Minor switches
The three major switches (-bsp, -vis, and -light) all have many options that can be accessed via their respective minor switches. There are quite a few minor switches, so in the interest of readability the lists of minor switches have been organized on separate pages of the Q3Map2 wiki.

BSP phase minor switches
Q3Map2 BSP phase minor switches have their own page at Q3Map2/BSP

VIS phase minor switches
Q3Map2 VIS phase minor switches have their own page at Q3Map2/VIS

Light phase minor switches
Q3Map2 Light phase minor switches have their own page at Q3Map2/Light

_decal

 * Specifies a decal to be projected. Should contain one or more patch meshes and target an info_null entity. The targetting line drawn between the center of the _decal entity and the targetted info_null is the axis and distance of projection. It helps to think of the _decal mesh as if it were a light gel, the info_null were the target of a spotlight, and that you were "shining" this decal onto map geometry.

_skybox

 * The _skybox entity is a true miracle: It specifies the origin of a skybox (a wholly contained, separate area of the map), similar to some games' portal skies. When compiled with Q3Map2, the skybox surfaces will be visible from any place where sky is normally visible. It will cast shadows on the normal parts of the map, and can be used with cloud layers and other effects. Please see the _skybox tutorial for usage info.

Q3Map2-specific entity keys
Q3Map2-specific entity keys have their own page at Q3Map2/Entity keys.

A Good "Final" Compile
This command line is a good compile to start building off of when you want to produce a "final" compile of your map. It is by no means perfect for every map, but a good place to start tweaking based on your own maps particulars.

"C:\path\to\q3map2.exe" -meta -v "C:\path\to\mapname.map" "C:\path\to\q3map2.exe" -vis -v "C:\path\to\mapname.map" "C:\path\to\q3map2.exe" -light -fast -patchshadows -samples 3 -bounce 8 -gamma 2 -compensate 4 -dirty -v "C:\path\to\mapname.map"

Games with the r_overbrightbits value enabled by default (i.e. Quake III Arena) may want to use the -gamma and -compensate switches. Otherwise, remove from the compile settings above.

Creating an .ase model out of brushwork

 * 1) First, create the geometry for your model.
 * 2) Save this file as model.map (or whatever).
 * 3) Compile model.map with -v -meta -patchmeta in the bsp phase (if your curves look too "low-fi" add "-subdivisions 0" to the compile line. if you want it even more complex, increment the '-subdivisions' value). There is no need to run -vis or -light. You should now have model.bsp in your "maps" directory.
 * 4) Compile model.bsp (not model.map, it should be noted) with -convert. You should now have model.ase in your "maps" directory.
 * 5) Create a new .map and place a misc_model entity. Give this misc_model entity the key/value pair "model"/"maps/model.ase"

Here is an example of a batchfile that does both, bsp and convert compile: "C:\path\to\q3map2.exe" -bsp -meta -patchmeta -game [game abbreviation] "C:\path\to\model.map" "C:\path\to\q3map2.exe" -convert ase -game [game abbreviation] "C:\path\to\model.bsp" Et voila! You've now got a misc_model created out of brushwork. Play with the "modelscale" and "angles" entity keys, and see why Q3Map2 .ase conversion is completely and totally great.

-subdivisions #
 * Specifies the number of sub divisions to make in your geometry. Larger values increase triangulation and as such, can decrease performance.

For extra moxie, import model.map as a prefab to your new map. Select the "model" brushwork, and texture it with clip. Rotate these new clip brushes into place over your misc_model; the brush vertexes of these clip brushes will get screwed up a bit, but since the player can't see clip, you really can't tell in-game. It's lovely, and doesn't have any of the ill effects of Q3Map2 autoclipping.

_skybox tutorial
The _skybox entity "grabs" all the map geometry it can "see" via the normal entity flooding algorithm and assimilates it into the portal sky heap. This is an important concept to understand; if there is any leak between your "main" map and the separate area designated for the _skybox, your compile will take forever, only to produce a very borked .bsp. With that out of the way...

 * 1) Construct your map as normal, texturing your sky brushes with whatever sky shader you fancy.
 * 2) Seal your map off from the void (of course).
 * 3) Create a small box of sky brushes somewhere slightly removed from your "main" map. You could probably get away with drawing a 128x128x128 cube of your sky shader, then using the CSG "hollow" button.
 * 4) Place more geometry within this tiny skybox, but take care not to make it too complicated. Also: unless you compile with -patchmeta, patch meshes shouldn't go inside the _skybox area... you'll end up with MAX_PATCH_PLANES every time.
 * 5) Place a _skybox entity somewhere inside your tiny sky box. The location of the _skybox entity relative to the rest of the sky box geometry determines where the origin of the portal sky will be relative to the rest of your map... a little experimentation will show you how this works.
 * 6) Compile, and that's that. You've got a portal sky in Quake III: Arena!

Notes:
 * The "_scale" key defines the _skybox scaling factor. Depending on what kind of portal sky you are going for, values between 64-256 seem to be pretty good.  Picking a power of 2 to keep the _skybox geometry vertexes on the grid might be a good idea.
 * The "angles" key can be used to put your _skybox geometry off-kilter and make players sea-sick.
 * Deformvertexes shaders can be used on _skybox geometry, but the values you use must be scaled up by the same value you assigned to _scale, or else it won't look right.
 * You must also scale down the texture coordinates on _skybox geometry, or else the textures you use will appear extremely stretched out.

Authors: see page history

Decompiling into a .map
Q3Map2 can decompile a .bsp into a .map. This procedure is by no means perfect, and you should never take anything from others maps when license forbids it, but decompiling a map is good to "see how it's done".

q3map2 -game [game abbreviation] -convert -format map [name of the bsp file].bsp So if the .bsp is called testmap.bsp and you use Jedi Academy, you use this: q3map2 -game ja -convert -format map testmap.bsp You should then find a .map in the same folder as q3map2.exe and the .bsp.
 * 1) Put the .bsp that you want to decompile into the same directory as q3map2.exe
 * 2) Open the command prompt and browse to the folder which contains the .bsp and q3map2.exe
 * 3) Type

title: Q3Map2


text:
Cookbook:Tabbouleh II

| Middle Eastern cuisine | Vegan cuisine | Salad

This is a fairly simple recipe for tabbouleh, a sweet, chewy Mediterranean salad. Everyone who makes it has a different variation.

Ingredients

 * ¼ cup bulgur
 * Juice of 1 lemon
 * 1 bunch fresh parsley (preferably flat leaf), very finely chopped
 * ½ bunch fresh mint leaves, finely chopped
 * 1 large tomato, diced
 * 1 small onion, chopped
 * ½ tsp salt, or to taste
 * ½ tsp pepper, or to taste
 * ¼ cup olive oil

Procedure

 * 1) Place the bulgur in the lemon juice and set aside for 15 minutes.
 * 2) When the bulgur is soft, mix all the ingredients together, adding the olive oil last.
 * 3) Toss well, and adjust the lemon juice as desired.

Notes, tips, and variations

 * Tabouli is delicious when fresh. The flavor deteriorates if you allow it to sit for some time.

ספר מתכונים/תבולה

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Cookbook:Tabbouleh II


text:
Q3Map2/BSP

-custinfoparms
// Contentflags { surfaceparmName 0x0000 //whatever bitflag is used by your mod for said surfaceparm } // Surfaceflags { surfaceparmName 0x0000 //whatever bitflag is used by your mod for said surfaceparm }
 * Enables custom surfaceparms for game mods without the need to recompile Q3Map2 itself. Custom surfaceparms are stored in custinfoparms.txt, in the "scripts" directory.  Custom surfaceparms follow the format:

-debuginset

 * Enables debugging of surface triangle insetting. //I'm totally not sure what this is?

-debugportals

 * Draws the portals into the bsp as translucent polygons. Omit -vis and -light for best -debugportals results.

-debugsurfaces

 * Colors every surface a different color (very trippy). Omit -vis and -light for best -debugsurfaces results.

-fakemap

 * Creates a new .map file with a blank worldspawn entity and all the world brushes from your original .map file. //Don't know much about this one.

-flares

 * Enable support for flares. They are used to generate a glare effect over bright light sources. Only supported by certain versions of the Quake3 Engine like those used in Raven's titles or ioQuake3.

-flat

 * Forces all texture coordinates for a given surface to the pixel that best fits the average color of the assigned texture.

-fulldetail

 * Will cause all detail brushes to be handled as if they were structural.

<tt>-leaktest</tt>

 * Will cause Q3Map2 to abort compile if a leak is encountered.

<tt>-meta</tt>

 * At one time, there was a clear definition as to what, exactly, the -meta switch did. Now, it has become the "magic" switch that is required for most of Q3Map2's advanced features.  Always -meta, and always -v.

<tt> -mi <N></tt>

 * Sets the maximum per-surface index count to N.

<tt>-mv <N></tt>

 * Sets the maximum per-surface vertex count to N.

<tt>-nocurves</tt>

 * Will not compile patch meshes into the .bsp.

<tt>-nodetail</tt>

 * Will not compile detail brushes into the .bsp.

<tt>-nofog</tt>

 * Will not compile fog brushes into the .bsp.

<tt>-nohint</tt>

 * Will not compile hint brushes into the .bsp.

<tt>-nosubdivide</tt>

 * Visible surfaces will not be split. TessSize is ignored.

<tt>-notjunc</tt>

 * Will not fix T-Junctions (can cause sparklies and LOD cracks).

<tt>-nowater</tt>

 * Will not compile liquid brushes into .bsp.

<tt>-np <shadeangle (1 through 179)></tt>

 * Forces all planar shaders to become nonplanar with the shadeangle specified.

<tt>-onlyents</tt>

 * Only changes the entities in the compiled .bsp. Needs a compiled .bsp and a new entity file (.ent)

<tt>-patchmeta</tt>

 * Creates meta surfaces from patch meshes. This "bakes" a set LOD into patches in your .bsp.

<tt>-skyfix</tt>

 * Enables fix for buggy ATI GL_CLAMP behavior. Always use this.

Sidenote: ATI's behavior is correct. The bug was with *NVIDIA* drivers not distinguishing between GL_CLAMP and GL_CLAMP_TO_EDGE, and Q3 using the wrong one: since Q3 development was done predominantly on nVidia hardware, nobody noticed it until too late.

<tt>-snap</tt>

 * Enables axial bevel plane snapping to reduce clipped model plane count (use with care). //I totally don't know a thing about this.

<tt>-texrange <N></tt>

 * Limits per-surface texel count to N.

<tt>-v</tt>

 * Enables verbose mode for the bsp phase. Always use this.

<tt>-verboseentities</tt>

 * Outputs more information about compiling entity sub-models into the .bsp.

title: Q3Map2/BSP


text:
Q3Map2/VIS

VIS phase minor switches

 * -fast : Only calculates rough visibility data. Quick and dirty, not actually useful for VIS purposes.
 * -hint : Will merge the bsp leaves (except for hint portals) before calculating the visibility list.
 * -merge : Will merge the bsp leaves before calculating the visibility list.
 * -nopassage : Disables the passage visibility algorithm. Passage VIS is a bit faster and tighter than the old algorithm.
 * -nosort : Disables the sorting of portals by complexity. Sorting speeds up visibility calculations.
 * -passageOnly : Will use the passage visibility algorithm only.
 * -saveprt : Disables the automatic deletion of the .prt portal file after VIS finishes.
 * -v : Enables verbose mode. Always use this.

title: Q3Map2/VIS


text:
Q3Map2/Light

 -areascale

 * Scales up area (shader) lights by the prescribed factor. Q3Map2 -light -areaScale 0.25 will result in area lights that are only 25% as bright as those in a .bsp compiled with -light -areaScale 1.0.

 -approx

 * Approximates lightmaps within a byte tolerance of N. Q3Map2 -light -approx forces simple surfaces without much shadow detail to be vertex lit, thus saving lightmaps. The range is from 0-255, 0 being default (no approximation).

 -border

 * Creates a debugging border around each lightmap.

 -bounce

 * Enables Q3Map2 radiosity, calculating radiosity light through N bounces.

 -bouncegrid

 * Allows bounced light to affect the lightgrid.

 -bouncescale

 * Scales up radiosity lights by the prescribed factor.

<tt> -cheap</tt>

 * Stops Q3Map2 from calculating light on a sample after it exceeds (255, 255, 255). This may produce odd artifacts on maps with lots of saturated colored lighting. Also, do not use cheap with radiosity if you want to preserve all the emitted light.

<tt> -cheapgrid</tt>

 * Stops Q3Map2 from calculating light on a sample after it exceeds (255, 255, 255), but only for the lightgrid.

<tt> -compensate <N.N></tt>

 * Scales back lightmap values to adjust for overbrighting when -gamma is used. For Quake III: Arena, a good compensate value is 4, though some experimentation may be needed to find an aesthetic that suits your particular map.

<tt> -cpma</tt>

 * Enables full vertex lighting including occlusion on all surfaces, including lightmapped. Causes incorrect handling of -approx in Q3A even with special shaders.

<tt> -dark</tt>

 * Enables darkening of lightmaps at brush/lightmap seams. Sort of like a half-assed occlusion pass, ends up looking a bit Unreal 1-ish.  Very subtle.

<tt> -debug</tt>

 * Enables lightmap debugging.

<tt> -debugaxis</tt>

 * Colors lightmaps based on their projection axis.

<tt> -debugcluster</tt>

 * Colors lightmaps based on the PVS cluster the luxel falls into.

<tt> -debugorigin</tt>

 * Colors lightmaps based on the luxel origin relative to the raw lightmap's bounding box.

<tt> -debugunused</tt>

 * Colors unused luxels hot pink.

<tt> -deluxe</tt>

 * Generates deluxemaps for directional light attenuation. These are only used by engines that have the capability, such as Darkplaces(Nexuiz), QFusion(Warsow) and XreaL.

<tt> -dirty</tt>

 * Enables ambient occlusion or "dirtmapping". Ambient occlusion approximates light attenuation due to occlusion. Basically, less-visible areas (such as nooks and crannies, cracks and crevices) will become darker. Check the 2.5.14 release thread for further details.

<tt> -dirtdepth <N></tt>

 * Use with -dirty. Sets maximum depth of occlusion checking in game units (default 128).

<tt> -dirtmode <N></tt>

 * Use with -dirty. Controls the mode in which the dirtmap is calculated. According to RaP7oR: "The Uniform Mode tries to create a very smooth looking dirtmap, while the Noise Mode is, uh, noisy."
 * 0 = Uniform Mode (default)
 * 1 = Noise Mode

<tt> -dirtscale <N.N></tt>

 * Use with -dirty. Scales up the "darkness" of the dirtmapping effect by the prescribed factor.

<tt> -dump</tt>

 * Dumps radiosity lights into numbered prefabs.

<tt> -fast</tt>

 * Enables light envelopes for area (shader) lights. This includes radiosity lights.  Results in a much quicker -light compiles, but darkens all enveloped light sources considerably—this can be compensated for easily by raising your surfacelight values.
 * Do not be confused by the "fast" nomenclature... -fast is perfectly suitable for "final" compiles.

<tt> -fastbounce</tt>

 * Enables -fast style calculations, but only for radiosity lights.

<tt> -faster</tt>

 * Enables -faster light calculation. Faster is a debug test mode only, and produces really crappy results (but quickly). Use only when your compiles are taking forever for testing. Fast is the mode you should be using for normal/final compiles.

<tt> -fastgrid</tt>

 * Enables -fast style calculations, but only for the lightgrid.

<tt> -filter</tt>

 * Applies a gaussian blur to lightmaps, smoothing out shadows. Sounds good in theory, but -filter doesn't play nice with a lot of the more interesting effects... don't use it.  Use -samples instead.

<tt> -gamma <N.N></tt>

 * Creates a more realistic color ramp between "light" and "dark." Good values are in the 1.4-2.2 range.  Games that use r_overBrightBits and r_mapOverBrightBits (Quake III: Arena, most notably) will need those cvars disabled unless -compensate is used accordingly.

<tt> -lightmapsize <N></tt>

 * Limits the lightmap size. Default is 128.

<tt> -lomem</tt>

 * Trades increased compile time for decreased memory usage. If you are getting safe_malloc errors (or just running out of RAM), try this switch.

<tt> -nocollapse</tt>

 * Disables collapsing of identical lightmaps. This switch is required for Q3Map2 lightstyles.

<tt> -nogrid</tt>

 * Disables calculation of the lightgrid.

<tt> -normalmap</tt>

 * Colors lightmaps based on the facings of their vertex normals.

<tt> -nosurf</tt>

 * Disables the surface tracing of detail brushes and patch meshes for shadow casting.

<tt> -notrace</tt>

 * No light tracing is performed. As a result, no shadows will be cast.

<tt> -novertex</tt>

 * Disables the calculation of vertex lighting.

<tt> -patchshadows</tt>

 * Enables the casting of shadows by patch meshes.

<tt> -pointscale <N.N></tt>

 * Scales up point (entity) lights by the prescribed factor.

<tt> -samples <N></tt>

 * Enables intelligent antialiasing of shadow edges in lightmaps. A value of 2 both looks good and compiles quickly, while a value of 3 looks great but compiles somewhat more slowly.

<tt>-samplesize <N></tt>

 * Writes the prescribed samplesize argument to the .srf surface file. The .srf file (and thus -samplesize) affects the -light phase of compile.  A lower -samplesize value produces more sharply defined lightmaps.  The default samplesize is 16; a samplesize value of 8 produces a blurry, but good quality compile, suitable to call "final" if you aren't looking for extreme detail. A value of 4 produces a more detailed one, but small artifacts may start appearing occasionally.  A samplesize value of 1 produces the most possible detailed lightmap, but also creates "stadium lights" artifacts, a much larger BSP file size and lower game performance.

 * Note that the .srf surface file is generated by the -bsp phase of the compile, so -samplesize must be added to the -bsp phase aswell as to the -light phase to make any effect.

<tt> -scale <N.N></tt>

 * Scales up all light sources by the prescribed factor.

<tt> -shade</tt>

 * Enables phong shading.

<tt> -sky <N.N></tt>

 * Scales up all sun/sky light sources by the prescribed factor. In this new era of -gamma -compensate, -sky 3 can allow "old style" sky shaders to be used without manually rewriting them.

<tt> -sunonly</tt>

 * Computes sun/sky light only, no other light sources.

<tt> -super <N></tt>

 * Enables arbitrarily ordered grid supersampling of lightmaps. This is much, much, much slower than -samples, by the way.

<tt> -thresh <N.N></tt>

 * Sets the recursive triangle subdivision threshold. The range is 0.0-1.0.

 * In order to determine the luxel normal for phong shading and bumpmapping, Q3Map2 recursively subdivides the map's triangles until no side is longer than the distance specified in -thresh (T) times samplesize (S).

 * The reason lower values of -thresh are used are for when you want more accurate phong and bumpmapping. Lower values = smaller triangles = more samples per luxel (lightmap pixel) = more accurate normal = smoother shading.

<tt> -v</tt>

 * Enables verbose mode. Always use this.

title: Q3Map2/Light


text:
Cookbook:Bulgur

| Basic foodstuffs | Cereal Grain

Bulgur, also called burghul, is wheat that has been prepared so that it can be used just by soaking.

Production
The wheat is first steamed to partially cook it before drying and grinding coarsely. The outer part of the bran is also removed. This produces small grains that take less time to cook than whole, raw grains.

Characteristics
Bulgar is light brown in color and comes in a couple different grades of coarseness. The finer the grade, the faster the grain cooks. Because bulgur does retain a portion of the bran, it retains some characteristics of whole grains such as chewiness and nutty flavor.

Selection and storage
Like with other grains, store bulgur in an airtight container away from light, heat, and moisture. It will keep for a couple years at room temperature but will eventually go rancid—freezing extends this shelf, though you will probably consume reasonable quantities before this is necessary. Bulgur can also be cooked before freezing.

Preparation
Because it is precooked, bulgur does not need to be fully cooked before consumption. Often, covering it in boiling water and allowing it to soak about about 15–30 minutes is sufficient. However, it can still be boiled like other grains.

Use
Bulgur is commonly used in many Mediterranean, Middle Eastern, and Indian dishes, including falafel, tabouli, and pilaf, and is often mixed with ground meat. It can be used similarly to rice and may be mixed with it to add flavor and texture.

Substitution
Cracked wheat is similar to bulgur—however, because it is not precooked, cracked wheat needs to be fully cooked before use and cannot be an exact substitute.

title: Cookbook:Bulgur


text:
Cookbook:Tahini

Tahini is ground sesame seeds, generally without the hulls. Sesame butter is also ground sesame seeds, but generally includes the hulls. It has a nutty, slightly sour taste. It is a common ingredient in many Middle Eastern, Indian, and Mediterranean foods, such as hummus, baba ganoush, halvah, and many sauces and dressings.

In Arabic, it's known as tahina, while in Hebrew, it's known as t'xina (pronounced "t'ch'ina").

There are two different kinds of tahini generally available—'hulled' and 'unhulled'. The hulled version is made from seeds which have had their outer husks removed. This makes it less bitter and lighter in colour, but also less nutritious because a lot of the vitamins and protein are contained in the outer hull. In some places you can also get tahini sweetened with sugar or honey—needless to say, this version is not suitable for use in savoury dishes.

hy:Եփութուխ:Թահին

title: Cookbook:Tahini


text:
Cookbook:Lentils and Rice (Mjeddrah)

| Cuisine of Lebanon | Vegan cuisine

Mjeddrah is a stout lentil and rice stew, a Lebanese staple.

Ingredients

 * ½ cup brown lentils, soaked an hour or more
 * ½ cup onion, sliced
 * A little chopped carrot, celery, etc. (optional)
 * 2 tablespoons olive oil
 * ½ cup long grain brown rice, rinsed
 * 3 cups water
 * ½ teaspoon whole or ground cumin
 * Minced garlic (optional)
 * Dried chile pepper (optional)
 * ½ cinnamon stick (optional)
 * A few cardamom pods (optional)
 * Salt to taste
 * Pepper to taste

Procedure

 * 1) Pick over the lentils to remove any stones.
 * 2) Sauté the onion and any other vegetables in the olive oil for a minute or two.
 * 3) If desired, sauté the rice for a short time, but do not let it burn.
 * 4) Add the rice, water, cumin, garlic, chili pepper, cinnamon, and cardamom to the pot of onions. Bring to a boil, cover, and simmer for 40 minutes to 1 hour. You will have to check it occasionally and add water—the final product should have some liquid but should not be very soupy. It is finished when the rice and lentils are both no longer crunchy.
 * 5) Season with salt and pepper.

Notes, tips, and variations

 * A little Parmesan cheese is tasty sprinkled on as a garnish.
 * Sauté some chopped onion and garlic quickly in oil until it browns (a slight burning is good), then stir it into some natural yogurt and use as a garnish.

title: Cookbook:Lentils and Rice (Mjeddrah)


text:
User:Map sort map

If you look at my contributions page, I'll give you three guesses what kind of food I like. :-)

title: User:Map sort map


text:
User:Parelle~enwikibooks

Hello, Parelle here. I'm rather fond of the internet's ablities to connect others from around the world of different interests - and some which are very much the same. I have only recently joined another Wiki project - http://en.wikipedia.org/

I'm a huge fan of the classics, but have started my work here on the Sherlock Holmes collection. I'm presently working on The Boscombe Valley Mystery.

title: User:Parelle~enwikibooks


text:
User:Paddu/sandbox

To read: http://en.wikibooks.org/w/wiki.phtml?title=Programming:C_plus_plus&diff=59330&oldid=59329 http://en.wikibooks.org/w/wiki.phtml?title=Programming:C_plus_plus&diff=58927&oldid=58659

Last somewhat "sensible" version (except for MFC, WTL, Boost, etc. which must be separate books): http://en.wikibooks.org/w/wiki.phtml?title=Programming:C_plus_plus&diff=59062&oldid=59044

Welcoming anons.:

Hello there! Welcome to Wikibooks! We've noticed that you've been making some great additions to the Wikibooks and we really appreciate it. Why not create an account and stay awhile? The Wikibooks can use as many quality members as possible. If you ever need editing help visit this page and experiment at the sandbox. If you need pointers on style issues, check out the Manual of Style. If you have any other questions about the project check out the help pages or add a question to the Staff Lounge. Hope to see you around for a long time to come! -- ~

bug 28-11-2004
b:User:Paddu/sandbox en:User:Paddu/sandbox b:en:User:Paddu/sandbox DoesnotexisT DoesnotexisT DoesnotexisT

title: User:Paddu/sandbox


text:
Inorganic Chemistry/Cover

Welcome to the wikibooks open content  Inorganic Chemistry Textbook

Contributing
This is a wiki textbook -- feel free to edit it, update it, correct it, and otherwise increase its teaching potential. To find out more about wikis, see the Wikipedia main page.

title: Inorganic Chemistry/Cover


text:
Inorganic Chemistry/Foreword

Purpose and mission
This book should become the gold standard of inorganic chemistry texts in the areas of accuracy, usability, flexibility, and connection with its audience. As this text is developed it will always be available online, be printable, and freely distributable. This text should eliminate all or much of the cost for owning an up-to-the-minute, top-quality college-level inorganic chemistry text, as it and all its derivative works will remain free: free as in speech as well as free as in beer. Although you could pay for a printed version if you wanted to.

Content and Contributions
This is, to the best of our knowledge, the world's first and only open content inorganic chemistry textbook. Its users will tweak and refine this book until there is no better book. We are confident that this will happen because the process has already been seen to work many times on the Wikipedia site.

All content contained herein is available under licences that allow free distribution. You can copy it, print it, sell it, and create derivative works from it.

Our restriction: if you create derivative works, make them available to others in a way that they can easily copy and distribute them, as we have done for you.

We link to some pages outside our server. Any of this content not found under the Wikipedia site and subsites is not ensured to be under the same license, it in fact is most likely not.

Authors
The initiator of this project is JaF893. At the time of writing (3/9/03) I have been the sole contributor but as time goes on it will become a group project "of the people" as many contribute and improve it by bits and pieces. EDIT (3/10/03) - Karl Wick has edited some of the pages and created an automatic table of contents.

Licensing
All work in this book is released at the moment only under the GNU FDL license. However this is only one of many similar open content licenses, and may not be the license of choice for everyone. To take content written by JaF893 from this book for release under other licenses please contact the author through this page's associated talk page.

title: Inorganic Chemistry/Foreword


text:
Template:Inorganic Chemistry/TOC

Inorganic Chemistry | Transition Metals | Catalysis

title: Template:Inorganic Chemistry/TOC


text:
Cookbook talk:Macaroni and Cheese (Vegan)

How appetising (NOT!) Doesn't this have a better name? lol How about 'Vegan Macaroni'... KJ 00:12, 10 Mar 2004 (UTC)

This dish makes me feel sorry for vegans. And also laugh. Actually mostly laugh. But I do feel a little sorry.--74.249.202.48 (talk) 05:34, 26 May 2009 (UTC)


text:
Cookbook:Rice Cooker

| Kitchen appliances A rice cooker or rice steamer is a kitchen appliance used to automate and simplify the process of cooking rice. Traditionally, rice is cooked by measuring quantities of rice and water into a pot, bringing them to a boil on the stove, and then immediately lowering the temperature to a simmer. The rice cooker does the monitoring for you, simply measure the rice and water, and let it cook with a single press.

The rice cooker heats the water-rice mixture until all the water has either evaporated or is absorbed by the rice. This works on the principle that the boiling water maintains a constant temperature (212 °F or 100 °C at sea-level). Once the temperature changes, the device shuts off or switches to warm to keep the rice ready to serve. For consistent rice and easy cleanup, it is recommended to prepare at least 2 cups (dry), since some cookers will dry out or scorch rice at the bottom if they can't cool down fast enough.

Classic rice cookers introduced in the 1950s have a single switch with a "cook" and a "keep warm" mode, and they work without any internal computing. Newer models have programmable interfaces that add many features like delay timers, settings for different varieties of rice, and even settings for other foods.

Classic rice cookers include a steamer tray, and can be used for other foods including chicken, fish, and vegetables. Steaming can be done on its own, or while the rice cooks below. Creative cooks prepare grains other than rice by adjusting the amount of water added prior to cooking.

Settings available in programmable rice cookers commonly include, a white rice setting, a brown rice setting, a quick cooking setting, and a porridge setting, although different brands may include more or fewer options. These cookers can also be used to prepare risottos, pilafs, and rice puddings; however, most usually can not be used as steamers.

Rice cookers commonly come with a special cup to measure 180 ml, or about 6 oz of rice. It is important to note that a rice cooker that has water level markings on the side of the bowl will be for rice measured in this cup, not a standard measuring cup.

As the origin of the device, the rice cooker is considered an important part of modern Japanese cooking.

Recipes

 * Brown Rice with Ground Turkey
 * Pandora's Feast
 * Rice and Beef Soup
 * Sharpie's Jamaican Rice an' Peas

title: Cookbook:Rice Cooker


text:
Cookbook:Rice an' Peas

| Vegan Cuisine | Caribbean cuisines | Rice

Rice an' peas is a traditional Caribbean dish, done easy in a rice cooker, great for your ital-eating Rastafarian or vegan friends. There's lots of ways to cook rice an' peas, but this one is easy and hassle free.

Ingredients

 * 1 cup beans (kidney beans, black beans, pinto beans) (also known as "peas"), dried or canned
 * 1 cup brown rice
 * 1 cup coconut milk
 * 1 cup water

Procedure

 * 1) If using dried beans, cover them in water and soak for at least 8 hours.
 * 2) Drain and rinse the beans (even canned beans) prior to use.
 * 3) If using dried red kidney beans, boil briskly for 20 minutes, then drain again.
 * 4) Add rice, beans, water, and coconut milk to a rice cooker. If using a programmable cooker, set to cook for brown rice. For an on/off cooker, turn it on.
 * 5) In about 30 minutes your rice cooker will finish cooking the rice. Open, stir, and serve.

Warnings

 * It is important to soak and pre-cook dried kidney beans. Dried kidney beans will cause nausea, vomiting and diarrhea unless they have been boiled briskly for at least twenty minutes to destroy the very indigestible phytohaemagglutinin that they contain—a slow cooker is not enough and can even make things worse. They will then need another 60–90 minutes at a slow simmer to become tender. Tinned kidney beans are quite safe and do not need pre-cooking as their preparation involves sufficient heat to destroy the toxin.

title: Cookbook:Rice an' Peas


text:
Cookbook:Brown Rice with Other Starches and Vegetables (Pandora's Feast)

| Vegan cuisine | Rice

Pandora's feast is a complete vegan meal that can be served several times a week due to the ease with which it can be modified. The meal is easy to prepare in a rice cooker.

Base

 * 1 cup uncooked brown rice
 * 2 cups water

Additions

 * 1 cup soaked and boiled black, pinto, kidney or other beans
 * 1 cup cubed potato
 * 1 cup cubed sweet potato
 * 1 cup cubed squash
 * 1 clove garlic, minced
 * 1 cup cubed beet
 * 1 cup chopped kale

Serving

 * Olive oil, hemp oil, flaxseed oil, or other nutritious oil
 * Nutritional yeast
 * Soy sauce
 * Black sesame seeds

Procedure

 * 1) Add the brown rice and water to a rice cooker.
 * 2) Drain, rinse, and add the beans to the rice cooker.
 * 3) If using, add the garlic to the cooker.
 * 4) If using, add the sweet potato, squash, beet, or potato.
 * 5) If using a fuzzy logic (i.e. programmable) cooker, set the cooker to the brown rice setting and turn it on. If using an on/off cooker, simply turn it on.
 * 6) In about 20–40 minutes, your cooker should finish cooking the rice. When the finished, open the lid, add the kale, close the lid, and wait about another minute or two.
 * 7) Open and serve. Top with oil, yeast, soy sauce and/or sesame seeds, to taste.

Notes, tips, and variations

 * If you have "Thai sweet black rice" or "Chinese forbidden black rice", replace about 10% of your brown rice with this, and your finished product will be a lovely purple and will have a different taste.
 * The beans must be either pre-soaked for at least 8 hours and boiled briskly for 20 minutes (preferred) or from a can. It is important to soak and pre-cook dried beans. Dried kidney beans will cause nausea, vomiting and diarrhea unless they have been boiled briskly for at least 20 minutes to destroy the very indigestible phytohaemagglutinin that they contain (the slow cooker will not do and can even make things worse). They will then need another 60–90 minutes at a slow simmer to be tender. Tinned kidney beans are quite safe and do not need pre-cooking, as their preparation involves sufficient heat to destroy the toxin.)
 * The cubed vegetables should be 1cm x 1cm for optimal cooking.


text:
User talk:Ilgiz

Thanks for helping me :) Guaka 14:56, 10 Mar 2004 (UTC)

See:

Main_Page Täwge_Bit --217.30.250.151 22:29, 25 Jun 2004 (UTC)

title: User talk:Ilgiz


text:
Inorganic Chemistry/Catalysis

Introduction
Catalysis is the ability of some species to rapidly speed up the rate at which a chemical reaction proceeds. For historical reasons, the discipline is normally split into two sub-categories; homogeneous (homo = same, geneous = phase) and heterogeneous (hetero = different). Homogeneous catalysis is concerned with catalysts that are in the same phase as the chemical reactions they are speeding up. These reactions are normally in the liquid phase and include all of biology's enzymes. While the majority of homogeneous catalysis is in the liquid phase there are gas phase and solid phase homogeneous catalytic reactions. Heterogeneous catalysts have a catalyst that is in a different phase. This type of catalysis is responsible for the vast majority of 'bulk' chemicals that are produced each year that go into making all the things we take for granted around us such as plastics, and are also extensively used for refining oil in gasoline. This chapter focuses on heterogeneous catalysis and specifically how and why they work at all.

The key concept in catalysis, and indeed all of chemistry, is the tension between the thermodynamics of a particular reaction which tells you whether something should happen, and the kinetics which tells you how fast something will happen. This tension in the world around you is everywhere i.e. thermodynamics says the diamond on an engagement ring should turn into graphite, a more stable allotrope of carbon but the kinetics is such that you would be waiting a very, very long time before it happened! Catalysis works by giving chemical reactions that should happen a way to actually happen.

Conceptual Analogy
The standard way to think of a chemical reaction happening is to imagine the energy of a molecule as being represented by a z co-ordinate while the reaction 'proceeds' in the x-y plane. If this sounds confusing, just think of the energy as being like the height of land features like mountains relative to their position. A molecule in this landscape would be a place where you can't go downhill without having to go uphill first, like a crater lake. Even though on a global scale, a crater lake should flow down to the sea, the local conditions around it mean that it would have to first flow uphill, which we could postulate doesn't happen on a regular basis. This analogy helps to visualise what is going on in a chemical reaction: the atoms involved when they're joined in one fashion are in an energy 'lake' and aren't able to change, but given the right conditions, such as temperature or photons, they are able to get over the energy barrier and flow down to another energy 'lake' which has the atoms joined in another fashion. This energy barrier is called the activation energy. In our analogy, imagine drilling a hole from one lake to another lake, since the water doesn't have to go 'up and over', it can flow easily to another position. This is exactly what a catalyst does, it doesn't change the total energy of the system or where the system will eventually end up (the thermodynamics dictate this), it just provides an easier way for the system to get there and hence speeds it up (it increases the rate). This analogy paints a picture that helps you remember the text-book definition of a catalyst: a substance which increases the rate at which a thermodynamic equilibrium is obtained by lowering the activation energy of the reaction pathway.

That is what a catalyst does but it doesn't give us any idea of how. It is only useful in deciding whether you are observing catalysis in action, the mechanism of how heterogeneous catalysts work is far more subtle.

Mechanism
According to Surface absoprtion theory heterogeneous catalysis has five stages:

The ability for an atom or molecule to stick to the surface is known, brilliantly, as the Sticking Co-efficient. This is just the ratio or percentage of molecules that end up sticking on the surface.

Examples
In the contact process vanadium [V] oxide (V2O2) is solid whereas the reactants SO2 and O2 are gaseous.

More detailed method:

2V2O5(s) + 2SO2(g)⇔ 2SO3(g) + 2V2O4(s)

2V2O4(s) + O2 (g) ⇔ 2V2O5 (s)

Therefore: 2SO2(g) + O2(g)⇔ 2SO3(g)

title: Inorganic Chemistry/Catalysis


text: User:Vuara/INTRODUCTION (MMY Gita)

title: User:Vuara/INTRODUCTION (MMY Gita)


text:
MUMPS Programming

MUMPS is a programming language. It is named after the acronym Massachusetts General Hospital Utility Multi-Programming Systems.

If you have programmed before and would like to see a little bit of how MUMPS works and is different from other programming languages, you can get an overview.

Contents

 * Beginning MUMPS
 * MUMPS syntax and functions Lines, spaces, commands & arguments
 * /Basic Terminology- Routines & Globals/ Programs: Routines,  Database: Globals
 * MUMPS features
 * MUMPS and data
 * MUMPS code and interfaces
 * Setting up to Program MUMPS Set up the IDE and Install MUMPS
 * Advanced MUMPS
 * History of MUMPS

Beginning MUMPS

 * Basic Concepts
 * Variables
 * Simple Input and Output
 * Simple math in MUMPS
 * Program Flow
 * Procedures and Functions
 * Libraries
 * Standard libraries
 * Further math in MUMPS
 * Basics of Compilation
 * Exercises

In-depth MUMPS ideas

 * Pointers and relationship to arrays
 * String Manipulation
 * Programming Structure and Style
 * MUMPS complex types
 * Memory Management
 * Error Catching
 * Variable Indirection
 * closures and Xecution of data

MUMPS and beyond

 * Language Overloading and Extensions
 * Combining Languages
 * Commented Source Code Library

title: MUMPS Programming


text:
Ruby Programming/Overview

Ruby is an object-oriented scripting language originally developed by Yukihiro Matsumoto (also known as Matz). The main website of the Ruby programming language is ruby-lang.org. Development began in February 1993 and the first alpha version of Ruby was released in December 1994. It was developed as an alternative to scripting languages like Perl and Python. Ruby borrows heavily from Perl and the class library is essentially an object-oriented reorganization of Perl's functionality. Ruby also borrows from Lisp and Smalltalk. While Ruby does not borrow many features from Python, reading the code for Python helped Matz develop Ruby.

MacOS comes with Ruby already installed. Most Linux distributions either come with Ruby preinstalled or allow you to easily install Ruby from the distribution's repository of free software. You can also download and install Ruby on Windows. The more technically adept can download the Ruby source code and compile it for most operating systems, including Unix, DOS, BeOS, OS/2, Windows, and Linux.

Features
Ruby combines features from Perl, Smalltalk, Eiffel, Ada, Lisp, and Python.

Object Oriented
Ruby goes to great lengths to be a purely object oriented language. Every value in Ruby is an object, even the most primitive things: strings, numbers and even true and false. Every object has a class and every class has one superclass. At the root of the class hierarchy is the class BasicObject, from which all other classes, including Object, inherit.

Every class has a set of methods which can be called on objects of that class. Methods are always called on an object — there are no “class methods”, as there are in many other languages (though Ruby does a great job at faking them).

Every object has a set of instance variables which hold the state of the object. Instance variables are created and accessed from within methods called on the object. Instance variables are completely private to an object. No other object can see them, not even other objects of the same class, or the class itself. All communication between Ruby objects happens through methods.

Mixins
In addition to classes, Ruby has modules. A module has methods, just like a class, but it has no instances. Instead, a module can be included, or “mixed in,” to a class, which adds the methods of that module to the class. This is very much like inheritance but far more flexible because a class can include many different modules. By building individual features into separate modules, functionality can be combined in elaborate ways and code easily reused. Mix-ins help keep Ruby code free of complicated and restrictive class hierarchies.

Dynamic
Ruby is a very dynamic programming language. Ruby programs aren’t compiled, in the way that C or Java programs are. All of the class, module and method definitions in a program are built by the code when it is run. A program can also modify its own definitions while it’s running. Even the most primitive classes of the language like String and Integer can be opened up and extended. Rubyists call this monkey patching and it’s the kind of thing you can’t get away with in most other languages.

Variables in Ruby are dynamically typed, which means that any variable can hold any type of object. When you call a method on an object, Ruby looks up the method by name alone — it doesn't care about the type of the object. This is called duck typing and it lets you make classes that can pretend to be other classes, just by implementing the same methods.

Singleton Classes
When I said that every Ruby object has a class, I lied. The truth is, every object has two classes: a “regular” class and a singleton class. An object’s singleton class is a nameless class whose only instance is that object. Every object has its very own singleton class, created automatically along with the object. Singleton classes inherit from their object’s regular class and are initially empty, but you can open them up and add methods to them, which can then be called on the lone object belonging to them. This is Ruby’s secret trick to avoid “class methods” and keep its type system simple and elegant.

Metaprogramming
Ruby is so object oriented that even classes, modules and methods are themselves objects! Every class is an instance of the class Class and every module is an instance of the class Module. You can call their methods to learn about them or even modify them, while your program is running. That means that you can use Ruby code to generate classes and modules, a technique known as metaprogramming. Used wisely, metaprogramming allows you to capture highly abstract design patterns in code and implement them as easily as calling a method.

Flexibility
In Ruby, everything is malleable. Methods can be added to existing classes without subclassing, operators can be overloaded, and even the behavior of the standard library can be redefined at runtime.

Variables and scope
You do not need to declare variables or variable scope in Ruby. The name of the variable automatically determines its scope.

 * x is a local variable (or something other than a variable).
 * $x is a global variable.
 * <tt>@x</tt> is an instance variable.
 * <tt>@@x</tt> is a class variable.

Blocks
Blocks are one of Ruby’s most unique and most loved features. A block is a piece of code that can appear after a call to a method, like this:

The block is everything between the <tt>do</tt> and the <tt>end</tt>. The code in the block is not evaluated right away, rather it is packaged into an object and passed to the <tt>sort</tt> method as an argument. That object can be called at any time, just like calling a method. The <tt>sort</tt> method calls the block whenever it needs to compare two values in the list. The block gives you a lot of control over how <tt>sort</tt> behaves. A block object, like any other object, can be stored in a variable, passed along to other methods, or even copied.

Many programming languages support code objects like this. They’re called closures and they are a very powerful feature in any language, but they are typically underused because the code to create them tends to look ugly and unnatural. A Ruby block is simply a special, clean syntax for the common case of creating a closure and passing it to a method. This simple feature has inspired Rubyists to use closures extensively, in all sorts of creative new ways.

Advanced features
Ruby contains many advanced features.

 * Exceptions for error-handling.
 * A mark-and-sweep garbage collector instead of reference counting.
 * OS-independent threading, which allows you to write multi-threaded applications even on operating systems such as DOS. (this feature will disappear in 1.9, which will use native threads)

You can also write extensions to Ruby in C or embed Ruby in other software.

title: Ruby Programming/Overview


text:
Smalltalk Programming

Smalltalk is an object oriented programming language. It was named as a 'small' language intended to be easy to use.

If you have programmed before and would like to see a little bit of how Smalltalk works and is different from other programming languages, you can get an overview.

Contents

 * History of Smalltalk
 * Beginning Smalltalk
 * Smalltalk Syntax and Functions
 * Smalltalk Features
 * Smalltalk and Data
 * Code and Interfaces in Smalltalk
 * Advanced Smalltalk

Beginning Smalltalk

 * Smalltalk Concepts
 * Variables
 * Simple Input and Output
 * Simple math in Smalltalk
 * Program Flow
 * Procedures and Functions
 * Libraries
 * Standard libraries
 * Further math in Smalltalk
 * Basics of Compilation
 * Exercises

In-depth Smalltalk ideas

 * Pointers and relationship to arrays
 * String Manipulation
 * Programming Structure and Style
 * Smalltalk complex types
 * Memory Management
 * Error Catching

Smalltalk and beyond

 * Language Overloading and Extensions
 * Combining Languages
 * Commented Source Code Library

External resources

 * World.st: The World Of Smalltalk - A collection of Smalltalk-related information
 * European Smalltalk Users Group (ESUG): Organizes a yearly conference since 1993 gathering Smalltalkers from around the world. ESUG also has several promotion actions
 * Stef's Free Online Smalltalk Books: Provides a collection of electronic versions of Smalltalk books that are out of print
 * Squeak Smalltalk by Example: Squeak Smalltalk By Example
 * Pharo Smalltalk by Example: Pharo Smalltalk By Example
 * The Seaside Web Framework: The Seaside Web Framework
 * Pharo - the collaborActive book: Pharo - the collaborActive book

title: Smalltalk Programming


text:
Prolog

Welcome to the Prolog book. This book can serve as a textbook or tutorial for anyone who wants to learn the Prolog programming language. No prior programming experience is required. Some basic knowledge of logic can come in handy. For those new to the subject, a short introduction to logic is given, but this is not required reading.

The first chapters of the book (under Basics) describe the central syntax and features of the language. The next section, Programming, explores additional concepts that are useful when programming in Prolog. The chapters under Basics and Programming are meant to be read in order.

The section Built-in Predicates deals with the functions available in many Prolog compilers. These and other chapters can be read in any order.

Special pages

 * What is Prolog?
 * History of Prolog
 * /Introduction to logic/
 * /Glossary/
 * /Built-in predicates/
 * /Frequently Asked Questions/
 * Exercises (external link)

Beginning Prolog
Basics:
 * /Introduction/
 * /Rules/
 * /Recursive Rules/
 * /Variables/
 * /Lists/
 * /Math, Functions and Equality/
 * /Putting it Together/
 * /Solving a Logic Puzzle/

Programming:
 * /Cuts and Negation/
 * /Reading and Writing code/
 * /Difference Lists/
 * /Definite Clause Grammars/
 * /Inference Engines/

Built-in Predicates:
 * /Testing Terms/
 * /Bagof, Setof and Findall/
 * /Modifying the Database/
 * /Input and Output/

Advanced Prolog

 * /Associative map/
 * /Search techniques/
 * /Sorting/
 * /Graphics: XPCE/

Prolog and beyond

 * /Higher Order Programming/
 * /Constraint Logic Programming/
 * /Definite Clause Grammars/
 * /Combining Languages/
 * A selection of interesting usergroup topics
 * /External Links/

Prolog Prolog Prolog Пролог

title: Prolog


text:
Fortran

Introduction

 * Why learn Fortran?
 * History

Quick start tutorial

 * Hello World
 * Fundamentals
 * Variables
 * Text input and output
 * Program flow control
 * Subroutines and functions

In-depth Fortran

 * Data types
 * Program structure
 * I/O statements
 * String manipulation
 * Structured data
 * Memory management & common blocks
 * Error catching
 * Parallel processing
 * Object-oriented programming
 * Language overloading and extensions

Other Fortran related software and tools

 * Combining languages
 * Generating documentation
 * Tools to prettify source code

Appendix

 * Examples of Fortran in action
 * Frequently Asked Questions

Compilers

 * GNU Fortran
 * Intel Fortran Compiler for Linux: a free non-commercial Fortran compiler

Fortran Fortran

title: Fortran


text:
German/Level I/Freizeit

Lesson I.4: Freizeit

Dialogue
Literally, Freizeit means free time, i.e., spare time. In this dialogue, Franz and Greta are familiarizing each other with their sports activities.

* The audio recording says "das", but it should be "der".

Sports and Activities
Section Problems>>

Spielen, Machen and Other Verbs
All three verbs that you were introduced to in Lesson 2 are irregular in some way; however, most verbs are regular verbs. In English, the regular conjugation is very easy: only for the third person singular an "-s" is added to the infinitive ("to see" becomes "he/she/it sees"). Unfortunately, there are more endings in German. The following two tables show the endings for the two regular verbs spielen (to play) and machen (to do; to make):

As you see, the endings are the same for corresponding forms of spielen and machen. In fact, they are the same for all regular verbs. Thus, you can always just remove the -en from the infinitive of a regular German verb to form the stem (e.g., spielen becomes spiel- and machen becomes mach-) and then add the ending for the particular person. Here is a table with these endings:

* The form for you (polite) — Sie is exactly the same as for the plural, 3rd person pronoun they — sie.

Examples

 * Was machst du?
 * What are you doing?

 * Ich spiele Basketball.
 * I'm playing basketball.

 * Spielst du Fußball?
 * Do you play soccer?

 * Ich mache Hausaufgaben.
 * I'm doing homework.

 * Er macht Hausaufgaben.
 * He's doing homework.

 * Machst/Treibst du Sport?
 * Do you play sports?

Note that in English one plays sport, while in German one does sport. You can also use the question words from Lesson 3 to form more combinations:

 * Warum spielst du Baseball?
 * Why do you play baseball?

 * Wann machst du die Hausaufgaben?
 * When do you do the/your homework?

To say "not", use "nicht". "Nicht" goes after the verb but before the sport.

 * Wer spielt nicht Fußball?
 * Who doesn't play soccer?

 * Wir spielen nicht Tennis.
 * We don't play tennis.

Compound Sentences
Both German and English have compound sentences; the applications of these are enormous. They can be used in lists and also in compound sentences. For example,

 * Ich spiele Basketball, und er spielt auch Basketball.
 * I play basketball, and he also plays basketball.

The new word, also — auch is very important. The one grammar rule about auch is that it always comes after the verb.

Section Problems>>

Other Verbs and Their Conjugations
Schauen, schreiben and schwimmen are all regular verbs; i.e., they follow regular conjugations. To conjugate them, you first remove the -en from the infinitive to form the stem (i.e., schau-, schreib-, and schwimm-), and then add the correct ending. Here is an example:

Arbeiten is an irregular verb; however, it has a simple change. Whenever the ending starts with a consonant, an -e- is added before it. For example, du arbeitest (not du arbeitst ). As well as er/sie/es/ihr arbeitet (not er/sie/es/ihr arbeitt ).

Lesen is also an irregular verb. For the second and third person singular the form is liest, i.e., du/er/sie/es liest (not du lesst ).

Sehen is the last irregular verb. The second person singular is du siehst and the third person singular is er/sie/es sieht.

Section Problems>>

Two More Verb Forms
There are two common verb forms in English that just don't exist in German: the ing-form (or: present progressive); e.g., "I am playing" or "he is making"; and forms with "to do"; e.g., "I do play" or "he does not play".

The simple rule is: these constructions don't exist in German. Thus, you should translate I am playing to ich spiele. Similarly, I do play is also translated to ich spiele. Anything else ( ich mache spielen or ich bin spielen ) is either not possible in German or has a different meaning.

The phrase I do not play should be translated to ich spiele nicht (literally: I play not) since nicht (not) comes usually after the verb. This may sound like Early Modern English in a play by Shakespeare, and this is no coincidence since German and English are both West Germanic languages.

Section Problems>>

Expressing likes and dislikes
* gern and gerne can be used interchangeably.

In German, there are several ways to express likes and dislikes; this is just one of them. You can also add other verbs for other activities, e.g., I like to read. — Ich lese gern. or I like to work. — Ich arbeite gern. or I like to watch TV. — Ich schaue gern Fernsehen.

To express preference, you can use lieber instead of gern. For example, I prefer to play basketball. — Ich spiele lieber Basketball. or I prefer to read. — Ich lese lieber.

To express favorite activities, you can use am liebsten (meaning most of all) instead of lieber or gern. For example, Most of all, I like to play chess. — Ich spiele am liebsten Schach.

To express dislikes, you can use nicht gern instead of gern, for example I don't like to swim. — Ich schwimme nicht gern. or I don't like to work. — Ich arbeite nicht gern. or I don't like to play soccer. — Ich spiele nicht gern Fußball.

Section Problems>>

Numbers
Numbers are among the most important and most useful words: we need them to talk about time, amounts, money, etc. Even if you are "just" a tourist, you often cannot avoid numbers. Learning numbers can be a bit of a pain; thus, here is some advice: whenever you have time, count something in German; e.g., steps, cars, people, seconds, whatever: just count.

* Some numbers are missing in the audio recording.

** Some people sometimes say zwo instead of zwei in order to distinguishing it more clearly from drei (three), especially on the phone.

Notice the pattern: -teen translates to -zehn, and -ty to -zig.

There is one big problem with the numbers: in German the unit position comes before the tens and is connected by und (and). For example: twenty-three — dreiundzwanzig (literally: threeandtwenty), twenty-four — vierundzwanzig, thirty-five — fünfunddreißig, forty-six — sechsundvierzig, etc.

One exception is eins which becomes ein- in 21, 31, 41, etc.: twenty-one — einundzwanzig (literally: oneandtwenty), thirty-one — einunddreißig, forty-one — einundvierzig, etc.

German is not the only language with this "reverse" order of numbers: Danish (another Germanic language) and Arabic do it the same way. This was also the standard way of forming numbers in older versions of English ("Four and twenty blackbirds/Baked in a pie." w:Sing a Song of Sixpence).

Section Problems>>

= What's On the Test =

To go straight to the lesson test, go here.

The test will have four parts to it: Grammar (79 points), Translating (95 points), Reading Comprehension (20 points), Vocabulary (20 points), and Previous Topics (10 points) in that order. The Grammar section will test your ability to know the verbs from this lesson and its various versions, to know articles – the genders of them and the correct usage of them, and correct word order.

The Translating section is worth the most points, and it too has three sections. You must know the translations for sentences and phrases going from English to German, and be able to take a German dialogue and translate it back into English. Also you must know the translation from Numbers to German.

The third section, Reading Comprehension, is Comprehension Questions you must know how to read the conversion and after reading you will be asked question on the previous conversion.

The fourth section is a vocabulary section. You get 20 English words on the left and 20 German words on the right, and be asked to match them. To study for that, check out the 401 flashcards related to this lesson at FlashcardExchange.com Part I and FlashcardExchange.com Part II.

The last section, Previous Topics, is a quick review on Lesson 1 to get ready for this section, just look at some past notes or go to Lesson 1 and study. That is the whole test. Take it!

title: German/Level I/Freizeit


text:
Perl Programming/Control flow

Control structures
The basic control structures do not differ greatly from those used in the C programming language or Java programming language:

Loops
Though syntactically the same, Perl does not use break and continue to change the flow of loops. Perl provides the following commands: (with C equivalents in comments)

Note that the statements in a while (or until) loop are not executed, if the Boolean expression evaluates to false (or true, respectively) on the first pass, even when specified at the end of the code block. Therefore the following loops are functionally equivalent: (the same applies to: do {} until)

The do {} while and the do {} until loops are technically statement modifiers and not actual control structures. The statements will be executed at least once.

$variable is an alias to each element of the <tt>@list</tt>, starting at the first element on the first pass through the loop. The loop is exited when all the elements in the list have been exhausted. Since <tt>$variable</tt> is an alias, changing the value will change the value of the element in the list. This should generally be avoided to enhance maintainability of the code.

If <tt>$variable</tt> is omitted, the default variable <tt>$_</tt> will be used.

Note that <tt>for</tt> and <tt>foreach</tt> are actually synonyms and can be used interchangeably.

Blocks may have an optional <tt>continue</tt> section, which is executed at the end of each iteration.

<tt>next</tt>, <tt>redo</tt>, <tt>last</tt>
When inside a loop, there are three keywords that manipulate how the loop is handled.

To start the next iteration, <tt>next</tt> jumps to the end of the block. If there is a <tt>continue</tt> block, that part is executed, as is the conditional to resume the loop.

To restart an iteration, <tt>redo</tt> jumps to the beginning of the block. Neither <tt>continue</tt> nor the conditional are executed.

To break out of the loop, <tt>last</tt> jumps outside the end of the block. Neither <tt>continue</tt> nor the conditional are executed.

<tt>given</tt>
Until version 5.10.1, Perl did not have an equivalent of the switch statement in other programming languages. Starting in that version, it became an experimental feature.

In Perl 5, it first needs to be enabled with one of the following statements:

By default, the expressions in <tt>when</tt> is matched to what is found in <tt>given</tt>. In certain exceptional cases, the value may be used directly as a boolean.

<tt>if-then</tt> statements
Statements with <tt>else</tt> blocks (these also work with <tt>unless</tt> instead of <tt>if</tt>)

Postfix notation
Control statements can also be written with the conditional following the statements (called "postfix"). This syntax functions (nearly) identically to the ones given above.

statement if Boolean expression; statement unless Boolean expression; statement while Boolean expression; statement until Boolean expression; statement foreach list;

title: Perl Programming/Control flow


text:
Java Programming/History

On 23 May 1995, John Gage, the director of the Science Office of the Sun Microsystems along with Marc Andreesen, co-founder and executive vice president at Netscape announced to an audience of SunWorldTM that Java technology wasn't a myth and that it was going to be incorporated into Netscape Navigator.

At the time the total number of people working on Java was less than 30. This team would shape the future in the next decade and no one had any idea as to what was in store. From running an unmanned vehicle on Mars to serving as the operating environment of most consumer electronics, e.g. cable set-top boxes, VCRs, toasters and PDAs, Java has come a long way from its inception. Let's see how it all began.

Earlier programming languages
Before Java emerged as a programming language, C++ was the dominant player in the trade. The primary goal of the creators of Java was to create a language that could tackle most of the things that C++ offered while getting rid of some of the more tedious tasks that came with the earlier languages.

Computer hardware went through a performance and price revolution from 1972 to 1991. Better, faster hardware was available at ever lower prices, and the demand for big and complex software exponentially increased. To accommodate the demand, new development technologies were invented.

The C language developed in 1972 by Dennis Ritchie had taken a decade to become the most popular language amongst programmers working on PCs and similar platforms (other languages, like COBOL and FORTRAN, dominated the mainframe market). But, with time programmers found that programming in C became tedious with its structural syntax. Although people attempted to solve this problem, it would be later that a new development philosophy was introduced, one named Object-Oriented Programming (OOP). With OOP, one can write code that can be reused later without needing to rewrite the code over and over again. In 1979, Bjarne Stroustrup developed C++, an enhancement to the C language with included OOP fundamentals and features. Sun generated revenue from Java through the selling of licenses for specialized products such as the Java Enterprise System.

The Green team
In December 1990, a project was initiated behind closed doors with the aim to create a programming tool that could render obsolete the C and C++ programming languages. Engineer Patrick Naughton had become extremely frustrated with the state of Sun's C++ and C APIs (Application Programming Interfaces) and tools. While he was considering to move towards NeXT, he was offered a chance to work on new technology and the Stealth Project was started, a secret nobody but he knew.

This Stealth Project was later named the Green Project when James Gosling and Mike Sheridan joined Patrick. As the Green Project teethed, the prospects of the project started becoming clearer to the engineers working on it. No longer did it aim to create a new language far superior to the present ones, but it aimed to target devices other than the computer.

Staffed at 13 people, they began work in a small office on Sand Hill Road in Menlo Park, California. This team came to be called the Green Team henceforth in time. The project they underwent was chartered by Sun Microsystems to anticipate and plan for the "next wave" in computing. For the team, this meant at least one significant trend, that of the convergence of digitally controlled consumer devices and computers.

Reshaping thought
The team started thinking of replacing C++ with a better version, a faster version, a responsive version. But the one thing they hadn't thought of, as of yet, was that the language they were aiming for had to be developed for an embedded system with limited resources. An embedded system is a computer system scaled to a minimalistic interface demanding only a few functions from its design. For such a system, C++ or any successor would seem too large as all the languages at the time demanded a larger footprint than what was desired. The team thus had to think in a different way to go about solving all these problems.

Co-founder of Sun Microsystems, Bill Joy, envisioned a language combining the power of Mesa and C in a paper named Further he wrote for the engineers at Sun. Gathering ideas, Gosling began work on enhancing C++ and named it "C++ ++ --", a pun on the evolutionary structure of the language's name. The ++ and -- meant, putting in and taking out stuff. He soon abandoned the name and called it Oak after the tree that stood outside his office.

The demise of an idea, birth of another
By now, the work on Oak had been significant but come the year 1993, people saw the demise of set-top boxes, interactive TV and the PDAs. A failure that completely ushered the inventors' thoughts to be reinvented. Only a miracle could make the project a success now. And such a miracle awaited anticipation.

National Center for Supercomputing Applications (NCSA) had just unveiled its new commercial web browser for the internet the previous year. The focus of the team, now diverted towards where they thought the "next-wave" of computing would be — the internet. The team then divulged into the realms of creating the same embeddable technology to be used in the web browser space calling it an applet — a small application. Keeping all of this in mind, the team created a list of features tackling the C++ problems. In their opinion, the project should ...

 * .. be simple and gather tested fundamentals and features from the earlier languages in it,
 * .. have standard sets of APIs with basic and advanced features bundled with the language,
 * .. get rid of concepts requiring direct manipulation of hardware (in this case, memory) to make the language safe,
 * .. be platform independent and may be written for every platform once (giving birth to the WORA idiom),
 * .. be able to manipulate network programming out-of-the-box,
 * .. be embeddable in web browsers, and ...
 * .. have the ability for a single program to multi-task and do multiple things at the same time.

The team now needed a proper identity and they decided on naming the new technology they created Java ushering a new generation of products for the internet boom. A by-product of the project was a cartoon named "Duke" created by Joe Parlang which became its identity then.

Finally at the SunWorldTM conference, Andreesen unveiled the new technology to the masses. Riding along with the explosion of interest and publicity in the Internet, Java quickly received widespread recognition and expectations grew for it to become the dominant software for browser and consumer applications.

Initially Java was owned by Sun Microsystems, but later it was released to open source; the term Java was a trademark of Sun Microsystems. Sun released the source code for its HotSpot Virtual Machine and compiler in November 2006, and most of the source code of the class library in May 2007. Some parts were missing because they were owned by third parties, not by Sun Microsystems. The released parts were published under the terms of the GNU General Public License, a free software license.

Versions
Unlike C and C++, Java's growth is pretty recent. Here, we'd quickly go through the development paths that Java took with age.

Initial Release (versions 1.0 and 1.1)
Introduced in 1996 for the Solaris, Windows, Mac OS Classic and Linux, Java was initially released as the Java Development Kit 1.0 (JDK 1.0). This included the Java runtime (the virtual machine and the class libraries), and the development tools (e.g., the Java compiler). Later, Sun also provided a runtime-only package, called the Java Runtime Environment (JRE). The first name stuck, however, so usually people refer to a particular version of Java by its JDK version (e.g., JDK 1.0).

Java 2 (version 1.2)
Introduced in 1998 as a quick fix to the former versions, version 1.2 was the start of a new beginning for Java. The JDKs of version 1.2 and later versions are often called Java 2 as well. For example, the official name of JDK 1.4 is The Java(TM) 2 Platform, Standard Edition version 1.4.
 * Major changes include:
 * Rewrite the event handling (add Event Listeners)
 * Change Thread synchronizations
 * Introduction of the JIT-Just in time compilers

Kestrel (Java 1.3)
Released on 8 May 2000. The most notable changes were:
 * HotSpot JVM included (the HotSpot JVM was first released in April, 1999 for the J2SE 1.2 JVM)
 * RMI was modified to support optional compatibility with CORBA
 * JavaSound
 * Java Naming and Directory Interface (JNDI) included in core libraries (previously available as an extension)
 * Java Platform Debugger Architecture (JPDA)
 * Synthetic proxy classes

Merlin (Java 1.4)
Released on 6 February 2002, Java 1.4 has improved programmer productivity by expanding language features and available APIs:
 * Assertion
 * Regular Expression
 * XML processing
 * Cryptography and Secure Socket Layer (SSL)
 * Non-blocking I/O (NIO)
 * Logging

Tiger (version 1.5.0; Java SE 5)
Released in September 2004
 * Major changes include:
 * Generics - Provides compile-time type safety for collections :and eliminates the drudgery of casting.
 * Autoboxing/unboxing - Eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer).
 * Enhanced for - Shorten the for loop with Collections use.
 * Static imports - Lets you import all the static part of a class.
 * Annotation/Metadata - Enabling tools to generate code and deployment descriptors from annotations in the source code. This leads to a "declarative" programming style where the programmer says what should be done and tools emit the code to do it. Annotations can be inspected through source parsing or by using the additional reflection APIs added in Java 5.
 * JVM Improvements - Most of the run time library is now mapped into memory as a memory image, as opposed to being loaded from a series of class files. Large portion of the runtime libraries will now be shared among multiple JVM instances.

Mustang (version 1.6.0; Java SE 6)
Released on 11 December 2006.

What's New in Java SE 6:
 * Web Services - First-class support for writing XML web service client applications.

 * Scripting - You can now mix in JavaScript technology source code, useful for prototyping. Also useful when you have teams with a variety of skill sets. More advanced developers can plug in their own scripting engines and mix their favorite scripting language in with Java code as they see fit.

 * Database - No more need to find and configure your own JDBC database when developing a database application. Developers will also get the updated JDBC 4.0, a well-used API with many important improvements, such as special support for XML as an SQL datatype and better integration of Binary Large OBjects (BLOBs) and Character Large OBjects (CLOBs) into the APIs.

 * More Desktop APIs - GUI developers get a large number of new tricks to play like the ever popular yet newly incorporated SwingWorker utility to help you with threading in GUI apps, JTable sorting and filtering, and a new facility for quick splash screens to quiet impatient users.

 * Monitoring and Management - The really big deal here is that you don't need to do anything special to the startup to be able to attach on demand with any of the monitoring and management tools in the Java SE platform.

 * Compiler Access - Really aimed at people who create tools for Java development and for frameworks like JavaServer Pages (JSP) or Personal Home Page construction kit (PHP) engines that need to generate a bunch of classes on demand, the compiler API opens up programmatic access to javac for in-process compilation of dynamically generated Java code. The compiler API is not directly intended for the everyday developer, but for those of you deafened by your screaming inner geek, roll up your sleeves and give it a try. And the rest of us will happily benefit from the tools and the improved Java frameworks that use this.

 * Pluggable Annotations allows programmer to write annotation processor so that it can analyse your code semantically before javac compiles. For example, you could write an annotation processor that verifies whether your program obeys naming conventions.

 * Desktop Deployment - At long last, Java SE 6 unifies the Java Plug-in technology and Java WebStart engines, which just makes sense. Installation of the Java WebStart application got a much needed makeover.

 * Security - Java SE 6 has simplified the job of its security administrators by providing various new ways to access platform-native security services, such as native Public Key Infrastructure (PKI) and cryptographic services on Microsoft Windows for secure authentication and communication, Java Generic Security Services (Java GSS) and Kerberos services for authentication, and access to LDAP servers for authenticating users.

 * The -lities: Quality, Compatibility, Stability - Bug fixes ...

Dolphin (version 1.7.0; Java SE 7)
Released on 28 July 2011.

Feature additions for Java 7 include:
 * JVM support for dynamic languages, following the prototyping work currently done on the Multi Language Virtual Machine
 * Compressed 64-bit pointers Available in Java 6 with -XX:+UseCompressedOops
 * Small language changes (grouped under a project named Coin):
 * Strings in switch
 * Automatic resource management in try-statement
 * Improved type inference for generic instance creation
 * Simplified varargs method declaration
 * Binary integer literals
 * Allowing underscores in numeric literals
 * Catching multiple exception types and rethrowing exceptions with improved type checking

 * Concurrency utilities under JSR 166
 * New file I/O library to enhance platform independence and add support for metadata and symbolic links. The new packages are java.nio.file and java.nio.file.attribute
 * Library-level support for Elliptic curve cryptography algorithms
 * An XRender pipeline for Java 2D, which improves handling of features specific to modern GPUs
 * New platform APIs for the graphics features originally planned for release in Java version 6u10
 * Enhanced library-level support for new network protocols, including SCTP and Sockets Direct Protocol
 * Upstream updates to XML and Unicode

Lambda (Java's implementation of lambda functions), Jigsaw (Java's implementation of modules), and part of Coin were dropped from Java 7.

Spider (version 1.8.0; Java SE 8)
Java 8 was released on 18 March 2014, and included some features that were planned for Java 7 but later deferred.

Work on features was organized in terms of JDK Enhancement Proposals (JEPs).

 * JSR 335, JEP 126: Language-level support for lambda expressions (officially, lambda expressions; unofficially, closures) under Project Lambda which allow the addition of methods to interfaces without breaking existing implementations. There was an ongoing debate in the Java community on whether to add support for lambda expressions. Supporting lambda expressions also allows the performance of functional-style operations on streams of elements, such as MapReduce-inspired transformations on collections. Default methods allow an author of an API to add new methods to an interface without breaking the old code using it. Although it was not their primary intent, default methods also allow multiple inheritance of behavior (but not state).

 * JSR 223, JEP 174: Project Nashorn, a JavaScript runtime which allows developers to embed JavaScript code within applications
 * JSR 308, JEP 104: Annotation on Java Types
 * Unsigned Integer Arithmetic
 * JSR 337, JEP 120: Repeating annotations
 * JSR 310, JEP 150: Date and Time API
 * JEP 178: Statically-linked JNI libraries
 * JEP 153: Launch JavaFX applications (direct launching of JavaFX application JARs)
 * JEP 122: Remove the permanent generation

title: Java Programming/History


text:
Perl Programming/About Perl

Perl is a programming language designed by Larry Wall, known today for its strong community and module archive CPAN. It was originally developed to process text and produce reports. As a result, a backronym has been formed from its name: Practical Extraction and Report Language. It makes extensive use of significant punctuation, and highly chaotic-looking code has been written in it. This has resulted in a less complimentary backronym (which is still embraced by Perl users): Pathologically Eclectic Rubbish Lister (said to be a quote from the language designer himself).

Perl is Free Software, available under the Artistic License and the GPL. It was developed on Unix, and its Unix roots are pervasive. Perl is available for most operating systems but is particularly prevalent on Unix and Unix-like systems, and is growing in popularity on Microsoft Windows systems. However, it has been ported to a multitude of environments (some say as many as Java). It's a popular systems administration tool in Windows. Most of the things done in Perl transfer well from one operating system to another (provided suggested conventions are followed).

As an example of Perl in action, until January 2002 the software running Wikipedia was a CGI script written in Perl.

Another example is Slashdot, which runs on the Perl-based Slashcode software.

When used on the web, Perl is often used in conjunction with the Apache web server and its mod_perl module. This embeds the Perl binary into the webserver so the CGI script need not fire up a new copy each time it's accessed. Other features such as database connection persistence greatly reduce the access times to the page.

History
The Perl programming language was created by Larry Wall in 1987. It borrows features from C, sed, awk, shell scripting (sh), and (to a lesser extent) from many other programming languages as well. The name is normally capitalized ("Perl") when referring to the language, but not capitalized ("perl") when referring to the interpreter (e.g. "Only perl properly parses Perl.")

Rationale
Perl was designed to be a practical language to extract information from text files and generate reports. One of its mottos is There is more than one way to do it (TIMTOWTDI - pronounced 'Tim Toady'). Another is Perl: the Swiss Army Chainsaw of Programming Languages. One stated design goal is to make easy tasks easy and difficult tasks possible. Its versatility permits versions of many programming paradigms: procedural, functional, and object-oriented — though purists object to Perl as it is not a cleanly designed language. Perl has a powerful regular expression support built in directly to the syntax. Perl is often considered the archetypal scripting language and has been called the "glue that holds the web together", as it is one of the most popular ../CGI/ languages. Its function as a "glue language" can be described broadly as its ability to tie together different systems and data structures that were not designed to be tied together.

title: Perl Programming/About Perl


text:
XML - Managing Data Exchange/SyncML

Learning objectives
Upon completion of this chapter, you will be able to

 * Understand SyncML fundamentals and general syntax.
 * Understand how and why SyncML is implemented.
 * Quickly locate and use SyncML technical specifications.

Introduction
Mobile devices such as PDAs, pagers, mobile phones and laptops are- by nature- not always connected to a network. Yet these devices contain applications which require information obtained from a network in order to be useful. While most PDAs and mobile phones contain applications such as calendars, task lists, and address books for storing useful information, this information is far less useful when it is static, only available on the device itself. For example, copies of static information will always be dissimilar when changes are made on one copy or the other. Synchronization offers a device the ability to connect to a network in order to update either the information on the device or the information on the network, such that both sets of information are identical and up-to-date.

Given the proliferation of proprietary mobile devices and protocols, as well as the increasing consumer demand for ubiquitous mobile access of information, leading technology companies saw the need to create a standard, universal language for describing the synchronization actions between devices and applications. They formed a consortium to sponsor the SyncML initiative to create this language.

Currently, the SyncML consortium has been adopted and incorporated into the Open Mobile Alliance, a larger group of over 300 companies which sponsors many collaborative technology projects and protocols.

What is SyncML?
SyncML or Synchronization Markup Language is an XML-based, industry-standard protocol for synchronizing mobile data across a variety of multiple networks, platforms and devices. SyncML started as an initiative in mid 2000 by major technology companies such as Ericsson, IBM, Palm Inc., Lotus, Matsushita Ltd. (Panasonic), Motorola, Nokia, Openwave, Starfish Software, Psion and Symbian. Their initiative's goals were to create a universal language from the myriad, proprietary, synchronization protocols used by mobile devices and provide a complete set of synchronization functionality for future devices. The consortium released version 1.0 in December 2000. They then implemented new features and resolved issues with the subsequent version releases, finalizing the protocol with version 1.1 in February 2002.

The SyncML protocol is designed with these goals in mind:

 * As a common language, any device should be able to synchronize with any SyncML service (a networked data repository).
 * Any service speaking SyncML should be able to synchronize with any SyncML-capable device.
 * The protocol must address the limitations of mobile devices, specifically with respect to memory storage.
 * It must support a variety of transport protocols such as HTTP, SMTP, Bluetooth and others.
 * It must deliver common synchronization commands to all devices.
 * It builds upon existing web technologies, specifically XML.
 * Support asynchronous communication and error-handling, since the Internet has latency.

SyncML consists of client and server commands enclosed within DTD-defined...

Vocabulary
Let's begin by defining a vocabulary:

 * Client - the mobile device, its application and local database.
 * Server - a remote system communicating to the system database or application.
 * Modifications - data in fields in a database are changed.
 * Sync - The client and server exchange SyncML messages with commands.
 * Package - SyncML DTD conformant XML markup describing requests or actions to be taken by either a SyncML client or server. A package is a collection of actions to be performed
 * Message - the smallest unit of SyncML markup. Large packages are broken into separate messages.
 * Mapping - using an intermediate identifier to tie two pieces of information together. example: let's say 'green' is '5', and '5' is nice.  What is nice?  If you said 'green' you are correct. You've just done mapping!

Abbreviations:

Messages and Packages
SyncML messages are requests from either a client or server to perform some action. The action may be to synchronize data, perform some checks on data, update a status, or handle any errors with these actions. Messages are bundled together as packages, as kind of a to-do list. Messages are a laundry list of requests, and they can be pieced together out of order if sufficient mapping information is given to identify to which package the message belongs.

SyncML is designed this way to accommodate for errors and dropped messages. Should one message be dropped, a syncML client or server will know there is a problem because the mapping cannot be completed. It will then issue a request for the information to be resent. Once the data is received, the updates to the information can proceed.

Structure of a SyncML message
Like SOAP, there are two parts to the SyncML message, a Sync Header  and Sync Body . The header contains meta-information about the request, such as the target database  and source database datafield and data an existing data field with some data
 * }

Notice lines {1} and {18} start the SyncML file with the root tags. Next, the SyncHdr is defined by lines {2} and {8}. Further, lines {3,4} define the versioning information, line {5} defines the sessionID to distinguish which unique dialogue is occurring between client and server applications, line {6} shows the MsgID to uniquely identify this set of requests (this entire markup) to be performed by the requested application. Also in the syncHeader are credentials, on line {7}.

The SyncBody begins on line {9}. In this part of the syncML message, device/application status {10}, target/source URIs {12,13}, and requested actions such as the sync itself between lines {11,16}, Add and Replace {14,15} commands are given.

WBXML and SyncML
WAP Binary XML (WBXML) is a form of XML whereby the XML tags are abbreviated in order to shorten the markup for transmission to mobile devices, which commonly have bandwidth and memory limitations. The XML tags are encoded into a binary shorthand to save space. Let's take a look at an example so that this will make more sense.

The following is WBXML binary code depicting a SyncML message. Notice in the first line there is a the document type definition, represented here in hexadecimal tokens. Can you see what happens to the following string? "//SYNCML//DTD SYNCML 1.1//EN"

Immediately following this string are the characters '6D 6C 71'. Each of these represent a SyncML tag.

wbxml abbreviations

wbxml abbreviations (cont.)

tells the SyncML processor that this is the beginning of opaque (xml) data this represents the length of this opaque data The characters "1" followed by "." and "1" represents ""

All together this WBXML code snippet, 6D6C71C303"1.1"01 represents:

SyncML header snippet

So you can see how using WBXML shorthand would be a more compact means of representing XML, saving bandwidth for mobile devices.

For more information please refer to Ed Dumbill's articles on syncML with WBXML:
 * Have Data, Will Travel
 * WBXML and SyncML

SyncML specifications
The best source of information on SyncML is the protocol itself. Visit the Open Mobile Alliance for the SyncML specifications.

Open Mobile Alliance
Download OMA SyncML Specifications and white papers at the Open Mobile Alliance. Or check out the SyncML Articles at the Open Mobile Alliance.

SyncML Implementations
Although the SyncML specifications are useful, you still have to implement the protocol in your application. There are a few toolkits and implementations out there that you can use to get a head start.

SyncML Reference Toolkit
The Open Mobile Alliance has released a toolkit written in C to demonstrate SyncML. You can get it here. If you can read German, you can get a sample application using the toolkit here.

Funambol
Interested in developing SyncML for Java? Check out the open source project Funambol. It offers a Java and C++ SDK that implements the SyncML data synchronization protocol, a Java-based application framework for building SyncML server applications, and a standalone SyncML server.

Summary
Mobile Device Technology is improving and changing at a rapid pace. As US telecommunication companies implement Third generation (3G) WCDMA technology (wide-band code-division multiple access), or wireless broadband, we will begin to see powerful devices emerge on the market. These devices will be able to deliver full color, video, streaming multimedia and a variety of data services such as Multimedia Messaging Service (MMS) through WAP. In that infrastructure is becoming cheaper, these telecommunication companies are starting to shift towards being service providers and media vendors as opposed to communications utilities. Cingular wireless, multimedia messaging and ringtones services are a good example of the shift of their company towards being a media platform. The companies that will survive will be the ones that listen to customers needs and make easy-to-use services.

Telecommunications companies can add value to their services by creating custom applications and services that use SyncML for synchronization.

Exercises

 * 1) Visit the Open Mobile Alliance Website, download the pdf of the SyncML v. 1.1 protocol and review it.  Reading this reference is a valuable exercise in learning.
 * 2) Answer these questions:
 * 3) * What is WBXML and why is it used?
 * 4) * How do you foresee SyncML being used in the future?
 * 5) * Name a problematic situation whereby SyncML is the best 'tool' for the job.

''Answers: 2a) WBXML is Wap Binary XML, it is a form of XML whereby the XML tags are abbreviated in order to shorten the markup for transmission to mobile devices, which commonly have bandwidth and memory limitations. 2b) SyncML will likely be used as a general, standard syncing mechanism for synchronizing data sets between systems, not just for mobile devices. 2c) A ticket-tracking system called TNT helpdesk is a web-based open work request management system. The staff running this system would like to have live data from this system on their PDAs, listing open requests.  Currently, the PDA database is synced via a docking sync station attached to the staff members' PCs.  Staff members have to download the request list as a CSV file, convert it into a usable PDA database and upload it to the PDA, making it this process cumbersome, prone to error, and always out-of-date.  Recommendation: Create a custom app to push live updates to the PDAs using SyncML over Bluetooth/Wireless''

title: XML - Managing Data Exchange/SyncML