Is it possible to get the type of a .Net object using javascript?

Question: I wrote a web application using ASP .Net MVC. One of the application's function is to return a list of objects, using json, to the webpage. However these objects are of different types. How can I determine the types of these objects using javascript?
Answer: There is no notion of object type in javascript. If you need that information for some kind of logic running client-side, then add a property returning type name to your objects, then check it in JS.
Answer: You can emit the type of the object within the json serialization on the ASP.NET / server side. But I guess you are using the standard json serializer, and I am not sure if it is tweakable to emit the output of instance.GetType().


How to enable cors spring boot jhipster

Question: I have an angular application which connects to my spring boot application which I generated with jhipster. When I send a post request I get this error:
Access to XMLHttpRequest at 'http://localhost:8081/api/materials-add' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I tried activating Cors in my Application.dev.yml and then start with dev Profile but it did not work.

I tried putting this method in my Configuration Class:
@Override
public void addCorsMappings(CorsRegistry registry) {
    registry.addMapping("/api/**").allowedMethods("GET", "POST", "PUT", "PATCH",
     "DELETE", "OPTIONS");
}

But still no success.
3.
@Bean
    public CorsFilter corsFilter() {
        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
        CorsConfiguration config = jHipsterProperties.getCors();
        if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) {
            log.debug("Registering CORS filter");
            source.registerCorsConfiguration("/api/**", config);
            source.registerCorsConfiguration("/management/**", config);
            source.registerCorsConfiguration("/v2/api-docs", config);
            source.registerCorsConfiguration("http://localhost:4200/**",config);
        }
        return new CorsFilter(source);
    }

This was a code which already existed I just added the last line with localhost:4200. But still no luck. Could someone help me or give me an advice what could I try next?
Intellij error:
2020-12-25 20:17:47.229  WARN 38287 --- [  XNIO-1 task-3] o.z.problem.spring.common.AdviceTraits   : Unauthorized: Full authentication is required to access this resource
2020-12-25 20:17:47.231  WARN 38287 --- [  XNIO-1 task-3] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource]

But I am logged in authorization via my gateway and my gateway and my Microservice both register in the same registry, so I should be authorized is this error due to CORS?
I just read this part in my application.dev.yml:
CORS is disabled by default on microservices, as you should access them through a gateway.
In my gateway I already allowed cors via the application.dev.yml like this:
cors:
    allowed-origins: '*'
    allowed-methods: '*'
    allowed-headers: '*'
    exposed-headers: 'Authorization,Link,X-Total-Count'
    allow-credentials: true
    max-age: 1800

Answer: I believe your problem is that
allowed-origins: '*' &
allow-credentials: true
cannot be used together, as that would be dangerously insecure.
See here for more details
https://portswigger.net/web-security/cors/access-control-allow-origin
Remove allow-credentials or specify http://localhost:8081 etc in place of the allowed-origins wildcard

How to enable cors spring boot jhipster


Plugin files not updated (cache cleared)

Question: I'm manually uploading a plugin that I created, but no changes take effect and the file editor shows no changes unless I change the filenames within the plugin. I've already tried doing this while disabling W3 Total Cache (the only caching plugin I can find that's running). Can someone explain this behavior?
Answer: It is hard to advise on issues like that, since they are specific to your installation.
In a very general sense one of two categories of issues can cause it:

You are not doing what you think you are doing. An example would be placing files into wrong server/folder.
Your server is not doing what you think it is doing. An example would be PHP code loaded from (aggressively configured) opcode cache, instead of file system.

The thing with filenames makes me suspect latter case. You could try restarting server (just software of computer altogether) to see if its caches make a difference.
Comment: Thanks for the feedback. Unfortunately, in this situation, I don't actually own the server, but I'll talk to the owner and see how they configured the setup.


Difference between the Unity shell interface and a desktop environment

Question: I am writing a report and I have stumbled across a topic I am not quite sure how to to discuss. Essentially I have been doing a little research on the Unity shell system and its usage in Ubuntu primarily. I understand that Unity is a shell interface and that it runs with GNOME desktop environment. My question is in a broad description how does it do this is the shell interface simply how the user triggers certain programs to do certain tasks within the GNOME desktop environment? My questions stems from the fact that everywhere I have researched seems to compare GNOME and Unity yet how I understand it they serve different processes almost entirely. Am I missing something?
Comment: What makes you think they're different? A link to what you read might help clarify. Both Gnome and Unity are Desktop Environments and both also have their own shell. Are you talking about differences in architecture or design, or differences in the job they do?
Answer: Part of your confusion may be from the fact that GNOME has two parts, the shell (which is comparable to Unity), and the desktop environment (which Ubuntu uses with Unity).
Unity and the GNOME Shell are interfaces. The GNOME wiki explains it like this:

GNOME Shell provides core interface functions like switching windows, launching applications or see your notifications.

They are both just interfaces to control your applications and settings.
The GNOME desktop environment is (basically) a collection of applications. In addition to the specialized programs featured here, it also includes common applications like the file browser (Nautilus), terminal (GNOME Terminal), and others.


Would it be illegal outside of Russia to do mess with and troll their government and officials?

Question: EG black faxing their offices, catfishing governors and Duma members and judges to relieve them of their money, draining their bank accounts, causing general pandaemonium, etc, so as to be able to help Ukraine.
Answer: Presumably, many of the activities you describe ("draining their bank accounts") would come under the definition of fraud. Some countries are dragging their feet when it comes to the prosecution of computer fraud against victims abroad, but generally speaking, that is illegal. Others might come under various computer sabotage laws, while yet others (catfishing for emotional distress) may fall under stalking -- or be legal.
Your question seems to argue that the targets are "deserving victims" in some way, but most legal systems do not allow the perpetrator to make that decision.
One could also try to argue that cyberattacks are an act of war. International laws are still highly unsettled on that. If it was an act of war, it would not be for a private citizen to initiate it.
Comment: It's not under the idea of deserving victims so much but as a way to participate in a war that is already declared. Ukraine certainly declared war on Russia when the invasion commenced, so in at least that sense, the perpetrator is not making that decision and is just self mobilizing just as people did by sandbagging road barricades or demolishing bridges.
Comment: @R-Obsessive, most nations will get **really** upset if acts of war are perpetrated by their residents, from their territory, without government permission. If you want to help that way, go to Ukraine, apply for residency, join the armed forces.


Deletion of managed package

Question: I have uploaded a managed package in partner org for testing and have made two versions of it one is deprecate and other is undeprecate BUT now i want to delete this managed package from my development org because salesforce only one managed paackage.
How can i delete the managed package?
Comment: you have created managed package or you have installed managed package ?
Comment: i have created and for testing i have installed it on other org
Answer: Go to Setup -> Create -> Packages
Then, click on the name of the package, at top you will see delete button just click it and you can delete the package.
Comment: I have tried this but it gives this error
"This Package cannot be deleted because it has the following uploaded versions"
Version Number Version Name
1.0 Winter 2016
1.0 (Beta 2)         Winter 2016
1.0 (Beta 1)         Winter 2016

Deletion of managed package


Div bounces or rolls as you scroll down page

Question: I was looking at this site and also have seen other sites do it. Images, divs, contact buttons etc all either bounce or roll in as the viewport goes down. I have been looking all over for this script or a demo that I can download and use on my sites. Any thoughts? The site url is brdesignlab.com
Answer: If I understand what you mean then I think a jQuery plugin like Scrollorama might do the trick: http://plugins.jquery.com/Scrollorama/
There's a demo page link on the plugin page:
http://johnpolacek.github.io/scrollorama/


Is it possible to perform an OCR in certain area in a PDF with python?

Question: Is it possible to perform an OCR in certain area in a PDF with python? I am trying to build a program to extract some information from every PDF sheet like what Autodesk BIM360 do
Comment: The answer to "Is it possible to..." is yes as long as it's not self-inconsistent. [ask]
Answer: disclaimer: I am the author of borb (the library used in this answer)
borb is an open-source, pure Python PDF library that plays nice with other famous libraries. e.g. you can insert PIL images, or matplotlib charts, and you can use pytesseract to apply OCR to your document.
There is a large examples repository in case you want to learn more. You can find a working example of OCR there as well.
I'll repeat the example here for completeness:
#!chapter_007/src/snippet_005.py
def main():

    # set up everything for OCR
    tesseract_data_dir: Path = Path("/home/joris/Downloads/tessdata-master/")
    assert tesseract_data_dir.exists()
    l: OCRAsOptionalContentGroup = OCRAsOptionalContentGroup(tesseract_data_dir)

    # read Document
    doc: typing.Optional[Document] = None
    with open("output_001.pdf", "rb") as pdf_file_handle:
        doc = PDF.loads(pdf_file_handle, [l])

    assert doc is not None

    # store Document
    with open("output_002.pdf", "wb") as pdf_file_handle:
        PDF.dumps(pdf_file_handle, doc)

if __name__ == "__main__":
    main()

What's happening here is that the OCR process is dumping its results in an invisible layer of the PDF (these are called optional content groups). Hence the name OCRAsOptionalContentGroup.
Afterwards, you can store the Document again, and it will appear to contain text, youll be able to search it, select the text, and everything youre used to.


Why was lightning linked with firebending?

Question: In the Avatar world, why are Firebending and lightning generation linked?  In Western culture, it seems like air and lightning mesh better (weather phenomena), or perhaps water and lightning (a la Storm from the X-Men?).  From a science point-of-view, they're both plasmas, but is there some Eastern connection, or why did the creators connect the two?
Comment: Even as a "westerner", I see more in common between fire and lightning than between lightning and air/water. Just because things mesh well together (as you mention storms and Storm), doesn't mean it necessarily makes the best sense that they should share the same origin. But that's just my $0.02.
Comment: Waterbenders already got blood magic as a second ability, earth guys got ironbending and airbenders got flying. Would be unjust to leave the firefolk without a sub-bending.
Answer: Lightning is linked with firebending through many reasons.
But first you have to think what is fire and lightning:
Fire – a state, process, or instance of combustion in which fuel or other material is ignited and combined with oxygen, giving off light (same as the glow of lightning), heat, and flame.
Lightning – a brilliant electric (creates light) spark (fire) discharge in the atmosphere, occurring within a thundercloud, between clouds, or between a cloud and the ground.
Both fire and lightning are linked due to the flow of energy.  Fire, when has no fuel, ceases to exist.  While at the same time, lightning appears for seconds.
In the Indian culture fire was called Agni, and it had has three forms: fire, lightning and the sun.
In Avatar the Last Air Bender, lightning was considered "Cold-Blooded Fire".  And in several occasions (not just in the show), the lightning creates fire when it stuck the surface of a flammable object, let's say wood.
Also, Lightning and Fire burns.
Comment: Good catch on the Agni, probably the source of the phrase Agni Kai.  With the avatar verse rooted in many Asiatic cultures, though using Classical Hindu's and Tibetan philosophy's 4 physical elements as opposed to the 5 Chinese physical elements.  Also in Japanese Philosophy lightning is an extension of Ka, or fire chi.
Comment: It may also help to think about 1) Lightning and fire are both forms of energy (electric and thermal) and 2) Before they figured out how to make fire ourselves (without spirits), lightning strikes would have been a natural source of fire
Answer: Note that firebending is technically the bending of chi energy, chi energy leaves the body through the limbs as fire. Lightning bending is the separation of chi energies yin and yang, which create an imbalance. This causes the energies to come crashing back to each other, creating lightning.
Answer: There are 3 different main theories on how firebenders can bend lightning:

