OpenLLM-France/wikimedia huggingface dataset:
# WebObjects/Web Applications/Development/Audit Trails
#### Pierce T. Wetter III

This gets discussed a lot, so there's plenty of examples around. For instance, here's an implementation by someone else I found via Google: http://web.archive.org/20050215013412/homepage.mac.com/i_love_my/code.html
However, unless you're insane enough to need to log every change to every object, the concept of an "audit trail" ends up being application specific in many cases. If you can simplify the requirements at all, do so. For instance, at www.marketocracy.com, we never "delete" a fund, we just mark it deleted. Similarly in forums, we don't "delete" forum posts we don't want to show, we "hide" them.
Funds we can't delete because they are cross linked to too many objects, but forum posts I purposely setup to not be deleted because I knew the day would come when someone went "oops" (and they did). So those tables have a flag, and the relationship is defined such that it ignores the "deleted" objects.
For "forecasting and recall" on www.marketocracy.com we record every trade already, so it was fairly easy in the business logic to add methods so that you could "time travel" to any point in time. That is, a trade adds shares to your account while subtracting from your cash (or the reverse). So shares on any position at any point in time is sum(trade.shares where date < desired time). So we've been able to avoid the need for an audit trail, because we already have an "accounting model" in that every operation is recorded as a transaction. In fact if I had to do Marketocracy over again, I might implement it as a double-entry bookkeeping system instead.
If I was going to log every change to every object, some typical hints are that if you subclass EOEditingContext, then prior to any saveChanges operation you can get a list of the inserted/deleted/changed objects (you have to call processRecentChanges first). If I was designing this, I'd make all my EOF objects have a common superclass/interface that implemented something like:
Then on a class-by-class basis I could decide what to do. That could include inserting additional objects, etc. Like an object could compare itself to its snapshot if it had changed and it could record the old and new values to a generic object that stored AuditTrail(class name, primary key of object, username, timestamp, attribute, old value (string), new value(string)).
In psuedo code:
# WebObjects/Web Applications/Deployment/WOStats
#### Chuck Hill

There is a typo in WebObjects 5.3 that prevents the login from being displayed. To fix:
sudo emacs /System/Library/Frameworks/JavaWOExtensions.framework/Resources/WOStatsPage.wo/WOStatsPage.html
Edit this line:
to read
(it is a case issue).
Also, don't forget to set a password when launching, e.g.
If you don't do this there is no password and access is disabled entirely.
# Structural Biochemistry/Proteins/Protein Studies

Protein studies involves various step of sample preparation. The main protocols of protein studies are as followed:
* Protein Synthesis
* Purification
* Evaluation of purified protein
* Determination of Amino Acid Sequence
* Calculation of Protein's Mass
* Determination of Protein's 3-D Structure
There are many methods used to study proteins, including its shape and structure. For instance, X-Ray crystallography is used to give scientists the structure of the protein. Such information is used extensively in determining the characteristics of the protein as well as how it functions and under which circumstances. Other methods used includes amino acid sequencing, fluorescence microscopy, mass spectrometry, NMR, etc.

# Carbohydrate-Binding Proteins

Carbohydrate-Binding proteins (CBPs) are identified as important mediators for numerous different types of cellular events through interactions between carbohydrates and proteins. There are three main families of CBPs.
* the C-type lectin family (including the Selectins)
* the Siglec family
* the galectin family

## C-type Lectins (including Selectins)

C-type Lectins and selectins are present in humans and murines (household rats and mice). Roles of these specific CBPs include
* promoting primary immune response
* mediating leukocyte trafficking to sites of inflammation
* mediating lymphocyte recirculation
* mediating platelet binding to neutrophils

### Clinical Use of Lectins

Pure forms of lectins are used for blood typing. Specifically, lectins are used to identify some glycolipids and glycoproteins on an individual's red blood cells. In the brain, PHA-L, a lectin from a kidney bean, helps to trace the path of efferent axons through the anterograde labeling method.

## Siglecs

Siglecs occur mostly in humans, but some are also found in murines. Some of the primary roles of these CBPs are:
* regulator in B cell activation
* maintenance of myelin
* inhibitor of axonal growth

## Galectins

Galectins are also found in humans, mice, and rats as well. These CBPs are abundant in most organs such as muscles, hearts, lung, liver, lymph nodes, thymus, and colon, stomach epithelial cells, gastrointestimal, erythrocytes, skin, brain, Hodgkin's lymphoma, kidney, and lens. Roles include:
* acting as a marker for cell recognition
* binding specificity

