text:
# Tobacco Act

S.C. 1997, c. 13

Assented to 1997-04-25

An Act to regulate the manufacture, sale, labelling and promotion of tobacco products, to make consequential amendments to another Act and to repeal certain Acts

Her Majesty, by and with the advice and consent of the Senate and House of Commons of Canada, enacts as follows:

## SHORT TITLE

###### Short title

**1.** This Act may be cited as the [Tobacco Act](/canada/eng/acts/T/T-11.5.md).

## INTERPRETATION

###### Definitions

**2.** The definitions in this section apply in this Act.

**“accessory”** - _« accessoire »_

“accessory” means a product that may be used in the consumption of a tobacco product, including a pipe, cigarette holder, cigar clip, lighter and matches.

**“additive”** - _« additif »_

“additive” means an ingredient other than tobacco leaves.

**“analyst”** - _« analyste »_

“analyst” means a person designated as an analyst under subsection 34(1).

**“blunt wrap”** - _« feuille d’enveloppe »_

“blunt wrap” means a sheet, including one that is rolled, that is composed of natural or reconstituted tobacco and that is ready to be filled.

**“brand element”** - _« élément de marque »_

“brand element” includes a brand name, trade-mark, trade-name, distinguishing guise, logo, graphic arrangement, design or slogan that is reasonably associated with, or that evokes, a product, a service or a brand of product or service, but does not include a colour.

**“emission”** - _« émission »_

“emission” means a substance that is produced when a tobacco product is used.

**“entity”** - _« entité »_

“entity” includes a corporation, firm, partnership, association, society, trust or other organization, whether incorporated or not.

**“furnish”** - _« fournir »_

“furnish” means to sell, lend, assign, give or send, with or without consideration, or to barter or deposit with another person for the performance of a service.

**“ingredient”** - _« ingrédient »_

“ingredient” means tobacco leaves and any substance used in the manufacture of a tobacco product or its components, including any substance used in the manufacture of that substance.

**“inspector”** - _« inspecteur »_

“inspector” means a person designated as an inspector under subsection 34(1).

**“little cigar”** - _« petit cigare »_

“little cigar” means a roll or tubular construction that

  * (_a_) is intended for smoking;

  * (_b_) contains a filler composed of natural or reconstituted tobacco;

  * (_c_) has a wrapper, or a binder and a wrapper, composed of natural or reconstituted tobacco; and

  * (_d_) has a cigarette filter or weighs no more than 1.4 g, excluding the weight of any mouthpiece or tip.

It includes any tobacco product that is prescribed to be a little cigar.

**“manufacture”** - _« fabriquer »_

“manufacture”, in respect of tobacco products, includes the packaging, labelling, distributing and importing of tobacco products for sale in Canada.

**“manufacturer”** - _« fabricant »_

“manufacturer”, in respect of tobacco products, includes any entity that is associated with a manufacturer, including an entity that controls or is controlled by the manufacturer or that is controlled by the same entity that controls the manufacturer.

**“Minister”** - _« ministre »_

“Minister” means the Minister of Health.

“package”[Repealed, 2009, c. 27, s. 2]

**“prescribed”**

“prescribed” means prescribed by regulation.

**“retailer”** - _« détaillant »_

“retailer” means a person who is engaged in a business that includes the sale of a tobacco product to consumers.

**“sell”** - _« vendre »_

“sell” includes offer for sale and expose for sale.

**“tobacco product”** - _« produit du tabac »_

“tobacco product” means a product composed in whole or in part of tobacco, including tobacco leaves and any extract of tobacco leaves. It includes cigarette papers, tubes and filters but does not include any food, drug or device that contains nicotine to which the [Food and Drugs Act](/canada/eng/acts/F/F-27.md) applies.

**“young person”** - _« jeune »_

“young person” means a person under eighteen years of age.

  * 1997, c. 13, s. 2;
  * 2009, c. 27, s. 2.

Previous Version

## GOVERNOR IN COUNCIL’S POWERS

###### Regulations — little cigar

**2.1** (1) The Governor in Council may make regulations prescribing any tobacco product to be a little cigar for the purpose of the definition “little cigar”.

###### Order in council — little cigar

(2) The Governor in Council may, by order, amend the definition “little cigar” by replacing the weight set out in that definition by a weight that is not less than 1.4 g.

  * 2009, c. 27, s. 3.

## HER MAJESTY

###### Binding on Her Majesty

**3.** This Act is binding on Her Majesty in right of Canada or a province.

## PURPOSE

###### Purpose of Act

**4.** The purpose of this Act is to provide a legislative response to a national public health problem of substantial and pressing concern and, in particular,

  * (_a_) to protect the health of Canadians in light of conclusive evidence implicating tobacco use in the incidence of numerous debilitating and fatal diseases;

  * (_b_) to protect young persons and others from inducements to use tobacco products and the consequent dependence on them;

  * (_c_) to protect the health of young persons by restricting access to tobacco products; and

  * (_d_) to enhance public awareness of the health hazards of using tobacco products.

## PART I - TOBACCO PRODUCTS

###### Product standards

**5.** No person shall manufacture a tobacco product that does not conform with the standards established by the regulations.

###### Prohibition — manufacture

**5.1** (1) No person shall use an additive set out in column 1 of the schedule in the manufacture of a tobacco product set out in column 2.

###### Exception — trade-mark or marking

(2) Subsection (1) does not prohibit the use of a colouring agent to depict a trade-mark on a tobacco product or to display a marking required under this or any other Act of Parliament or of the legislature of a province or for any other prescribed purpose.

  * 2009, c. 27, s. 4.

###### Prohibition — sale

**5.2** (1) No person shall sell a tobacco product set out in column 2 of the schedule that contains an additive set out in column 1.

###### Exception

(2) Subsection (1) does not prohibit the sale of a tobacco product by reason only that the product contains a colouring agent used for a purpose referred to in subsection 5.1(2).

  * 2009, c. 27, s. 5.

###### Information required from manufacturer

**6.** (1) Every manufacturer shall submit to the Minister, in the prescribed manner and within the prescribed time, information that is required by the regulations about tobacco products, their emissions and any research and development related to tobacco products and their emissions, whether the tobacco products are for sale or not.

###### Requests for supplementary information

(2) The Minister may, subject to the regulations, request supplementary information relating to the information referred to in subsection (1), and every manufacturer shall submit the requested information.

  * 1997, c. 13, s. 6;
  * 2009, c. 27, s. 6.

Previous Version

###### Regulations

**7.** The Governor in Council may make regulations

  * (_a_) establishing standards for tobacco products, including prescribing the amounts of substances that may be contained in the product or its emissions;

  * (_b_) respecting test methods, including methods to assess conformity with the standards;

  * (_c_) prescribing information that manufacturers must submit to the Minister about tobacco products and their emissions, including sales data and information on market research, product composition, ingredients, health effects, hazardous properties and brand elements;

  * (_c.1_) prescribing information that manufacturers must submit to the Minister about research and development related to tobacco products and their emissions, including information on market research, product composition, ingredients, health effects, hazardous properties and brand elements;

  * (_c.2_) respecting requests for supplementary information under subsection 6(2);

  * (_c.3_) respecting the prohibition under section 6.1, including providing for the suspension of the manufacture or sale of a tobacco product;

  * (_d_) prescribing the means, including electronic means, by which the information referred to in paragraphs (_c_) to (_c.2_) may be submitted to the Minister;

  * (_d.1_) prescribing anything that by this Part is to be prescribed; and

  * (_e_) generally for carrying out the purposes of this Part.

  * 1997, c. 13, s. 7;
  * 2009, c. 27, s. 8.

Previous Version

###### Amendment of schedule

**7.1** (1) The Governor in Council may, by order, amend the schedule by adding, amending or deleting

  * (_a_) the name or description of an additive or tobacco product; or

  * (_b_) a reference to all tobacco products, with or without exceptions.

###### Description

(2) An additive or tobacco product may be described by reference to a document produced by a body or person other than the Minister, either as the document exists on a particular date or as it is amended from time to time.

  * 2009, c. 27, s. 9.

## PART II - ACCESS

###### Furnishing tobacco products

**8.** (1) No person shall furnish a tobacco product to a young person in a public place or in a place to which the public reasonably has access.

###### Defence

(2) A person shall not be found to have contravened subsection (1) if it is established that the person attempted to verify that the person was at least eighteen years of age by asking for and being shown documentation prescribed for the purposes of verifying age, and believed on reasonable grounds that the documentation was authentic.

