In Multisite - main site blog post should be display in minisite or subsite

Question: If we add a blog post in main site that post need to be display in minisite (subsite)
Comment: What have you tried so far?
Comment: Do you want the post to be copied - like it should show up in the dashboard for the subsite? Or you just want it to be displayed in the subsite?
Comment: The blog post should be just display in subsite.If we add blog post that post need to be just display in subsite
Answer: I can't write the whole solution for what you need, but to achieve this you need to add code to your theme using functions like these which help you to figure out which multisite you're on, and pull a post from a different multisite:
get_current_blog_id() - get current multisite site ID
switch_to_blog(123) - switch to multisite ID 123
restore_current_blog() - if you switched to a different site, switch back to the one you were on before
So if your 'main site' is blog ID '1' then you probably need to add some code to your theme that does something like this:
    $mainSite = 1;
    $currentSite = get_current_blog_id();

    if ($currentSite != $mainSite) {

        switch_to_blog($mainSite);

        // get_posts, WP_Query, etc. to get the posts you want

        // post loop to print the post

        restore_current_blog();
    }


In git, can I compare my last n commits to a branch with the current HEAD of that branch, excluding commits from others?

Question: Normally I'd work in a git feature branch let one of my colleagues review my work before merging it to master, but I had to do some work directly in the master branch, so all of my commits are now interspersed with commits from others. I'd like to produce a diff between the current HEAD of the master branch and my previous n commits to master, so that my colleagues can review my work as if it was a single commit or patch. Is there a way to do this?
Answer: There isn't a way to do that directly. I believe that the simplest solution
would likely be to create a temporary branch, then use git rebase -i naming
the commit you want to use as the original in your diff as the argument.  In
the editor which that spawns reorder the commits so that yours appear after the
other commits.  You may also want to squash your commits.  At that point you
can easily get a single diff of your changes.


Ephemeral port : What is it and what does it do?

Question: I suddenly came across the term "ephemeral port" in a Linux article that I was reading, but the author did not mention what it is.
What is an ephemeral port in UNIX?
Answer: In essence an ephemeral port is a random high port used to communicate with a known server port. For example, if I ssh from my machine to a server the connection would look like:
192.168.1.102:37852 ---> 192.168.1.105:22

22 is the standard SSH port I'm connecting to on the remote machine; 37852 is the ephemeral port used on my local machine
Answer: Today, generally:

Ports with numbers 0-1023 are called system or well-known ports; ports with numbers 1024-49151 are called user or registered ports, and ports with numbers 49152-65535 are called dynamic, private or ephemeral ports.
Registered port numbers are currently assigned by the... IANA... and were assigned by... ICANN... before March 21, 2001, and were assigned by the... USC/ISI... before 1998.

Source: https://en.wikipedia.org/wiki/Registered_port [modified]

...well-known ports or system ports. They are used by system processes that provide widely used types of network services. On Unix-like operating systems, a process must execute with superuser privileges to be able to bind a network socket to an IP address using one of the well-known ports.

Source: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

Just as well-known and registered port numbers are used for server processes, ephemeral port numbers are for client processes only.

Source: https://books.google.si/books?id=Pm4RgYV2w4YC&pg=PA705
Without such ephemeral/temporary ports assigned, there might be Internet Protocol (IP)/network communication conflicts or downtimes. For example, there are two web servers and both listen on port 80. How would both server communicate? Would you implement some kind of "half-duplex" communication on the single 80 port (listen, transmit, listen, transmit...)? In such case, the communication would be at least slower.  Not to mention that other clients would have to wait for the server's responses to other clients since its 80 port is temporarily unavailable (used to send response to a client)
Here come temporary ports which in this case would allow servers to keep listening on port 80 and communicate on other simultaneously (some kind of "full-duplex") For example, let's assume these are TCP/IP ports:

In client-server processes that use... TCP/IP... or... UDP..., the client initiates communication with a server through one of the many well-known ports. However, because the server does not initialize communication, it should not use a well-known port to send replies to the client, just in case a server-type application is running on that client device. Instead, the server to the client uses a new, temporarily assigned port that the client provides as the source port.
After communication is terminated, the port becomes available for use in another session. However, it is usually reused only after the entire port range is used up.
Different... OS... use different port ranges for ephemeral ports. Many Linux versions use port range 32768-61000, while Windows versions (until XP) use 1025-5000, by default. Later Windows versions, including Vista, Windows 7 and Server 2008, use the... IANA... suggested range of 49152-65535.

Source: https://www.techopedia.com/definition/19157/ephemeral-port
It's worth to mention the TCP self-connect issue in case of misconfiguration.

while true
do
     telnet 127.0.0.1 50000
done

...
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying 127.0.0.1...
Connected to 127.0.0.1.
...
What happened? In short, client connected to itself... It is interesting to note that Linux chooses ephemeral ports sequentially, not randomly...
The scenario of self connect described in this post is quite specific and requires specific preconditions. First, obviously, you need to (ab)use ephemeral ports for listening servers so that you clients try to connect to ephemeral ports.

Source: http://sgros.blogspot.com/2013/08/tcp-client-self-connect.html

Related:
- https://docs.microsoft.com/en-us/troubleshoot/windows-server/networking/default-dynamic-port-range-tcpip-chang (The default dynamic port range for TCP/IP has changed since Windows Vista and...)
- https://en.wikipedia.org/wiki/Duplex_(telecommunications)
- https://jazzy.id.au/2012/08/23/why_does_chrome_consider_some_ports_unsafe.html
- https://chromium.googlesource.com/chromium/src.git/+/refs/heads/master/net/base/port_util.cc (The general list of blocked ports...)
Answer: Ports  49152-65535 are known as ephemeral ports. Another name for it is private ports. It's called so because this range of ports can't be registered with IANA.
When a client needs to communicate with a server, the client is assigned an ephemeral port on the other hand server listens on a registered port, which ranges from 1024 to 49151.
Answer: Quoting from Wikipedia:

An ephemeral port is a short-lived transport protocol port for Internet Protocol (IP) communications allocated automatically from a predefined range by the TCP/IP software. It is used by the Transmission Control Protocol (TCP), User Datagram Protocol (UDP), or the Stream Control Transmission Protocol (SCTP) as the port assignment for the client end of a client–server communication to a well known port on a server.

The best example I know is FTP. And it's not a Unix-bound concept.
Comment: "FTP" isn't exactly an example of an ephemeral port
Comment: Not what I meant, I meant it's a protocol that uses the concept.


How can I search an entire SharePoint list when the number of items exceeds the list view threshold?

Question: I have a list containing 13000 items.  I have set up views so that none of the views exceed the 5000 item list view threshold.  We need to be able to search this entire list, not just search within the specific views.  I am using SharePoint Online, and I do not see any way to select "This List" as a search starting point.  Is there a web part that can do this?  Right now, when I am in a view and I use the "Find an item" box, it only finds items in that specific view, and does not return items that are in a different view.  Thank you!
Comment: Not sure about OOTB, but can be achieved via custom webpart
Comment: You could add path filter to your search query to restrict the results to only your list. Like {searchterm} path:{listurl}.
Comment: Rather than path you could also create a content type for the list. Then search on the Content Type.
Answer: If you want to search within page than there is a simple solution.
Add one CEWP above the list & put below code in it.
<code><script type="text/javascript">
function getElementsByCssClass(sTagName, sClassName) {
    var results = new Array();
    var allTagElements = document.getElementsByTagName(sTagName);
    for (i = 0; i < allTagElements.length; i++) {
        if(allTagElements[i].className == sClassName) results.push(allTagElements[i]);
    }
    return results;
}

function getTxt(obj) {
    if(obj.innerText) return obj.innerText;
    else return obj.textContent;
}

var lvRows = null;

function quickSearch(term) {
    if(lvRows == null) {
        var lvTable = getElementsByCssClass("table","ms-listviewtable")[0];
        lvRows = lvTable.childNodes[0].childNodes;
    }
    for(i = 1; i < lvRows.length; i++) {
        if(getTxt(lvRows[i]).toLowerCase().indexOf(term.toLowerCase()) > -1) {
            lvRows[i].style.display = "table-row";
        }
        else lvRows[i].style.display = 'none';
    }
}
</script>
Quick Search: <input type="text" onkeyup="quickSearch(this.value)" class="ms-long"/>
</code>
It is working in SP2010 on-premises. I haven't tried it on SP Online.
But i am sure that it will work after changing the variables/classnames in above code.
LIMITATIONS
It will search the item within the current page items like if your list shows 100 items per page than it will search from that 100 items only.


Linker to link Functions found in different Code space but same Flash

Question: I am using HCS08 micro-controller and Code Warrior as Development Environment.
I have 2 separate programs residing on the ROM (Bootloader and Application code).
I have some files/functions present in Bootlaoder Code and also required for my Application code but I do not want to duplicate these functions(are 3-4k bytes).
So, is there any way possible to use functions which are not part of Application code but are present in ROM. Is this think possible? Can linker be told something?
Answer: In general, yes, but the way you'd do this through the linker is likely to be toolset specific.  I've never used CodeWarrior for embedded development, but as an example using ARM's RVCT toolset, you could create a 'symdefs' file when you link the bootloader, and have the application code link against that file.
If you don't want to worry about toolset lock-in, then an option would be to use GNU's binutils to export a symbol table from your bootloader's executable (e.g. nm foo.exe > symtab.txt), run a script over the symbol table to convert it into a .h file of the form:
#define symbol_name_ADDR 0x00001efc

and call externally-defined functions through a mechanism like:
((void (*)(int arg)) symbol_name_ADDR)(12);

which is pretty ugly, but should get the job done.


Set Global Variable or Repetitively Call Function?

