Short ideas for the development of a Call of Cthulhu campaign or brief adventure

Question: Community wiki post. Everyone can add an answer containing a short idea for a campaign, be it an event, a characteristic of the world, an artifact or object, or an NPC character. Fellow masters can pick up the idea and develop their own story starting from this short description.
Answer: The great thing about CoC original game, being set in the 1920s, you can use historical events for the basis of some great adventures. Here are some "seeds" from the 20s that with a little bit of brain power can lead to some mythos activity:
1920:  In December one of the most destructive earthquakes in the history of the world struck the Gansu province of China, killing between 180,000 to 200,000 people.  Perhaps something the PCs are investigating triggered the eathquake (dholes? cthonians?) and they have to go to China to investigate, or maybe something the PLAYERS did while battling a mythos being caused the earthquake to begin with!!!
1921: Carroll Deering, a five-masted commercial schooner that was found run aground off Cape Hatteras, North Carolina, had it's crew missing and no explanation ever agreed upon as to why the ship was abandoned.  Perhaps the players are hired by a family member to find out what happened, and stumble across cults of deep ones, degenerate Dagon worshipping pirates, or worse out in the Bermuda Triangle. Worse, perhaps a cargo on board (an idol, mummified hand, or alien artifact) carried or found by a crew member was the cause, and the investigators come into possession of it!
1922: In May of 1922, the british ship Egypt sank off the coast of France when it was rammed in heavy fog by the Seine.  The ship carried 10 tons of silver bars and 5 tons of gold bars.  Over a million dollars worth, most of it was recovered by divers in 1932, but perhaps there was a more sinister reason behind it's sinking....a sorceror controlling a tribe of deep ones caused the fog, ensared the captain's minds to make the boats crash, and now has had his deep one minions looting the cargo. The investigators may be hired by Lloyds of London (which had insured the ship) to investigate, and run afoul of the evil mage and his minions....
1923: Are you kidding? King Tut's tomb was opened!  Anyone should be able to get a decent adventure or two out of that one!!!!
1924: Sir John Stewart of Scotland, a whiskey distiller and baronet, was found in Feb of that year shot to death in otherwise unoccupied Fingask Castle. He was deeply in debt and the verdict was suicide. Later that year one of his creditors also killed himself. I don't know about you, but I want to see what's going on in that "unoccupied" castle, or what might be underneath it.  Maybe Sir John and/or his creditor were investing money in something unsavory, or accidentally ran afoul of the wrong people (?) who didn't appreciate their interest.  Maybe the cultist villagers killed him off when he started finding out things he shouldn't have....?
1925: The Derbyshire Werewolf. Something black and of huge sized terrorized this part of England in 1925, killing dozens of sheep, and mysteriously disappearing.  Thought by authorities to be at various times a large wolf, an escaped jackal (from a private menagerie), or a black hound, this is a perfect type of scenario for a "twist" to confuse the players. Instead of a werewolf, perhaps it's a byahkee, dimensional shambler, or a shoggoth that has been summoned by a crazy old coot.  Or maybe the party just thinks it's something supernatural, when it's a nutty death cult practicing on sheep until they can finally start on people eventually. Or maybe it is indeed a werewolf, and the party has to find a way to put it down...
1926: Colonel Percy Fawcett, his son and a friend disappeared in the Brazilian jungle in 1925 searching for the Lost City of "Z".  Lots of theories abound to this day what happened to them....in 1926 the PCs are hired by a publisher or the group that financed the expedition (named "The Glove") to find the truth about where Fawcett went, whether Z exists, or what Fawcett was seeking.  Lost cities in the South American jungle just seem to ooze primodial danger and evil.....
1927: Hitler and other Nazi leaders are organizing rallies, promoting the Hitler Youth Movement, and perhaps, seeking out certain artifacts of evil?  Obviously many of these are found by Hitler and used to bring him to power, but perhaps investigators managed to beat the Nazis to a few of them in Europe and prevent Hitler from gaining such power that the world course of history would have been forever altered....investigating groups must battle nazis and their agents throughout Greece, Italy Spain and elsewhere looking for items such as the original Golden Fleece, the Spear of Destiny, or Colada (lost sword of El Cid) all with mystical powers.  Of course Adolph has a sorceror ally that can summon all sorts of nasties (byahkhee, deep ones, hunting horrors, etc) to attack investigators searching for these treasures.
1928: Danish training ship the Copenhagen goes missing after setting sail from Buenos Aires to Australia in December of this year.  It is a huge ship with a crew of over 50 cadets.  Anything from sea monsters, to deep ones, to aliens, to frenzied cultists might have attacked the ship and drove it to the bottom of the sea....or perhaps the crew is being held on a uncharted island, being used for unspeakable purposes, waiting to be discovered (or unfortunately joined) by some intrepid investigators hired by the Danish government or a private firm....
1929: The stock market crash. OBVIOUSLY caused by evil powers from beyond!!! Also, Peter Kurten, a truly demented serial killer (Known as The Vampire of Duseeldorf) committed horrific crime after crime all during the year until caught. What if Kurten was not alone, but part of some unspeakable cult worshipping Shub Niggurath or another dark god? Investigators called in by german authorities may soon realize Kurten is not the only killer about...and some of the other cult members are high up in German political society!
There's one adventure possibility for every year of the 20s, any good historical source could lead to even more!
Answer: If you're in the prohibition timeframe, this one may well be good for parties which have some form of law enforcement or investigator bent (PIs, cops, etc).
A speakeasy owner (whose primary non-wait staff may be comprised of zombies) is brewing his own special whiskey. The whiskey is laced with a chemical that, over time, causes the drinker to go mad, and eventually even turn feral. The reason the speakeasy owner is doing this is, of course, left up to the GM.
Note that I left the Old Ones out of this. Remember: Not every Cthulhu campaign should center around them -- if the players are always saving the entire planet (essentially), it will eventually get boring. :)
Answer: Small Seeds involving Mirrors:

One or more members of the group find/buy/inherit an antique mirror which has been in storage, wrapped in heavy cloth for decades. When looked in casually, the mirror operates normally. Close inspection of the mirror reveals the frame is carved with intricate, tiny figures of strange appendages (tentacles, eyes, sinuous limbs and torsos). Staring into the mirror reveals humanity's atrocities. The mirror shows scenes of murder, deception, theft, as though the mirror were a window into that location. These are not visions of the past, present, or future, but of villainous desires. The longer a person stares into the mirror, the greater the intensity of the potential crime will be. The mirror may have other powers and means of control. What will the investigators do with it? For what could such a device have been intended? Prevention of crime, or recruitment of evil-doers?
Investigators encounter a round copper shield in a private collection. The owner is desperate to collect more specimens from the culture which produced it, but cannot find its like in any other collections to which he has access. He does not mention anything about special properties, nor does he seem to have an interest in occult or mythos activities. The shield is well-maintained and occupies a prominent space in the collection. Seeing one's reflection on the front of the shield produces subtle feelings of weakness, fear, and the desire to leave the area. Looking at the inside of the shield for a reflection has no unusual effect unless the person is holding the shield as though it were in use and the shield is between the holder and a person... or entity. In that situation it provides a sense of what they truly are, as though deflecting illusions, or disguises.
A museum guard was brutally killed during the night. There are no signs indicating how the killer entered or exited the museum. None of the other guards saw anything. They all heard the victim screaming. A trail of blood connects the victim to an ornate gold mirror with obvious occult inscriptions in the South American collection. A trail of blood droplets seems to originate in the centre of the mirror, and one clear footprint is before the mirror, pointing as if someone stepped into it. Something from the collection is missing, but none of the guards or curators believe it has any market value - certainly not enough to kill for. Obviously, they are wrong.
This last is a suggestion to listen to Blue Oyster Cult's Imaginos concept album. I think it is particularly well-suited to a Call of Cthulhu campaign, and one of its iconic images, a mirror called the Magna of Illusion, rocks.
Answer: If you want to be particularly obnoxious to your players, put them in the middle of nowhere... like, say, Anchorage, Alaska.
In the 1920's, Anchorage was mud roads, and a couple thousand people. A commercial port, a rail yard adjacent,  It ran 1st to 15th avenues, and from N to A then Barrow to Gambell. Two church town... one at 8th & H, and the other on 5th and H.  Airport between 9th and 11th, A-I... Nearest town was the City of Spenard, a mere 4 miles out L street, and home to Chilcoot Charlie's bar - still at the corner of Fireweed & Spenard. (And technically, it was in the city of Anchorage - Northern Lights Blvd, the next major street (2 blocks) south, is the dividing line)
Outside of that, next was Palmer, 60 miles away, with a native village, Eklutna, and it's Russian Orthodox Church and Russian Speaking Eklutna Tribe Athabascans, in the midway point.
In December 1920, the first police chief was appointed for the 4 year old town. He was murdered in February 1921, in the back stairwell of the Druggist's shop.
In the real world, it's still unsolved... but in your game, it could be the kick off of a wild-west-with-cars kind of campaign.
Perhaps it was cultists, stealing needed chemicals, and he was on to them?
Perhaps he was caught stealing the chemicals for his own cult activies?
Perhaps the Druggist was the cultist?
It's said many strange things are done in the land of the midnight sun... And you'd not be the first to set a Cthulu game in 1920's Alaska... but one of a very few.
Oh, and there have NEVER been Sherrifs in Alaska.... Only Police in the cities, Territorial Troopers (later State Troopers), and the G-Men: US Marshals, and the FBI. One Marshal wrote in a report, "Never met a N* I couldn't frame." (I have handled that document... Records of the US District Courts, at the National Archives regional branch in Anchorage.
Some links for your consideration in the matter:

History of Spenard (tongue in cheek, but accurate enough)
Spenard Wikipedia Entry
Anchorage Wikipedia Entry
Anchorage History Wikipedia Entry
Anchorage Police Department
Comment: @Sardathrion Thanks! Most of the road grid is still present. The original late 1920's grass strip airport (between 9th and 10th ave, E to M streets) is still present as a series of parks... and it's so undeveloped it makes for some really great roleplaying potentials.
Answer: Characters wake up in a mental institute. They don't remember how they got there, but they have some memories, and remember who they are. They know they have been investigating something...
They start the investigation or try to escape, etc.
GM can involve some Old Ones in their memories or just make players (not characters) expect Old Ones have something to do.
After some action and adventure ;) characters get caught and put back in the hospital. A nurse starts the evening reading session. She reads a novel. That's when players realize that their characters are in fact nuts and their names and memories are from the book.
Or is it a conspiracy? ...
Answer: Cthulhu adventure seeds:

McGuffin / Artifact: the internet (hardware) as a giant summoning sigil.
Oil drilling gone awry summons Cthulhu (topical: he likes his waters oil-free as well. Twist: cleaning up the pollution will allow him to rise: keeping the waters dirty is a dirty but quick fix).
Here there be monsters: a new chain of psychotherapy clinics is, in fact, searching for old genetic seeds of Old Ones (which sometimes manifest as mental instability).
Answer: For a black-humor-style scenario, what about a modern-day shopping mall as the setting? It's not a new concept - it's appeared to great effect in a Discworld book, for one thing, and I got my original inspiration from a short story in which someone reached into a wardrobe full of clothing and touched something slimy and "other" - but it worked out to be a very entertaining setup for a one-shot game.
All it took was the basic "somebody's trying to open a Gate for [insert favorite Mythos creature here]," with the method involving cursed items strewn throughout a shopping mall, such that as each one was touched by a shopper they'd be drawn to the center [think Food Court, or for extra weirdness points, the photo-with-the-Easter Bunny or Santa Claus displays!]. The PCs are also shoppers - I cast them as a kind of B-movie/Buffy-the-Vampire-Slayer set of teenagers, but one could use any character types, from off-duty cops or military folk to absent-minded professors or bored suburbanites. The descriptions of increasingly creepy/disgusting Things crawling out of brightly-lit, shiny-new merchandise seemed to be very effective, and once the PCs figured out what was going on they came up with a truly brilliant (and very funny) ritual for sealing the Gate again. I'm hoping to run a follow-on scenario one of these days: "Return to the Mall on the Borderlands", perhaps!
Answer: Time doesn't exist. It's a human construct to enable people to process the world without going insane.
For us, this is but a philosophical discussion point, but in a game like Call of Cthulhu, it can be a real feature of the universe, and can have all sorts of dire consequences.
Answer: Operation Fever Dream.
Human brains are quantum computers, as well as delicious snacks, someone works out how to break them just right and now there are a bunch of people running around producing bulk quantum tunnelling effects (AKA Magic) that are attracting all the wrong kinds of attention.
The Immerson Connection.
I've always wanted to run a game based on this but I've never made the time to finish the prep work, first you build a social network diagram for a small town called Immerson, population a couple of hundred people including the soon to be PCs, then you gut it leaving only the PCs and a handful of edge members who don't know each other. The central group are all now missing persons and the PCs are left to try to pick up the pieces, and just when they think they understand a few of the missing turn up under even stranger circumstances.
Snack Panspermia
Cthulhu and friends seeded the universe with sentient life, most of it pretty human looking in fact, so they would have an unlimited supply of snacks.


Do different generations of Soyuz use different launchpad infrastructure?

Question: The Soyuz family has many variants. Do any of them require different launchpad infrastructure? If multiple active variants require different infrastructure, how are the logistics of that handled? Do they use different pads?
Comment: Take a look at the Russian version of wikipedia "Soyuz-2" article. The google translation is quite intelligible.
Comment: I wonder if they still use oversized wooden matches to light the engines.
Answer: Yes, there are two major differences between the traditional launch pads at Baikonur and Plesetsk and the modern launch pads at Kourou and Vostochny:

The analog attitude control system of older R-7 / Soyuz launchers
could only change the pitch angle during flight - yaw and roll were
fixed (but controlled). This means that to reach different
inclination orbits, the launch pad has to be rotated into the
correct roll angle for that inclination. Soyuz 2.1 has a digital
attitude control system, which can change all three angles, so that
launch pad rotation is not necessary with pads which are only
designed for these newer models (Kourou, Vostochny).
At Baikonur and Plesetsk, the vehicle is completely integrated horizontally in the vehicle assembly building and the complete vehicle is then rolled out to the launch pad. For Soyuz ST at Kourou, ESA requested vertical integration of the payload. The rocket is rolled out to the pad without payload. After the rocket is erected, the payload is integrated in a mobile service tower. The tower is rolled back to a safe distance before launch. Vostochny uses the same design.
Comment: That is an *awesome* fact about rotating the pad prelaunch.


Adding expansion tank to water heater

Question: I need to replace my water heater tank since it's leaking.  I'd like to add
an expansion tank at the same time.  Since space is limited, I'd have to install it horizontally.  How high do I need to install the tee adapter on the cold side so the expansion tank can spin during install?  Also, it looks like I would need a shorter flexible feed line.  What's the minimum length they're available in (12 inches?).  Would teflon tape and pipe dope be adequate to seal the tee connection and the rest of flexible feed lines? I plan on using a brass tee connector. Should I use a different material?  I'm not home and unable to measure the amount of room I have above the tank so I apologize if my questions sound silly.  Just trying to get a head start on this.
Thanks.
enter image description here
Comment: In some municipalities there is no check valve between the water main/water meter and the residental plumbing, therefore no expansion tank would be needed. A pressure reducing valve might also function as a  check valve, but some municipalities have low enough pressure in the final mains that no pressure regulator is needed. Does the OP know that other houses near him have expansion tanks? Does he know one is needed/recommended? Is PT (TP) relief valve dripping?
Answer: The expansion tank can be anywhere that's convenient on the cold water plumbing, so long as there isn't a check valve or PRV between the expansion tank and the water heater.
It does NOT need to be anywhere near the water heater. You don't have much space at all there, from the pictures.
If using pipe dope, don't use tape - pick one, and use it. I currently prefer modern pipe dope. I used to prefer tape .vs. old-fashioned pipe dope. Don't use either on a threaded joint with a sealing washer.
Consider providing a ball valve so you can easily change the tank when it fails in a decade or two.
Answer: I wouldn't use flexible lines. I've never seen that on a water heater, only at the end of the line (washing machine, toilet, sink, etc.). The pipes are always under full pressure and a break (and flexible lines are much more prone to bursting than regular pipe) means cutting off hot water to the whole house.
The usual standard for decades in the US has been copper pipe, which means a lot of sweating (soldering) of fittings, but now there are copper press fittings and battery-powered tools to do all the work and it is amazingly fast. I was really surprised what a difference it made when I got my water heater replaced.
As I understand it, the pressure tank can be anywhere because the cold water line is under pressure. With things relating to drains there are a lot of constraints because everything has to be gravity flow. But with water under pressure, location of different components doesn't matter much.
But most important, in my mind, is to do something about the exhaust. Check the installation manual for a new water heater before you buy. And measure carefully. Many have particular rules (which may themselves be part of the plumbing code) regarding (a) vertical distance required before the first turn of the exhaust duct, (b) distance between any exhaust duct and walls, ceilings, etc. What you have right now doesn't look very safe to me.
Comment: Flexible line are pretty standard. They break less in earthquakes, among other things. Given the tank is strapped to the walls, that's likely applicable here.
Comment: @Ecnerwal Not being in an earthquake-prone area (Maryland, we get earthquakes but very rarely and usually very mild) I didn't think of that. But in that case I'd go for the steel braid type rather than plain rubber.
Comment: Appreciate the advice on exhaust routing.  As far as the flex water lines, I've also read online that they could withstand earthquakes better than copper pipes as Ecnerwal mentioned above.  Thanks.

Adding expansion tank to water heater


Change derailleur for new cassette?

Question: I currently run Shimano SG-B-53/39 chain rings coupled to a 9 speed 13/23 cluster. If I was to change my cassette to a 9 speed 11/32 would I need to also change my derailleur?
Comment: It depends on which derailleur you have now. Look up derailleur capacity.
Comment: If you need lower gears, you should also probably change out the crankset to a compact 50/34.  A 34-28 lowest gear is about the same as a 39-32, and you might not have to change your rear derailleur at all, depending on the exact model as most Shimano road rear derailleurs can handle a 28 without any problem. A 50-11 at 90 rpm gives you 31.6 mph - if you're strong enough to get there.  A 53-11 at 90 rpm only gets you up to 33.5 mph - and that 2 mph is really **hard** as power is proportional to speed **cubed**. And you wouldn't have the huge jumps that a 9-speed 11-32 cassette had.
Answer: As ojs says in comments - depends on the derailleur, but it's very likely that you would have to swap the derailleur to accommodate an 11-32 cassette. Older 9 speed groupsets were not designed for wider range cassettes, they had small gaps between ratios instead. You may be able to get away with a 12-28 though.
The derailleur specs you need to find are: max rear sprocket size and total capacity. Total capacity must be equal to or larger than (largest sprocket teeth - smallest sprocket teeth) + (large ring teeth - small ring teeth).

Change derailleur for new cassette?


Are there other ways of knocking someone out besides bringing them to 0 hit points?

Question: In the PHB it says that if a melee attack you make reduces an enemy to 0 hitpoints, you can chose to knock them out.  My question is, is there any way to knock out an enemy with out hurting them to the point of death?  I mean as in punching an opponent in his temples, hit him w/ a club, etc.  I am not including spells like sleep, etc.
Comment: Are you asking for *any* way, or are you specifically asking if there's a "knockout combat maneuver" kind of option?
Answer: Not using spells or magical items, or magical effects, a creature becomes Unconscious if:

Damage reduces you to 0 hit points and fails to kill you, you fall
unconscious (see appendix A). This unconsciousness ends if you
regain any hit points. Succeeding on death saves leaves you unconscious but stable.
Miss your save versus Drow poison by five or more than the save DC.
Suffocate the creature.(p. 183 PHB. Put it in a situation where it runs out of breath and thus drops to 0 hit points).
Miss your save versus a Sprite's arrow by rolling a 5 or less on a d20.
You get Knocked out