###### Signs

**9.** Every retailer shall post, at retail, in the prescribed place and manner, signs in the prescribed form and with the prescribed content, that inform the public that the sale or giving of a tobacco product to a young person is prohibited by law, or that contain a prescribed health message, unless that retailer is exempted by the regulations from the requirement to post the signs.

###### Minimum number of products in package

**10.** (1) No person shall import for sale in Canada, package, distribute or sell cigarettes, little cigars or blunt wraps except in a package that contains at least 20 cigarettes, little cigars or blunt wraps or, if a higher number is prescribed, at least the prescribed number.

###### Other tobacco products

(2) No person shall import for sale in Canada, package, distribute or sell a tobacco product — other than cigarettes, little cigars or blunt wraps — that is prescribed for the purposes of this subsection, except in a package that contains at least the prescribed portions, number or quantity of the tobacco product.

  * 1997, c. 13, s. 10;
  * 2009, c. 27, s. 10.

Previous Version

###### Self-service display

**11.** No person, unless exempted by the regulations, shall sell a tobacco product by means of a display that permits a person to handle the tobacco product before paying for it.

###### Dispensing device

**12.** No person shall furnish or permit the furnishing of a tobacco product by means of a device that dispenses tobacco products except where the device is in

  * (_a_) a place to which the public does not reasonably have access; or

  * (_b_) a bar, tavern or beverage room and has a prescribed security mechanism.

###### Deliver or mail

**13.** (1) No person shall, for consideration, cause a tobacco product to be delivered from one province to another or to be sent by mail unless the delivery or mailing is between manufacturers or retailers or the person is otherwise exempted by the regulations.

###### Advertising an offer

(2) No person shall advertise an offer to deliver a tobacco product from one province to another or to mail a tobacco product.

###### Regulations

**14.** The Governor in Council may make regulations

  * (_a_) prescribing the documentation that may be used to verify the age of a person for the purposes of subsection 8(2);

  * (_b_) exempting persons from the application of sections 9, 11 and 13;

  * (_c_) prescribing signs that are required by section 9 to be posted, including their form, size, content, number and placement;

  * (_d_) prescribing tobacco products for the purposes of subsection 10(2);

  * (_e_) respecting exemptions from the application of section 12;

  * (_f_) prescribing anything that by this Part is to be prescribed; and

  * (_g_) generally for carrying out the purposes of this Part.

## PART III - LABELLING

###### Information required on packages

**15.** (1) No manufacturer or retailer shall sell a tobacco product unless the package containing it displays, in the prescribed form and manner, the information required by the regulations about the product and its emissions, and about the health hazards and health effects arising from the use of the product or from its emissions.

###### Information required on leaflet

(2) If required by the regulations, every manufacturer or retailer shall provide, in the prescribed form and manner, a leaflet that displays the information required by the regulations about a tobacco product and its emissions and about the health hazards and health effects arising from the use of the product and from its emissions.

###### Attribution

(3) The information referred to in subsections (1) and (2) may be attributed to a prescribed person or body if the attribution is made in the prescribed manner.

###### Existing obligations saved

**16.** This Part does not affect any obligation of a manufacturer or retailer at law or under an Act of Parliament or of a provincial legislature to warn consumers of the health hazards and health effects arising from the use of tobacco products or from their emissions.

###### Regulations

**17.** The Governor in Council may make regulations

  * (_a_) respecting the information that must appear on packages and in leaflets about tobacco products and their emissions and the health hazards and health effects arising from the use of the products and from their emissions;

  * (_b_) prescribing anything that by this Part is to be prescribed; and

  * (_c_) generally for carrying out the purposes of this Part.

## PART IV - PROMOTION

###### Definition of “promotion”

**18.** (1) In this Part, “promotion” means a representation about a product or service by any means, whether directly or indirectly, including any communication of information about a product or service and its price and distribution, that is likely to influence and shape attitudes, beliefs and behaviours about the product or service.

###### Application

(2) This Part does not apply to

  * (_a_) a literary, dramatic, musical, cinematographic, scientific, educational or artistic work, production or performance that uses or depicts a tobacco product or tobacco product-related brand element, whatever the mode or form of its expression, if no consideration is given directly or indirectly for that use or depiction in the work, production or performance;

  * (_b_) a report, commentary or opinion in respect of a tobacco product or a brand of tobacco product if no consideration is given by a manufacturer or retailer, directly or indirectly, for the reference to the tobacco product or brand in that report, commentary or opinion; or

  * (_c_) a promotion by a tobacco grower or a manufacturer that is directed at tobacco growers, manufacturers, persons who distribute tobacco products or retailers but not, either directly or indirectly, at consumers.

###### Prohibition

**19.** No person shall promote a tobacco product or a tobacco product-related brand element except as authorized by this Act or the regulations.

###### False promotion

**20.** No person shall promote a tobacco product by any means, including by means of the packaging, that are false, misleading or deceptive or that are likely to create an erroneous impression about the characteristics, health effects or health hazards of the tobacco product or its emissions.

###### Testimonials or endorsements

**21.** (1) No person shall promote a tobacco product by means of a testimonial or an endorsement, however displayed or communicated.

###### Depiction of person

(2) For the purposes of subsection (1), the depiction of a person, character or animal, whether real or fictional, is considered to be a testimonial for, or an endorsement of, the product.

###### Exception

(3) This section does not apply to a trade-mark that appeared on a tobacco product for sale in Canada on December 2, 1996.

###### Advertising

**22.** (1) Subject to this section, no person shall promote a tobacco product by means of an advertisement that depicts, in whole or in part, a tobacco product, its package or a brand element of one or that evokes a tobacco product or a brand element.

###### Exception

(2) Subject to the regulations, a person may advertise a tobacco product by means of information advertising or brand-preference advertising that is in

  * (_a_) a publication that is provided by mail and addressed to an adult who is identified by name; or

  * (_b_) [Repealed, 2009, c. 27, s. 11]

  * (_c_) signs in a place where young persons are not permitted by law.

###### Lifestyle advertising

(3) Subsection (2) does not apply to lifestyle advertising or advertising that could be construed on reasonable grounds to be appealing to young persons.

###### Definitions

(4) The definitions in this subsection apply in this section.

“brand-preference advertising”

« publicité préférentielle »

“brand-preference advertising” means advertising that promotes a tobacco product by means of its brand characteristics.

“information advertising”

« publicité informative »

“information advertising” means advertising that provides factual information to the consumer about

  * (_a_) a product and its characteristics; or

  * (_b_) the availability or price of a product or brand of product.

“lifestyle advertising”

« publicité de style de vie »

“lifestyle advertising” means advertising that associates a product with, or evokes a positive or negative emotion about or image of, a way of life such as one that includes glamour, recreation, excitement, vitality, risk or daring.

  * 1997, c. 13, s. 22;
  * 2009, c. 27, s. 11.

Previous Version

###### Packaging

**23.** No person shall package a tobacco product in a manner that is contrary to this Act or the regulations.

###### Prohibited additives — packaging

**23.1** (1) No person shall package a tobacco product set out in column 2 of the schedule in a manner that suggests, including through illustrations, that it contains an additive set out in column 1.

###### Prohibition — sale

(2) No person shall sell a tobacco product set out in column 2 of the schedule that is packaged in a manner prohibited by subsection (1).

  * 2009, c. 27, s. 12.

Previous Version

###### Prohibition — sponsorship promotion

**24.** No person may display a tobacco product-related brand element or the name of a tobacco manufacturer in a promotion that is used, directly or indirectly, in the sponsorship of a person, entity, event, activity or permanent facility.

  * 1997, c. 13, s. 24;
  * 1998, c. 38, s. 1.

Previous Version

###### Prohibition — name of facility

**25.** No person may display a tobacco product-related brand element or the name of a tobacco manufacturer on a permanent facility, as part of the name of the facility or otherwise, if the tobacco product-related brand element or name is thereby associated with a sports or cultural event or activity.

  * 1997, c. 13, s. 25;
  * 1998, c. 38, s. 2.

###### Accessories

**26.** (1) Subject to the regulations, a manufacturer or retailer may sell an accessory that displays a tobacco product-related brand element.

###### Promotion

(2) No person shall promote an accessory that displays a tobacco product-related brand element except in the prescribed manner and form and in a publication or place described in paragraphs 22(2)(_a_) and (_c_).

  * 1997, c. 13, s. 26;
  * 2009, c. 27, s. 13.

