OpenLLM-France/wikimedia huggingface dataset:
# BlitzMax/Modules/Streams/Endian streams

Endian streams allow you to swap the byte order of stream data.
This can be useful for reading or writing binary streams which are in a fixed endian format on multiple platforms.
Endian format refers to the order multi-byte values are stored. For example, an integer is four bytes long, but in what order should each byte be stored? Low byte first or high byte first?
This choice is generally dictated by the CPU. For example, Intel CPU's such as the pentium store multi-byte values 'low byte first' which is known as little endian. On the other hand, PowerPC CPU's store multi-byte values 'high byte first' which is known as big endian.
Most of the time, you don't have to worry about endian issues. As long as the same endian format is being used to read and write data, there is no problem. However, endian issues do need to be taken into account when reading or writing binary files. For example, writing a binary file on a PC (which is little endian) and reading it back on a Mac (which is big endian) may produce odd results if the file contains multibyte values.
Endian streams help solve this problem by modifying the behaviour of stream commands that read or write multi-byte values. These commands are: ReadShort, ReadInt, ReadLong, ReadFloat, ReadDouble, WriteShort, WriteInt, WriteLong, WriteFloat and WriteDouble.

# Functions
## BigEndianStream

Function BigEndianStream:TStream( stream:TStream )
Description: BigEndianStream
Returns: A big endian stream

## LittleEndianStream

Function LittleEndianStream:TStream( stream:TStream )
Description: LittleEndianStream
Returns: A little endian stream
# Functions
## CreateRamStream

Function CreateRamStream:TRamStream( ram:Byte Ptr,size,readable,writeable )
Description: Create a ram stream
Returns: A ram stream object
Information: A ram stream allows you to read and/or write data directly from/to memory. A ram stream extends a stream object so can be used anywhere a stream is expected.
Be careful when working with ram streams, as any attempt to access memory which has not been allocated to your application can result in a runtime crash.
# BlitzMax/Modules/Pub

The 'Pub' modscope is the official group of Public domain modules for BlitzMax.

## Modules
#### Audio

   * OpenAL

#### Graphics

   * OpenGL

#### Miscellaneous

   * ZLib

#### Other

   * Lua

#### User Input

   * FreeJoy

#### Undocumented

   * DirectX
   * ENet
   * FreeAudio
   * FreeProcess
   * FreeType
   * Glew
   * LibJPEG
   * LibPNG
   * MacOS
   * OGGVorbis
   * StdC
   * Win32

## External links

* BlitzMax Website
# BlitzMax/Modules/Streams/Bank streams

A bank stream allows you to read data into or out of a bank. A bank stream can be used with any of the stream commands, or anywhere a TStream object is expected.
To create a bank stream, use the CreateBankStream command.
As with all streams, you should use CloseStream when you are finished with the bank stream.

# Types
## TBankStream

BankStream Object
* Create

## TBankStream: Functions

Function Create:TBankStream( bank:TBank )
Description: Create a bank stream
Returns: A bank stream object
Information: A bank stream allows you to read data into or out of a bank. A bank stream extends a stream so can be used in place of a stream.

# Functions
## CreateBankStream

Function CreateBankStream:TBankStream( bank:TBank )
Description: Create a bank stream
Returns: A bank stream object
Information: A bank stream allows you to read data into or out of a bank. A bank stream extends a stream so can be used in place of a stream.
# BlitzMax/Modules/MaxGUI Drivers/Win32MaxGUIEx

This is the new unicode Windows driver for MaxGUI that is designed to take advantage of some of the new GUI features available in Windows XP and Vista.
NOTE: If you would like to use this unicode driver on the older ANSI platforms (e.g. Windows 9X), then you must also import a unicode application layer. For example...
By doing this, your program will be linked with libunicows. Although Windows 2000/XP/Vista users should not notice anything different at run-time, Windows 9X users will require MSLU in order to run your program. This may be distributed with the EXE as a separate DLL or it can be installed as a system-wide package onto the end-user's computer.
See the following web-pages for more information:
MSLU Announcement
MSLU Software Development Kit Redistributable
# Annotations to James Joyce's Ulysses/Oxen of the Sun/376
## Annotations

ubi and quomodo (Latin) the where and the manner.
Etienne chanson (French) Stephen song. Gabler emends this by inserting a comma after Etienne (required) and capitalizing chanson (not required).

## References