Knocking a Creature Out

When an attacker reduces a creature to 0 hit points with a melee
  attack, the attacker can knock the creature out. The attacker can make
  this choice the instant the damage is dealt. The creature falls
  unconscious and is stable.

The key here is the Condition: Unconscious versus Incapacitated. (Stunned shown for comparison at the end).  Not all Incapacitated creatures are Unconscious, but all Unconscious and Stunned creatures are Incapacitated. (See Conditions, Appendix A, Basic Rules)
If you don't mind them being awake, a few other things will Incapacitate a creature:
Incapacitated

Get Carrion Crawler mucus on you will Paralyze you, rendering you
Incapacitated
Torpor poison ingested, will Incapacitate a creature.

Stunned probably won't fit your requirement as it is very short term.
Stunning Strike  (Monk)

Starting at 5th level, you can interfere with the flow of ki in an
  opponent's body. When you hit  another creature with a melee weapon
  attack, you can spend 1 ki point to attempt a stunning strike.  The
  target must succeed on a Constitution saving throw or be stunned until
  the end of your next turn.

Oytugh special attacks can similarly stun a creature.
Answer: To answer your question from a rules-as-written perspective, no.  There are no rules for sapping, choking, cold-clocking, etc. that would allow you to bring an enemy to unconscious without first dropping their HP to 0.
I should point out something, though:  choosing to knock a character unconscious at 0 HP instead of letting them go to the dying stage is specifically not hurting them to the point of death.  In D&D 5e, characters don't die when they reach 0 HP, and they don't even start dying unless  their attacker wants them to die at 0HP.
Otherwise, it's pulling the last punch so they safely fall unconscious at 0HP.  This does not, however, prevent them from going into dying if they take further damage.
On the other hand, there may be other ways.  For example, Drow (the 1/4 CR monster entry from the MM, pg 138 maybe?) have a poison effect on their crossbow attacks that knocks the target unconscious for an hour if the CON save fails by more than 5. I'm sure there are ways for PCs to get poisons that behave similarly.  As with many things in 5e, this is more in the realm of "ask your DM" than it is in the realm of hard rules.
Answer: Certain Poisons Do the Job
"Sample Poisons" on DMG p.257 has two possibilities: Essence of Ether (inhaled) and Oil of Taggit (contact) cause their victims to fall unconscious.  At 300gp and 400gp per dose, RAW they are rather spendy ways to accomplish the task.  It would be straightforward to house-rule a less expensive version of Essence of Ether that required, say, an extra Grapple check to place a ether-soaked cloth over the victim's face.
Answer: From the earliest days of D&D this has been a problem. Hit points prevent you from dying, and an unconscious character can be quickly killed so from a player's defensive point of view there should not be any easy or common way to circumvent hit points by knocking you out.
Of course this runs counter to any amount of source-material examples where being knocked out is a prelude to some exciting confrontation or escape scenario that the writer wants to unveil. Even Conan gets knocked out from time to time. The author then protects the character by inventing a reason to keep them alive.
But because the writer (the DM) is not supposed to be in control of all the characters (the PCs) in a role-playing game, this is not easy to carry over without railroading and the classic example in D&D used to be Against the Slave Lords, a hugely divisive module series which has exactly this plot device in it.
Again, from an offensive PoV, if there is any simple means of knocking out opponents you can bet that any sensible group of players will try to do it all the time, at which point their opponent will have its/their throat slit and any hit point total rendered useless.
So it's a very difficult design challenge to find a mechanism which works when it's fun and exciting, but can't be used when it wouldn't be. Aside from anything - fun and exciting for whom?
I know this is not really an answer to the direct question, but I hope that it shows the reason that knocking things out is something that is never going to be easy in D&D, or any RPG that places a high value on player agency and deadly combat, and why you should be very careful about introducing such a thing lest you break your campaign.


Are you allowed to change paddles mid game?

Question: In table tennis, can you change paddles mid game to adjust to the opponents play style?
Answer: No you can't change paddles mid game, according to the International Table Tennis Federation Handbook for 2017:

18.104.22.168

A racket shall not be replaced during an individual match unless it is
  accidentally damaged so badly that it cannot be used; if this happens the
  damaged racket shall be replaced immediately by another which the player
  has brought with him or her to the playing area or one which is handed to him
  or her in the playing area.
Comment: A good first answer, backed by the quoted rule and referenced to a source. Welcome to Sports Stack Exchange.


Magento 2.4 Product attribute changes are not apply in front-end pages