Question: My app has some UI elements that are based on some settings from the user and I am not sure how I should go about coding this for best performance and there doesn't seem to be a good way to Google this to try to find if this has been asked previously.
Basically I want to check for the App Version UI set in the settings and I currently do it via a function:
<code>public String appVersion() {
    appSettings = currentActivity.getSharedPreferences(APP_SETTINGS, 0);
    String prefAppVersion = appSettings.getString("appVersion", "v2");

    return prefAppVersion;
}
</code>
Then I will display certain UI elements via an if/else statement:
<code>  if (appVersion().equals("v2")) {
     // do something here
  }
  else {
     // do something else
  }
</code>
Is this going to cause memory problems if I call the function 5-6 times within my app (getting a SharedPreference over & over again) or am I better somehow declaring a global variable that gets the SharedPreference once and then uses that for the tests? My only concern with that being if the Preference changes and the UI needs to be redrawn if the variable is not reset.
Your thoughts / input is greatly appreciated.
Answer: I don't think the appVersion function will cause any memory problem, but maybe make appSettings as a local variable would be a better practice.
I don't understand the second question, do you mean how to know the preference being changed? SharedPreferences.OnSharedPreferenceChangeListener may help you.


How to open port 8080

Question: I need to check a Python server and client on the pi4B.
Only I can't find how to run or open port 8080 on the pi4B.
Comment: What makes you think the port is blocked? Is the Python server listening on all interfaces? How did you start the Python server?
Comment: port 8080 is not listening. So I would like to know how to activate port 8080 for listening
Comment: not a Raspberry Pi specific question ... it is a question about a Linux computer ... it belongs at https://unix.stackexchange.com/questions
Comment: This is not a Pi specific question but if you had supplied details you may have got an answer. Even on a more appropriate site you will need details.
Answer: Opening a port for listening is a system call, like opening a file, and like opening a file you do it in the program (server) code.  There is nothing else that needs doing unless you have configured a firewall, in which case you need to allow connections through appropriately.
It sounds a bit like you are trying to run the server and client on the same machine in which case the firewall issue is essentially mute (also, you would know if you were using one as they are not enabled by default on eg., RpiOS, or linux distros generally).
There are a couple of further caveats:

If you are running the client and server on the same system, binding to localhost or 127.0.0.1 is fine.  However, the port will not be accessible from outside. Ports exist per network interface, and those addresses represent the (non-physical) "local loopback" interface aka. lo in tool output such as ip link (or the deprecated ifconfig).  To bind the port on wlan0 and any other physical interface you should use INADDR_ANY/0.0.0.0 as explained in the python docs, which binds the port on all interfaces.  If you did not write the server code and are just running it, or you are using a web framework where you do not need to call bind() or listen() explicitly, this information may also be relevant.
If the port is not accessible, but the Pi's IP is (eg., because the port was only bound on localhost), the normal error is "Connection refused".  As explained here (scenario #3), this is a response from the operating system on the Pi indicating nothing is listening on the port.  Because of the exact wording ("refused"), people sometimes interpret this to mean the server is listening but the OS is denying the connection, and so something further must be done.  That is false.

To sum up: If the server is running and you are getting "Connection refused", either it is not using the port you think it is or it is only listening on loopback and you are trying to connect remotely.

How to open port 8080


TCP implementation

Question: Can one speed up TCP transmission of packets if the no.of bits in sequence field and no. Of bits in acknowledgement field are reduced ? If yes , then how much time is saved? Mathematical equations for solution would help.
Comment: That question is really pure speculation about a protocol that does not exist. Changing that would make it something other than TCP.
Comment: Why do you think this might be possible? Do you just ask out of the blue or do you have some specific idea on why this might work?
Answer: The sequence/ack fields need to be considerably larger than any possible send window to avoid ambiguity. If you redesign TCP with those fields reduced you end up with a small send window, resulting in poor performance with high bandwidth & high latency connections (LFNs).
The send window needs to be able to get as large as the product of bandwidth and round-trip time, or you limit throughput to window size divided by RTT.

TCP implementation


Why did Deborah start a relationship with Bailey?

