text:
Judaism/Common Jewish Expressions

Jewish culture covers an extensive number of languages and dialects. Throughout history, it was common for Jews to codeswitch between one or more Jewish languages and the non-Jewish languages they might encounter. Most Jewish dialects and languages are written in Hebrew script and can be demonstrated to each contain numerous Hebrew and Tanakhic influences on linguistic factors such as vocabulary and tone, reflecting their common origin. While not all Jews are religious, practically all contemporary Jewish culture can find religious and spiritual influence in its roots.

Hebrew & Aramaic
Baruch Hashem B '' H

yasher koach

Chazak Chazak V'Nitchazek "be strong, be strong and have courage" the words spoken to Joshua after the death of Moses

tzadek a virtuous Jew and renowned Torah scholar

tzedakah charity

goyim

Israel

rabbi

rebbe

Yimak Sh'mo "may his name be blotted out" an epithet for particularly infamous, heinous and evil individuals, desiring the name be disremembered.

Yiddish
schlep

schmaltz

gornischt

tukhes

"If my sheep had a beard, it would be a goat"

"What is justice to the sheep when the wolf is the judge?"

"A worm at the bottom of a jar of horseradish, thinks its life is sweetest in all the world"

"A child's wisdom is also wisdom"

"If two soldiers could see what the other sees, there would be no more war"

"A language is a dialect with a navy and army"

Yinglish & Yeshivish
What am I, chopped liver?

Don't hide your light under a bushel

"For this," as in "For this, I came all this way? For this, I waited so long?  For this, I raised you?"

You are giving me a conniption! -while conniption is not a Hebraic vocabulary word, it has been adopted as a favorite word of English-speaking Jews

"The Yod, The Hey, the Vav, the Hey" a way of referencing the tetragammaton without invoking and disrespecting this divine name, sanctified in the Torah and forbidden from being erased or defaced. This is an important principle to many observant Jews. The names of God are regarded with increasing sanctity the closer they approach the true name of God. This name is treated with utmost sanctity, second only to the true name. Kabbalah indicates that a Golem can be created by the act of speaking the true name, which due to its many syllables requires several hours of intense concentration and reportedly carries mortal consequences for making a single mistake.

Yoshke - a dismissive name for Jesus, who is believed to be neither divine nor a prophet.

Judeo-Arabic
yalla

title: Judaism/Common Jewish Expressions


text:
Lernung þer Stafræwe

Þisse Bok wirþ gemænd, fram anem Akennend/Ward to anem Cild geræden to werðen, soþat hje þie Stafræwen þes Bokstafes lernen kunneþ.

Fodenstafræwe Lemon.jpgTomato_je.jpgKiwi aka.jpg -- /A/ /B/  /C/  /D/  /E/  /F/  /G/  /H/  /I/  /J/  /K/  /L/  /M/  /N/  /O/  /P/  /Q/  /R/  /S/  /T/  /U/  /V/  /W/  /X/  /Y/  /Z/ --

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Lernung þer Stafræwe


text:
Lernung þer Stafræwe/A

A beginnþ þat Word Appel

== Fodenstafræwe

-- /A/ /B/  /C/  /D/  /E/  /F/  /G/  /H/  /I/  /J/  /K/  /L/  /M/  /N/  /O/  /P/  /Q/  /R/  /S/  /T/  /U/  /V/  /W/  /X/  /Y/  /Z/ --

title: Lernung þer Stafræwe/A


text:
Lernung þer Stafræwe/B

B beginnþ þat Word Banane

title: Lernung þer Stafræwe/B


text:
Niw Englisch/Adjectives

Adjectives in Niw Englisch operate much like they did in Old English and do currently in German.

Inflection
All adjectives have a strong and weak inflection. The strong inflection occurs when not preceded by a limiting article, while the weak inflection occurs after an article. Predicate Adjectives have no inflection.

These all can be derived from the Old English forms by weakening the ending vowel to schwa, written as 'e'.

Examples:
 * ic habe strange Wille - I have strong will.
 * wiȝ sind ferr - we are far.

Example:
 * þat Huus þes alden Werres - the house of the old man
 * þie Farbe þes niwen Autos - the color of the new car
 * þat blæe Auto

Comparison
In Niw Englisch, comparison is done much like Old English and German. All adjectives take -er and -est in the comparative and superlative. Some one-syllable basic adjectives umlaut in those forms.

 * ald old - ælder, ældest
 * brad broad - bræder, brædest
 * ferr far - fierr, fierrst
 * great great - grietter, griettst
 * ȝong young - ȝœnger, ȝœngst
 * heah high - hierr-, hiehst-
 * lang long - længer, længst
 * schort short - schœrter, schœrtst
 * strang strong - strænger, strængst-

Examples:
 * ic em ælder þonn mein Weif - I am older than my wife
 * Ic em þe ȝœngere Broðer - I am the younger brother
 * þu ert þie ȝœngste Swester - you are the youngest sister.

Phrases
To say that something is more/less some quality than something else, just use the comparative and the adverb þonn afterwards, followed by the nominative case.
 * Older/Younger Than - ælder/ȝœnger þonn

To say 'far from', use ferr and the noun in the inflected dative, especially for plural nouns:
 * ic wune Byrgen ferr - I live far from cities
 * Mein Broðer is ferr þem Huse - my brother is far from the house.

With pronouns, it is common to use 'fram', but without is perfectly correct:
 * here Herte is ferr fram miȝ - her heart is far from me.

Genitive

 * gewiss - certain
 * gewiss þer Fakte - certain of the facts
 * gewær - aware
 * gewær þer Andsware
 * schyldiȝ - guilty
 * schyldiȝ þes Maanes - guilty of the crime
 * werþ - worthy
 * he is werþ herer Teid - he is worthy of her time

title: Niw Englisch/Adjectives


text:
Niw Englisch/Verbs

Verbs in Niw Englisch are much simpler than Latin and other Romance languages, and Old English and German, but slightly more complicated than in modern English. There are two types of verbs: strong and weak. Weak verbs add -te or -de to form the past tense; strong verbs are strong enough to change their vowels to indicate time.

Present Indicative
Just about every verb follows the same declension in the present:

The second and third person singular add an 'e' back when there's a consonant cluster that would render the ending unintelligible.

Examples:
 * þu findest - you find
 * he buþ naȝh miȝ - he lives near me.

The indicative is a mood describing facts or what you believe is true.

Imperative
The command form is the imperative mood. Simply take the stem of the verb for the singular, or add -eþ in the plural. Verbs with consonant clusters at the end add -e for intelligibility:

Examples:
 * finde hin! - find him!
 * dæl þie Karten! - distribute/deal the cards!
 * gaaþ haam! - y'all go home!

Subjunctive
This is the mood of reported speech where you are unsure of the veracity of it, or to express wishes or desires or other contrary to fact statements.

For example:
 * he sæȝde, þat he it nu sœke - he said that he's looking for it now (but I don't know for certain)
 * if he it finde, kann ic mid þiȝ gaan - if he finds it (but he may not), I can go with you.

title: Niw Englisch/Verbs


text:
User:L10nM4st3r/Cool lion images

Cool lion images
Note: this user subpage is for me too look at and enjoy my favorite lion pictures, in hope that I find a good place for them.

Plus 2 others, but I can't find the link.

title: User:L10nM4st3r/Cool lion images


text: User talk:2806:1000:8005:9E93:1956:F92D:D8B7:E69


text:
User:L10nM4st3r/thank

Thanks!

title: User:L10nM4st3r/thank


text:
User:L10nM4st3r/sandbox

| ../Sandbox 2/

Just random text.

I'm jealous. You can see this text but I can't :(

Yes, of course I made a similar thing that has the reveced effects :) You know what, for being so smart, tell me if you can actually see this!

I have so many socks! I don't even know what to do with them. At least they feel soft, and aren't too small, either. Though a few have some holes in them :( I have socks of every colour of the rainbow, btw, multiple of each colour ;)

I got it! If I put my hand in them, it becomes a puppet, or more precisely: a sockpuppet! (please don't block me, I can explain: blocks in games like minecraft are too large, you can't add any detail!)

You are now a reviewer
Thanks for your contributions. You have recently been auto-promoted to reviewer, meaning you can flag revisions and use rollback. L10nM4st3r / Roar at me 17:00, 21 July 2022 (UTC)

title: User:L10nM4st3r/sandbox


text:
Guide to the Godot game engine/Programming/GDScript/If conditions

These keywords are for if statements.

not
The not keyword reverses the condition that is placed afterword.

As an alternative, you can use "!".

and
The and keyword checks if the values before and after it are both true.

or
The or keyword checks if a value before or after it is true.


text:
User talk:170.93.140.42

\:)

title: User talk:170.93.140.42


text:
US Constitutional Law/Introduction to Governmental Structure

The U.S. Constitution, ratified on June 21, 1788, contained no Bill of Rights.


title: User:L10nM4st3r/activeLevel


text:
User:L10nM4st3r/showActiveLevel

 My current activity:

This may not be accurate for several reasons. Last updated: : / 29 (Monday) of July 2024 (including daylight savings)

title: User:L10nM4st3r/showActiveLevel


text:
Information Technology and Ethics/Social Media Privacy and Ethics

Introduction
Interacting with friends and family across long distances has been a concern of humans for centuries. People have always relied on communication to strengthen their relationships. When face-to-face discussions are impossible or inconvenient, humans have dreamed up plenty of creative solutions. Nowadays, one can no longer imagine how to catch up with friends and contacts without social networking. Social networking helped us become closer to our friends, even when they are thousands of miles away. Through the Internet, we are able to connect with people from around the world. More than half of the world now uses social media (58.4%); 4.82 billion people around the world now uses social media, 424 million new users have come online within the last 12 months; the average daily time spent using social media is 2h 27m.

Social networking now is a billion dollar industry. While the most widely used social networking services are free, they operate on large platforms that offer a range of related products and services that underpin their business models, from targeted advertising and data licensing to cloud storage and enterprise software. Ethical impacts of social networking services clustered into three categories:

 * Direct impacts of social networking activity itself
 * Indirect impacts associated with underlying business models that are enabled by such activity
 * Structural implications of social networking services as novel  sociopolitical and cultural forces

