OpenLLM-France/wikimedia huggingface dataset:
# Cryptography/Breaking Caesar cipher

Breaking the Caesar cipher is trivial as it is vulnerable to most forms of attack. The system is so easily broken that it is often faster to perform a brute force attack to discover if this cipher is in use or not. An easy way for humans to decipher it is to examine the letter frequencies of the cipher text and see where they match those found in the underlying language.

## Frequency analysis

By graphing the frequencies of letters in the ciphertext and those in the original language of the plaintext, a human can spot the value of the key by looking at the displacement of particular features of the graph. For example in the English language the frequencies of the letters Q,R,S,T have a particularly distinctive pattern.
Computers can also do this trivially by means of an auto-correlation function.

## Brute force

As the system only has 25 non-trivial keys it is easy even for a human to cycle through all the possible keys until they find one which allows the ciphertext to be converted into plaintext.

## Known plaintext attack

If you have a message in both ciphertext and in plaintext it is trivial to find the key by calculating the difference between them.
# Cryptography/Breaking Vigenère cipher

Plain text is encrypted using the Vigenère cipher by first choosing a keyword consisting of letters from the alphabet of symbols used in the plain text. The keyword is then used to encrypt the text by way of the following example.
Using: Plain text: I Like A Book
and choosing: Keyword: cta
1. Map all the plain text to numbers 0-25 or however long your alphabet is
2. Map your keyword to numbers the same way
3. add your key to your plain text in the following manner
4. take each resulting number mod 26 ( or for the general case mod the number of characters in your alphabet)
5. map each number back to a letter to get the resulting cypher text
The message can easily be decrypted with the keyword by reversing the above process. The keyword can be any length equal to or less than that of the plain text.
Without the keyword the primary method of breaking the Vigenère cipher is known as the Kasiski test, after the Prussian major who first published it. The first stage is determining the length of the keyword.

### Determining the key length

Given an enciphered message such as:
Upon inspection of the ciphertext, we see that there are a few digraphs repeated, namely DS, SZ, and ZO. It is statistically unlikely that all of these would arise by random chance; the odds are that repeated digraphs in the ciphertext correspond to repetitions in the plaintext. If that is the case, the digraphs must be encoded by the same section of the key both times. Therefore, the length of the key is a factor of the distance in the text between the repetitions.
| Digraph | First Position | Second Position | Distance | Factors |
| DS | 1 | 10 | 9 | 3 |
| SZ | 1 | 10 | 9 | 3 |
| ZO | 1 | 10 | 9 | 3 |
The common factors (indeed, the only factors in this simple example) are 3 and 9. This narrows down the possibilities significantly, and the effect is even more pronounced with longer texts and keys.

### Frequency analysis

Once the length of the key is known, a slightly modified frequency analysis technique can be applied. Suppose the length of the key is known to be three. Then every third letter will be encrypted with the same letter of the key. The ciphertext can be split into three segments - one for each key letter—and the procedure described for the Caesar cipher can be used.

### External links

* Description of the Vigenère cipher and Kasiski test
# Cryptography/Biometrics

Biometrics
1. "Biometrics" is the science of human identity recognition based on physiological or behavioural characteristics that are unique to each individual.
2. Due to recent advances in the use of Biometrics in Passport Documents, ATM, Credit Card, Cellular Phone, PDA, Airport Check-in, Electronic Banking, web Access, Network Logon, Laptops Data Security there are presently research activities concerning the following areas:
a. Advanced finger recognition: it focuses on the finger retrieval from large database which is crucial part of the automatic fingerprint identification system. Conventional exclusive fingerprint classification partitions fingerprints into a few pre-specific non-overlapping classes(usually 4 or 5 classes) based on the Henrry classes. This limits the efficiency the efficiency of the fingerprint indexing. The continuous fingerprint classification overcome limitation of the number of classes. However, the exhaustive search of the whole fingerprint database required by this approach could be time-consuming. Research is going on in exploring the methods that inherits the merits of both the exclusive and continuous fingerprint classifications and overcomes the limitations and drawbacks of these two conventional approaches.
b. Multi-scale image processing of the fingerprint image to enhance fingerprint verification accuracy: Multi-scale image processing provides an effective way to find the optimal image enhancement of the fingerprints, which is very important to improve the quality of heavily corrupted fingerprint images.
# Cryptography/Basic Design Principles