Previous Version

###### Non-tobacco product displaying tobacco brand element

**27.** No person shall furnish or promote a tobacco product if any of its brand elements is displayed on a non-tobacco product, other than an accessory, or is used with a service, if the non-tobacco product or service

  * (_a_) is associated with young persons or could be construed on reasonable grounds to be appealing to young persons; or

  * (_b_) is associated with a way of life such as one that includes glamour, recreation, excitement, vitality, risk or daring.

###### Exception — tobacco product

**28.** (1) Subject to the regulations, a person may sell a tobacco product, or advertise a tobacco product in accordance with section 22, if any of its brand elements is displayed on a non-tobacco product, other than an accessory, or used with a service, if the non-tobacco product or service does not fall within the criteria described in paragraphs 27(_a_) and (_b_).

###### Exception — non-tobacco product

(2) Subject to the regulations, a person may promote a non-tobacco product, other than an accessory, that displays a tobacco product-related brand element, or a service that uses a tobacco product-related brand element, to which section 27 does not apply.

###### Sales promotions

**29.** No manufacturer or retailer shall

  * (_a_) offer or provide any consideration, direct or indirect, for the purchase of a tobacco product, including a gift to a purchaser or a third party, bonus, premium, cash rebate or right to participate in a game, lottery or contest;

  * (_b_) furnish a tobacco product without monetary consideration or in consideration of the purchase of a product or service or the performance of a service; or

  * (_c_) furnish an accessory that bears a tobacco product-related brand element without monetary consideration or in consideration of the purchase of a product or service or the performance of a service.

###### Retail display of tobacco products

**30.** (1) Subject to the regulations, any person may display, at retail, a tobacco product or an accessory that displays a tobacco product-related brand element.

###### Signs

(2) A retailer of tobacco products may post, in accordance with the regulations, signs at retail that indicate the availability of tobacco products and their price.

###### Communication media

**31.** (1) No person shall, on behalf of another person, with or without consideration, publish, broadcast or otherwise disseminate any promotion that is prohibited by this Part.

###### Exception

(2) Subsection (1) does not apply to the distribution for sale of an imported publication or the retransmission of radio or television broadcasts that originate outside Canada.

###### Foreign media

(3) No person in Canada shall, by means of a publication that is published outside Canada, a broadcast that originates outside Canada or any communication other than a publication or broadcast that originates outside Canada, promote any product the promotion of which is regulated under this Part, or disseminate promotional material that contains a tobacco product-related brand element in a way that is contrary to this Part.

###### Report to Minister

**32.** Every manufacturer shall provide the Minister, in the prescribed manner and within the prescribed time, with the prescribed information about any promotion under this Part.

## Regulations

###### Regulations

**33.** The Governor in Council may make regulations

  * (_a_) respecting the promotion of tobacco products and tobacco product-related brand elements and the packaging of tobacco products, including the form, manner and conditions of the promotion and packaging, and the promotion of services and non-tobacco products for the purposes of section 28;

  * (_b_) respecting the advertisement of tobacco products for the purposes of subsection 22(2);

  * (_c_) and (_d_) [Repealed, 1998, c. 38, s. 3]

  * (_e_) respecting, for the purposes of subsection 26(1), the manner in which a tobacco product-related brand element may appear on an accessory;

  * (_f_) respecting the display of tobacco products and accessories at retail;

  * (_g_) respecting signs that a retailer may post under subsection 30(2), including the placement of the signs and their number, size and content;

  * (_h_) requiring manufacturers to disclose the particulars of their tobacco product-related brand elements and promotional activities;

  * (_i_) prescribing anything that by this Part is to be prescribed; and

  * (_j_) generally for carrying out the purposes of this Part.

  * 1997, c. 13, s. 33;
  * 1998, c. 38, s. 3.

Previous Version

## PART V - ENFORCEMENT

## Inspection

###### Designation of inspectors and analysts

**34.** (1) The Minister may designate any person or class of persons as an inspector or analyst for the purposes of this Act and must provide every inspector and analyst with a certificate of designation, in the form determined by the Minister.

###### Certificate must be produced

(2) An inspector entering a place under this Act must, on request, show the certificate to the person in charge of the place.

###### Places inspectors may enter

**35.** (1) For the purpose of ensuring compliance with this Act, an inspector may, subject to section 36, at any reasonable time, enter any place, other than a means of transportation, in which the inspector believes on reasonable grounds

  * (_a_) a tobacco product is manufactured, tested, stored, packaged, labelled or sold;

  * (_b_) there is anything used in the manufacture, testing, packaging, labelling, promotion or sale of a tobacco product; or

  * (_c_) there is any information relating to the manufacture, testing, packaging, labelling, promotion or sale of a tobacco product.

###### Powers of inspector

(2) In carrying out an inspection, an inspector may

  * (_a_) examine a tobacco product or thing referred to in paragraph (1)(_b_);

  * (_b_) require any person in the place to produce for inspection, in the manner and form requested by the inspector, the tobacco product or thing;

  * (_c_) open or require any person in the place to open any container or package found in the place that the inspector believes on reasonable grounds contains the tobacco product or thing;

  * (_d_) take or require any person in the place to produce a sample of the tobacco product or thing;

  * (_e_) conduct any test or analysis or take any measurements; or

  * (_f_) require any person found in the place to produce for inspection or copying any written or electronic information that is relevant to the administration or enforcement of this Act.

###### Use of computers and copying equipment

(3) In carrying out an inspection, an inspector may

  * (_a_) use or cause to be used any computer system in the place to examine data contained in or available to the computer system that is relevant to the administration or enforcement of this Act;

  * (_b_) reproduce the data in the form of a print-out or other intelligible output and take it for examination or copying; and

  * (_c_) use or cause to be used any copying equipment in the place to make copies of any data, record or document.

###### Entry of dwelling-place

**36.** (1) An inspector may not enter a dwelling-place except with the consent of the occupant or under the authority of a warrant issued under subsection (2).

###### Authority to issue warrant

(2) On ex parte application, a justice, as defined in section 2 of the [Criminal Code](/canada/eng/acts/C/C-46.md), may issue a warrant authorizing the inspector named in the warrant to enter and inspect a dwelling-place, subject to any conditions specified in the warrant, if the justice is satisfied by information on oath

  * (_a_) that the dwelling-place is a place referred to in subsection 35(1);

  * (_b_) that entry to the dwelling-place is necessary for the administration or enforcement of this Act; and

  * (_c_) that the occupant does not consent to the entry, or that entry has been refused or there are reasonable grounds for believing that it will be refused.

###### Use of force

(3) An inspector executing the warrant shall not use force unless the inspector is accompanied by a peace officer and the use of force is specifically authorized in the warrant.

###### Certificate of analysis

**37.** An analyst who has analysed or examined a thing under this Act, or a sample of it, may issue a certificate or report setting out the results of the analysis or examination.

###### Assistance to inspectors

**38.** (1) The owner of a place inspected by an inspector under this Act, the person in charge of the place and every person found in the place shall

  * (_a_) provide all reasonable assistance to enable the inspector to carry out the inspector’s duties under this Act; and

  * (_b_) furnish the inspector with the information that the inspector reasonably requires for that purpose.

###### Obstruction

(2) No person shall obstruct or hinder, or knowingly make a false or misleading statement to, an inspector who is carrying out duties under this Act.

## Seizure and Restoration

###### Seizure

**39.** (1) During an inspection under this Act, an inspector may seize any tobacco product or other thing by means of which or in relation to which the inspector believes on reasonable grounds that this Act has been contravened.

###### Storage and removal

(2) The inspector may direct that any tobacco product or thing seized be kept or stored in the place where it was seized or that it be removed to another place.

###### Interference

(3) Unless authorized by an inspector, no person shall remove, alter or interfere in any way with any tobacco product or other thing seized.

###### Application for restoration

**40.** (1) Any person from whom a tobacco product or thing was seized may, within sixty days after the date of seizure, apply to a provincial court judge within whose jurisdiction the seizure was made for an order of restoration, if the person sends a notice containing the prescribed information to the Minister within the prescribed time and in the prescribed manner.

###### Order of restoration

(2) The provincial court judge may order that the tobacco product or thing be restored immediately to the applicant if, on hearing the application, the judge is satisfied

  * (_a_) that the applicant is entitled to possession of the tobacco product or thing seized; and

  * (_b_) that the tobacco product or thing seized is not and will not be required as evidence in any proceedings in respect of an offence under this Act.