While social media has a lot of advantages, it has also had some drawbacks. The increased use of social media is accompanied by privacy issues and ethical concerns. These privacy issues can have far-reaching professional, personal and security implications. Ultimate privacy in the social media domain is very difficult because these media are designed for sharing information. Security and privacy issues are two such issues that have dominated the attention of social media platforms like Facebook. Social media may be widely exploited to obtain and exploit information on anyone.

Data harvesting
Social media has leveraged a significant amount of its revenue from selling user information to various companies and advertising campaigns. In fact Facebook generated approximately 35.2 billion dollars or about 64 percent of its revenue from harvesting user data. This came down to about 220 dollars per American user, further emphasizing the importance of extracting user data in their business model. While data mining has helped many organizations and models become more efficient, it has also come with grave ethical and legal concerns.

One of the biggest issues with data mining is the security issues that come with having such a big depot of often sensitive and personal data. There have been various hacks throughout the course of the years that have compromised user data from social media companies. Just last year, there were major data breaches with Facebook, LinkedIn and other social media platforms that compromised millions of users' data to the highest bidder. Even if the proper security protocols are put into place when inputting data, there is no guarantee that the output of data will have the same expectation of security. A multitude of mining techniques have been documented that put user data at risk once the data has been harvested which allows nefarious actors to economize that data at the users expense.

Due to these concerns many companies have taken actions to better protect the user experience by implementing safeguards that make data harvesting more difficult. Companies such as Apple, Google, and many others have taken steps to better protect consumer data which, while has limited the reach of social media platforms, has not entirely eliminated the issue of data harvesting as they have implemented various counter measures to subvert these safeguards. Until a substantial measure is taken to discourage social media platforms to harvest data, ethical and security concerns will continue to exist to the end user.

Social Media platform responsibilities towards content
Facebook’s systems as well as other social media platforms like Twitter harvest personal data at a scale unimaginable. Many of these platforms are seen to advertise asymmetric propaganda creating an epistemic crisis. During the 2016 U.S. presidential elections and campaigns the Russian government were seen to spy and inject false information onto these sites. The inflammatory content that was being seen in their ads claimed that specific individuals or a group of people are and will be threats to the safety of others. Crime isn’t caused against these people from thin air, it is the social media platforms that can act as a method of propagating hateful actions. If you accuse someone of making inflammatory comments or statements, then what you are referring to is that person make a group of people to act in negative ways. The United States have seen hate crimes against Asians because of inflammatory ads and these ads are being amplified on social networking services who then in return start to believe this information. The data collection and the use of algorithms are at fault with this because malicious actors use bots to click and boost these ads into the public discourse.

Facebook, Twitter, Google and other social media platforms should be held accountable and have the core responsibility to mitigate these ads from appearing on their sites that attract hundreds of millions of users. Analysts say that researchers looking at tweets will find roughly 3% of their collected messages to be abusive with hate speech and physical threats. The ethical implications that these social networks are responsible for are aimed and to be analyzed by the intent, procedures, and the direct implications on human behavior. Overall, everyone should including business/government entities should act on the rule that would be admitted to becoming a universal law by all rational beings (Kant, 1993). Thus, the freedom of speech requires responsibility and is applied to all variety of regimes including political, public, and media cultures.

Disinformation and how it affects culture and the political state, is it right to do so etc.?
Disinformation is a major problem in today’s world, especially in this age of digital media. News can be shared in an instant from various different platforms. Twitter, Facebook, Google, Reddit, etc. are all different platforms where news can be retrieved in an instant. However, how accurate is this information? If it’s not accurate, was it done intentionally? Unfortunately, not everyone who sees news headlines thinks about these things. This is what has led to vast amounts of disinformation being spread every day and that has begun affecting our society.

According to a study, false stories reached people and spread faster than the truth. (Science, 2018) When one first reads these stories, most do not tend to look into the validity of this information and less find out afterwards the truth. This has led to a lot of platforms creating articles with disinformation and “click bait” titles that are intended just to drive more eyes or clicks on their articles. The fast spread of disinformation in the news has even led to big changes in our society. An example of how our society has been affected by disinformation being spread was with the recent pandemic.

Since the pandemic began in early 2020, there has been widespread misinformation that has been spread just about anywhere. Everything to do with the pandemic, including masks, vaccines, the virus, etc, have all received different kinds of misinformation that has led to society having different opinions about these subjects going as far as involving the political state. A certain wave of misinformation that came out during the pandemic was about the vaccines. The rumor was that the vaccines were causing infertility in both men and women and that caused hesitancy and people to receive the vaccine. This was later concluded to be false in a joint statement by the American College of Obstetricians and Gynecologists, the American Society for Reproductive Medicine, and the Society for Maternal-Fetal Medicine. However, the seeds were already planted and distrust was already spread throughout society which made future disinformation to easily be accepted.

Legal issues concerning social media
Social media has impacted on people and businesses all over the world and has become an integral part of our day-to-day lives. Some of the well-known social media platforms are Facebook, YouTube, Instagram, LinkedIn, Twitter, SnapChat and TikTok. One of the main benefits of social media was to provide a platform to connect with family and friends. Businesses are disappearing out of traditional marketing and progressing to social media platforms, which provides advertising opportunities to increase their revenue. However just as the benefit’s social media provides there many legal issues that need to be considered when using them. Some of the legal concerns that business owners and regular users need to consider when using social media are: intellectual property, employment, defamation, privacy, and advertising law.

Social media has made intellectual property more difficult to regulate. Businesses need to be aware of their own businesses and their trademarks as well as third party trademarks. It is illegal to use another businesses trademark or service mark and that can result in infringement of intellectual property law. Therefore, before publishing any intellectual property on social media have a general knowledge about copyright laws to avoid any legal issues.

Some organizations use social media platforms to conduct background checks for new hires.. Since the information on social media sites may be under the Fair Credit Reporting Act and similar State laws, employers may have to get individual consent before accessing such information and make decisions based on that published information. If the company is discriminate an employee or firing an employee considering social media post, employee can take legal action based on discriminatory conduct under the National Labor Relations Act.

Defamation is another legal issue for social media users.:  It is illegal to use social media platforms to publish unfounded rumors and damage the reputation of an individual. One can argue this is a form of exercising one's freedom of speech however this can potentially cause havoc to the one on the receiving end. Defamation can result in a negative image on an organization which can lead to many negative results. Social media platforms should monitor for potential defamatory statements and should discourage such statements and take disciplinary actions immediately against them.

Social media has been a platform for interactive communication between companies and their customers in recent history than ever before. Social media platforms enable the gathering of user information and companies use this personal information which results in breaching the privacy laws and increasing the legal risk. Some of the most common methods used by social media to invade privacy are data scraping, leakage or personal data and online tracking.

There are advertising laws organizations need to consider before using social media for promoting their products and services. Scenarios where social media contests and sweepstakes that fail to obey the law and social media guidelines may have to face civil lawsuits, regulatory investigation and cancellation or deletion of social media accounts. Additionally, for social media sites that allow users to rate products or services, asking or forcing employees to rate them high may violate advertising laws concerning testimonials and endorsements which leads to legal issues.

Mental health and supervision
Social media has had a substantial effect in how individuals and organizations are allowed to communicate with one another. With the ability to reach millions of people instantaneously, social media has made it much easier for people and organizations all across the globe to share and receive information with a click of a button. However, while this has made it more convenient for everyone to be in contact with one another, it has also led to a much more disturbing emergence amongst the general population. Several mental health issues such as depression, anxiety, and low self-esteem have been linked to the use of social media especially in young adults. This is further driven home by when it was found that the more time a user spends on social media, the more likely they are to report feeling symptoms of mental health issues.

One of the reasons why young adults are more susceptible to mental health issues from social media is the emergence of validation culture from these platforms. Due to the model implemented in these platforms where you content can be “liked” and shown the number of views that it gets, young adults are increasingly attempting to feel validated by getting their peers to notice them on social media by using various tactics that include provocative pictures, filtered or edited content, and unrealistic portrayals of body image. While receiving the intended attention from a post or content is jovial, its effect only lasts temporarily and this causes the user to look for the next way to emulate that feeling. More often than not, the user feels “unworthy” or unfulfilled if they do not receive adulation and attention from their social media following. Glorification of self harm has also led to many young adults to look for ways to harm and or act in a suicidal manner to gain attention from viewers and build online clout. This troubling trend has caused suicide rates to increase by 24 percent from 1999 to 2014.

Online abuse has become much more prevalent since the emergence of social media platforms. While the benefit of easier and more profound communication has been realized using the various social media platforms, abuse and harassment has also come as an unintended consequence from these mediums as well. Online abuse and harassment has become such a big issue that it was found that cyberbullying had been experienced by as much as 40 percent of teenagers. This has directly correlated with suicide and self harm issues that have arisen since the emergence of social media platforms. These harrowing statistics make it clear that the negative effects of social media will continue to grow and until there is a real movement to address these issues, it will continue to negatively impact a large portion of society.


text:
Talk:Super Smash Bros. series strategy guide/Games/Super Smash Bros. Ultimate

Discuss

a ajmkja
aqmaojiqi 192.139.27.23 (discuss) 21:36, 26 October 2023 (UTC)


text:
Wikibooks:Requests for import/Archives/2022/February

Simple Imports
Use this section for simple imports that you are willing to wait for before working on the content. Add requests using the form: === Project:Page name === (Reason) ~

Proofs involving the Moore–Penrose inverse
In textbook style, and could be used for instance as the backbone of (a section in) Topics in Abstract Algebra/Linear algebra, which is provided for in the contents page of Topics in Abstract Algebra. Felix QW (discuss • contribs) 14:29, 31 January 2022 (UTC)
 * I've imported it to User:Felix QW/Proofs involving the Moore–Penrose inverse, please move it to wherever you like. -- Jules (Mrjulesd) 10:58, 1 February 2022 (UTC)
 * Thank you very much! Page dewikified, reformatted and moved!

