OpenLLM-France/wikimedia huggingface dataset:
# Visual Basic .NET/String and character operators
## String Operator
### String concatenation

The "&" operator joins two strings together. Example:
This will result in String3 being equal to "123456"
The "+" operator may be used in place of "&". However, it is not recommended.

### Concat

You may concatenate a number of strings:
If you have defined a string array, such as:
then all the elements of this array may be concatenated in a simple way:

## String manipulations functions

* Lcase: converts in higher case.
* Ucase: converts in lower case.
To create some substrings, the VB6 functions are still available:
* Left: left part.
* Right: right part.
* Mid: middle part.
* InStr: substring location into a string.
* Replace: replace a substring by another one.
# Visual Basic .NET/Namespaces
## Namespaces

Namespaces allows to separate the different imported programs, especially when they are long like libraries.
In a module, simply enter (without any module name):
To import them after, use Imports.
For example from another module of the project ConsoleApplication1:
By commenting the importation line, the following error appears: ExternalClass Type undefined.

## References

* http://msdn.microsoft.com/en-us//library/zt9tafza.aspx
# XQuery/Employee Search

This example shows JavaScript and XQuery combining to provide a directly updated Web page. AJAX is used in a form sometimes referred to as AHAH in which the server-side XQuery script returns an XHTML node (in this case a table containing the information about an employee) which is updated into the DOM using innerHTML.
# XQuery/Excel and XML
## Excel spreadsheet to XML

Simple tabular spreadsheet data in Excel 2003 and above can be converted to XML using an additional plugin.
When downloaded, to install, go to Tools>Add-ins>>Browse to locate the downloaded file and then install. An additional item 'XML tools' should appear on the tool bar.

### Converting the spreadsheet

* Select the XML tools in the menu bar and 'Convert range to a list'. Guided by the tool, select the required cell range, set option for headings and choose 'Advanced' to enter your own name for the root of the document and for each row.
* Save the spreadsheet as XML data with an xml extension
* If you need to change the spreadsheet to add or remove columns, convert the XML back to a data list by going to Data>> List >> Convert to range. Make the changes required and then reconvert back to XML
* If the spreadsheet contains dates or times, you may have problems in conversion. Set the date format to yyyy-mm-dd. When you convert to XML you will be informed that date formats are incompatible - click "use existing formatting"
* As a last resort, export the sheet as tab-delimited text, then re-import, ensuring all data is imported as Text rather than General (which will recognize the dates and set a date type).

### Creating an XML spreadsheet from scratch

* To create a new spreadsheet, enter the headings first. Select all columns and set the formatting to text. If you don’t you will likely run into problems with dates and times where it is often difficult to wrest control away from Microsoft.
* Enter dates in the XML format yyyy-mm-dd - you can set the date format to this
* Enter the data in the table
* Finally convert to XML as above

### Export from XQuery to Spreadsheet

Data is commonly exported as CSV files but Excel will load tabular XML files which are straightforward to generate with XQuery.
For example, this table of Employee data displays in a browser as indented XML with folding symbols. Saving the file saves the XML data prior to transformation to this display format.
In Firefox, when the page is saved as XML, the filename is the script name with an additional XML suffix. The user will usually need to change this file name. The saved file can then be opened in Excel and after a couple of challenges, the data will be imported.
In IE6, the right-button menu provides an option to export directly to Excel.
The default file name can be set by the exporting script using the HTTP header Disposition....(need example)

### Reading and Writing XML Spreadsheet 2003 Format

An example of reading and writing Excel files in the XML Spreadsheet 2003 format is located at https://github.com/lcahlander/codelist-compare
The Microsoft reference for XML Spreadsheet 2003 is located at XML Spreadsheet Reference
# XQuery/Executing a script
### Execution Methods

