OpenLLM-France/wikimedia huggingface dataset:
# Vedic Mathematics/Sutras/Shunyam Saamyasamuccaye

Shunyam shutra explains various methods for getting our answer for the value of "x" in an linear equation.
The shutra simmply says that if there is a common term in the equation and the sum of the equation is 0 then the common term can be equated to 0.
Method:1
2x+4x-12x+16x=0
Here we can see that we have a common term x in all the terms So we can take out x and equate it to 0. Because according to the shutra it implies that when the sum is same the sum is zero.
Or i.e. that we have to take out the common term out and equate it to zero and we will get our answer in one go.
For another eg.
7(x+1) =8 (x+1) We have to find x so what to do?? If we use standard method it will take time We will expand each side and solve
But from this shutra the common term is (x+1) both side so we can equate (x+1) to 0 and our ans is -1.
We can also solve complex questions by applying the same
# Vedic Mathematics/Sutras/Nikhilam Navatashcaramam Dashatah

Nikhilam Sutra stipulates subtraction of a number from the nearest power of 10 ie 10, 100, 1000, etc. The powers of 10 from which the difference is calculated is called the Base. These numbers are considered to be references to find out whether given number is less or more than the Base.
If the given number is 104, the nearest power of 10 is 100 and is the base. Hence the difference between the base and the number is 4, which is Positive and it is called NIKHILAM. The value of Nikhilam may be reference base, the Nikhilam of 87 is -13 and that of 113 is +13 respectively.
Nikhilam Sutra in Vedic Mathematics can be used as shortcuts to multiply numbers, divide numbers in faster approach. In English it is translated as All from 9 and last from 10. i.e. subtract last digit from 10 and rest of digits from 9.
Multiplication using Nikhilam Sutra is used when numbers are closer to power of 10 i.e. 10, 100, 1000, etc.

## Case 1

Digits of multiplicand and multiplier (number with 9’s) are same.
Columns of answer:
* 1st column: 1 less of multiplicand
* 2nd column: complement of above column or (Multiplier – previous column).

## Case 2

Multiplier (number with 9’s) has digits less than multiplicand.
Columns of answer:
* 1st Column: If multiplicand starts with 1, subtract 2 from it. If multiplicand starts with 2, subtract 3 from it and so on.
* 2nd Column: Take compliment of last digit of multiplicand.

## Case 3

Multiplier (number with 9’s) has digits more than multiplicand.
Columns of answer:
* 1st Column: 1 less than Multiplicand
* 2nd column: all 9’s
* 3rd Column: 10’s compliment of multiplicand or (9’s complement of 1st columns). column: all 9’s
* ↑ For more Vedic Mathematics Multiplication Sutras (Nikhilam Navatashcaramam Dashatah). "vedic Maths tricks". 2023.
# Vedic Mathematics/Sutras/Paraavartya Yojayet

This is used to find square of no. Nearest 10,100,1000
103 × 103 or 103^2 (^ means raised to the power, here ^2 means that this no. is squared) = (103+3)×(103-3)+(3^2) = 10609
# Vedic Mathematics/Sutras/(Anurupye) Shunyamanyat

The Sutra Anurupye Sunyamanyat says : 'If one is in ratio, the other one is zero'. We use this Sutra in solving a special type of simultaneous simple equations in which the coefficients of 'one' variable are in the same ratio to each other as the independent terms are to each other. In such a context the Sutra says the 'other' variable is zero from which we get two simple equations in the first variable (already considered) and of course give the same value for the variable.
Example 1: 3x + 7y = 2; 4x + 21y = 6;
Observe that the y-coefficients are in the ratio 7 : 21 i.e., 1 : 3, which is same as the ratio of independent terms i.e., 2 : 6 i.e., 1 : 3.
Hence the other variable x = 0 and 7y = 2 or 21y = 6 gives y = 2 / 7.
The very appearance of the problem is frightening. But just an observation and Anurupye Sunyamanyat gives us the solution
# Vedic Mathematics/Techniques/Division

Vedic Mathematics :
| Previous: Multiplication | Division | Next: Why Does It Work? |

## Introduction

Vedic Mathematics :
| Previous: Multiplication | Division | Next: Why Does It Work? |
# Solitaire card games/Fortune's Favor