Proofs involving the addition of natural numbers
Useful material for Mathematical Proof and the Principles of Mathematics/Numbers/Natural numbers and/or similar pages. In case it gets turned into a redirect before you get to it, please import it anyway, since the content can easily be recovered from the page history.
 * Imported to User:Felix QW/Proofs involving the addition of natural numbers. -- Jules (Mrjulesd) 18:33, 6 February 2022 (UTC)


text:
User talk:Superpes15

Welcome!
Welcome to Wikibooks, Superpes15!

 First steps tutorial Wikibooks is for collaborative development of free textbooks.

You do not need technical skills to contribute. You can easily change most books. Please introduce yourself, and let us know what interests you.

If you already contribute at other Wikimedia projects, our Wikimedia Orientation should quickly get you started. (Would you like to provide feedback on this message?)

  Getting help   Made a mistake?   Goodies, tips and tricks
 * Read the Using Wikibooks book for a friendly introduction to the project, or our help pages for more information.
 * You can get friendly help from the community in the user assistance room or our IRC channel.
 * Upload freely licensed files to Wikimedia Commons. You may request permission to upload fair use files locally. Please include author and source information and a non-free use rationale for non-free files.
 * You can restore a previously saved version.
 * Pages should follow the  naming convention.
 * Need to rename a page? Use the move tab (is available once your account is 4 days old - until then, ask for help).
 * To request a page be deleted, add to the top of the page.
 * Was a page you made deleted? Please read the deletion policy, and check the deletion log to find out why. Also check the RFD archives if applicable. You can request undeletion at WB:RFU, or ask the administrator who deleted the page.
 * Please fill in the edit summary and preview your edits before saving.
 * Sign your name on discussion pages by typing ~~~~
 * User scripts can make many tasks easier. Look at the Gadgets tab of my preferences; check off the boxes for the scripts you want, and hit save!

Thanks for your contributions -- Jules (Mrjulesd) 09:06, 10 March 2022 (UTC)

title: User talk:Superpes15


text:
User talk:WikiWingsuit

Welcome!
Welcome to Wikibooks, WikiWingsuit!

 First steps tutorial Wikibooks is for collaborative development of free textbooks.

You do not need technical skills to contribute. You can easily change most books. Please introduce yourself, and let us know what interests you.

If you already contribute at other Wikimedia projects, our Wikimedia Orientation should quickly get you started. (Would you like to provide feedback on this message?)

  Getting help   Made a mistake?   Goodies, tips and tricks
 * Read the Using Wikibooks book for a friendly introduction to the project, or our help pages for more information.
 * You can get friendly help from the community in the user assistance room or our IRC channel.
 * Upload freely licensed files to Wikimedia Commons. You may request permission to upload fair use files locally. Please include author and source information and a non-free use rationale for non-free files.
 * You can restore a previously saved version.
 * Pages should follow the  naming convention.
 * Need to rename a page? Use the move tab (is available once your account is 4 days old - until then, ask for help).
 * To request a page be deleted, add to the top of the page.
 * Was a page you made deleted? Please read the deletion policy, and check the deletion log to find out why. Also check the RFD archives if applicable. You can request undeletion at WB:RFU, or ask the administrator who deleted the page.
 * Please fill in the edit summary and preview your edits before saving.
 * Sign your name on discussion pages by typing ~~~~
 * User scripts can make many tasks easier. Look at the Gadgets tab of my preferences; check off the boxes for the scripts you want, and hit save!

Thanks for your contributions -- Jules (Mrjulesd) 09:09, 10 March 2022 (UTC)

title: User talk:WikiWingsuit


text:
User talk:Tpatel62

Welcome!
Welcome to Wikibooks, Tpatel62!

 First steps tutorial Wikibooks is for collaborative development of free textbooks.

You do not need technical skills to contribute. You can easily change most books. Please introduce yourself, and let us know what interests you.

If you already contribute at other Wikimedia projects, our Wikimedia Orientation should quickly get you started. (Would you like to provide feedback on this message?)

  Getting help   Made a mistake?   Goodies, tips and tricks
 * Read the Using Wikibooks book for a friendly introduction to the project, or our help pages for more information.
 * You can get friendly help from the community in the user assistance room or our IRC channel.
 * Upload freely licensed files to Wikimedia Commons. You may request permission to upload fair use files locally. Please include author and source information and a non-free use rationale for non-free files.
 * You can restore a previously saved version.
 * Pages should follow the  naming convention.
 * Need to rename a page? Use the move tab (is available once your account is 4 days old - until then, ask for help).
 * To request a page be deleted, add to the top of the page.
 * Was a page you made deleted? Please read the deletion policy, and check the deletion log to find out why. Also check the RFD archives if applicable. You can request undeletion at WB:RFU, or ask the administrator who deleted the page.
 * Please fill in the edit summary and preview your edits before saving.
 * Sign your name on discussion pages by typing ~~~~
 * User scripts can make many tasks easier. Look at the Gadgets tab of my preferences; check off the boxes for the scripts you want, and hit save!

Thanks for your contributions -- Jules (Mrjulesd) 09:46, 10 March 2022 (UTC)

title: User talk:Tpatel62


text:
User talk:FactCheck105

Welcome!
Welcome to Wikibooks, FactCheck105!

 First steps tutorial Wikibooks is for collaborative development of free textbooks.

You do not need technical skills to contribute. You can easily change most books. Please introduce yourself, and let us know what interests you.

If you already contribute at other Wikimedia projects, our Wikimedia Orientation should quickly get you started. (Would you like to provide feedback on this message?)

  Getting help   Made a mistake?   Goodies, tips and tricks
 * Read the Using Wikibooks book for a friendly introduction to the project, or our help pages for more information.
 * You can get friendly help from the community in the user assistance room or our IRC channel.
 * Upload freely licensed files to Wikimedia Commons. You may request permission to upload fair use files locally. Please include author and source information and a non-free use rationale for non-free files.
 * You can restore a previously saved version.
 * Pages should follow the  naming convention.
 * Need to rename a page? Use the move tab (is available once your account is 4 days old - until then, ask for help).
 * To request a page be deleted, add to the top of the page.
 * Was a page you made deleted? Please read the deletion policy, and check the deletion log to find out why. Also check the RFD archives if applicable. You can request undeletion at WB:RFU, or ask the administrator who deleted the page.
 * Please fill in the edit summary and preview your edits before saving.
 * Sign your name on discussion pages by typing ~~~~
 * User scripts can make many tasks easier. Look at the Gadgets tab of my preferences; check off the boxes for the scripts you want, and hit save!

Thanks for your contributions -- Jules (Mrjulesd) 10:05, 10 March 2022 (UTC)

title: User talk:FactCheck105


text:
Transportation Deployment Casebook/2022/Ontario

Technological Characteristics
The streetcar is a light rail transit vehicle running on a fixed track on the road, which is usually operated in single units and driven by electricity. The low rolling resistance of the steel wheel on the rail and the simple guiding mechanism make the streetcar more comfortable and efficient, which has a strong attraction in the application of urban transportation. The early streetcar began to operate in Canada with horse and steam as power, but it was eliminated due to insufficient power and polluting the urban environment. With the maturity of power technology, streetcars obtain electric energy through pantographs or contact shoes and drive them through electric motors.

Advantages

 * Compared with cars, carriages and walking, streetcars run on steel rails with lower rolling resistance, higher energy efficiency and more stable driving.
 * Compared with cars, streetcars have a greater passenger capacity.
 * Electric streetcars are driven by electricity, which has no exhaust emission and is more environmentally friendly.
 * Compared with buses, due to the larger passenger capacity, the labor cost per passenger of the streetcar is lower.
 * Compared with the subway, the investment cost of the streetcar is lower.

Main Markets
The streetcar market is mainly passenger transport market, originated in Europe, and has large markets in Asia, America and Oceania. At the same time, with the development of electrified streetcars, the market of streetcars is not limited to the city center, and the suburbs have also become the market of streetcars.

Transportation mode before the streetcar
Before the birth of the streetcar, carriage and water transportation were the main means of transportation. The carriage has some limitations, such as low passenger capacity, slow speed, low comfort, limited running time, and environmental pollution of the street (dung). Water transportation is greatly limited by natural conditions and cannot be applied to inland cities. Due to the limitations of low Passenger capacity and poor comfort of carriage, the streetcar powered by horse was born. Due to the use of steel rail, the driving resistance can be reduced, the passenger capacity can be increased, and the vehicle can travel faster and more smoothly. However, the streetcar powered by horses still has the limitations of polluting the street environment and limited operation time, so the steam driven streetcar was born. In 1875, due to the increase of transportation demand and the limitation of insufficient power of steam streetcar, the electric streetcar was born. The electric streetcar is driven by the electric motor, which improves the power, and can go to further areas by laying wires, which also expands the market scope of the streetcar.

Horse-drawn streetcar
The horse drawn streetcar is the first important improvement to the carriage. Horse drawn streetcars are also pulled by horses, but the wheels of the vehicle are made of steel and roll along special rails placed in the road. The low rolling resistance of steel wheels on steel rails, plus the simple guidance mechanism offered by flanges, can not only improve comfort but also increase passenger capacity.

Steam streetcar
With the birth of the steam engine, the steam streetcar gradually replaced the horse drawn streetcar. The steam streetcar uses the steam engine as the power source, pushes the piston through the steam pressure, and then rotates the wheel through the connecting rod device, which largely solves the shortcomings of the Horse-drawn streetcar polluting the street environment and limited operation time. However, there are still some defects, such as insufficient power, low passenger capacity, air pollution.

Electric streetcar
With the invention of the electric motor and the popularization of power grid in cities, the electric streetcar was invented in 1875. Electric streetcars are driven by motors, usually powered by pantographs on overhead lines, and in some cases by contact shoes on the third guide rail. Due to its strong driving force, large passenger capacity and low operating cost, electric streetcar has largely replaced other forms of power in the late 19th and early 20th century.

