What would happen if my PC cast Dream on her unborn baby?

Question: This is purely flavor for the game and holds no real impact on the overall story, but I thought it could be kind of fun. My character is currently only a few weeks pregnant so I don't think it would work yet, but when she gets further along, say 30 weeks or so, could it work? What would happen if my character cast dream on her unborn baby?
Comment: Just because a question is unanswerable does not mean it is inappropriate for the stack.
Comment: For the close voters, I don't see this as opinion based. There is certainly a rules answer we can provide. The real world controversy surrounding this topic need not interfere with rules answers.
Comment: Welcome to our site! Please take our [tour] to see how things work here. I suspect most of the downvotes have to do with the controversial nature of the topic; they aren't (or shouldn't be) a slight against you or your curiosity. I hope you stick around, and happy gaming!
Comment: the homebrew tag does not apply here
Answer: There are three questions at play and they all must be answered by your DM.
A creature?

Choose a creature known to you as the target of this spell. The target must be on the same plane of existence as you. Creatures that don't sleep... can't be contacted by this spell.

The first element is at what point a fetus becomes a creature. This is most certainly not explained in the rules. The youngest creatures we have in official content are as early as birth as illustrated by dragon wyrmlings.
That being said, there is no example of a pre-birth entity being labelled a creature.
You will have to ask your DM since there are no rules regarding this.
Can they sleep?

Choose a creature known to you as the target of this spell. The target must be on the same plane of existence as you. Creatures that don't sleep... can't be contacted by this spell.

From what I've gathered from some cursory research, it is not clear whether or when a fetus begins to "sleep" rather than simply "resting". In fact, it seems like the relevant literature often refers to "activity-rest cycles" for fetuses rather "sleep cycles".
A fetus, therefore, may not be able to sleep meaning it could not be targeted by dream.
Since this doesn't seem settled in our world, let alone incorporating the discrepancies of a D&D world and fantasy races, you will have to ask your DM if a fetus can sleep.
Can they dream?

If the target is asleep, the messenger appears in the target's dreams and can converse with the target as long as it remains asleep, through the duration of the spell.

Along the same vein as sleep, it is unclear whether fetuses dream. Again, this doesn't seem settled, and I've only skimmed a handful of research articles, but the consensus seems to lean towards fetuses not dreaming.
Even so, the D&D world and fantasy races clause still applies. Ask your DM if fetuses dream in their world.