Good ciphers often attempt to have the following traits.

## Kerckhoffs's principle

Kerckhoffs's principle, also called Kerckhoffs's law:
A cryptosystem should be secure even if everything about the system, except the key, is public knowledge.
In the words of Claude Shannon, "The enemy knows the system." (Shannon's maxim).

## Diffusion

Having good diffusion means that making a small change in the plain text should ideally cause as much as possible of cipher text to have a fifty percent possibility of change.
For example a Caesar cipher has almost no diffusion while a block cypher may contain lots of it.

## Confusion

For good confusion the relationship between the cypher text and the plain text should be as complex as possible.
# Cryptography/Beale cipher

The Beale Cipher is a cipher in which two parties agree on a key which is a text (e.g., The Declaration of Independence which was used by Thomas Beale as the key for one of his three encrypted texts), and the words in the text are then enumerated, and the encrypted text consists of numbers from the key. The numbers will then be replaced with the first letter of the word from the key-text when the cipher text is being deciphered.
The origin of the cipher was that Beale left an encrypted text with notes where to find his gold (worth $20 million,), although many commentators believe the story about the hidden gold to have been a hoax.
There are no short cuts to break this cipher like there is for Vigenère, the mono-alphabetic or the polyalphabetic cipher; ultimately, the only way to successfully decipher it is to guess the original key-text, which may not be an easy task. The difficult depends on clues left in the cipher text. For example, it may be possible to infer the length of the book, etc., from the cipher text.

## References

* ↑ Simon Singh: The Code Book
* ↑ Simon Singh: The Code Book
# Cryptography/Atbash cipher

Atbash is an ancient encryption system created in the Middle East. It was originally used in the Hebrew language; some historians and cryptographers believe there are such examples in the Bible. The name "Atbash" comes from the first Hebrew letter Aleph and the last Taff. The Atbash cipher is a simple substitution cipher that relies on transposing all the letters in the alphabet such that the resulting alphabet is backwards. Atbash is also a substitution cipher. Since each letter corresponds to another, it offers very little security. The first letter is replaced with the last letter, the second with the second-last, and so on. The completed cypher looks like so:
An example plaintext to ciphertext using Atbash:
As one can see, and as mentioned previously, the Atbash cipher offers no security once the cipher method is found.
# Delphi Programming/The Math unit

If we want to perform some advanced mathematical calculation then we have to include the 'Math' in uses of the unit. for example MOD.
# Demystifying Depression

This book may not have been written by a doctor. The recommendations are not referenced to actual research except in a bibliography. This document should in no way serve as a substitute for medical advice. Experts are welcome to add their comments at Talk:Demystifying Depression#Review Notes.
"Depression is a mood disorder", so start many descriptions of the illness. That is a gross understatement. Depression does indeed seriously affect your mood, but that is just the tip of the iceberg. A clinical depression can be an incapacitating illness, affecting your ability to perform tasks that require concentration and rendering you unable to work.
By writing this document we hope to provide you with the knowledge everyone should have about their mental well-being. Depression is not an unavoidable fate. It is physical.
The good news is that you can recover and yes, even learn to be happier than you have ever been before.
Download the entire book as a PDF File. This can be done in two ways, you can either right click on the link "PDF File Edition 1.0" and choose "Save target as", this saves the PDF on your computer for viewing at any time; alternatively left click on the link: PDF File Edition 1.0 Click here to see a continuous, printable version of the book Print version

## Table of Contents

* Introduction
* What is Depression?
** Normal Neuron Communication: The Role of Serotonin
** The Stress System: Adrenaline and Cortisol
** The Buildup to a Depression
** Speculation on the Physiology of Depression
* The Recovery Process
* Recovery Guide
** General Lifestyle Advice
** Daily Routine
** Tips for Good Sleep
* The Controversy about Antidepressants
* Suicide
* The Role of Sports
** Feeling Good vs Actual Improvement
** Why Moderate Exercise May Sometimes Help
** Caveats of Treating Depression with Exercise
** A Real World Example
* Depression and Ageing
* The Genetic Link
* Is Depression on the Rise?
* Quantifying Depression
* The Burnout Syndrome
* Happiness
* Facing the Prejudice
* Conclusion
* References
* List of Figures

## Colophon

This book is based on a two-part series with the same title published on Kuro5hin by Name of Feather. Below you will find links to the original articles plus the associated discussions.
* Demystifying Depression - Part I (via Internet Archive)
* Demystifying Depression - Part II (via Internet Archive)
# Demystifying Depression/Caveats of Treating Depression with Exercise

Next page: A Real World Example, Previous page: Why Moderate Exercise May Sometimes Help, Top: Demystifying Depression

### Caveats of Treating Depression with Exercise

Looking back on Figure 2 from The Stress System, some people might suggest that a person with a severe depression could avoid the crashing down simply by exercising every single day. In a sense, as soon as your body begins to crash, you simply do more exercise to rev it up again. You could therefore reap the positive temporary effects of exercise, and hopefully avoid the negative side. This routine "sort of" works, but is also extremely dangerous, as I will proceed to explain.
The major problem is that having too many stress hormones flowing through veins has a negative effect on sleep. And sleep is crucial for recovery. So people with more severe depressions who exercise every day will not sleep as much as they should, and the recovery will therefore take longer (see next section for a real world example). More seriously, if the amount of exercise is too high, they might even regress. Even more seriously, if the underlying depression worsens, people might be tempted to increase the amount of exercise to compensate, which will quickly lead them into a very dangerous downwards spiral. In a sense, advising a seriously depressed person to exercise is like telling a drunken individual that the best way to avoid a hangover is to keep drinking; or advising a heroin addict that the best way to avoid the withdrawal symptoms is to keep injecting the drug.
This is unfortunately not widely known, but even healthy individuals who exercise too much can develop the symptoms of a depression. This is sometimes referred to as the athletic overtraining syndrome , and by now you should have understood the basic mechanism of why it arises.
Next page: A Real World Example, Previous page: Why Moderate Exercise May Sometimes Help, Top: Demystifying Depression
# Delphi Programming/Variables and constants

Variables are indispensable in programming. A program wouldn't do much things without variables.
A variable links a name to a value. You must not confuse its name and its value. A variable is not constant. It may change during the application execution.

## Variables and program
### Variable declaration in the program

To declare a variable in a program, you have to write:
* var
* The variable name (var1, for example)
* Its type (integer, for example)
An example:
You can also write:

### Right syntax for the variable names

| Wrong identifier | Violated rule | Right identifier |
| 1name | Must not start with a number | name1 |
| name.2 | Dots are not allowed | name_2 |
| -name-3 | Dashes are not allowed | _name_3 |
| Variable name | Spaces are not allowed | Variable_name |
| déjà_vu | Accented characters are not allowed | deja_vu |
You don't have to worry about lowercase and uppercase as Delphi is case-insensitive.

### Display a variable

It's easy to display a variable in an application. In a console application, you use the command
Here is the result in a whole application:
So this code will display 12.
    Remark: If you don't want the display of a new line, use the Write function rather than WriteLn .
    Remark: You can use the ReadLn function to avoid the console from closing too quickly, but the actual feature of this function is described below.
    Remark: In GUI applications, you display variables in visual components.

### Retrieve a variable

It's easy too. You have to call the ReadLn(variable); function.
You have to first declare the variable you want to use. Here is a whole code:
In the next pages, we will see how to operate variable additions, use variables in loops and conditions, etc...
    Remark: If you don't want to skip a line after the entry, use the Read function rather than ReadLn .

### Assignment

You can set a value to a variable at any time in a program, from another variable for example:
The changed variable is on the left and the variable whose value is duplicated is on the right. Do not confuse.

## The constants
### Introduction

The constants are similar to variables, except one point: they can't change their value during the execution.

### The constants of the system

Those constants specify all the values that are native and defined in the header files.
Example:
    stdout points on the screen buffer
    stdin points on the keyboard buffer

### The symbolic constants

The symbolic constants are defined by the developer. They work as the variables, except for their declaration.
To declare a constant, you have to declare it after the reserved keyword const instead of var.
Write an application that asks the user its age and then display it.
# Delta3D, Ground Floor

A Quick Scapegoat
Delta3D is a work in progress. There are several very smart people constantly adding, changing, and improving the library for us. They are all marines and work at an aquarium apparently. : )
This means, somewhat unfortunately, that the "ground floor" can shift a bit here and there as new, cool ideas are implemented.
So, I'd like to say "the following is how ALL Delta3D applications work" but that's skipping the fact that there are now various ways to structure a Delta3D app depending on what you're trying to build.
So, the following is one of the most basic ground floors for Delta3D, but not the only one.
The Ground Floor
In order to have a game you need a game loop. This is some kind of timed, cycling if-then code block that is checking for mouse movement, updating zombies positions, making plasma shots inch slightly closer to the zombies, etc.
Do you program your own loop? NEVER! That would so old-school.
Delta3D takes care of this when you create an instance of the Application class. The Application class has a game loop built into it along with other functions to make useful stuff happen inside the game loop.
So one of the first things you'll see is a variable getting initialized as an Application? NO!
What?! Why?!
Because the Application class has virtual functions, which means its got functions that it really, really wants to make real but doesn't know what their internals should look like. This means you have to provide the internals. Which means you have to "derive" your own class from the Application class, THEN you can create a new variable to store this game instance. So chances are, most Delta3D code you've looked at (or will), will have something like this:
Here our MainApp is OUR class that's derived from the Application class (that is stored in the dtABC 'namespace')
And then somewhere in the main block something like
Which creates a new variable app to store our MainApp object. Inside app now lives our game loop which can be started with
# Demystifying Depression/A Real World Example

