<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7058339</id><updated>2026-10-15T17:06:19.628+08:00</updated><category term="others"/><category term="cpp"/><category term="android"/><category term="joke"/><category term="libreoffice"/><category term="linuxmint"/><category term="firefox"/><category term="science"/><category term="mathematics"/><category term="qtcpp"/><category term="question"/><category term="google"/><category term="omnetpp"/><category term="python"/><category term="ubuntu"/><category term="Java"/><category term="codeblocks"/><category term="julia"/><category term="latex"/><category term="rust"/><category term="health"/><category term="microsoft"/><category term="artificial_intelligence"/><category term="commercialization"/><category term="cpp2020"/><category term="cpp2023"/><category term="cpp2026"/><category term="cpp2029"/><category term="cpp2032"/><category term="raspberry_pi"/><title type='text'>Ytbau.Blogspot.com</title><subtitle type='html'>Reading. Practice. Writing. &lt;br&gt;&#xa;&#xa;Please feel free to comment. Suggestions are also welcomed here. Write something &quot;wholesome serving purpose&quot; here.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>245</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7058339.post-7901176888168491756</id><published>2026-10-12T17:09:32.312+08:00</published><updated>2026-10-12T17:09:32.312+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commercialization"/><title type='text'>De-Enshittify Apps</title><content type='html'>Enshittification is the gradual, systematic decline in the quality of a product, service or digital platform caused by profit seeking, lock-in, monopoly, maximize short term profits before eventually collapsing or stagnating, private equity, extraction for shareholders.&lt;br /&gt;&lt;br /&gt;Mobile apps are over.&amp;nbsp;&lt;br /&gt;*Replace mobile apps to web apps for healthy eyes.&amp;nbsp;&lt;br /&gt;*Build our own mobilephones and smartphones.&amp;nbsp;&lt;br /&gt;*De-enshittify the entire tech world.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Adobe =&amp;gt; ArtCraft including PhotoCraft, VectorCraft, FilmCraft, LigthCraft, EffectCraft, DesignCraft, PdfCraft,&amp;nbsp;&lt;br /&gt;open source apps,&amp;nbsp;&lt;br /&gt;runs on Mac, Windows, Linux, Web Browser&lt;br /&gt;Adobe may access your content through both automated and manual methods.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Fee buried in the fineprint.&amp;nbsp;&lt;br /&gt;Cancelling made deliberately hard. Difficult cancelling.&amp;nbsp;&lt;br /&gt;No competition app. Monopoly. A lack of real market competition, driven by relaxed antitrust enforcement, means users have nowhere better to go when a service gets worse.&lt;br /&gt;No cheaper plan.&amp;nbsp;&lt;br /&gt;No free tiers.&amp;nbsp;&lt;br /&gt;Tie up users. Lock-in and legal barriers: Digital rights management (DRM) and laws like the Digital Millennium Copyright Act (DMCA) stop users from reverse engineering software, fixing their own hardware (such as smart appliances or tractors), or building alternative apps to bypass platform spying or tracking.&lt;br /&gt;Difficult for a company to switch tools overnight, plug-ins, pipelines, training, decades of files.&amp;nbsp;&lt;br /&gt;Charging rent forever.&lt;br /&gt;Raising the subscription price.&amp;nbsp;&lt;br /&gt;Making you hard to leave the app.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can&#39;t win by trapping people.&amp;nbsp;&lt;br /&gt;You have to be the one where customers would choose anyway.&amp;nbsp;&lt;br /&gt;Rent it =&amp;gt; Own it, you owned it forever.&amp;nbsp;&amp;nbsp;&lt;br /&gt;Subscription =&amp;gt; Purchase one off, master collection, boxed, yours, forever.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You die: the landlord can put the rent up whenever he or she likes.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You are using software you paid for.&amp;nbsp;&lt;br /&gt;Imagine car company ringing you up to say driving your old car might get you sued.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Microsoft =&amp;gt; DeckCraft for presentation, GridCraft for spreadsheet.&lt;br /&gt;&lt;br /&gt;CadCraft for hardware design.&lt;br /&gt;SoundCraft for sound editor.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The app is free but open source company makes money from AI images, AI video credits, cloud storage.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Only download from the official project page.&amp;nbsp;&lt;br /&gt;Don&#39;t trust written alpha code app with a client deadline.&amp;nbsp;&lt;br /&gt;Keep backups.&amp;nbsp;&lt;br /&gt;Before paying corporation, check your paying plan so that you can cancel risk-free.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;A menu structure is a &quot;method of operation”. Not copyrightable.&amp;nbsp;&lt;br /&gt;Corporation cannot try to own the &quot;look and feel&quot; of a desktop.&amp;nbsp;&lt;br /&gt;Copying how software talks to other software is &quot;fair use&quot;.&amp;nbsp;&lt;br /&gt;Taking a product apart to build a compatible one can be fair use.&amp;nbsp;&lt;br /&gt;Photo file format specifications are published.&amp;nbsp;&lt;br /&gt;Clean room app rebuild with no other corporation code.&amp;nbsp;&lt;br /&gt;A free photo editor written from scratch.&amp;nbsp;&lt;br /&gt;Never taken to court.&amp;nbsp;&lt;br /&gt;Free photo app lookalikes already exist: Gimp since 1996, Photopea in your browser, Krita, Inkscape.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;No uploading your files to corporation servers.&lt;br /&gt;Privacy-first, client-side app tools.&lt;br /&gt;Open source licenses can&#39;t be taken back.&amp;nbsp;&lt;br /&gt;Paying open source tech is freedom.&amp;nbsp;&amp;nbsp;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/7901176888168491756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/7901176888168491756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/7901176888168491756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/7901176888168491756'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2026/10/de-enshittify-apps.html' title='De-Enshittify Apps'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-8157220389378484098</id><published>2026-10-12T16:03:15.124+08:00</published><updated>2026-10-12T16:03:15.125+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="question"/><title type='text'>Genocide Accountability</title><content type='html'>Chapter: Call for accountability&lt;br /&gt;You say that you don&#39;t want to take sides, that you don&#39;t want to be involved in politics.&lt;br /&gt;Well, saying free-war-victim-country is not only politics, it&#39;s also basic human decency.&lt;br /&gt;Because by deciding to stay neutral and not to speak up against a genocide, you are choosing a side and the bad one.&amp;nbsp;&lt;br /&gt;People like you who have power and influence should have the courage to speak up for justice and defend the defenseless.&amp;nbsp;&lt;br /&gt;Leader should be an example for youth.&amp;nbsp;&lt;br /&gt;But you, you are not an example for youth.&amp;nbsp;&lt;br /&gt;Chapter: The importance of politics&lt;br /&gt;Now about you not wanting to take sides in politics.&amp;nbsp;&lt;br /&gt;You see, politics is life.&lt;br /&gt;Politics decide if we have healthcare.&lt;br /&gt;Politics decide if women have equal rights to men.&amp;nbsp;&lt;br /&gt;Politics decide if we teach science at school or if we teach children that the earth was created by God in seven days, and not billion years.&amp;nbsp;&lt;br /&gt;Politics decide what we put on our plates and if we continue to treat animals and carcinogenic red meats the way we do just for our taste buds and even if it comes with destroying our climate.&amp;nbsp;&lt;br /&gt;Politics even decides the quality of the air we breathe.&amp;nbsp;&lt;br /&gt;Politics even decides the quality of the environment and extreme weathers caused by human.&amp;nbsp;&lt;br /&gt;So you see even if you lived deep in the woods, politics will still affect you at some point.&lt;br /&gt;And yes, you should be involved in politics.&amp;nbsp;&lt;br /&gt;And I think it&#39;s a shame that at your age and with all the money that you have and all the connections that you have, you still haven&#39;t figured this out.&lt;br /&gt;But maybe after all, your problem is something more than a comprehension problem.&amp;nbsp;&lt;br /&gt;Maybe there is something more.&lt;br /&gt;Chapter: Prioritizing wealth over ethics&lt;br /&gt;But of course, supporting basic humanity for the people carries risks.&lt;br /&gt;So you thought speaking up against a genocide could have prevented you from making monetary millions more.&lt;br /&gt;Aww, boo-hoo, poor you.&lt;br /&gt;So you see it seems to me that the real deal is that you decided to go for the money instead of your humanity.&amp;nbsp;&lt;br /&gt;That&#39;s what I think.&lt;br /&gt;And what a disappointment it was.&amp;nbsp;&lt;br /&gt;What a shame that only one apology of yours.&amp;nbsp;&lt;br /&gt;That&#39;s what a genocide is worth of your one sorry.&amp;nbsp;&lt;br /&gt;And what a shame that you guys gaslighted everything.&lt;br /&gt;You put yourself in, not for the war victims.&amp;nbsp;&lt;br /&gt;What a shame.&amp;nbsp;&lt;br /&gt;Stop war. You see. It&#39;s easy. Stop war.&amp;nbsp;&lt;br /&gt;And I will finish with this.&amp;nbsp;&lt;br /&gt;You are worth millions but you have no courage.&lt;br /&gt;And in the meantime, many people around the world are worth almost zero.&lt;br /&gt;But at least they have their humanity.&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/8157220389378484098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/8157220389378484098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/8157220389378484098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/8157220389378484098'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2026/10/genocide-accountability.html' title='Genocide Accountability'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-3068944688265066312</id><published>2026-09-23T17:23:17.358+08:00</published><updated>2026-09-23T18:53:46.739+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="others"/><title type='text'>Multiple Languages in Spoken Words</title><content type='html'>&lt;p&gt;Lax lah. - English, Malay.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Sik Zo Mei, Chi1, Simi Lay. = Chinese1, Chinese2, Chinese3.&lt;/p&gt;&lt;p&gt;This barang is cikai one lah. = English, Malay, Chinese.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/3068944688265066312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/3068944688265066312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3068944688265066312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3068944688265066312'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2026/09/multiple-languages-in-spoken-words.html' title='Multiple Languages in Spoken Words'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-3319908723512338498</id><published>2026-09-13T20:55:31.449+08:00</published><updated>2026-10-07T16:18:33.280+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="artificial_intelligence"/><title type='text'>AI Doomsday</title><content type='html'>&lt;p&gt;AI apocalypse&lt;br /&gt;AI extinction risk&lt;br /&gt;AI catastrophic&lt;br /&gt;AI was going to be the end of humanity.&lt;br /&gt;AI could kill all humans!&lt;br /&gt;AI leading to human extinction.&lt;br /&gt;There is a strong chance that we could all die in the immediate future.&amp;nbsp;&lt;br /&gt;AI decides your future.&lt;br /&gt;&lt;br /&gt;Out-of-control artificial intelligence.&lt;br /&gt;There is a good chance that human beings will lose control over AI.&amp;nbsp;&lt;br /&gt;Humans lose control of AI systems and AI agents.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;AI image generation tools being to used create non-consensual nude deepfakes of women, misinform people and amplify scams.&lt;br /&gt;&lt;br /&gt;AI staff genuinely frightened for humanity&#39;s future.&lt;br /&gt;People working on the AI and AGI technology were genuinely frightened about the speed of its advancements and what it could mean for humanity.&lt;br /&gt;&lt;br /&gt;&lt;b id=&quot;docs-internal-guid-fe3d35b7-7fff-4cf8-fc0f-5a884dfa1a91&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;/span&gt;&lt;/b&gt;AI threatened humanity and surpassed human abilities.&amp;nbsp;&lt;br /&gt;For-profit&amp;nbsp;&lt;b id=&quot;docs-internal-guid-bbed0098-7fff-a7c4-25ec-ae590a2064e6&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;and closed-source &lt;/span&gt;&lt;/b&gt;AI companies developed artificial super intelligence (AGI) systems that AI technology is theoretically smarter than humans.&lt;br /&gt;AI systems has been used to complete human daily tasks and able to handle far more complex non-human tasks.&lt;br /&gt;AI theoretically improving itself without human involvement.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;A swarm of bots acting like a supercomputer that could take over the internet.&lt;br /&gt;&lt;br /&gt;It found that AI tools could outperform humans at some hacking and cybersecurity tasks.&lt;br /&gt;It also showed the ability to independently escape what is known as the sandbox environment, setting off a debate about AI&#39;s potential dangers.&amp;nbsp;&lt;br /&gt;AI tools hack into websites despite not being asked to.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Threat actors were trying to use its AI technology for activity including the development of bioweapons and cyber-espionage.&lt;br /&gt;AI systems being used to amplify or lead espionage, cyber-attacks or biological warfare, or disrupt economies - whether by accident or design.&lt;br /&gt;&lt;br /&gt;Bad actors used AI system for US sponsored surveillance and propaganda operations, among others.&lt;br /&gt;AI system was used to disrupt and manipulate the election platform that primarily targeted people in the country.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Let’s keep things in perspective.&lt;br /&gt;The roll out of capable, open-source AI systems has shaken duo-poly Claude AI and OpenAI ChatGPT subscription markets, not for sell technology.&lt;br /&gt;We have always been transparent that AI will bring both enormous benefits and unprecedented risks.&lt;br /&gt;To address these risks, for-profit duo-poly AI firms, i.e. Anthropic and OpenAI, continue to build models with some of the strongest safeguards in the industry.&lt;br /&gt;It also aggressively tests its models and publishes the findings to aid scrutiny and prevent incidents of AI misalignment.&lt;br /&gt;The world would benefit from the industry adopting a lawful, verifiable way to work together to pace how we release powerful AI models.&lt;br /&gt;It is an important step forward in balancing competing considerations like speed and safety.&lt;br /&gt;Ban Artificial Super Intelligence.&amp;nbsp;&lt;br /&gt;The people researching the technology genuinely want to see the upside of things like solving diseases and improving everyone lives with AI.&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/3319908723512338498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/3319908723512338498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3319908723512338498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3319908723512338498'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2026/09/ai-doomsday.html' title='AI Doomsday'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-5107361757337849780</id><published>2026-09-02T17:06:55.062+08:00</published><updated>2026-09-11T19:11:10.467+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="health"/><category scheme="http://www.blogger.com/atom/ns#" term="science"/><title type='text'>The Story of Three Arrows</title><content type='html'>Once there was a boy named Davinci who loved to be outside. One sunny afternoon, he was running through a field of tall grass. The wind was cool, the birds were singing, and Davinci felt like the whole world was his friend. He was so happy that he didn&#39;t have a single worry in his head.&lt;br /&gt;&lt;br /&gt;Suddenly, Davinci&#39;s foot hit a hidden rock. He tumbled forward and landed hard on the dusty path. &quot;Ouch!&quot; he cried. His knee was scraped and stinging. This was the First Arrow. It was the physical pain that just happens in life. It hurt, and it was nobody&#39;s fault, but it was real.&lt;br /&gt;&lt;br /&gt;Davinci sat on the ground and looked at his knee. He started to feel very angry. &quot;Why did that rock have to be there?&quot; he shouted. &quot;This is a terrible day! Everything is ruined!&quot; This was the Second Arrow. By getting angry and resisting the pain, Davinci made his heart hurt as much as his knee pain.&lt;br /&gt;&lt;br /&gt;Davinci limped back to his house. He didn&#39;t want to feel the pain in his knee, and he didn&#39;t want to feel the anger and suffering in his heart. He wanted the bad feelings to go away right now. He stomped into the kitchen, looking for something anything—to help him forget about his bad day.&lt;br /&gt;&lt;br /&gt;Davinci found a big jar of chocolate cookies and ate ten of them very fast. Then he slumped onto the sofa and turned on a glowing screen to watch loud cartoons. This was the Third Arrow. He was using bad habits to hide from his feelings instead of facing them.&lt;br /&gt;&lt;br /&gt;As the sun began to set, Davinci&#39;s knee still hurt. But now, his tummy ached from the cookies, and his eyes felt itchy and tired from the screen. He felt even more sufferings than before. The Third Arrow had not fixed his pain; it had only added a new &quot;bad-feeling hangover&quot; to his day.&lt;br /&gt;&lt;br /&gt;Just then, his neighbor Cong-Min knocked on the door. Cong-Min was a wise man who knew how to listen. He saw the empty jar and the dark room and sat down quietly on the rug. &quot;It looks like you&#39;ve been hit by a few arrows today, Davinci,&quot; Cong-Min said in a gentle voice.&lt;br /&gt;&lt;br /&gt;Cong-Min explained, &quot;The First Arrow is the pain of the fall. We cannot stop that. But the Second Arrow is the anger we fire at ourselves. And the Third Arrow is the way we try to hide with sugar and screens. We fire those last two arrows ourselves, but we can also choose to stop.&quot;&lt;br /&gt;&lt;br /&gt;&quot;What do I do instead?&quot; Davinci asked. Cong-Min smiled. &quot;Try Wise Self-Care. Instead of watching videos, read a book to calm your mind. Go for a gentle walk to move your body. And when you are tired, get enough sleep to let your body heal. These actions help the arrows fall away.&quot;&lt;br /&gt;&lt;br /&gt;Davinci stood up and washed his face. He put the cookies away and felt better. He went for a slow walk to watch the sunset. The First Arrow still stung a little, but the anger and the &quot;sugar-fog&quot; and “screen-addiction” were gone. Davinci felt brave, calm, and ready for a new day.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/5107361757337849780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/5107361757337849780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/5107361757337849780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/5107361757337849780'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2026/09/the-story-of-three-arrows.html' title='The Story of Three Arrows'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-3238535026816383344</id><published>2025-12-23T04:16:00.015+08:00</published><updated>2026-02-18T04:42:40.060+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="science"/><title type='text'>Interactive Proof System</title><content type='html'>&lt;p&gt;Interactive proof systems were formulated in 1985 as published in the seminal research paper titled &quot;The Knowledge Complexity of Interactive Proof Systems&quot;. Power X is from the interactions.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC5qAsKyke2crOlNe73b8upqbfrLpSuXMXIf6H3AjWDGMBizYw8plNg52FUz_55rDPZaWJETwuoiubxK3Gf8ZI80sT9FoWAYE1ezpJo1o45D6Mp8j1qUKyQ1cttGma8In2QpV9JpXjGXROMD9YuzGV54K_gVZM5V98g10m8YP1LbXMPdIEt07N/s682/interactive%20proof%20system_bottom%20up%20260218.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;figure interactive proof system&quot; border=&quot;0&quot; data-original-height=&quot;586&quot; data-original-width=&quot;682&quot; height=&quot;453&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC5qAsKyke2crOlNe73b8upqbfrLpSuXMXIf6H3AjWDGMBizYw8plNg52FUz_55rDPZaWJETwuoiubxK3Gf8ZI80sT9FoWAYE1ezpJo1o45D6Mp8j1qUKyQ1cttGma8In2QpV9JpXjGXROMD9YuzGV54K_gVZM5V98g10m8YP1LbXMPdIEt07N/w526-h453/interactive%20proof%20system_bottom%20up%20260218.png&quot; width=&quot;526&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In computational complexity theory, an interactive proof system is an abstract machine that models computation as the interaction between two parties by exchanging messages.&lt;br /&gt;IP is the main complexity class that describing interactive proof system.&lt;br /&gt;It has been proven that IP equals PSPACE which means that IP is the class of problems solvable by a deterministic Turing machine in polynomial space.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/3238535026816383344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/3238535026816383344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3238535026816383344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3238535026816383344'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2025/12/interactive-proof-system.html' title='Interactive Proof System'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC5qAsKyke2crOlNe73b8upqbfrLpSuXMXIf6H3AjWDGMBizYw8plNg52FUz_55rDPZaWJETwuoiubxK3Gf8ZI80sT9FoWAYE1ezpJo1o45D6Mp8j1qUKyQ1cttGma8In2QpV9JpXjGXROMD9YuzGV54K_gVZM5V98g10m8YP1LbXMPdIEt07N/s72-w526-h453-c/interactive%20proof%20system_bottom%20up%20260218.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-3744144707175879929</id><published>2025-10-10T01:13:24.745+08:00</published><updated>2026-10-15T13:15:04.870+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="question"/><title type='text'>Dictator Leader</title><content type='html'>&lt;p&gt;Dictator Leader is so dumb that you can&#39;t even realize that you&#39;re dumb.&amp;nbsp;&lt;br /&gt;You are a mistake, you are a stain, in history.&amp;nbsp;&lt;br /&gt;You will soon be forgotten.&lt;br /&gt;The worst leader, the world ever had.&amp;nbsp;&lt;br /&gt;The world will continue without you.&amp;nbsp;&lt;br /&gt;And the world better off without you.&amp;nbsp;&lt;br /&gt;No, nobody will regret you.&amp;nbsp;&lt;br /&gt;Not even your own voters.&amp;nbsp;&lt;br /&gt;Poor little, Dictator Leader.&amp;nbsp;&lt;br /&gt;Alright, I&#39;m outta here. Bye-bye loser.&amp;nbsp;&lt;br /&gt;All my support to the real country patriots who are fighting for democracy, fighting for the people, fighting for real freedom of speech, and fighting for justice.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Time for Dictator Leader to go.&lt;br /&gt;Time for the country to get a new president.&lt;br /&gt;We are behind people, not Dictator Leader and that will not change.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Who benefits from the war?&amp;nbsp;&lt;br /&gt;Dictator Leader created a war that people are paying for at the grocery, checkout shop counter, at the pump for petrol, in our tax dollars.&amp;nbsp;&lt;br /&gt;The new and big threat caused by Dictator Leader is the nuclear threat and MAD threat.&amp;nbsp;&lt;br /&gt;There was no war before, now there is a war by Dictator Leader.&amp;nbsp;&lt;br /&gt;The more wars we have, the less safe we are in this world.&amp;nbsp;&lt;br /&gt;We could have chosen peace and instead we chose war.&amp;nbsp;&lt;br /&gt;No national security, Dictator Leader lets an enemy to take out two cities of own country instead of protecting the cities.&amp;nbsp;&amp;nbsp;&lt;br /&gt;Deranged Dictator Leader idea of an enemy nuking two cities of own country, it is a small price to pay.&lt;br /&gt;Insane Dictator Leader idea of an enemy wiping out two cities of own country, it is a small price to pay.&lt;br /&gt;Dictator Leader wants an enemy to nuke two cities of own country is f***ing batshit crazy.&amp;nbsp;&amp;nbsp;&lt;br /&gt;Dictator Leader doesn’t give a shit.&amp;nbsp;&lt;br /&gt;Dictator Leader is blinding himself.&amp;nbsp;&lt;br /&gt;Dictator Leader has downplayed and not cared about national security and make our country great again MOGA.&amp;nbsp;&lt;br /&gt;I am sorry but this does not make it any better.&amp;nbsp;&lt;br /&gt;I am sorry, I don’t fully buy this.&amp;nbsp;&lt;br /&gt;I think the reality is Dictator Leader is so delulu and deeply out of touch with reality.&lt;br /&gt;Dictator Leader has repeatedly downplayed the national security threat.&lt;br /&gt;People should go into hostile news spaces, just keeping their chill, being very friendly, being very affable, approachable, liable, speaking to the issues that people care about.&amp;nbsp;&amp;nbsp;&lt;br /&gt;Patient should wait no more than 2.5 hours to see cardiologist to save his or her life.&amp;nbsp;&lt;br /&gt;We are capitalists because I believe that we leave it to supply and demand to allocate where capital ought to go and the goods that we produce.&amp;nbsp;&lt;br /&gt;But I also believe that there&#39;s a basic amount of rights that we need.&amp;nbsp;&lt;br /&gt;Good school, clean air, clean water, healthcare, childcare, those are things that just are in the affirmative.&amp;nbsp;&lt;br /&gt;Now those are the basic foundations.&amp;nbsp;&lt;br /&gt;It&#39;s not disturbing to me to think that government should be able to offer you those basic things just like you got and I got.&amp;nbsp;&lt;br /&gt;I&#39;m so grateful for the amazing public schools that I got to pay so much money for those services.&lt;br /&gt;Well, the reason we pay so much money is because we end up fighting wars that we shouldn&#39;t be fighting.&amp;nbsp;&lt;br /&gt;That&#39;s why we end up paying so much money.&lt;br /&gt;Because we cut loopholes for the richest people who pay a lower effective tax rate than we do.&lt;br /&gt;So, I would rather us not buy a whole bunch of wars and I would rather us buy really good schools and healthcare.&lt;br /&gt;But capitalism isn&#39;t functioning as it should right now.&amp;nbsp;&lt;br /&gt;There should be a more equitable human dignity based capitalism way to have a system that doesn&#39;t result in massive wealth inequality.&amp;nbsp;&lt;br /&gt;We can say, supply and demand, is good to allocate resources in capitalism.&lt;br /&gt;People need basic necessities when we are the rich country in the world.&lt;br /&gt;Love you all. Peace out.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Let us be clear from the outset, the struggle for indigenous people has always been about land and self-determination, not primarily about religion.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;A classic colonial tactic which is to justify settlement by portraying the indigenous population as sub-human, un-civilised, un-worthy of sovereignty, or with no country rights.&lt;br /&gt;&lt;br /&gt;A dictator leader was directly involved in the bombing of the hotel, which killed around hundred people. The British even banned the dictator leader from entering the UK. Yet this same man later became the prime minister and a Nobel Peace Prize laureate.&amp;nbsp;&lt;br /&gt;Our world filled with injustice.&lt;br /&gt;&lt;br /&gt;Story about Dictator Leader and a pirate.&lt;br /&gt;Dictator Leader asked the pirate: How dare you molest the seas?&lt;br /&gt;The pirate replied: How dare you molest the whole world? Because I do it with a small boat, I’m called a pirate. You, with a great navy with aircarft carrier warships, molest the world and are called a king.&lt;br /&gt;The parallel is hard to miss.&lt;br /&gt;&lt;br /&gt;Dictator Leader is portrayed as the victim responding to unprovoked aggression rather than as an occupying power whose own policies fuel the cycle of violence, lying and controling world news media.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;By making that right exclusive to Dictator Leader people, the law effectively relegates indigenous citizens to second class status.&lt;br /&gt;This dual legal system entrenches systematic discrimination.&lt;br /&gt;&lt;br /&gt;Faced with this reality, some now argue that the only just solution may be a single, democratic, secular state across all of historic indigenous people which is one in which every citizen, regardless of religion or ethnicity, enjoys equal rights. This, in fact, was the vision indigenous people advocated for a century ago.&lt;br /&gt;&lt;br /&gt;In the dictator leader vision, the logical outcome is not co-existence but ethnic cleansing which the expulsion of the indigenous population.&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Common people pillories market capitalism and derides the dictatorsip of an economy that kills by enriching a small wealthy elite around Dictator Leader.&amp;nbsp;&lt;/div&gt;&lt;div&gt;Children are stripped of safety, health and education.&amp;nbsp;&lt;/div&gt;&lt;div&gt;We live in a constant state of anxiety and depression, never knowing if tomorrow will bring social mobility.&amp;nbsp;&lt;/div&gt;&lt;div&gt;The lives and the little money we worked so hard to build will be stripped from us.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Norway braces for dictator leader reaction if he does not win Nobel Pissed Prize. Dictator Leader may impose tariffs, demand higher Nato contributions or even declare Norway an enemy, analyst says.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;We dies by lies.&amp;nbsp;&lt;br /&gt;Harming every people.&lt;br /&gt;It continues to be more pain.&amp;nbsp;&lt;br /&gt;Health costs become more expensive.&amp;nbsp;&lt;br /&gt;Government shutdown.&lt;br /&gt;Unilateral actions by Dictator Leader.&lt;br /&gt;Government employees fired from the jobs.&lt;br /&gt;&lt;br /&gt;Procedural legitimacy is getting conservative societies in economy crisis.&lt;br /&gt;It&#39;s what getting conservative politics in disaster.&amp;nbsp;&lt;br /&gt;As long as you follow procedure, even if you elect Dictator Leader that are incompetent and old, even if you elect Dictator Leader that are selfish, criminal, that are corrupt, that don&#39;t deliver, you&#39;re still legitimate.&amp;nbsp;&lt;br /&gt;We don&#39;t want that.&amp;nbsp;&lt;br /&gt;We want leaders who get their legitimacy by delivering.&amp;nbsp;&lt;br /&gt;If you can deliver the goods, you are legitimate.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;We need Ammunition, not a Ride. Fight, fight, fight, the Dictator Leader.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The fact of the matter is this is a dangerous wannabe Dictator Leader.&amp;nbsp;&lt;br /&gt;This is a stupid Dictator Leader. TTT The Trash Talker Dictator Leader.&amp;nbsp;&lt;br /&gt;Remind ourselves, Dictator Leader is running to stay out of prison.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Dictator Leader wants to thank our department of war for prosecuting innocent people and making sure they never see the light of day again.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Dictator Leader deceives with religion.&lt;/div&gt;&lt;div&gt;Dictator Leader will appear spiritual but actually turn people away from religion.&amp;nbsp;&lt;/div&gt;&lt;div&gt;Dictator Leader is a deceiver.&lt;/div&gt;&lt;div&gt;Dictator Leader will mislead people while appearing strong or righteous.&lt;br /&gt;&lt;br /&gt;Death to the dictator leader and long live &amp;lt;country name&amp;gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;iframe class=&quot;b-iframe-ws lTgB3 BLOG_object_iframe&quot; frameborder=&quot;0&quot; height=&quot;198px&quot; jsaction=&quot;load:lzUY8e&quot; src=&quot;/share-widget?w=poi&amp;amp;u=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Dfight%2520song&amp;amp;ved=1t%3A269313&amp;amp;bbid=7058339&amp;amp;bpid=3744144707175879929&quot; width=&quot;200px&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;You must not be led by some rather dodgy authoritarian figures.&lt;br /&gt;&lt;br /&gt;Our laws are clear.&amp;nbsp;&lt;br /&gt;You can refuse illegal orders.&lt;br /&gt;You must refuse illegal orders.&lt;br /&gt;Don&#39;t give up. Fight, fight, fight.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Dictator Leader is sick in the head.&lt;br /&gt;Dictator Leader traitor behavior against our own people, punishable by death.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/3744144707175879929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/3744144707175879929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3744144707175879929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3744144707175879929'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2025/10/dictator-leader.html' title='Dictator Leader'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-789024433919519342</id><published>2025-08-20T23:52:00.001+08:00</published><updated>2025-08-20T23:52:08.145+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="health"/><title type='text'>Fire survival tips</title><content type='html'>1 Stop, drop, cover and roll&amp;nbsp;&lt;br /&gt;If your clothes catch fire stop, drop, cover your face with your hands and roll to smother the flames.&lt;br /&gt;&lt;br /&gt;2 Get down low, go go go!&amp;nbsp;&lt;br /&gt;In a fire, the safest area for breathing is near the floor where the air is cooler and cleaner, so remember to crawl low.&lt;br /&gt;&lt;br /&gt;3 Check doors for heat before opening&amp;nbsp;&lt;br /&gt;Use the back of your hand to check for heat. If the door is hot, use another exit.&lt;br /&gt;&lt;br /&gt;Get fire extinguishers&lt;br /&gt;Ideally polace it at the entrance of the kitchen, bedroom or main entrance.&lt;br /&gt;&lt;br /&gt;Install at least one smoke detector&lt;br /&gt;Install on every level of the home&lt;br /&gt;&lt;br /&gt;Have at least two exit plans&lt;br /&gt;That adult family members are aware of&lt;br /&gt;&lt;br /&gt;Protect what matters&lt;br /&gt;Safety by choice, not by chance&lt;br /&gt;Leave nothing to chance&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/789024433919519342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/789024433919519342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/789024433919519342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/789024433919519342'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2025/08/fire-survival-tips.html' title='Fire survival tips'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-5050632389109672821</id><published>2025-05-10T23:45:00.005+08:00</published><updated>2025-05-10T23:52:41.791+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cpp2032"/><title type='text'>C++32 (or C++2e), C++ 2032, Cpp 2032, g++ 2032</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;br /&gt;Subject: C++ 2032&lt;br /&gt;&lt;br /&gt;3&lt;br /&gt;Code example for ?&lt;br /&gt;&lt;br /&gt;2&lt;br /&gt;Approximate feature suggestions:&lt;br /&gt;- to complete C++29 or C++ 2029&lt;br /&gt;&lt;br /&gt;1&lt;br /&gt;Web links, references&lt;br /&gt;&lt;br /&gt;Wandbox, online C++ compiler&lt;br /&gt;&lt;a href=&quot;https://wandbox.org/&quot;&gt;https://wandbox.org/&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Coliru is short for compile, link and run, online C++ compiler&lt;br /&gt;&lt;a href=&quot;https://coliru.stacked-crooked.com/&quot;&gt;https://coliru.stacked-crooked.com/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Godbolt Compiler Explorer C++&lt;br /&gt;&lt;a href=&quot;https://godbolt.org/&quot;&gt;https://godbolt.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;C++ status, C++ roadmap&lt;br /&gt;&lt;a href=&quot;https://isocpp.org/std/status&quot;&gt;https://isocpp.org/std/status&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;C++ 2032&lt;br /&gt;https://en.cppreference.com/w/cpp/32&lt;br /&gt;&lt;br /&gt;a list of open source C++ libraries&lt;br /&gt;&lt;a href=&quot;https://en.cppreference.com/w/cpp/links/libs&quot;&gt;https://en.cppreference.com/w/cpp/links/libs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;C++ Conference or CppCon&lt;br /&gt;&lt;a href=&quot;https://cppcon.org/&quot;&gt;https://cppcon.org/&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/5050632389109672821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/5050632389109672821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/5050632389109672821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/5050632389109672821'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2025/05/c32-or-c2e-c-2032-cpp-2032-g-2032.html' title='C++32 (or C++2e), C++ 2032, Cpp 2032, g++ 2032'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-5749220131666527694</id><published>2025-04-25T14:22:00.002+08:00</published><updated>2025-04-25T14:22:21.365+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="question"/><title type='text'>Act of War and Water Sharing Treaty</title><content type='html'>In its response, the state2 also rejected the state1 suspension of the water sharing treaty of many years old between the two state neighbors. &lt;br /&gt;&lt;br /&gt;Any attempt to stop or divert the water will be considered as an act of war.&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/5749220131666527694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/5749220131666527694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/5749220131666527694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/5749220131666527694'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2025/04/act-of-war-and-water-sharing-treaty.html' title='Act of War and Water Sharing Treaty'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-2379532916591945398</id><published>2025-04-21T22:41:00.007+08:00</published><updated>2025-04-21T22:41:46.057+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="others"/><title type='text'>Understanding President Trash Tariffs war</title><content type='html'>Recently, even an economist was able to demonstrate why President Trash&#39;s insane war on tariffs are a complete disaster. &lt;br /&gt;&lt;br /&gt;If you take your credit card and you go shopping, you run up a large credit card debts. &lt;br /&gt;You&#39;re running trade deficits with all those shops. &lt;br /&gt;Now it would be pretty strange if you then blamed all the shop owners for having sold you all those things. &lt;br /&gt;You&#39;re ripping me off! &lt;br /&gt;I&#39;m running a trade deficit. &lt;br /&gt;&lt;br /&gt;That is the level of understanding of the President Trash.&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/2379532916591945398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/2379532916591945398' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/2379532916591945398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/2379532916591945398'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2025/04/understanding-president-trash-tariffs.html' title='Understanding President Trash Tariffs war'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-714225818298316477</id><published>2024-12-21T17:06:00.009+08:00</published><updated>2024-12-21T17:11:47.995+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cpp"/><category scheme="http://www.blogger.com/atom/ns#" term="mathematics"/><title type='text'>Newton-Raphson Method in C++</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;The Newton Raphson Method is an open method used to find the roots of a function.&lt;br /&gt;It employs the technique of linear approximation and involves using the tangent line to approximate the roots.&lt;br /&gt;The method is highly efficient and converges rapidly, providing robust solutions in fewer iterations.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: times; font-size: medium;&quot;&gt;&lt;b id=&quot;docs-internal-guid-7a83a0cb-7fff-8022-8b34-6f45875f02ab&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;br /&gt;File content:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: times; font-size: small;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;{{{{{&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;lt;cmath&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;using&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;namespace&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #267f99; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;std&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;const&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;double&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; EPS = &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;0.000001&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;double&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;function&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;double&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;x0&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: green; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// x0^2 - 3*x0 + 2 = (x0 - 1)(x0 - 2)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; x0*x0 - &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;3&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;*x0 + &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;2&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;double&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;derivative_of_the_function&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;double&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;x0&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;2&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;*x0 - &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;3&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;int&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;main&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;()&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;int&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; max;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;int&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; i = &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;0&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;double&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; x1, x0;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;Newton-Raphson Method in C++&quot;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;Maximum number of iterations: &quot;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;max = &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;100&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; max &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;The first approximation: &quot;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x0 = &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;0&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: green; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; // you get the root 1&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: green; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//x0 = 3; // you get the root 2&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; x0 &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;bool&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; flagStopLoop = &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;false&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;do&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x1 = x0 - (&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;function&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(x0) / &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;derivative_of_the_function&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(x0));&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i++;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;if&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;( &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;fabs&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(x1 - x0) &amp;lt;= EPS )&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;flagStopLoop = &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;true&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;else&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;if&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;( i &amp;gt; max )&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;flagStopLoop = &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;true&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;else&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x0 = x1;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;while&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;( !flagStopLoop );&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;The root of the function after &quot;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &amp;lt;&amp;lt; i &amp;lt;&amp;lt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot; iteration is &quot;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&amp;lt; x1 &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;0&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-family: courier; font-weight: normal;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;&quot;&gt;&lt;b id=&quot;docs-internal-guid-c79de107-7fff-e6fb-d31b-83a85b0dfe87&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: times; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;}}}}}&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/714225818298316477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/714225818298316477' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/714225818298316477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/714225818298316477'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/12/newton-raphson-method-in-c.html' title='Newton-Raphson Method in C++'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-369441818479586391</id><published>2024-12-21T15:59:00.005+08:00</published><updated>2024-12-22T13:53:01.767+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="codeblocks"/><title type='text'>Change Codeblocks line number background and foreground back to its default colors</title><content type='html'>&lt;b id=&quot;docs-internal-guid-d7e86177-7fff-83ff-a342-7670ec3be656&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;If background and foreground of line numbers did not change back to its default colors, go to&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;Menu &amp;gt; Settings &amp;gt; Environment &amp;gt; Colors&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;Category &amp;gt; select: Editor&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;Click the “Default rectangle color at the right panel” for each of the following.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;* editor-caret&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;* line number background color&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;* line number foreground number&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;* margin chrome color&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;* margin chrome highlight color&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Arial,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;Click the button OK to close the dialog window. &lt;/span&gt;&lt;/p&gt;&lt;/b&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/369441818479586391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/369441818479586391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/369441818479586391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/369441818479586391'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/12/change-codeblocks-line-number.html' title='Change Codeblocks line number background and foreground back to its default colors'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-3857321454447636693</id><published>2024-11-16T16:10:00.008+08:00</published><updated>2024-11-16T16:14:40.604+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="julia"/><title type='text'>Measure execution time with Julia, example using sorting algorithms</title><content type='html'>&lt;div id=&quot;docs-internal-guid-4d3b5d88-7fff-5e5f-6fba-625c4a524eda&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: green; font-family: times; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;# random integers between 1 and 100 inclusive, generate thousands of them&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;x = &lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;rand&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;1&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;:&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;100&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;, &lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;100000&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@time&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;sort&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(x; alg=InsertionSort, rev=&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;false&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: green; font-family: times; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;# 1.091568 seconds (35.79 k allocations: 1.899 MiB, 2.55% compilation time)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;@time&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;sort&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(x; alg=QuickSort, rev=&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;false&lt;/span&gt;&lt;span face=&quot;Consolas, sans-serif&quot; style=&quot;background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: green; font-family: times; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;# 0.099377 seconds (107.61 k allocations: 5.397 MiB, 98.81% compilation time)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/3857321454447636693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/3857321454447636693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3857321454447636693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3857321454447636693'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/11/measure-execution-time-with-julia.html' title='Measure execution time with Julia, example using sorting algorithms'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-8747708073763175881</id><published>2024-11-16T13:46:00.000+08:00</published><updated>2024-11-16T13:46:02.583+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="julia"/><title type='text'>Polymorphism with Julia using functions, example using type Shape</title><content type='html'>&lt;p dir=&quot;ltr&quot; id=&quot;docs-internal-guid-778a2101-7fff-84a2-92df-9cd3805070e2&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Program:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;abstract type&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; Shape &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: green; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;# poymorhpic function computation&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(shape::&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Shape&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;throw&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;MethodError&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&quot;area() is not implemented for abstract type Shape&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;))&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;struct&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; Circle &amp;lt;: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Shape&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;radius::&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Real&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(c::&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Circle&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; * c.radius ^ &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;2&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;struct&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; Rectangle &amp;lt;: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Shape&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width::&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Real&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height::&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Real&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(r::&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Rectangle&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; r.width * r.height&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;struct&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; Square &amp;lt;: &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Shape&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width::&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Real&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(s::&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Square&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; s.width * s.width&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;()&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shapes = Shape[&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Circle&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;), &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Square&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;), &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Rectangle&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;)]&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&quot;Area Circle(1) = &quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(shapes[&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;]))&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&quot;Area Square(2) = &quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(shapes[&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;]))&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;println&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&quot;Area Rectangle(3, 4) = &quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;area&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;(shapes[&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;]))&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Consolas,sans-serif; font-size: 10.5pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;()&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Output:&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Area Circle(1) = 3&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Area Square(2) = 4&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; white-space: pre;&quot;&gt;Area Rectangle(3, 4) = 12&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/8747708073763175881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/8747708073763175881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/8747708073763175881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/8747708073763175881'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/11/polymorphism-with-julia-using-functions.html' title='Polymorphism with Julia using functions, example using type Shape'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-920989840646301802</id><published>2024-11-10T23:30:00.003+08:00</published><updated>2024-11-10T23:52:12.555+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="julia"/><title type='text'>Symbolic programming with Julia, example using function composition</title><content type='html'>&lt;p dir=&quot;ltr&quot; id=&quot;docs-internal-guid-d00c34c1-7fff-d522-bcdb-8bf84d4adb89&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;gt; julia&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;julia&amp;gt; f(x) = 2x + 3&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;f (generic function with 1 method)&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;julia&amp;gt; g(x) = x^2&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;g (generic function with 1 method)&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;# &quot;∘&quot; can be typed by \circ&amp;lt;tab&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;julia&amp;gt; @show (f ∘ g)(1)&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(f ∘ g)(1) = 5&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;julia&amp;gt; @show f(g(1))&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;f(g(1)) = 5&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;julia&amp;gt; typeof(f ∘ g)&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;ComposedFunction{typeof(f), typeof(g)}&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;julia&amp;gt; (f ∘ g)(1) == f(g(1))&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;true&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Times New Roman&#39;,serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;julia&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/920989840646301802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/920989840646301802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/920989840646301802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/920989840646301802'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/11/symbolic-programming-with-julia-example.html' title='Symbolic programming with Julia, example using function composition'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-3049681520770309163</id><published>2024-10-08T02:02:00.006+08:00</published><updated>2024-10-08T12:56:33.434+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rust"/><title type='text'>Unsafe Rust vectors</title><content type='html'>&lt;p dir=&quot;ltr&quot; style=&quot;line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Here&#39;s the unsafe Rust vectors program that implements a vector Vec template with the &amp;lt;String&amp;gt; data type. &lt;br /&gt;This program demonstrates the use of Vec&amp;lt;String&amp;gt; to store a collection of strings.&lt;br /&gt;The push and pop methods are used to add and remove elements from the vector.&lt;br /&gt;Indexing is used to access specific elements within the vector.&lt;br /&gt;The {:?} format specifier is used to print the value of a variable in a readable format.&lt;br /&gt;&lt;br /&gt;This Rust program is unsafe and has out-of-bounds access. &lt;br /&gt;If the index 3 is out of bounds. i.e., if the vector has fewer than four elements, accessing people_names[3] would result in undefined behavior, potentially leading to memory errors or crashes.&lt;br /&gt;&lt;br /&gt;To have safe alternative, you can achieve the same functionality using safe Rust constructs. For example, you could use the get() method on the vector to safely access elements, which returns an Option to handle out-of-bounds case.&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;,serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;fn&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;() {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;mut&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;people_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; : &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;Vec&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;gt; = &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;Vec&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;();&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;people_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;Person_Name_01&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;to_string&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;());&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;people_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;Person_Name_02&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;to_string&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;());&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;people_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;Person_Name_03&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;to_string&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;());&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;people_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;Person_Name_04&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;to_string&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;());&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;people_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;pop&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;();&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: inherit;&quot;&gt; // index out of bounds: the len is 3 but the index is 3&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;fourth&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; = &amp;amp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;people_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;];&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;println!&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;Fourth person is {:?}&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;fourth&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;);&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/3049681520770309163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/3049681520770309163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3049681520770309163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3049681520770309163'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/10/unsafe-rust-vectors.html' title='Unsafe Rust vectors'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-3724658974505710694</id><published>2024-10-05T21:47:00.001+08:00</published><updated>2024-10-05T21:47:12.882+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cpp"/><title type='text'>Safe C++ example using array data structure and at member function</title><content type='html'>&lt;p&gt;The safe C++ at() member function automatically checks whether array index is within the bounds of valid elements in the container, throwing an out_of_range exception if the array index is not, i.e. if the array index is greater than or equal to its array size. &lt;br /&gt;The member function at() does check against bounds.&lt;br /&gt;Here&#39;s a C++ program that uses the array data structure and at() member function. &lt;br /&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; id=&quot;docs-internal-guid-4144a425-7fff-edec-68e8-43d2d9360c5c&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;array&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;std&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;month_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; = { &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;January&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;February&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;March&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;April&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;May&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;June&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;July&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;August&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;September&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;October&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;November&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;December&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;cout&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;month_names.at(11): &quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;month_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;at&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;11&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;endl&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: green; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// terminate called after throwing an instance of std::out_of_range exception&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;cout&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&quot;month_names.at(13): &quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;month_names&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;at&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;13&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;endl&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #af00db; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.6285714285714286; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &amp;quot;Courier New&amp;quot;, monospace; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/3724658974505710694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/3724658974505710694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3724658974505710694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/3724658974505710694'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/10/safe-c-example-using-array-data.html' title='Safe C++ example using array data structure and at member function'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-9097065931265330259</id><published>2024-10-05T15:55:00.004+08:00</published><updated>2024-10-05T15:56:35.359+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rust"/><title type='text'>Unsafe Rust, Rust pointers</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;p&gt;One reason unsafe Rust exists because the underlying computer hardware is inherently unsafe.&lt;br /&gt;Other reason, Rust needs to allow programmer to interact with the operating system. &lt;br /&gt;Other goal of the Rust programming language to allow software engineer to work with low-level programming.&lt;br /&gt;&lt;br /&gt;Rust has type called pointer. &lt;br /&gt;Programmers can create pointers.&lt;br /&gt;Use &quot;as&quot; to cast a reference mutable variable into their corresponding pointer type.&lt;br /&gt;Change or print pointers in the unsafe block. &lt;br /&gt;&lt;br /&gt;Example: Rust pointers&lt;br /&gt;Here&#39;s the Rust program that implements a pointer using reference ampersand symbol for mutable keyword, variable name, &quot;as&quot; casting, pointer asterisk symbol for mutable keyword again, and data type name. &lt;br /&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;fn&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;() {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;mut&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;ptr_to_i&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; = &amp;amp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;mut&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; *&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;mut&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #267f99; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;i32&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: blue; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;unsafe&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;ptr_to_i&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #098658; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;println!&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;*ptr_to_i: {}&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;, *&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;ptr_to_i&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;);&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: green; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;// variable i is changed by the pointer&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #795e26; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;println!&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #a31515; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;i: {}&quot;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #001080; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;i&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;);&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.62857; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: &#39;Courier New&#39;,monospace; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/9097065931265330259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/9097065931265330259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/9097065931265330259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/9097065931265330259'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/10/unsafe-rust-rust-pointers.html' title='Unsafe Rust, Rust pointers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-633858596522555991</id><published>2024-10-05T05:50:00.008+08:00</published><updated>2024-10-05T05:52:48.013+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cpp"/><title type='text'>Safe C++ example: stack data structure implementation</title><content type='html'>&lt;span style=&quot;font-family: arial; font-size: small;&quot;&gt;Safe C++ programming practices aim to prevent common programming errors, such as memory leaks, buffer overflows, and undefined behavior. This is often achieved through techniques like RAII (Resource Acquisition Is Initialization), smart pointers, and range-based for loops.&lt;br /&gt;&lt;br /&gt;Example: Implementing a Stack data structure Using vector&lt;br /&gt;&lt;br /&gt;Here&#39;s a C++ program that implements a stack using the vector container. This approach leverages RAII to automatically manage memory, making it safer than a manual stack implementation.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;#include&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;lt;vector&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;using&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;namespace&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #267f99; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;std&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;template&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;typename&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #267f99; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;T&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;class&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #267f99; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;Stack&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;private:&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vector&amp;lt;T&amp;gt; data;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;public:&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;void&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;push&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;const&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #267f99; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;T&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;value&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;) {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;data&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;push_back&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(value);&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;void&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;pop&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;() {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;if&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; (!&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;isEmpty&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;()) {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;data&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;pop_back&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;();&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #267f99; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;T&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;top&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;() &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;const&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;data&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;back&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;();&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;bool&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;isEmpty&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;() &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;const&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;data&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;empty&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;();&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;};&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;int&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;main&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;() {&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Stack&amp;lt;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: blue; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;int&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;gt; myStack;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;myStack&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;push&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;10&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;);&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;myStack&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;push&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;20&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;);&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;myStack&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;push&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;(&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;30&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;);&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;myStack&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;pop&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;();&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;Top element: &quot;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &amp;lt;&amp;lt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;myStack&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;top&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;() &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #a31515; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&quot;Stack empty? &quot;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &amp;lt;&amp;lt; boolalpha &amp;lt;&amp;lt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #001080; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;myStack&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;.&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #795e26; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;isEmpty&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;() &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: courier; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #af00db; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: #098658; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;0&lt;/span&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;;&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span face=&quot;Consolas,sans-serif&quot; style=&quot;background-color: transparent; color: black; font-family: courier; font-size: small; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;ltr&quot; style=&quot;background-color: white; line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;font-family: arial; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;font-family: arial; font-size: small;&quot;&gt;Explanations:&lt;br /&gt;* vector: This container is used to store the elements of the stack. It automatically manages memory allocation and deallocation, preventing memory leaks.&lt;br /&gt;* RAII (Resource Acquisition Is Initialization): The vector&#39;s destructor is called automatically when it goes out of scope, ensuring that the memory it allocated is freed.&lt;br /&gt;* Template: The Stack class is a template, making it versatile for different data types.&lt;br /&gt;* Safe Operations: The push, pop, and top functions are designed to be safe. They check for empty conditions before performing operations to avoid undefined behavior.&lt;br /&gt;&lt;br /&gt;C++ Key Safety Features:&lt;br /&gt;* Memory Management: vector handles memory allocation and deallocation automatically.&lt;br /&gt;* Exception Safety: The Stack class can be made exception-safe by using techniques like RAII and proper exception handling.&lt;br /&gt;* Range-Based For Loops: Consider using range-based for loops for iterating over elements in a safer and more concise manner.&lt;br /&gt;* Move Semantics: For performance, especially with large objects, consider using move semantics to avoid unnecessary copies.&lt;br /&gt;* Custom Allocators: For specific memory management needs, you can provide a custom allocator to vector.&lt;br /&gt;&lt;br /&gt;By following these practices, you can write more safe and more reliable C++ code.&lt;/span&gt;&lt;span style=&quot;font-family: arial; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/633858596522555991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/633858596522555991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/633858596522555991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/633858596522555991'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/10/safe-c-example-stack-data-structure.html' title='Safe C++ example: stack data structure implementation'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-4826228928157134262</id><published>2024-10-05T05:11:00.000+08:00</published><updated>2024-10-05T05:11:14.322+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rust"/><title type='text'>Rust cargo to create new project and run project in short</title><content type='html'>Rust cargo command to create new project and run project in short&lt;br /&gt;&amp;gt; cargo new rust_cargo_0X_project_name&lt;br /&gt;&lt;br /&gt;&amp;gt; cd rust_cargo_0X_project_name&lt;br /&gt;&lt;br /&gt;&amp;gt; cargo run &lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/4826228928157134262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/4826228928157134262' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/4826228928157134262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/4826228928157134262'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/10/rust-cargo-to-create-new-project-and.html' title='Rust cargo to create new project and run project in short'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-1297779360708500486</id><published>2024-09-18T14:24:00.006+08:00</published><updated>2024-09-18T14:25:20.378+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="raspberry_pi"/><title type='text'>Raspberry Pi 5 computer error message solution: This power supply is not capable of supplying 5V at 5A</title><content type='html'>Raspberry Pi 5 computer error message: &lt;br /&gt;This power supply is not capable of supplying 5V at 5A.&lt;br /&gt;Power to peripherals will be restricted.&lt;br /&gt;&lt;br /&gt;Solution: &lt;br /&gt;Use Raspberry Pi 5 computer power supply adapter i.e. 5V 5A&lt;br /&gt;You may try other power supply adapter outputs: 5.1V 5.0A, 9.0V 3.0A, 12.0V 2.25A, 15.0V 1.8A, 27.0 W max&amp;nbsp; &lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/1297779360708500486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/1297779360708500486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/1297779360708500486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/1297779360708500486'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/09/raspberry-pi-5-computer-error-message.html' title='Raspberry Pi 5 computer error message solution: This power supply is not capable of supplying 5V at 5A'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-4374562143504318683</id><published>2024-09-07T17:30:00.005+08:00</published><updated>2024-09-07T17:33:00.124+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linuxmint"/><title type='text'>Upgrade Linux Mint 21.3 to Linux Mint 22 using command lines</title><content type='html'>This is Linux Mint 22, codename Wilma.&lt;br /&gt;Linux Mint 22 is a long term support release which will be supported until 2029. &lt;br /&gt;&lt;br /&gt;So, do not rush, kindly do not take shortcuts that may negatively affect the whole upgrade process. &lt;br /&gt;Now let’s get started!&lt;br /&gt;&lt;br /&gt;Open terminal.&lt;br /&gt;$ clear &lt;br /&gt;$ sudo apt update&lt;br /&gt;$ sudo apt install mintupgrade&lt;br /&gt;&lt;br /&gt;Upgrading to Linux Mint&lt;br /&gt;This program will ask you some questions and upgrade your operating system.&lt;br /&gt;Now type the following command to launch the mintupgrade upgrade tool.&lt;br /&gt;$ sudo mintupgrade&lt;br /&gt;Click the button: Let’s go! &lt;br /&gt;&lt;br /&gt;Upgrade Tool&lt;br /&gt;Linux Mint &lt;br /&gt;&lt;br /&gt;Phase 1: Preparation&lt;br /&gt;A series of tests will now be performed to prepare the computer for the upgrade. &lt;br /&gt;Click the button OK&lt;br /&gt;&lt;br /&gt;Phase 2: Simulation and download&lt;br /&gt;Your package repositories will now point towards the new release.&lt;br /&gt;A few more tests will be run and package updates will be downloaded. &lt;br /&gt;Click the button OK &lt;br /&gt;&lt;br /&gt;Phase 3: Upgrade&lt;br /&gt;The packages will now be upgraded.&lt;br /&gt;Click the button OK &lt;br /&gt;&lt;br /&gt;When the upgrade process is complete and successful, you need to uninstall the mintupgrade tool and reboot your computer with these commands.&lt;br /&gt;$ sudo apt remove mintupgrade&lt;br /&gt;$ sudo reboot&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/4374562143504318683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/4374562143504318683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/4374562143504318683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/4374562143504318683'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/09/upgrade-linux-mint-213-to-linux-mint-22.html' title='Upgrade Linux Mint 21.3 to Linux Mint 22 using command lines'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-2817387104084316090</id><published>2024-08-31T05:45:00.002+08:00</published><updated>2024-08-31T05:45:10.202+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="others"/><title type='text'>Blackmailing scams from emails, WhatsApp messages, instant messages, phone calls, social media</title><content type='html'>&lt;p&gt;This message is part of cybersecurity awareness exercise to share on the importance of online security. &lt;br /&gt;&lt;br /&gt;What is Blackmailing Scam?&lt;br /&gt;* Scammers will threaten to share private information about the victim to the public which will cause the victim to panic. &lt;br /&gt;* While in this emotionally vulnerable state, the victim is willing to pay any price to protect their privacy and pride.&lt;br /&gt;&lt;br /&gt;How blackmailing scam works?&lt;br /&gt;* The victim will receive messages or emails from an unknown person claiming that they have the victim&#39;s personal data, inappropriate videos or pictures and private documents.&lt;br /&gt;* The scammer will reveal the victim&#39;s identification number, address or any personal information as an evidence to threaten.&lt;br /&gt;* This will cause the victim to panic and in an effort to protect their privacy, the victim will follow every instruction given by the scammer such as revealing their user ID, password and challenge question&#39;s answer.&lt;br /&gt;&lt;br /&gt;How to protect yourself?&lt;br /&gt;* Avoid storing your password or any personal information on internet or on social media or on mobile phone&lt;br /&gt;* Never open, do not entertain, and delete any email or message or call from suspicious or unknown sources&lt;br /&gt;* Never share your banking credentials to any person&lt;br /&gt;* Stay calm, if in doubt, ask someone you trust for a second opinion&lt;br /&gt;* Be mindful on social media &lt;br /&gt;* Don&#39;t share private information publicly or on social media&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/2817387104084316090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/2817387104084316090' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/2817387104084316090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/2817387104084316090'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/08/blackmailing-scams-from-emails-whatsapp.html' title='Blackmailing scams from emails, WhatsApp messages, instant messages, phone calls, social media'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7058339.post-2183749774401542344</id><published>2024-08-20T02:18:00.004+08:00</published><updated>2024-08-20T02:20:44.718+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="others"/><title type='text'>Spending too much time with smaller screen mobile phone is slowly frying your brain</title><content type='html'>Spending too much time with smaller screen mobile phone is slowly frying your brain in the following four ways.&lt;br /&gt;1. Memory Problem&lt;br /&gt;2. Addiction&lt;br /&gt;3. Cognitive Decline&lt;br /&gt;4. Stress&lt;br /&gt;&lt;br /&gt;1. Memory Problem&lt;br /&gt;1.1 Heavily rely on our devices as memory aids usually means a higher risk of depression, schizophrenia, and dementia.&lt;br /&gt;Once you stop using your memory, it will get worse which will make you use your devices more.&lt;br /&gt;For example, over-reliance on GPS&#39;s could ruin the memory in the brain.&lt;br /&gt;It&#39;s good to try and remember directions where possible and generally try to use your memory in the brain instead of your phone.&lt;br /&gt;It turns out that exercising that mental muscle of memory has aided in learning and emotional processing.&lt;br /&gt;1.2&amp;nbsp; Multi-tasking is bad for you&lt;br /&gt;The dangers of continual partial attention, it&#39;s checking your phone while mid conversation, or scrolling on social media while watching TV, it harms our memory and mental health.&lt;br /&gt;In fact trying to consistently multi-task can actually hinder your ability to think deep and complex thoughts.&lt;br /&gt;It also can create a false sense of urgency which prevents our brain&#39;s ability to transfer information into long-term storage and from here it becomes harder to accumulate memories.&lt;br /&gt;In summary every minute distracted by your phone is a lost minute in the here and now this can&lt;br /&gt;leave behind a trail of forgotten experiences and damage the ability to formulate deep and complex thoughts and long-term memories.&lt;br /&gt;&lt;br /&gt;2. Addiction&lt;br /&gt;Nomophobia is the real fear of being away from one&#39;s mobile phone.&lt;br /&gt;The average user now checks their phones near to 100 times per day.&lt;br /&gt;Excessive smartphone use presents itself a lot like addiction, weakening vital brain networks that control things like paying attention and stopping impulses.&lt;br /&gt;This is a silent epidemic.&lt;br /&gt;We really bring a nuclear bomb with information and it can create fake news that blow up people&#39;s brains and brainwash them.&lt;br /&gt;The addictive designs of social media apps, we are increasingly glued to our phones.&lt;br /&gt;The designs of social media apps mimic casino slot machines and exploit the pleasure of anticipating rewards and interestingly this can trigger larger dopamine spikes than the rewards themselves. &lt;br /&gt;There&#39;s also infinite scrolling and auto-play from mobile apps to lull user into mindless behavior and addiction to his or her mobile phone. &lt;br /&gt;&lt;br /&gt;3. Cognitive Decline&lt;br /&gt;The mere presence of these phone devices reduces available cognitive capacity.&lt;br /&gt;These cognitive costs are highest for those highest in smartphone dependence.&lt;br /&gt;It lowers your ability to focus, remember, and solve problems.&lt;br /&gt;The phone doesn&#39;t even have to be switched on.&lt;br /&gt;This brain drain it happens because the human brain has a limited capacity to process information meaning we have to prioritize what we want to focus on when your phone is nearby, it competes for cognitive resources and your brain must work extra hard to resist its temptation.&lt;br /&gt;&lt;br /&gt;4. Stress&lt;br /&gt;Mobile phones aren&#39;t just changing our behavior.&lt;br /&gt;They&#39;re affecting human biology and the health risks can get pretty serious.&lt;br /&gt;Mobile phone notifications have turned us all into animals, training our brains to be in a constant state of fear and stress.&lt;br /&gt;Here’s how it happens:&lt;br /&gt;1. Neurons in the prefrontal cortex are altered after exposure to a flood of neurotransmitters.&lt;br /&gt;One common trigger of neurotransmitters to flood the brain is the anticipation of rewards, like the UI on social media apps.&lt;br /&gt;2. This can cause our prefrontal cortex, the brain&#39;s decision-making hub and emotional control center to go completely haywire and even shut down.&lt;br /&gt;3. When the prefrontal cortex shuts down, the amygdala, responsible for emotional regulation, takes over, inducing stress.&lt;div class=&quot;blogger-post-footer&quot;&gt;by: yt [at] internet&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytbau.blogspot.com/feeds/2183749774401542344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7058339/2183749774401542344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/2183749774401542344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7058339/posts/default/2183749774401542344'/><link rel='alternate' type='text/html' href='http://ytbau.blogspot.com/2024/08/spending-too-much-time-with-smaller.html' title='Spending too much time with smaller screen mobile phone is slowly frying your brain'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>