* First, the four aces are removed from the deck and placed in a row to form the bases of the foundations. These foundations are built up by suit to kings.
* Below the foundations, two rows of six cards each (or any preferred arrangement of twelve cards) are dealt. These form the bases of the twelve tableau piles. *The top cards on the tableau piles are available for building on the foundations and on the tableau. Building in the tableau is down by suit and spaces which result in moving a card are filled from the wastepile or, if there is none, the stock. Only one card can be moved at a time.
# Solitaire card games/Gaps

The object of this game is to build the 2s up to kings.

## Rules

The cards are dealt into four rows of thirteen. The aces are removed and discarded from further play. The gaps that they leave behind are filled by cards that are the same suit and a rank higher than the card on the left of the gap. (For example, 4♣ can be placed beside 3♣.) However, any gap at the right of a King is considered dead and no card can fill it.
Any gap on the left hand side of the row should be placed by a deuce and the row should be built up by suit beside the deuce (i. e. 2-3-4-5, etc.). It is the discretion of the player on which suit would occupy which row.
When there are no more possible moves, the round is over. The cards that are not in order are gathered, making sure to leave any suit sequence (e.g., ♥2-3-4-5) behind. In Montana and Spaces, the cards are then shuffled; in Gaps, they are not. The cards are then redealt, making sure there is a gap in each row at the immediate right of each suit sequence or at the extreme left of the row if no suit sequence is formed in that row. There are only three rounds in the usual rules. But some variants allow four, and some have no limit.
The game is won when all 48 cards are arranged in numerical order and in suits, with the gaps of each row beside the Kings at the extreme right hand of the row. The probability of winning depends on which rules are followed. In Spaces, where the cards are shuffled after each round and the rounds are limited to three, an experienced player will win perhaps one game in 20. In Gaps (cards are not shuffled, but the limit of three rounds remains), one win in seven games may be expected. If the number of rounds is not limited, winning is just a matter of time, whether the cards are shuffled or not.

## Variants

There are some variants of this game.
One variant is called Addiction Solitare, a game developed by GameHouse for Yahoo! Games. This game is played exactly as Gaps except that there are three reshuffles rather than the standard two and the aces can be used in each reshuffle and redeal to create any gaps.
There is also a variant with two decks, sometimes called Double Montana or Big Paganini. The cards are dealt in eight rows of 13 cards each. Aces are removed and placed at the left of each row. In some sub-variants, two redeals are allowed, in others, there are no redeals.

## Tips & Strategy

Look for a move you want to make, then decide how you will make it happen. Do not get blocked by a King.
# Solitaire card games/Free Cell
## Construction and layout

* One standard 52-card deck is used.
* There are four open cells and four open foundations. Some alternate rules use between one to ten cells.
* Cards are dealt face-up into eight cascades, four of which comprise seven cards and four of which comprise six. Some alternate rules will use between four to ten cascades.

## Building during play

* The top card of each cascade begins a tableau
* Tableaux must be built down by alternating colors.
* Foundations are built up by suit.

## Moves

* Any cell card or top card of any cascade may be moved to build on a tableau, or moved to an empty cell, an empty cascade, or its foundation.
* Complete or partial tableaus may be moved to build on existing tableaus, or moved to empty cascades, by recursively placing and removing cards through intermediate locations. Computer implementations often show this motion, but players using physical decks typically move the tableau at once.

## Victory

* The game is won after all cards are moved to their foundation piles.

## Variations

* Seahaven Towers Building on the tableau is done in suit and there are ten columns of five cards
# Solitaire card games/Gay Gordons

Ten piles of five are dealt face up, with two reserve cards also face up. In both the top card is in play and the piles cannot be refilled or built on. Empty piles cannot be refilled. The aim of the game is to remove all cards by making pairs that add up to eleven (suits are not important). Kings pair with queens, jacks with other jacks, and aces with tens.
# Solitaire card games/Golf
## Setup

From a standard 52-card deck, 7 columns of 5 cards each are dealt, all face up. This is the tableau. One additional card is dealt as the base of the foundation. The remaining 16 cards are turned face down to form the stock.

## Play