Early Market Development
The first streetcar in Ontario was born in Toronto in 1861. At first, the streetcar market was aimed mainly at passenger transportation in the city center. Due to the high price and the limitations of Horse-drawn streetcar, it was unable to provide services for all residents of the whole city. Until 1894, 12 cities in Ontario operated streetcars with a total length of 194.41 miles. At this time, there were both horse-drawn streetcars and electric streetcars in the streetcar market. The emergence of electric streetcars has gradually reduced the price of streetcar tickets and expanded the scope of streetcar services. The streetcar market has gradually expanded, and more residents in the city center and suburbs can enjoy streetcar services. The rise of electric streetcars makes streetcars the main mode of transportation in cities, provides a new way of life for residents, and also provides the accessibility of urban transportation under the condition of allowing low-density housing.

Policy in the 'Birth Phase'
With the growth of urban population, the carriage service in Ontario is very popular. Compared with the walking, carriage service is more comfortable and faster. A carriage can accommodate nearly 10 passengers. The operation of the carriage is mostly self-employed. And the popularity of the carriage proved the feasibility of urban public transport to the City Council and various commercial interest organizations. However, in 1861, with the birth of Horse-drawn streetcar, an enterprise group composed of local business owners in Toronto built the first streetcar in Ontario and obtained the franchise of streetcar from the government. Although the carriage service tries to compete with the new service, because the enterprise group has stronger financial resources, Greater passenger capacity and policy support, the streetcar service operated by the enterprise gradually replaces the self-employed carriage service. At the birth stage of streetcar, the government's promulgation of franchise right not only protects the operating income of streetcar company, but also avoids the vicious competition between many enterprises and individual merchants entering the streetcar field.

Private Sector Contribution
The private sector has played an important role in the rapid development of streetcars in Ontario. As the main means of transportation in the city at that time, the streetcar was considered a profitable industry by the private sector. According to the requirements of the franchise agreement, the private sector raised a lot of funds to start the construction of the streetcar, which laid the foundation for the expansion of the scale of the streetcar market. However, the greed of the private sector for profits prevents the healthy development of streetcar in Ontario. The routes of each company have different fares, different schedules and different operation modes, which are difficult to give full play to the maximum efficiency.

Public Sector Contribution
The public sector has played a role in controlling and standardizing the development of the streetcar industry. The public sector needs to issue franchise license agreements for enterprises to operate streetcar business. The franchise license agreement will require the maximum ticket price, operation scope and operation period. Under the supervision of the public sector, more people can afford the ticket price and expand the audience of the streetcar market.

Policy Issues
Although the franchise license agreement issued by the public sector can curb high ticket prices, it limits the profitability of enterprises. The construction of electric streetcars requires a lot of investment, and the lower ticket price limit makes it difficult for enterprises to make profits. In addition, the policy does not clearly indicate how the city obtains the control right and how entrepreneurs transfer the management right after the franchise right expires. This has also led to many legal problems. Due to the inability to make profits and many legal problems, the Toronto municipal government made an attempt to public ownership of streetcars in 1891. However, due to the increased financial risk of streetcars, the Toronto railway company obtained a new franchise after the municipal government operated the streetcars for eight months.

Mature Phase
After 1920, the development of streetcar in Ontario gradually became stable and mature. By 1920, 25 cities in Ontario had 1083.526 miles of streetcar lines. Due to the price restrictions imposed by the lock-in policy, it is difficult for the streetcar to make a profit. Private investors lost interest in the investment in the streetcar and the growth of the streetcar began to slow down. At the same time, with the expiration of enterprise franchise rights, many streetcar companies have merged to achieve economies of scale, optimize resource allocation and save operating costs. The streetcar market in Ontario cities has gradually changed from multiple competition to one dominance. However, with the birth of buses, buses are regarded a strong competitor to streetcars. The cost of bus purchase is low and the flexibility is high. The cost of buying a set of buses is less than repairing aging tracks. Therefore, when the great depression in the 1930s accelerated the withdrawal of streetcars from the transportation market, some cities in Ontario, such as Windsor, finally cancelled the operation of streetcars one after another because they could not maintain the maintenance cost of streetcars.

Opportunity to “Re-invent” the mode
Although the traditional streetcar has gradually disappeared, the modern streetcar (light rail) which is more suitable for today and the future has been used and planned by various cities in Ontario. Compared with traditional streetcars, the light rail can run at a faster speed and higher passenger capacity, and has exclusive right of way, which should not interfere with vehicles. With the gradual growth of the urban population, light rail can better meet the needs of the transportation market. In addition, to better meet the urban transportation market, trolleybus has also been invented. Compared to streetcars, trolleybuses have the advantages of low starting cost, strong climbing ability, avoiding traffic congestion and strong flexibility. In addition, although it is difficult for tram operators to obtain large profits by charging ticket prices, tram operators can obtain higher profits by changing their business model, such as participating in real estate development around tram lines and earning income through real estate appreciation.

Quantitative Analysis
The data collected in "McGraw electric railway manual - the red book of American street railway investment " was used to fit the track lengths of Ontario's streetcars from 1894 to 1920 to determine the three stages of development of the streetcar: birth, growth, and maturity. The three-parameter function fitted to the data is:

$$S(t)=K/[1+exp(-b(t-t_i))]$$

Where:

 * $$S(t)$$ is the status measure (e.g. Passenger-km traveled)
 * $$t$$ is time (years)
 * $$t_i$$ is the inflection time (year in which$$1/2 K$$ is achieved)
 * $$K$$ is the saturation status level
 * $$b$$ is a coefficient

Due to the limited time available for the data used, estimation using Ordinary Least Squares Regression is required for K and b. The coefficients were estimated using the following formula:

$$Y=bX+c$$

Where:

$$Y=\ln(Miles/(K-Miles))$$

$$X=Year$$

Ontario

The prediction has a good fit. The total mileage of all systems shows a clear growth and maturity life cycle phase. However, due to the short study period, there are no clear signs of decline. The growth phase in Ontario was approximately 1894 to 1910. The maturity phase entered after 1910, and the birth and decline phase was beyond the time frame measured.

Ottawa
The prediction has a good fit. Ottawa went through the birth stage very early. It showed a clear growth and maturity life cycle phase between 1894 and 1920. However, due to the short study period, there are no obvious signs of decline. Ottawa's growth phase was from about 1894 to 1898. After 1898 it entered the maturity phase until it reached 65 miles to reach saturation.

Toronto
The prediction has a good fit. Toronto went through a birth phase very early. It showed a clear growth and maturity life cycle phase between 1894 and 1920. However, due to the short study period, there are no clear signs of birth and decline. The growth phase for Toronto was approximately 1894 to 1913. After 1913 it entered the maturity phase until it reached 500 miles to reach saturation. The decline phase exceeds the measured time frame and there are no clear signs of decline in the graph.

London
The prediction has a good fit. It showed a clear growth and maturity life cycle phase between 1894 and 1920. However, due to the short study period, there are no clear signs of birth and decline. The growth phase for London was approximately 1894 to 1919. After 1919 it entered the maturity phase until it reached 185 miles to reach saturation. The decline phase exceeds the measured time frame and there are no clear signs of decline in the graph.

Hamilton
The possible reason for the lack of good fit of this prediction is due to the rapid decline of the Hamilton streetcar in 1912 after rapid growth. The S-curve does not fit this atypical development pattern well.


text:
Oberon/ETH Oberon/Tutorial/Games

Oberon System 3 Games

[ Text | Contents | Index | Master index]

Introduction to the card games - by Patrick Saladin
As every operating system has at least one solitaire to offer, I decided to write a framework that would permit anyone to develop such games for Oberon System 3.

I began with Solitaire because it is a very simple game. Then I wrote Spider based on a native Amiga Oberon version I did some years ago. The latest (and maybe last) solitaire I did, was Freecell. I think these three examples suffice to show how to implement one's own, preferred solitaires. For a more or less complete overview of the functionality of this framework, refer to the section "How To Write A New Card Game" below, and study the source codes.

To start any of the three games open the CardGames.Panel.

Backgounds - choose one of nine card backgrounds Open Help - opens this text

Clicking on:
 * [[File:OberonGadgetsSolitaire.png]] opens a Solitaire game
 * [[File:OberonGadgetsSpider.png]] Cool Oberon Object opens a Spider game
 * [[File:OberonGadgetsFreecell.png]] Cool Oberon Object opens a Freecell game

Draws - number of cards to be drawn to the deck in Solitaire

I hope, you will have a lot of fun with these three games.

Solitaire - Release 1.3
An Oberon System 3 version of the maybe most famous solitaire game Solitaire, created by Wes Cherry and found in Microsoft Windows 95 and also provided with several other operating systems.

Rules
The gameboard has three areas: the deck in the upper left corner, four "suit" stacks in the upper right and a row of seven "row" stacks below the deck and suit stacks. The number of cards in each row stack increases from one to seven, from left to right. The top card of each row stack is face up, the other cards are face down.

The object of the game is to move all the cards to the four suit stacks in ascending order from ace to king. For example, you can place the two of hearts on the ace of hearts.

To move a card (or a stack of cards) from one place to another, point to it, press the left mouse key, drag the card(s) to the final destination and release the key. The program moves the card(s) if it is a legal move or does nothing if the card(s) do not fit.

During the game, you will be building row stacks by dragging a card or a stack of cards and dropping it on the top card of another row stack. Cards in a row stack are stacked in descending order, alternating between red cards and black cards. For example, you can place the two of hearts on the three of clubs.

If in the process, you uncover a face down card in a row stack, turn it face up with a left mouse key click. A stack may also be built on an empty row stack provided it starts with a king.

When you made all the possible plays, click the deck to begin turning over cards in packets of three. The card that is face up on the deck is always available for play. When the end of the deck is reached, turn it over and continue to draw cards.

The mouse pointer changes to a 'pointing hand' as soon as you are pointing to a card you are allowed to move.

To move a card to one of the four suit stacks, you can also click with the middle mouse key on the card instead of using drag and drop. Here also, the program moves the card to the appropriate stack or does nothing if the card doesn't fit on any of the stack's top card.

There are two game control buttons in the menu bar:

[New] - Throws away the current game and starts a new one. [Undo] - Undo the last move. The Undo function can be repeated back to the beginning of the game.