Next page: Depression and Ageing, Previous page: Caveats of Treating Depression with Exercise, Top: Demystifying Depression

### A Real World Example

At last I will provide you a real world example which illustrates the caveats of doing sports during depression. Some companies here in the Netherlands rely on a sports-intensive routine to put people back to work sooner. In basic terms, the routine involves running every single morning for a period between one hour and one hour and a half. The running is performed under controlled conditions, to prevent the heart rate from ever going over 130 beats per minute. If you understood the role of sports in depression, you will also realise just how this scheme works: it basically gets their brains running on adrenaline. This is not entirely harmless, as during the recovery period the people will have elevated heart rate and stress hormones flowing through their veins. Also, with all that adrenaline in their systems, they will not sleep as much as they could, which makes a full recovery last much longer, up to three years. The advantage of this scheme? Well, they do begin working (part-time of course) much sooner than otherwise.
At this point you might be wondering how they do not realise what is really happening. Remember that adrenaline is an insidious hormone, which makes one feel good even as it revs up the body, and this scheme requires them to exercise every single day without exception. Obviously, the idea is to keep them from crashing down from all that adrenaline, and therefore to prevent them from realising their true status. Also, there is widespread ignorance about depression among Dutch GPs, which makes it all the more unlikely that someone will realise that there is something fishy going on. Personally, I find this scheme to be utterly mad. But then, I am not a Calvinist.
Should you be thinking that this scheme is also a perfectly viable alternative way of curing a depression—one which takes longer, is potentially harmful to the general health, but does allow one to become active sooner rather than later—I would even be tempted to agree with you. However, I still think that the ultimate choice should reside with each individual person. It is their health we are talking about, after all. These people should be properly informed of all possible alternatives and the implications of each one. This is currently not happening.
Next page: Depression and Ageing, Previous page: Caveats of Treating Depression with Exercise, Top: Demystifying Depression
# Demystifying Depression/Conclusion