###### Order of later restoration

(3) Where, on hearing an application made under subsection (1), the provincial court judge is satisfied that the applicant is entitled to possession of the tobacco product or thing seized but is not satisfied with respect to the matters mentioned in paragraph (2)(_b_), the judge may order that the product or thing seized be restored to the applicant

  * (_a_) on the expiration of one hundred and eighty days after the date of the seizure if no proceedings in respect of an offence under this Act have been commenced before that time; or

  * (_b_) on the final conclusion of any such proceedings, in any other case.

###### No restoration where forfeiture by consent

(4) The provincial court judge may not make an order under this section for restoration of a tobacco product or thing if it has been forfeited by consent under subsection 41(3).

###### Forfeiture

**41.** (1) Where no application has been made under subsection 40(1) for the restoration of a tobacco product or thing seized under this Act within sixty days after the date of the seizure, or an application has been made but on the hearing of the application no order of restoration is made, the product or thing is forfeited to Her Majesty and may be disposed of as the Minister directs.

###### Forfeiture on conviction

(2) Where a person has been convicted of an offence under this Act, any tobacco product or thing seized under this Act by means of or in respect of which the offence was committed is forfeited to Her Majesty and may be disposed of as the Minister directs.

###### Forfeiture with consent

(3) Where an inspector has seized a tobacco product or thing and the owner or the person in whose possession it was at the time of seizure consents in writing to its forfeiture, the product or thing is forfeited to Her Majesty and may be destroyed or disposed of as the Minister directs.

## Regulations

###### Regulations

**42.** The Governor in Council may make regulations

  * (_a_) respecting the powers and duties of inspectors and analysts;

  * (_b_) respecting the taking of samples;

  * (_c_) prescribing anything that by this Part is to be prescribed; and

  * (_d_) generally for carrying out the purposes of this Part.

## PART V.1 - LAYING OF PROPOSED REGULATIONS

###### Laying of proposed regulations

**42.1** (1) The Governor in Council may not make a regulation under section 7, 14, 17, 33 or 42 unless the Minister has first laid the proposed regulation before the House of Commons.

###### Report by committee

(2) A proposed regulation that is laid before the House of Commons is deemed to be automatically referred to the appropriate committee of the House, as determined by the rules of the House, and the committee may conduct inquiries or public hearings with respect to the proposed regulation and report its findings to the House.

###### Making of regulations

(3) The Governor in Council may make a regulation under section 7, 14, 17, 33 or 42 only if

  * (_a_) the House of Commons has not concurred in any report from a committee respecting the proposed regulation within the thirty sitting days following the day on which the proposed regulation was laid before the House, in which case the regulation may only be made in the form laid; or

  * (_b_) the House of Commons has concurred in a report from a committee approving the proposed regulation or an amended version of it, in which case the Governor in Council may only make the regulation in the form concurred in.

Definition of “sitting day”

(4) For the purpose of this section, “sitting day” means a day on which the House of Commons sits.

  * 1997, c. 13, s. 42.1;
  * 2015, c. 3, s. 154(F).

Previous Version

## PART VI - OFFENCES AND PUNISHMENT

###### Packaging and promotion offences

**43.** Every person who contravenes section 5 or 19 is guilty of an offence and liable

  * (_a_) on summary conviction, to a fine not exceeding $100,000 or to imprisonment for a term not exceeding one year, or to both; or

  * (_b_) on conviction on indictment, to a fine not exceeding $300,000 or to imprisonment for a term not exceeding two years, or to both.

###### Prohibited additives — manufacturer

**43.1** Every manufacturer who contravenes subsection 5.1(1), 5.2(1) or 23.1(1) or (2) is guilty of an offence and liable on summary conviction to a fine not exceeding $300,000 or to imprisonment for a term not exceeding two years, or to both.

  * 2009, c. 27, s. 14.

Previous Version

###### Prohibited additives — retailer

**43.2** Every retailer who contravenes subsection 5.2(1) or 23.1(2) is guilty of an offence and liable on summary conviction to a fine not exceeding $50,000.

  * 2009, c. 27, s. 14.

###### Summary offence

**44.** Every person who contravenes subsection 6(1) or (2), 10(1) or (2), 26(1) or (2) or 31(1) or (3), section 32 or subsection 38(1) or (2) is guilty of an offence and liable on summary conviction to a fine not exceeding $50,000 or to imprisonment for a term not exceeding six months, or to both.

  * 1997, c. 13, s. 44;
  * 2009, c. 27, s. 15.

Previous Version

###### Sales to youth, promotions

**45.** Every person who contravenes section 8, 9, 11 or 12, or any retailer who contravenes section 29, is guilty of an offence and liable on summary conviction

  * (_a_) for a first offence, to a fine not exceeding $3,000; and

  * (_b_) for a subsequent offence, to a fine not exceeding $50,000.

###### Offence by retailer

**46.** (1) Every retailer who contravenes subsection 15(1) or (2) is guilty of an offence and liable on summary conviction to a fine not exceeding $50,000.

###### Offence by manufacturer

(2) Every manufacturer who contravenes subsection 15(1) or (2) or section 29 is guilty of an offence and liable on summary conviction to a fine not exceeding $300,000 or to imprisonment for a term not exceeding two years, or to both.

###### General offence

**47.** Every person who contravenes subsection 13(1) or (2), section 20, subsection 21(1) or 22(1) or section 23 or 27 is guilty of an offence and liable on summary conviction to a fine not exceeding $300,000 or to imprisonment for a term not exceeding two years, or to both.

###### Where no other penalty

**48.** Every person who contravenes a provision of this Act or the regulations for which no other penalty is provided in this Act is guilty of an offence and liable on summary conviction to a fine not exceeding $25,000.

###### Continuing offence

**49.** A person who commits or continues an offence under this Act on more than one day is liable to be convicted for a separate offence for each day on which the offence is committed or continued.

###### Offence by director or officer of corporation

**50.** Where a corporation commits an offence under this Act, any director or officer of the corporation who authorized or acquiesced in the offence is guilty of an offence and liable on conviction to the penalty provided for by this Act in respect of the offence committed by the corporation, whether or not the corporation has been prosecuted.

###### Limitation period

**51.** No prosecution for a summary conviction offence under this Act may be instituted after two years after the time when the subject-matter of the proceedings arose.

###### Venue

**52.** A prosecution for an offence under this Act may be instituted, heard, tried and determined by a court in any jurisdiction in which the accused carries on business, regardless of where the subject-matter of the prosecution arose.

###### Exception need not be pleaded

**53.** (1) No exception, exemption, excuse or qualification prescribed by law is required to be set out or negatived, as the case may be, in an information or indictment for an offence under this Act or under section 463, 464 or 465 of the [Criminal Code](/canada/eng/acts/C/C-46.md) in respect of an offence under this Act.

###### Proof of exemption

(2) In a prosecution for an offence referred to in subsection (1), the burden of proving that an exception, exemption, excuse or qualification prescribed by law operates in favour of the accused is on the accused and the prosecutor is not required, except by way of rebuttal, to prove that it does not operate in favour of the accused, whether or not it is set out in the information or indictment.

###### Offence by employee or agent

**54.** In a prosecution for an offence under this Act, it is sufficient proof of the offence to establish that it was committed by an employee or agent of the accused, whether or not the employee or agent is identified or has been prosecuted for the offence, unless the accused establishes that the offence was committed without the knowledge or consent of the accused and that the accused exercised all due diligence to prevent its commission.

###### Certified copies and extracts

**55.** In a prosecution for an offence under this Act, a copy of any written or electronic information obtained during an inspection under this Act and certified by the inspector to be a true copy is admissible in evidence and is, in the absence of evidence to the contrary, proof of its contents.

###### Certificate or report of analyst as proof

**56.** (1) Subject to subsections (2) and (3), a certificate or report purporting to be signed by an analyst stating that the analyst has analysed anything to which this Act applies and stating the results of the analysis, is admissible in evidence in any prosecution for an offence under this Act without proof of the signature or official character of the person appearing to have signed the certificate or report.

###### Notice

(2) The certificate or report may not be received in evidence unless the party intending to produce it has, before the trial, given the party against whom it is intended to be produced reasonable notice of that intention together with a copy of the certificate or report.

###### Attendance of analyst

(3) The party against whom the certificate or report is produced may, with leave of the court, require the attendance of the analyst for the purpose of cross-examination.