Differences with the MS Solitaire (TM)

 * A card placed on a suit stack cannot be moved back to a row stack.
 * Cards on the deck are turned over in packets of 3 only.
 * This Solitaire has a more powerfull Undo function. The MS Solitaire allows a single Undo.
 * This Solitaire has no scoring system and no timing.

Spider - Release 1.1
An Oberon System 3 version of the Spider game (coming with SUN's OpenLook). The following text is adapted from an original text written by Donald R. Woods of Sun Microsystems, Inc.

Spider is a variant of solitaire using a double deck of cards, which is more complex and also more challenging than the previous one.

Rules
The gameboard consists of the stack of undealt cards in the upper left corner, eight suit stacks in the upper right corner and of the remaining cards of a double deck, which are dealt in ten columns at the beginning of the game.

The object of the game is to build a stack of the same suit from King to Ace and to move completed stacks from the table to the suit stacks above. When all eight stacks have been built and removed, you have won the game. A more challenging version of this is to leave all eight stacks on the table until done instead of moving the completed ones immediately to the stacks above.

One may move the next lower card onto a card of the same or different suit; however, one may only move contiguous cards of the same suit as a group. For example, one may move the five of spades onto either a six of spades or a six of hearts. Moving the five of spades onto the six of spades is a better move since this pair of cards may be moved as a group, whereas the five of spades, six of hearts group may not. Also, moving the four of spades onto the six of spades is not a legal move. A King may only be moved to an empty column (or moved to the stacks above when the sequence King to Ace is complete) since there are no higher cards than a King.

As a general strategy, one should attempt to free a column, or several of them, since this is the most flexible way to move cards around. A empty column is where all cards on the table have been removed. Note: before dealing the next round, all columns have to have at least one card in them.

THE HAND. The sixty cards not dealt initially form the "hand". Whenever you wish (typically, whenever you get stuck), you may deal a new row of ten cards from the hand face-up upon the piles. NOTE: You are not allowed to do this if an empty column exists. You must first drop a card on it. Notice that these additional deals tend to introduce discontinuities in the piles; that is, you can get cards covering others that are not next-higher in rank. If you get stuck after having dealt the last of the six additional deals, you have lost.

The program
If you press the middle mouse button anywhere within or below a column of cards, it says you want to move the top cards of that column (top cards: in a row and of same suit). The program looks for a destination column and then moves the cards from the first column to the second. If there is no such legal move, the program does nothing. The lookup strategy is defined as followed:

 * 1) remove them if they form a completed suit
 * 2) move them onto a card of the same suit
 * 3) move them onto a card of a different suit
 * 4) move them into a space

If you instead use the left mouse button to select a card within a column, it says you want to move the card you are pointing at plus any cards covering it. (The program changes the mouse pointer to a 'pointing hand' as soon as you're pointing on a card you are allowed to move.) Then you must move the mouse to another column and release the button. The program moves the selected cards to the destination. The only time you need to use this method (instead of using middle) is if you're moving fewer cards than the maximum permitted.

To deal a new round, left key click on the facedown stack in the upper left. Remember that all spaces must be filled before you can deal a new round, except there is no possibility to fill them.

There are two game control buttons in the menu bar:

[New] - Throws away the current game and starts a new one. [Undo] - Undo the last move. The Undo function can be repeated back to the beginning of the game.

Freecell - Release 0.9
An Oberon System 3 version of another solitaire game FreeCell, created by Jim Home and found in Microsoft Windows 95.

Rules
The gameboard consists of four free cells in the upper left corner, four suit stacks in the upper right and the deck of cards, which is dealt face-up in eight columns at the beginning of the game (seven cards on each of the first four columns and six on the last four).

The object of the game is to move all the cards to the four suit stacks, using the free cells as place holders. To win, you have to build the four suit stacks in ascending order from ace to king. For example, you can place the two of hearts on the ace of hearts.

Freecell knows three legal moves:
 * 1) move to a free cell: any card from the bottom of a column
 * 2) move to a suit stack: any card from a free cell or from the bottom of a column. The card must be greater in rank than the card in the suit.
 * 3) move to the bottom of a column: any card from a free cell or from the bottom of another column, provided the rank of the card is one less than the rank of the card you will place it on, and the colors of the cards are different. For example, you can move a black three onto a red four. Any card can be moved to an empty column.

To move a card from one place to another, just left click on the card you want to move (it will be highlighted) and then left click the area to which you want to move the card. To cancel a move, simply left click again on the highlighted card.

You can move a stack of cards from one column to another if there are enough free cells open. To move a stack, left click the bottom card in the column, then left click the column that you want to move the stack to. The program assumes that you always want to move as many cards as possible to a free column. If you want to move only the top card of a stack to a free column, middle click on the free column instead of left clicking on it.

To quickly move a card from a free cell or a column to one of the four suit stacks, simply middle click on the card.

There are two game control buttons in the menu bar:

[New] - Throws away the current game and starts a new one. [Undo] - Undo the last move. The Undo function can be repeated back to the beginning of the game.

Introduction
The module Cards provides three basic data structures, needed in every solitaire: Card, Stack and Move. It also contains some basic procedures that operate on these types. Two basic messages to control the games are defined in here as well.

This chapter gives you first a description of the data structures and messages and then explains the functionality of each procedure provided by this module.

Data structures
Card

 * next, prev: Pointer to next, previous card in a list (stack) face: suit of a card
 * [[File:OberonGadgetsClubSuit.png]] = 0 (clubs) [[File:OberonGadgetsSpadeSuit.png]] = 1 (spades) [[File:OberonGadgetsHeartSuit.png]] = 2 (hearts) [[File:OberonGadgetsDiamondSuit.png]] = 3 (diamonds)
 * nr: card number (0 = Ace, 12 = King)
 * visible: flag to indicate if a card's surface is visible or not (TRUE = show card's surface)

Stack

 * tail: list of cards in stack. 'tail' marks the end of a list and is not a valid card
 * 'tail.next' is the top card and 'tail.prev' the last card in the list do: a block of methods
 * - canDrop: checks if 'card' can be dropped on stack 'S'
 * - dropCard: drops the given card(s) on stack 'S'
 * - undoMove: recovers the latest action done by stack 'S'
 * - restoreStack: redraws stack 'S'
 * - trackMouse: tracks the mouse until all buttons are released
 * - bgNr: cards background in stack. Valid values are between [0..8]

Move

Whenever an action (move, draw, flip, ...) is taken by a stack, you should remember this action. This way, will recover every step taken during the game.

SimpleMove
 * to: stack, cards have been moved to
 * card: card dropped on stack

A simple move is used to indicate a drop of cards to another stack.

CollectMsg
 * tail: list of collected cards

This message is broadcast to collect all cards in a stack. Each stack has to append its cards to the tail of the message.

UndoMsg
 * time: timestamp of the move
 * stack: stack that did the latest move

This message is broadcast to determine, which stack did the latest move. Each stack has to check the message timestamp. If the stack has a more recent move (move timestamp is greater than that of the message), it must set the stack field to itself and must assign the timestamp of its move to the time field.

BGMsg

 * bgNr: background number

This message is broadcast to change the background of all the cards in a stack. Assign the background number to the corresponding field in the stack.

Procedures
First, three procedures not related to any data structure but often used to implement card games.

Random
 * range: upper limit of range (not including this number)
 * return: random number