Question: At the end of Once Upon a Time in America, when Noodles visits Deborah and asks her about Senator Bailey (who later turns out to be Max), she first denies to know him but shortly after we learn that she is indeed affiliated to him and even has a son with him (who indeed looks like the young Max).
But while I could understand that Max maybe above all other reasons just wanted to "steal" Deborah from Noodles out of his anger over his betrayal, I wonder what drove Deborah to him, given that she never had a high opinion about Noodles' way of life and especially his friend Max. What was her motivation to start a relationship with him, especially one that lasted so long and spawned a son?
Or is there any chance that she did not know about Bailey's true identity? Yet I think she had already seen (and known) Max back in the 30s. But maybe she only realized it later when she was already in a relation with him (since she seems to know it when Noodles visits her in the 60s).
Comment: Do any of these answers work for you? If not, what other information would you like?
Comment: @AndrewMartin They are all quite interesting, sure they work all in their own ways.
Answer: First, consider Max's motivation in snagging Deborah.  Throughout the film, Max is driven to sexually possess the women Noodles has already had.  During their initiation into the world of sex, Max insists that Noodles take Peggy first.  Years later, Max takes the woman Noodles raped, Carol, as his lover.  He even asks the prostitute in the hearse who gives Noodles "a roll" if she wants "a little pick me up."  Whether this indicates Max's latent homosexuality (quite possible considering he constantly refers to sodomy in his language, including during an early exchange with Noodles: "Drop your pants and I'll stick it to you again.") or merely stems from macho competition is open to interpretation, but one thing is clear: Max desires Noodles' women.  And possessing Deborah, Noodles' life-long romantic ideal, would be Max's crowning achievement.  He must have her and will go to any length necessary to make it happen.
Deborah might have been receptive to Max's initial advances partly out of revenge against Noodles for raping her.  But more importantly, Max, unlike Noodles, is the kind of man Deborah would respect.  He may have started out as a poor immigrant, but, unlike Noodles, he is a man of ambition with big plans for himself.  Max reinvents himself, literally assuming a new identity, and becomes just the kind of successful, upwardly mobile type that would attract Deborah.  Noodles himself points out the similarity of the pair when he complains to Deborah, "You's twos are just alike – that's why you hate each other so much."  Deborah and Max, for all their apparent antipathy, share the same values for wealth and fame – in Deborah's words "making it to the top."  By contrast, Noodles is a self-described loser whose lack of ambition is held in contempt by both Deborah ("you'll always be a two-bit punk") and Max ("You'll carry the stink of the streets for the rest of your life").
Just as Deborah is willing to give up the one person she's ever loved to pursue her dreams of stardom, so Max is willing to sacrifice his boyhood friends to facilitate his own ascendancy.  Both Max and Deborah, who is portrayed as narcissistic prima Donna, are willing to do whatever it takes to "get to the top."
Plus, the fairy-tale world Leone creates is so self-contained and hermetically sealed that the central characters barely interact with anyone other than each other and those immediately associated with them.  In this context, who else was Deborah going to end up with?
Comment: Welcome to [Movies & TV](http://movies.stackexchange.com/tour) and congratulations to an excellent first answer.
Answer: Unfortunately, the reasons are never really explained. There are a few possibilities, but nothing definitive.
Firstly, it's possible that after Noodles rape of her, she simply lost respect for herself and her body and simply decided that material riches were all she needed. She chose to be with Max/Bailey and take the financial security and comfort that relationship brings - not all that surprising given her background.
A second possibility is that the rape had nothing to do with it and she was simply attracted to the money. This is certainly the opinion of the FAQ part of one of the movie's fansites, Once Upon a Time in America.net, which states:

Why would Deborah ever willingly hook up with Mr Bailey?
Mr Bailey
is a multi millionaire, with valuable assets, a grand mansion  and a
son. I've no problem with this whatsoever. Deborah probably  isn't
madly in love with Bailey but as we get older other factors such  as
comfort and security become more important.

A third possibility I read in another article, which believed Deborah's motivations in the movie were always suspect:

As Max increasingly assimilates the values of capitalism however, his
use of prostitution changes. He later uses his status as Secretary
Bailey to acquire Deborah, in essence using wealth to "hoard" Noodles'
girl where he previously would have "shared the wealth". This act also
implies that Deborah, who has been built up as the "nice girl" in this
film, really differs from a hooker like Peggy only in price.

Ultimately, there is no correct answer and we can only made educated guesses. It seems highly unlikely Deborah didn't know Max's true identity. However, I also don't like the idea of her being simply attracted to money, as I hoped for better from her character. Therefore, I like to believe in the first theory - although we'll never know the "real" answer.
Comment: In fact the attraction to money doesn't sound so unfitting as she always seemed a little bit snobby to me. The biggest problem I had was her disliking of *Max*. But while those articles don't seem to address the question *if* she knew who he was, money and security might still provide the most reasonable motivation even if she knew.
Comment: The second article does mention the problem of some of the characters not recognising Max (although not explicitly stating Deborah) - but it does recognise this as one of the weakest parts of the film. More explanation really would have been good. In the absence of it, money and security sounds like a good enough reason.
Answer: Max and Deborah had one thing in common, they were both in love with Noodles.  Max always slept with the women that Noodles had had first.  Max's feelings towards Noodles were pseudo-homosexual, no doubt about it.  Max takes as his mistress Noodles' first 'rape' victim, Carol. And then years later he gets together with the love of Noddles' life, Deborah, who is also one of Noodles rape victims, but more of that later. Max is able to feel sexually close to Noodles by having sex with the women that Noodles has had sex with first (forced or otherwise). This is the closest thing to physical intimacy with Noodles that Max will ever get.
Noodles loves both Deborah and Max, but he feels more of a sense of loyalty to Max and this is why he always chooses to stand by Max, even at the expense of Deborah. Twice in this film, both as a child and an adult, Deborah taunts Noodles with the words "Mama's calling.", meaning that Max wants Noodles at his side. Deborah is hurt that Noodles always chooses Max over her, and ultimately this is the REAL reason that she decides to follow her ambition and go to Chicago, she is angry and upset that SHE is not number one in Noodles loyalties and priorities, Max is and Deborah feels that she will always be competing with Max for the attention of Noodles. This is also the reason that Deborah and Max have never liked each other, they both love Noodles and there is a deep jealousy between them, because they BOTH want Noodles.
Max of course can never reveal to Noodles how he really feels about him, perhaps Max does not even realise himself that what he feels for Noodles is sexual love. This is the reason that utimately, Max and Deborah get together later in life, their shared love of Noodles is what draws them together, and keeps them together, despite the fact that they previously did not like each other. By being together it is as if they can keep alive their memories of Noodles and the deep love that they still both feel for him.
As for Noodles, he is a much simpler character (at least he is, compared to Deborah and Max).  Noodles is a thug, plain and simple. When he makes his fortune, he believes that this will convince Deborah to marry him and MAYBE she would have if he had been prepared to choose HER instead of Max and the gangster life-style; but Noodles is not a hugely intelligent individual and he blows his chance with Deborah by not putting her first.
He takes her on a date, and in the back of a limousine, Deborah tells Noodles she is going to Chicago in search of stardom.  Noodles is devastated, crushed. He has loved this girl since he was a kid, and finally, just when he thought she was within his reach, he is going to lose her again.  He is so deeply hurt, and so angry that his love is going to be leaving him, probably forever, that for a moment he is in the grip of some kind of madness.  Deborah is startled. She has never felt such anger and coldness from Noodles, and she doesn't like it, she wants them to part as friends so she leans in and gently kisses him. This is too much for Noodles, he is getting mixed signals from Deborah (he believes).  First she is rejecting him, and then she is kissing him. Noodles is confused......does Deborah want him to make love to her?
Now remember, Noodles is not very intelligent, and he has been brought up with absolutely no idea of how to treat women.  He has spent his most formative years in a borstal and a prison, and he himself committed an act of murder when he was little more than a child.  His experiences with women have been limited to  prostitutes or with women like Carol, the blonde cashier who encouraged him to rape her because she is a masochist who enjoys extremely rough sex; the scene in which Carol entices and provokes Noodles in to raping her ends with her having a screaming orgasm. So now we have Noodles in the back of a Limo with the pure and innocent Deborah, and he is thinking that she is 'asking for it' as well.....and so he rapes her in the most brutal and horrific fashion. But he discovers that Deborah is most certainly not like Carol, or the young prostitute Peggy, Deborah is definitely NOT ejoying what is happening, Deborah is certainly screaming, but not with pleasure.  Noodles is genuinely puzzled by Debbie's 'strange' reaction, and this is why he carries on with the ghastly rape, he figures that if he 'keeps going' and 'gives her a bit more' she will start to enjoy it like Carol did, poor, ignorant, foolish Noodles.
Only later does he realise that he has ruined whatever chance he ever had with the love of his life by this one revolting and despicable act.  For her part, Deborah moves on with her life, but there is a part of her that will never stop loving him because she also realises, deep down, that Noodles has suffered more from the act of raping her than she herself has. Noodles life was in ruins from the moment he raped Deborah, and he was never truly happy again. He had hurt and violated the one person that he loved more than anyone else in the world and this is the reason that Deborah is very easy on him when he turns up in her dressing room all those years later, she doesn't scream or rage at him because she knows he has already suffered a life sentence of regret for what he did to her and she has finally forgiven him.
As for Max, he has wealth, fame, position, he has Deborah and they have a son together named David, who is undoubtedly named after Noodles, whose real name is of course David Aaronson. And yet, Max is not happy.  How can he be, when he betrayed the only person he has ever deeply and truly loved?  His friend and the love of his life, Noodles. This is the reason Max wants Noodles to kill him, it is his way of saying to Noodles, you can kill me for what I did to you but please forgive me first.
Comment: Welcome to [Movies & TV](http://movies.stackexchange.com/tour). Against the answer's discouragement to read it at all, I took the time to read your answer and introduce some much needed paragraphs (and punctuation other than ".....") in what turns out to actually be *a quite interesting and well-reasoned answer*, even if the second half, while equally interesting, might be a bit less relevant to the question asked. For future answers please consider writing them in a form that does not dilute their actually pretty good content. +2
Answer: I don't think there is a real answer in terms of the character, and I suppose we could imagine many scenarios since the "romance" occurred entirely offscreen. I think that it is beside the point, in terms of the writers of the film, what Deborah wants or what her point of view is. She was the hope of escape for Noodles, she was only important in terms of what she symbolized for him. His rape of her was his damnation. And the only reason she is married to Max in the future is to add tragedy and pathos to the betrayal of Noodles by Max.
The entire "old age" segment of the film has an eerie dreamlike quality, and I'm not sure it is supposed to seem realistic. Of course, there is the famous "it was an opium dream" theory supported by the fact that the movie ends on Noodles in the opium den in the past. One should also note that while Max and Noodles (and other characters) look noticably older, Deborah looks unchanged from 30 years before. I know this isn't an answer, but I think this storyline is more poetic and interpretive than something we are supposed to analyze from a character point of view.
Comment: While I wouldn't go as far as to think the 60s part was only a dream (and am not implying that you do), I still like your general approach. In fact *Deborah*'s unchanged age occurred to me, too, but did fit perfectly to the statements about that from *Noodles* and to her meaning for him. There is no problem with not giving a definite answer if you can provide reasons for why we're not supposed to give an answer, especially with such an admittedly slightly speculative question. So +1, too.
Answer: The "Look at yourself Noodles" scene is to me highly important, remember Noodles going and looking at himself in the mirror right after Deborah's humiliating comment. Deborah has dreams and ambitions, nowadays she will be called a Social Climber and that's clearly something that make her closer to Max: a sharp, bright, dominant but pertubated personality.
Comment: This is more of a comment and doesn't seem to answer the question.
Answer: The simple answer is that she needed a patron to allow her to act.  Max had the money she needed to live the lifestyle she wanted.  Max would exchange the money for sex.  The son was probably a mistake.  Neither of them wanted to disrupt their life, so they told the kid his mother died at childbirth.  Remember when he knocks on her door he doesn't call her Mom.  She's just a close friend of his Father.
The more complex answer is that everything that happens after Noodles informs on Max to prevent them all getting killed robbing the Federal Reserve is a dream in Noddles's mind.  Leone planned this film for years near the end of his life.  He wanted to create a film that was layered and would require multiple viewings to understand and appreciate.  So you have to view the film as factual until Noodles goes to the opium den to escape the reality that he killed his friends.  All the childhood scenes are used to tell us who the characters are and what motivates them.  The scenes in the 60s are all Noodles on opium and how his mind tries to make sense of things.  Max would have taken the money, hooked up with the unions, gotten rich, gone into politics, gotten old and eventually into trouble.  Deborah would have done what she needed to do to become the famous actress she dreamed of being.  She hooks up with Max because that is all Noodles knows.  She is a poor kid who will need money and Max will be the money man.  In his mind there's not a huge world with many characters and unlimited possibilities.  There's only the people he knows at the time he is smoking the opium.  Even the son of Max and Deborah is played by the same actor who played the role of Max as a teenager.  Noodles looks dignified in his dream.  He goes back to Deborah and she is calm and nice to him even though he raped her.  She still looks young and beautiful, but every other recurring character has grey hair and is older looking.
There are so many details that could be understood as just part of the story told chronologically in a straight forward manner.  However, they make more sense and tell a different story when analyzed as part of Noodles trying to reconcile what he knows happened with how he views himself.  Why did Max attack him?  The straight forward version as told by Carol is that Max wanted to go out in a blaze of glory so he shot it out with the Feds and they all died.  In Noodles's dream, Max conspired to fake his death so he could reinvent himself into a great and wealthy man.  In the end, Max wants Noodles to kill him and get revenge for ruining his life.  Noodles views himself as loyal and the better man so he refuses to even call him Max let alone kill him.
There are many layers to this movie once you view it as Sergio Leone's idea of how these people at this time in America would behave in the circumstances he created.  He gives us a clue that what we experienced on first viewing the film was not the whole truth.  He ends with Noodles in 1933 smiling after taking hits of opium to let us know it was a dream.  Now go back with that in mind and watch the movie again, and again!
Answer: It has become obvious to me after watching this movie many many times over and it's actually a very very very depressing take on life which makes it one of my favorite movies.
Deborah had lost interest for Noodles as a youth and entirely after he had raped her. In addition to that Max had been in competition for Noodles every score and position since the get go, from scores, sloppy seconds, cockblocking his Deborah. After his final mastermind plan of cutting all loose ends even his own identity by "dumping" Noodles making him turn on his friends and ultimately himself having hit out on Noodles his girl and Moe. Bagging Deborah was only cherry. He even admits the whole thing was a syndicate sting operation having his own body identified and living in Noodles' place...
Deborah probably had no involvement in this but Noodles' comparison of her to Max made an impression and that much more sweet and bitter betrayal for the both. Even naming their child DAVID. Deborah was always a good tease but her acting was always forced. And till the end she could not acknowledge her betrayal for the sake of memory. Maybe why Noodles never killed Max or Baily in the end. His memory betrayed HIM in the end. Making his integrity the prevailing SCORE of his destiny. Also the final image cut makes it Noodles' LAST laugh out of the betrayal.
Answer: Deborah loves Max's power and the possibilities as Mr. Bailey to advance in her career by being with him, when they met later after he betrayed and murdered his friends. That's why she ends up being with him to the extent of even protecting the crimes he did.
She is narcissistic and the love for Mr. Bailey is a narcissistic one. She may love Noodles, but her narcisstic impulses are stronger and since they had similar characters, this relationship had to work correspondingly.
Answer: The real answer lies in admitting to yourself that it doesn't make any sense that Deborah would end up with Max.
It lies in the interactions between Noodles and Deborah in the dressing room, in seeing the way the scene is framed (through a mirror, with her makeup on). The last time Noodles was with Deborah before, he was raping her. The exchange between them in the dressing room is fitting of a man that doesn't even really grasp what he had done to her, only that he is still pining after her in a way and has to come to terms with never being with her.
The hints to the movie itself (aside this question about Deborah).... lie in the anachronisms and the especially surreal moments that you witness in the scenes in and around Bailey's mansion.
I really don't like giving a blunt answer to movies like this one....but there's definitely some parts of this movie that should be raising some red flags.
Comment: You don't actually give a "blunt answer" at all here. ;-) You provide some neat insights but I'm not quite sure what it is you're trying to say with this answer. What "red flags"?
Comment: Oh I know, maybe I just phrased it poorly. I just mean that giving the blunt answer would be boring, so here I am giving "insights" which point a viewer in the direction of the answer. There are "red flags" in quite a few instances through the film, but the ones that I feel are deliberately...to the point of being obvious so as to stick out to the viewer are in those scenes that I mentioned(Bailey's mansion).  However, I did show this movie recently to my parents...and they just didn't think anything of it even when I pointed out the moments to watch.
Comment: But what are those red flags supposed to tell the viewer is what I don't quite gather from your answer. If they're obvious and red, what do they say?
Comment: The red flags are telling you that things don't add up. They don't make sense. Specifically, what you are seeing before your eyes doesn't make sense. On a narrative level, things kind of don't make sense either, but a lot of viewers simply accept it because it's what you're being spoonfed.
Comment: I would advise to rewatch the last half hour or so again of the film. Maybe even starting at when Noodles sees Deborah again at the dressing room until the end of the film.
Answer: Of course Deborah knew who Bailey, her life partner, was. In the dressing room she told noodles

Don't go back to that door and open it, rather go out the other way through the other exit door, otherwise you'll be transformed into a statue of salt.

She was referring to the biblical scene. Lot's wife, as they all grew up in a religious Jewish environment when they were kids (especially her). She told him that because she knew exactly Noodles would recognize Senator Bailey's son, David (names after Noodles), as looking just the same as Max when they were kids. Noodles would realize he'd been betrayed by both, Deborah and Max, like hardly anyone could be in his life.
Deborah knew how this would devastate Noodles, felt ashamed and disgusted by herself (finally...) and literally begged and pled Noodles several times not to go back to that door and open it.

Now we are old, and all we have are our memories. If you open that door, you won't even have your memories anymore.

A young man's voice calling "Mama" could be heard behind the door. Of course did Noodles open the door and see the young man looking exactly like Max when he was a kid. She said,

This is Senator Bailey's son. His name is David.
Comment: That's all well and good, but it doesn't really seem to adress the actual question why Deborah would engage with Max.
Answer: It's all a dream...so there's no real answer. I agree with Max's latent homosexuality in way... It's all Noodles making up a 'happy' ending for everyone - so to speak. He died in the opium den. The Hoods got him and killed him. Everything right before the old man hands him a drink, that's the end of the movie - and everything after is an opium dream.
Answer: It's definitely a pipe dream. Deborah doesn't agree after 1933. It's hard when you are young to visualize someone you are crazy about getting old so Noodles couldn't visualize it like he did for everyone else. Also Max was a known figure. Photos of him had to exist so how could Noodles have not ever seen a photo of Max after he allegedly died? All Max did was change his name not his appearance. There's no way he just changed his name and nobody else realized it including Moe. Just done major government official who happens to look like an older version of Max? So it has to be a pipe dream and the movie ends in the opium den.


How can potassium hydroxide be prepared from available potassium chloride and quick lime

Question: I live in a small town where Potassium hydroxide is not readily available. (I need above for preparing liquid soap.) But Potassium chloride ($\ce{KCl}$) and Quick Lime ($\ce{CaO}$) are available as fertilizer and White-wash ingredients respectively. Can $\ce{KOH}$ be prepared from above ingredients? What will be reaction conditions?
Comment: Any crudely prepared KOH will pose a lot of problems. Calcium forms scum.
Answer: Mixing $\ce{KCl + CaO}$, or $\ce{KCl + Ca(OH)2}$, will never produce pure $\ce{KOH}$ without $\ce{Ca(OH)2}$. And this Ca(OH)2 will prevent soap from being synthesized out of oil, as $\ce{(Ca(OH)2}$s destroy soap in case a little bit of soap has been synthesized. The only way of producing $\ce{KOH}$ out of $\ce{CaO}$ or $\ce{Ca(OH)2}$ is to mix it with potassium carbonate $\ce{K2CO3}$. Of course $\ce{Ca(OH)2}$ is not very soluble in water. But $\ce{CaCO3}$ is still more insoluble. So the following reaction is possible :$$\ce{Ca(OH)2 + K2CO3 -> 2 KOH + CaCO3(s)}$$ And the insoluble $\ce{CaCO3}$ can be filtrated to produce a KOH solution
Answer: Isn't potassium carbonate available as fertilizer? It's a lot more common. Then it would be a simple matter of mixing $\ce{CaO}$ with water and adding $\ce{K2CO3}$. Eventually you'd be left with solid $\ce{CaCO3}$ and $\ce{KOH}$ in solution.
Comment: A big limitation with this method is calcium hydroxide is not readily soluble in water.  You might get a gram or a few grams per liter into solution at thd start, but if you allow hydroxide ions to accumulate in the water then the solubility equilibrium shifts and the calcium hydroxide dissolution is choked off.
Comment: historically potash lye was made by leaching the ash containing these two reactants, continously collecting the koh solution. Perhaps this works by preventing the equillibrium shift as hydroxide ions don't accumulate


Web Part or Custom .aspx Page for SharePoint

Question: I am new to SharePoint.
I am confused on whether to use WebParts or custom.aspx page for custom development. Which is the better option out of the two? And why?
Also, what are the merits and demerits of both?
Answer: If by custom .aspx page you mean Application page than obvious difference is that application page will have URL like http://sharepointsite/_layouts/YourSolution/ApplicationPage.aspx. And these application pages are shared between different Web Applications (not specific to a Web Application).
On the other side you can built reusable Web Parts and use it for more than one tasks / more than one page. You can drop Web Parts on any Publishing / Web Part page.
I personally feel Web Part development to be more flexible given that you can connect multiple Web Parts and define custom Web Part properties.
Comment: I'll just add this as a comment here since this is not an answer. A difference worth mentioning here is that you can access application pages (i.e. /_layouts pages) even without authentication to the site since it is for all the sites in that server. These are typically used to build custom login pages in FBA sites. If you add webparts to a page inside SharePoint, it obviously requires authentication and is tied to the site.
Comment: @Akhoy that is not true, you can create application pages with or without authentication. Please have a look at [SharePoint Application Page Security](https://sharepointgroup.wordpress.com/2012/05/08/sharepoint-application-page-security/)
Comment: Ofc. You can use custom code to implement authentication. But i was talking about deploying this page without the code. Without custom code, anybody will be able to access. I've seen people use application pages for hosting content only an authenticated user should see without the authentication code.


What types of functions in Joomla are analogous to Drupal hooks?

Question: Drupal has many hooks, such as hook_menu and hook_form. What are some functions in Joomla analogous to these?
Comment: Welcome to JSE. Could you please explain what you're trying to achieve on your Joomla site, then we'll be able to give you more of a definitive answer
Answer: In Drupal, a "hook can be thought of as an event listener in the sense that an event triggers an action" (see https://www.drupal.org/node/292  for a more detailed explanation).
In Joomla, I think the closest equivalent would be a "plugin". Plugins are also triggered by events. You can find a list of plugin events at: https://docs.joomla.org/Plugin/Events


Is it acceptable to include information in a poster that wasn't in the publication?

Question: The title pretty much speaks for itself. My supervisor and I (non-academics) submitted a paper to a professional conference and will be presenting a poster. The publication deadline was first, so we got the paper finished and submitted and are now working on the poster. My supervisor has given me feedback to include some figures in the poster that we didn't include in the paper. This seems weird to me. I would think that the poster should really just be a subset of the information in the paper and shouldn't add anything new. The "new" information isn't significant, just slightly different plots, but it still seemed odd to me. Am I right that this isn't standard?
Comment: It probably depends on the field and the particular conference, but for most accelerator physics conferences the important thing is that the poster or talk and the proceedings paper are both reasonably well described by the original version of the abstract.
Comment: Why not compare that to a newspaper, which might have a "stop press" item?

Should the paper drop that item, or include it with a label explaining it's new information, or what?
Answer: If you have new useful information, why not put it on the poster? The paper documents the state of the project at a specific point in time, but you have learned more. It even makes an easy excuse to discuss how the project is evolving and where you are going next with the people who show up at your poster (which is kind of the point of giving a poster, the talking that is).
Comment: In this case: by all means! The presentation of a poster can be geared differently than in a paper.
Comment: Good reasoning, though in this case the "new" information isn't actually new results. It's just a slightly different way of plotting the old information that we didn't include in the paper.
Answer: I don't see any issues with it at all. The latest information is probably most useful to anyone interested.
Some people will want to withhold some new actual results for a future paper of course, but that doesn't seem like the issue here.
Answer: Possibly this varies a bit by field, but I would not say there is anything wrong or weird about the poster content not matching the paper identically.
If you have new information: a better way of presenting the data, a newly recognized explanation for some result, a caveat that should moderate interpretation of the result, etc, you would be doing a disservice to the people visiting your poster to omit the best information.
There's also the issue that the format is different, and some aspects of figures/diagrams simply work better on a poster than they do in a paper, or vice-versa. People are viewing the information in a different way in a different medium. These days, it's also becoming more and more common (at least in my field) for people to use tablets and other devices to augment their posters and provide things like video or interactive displays that don't work in a PDF or printed paper.
Answer: Actually, adding new information -- if substantial -- can be seen as a breach of academic etiquette. Your poster paper was accepted (of course) on what was submitted. The reviewers agreed that it was sound. If you add something that would be stupid, this would reflect poorly on the conference.
In real life, posters are not considered publications, even in Computer Science, but just a means to lure graduate students to a conference (from the perspective of the organizers - been there, done that) and to get some feed-back and maybe make contacts from the point of few of the presenters.  Thus, poster presentations are not scrutinized as papers would be.
In your case, the change would be marginal, more a matter of presentation than of substance, so that you will be fine if you do so. Also, you are not in academia, so your actions will be judged with a lot more margin.
Comment: That is interesting. It never occured to me that this could be considered to be a bad action. For example last week I was at a conference where a poster presented work where not even the preprint was online yet and that was the most exciting poster for me (and most of my friends). Probably that depends a lot on the field.
Comment: Thanks for sharing that (+1). It is always good to know what might get oneself into troubles.
Comment: Of course, it depends a lot on the field. I know of some big guys in databases who were (informally) reprimanded for improving their paper between acceptance and publication at a conference.
Comment: In real life, posters are considered publications from the point of view of intellectual property, e.g. patents. Heck, presenting to a public forum of a dozen people is considered publication for IP purposes. It may be hard to prove that something was discussed verbally in such a forum, or that something was presented in a poster session that was not preserved, but it still amounts to publication for the purposes of patents.
Comment: *just a means to lure* - I hate it when magazines block quote themselves half a page before they say it. Even worse is a block quote taken out of context and *not even in the article*. The poster is at some level, click bait.
Answer: It depends on the nature and context of the addition. If it's telling the same story as the version that was approved, I wouldn't balk at a few extra figures or minor error fixes.
But if the new content makes a significant change to the story, or if there are potential conflicts of interest involved, that becomes more problematic.
As an example of where this kind of thing can go wrong, I once knew a senior researcher who had a heated disagreement with two junior colleagues on how to interpret some research data. Without getting into details, there were some major conflicts of interest involved - it was very much to his advantage and to that of his institute that the broader research community should accept his interpretation.
A few weeks later, the two juniors were fired for non-specific "operational reasons". Around the same time, Senior Researcher attended a conference where he presented a poster and talk. In these presentations he promoted his own interpretation of the data, and listed the two fired juniors as co-authors. By convention this would usually imply that they agreed with his interpretation.
In fact, they had never endorsed this content and only found out about it after the conference, whereupon they had to contact the organisers to request removal of their names.
Poster/talk presentations get more leeway than journal papers because it's nice to have the most current material at a conference, but that flexibility shouldn't be treated as a loophole for evading checks on material that the presenter can reasonably expect to be controversial.
If one's unsure, it might be an option to contact the conference organisers and give them a quick summary of intended changes from the accepted version.


When do I start contacting professors for PhD?

Question: Although I have seen a lot of questions similar to this, my situation is substantially different. I want to pursue a Ph.D. but since the deadlines are soon approaching for this academic year (most of the deadlines are in December) and due to my lack of readiness (partially due to my poor planning and busy schedule) in terms of not having written GRE and preparing my SOP and LORs, and most importantly not having contacted any professors yet, it is highly unlikely for me to pursue Ph.D. from fall 2020. Is there any chance universities accept students for Ph.D. for spring 2021? Furthermore, when should I start contacting professors i.e emailing them? Is it okay to start emailing them a year in advance?
P.S - I only have a bachelor's degree in engineering.I am currently working in a lab (mechatronics to be precise). I have done some research work but do not have any publications yet, although I am writing a patent on my work.
Comment: Is your question about a certain geographic region?
Comment: Not really, but I only have a bachelor's degree in engineering. I've heard that only the U.S and U.K accept a direct Ph.D. without masters (I prefer the former in this case). I wouldn't mind applying elsewhere if they don't require masters.
Comment: UK positions are advertised at all times of years, usually you don't really need to (actually, shouldn't) contact the professors until the positions are advertised, and can start at any time of the year (there are PhD students in my lab that started in January, April, August, September, and even early summer I think)
Answer: This really depends on the University and department.
European universities will more often accept PhD students at random times of the year. American ones are more standardized because a PhD student is actually more like a student than an employee and will therefore normally do courses (i.e. a masters as part of a PhD).
Since you don't have a masters yet, you may therefore need to apply for one of the more standardized programs that start in the fall.
But also consider that some universities (again mostly in Europe) will let you apply just a few months before the fall or even just a month. In such a scenario you will definitely need to be in touch with your supervisor before applying.
Aside from that, it makes sense to be in touch with your potential supervisor as early as possible since they can then get a better sense of who you are and it helps them see that you're specifically interested in them. But you need to individualize your email by reading some of their papers first.
Answer: I would be surprised if PhD programs admitted students in the Spring semester. at least as far as I know in the US there is a single application cycle each year.
So, as far as i understand it, if you can't pull off an application for Fall 2020 then you're essentially looking at applying for a Fall 2021 start. You'll have to wait for the next yearly cycle. Sorry.


Tools to preprocess a big data for dashboards?

Question: I have a complex dataset with more than 16M rows coming from pharmaceutical industry. Regarding the data, it is saved in a sql server with multiple (more than 400) relational tables. Data got several levels of hierachies like province, city, postal code, person, and antigens measures, etc. I would like to create many dashboards in order to observe the changes & trends happening. I can use Pentaho, R (shiny) or Tableau for this purpose. But the problem is data is so huge, and it take so long to process it with dashboard softwares. I have a choice of making cube and connect it to dashboard. My question here is whether there are  any other solutions that I can use instead of making a cube? I don't want to go through the hassle of making & maintaining a cube. I would like to use a software where I specify relationships between tables, so the aggregation/amalgamation happens smoothly and output processed tables that can connect  to dashboards. I hear Alteryx is one software that can do it for you (I haven't tried it myself, and it is an expensive one!). I understand this task needs two or more softwares/tools. Please share your input & experience. Please mention what tools do you use, size of your data, and how fast/efficient is the entire system, and other necessary details.
Answer: We have dashboards that show information about some processes, which have billions of rows in the database. It's not queried directly though, but instead from pre-aggregated data.
We have automated scripts running in database that populate the aggregated data tables specifically for dashboards. In most extreme cases the raw data is so large and comes in at such a high pace that there's a two-tier aggregation in place. First tier will de-normalize the data and 2nd tier will do the actual sum/count type of aggregation.
So you don't need two tools since you can do aggregation purely in database.
edit (answering question from comment): Our dashboards are in Tableau. Data is all in PostgreSQL databases. Automation is done with unix cronjob executing a database function. The function in turn queries which tasks it has to run and runs them. There is a few moving pieces to the whole system, but the architecture isn't too complicated. Write down your ideas and go talk to some architects / engineers - they will know the best way to approach this.
Comment: Thanks @LauriK for your comment. Would you mind elaborating what language or program that automated scripts are written on? I assume you have scripts written on sql. How do you automate them? what software your dashboards are made of? Please give a detailed example as I am trying to adopt something similar to what you have.
Comment: @JeanVids edited the answer.
Answer: I can't comment due to reputation, but you really need to tell us what version of SQL Server you are running, maybe some more information about how the data is structured and how you're pulling the data into these dashboard. Maybe even how long it's taking and what resources you have available that actually know what they are doing.
OLTP
That said, it sounds like you have a OLTP database with lots of tables. As I don't know the relationships of these tables or how you are pulling the data from these tables, I can only assume you are pulling data from many of these tables. If optimizing the tables is not helping due to how many joins and records you are pulling, then:
SQL Server Analysis Services
It sounds like you need to create a multidimensional database that can be used for reporting. SQL Server Analysis Services helps you do that by allowing you to define OLAP Cubes in many different structures from MOLAP to ROLAP.
Multidimensional Database (Data Warehousing)
Another way is creating a new database that is going to be the foundation for your multidimensional data. Therefore, you would need to create a complex ETL System within SQL Server that converts those 400 tables into facts and dimensions automatically on a daily basis and pushes it into your new database. This is a similar process to what SSAS is going to do for you when you define cubes in SQL Server.
Preaggregate Tables or Views
If you can't do that yourself, then another way is just building new tables in your database that are just preaggregates of the 400 tables that will be used for reporting. Basically established how you are reading the data for your dashboards and find ways to preaggregate that data into fewer tables before you actually pull it into a report.
Automation & Tools
This (as well building multidimensional data) is accomplished simply by creating stored procedures or SSIS packages and automating the process every day. Then Tableau, SSRS or whatever queries the new tables rather than the previous 400 tables that may be slowing the process.
Hire Someone, You Already Have The Tools
The last and final way is finding a tool that does the ETL for you. There are plenty of ETL vendors out there that can possibly address this problem. But keep in mind, you likely have all the tools you need to do this. You just need to hire the talent to do it either temporarily on contract or full-time.
If I had no knowledge of what I was doing in SQL, I would contract a ETL Developer, SQL Developer or BI Developer to help me. Because why buy another tool box when you already have a good tool box available to you?
Answer: In this situation, I use RapidMiner (RapidMiner). There a multiple solutions such as Hadoop and Radoop or RapidMiner cloud service etc.


How to get Limoncello to look cloudy

Question: I have been making Limoncello for about 3 years.  It tastes really good, but I can't get the cloudy appearance the Commercial product has.  Looking at recipes for "Creme di Limoncello" (which uses milk and cream), I am thinking of substituting some no fat milk for water in the simple syrup.
Does anyone have an opinion about this, or tried it?
Comment: Funny, we like our limoncello real clear. But there is a difference between limoncello, which is normally around 37% ABV, and limoncello creme liqueur, which is only around 20% ABV, and which falls more in line with other creme liqueurs.
Comment: I don't have solid answers- but milk seems not ideal. I've heard of brewers using a little regular flour to haze up a beer. Not sure if it will stay in suspension and work for limoncello.
Answer: Limoncello cloudiness comes from what is generally called Louching, where some of the oils that are soluble in alcohol but not in water come out of solution as it is diluted. If your limoncello isn't cloudy, its because it either doesn't have enough of these oils, or isn't low enough proof, or some combination of the two factors.
Comment: This is correct. Louching is generally seen as a mark of a low quality product because of it's low ABV.
Answer: If you start steeping lemons in 96% pure alcohol and let it sit for 3 weeks, the alcohol will also strip the oils from the lemon peel. The water in the sugar syrup that you add later will make the limoncello cloudy. If you make limoncello from vodka and let it steep for 3 weeks, the water in the vodka will stop the oil extraction and your limoncello will stay clear. That's why making limoncello always starts with pure alcohol.
Answer: I had a very hard time finding Everclear which my recipe called for so I did find 151 proof vodka and I use that all the time. I just found out that you want limoncello to be cloudy. I let my infusion sit for 6 to 8 weeks before I add my simple syrup once I add the syrup to the infusion it clouds perfectly. I am only using coffee filters right now to filter out the infusion so there's no solids.

How to get Limoncello to look cloudy


Activation energy vs temperature

Question: We know that activation energy is independent of temperature. But during the dehydration of alcohol or any reaction, activation reaction can be increased by following the thermodynamically controlled product, which is favourable at high temperature. So how is it possible?
Comment: The thermodynamically controlled product is irrelevant to activation energy.
Answer: There are two misconceptions in the OP's question

We know that activation energy is independent of temperature.

This is not true in general. Granted, over fairly small temperature intervals (for example, going from zero to hundred degrees Celsius is only about 25% change in absolute temperature terms) Arrhenius plots mostly show a fairly straight line (i.e. constant activation energy). However, there are examples of significant non-Arrhenius behavior, e.g. https://pubs.acs.org/doi/pdf/10.1021/j100310a026.
See also: Is activation energy temperature-independent?

[...] activation reaction can be increased by following the thermodynamically controlled product, which is favourable at high temperature

As pointed out by Ivan in the comments, once you have a thermodnamically controlled product, the kinetics no longer determine the outcome. So the explanation for the different product ratios is not that the activation energies of the two competing reactions have different temperature dependence; instead, at the high temperatures the reverse reactions also take place, and the product of lower Gibbs energy forms (i.e. the product ratio is determined by the equilibrium constants of the two processes).
Answer: Activation energy is an experimental result, obtained from the slope of the log of the rate constant vs $1/T$. It is usually determined over a rather small domain of temperature, much less than $100\ \mathrm{^\circ C}$. Who knows whether this slope is dependent on $T$, if it could be measured between, say, $10\ \mathrm K$ and $1000\ \mathrm K$?

Activation energy vs temperature


Where can I find a list of online Esperanto Magazines?

Question: I know Monato; are there any other online magazines? And if so, where can I find an (exhaustive) list?
Comment: This site has a list of Esperanto material for a variety of categories: http://www.liberalibrejo.com/
Answer: Not an exhaustive list, but there is a list of magazines you can subscribe to through UEA.
A subset of those are also available through the Esperanto Association of Britain, as well as through Esperanto-USA.
Answer: For french speaker, the association Espéranto-France put his revue on the net :
http://esperanto-france.org/le-monde-de-l-esperanto
You'll found some article in esperanto and others in french.
Answer: Monato is a paper magazine. There are many online
magazines, not so easy to find.
La Esperanto-centro: EVENTOJ.
In this web page you can find several publications.
http://eventoj.hu/
RET-INFO – Retpoŝta Esperanto-novaĵservo!
(They will send it to you)
EVENTOJ - plena arkivo,
all the magazines published between 1992 and 2002.
Juna Amiko – arkivo de 40 jaroj, all the magazines between 1974 and 2014. The paper version of this magazine is still being published. They will keep adding them ... 2 years late.
Internacia Scienca Asocio Esperantista, ISAE - kaj Scienca Revuo. Some articles from the paper science magazine.
Faka literaturo en Esperanto, S.T.E.B, huge collection of science books and articles, by subject.
La Karavelo, you can download 27 issues:
http://joaojosesantos.net/revuoj_eo.html
Comment: MONATO is not just a paper magazine. It exists also as PDF, as ePub for mobile phones and all the articles appear online even before the paper magazine is sent to the readers. For reference you can check http://www.monato.net/pdf/
Answer: Here you have a list of the most probably known with a little description, although in Spanish: revistas en esperanto.
Also, it is linked a catalogue of Catalan Esperanto Association in this article.
Answer: A very good one is "La ondo de Esperanto" - http://esperanto-ondo.ru/Libroj/Libroj.php
Some free samples of the best well known you can find here:http://dvd.ikso.net/pagxo/eo/revuo.html
Answer: There is also a quite new magazine made by membres of the Telegram "Esperantujo" group, named Umujo :
https://drive.google.com/drive/folders/0BwWhyDWcKt2VdWw5aTZ1b0Y4dGc


Real time Venue push "Your app can't see pushes from that venue"

Question: I'm working with real time venue API for some customers.
I am the owner of the app, the user is a Brand page and has authorized the app, the Brand page is manager of the venues.
I don't know why some apps work fine and some others don't work.
All looks like identical among the apps, but with some of them I get a message "Your app can't see pushes from that venue" while the test push works fine.
Any suggestion?
Thanks
Answer: Don't know if you were able to find an answer. I'll be writing how I solved mine.
I was having trouble on understanding why "Your app can't see pushes from that venue" was appearing even though I've been connecting the user and receiving an access token.
For venue managers, there are actually two accounts in one. First is the manager, and the second is a personal account.
When registering for app, I've been using the manager. Though the venue list api was answering with a full list, real time push was not sending any test for any venues.
Then I tried to register with the personal app, the same venue list is received and Foursquare api began giving permission to me for testing/capturing checkins.


the PHP variable handling function, serialize()

Question: First off I've read the PHP manual, I've tested it out.
Second I still don't understand what it really does?
Why would I want to serialize a variable?
Comment: http://en.wikipedia.org/wiki/Serialization
Comment: I sort of get that it generates the type and structure, e.g s:12:"hello, world";
but why would I use it? and what instances would I use it in?
Answer: On reason might be to store the value in a text file, or a database.
serialize() converts non-text values to text (such as binary integer or float values), so that they can easily be stored in this format, and easily converted back with unserialize()... if you actually look at a session file, that's the $_SESSION array stored as a serialized string that can easily be converted back to the $_SESSION array when you do session_start().
Answer: You probably wouldn't want to serialise a variable as such, but it is useful to serialise objects and other complex data structures.
Instead of creating a database table with loads of columns, create a table with a primary key and a blob and serialise a class or array into it. That way you have an infinitly flexible system where if you need to add new data to the database table you don't have to add more columns.
This is one silly example, but persisting objects into a database is seriously useful if you think about it.
Comment: That's not a great example, IMO.  Storing data as a serialised string in a database means you can't use normal database queries on it. It's occasionally useful, but it's not the main utility of the function.
Comment: Thats why I said its one silly example, I find it useful to serialise a shopping cart object into a database so their shopping carts can easily be unserialised and made active, invoices generated or whatever.
Answer: Serializing a single variable doesn't make much sense. it's far more useful to serialize an array or an object:
$array = array(
     0 => 'hello',
     1 => 'there',
     'how' => 'are',
     'you' => '?'
);

$txt = serialize($array);
echo($txt); //

produces
a:4:{i:0;s:5:"hello";i:1;s:5:"there";s:3:"how";s:3:"are";s:3:"you";s:1:"?";}

You can take this text string, store it in a database, send it via email, stuff it into a text file, etc... then later retrieve it and turn it back into a PHP array with a simple unserialize() call.
Comment: What about encoding a serialised object and sending it to a remote web service instead of json or xml, or is that just crazy?
Comment: JSON and XML are far more universal in terms of support - I can't think of any web-aware language that doesn't support either directly or have a library to add the support. PHP's serialize is a bit more language-specific. Not to say you can't consume such a string in (say) Java or C#, but since you're going cross-language, might as well use something more suited like XML/JSON.
Comment: True, this would only be useful if you were creating your own distributed system rather than a web service.
Answer: Serializing a variable means "converting it to a string".  Basically, it is a way of converting a variable into a form that can be easily stored for future use.
Imagine this situation: you have an array containing lots of information.  You need to store it in a text file to be ready for the next time you need it.  By default, converting an array to a string has unexpected results.  For instance, doing this:
file_put_contents('file.txt', array('foo', 'bar'));

puts the string foobar into your text file.  You can't easily convert that back into the array.  serialize converts the array to this:
file_put_contents('file.txt', serialize(array('foo', 'bar')));
// a:2:{i:0;s:3:"foo";i:1;s:3:"bar";}

That isn't easy to read, but the unserialize function can convert it back into the array very easily.
Answer: The serialize function in PHP will convert a data structure into a storable string. Serialize data (e.g. a variable, array, or object) for storage in a database or other storage location.  Once unserialized, you can reuse this data later after retrieving it.  Here's an example:
$data = array("key"=>"value");
$serialized = serialize($data);

// Shows the serialized string representing the array:
// string(28) "a:1:{s:3:"key";s:5:"value";}"
var_dump($serialized);

$unserialized = unserialize($serialized);

// Shows the original array named $data:
// array(1) { ["key"]=>  string(5) "value" }
var_dump($unserialized);

Answer: It writes the variable in a form capable of being transfered and stored. For example, you must serialize a variable before writing it in a file, in a database or simply for storing it in HTTP session


What are the differences between Defense of the Ancients (DotA) and League of Legends (LoL)?

Question: I played a lot to League of Legends (>1000 hours) and I am going to try DotA now. Speaking about gameplay only, it would be really helpful for a newbie knowing what are the main differences between Defense of the Ancients (DotA) and League of Legends (LoL)?
Comment: VTC as per [this meta](http://meta.gaming.stackexchange.com/questions/2853/whats-the-difference-between-fortresscraft-and-minecraft-who-cares)
Comment: VTC needs a reason that says: should be on Wikipedia.  Then again, they don't seem to like anything over there...
Answer: Some of the most noticeable changes that pertain to League of Legends:

Champion selection is limited to the "free to play" champions (which are rotated on a weekly basis) or the ones you have purchased using in game points (Influence points) or real life money (converted into Riot points).
Maximum level is 18. With the exception of (as of writing this) 2 champions, Udyr and Karma, this gives your Q, W, and E skills 5 levels, and your R ultimate 3 levels. For Udyr, as he has no true ult, but rather 4 basic skills, you could have a 5 5 5 3 setup, or a 5 5 4 4 setup, or any combination therein. For Karma, her ult is given at level 1 and never levels up, giving her Q, W and E skills 6 levels each.
No denying. This includes towers
as well as creeps/minions. You can still deny by keeping enemy champions out of the kill radius / prevent them from last hitting, but there is no "auto-attack your own minions" to deny.
No gold loss on death.
Towers hit a lot harder and do more
damage to you the longer they've been
hitting you, making early tower dives
a lot riskier and making towers much
safer to defend against.
You can kill the enemy base/nexus
without having to kill the 3 inner
lane turrets. You still must kill the
2 nexus towers first, however.
The ranged/melee barracks have been
merged into a single building called
an inhibitor, and instead of
bolstering the melee/ranged minions
in that lane when destroyed, it
instead makes a single, powerful
melee unit spawn with every wave.
Inhibitors respawn over time.
There are far fewer "active" items
(click to use) and the focus is more
on increasing your passive stats.
Every champion has a passive ability
that is somewhat integral to their
playstyle or their character flavor.
These passives are always active and
require no skill points. For example,
the champion Zilean increases all
allies' experience gain by 8% always. A more active example would be the character LeBlanc, who spawns a mirror image whenever she drops below 40% HP (occuring at most once per minute).
There is a 3v3 as well as a 5v5 map,
meaning there are two separate
meta-games to identify (though most
people play 5v5).
Some of the larger neutral creeps
provide passive buffs that provide a
visual effect as well as a bonus to
attributes. For example, the Golem
buff provides mana/energy
regeneration and cool down reduction.
There is a large neutral creep called
the dragon that provides teamwide
gold and experience. This is often
contested through the mid-late game
and is a prime target for jungler
champions to kill.
The "boss" neutral creep (Baron
Nashtor) does not provide an item
(like Token of Life), but rather
teamwide gold/exp and a passive buff
that greatly increases
health/mana/energy regen as well as
additional attack damage and ability
power.
You get to choose 2 additional
"Summoner Abilities" that are
universal regardless of what champion
you pick. Some examples of these are
Ghost (temporary speed boost and
unitwalking), Flash (short range
teleport), Ignite (scaling damage
with a DoT and reduced healing/regen
component), and Clairvoyance (short
cooldown, small radius map reveal).
There are others too, of course.
No river runes.
You may passively increase your
champions' stats by purchasing
"Runes" outside of the actual in-game
interface. These runes are purchased
using points you earn by playing
games (winning or losing).
Additionally, you may increase your champions stats / enhance your "Summoner Abilities" / provide passive effects through the mastery system. The mastery system is a simplified version of a talent tree (akin to Diablo 2, World of Warcraft, etc.) with points being earned as you level your summoner (your account), which is done by simply playing games.
Ability to return to base (free, no need to buy it, no item slot taken, no cooldown)
Improved juking - instead of sneaky paths between trees there is "brush" (bushes/grass) system - brush blocks line of sight of those outside it and provides bonuses to some champions/heroes
Map is symmetrical with the exception of the placement of the Dragon and Baron "boss" creeps.
Shields system - damage shields are dynamically displayed as a gray extension of the healthbars. Purple extensions indicate magic-only shields.
It's possible to bind smartcasts (cast instantly on keypress on the area the cursor is hovering over, not on an additional mouse click)
No secret shops or outposts. All items are purchased at the base shop.
The Shop's combination items are displayed in a tree, making it easy to see which items combine into what.

I'll add more as I think of more. Hope this is a good start for you!
Comment: Pretty Comprehensive;  I'd add the hero selection being more limited unless you unlock heroes.
Comment: @Drake Not sure in DOTA, honestly, but I believe so. In HON you can. In LoL you cannot.
Comment: @Drake Only for consumable and some regeneration items, and they can't upgrade those items. It's mostly just sharing for the laning phase, not buying for use.
Comment: You might want to make it clear what game you are talking about, TheQ.  Also, I don't think it's correct to say Denying isn't present in LoL, since you can still deny last hits via smart harassment and of course summoner kills.  But there's no "active" deny where you last hit your own creeps.
Comment: @GWL Good point. I wouldn't say that falls under "gameplay" as Drake requested, but I'll add it anyway.
Comment: @peacedog I'll add in that I'm referring to LoL, and while you're correct about denying in that regard, I think that term is mostly reserved for the active form of killing your own creeps. I'll add in a clause there.
Comment: @TheQ Do you know if in DOTA you can buy an item and then give it to one of your teammates?
Comment: @TheQ Link is dead, Riot probably didn't want it to be explicitly clear to its users that they are the copy, not the other way around. -.-
Comment: @Decency Thanks for the heads up, removing said link.
Comment: This seems a bit like it's written for people who already know a lot about DotA, but I'd like to know more about what DotA does.  What is a river rune?
Answer: Riot's own words. since removed
Updated link: http://web.archive.org/web/20110803192258/http://na.leagueoflegends.com/learn/dota_and_lol
The two games are mostly very similar -- Riot wanted to make a game very much like DotA but on a standalone engine. The Warcraft 3 map engine provided many limitations in creating a balanced experience, such as handling disconnects, rage quitting penalties, etc.
Comment: Thank you for the link, useful but I would like to hear the voice of people that played both in order to understand big but even small differences about gameplay between these two games.
Comment: @Drake understood; unfortunately I only play LoL, having had very limited experience with DotA.


Short story about alien atmosphere invading earth

Question: Does anyone remember a short story about a hollow sphere containing alien atmosphere that crashes on earth and the earth's atmosphere fights back? There were no people or aliens in it, just atmospheres.
Comment: Definitely a story with atmosphere! Yes, I remember this story a little... There was a peculiar smell from the broken sphere, but nothing obvious. Clouds surround the alien atmosphere, which makes it visible as an amoeboid form that the Earth's atmosphere crushes as if a giant fist had come down. The storm dies down quickly after that. But there must have been people in the story to witness the events that were so much larger than they were. Probably anthologized in the 1960s or 1970s. Can you remember any further details, even something like the cover and whether it was in a book or magazine?
Comment: Do you remember the approximate time (even the decade) when you read it? That could narrow the search.
Comment: No I don't remember any more details about the story but it was probably in a book because I was reading everything in the local library at the time.
Comment: The time line was probably the mid to late 70's.
Answer: This imaginative story is "Storm Warning" by Donald A. Wollheim, first published in 1942 and anthologized several times from 1949 to 1979, then not again till 2012 and 2016. Trent Walters provided this description in the APB-SAL blog in 2014:

The narrator and Ed, meteorologists, head out to Wyoming to check out a meteor and unusual storms, one after another.  The researchers discover glass globes instead of a meteor and strange, vegetative air you'd smell on a warm day... except it was cold.  They spy something glassy a ways away.
Spoiler The meteors are glass bubbles, leaking alien air. Aliens are converting our atmosphere into something more comfortable for them.
Funky fun speculation:  The tale proposes water as a source of life,
rather than an excellent solvent and transport medium.  Earth's air
and this alien air duke it out for supremacy.  Perhaps this is the
source of storms, epic battles waged without our knowing.  The science
is a little wonky although maybe less so when it was published.
The story ends on "That's what I think." which is either a blemished
ending or calls into question what's been said, which makes sense for
the odd science hypotheses, but then it's hard to tell what occurred
otherwise.  If there's an unreliable narrator, some alternate theory
(theories) should be supplied.

You can read the story in the Internet Archive here, though under the pseudonym Millard Verne Gordon.
If you think this is correct, please click on the check mark to indicate that.
Comment: Is this the one where monstrous storms form and send gale-force winds against a force field that the aliens form, battering it again and again until it is reduced and ultimately dispersed?
Comment: @DavidW Yes, it is.


Mediator pattern vs Publish/Subscribe

Question: Can someone point out the main differences between the two?
It seems that, at least conceptually, the two are very closely related. If I were to hazard a guess, I would say that the publish/subscribe method is a subset of the mediator pattern (since the mediator need not necessarily be used in the publish/subscribe manner, but the latter seems to require a sort of mediator object). Is that anywhere near close to it?
Answer: How I would describe the difference is that in mediator you probably care if the end application receives the message. So you use this to guarantee who is receiving the message. Whereas with pub/sub you just publish your message. If there are any subscribers they will get it but you don't care.
Answer: According to this page, the publish-subscribe model is an implementation of the mediator pattern.
Edit
I should note that the design patterns are called "patterns" precisely because there are going to be differences among every implementation. They aren't so much a set of decreed, canonical forms as they are a collection of observations on how people already write software. So there really isn't any way for a design to "strictly" adhere to a design pattern.
Answer: The implementation could be the same, but logically they are different (The difference is simple, but it is hard to see).
I'll explain it in a simple way below.
Pratically, in the implementation of the Publish/Subscribe pattern you will have at least an object with the methods "publish" and "subscribe".
But you can have also more of them, so the communication between components is not centralized by definition.
In the implementation of the Mediator pattern you will have JUST ONE object with methods "publish" and "subscribe". So the communication is "centralized" by definition.
Answer: In the GoF book, publish/subscribe is known as the Observer Pattern. The Mediator Pattern can be implemented using the Observer Pattern; but that is not the only way to implement a Mediator. The book describes this on page 278.

Colleague-Mediator communication. Colleagues have to communicate with their mediator when an event of interest occurs. One approach is to implement the Mediator as an Observer using the Observer pattern. Colleague classes act as Subjects, sending notifications to the mediator whenever they change state. The mediator responds by propagating the effects of the change to other colleagues.
Another approach defines a specialized notification interface in Mediator that lets colleagues be more direct in their communication... When communicating with the mediator, a colleague passes itself as an argument, allowing the mediator to identify the sender.

Note that even when implementing a Mediator as an Observer, it is described as communicating only among its colleagues whereas an Observer in general would likely communicate with other objects as well.
Answer: I think one main point of difference is the context of the problem.
Although a problem could be solved with either pattern, the real concerns are:
1: "How much change to bring about by the events are dependent on the general context ?"
2: "How frequently are the listeners expected to change?"
The classical case for the mediator pattern best illustrates this where you have a complex UI with a lot of components and the updation on each has a complex inter-dependency on the state of other similar components.
Although you can solve this problem with the pub/sub pattern; wherein your components listen for events and contain the logic necessary to update, the context object (along with the event) carry all necessary information. Here the advantage is obviously the proper encapsulation of logic pertaining to a component within itself. The downside is that if such components are supposed to change often then you have to replicate this logic fully in each new component you bring in.
To use a mediator is to introduce another layer and further abstract from the components. These components become thinner as they only deal with representation (UI look and feel) thus, become very easy to change. The only problem I have with this approach is that the updation logic now seems to spill to other components and any updation of the system would require one to change the component and the mediator if the component behavior is also to change.
That to me is the major dilemma/trade-off we need to solve. Please correct me if I haven't got anything correctly.

Mediator pattern vs Publish/Subscribe


Understanding enhancement bonus and masterworked

Question: Do I get that right? A masterworked weapon gives me a +1/0 Bonus which does not stack with the enchantment bonus (that is always on attack and damage). So if I want to enchant my weapon I would pay (2000 gp) for a +1 damage only.
So why would I use a masterworked weapon to enchant and not just a normal weapon?
Comment: [(You may want to revisit your own question.)](https://rpg.stackexchange.com/q/76125/8610)
Answer: A masterwork weapon is required
Only masterwork quality weapons and armors can be made magical:

Only a masterwork weapon can become a magic weapon, and the masterwork cost is added to the total cost to determine final market value.
Armor to be made into magic armor must be masterwork armor, and the masterwork cost is added to the base price to determine final market value.

Once you enchant your weapon magically, it is now a Magic Weapon, which comes with all benefits attached to it, like allowing your to hurt incorporeal creatures and bypassing damage reduction X/magic.
On top of that, you require a minimum +1 enhancement on your weapon so you can add other magical enchantments on it, like Flaming or Keen.
Answer: Yes.
A masterwork weapon is so finely crafted and balanced that it makes it easier to wield.
An enchantment bonus adds a extra edge on that finely wrought blade so it bites deeper.
You cannot enchant a regular sword. It must be masterwork first.
So your price would be a normal sword price, addition for it being masterwork, and add an enchantment on top of it.
Comment: Answers are better when you directly quote the rules like ShadowKras did in his. Adding links also helps improve the quality of answers.


Cloudcontrol user roles

Question: How can I authorize a new user to perform only selected tasks. In my spcial case I'd like to have a user who has more rights than "ReadOnly" but less than the next role "Admin", so the user can create workers. I need an user who can perform some tasks but isn't able to delete the app.
Answer: Currently there is only the role-model for user-permissions on cloudControl. So no way to define the permissions more specific.
But another way to prevent a user from deleting the app is adding the user to a specific deployment, not the app. Of course when you add him to the live-deployment the user can delete this one.

Cloudcontrol user roles


Editing vertex in QGIS 3

Question: I don`t manage to move a vertex. I read an answer on this question, but even though, I am not able to move it. And I am not able to prolong a line.
Answer: If you want to move a vertex you need to do start editing -> Select vertex tool -> select the vertex you want to move and move it:

Thanks to Matthias Kuhn who provided more details about the tool. In QGIS 3.x the behavior of the vertex tool is different from QGIS 2.x. In QGIS 3.x it is a click-click behavior, which means you need to click on the vertex that highlighted in red circle, then move the vertex (no need to keep holding the left mouse) and click again to release the vertex on the target location:

The advantage of this tool is that:

User clicks mouse button on a node,
Drags the node (mouse button is released all the time),
Clicks again to place the node (left click to accept, right click to
cancel the change),
Using Esc button will cancel the selected vertex.

In QGIS 2.x the behavior is different, it is a drag-drop behavior, which means you need to drag the vertex while keep holding the left mouse and drop it on the target location:

User presses the left mouse button on a node,
Drags the node (with mouse button still being pressed),
Releases the button to place the node,
Using Esc button will not cancel the selected vertex.

You can have full information about the change in vertex tool with animated illustrations from here: Improved Node Tool
Comment: It might be interesting to also stress the difference between the drag-and-drop behavior in QGIS 2 and the click-click behavior of the tool in QGIS 3.
Comment: See also https://github.com/qgis/QGIS-Enhancement-Proposals/issues/69 Press/Release vs Click/Click
Comment: Thanks for answering, but it does not work that way in my project... I select Start editing (pensil) and the vertex tool as shown above. Then I highlight the corner I want to move, it is then shown as a blue dot. But nothing happends when I click to replace it. The nod i not draged anywhere. I would also like to make a new nod between to exsisting nods, but I do not manage.
Comment: @MatthiasKuhn Thank you very much for your comment. I will update my answer to address the difference between ver. 2 & 3 tomorrow.
Comment: I also wonder ho wI can turn off and on snapping between layers.
Comment: I also have this problem - have you found a solution to it?

Editing vertex in QGIS 3


Can I use another company's code to rent a car, and use my credit card insurance?

Question: I plan to rent a car using my Friend's employee code. My credit card covers CDW( Collision Damage Waiver) and I think that's what the company covers too. So will my credit card cover the insurance just in case anything happens? Will it be a problem if I use my friend's code?
Comment: What are the rules for your friend's code? Is it allowed for other people to use it?
Comment: By providing his code for use by others, your friend is likely violating the terms of his employment. Too, the rental agency may enter the discount code in the computer, see that the code "owner" is not the renter, and refuse to apply the code, or just refuse the rental. This is not likely to end well.
Comment: @DavidSupportsMonica a lot of the corporate codes are floating around on the Internet, so you could find them without having a friend working there
Comment: @JonathanReez Well then it might work. Never tried it myself.
Comment: I recently made a car reservation using my employer's contract number with one of the large US car rental agencies.  In the reservation confirmation from the rental car company, it says they may request proof of employment by that employer to honor the contract terms and rate.  I will have proof of employment when I pick up my rental vehicle in case they ask for it, but if I were you, I wouldn't risk it.  Too many things could go wrong.
Answer: If you don't need the insurance, it is likely that no-one will care. However, my experience with company discount codes is that rental locations may ask for employee card or any other evidence of you actually being entitled to use the discount. I once had to allow the rental desk email me at my work email address to confirm.
If something does happen and you actually need that insurance - then you'll be in a lot of trouble. Your credit card will refuse to cover since your rental agreement would show CDW being included. But the rental company at that point will most definitely check if you were in fact entitled to use the discount, and will refuse to honor the contract CDW since you were not entitled to use the discount. As mentioned, your friend will get in trouble as well for sharing the code, and the company may get in trouble with the rental company for allowing this to happen.
Comment: You can refuse CDW coverage from the company even if your corporate code includes it, at least with Avis.
Comment: @JonathanReez actually my company has a contract with Avis, and if I use the discount code the CDW is added automatically and cannot be removed. Or so I've been told.
Comment: Interesting... I guess there's different contracts depending on the company.
Comment: There seem to be lots of different contracts. My company's corporate codes (both Avis and Hertz) resulted in CDW being automatically refused; the company instead provided a corporate credit card to use for insurance for business travel. I had no trouble using the code (for the discount) and my own card for personal travel.


Electromagnetic radiation of charges under accelerations

Question: If we shake a electron back and forth I understand how it radiates electromagnetic wave. But I do not understand how a charge going in circular path or accelerating in a straight line radiates. Please answer it and do not mark it as duplicate. Does only electron in simple harmonic motion radiate?
Comment: How do you understand it in the vibration case? Are you visualizing the oscillations of the wave to be in sync with these vibrations? If so, that is an incorrect image!
Comment: Hi Soumava Kundu. This is essentially the third time you ask the same question within 24 hours. Please don't repost a closed question in a new entry. Instead, you are supposed to edit the original question within the original entry.
Answer: Any acceleration of a charge leads to radiation.
 Shaking back and forth accelerates a charge.
 So does going in a circular path (the magnitude of the velocity remains constant but its direction changes, hence an acceleration).  Take a look at
 How and why do accelerating charges radiate electromagnetic radiation?
Answer:
If we shake a electron back and forth i understand how it radiates electromagnetic wave...

Ask yourself for a while how you shake the electron forth and back. Finished? Now compare with the next explanation.
To shake an electron one has to use for example an alternating electric field. Switching on the field in the arbitrary direction "- +", the potential energy of this field over goes to the electron and accelerates the electron. The electron gain kinetic energy. switching than on the electric field in the direction "+ -" the electron is braked and the difference in the kinetic energy has to go somewhere. It is an empirical fact that the electron's kinetic energy doesn't completely recuperate into the electric field - if at all - and the energy difference is emitted by photons. The electron radiates.

... but i do not understand how a charge going in circular path or accelerating in a straight line radiates

There are two possibilities to move a charge in circles. One can made a difficult device with a lot of electric fields and switch the fields on by one on and off. On get a n-gon path. Ore one came use a magnetic field which is setup perpendicular to the moving electron.
For the movement of charges in a magnetic field the explanation of the radiation is different from the above said. Read the last paragraphs of the mentioned by WAH question about How and why do accelerating charges radiate electromagnetic radiation?