If the answer to all of these questions is yes, then a fetus could be targeted by dream. However, there propensity for communication would still be limited by their capacity.
Comment: Some thoughts: while there is [no in-game definition](https://rpg.stackexchange.com/q/47254/23547) of what is and is not a creature, there is likely a diagetic answer and it would be known by any PC's familiar with magic.  If unborn children _are_ creatures, then expectant mothers need to be very careful about interacting with spells that have creature limits, such as _rope trick_, _tiny hut_, and _teleport circle_.
Comment: @TieflingDragon84 Let's try to keep the discussion to the rules. D&D treats humans differently from our world. For example, [a corpse may or may not be a creature](https://rpg.stackexchange.com/questions/55951/is-a-dead-creatures-body-considered-an-object), but we still treat dead people with dignity despite this. Let's not extend discussions on the rules to the ethical framework of the real world.
Comment: Finally, even if the baby is a creature, can sleep, and can dream, there is another limit to the _Dream_ spell - when it says "the messenger...can converse with the target" that is almost certainly presuming that the two share a language, while the unborn child may as yet have no language proficiencies.
Comment: Also, [apparently](https://rpg.stackexchange.com/questions/48246/can-elves-sleep-dream#comment453522_48276) MToF says "From birth, elves don't sleep but instead enter a trance when they need to rest".  This _could_ mean that before birth, elves _do_ sleep, which might imply that other creatures also sleep before birth.  Of course, it could also mean, 'After birth, elves don't sleep, and before birth, we don't know what they do.'
Comment: After finally, DM's wishing to have a pseudo-medieval feel to their world might wish to learn more about [the quickening](https://slate.com/human-interest/2015/05/the-quickening-the-momentous-pregnancy-event-that-became-a-relic.html#:~:text=The%20term%20quickening%20comes%20from,fetuses%20after%20about%2080%20days.).  One might rule that babies are not creatures up until the quickening, but after that they are.


In the movie Rollerball (1975), why didn't Jonathan quit?

Question: In the original movie Rollerball (1975) Jonathan had many reasons to quit the game. He had reached every success in the sport, was getting old, the upper crust wanted him to quit and threatend him if he did not, the game was getting more violent every day with many injuries, his best friend was seriously injured and comatose... Why did he go on? Was it some kind of resistance against the upper crust, addiction to the admiration of the fans or misguided sportmanship? Is there a meaningful explanation for why he just kept going on?
Comment: Because quiting is for losers
Comment: I didn't understand why they didn't fire him... that's typically how you stop someone from working... His superiors kept yelling for him to retire... it might've briefly explained somewhere in the movie, maybe I missed it from dosing off... I gound it to be less yhanexciting.
Answer: Rollerball was a team sport.  It emphasized team over individuals.  Jonathan's fame made him an individual, rising above the team.
The central concept behind the movie was to be an individual, not a sheep.  That is, to make a name for yourself and rise above the herd.  It's sort of a Capitalist view, but that was what the author was trying to convey.
From outside the story, Jonathan couldn't quit or that would have defeated the storyline.  From inside the story, Jonathan wanted to show the corporations that their ideals were wrong.
Here's an excerpt from the Wiki about a scene late in the movie that really nails the entire movie down to a few sentences:

The corporations hold an emergency meeting to discuss Jonathan's obstinate refusal to retire, and decide that the championship game against the New York team will be played without penalties, player substitutions, or a time-limit, in the hope that Jonathan, if he decides to participate, will be killed during the course of the game. The executives's meeting reveals why they are demanding Jonathan's retirement: Rollerball was conceived not merely to satisfy man's bloodlust, but to demonstrate the futility of individualism. Jonathan's singular talent and longevity in the sport defeats the intended purpose of Rollerball.
Comment: Well, I also remember that there was something about his first wife.  The corporations basically "took" her from him and gave her to an Executive or something.  I think he basically wanted to give them a "middle finger" and make them look bad.  He wanted to ruin them.  And by continuing to play, he was doing just that.
Comment: Ii understand the motivation of the coporations to make him quit and the necessarity to keep him in the storyline, but "Jonathan wanted to show the corporations that their ideals were wrong" - Is this somehow explicitly said or shown in the movie? It makes sense, but I watched the movie the last time some years ago and as i remember he was going on all the time but i wondered whats the reason for him  and cant remember a scene where he stated his motivations. Anyway, a good answer, i will accept it if no additional informations will be posted the next days.
Answer: The ultimate point of Rollerball is that people had given up control of everything in their lives to Corporations that ran the world. The Corporations kept the people drugged to control them and used Rollerball to entertain them. It's a warning about the rise of a Corpratocrisy that gave rewards for compliance. Like the Roman bread and circuses.
Answer: I love this movie, a lot to process here-
1975 Rollerball is a little vague in my opinion, so could be interpreted in many ways. I find that the point of this film revolves around the cyclical nature of the human struggle. Jonathan doesn't quit because he begins to question the nature of his existence and the gravity that the sport Rollerball has in his world. He is looking for answers to why they want him to quit, what he would do if he quit, and how everyone ended up playing Rollerball anyway? When he goes and looks for information on how the world became this way, he finds that historical knowledge is being censored and all information is controlled by Zero, the "World's Brain" made of "fluid mechanics-fluidics" as one technician explains. A "memory pool" that all human knowledge and recorded history has been reduced to. Jonathan asks Zero for "Information about corporate decisions, how they are made and who makes them?". Zero is reluctant, but because of Jonathan's fame, the technician convinces Zero, telling it to "Make it simple, answer him".
Zero's response here is a key element to the overall theme of Rollerball as a film: "Corporate decisions are made by corporate executives. Corporate executives make Corporate decisions. Knowledge converts to Power. Energy equals Genius. Power is Knowledge. Genius is Energy. Corporate Entities Control All Fundamental Elements Of Economic Life. Technology, Capital, Labor, and Markets." -and Zero repeats, caught in a loop.
So either the Corporations created Zero and use it to brainwash and control the masses, or it is a rogue entity that could be the result of AI gone wrong, or may even have extraterrestrial origins. Either way, it is clear to Jonathan by this point that the world he knows is all a facade, an elaborate creation by the Corporations to prolong their own existence. The "game" of Rollerball was designed to demonstrate the futility of individual effort, and as Jonathan's manager remarks, "If a Champion defeats the meaning for which the Game was designed, then he must lose".
In fact, Jonathan does the opposite, he wins. He is the last man standing in the most brutal version of the sport that he used to love at the end of the movie, but hesitates from delivering the last killing stroke with the Rollerball itself, instead of scoring to simply "end the game".
TLDR
I think that Jonathan doesn't quit because sees his position as unique in that he has the power to unite the entire world into a revolution against the tyranny of informational control that Zero/The Corporations have over everything. By beating the Corporations at their own game he establishes control and breaks the cycle of their influence. Now the people will rise up and chant Jonathan, as he leads them to a new era of Freedom.
Answer: Jonathan cared about three things in life: his wife, his team-mates, and playing Rollerball. The corporations took his wife from him several years ago, now they want to take Rollerball from him. To pressure him, they change the rules of Rollerball, resulting in the death of his best friend and other team-mates. Jonathan is completely pissed off and wants revenge. He wants to spit in the the corporation's eye, and he has nothing left to loose.
Note that Jonathan doesn't appear to care very much about material rewards or the adulation of the fans. However, he does recognize that the adulation of the fans gives him leverage against the corporation. The corporation needs the population to stay obsessed with Rollerball, but not to think deeply about the power behind it. If they simply fire Jonathan they risk exposing the game as a system of social control, managed by the corporations, not an honest game. Of course that's what it actually is, but if the population has that fact shoved too obviously in their faces, it might stop working.


Modal view does not redisplay?

Question: I'm developing an app that needs to pick up a JPEG from a web site on start-up.
The splash screen displays, then the app attempts to get a web address from a file. If the file is missing I open a modal view (as UIModalPresentationFormSheet) that has a text view for the user to type in an address - the address is then saved to a file.
The user taps the OK button, and an attempt is made to get the JPEG. If the address was wrong, or the JPEG is not on the web server, the modal dialog must re-open so the user can change the web address to the correct one.
The splash screen view controller contains these methods:
<code>- (void)openAddressDialog
{
    serverView *viewController = [[serverView alloc]init];
    [viewController setServerAddress:[businessLogic serverAddress]];
    [viewController setDelegate:self];
    [viewController setModalPresentationStyle:UIModalPresentationFormSheet];
    [self presentModalViewController:viewController animated:YES];
}
</code>
Interestingly, when I called the openAddressDialog method from the viewDidLoad method the modal view did not appear. I had to move it to the viewDidAppear method. So presumably the view has to be in a particular state before it will entertain modal views.
<code>- (void)closeDialog:(UIViewController *)dialogController:(Boolean)actionRequired
{
    // If action required, get the server address from the dialog
    if (actionRequired)
    {
        serverView *viewController = (serverView *)dialogController;
        NSString *address = [[viewController serverAddress]copy];
        [businessLogic setServerAddress:address];
        [self dismissModalViewControllerAnimated:YES];

        if (![logoImage image])
        {
            [logoImage setImage:[businessLogic eventLogo]];

            if (![logoImage image])
            {
                [self openAddressDialog];
            }
        }

    }
    else
    {
        exit(0);
    }
}
</code>
This is the delegate method called back from the modal view when the user has touched OK or Cancel. The actionRequired param indicates that OK was tapped. And if so, the new server address is picked up from the modal view, and the modal view is dismissed. An attempt is made to get the JPEG from the new address (in a business rules class), and if still no file can be found, the first method shown above (openAddressDialog) is called again so the user can correct the address again.
The modal view appears fine the first time, but will not reappear if the user entered the wrong address. Does this have something to do with me attempting to represent the modal view so quickly after dismissing it?
I'm quite new to iPad development, so would appreciate any advice.
One other thing, which demonstrates my inexperience of C++ perhaps, is ... if I declare a private method in the m file, let's call it
<code>- (void) methodB
</code>
and that method calls another private method, let's call it
<code>- (void) methodA
</code>
methodA must be defined earlier in the m file than methodB. If I also want methodA to call methodB I reach an impasse. The only way around that I am aware of is to declare methodB in the h file - which makes it public. How do I code this scenario so the outside world can see neither of the methods?
Answer: if use to create nib to serverView then do like this
<code>  serverView *viewController = [[serverView alloc]initWithNibName:@"serverView" bundle:nil];
</code>
Comment: Yes, I use init, since the NIB file has the same name as its controller, which works fine elsewhere in my application, and the Apple documentation states that's fine.

Modal view does not redisplay?


Using GLEW to use OpenGL extensions under Windows

Question: I've been using OpenGL extensions on Windows the painful way. Is GLEW the easier way to go? How do I get started with it?
Answer: Yes, the OpenGL Extension Wrangler Library (GLEW) is a painless way to use OpenGL extensions on Windows. Here's how to get started on it:
Identify the OpenGL extension and the extension APIs you wish to use. OpenGL extensions are listed in the OpenGL Extension Registry.
Check if your graphic card supports the extensions you wish to use. Download and install the latest drivers and SDKs for your graphics card.
Recent versions of NVIDIA OpenGL SDK ship with GLEW. If you're using this, then you don't need to do some of the following steps.
Download GLEW and unzip it.
Add the GLEW bin path to your Windows PATH environment variable. Alternatively, you can also place the glew32.dll in a directory where Windows picks up its DLLs.
Add the GLEW include path to your compiler's include directory list.
Add the GLEW lib path to your compiler's library directory list.
Instruct your compiler to use glew32.lib during linking. If you're using Visual C++ compilers then one way to do this is by adding the following line to your code:
#pragma comment(lib, "glew32.lib")

Add a #include <GL/glew.h> line to your code. Ensure that this is placed above the includes of other GL header files. (You may actually not need the GL header files includes if you include glew.h.)
Initialize GLEW using glewInit() after you've initialized GLUT or GL. If it fails, then something is wrong with your setup.
if (GLEW_OK != glewInit())
{
    // GLEW failed!
    exit(1);
}

Check if the extension(s) you wish to use are now available through GLEW. You do this by checking a boolean variable named GLEW_your_extension_name which is exposed by GLEW.

Example:

if (!GLEW_EXT_framebuffer_object)
{
    exit(1);
}

That's it! You can now use the OpenGL extension calls in your code just as if they existed naturally for Windows.
Comment: Hello. Does this work with MinGW? I have been trying for 2 days now, but all I get are errors like: `undefined reference to '_imp__glewInit@0'` and `undefined reference to '_imp____glewCreateShader'`
Comment: Dan the Man: This solution was with Visual C++. I have no idea if this works with MingGW.
Comment: AFAIK, `#pragma comment(lib, "glew32.lib")` only works on Visual C++. For MinGW you should add the libraries to the compiler's command line (I think it's `-L`).
Comment: @DantheMan try changing order of libraries, especially in C::B where you have 'Project' and 'Target' settings and you decide which gets linked first. I don't understand it fully but I just fixed my problem this way:).
Comment: Which GLEW should I get, the source or the binaries? I'm lost ... and I've noticed that one of them has an empty lib folder.
Comment: Thanks. Adding `glewExperimental = GL_TRUE;` might help with opengl newer calls.
Answer: Personally I wouldn't use an exit command.
I would throw an exception so you can clear any other initialisation up at the end of the function.
ie:
try
{
    // init opengl/directx
    // init directaudio
    // init directinput

    if (GLEW_OK != glewInit())
    {
        throw std::exception("glewInit failed");
    }
}
catch ( const std::exception& ex )
{
    // message to screen using ex.what()
    // clear up
}

And I agree with OJ - if you want to write tutorials for others, then this is really the wrong place for it. There are already a load of good places for opengl tutorials. Try this one for instance.
Comment: this has basically nothing to do with the question
Comment: @Nikita when this question was asked *15* years ago there wasn't a comment system so people would respond inline.  This was probably such a response to Ashwin.
Answer: I lost some time, but finally I managed to get GLEW working.
I'm using Windows7 (x64), Eclipse CDT and MinGW, and the way is that:
Download MSYS (for MinGW) and rember to have MinGW installed correctly (PATH enviroinment variable set correctly):
http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.10/MSYS-1.0.10.exe/download?use_mirror=freefr&download=
Once MSYS installed, go to:
http://glew.sourceforge.net/
and download the TGZ package, which is intended to use with UNIX systems
Then open the package (you can use 7zip as well) and find the "Makefile".
Open it and with a text editor (Notepad should work fine) find the row which contains "GLEW_DEST" and replace it with something like "GLEW_DEST ?= C:/MinGW"
Now you are ready to go, open MSYS (C:\MinGW\msys\1.0\msys.bat in my case) and in the shell opened, go to the folder where the "Makefile" is.
Then write a simple: "make install" and the work is done (at least for me it worked)
PS: I also copy-pasted glew-1.10.0-win32\glew-1.10.0\bin\Release\Win32 file's into my System32 folder, and in Eclipse CDT I added the library "glew32" in the linker option and added a #include <GL/glew.h> before #include <GL/glut.h>


How do I recover specific parts of builds in a Minecraft world?

Question: I have this creative Minecraft world where I build alot of stuff on. Specifically on my base design. And at one point suddenly what we worked on the last few days on for the base, just disappeard. The rest was still there. Basically the world traveled back in time for a couple of days. Please how do I fix this? How do I recover my Minecraft world? I have tried to restore saves in the save file, and it didn't work.
Comment: Is this a Minecraft realm? Because it happens sometimes. And unless you created backup of your world there's nothing you can do, unfortunately...
Answer: You can't recover without a recovery file (obviously)
if you want to have recovery for only parts of a world, you can use schematic files and a schematic loader (Litematica) they are useful if you want to replicate something you built in your singleplayer world or recover parts of a world.
You can go watch a tutorial on YouTube that might help you out on this.
https://www.youtube.com/embed/KFzyNtyN8qI


Can Solidity generate an image from a string?

Question: I've been researching on this but didn't get answers. Is there some way to put together a solidity contract that takes a string and generates an image file for the string based on some logic defined in the contract? I am aware that the image could be stored on the blockchain beforehand and can be retrieved later, but this is not what I am looking for. I understand that solidity doesn't have any image processing functions but still wanted to get some confirmation on whether there is some way to achieve it?
Answer: It is doable using solidity. There are byte arrays and the language is Turing complete so you can create elaborate functions. Although it is not the ideal language for data manipulation.
The problem is executing it under the EVM since running a non-trivial program might be expensive.


What do the jeers towards Elisha of "Go on up" mean?

Question: When Elisha is jeered by youths in 2 Kings 2:23-25 he is told (as many translations have it) to "Go up" or "Go on up". The new NIV (2011) renders this as "Get out of here." Is this a fair translation of the idiom? What were the young boys telling Elisha to do? To go on up to Bethel? To go on up to heaven like Elijah? Is it just an idiom for "Get out of here?"
Answer: The full text of the verse is:

וַיַּ֥עַל מִשָּׁ֖ם בֵּֽית־אֵ֑ל וְה֣וּא ׀ עֹלֶ֣ה בַדֶּ֗רֶךְ וּנְעָרִ֤ים קְטַנִּים֙ יָצְא֣וּ מִן־הָעִ֔יר וַיִּתְקַלְּסוּ־בוֹ֙ וַיֹּ֣אמְרוּ ל֔וֹ עֲלֵ֥ה קֵרֵ֖חַ עֲלֵ֥ה קֵרֵֽחַ׃ (Melakhim II 2:23, Westminster Leningrad Codex)
And he went up from thence unto Beth-el; and as he was going up by the way, there came forth little children out of the city, and mocked him, and said unto him: 'Go up, thou baldhead; go up, thou baldhead.' (Melakhim II 2:23, JPS 1917 Translation)

As can be seen, Elisha was literally going up, as the path sloped upwards, so the children did not mean anything by saying "go up"; the mocking was just of the fact Elisha was bald.
Answer: God's prophet Elisha was bald. After he had succeeded to the prophetic office of Elijah, he was proceeding uphill from Jericho toward Bethel when he was mocked by a mob of children who cried: "Go up, you baldhead! Go up, you baldhead!" The primary reason for their jeers seems to have been not that Elisha was bald but that they saw a bald man wearing Elijah's familiar official garment. They did not want any successor of Elijah around. He should either keep going his way up to Bethel or ascend in a windstorm to the heavens as the former wearer of that official garment had done. (2Ki 2:11) To answer this challenge of his being Elijah's successor and to teach these young people and their parents proper respect for God's prophet, Elisha called down evil upon the jeering mob in the name of the God of Elijah. It was a test of his prophetship. God manifested his approval of Elisha by causing two she-bears to come out of the nearby woods and to tear to pieces 42 of them.—2Ki 2:23, 24.
Comment: Welcome to Stack Exchange.  We are glad you are here. If you haven't done so already, check out the [site tour](http://hermeneutics.stackexchange.com/tour) to learn what this site is all about.  *This is not a comment on the quality of your answer, but rather a simple welcome message.*
Answer: Korah was one who challenged the authority of Moses. His name means 'bald one'.
The children were apparently challenging the authority of Elisha who had just picked up the cloak of Elijah, and would be granted a double measure of Elijah's spirit.
In other places baldness, or hair, concerns authority. The woman's hair represents that she is covered. The baldness of the leper represents that he is unclean, yet at times he is clean, as a symbol of Christ bearing our sin yet remaining Holy.   Long hair on a man, by an interpretation of the flesh, is a shame, but as an interpretation by God for the Nazarites is his righteousness.
There is another subtle hint in the  notarikon of 'bear' ''dob'': 'the command ד revealed to man ב'.  And a word for speak contains the gate of bear: dobar דבר.
The bears gave a double testimony of 21 each. The full authority (seven) of God (three) in heaven and earth (two).
The idea that they challenged his authority is matched with word-play in the response.
What then of the challenge "Go up!"
It is recorded that Elisha was going up from there to Beth-el, the house of God. Perhaps the children saw the parallel to Elijah being taken to heaven.  Perhaps they just ignorantly mocked him and did not realize the prophetic riddle that God was writing.
It is also recorded that he was going up in the way, which is also commonly used for a symbol of a life. It would be a cruel jest to reverse his going up in life with the death of Elijah.
The word עלה for 'Go up' has the gate 'yoke' על. This is a subtle acknowledgement that Elisha had taken the burden of Elijah.  The taunt is perhaps something like: You have the cloak and burden of Elijah, but you have no authority.
Children love word-play.


Need replacement chainring for Shimano Ultegra FC-6503 42t chainring

Question: The Shimano Ultegra FC-6503 42t chainring is "obsolete" but there must be some 42t 130 bcd chainring that would work. It is the middle of a triple. The mounting bolts pass thru the 52t to a spider hole, then into the 42t ring. the 42t ring is flat, except for some ramps. It would seem a similar 42t ring would work, even if it does not have ramps. Nobody know what would replace it. A Shimano Dura-Ace FC-7800 42 Tooth 10-Speed A-Type Chainring might work. Does anybody know? Thanks in advance!
Comment: https://mikesbikes.com/products/6500-9spd-130mm-42t?variant=31254943629381
Comment: @AndrewHenle that's a double inner
Comment: @NathanKnutson Well, it's either that or a non-Shimano replacement.  Y-16T9A420 seems non-existent.  At least it *might* work.  If the other chainrings are getting worn, I'd probably try to find a new-old-stock 105 5703 10-speed crankset as a replacement. In my experience the 10-speed crankset works fine with a 9-speed chain. Those things can probalby be found for $100 or so, which isn't bad if you're looking at replacing two or three chainrings at $30-$40 each.
Answer: Ultegra 6500 components are a 9-speed group made in the early 2000s and maybe late 1990s. The bolt circle diameter (BCD) on all performance-oriented Shimano road cranks of the time was 130mm. Thus, any chainring with that BCD will fit.
Dura Ace 7800 was introduced in 2004, and the BCD was still 130mm. Thus, that chainring will fit. I don't know if the ramps are optimally positioned for shifting onto your big ring, but I'd assume they couldn't possibly hurt. It was only with Dura Ace 9000, released in 2012, that Shimano went to 4-arm cranks with a 110mm BCD.
There are numerous third parties that make 5-arm, 130mm BCD chainrings. Full Speed Ahead (FSA), Sugino, and Vuelta are some brands I remember that make this type of chainring and that are inexpensive (and there are probably more; this is just my memory). If you're in the US, at least some of these brands should be distributed by Quality Bicycle Products, meaning that any shop with a QBP account (i.e. almost any shop) can get their hands on that brand. I suspect FSA is, but I don't work in the industry and I can't confirm.
A chainring without the appropriate ramps will not shift as well as a stock Shimano chainring. However, you presumably need a new chainring, so you may have to make this small sacrifice if the shop Andrew Henle linked to in comments can't supply you.
Answer: I did some looking around and was surprised by the lack of options for a proper ramped and pinned 42t 130 middle. But, there's still TA, the Alize model in this case. Don't get a non-rampy chainring to use with STI. It's too much of a compromise. FSA has one too.
Comment: I found Peter White Cycles who has a large selection of TA Alize 130mm Chainrings for Road Double and Triple Cranksets
(8, 9 & 10 speed compatible, single, double and triple) --the importer for TA-- so that is where I ordered replacements; should be here in a week or so.


Is $dW = -pdV$ always valid?

Question: Suppose the case that a fluid is kept in a closed container which is now shaken. The volume won't change but work will be done.
Then how can the formula $dW = -pdV$ be valid for every isochoric process? Or is the shaking of a fluid in a closed container not a thermodynamic process? I am confused.
Comment: Work in context of closed systems is any energy exchange between the system and surrounding that is not considered as the exchange of heat, as dU = W + Q ( both done on the system ). It may be both "volume" or "non volume" work. E.g.  battery charging or mentioned stirring are two kinds of non volume work.
Comment: @Poutnik. You should add this as an Answer.  In my judgment, it is much better than the other answers that have been given.
Answer: The shaking of the fluid is not $pdV$ work. It's a different kind of work called "stirrer work" or "shaft work". It's the kind of work that is done when you stir your coffee with a spoon.
James Joule's famous experiment to show the equivalence between mechanical work and heat involved stirrer work, in which he used a brass paddle wheel stirring water in a copper vessel. To learn more, see this: https://www.aps.org/publications/apsnews/201506/physicshistory.cfm
Hope this helps.
Answer: Shaking the container is indeed a way of doing work on the system.
All physics adopts idealizations of one kind of another. In thermodynamics we first identify the system we are interested in, and then we make an idealized model of it. A commonly used model in entry-level thermodynamics is when the internal energy of the system can only be increased in only two ways: by supplying heat, or by doing one kind of work. Such a system has only two terms in the fundamental equation, such as
$$
dU = T dS - p dV .
$$
When there are just two terms like this, we say we have a "simple system". When the work term is $-pdV$ we say we have a "simple mechanical system".
The shaken container is a mechanical system but not a simple mechanical system. The model in terms of pressure and volume is simply not adequate to describe the kind of work one can do by shaking. So we make the model more realistic. In the case of shaking there is no very easy way to do this because the turbulent motion is to do with abrupt changes in the forces on the container, and the inertia of the fluid. However one can easily model smoother processes such as stirring, by introducing an angle $\phi$ of a paddle wheel and a torque $\tau$, and writing
$$
dU = T dS - p dV + \tau d\phi.
$$
In the case of a fluid the thermal equilibrium states will all have $\tau = 0$ but for a solid they needn't.
The main idea of this answer is not that you worry about this example of stirring, but rather get a clearer picture of the idealizations which are involved in choosing to model a system as a simple mechanical system. In fact what we often do, in the case of stirring a fluid, is not to bother to write the $\tau d\phi$ term explicitly, but simply note that once some added internal energy has been provided, by whatever means, we no longer care about how it was provided. One can then model the fluid using just $p$ and $V$, and accept that the model cannot be applied to the system during the stirring process itself, but it can be applied to the initial and final states (as long as the amount of fluid has not changed). Another standard example of this idea is the free expansion, when a gas rushes into a previously evacuated space. In that process the gas volume changes but no external work is done.
Comment: @Nicolas The terminology "simple system" is used in thermodynamics when there are two terms in the fundamental equation expressed in system state variables. This is irrespective of whether the system is mechanical or magnetic or whatever.
Comment: I wouldn't say PdV relates to a **simple** system, just to the **pressure** work on a **fluid** system. That's no simpler than, for example, a spring or a magnetic material ; it's just used as a common example in textbooks.
Comment: Even for complex thermodynamical systems, internal energy can only be exchanged by heat or work. There are however several ways to do so (heat by radiation, conduction ; and work of many forces)
Comment: So shaking or stirring work won't be considered as an isochoric process?
Comment: @1147 it is ; that does mean there is no *fluid pressure* work ; that does not mean there is no work. Moreover, in that case you should definitely consider kinetic energy ; that takes some of the mechanical work out of the equation. Ultimately, that's a problem for fluid dynamics, not thermodynamics (as in close-to-equilibrium, few-internal-variables thermodynamics)
Answer: $δW=-PdV$ is the expression of the work of a pressure force on a surface of an isotropic, non-moving fluid. For the general expression of mechanical work, you have to use the definition $$δW=\mathbf F\cdot \mathbf{dl}$$  where $\mathbf{dl}$ is the displacement of the point of the system where the force is applied. For a surface (volume) force, you have to integrate over the surface (volume) of the considered system.
If you can represent the internal state of the system (with respect to that force) by a pair of extensive-intensive variables X,Y and if you choose wisely those variables, the work is given by Y dX. This is the case for a point force above, for pressure forces, but also for magnetization ($δW=BdM$), for mechanical stresses ($σdε$, but note that those variables may be tensors), for electrical work, etc.
It is obviously impossible do so for the stirring of a fluid, except for the slow stirring of a highly viscous fluid. Remember, thermodynamics is only valid close to equilibrium.

Note also that when applying the 1st principle, changes in kinetic energy of the whole system have to be taken into account when relevant ; those take up some of the mechanical work.
Answer: Work in context of closed systems is any energy exchange between the system and surrounding that is not considered as the exchange of heat, as $$\Delta U = W + Q$$
( with "done on the system" convention).
There can be both "volume" and "non volume" work. E.g. battery charging, elevation of internal potential energy or mentioned stirring are few kinds of non volume work.

Is $dW = -pdV$ always valid?


Is using TOTP from Authenticator app on a mobile device instead of passwords inherently 2FA?

Question: A related discussion can be found, specifically addressing the security implications of using only TOTP for single-factor authentication However, in my view, using a TOTP code from a Google Authenticator on a mobile device effectively constitutes two-factor authentication. Provided that every user secures their phone with a PIN – which is "something they know" this would represent the first factor. Possession of the device itself becomes the second factor, "something you have." Therefore, employing TOTP alone instead of passwords should be considered as two-factor authentication, shouldn't it? With the exception of the first registration step, where the user is granted the secret seed for TOTP generation.
Comment: The issue with your definition of 2FA replying on a (android) phone own passcode or pattern unlocking feature is that not all users unlock their phones using either a passcode or pattern. If the (android) phone is not a company phone, the company cannot enforce users have passcode or pattern unlocking enabled.
Comment: Hi, does any answer fit your needs? If so, do you mind accepting the "answer"? (cf. https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work). This will help us and future visitors. If not, please let us know what's missing.
Answer: In your example  you can indeed say that is 2FA. But the possible (and very likely) issues are:

unless enforced by some company policy or by phone owners/vendors, you cannot assume that a PIN code or preferably a stronger security layer will be in place to access the device
unless secured independently the TOTP app (or SMS, phone call..) and the received codes can be read as soon as someone has opened/unlocked the device

This means essentially two things:

with TOTP only you would most likely end up in a single-factor authentication, which is "something you have" = the device
and with PIN+TOTP you would end up at best with a "fairly" secure 2FA solution (far from industry best practices)

Now even if this "fairly" secure 2FA solution quite ressembles to your debit card and its 4-digit PIN, I would like to emphasize that you generally only have 3 attempts at pin code in this case ^^, cards have limits/caps, your card is not connected to the Internet, banks have safeguards in place for you AND you can call "Card Stop" any time ;) Just to cite a few mitigations your phone doesn't have (standard or by default).
However what you describe in the end (and maybe want) is essentially the password-less trend that is being introduced here and there.
The major difference is that modern passwordless solutions will ensure that both factors provide satisfactory security (while keeping the solution convenient).
Therefore they will focus instead typically on:

authenticating the user with modern biometrics
and coupling authentication with registered device(s) such as an hardware token, laptop/phone or a smart card... often having the device itself to sign back the response or challenge (using asymmetric keys, public-key infrastructure).
while often providing additional safeguards and protections
Answer:
Provided that every user secures their phone with a PIN – which is "something they know"

If you're in an environment where you can guarantee this then you might be able to make that argument. But generally you can't really make this kind of assumption, any more than you can can claim that a password could be 2FA if the  stores it on their phone, because the phone is "something you have".
Answer: In order to be truly two-factor authentication, both factors must be required every time. But in practice this isn't true of phones; they can be stolen while unlocked. Nor is it true of TOTP, in at least some cases; TOTP keys tend to end up in various places such as email accounts, browser caches, phone backups, and so on, such that a even if the user only ever interacts with the TOTP secret via their phone, an attacker might be able to do it in a way that doesn't involve the phone (and thus doesn't require the phone's memorized or biometric auth credential) at all.
What you describe is strikingly similar to the current trend of using "passkeys" as single-factor authentication (often not even allowing a second factor to be added), with the sole exception that passkeys are, in fact, inherently more secure than TOTP. In both cases, if you do it right (maintain physical control of your devices at least while they're unlocked, don't store the secrets anywhere outside the secure device) and the server implements the auth system correctly (don't use predictable secrets, don't allow resetting the credential using a less-secure method), then they are like two-factor systems even though in practice only one factor is required. However, in practice, that's not how things work. Just as password managers have been offering to store TOTP secrets and generate the codes on demand (sometimes with autofill) in your desktop browsers for years now, so have they moved on to storing and automatically handling passkeys, despite neither their storage nor their authentication living up to the intended security model for passkeys. That's not to say putting passkeys (or TOTP secrets) into a password manager is insecure, it's just not as secure as their intended use case. It might still be sufficiently secure (probably is more secure than what the vast majority of users do today).
Also, note that there are already a handful of sites/services - some of which handle considerable amounts of their users' real money - that can be authenticated to solely via SMS. The same arguments you make for TOTP would seem to apply there as well - the code goes to a Thing You Have, and you have to supply a Thing You Know (or Are) to unlock the phone and read the message. But in practice SMS just isn't secure enough for that, in part due to user behavior; they sync them across multiple networks, they display them on the lock screen of the phone, etc. SMS is in fact inherently even less secure than TOTP, but arguably by a smaller margin than TOTP is less secure than passkeys, and it's already pretty questionable to treat those as categorically adequate single factors.