Returns a random number in range [0..range[

Shuffle
 * tail: list of cards to shuffle

As the name implies, this procedure shuffles the given list of cards. Remember 'tail' is not a valid card and is only used as a sentinel.

TrackMove
 * M: Oberon.InputMsg received by stack's handler
 * x, y: lower left corner of top card (completely visible) in stack 'self'
 * self: stack, the selected cards belong to
 * card: first card in a list of cards the user want to move
 * draw, fade: procedures to draw, fade tracking rectangle

This is a standard procedure to track the mouse pointer and a list of selected cards. While tracking, TrackMove calls the procedures draw and fade with the given parameters x, y and card. If the user releases all the mouse buttons, the procedure checks, only if the left mouse button was being pressed (this means the user wants to drop the cards on the stack right under the cursor's current position). It checks if it is possible to drop the given cards on this stack and if so, moves the cards from stack 'self' to this stack by calling method 'dropCard' of stack 'self'.

Procedures on card
The following procedures are related to data structure Card. Card is not a very complex data structure, so there are not many procedures one can think of implementing.

DrawCard
 * R: Display3.Mask - contains clipping region
 * card: card to draw
 * x, y, w, h: rectangle to draw card in
 * bgNr: background number if card is not visible

Draws the given card into the given rectangle (x, y, w, h)

NewCard
 * suit: card suit
 * nr: card number
 * visible: if card is visible or not
 * return: returns the new allocated card

Procedure to allocate a new card. The given parameter will be assigned to the corresponding fields in the card data structure.

CloneCard
 * card: card to clone
 * return: new, cloned card

This procedures allocates a new card and copies the value of the given card.

WriteCard
 * R: file to write card values to
 * card: card to write to file

Stores the values of the given card to the given file. IF card is NIL, the value -1 will be written to the file.

ReadCard
 * R: file to read card value from
 * card: read card

Reads in a card from the file. If it reads -1, NIL will be returned; otherwise a new card is allocated.

NewTail
 * return: new allocated tail

Allocates a new sentinel of a card list.

Procedures on stack
The cards of a stack are stored in a double linked list. As their type of list is a bit more complex than simple linked list, I wrote three procedures that make the handling of cards and lists much easier. A stack always has a tail to which all the cards are linked. Field 'tail.next' is the top card of a stack and field 'tail.prev' the last card in a list of cards. If you want to remove a list of cards, it is sufficient to give the last card in this list (you just can take cards from the top of a stack). Free cards (not belonging to any stack) are managed in a ring of reversed order. The top card can be reached by field 'card.prev'.

This figure shows how cards are linked in a stack (left) and in a list of free cards (right)

IsEmpty
 * tail: list to check
 * return: TRUE if list is empty

Checks if the given list is empty or not. Empty means the list consists only of the sentinel 'tail'.

RemoveCard
 * tail: list to remove card(s) from
 * card: last card in the list of cards to remove

Removes all the cards in the given list (by tail). Returns a list of removed cards. The list starts with 'card' and ends with 'tail.next' and is of reversed order (stack's top card is now the last card in this list).

AppendCard
 * tail: list to append card(s) on
 * card: list of cards to append

This procedure does the opposite of RemoveCard: it appends the cards in the list (specified by 'card') to the list (given by 'tail'). 'card.prev' will be the top card of the stack (= 'tail.next') and 'card' will be somewhere in the middle or at the end of the list (by 'tail').

Procedures on move
There are two procedures to handle Moves. As Move covers fields to manage history, these procedures should be used to add, clear stacks actions.

AppendMove
 * S: stack the move belongs to
 * M: move to append to the stack

Appends the given move to the list of moves of this stack and assigns actual time to the move's time field.

ClearMove
 * S: stack to clear move list of

Clears all moves of the given Stack.

Basic Methods
Description of basic procedures assigned to the basic method block 'methods'. These procedures can (must) be written over, when you implement a new type of stack.

CanDropCard
 * S: stack the card should be dropped on
 * card: card you want to drop on stack
 * return: TRUE if card can be dropped on stack, FALSE otherwise

This method is used by the framework to check if the user is allowed to drop the selected card(s) on this stack. The result depends on the solitaire's rules.

DropCard
 * S: stack top card on
 * card: card to drop on stack

Appends all cards in list ('card') to stack 'S' and redraws the stack.

MoveCard
 * self: stack to take cards from
 * to: stack to put cards on
 * card: last card in list of cards to move (starts with top card of stack 'self')
 * undo: flag to indicate if move is an undo move

This method is called to move cards from stack 'self' to stack 'to', where the list of cards to move is specified by 'card'. This implementation moves the cards and appends a SimpleMove to the move list of stack 'self' if flag 'undo' is set to FALSE.

UndoMove
 * S: stack to move cards to
 * M: move to recover

This method is called to recover a move. This implementation handles only SimpleMove. Whenever you define new type of moves, you have to extend this method in your own module.

DrawSrack
 * S: stack to redraw
 * M: Display3.Mask - contains clipping region
 * x, y, w, h: rectangle to draw stack in

This method is called whenever a stack needs to be redrawn (Display.DisplayMsg). This implementation draws a stack top card if the stack is not empty.

TrackMouse
 * S: stack that received Oberon.InputMsg
 * M: Oberon.InputMsg received by stack handler

This method is called whenever the mouse pointer enters the stack. Set M.res to a value greater than -1, if you handled the message or left it, so the framework can take a default action. As this implementation does nothing, the default behavior will be applied.

Stack-object procedures
Now I would like to explain the standard procedures needed to implement an Oberon System 3 object. As a stack is nothing but a visible gadget, one must implement certain procedures.

CopyStack Copies all stack values as well as all cards linked to field 'tail'.

StackHandler The object handler does a lot of work for you and is the heart of the framework. I tried to react on messages in such a manner that you never have to spend a lot of time implementing your own handler (this work is delegated to the methods). A few messages cannot be handled efficiently in a global sense, so you have to react on some of them by yourself. These messages are Objects.AttrMsg and Objects.CopyMsg. You also have to implement the CollectMsg and Objects.FileMsg, if you have more than one list of cards in your stack. The whole rest of messages should be handled in a proper way, and if there's a malfunction, check your implementation of the methods first and be sure you understood their functionality. Never change this default handler & methods in this module. Should there be an error or functionality missing in Cards.Mod, please let me know, I will try to fix it. Printing is not handled by this framework, so if you want to print a stack, react on Display.PrintMsg, too. I might have time to work on this in future (may result in an additional method, I think).

InitStack Initialize fields of a default stack. Call this procedure within your own initialize procedure.

NewStack Allocates, initializes a new stack object and assigns it to 'Objects.NewObj'.

Commands
This module has two commands to offer:

SetBG Takes the background number as parameter and broadcasts a BGMsg.

Undo Recovers latest action by broadcasting an UndoMsg.

MineSweeper - Version 1.2
An Oberon System 3 version of the original MineSweeper written by Robert Donner and Curt Johnson, and found in Microsoft Windows 95. This one was created by Markus Dätwyler and Patrick Saladin.

Start the game with Desktops.OpenDoc My.Game(MineSweeper.NewDoc).

Rules
The object of this game is to find all the hidden mines in a mine field as quickly as possible without uncovering any of them. The mine field is divided into square boxes and each box knows how many mines there are in the neighbouring boxes. By combining the given pieces of information it should be possible to find most of the mines. For the rest, you still need a lucky hand (just like in real life!). The game is over when either the player taps on a mine (which is mostly the case) or all mines are marked with a flag or all boxes with no mines are covered up.

The game's main view is divided in two parts. The left part shows time passed since the player did his first action on the field (covering up a box or setting a flag). The second field shows how many flags the player has to set to end the game. The right part shows the minefield itself. There the player can set the flags and try to cover up the boxes.

Game settings
[New] - starts a new game (this button appears in the menu bar and in the panel). The game takes it old settings (width, height & number of mines). The game settings can be adjusted with the sliders.

[Pause] - pauses the game. During the break, time will stop and the minefield is fully covered, so a player cannot cheat. To continue the game press the pause button again or else start a new game with the New button.

Sliders - The sliders and text fields control the settings of the game. The left slider controls the width of the minefield, the middle one controls its height and the right one controls the number of mines in the minefield. The player can either choose a value using the sliders or by typing in a correct number in the corresponding text fields. The correct values for the fields are:

 * width: 8 to 30
 * height: 8 to 16
 * #mines: 10 to 99, but at most 70% of the number of boxes in the mine field

Controlling the game with mouse key clicks
Left mouse key- Covers up the box pointed at if it is in a neutral state. If there are no mines in the neighbouring boxes, it recursively covers up these too. An uncovered box turns from neutral to:

 * [[File:OberonGadgetsBox2.png]] covered up. The number tells the player how many mines exist in the neighbouring boxes, if any.
 * [[File:OberonGadgetsBoxExploded.png]] means BAD LUCK!!! The box was hiding a mine which exploded. The game ends and all remaining boxes are uncovered, revealing the location of the other mines.
 * [[File:OberonGadgetsBoxHarmless.png]] appear on boxes where the player made a bad guess, flagging a free box.

Middle mouse key (??) - When pointing at a covered up box, it counts all the flags on the neighbouring boxes and compares this number with the number shown on the pointed box. If it is the same it recursively covers up the unmarked neighbouring boxes (unmarked means no flag on the box).

Right mouse key - Toggles between the 3 states, in a ring, of a covered box:

 * neutral - [[File:OberonGadgetsBoxCovered.png]] a covered box
 * flag set - [[File:OberonGadgetsBoxFlag.png]] the player thinks that the box covers a mine
 * not sure - [[File:OberonGadgetsBoxUncertain.png]] the player is not sure if this box covers a mine or not, but hints at a possible danger

Scramble
An Oberon System 3 version of Scramble, consisting in unscrambling a puzzle. It was created by Emil Zeller.

Open a game board by executing Desktops.OpenDoc (Scramble.NewDoc). Middle click on the menu bar button captioned "Scramble" to start a game. One of the pieces is removed to allow shifting of the remaining pieces.

Rules
The object of the game is unscramble a puzzle with a picture on one size and numbered pieces on the other side. Middle click on a piece, moves the piece or a group of them in the direction of the empty slot. To reverse a puzzle, middle click on the menu bar button captioned "Num" or "Pict" depending on which side is visible.

You can change the puzzles's picture or the number of pieces with one of the following commands:

Scramble.ChangePict ( pictureName | ^ ) replaces the picture of the marked puzzle by the picture specified in the parameter. Clown.Pict, Grapes.Pict and Default.Pict are examples of picture files delivered with the Oberon software. The picture is made apparent but the order of the pieces is kept.

Scramble.ChangeSize ( m n | ^ ) divides the marked puzzle into m * n pieces and unscrambles the puzzle.

Sokoban
An Oberon System 3 version of Sokoban. This one was created by Emil Zeller.

Start the game by opening the document Desktops.OpenDoc (Sokoban.NewDoc).

Rules
Push the yellow garbage cans around using the red pusher which is moved using the keyboard cursor keys. The color of garbage can changes to green when it has reached its correct final position.

Tetris - Version 2.5
An Oberon System 3 version of the well-known Russian Tetris game. This one was created by Wolfgang Ibl.

To start the game open the Desktops.OpenDoc Tetris.Panel.

Rules
??

Index
C

card game: writing your own one card games

F

Freecell

M

MineSweeper

S

Scramble Sokoban Solitaire Spider

T

Tetris

Revised 11 Dec 1996 Installed on 30 05 1997

title: Oberon/ETH Oberon/Tutorial/Games


text: User:Casualdejekyll

title: User:Casualdejekyll


text:
User:Ogradychrissy/Sandbox

Testing this out as a possible open pedagogy tool for students and faculty.

title: User:Ogradychrissy/Sandbox


text: User:Neel.arunabh

title: User:Neel.arunabh


text:
Turkish/Noun Constructions

This chapter will be about noun constructions. We will be covering all the ways we can modify a noun with another noun, or an adjective.

Possessive endings
While English has words like my, your, his, her; we primarily use suffixes in Turkish instead. While possessive pronouns do exist, they are often dropped, as we will see later. One should also keep the consonant harmony and other alterations in mind, as these suffixes begin with a vowel. A few examples are given below. Finally, there are two irregular nouns, su meaning water and ne meaning what.

Order of suffixiation
Since suffixes are employed very frequently in Turkish, it is important to keep the order of suffixes in mind.

Another thing to note is the interactions between the possessive endings and the case endings. The third person possessive ending becomes  when a case ending is added.

Genitive Constructions
The Genitive case, whose formation was explained in its article, is used to denote possession in Turkish. The formula for such a construction is simple. A few examples may be found below.

 * benim kalemim My pencil
 * senin baban Your dad
 * bizim öğretmenimiz Our teacher

When the possessor is not a pronoun, the third person possessive ending is always preferred.

 * Büşra'nın çantası Büşra's bag
 * başbakanın arabası Prime minister's car
 * kahvenin tadı The taste of the coffee
 * okulun kapısı The door of the school

The plural ending always comes before the possessive ending,

 * sizin kitaplarınız Your books
 * bilgisayarın tuşları The computer's keys

And case endings always come after the possessive endings. When the 3rd person possessive endings are used, a n is inserted in all cases before the case ending.

 * kahvenin tadına
 * bilgisayarın tuşlarını
 * okulun kapısından

This also allows us to create chain constructions, where the possesser is another construction.

 * bizim kahvemizin tadı The taste of our coffee
 * Esra'nın okulunun kapısı The door of Esra's school
 * Yunanistan'ın başbakanının arabası The car of Greek's prime minister

var/yok sentences
A genitive construction in a var/yok sentence is used in Turkish instead of using a verb for have.

 * Soğanımız var mı? Do we have any onions?
 * Hayır, soğanımız yok. Ama soğan tozumuz var. No, we don't have any onions. But we have onion powder.

Pronoun dropping
Since the possessive endings are inflected for person, the pronoun isn't necessary to show possession. Therefore, they get omitted most of the time.

 * zamanımız Our time
 * çocuğun Your kid

Remember how the third person plural possessive ending had a lar in paranthesis? That part is used only when the pronoun is dropped, otherwise the singular ending is preferred.

 * anneleri
 * onların annesi

Actually, when the possessor is the same as the subject of the sentence, dropping the pronoun is mandatory.

 * Sen kalemini nereye koydun? Where did you put your pencil?
 * Fatma ödevini yapıyor. Fatma is doing her homework.

If the pronoun is not omitted, it is understood that the object in question belongs to someone other than the subject.

 * Kedi bacağına ne yapıyor? What is the cat doing to its/his/your leg. (the actual owner of the leg is ambiguous)
 * Kedi, senin bacağına ne yapıyor? What is the cat doing to your leg. (pronoun used to resolve ambiguity)
 * Kedi, onun bacağına ne yapıyor? What is the cat doing to his/her leg. (pronoun used to resolve ambiguity)
 * Kedi, kendi bacağına ne yapıyor? What is the cat doing to its leg. (pronoun used to resolve ambiguity)

In other cases, the rules described in Turkish/Pronouns apply to possessive constructions as well.

Indefinite constructions
Another way of combining multiple nouns into one is using an indefinite noun construct. This is done very similarly to the genitive construct, but the first noun is in nominative rather than genitive.

 * okul bahçesi School garden
 * kitap kapağı Book cover
 * yemek masası Dining table

Bare constructions
In a few cases, constructions without any declensions are preferred. The most common use cases for this are:

 * 1) Specifying the gender of a human
 * 2) * erkek çocuk
 * 3) * kadın doktor
 * 4) * kız öğrenci
 * 5) Specifying the material of an object
 * 6) * demir kapı
 * 7) * tahta kutu
 * 8) In the name of some dishes, and in street names ending with sokak
 * 9) * döner kebap
 * 10) * kuzu çevirme
 * 11) * Susam Sokak