If you are using the oXygen IDE this can be done by selecting the "transform" icon on the toolbar.
If you are running this program in the eXist databases you can upload a file called helloWorld.xq using the "Browse" function in the web administrator and then run the following in the browser:
http://localhost:8080/exist/rest/db/helloWorld.xq
There are three important items to note in this URL.
* This is the URL that you would use if you used the default eXist configuration
* Note that the word "rest" is in the URL before the "/db" indicating that you are using the REST interface (as opposed to the WebDAV, Atom or SOAP interface)
* Note that the port is "8080" (the default port for development web sites) and that the "context" of the server is "exist". Both of these can be easily changed by editing the $EXIST_HOME/tools/jetty/etc/conf.xml file and restarting your eXist server. The short-form on production sites might be:
http://localhost/rest/db/helloWorld.xq
With tools like URL rewriting you can also remove the "/rest" and the "/db" components of the URL.
# XQuery/Example Sequencer

The code examples used in the XQuery /SQL comparison are coded in an XML file. The WikiBook page redundantly has the code pasted into the page but an alternative is to provide an application to generate the whole page together with the executed examples from the XML script.
Here is a sample of the XML script:
To allow the queries to be executed in a selected order, a lesson defines a sequence of queries:
The user can step through the examples in the lesson :
Test Lesson

## Implementation

Two scripts form the core of this application, one to list the queries in a lesson, the other to execute the query code, both SQL and XQuery and show the results. ....
# XQuery/Examples Wanted
## Examples wanted

If you would like examples of XQuery code to be added to the Wikibook, please list your suggestions here.
Advanced PHP example outputting XHTML after xQuery on XML document.

## Suggestions

* XUpdate
xquery examples for xml data mining
# XQuery/Extracting data from XHTML files
## Motivation

To perform an XQuery on XHTML files that use the XHTML namespace.

## Method

We will start our XQuery by adding the default namespace for XHTML.

## Sample Source Code

Assume that you have an well-formed XHTML file in the file /db/text/index.xhtml
# XQuery/FLWOR Expression
## Motivation

You have a sequence of items and you want to create a report that contains these items.

## Method

We will use a basic XQuery FLWOR expression to iterate through each of the items in a sequence. The five parts of a FLWOR expression are:
* for - specifies what items in the sequence you want to select (optional)
* let - used to create temporary names used in the return (optional)
* where - limit items returned (optional)
* order - change the order of the results (optional)
* return - specify the structure of the data returned (required)
Lets assume we have a sample file of books that looks like this :
(as stored in eXistdb)
Here is a simple example of a FLWOR expression that will return only the titles and prices of the books sorted by title:
This XQuery FLWOR expression will return all books that have a price over $50.00. Note that we have not just one but two let statements after the for loop. We also add a where clause to restrict the results to books over $50.00. The results are sorted by the title and the result is a new sequence of book items with both the price and the title in them.
Execute

## Using the "to" function to generate a range of values

You can also express a range of values from one number to another number by placing the keyword "to" between two numbers in a sequence.
The following generates a list of values from 1 to 10.
Execute

## Using the "at" function as a counter

You can add "at $my-counter" to add a numerical counter for each item in a FLWOR loop
Execute

## Comparing FLWOR with imperative for loops

In imperative programming languages (JavaScript, Java, .Net, Perl, PHP and Python) each loop is executed sequentially, one after another. However XQuery is a functional programming language. In a FLWOR loop, each iteration could execute in parallel and no communication is allowed between the threads. As a result, you cannot increment variables as you would in imperative languages.
# XQuery/Dynamic Module Loading
## Motivation

You want to conditionally import a module. For example the module might provide a list of all the functions to style a web page such as header/footer and breadcrumbs.

## Method
### Module import

We will use the XQuery function util:import-module. This function has three arguments:
* $namespace: The full URI of the module that you are loading such as http://example.com/my-module
* $prefix: the prefix you want to use to reference each function in the module such as style
* $location: the database path that you will be loading the module from such as an absolute path/db/modules/my-module.xqm or a relative path my-module.xqm
For example the following will import a module called my-module from the /db/modules collection.:
The function xs:anyURI is used to cast each string into the URL type.

### Function invocation

Because the namespace is declare dynamically, the imported functions have to be invoked using util:eval. The input to this function is a string containing an XQuery expression. e.g.