* ↑ Gifford (1988) 420.
# Annotations to James Joyce's Ulysses/Oxen of the Sun/380
## Annotations

Mort aux vaches (French) Death to cows. This is French slang for, Down with the cops!
# Annotations to James Joyce's Ulysses/Oxen of the Sun/373
## Annotations

Omnis caro ad te veniet (Latin) All flesh shall come unto thee. See 047.26-27.
omnipotentiam deiparae supplicem (Latin) a suppliant almightiness of the Mother of God, or an almightiness of petition of the Mother of God. Omnipotentia supplex (the all-powerful suppliant) is an honorific title bestowed on the Virgin Mary. Saint Bernardino of Siena said of her: Mary has the keys of the divine treasury, so that she can distribute to whom she wills and as much as she wills, the grace of the Holy Spirit. The same point is made in the popular prayer Memorare, which is often attributed to Saint Bernard of Clairvaux, but Stephen's phrase has not been found in any genuine work by Saint Bernard.

## References

* ↑ Gifford (1988) 415. Thornton (1968) 329.
* ↑ Gifford (1988) 415. Thornton (1968) 329-330.
* ↑ Chandlery, S. J., Peter Joseph (1910). Mary's Praise on Every Tongue. London: Manresa Press. p. 46. The preface of this book was written by Father Bernard Vaughan, S. J., who is mentioned in Ulysses (079.05 and 211.08-09).
# Annotations to James Joyce's Ulysses/Oxen of the Sun/382
## Annotations

Bos Bovum (Latin) Bull of Bulls.

## References

* ↑ Gifford (1988) 425.
# Annotations to James Joyce's Ulysses/Oxen of the Sun/374
## Annotations

vergine madre figlia di tuo figlio (Italian) virgin mother, daughter of your son, a quotation from Dante's Paradiso (33.1). The words are spoken by St Bernard of Clairvaux in honour of the Virgin Mary.
parce que M. Leo Taxil nous a dit que qui l'avait mise dans cette fichue position c'était le sacré pigeon, ventre de Dieu! (French) Because Monsieur Léo Taxil has told us that it was the sacred pigeon who had placed her in this wretched position, by Christ! The final three words, which literally translate as belly of God!, are a coarse French oath. See 041.19 ff. for Léo Taxil.
Entweder transsubstantiality oder consubstantiality but in no case subsubstantiality (German) Either ... or. In Catholic theology, transsubstantiation is the technical term to describe the principle underlying the doctrine of the Real Presence, according to which the consecrated bread and wine in the Eucharist take on the actual substance of the body and blood of Jesus Christ, while retaining the outward appearance or accidence of bread and wine. Consubstanstiation is the term used to describe an alternative interpretation of the mystery of the Eucharist, according to which the consecrated bread and wine comprise the substance of Christ alongside that of the original unconsecrated bread and wine. The doctrine of consubstantiation is usually associated with Lutheranism, though Martin Luther himself held a slightly different position. This, presumably, explains Stephen's use of German terms.
Needless to remark, subsubstantiality is Stephen's drunken contribution to the theology of the Real Presence. In his intoxicated state, he is confusing two different theologial controversies: (1) the relationship between the consecrated Host in theEucharist and Jesus Christ, and (2)the relationship between the Virgin Mary and Jesus Christ. According to Catholic doctrine, Mary was the mother of Jesus Christ the man and of Jesus Christ the God. this is also held by Lutherans.
# Annotations to James Joyce's Ulysses/Oxen of the Sun/375
## Annotations

Ut novetur sexus omnis corporis mysterium (Latin) That the secret of the sex of every body may be known. Gifford translates this: That the whole mystery of physical sexuality may become known, but Joyce seems to be talking about the determination of the sex (male or female) of the foetus. The title is possibly an allusion to a genuine anthem (or antiphon), O Redemptor sume carmen temet concinentium (O Redeemer, Receive the Song of Those Who Celebrate Thee), which includes the line: Ut novetur sexus omnis unctione Chrismatis (That both men and women may be renewed by this chrism). This hymn is sung on Maundy Thursday in the Mass of the Chrism.
Orate, fratres, pro memetipso (Latin) Pray, Brethren, for me myself. These words are based on the Offertory in the Latin Tridentine Mass, which was still in use in 1904. At the end of the Offertory, the celebrant kisses the altar, turns to the congregation and says: Orate, fratres: ut meum ac vestrum sacrificium acceptabile fiat apud Deum patrem omnipotentem (Pray, Brethren, that my and your sacrifice may be acceptable to God the Almighty Father).