Rules are as follows:
* Only the topmost card in each column (closest to the player) may be removed from the tableau. When it is removed, the card beneath becomes available for play.
* Cards may be moved from the tableau to the foundation if they are either one rank higher or one rank lower than the top card of the foundation, regardless of suit, but nothing may be played on top of a King.
* Cards rank A 2 3 4 5 6 7 8 9 10 J Q K. There is no "wrapping" (Ace on a King, or King on an Ace) in golf.
* Whenever there are no possible plays, turn cards up one at a time from the stock to the foundation and resume playing cards from the tableau when possible.
* There is no redeal. The game is over when the stock is exhausted and no more moves are available.

## Scoring

Player scores one point for each card remaining in the tableau after the stock has run out. If the tableau is cleared, player scores a negative point for every card left in the stock. Game is nine "holes" (deals) and a score of 45 or lower is considered par, with a score of zero or lower being perfect.

## Impossible Win

If a tableau is dealt that would make it impossible for the player to clear all of the cards (if all queens are covered by kings for example), then the cards may be reshuffled and redealt.

## Variations

Common variations on these rules include:
* Queens may be played on top of Kings.
* Turning the corner is permitted so that a King can be played on top of an Ace, and vice versa.
* Multiple decks may be used to create larger tableaus.
* One or both of the Jokers may be added to the deck and used as wild cards that represent any value.
# Solitaire card games/Fourteen

As this game involves carrying off cards with a fixed sum, it belongs to the same family of games as Pyramid.

## Method of Play

The cards are dealt face up into twelve columns, from left to right. The first four columns therefore receive an extra card. The exposed top cards of each column are available for play.
As denoted by the game's name, the object is to discard pairs of cards that total fourteen. Jacks value eleven, queens twelve, and kings thirteen, all others (including the ace) at face value. So the combination of cards to be discarded are as follows:
* King and Ace
* Queen and 2
* Jack and 3
* 10 and 4
* 9 and 5
* 8 and 6
* 7 and 7
Once a card has been discarded, the card under it becomes available. The game is won when all cards are discarded.

## Strategy

Strategy of Fourteen Out involves identifying pairs that cannot be matched because of their position, and preemptively selecting other eligible matches. Potential difficulties arise when pairs are found in the same pile, or when two different matches are in potentially mutually blocking positions.

## Variants

Columns may be stacked rather than cascaded, thus obscuring not-yet-active cards. This results in considerably more blind play.

## References

* ↑ Moorehead, Albert H.; Geoffrey Mott-Smith (1977). The Complete Book of Solitaire and Patience Games. New York: Bantam Books. ISBN 0-553-26240-8.
# Solitaire card games/Four Seasons
## Setup and play

First, five cards are dealt in form of a cross: three cards are placed in a row, then two cards are each placed above and below the middle of the three cards. A sixth card is dealt in the upper left corner of the cross. This card will be the base for the first of four foundations. The three cards of the same rank are placed in the other three corners of the cross to become the foundations themselves.
* The foundations are built up in suit and building is round-the-corner, i.e. aces are placed above kings, except when aces are the foundation bases.
Cards in the cross are built down regardless of suit and any space in the cross is filled with any available card, whether it is the top card of a pile within the cross, the top card of the wastepile, or a card from the stock. Like the foundations, building in the cross is round-the-corner, i.e. kings are placed over aces, unless aces are the foundations. Only one card can be moved at a time.
* Whenever the game goes on a standstill, the stock is dealt one card at a time into the wastepile, the top card of which is available for play on the cross or on the foundations. There is no redeal.
* The game ends if a standstill occurs after the stock has run out. The game is won when all cards end up in the foundations.

## Variations

Below are the variations of Four Seasons:
* In Czarina, any space in the cross is immediately filled only from the stock.
* In Corners, the cross is in fact a reserve, not a tableau, and each space is a cell, which should have room for only one card. Empty cells in this game are filled immediately from the stock.
* Simplicity is played like Four Seasons. The only exception is that the tableau (instead of a cross) contains twelve cards dealt into two rows of six. The thirteenth card dealt becomes the base of the first formation. Also, building in the tableau is down by alternating colors.
# Solitaire card games/Frustration