Firebenders bend Chi, which would also explain how in TLOK the firebender could detect a dark spirit.
Firebenders bend therno energy; this theory is o.k except though then that would mean firebenders are able to bend radiation.
Firebenders bend kinetic Energy; this makes sense except what else kinetic Energy is, it is essentially where the energy flows once an object makes contact with anything from solids to liquids, some kinetic energy goes to the object making contact the others go to the air and into the object that was made contact with. If the bender bent kinetic energy they could make their punch go only to the thing it is touching so you don't get hurt but the object gets severely damaged and vice versa if an Earthbender throws a rock at you or anybody hits you. But this is the most plausible because kinetic energy is powered by the sun, this would make sense on how the Day of The Black Moon affected the Firebenders, the moon gets it's glow from the reflection of the sun, on the eclipse the sun is completely blocked so that means no powers
Comment: Are you sure you mean "thermodynamics?"  It's not a concrete noun; it's like saying "firebenders bend eligibility."  You say this is well thought out; can you provide a reference?
Comment: thermodynamics
/ˌθəːmə(ʊ)dʌɪˈnamɪks/
Learn to pronounce
NOUN
the branch of physical science that deals with the relations between heat and other forms of energy (such as mechanical, electrical, or chemical energy), and, by extension, of the relationships between all forms of energy.
Comment: And also what I mean is they can bend what the work of Thermodynamics such as heat and temperature, and their relation to energy, work, radiation, and properties of matter
Answer: Both properties involve the excitation of atoms and the manipulation of thermal energy.
Answer: If you want to get into the science behind it, you should look up information on a device called a thermoelectric generator. LSS, in Avatar lore firebenders can turn themselves into thermoelectric generators, allowing them to convert heat into electricity and shoot lightning.
Rub your hands together and they warm up. Friction generates heat. Rub a certain material on shaggy carpet and you can generate an electrical charge. Bring the material close to a conductive metal and a bolt of lightning will shoot from the material to the metal. Kinetic energy can generate both heat and electricity. Theoretically, firebenders can create both heat and electrical charges through channeling energy through their cells or clothing and discharging the energy as fire or lightning.


What is the difference between "play speed" and "playback speed"?

Question: In my opinion, "playback" is just like "replay", am I right? But mostly people say "playback speed". I think they mean the play speed, why the "back" should be added behind "play"? What is the difference?
Comment: Identical question (not by this user) on [ELU](http://english.stackexchange.com/questions/30359/explanation-for-to-playback-media-content)
Comment: Here is the answer,it's provided by @Catija.
http://english.stackexchange.com/questions/30359/explanation-for-to-playback-media-content
Answer: :)
No, they are correct when they say playback.
In order to help you understand it, I'll try to explain how I intuitively understand it.
When you record something on a media, you are effectively putting stuff on it (video, audio, other files, ...). Then, at the moment when you want to consume the data, you will need to operate the device in order to make the device "give the content back to you" (your eyes, ears, or any other non-standard limbs you might have ;) ). So play-back, which implies that earlier in time a contrary operation (storing the content) took place.
Also usually we store stuff in an ordered way (i.e. a video is a set of many pictures ordered in time), so the expression "play it back" perhaps also comes from the implicit understanding that we need to go back to the start of it (yes, once you had to actually rewind a tape), before being able to play it..
Answer: "Playback" means :

the reproduction of previously recorded sounds or moving images.

This simply means "playing" an audio or video that was recorded earlier. Now the "back" can be edited in most contexts. It is simply used to show that the track was recorded earlier, or "long back". It's a form of replaying a piece of recording. Maybe that's why "back" is used. But there are occasions where you cannot replace "playback" with "re-play" or "play":

He was a renowned playback singer, back in the 80's.

Now, you cannot say 'he was a "play" singer'. That just sounds odd. Technically, it means the same - You record. You play, but they cannot be interchanged in all contexts.


Can 'should I be a parent?' be on-topic?

Question: I'm looking at this question, Should person with schizophrenia have children?, and wondering whether it can be modified somehow so as to make it on-topic on this site (and/or so as to give the OP the benefit of the experience or knowledge of some of this site's users).
Answer: I'd be pretty wary of any variation of "should I be a parent", since it's de facto opinion oriented. A site like Buddhism.SE is more able to handle questions involving should since it's rooted in a particular ethical/religious perspective, whereas Parenting.SE is open to any.
Comment: Yes (and thank you for answering). I wondered if there was any way to rephrase it to ask for useful or actionable advice in advance -- "Based on your experience, what should I anticipate, what mistakes should I avoid, in what circumstances can this fail or be successful?" -- but maybe that's too general (not asking for specific advice about a specific child/age/society), and/or too specific (e.g. varies too much depending on the would-be parent's condition).


Compiling tex with bib?