Peer review for the lay person

Question: I anticipate a lot of scepticism about my question, but I've written a short paper which identifies and corrects what I believe to be a flaw in the way an age old Newtonian problem is taught in physics. I'm not a student nor an academic, so can't use the services of an established University. So how do lay people like me get a technical paper taken seriously and reviewed by my peers ?.
Comment: Technically, if you identify yourself as a layperson, the people you want to review this are probably not your peers (in the professional sense). Which is exactly what makes this difficult.
Comment: An additional challenge you will face is that most papers in academia don't deal with how a subject is taught. Some fields have specialized journals, or journals that have sections specializing in such notes. Finding the right venue will be your first challenge.
Comment: So is it a flaw in the answer to an 'age-old' problem, or you don't think it is being taught well? One is physics, one is pedagogy. Further, the second is likely highly individualistic - different people attack the same physics problem differently, but should arrive at the same answer.
Comment: If you want to get it "peer-reviewed", you'll need to submit it to a journal. While rare, it's not unheard of for people to lack affiliations when submitting manuscripts.
Comment: How short? Is it short enough to post it as a question on physics SE? And how "wrong" is the way it is taught. Remember that many things are simplified to make them more understandable, even if they are not entirely technically correct anymore afterwards. The next question would be "who teaches it wrong?" There is most likely more than one way to teach something. Was it a famous book, a certain teacher, one of the "I explain science" guys on youtube,...?
Comment: Note that it is not so uncommon for an age-old Newtonian problem to be taught wrongly and this might already been addressed by someone else, see e.g. https://academia.stackexchange.com/a/48228/20058
Answer: The fact that you're not in academia is not proibitive for publication, but it sure makes things more difficult. If you think your paper is well written in the sense that it looks like an usual physics paper, you can simply find a proper journal and just submit your work.
But I'd recommend first making your work available online to get opinion from people in the field, as they can point you to the proper journal to submit, they can help you with your writting and, more importantly, they can check if what you claim makes sense or not. I'd recommend posting a question to Physics.SE about the issue you found with a link to your paper.
Comment: Thank you to everyone who replied to my dilemma. You all made pertinent comments and criticisms. With hindsight I should have said I disagreed with the way a particular Newtonian calculation is performed and believe it's wrong from first principles. The error depends upon the application, by root 2 in one and by x2 in another. My paper (x5 A4 sheets of txt algebra & physics) offers a correction and naturally I've convinced myself I'm right. If there's anyone prepared to critique my paper I would be happy to email a copy for peer review. All I need is your email address. Thanks in anticipation.

Peer review for the lay person


Will two Scanners show the same nearby discovery?

Question: I got lucky and found two scanners very close to each other on a planet. If I had chosen Monolith both times would they both have pointed me to the same one? Or do they always point you to a unique location if one exists.
Answer: AFAIK, choosing the same thing on the same scanner twice will result in two different locations, so doing each scanner should return different results.  I have done the two scanner trick multiple times, same scanner only with Colonial Outpost though.  Each scanner also has its own unique identifier, which supports the idea that you'll get different results from each.
Answer: It has worked out randomly for me.  I have never experienced the same scanner giving me the same destination when I query it multiple times for the same thing (possibly because I haven't tried it enough).  However, I have sometimes experienced different scanners (whether close together or far apart) giving me the same destination.  And as far as I can tell there doesn't seem to be a way to know (in advance) that you've already been to that place unless you have really good spatial awareness.


Specifying URL on EE

Question: Let's say I'm making a site in EE and I want to specify a URL on a specific page. As a former wordpress dev, I did that with ease, how would I do that with EE?
Answer: The slug used for every entry can be edited on the URL title field.
If you want to customize the full URL, you can use the pages module. It will make the Pages Tab available, where you can type the full URL. Use it with parsimony.
Answer: You can also use the Template Routes system.  This gives you extraordinary control over what templates are used to generate content in response to URL entries. Hugely powerful, but with quite a steep learning curve. If you are happy to buy an add on there is also Structure which overlays a Wordpress like environment over EE.

Specifying URL on EE


Browse Directories with text UI in Terminal

Question: I remember there was a command that you can call in Ubuntu's terminal to get a very simple text based User Interface to go through directories. I believe you can call the command and then use your arrow keys to navigate directories. If anyone knows what that command is, or has heard of something similar, that would be appreciated!
Comment: use [ranger](http://ranger.nongnu.org/) another TUI file manager
Answer: You probably mean a TUI file manager. I recommend Midnight Commander, the command is mc.
Answer: I think you are looking for midnight commander, similar to Norten Commander. To install it, you shall look for the package mc.


Do surface mount components tend to use less power than through hole components?

Question: Or is the packaging just different?
Answer: If it is the same base part number, same power, different packaging.  Heck, its frequently the same die.
Comment: ICs almost certainly have the same die.  Those things are expensive, and it would be senseless to design a new one for a different package.
Answer: No.
But through hole components can often handle more power than surface-mount components.  Because they are larger, they have lower junction-to-ambient thermal resistance.
Comment: @reemrevnivek - And through-hole components can be mounted to a heatsink. External heatsinking does not change the fact that, *without heatsinking*, through-hole components can generally handle more power.
Comment: Woah!  I was going to say the opposite.  Surface mount components can be connected to large areas of copper on the PCB through a die pad, and thus have lower effective Θja.
Comment: It's not a hard and fast rule, I've just noticed when reading the datasheet of a part available in both packages, the SMT package will have a lower power rating.
Comment: Assuming no heatsink, Through hole is regularly higher-power. Heatsinks are an additional option, and not mentioned anywhere in the question.
Comment: SMD components can be mounted to a heatsink as well.
Answer: What they said. Plus:
"Power used' is very largely a matter of the circuit parameters rather than the components themselves. Something like a resistor will use exactly the same power for a given task regardless of it's packaging as the designer has complete control over power dissipation.
Differences that do occur are liable to be due to secondary effects.
For example:
1) More modern ICs for switch mode power supplies, operating at higher frequencies with potentially improved efficiency may be available only in SM packages, so their "lower power' may not be available in an older package. This is thus a factor of availability rather than inherent difference due to package.
2) A MOSFET may operate more efficiently at lower junction temperature due to eg increasing  Rdson with temperature. Identical die with different packaging will then produce different results based on thermal resistance from Junction to air. This is made up of Rth_junction_case + Rth_case_sink + Rth_sink_air. Depending on implementation and power level (not to mention phase of the moon) the result may go either way. At high power levels a larger through hole case may have a higher Rth_junction_case, but have better access to gross ambient heat sinking. At power levels below 1 Watt the ease of access to PCB thermal sinking for SM part may encourage a lower temperature design so higher efficiency so lower power overall.
As others have noted, 3rd order effects such as lead lengths, perhaps reduced capacitance and similar will have some effect, but usually minimal
Summary: Overall neither SM or through hole have an explicit power difference BUT factors specific to each implementation may make a difference either way on a case by case basis.
Answer: Generally no difference between the same part in different packages, the more important difference is that 'better' parts tend to only be available in SMD as that is where the market for efficient parts has gone.
For example high-efficiency DC-DC converters often operate in the MHz range, which isn't practical in TH due to lead inductance.
Answer: Ever so slightly, yes - because the leads are shorter and there is less resistance in those tiny leads which leads to less wasted in these leads ;). (It may well be only a few milliohms and a few milliwatts dissipated (if that), but...)
Comment: This is probably more of a problem in RF and high frequency components, where the switching speed of the signal causes losses due to the inductance and capacitance of the leads.  More energy is required to maintain signal integrity.
Comment: @reemrevnivek, I wasn't being serious, if you've got a 50mohm MOSFET, what's <1 mohm of wire gonna do?
Comment: I understand that you weren't being completely serious on the resistance front, but there are plenty of situations where through-hole and SMD packages have significantly different inductance and/or capacitance.