# References

http://web.mit.edu/glycomics/consortium/organization/program/program1.pdf
# Trigonometry/Exercise: A Puzzle Triangle

* What is wrong with the above figure?
* What is the area of each triangular piece, and what is the area of the whole triangle?
* Are both diagrams using the same pieces?
* What are the lengths of the hypotenuses of the two smaller triangles and of the whole large puzzle triangle(s)? (Use the Pythagorean Theorem)
* How would you explain to someone else what is going on?
This puzzle is telling us something important about proof.
The first proof of the Pythagorean Theorem is OK, but it turns out that to really check that diagrammatic proof properly you need to have first proved that the angles of a triangle add to 180 degrees. That will be our next proof.
| previous module: "Proof: Pythagorean Theorem" | • Table of Contents | next module: "Conventions" |
# Trigonometry/Exercise: Congruent Triangles

* In The diagram above, how many triangles are there?
* Count The Triangles (With Labels)
* Label the vertices as shown in the diagram on the right.
* Now list the triangles using the letters at the corners, for example $\triangle ADE$ is a triangle. The symbol '$\triangle$' before the $\displaystyle ADE$ is just read as 'triangle'. You should put the symbol before the triangles you list, so your list might start:
* $\displaystyle \triangle ACE,\triangle ADE,$
* Now, which of the triangles you have listed are congruent to each other?
* Which of the triangles you have listed are similar to each other but are not congruent?
* Do any of the triangles have an obtuse angle (an angle greater than 90 degrees)?
| previous module: "Angles of a triangle sum to 180 Degrees" | • Table of Contents | next module: "Exercise: Chasing Angles" |
# Trigonometry/For Enthusiasts/Degrees Minutes and Seconds
## Vocabulary

| 1. | Explain the term coterminal. |
| 2. | What are complementary angles? |
| 3. | What are supplementary angles? |

## Angle Addition

In the following problems, find the sum $A+B$ and the difference $A-B$ of the two given angles.
| 4. | $A=38^{\circ }15^{\prime }$ | $B=17^{\circ }5^{\prime }$ |
| 5. | $A=98^{\circ }41^{\prime }42^{\prime \prime }$ | $B=50^{\circ }25^{\prime }55^{\prime \prime }$ |
| 6. | $A=150^{\circ }2^{\prime }1^{\prime \prime }$ | $B=266^{\circ }44^{\prime }9^{\prime \prime }$ |
| 7. | $A=-18^{\circ }11^{\prime }19^{\prime \prime }$ | $B=38^{\circ }17^{\prime }17^{\prime \prime }$ |
| 8. | $A=138.7222^{\circ }$ | $B=21.9111^{\circ }$ |
| 9. | $A=335.8500^{\circ }$ | $B=-34.9500^{\circ }$ |
| 10. | $A=-48.8^{\circ }$ | $B=336.4556^{\circ }$ |
| 11. | $A=-17.6056^{\circ }$ | $B=-87.2694^{\circ }$ |

## Convert To Decimal

In the following problems convert the given angle in degrees, minutes, seconds to decimal degrees.
| 12. | $38^{\circ }15^{\prime }$ |
| 13. | $-71^{\circ }22^{\prime }43^{\prime \prime }$ |
| 14. | $428^{\circ }0^{\prime }18^{\prime \prime }$ |
| 15. | $180^{\circ }17^{\prime }38^{\prime \prime }$ |

## Convert To Degree-Minutes-Seconds

In the following problems convert the given angle in decimal degrees to an angle in degrees, minutes, seconds.
| 16. | $279.6938^{\circ }$ |
| 17. | $-23.3040^{\circ }$ |
| 18. | $167.0030^{\circ }$ |
| 19. | $316.2575^{\circ }$ |

## Draw The Angle

On paper, draw the following angle. If the angle is negative or larger than $360^{\circ }$, convert it to an angle between $0^{\circ }$ and $360^{\circ }$.
| 20. | $72^{\circ }$ |
| 21. | $400^{\circ }$ |
| 22. | $-42^{\circ }$ |
| 23. | $-395^{\circ }$ |
On graph paper plot the following points and measure the angle with a protractor.
| 24. | $\left(7,2\right)$ |
| 25. | $\left(-5,7\right)$ |
| 26. | $\left(-2,-8\right)$ |
| 27. | $\left(1,-5\right)$ |

## Real World