Question: I am new to using LaTeX and not that familiar with Linux either. I have written a LaTeX file and saved it as a .tex file using TexMaker. My prof sent me a .bib file, I guess as a sample for what my references section should look like, but I'm not sure how I can see it in PDF format. Am I supposed to compile my .tex and the .bib file together, so I can then see the whole thing as a PDF? If so, how do I do it?
Comment: Can you show us two entrys of this bib file?  Then perhaps we can see if `biblatex` is used by your prof or not.
Comment: Welcome to TeX.SE! This site works best if queries state specific concerns or problems and show what's been tried so far. LaTeX and friends (including BibTeX) do feature a bit of a learning curve for new users, and it's very important to become familiar with the terminology. It's probably a good idea to start with a basic introduction, such as the [The not so Short Introduction to LaTeX](http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf), in part because you'll have a better sense after going through this material what your specific questions may be.
Comment: For BibTeX, the book referred to in the previous comment, while still very useful for learning the basics of LaTeX, will not help you get started with BibTeX.  For that task, a good starting point is [*Tame the BeaST*](http://www.ctan.org/tex-archive/info/bibtex/tamethebeast).  If you are using TeX Live, the document may already be present on your computer and accessible with the command `texdoc ttb`.  It is not a comprehensive reference, but covers the essentials (minus `biblatex`, though, so you should confirm with your professor that s/he is using traditional BibTeX!).
Answer: Use the package natbib. If your professor has sent you the .bib file, you now have to tell the .tex document where to cite from.  You can add code like this to the bottom of your document, before \end{document}:
\bibliographystyle{chicago}
\bibliography{C:/Users/.../...}

Read up on how natbib and citing works.  You will have to change your citations to the bibtex key.  So for example, if you were previously writing Smith (1999), you would now insert the key, that could look something like
\cite{smith1999study}

Compiling tex with bib?


Is talking to non-mahrams/hanging out in public forbidden?

Question: Having friends of the opposite gender is haram on the basis that it may lead to Zina. However, what if the interactions one has is in public with lots of people or in a school environment where there is no place for intimacy and talking may also be done in groups etc (if the talking is not anything sexual/lust)?
Comment: Talking to teachers or other students etc is common. I personally also interact with females and communicate without any sense of lust or without any sexual desire. So I was wondering if it is haram because if there is no attraction or intimacy at all it is just like communicating to a male friend.
Comment: If anyone has an answer even if it's years late please post it I still want to know.
Comment: It depends on the situation. One should generally avoid talking with a nin-mahram woman, unless it is unavailable or with good intention (eg asking a scholar, helping someone in need). The scholars tend to advise against it because even though there be no intention of list, it can unintentionally lead to zina.
Comment: How can you unintentionally have sex? You have it because there is some sort of lust and if when talking there is no list or no form of romance then it is ok. Talking to the opposite engender is common here and I witness it on a daily basis as well as engage in it but I do so with no intention/form of lust/intimacy. If there was any I would walk away and if there is any sexual communication I would end the conversation at that. One must be well aware of their own abilities in suppressing their urges and if they can't then I'd understand why contact or communication with non Nathan's is haram.
Answer: Having friends of the opposite gender is haram on the basis that it may lead to Zina. -
This sentence is partly wrong. It is not due to the basis that it may lead to Zina, rather it is Zina. Take the following Hadith;
It was narrated from Abu Hurayrah that the Prophet (peace and blessings of Allaah be upon him) said: "Allaah has decreed for every son of Adam his share of zina, which he will inevitably commit. The zina of the eyes is looking, the zina of the tongue is speaking, one may wish and desire, and the private parts confirm that or deny it."
Narrated by al-Bukhaari, 5889; Muslim, 2657.
As you can see here, speaking is also Zina. As a result, there remains no scope for you to say that oh, i do not have any ill intention so i can speak. Rather it is Haram in Islam.
Allah says, ""And do not go near zina. It is indeed a shameful and an evil path."
(Surah Al Isrâ', Ayah 32)
Here, Allah didn't say to not commit zina, rather ordered not to even go near it.
An analogy of what this ayat means:
let us consider that you are the best circus shower of the country and you can actually do the rope trick without falling. that is, you can walk over only a rope without falling down losing balance. Then, is it permissible for you to put your life in danger walking through the rooftops ceiling considering the fact that you have 0.00001% possibility of falling down? NO! Islam does not allow oneself to endanger his own life by any means.
Similar to that, you cannot talk with opposite sex or interact with them, even though you are a saint. Watch this powerful video to understand this matter more clearly:
https://www.youtube.com/watch?v=sKeyTPv7xfc
But,  If the situation is like you need to interact with them for important works or job regarding situation, it is permissible, but then also in front of other people. But as you said, hanging out or talking without any need and just for passing the time is completely forbidden. Do not twist this any more.
Comment: The Hadith you mentioned above does not clarify in what manner the talking is haram it could be mentioning the use of profanity or in this case lust. Yes we are also told not to go near Zina but you are presuming that these forms of communication create a sense of intimacy/lust in a way that will lead to a sexual relationship which is incorrect. As I previously mentioned I am aware of my intent and am aware of what I can control if there was any sense of lust then I would leave however talking about homework or what's going on the news doesn't create intimacy especially when in groups
Comment: Having friends of the opposite gender is haram on the basis that it may lead to Zina but what will cause a loving/sexual relationship is the moments/acts of list within this relationship but it won't lead to Zina if there aren't any. Anyone who fears that he may commit it or feels any sense of lust must stop the conversation and try to avoid said person but what if there is no intimacy/desire it's wrong to say that there is when you are unaware of my intentions. Scholars say having friends of the opposite gender is haram because it may lead to Zina (due to intimacy)
Answer:
Then one of the two women came to him walking with shyness. She said,
"Indeed, my father invites you that he may reward you for having
watered for us." So when he came to him1 and related to him the story,
he said, "Fear not. You have escaped from the wrongdoing people."
Quran 28:25


How make FILE* from HANDLE in WinApi?

Question: Is there easy way to create FILE* from WinApi HANDLE which points to one end of pipe?
Something like we do in unix: fdopen(fd,<mode>);
Answer: You can do this but you have to do it in two steps. First, call _open_osfhandle() to get a C run-time file descriptor from a Win32 HANDLE value, then call _fdopen() to get a FILE* object from the file descriptor.
Comment: Does those function take ownership of the underlying handle, or should CloseHandle still be called?
Comment: @user877329: I think you still need to call `CloseHandle()`, but it would be worth checking. It's been quite some time since I have used those functions. The Microsoft runtime library source code comes with the compiler so you can write a test program and trace it to check.
Answer: FILE* getReadBinaryFile(LPCWSTR path) {
    HANDLE hFile = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
    if (hFile == INVALID_HANDLE_VALUE) {
        return nullptr;
    }
    int nHandle = _open_osfhandle((long)hFile, _O_RDONLY);
    if (nHandle == -1) {
        ::CloseHandle(hFile);   //case 1
        return nullptr;
    }
    FILE* fp = _fdopen(nHandle, "rb");
    if (!fp) {
        ::CloseHandle(hFile);  //case 2
    }
    return fp;
}
my code for get an open read binary file descriptor.
you should use fclose to close FILE* if you don't need it .
i didn't test for case 1 and 2, so use it at your own risk.
Comment: Case 2 must be _close(nHandle) instead, closes also the underlying hFile.
Answer: you can't exchange(convert) them.. if you need to have a file with FILE* and HANDLE you need to open it twice

How make FILE* from HANDLE in WinApi?


What is a good itunes alternative with .epub support?

Question: Banshee seems good, but it doesn't seem to support .epub or any other type of ebook files. I use my ipod more for reading than I do for music, so I'd really like a program that allows me to continue putting ebooks on my device.
Answer: The probably most famous application is calibre. It manages your ebooks and can sync them to your device. Unfortunately, according to the manual, it can sync iDevices only over the air, using wifi and a client app to connect to a local calibre server running on your desktop computer. On Windows and OSX you can link calibre to iTunes and therefore sync via usb cable.
To read details about the usage with iDevices, search for the term "ipod" in this manual: http://manual.calibre-ebook.com/calibre.pdf
You can find the Calibre software here: http://www.calibre-ebook.com/


Vundle won't install plugins due to an error about AppData/Local/Temp

Question: I am on Windows 10. I just installed Vundle and now I am trying to run the PluginInstall command. However, I am getting errors saying it can't open a file in AppData/Local/Temp. This does occur on all plugins (at least it seems so).
I am using gvim, which I ran as an admin to make sure it wasn't permissions related. I have tried restarting my machine, as I was doing updates anyway.
Why am I having this issue? Please advise.
P.S. I have looked in AppData, the file it is looking for doesn't exist.

[
As the comments suggested, I tried set shell=git and the errors changed to:

I will try out the links.
Comment: Not sure if it'll fix the problem, but I highly recommend vim-plug, https://github.com/junegunn/vim-plug
Answer: Do you have git installed? Vundle uses it to process the installations and it is not by default on Windows.


How to report house used for 100% business?

Question: Self employed as sole proprietor, was using 1/3 of home as home office.  Have moved across state line to new house on July 1st, but keeping old house solely to see existing clientele for the foreseeable future, is now 100% business use.  Since it is no longer home and I have a new home office how do I report the 100% business use and expenses on 1040/Schedule C?
Comment: Be careful with this one. Using a house solely for business may cause you trouble with zoning laws, with your insurance, and your mortgage holder if any.
Comment: Simpler than that, How could one claim the bedrooms, living room, etc are used for business? You can abandon the 2/3 you used to live in, but the house is still 1/3 business. The 2/3 doesn't automatically drop off.
Answer: As DJClayworth said, be very careful with this one!
The property is a residence, not a business location.  Given that, it is almost a certainty that the IRS is not going to let you claim 100% of the expenses for the home as a business expense, even if nobody's actually living there.
You may get away with doing this for a period of time and not run into zoning or other issues such as those DJ mentioned, but it's like begging for trouble.  You run the very real risk of being audited if you try to do what you're proposing, and rest assured, whatever you saved in taxes will disappear like smoke in the wind under an audit.
That being said, there's no reason you can't call a tax service and ask a simple question, because in answering it they're going to hope to gain your business.  It'd be well worth the phone call before you land yourself in any hot water with the IRS.  I can tell you that I'd rather have a double root canal with no anesthetic than go through an audit, even when I didn't do anything wrong! (grin)
Good luck!


Airport transit US to Asia

Question: I am from Canada. My flight will depart from Toronto to Chicago, United States, then Chicago to Asia. Do I need some kind of US transit visa to transfer airplanes? Or transiting to a different airport?
Comment: Your citizenship is what matters. It will be the same as if you wanted to fly to Florida for a few days. There is a reason those flights are cheaper and it isn't just because they might deplane you with extreme prejudice,
Answer:
Citizens of Canada and Bermuda do not require visas to transit the United States.

Source: U.S. Department of State

Airport transit US to Asia


How come there are Schrödinger Picture operators with explicit time dependence?

Question: In the Schrödinger picture, observables are said to be time independent (see Cohen, for example) operators. However, when deriving the Heisenberg Equation of Motion $$i\hbar\frac{d}{dt}A_H(t)=[A_H(t),H_H(t)]+i\hbar\Big(\frac{\partial}{\partial t}A_S(t)\Big)_H.$$ a term with an explicit time dependence of the operator in the Schrödinger picture appears. I looked at other related questions and some argued that in the S-picture, only operators that are related to observables are time-independent. Is this really the case? If so, is this equation a general description of dynamics of operators and reduces to $$i\hbar\frac{d}{dt}A_H(t)=[A_H(t),H_H(t)]$$ if $A_S$ is an observable? Furthermore, is the existence of (explicit) time dependence equivalent to time evolution?
Comment: Which other related question?
Comment: @Qmechanic this one https://physics.stackexchange.com/q/351020/
Answer: In the Schrodinger picture operators carry no time-dependence introduced by a unitary transformations (as opposed to the Interaction or Heisenberg picture). Operators in the Schrodinger picture can still have a time dependence if something is physically changing$^*$. An example of this is if we have a particle in a time dependent electric field. The Hamiltonian will have time dependence due to the field actually changing, not because of a unitary time evolution (if we treat the field as external to the system). The eigenvalues (possible measurement outcomes) in this case can have a time dependence.
So, in the Schrodinger picture, unitary transformations are what cause the state vector to change over time. Schrodinger operators do not experience "time evolution" in this way; if an operator does have explicit time dependence, the time-dependence must be due to something observable physically changing as described earlier. Therefore, the physical time-dependence in Schrodinger operators due to measurable observables is distinct from the time evolution introduced by unitary transformations in other pictures. Thus explicit time-dependence in the S-picture is not equivalent to time evolution.

$^*$ This seems to have gained some confusion here. I am not saying that unitary transformations do not have physical consequences. I am saying they do not represent physical changes themselves; they only represent changes in the probability of measuring the system to be in some state. State vectors and operators are not physical things, so unitary transformations that cause them to change are not direct physical changes. On the other hand, in my example fields are physical, directly measurable things. In the Schrodinger picture operators that depend on the field can have explicit time dependence, and so can the eigenvalues associated with those operators.
Comment: This is very similar to the difference between explicit and implicit time dependence of the Lagrangian in classical mechanics. Here by implicit I mean the dependence through the time-dependence of coordinates and velocities on the path that solves Euler-Lagrange equations.
Comment: The "time dependence" of states and operators "due to unitary transformations" is exactly the difference between each picture, right? And these unitary transformations are time evolution, right? What I can't seem to grasp is the difference between this time dependence and an explicit time dependence. Explicit time dependencies cannot be seen as time evolutions? What is the difference between them, physically speaking?
Comment: @JoãoPedroGomide Or are you asking for a physical explanation of a unitary transformation/evolution?
Comment: @AaronStevens I was asking for a "physical" explanation of a unitary transformation/evolution. But both your edit and Andrew Steane's comment made it really much more clear. Thank you!
Comment: @JoãoPedroGomide are you asking what the physical difference is between the Shrodinger and Heisenberg pictures are?
Comment: I don't understand the distinction that you're drawing. Why doesn't unitary time evolution count as "something physically changing"? It has physically observable consequences.
Comment: @tparker I am assuming the state vector and the operators are not physical objects. I'm also assuming that our system is not in a definite state until measurement so that time evolution of these things is not physical. Is this not something I should be assuming?
Comment: @tparker I have made an edit to my post to clarify
Comment: The generator of boost transformation is explicitly time dependent but this is not due to some change in some external field or something similar….When time evolution is part of a Lie group of symmetries, observables that parametrically dependents on time are standard in the Schroedinger picture.
Answer: It is true that explicitly time-dependent observables (in the Schroedinger picture) may be due to time-changes in the environment. However, observables that explicitly depends on time pop out naturally also for isolated systems whose (finite dimensional) Lie group of symmetries $G$ includes time evolution $U(t)=e^{-iH}$ and the group is not the trivial product of time evolution and an independent subgroup. In this case, there are observables (selfadjoint operators) $B$ in the Lie algebra $\mathfrak{g}$ which do not commute with the (selfadjoint) Hamiltonian $H$. These observables give rise to other observables, still in the Lie algebra,  which explicitly  depend on time and are conserved quantities.
(All I am saying is rigorously valid in a common dense domain of all operators where they are essentially selfadjoint, for instance the Nelson or Garding domain. I will not indicate the domain explicitly.)
This situation is common in classical and relativistic quantum theory, even if the system is isolated. The typical observable of the Lie algebra of symmetries is the boost generator.
The boost generator $B$ (or some other observables constructed out of the boost and other generators of the Lie algebra of symmetries)  cannot commute with the Hamiltonian just because the Hamiltonian depends on the used reference frame which is changed by the boost transformation.
On the other hand, since the group $G$ is finite dimensional and the action of the time evolution preserves the Lie algebra structure, it must be
$$U(t)^\dagger B U(t)= \sum_{k=1}^n  c_k(t) A_k $$ for some real coefficients $c_k(t)$,
where the $A_k$ are a basis of observables of the Lie algebra.
If we define the observable that explicitly depends on time
$$B(t) := \sum_{k=1}^n  c_k(-t) A_k$$
we have the conservation law
$$B(t)_H = U(t)^\dagger B(t) U(t)= B(0)\:. \tag{1}$$
This relation can be written into (the horrible differential version where a number of useless mathematical details should be fixed in comparison with the adamantine (1)) (I use $\hbar=1$)
$$\frac{d}{dt} B(t)_H = -i[B(t)_H, H] + \frac{\partial B_H(t)}{\partial t}=0$$
When $B$ is the boost generator, $B(t)$ is commonly called the boots at time $t$.
For instance, in relativistic theory,
$$B_a(t) = B_a -tP_a\quad \mbox{where $a=x,y,z$.}$$
Actually, the same identity holds also in the classical case, where now $P_a$ is the momentum and not the spatial components of the four-momentum.
Answer: Let's consider a typical derivation of the Fermi Golden Rule, which starts with a Hamiltonian like this:
$$
H = H_0 + V\cos(\omega t)
$$
...which has the explicit time dependence.
Yes, in some ways it is introduced by hands, we wouldn't have it if we considered an atom coupled to a quantized Em field, although even then it could slip in via boundary conditions or other parameters, characterizing coupling to environment, measurement device, etc.


How can I find out what version of Log4J I am using?

Question: As we all know, at least four or five Log4j JAR files end up being in the classpath. How can I tell which version I am using?
Answer: I came here after learning my servers may be vulnerable to the new Log4j  exploit (CVE-2021-44228). So I needed to know whether I had an outdated/vulnerable build of Log4j version 2 installed.
Previous answers here do not help with detecting old versions, because they are for letting already-running Java code figure out which version of Log4j that code uses, whereas I need to know if any Java app could be using a vulnerable version.
Here's what I did instead:
sudo find / -name 'log4j*'

This lists all Log4j related files on my (Linux) server. That showed me a few 1.x versions, which are not vulnerable to this specific CVE, and one 2.15.0 file, which already contains the fix for the CVE.
If you run this and find file or folder names that have 2.x, where x < 15, then you are likely vulnerable, and need to figure out how to update your files ASAP.
Caution
I was warned that this is not enough of a test for my purpose because the Log4j files may be hidden inside a .jar file, which the find command would not discover.
Update
Here's a public project that attempts to scan all .jar files, in order to find Log4j code inside archives as well: Log4-detector
Comment: To list all JAR files on your system containing the vulnerable class file (even in fat JARs), you can use:
`for f in $(find / -name '*.jar' 2>/dev/null); do echo "Checking $f..."; unzip -l "$f" | grep -F org/apache/logging/log4j/core/lookup/JndiLookup.class; done`
Comment: Please note that Log4j v1 also can be affected: https://nvd.nist.gov/vuln/detail/CVE-2019-17571
Comment: Log4j 1.x has other vulnerabilities.  https://stackoverflow.com/a/70405229/1329426 .
Comment: @golimar Indeed, files that were fixed will be listed as well. The command I posted will help you find JARs that are potentially vulnerable but won't tell you if they use the patched version of Log4j or a vulnerable one.
Comment: @Delthas Are you sure that looking for the presence of JndiLookup.class is a correct check? Newer (fixed) versions of log4j2 still include that file, albeit with the bug removed
Answer: It depends on the ClassLoader, but have a look at the example:
import org.apache.log4j.Layout;

public class X {
    public static void main(String[] a) {
        Package p = Layout.class.getPackage();
        System.out.println(p);
        System.out.println("Implementation title:   " + p.getImplementationTitle());
        System.out.println("Implementation vendor:  " + p.getImplementationVendor());
        System.out.println("Implementation version: " + p.getImplementationVersion());
    }
}

You can call the method getImplementationVersion on the Layout class of log4j:
org.apache.log4j.Layout.class.getPackage().getImplementationVersion()

Comment: Great answer and maybe correct, but I get all nulls for that class.  The documentation provided by you says it works with 1.2 and 1.3.  That might mean that I am using version 2.
Comment: I downloaded a more recent version of Log4j ([2.13.1](https://downloads.apache.org/logging/log4j/2.13.1/)) & found that the `getImplementationVersion` & `getSpecificationVersion` methods do work with it. For older versions, see [my answer below](https://stackoverflow.com/a/61297626/4677917).
Comment: The link given in the answer is broken. Can somebody share the example code to print the log4j version programmatically?.
Answer: I wouldn't expect this to be the preferred method, but it is how I determined the version of Log4j that my software was using:
Open, or extract the contents of, the Log4j .jar using a .zip archiving utility (Windows Explorer supports this). Navigate into the "META-INF" sub-directory and open the file "MANIFEST.MF" in a text editor. Find the line starting with "Implementation-Version", this is the Log4j version.
Obviously, this is not a programmatic solution. But if you simply want to know what version you are using and you have the .jar archive, it works.
I noticed that Package.getSpecificationVersion() and Package.getImplementationVersion(), as mentioned in Loic M.'s answer, work for other .jar libraries, but not my Log4j. It's possible that the version I am using just doesn't support it.
I downloaded version 2.13.1 to try out the above mentioned methods and found that they do work with it. So it was my version (1.2.16) that didn't support them and returned null.
Answer: To know the Log4j version during runtime in Java:
LOGGER.info("Log4j version: " + org.apache.logging.log4j.util.PropertiesUtil.class.getPackage().getImplementationVersion());

Or
System.out.println("Log4j version: " + org.apache.logging.log4j.util.PropertiesUtil.class.getPackage().getImplementationVersion());

Comment: This will usually work but it can fail in, for example, this case: one of the JARs added to my project is Apache Tika (tika-app-2.3.0.jar) which includes log4j 2.17 (as unpacked .class files, not in a JAR). This line will output 2.3.0 and not 2.17
Answer: Delete all the JAR files of the versions you don't need (one should be enough) and to find out the version of the one that's left, look at the filename.
For example:
log4j-1.2.17.jar

Answer: I've written a small Bash script to check versions of each Log4j JAR file located on that server. It reads the version information from the manifest file, since trusting in file names is a little risky.
locs=( $(sudo find / -name 'log4j*'|grep jar) )
fcount=${#locs[@]}

echo "Found $fcount jar files"
echo " "

for (( j=0; j<${fcount}; j++ ));
do
    unzip ${locs[$j]} META-INF/MANIFEST.MF
    mv META-INF/MANIFEST.MF META-INF/MANIFEST$j.MF
done

echo " "
for (( j=0; j<${fcount}; j++ ));
do
    echo ${locs[$j]}
    tail -2 META-INF/MANIFEST$j.MF
done

Comment: Probably run http://shellcheck.net/ and fix the various problems it reports. Just looping over the `find` output as it arrives would avoid the multiple problems you have with arrays. Briefly, `sudo find / -name 'log4j*.jar' -exec sh -c '... your loop code here ...' _ {} +`
Answer:
Because there are multiple versions of same classes from different Log4j dependencies, any of them could get loaded during runtime (given that same class name is present in different JAR files).

I use plugins provided by Eclipse and IntelliJ IDEA to see the Maven dependency tree. Then I exclude the older ones to have only the needed Log4j version.
Answer: An easy way to do this:

Put a debug breakpoint at log.debug()
Step 'into' next statement to determine the class which is called.
Check the JAR version of the called class.
Answer: Look inside the core.jar -> log4j-core .zip\META-INF\maven\org.apache.logging.log4j\log4j-core\pom files shows the version
Answer: Bearing in mind the Log4j 2 Security Vulnerability CVE-2021-45105:
On Linux and macOS you can use Syft to generate a software bill of materials (SBOM) and Grype to scan for vulnerabilities.  Used in combination, you can find where risky versions of Log4j exist, which versions you have and get a report on the vulnerabilities.
Apache recommend ditching Log4j 1, and at least use their 'bridge', log4j-1.2-api, to call Log4j 2 from applications which contain 1.x calls.


How to deal with coworkers bad mood?

Question: I'm working at a research institute at university, the atmosphere is quite relaxed and it is quite common to make jokes. Today, a colleague and I went to the the kitchen to grab a coffee and wanted to pick up another colleague on the way. As usual the door to the colleagues office was open and we knocked on the frame of the door. The colleague in the office replied with "Oh no it's you" which also was ment as a joke, at least I interpreted it this way. In then closed the door of his office as a reply to his cheeky behaviour. Later that day the colleague approached me and told me that he was quite angry about me closing his door because he interpreted as I wanted to say "shut up". I was quite puzzled and couldn't find an appropriate answer to him since I thought we both just made jokes. How should I handle such a situation? I want to avoid having missunderstandings but at the same time it's just part of the culture to make fun of somebody.
Additional info: he is a postdoc and I'm a PhD student. He also mentioned that he had slept too short and was not in a good mood this morning.
Comment: @ksudoer You can't have it both ways. You're asking for advice as to how to "deal with" a situation, and at the same time you don't want to take any responsibility for having contributed to that situation. It sounds like you're using "the atmosphere" as an excuse. Joking around is great, but you can do that and still be sensitive to your coworkers' current state. Being considerate won't harm the atmosphere, it'll improve it.
Comment: well obviously I can always avoid doing things others might don't like, but then the atmosphere at the institute would not be the same anymore.
Comment: I did not say that it's in principle not a good idea to say sorry, but I can not read the mood of the people especially if the situation was quite usual and the relationship to the colleague very informal. My question rather aimed at how to behave if you are not at all able to understand the faux pas.
Comment: @JoeStrazzere i totally agree with that, but don't you think that in some cases there is also the possibilty of an overreaction. I mean I could also feel uncomfortable due to his first reaction.
Answer: Just explain that you meant it as a joke and apologize if it didn't come across properly.  Then try your best to ignore the ensuing awkward silence and move on.  Given the environment you describe, I would expect all will be forgotten by the next day.
Answer:
How to deal with coworkers bad mood?

Just accept it and try to be considerate. Bad moods happen to everyone, possibly even to you sometimes. When you detect that someone is in a funk, be kind enough to put joking and teasing on hold and either leave them alone or give them a bit of encouragement, as the situation demands.
It sounds like you and your colleague had some miscommunication, and he later approached you to either apologize or to at least talk it over. The right thing to do there is to take some or all of the blame, shake hands, agree that it feels good to have sorted out that mess, and move on to happier topics.
These things happen. Whether they resolve quickly or continue to fester depends on you dealing with them honestly and openly, and not holding on to grudges.
Comment: you may be right, but at that moment I simply had no chance to detect that he was in a funk and since he was approaching me with quite some time in between to think about the situation I had the feeling that he wanted to sort of clearify the hierarchy.
Comment: All pretty understandable. Given a bad mood, he may have missed the joking aspect of you closing his door. Whether he was clarifying the pecking order later or not, the best you can do is to say "I'm sorry we got off to a bad start this morning -- I should've been more thoughtful/perceptive/considerate." Listen honestly to whatever he has to say about it, acknowledge it, and then move on.
Answer: "oops, sorry", then let it be.  That's the best way to deal with any faux pas, be it a coworker's bad mood or a joke that falls flat, or in this case both.
The less a deal is made of it, the less a deal it will be.
Comment: I've often used this approach, but in this situation it might be seen as dismissive. The colleague went out of his way to approach ksudoer. They might just be wanting an apology.

How to deal with coworkers bad mood?


Is loss/gain of function reflected in RNA-seq transcript counts?

Question: Do LoF/GoF transcripts count toward the RNA-seq TPM count? Or would these LoF/GoF transcripts only be detected by isoform quantification?
Comment: Hi Kermit. Can you be more specific about what you mean by "loss-of-function/gain-of-function transcripts"? What scenario are you considering? Are there mutations within the coding regions of the gene, or are there transcript isoforms being expressed that change the function of that RNA? It's tough to know what you're asking about just from what you've written. Feel free to edit the question to add more clarifying information.
Comment: @JamesHawley The DNA mutation causes a big enough change that the final protein either no longer works or it takes on a different function
Answer: Short answer
Since the effects of any given mutation is so context-dependent (and deciding which effects matter will change between researchers), the process of "variant annotation" is typically separate from RNA-seq mapping/quantification.
If you use a common RNA-seq mapping/quantification tool like STAR, HISAT2, or Kallisto, these counts will combine transcripts with and without the mutation of interest.
This is because for the purpose of mapping, mutations are no different than sequencing errors, and when you're mapping you don't actually know what is what.
Long answer
You might not be able to quantify GoF/LoF at the isoform level, either.
Again, this is because the effects of mutations are so context-dependent.
If you want to know how many transcripts do or don't contain a specific mutation, you'll have to work backwards from that mutation and look at the RNA-seq reads themselves.
You can use tools like Rsamtools, htseq-count, or even IGV for this.
If you want to know whether a given protein's function is affected, you have to consider all the types of mutations than can lead to that protein being affected (in your biological scenario of interest, of course).

Some proteins may lose their binding affinity if a single amino acid is changed, in which case you can look for non-synonymous mutations in the RNA-seq reads.
Some genes may undergo alternative splicing and produce different proteins because of some mutations.
You could find this with a differential isoform expression analysis.
Some genes could be deleted on one allele, leading to a lower expression of that protein.
Biologically, that protein is still expressed, but having less of it makes it less functional in general.
You might be able to find that with copy number estimation or allele-specific expression analysis.

If you're looking at non-coding RNA, what mutations affect their function will be different from what you'd look for if you care about protein function.
All in all, any investigation about what a GoF/LoF mutation looks like and how to go about finding it will depend on you biological scenario.
And you may not find it by just looking at the TPM counts of a gene or its isoforms.


Is the sharepoint server the application server

Question: This may sound stupid but when someone is talking about the sharepoint server are they talking about the application server or does it mean everything so the application and the database server.
Answer: That kind of depends on the nature of your deployment.  In a big enough environment, when someone says "SharePoint", they're probably referring to a farm of servers that include web front ends, application servers, workflow manager servers, etc.
If the environment is small enough, though, it can all exist on on piece of hardware.  In that case, "SharePoint Server" probably means the box and all associated services running on the box that make SharePoint do SharePoint.
Comment: ok so in my farm I have an application server and a database server if I wanted to install this patch https://support.microsoft.com/en-gb/kb/2597150 would I solely install it on the application server or would I install it on the application server then the database server?
Comment: Ah.  Ok.  You'd install it on what you're calling your application server.  Fair warning: I'm on the development side of the house, not the admin side; but I believe that "database server" is actually SQL, not SharePoint, in terms of product.
Answer: SharePoint Farm is consist of the Application servers as well as Database Server.
It is depend upon the topology you used in your farm, i.e WebFront End, Application server and Database Server.
In single server farm you can have all these on one server.
In multi server environment you have SharePoint on separate serves and Database server.
You can check the all servers in the SharePoint farm from Central admin > System Settings > manage server in this farm. You will know about all SharePoint and DB servers.
Now, for SharePoint patch, it only apply on the SharePoint servers. You need to install the patch and then run the config wizard on all SharePoint server. Except the Database Server if it is on dedicated server.


Analytics for Google Calendar?

Question: I need to find out how many people use my public Google Calendar and I am unable to find any way of integrating analytics. Is this possible?
Comment: Voting to close because Stack Overflow is not the Google Customer Support. This is not a coding problem.
Answer: If you have a website there is a way to do this, but it takes a little coding.
Go to calendar settings and find "Embed This Calendar", then embed it in your website by copy/pasting the embed code. Install Google Analytics on the website and track views to the page with your calendar.
This may not work, depending on how you share your public calendar...

Analytics for Google Calendar?


What is difference between getOrderId and getLastRealOrder() function in magento 2?

Question: As I'm new to magento 2 I can't anble to trigger out the difference between getOrderId and getLastRealOrder function ?
How to get product id using getLastRealOrder() function?
Answer: getOrderId() will give Order Id and getLastRealOrder() wil give that last placed order data object
Answer: Actually getLastRealOrder() loads order by using last increment id for the session, which is unique id but not primary key of any sales_order_* tables. As you may see the implementation.
public function getLastRealOrder()
 {
    $orderId = $this->getLastRealOrderId();
    if ($this->_order !== null && $orderId == $this->_order->getIncrementId()) {
        return $this->_order;
    }
    $this->_order = $this->_orderFactory->create();
    if ($orderId) {
        $this->_order->loadByIncrementId($orderId);
    }
    return $this->_order;
}

Whereas getOrderId() function is used to get order id of the particular order in various contexts.
Answer:
getOrderId();  //Returns order Id
getLastRealOrder(); //Get order instance based on last order ID
Answer: In Magento 2, the getOrderId() function and the getLastRealOrder() function are used to retrieve order information, but they work slightly differently.
The getOrderId() function is a method of the \Magento\Checkout\Model\Session class
, and it is used to retrieve the order ID of the last order that was placed. The method retrieves the order ID from the session data and returns it as an integer.
For example, you could use the getOrderId() method to retrieve the order ID of the last order placed by a customer, and then use that ID to load the order object and display order details to the customer.
$orderId = $this->checkoutSession->getLastOrderId();
$order = $this->orderFactory->create()->load($orderId);

On the other hand, the getLastRealOrder() function is a method of the \Magento\Sales\Model\Order class and it is used to retrieve the last real order object that was placed by the customer. This method returns an instance of the \Magento\Sales\Model\Order class, which contains all of the information about the order, including the order items, billing and shipping addresses, and order totals.
$order = $this->_order->load($this->_checkoutSession->getLastOrderId());

So in short, the main difference between these two functions is that getOrderId() retrieves the order ID as integer and getLastRealOrder() retrieves the complete order object, which you can use to access various data about the order.


home-made pultruded components?

Question: If I make a sandwich of wood, thin plastic, carbon-fiber tow (cut to about a foot long) impregnated with epoxy to the right ratio, thin plastic, and wood, and clamp it together and leave it, will I end up with a structure similar to a pultruded carbon-fiber rod?  Will it have anywhere near the compressional strength of a product like these [1]?  ..I'm not the first to consider this.. [2]
Comment: You should find how to calculate the strength in Vinson's referred to in this answer : https://engineering.stackexchange.com/questions/17325/how-to-calculate-scarf-ratio-or-lap-overlap-for-composites
Comment: @SolarMike  Yup, I have some reading to do.  Been researching (finally) the properties of west-system epoxy.  I haven't been doing it totally wrong..  I just assumed that once it was solid, the cure was done.  Wrong.  In my own defense, I did tests with "my method", so that's something at least.  That means that my structure is likely stronger than expected, because it's had several (extra) weeks to cure now.  With the temperature dropping though, I need to switch hardners, and upgrade my workspace.  Anyway.  Vinson here I come! :-D
Answer: No - Pretension can throw off the compression modulus
While the properties can be calculated using formulas (depending upon the levels of reliability and degree of design, as shown in other answers on this site), the net result can still be off due to pre-tension in the fibers.
Basis:

Composites handle tension well, but are terrible in compression.  This is primarily due to fiber buckling under compression:

When pultruded components are cured, they are cured while under tension.
The pre-tensioning leaves a residual tensile load in the fibers.  This tensile load can (not always) allow the fibers to absorb more of the compression load before they begin buckling.

The only way to be sure if this has any impact on your parts is to fabricate them using tension and without pre-tension, and verify the compression modulus and strength of each part.  Only after careful testing could you verify if the parts were affected by pre-tension or not.
Answer: Many pultruded FRP sucker rods are used in oil well pumping. The only pretension is that load used to pull them through the manufacturing process. String design keeps them in tension ( steel rods in the bottom of the string, FRP at the top). I believe this is because the compression properties are relatively poor. For compressive strength , I doubt that you want to emulate a pultruded rod.
Answer: No, and it would be hard to guess how far off it would be
The main difference is that pultruded rods have a controlled fibre/matrix ratio while an ambient-cured Epoxy will be off, even if you mix properly, as you cannot assure a homogeneous wetting of the tow with hand lay-up techniques and no debulking/vacuum pressing step.
That said, it can work for your application, just don't expect it to be comparable to pultruded rods.

home-made pultruded components?


Are feature selection methods prone to multicollinearity?

Question: I'm using R and I wonder whether I should first remove highly correlated variables via vif()and apply then lasso, forward selection etc.
Or doesn't it matter? Do the packages handle multicollinearity automatically?
Comment: Is your goal prediction or inference?
Comment: I agree with @user20160. If your goal is prediction, you should not in general remove highly correlated variables. If inference is the goal, then perhaps you should, depends on the inference.
Comment: @user20160 both. But prediction is a little bit more important.
Answer: At first, please remember, that multicollinearity is not a binary thing, therefore it can not be handled or not-handled as 0 and 1. Every method used to handle multicollinearity will handle it to some extent - better or worse - often risking removing of important variables, when the filter is stronger or just by bad luck. One may think about it as of a trade-off and every cure at some point might be worse than disease.
This is the reason of such articles as Performance of some variable selection methods when multicollinearity is present, which give more complex, but better-than-general answers. The main conclusion from their existence is that different methods may perform differently in different contexts.
There are are also many methods and their variants. You should look at every method separately. You mentioned two methods - LASSO and forward selection:
LASSO
LASSO is a special case of Penalized Regresion methods. These methods were designed to handle multicollinearity. The question is if what they do is what you want. The basic property of LASSO is that from a bunch of correlated variables it tends to pick one of them and discard the others. You do not have to be satisfied with LASSO picks (see comments). You can control them to some extent with trade-off parameter $\lambda$, which describes the strength of penalty for the coefficient values. It controls how severe levels of multicollinearity LASSO will address, but do not control what variables will be picked, when multicollinearity is met.
For a quick informations about LASSO in R, I would suggest Glmnet Vignette by Hastie & Qian.
Forward selection
This method is part of group of methods called Stepwise Regression. They differ not only by step procedure (forward, backwards, all possibilities and others), but also by criterion - they use for example p-values, R$^2$, MSE, AIC, BIC. Then they will perform differently when challenged by multicollinearity.
To show the last very shortly - forward selection adding variables by R$^2$ is said to be good choice for cases with multicollinearity, while backward elimination removing by p-value will never drop two collinear variables in situation when they both are significant, especially when highly biased. As in the case of LASSO, you might not be satisfied with the chosen variables for many reasons.

PRACTICAL NOTE: Sometimes is much easier just to run some things and then look how they performed. This might be the case.
Comment: I naver said that they handle multicollinearity *well* and we will reach desired output - in my understanding every type of penalized regression does *something* with this problem. Ridge shrinks coefficients, laso drops variables, elastic net mixes both. I see them as multicollinearity killers but as every drug, they have side effects which may be worse than desease.
Comment: As you mentioned, lasso-based feature selection can be unstable in the presence of multicollinearity. So, in what sense do you mean that lasso handles multicollinearity?
Comment: LASSO will select 1 variable among a group of highly correlated variables (usually the first variable in the list), so it will deal with the multicollinearity, however since LASSO chooses these variables "at random", it might choose a non-relevant variable.
Comment: For choosing variables at random and choosing non-relevant variable. What do you mean by 'non-relevant'? Accidentally correlated?
Answer: Multicollinearity cannot, logically, be "solved". Rather, it indicates that you cannot readily tease apart the effect of two or more predictors. Regularisation (lasso, ridge, elastic net) try to reduce the effect of collinarity on parameter estimation and thereby improve prediction.
Also, when the correlation structure changes (in time, in space, in resolution), your model will succumb to not having been able to identify the TRUE underlying correlation (if I may blushingly refer to our paper on the subject:  https://doi.org/10.1111/j.1600-0587.2012.07348.x). No model type is immune to this.
Finally, the "inflation" of variance inflation factor has been criticised as suggesting something is wrong with the estimates. It isn't: their error bars are so large because high correlation among predictors prevents the model from identifying the TRUE relationship, and this uncertainty is reflected in the standard errors (https://doi.org/10.3998/ptpbio.16039257.0010.003).


Why are the words "geography" and "geomancy" stressed differently?

Question: Geography is stressed on the 3rd last syllable while Geomancy on the 1st and 3rd. Why is this the case? Is my guess true that a word having entered the English language for a long time would tend to have the stress on the third last syllable while a word being formed relatively recently would tend to retain the stresses of the constituent words?
Comment: Why do you think that stress in English falls on a syllable counted from the **end** of the word? That's the way Latin did it, and Spanish still does. But English does not have fixed word stress; a great deal depends on the roots. And where one starts counting from.
Answer: As m.a.a. said, it is based on the different endings. (Note: I will use the IPA stress symbols in this answer as follows: ˈ before the primary-stressed syllable of a word, ˌ before any other stressed syllables).
We can make a further generalization about the position of stress in Greek-based compound nouns ending in -y:
in words where the -y is preceded by only a single consonant (such as geˈography, where -y is preceded by the single consonant "ph"), the third-to-last syllable is stressed; in words where the -y is preceded by more than one consonant (such as ˈgeoˌmancy, where -y is preceded by the consonant sequence "nc"), the second-to-last syllable receives secondary stress, and an earlier syllable receives the primary stress.
Other examples like geography: aˈstronomy, osteˈology, phyˈlogeny, pluˈtocracy, miˈcroscopy.
Other examples like geomancy: ˈoliˌgarchy, ˈrhinoˌplasty.
Note that in this context, the exact meaning of "single consonant" is a little tricky since English spelling, modern English pronunciation, and ancient Greek/Latin pronunciation don't always correspond. For example, "x" is a single letter, but multiple sounds, so it doesn't count as a single consonant for this rule: thus, ˈorthoˌdoxy is stressed like ˈgeoˌmancy.
Comment: Because language is spoken and only mimicked in the writing, and because this rule is about stress and not about spelling, the rule can be simply framed in terms of phonemes or 'consonant sounds.' In *geography* the final vowel is preceded by a single /f/. In *orthodoxy* it is preceded by the consonant string /ks/ etc, etc.
Comment: @Araucaria-Nothereanymore: I can't think of a specific example here, but in general, double consonant letters can be relevant in the area of pronunciation of Latinate words, even though their surface pronunciation is no different from single consonant letters. That's why I would resist saying it is only about phonemes
Comment: I'd be interested to hear the examples in relation to this rule!
Comment: @Araucaria-Nothereanymore.: The best example in relation to this rule that I've found so far from OED search is "orthoglossy": not a currently used word, but the OED says "N.E.D. (1903) indicates the stress as ˈorthoglossy", which is how I would pronounce it, not as  orˈthoglossy. Outside of compounds, the effect of written double consonants (sometimes interpreted as representing phonological "virtual geminates") on stress can arguably be seen in words like *abyssal*, where there is penult stress even though the penultimate syllable has a "short" vowel followed by a phonetic single consonant.
Answer: It is the 2nd part of these compound words that defines how the 1st part is stressed.
A search on rhymezone will give you an extensive list of 4 syllable words rhyming with geography.
I'm picking out a few of the most common ones:
biography, cartography, demography, lithography, photography etc.
All of these words are stressed on 3rd last syllable, just like geography.
If you now do the same search on geomancy,
you get a similarly extensive list of 4 syllable words rhyming with that:
necromancy, chiromancy, lithomancy seem to be some of the most common ones.
These words are by contrast stressed on the 2nd last and 4th last syllable, just like geomancy.
Note that the same exact difference between how geography and geomancy are stressed is also observable when comparing lithography to lithomancy.
Answer:
Geography is stressed on the 3rd last syllable

I am not sure that this is so.
Brit./ˈdʒiːə(ʊ)mansi/, U.S. /ˈdʒioʊˌmænsi/, /ˈdʒiəˌmænsi/
Brit. /dʒɪˈɒɡrəfi/, /ˈdʒɒɡrəfi/, U.S. /dʒiˈɑɡrəfi/
One example of  -mancy v. -graphy does not make for good guidance. As you will see from the OED below, the stress is laid more generally on the usual stressed syllable of the preceding element (Useful in words with more than two syllables.)

-mancy, comb. form
Pronunciation:  Primary stress is retained by the usual stressed syllable of the preceding element and vowels may be reduced accordingly; see e.g. anthracomancy n. ->  Brit.  /ˈanθrəkəˌmansi/,  U.S.  /ˈænθrəkəˌmænsi/
Origin: A borrowing from French. Etymon: French -mancie.
Etymology: < Old French -mancie < post-classical Latin -mantīa < Hellenistic Greek -μαντεία , use as suffix of ancient Greek μαντεία divination, prophetic power < μαντεύεσθαι to prophesy < μάντις prophet, diviner (see mantic adj.).

(Out of curiosity, I looked at OED for words with the suffix "-mancy" (= divination by use of the first element). There are 124 of them - I particularly like "tyromancy" - divination by cheese.)

-graphy, comb. form
Pronunciation:  Primary stress is attracted to the syllable immediately preceding this combining form and vowels may be reduced accordingly.
Etymology: = French, German -graphie, Spanish -grafía, Italian -grafia, Latin -graphia, representing Greek -γραϕία in nouns adapted < Greek or formed on Greek types.
Some of the words with this ending denote processes or styles of writing, drawing, or graphic representation, as brachygraphy, calligraphy, stenography, …. More commonly they are names of descriptive sciences, as geography, bibliography.

Why are the words “geography” and “geomancy” stressed differently?


Is ideal gas incompressible?

Question: If so, I have read that for $C_P$ and $C_V$ for an incompressible gas are identical (in Heat Transfer by Yunus A. Cengel). Then how will the relation between $C_P$ and $C_V$ ($C_P-C_V=R$) hold for an ideal gas?
Answer: All gases, including ideal gases, are compressible. That's because the molecules of gases are far apart and can readily be brought together by pressure. The specific heats of gases depend on the process. For an ideal gas, $C_p$ and $C_v$ are the specific heats for constant pressure and volume processes, respectively, and are related by the equation $C_{p}-C_{v}=R$.
The molecules of liquids and solids are packed very closely together making it difficult to compress them. Only one specific heat is usually specified for a liquid or solid.
Hope this helps.
Answer: The state equation of an ideal gas
$$pV=nRT$$
clearly shows it Is compressible.
Even more - infinitely compressible.
Answer: Who said ideal gas is incompressible? Its (isothermal) compressibility is given by
$$\beta_{T}=-\dfrac{1}{V}\left(\dfrac{\partial V}{\partial P}\right)_{T}=-\dfrac{1}{V}\left(\dfrac{\partial}{\partial P}\dfrac{NK_{\rm B}T}{P}\right)_{T}=\dfrac{1}{V}\dfrac{NK_{\rm B}T}{P^{2}}=\dfrac{1}{P}$$
Answer: For an ideal gas, the heat required to raise the temperature at a constant pressure $C_p$ is more than work required at constant volume $C_v$, because in case of constant pressure, some work is also utilised in doing expansion work($V$ is not constant). In case of incompressible substance, there is no expansion work involved, so both specific heats are same.
Answer: An ideal gas is compressible. I do not know what an incompressible gas is. Incompressibility implies that v is constant independent of pressure so trivially Cv=Cp.

Is ideal gas incompressible?


Checking bounds of a quad

Question: I want to know how would I tell if a quad touches another quad in my game built in Slick2D. I have a class that I named "Bounds" which has 4 "Point" objects which just store an X and a Y value and a "Bounds" object stores 4 "Point"s. Simply it has 4 2D vectors, one stores the top left, another stores the top right, another stores the bottom right and the other stores the bottom left. I need to be able to check if two quads based of those 4 coordinates are inside each other. Does anyone have an idea of what I should do?
Answer: I cant tell if you just want to do bounding box collision or somthing more complicated with the vectors but if you just want to see if a rectangle is inside another rectangle then check if :
<code>box1.left   < box2.right &&
box1.right  > box2.left &&
box1.top    < box2.bottom && // if your Y starts at bottom of screen and gets higher
box1.bottom > box2.top       // as you go up the screen swap these round. aka the > <
</code>

If all that is true you have a collision, You can then check what side of a box is actully hiting by just changing some of that code around.
Like if the left side of one box is more left then the right side and more right the left side of another box then you know the left side of you box is inside another and not your right side.
Hope that helps, if not sorry :S
Edit: now with pic to help work out that code :]
Comment: This is only correct if the quads are axis aligned rectangles, which from the original question then might not be, (they could be rotated/irregularly shaped for instance). Still, with that caveat, I suspect this is the answer the OP is actually looking for.
Comment: Thanks for your help! I'm not sure if everything will work but I voted on your post for the help.
Answer: I actually wouldn't assume that the boxes are axis aligned since they are defined using vector2's for each corner. In fact no where does it say that these are rectangles. My solution would be to do a point test on each point from 1 quad in the other and then do the same from the other perspective... using a winding algorithm you can test if a point is inside or outside of another polygon(quad). If 1 or more points is inside then they are colliding.
Here is a link to a discussion about algorithms that determine if a point is inside a polygon(quad)
http://geomalgorithms.com/a03-_inclusion.html

Checking bounds of a quad


ViewState vs ViewData in mvc?

Question: What is the difference between viewstate and viewdata in mvc?
Answer: I was just going through the MVC framework & the exact question popped up in my head.. I understand the difference as below.
ASP.Net & MVC are two different worlds. But looking closely they are not. The concepts of web remains the same and it just the way to write the code. Ok letz compare them
ASP.Net
.aspx    -- So this is the view which contains the html to be rendered in the browser
.aspx.cs -- as we know this is the code behind for doing all the manipulation of the html
So on top of that we have the BO with our properties and which is bound to the controls using databind.
So here comes the ViewState which remembers the data bound to the controls back and forth between the postback.
MVC
View - this holds all the HTML code which in turn is still a .aspx or ascx file
Controller - has the logic behind the HTML. Inside that you have the action methods for performing the specific actions.
So here instead of BO, you have the Models with the same properties which is given to the View to render itself in a different syntax instead of a databind.
Now ViewData is used to bind the anonymous data between the controller and the view.
Comparatively ViewData is more organized and easy to use but apart from that they serve a similar purpose but different in few ways. Like Viewstate is persistent between postbacks and ViewData is not as MVC is stateless.
Hope this explains to an extent
Answer: ViewState and ViewData can handle some complex objects.
ViewState is within page lifecycle while ViewData works in very different way. ViewData can be passed to the target view.
Please refer here for understanding of viewState:
http://msdn.microsoft.com/en-us/library/ms972976.aspx
for viewData:
http://www.asp.net/mvc/tutorials/asp-net-mvc-views-overview-cs
hope that helps
Answer: View state is used only in ASP.net forms,controls and Page life cycle. View state is used by ASP.net framework to manage control states.
View Data is a dataset or Data which is passed to your View - to dipslay HTML data in MVC,
Viewstate is not used in MVC. Please refer above mentioned links for more details.
Comment: http://www.asp.net/mvc/tutorials/asp-net-mvc-views-overview-cs

http://msdn.microsoft.com/en-us/library/ms972976.aspx

ViewState vs ViewData in mvc?


Reducing the Exchange 2003 database size

Question: Our company is running Exchange 2003 on Server 2003. Our primary exchange store file (priv1.edb) keeps growing and is now at over 45GB. If I add up the size of the mailboxes in that store I get less than 16GB. I ran an offline defrag but didn't regain even a single KB from the .edb file (the .stm file shrank from 8GB to 2GB). I've also looked up the size of the Recoverable Items using Performance and it seems insignificant (not sure if the display is in bytes or KB, either way it would not account for the discrepancy). How do I find out what is taking up all this space, and more importantly, how do I remove it?
Answer: Are you getting good online backups? My guess is that you're not, and as a result you're seeing delete items piling up instead of being cleaned up. That would be consistent with the lack of any decrease in size that you saw with the offline defragmentation.
You can force deleted item retention to delete items even if the Information Store hasn't had a good online backup, but I'd recommend fixing your backups first if that turns out to be the culprit. If you want to try it, untick the "Do not permanently delete mailboxes and items until the store has been backed up" on the "Limits" tab of the Mailbox Store's properties.
Let us know how it turns out.
Comment: Thanks, but I check that too. Online backups seem to be completing successfully and Exchange was never configured to care anyway (box not ticked). Any other thoughts?
Answer: Look for Event ID 1221 in your Application Event Log. This will tell you how much free 'white space' is in your Exchange DB.
Also see:
Event ID 1221 reports less free space than should be the case
Comment: I looked up the event before I ran eseutil. Only found an event entry for the Public store, not the private one. I did run a full offline defrag anyway and as I said, recovered zero space from the private edb file.
Answer: The best solution to strange database issues like this is to create a new, empty store and move mailboxes to it; this achieves the same effect as a full database defragmentation, allows you to check for database corruptions and doesn't create a prolonged downtime for your users.
Comment: The only issue with that is if using the standard edition you only get one store.
Comment: This will also break single instance storage for that database, and attachments will now be duplicated into the new DB.
Comment: This appears to be true. I'm unable to create a new store to move the mailboxes to and upgrading is out of the question.
Answer: An offline defrag should reduce your database size.  Do you have public folders in the same database that are increasing the size?  What is your deleted item retention period set to?  Are you including the log size with your EDB file (if so, is it being backed up?)
These are just some things to check into.  The most likely culprit is the retention period though.
Comment: Retention period (I'm looking at "Deletion settings" under "Limits" for the store) was set for 5 days, I've reduced it to 1 for the time being. Public store (pub1.edb) is only 100k. I'm not including the log size with the .edb, just the file itself is 45.5GB. I'm totally stumped.
Answer: Some more steps you can take:

ESEUTIL /G. This will check for any trouble at the ESE storage level; if it finds any, then you'll need...
ESEUTIL /P. A damaged database comes in, a repaired one comes out.
ISINTEG. This fill fix any error at the Exchange store level, with special regard to logical inconsitencies; you need to run it after repairing a database with ESEUTIL, but you can also run it on its own if you suspect your database has any logical trouble; and I think you should be suspecting it, at this point.
Comment: Also, be aware that running ESEUTIL /p on a 45GB database could take as long as 9hrs.
Comment: Yes, and you have to dismount the database in order to do that. He already tried ESUTIL /D, so I assumed he knows.
Answer: How are you backing up? I'm wondering if your backup software isn't setting the correct flags for Exchange to run post backup maintenance.
What happens if you actually run an exchange-aware backup with NTBackup?
Answer: If the online maintenance isn't running (not seeing the event log is a sign it isn't) then there will be no space marked for deletion by the offline defrag.
Check that no backup is trying to run during the maintenance periods set. You may have to leave an extended period and disable backups on say a weekend to get a full runthrough if it hasn't happened before.
Once it gets the online maintenance completed, the event log will tell you how much space the offline one will recover.
Answer: Thanks to everyone for all your help. What I ended up doing was using exmerge to export each users data (after using auto-archive to bring them down below the 2GB limit, why doesn't exmerge use the newer unicode .psts?), creating a new private store and then using exmerge again to re-import the mailboxes. Unfortunately, this causes outlook to go into recovery mode for each user but at least it worked with a minimum of downtime.
Answer: Though becoming depreciated with Exchange 2010, you'll lose the disk-saving capacity of Single Instance Storage by extracting and importing mailboxes with ExMerge.
I tend to add date and folder filters when extracting with ExMerge.  Don't forget to ignore Contacts, users get upset when half of them suddenly "go away" due to the export.. ;)  Importing "just" the contacts back wasn't too bad, though..
Between the mailbox store teetering around 72G and whitespace inching less and less, I took charge and began exporting mail.  Couldn't wait for the users to hit my 73G hedge limit.
Now.. offline defrag.  Good times!


What does fugacity mean in the context of geology?

Question: I am reading about water in the Lunar mantle, however it mentions fugacity a lot. What does it mean in this context?
Comment: This is not my area of expertise, but do these help: [Fugacity: definitions, concepts, and geology](https://www.geol.umd.edu/facilities/lmdr/fugacity.html) & [Introduction to oxygen fugacity and its petrologic importance](https://pubs.geoscienceworld.org/msa/rimg/article/25/1/1/87287/Introduction-to-oxygen-fugacity-and-its-petrologic)?
Comment: From various online dictionaries. Fugacious: ephemeral , temporary , transient , transitory, fleeting, tending to disappear, unenduring volatile, evanescent, momentary.
Comment: It might help others if you could provide a link to the item you have been reading.
Answer: 'Fugacity' is effectively the equivalent of chemical activity, but for gases. Fugacity relates to the partial pressure of a particular volatile component of a system in the same way that chemical activity relates to the concentration of a given chemical phase.
Most often in geology, this will refer to 'fugacity of oxygen (fO2)' in a system - this is effectively a measure of how reactive oxygen is, and thus how oxidized a given system will be, usually with respect to the minerals that are stable in them.
At temperatures that most mantle processes operate on, aqueous fluid phases generally exist in a supercritical state, which we also apply the concept of fugacity to. So, if the text you are reading states something about 'fugacity of H2O', then it is likely referring to the reactivity of supercritical water vapor in the lunar mantle system.


Can't we filter review items to just show the posts which are in the tags which are followed by us?

Question: I was recently reviewing the close vote queue and was noticed posts with tags like julia, demo etc... which are completely out of my knowledge which makes me unconfident of reviewing them. I can skip them but this isn't a good choice at all!. Can't we just filter out posts with our preferred tags?
Comment: Yes, there's a filter, is it not working?
Comment: @KevinB Oh cooool. Cant we add more than 3 tags? Why that limit for 3?
Comment: This seems to be a duplicate of [Display review queues based on watched tags?](https://meta.stackoverflow.com/q/380450/8967612) and other similar posts linked there.
Comment: For what it's worth, in the staging ground you *can* filter by both your watched tags (though it doesn't support wildcards (yet)) and your "tag badges", so if those filters are received well when it goes live, *maybe* the feature will appear in reviews in the future.
Comment: Uh. Sorry @KevinB but im unaware of its existence. Where can I find it?
Comment: It's on the left side of the page, second section, looks like a button
Comment: You can always change it to a different three when your first 3 have no more to review
Comment: Let me have a look @41686d6564standsw.Palestine
Comment: @41686d6564standsw.Palestine I found one post in it but sadly there are no answers/solutions to it. Its [this](https://meta.stackoverflow.com/questions/309583/filter-review-queue-by-default) one.
Answer: Yes we can (sort of).
Most queues have a filter option that allows you to filter by up to three tags, which will then only show you posts that have at least one of those tags.
The filter input UI element looks like a button. It says "Filter" on it, and is usually located near the top left of the review queue UI.
For the real deal of what you're asking for, there's a feature-request to have such functionality: Allow review items to be filtered by favorite tags. You can go add your vote there. When I see a feature-request I want to see happen, I typically vote, follow it, and add it to my "wishlist" saves list.


Does de Sitter space admit an asymptotic S-matrix?

Question: From the Penrose diagram of de Sitter space, we see it has a future and past conformal boundary, and they are both spacelike. So, does de Sitter space admit an asymptotic S-matrix? Sure, in the usual coordinates which only cover half of the full space, we don't have an S-matrix because it's not causally complete, but in a coordinate system which covers the entire space, why not? Just because we don't have a globally timelike Killing vector field doesn't mean we can't have an S-matrix.
Answer: Dear inflation, the answer is No, one can't define an asymptotic S-matrix in de Sitter space. See e.g. section V.A. in this paper by Bousso:

http://arxiv.org/abs/hep-th/0412197

The problem is that the Penrose diagram of a de Sitter space starts and ends with a horizontal line. So at the beginning, the observer is forbidden - by causality - to set up the initial state on the initial horizontal line (because he can only affect its future light cone, a small triangle); and at the end, for a mirror reason, he can't measure what happened.

So at most, if such an S-matrix existed, it would dictate the evolution of states that no one can prepare to states that no one can observe, as Bousso says. This S-matrix would not be an observable, it would be a "meta-observable".
There are good reasons to think that this is not just an aesthetic conflict with the "testability" criteria in science. It's usually the case in physics that if one can prove that something can't be measured, not even in principle, it doesn't make sense. Attempts to measure/define the values of $x,p$ with a high accuracy that violates the uncertainty principle is a canonical example. We know that it's not just because of our technological limitations; accurate values of $x,p$ simply can't exist at the same moment. The operators don't commute with one another, after all.
In the case of the hypothetical de Sitter S-matrix "meta-observable", the experience with the uncertainty principle suggests that e.g. the "arbitrary" initial state indeed can't be prepared - surely not by an observer, as argued above, but not even by God or Nature - because the degrees of freedom that belong to vastly separated regions on the infinite initial line are not really independent of each other. This notion is known as the complementarity - and while it's usually talked about in the case of black holes, de Sitter space offers a straightforward generalization.
De Sitter space may be thought of as a black hole but the "inner visible part" of the Universe should be identified with the black hole exterior while the black hole interior is the infinite region behind the cosmic horizon of the de Sitter space. Much like the microscopic information about the black hole interior is ultimately imprinted in the Hawking radiation, one should believe that all the information about physics beyond the cosmic horizon is imprinted to detailed properties of particles in the visible patch.
For similar reasons, the fact that the de Sitter horizon has a finite entropy - because the cosmic horizon has a finite area - should be taken pretty seriously and it arguably applies to the whole space and not just the visible patch. Because of the finiteness of the entropy, it seems that one can't define any observable that is arbitrarily accurate and that depends on continuous parameters such as momenta, not even in principle.
Comment: very enlightening answer Lubos. Does it make sense to relax the notion of observable by restricting the families of states that can be prepared and measured? or its all or nothing?
Comment: Dear lurscher, thanks for your compliment. The set of states that an observer can prepare on the initial slice - or observe on the final slice - is essentially *empty*. So the restriction is a restriction down to an empty set of data. If you happen to agree, would you agree that your question then loses beef? There are no known accurately defined observables associated with the full de Sitter spacetime. Of course, one may try to predict things "patch-wise", by treating pieces of the de Sitter space as Minkowski-like spaces. But the whole union is a problem.
Comment: People have tried to define observables in DS by tunneling into flat space and using the SMatrix defined there.  But even there it is unclear as to how much of the spacetime this can cover, or if it is a well defined process


Vocabulary question: Mandatory vs Compulsory

Question: Can I rewrite this sentence "Many teenagers feel that social media and their smartphones are mandatory", by substitute "mandatory" with one of these words: compulsory or necessary or essential? Is the meaning the same?
Thanks a lot.
Comment: I think there are at least two different things that sentence could mean, and which of those substitute words would fit would depend on which meaning is intended. Are you writing this yourself, or trying to understand what someone else wrote?
Comment: I'm still unclear—why do you want to write a similar sentence? Is that because you're trying to understand what *the article* meant, or because you're trying to say something that *you* mean to say?
Comment: Actually I thought it obviously meant one of two different things than that, so maybe it doesn't have an obvious meaning—that's why I wanted to know if you were trying to understand the meaning.
Comment: It was a sentence from an article and I write a similar sentence. The original one is this one: "What a lot of teens told me is that social media and their phones feel mandatory".
Comment: @DanGetz it's because I want to improve my vocabulary and using synomims :) that's all. Obviously the meaning of the sentence "a lot of teens told me is that social media and their phones feel mandatory" is that a lot of theens are addicted to social media and their phones. Thanks :)
Answer: While very similar in meaning, mandatory and compulsory have slightly different meanings than necessary and essential.
Mandatory and compulsory mean (or at least imply) that it is a requirement that will be enforced by some form of official agency, such as the government.
"Military service during World War 2 and the Vietnam war was compulsory in the United States."
"It is mandatory that students submit their high-school transcript as well as a recommendation from a teacher in order to be considered for the admittance to university."
Essential and necessary are usually used when something is needed as a matter of fact or circumstance.
"Food is a necessary part of life."
"Sauce is an essential part of pizza. Without it, you're really not making a pizza."
Answer: I think compulsory is the closest in meaning, but to me it has a sense that someone is explicitly saying "you must have this, you must use it". Like there's a formal rule in place, or someone is enforcing a requirement. Mandatory feels like the same level of pressure, but without the sense that it's a formal rule, more that it's "just the way things are".
(Mandatory can mean there's a formal requirement - it comes from mandate which is literally an order - but it sounds figurative here, whereas compulsory sounds more literal. To me anyway!)
Necessary and essential don't feel as strong, they lack the same sense of negative consequences. Necessary is stronger, but it still misses that "you have no option" tone. These feel more like strong recommendations, not warnings, if that makes sense?