## Example

The following will randomly load one of two style modules.
Run

### Style A Module

Here is an example of a style module. It has four functions. One to import the CSS files, one for the header, one for the navigation breadcrumb and one for the footer.
# Motivation

You need to execute an external process such as shell command.

# Example of Options

There are currently only two options documented. The working directory and the value of the standard input:

# Sample Program
## Sample Output

Here is an example of the git "ls" command being run without any options. Note that the default is the EXIST_HOME directory.
# Motivation

You want to use environment variables to change the way an XQuery executes.
XQuery 3.0 introduced two new functions:

# Sample Results

Here are some sample results on a Windows 7 System:
Note that Environment Variables are not the same as system-properties. System properties are key-value pairs typically set by Java. Environment Variables are typically key-value pairs associated with a shell.

# References

* W3C XQuery 3.0 Specification
# Woodturning/Natural edge bowls

Natural edge bowls, also known as live edge bowls or wany edge bowls retain the original surface of the tree trunk as the rim of the bowl. The term live edge is only applicable where the bark has been retained.
# Woodturning/Salt and Pepper Shakers

SALT AND PEPPER SHAKERS
Start with a blank approx 210mm by 70mm
Make a marking stick (template) for your design
BLANK
1. Turn to round
2. Mark the division between top and bottom with template
3. Part in ~ 50% of the way
4. Cut a spigot on top and bottom for re-mounting
5. Divide the work on the bandsaw or with a handsaw
UPPER HALF
6. Mount the top section first
7. Square off the end and then round the blank to approx 55mm
8. Mark the top point (nearest the headstock) with the template and part in
9. Drill in with 1&1/8th inch forstner bit to no more than 5mm of top
10. Now open the hole with a parting tool by approximately 6mm width (or half the dimension of the wall and 10mm deep. Gauge and set the depth with the depth gauge. NB. If the join is deeper the total height of the work is correspondingly smaller
11. Part off, leaving a ‘nub’ for the tailstock on re-mount of the whole
BOTTOM HALF
12. Square the end and round the blank to approx 55mm
13. Drill in with forstner bit to within 10mm of the base
14. Mark the base of the tenon with the depth gauge (refer step 10) 1-2mm shorter so that the join is seamless
15. Part in and form the tenon carefully so the top is a comfortable jam fit. NB. Don't force a tight fit as the top will split
JOIN THE WORK
16. With the components together, bring up the tailstock and round the entire work to finished dimension of 50mm
17. Sand through grades to 400
18. Mark the details with template
19. Check the bottom dimension against the paired unit before parting in
20. Cut the beads and round the top
21. Sand the details to 400
22. Remove the tailstock and carefully finish the top with the skew chisel
23. Using the index wheel, mark the top with Awl for Salt or Pepper Salt: Center ~ 2.5mm Stops 8, 16, 24 ~ 2.5mm Pepper: Center ~ 2.5mm Stops, 4, 8, 12, 16, 20, 24 – 1.5mm
FINISH THE BASE
24. Mount the base on a custom mandrel and drill through with 5/8th inch forstner bit, or one that suits the plug you are using.
25. Dish the base as necessary to suit the plug
# Woodturning/Tools
## Skew chisel

The traditional skew chisel is made from a rectangular bar, but more recently it has become available in 'oval' and round cross-sections. The cutting edge is usually straight, but some turners prefer a convex edge. The skew chisel is used primarily in spindle turning.
There are three distinct ways to cut with the skew chisel.
* Cut with the long point - normally used for making V cuts and cutting across end grain.
* Cut with the edge - used for making planing cuts and beads.
* Cut with the short point - an alternative method of cutting beads.

## Spindle Gouge

The spindle gouge and its variant the detail gouge is used mainly for spindle turning, but also for detail work in faceplate turning and shallow bowl turning. The modern spindle gouge is usually made from a round bar of high speed steel that has a wide and shallow flute ground or milled into it. They are available in a variety of sizes up to about 1/2".
Some manufacturers make a detail gouge which is a spindle gouge with a shallower flute, more able to reach well beyond the toolrest.
Traditionally the spindle gouge was forged from a flat bar of carbon steel.
The spindle gouge looks similar to a bowl gouge and should not be confused. The flutes are not as deep and the steel is usually not as thick as a bowl gouge.
The spindle gouge has many applications:
* cutting coves in spindle work.
* cutting beads in both spindle work and face work.
* hollowing end-grain.
* making fine cuts in face work.
# Woodworking

Welcome to the Woodworking Wikibook, a collaborative textbook about cabinet making and joinery aimed at beginners to the trade. Here you will learn from 'first principles' with an emphasis on technique and improving your skills, not working with ready-dressed timber and shop-sharpened tools. It is vital that the beginner, tentatively embarking into this fascinating world, be led down a path that balances their desire to make beautiful furniture with a solid understanding of the fundamentals. Learning the fundamentals requires hard work and tedious repetition, which can quickly sap the enthusiasm of even the most experienced and dedicated woodworkers. The following of only the heart's desire, however, will almost certainly result in frustration and poor quality results as the learner tries to reach beyond his or her ability.
We endeavor to find the correct path in this book; acknowledging that the beginner's woodworking will often be curtailed by limitations concerning money, time, or space. Even with these restraints, he or she will likely still want to do the best work possible. If we fail to be clear, please feel free to edit or add the relevant text or images (or you can just leave a note on the talk page asking someone else to do it).

## Table of Contents

* Before you Begin - First thoughts / Introduction
* Setting up a home workshop — Acquiring the first tools, converting a garage or basement, and building a workbench are all covered in this chapter.
* Sharpening — Shaping, tuning, honing, and buffing of all woodworking edge tools.
* Essential Hand Tools — This chapter covers the basic hand tools found in most small woodworking shops.
* Tool and Workshop Maintenance — Once a space has been set up, and tools acquired, all must be looked after properly.
* Breaking down and dressing — Reducing rough-sawn timber to size, and cleaning it up to be ready for work.
* Joints:
** Mortice and tenon joints — How to cut mortices and tenons, including stopped, through, and other more complicated variations of this joint.
* …these chapters still to come (or you could help write them yourself!)…
* Glossary
* The Woodworkers Library — Books and resources that may be helpful

## Contributors

* Sam Wilson
* Dbr4good
* SBJohnny
* Swgeeknm
* …add yourself here if you've contributed to this book.
# Woodworking/Before you Begin

If you ask a woodworker what his or her most valuable tool is they might pull out this special hand plane or perhaps smile fondly and lay a hand on the wonderful workbench that they built or own. In reality, the most valuable woodworking tool that you will ever possess is between your ears. An old woodworking adage says "Measure twice, and cut once". A more correct version of that adage would be, perhaps, "THINK, then measure twice, and cut once".
As you begin, safety is paramount, as you will (hopefully) be working with ultimately sharp implements in an environment and at a craft that has never been "safe". The next order of business is not to reinvent the wheel. Many people have journeyed where you are about to go. Whether they be out of the mists of time, (Moxon, Roubo, et al) or authors from the latest woodworking magazine, the advice of those who have gone before can invaluable. Use all of the resources at your disposal. If you have access to the Internet, search it diligently, as there are many resources there (there are many books on hand tool woodworking, for example, which were published near or before the turn of the 20th century, which are available in the public domain through the Internet in PDF form). Web sites such as instructables.com and youtube.com can be invaluable, but watch judicially, as not everything on such sites is correct or advisable. Another Internet resource that can be very helpful, and connect you to those around the world who are similarly interested is Facebook.com, specifically facebook groups.
# Woodworking/Breaking down and dressing

Timber for woodworking can be bought either 'dressed' (when it has already been sawn or 'broken down' to the desired width and thickness, and planed smooth) or 'rough' (when it is in the same state as when it left the sawmill, and either green or seasoned). It is quicker to begin woodworking projects with the former, but the latter is cheaper.
This chapter deals with the processes of taking rough, seasoned timber and sawing it to the required dimensions (width and thickness only), and then planing it smooth enough to begin the main woodworking tasks (cutting joints etc.).

## Breaking down

Purchasing timber in its rough-sawn state can be more confusing for a beginner, because the nature of the grain and quality of the wood can be somewhat concealed.
[TBA]

## Dressing

The next stage is to dress the ripped pieces. This is done with a scrub plane.
[TBA]
# Woodworking/Essential Hand Tools

While there probably isn't any truly "typical hobbyist woodworker", there are a number of tools that serve key roles in working with wood. While collecting tools over time, many woodworkers "make do" with a tool until they are fortunate enough to acquire a speciality tool for a given task.
A significant distinction should be noted at this point that, for some, the use of power tools is not considered because of their intention of relying exclusively on hand tools rather than taking advantage of common power tools such as a circular saw or electric drill. This author is not in that camp but has great respect for those that are able to adhere to such stringent standards. While it is personal decision as to whether or not one will use power tools, the time, effort, and skill needed to abstain from the modern convenience of electricity have never been in enough abundance for me to adopt such a vow of abstinence.
Collecting tools is absolutely a lifelong process though one usually doesn't realize that until many years of experience. Most woodworkers will go through phases of gathering as well as divesting themselves of various tools. In my case, my father gave me some basic auto repair tools when I graduated from high school and, while I still have some of that same set, many of those tools are long gone; either broken, loaned out never to be seen again, or lost in the tall grass where my kids took them out to play. It is, at times, a blessing to be forced to replace a tool.
The start of my collection included a number of screw drivers, a hammer, some wrenches, a ratchet set, pliers, and vice grips. For many years these served the sordid tasks of a young family man. My lack of both financial resources and experience forced me to be creative in the application of these basic tools. I still remember going to the store and finally noticing that there were different sizes of screw drivers than I had realized. And my lust for tools was born.

## Hammers

Claw Hammer
Wood Mallet

## Screw Drivers

Slotted, commonly referred to as Flat or Straight Head
Phillips Head
Square Drive
Torx Head

## Drills, Bits and Augers

The most commonly used drill bits by carpenters are:
1) TWIST DRILL: A twist drill is used to bore holes for dowels. It bores a long clean hole.
2) CENTER BIT: A center bit is used to bore shallow holes. It is usually used to make up diameters of hole up to 50mm.
3) COUNTER SUNK BIT: A counter sunk bit is used for boring conical holes. It is used to facilitate easy receiving of screw heads.
4) AUGER BIT: An auger bit is used to bore holes in logs. Auger bits are available in sizes ranging from 6mm to 25mm.
# Woodturning/Safety