###### Evidentiary presumptions

**57.** In a prosecution for a contravention of this Act,

  * (_a_) information on a package indicating that it contains a tobacco product is, in the absence of evidence to the contrary, proof that the package contains a tobacco product; and

  * (_b_) a name or address on a package purporting to be the name or address of the person by whom the tobacco product was manufactured is, in the absence of evidence to the contrary, proof that it was manufactured by that person.

###### Additional fine

**58.** If an offender has been convicted of an offence under this Act and the court is satisfied that as a result of the commission of the offence the offender acquired any monetary benefits or that monetary benefits accrued to the offender, the court may order the offender to pay, despite the maximum amount of any fine that may otherwise be imposed under this Act, an additional fine in an amount equal to the court’s estimation of the amount of those monetary benefits.

###### Orders of court

**59.** When the court is sentencing an offender who has been convicted of an offence under this Act, in addition to any other punishment that may be imposed, the court may, having regard to the nature of the offence and the circumstances surrounding its commission, make an order having any or all of the following effects:

  * (_a_) prohibiting the offender from doing any act or engaging in any activity that is likely to result in the continuation or repetition of the offence;

  * (_b_) prohibiting the offender from selling tobacco products for a period of not more than one year, in the case of a subsequent offence under section 8, 9, 11, 12 or 29;

  * (_c_) directing the offender to publish, in the manner directed by the court, the facts relating to the commission of the offence;

  * (_d_) directing the offender to post any bond or pay any amount of money into court that will ensure compliance with an order made pursuant to this section;

  * (_e_) directing the offender to compensate the Minister, in whole or in part, for the cost of any remedial or preventive action taken by or caused to be taken on behalf of the Minister as a result of the act or omission that constituted the offence; and

  * (_f_) directing the offender to pay an amount for the purposes of conducting research into any matters relating to tobacco products that the court considers appropriate.

## PART VII - AGREEMENTS

###### Administrative agreements

**60.** (1) The Minister may enter into agreements with provinces or other bodies respecting the administration and enforcement of this Act, including the designation of provincial or other officials and bodies as inspectors under this Act and the appointment of federal officials as inspectors under provincial legislation in respect of tobacco.

###### Equivalency agreements

(2) The Minister may enter into equivalency agreements with a province where there are in force, under the laws of that province, provisions that are equivalent to the provisions of this Act.

###### Order

(3) The Governor in Council may, on the recommendation of the Minister, by order, declare that certain provisions of this Act or the regulations, other than those creating an absolute prohibition, do not apply within a province in which an equivalency agreement is in force.

###### Table in Parliament

(4) A copy of an equivalency agreement in respect of which an order is made under subsection (3) must be tabled in each House of Parliament within the first 15 sitting days of that House after the order is made.

  * 1997, c. 13, s. 60;
  * 2015, c. 3, s. 155.

Previous Version

## PART VIII - CONSEQUENTIAL AMENDMENTS, REPEALS AND COMING INTO FORCE

## Consequential Amendments

**61\. to 63.** [Amendments]

## Repeals

**64\. and 65.** [Repeals]

## Coming into Force

###### Subsections 24(2) and (3)

**(*)66.** (1) Subsections 24(2) and (3) come into force on October 1, 1998 or on any earlier day that the Governor in Council may fix by order.

  * (*)[Note: Subsections 24(2) and (3) in force October 1, 1998.]

###### Application delayed — sponsorship before April 25, 1997

(2) If a tobacco product-related brand element was displayed, at any time between January 25, 1996 and April 25, 1997, in promotional material that was used in the sponsorship of an event or activity that took place in Canada, subsections 24(2) and (3) do not apply until

  * (_a_) October 1, 2000 in relation to the display of a tobacco product-related brand element in promotional material that is used in the sponsorship of that event or activity or of a person or entity participating in that event or activity; and

  * (_b_) October 1, 2003 in relation to the display referred to in paragraph (_a_) on the site of the event or activity for the duration of the event or activity or for any other period that may be prescribed.

###### Promotional material

(3) Subsections 24(2) and (3) apply beginning on October 1, 2000 and ending on September 30, 2003 to prohibit the furnishing to the public, on the site of an event or activity to which paragraph (2)(_b_) applies, of promotional material that displays a tobacco product-related brand element otherwise than in conformity with subsection 24(2).

  * 1997, c. 13, s. 66;
  * 1998, c. 38, s. 4.

## SCHEDULE - (Sections 5.1, 5.2, 7.1 and 23.1)

PROHIBITED ADDITIVES

| Column 1| Column 2
---|---|---
Item| Additive| Tobacco Product
1.|

Additives that have flavouring properties or that enhance flavour, including

  * –

additives identified as flavouring agents by the Joint FAO/WHO Expert Committee on Food Additives in the Committee’s evaluations, as published from time to time in the WHO Technical Report Series

  * –

additives identified as flavouring substances by the Flavor and Extract Manufacturers Association (FEMA) Expert Panel in its lists of GRAS (Generally Recognized as Safe) flavouring substances referred to as “GRAS 3” to “GRAS 24” and subsequent GRAS lists, as published from time to time, if any

The following additives are excluded:

  * –

benzoic acid (CAS 65-85-0) and its salts

  * –

butylated hydroxytoluene (CAS 128-37-0)

  * –

carboxy methyl cellulose (CAS 9000-11-7)

  * –

citric acid (CAS 77-92-9) and its salts

  * –

ethanol (CAS 64-17-5)

  * –

ethoxylated sorbitan monolaurate (CAS 9005-64-5)

  * –

fumaric acid (CAS 110-17-8)

  * –

glycerol (CAS 56-81-5)

  * –

guar gum (CAS 9000-30-0)

  * –

menthol (CAS 89-78-1)

  * –

_l_-menthol (CAS 2216-51-5)

  * –

_l_-menthone (CAS 14073-97-3)

  * –

n-propyl acetate (CAS 109-60-4)

  * –

paraffin wax (CAS 8002-74-2)

  * –

propylene glycol (CAS 57-55-6)

  * –

rosin glycerol ester (CAS 8050-31-5)

  * –

sodium acetate anhydrous (CAS 127-09-3)

  * –

sodium alginate (CAS 9005-38-3)

  * –

sorbic acid (CAS 110-44-1) and its salts

  * –

triacetin (CAS 102-76-1)

  * –

tributyl acetylcitrate (CAS 77-90-7)

| Cigarettes, little cigars and blunt wraps
2.| Amino acids| Cigarettes, little cigars and blunt wraps
3.| Caffeine| Cigarettes, little cigars and blunt wraps
4.| Colouring agents, excluding those used to whiten paper or the filter or to imitate a cork pattern on tipping paper| Cigarettes
4.1| Colouring agents, excluding those used to whiten plug wrap paper, to render tipping paper brown or bronze or to imitate a cork pattern on tipping paper| Little cigars
4.2| Colouring agents| Blunt wraps
5.| Essential fatty acids| Cigarettes, little cigars and blunt wraps
6.| Fruits, vegetables or any product obtained from the processing of a fruit or vegetable, excluding activated charcoal and starch| Cigarettes, little cigars and blunt wraps
7.| Glucuronolactone| Cigarettes, little cigars and blunt wraps
8.| Probiotics| Cigarettes, little cigars and blunt wraps
9.| Spices, seasonings and herbs| Cigarettes, little cigars and blunt wraps
10.| Sugars and sweeteners, excluding starch| Cigarettes, little cigars and blunt wraps
11.| Taurine| Cigarettes, little cigars and blunt wraps
12.| Vitamins| Cigarettes, little cigars and blunt wraps
13.| Mineral nutrients, excluding those necessary to manufacture the tobacco product| Cigarettes, little cigars and blunt wraps

Note: In column 1, “FAO” means Food and Agriculture Organization of the United Nations; “WHO” means World Health Organization; “CAS” means Chemical Abstracts Service registry number.

  * 2009, c. 27, s. 17.
  *[S.C.]: Statutes of Canada

repository: JasonMWhite/gitlawca-copy

repo_name: JasonMWhite/gitlawca-copy


text:
---
title: "Sandy circle skirt: Sewing Instructions"
---

<Warning>

Due to the different styles and configurations of Sandy you may find you need to skip or re-order certain steps.
We're not going to go into a full explanation on how to create all the individual details that make up a circle skirt. These instructions assume that you know how to sew a zipper, construct pockets, etc. If not, there are numerous excellent articles available on the web, both in writen form, and on video. If you do get stuck, you can always reach out to [other FreeSewers](https://discord.freesewing.org/) in our discord.