QGIS model designer save back into the same geopackage

Question: I have a model that does some tidying of attributes in vector layers that are stored in a geopackage.
The geopackage to work with is specified with a file path input (@survey_data_package)
Therefore the input layers to work on can be set using the "pre-calculated value" option and an expression like this
@survey_data_package || '|layername=TheLayerToWorkOn'

When I specify the output layer if I follow the same expression (such as below) it doesn't work - I suspect this is something to do with creating a new layer/table.
@survey_data_package || '|layername=TheLayerToSaveOutputTo'

If I manually set the geopackage and layer name the string looks like this
ogr:dbname='FilePath/Geopackage.gpkg' table="TheLayerToSaveOutputTo" (geom)

So I was hoping an expression like the one below would allow me to use a "pre-calculated value" and insert the date etc and standardise the file name. I have tried various possibilities like having the output table name as "myoutput" or myoutput
'ogr:dbname=' ||
@survey_data_package||
' table=' ||
'myoutput'  ||
'(geom)'

Comment: I think it must be '''myoutput''', cause it must have the double " before and after the name!
Answer: This syntax worked
'ogr:dbname='
||  @survey_data_package
|| ' table='
|| 'Survey_'
||  format_date(now(),'yyyy_MM')


Can we see a rainbow on moon or any other celestial body?

Question: We see rainbows after rainfall on earth... According to my understanding a rainbow is formed    as a result of scattering of light....Then is it possible that we can be able to see a rainbow on the moon?
Comment: You don't see rainbows _after_ rainfall.  A rainbow is light that is refracted and reflected back toward you when you look at _falling raindrops_ with the sun behind your back.  Q:  Does it ever rain on the moon?  (Hint: see @Abhijeet's answer, below).
Comment: Clarification question: Are you on the moon, or is the rainbow? It's not impossible that you could see an Earth rainbow on the Moon (that is, from the Moon). But there are no rainbows themselves on the Moon
Comment: Do you by any chance mean "Can we see a rainbow due to light emitted from the Moon, scattered in the raindrops here on Earth"?
Comment: @pela That's called [a moonbow](https://en.wikipedia.org/wiki/Moonbow), see [here](http://atoptics.co.uk/rainbows/moonbow.htm) or [here](http://atoptics.co.uk/rainbows/bowim51.htm)
Comment: @rob: Thanks, I was just unsure if the OP was really referring to rainbows formed ON the Moon. Btw, nice pics :)
Answer:
Can we see a rainbow on the moon...?

Usually no. A rainbow is formed by light refraction in water droplets. On earth we typically see a rainbow during rain while it's sunny. As there is no atmosphere on the moon, there will be no rain and thus no rainbows. However, if you were to spray small water droplets on the moon you might see a rainbow (but the droplets will quickly evaporate in the vacuum).

...or any other celestial bodies?

In principal, sure. If you had a planet where there's (water) rain and sunshine you should be able to see rainbows just as on earth. If you're looking for extra-terrestrial rainbows within our solar system, I'm not quite sure: I don't know of anywhere else where there's water raining, but there are other forms of precipitation. And also droplets of other substances than water can refract light to form some sort of rainbow, though with other properties than "our" rainbows. Venus has sulfric-acid rain and on Titan it can pour methane, but Venus has a very thick atmosphere and Titan is already quite far away from the sun so it's not so sunny there and conditions for rainbows are probably bad.
Comment: But could we theoreticaly see a Earth's rainbow _from_ the Moon?
Answer: Rainbows are caused by refraction into, total internal reflection , refraction away/ out of droplets,  millions of water droplets on earth. ( They are visible at approx 47 degrees [sun -droplet-Eye or Camera] which we can find out from refractive index of water).
No atmosphere on moon, so no rainbow can be seen there by an observer there or recorded by a camera.
Earth similar conditions on any other planet to produce a rainbow may enable its formation.
Answer: NO, because moon has no atmosphere.
And that's the reason also for that the moon's sky appears black.. Thanks :)
Answer: It's simple bcoz there is no atmosphere on moon ...
So u can't see rainbow on moon or any other celestial bodies. ..
I think u understood better...
Comment: The question is "is it possible that we can be able to see a rainbow on the moon?" and this post answers it with "So u can't see rainbow on moon or any other celestial bodies." That's very clearly an answer. It may be a badly written post, but that doesn't mean it doesn't answer the question.


Is it possible for someone to steal my source code for a ASP.NET web page?

Question: I have a simple question in which I couldn't find an exact answer to, that question being:If I created an ASP.NET webpage, is it possible for someone to steal my C# source code?And if so, how can I protect my webpage's source code from being stolen/dumped/reverse engineered?
Please if you do know anything about this, as many replies as possible would be greatly appreciated! Thank you guys so very much, even if you just give me an idea on this topic! :)
Comment: It depends who you think this someone could be, and the way you deploy your changes. A simple user of your website can't have access to any of your cs files, this is blocked by default. Someone having access to your server could have access to it, and if you don't want that you'll need to compile everything into one or more DLL files. But those dll files could be reverse-engineered. It all depends how far you want to secure the whole stuff ?
Answer: Are you talking about a corporate user or a regular user?
Someone accessing your website from a web browser, like a standard user can not access your aspx/cs server side code. However if you are talking about a corporate user, if they browse to your web server and have access to your inetpub\wwwroot directory (or wherever your source resides) they have full read or maybe even write access. It all depends on the type of user, and the user security system in place for your domain, whether the person trying to get in is part of your domain and has proper privileges on your server. Also some client side scripts are exposed to user's as well.
So as far as server side scripts, users not part of your domain, and stringent security settings on your web server, are all factors contributing. But I think you mean in the context of a user just trying to access code from the web browser without any additional permissions. Which in this case would be no.
Answer: Not a complete answer but your C# code will be better protected if you use a Web Application rather than a Web Site. Your C# code will be compiled so even with an FTP access (or a direct access to the production server, if you suspect an inside threat), one won't be able to download your .cs files. Of course, one can download .dll and reverse engineer but that's something.
Read more about Web Apps vs Web Sites here : http://msdn.microsoft.com/en-us/library/dd547590.aspx
Answer: To the best of my knowledge there is not a way for someone to steal your asp code unless you allow them to see the file itself. If you view source you will see that the majority of the asp code has been changed either to html or javascript.
Answer:

If I created an ASP.NET webpage, is it possible for someone to steal my C# source code?

Yes it is, there just to many ways how this can happen, vulnerability in the hosting environment, IIS exploit, your code allowing to download things etc. Just accept that your libraries (I assume they are compiled by the time you deploy) will be downloaded and protect them accordingly.

How can I protect my webpage's source code from being stolen/dumped/reverse engineered?

You cannot have an ultimate protection, but you may make life complicated for the person trying to reverse engineer it. Probably the most  effective solution is to use code obfuscation. You may also want to read more general documentation on this topic, such as Design Guidelines for Secure Web Applications.
Comment: I'd disagree with the "Just assume" bit. While there will always be ways to get the source, you're skipping over quite a few layers of (relatively effective) security there - and it's all about layers :)
Comment: Well, the problem is that hackers (governments) are always one step ahead. It's hard to fight something that has not been yet discovered. I agree it's all about the layers, hence included the link, but once it's in the web, you can no longer rely on stuff not being copied. Even simple fact of upload would very likely to end up somewhere in the middle of nowhere in the US (if you follow the NSA disclosure).


Proving equality of two functions

Question:
Lef $f, g$ be two $\mathbb{N}\rightarrow \mathbb{N}$ functions satisfying the following conditions.

$f(g(n))=g(n)+1$
$g(f(n))=f(n)+1$

Show that $f = g$.