| 28. | During an orienteering competition, you are headed in a compass direction of $38^{\circ }29^{\prime }$. |
| | You find that you need to head in the direction of $298^{\circ }4^{\prime }$. |
| | How far must you change your course in order to travel in the new direction. |
| 29. | Tuning the engine of your early model Chevy Camaro, you find the sparkplug fires at $1^{\circ }$ |
| | after the flywheel reaches the top position. You want the sparkplug to fire at $5^{\circ }$ |
| | before it reaches the top. How many degrees must you adjust the timing so that it fires correctly? |
| 30. | If your bicycle wheel spins around twice, how many degrees has it rotated? |
| 31. | A radar antenna rotates twice each minute. How many degrees will it rotate in an hour and a half? |
# Trigonometry/Derivative of Sine

To find the derivative of sin(θ).
    ${\frac {d}{dx}}{\bigl\sin(x){\bigr ]}=\lim _{h\to 0}{\frac {\sin(x+h)-\sin(x)}{h}}=\lim _{h\to 0}{\frac {2\cos {\biglx+{\frac {h}{2}}{\bigr )}\sin {\bigl{\frac {h}{2}}{\bigr )}}{h}}=\lim _{h\to 0}\left[\cos {\biglx+{\tfrac {h}{2}}{\bigr )}{\frac {\sin {\bigl{\frac {h}{2}}{\bigr )}}{\frac {h}{2}}}\right]$ .
Clearly, the limit of the first term is $\cos(x)$ since $\cos(x)$ is a continuous function. Write $k={\frac {h}{2}}$ ; the second term is then
    ${\frac {\sin(k)}{k}}$ .
Which we proved earlier tends to 1 as $k\to 0$ .
And since
    $k\to 0{\text{ as }}h\to 0$ ,
the limit of the second term is 1 too. Thus
    ${\frac {d}{dx}}{\bigl\sin(x){\bigr ]}=\cos(x)$ .
# Trigonometry/Exercise: Chasing Angles
### Video Links

The Khan Academy has video material that walks through two very similar exercises to these, which you may find easier to follow:
* The Angle Game

## The Angle Game 1

* Worked Example 1: Missing Angle
* In the diagram above, the two lines marked with arrows are parallel. You are given the angle of 56$^o$ and of 115$^o$. Find the angle x.
* The angle $\displaystyle \alpha$ is the same as the 56$^o$ angle, since the two lines marked with arrows are parallel and the line that crosses them must cross parallel lines at the same angle.
* The angle $\displaystyle \beta$ is 180$^o$-115$^o$ since it and the 115$^o$ angle add up to a straight line. So it is 65$^o$.
* We can now redraw the diagram with the angles as follows:
* We have a triangle with angles x, 56$^o$ and 65$^o$.
* x+56$^o$+65$^o$=180$^o$.
* x+121$^o$=180$^o$.
* x=59$^o$.

## The Angle Game 2

* Worked Example 2: Missing Angle in a Star
* In the diagram above two angles are marked as 75$^o$ and one as 101$^o$. Find the angle c.
* There is an isosceles triangle with angles 75$^o$, 75$^o$ and an unknown angle b. So
* b+75$^o$+75$^o$=180$^o$.
* b+150$^o$=180$^o$.
* b=30$^o$.
* $\displaystyle \angle BAC=101^{\circ }$
* The angle 'c' is an angle in triangle $\displaystyle \Delta ABC$. The other two angles are 30$^o$ and 101$^o$.
* c+30$^o$+101$^o$=180$^o$.
* c+131$^o$=180$^o$.
* c= 49$^o$.
| previous module: "Exercise: Congruent Triangles" | • Table of Contents | next module: "The Pythagorean Theorem" |
# Trigonometry/For Enthusiasts/A Generalization of Pythagoras' Theorem
## Arbitrary triangle

At any selected angle of a general triangle of sides a, b, c, inscribe an isosceles triangle such that the equal angles at its base θ are the same as the selected angle. Suppose the selected angle θ is opposite the side labeled c. Inscribing the isosceles triangle forms triangle ABD with angle θ opposite side a and with side r along c. A second triangle is formed with angle θ opposite side b and a side with length s along c, as shown in the figure. Tâbit ibn Qorra stated that the sides of the three triangles were related as:
    $a^{2}+b^{2}=c(r+s)\ .$