## References

* ↑ Gifford (1988) 417. Thornton (1968) 331. Bowen (1974) 242.
* ↑ Gifford (1988) 418. Thornton (1968) 332.
* ↑ Missale Romanum 83.
# Business Strategy/Introduction

Business (or Strategic) management is the art, science, and craft of formulating, implementing and evaluating cross-functional decisions that will enable an organization to achieve its long-term objectives. It is the process of specifying the organization's mission, vision and objectives, developing policies and plans, often in terms of projects and programs, which are designed to achieve these objectives, and then allocating resources to implement the policies and plans, projects and programs. Strategic management seeks to coordinate and integrate the activities of the various functional areas of a business in order to achieve long-term organizational objectives. A balanced scorecard is often used to evaluate the overall performance of the business and its progress towards objectives.
Strategic management is the highest level of managerial activity. Strategies are typically planned, crafted or guided by the Chief Executive Officer, approved or authorized by the Board of directors, and then implemented under the supervision of the organization's top management team or senior executives. Strategic management provides overall direction to the enterprise and is closely related to the field of Organization Studies. In the field of business administration it is useful to talk about "strategic alignment" between the organization and its environment or "strategic consistency". According to Arieu (2007), "there is strategic consistency when the actions of an organization are consistent with the expectations of management, and these in turn are with the market and the context."
Before reading the rest, it is recommended that An Overview of Strategic Planning be read.
# Business Strategy/Failure of Strategy
## Reasons why strategic plans fail

There are many reasons why strategic plans fail, especially:
* Failure to understand the customer
** Why do they buy
** Is there a real need for the product
** inadequate or incorrect marketing research
** customer looking for more advanced technology,user safety, aesthetic appearance
* Inability to predict competitive|environmental reaction
** What will competitors do
** Does your product fulfill the aspirational needs of customer
** company structure and style not lending to find out the possible reactions; its style has always been 'knee-jerk' reactions.
*** Fighting brand management|brands
** product has crossed its half-life period; no further research done to revamp/add more attributes
** Company has not taken a full view of the market demand ;supplies reaching only a few pockets.
*** Price wars
** an attitude of complacence or a fear of market expecting a permanent crash in prices due to price war
** Will government intervene
** Whether any USP is envisaged vis-a-vis the existing models
* Over-estimation of resource competence
** Can the staff, equipment, and processes handle the new strategy
** Failure to develop new employee and management skills
** Does the organization know how to fit in new resources with old team
* Failure to coordinate
** Reporting and control relationships not adequate;company is bogged down by silos, internal politics
** Organizational structure not flexible enough
** Keeping the teams in darkness about their roles in the overall progress of the project
** Teams not given the big picture
* Failure to obtain senior management commitment
** Failure to get management involved right from the start
** Failure to obtain sufficient company resources to accomplish task
** Failure give adequate briefing to senior management
** Failure to be transparent with senior management team
* Failure to obtain employee commitment
** New strategy not well explained to employees
** No incentives given to workers to embrace the new strategy
** Failure to train the junior level operatives for the new project
** Failure to involve employees before the start of project
** Failure of senior planners to understand the nitty gritties at the operational level
* Under-estimation of time requirements
** No critical path analysis done
** Senior and middle level managers not adequately exposed or trained to handle nitty gritties in execution
* Failure to follow the plan
** No follow through after initial planning
** No tracking of progress against plan
** No consequences for above
** No proper training to give feed back at the critical junctures
* Failure to manage change
** Inadequate understanding of the internal resistance to change
** Lack of vision on the relationships between processes, technology and organization
* Poor communications
** Insufficient information sharing among stakeholders
** Exclusion of stakeholders and delegates
# Canadian Criminal Law/Offences/Drug Possession

This concerns possession of drugs for personal use. For charges related to possession for the purpose of trafficking, see Drug Trafficking.

## Legislation

   Possession of substance 4. (1) Except as authorized under the regulations, no person shall possess a substance included in Schedule I, II or III.
   Obtaining substance (2) No person shall seek or obtain
       (a) a substance included in Schedule I, II, III or IV, or
       (b) an authorization to obtain a substance included in Schedule I, II, III or IV from a practitioner, unless the person discloses to the practitioner particulars relating to the acquisition by the person of every substance in those Schedules, and of every authorization to obtain such substances, from any other practitioner within the preceding thirty days.
   – CDSA