Next page: References, Previous page: Facing the Prejudice, Top: Demystifying Depression

## Conclusion

The moral of the story is fairly straightforward: depression is a physical illness which should be taken seriously and be treated as soon as the first symptoms arise. Like most other ailments, it feeds on ignorance and complacency, which is all the more tragic if one considers that we have the medical knowledge and the means to make it a thing of the past. Humanity has been tormented too much already.
Next page: References, Previous page: Facing the Prejudice, Top: Demystifying Depression
# Complex Analysis/Elementary Functions/Exponential Functions

Consider the real-valued exponential function $exp:\mathbb {R} \rightarrow \mathbb {R}$ defined by $exp(x)=e^{x}$ . It has the following properties:
1) $e^{x}\neq 0\quad \forall x\in \mathbb {R}$
2) $e^{x+y}=e^{x}e^{y}\quad \forall x,y\in \mathbb {R}$
3) $(e^{x})'=e^{x}\quad \forall x\in \mathbb {R}$
We want to extend the exponential function $exp$ to the complex numbers in such a way that
1) $e^{z}\neq 0\quad \forall z\in \mathbb {C}$
2) $e^{z+w}=e^{z}e^{w}\quad \forall z,w\in \mathbb {C}$
3) $(e^{z})'=e^{z}\quad \forall z\in \mathbb {C}$
But $e^{z}$ has been already defined for $z=i\theta$ and we have $e^{i\theta }=\cos \theta +i\sin \theta$.
# Complex Analysis/Elementary Functions/Logarithmic Functions
## Logarithm