This game relies purely on luck rather than on skill, similar to but opposite of Hit or Miss. As in the latter game, the player deals the cards, and says "ace" when drawing the first card, "two" for the second, then "three, four... nine, ten, jack, queen, king" then starts again with "ace." If the rank of a dealt card matches the rank uttered by the player while dealing it, the game is lost; the game is won if the sequence is successfully repeated four times (and the entire deck is thus dealt out) without any word/card matches causing a loss.

## Interesting Facts

The game has been the subject of several mathematical studies; the odds of winning are approximately 1.6%.

## Notes

* ↑ http://arxiv.org/pdf/math/0703900.pdf
* ↑ https://www.dartmouth.edu/~chance/chance_news/recent_news/chance_news_3.12.html#hat check problem
* ↑ http://www.chegg.com/homework-help/questions-and-answers/game-frustration-solitaire-played-turning-cards-ofa-randomly-shuffled-deck-52-playing-card-q245423
# Solitaire card games/Gate

First, two columns of five cards are dealt face up. These act as the reserve or "gate posts." Then, between these columns, two rows of four cards are dealt, again face-up. These compose the "rails" or the tableau. The spaces for the foundations are allotted over the first row of cards.
The object of the game, like many solitaire games, is to find the aces, place then onto the foundations, and build each of them up by suit to kings.
The cards in the rails are available for play, to be placed on the foundations or onto other cards in the rail. The cards in the rails are built down by alternating color (a card with a red suit over a one with a black suit, and vice versa). Spaces in the rails are filled using cards from the gate posts. If the cards in the gate posts are used up, the top card of the wastepile, or the next card in the stock if there is no wastepile, can be used to fill spaces. The gate posts are never replenished.
Generally, one card can be moved at a time. The most prevalent rule regarding moves of sequences is that sequences can be moved as a whole. However, there is a rule set which does not allow moving groups of cards, effectively making the game harder (mentioned in Card Games Made Easy by Marks and Harrod, ISBN 1-899606-17-3).
The stock can be dealt one card at a time to a wastepile. The top card of which is available for play, either to placed in on the foundations or on the rails, or to fill a gap on the rails. However, once the stock runs out, there are no redeals.
The game ends soon after the stock runs out. The game is won when all cards are played to the foundations.
# Solitaire card games/Grandfather's Clock

Its foundation is akin to Clock Solitaire; but while winning the latter depends on the luck of the draw, this game has a strategic side.
Before the game begins, the following cards are taken out of the deck: 2♥, 3♠, 4♦, 5♣, 6♥, 7♠, 8♦, 9♣, 10♥, J♠, Q♦, and K♣. They are then arranged in a circular fashion like a clock face with the 2♥ on the "five o' clock" position, 3♠ on the "six o' clock" position, and so on. These cards will be the foundations. The remaining cards are then shuffled and dealt into eight columns of five cards each on the tableau.
The object of the game is to distribute the cards to the foundations to point that the top cards of the foundations show the correct numbers on the clock face. (A queen is equal to twelve, a jack eleven.)
Each foundation should be built up by suit until the card with the correct corresponding number on the clock face is placed. The cards on the tableau on the other hand are built down regardless of suit. The top cards of each column are the only ones available for play. Only one card can be played at a time and any space that occurs is filled with any available card.
The game ends either with all cards are put into the foundations with the clock face showing the correct numbers, or when there is a situation in the tableau that allows no more moves.
# WebObjects/Database Compatibility and Comparisons/Postgresql

Yes, PostgreSQL does work with WebObjects. The best place to start is the Project WONDER PostgresqlPlugin Page.
If you're on a Mac, Apple has an article on installing PostgreSQL on Mac OS X that is pretty straightforward.
If you're interested in a nice graphical interface to managing your PostgreSQL installation, you may want to checkout out Navicat PostgreSQL from Navicat.
# WebObjects/Development Tools/Eclipse and WOlips