As the angle θ approaches π/2, the base of the isosceles triangle narrows, and lengths r and s overlap less and less. When θ = π/2, ADB becomes a right triangle, r + s = c, and the original Pythagoras' theorem is regained.
One proof observes that triangle ABC has the same angles as triangle ABD, but in opposite order. (The two triangles share the angle at vertex B, both contain the angle θ, and so also have the same third angle by the triangle postulate.) Consequently, ABC is similar to the reflection of ABD, the triangle DBA in the lower panel. Taking the ratio of sides opposite and adjacent to θ,
    ${\frac {c}{a}}={\frac {a}{r}}\ .$
Likewise, for the reflection of the other triangle,
    ${\frac {c}{b}}={\frac {b}{s}}\ .$
Clearing fractions and adding these two relations:
    $cr+cs=a^{2}+b^{2}\ ,$
the required result.

## Credits

* Original content from Wikipedia w:Pythagorean Theorem
* ↑ Howard Whitley Eves (1983). "§4.8:...generalization of Pythagorean theorem". Great moments in mathematics (before 1650). Mathematical Association of America. p. 41. ISBN 0883853108.
* ↑ Tâbit ibn Qorra (full name Thābit ibn Qurra ibn Marwan Al-Ṣābiʾ al-Ḥarrānī) ( 826–901 AD) was a physician living in Baghdad who wrote extensively on Euclid's Elements and other mathematical subjects.
* ↑ Aydin Sayili (1960). "Thâbit ibn Qurra's Generalization of the Pythagorean Theorem". Isis. 51 (1): 35–37. doi:10.1086/348837. {{cite journal}}: Invalid |ref=harv (help); Unknown parameter |month= ignored (help)
* ↑ Judith D. Sally, Paul Sally (2007-12-21). "Exercise 2.10 (ii)". Cited work. p. 62. ISBN 0821844032.
# Trigonometry/Derivative of Tangent

Since $\tan(x)={\frac {\sin(x)}{\cos(x)}}$ , we can find its derivative by the usual rule for differentiating a fraction:
    ${\frac {d}{dx}}\left[{\frac {\sin(x)}{\cos(x)}}\right]={\frac {\cos(x)\cdot \cos(x)+\sin(x)\cdot \sin(x)}{\cos ^{2}(x)}}={\frac {1}{\cos ^{2}(x)}}=\sec ^{2}(x)={1+\tan ^{2}(x)}$ .
Similarly,
    ${\frac {d}{dx}}{\bigl\cot(x){\bigr ]}=\csc ^{2}(x)=1+\cot ^{2}(x)$
    ${\frac {d}{dx}}{\bigl{\text{sec}}(x){\bigr ]}={\frac {\sin(x)}{\cos ^{2}(x)}}=\tan(x)\sec(x)$
    ${\frac {d}{dx}}{\bigl\csc(x){\bigr ]}=-{\frac {\cos(x)}{\sin ^{2}(x)}}=-\cot(x)\csc(x)$
# posper_tax

This table lists the taxes that can be applied to products. Combinative taxes are currently not supported so to bundle two or more taxes together you have to create a new entry with the rate being the sum of all the taxes.
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| id | VARCHAR(255) | No | Primary | UUID instead of int |
| version | INT(11) | No | | This is used by hibernate to track table versions |
| visibleId | INT(11) | Yes | Uni | This is the user visible (user-friendly) Id |
| rate | DOUBLE | No | | This is the percentage rate of the tax |
| tax_name | VARCHAR(255) | No | | name of the tax |
# posper_stockdiary