Adjective constructions
When a noun is being modified by an adjective, no declensions are needed.

 * kırmızı kazak
 * küçük böcek
 * sarhoş adam

title: Turkish/Noun Constructions


text:
Rust for the Novice Programmer/Basic Maths Testing Program

Basic Maths Testing Program
The best way to learn is to do!

Let's get stuck in with a program so we can logic around.

The program specification

 * The program will print out a simple maths question and the user answers it.
 * It will be a command line program which means that it all happens in the terminal. This is opposed to a GUI program which may be what you're more used which are programs that use GUIs(Graphical User Interfaces).
 * The maths question will be just a simple addition or subtraction at first.

There is more planning we could do but for now, let's get stuck in.


text:
Rust for the Novice Programmer/Basic Maths Testing Program/Getting Started

Getting Started with our Maths Program
Let's start a new program by going to a new folder in the terminal and typing 'cargo init'. Then we can open up main.rs in the src/ folder. Let's start off by writing a function to take in the numbers and print out the question to the terminal. fn print_question(num1: i32, num2: i32) { println!("What is {} + {}?", num1, num2); } And in our main function, we call it like so: fn main { print_question(35, 23); } And if we run this now with 'cargo run' we get What is 20 + 30? in the terminal.

However, this only works with addition. Let's make it work for both addition and subtraction. To represent the mathematical operator, we need something that can be one of a number of options. The perfect way to represent this is with an enum. So we create our enum as follows: enum Operator { Addition, Subtraction, }

Now, to display the operator, we can match against the operator and select the character for it, so we change our print_question function as follows: fn print_question(num1: i32, num2: i32, operator: Operator) { let operator_string = match operator { Operator::Addition => "+", Operator::Subtraction => "-", };     println!("What is {} {} {}?", num1, operator_string, num2); } And we can change our main function to: fn main { print_question(35, 23, Operator::Subtraction); } And now when we run cargo run, we get What is 35 - 23? in the terminal.

Next: we introduce traits as a cleaner way to display the operator.


text: User talk:185.193.232.10

title: User talk:185.193.232.10


text:
User talk:185.193.232.13

Vandalism

 * This IP is of a school. I imagine that a block of edits would be sensible if vandalism is coming from this address. I apologise for our students if this is the case. Even as we endeavour to teach them to respect the hard work and mutual contribution that helps form projects such as Wikipedia, this behaviour appears to continue. 185.193.232.13 (discuss) 13:32, 29 April 2022 (UTC)

title: User talk:185.193.232.13


text:
User talk:185.193.232.12

Please stop
I have reverted your recent changes to a subpage in A-level Geography. Please stop making these edits. And please keep your opinions to yourself: we don't accept racism here. L10nM4st3r Roar at me/what my paws scratched 13:23, 11 March 2022 (UTC)

title: User talk:185.193.232.12


text:
Guide to the Godot game engine/Input

In every game, you are able to press a button or tap on the screen for something to happen. This is called reacting to input. There are two ways to do it: using input maps and manually.

Input map
Go to your Project Settings at Project -> Project Settings... and click on the Input Map tab. You will get a list of input actions, like "ui_select". These are the default ones, and can be edited, but not removed.

You can - and should - make your own, however. After where it says "Action:", type a name for an action, like "shoot", or "move_forward". Press the "Add" button next to it. This will create your action.

You will notice that you have no input events associated with it. Press the "+" button next to your new action. You will see these options:

 * Key: Allows you to link any keyboard button.
 * 1) Joy Button: Allows you to link a controller button.
 * 2) Joy Axis: Allows you to link a controller joy-stick movement.
 * 3) Mouse Button: Allows you to link a mouse button.

For touch screen and mouse movement, please see the manual input detection section mentioned below.

There are several ways to detect whether or not they are pressed, and the method you choose depends on what the action is for. The functions below return a boolean, unless otherwise stated, and should be put inside "if" or "while" statements.

The above methods are all called on the singleton. They all accept a single String argument.

.:

The String argument must be the name of an input action defined in the input map.

Manual input detection
Let's say that you want to detect mouse movement or touch screen events, or that the input map won't work because you need input for a tool that you can't guarantee the user of the tool (or yourself) will create the input event.

This is when you need manual input detection. This is like using servers. Manual input detection is a low-level equivalent to the input map that is more complex but gives more power.

The below code moves a 2D sprite when you move your mouse, and ignores all other input.

(event): event : position += event.relative

The below code creates a simple button. is available only to Control derived nodes and runs if focused and you press a key, you pressed it with the mouse or the mouse moves over it.

extends Control signal button_up signal button_down pressed = (event): event   event.button_index == BUTTON_LEFT: event.pressed: .             pressed = event.pressed: pressed: pressed =

The  makes sure other   and   are not called.

There are many input events. They are as follows:
 * InputEventMouse:
 * InputEventMouseButton: Emitted when you click a mouse button. Read with: button_index (BUTTON_* constants), pressed.
 * InputEventMouseMotion: Emitted when you move the mouse. Read with: relative (how much the mouse moved since the last call to input), position (the mouse's new position relative to the top-left of the game window - or the node in "_gui_input" calls).
 * InputEventKey: Emitted when you press a button on the keyboard. Read with: button_index (KEY_* constants), pressed, echo (if true, the button is being held down).
 * InputEventScreen:
 * InputEventScreenTouch: Emitted when you tap the screen. Read with: position (the position you tapped on the screen), pressed (if false, you are untapping the screen).
 * InputEventScreenDrag: Emitted when you drag on the screen. Read with: position (new position), relative (how much the finger moved since the last input call), fingers.
 * InputEventJoy:
 * InputEventJoyButton: Emitted for controller button presses. Read with: pressed, button_index (JOY_* constants).
 * InputEventJoyMotion: Emitted for moving the joy stick. Read with: position, relative.

See more: The InputEvent tutorial.

Input singleton
So reading input is very fun. However, there are a few more well used methods of input. Try to think about it before you read on. What are they?

There are more things besides when using the input singleton, and this section will explain in-depth on what can be achieved and how.

Motion controls
Motion controls are in many popular games, particularly VR and/or AR games, to look around.

.rotation +=.

This is only for "rotational" motion detecting.

Vibration
Many popular games include vibration. You can call the below when the player is hit:

..

This will vibrate a controller or mobile device for 1 second.

InputMap singleton
The InputMap allows creating input actions via code. This is good in games where the player can change their controls.

See here for the rundown of InputMap.

The following code creates a shoot action which corresponds to pressing the spacebar.

(key) -> : input =. .pressed = .scancode = input

It can be any input event, not just.

See the "faking" input section below for more information on creating.

Other useful methods:
 * : Resets actions to those set in ProjectSettings.
 * 1) (action: ): Returns true if the action exists.
 * 2) (action: ): Clears the action so there are no associated events.
 * 3) (action: ): Erases the action.

As always, this does not list them all. Just a few of them.

Audio input
To record audio, you need to do 2 things:
 * 1) Press "Audio" at the bottom of the screen, and press "New Bus". Rename it "Microphone" and click "Add Effect". Press "Record" in the dropdown menu that appears.
 * 2) Create a new node for your scene. Click on the Stream value in the Inspector. Choose New AudioStreamMicrophone from the dropdown menu that appears. Set the "Bus" property to "Microphone". Whenever you want to record audio in-game, just turn the "Playing" value to true.