Question: I have created more attributes and assigned the scope view value "website". There is only one website. Recently, I upgraded my server. After that, the "global" scope attributes only show up in the front-end.
Why are the "website" scope attribute contents not showing in the front-end?
Comment: Could you update the question with more details and what you have found from your end?
Answer: did you use the below commands after upgrade the server:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush
It seems some server caching issue.
Also again set the attributes to website and save the changes one by one and see if the issue is resolved.
Comment: yes i did run these commands.
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
chmod -R 777 var/ generated/ pub/
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
chmod -R 777 var/* generated/* pub/* vendor/*
Comment: So please again set the website scope for attributes to 'website' and save theme from the admin panel and flush the cache to see if issue is fixed. Also you can set the scope for those attributes to global since you only have one website. But if they didn't work, I assume that there is some server incompatibility. Kindly check it with your server administrators and ask them if any server configuration has changes after upgrade.
Answer: So did you add the product attributes?
Did you try to display them on the product page or cart page?
If you want to display them on the cart or checkout page, you must define them in the XML to use them.
app/code/custom-name/module/etc/catalog_Attributes.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd">
    <group name="quote_item">
        <attribute name="custom_Attribute_1"/>
        <attribute name="custom_Attribute_2"/>

    </group>
</config>

Answer: (Please ignore it if it not work)
Check if you have enabled single store
Step 1. Log into your Admin Panel and navigate to Stores > Settings > Configuration.
Step 2. Open the General tab and go to the Single-Store Mode section at the bottom of the page.
Step 3. Select No in the Enable Single-Store Mode field.
Thanks
Answer:
Check if the upgraded server has the correct configuration settings for displaying the "website" scope attributes. Ensure that the server is properly configured to fetch and display the attribute contents from the "website" scope.
If your website employs caching mechanisms, the attribute changes might not be immediately visible on the front end. Clear any caches that might be storing previous versions of the website's content, so that the updated attribute values can be fetched and displayed.
During the server upgrade, there might have been an issue with migrating the attribute data related to the "website" scope. Verify that the attribute values were successfully transferred to the upgraded server and are accessible in the correct location.
Check if the front-end code responsible for displaying the attributes has been updated to accommodate the changes made during the server upgrade. Make sure that the code references the correct attribute scope and that it is retrieving and rendering the values correctly.
Confirm that the necessary access controls and permissions are properly set for the "website" scope attributes. Ensure that the front end has the appropriate authorization to fetch and display these attributes.
Review the server logs and error messages to identify any potential issues or errors that might be preventing the "website" scope attributes from being displayed. This can provide valuable insights into the root cause of the problem.
Answer: If you have recently upgraded your server and the "website" scope attributes are not showing in the front-end, there are a few possible reasons for this behavior:

Cache Issue: After a server upgrade, it's essential to clear the cache to ensure the latest changes are reflected in the front-end. Make sure to flush the cache using the appropriate Magento CLI command:
bin/magento cache:flush

Additionally, you can try clearing the specific cache related to attribute metadata by running the following command:
bin/magento cache:clean catalog_attributes

This will ensure that any changes made to attribute scopes are properly updated in the cache.

Indexing Issue: In some cases, attribute changes may not be immediately reflected in the front-end due to indexing. Try running the following command to reindex all the Magento indexes:
bin/magento indexer:reindex

This will update the necessary indexes, allowing the "website" scope attributes to show up correctly in the front-end.

Website Configuration Issue: Verify that the website configuration is set correctly. Ensure that the website associated with the "website" scope attributes is properly configured and active. You can check this in the Magento Admin Panel under "Stores" > "Settings" > "Configuration" > "General" > "General" > "Locale Options" > "Locale".

Attribute Visibility Configuration: Check the visibility settings of the "website" scope attributes. Ensure that the attributes are configured to be visible in the front-end. You can check this in the Magento Admin Panel under "Stores" > "Attributes" > "Product" > [Select Attribute] > "Storefront Properties" > "Visible on Catalog Pages on Storefront" and "Used in Product Listing".

By addressing these potential issues, you should be able to resolve the problem of "website" scope attributes not showing in the front-end after upgrading your server.


literal array in SQL statement?

Question: I'm sure there must be a really easy way to do this, but I can't figure out how, and a search hasn't yielded a solution.  Here's what I want to do, but it's illegal:
update test_table set q_name = {'SKELETAL','LEWIS','MECHANISM', ...}[q_type];

That is, q_type has an integer value, and I want to populate q_name with a string value that depends on the value of q_type.  I can do it with a separate set statement for every value of q_type, but I'd rather do it with a single call.  Any ideas how to do it without getting into PL/SQL?
Answer: The way that I would handle that is using the xml datatype and just populate that xml variable and then update the table from that.
here's the reference on the xml data type

literal array in SQL statement?


If I put my writing online/in contests, can I still get published?

Question: I've entered writing into contests and put excerpts of my novels places like Tumblr.  If I wanted to seek publication for the pieces from which said excerpts are taken, could I still get published by a publisher (not self-publishing)?
Comment: I think some websites ask you to give them the rights to the poem you submit, so it probably depends on the platform you use. There's probably a Q&A section where they answer that question, or in doubt you can send an email, but I am pretty sure it varies from contest to contest.
Comment: I added the [self-publishing] tag because you're asking if a traditional publisher will accept your work if you've already self-published pieces of it.
Answer: For excerpts, it should be fine as long as you're not publishing too much:

If I publish an excerpt online, does that mean the whole work or part of the work is considered previously published?
  Generally speaking, excerpts are okay to publish online, as long as they are on the short side (relative to the work in question).
Writer's Relief

With contests, it's a little trickier. When you submitted your writing, what rights (if any) did you give away? (You read the fine print to make sure you still have the right to publish it, right?) In any case, most publishers want the exclusive right to publish.


How to automatically generate getters and setters in Android Studio

Question: Is there a shortcut in Android Studio for automatically generating the getters and setters in a given class?
Answer: Using Alt+ Insert for Windows or Command+ N for Mac in the editor, you may easily generate getter and setter methods for any fields of your class. This has the same effect as using the Menu Bar -> Code -> Generate...

and then using shift or control button, select all the variables you need to add getters and setters
Comment: For those on Macs it's control + enter.
Comment: how to generate getters and setters for Kotlin class
Comment: For java its working fine.But im using kotlin in android studio for app development.Then how to generate getter/setter like java?
Comment: any possibility to create getter and setter such as ivar  _username and getter and setter are getUsername and setUsername?
Comment: On Mac Control+n
Comment: Command + N will not work on mac, use instead Control + N or Control + Enter
Answer: for macOS, ⌘+N by default.
Right-click and choose "Generate..." to see current mapping. You can select multiple fields for which to generate getters/setters with one step.
See http://www.jetbrains.com/idea/webhelp/generating-getters-and-setters.html
Comment: You can select multiple fields did the magic.
Answer: Android Studio & OSx :
Press cmd+n > Generate > Getter and Setter
Android Studio & Windows :
Press Alt + Insert > Generate > Getter and Setter
Comment: Just tested on Windows Alt+Shift+S+R is not working and right click does not contain Source. Is it maybe a custom setup?
Comment: I have fixed the Win section! :)
Answer:
create the variable
right click
select "Generate" and then select "Getter and Setter" option
Comment: Any shortcut for  **kotlin Constructors**? Alt + Ins not showing me generate Constructors option.
Comment: Did you try `Alt + Enter`?
Comment: for that case, I don't know what's going on. Did you post your problem in the Intellij forum?
Comment: When you find the solution, please, share it here.
Answer: Android Studio & Windows :
fn + alt + insert
Comment: Your image hasn't appeared in the post correctly, and you have not completed an image description - it says 'enter image description here'.
Answer: You can generate getter and setter by following steps:

Declare variables first.

click on ALT+Insert on keyboard placing cursor down to variable declaration part
now select constructor and press Ctrl+A on keyboard and click on Enter to create constructor.
Now again placing cursor at next line of constructor closing brace , click ALT+INSERT and select getter and setter and again press CTRL+A to select all variables and hit Enter.

That's it. Happy coding!!
Answer: Position the cursor under the variables -> right-click -> Generate -> Getter and Setter -> Choose the variables to make the get and set
or
Alt + Insert -> Getter and Setter -> Choose the variables
Comment: The question was if it is possible to generate getters and setters with a single shortcut, so not where you can find this option in a menu.
Comment: I did not understand.
Alt + Insert ->  Getter and Setter -> Choose the variables
Answer: As noted here, you can also customise the getter/setter generation to take prefixes and suffixes (e.g. m for instance variables) into account. Go to File->Settings and expand Code Style, select Java, and add your prefixes/suffixes under the Code Generation tab.
Answer: Using Alt+ Insert or Right-click and choose "Generate..."
You may easily generate getter and setter or  Override methods in Android Studio.
This has the same effect as using the Menu Bar  Code -> Generate...
Answer: This answer deals with your question but is not exactly an answer to it. =) It's an interesting library I found out recently and I want to share with you.

Project Lombok can generate common methods, such as getters, setters, equals() and hashCode(), toString(), for your classes automatically. It replaces them with annotations reducing boilerplate code.  To see a good example of code written using Lombok watch a video on the main page or read this article.

Android development with Lombok is easy and won't make your android application any 'heavier' because Lombok is a compile-time only library. It is important to configure your Android project properly.

Another example:
import lombok.Getter;
import lombok.Setter;

public class Profile {

  @Getter @Setter
  private String username;

  @Getter @Setter
  private String password;

}

Android development with Lombok is possible. Lombok should be a compile-time only dependency, as otherwise the entirety of Lombok will end up in your DEX files, wasting precious space. Gradle snippet:
dependencies {
    compileOnly "org.projectlombok:lombok:1.16.18"
}

In addition you may want to add the Lombok IntelliJ plugin to support Lombok features in your IDE at development time. Also there is Hrisey library which is based on Lombok. Simply put, it's Lombok + Parcellable support.
Comment: Unfortunately, Project Lombok breaks in Android library projects.  It is unreliable right now.
Comment: @IgorGanapolsky any proof?
Comment: @IgorGanapolsky Project Lombok works fine with Android. See [setup guide](https://projectlombok.org/setup/android).
Answer: You can use AndroidAccessors Plugin of Android Studio to generate getter and setter without m as prefix to methods
Ex: mId;
 Will generate getId() and setId() instead of  getmId() and setmId()
Answer: Use Ctrl+Enter on Mac to get list of options to generate setter, getter, constructor etc
Answer: use code=>generate=>getter() and setter() dialog  ,select all the variables ,generate all the getter(),setter() methods at one time.
Answer: Another funny way
Type the parameter name anywhere in the object after definition, you will see setter and getter, Just select and click enter :)
I tried with Android Studio 2.3
Answer: Right click on Editor then Select Source -> Generate Getters and Setters or press Alt + Shift + S
Comment: This is Eclipse. He asked for Android Studio.
Answer: Just in case someone is working with Eclipse
Windows 8.1 OS | Eclipse Idle Luna
Declare top level variable  private String username Eclipse kindly generate a warning on the left of your screen click that warning and couple of suggestions show up, then select generate.
Comment: The question was directed to Android Studio, not eclipse


httpd.exe - Application error while starting apache in xampp server in window 8.1

Question: I got

httpd.exe - system error, The program can't start because
  api-ms-win-crt-runtime-l1-1-0.dll is missing while starting Apache
  server.

I'm using windows 8.1 machine.
To solve that problem i copy .dll files in window32 directory and when i restart the xampp, got new error.

httpd.exe - Application error The application was unable to start
  correctly (0xc000007b). Click OK to close application

Port 80 is not actually being used. I have already reinstalled it many times but same error occurs.
I'm trying to install latest xampp version (7.1.1)
Answer: The api-ms-win-crt-runtime-l1-1-0.dll is part of the Visual C++ 2015 Redistrutable package.
You copied a wrong DLL (wrong CPU archtecture), which generates the error

0xc000007b - STATUS_INVALID_IMAGE_FORMAT -  {Bad Image}  %hs is either
  not designed to run on Windows or it contains  an error. Try
  installing the program again using the  original installation media or
  contact your system  administrator or the software vendor for support.

Delete the wrong DLL again, download and install the Microsoft Visual C++ 2015 Redistributable Update 3.
Answer: Run the program with compatibility for Windows Vista service pack 2
Comment: Robert, can you give a little more detail with your answer on how to do this?


Would a bad limit switch cut power to the thermostat?

Question: My Nest thermostat is not working and it says the red wire is not getting power. The gas company man poked around the furnace and thinks it is a bad limit switch.
Can a bad limit switch stop power from reaching the thermostat? If not, then can a bad pressure switch do the same thing? It would be easy to remove the pressure switch but the limit switch is inside a metal box.
Comment: Yes, can you post the wiring diagram for your furnace for that matter?
Answer: It's possible depending on how your furnace controls are wired. Sometimes the limit switch will cut the 120V power supply to the 24V transformer that powers the thermostat, sometimes it's wired to cut the 24V power from the transformer to the thermostat, but you'd need to look at the schematic for your furnace and verify that the actual wiring follows the schematic. It's possible that it's been modified.
If the limit switch was tested bad, not just guessed bad, you are going to have to bite the bullet and replace it. It may be easier to test the limit switch than to trace out all the controls.


Hard disk for SharePoint 2013 Server in a two-tier Farm

Question: Microsoft recommends a minimum 80GB of disk space for System drive (C:) for a SharePoint Server 2013 (Web+App Server). doesn't that affect system availability in the future.
Comment: Thank you.
So if i consider a second drive with 60 GB, for SharePoint log files is it enough? Also for SQL Server, MS recommendes 80GB for system drive.
Comment: that will be fine but for SQL again same thing dont use the system drive for SQL LDF and MDF files.
Answer: This is minimum requirement for the system drive. But as a practice you have to make sure none of these stored on the c drive.

ULS logs as these will fill the drive quickly
IIS logs
Usage Logs.
Index location

If you store everything on C drive then yes you environment will be in trouble.
Answer: Hardware requirements—web servers, application servers, and single server installations
The values in the following table are minimum values for installations on a single server with a built-in database and for web and application servers that are running SharePoint 2013 in a multiple server farm installation. For information about the deployment types that are used in this table
For all installation scenarios, you must have sufficient hard disk space for the base installation and sufficient space for diagnostics such as logging, debugging, creating memory dumps, and so on. For production use, you must also have additional free disk space for day-to-day operations. In addition, maintain two times as much free space as you have RAM for production environments.


Centreon/Icinga: command by services

Question: I was wondering if it could be possible to recognize how a command is comformed with any services in Centreon? For example, which services contain the 'check_uptime' command?
Answer: Maybe its possible using some sql magic queries but I'ver done that.
Though your question reminded me of this week's icinga2 api development where dependency tracking for objects has been implemented - this is important in case someone deletes a checkcommand at runtime, with many hosts/services depending on it. By default the api will deny removal, but cascading deletes would cause the entire dependency tree being deleted.
A side-effect from that development is the output of such object dependencies inside the status query for these objects.
Check the screenshot over here: https://twitter.com/dnsmichi/status/637586226711764992
It may not help you now, but with 2.4 being released in November.

Centreon/Icinga: command by services


What's the point of banning a few 'selected Russian banks' from SWIFT?

Question: I read that several Russian banks got banned from SWIFT (mirror) following the ongoing 2022 Russian invasion of Ukraine. What's the point of banning a few selected Russian banks from SWIFT? I would have guessed it is mostly useless as one could simply use a Russian  bank that is still allowed in SWIFT.
Comment: Frankly this is rather difficult to answer right now, because the list of banks hasn't been announced. It's not even clear if the Russian central bank will be on the list https://edition.cnn.com/2022/02/26/politics/biden-ukraine-russia-swift/index.html
Answer: The point is to move the needle higher on economic sanctions against Russia. It was unprecedented when Iranian banks lost access to SWIFT in 2012, but it can be argued that it is again unprecedented against Russia today, as a member of the G20. It is much harder to convince countries who depend on trade with Russia to remove the first bank than it is subsequent banks, up to a point.
It is still currently unclear exactly what the impact will be, I do not believe a complete list of Russian banks who will be impacted has actually been released yet. The actual list is likely still yet to be determined, but so far we just don't know.

Here is a quote of the actual commitment from the Joint Statement on Further Restrictive Economic Measures, issued 26 February 2022. It does not go into detail about what specifically is going to happen:

First, we commit to ensuring that selected Russian banks are removed from the SWIFT messaging system. This will ensure that these banks are disconnected from the international financial system and harm their ability to operate globally.

(source 1) - US Government Website
(source 2) - EU Government Website
SWIFT themselves published an announcement on 15 March 2012 (source) when they were instructed to disconnect Iranian banks from their system. They provide from there a link to Council Regulation (EU) No 267/2012, dated 23 March 2012 (eight days later). From that order, look for Annex VIII starting on page 51 and Annex IX starting on page 60. Until that level of detail can be reached as a result of diplomatic negotiations, it's entirely unclear what the level of impact within Russia will be. So far I think all that has been achieved are commitments from countries who have previously been holdouts against removing Russian banking access to restrict "some banks".
Potential Impact
According to The Bank of Russia, as of 1 January 2022:

There are 333 operating banks (230 banks with a universal licence and 103 banks with a basic licence) and 35 non-bank financial institutions in Russia.

(source) - Russian Government Website
One estimate given for the number of Russian banks currently using SWIFT is "some 300". From that same source, by losing access to SWIFT, businesses and individuals who are customers of those banks will find it much harder to operate economically outside of Russia's borders:

If Russia's banks were banned from SWIFT, they would find it much harder to access financial markets around the world.
As a result, it would be much harder - although not impossible - for Russian businesses and individuals with bank accounts in the country to import and export goods, and borrow and invest abroad.

My understanding of this is that potentially every bank currently operating in Russia could lose access to international funds, as well as other lending and credit markets. Certain sectors of the Russian economy could potentially be targeted, depending on what banks are included and what industries they generally serve, and outside of Russia the ruble will be much harder to exchange. Goods generally purchased inside of Russia but imported from elsewhere may become more scarce, leading to rising prices and (potentially) extreme inflation.
However, given the moderating language that only "selected" banks will be targeted, it is just as likely that the number of banks affected will be much lower. The arguments against completely removing all Russian banks from operating are generally to prevent a complete collapse of the Russian economy and the follow-on effects that would have to countries which depend more on trade with Russia. I have also seen a few arguments about the morality of preventing too much suffering from hitting the citizens of Russia, who may not all agree with the decisions their government has taken.
The announcement itself has caused the price of the ruble to drop, so Russian banks who now would wish to draw back funds which are now stored in other currencies are going to have to convert it to much less than before. Combined with typically easily-spooked investors, a measure of economic damage has already been inflicted just by reaching an agreement. (source)
You will probably get a better understanding of what the overall potential impacts might be by asking a question over at Economics.SE. A quick search I was able to find this one already asked:
Which sanction against Russia creates the least side effects on Western economies: SWIFT disconnect or denying selling of government bonds?
Comment: "it can be argued that it is again unprecedented against Russia today, as a member of the G20"
It can be equally argued that it is unprecedented for Russia, a G20 nation, to invade a sovereign nation with no pretext other than self-interest
Comment: "The announcement itself has caused the price of the ruble to drop, so Russian banks who now would wish to draw back funds which are now stored in other currencies are going to have to convert it to much less than before." If the funds are in non-ruble currencies, then they are now worth more rubles.
Comment: @Vikki No, Russia was removed from the G8, causing it to revert to its previous moniker, G7. Russia is still part of the G20 (though some countries did suggest removing it from them as well).
Comment: Wasn't Russia kicked out of the G20 a while back?
Comment: And what is the point of giving Russian billionaires so much time to move their money out of Russia?
Comment: The more they move out, there more there is to sieze. If i was an oligarch, I'd be pushing my money into safe havens ASAP. And the safest haven for them is back in Russia, where its beyond the reach of sanctions
Comment: @Shayne Wouldn't you be also afraid that Putin might lose power, and you'd have to flee Russia because you'd be considered a high-profile criminal there? At which point you'd only have access to your Swiss account (opened in someone else's name of course).
Comment: These sanctions are not claiming the billionaires are 'criminals' (Although many are). Rather that they are russian and russia is under sanction. If putin leaves power they might lose protection, but RIGHT NOW, the only place they have protection is Russia. Plus I dont think Putins going anywhere. He's extremely popular in Russia. Plus Swiss honor Interpol requests to freeze funds , especially since they dont do anonymous accounts anymore (and havent for 20 odd years)
Comment: Although it does offer a tantalizing possibility that by putting enough damage on the oligarchs and they might decide Putins not their boy anymore. I'm not being conspiratorial and suggesting Putins a puppet for them, rather that they have the funding to make him politically radioactive in moscow inner circles. Fund a coup or something.
Answer: It makes doing business more difficult (and more expensive) for Russians, while still allowing the US to buy Russian oil and Europe to buy Russian gas.
Comment: It appears quite a few gas contracts contain a termination clause in case the buyer is unable to pay, even for technical reasons. A full SWIFT disconnect would trigger these clauses, which would put the buyer in the unenviable position to renegotiate a contract at the current gas prices.
Comment: @MSalters I was also under the impression that a SWIFT ban disrupts all trade, including gas and oil. Which is why the ban is targeted and not universal (it is still winter).
Answer:
The main effect of excluding banks from Swift is an immediate and drastic interruption in trade: Neither party can pay for goods received and services rendered any longer.
There are two reasons to interrupt trade at all: To bring about a change in Russian behavior; and to satisfy public demand for a reaction.
Trade is a mutually beneficial interaction. Therefore, regrettably, disrupting trade hurts both parties involved.
Excluding some, but not all Russian banks from Swift interrupts some, but not all trade.

Given these premises:
Excluding some, but not all banks from Swift is an attempt to find a sweet spot between satisfying public demand for action and affecting Putin's behavior on one side and not inflicting too much pain on Western economies on the other side. Apart from the overall economic fallout of such a measure there are also particular interests: Special interests of influential constituents important to decision makers, and entire economic sectors important to some countries. That's why some decision makers and entire countries are more opposed to excluding Russia from Swift.
Answer: Well, it's a bit unclear how much of this a direct effect and how much is psychological, but today, as markets reopened, several things happened:

The rouble plunged 30% against the USD.

The Russian central bank was forced to raise interest from 9.5% to 20%!

The ECB announced that "Sberbank Europe AG, which had total assets of €13.64bn" is likely to go bankrupt due a rapid outflow of capital. (Sberbank Europe AG is "100 percent owned by the bank's Russian parent company" )

Regarding the RCB interest rate, even TASS notes that "This is an all-time high of the key rate. The previous record of 17% was hit in December 2014."
Later in the day, the Russian central bank announced that the Moscow stock market will be closed for the whole week (up from just a two-day closure announced earlier, after the $200 billion wipeout out last week.)
And interestingly Putin appears to see a technical default on external debt as some kind of win for Russia, given his decree later in the day, apparently forbidding repayments, if Bloomberg is correct:

President Vladimir Putin today banned all Russian residents from transferring hard currency abroad, including for servicing foreign loan contracts, potentially putting much of the country's $478 billion in external debt at risk of default.

There was some uncertainty on what Putin's order actually meant, according to the experts cited by the WSJ

"Usually under sanctions there are always exceptions for paying coupons and repaying bonds," said Jerome Legras, managing partner of Axiom Alternative Investments. "I would be very surprised if coupon payments from VTB for example were not allowed."
Blocking payments could lead to imminent default on Russian debt, said Timothy Ash, an emerging-market strategist at BlueBay Asset Management. "It's a little unclear whether this means individuals, companies or the state–or all of the above, but it's a very concerning headline," he said.
A block on paying debts could "hit Russia's financing for years to come," he added. "It takes a long time for countries to get back to investment grade if they default."

Anyhow, the dollar-denominated Russian bonds rose to a 24% yield, from 3% at the begging of the year (same source--WSJ). Never mind that most Westerners are barred from even buying them now.

With more hindsight, we're seeing the effects on the Western-based subsidiaries of Russian companies:

Yandex (YNDX), which handles about 60% of internet search traffic in Russia and operates a big ride-hailing business, said Thursday that it may be unable to pay its debts as a consequence of the financial market meltdown triggered by the West's unprecedented sanctions. [...]
Yandex hasn't been sanctioned but it could still default. Investors who hold $1.25 billion in Yandex convertible notes have a right to demand repayment in full, plus interest, if trading in its shares are suspended on the Nasdaq for more than five days. The Moscow stock market will remain shut at least until Tuesday, Russian state news agencies reported on Friday.
"The Yandex group as a whole does not currently have sufficient resources to redeem the Notes in full," the company said in a statement. [...]
Sberbank (SBRCY), Russia's biggest lender, was forced to close its European arm earlier this week after it was prevented by the Russian central bank from sending money to its Vienna-based subsidiary following a run on deposits.

Even energy-related stocks have been hammered on the Western markets. On the London Stock Exchange:

Sberbank was down 99.72% year-to-date to trade for around a single penny before the suspension, while Gazprom was down 93.71%, Lukoil 99.2%, Polyus 95.58% and EN+ 20.51%.

And a week later...

The [Russian central] bank on Tuesday announced citizens with foreign currency accounts would not be allowed to withdraw more than $10,000 until Sept. 9 and told commercial banks to stop selling hard currency to clients.
Any withdrawals above that amount would be converted to rubles at the current exchange rates.
Between March 9 and Sept. 9 "the banks will not be able to sell foreign currencies to citizens," said the statement, a measure that will likely foment a black market for hard currency.

Basically, the convertibility of ruble is "destroyed" for the average Russian citizen. Welcome back to the USSR economy, at least for the next 6 months.
However, the heavy lifting in causing the central bank make this decision was probably not the SWIFT ban itself, but the more hardcore sanction that prohibited dealings/transaction (of most kinds) with the Russian central bank, with only some narrow exceptions allowed for energy payments, as I understand it. This essentially caused the bulk of the RCB's assets to be trapped/frozen abroad. However, these two sanctions (on most RCB transaction and SWIFT on the large Russian commercial banks) were introduced the same day, so it's a little difficult to separate their effects.
Comment: I think it's more of a market's expectation for Russia to go bankrupt(ish) soon because of the financial loss related to an unsuccessful war. Germany had the same issue after WWI, they didn't need to be cut off SWIFT for that to happen.
Answer: It appears that the EU and US are using a strategy of escalating sanctions. They do not start with the full set of sanctions. Instead, as Russia continues to occupy Ukraine, sanctions are increased.
This is a reasonable strategy. It means the Russian oligarchs receive bad news repeatedly, reminding them of the cost of supporting Putin.
For that reason, "banning a few selected banks" means that the EU and US can escalate the SWIFT ban further, simply by banning more and more banks. Because that is an easy option, the Russian oligarchs have to consider whether the effort to switch to another bank is worth it. By the time they've moved their capital, their new bank could well be hit by an expanded SWIFT ban - their move might itself trigger that.
Comment: why will they not exchange it all for euros?
Comment: @user253751 #1 they're Russians.  #2 Russia almost certainly has currency controls.  #3 Moving a billion Euros takes some time and planning.
Comment: @user253751: Exchanging requires two parties. European banks are not going to exchange euros for rubles. Perhaps a Chinese bank would do so, but that will come at a significant discount. That still means the sanctions are effective in causing pain for the oligarchs.
Comment: @user253751 Banning a bank in SWIFT means it cannot process international orders at all, be in in rubles, euros or USD. Most accounts used in international trade are USD/EUR accounts to begin with, so there's nothing to exchange.
Answer: The banks being banned are not just random small businesses with few clients, they are among the 10 largest Russian banks accounting for more than a half of Russia's banking assets:
<code>No.     Bank
1   Sberbank <- BANNED
2   VTB Bank <- BANNED
3   Gazprombank
4   Alfa-Bank
5   Rosselkhozbank
6   Credit Bank of Moscow
7   Otkritie FC Bank <- BANNED
8   Promsvyazbank
9   Sovcombank <- BANNED
10  Raiffeisenbank
</code>
Opening an account in a new bank, cancelling old transactions, starting new transactions, getting them properly insured, re-doing export paperwork is a huge interruption for a business. It takes weeks to get things on track, and the high probability of further sanctions makes it even more likely that a company doing business with Russia will simply suspend that part of their business until the things clear up (at least a cease-fire is in place), which is exactly what the sanctions are for.
I know a bunch of Russians (and Ukrainians) who work in French companies as trade agents for ex-URSS markets. Those companies are now trying to get paid for whatever they have already delivered to Russia, and are only planning new deals with Russia and Belarus for the year 2023.
Answer: The point, I think, is sabre rattling: The Western governments want to convince Putin that they can and will make it difficult for Russia by squeezing them financially. It makes sense from our perspective, because that is believed to have been the main factor in breaking the back of the USSR. The real question, however, is whether it is likely to work.
What we in the West have neglected, unfortunately, is that you must always leave an acceptable escape route open - a person who has no acceptable (to them) options left, becomes desperate, unpredictable and therefore dangerous, and then you have lost control of the situation.
When Putin came to power, we had an adversary, who was perhaps unpalatable, but mostly rational; we have now managed to create a desperate ruler who appears to feel he must threaten with his most powerful weapons, even if it means the end of everything, including his own country. If you don't believe it, read this BBC article.
Edit in view of some of the comments
The original question was

What's the point of banning a few selected Russian banks from SWIFT?

And I feel I have answered that, at least briefly: The West want to warn Mr Putin, but without causing massive damage from the outset; it's a warning shot that is intended to make Russia feel a bit bruised, so they hopefully moderate their stance and realise that it could become a whole lot worse.  The question about SWIFT has already been addressed adequately by others - I don't really believe in scoring points by repeating what others have said.
But I think it is important to always seek out the wider context for any question about politics, because it is never as simple as what the politicians want us to believe.
Comment: My impression is this answer would be better for a different question. Maybe like question of "How to best defeat Putin?".
Comment: I don't think this answers the question about SWIFT, but your second paragraph describes [Sun Tzu's 'golden bridge'](https://the-conflictexpert.com/2019/03/03/giving-your-opponent-a-golden-bridge/).
Comment: It is unclear how this answer applies to the question - specifically, why only a **subset** of banks?
Comment: Giving Putin -- who directly lied to many of his western European allies -- a  face-saving exit plan is at the very bottom of the priority list of the people that Putin lied to, since that makes his former European allies look even worse.
Comment: @RonJohn I recognise what you say - but what is more important? Sparing the hurt feelings of some, or avoiding the situation escalating completely out of control? My feelings say that Putin should be removed from power and put in front of the international criminal court - and preferably jailed for the rest of his life. But I think it would be more rational to for avert the danger of nuclear war.
Comment: @j4nd3r53n that's a valid concern if you think that Putin really is threatening nuclear war.


Is there a way to allow a certain block to be placed in adventure mode?

Question: I am trying to organize the work of mail on the map with the adventure mode and the Ender Mail mod. Is there a way to allow a player in adventure mode to put and destroy a certain block always and everywhere, in my case this is a endermail:package block from the mod. If not, then perhaps a command would help, which would allow you to place a block from the inventory at certain coordinates.
Answer: You can allow a specific block item to be placeable on certain blocks by using the CanPlaceOn NBT tag.
There is currently no way to make it placeable on all of the blocks without adding all of the blocks to an item tag (see this feedback post).
Answer: I found a video on Youtube that shows how to do it. Basically, you have to download a code generator for Minecraft.
There you can pick the block you want the people to be able to place, and let it be able to be placed in Adventure mode in Minecraft.
Here's the link to the video, and this is the link to MCStacker.
I'm pretty sure the website just generates a code for you and you have to put it in yourself with a Command Block.


Is it a problem if the frame of my house extends 1 - 2" from the slab?

Question: Is this a huge problem?  The house frame is about 2" off the slab along the north side.  On the other sides of the home it varies by 1", but not in as many places.
Comment: In and of itself, probably not the end of the world. But it sure seems like a giant red flag to me that the contractor has screwed up a lot more than just that.
Comment: I would be very concerned.
Answer: If I were a buyer I would beware.
Why is the house frame not firmly on the foundation?
2" off the slab is more than half the width of the 2x4 base of a wall.
Comment: 2 inches is more than one-third off the base of 2x6 framing.
Comment: Given that the bottom plate is supposed to be firmly bolted to the foundation... Heh? Why's it trying to take a walk in the country? As Matthew points out, in 2x4 frame construction, the lumber dimension is 1 1/2 x 3 1/2. If it was 2x6 construction, this is still highly suspect.
Answer: I would start by evaluating the north wall section in several ways. First of all use a nylon string (such as a masons line or a chalk line). Stretch this along the outside edge of the slab to see of the original slab was poured straight all across the area where the wall overhangs the edge. Secondly repeat this test along the lower edge of the wall (outside) to see if the base of the wall runs a true straight line. And then third attempt to run the same test along the upper side of the wall (also outside). If the house is multi-story do this wall test along a point where the wall meets the second story. These three tests will quickly help you to determine if the overall structure was built correctly or not. There is always the possibility the the slab was built in a shoddy way and not straight from the beginning.
If by chance the walls are not actually sitting on a concrete slab that forms the floors on the inside of the house then there is a possibility of another serious problem going on. If the house wall is straight along the bottom edge and not matching to the foundation wall it may be that the foundation wall has tipped due to movement of the soil. If so then this needs to be looked into carefully.
Comment: Thanks for all the info.  The walls are sitting on a concrete slab.  We will try all the tests you mention above.
Comment: @BeverlyHudson - Let me add that after you do these rudamentary tests you will have some additional information to help in evaluating the situation with your house. If you add some additional details about what you discover, and maybe even some pictures, it is likely that some additional suggestions can be made. The goal of course would be to help guide you toward whether it will be necessary to get a professional contractor in to correct any serious problems.
Answer: Checking if various lines are straight may help explain why there's an overhang, but the question remains: Is this a huge problem? I don't know if we can fully answer this, as the devil's in the details. Are there additional floors? Is this in snow country, if so what's the snow load? What are the wind and seismic concerns? Is the wall 2" off a bearing wall?
The bottom plate of the wall must have adequate bearing area on the concrete or the vertical studs could actually crush the fibers of the bottom plate. It may not be an issue for regular studs but beam supports are a big concern. Even good sized openings in the wall could be an issue.
Then there's the lateral concerns from wind and possibly seismic. The bolts or whatever anchors are used are probably all misaligned, with very decreased edge distances, significantly reducing the ultimate strength of the assembly.
What all this means is there is cause for concern, but depending on the design loads involved and their locations, it may not be a problem, or could be a huge problem. Without a detailed study, it will be very difficult to say.
Answer: I am going to go with the most logical explanation of what is causing this and I could be wrong.
Most commonly this is an error in the foundation pour.  Not only an error in foundation pour but then the lead contractor didn't notice it was poured wrong until his crew got a good way into constructing.
There is a really good chance that the walls are built modular (either on site or not) per architect's drawings (think lego steps).   They start noticing things are off so start shifting the walls so that the house fits.
Is this is problem?  Well I remember an architect that I had years back explaining to me that he likes a 1/4" hang on the walls.  He went into enormous detail and I wasn't listening much but to sum it up (in my head) it was to prevent exposure gaps and so the siding sat better on the edges.  (Remember most concrete, even using forms, isn't straight for long walls, so without an overhang you probably are under in spots)
Well I still haven't answered the question!  I think there are two main things that answer this.  #1 Are the outer walls 2x6 construction.  If not I have some major major issues with the overhang at 2" for 2x4 framing.  A foundation issue, soil issue or earthquake and your house could collapse.
And #2 Did they consult with an engineer or architect during the build?  If the crew just "hid" this problem, I would not trust it at all.  So how do you know?  You start with the city.  You ask them for the papers on who signed off on the construction of the house.  You tell them about the overhang and see if that is documented.  If it is documented it was OK'ed by engineer or local inspector.  If it was not documented the local inspector will need to start working.  He will need to figure out who built the house and contact them - this is a huge f-up by inspector if not documented.
Personally, unless I see that the crew did their due diligence about getting the overhang OK'ed I find this a huge huge red flag on the house.  If they hid this what else are they hiding?  Usually when one thing this shoddy is done it is a pattern.  This could be a great house with little to no problems - but as a buyer I would stay away for this one glaring issue.  I still flip a house every year or two and I wouldn't touch this as a flipper.  (I want the houses I flip to turn out good for new buyers and I don't want to see this raised during a home inspection)


How can a body have constant velocity when net force on it is zero?

Question: Considering Friction is here.. How can a body move with uniform velocity, to move with uniform velocity it should have acceleration equal to zero, for this suppose a body on which a force F is acting on right then the F(k) {Kinetic friction} will be on left (all this happening in x-axis). To have zero acceleration F=F(k), then how can a body even move having zero Force on it along with uniform velocity... I didn't get this theoretical concept.
Comment: You confuse force and net force. Net force is zero, counteracting moving and friction forces are not zero. When the former ceases, the motion (progressively) stops.
Comment: Do you understand what the term "net force" means?
Comment: This thread shows why what many of take for granted took until Galileo to be discovered.
Comment: I'm not sure what you are asking.  Are you asking how a body can move at all if there is zero net force? or are you asking how a body *starts* to move?  Does your question specifically involve friction, or are you just using friction as an example of a force?
Comment: I am asking is that, if a body has a constant speed  then net Force on the body is zero and force is directly associated with acceleration, so how a body even move with constant velocity.. Or what forces will be acting on a body moving with constant speed.
Comment: Can you tell me how forces acts on a body which is starting from rest and moving with constant speed.
Comment: You cannot start form rest _and_ have constant speed.
Answer: Frictional forces works in two different regimes; static and dynamic.
Immagine a solid resting on a table. When you pull from it with a force (we call that force in this context the acting force) the frictional force apears. It was not there before. This is the static friction force. It increases in magnitude at the same pace that you increase the acting force, thus is always perfectly counteracting your pull and therefore the object doesn't move. Or more precisely the object doesn't change its state of motion (which is a specific case of uniform rectilinear motion where velocity is zero).
If you keep increasing the pull, then the static friction would keep increasing to counterbalance it, until it reaches a critical threshold (a maximum force) where the frictional regime transforms to the so called dynamical. Above this force (this pull / acting force) the table can no longer resist your attempts to move the object and friction stops increasing as a response to your acting force. Then your acting force is greater than friction (since it can't keep increasing the bet) so the net force (the total sum of forces) is non zero, A.k.a. you start to accellerate the object.
You can see the response of the frictional force with respect to the acting force you are pulling the object with in this diagram:
THEORETICAL INTENSITY OF THE FRICTIONAL FORCE VS THE ACTING FORCE

EXPERIMENTAL DATA SHOWING INTENSITY OF THE FRICTIONAL FORCE VS THE ACTING FORCE

So, to finally answer your question. Can a body have constant velocity when net force on it is zero? Yes, and not only that. It will ALWAYS have constant velocity when the net force (the sum of all the forces acting on an object: in this case pulling and frictional forces response) is zero. This is the statement of Newton's 1st law of motion. It doesn't matter if there is friction or not, the statement is always valid. In the static regime, when you are not pulling very hard from the object and the frictional response is counteracting your pull the net force is zero and in fact the object mantains a constant velocity (zero velocity in this particular case). When you pull harder than a certain threshold force the friction is not completely counteracting your pull and thus there is a net force in the direction of the pull slowly accellerating the object (Newton's 2nd Law). This means that the object would change its state of motion from been at rest to start to move.
Answer: It would be difficult to find a location in space where there is absolutely no force whatsoever acting on a body, but there are locations where the force of gravity is so negligible that there is virtually no force acting on it. In such a location the object is free to follow Newton's 1st Law of Motion: a body in uniform motion will continue to travel in a straight line until acted on by a force.
Answer: The simple answer an external force was initially required to overcome static friction. Once the object starts moving we switch to kinetic friction which, as shown in @Swike graph is less than static friction. If you maintain the force you were applying to overcome static friction your force will exceed kinetic friction and the object will accelerate. However, if you reduce your force to exactly equal the kinetic friction force, then there is no net force and the object will continue to move at the velocity it had before your reduced your force. It now moves with constant velocity with no net external force.
Hope this helps.


What should I say when I hear the Aazan?

Question: As the question says: What should I say when I hear the Aazan (Adhaan)?
Answer: It is Sunnah to repeat the adhaan word by word when you hear the Mu'adhin's voice because the Prophet (peace be upon him) said:

When you hear the Mu'adhin, repeat what he says word for word, then
  invoke Allah's Blessings and Peace upon me, for whoever invokes
  Allah's Blessings and Peace upon me (once), Allah will send His
  Blessings and Peace tenfold upon them. Then ask Allah to grant me
  Al-Wasilah (the most superior degree in Paradise), for it is a rank in
  Jannah (Paradise) that is granted to only one of Allah's Servants, and
  I hope I will be this one. Whoever asks Allah to grant me Al-Wasilah
  will deserve my Shafa`ah (intercession). [Sahih Muslim 384]

More: Ruling on repeating Adhan after the Mu'adhin
Comment: Why isn't the answer accepted...!
Answer: Adhan contains the phrases:

حي على الصلاة
  Come to salat
  حي على الفلاح
  Come to salvation

So the best reply would be accepting this invitation and joining the salat where the adhan was read in.


Is there a recent book that covers the theoretical and philosophical aspects of artificial intelligence?

Question: What are some recent books that introduce AI and neural networks while also discussing the related philosophical issues, like epistemology and whether AI is really thinking, etc.?
Answer: Deep Learning (2016) by Ian Goodfellow, Yoshua Bengio, & Aaron Courville, introduction:

Inventors have long dreamed of creating machines that think. This desire dates
back to at least the time of ancient Greece. The mythical figures Pygmalion,
Daedalus, and Hephaestus may all be interpreted as legendary inventors, and
Galatea, Talos, and Pandora may all be regarded as artificial life

Ironically, abstract and formal tasks that are among the most difficult mental undertakings for a human being are among the easiest for a computer. Computers have long been able to defeat even the best human chess player but only recently have begun matching some of the abilities of average human beings to recognize objects or speech. A person's everyday life requires an immense amount of knowledge about the world. Much of this knowledge is subjective and intuitive, and therefore difficult to articulate in a formal way. Computers need to capture this same knowledge in order to behave in an intelligent way. One of the key challenges in artificial intelligence is how to get this informal knowledge into a computer.

Deep learning has had a long and rich history, but has gone by many names, reflecting different philosophical viewpoints, and has waxed and waned in popularity.
Answer: The famous book Artificial Intelligence: A Modern Approach (by Stuart Russell and Peter Norvig) covers all or most of the theoretical aspects of artificial intelligence (such as deep learning) and it also dedicates one chapter to the common philosophical topics that you mention.
Answer: I would like to add "The Master Algorithm" by Pedro Domingos. I would say it's more philosophical but still provides high level discussions about differences between algorithms. He also has a sense of humor which makes it a lighter read.


I need help with a word problem .

Question: The length of a rectangle is 1 meter less than twice its width. If the area of the rectangle is 120 square meters, find the dimensions of the rectangle
Answer: Let $x$ be the length of the rectangle and $y$ be the width of the rectangle.
Area is given by $A=xy\implies xy=120 \tag{1}$
And according to the question, the length $x$ is $1$ less than twice the width $2y$.
$\therefore x=2y-1 \tag{2}$
Solve $(1)$ and $(2)$ to get $x=15$ and $y=8$.
Comment: Note that $x=-16$ and $y=-7.5$ also satisfy the equations, but can be ignored, since the dimensions must be positive...

I need help with a word problem .


Laplacian on Sphere of Function Only Depending on Angle Between Points

Question: Consider a function $f:S^2 \to \mathbb{R}$ , with $S^2$ the unit $2$-sphere in $\mathbb{R}^3$. Let's say that $f$ depends only on the polar angle $\theta$ from the north pole (e.g., $f(r,\theta,\phi) = e^{\cos(\theta)} $ which is also just $e^z$ in Cartesian cordinates). Now, we define the Laplacian on the sphere by
$$\Delta f = \frac{1}{\sin(\theta)} \frac{\partial}{\partial \theta} \sin(\theta) \frac{\partial f}{\partial \theta} + \frac{1}{\sin^2(\theta)} \frac{\partial^2 f}{\partial \phi^2}$$
where $\phi$ is the azimuthal angle in the $xy$ plane. Now, another way of looking at $f$ is saying that its value at $p \in S^2$ depends on the norm distance between the point $p_0 = (0,0,1)$ and $p$, since $||p-p_0|| = \sqrt{||p||^2 -2(p,p_0) + ||p_0||^2} = \sqrt{2-2 \cos(\theta)}$, where we just used the statement $a \cdot b = |a| |b| \cos(\theta)$. Hence, we can view $f$ as a function depending on the distance from $p$ to $p_0$. From here on, consider a chosen function $f$  whose form we know, and whose value at a point $p$  depends only on the cosine of the angle between a fixed chosen point $p_0$ (the north pole) and $p$.
With this, we can then compute $\Delta f$, and we note that all of the $\phi$ terms are automatically zero, so $\Delta f$ can be computed completely in terms of the $\theta$ derivatives.
Recall that we saw that $f$ depends on ly on $\theta$, or equivalently, $f$ depends only on $||p-p_0||$, that is $f(p) = f(||p-p_0||)$. This gives rise to many different "rotated" versions of $f$ if I move $p_0$ from the north pole to somewhere else. I want to investigate the following question: How can we take the Laplacian of $f$ if we vary $p_0$? Does it have a simple form and how does it related to the Laplacian of $f(||p-p_0||)$ when $p_0$ is the north pole?
So, let's consider this "rotated" version of $f$. That is, consider a point $p_0$ besides $(0,0,1)$ such as maybe $(1,0,0)$. Now, instead of depending on the angle between $p$ and the north pole, it depends on the angle $\theta'$ between $p$ and this shifted point $p_0$. In some sense, we are essentially rotating the sphere and assigning this new $p_0$ to be the north pole.
Here is what I want to do: I want to compuate $\Delta f$ for this new shifted $f$ where $f$ depends on this new $\theta'$. I have been told that I can just do the following: since $f(\theta')$ depends only on the polar distance, the Laplacian of $f$ is the same as taking the orignal $f$ with $p_0$ being the north pole, taking the Laplacian of that function (which only depends on $\theta$), which yields some function $g(\theta) = \Delta f$. Now, if I use a different point $p_0$ than the north pole, the claim is that $\Delta f(||p-p_0||) = g(\theta')$. That is, its the same function, just with a swap of the variable from $\theta$ to $\theta'$. Therefore, to compute $\Delta f(||p-p_0||)$ for any different $p_0$, it suffices to compute the simple case of $\Delta f(\theta)$ by
$$ g(\theta) = \Delta f(\theta) = \frac{1}{\sin(\theta)} \frac{\partial }{\partial \theta} \sin(\theta) \frac{\partial f}{\partial \theta}$$
and then swapping that $\theta$ with the different $\theta'$ depending on the new $p_0$.
That seems reasonable to me, but I'm just worried that it looks like on a rotated version of the function, the azimuthal derivatives will impact it. Certainly if I view things in terms of $\theta$ and $\phi$, there will be $\phi$ components. The assertion I suppose is that in this rotated setting, $\Delta f(\theta')$ still depends only on $\theta'$ and has the same form as $\Delta f(\theta)$ as if it were centered at the north pole. Is this true?
I apologize if this is confusing or trivial!
Answer: I've ben informed that on the sphere, the Laplacian is rotation invariant. Therefore, the claim that was given to me in the original question appears to be true. I also found the following .pdf that explains in more detail : http://www.math.umn.edu/~garrett/m/mfms/notes/11_spheres.pdf   See p.5 section 2 on "The Existence of the Spherical Laplacian" in these lecture notes on   Harmonic Analysis on the Sphere.


Sum of rational numbers

Question: The sum of a finite number of rational numbers is of course a rational number, but the sum of an infinite number of rational numbers might be an irrational number.  Can someone give me some intuition why this sum might be irrational?  I just "don't feel it."
Comment: As Hans observes below, any real number is an infinite sum of rationals, so if you have any intuition for why there are irrational real numbers, there you go.  I feel like adding: it is OK *not to have* intuition about infinite sums.  (Maybe even that it is counterproductive to have expectations about what infinite sums ought to do, or ought not to do, until you have a great deal of experience with them.)  A lot of stuff about infinite sums cannot be "felt" at first; only learned.  If you "don't feel it", that might even be a sign that you understand it better than someone who does :)
Comment: Now I most certainly fell it. To be honest I read that sum of rational numbers might be irrational yesterday (I havent thought about it earlier). The example that I found was that $\sum\limits_{i=1}^{\infty}\frac{1}{F_{i}}$, where F means fibonacci number, is irrational. From this example it wasn't clear for me why is it true, but the 'decimal' example that Trevor wrote is convincing.
Comment: But still some things about rational and irrational numbers are not so obvious. For example: There is a rational number between every two irrational numbers, so how is it possible that there is 'so much more' irrational numbers than rational.
Comment: Infact, an irrational number or a real number is defined as a limit of a sequence of rational numbers.
Answer: Look at this.
So: $3.14159 \dots = 3 + \frac{1}{10} + \frac{4}{10^2} +\frac{1}{10^3} + \frac{5}{10^4}+ \frac{9}{10^5} + \dots$
The above expression is $\pi$.
Answer: The problem is psychological: you think of the "infinite sum" of rational numbers as an obvious, intuitive concept, but it's not.  It has a precise mathematical meaning, and that precise mathematical meaning only works if you allow the sums to be real numbers (which themselves have a precise mathematical meaning).  The definitions which allow these "infinite sums" to make sense are much less trivial than someone who's never worked through them would think.
Answer: Dear I am thinking about it because I am also a student of Mathematics.
We know that $e$ is an irrational number.
The value of $e$ is
$$= 1 + \frac{1}{1} + \frac{1}{2!} + \frac{1}{3!} + \ldots$$
$$= 1 + \frac{1}{1} + \frac{1}{2} + \frac{1}{6} + \frac{1}{24} + \ldots$$
$$= 2.7182 \ldots$$ (Irrational Number)
So sum of infinite rational numbers may be irrational.
Comment: I think there's a formatting error there. Note that usually $\frac{1}{x!}\ne\frac{1}{x}!$
Answer: Any irrational number $x$ is the limit of a sequence of rational numbers $a_n$ (take for example the decimal expansion truncated after $n$ decimals, for $n=1,2,3,\dots$). Then
$$x = a_1 + (a_2-a_1) + (a_3-a_2) + \dots$$
is a sum of rational numbers, but it is irrational by construction.
Answer: An irrational number is a "gap" inside the rationals. The decimal expansion of any irrational number is an infinite sum converging to it. It gives better and better approximations to the irrational number, which is unfortunately just not "there".
There are many more examples of such limiting constructions. Sometimes you get new objects and sometimes you don't. An example is the delta function which can be approximated using bona fide functions. So there are functions arbitrarily "close" (in some sense) to the delta function, but the delta function itself is just "too good" to be an actual function.
As an aside, if these approximations are good enough, you can prove that the number is transcendental (Legendre's or Roth's theorem).

Sum of rational numbers


What does wp_update_post() do that the $wpdb class does not?

Question: I recently had to make direct changes to my wp_posts table from a WordPress plugin. I first tried to do this with wp_update_post(), thinking that would would do it. Apparently, wp_update_post() is only able to edit a predefined set of table fields (presumably the WP default ones). Then I happened upon $wpdb class. I thought I read that wp_update_post() uses $wpdb which is interesting, but then begs the question, why have wp_update_post() when you can just use the $wpdb class directly? What does wp_update_post() do that the $wpdb does not? What need is it filling? Or is it more of an administration concern, like resources or security? If that's the case, what are the downsides of using $wpdb directly?
Answer:
wp_update_post() calls some hooks that $wpdb doesn't on it's own. You'll have to do it on your own to make it compatible with other plugins.
wp_update_post() calls some functions related to database entry sanitation, thumbnails, attachments, time (format, zone etc.), comment, taxonomy, meta, cache etc. So if you use $wpdb, make sure you handle all of them as appropriate.
WordPress will update wp_update_post() to always keep it compatible with the current state of Database, core CODE, plugin support etc. Even if you do everything right, future updates will be difficult for you with $wpdb.

So if something can be done with wp_update_post(), then always use it, only use $wpdb if your desired action related to updating post can't be done with it.
Answer: Why have WP_Query() when you can just use WPDB?
The idea is that these functions make it easier and quicker to pull data based on keywords instead of writing out SQL queries. The functions themselves will generate the necessary SQL to pull the desired data which in turn makes the development faster.
The referenced question regarding wp_update_post() and predefined fields talks about 2 fields that are not part of a default WordPress installation which are group_access and tag_list. The wp_update_post() function will hit all the built-in fields just fine.
Downsides of $wpdb are that you do need to know SQL and you need to be conscious of normal data sanitization and when to use prepare() and what functions already prepare your statement which are hardly downsides at all. The $wpdb Class is by nature more powerful than any of the default WordPress functions because you have access to all the data, custom or not, assuming you know the proper SQL to get, modify, or remove it.
TL;DR $wpdb is more powerful but less friendly and forgiving.
Comment: @fredsbend All these functions create SQL. What it does is makes the development process faster and prevents repetition by creating reusable code blocks in the call of a function. Otherwise you would need to create your own SQL every time you wanted to insert a post or create an archive page. It also makes code more readable. It is meant to make working with WordPress more streamlined. I may know SQL but I wouldn't want to develop an entire WordPress website with my own custom SQL.
Comment: Thank you. As you can tell, I'm a long time WP user, but only been trying to work in the code for a very short time. I'm still learning the structures that do all the work behind the scenes. So, would you say that `wp_update_post()` exists to meet a user skill level that does not include SQL queries? It is meant to make this aspect of WP more user friendly?
Comment: Yes, I just verified that using $wpdb will throw an error if you try to update a field with a pretty quote `'` or a long/em dash `–`. I'll have to integrate some data sanitation if I want a complete and user friendly plugin.
Answer: Most API functions have either/both actions and filters attached to them. Other plugins or themes might have code attached to these actions that won't trigger when you add/update tables directly.
For example- a cache plugin serves pages from cache, and only refreshes the cache when a post is updated. You update the post data directly, and the cache continues to serve the old version because nothing triggered the action to refresh.
Comment: That was just a specific example. I'm saying there are hundreds of plugins out there that are doing *something* when posts are added or updated. You can't possibly know what all of those things are, and by bypassing the API, you will break all of that functionality.
Comment: Are you saying that caveat may be that some plugins use a cache, not the table directly, so will not be using the updated table data if you use $wpdb until the cache is refreshed?