## Elements of Offence

* identity of accused
* date and time of incident
* jurisdiction (incl. region and province)
* Possession of Substance (Knowledge, consent, control)
* Substance is a Control Substance under the CDSA (certificate of analysis, chain of possession, amounts found)
* Possession of Substance was not authorized

## Interpretation

As part of the proof of possession, the accused must have knowledge of the narcotic substance. It is not necessary however to be aware of the exact type of drug, rather only be aware that it is illegal.
* ↑ R v Blondin (1970) 2 CCC (2d) 118 (BCCA)
* ↑ R v Burgess, [1970] 3 CCC 268 (ONCA)

## Defences

* De Minimus

## Relevant Trial Motions

* Exclusion of public from court (s. 486)
# Canadian Criminal Law/Offences/Drug Trafficking
## Legislation

   Trafficking in substance 5. (1) No person shall traffic in a substance included in Schedule I, II, III or IV or in any substance represented or held out by that person to be such a substance.
   Possession for purpose of trafficking (2) No person shall, for the purpose of trafficking, possess a substance included in Schedule I, II, III or IV.
   – CDSA

## Proving the Offence

Possession for the Purpose of Trafficking
Along with the essential elements of time and date, identity and jurisdiction, the Crown must prove the elements of:
* Possession of Substance (Knowledge, consent, control)
** must have knowledge of the illegal nature of the substance
* Substance is a Control Substance under the CDSA (certificate of analysis, chain of possession, amounts found)
* the accused knew of (or held a belief as to) the nature of the substance
* Possession of Substance was not authorized
* The accused intended to traffic the Substance
Trafficking Along with the essential elements of time and date, identity and jurisdiction, the Crown must prove the elements of:
* Accused was trafficking in a substance
* the substance was Schedule I to V Controlled Substance
Sources:
* ↑ R. v. Chan, 2003 CanLII 52165 (ON CA), (2003), 18 C.R. (6th) 322 at 30 to 32

## Typical Defences

* Entrapment

## See Also

* Trafficking
* Drug Production
* CDSA Schedules
# Canadian Criminal Law/Offences/Criminal Negligence
## Overview

Although criminal negligence is a broadly defined offence, in practice, most charges of criminal negligence relate to the accused's operation of a motor vehicle.

## Legislation

   Criminal negligence 219. (1) Every one is criminally negligent who
       (a) in doing anything, or
       (b) in omitting to do anything that it is his duty to do,
   shows wanton or reckless disregard for the lives or safety of other persons.
   Definition of “duty” (2) For the purposes of this section, “duty” means a duty imposed by law.
   R.S., c. C-34, s. 202.
   – CCC
   Causing death by criminal negligence 220. Every person who by criminal negligence causes death to another person is guilty of an indictable offence and liable
       (a) where a firearm is used in the commission of the offence, to imprisonment for life and to a minimum punishment of imprisonment for a term of four years; and
       (b) in any other case, to imprisonment for life.
   R.S., 1985, c. C-46, s. 220; 1995, c. 39, s. 141.
   – CCC
   Causing bodily harm by criminal negligence 221. Every one who by criminal negligence causes bodily harm to another person is guilty of an indictable offence and liable to imprisonment for a term not exceeding ten years.
   R.S., c. C-34, s. 204.
   – CCC

## Proof of the Offence

The Crown should prove the following elements:
Criminal Negligence: s. 219
* identity of accused
* date and time of incident
* jurisdiction (incl. region and province)
* the accused did anything or omitted "to do anything that it is his duty to do"
* the conduct showed "wanton or reckless disregard for the lives or safety of others"
Criminal Negligence Causing Death: s. 220 In addition to the elements of Criminal Negligence, the additional elements are:
* another person is dead
* the accused's conduct caused the death
* the conduct involved a firearm
Criminal Negligence Causing Bodily Harm: s. 221 In addition to the elements of Criminal Negligence, the additional elements are:
* another person suffered bodily harm
* the accused's conduct caused the harm

## Cases

* R. v. Vermette, 2012 MBQB 46 -- acquittal
# Canadian Criminal Law/Offences/Disarming a Peace Officer
## Legislation

   Disarming a peace officer 270.1 (1) Every one commits an offence who, without the consent of a peace officer, takes or attempts to take a weapon that is in the possession of the peace officer when the peace officer is engaged in the execution of his or her duty.
   Definition of “weapon” (2) For the purpose of subsection (1), “weapon” means any thing that is designed to be used to cause injury or death to, or to temporarily incapacitate, a person.
   – CCC