The process of woodturning is not without its dangers. Some are fairly obvious, some less so. Some may result in short term minor injuries, some may be much more serious, and others may cause long-term health problems that may not be apparent for many years.
The purpose of this chapter is to highlight these dangers and make recommendations to minimize or remove the risk. Ultimately, safety is the individual's responsibility and will depend largely on both their knowledge and attitude. If in doubt seek proper training or advice.
* As with any rotating machinery, the operator must take care not to let their clothing, hair or jewelry get caught by the machine or wood.
* Work pieces must be securely attached to the lathe before turning it on.
* Make sure that the workpiece can be fully rotated without hitting the lathe bed, toolrest, banjo or other objects around the lathe.
* Workpieces must be of sound material that will not break while being shaped. Wearing a face mask is recommended.
* Tools must be supported by the toolrest before contacting the wood.
* Beware of turning wood which is not perfectly round. Irregular edges turn to a nearly invisible blur when spinning. Examples include work not yet roughed down to a round, or natural edge. Some chucks may pose a similar hazard.
* Wood dust of any type can cause problems with the respiratory system, skin or eyes. Some woods are toxic and present even worse hazards. Dust extraction and dust masks or respirators are recommended.
* Many finishes use solvents that are dangerous, either through skin contact or inhalation of fumes.
* Many finishes cure by polymerisation which is an exothermic chemical reaction. Rags used for applying these finishes should be disposed of so they cannot spontaneously combust and cause a fire.