Reading audio for stuff like voice recognition can be done, but it is not easy, and is outside the scope of this book (and outside the knowledge of the author).

"Faking" input
So, you decided that you want to change the InputMap at runtime? But how do you do that?

Godot has several powerful classes that make input detection easier and faking it possible.

See more: The InputEvent tutorial.

InputEventKey
InputEventKey is for detecting keyboard button presses and releases.

The below code allows you to shoot with the A key:

input.pressed = input.scancode = KEY_A .  .(, input)

The "Input.event_erase_actions" clears all actions for the event specified. In this case, the space-bar will no longer make you shoot.

Any key can be specified, though it may not be obvious how to do so.

If you want to detect if certain modifiers are also pressed, you have access to these variables:
 * alt: Set to true if you must press "Alt" on your keyboard.
 * 1) ctrl: Set to true if you must press "Ctrl" on your keyboard (Windows only).
 * 2) meta: Set to true if you must press "Meta" on your keyboard (Linux only).
 * 3) command: Set to true if you must press "Ctrl" (on Windows) or "Meta" (on Linux) on your keyboard.
 * 4) shift: Set to true if you must press "shift" on your keyboard.

You may set more than one of these to true. This makes you need to press all the modifiers set.

If you want to detect releasing the key instead of pressing it, don't set "pressed" to true. If you are adding it to the InputMap, it will always be pressed if the keys for it are not, but only after they have been released for the first time. So how do you fix this then? Actually, it's quite simple!

Try. It works nicely, but if you need it for calls to _input, you should instead use.

InputEventMouse
Detecting mouse input or faking it can be explained in two ways: mouse buttons and mouse motion.

See also: mouse and input coordinates tutorial.

InputEventMouseButton
Clicking your mouse is a common action to read, but not as common to fake. It is the simplest action to read and fake, though, needing only 2 values.

input.pressed = input.button_index = BUTTON_LEFT .  .(,input)

InputEventMouseMotion
Faking mouse motion can be harder, but sometimes very useful. If you actually want to move the mouse, instead use. That will also generate a InputEventMouseMotion event to trigger.

By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, consider using  to emit events as often as possible. If you need this to draw freehand lines, consider using Bresenham's line algorithm as well to avoid gaps when you move the mouse quickly.

InputEventScreenDrag
(Only available on mobile devices)

Reading and writing screen dragging is header than InputEventMouseMotion, simply because you cannot force the user to move their finger via code. Okay, that's a lie. But to do that, you would need a degree in mind control or hypnotising, which is well outside the scope of this book!

InputEventScreenTouch
(Only available on mobile devices)

This event is for tapping (or untapping) on the screen.

InputEventJoypadButton
This InputEvent is for detecting joy-con buttons (i.e: buttons on a controller, linked to a computer or a console).

InputEventJoypadMotion
This event is for moving the Joy stick, one axis at a time. This InputEvent can be confusing.

It is important to know that this InputEvent does not have a Vector2 value you can read from. The following script converts this InputEvent into a Vector3, x and y are for position, z is for the joystick being moved.

(event: ) -> : event.axis: JOY_AXIS_0: (event.axis_value,, ) JOY_AXIS_1: (, event.axis_value, ) JOY_AXIS_2: (event.axis_value,, ) JOY_AXIS_3: (, event.axis_value, ) ( % [event.axis])

title: Guide to the Godot game engine/Input


text:
User talk:75.114.77.38

Earth science is the subject this topic is mainly discussed in.

Interesting
This is very very interesting! What topic? And welcome to Wikibooks. L10nM4st3r Roar at me/what my paws scratched 21:17, 11 March 2022 (UTC)

title: User talk:75.114.77.38


text:
User:QTE-Test2-WMF

Hello, this is a pineappleupsidedown user page. It is very exciting.

title: User:QTE-Test2-WMF


text:
Cookbook:Quick Tomato Noodle Soup

Ingredients

 * 2 packages ramen or udon noodles with flavoring mix
 * 2 tomatoes, chopped
 * 2 sausages
 * ½ medium onion, chopped

Procedure

 * 1) Bring 1.5 liters of water to a boil.
 * 2) Add noodles to to boiling water with one of flavoring packets.
 * 3) Add chopped tomatoes and sausages. Boil for 5 minutes.
 * 4) Add chopped onion and serve.

title: Cookbook:Quick Tomato Noodle Soup


text:
Cookbook:Pasta with Vegetables

Ingredients

 * ¼ tsp salt
 * ⅓ pound uncooked dried spaghetti
 * 2 medium tomatoes, chopped
 * 1 medium cucumber, chopped
 * ½ medium onion, chopped
 * 1 tbsp butter or oil
 * 3–5 tbsp pasta sauce or ketchup

Procedure

 * 1) Bring 2 liters water to a boil with the salt.
 * 2) Add spaghetti to boiling water. Cook for 4 minutes.
 * 3) Add chopped tomatoes and cucumber to the boiling pasta. Boil for another 5 minutes.
 * 4) Drain the water, add the butter or oil, and mix in the chopped onion.
 * 5) Mix in sauce or ketchup, and serve.

title: Cookbook:Pasta with Vegetables


text:
Cookbook:Pasta with Sausage

Ingredients

 * ¼ tsp salt
 * ⅓ pound uncooked dried spaghetti
 * 2–4 sausages
 * 1 tbsp butter or oil
 * 3–5 tbsp pasta sauce or ketchup

Procedure

 * 1) Bring 2 liters water to a boil, and add salt.
 * 2) Add the spaghetti to the boiling water, and cook for 3 minutes.
 * 3) Add sausages to pasta, and boil for 5 minutes.
 * 4) Drain water.
 * 5) Add butter to the pasta, then mix in sauce or ketchup.
 * 6) Serve.

title: Cookbook:Pasta with Sausage


text:
Cookbook:Scrambled Eggs with Vegetables

Ingredients

 * Oil
 * 2 medium tomatoes, chopped
 * 1 medium cucumber, chopped
 * 2 pinches salt
 * 3–4 eggs
 * ½ small onion, chopped

Procedure

 * 1) Heat a frying pan over medium heat, and add oil.
 * 2) Add tomato and cucumber to the pan. Cook for 2 minutes, stirring occasionally. Add salt.
 * 3) Beat the eggs with the onion and additional salt if desired. Transfer mixture to the pan.
 * 4) Cook eggs and vegetables, turning every 30 seconds until cooked to taste.
 * 5) Serve.

Notes, tips, and variations

 * If desired, you can fry the eggs and vegetables separately.

title: Cookbook:Scrambled Eggs with Vegetables


text:
Cookbook:Scrambled Eggs with Sausage

Ingredients

 * 2–4 sausages
 * 4 eggs
 * 2–3 pinches salt
 * Chopped vegetables (optional)

Procedure

 * 1) Add the sausages to a hot frying pan. Fry, turning, until sausage is cooked through.
 * 2) Beat the eggs with the salt.
 * 3) Transfer egg mixture to pan along with vegetables, if using. Fry for 30–60 seconds.
 * 4) Serve.

title: Cookbook:Scrambled Eggs with Sausage


text:
Rust for the Novice Programmer/Basic Maths Testing Program/Traits and Displaying

Traits and Displaying
Very little in Rust is magic. A lot of the stuff we've learned and used earlier could be reimplemented in our code. What we would like to do in our program is to use "{}" to display the operator directly.

What we want to write in our print_question is this: fn print_question(num1: i32, num2: i32, operator: Operator) { println!("What is {} {} {}?", num1, operator, num2); } However, if we try to run this, we get the message: error[E0277]: `Operator` doesn't implement `std::fmt::Display` The way things like println! works in Rust is that when it sees "{}", it checks whether the corresponding object after the comma implements a 'Trait' called 'Display'. A trait is like a marker on a type, indicating that it has certain methods that can be used.

If we look at the docs for std::fmt::Display we see that the trait has: fn fmt(&self, f: &mut Formatter<'_>) -> Result<, Error> We do have to remember this is all under std::fmt so we have to put this before each type. A lot of this will look quite strange but essentially we have to write a function that matches this, we can use the macro write! to make things easier like follows: impl std::fmt::Display for Operator { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "+") } } The std::fmt::Result on its own is a shorthand for the Result<, Error> above. Also the std::fmt:: before everything is a little tiresome. What we can do is put use std::fmt; at the top and change our implementation of the Display trait as follows: impl fmt::Display for Operator { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "+") } } The use statement means whenever the code encounters fmt, it will assume it is std::fmt. This is helpful in reducing the amount of code we have to write but can also be dangerous if we have our instance of fmt since it won't be able to be distinguished. That is unlikely to be the case for us so we can be comfortable making this change. We don't have to put it at the top but generally we will want to put all of our use statements in the same place. That being written, if we run the program now we get: What is 35 + 23? Oops, we didn't check which operator it is, let's fix that now: impl fmt::Display for Operator { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Operator::Addition => write!(f, "+"), Operator::Subtraction => write!(f, "-"), }    } } Now if we run the program, we get: What is 35 - 23? which is what we wanted.

All this may seem a little convoluted but there's a few advantages of doing things like this:
 * Reuse, we can now easily print out the operator in a different place easily
 * Breaking up the problem, we don't want everything in the same function, or the same place. In this way the Operator type and functionality is separated out from the other parts of the program.
 * Easier to edit, since everything is in the same place we just have to change the logic in the Operator type and related functions and all uses of it in other places will be correct.

Next: we look at how to take in user input


text:
User talk:Arturoiochoam

Welcome, Arturoiochoam!

If you have any questions, you can ask in the assistance reading room or possibly contact me personally.

Chess
Thanks for your contributions to Chess Opening Theory. In the future, please do not write entire essays like you did on The London System. Try to use short and precise encyclopedic language. If you have questions, feel free to leave a message on my talk page. —Dexxor (discuss • contribs) 08:06, 2 October 2023 (UTC)

title: User talk:Arturoiochoam