## Proof of Offence

* identity of accused
* date and time of incident
* jurisdiction (incl. region and province)
* the peace officer was in possession of a weapon
* the accused took or attempted to take the weapon in the officer's possession
* the peace officer was engaged in the execution of his or her duty;
* the peace officer did not give consent.
# Canadian Criminal Law/Offences/Contempt of Court
## Legislation

   Contempt 708. (1) A person who, being required by law to attend or remain in attendance for the purpose of giving evidence, fails, without lawful excuse, to attend or remain in attendance accordingly is guilty of contempt of court.
   Punishment (2) A court, judge, justice or provincial court judge may deal summarily with a person who is guilty of contempt of court under this section and that person is liable to a fine not exceeding one hundred dollars or to imprisonment for a term not exceeding ninety days or to both, and may be ordered to pay the costs that are incident to the service of any process under this Part and to his detention, if any.
   ... R.S., 1985, c. C-46, s. 708; R.S., 1985, c. 27 (1st Supp.), s. 203.
   – CCC

## Proof of Offence

The Crown may prove any of the following elements:
* the accused's conduct seriously interferes with or obstructs the administration of justice or causes a serious risk of interference or obstruction with the administration of justice.
* the accused intended or was reckless in committing the conduct
* ↑ R. v. Devost, [2010] O.J. No. 2611 at paras. 34 to 36
* ↑ R v Glasner 1994 CanLII 3444 (ONCA)

## Interpretation

A person who fails to comply with an order under s. 605 to release an exhibit for testing is also guilty of contempt.(see s. 605(2))
A witness who gives evidence from outside of Canada by way of video will be deemed to having given it in Canada for the purpose of a charge of contempt. (714.6)
Section 10 permits an appeal to the Court of Appeal for a conviction.

## Case Digests

* R. v. Bengy, 2013 ONSC 248 (CanLII)
* R. v. Cohn 1984 CanLII 43 (ON CA)
# Canadian Criminal Law/Offences/Criminal Harassment
## Legislation

   Criminal harassment 264. (1) No person shall, without lawful authority and knowing that another person is harassed or recklessly as to whether the other person is harassed, engage in conduct referred to in subsection (2) that causes that other person reasonably, in all the circumstances, to fear for their safety or the safety of anyone known to them.
   Prohibited conduct (2) The conduct mentioned in subsection (1) consists of
       (a) repeatedly following from place to place the other person or anyone known to them;
       (b) repeatedly communicating with, either directly or indirectly, the other person or anyone known to them;
       (c) besetting or watching the dwelling-house, or place where the other person, or anyone known to them, resides, works, carries on business or happens to be; or
       (d) engaging in threatening conduct directed at the other person or any member of their family.
   – CCC

## Proof of Offence

The Crown must establish the essential elements of the offence:
* identity of accused
* date and time of incident
* jurisdiction (incl. region and province)
* the accused has engaged in the conduct set out in s. 264(2)(a), (b), (c) or (d) of the Criminal Code;
* the complainant was harassed by the conduct.
* the accused, who engaged in such conduct, knew that the complainant was harassed or was reckless or wilfully blind as to whether the complainant was harassed;
* the conduct caused the complainant to fear for their safety or the safety of anyone known to them; and
* the complainant’s fear was, in all the circumstances, reasonable.
* ↑ R. v. Coppola, 2007 ONCJ 184 R. v. Sillipp, 1997 ABCA 346 at 18 R. v. Sanchez, 2012 BCCA 469 (CanLII)
* ↑ See R. v. Kosikar, 1999 CanLII 3775 (ON CA), 138 C.C.C. (3d) 217 (Ont. C.A.) at para. 19

## Interpretation

There is no requirement to prove the mens rea of the offence where it can be inferred from the facts.
Safety extends beyond simply fear of physical harm but also includes psychological and emotional security.
See Also: R. v. Wisniewska, 2011 ONSC 6452
* ↑ R. v. Holmes [2008] O.J. No. 3415 (C.A.)
* ↑ R. v. Gowing, [1994] O.J. No. 2743 (Gen.Div.) at para 5 (aff’d on appeal Gowing, [1998] O.J. No. 90)