</Warning>

<Note>

Due to seamless and closure Sandy's needing different constructions we have separated their instructions.

</Note>

## Step 1: Prepping the Skirt

- If including a closure, sew the skirt seam  _good sides together_ up to where you intend the opening to start.
- Add Pockets if using.
- If using lining, prep the same as the skirt.
- _Finish_ seams if not lining.

<Note>

Pockets are not included in Sandy as it has one seam by default or no seams at all.

If you would like inseam pockets you can cut the skirt pattern piece into multiple pieces rather than a single one to create seams to insert them into. Cutting it into thirds (for default) or two (for seamless) will give you two sideseams for two inseam pockets, just don't forget to add back seam allowance to the cut lines if including.

If you do not wish to create additional seams but still wish to have pockets, you can use Patch Pockets or if you are feeling adventurous, you can use Welt Pockets.

</Note>

## Step 2: Prep the opening

- Insert zipper or placket into opening if using.
- If not using, press the openings seam allowance to the inside and _Edgestitch_/_Topstitch_ in place. You may also wish to continue the topstitching down the seam.

<Note>

Skip this step if:
- You are including the zipper in the waistband.
- You are making a seamless version.

</Note>

## Step 3: Lining

- (Optional) Interline the skirt with a stiffer or stronger fabric.
- Attach Lining to skirt at hem and opening by your preferred method.
- _Baste_ Lining to skirt at waist.
- Gather the waist if needed.

## Step 4: The waistband

### Closures

- Interface/stiffen half the waistband part lengthwise. Or interface/stiffen one of the curved waistband parts.
- Press under the seam allowance on the long edge of the waistband that is not interfaced. Trim. _Baste_ the fold in place if needed.
- With _good sides together_ sew the interfaced waistband/side of the waistband to the skirt. Gather the skirt down to the waistband if needed.
- If using the curved waistband sew the non-interfaced part to the interfaced part. Trim and clip seam and press the non-interfaced part up and away from the skirt.

There will be some overhangs:

- The side you wish not to overlap should be overhang by your seam allowance.
- The side intended to overlap will have a greater overhang.
- If using a placket, both sides will overhang by your seam allowance.
- If using a zipper in the waistband the greater overhang will need to be trimmed to the seam allowance.

__Inserting Zipper in Waistband__
- If inserting a zipper into the waistband now is the time to do so, attach the zipper from the waistband fold line down. Or from seam-line down for curved waistband.
- _Slipstitch_ or _Whipstitch_ the lining to the zipper at this point if you have not treated the lining and skirt as one at the opening.
- Press under overhangs.
- Press the waistband _wrong sides together_ along fold-line. Or along seam-line for curved waistband.
- Slipstitch_ or _Whipstitch_ the overhang edges to the zipper.
- _Edgestitch_ the waistband in place.
- Alternatively, _Slipstitch_ or _Whipstitch_ the waistband in place on the inside.

__Other closures__
- Press the waistband _good sides together_ along fold-line. Or along seam-line for curved waistband.
- Sew the overhangs with your seam allowance.
- Turn the waistband out and to the inside, Press.
- _Egdestitch_ the waistband in place, this should also close the gap of the over-lap.
- Alternatively, _Slipstich_ or _Whipstitch_ the waistband in place on the inside and close the gap of the over-lap with _Slipstiching_.
- Add snaps, dress hooks or button and buttonhole, whatever is your preferred closure to the waistband overhang.

### Seamless

- If curved waistband with _good sides together_ sew the two waistbands together along the shortest curved edge. Press away from one another, Trim and clip the seam.
- With _good sides together_ sew the waistband together along the short seams, leaving a gap for the elastic that will be on the inside.
- Press under the seam allowance on the long edge of the waistband that is intended to be on the inside.
- With _good sides together_ attach the waistband to the skirt along the unpressed seam. Trim seam.
- Press waistband and seam allowance up away from skirt.
- Press the waistband to the inside along the fold-line/seam-line.
- _Edgestitch_ the waistband in place.
- Alternatively you can _Slipstitch_ or _Whipstitch_ the waistband in place on the inside.
- Cut the elastic to your waist.
- Thread the elastic through the opening of the waistband making sure not to lose the end.
- Overlap the ends of the elastic by 1cm (3/8 inch) and zig-zag stitch in place.
- Tuck elastic into waistband and close the opening with hand-sewing.

## Step 5: Hemming

If you have hemmed the skirt with the lining you can skip this step.

Hem the skirt in one of the following ways:
- Omit the hem allowance and bind the raw edge.
- Bind the raw edge of the hem allowance, single fold the hem under and either _Topstitch_ or hand sew the hem in place.
- Double fold the hem under and either _Topstitch_ or hand sew the hem in place. You may have heard this be called a Rolled hem.

<Note>

There are many ways to hem/face the bottom of a skirt, If you have a prefered method use it here.

</Note>

## Step 6: Enjoy!

 Now go enjoy your wonderful new skirt and try not to get too dizzy showing off it's fullness!

<Note>