This table describes a number of units of a product at a location
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| id | VARCHAR(255) | No | Primary | UUID instead of int |
| version | INT(11) | No | | This is used by hibernate to track table versions |
| price | DOUBLE | No | | The price of this product |
| reason | int(11) | No | | This is used to describe what happened. Either stock went up or stock went down. If stock went up, the allowed reasons are purchase (we bought stuff), refund (we sold stuff but it was returned back to us and we refunded the money), or movement (moved from another warehouse). If stock went down, the allowed reasons are purchase (we sold stuff), refund (we returned stock for a refund; perhaps we didn't need it or it was defective), or movement (to another warehouse). |
| units | DOUBLE | No | | Number of units of the product |
| date | DATETIME | No | | The date/time when this item took place |
| product_id | VARCHAR(255) | No | Foreign Key | This links to the product being described |
| location_id | VARCHAR(255) | No | Foreign Key | This links to the location being described |
# posper_ticketlineidgenerator

This table generates ids for new ticket lines to use.
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| id | INT(11) | No | Primary | value of the next id that should be used |
# posper_user

This table describes a user of tinaposplus. Different users have different rights (by way of what role they're assigned).
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| id | VARCHAR(255) | No | Primary | UUID instead of int |
| version | INT(11) | No | | This is used by hibernate to track table versions |
| visible | BIT(1) | No | | Whether or not the user is visible on the login menu |
| name | VARCHAR(255) | No | | This is the user name |
| user_password | VARCHAR(255) | Yes | | This is the user's password, if one has been selected |
| role_name | VARCHAR(255) | No | Foreign Key | This points to the role associated with the user |
| image_id | VARCHAR(255) | Yes | Foreign Key | If an image has been associated with the user, this points to it. |
# posper_ticketline

This table shows the information for a single line of a ticket.
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| id | VARCHAR(255) | No | Primary | UUID instead of int |
| version | INT(11) | No | | This is used by hibernate to track table versions |
| description | VARCHAR(255) | No | | This is used to describe the reason for applying a discount, if a discount is applied. |
| amount | DOUBLE | No | | The number of units of the product being sold on this line |
| priceSell | DOUBLE | No | | This is the price each unit is being sold at (discounts and stuff can come in to play to change it from the normal pricing). |
| taxRate | DOUBLE | No | | This field allows for overriding the tax rate |
| tax_id | VARCHAR(255) | No | Foreign Key | This points to the associated tax. |
| product_id | VARCHAR(255) | Yes | Foreign Key | The product associated with this line item. Can be null if this is just a misc added surcharge. |
| ticket_ticketline | VARCHAR(255) | Yes | Foreign Key | This is the ticket that this "ticket line" is part of |
| line_index | INT(11) | Yes | | The position on the ticket. |
# posper_role_permission

This is an associative table connecting roles to permissions.
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| Role_name | VARCHAR(255) | No | Foreign Key | This points to the role being associated with a permission. |
| permissions_name | VARCHAR(255) | No | Foreign Key | This is the permission being associated with the role. |
# posper_ticket

This table has information about a "ticket", which is the collection of items that a customer has ordered.
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| id | VARCHAR(255) | No | Primary | UUID instead of int |
| version | INT(11) | No | | This is used by hibernate to track table versions |
| visibleId | INT(11) | Yes | Uni | This is the user visible (user-friendly) Id |
| dateOpen | DATETIME | Yes | | The start time for the ticket |
| dateClose | DATETIME | Yes | | The end time for the ticket (Note: does this mean it was paid?) |
| synched | BIT(1) | No | | This field is relevant if openbravo is used in conjuction with the POS system. Synched is set to true when openbravo has been made aware of this ticket (it considers it to be an order). |
| number | INT(11) | Yes | | This field is relevant if openbravo is used in conjunction with the POS system. It is the openbravo "order id" |
| host | VARCHAR(255) | Yes | | The host this ticket occurred on. |
| place_id | VARCHAR(255) | Yes | Foreign Key | The place associated with this ticket : tickets can also be placeless (eg, togo orders have no "place") |
| userid | VARCHAR(255) | Yes | Foreign Key | The user that created ("rung in") this ticket (Note : the data spec says this can be null but how can that be?) |
| parent_id | VARCHAR(255) | Yes | Foreign Key | This is the cash register that this ticket is associated with |
# posper_ticketcreationgenerator

This table helps create new ids for tickets
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| id | INT(11) | No | Primary | value of the next id that should be used |
# posper_role

This table describes the roles available to users of the application. Roles determine what permissions the user has.
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| name | VARCHAR(255) | No | Primary | name of the role |
# posper_ticketidgenerator

This table generates ids for new tickets to use.
| Column Name | Data Type | Null Allowed? | Key? | Comments |
| id | INT(11) | No | Primary | value of the next id that should be used |
# Structured Query Language/DELETE 1

Hint: Be careful and deactivate AUTOCOMMIT.
The DELETE command removes rows from a table.
The syntax is straightforward as we do not need to specify any column name - rows are deleted as a whole and not partly. As usual, the search condition specifies the criterion which identifies the affected rows. It can involve zero, one, or more rows. If we omit the WHERE keyword and the search condition all rows are affected.

## Example

The information about Mr. Burton was deleted and restored again.

## Further Information

We present some more information about the DELETE command here. There are also some comments to the interconnection with the TRUNCATE command.

## Exercises

Delete the hobby 'Yoga'.
Delete all relations between persons and hobbies. Check result. Restore all rows.