A logarithm is the exponent that a base is raised to get a value. Such exponential equations can be written as logarithmic equations and vice versa. Exponential equations are in the form of b$^x$ = a , and logarithmic equations are in the form of log$_b$a = x . When converting from exponential to logarithmic form, and vice versa, there are some key points to keep in mind:
1. The base of the exponent become the base of the logarithm.
Example:
3$^7$ = 2187
log$_3$2187 = 7
2. The exponent is the logarithm.
Example:
5$^2$ = 25
log$_5$25 = 2
3. Any nonzero base to the 0 power is 1.
6$^0$ = 1
log$_6$1 = 0
4. An exponent or log can be negative.
4$^{-2}$ = 0.0625
log$_4$0.0625 = -2
5. The exponent and the log can be variables.
4$^y$ = 1024
log$_4$1024 = y
A logarithm is also an exponent. This means that the exponent rules apply to logarithms as well.
A common logarithm is a logarithm that has a base of 10. Bases of logarithms are known to be 10 when there is no base written for them. For example:
log6 = log$_{10}$6
Logarithmic functions are inverses of exponential functions, since logarithms are inverses of exponents. For example:
y = 3$^x$
is the inverse of
y = log$_3$x
And, since these two functions are inverses, their domain and ranges are switched. So, for
y = 3$^x$
the domain is all real numbers and the range is y > 0.
And, for
y = log$_3$x
the domain is x > 0 and the range is all real numbers.
# Complex Analysis/Function series, power series, Euler's formula, polar form, argument
## Series of complex functions

Given a sequence of (possibly holomorphic functions) $f_{0},f_{1},\ldots ,f_{n},f_{n+1},\ldots$ we can, in the case of convergence, form the series
    $\sum _{n=0}^{\infty }f_{n}(z)$,
which depends on $z$ and may be seen as a complex function, where domain of definition equals domain of convergence. We first note the obvious definitions (we count from zero since this will allow for the important special case of power series without any modifications).
Definition 3.1:
The series
    $\sum _{n=0}^{\infty }f_{n}(z)$
is called convergent in $z_{0}$ iff
    $\lim _{N\to \infty }\sum _{n=0}^{N}f_{n}(z_{0})$
exists. It is called absolutely convergent in $z_{0}$ iff
    $\lim _{N\to \infty }\sum _{n=0}^{N}|f_{n}(z_{0})|$
exists.
Within the interior of the domain of convergence, the complex differentiability of all the $f_{n}$ implies the differentiability of the corresponding series, and moreover we may differentiate term-wise.
Theorem 3.2:

## Power series

In this section, we specialize the considerations of the previous section down to the case $f_{n}(x)=c_{n}x^{n}$, where $c_{0},c_{1},c_{2},\ldots$ is a sequence of constants.