These instructions are just a suggestion, there are many ways to construct a circle skirt so feel free to deviate or completely disregard. If you need help, you can always reach out to [other FreeSewers](https://discord.freesewing.org/) in our discord.

</Note>

license: MIT

repository: freesewing/freesewing

branch_name: refs/heads/develop

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: freesewing/freesewing


text:
# Project Title

Named pipes implementation for inter-process communication on a Raspberry in C++

## Getting Started

These instructions will give all the instructions to setup C++ implementation of named pipes

### Prerequisites

Visual Studio with C++ cross platform implementation

### Installing

Build the solution with visual studio and move the binnary produced to a raspberry foldes.

You can use FileZilla to move files to raspberry over SSH.

Open two SSH connection with Raspberry Pi

Give permitions to run ServerRPI.out

```
chmod 755 ServerRPI.out
```

## Running

First run the server

```
./PipeTester.out s
```

Then run the client

```
./PipeTester.out c
```

## Acknowledgments

* This code was used for a solution to communicate with an existing process without being intrusive to the existing process and with low impact

branch_name: refs/heads/master


text:
# VSI Autoscale Group

This template creates a VSI autoscale group across any number of subnets. This autoscale group is connected by a VPC Load Balancer.

![VSI Autoscale Group](./.docs/autoscale.png)

## Table of Contents

1. [Prerequisites](##Prerequisites)
2. [Network](##network)
3. [Load Balancer](##load-balancer)
4. [SSH Key](##ssh-key)
5. [Instance Template](##instance-template)
6. [Instance Group](##Instance-Group)
7. [Module Variables](##Module-Variables)

---

## Prerequisites

This template requires an existing VPC with at least one subnet attached. This example installs NGINX on the VSI and requires the virtual servers in the autoscale group to be able to recieve inbound traffic and send outbound traffic.

To read more about autoscaling on VPC, read the docs [here](https://cloud.ibm.com/docs/vpc?topic=vpc-creating-auto-scale-instance-group&locale=en).

---

## Network

An example security group with two rules is created for the autoscale group. For this example, it creates rules to allow both all inbound and all outbound traffic from the servers in the autoscale group

---

## Load Balancer

The Virtual Servers in the autoscale group are connected via a VPC Load Balancer. This load balancer is created across all of the subnets where the autoscale group will be created. A back end pool is also created. Once the autoscale group has finished provisioning, a listener will be added to expose the example NGINX application.

---

## SSH Key

This module creates an ssh key for VPC using the `ssh_public_key` variable. To use an existing SSH Key, change this block and it's references to a `data` block.

---

## Instance Template

To create an autoscaling group, a template for the virtual servers is created. This module attaches it to the first subnet in the list of `subnet_ids` variable. The template is screated with the SSH Public Key. That key will be used by all of the machines in the autoscale group.

---

## Instance Group

An autoscale instance group is created based on the instance template. To enable autoscaling, an instance group manager is created. Instance Group Policies are also created to allow for dynamic scaling of the virtual servers

---

## Module Variables

### Account Variables

Variable Name            | Type   | Description                                                                                | Default
-------------------------|--------|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------
`ibmcloud_api_key`       | string | The IBM Cloud platform API key needed to deploy IAM enabled resources                                       |
`ibm_region`             | string | IBM Cloud region where all resources will be deployed                                                       |
`resource_group`         | string | Name of resource group to create VPC                                                                        | `asset-development`
`unique_id`              | string | The IBM Cloud platform API key needed to deploy IAM enabled resources                                       | `asset-module-vsi`

### VPC Variables

Variable Name            | Type   | Description                                                                                | Default
-------------------------|--------|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------
`vpc_name`               | string | Name of VPC                                                                                |
`subnet_ids`             | list   | A list of subnet ids where the VSI will be deployed                                                         |

## Virtual Server Variables

Variable Name            | Type   | Description                                                                                | Default
-------------------------|--------|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------
`image`                  | string | Image name used for VSI. Run 'ibmcloud is images' to find available images in a region                      | `ibm-centos-7-6-minimal-amd64-2`
`ssh_public_key`         | string | ssh public key to use for vsi                                                                               |
`machine_type`           | string | VSI machine type. Run 'ibmcloud is instance-profiles' to get a list of regional profiles                    | `bx2-8x32`
`application_port`       | string | The port number of the application running in the server member.                                            | `80`

### Instace Group Manager Variables

Variable Name            | Type   | Description                                                                                | Default
-------------------------|--------|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------
`enable_manager`         | bool   | Enable or disable the instance group manager. Default value is true                                         | `true`
`min_instances`          | number | Minimum of VSI instances for autoscaling group                                                              | `3`
`max_instances`          | number | Maximum number of instances in autoscaling group                                                            | `9`
`aggregation_window`     | number | The time window in seconds to aggregate metrics prior to evaluation.                                        | `120`
`cooldown`               | number | The duration of time in seconds to pause further scale actions after scaling has taken place.               | `300`
`manager_type`           | string | The type of instance group manager. Default value is autoscale.                                             | `autoscale`
`group_manager_policies` | list   | A list of policies for your instance group manager                                                          | `[{ metric_type  = "cpu" }`<br> `{ metric_value = 70 }]`

### Load Balancer Variables

Variable Name            | Type   | Description                                                                                | Default
-------------------------|--------|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------
`lb_type`                | string | Load Balancer type, can be public or private                                                                | `public`
`algorithm`              | string | The load balancing algorithm. Supported values are round_robin, weighted_round_robin, and least_connections | `round_robin`
`protocol`               | string | The pool protocol. Supported values are http, and tcp.                                                      | `http`
`health_delay`           | String | The health check interval in seconds. Interval must be greater than timeout value.                          | `10`
`health_retries`         | string | The health check max retries.                                                                               | `10`
`health_timeout`         | string | The health check timeout in seconds.                                                                        | `5`
`health_type`            | string | The pool protocol. Supported values are http, and tcp.                                                      | `http`
`listener_protocol`      | string | The listener protocol. Supported values are http, tcp, and https                                            | `http`
`certificate_instance`   | string | Optional, the CRN of a certificate instance to use with the load balancer.                                  | `""`
`connection_limit`       | number | Optional, connection limit for the listener. Valid range 1 to 15000.                                        | `0`

repository: Cloud-Schematics/vsi-autoscale-group

branch_name: refs/heads/main

repo_name: Cloud-Schematics/vsi-autoscale-group


text:
# Big Data Simple Workflow example

- **Event** (log) producer implemented in Java,

  cofigured to send data via TCP socket.

- **Flume agent configuration** attached,

  source: **Netcat**

  channel: **Memory**

  sink: **Data stream into Textfile**

  Configured to store data on hdfs _'partitioned'_ by date.

- **Hive QL** queries with some simple data processing

  with scores stored in Hive tables.

  Data for countries can be found here:

  https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip

- **Scoop** commands for transfering HiveQL results into

  PostgreSQL RDBMS.

- **Spark approach** written in _Scala_, consisting

  same processing like in HiveQL, but using different Spark API's

  - ***RDD (Resilient Distributed Datased)***
  - ***Dataset/Dataframe*** with loading data into RDBMS.


text:
---
id: researching-and-asking-for-help
title: The "Researching Attitude" and Asking for Help
sidebar_label: The "Researching Attitude" and Asking for Help
---

## Introductory
Researching is how we learn things in life in general. There was that one guy who poked his finger in fire and learnt that it hurt - that's how we know that fire is dangerous by nature. Whilst it might sound rather condescending to be discussing this, adopting an effective attitude towards researching is an extremely important theme in life - let alone Cybersecurity.

## Researching Within the Context of Cybersecurity
As a Hacker, learning things about your target is the first step in attacking it. Besides the knowledge you need to learn on how to utilise the tools that you will be using, researching information gathered from your target is an essential step in knowing **how** to attack your target.

**[MuirlandOracle](https://tryhackme.com/p/MuirlandOracle)** has created a fantastic room on the various things that are worth researching - both for attacking a target and learning how to use the tools to do so. I greatly encourage **[participating in the room](https://tryhackme.com/room/introtoresearch)**, to gain these vital skills.

## Asking for Help
Whilst TryHackMe is a platform aimed at introducing Cybersecurity to beginners, we assume that there is a willingness to learn, and don't like to spoon-feed solutions. In the long-run - there is no beneficiary to you!

We **really** encourage platform users to try and solve problems they come across within rooms themselves - patience is key - like in the real world. Sometimes taking a "breather"; A couple of minutes away from the task and re-approaching it with a fresh mindset will solve your issue alone.

However, even after you've extensively researched and you still need a point in the right direction, that's what the community is here for - and arguably what makes it so great.

![dont just ask to ask](https://i.imgur.com/WBmLS1c.png)

When asking for help, don't just ask! I.e. "can I have help?" Instead, state your problem and the steps you have performed to try and resolve it. For example, a great "ask" is:

> Hi, I'm having an issue with Task #43 - Question #1 in the room [Learn Linux](https://tryhackme.com/room/zthlinux). I have tried at looking **x**,**y**,**z** and I have googled what I think might be a vulnerability. However, I can't seem to find any way to progress. Can someone offer some advice? Thanks!

Greatly formatted questions are both really helpful in exchanges between users. The Discord can be slow at times, so formatting your question similar to the one above skips the process of trying to figure out where you're stuck and on what room.

### Mentors
A fantastic attribute to TryHackMe is the community itself. Other users like to help each other out - and it's wonderful. We really encourage users to continue helping each other out.

However, we can't solely rely on users to be there 24/7 for each other, nor validate what they are saying. TryHackMe has users who throughout time have consistently guided other users through issues they experience...from technical issues relating to connecting to the network to providing resources to help resolve challenges.

**These Mentors, much like Moderators are not paid** and are users of the TryHackMe platform such as yourself! Because of this, please be patient. If your answer isn't answered by any user - someone will get to it as and when they can! There is no need to post your issue in every and all channels.

Finally, **Community Mentors** don't give answers directly but instead provide resources that will help you resolve your issue yourself! All in the name of learning...


text:
# ITS-FamilyTree

## Information on tree.pl
Within the tree.pl you can find all the facts and rules which define our Expert System.

Our preferred interference engine to use is SWI-Prolog, you can use this engine for free on any system.
Implicitly, we allow the usage of forward and backward chaining. From data we can reach a goal, and from a goal we can reach data.

## Running the tree
You can simply run the family tree by running your favorite prolog interference engine and typing the following in the command-line:

`[tree].`

Following that, you can use any of the defined rules in the tree.pl file, e.g.:

`sister_of(marijn, X).`

Here you will retrieve all of the sisters of family member "marijn".

repository: MarijnStam/ITS-FamilyTree

repo_name: MarijnStam/ITS-FamilyTree


text:
---
Primary Network Resource Creation in Azure via Terraform
---

## Installation
You need to install following tools to successfully execute the Terraform code to create infrastructure.
- [Terraform CLI](https://www.terraform.io/downloads.html)
- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
- [VS Code Editor](https://code.visualstudio.com/download)
- [VS Code Plugin For Terraform](https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform)
- [Git Client](https://git-scm.com/downloads)

## Step-01: Cloning The Repository
- Open Terminal
- Change the current working directory to the location where you want the cloned directory
- Execute the following command

```bash
git clone https://github.com/swastik-mukherjee/Terraform-nw-resource-creation.git
```

## Step-02: open the directory in VS code Editor and Modify accordingly
Once all the tools are installed and AZ cli are configured properly you can now able to play with the code. All the files in the repository starting with c1 signifies it as the configuration file.

##
- c1-versions.tf
- c2-resource-group.tf
- c3-network-resources.tf

## Step-3: Execute the code to create Infrastructure

```python
#Initialize a working directory of configuration file
terraform init

# Validates the syntax of every configuration file
terraform validate

# Creates an execution plan for the resources
terraform plan

# Creates the actual resources in the Azure portal
terraform apply -auto-approve
```
## Step-4: Verify the resources created  in the Azure portal
you can login to portal.azure.com with your login id and password. Refresh the page and you can see all the infrastructure created as per the configuration specified.

## Step-5: Destroy the resources (Optional)
```python
# Optional - If you want to delete all the resources created in the environment
terraform destroy -auto-approve

# Delete Terraform files
rm -rf .terraform*
rm -rf terraform.tfstate*
```
## Step-6: Verify the resources deleted in the Azure portal
you can login to portal.azure.com with your login id and password. Refresh the page and you can see all the infrastructure created as per the configuration specified.

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## Feedback

If you have any feedback, please reach out to me at<EMAIL_ADDRESS>## Authors

- [@SwastikMukherjee](https://github.com/swastik-mukherjee)

## License
[MIT](https://choosealicense.com/licenses/mit/)


text:
# Tether Well

![Tether Well Header](promo/itch-banner.png)

For up-to-date information please see the Itch.io page for this project (including HTML5 build), here: https://sambigos.itch.io/tether-well

# About

Tether Well is a tether-based platformer being developed for Brakeys Game Jam 2020.2.

Thank you for your interest!


text:
# Password Generator

Create an application that generates a random password based on user-selected criteria. This app will run in the browser and feature dynamically updated HTML and CSS powered by your JavaScript code. It will also feature a clean and polished user interface and be responsive, ensuring that it adapts to multiple screen sizes.

## User Story

```
AS AN employee with access to sensitive data
I WANT to randomly generate a password that meets certain criteria
SO THAT I can create a strong password that provides greater security
```

## Acceptance Criteria

```
GIVEN I need a new, secure password
WHEN I click the button to generate a password
THEN I am presented with a series of prompts for password criteria
WHEN prompted for password criteria
THEN I select which criteria to include in the password
WHEN prompted for the length of the password
THEN I choose a length of at least 8 characters and no more than 128 characters
WHEN prompted for character types to include in the password
THEN I choose lowercase, uppercase, numeric, and/or special characters
WHEN I answer each prompt
THEN my input should be validated and at least one character type should be selected
WHEN all prompts are answered
THEN a password is generated that matches the selected criteria
WHEN the password is generated
THEN the password is either displayed in an alert or written to the page
```

## Installation

clone repository (https://github.com/DevinPask/Password-Generator-) to display locally.

```bash
git clone https://github.com/DevinPask/Password-Generator-.git
```
```Deployed Site
https://devinpask.github.io/Password-Generator-/
```
```
screenshots:

The following image demonstrates the application functionality:

![password generator demo](./Assets/image/screenshot.jpg)

## Usage

```https://choosealicense.com/licenses/mit/
```

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
  overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
  advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
  address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior,  harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)

repository: DevinPask/Password-Generator-

repo_name: DevinPask/Password-Generator-


text:
---
title: Technical - Converting from iso-8859-1 to utf8
description: Modern sites should use UTF8 or UTF8MB4
category: upgrading
weight: 20
---

### Do I need to convert to UTF-8?

Modern databases can handle "multibyte characters" such as emojis. Older databases cannot.
If your customers enter emoji symbols in order-comments or contact-us emails, it may trigger errors on your store resulting in unexpected results and lost details.
Also, older database structures don't handle non-english characters as well as utf8 does, which is why utf8 has been the international "standard" for many years.

Since Zen Cart v1.5.0 all **new** sites install database tables with the UTF8 character-set.
Since Zen Cart v1.5.6 all **new** sites install database tables with the UTF8MB4 character-set.

If your site is from an older version, your database might still contain older data structures that don't support modern multibyte characters.

To change the database to utf8mb4, use the instructions below.

## Converting to UTF8MB4:

1\. Use this [conversion utility to convert your data to UTF8](https://github.com/zencart/utf8mb4-converter) (AFTER MAKING AND TESTING A DATABASE BACKUP): [https://github.com/zencart/utf8mb4-converter](https://github.com/zencart/utf8mb4-converter)

2\. Update your PHP files to indicate your UTF-8 intentions. (If you installed your site NEW since v1.5.0 or newer, then the following are ALREADY done for you. But, if you UPGRADED from a version prior to 1.5.0, then you will need to double-check each of the following:)

a.  Edit /admin/includes/languages/english.php (and all other language_name.php files in that folder) and set the define for CHARSET to 'utf-8'.
    Do the same with the non-admin /includes/languages/english.php (and other language_name.php files in that folder)
    ... AND ...

b.  Also edit your two configure.php files to set DB_CHARSET to 'utf8':
    define('DB_CHARSET', 'utf8');
    (Remember, the configure.php files are most likely set to read-only on your server, so you'll need to change their permissions on the server to be writable before you can save the changes you're making.)
    (Remember, you must do this for **both** your /YOURADMIN/includes/configure.php **and** /includes/configure.php )

ASIDE: Useful video about the history behind why UTF8 was created: [https://www.youtube.com/watch?v=MijmeoH9LT4](https://www.youtube.com/watch?v=MijmeoH9LT4)


text:
# bs-react-intl-extractor

Extracts messages for localization from [Reason] source files.
This assumes that you are using the [bs-react-intl] bindings for [react-intl].

[![NPM](https://nodei.co/npm/bs-react-intl-extractor-bin.png?compact=true)](https://nodei.co/npm/bs-react-intl-extractor-bin/)
[![Build Status](https://travis-ci.org/cknitt/bs-react-intl-extractor.svg?branch=master)](https://travis-ci.org/cknitt/bs-react-intl-extractor)

## Installation

Binaries for macOS and Linux can be installed via npm or yarn. For global installation, run

```sh
npm install -g bs-react-intl-extractor-bin
```

Alternatively, the binaries are also available for download on the [releases page].

## Usage

```sh
bs-react-intl-extractor [--allow-duplicates] [path...]
```

where `path` is a Reason source file or a directory containing Reason source files. Multiple files/directories may be specified.

The `--allow-duplicates` option allows messages with identical `id` props if the `defaultMessage` props are identical as well.

Formatted messages may be defined in your source files in one of the following three ways:

1.  inline in `FormattedMessage`:

```reason
<ReactIntl.FormattedMessage id="some.message.id" defaultMessage="Some message" />
```

or

```reason
open ReactIntl;
...
<FormattedMessage id="some.message.id" defaultMessage="Some message" />
```

2.  using `ReactIntl.defineMessages`:

```reason
let messages =
  ReactIntl.defineMessages(. {
    "hello": {
      "id": "message.hello",
      "defaultMessage": "Hello",
    },
    "world": {
      "id": "message.world",
      "defaultMessage": "World",
    },
  });
```

or

```reason
open ReactIntl;
...
let messages =
  defineMessages(. {
    "hello": {
      "id": "message.hello",
      "defaultMessage": "Hello",
    },
    "world": {
      "id": "message.world",
      "defaultMessage": "World",
    },
  });
```

3.  using the attribute<EMAIL_ADDRESS>
```reason
let messages =
<EMAIL_ADDRESS>  {
    "hello": {
      "id": "message.hello",
      "defaultMessage": "Hello",
    },
    "world": {
      "id": "message.world",
      "defaultMessage": "World",
    },
  };
```

The output (a JSON array of all extracted messages sorted by id) is written to stdout. It will look like this:

```json
[
  {
    "id": "message.hello",
    "defaultMessage": "Hello"
  },
  {
    "id": "message.world",
    "defaultMessage": "World"
  },
  {
    "id": "some.message.id",
    "defaultMessage": "Some message"
  }
]
```

## Building and Testing

Install [esy] as follows:

    % npm install -g esy@latest

Then you can install the project dependencies using:

    % esy install

Then build the project dependencies along with the project itself:

    % esy build

Run the compiled executable:

    % esy x Extract.exe

Run the tests:

    % esy x Test.exe

[reason]: https://reasonml.github.io
[bs-react-intl]: https://github.com/alexfedoseev/bs-react-intl
[react-intl]: https://github.com/yahoo/react-intl
[releases page]: https://github.com/cknitt/bs-react-intl-extractor/releases
[esy]: https://esy.sh

repository: jchavarri/bs-react-intl-extractor

repo_name: jchavarri/bs-react-intl-extractor