Eclipse is an open-source, cross-platform development environment developed by IBM in Java and designed around the concepts of plugins and extensions. This fundamental architecture allows any number of additions to the core application to be integrated throughout the entire environment. Some of the major complaints about Java applications are that their user interfaces are slow and neither look nor feel like other native apps. IBM, as part of the Eclipse project, addressed this complaint by developing SWT (Standard Widget Toolkit) as an alternative to both Swing and AWT. SWT is more closely related to AWT in that it is designed around the concept of native widgets. However, there are two major design differences. The first is that AWT was designed for the lowest common denominator, which means that there are a large number of widgets missing from the framework that many people expect in a modern user interface (trees, tables, etc). Secondly, SWT is designed on a principal that native resources (like colors and fonts) can not be efficiently handled by the standard Java GC mechanism, and thus requires that these resources be managed in a more traditional claim-and-dispose manner. The end result is that Eclipse's user interface is generally accepted as being much faster than traditional Java user interfaces.
WOLips is a set of open-source Eclipse plugins that are designed to make the development, debugging, and deployment of WebObjects applications easier. Because it is built on top of the Eclipse platform, all the standard productivity-enhancing features of Eclipse are available -- extensive code completion, context-aware refactoring, incremental compiling, hot code replacement, local and remote revisioning, and many other capabilities that make Eclipse the leading development environment for Java. Additionally, WOLips provides many extensions to the core platform, including plugins for:
* Building, Launching, Debugging, and Deploying WO Applications and Frameworks
* A syntax-colored HTML and CSS editor with code completion based on the Eclipse Web Tools Project
* A form-based .API file editor
* A .WOD file editor with syntax coloring, code completion, and error-checking (based on component bindings, API files, class path, and HTML template definitions)
* Incremental compilers for .xcode, .xcodeproj, and PB.project files for backwards compatibility with Apple WO tools (like EOModeler and WOBuilder)
* WO Application, WO Component, and WO Framework wizards
* .. and much more
For more information on WOLips, you can visit the WOLips Wiki, or subscribe to the woproject-dev Mailing List.
For a quick tutorial on installing WOLips, take a look at The WOLips Installation Tutorial.
# WebObjects/Database Compatibility and Comparisons/OpenBase
### Performance

http://www.codefab.com/wordpress/index.php/2006/02/11/webobjectseof-patch-better-way-to-limit-fetches-with-openbase/

### Deadlocks

When writing high volumes of data over multiple tables from a WebObjects system, it is possible to create a deadlock. OpenBase resolves the deadlock condition by aborting one of the transactions and returning an error to the WebObjects application.
A possible solution to this problem is to identify the tables to write to immediately after opening a transaction. The necessary SQL would look something like this.
Supplied with LEWOStuff (http://www.lindesay.co.nz/) is a framework called JavaOPENBASEJDBCAdaptor. This framework is able to place these locks after each EOF generated transaction is started in order to prevent deadlocks from occurring. You need to copy the framework build product into your local library folder. Under MacOS-X this would be...
You then need to add this framework to the Frameworks grouping within your X-Code WO project. In your WebObjects "Application" subclass constructor, insert some code of the following form to get this adaptor to work with your model.
This code will locate the framework for the adaptor, load the adaptor as well as set the adaptor in the model. If you are using SQL logging from EOF, the WRITE TABLE... clauses will be written to the log as well.
There is no need to include the LEWOStuff framework in your project if you are going to use this one.
# WebObjects/Development Tools/Xcode

Finding deprecated API in Xcode
When you compile and Xcode tells you to use the -deprecation flag to see details:
Select Project/Set Active Target/Application Server Then select Project/Edit Active Target "Application Server" On the left hand side of the Target information window you'll see Java compiler settings under the "Settings/Simple View". Select it. Under Java Compiler Settings you'll see a check box for "Show usage of deprecated API". Checking this box will give you details in the build panel of what API has been deprecated in your code.
XCode is deprecated for WebObjects development. The preferred development tools for WebObjects are Eclipse and the WOLips plugins
# WebObjects/Database Compatibility and Comparisons/Oracle

Since WebObjects make use of JDBC to connect to the Oracle server, it is fully compliant with Oracle 9i and 10g (and 8i for the most).
Last year (2005), a quite huge WebObjects deployment (40 XServes) has been demoed in combination with Oracle 10g RAC (Real Application Cluster). Press release: http://www.oracle.com/global/eu/pressreleases/10gonmac.html
What was interesting is that the standard WebObjects deployment is clustered-like, and so is 10g in its RAC version. The performances and the load-handling were quite impressive.
PS: Would you like more info on WebObjects + 10g RAC, you are more than welcome to drop a question at http://www.intelli-core.com. Probably, your Oracle rep will welcome you, too ;-)