I have tried a lot of things and got lots of results, none of which look promising.
Comment: Just pedantry, but does your $\mathbb{N}$ include $0$ or not? Also what exactly did you try?
Comment: How do you know it is true?
Comment: No I don't consider 0
Answer: Let $f(2n) = 2n; f(2n+1) = f(2n+2); g(2n) = 2n+1; g(2n+1)= 2n+1$. (i.e. $f$ takes $n$  to the first even number equal or larger than $n$.  $g$ takes $n$ to the first odd number equal or larger than $n$.
Then $f(g(2n)) = f(2n+1) = 2n+2 = 2n + 1 + 1 = g(2n) + 1$
$f(g(2n+1)) = f(2n+1) = 2n+2 = 2n+1 + 1 = g(2n+1) + 1$
$g(f(2n)) = g(2n)=2n+1 = f(2n) + 1$
$g(f(2n+1)) = g(2n+2) = 2n + 3 = 2n+2 + 1 = f(2n+1) + 1$.
So the statement isn't true.  But is true for all $n \in Im(f) \cap Im(g)$
Answer: Let $Deg(f(n)) = a$ and $Deg(g(n))=b$ such that $Deg(f)$ is the biggest power in the polynomial $f$.
For example : $Deg(2n^3+7n-5)=3$ and $Deg(-7n^5+3n^2+n)=5$.
Now it easy to see that $Deg(f(g(n))) - Deg(g(n)) = 0$ and $Deg(g(f(n)))-Deg(f(n))=0$, and since $Deg(f(g(n)),Deg(g(f(n)))= a b$.
We have few cases :
$a,b>1$ then $a b> a,b$ which means no polynomials of degree higher than $1$ can satisfy your condition.
$a=1, b>1$ then $a b = b$ but $a b \not= a$, also the same conclusion(without loss of generality).
$a=0,b>1$ then $a b =a$ but $a b \not= b$, also the same conclusion(without loss of generality).
$a=1,b=1$ then the only functions satisfy this are the functions $f(n)=n+1,g(n)=n+1$ and in this case $f(n)=g(n)$.
$a=0,b=1$ then $a b=a \not =b$ also the same conclusion(without loss of generality).
$a=0,b=0$ then $ab=a=b$ which means that you can not discard this situation using this method but setting $f(n)=c_0$ and $g(n)=c_1$ gives that there is no such constant polynomials.
In conclusion : if for any two polynomials $f(n),g(n)$ if $f(g(n))=g(n)+1$ and $g(f(n))=f(n)+1$ then $f(n)=g(n)$ and to be explicit $f(n)=g(n)=n+1$
Note : this answer is only about polynomial(not necessarily from integers to integers) but does not prove the general question about other kind of functions.
Answer: Disclaimer: Not a full answer, just some ideas I had.
Let us note that by definition $f$ and $g$ are almost symmetrical, so any result proved for $g$ will have an analogous result for $f$. Now, we have that $g$ is $n+1$ on the image of $f$.
Consider the function $$gfgfgfgfg\dots(n),$$ where there are $m + 1$ applications of a function. By multiple uses of the starting relations, we get that $g(n) = n + 1 $ if $n$ is of the form $g(m) + \text{odd}$ or $f(m) + \text{even}$. More concretely, for the case $m = 2$, $gfg(n) = fg(n) + 1 = g(n) + 2 = g(g(n) + 1)$. Similarly, we have that $f(n) = n + 1 $ if $n$ is of the form $f(m) + \text{odd}$ or $g(m) + \text{even}$.
On a far different approach, if $f$ and $g$ commute, then we have that $f = g$. As then, $g(n) + 1 = fg(n) = gf(n) = f(n) + 1$ and so $f$ and $g$ are identical. I've tried to come up with functions which commute and satisfy the defining relations, but are not $n + 1$, as shown in @Ahmad's answer, I can't consider polynomials. So instead I give you for any fixed natural $k$
$$f(n) = g(n) = \begin{cases} k &\mbox{if } n = 0 \\
n+1 & \mbox{else } \end{cases}$$
As one can verify, these satisfy the defining relations but are not $n+1$ globally. So I don't think we should be heading down the path of showing that $f(n)=g(n)=n+1$, because as we see, there are solutions not of this form.
Comment: There are even examples like $f(0)=2$, $g(0)=3$, and $f(n) = g(n) = n+1$ for $n \geq 1$ which show that $f \neq g$ is possible.
Answer: $\begin{cases}
g(2n)=0 \\
g(2n+1)=2n+2
\end{cases}\qquad\begin{cases}f(2n)=2n+1 \\ f(2n+1)=1\end{cases}$
$f,g$ verifies the requirements, yet $f\neq g$

$\begin{array}{lll}
f(g(2n))=f(0)=1 & g(2n)+1=1 & \checkmark \\
f(g(2n+1))=f(2n+2)=2n+3 & g(2n+1)+1=2n+3 & \checkmark \\
g(f(2n))=g(2n+1)=2n+2 & f(2n)+1=2n+2& \checkmark \\
g(f(2n+1))=g(1)=2 & f(2n+1)+1=2 & \checkmark \\
\end{array}$
Comment: $N$ does not contain 0

Proving equality of two functions


"Wealth tax" on illiquid assets, how would people pay

Question: In the idea of a wealth tax, or even for properties taxes, many times assets are illiquid. What mechanisms can be introduced to promote compliance and ensure the revenue collection goals of the taxing authority in the face of illiquidity?
Answer: This is a problem often asked in the context of a land value tax where 100% of the rental value of land is taxed. If the value of the land rises substantially, and the person on the land isn't making direct income from the land, they may be forced to do something about that.
One thing that could be done is use the land to make money - eg rent it out. But another possibility is simply to get a loan with the land used as collateral.
An example: Let's say you had a \$300,000 property and the rental value of the land was \$30,000/year (\$2500/month). If the value of your land doubles so next year you have to pay double the tax. If you can still afford to pay the original tax, but not the new tax, you would have to borrow $30k each year.
If you take out a loan at 4% interest, you would still be above water for 8 years before the amount you owe on the loan exceeds the extra value your land got (not including its original value), and 15 years before your loan would need to be liquidated. Certainly long enough for you to be able to make arrangements to move if necessary.
If instead of a single one-time land value increase, your land increased at a steady rate, you could potentially sustain such a loan forever. For example, if the loan rate was 4% and your land increased in value at a rate of 4%, the value of your land would increase faster than your loan liability would (because your loan principal would always be lower than the value of your land). If instead the land increased in value at 3% and your loan was still at 4%, you could remain above water for literally over 250 years before you would have to liquidate the loan.
So as long as you can get a loan using your illiquid wealth as collateral, it seems to be quite reasonable to simply obtain a loan for the payment of taxes. For other kinds of illiquid wealth, you would probably want to simply sell the wealth in whatever timeframe is possible, so your loan would not need to be very long (however long it takes to sell those assets).
Answer: In the face of my downvote, I'll provide some practicable answers to a question that is of relevance only in theory.  There are literally hundreds of possibilities.  If you are searching for academic literature on the theoretical optimality of a wealth tax, it will benefit you to say so in the question.
Possible mechanisms of liquidity based on revenue collection goals:

Taxing authority simply sets revenue goals based on their assessment of liquid assets, or just at 0

Possible mechanisms of liquidity based on redefining of "wealth":

Taxing authority defines "wealth" as being only assets of a certain type that are proven to be of discernable liquidity

Possible mechanisms of liquidity based on unwillingness or inability to pay tax in currency:

Taxing authority assumes all assets are liquid, and places responsibility on owner to remit tax in currency
Taxing authority enacts law providing for uninhibited public use of the private assets owned by persons in arrears of the wealth tax
Taxing authority auctions off assets owned by persons in arrears of the wealth tax until the tax is satisfied


Exponent of $p$ in the prime factorization of $n!$

Question: Exponent of $p$ in the prime factorization of $n!$  is given by $\large  \sum \limits_{i=1}^{\lfloor\log_p n \rfloor } \left\lfloor \dfrac{n}{p^i}\right\rfloor $.
Can this sum be simplified further to some direct expression so that the number of calculations are reduced?
Comment: This is an incredibly small calculation...
Comment: I am looking at @robjohn 's reply in below thread which shows that the sum simplifies to $\dfrac{n-\lfloor \log_p n\rfloor }{p-1}$ , but I don't really understand it and it is not giving correct answer for n=20 and p=2 http://math.stackexchange.com/questions/590885/proving-p-nmid-dbinomprmpr-where-p-nmid-m/590901#590901
Comment: robjohn's answer says that the sum simplifies to $\dfrac{n-\sigma_p(n)}{p-1}$, where $\sigma_p(n)$ is the sum of the digits of $n$ in the base-$p$ representation, just like David Holden's answer here. Where did you get the $\lfloor \log_p n\rfloor$ from?
Comment: @DanielFischer, he seems to have figured out about the digit sum... if $i > \log_p n$ then $p^i > n$ and the floor of the fraction is zero.
Comment: @WillJagy I was referring to the formula in the comment, not the bound on the sum. (Didn't even notice that there appeared a $\lfloor \log_p n\rfloor$ too.)
Comment: @DanielFischer, you are absolutely right. I did not notice the incorrect log in his comment...
Comment: FYI: There is an approximation for this found in Chapter 4 of Concrete Mathematics.  Only really useful for very large numbers, though.  (My book is packed up right now, and I don't know the exact formula off-hand.)
Answer: yes:
$$
\frac{N-\sigma_p(N)}{p-1}
$$
where $\sigma_p(N)$ is the sum of digits in the $p$-ary expression of $N$
Comment: I think $\sigma_p (N) $ is same as $\lfloor \log_p N\rfloor$ ?

i am trying to work below example :
 exponent of 2 in prime factorization of $20!$ is $18$ :
http://www.wolframalpha.com/input/?i=prime+factorization+of+20%21

but your expression gives a different number :
$\dfrac{20-\lfloor \log_2 20\rfloor }{2-1} = 16$
Comment: @GaneshTadi No. In binary, $20$ is $10100$, so the digit sum of $20$ in base-$2$ is $2$. $\frac{20-2}{2-1} = 18$, as it should be. $\lfloor \log_p n\rfloor$ is one less than the **number** of digits in base $p$.
Comment: if in binary $N=1101101$ then $\sigma_2(N) = 1+1+0+1+1+0+1=5$
Comment: Gotcha :) I see my error in interpreting the formula, thanks a lot xD
Answer: note what Daniel says. $\lfloor \log_p N\rfloor$ is the exponent of $p$ in $N$ not in $N!$.
let $P_N$ be the exponent of $p$ in $N!$ and consider $P_{N+1}$.
if $N+1$ is not divisible by $p$ then the least significant $p$-ary digit of $N$ increases by $1$ and so
$$
N+1 - \sigma_p(N+1) = N - \sigma_p(N)
$$
and the exponent is unchanged.
suppose $N+1$ is divisible by $p^r$ for $r \gt 0$ but not by $p^{r+1}$ then each of the $r$ least significant binary digits must take the value $p-1$ but $1$ is added to the $r^{\text{th}} $ digit, which is not equal to $p-1$ hence:
$$
\sigma_p(N+1) = \sigma_p(N)+1 - r(p-1)
$$
and
$$
N+1 - \sigma_p(N+1) = N - \sigma_p(n) + r(p-1)
$$
hence
$$
P_{N+1} = \frac{N+1 - \sigma_p(N+1) }{p-1} \\
= P_N + r
$$
Answer: The idea of this theorm is to reduce  manual calculation , try to find exp of 2 for (23263662!) :P so i guess its fair to follow the theorm  .
Origion theorm  was  $\large  \sum \limits_{i=1}^{\infty} \left\lfloor \dfrac{n}{p^i}\right\rfloor$ ,  the floor log n function come from condition that i<=n thus any i after n give term of zero.


Finding where a field is set

Question: I am having a problem with a specific field not being set to a value. It's a field created before I began managing the org and so I'm not sure what exactly was supposed to be setting it. Does anybody have a method of finding where a field is being set which will be quicker than fishing through 50 different workflow rules and about 10 other triggers ?
Answer: I'm aware of two ways to do field dependency/reference resolution.

Attempt to delete the field. You'll get back at least some information about where the field has dependencies that prevent it from being deleted. I can't vouch for that this actually catches every single use of the field in different corners of the platform; I've done instance migrations where there were broken field dependencies before.
Use the Force.com IDE, MavensMate, or the Metadata API directly to pull down all of the extractable metadata for the organization (Apex, workflows, processes, reports, etc - or in your case just Apex, workflows, and processes). Open the metadata directory in your IDE of choice (Visual Studio Code works well) and simply perform a global search for the field's API name across the source files.
Comment: Method 1 certainly can be unreliable, like if you use dynamic SOQL or SOSL, and the field list is driven by metadata or something. It's still a pretty good place to start though.
Comment: I was thinking of something like #2 as well...just wasn't quite sure how to go about it. Might have to get to know my new IDE better...Thanks.

...and #1 is clever :-)
Comment: It probably goes without saying, but trying method 1 in a fresh Sandbox (rather than Production!) is recommended.

Finding where a field is set


How do I update Python from 3.4.3 to 3.5?

Question: I'm also using Jupyter and Anaconda, will it break/delete them or any python modules?
Comment: Take also a look here: http://superuser.com/q/241865/495631
Answer: You can try to use this PPA to replace your current python with 3.5:
https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes
Usage instructions can be found on the linked webpage.
However, I would recommend installing python 3.5 parallel to 3.4 (under /opt for example).
For that you would need to install from source:
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
tar xfvJ Python-3.5.1.tar.xz
cd Python-3.5.1
./configure --prefix=/opt/python3.5
make
# To make idle3.5, you need tk's development to produce tkinter
sudo apt-get install tk8.6-dev
sudo make install

Your python 3.5 interpreter will be located in /opt/python3.5/bin/python3.5.
Your Integrated DeveLopment Environment is also found in
/opt/python3.5/bin/idle3.5.
To facilitate use you can symlink these files to a location on your $PATH like so:
sudo ln -s /opt/python3.5/bin/python3.5 /usr/local/bin/py3.5
sudo ln -s /opt/python3.5/bin/idle3.5 /usr/local/bin/idle3.5

After this, just typing py3.5 from the command line will use python 3.5, while at the same time, python 3.4 will remain untouched, and will not  cause any "breakage" on your system. Also, idle3.5 will bring up the
IDLE editor with the python 3.5.1 shell.
Comment: `You can try to use this PPA to replace your current python with 3.5` - unfortunately this PPA doesn't include Python 3.5 (there are only obsolete versions) for Wily although there is Python 3.5 for Vivid, Trusty and Precise.
Comment: What will happen to existing packages?
Comment: Using the second method... nothing. You will be able to keep them running just like before, since python 3.4 remains installed and the default interpreter.
Comment: Python 3.5 was added for Vivid, Trusty and Precise just 5 days ago. Maybe something is delaying it for Wily, but it will eventually show up there (it always does).
Comment: how to install pip3 to python after installing python 3.5??
Comment: @TRomesh: You can follow the instructions [here](https://pip.pypa.io/en/stable/installing/). But instead of running `python get-pip.py` run `/usr/local/bin/py3.5 get-pip.py`. This is assuming you have followed the instructions from the answer.


Why was the term random "variable" applied to a mapping?

Question: I think I'm correct in saying a random variable is a mapping from the sample space to the real line (or more generally to $\mathbb{R}^n$. If I'm right then random variable seems a very odd way for a mathematician to describe it: it is neither random (a perfectly fixed mapping) nor a variable. Yet I have to believe that very smart people came up with this. I'm wondering who and what was the thinking behind the label.
Comment: You are not correct in saying that. Identification of random variables with measurable maps is a device in Kolmogorov's formalization of probability. They are no more that than numbers are sets they are identified with in set theory, and working probability theorists do no think of them that way even today, it is just a technical artifice in proofs. As for pre-Kolmogorov genesis of the concept it is unclear, see [Who introduced random variables into probability?](https://hsm.stackexchange.com/q/2223/55) and [Who coined the term random variable?](https://hsm.stackexchange.com/q/9716/55)
Comment: The only objectionable part is that random variable *is* a map, rather than that it *is represented* by one formally, but such oblivious shorthand is commonplace in the literature. However, that is not how random variables are treated informally, and the reason why the name does not match the technical definition, which it predates. But the question about its origin is interesting, hopefully someone can answer this time.
Comment: Thank you for responding. I didn't mention Kolmogorov and I didn't intend to imply any connection between his development of the axioms of probability theory and random variables.
Comment: Sorry, somehow my comment uploaded before i'd finished writing it.  Picking up where my previous comment ended: My question is simple: where did the term originate and why, given that it seems to to be an odd label.  I don't think I'm wrong in my opening proposition, so I think my question still stands. If my opening proposition is wrong then I apologize and withdraw.
Comment: @Coinfold. BTW, I'd read the two references you gave but they didn't seem to answer my question, hence I decided to post. I didn't want you to think I hadn't seen them.
Comment: Random variables can also map to complex numbers, angular measures, modular measures, hyperreal numbers… not just real numbers.
Answer: It is easy to name some of these "smart people".
Andrei Kolmogorov
proposed a mathematical model for probability in his book
Grundbegriffe der Wahrscheinlichkeitsrechnung (Foundations of probability theory), Berlin: Julius Springer, (1933). This model is commonly accepted nowadays. This was a final step of a long development (Emile Borel, Francesco Cantelli, Felix Hausdorff, Maurice Frechet, Antoni Lomnicki, Evgeny Slutsky, A. A. Markov and many others).
There were several competing mathematical models, most notable of them due to
Sergei Bernstein, Theory of probability, Kharkov, 1911,
Hugo Steinhaus, Les probabilités dénombrables et leur rapport à la théorie de la mesure,
Fundamenta math. 4, 286-310 (1923), and
Richard von Mises,
Wahrscheinlichkeit, Statistik und Wahrheit, J. Springer (1928).
Gradually the mathematical advantages of Kolmogorov axiomatization were recognized, and
all other approaches were forgotten.
"Random variable" is an old term whose use started before these axiomatizations. It was thought as a "variable" (for example, a number) that "depends on chance". The last expression "depends on chance" required a mathematical explanation of "chance", and that the random variable "depends on it" means that it is really a "function of something". Axiomatization of Steinhaus is the closest
to the one by Kolmogorov (the difference is that he used the newly invented Lebesgue measure to axiomatize the "chance", while Kolmogorov proposed to consider an abstract measure, which has several mathematical advantages). Two other axiomatizations that I mention do not use functions on a measure space at all.
On the history of development of Kolmogorov's axiomatization, there is a paper:
Jack Barone and Albert Novikoff,
A History of the Axiomatic Formulation of Probability from Borel to Kolmogorov:
Part I,
Archive for History of Exact Sciences , 8.III.1978, Vol. 18, No. 2  pp.
123-190
But it covers only history of Kolmogorov's axiomatization, most alternative approaches are out of scope. A paper with wider coverage is Glenn Shafer and Vladimir Vovk, The Sources of Kolmogorov's
Grundbegriffe.
Remark. It is very common that in popular history of science one person obtains all credit for a great advance, and contributions of all other participants are forgotten. Let me cite Maurice Frechet:

"It was at the moment when Borel introduced this new kind of additivity in 1909 that all the elements needed to formulate the whole body of axioms of probability theory came together. It is not enough to have all ideas in mind... one must make sure that their totality is sufficient, bring them together explicitly and take the responsibility for saying that nothing further is needed in order to construct the theory. This is what Kolmogorov did. This is his achievement. And we do not believe that he wanted to claim any others, so far as the axiomatic theory is concerned."
Comment: You say "random variable" is an old term, but the oldest quotes I have seen are from ~1910 onwards, while the theory of probability is much older. Do you know earlier uses of the term?
Comment: @Michael Bachtold: I am sure that it is much older, and instead of searching references can confirm this by Google Ngram.
Comment: Here is the [ngram](https://books.google.com/ngrams/graph?content=random+variable&year_start=1600&year_end=2000&corpus=en-2019&smoothing=1) I get. The big surge is after 1930. There are two very narrow peaks in the 17th century, but since I can't access the source I can't see what these are. So the claim that this is an old term still seems unsupported.


GWT/GWTP PopupDialog not always centered due to CSS delayed rendering

Question: I am using GWT 2.4, GWTP and Chrome 22.0.1229.94 for testing. I have struggled with this issue for days.
On startup I present a custom PopupDialog using a view that has extended PopupViewImpl. In an overridden onReveal() method I center the dialog. The GWTP code centers synchronously and also using scheduleDeferred.
In development mode and running complied on local server everything works as expected: the popup dialog is always rendered and centered correctly. I have also tested in IE.
However, when deploying to the live web server on the Internet I notice that when I refresh using F5, sometimes the CSS is not applied before the script tries to center the dialog. This results in the measurements being wrong and the dialog is not placed in the center. Interestingly this only seems to happen now and then, typically when the browser is not fast enough in rendering all (CSS) resources before the scheduled deferred command is invoked.
So, I have already tried the following:

Loading CSS using different techniques (reference in HTML-file, reference in GWT-module, put in CssResouce)
Center using Scheduler.get().scheduleDeferred as default code also does.
Calling RootLayoutPanel.get().onResize() in onReveal to try to trigger some layout before centering deferred.

I notice the same behaviour in Chrome and IE so it might not be a browser issue. My question is where to put my "center"-call to ensure that it is called after the all CSS has been properly applied or if there is anything else I can do to force the CSS to render?
Thanks!
Here is the onReveal code in the Presenter extending PresenterWidget:
<code>@Override
protected void onReveal() {
    super.onReveal();

    // Hide loading image
    fireEvent(new HideApplicationLoadingImageEvent());

    // Reset message
    getView().setStatusMessage(null);

    // Center the popup
    getView().center();
}
</code>
Comment: Can you post your onReveal() code which applies to centering the dialog?
Comment: Added onReveal code in post above.
Answer: There is method addToPopupSlot(child, boolean center); if you send true for center argument it take care of centering the popup in GWTP Example:- addToPopupSlot(widget, true)


Omni Flow not storing Skill Requirements Collection Variable

Question: I'm trying to use Skill-Based Routing to route Chats in my Org. It seems my options to do this are to 1) use a Visualforce Pre chat form page that stores Chat Transcript record information that then routes the Chat via a Skill-Based Routing Rule mapping set, 2) use a Custom LWC that pretty much does that as well, 3) or build an Omni Flow using the template and configure my own skill-based routing setup.
I've opted for the third option, as I am not familiar enough with Visualforce or LWC to build something out. I've configured everything to a point that it functions up to when Skills are being assigned based on Pre chat form input. Every point in the Flow that stores a Skill to the Skill Requirements Collection variable successfully stores a value according to debugging.
However, for whatever reason, the next time the collection variable is referenced, I can see in the debugger that it is once again null. This can happen multiple times within the Flow where if I add one skill (step 1), then add another skill afterward (step 2), then route the work item afterward (step 3). The Skill Requirements variable will be updated during step 1, then becomes null again immediately after step 1, then get updated during step 2, then is null immediately afterwards once again. As a result, step 3 is performed using an empty Skill Collection variable, so no skills are used for routing.
Has anyone ever run into a similar issue like this before? Any suggestions on how I can get this to work? Ideally, I'd like to dynamically assign skills to Chats based on multiple fields within the Pre chat form with the use of an Omni Flow.
Answer: it's been a little moment since you posted but the solution to this is to add your skillrequirements collection to the aggregated skills requirement section.


Sprint planning estimations and who is involved

Question: In the past but only in 1 team, during the sprint planning, the product owner provided also an estimation for the story discussed, not so much as to use that estimation instead of the developers, but more as a way of discussion and to have more clarity as a team how complex are the various stories.
That approach had worked well for that specific team, due to the composition and product owner, but haven't encountered it again. I was wondering if such an approach is being used in general or it was an exception?
Comment: Anchoring is inherently an anti-pattern for planning poker. Having non-developers anchor the estimates from the start is therefore a bad idea *ab initio*.
Comment: [Anchoring is a known cognitive bias](https://en.wikipedia.org/wiki/Anchoring_(cognitive_bias)) that properly-implemented Planning Poker is deliberately designed to compensate for.
Comment: @ToddA.Jacobs: What do you mean exactly with "anchoring"?
Answer: Most product owners I have worked with don't have enough detailed technical knowledge to make good estimates. There are exceptions though. It ought to be up to the development team. If they find it useful to have someone else's input to estimation then why not do that, but the developers should still have the final say on any estimates.
Answer: TL;DR

[T]he product owner provided also an estimation for the story discussed, not so much as to use that estimation instead of the developers, but more as a way of discussion and to have more clarity as a team how complex are the various stories.

While this may have worked for you in a particular instance, what you're describing is inherently a Scrum and agile anti-pattern, and often defeats the intended purpose of leveraging the knowledge of a self-organizing group of Developers to meaningfully estimate the relative size of a Product Backlog item, define its essential implementation details, and effectively estimate the level of effort required to deliver it within the Scrum Team's available resources.
Also, please note that Planning Poker is a technique, not a requirement of Scrum. In fact, the 2020 Scrum Guide is extremely non-prescriptive about how work is to be estimated, but the use of estimation techniques like Mike Cohn's Planning Poker is certainly a common practice among agile practitioners.
Why It's a Scrum Anti-Pattern
First of all, while the Product Owner owns the Product Backlog, the Developers own the Sprint Backlog. It is their plan for the Sprint, and only they are truly in a position to know how easy or difficult the work will be for them to perform. While the Product Owner (PO) may answer scoping questions or help refine items, the PO role should never be influencing the Developers' estimation process in the way you're describing. The Scrum Guide specifically says:

For each selected Product Backlog item, the Developers plan the work necessary to create an Increment that meets the Definition of Done. This is often done by decomposing Product Backlog items into smaller work items of one day or less. How this is done is at the sole discretion of the Developers. No one else tells them how to turn Product Backlog items into Increments of value.

In particular, the Product Owner doesn't get to opine on how easy or hard a given work item may be. However, if the Developers have questions about the scope or Definition of Done for a particular item, the Product Owner should be a key collaborator in helping to refine the Product Backlog item during Sprint Planning so that the Developers can determine whether the work will fit within the Iteration and whether it's sufficiently decomposed to add to the Sprint Backlog.
Why It's a Planning Poker Anti-Pattern
Mike Cohn is the author of User Stories Applied and Agile Estimation and Planning. In a presentation entitled "Planning and Tracking Agile Projects" (Cohn, Mike. August 15, 2007.) Mr. Cohn lays out several key elements of Planning Poker on pages 19-21:

Those who will do the work, estimate the work

[Properly done, Planning Poker r]educes likelihood of anchoring

Mr. Cohn specifically cites an additional source for the infographic showing the negative impact of anchoring on the estimation process. Citation adapted from page 21:

"How to Avoid Impact from Irrelevant and Misleading Information on
Your Cost Estimates." Jørgensen, Magne and Stein Grimstad. Simula
Research Laboratory, Simula Research Labs Estimation Seminar. Oslo,
Norway 2006.

If you want a more thorough treatment of why anchoring is a flawed approach to Scrum or agile estimation, I would consider Mike Cohn's body of work to be fairly comprehensive in this regard as far as agile practices go, and there are plenty of professional journals that support the theory that anchoring inherently creates bias. However, if you want an exhaustive list of studies and citations you will have to conduct your own research on the topic.
The triple-net here is that Planning Poker was designed to avoid exactly the sort of cognitive bias (see also https://en.wikipedia.org/wiki/Cognitive_bias) and authority-based target setting that plagues traditional estimation practices. While there is certainly room during Backlog Refinement or Sprint Planning for a Product Owner to collaborate with the Developers to reduce the size, scope, or complexity of a backlog item so that it better fits within the Developers' plan for a Sprint, the Product Owner is not generally the task performer. As a result, the PO's opinion on the level of effort required to deliver a given backlog item is largely irrelevant to the level of skill available from, and the effort required of, the Developers who will actually be doing the work.
Answer: The best person (or people) to estimate the work is the person (or are the people) who will be doing the work.
Unless the work is something that the Product Owner will be involved in designing, developing, and testing, then the Product Owner probably shouldn't be involved in estimating the work. In the context of Scrum, if the team has chosen to use estimation, then the Developers are the ones who should be estimating the Product Backlog Items. In addition, estimation should be a part of the ongoing Product Backlog Refinement and not restricted to Sprint Planning, although you may choose to do some additional refinement at Sprint Planning as well.
Comment: @Jim That changes nothing. It's generally accepted that the best estimates come from the people who will do the work. Outside estimates, especially from people who aren't doing the work, can influence their thinking. Especially from a Product Owner, who is seeking to maximize the value delivered. If the PO were to be overoptimistic, neglect considering some technical details, or throw in a few underestimates, the team may commit to goals that are unrealistic. There are a lot of following consequences on team behavior and morale.
Comment: The idea was not that the product owner's estimation has value or pressure for the developers but more of what is the perception of the complexity of a story and making a transparent discussion among the team so developers explain why that estimation is off or not
Answer: Most likely an exception. The people who will perform the work are the ones that should estimate. Anyone else that does not do the work or is not responsible and accountable for the outcome of the work, doesn't really have a skin in the game.
A bad product owner might pressure the team by providing a smaller estimate to influence the outcome of the sprint planning, or might question developers on their estimate "come on... is that story really an 8 story points?" Sometimes also, because they don't actually do the work and don't understand all that's involved,  they might  give a lower estimate and influence the team simply by accident if, for example, the team sees the product owner as someone with more authority within the project.
For reasons like these, it's best to leave estimating to those that do the work, and have the rest of the participants be available for support and clarification.
If however the team finds value in the estimate of the product owner (maybe they are a subject expert in some fields, or whatever) then that's fine too... if you pay attention to the things I mentioned and adapt when there are signs of trouble.
But like I mentioned in the beginning, the example you gave is mostly an exception.
Comment: The idea was not that the product owner's estimation has value or pressure for the developers but more of what is the perception of the complexity of a story and making a transparent discussion among the team so developers explain why that estimation is off or not
Comment: If the estimate was just an anchor to hold discussion and clarify things, then that's fine. If you work with a disciplined team, in a psychological safe environment, then you don't even need the estimate; whatever number you come up with is just there to help clarify things. But like mentioned also by Thomas in his comment, you have to be careful for the PO's estimate not to influence the team in some bad way (doesn't need to be intentional... by accident will do). So just out of curiosity? What was the dynamic or how did you carry on when there was not a consensus between PO and devs?
Comment: The developer's estimation always was kept. There was trust in the team and the discussion about the estimate from the PO's side was so that there was transparency on the reasoning behind a big estimate given by the developers, the PO became better at understanding various other stories how complex they would be in a very early stage and also the developer's got another perspective of how a story could appear as very small for other stakeholders
Answer: Product owners are doing the UAT, which means they are doing work in the sprint on the sprint backlog items. So, product owners do estimate the stories.
Comment: While I cannot say whether *your* PO sees this as their task, I cannot find that in the Scrum guide. Can you explain why you think the PO does UAT on sprint items during the sprint?
Comment: The POs should do the UAT to be sure that the output is ready to be presented to the stakeholders in the sprint review meeting.