Prevent all commands from being defined as an alias

Question: Is there a way to prevent all commands from being defined as an alias?
For example a user shouldn't be able to define rm or any other command (Ubuntu default commands) as an alias name.
Answer: There is no way you can prevent a user from defining whatever aliases they prefer. Consider:

You disable aliases in /etc/bash.bashrc. They enable it wherever they chose to.
You delete all mentions of aliases in /etc/bash.bashrc, and all ~/.bashrc and ~/.bash_aliases via a script. They put their aliases in another file and source it.
You run a command in PROMPT_COMMAND that disables certain aliases. They redefine or undefine PROMPT_COMMAND.
You trap DEBUG and undefine aliases. They remove the trap.
You chown all files sourced at invocation to root. They use another file and source it manually as the first command they run.
You disable the builtins unset, builtin and enable; make alias a function; declare -rf alias to prevent users from modifying the function; and export the function. They run /bin/bash with --rcfile and --init-file to start a new shell, where said builtins are now enabled.
...

You could disable aliases at compile time, then it would be up to you to keep bash up-to-date and make sure you aren't affected by the next Shellshock. Of course, the users could build their own bash.
Comment: @Rinzwind and they run `\unalias unalias`.
Comment: I had a bit of a funny idea though: you can alias alias :=)
Comment: And they `unalias alias`.
Comment: @muru sure but you can also alias unalias :+
Answer: TL;DR
The only way to prevent a user from creating aliases is to provide them with a shell that doesn't support aliasing. This is generally an X/Y problem, where X is really a threat model that should be solved with appropriate controls or architectures rather than trying to solve the problem post-facto after a user is given a shell on a shared system.
Below, I provide a technically-correct answer, as well as some guidance on what problems this will and won't solve. I also provide some additional guidance on alternative controls.
Using the Bash Restricted Shell
You can use Bash's restricted shell by assigning rbash as the user's login shell. For example:
foo:x:2001:2001:restricted user:/home/foo:/bin/rbash

You must then disable the alias built-in for the user, preferably without breaking everyone else's shell too. As an example, you could add the following to a file such as /etc/profile.d/rbash.sh:
# Limit effect to users in a specific UID range.
if ((UID >= 2000)) && ((UID < 3000)); then
    # Check shell options; disable alias builtins when shell is restricted.
    if [[ $- =~ r ]]; then
        enable -n alias
        enable -n unalias
    fi
fi

Caveats
Unless you've placed the user into a chroot jail or provided them with a modified PATH that doesn't include access to other shells, there's nothing stopping the user from simply typing bash at the prompt and getting an unrestricted shell.
In addition, by design the restricted shell prevents many common activities such as changing directories:
$ cd /tmp
rbash: cd: restricted

but doesn't prevent other scripts or programs in the PATH from doing so. This means you have to carefully craft the user's environment, and specifically that you need to prevent them from being able to modify the PATH in their startup files, because even though rbash makes PATH read-only it does so after initialization.
Better Choices
Even if you use rbash, you need to do so as part of a broader set of controls. Some examples may include:

Prevent non-technical users from accidentally invoking dangerous commands by providing default aliases such as rm -i, mv -i, and cp -i in the /etc/bash.bashrc file.

Given your original example, this is probably the most sensible solution.
You can combine this with enable -n alias if you like.
This won't prevent knowledgable users from changing the aliases, but it may be sufficient to prevent non-technical users from doing whatever it is you're concerned about.

Traditional Unix permissions or POSIX ACLs to protect files and directories.
Logins that perform a single non-interactive command. For example:
foo:x:2001:2001:run foo.sh:/home/foo:/usr/local/bin/foo.sh

Use per-key SSH forced commands. For example:
# ~foo/.ssh/authorized_keys
command="/usr/local/bin/foo.sh" [remainder of line]

Use the OpenSSH ForceCommand option with a conditional Match block.
Use special tools like gitolite or scponly designed for your specific use case.
Use a chroot jail.
Use virtualization such as Xen, OpenVZ, LXC, VMware, VirtualBox, or other technologies to provide a segregated environment.

Once you have accurately defined your threat model, you can identify the most appropriate controls for your use case. Without a more meaningful understanding of why you want to prevent aliasing (e.g. what real-world problem does it solve?) you can't select the most appropriate controls.
Comment: +1 in general, but also specifically for classifying this as an X/Y problem.
Answer: This is quite a pointless endeavor, as muru's answer shows. But there are some options, but they are not perfect.
According to bash manual, functions always take precedence over aliases, thus we could do the following:
xieerqi@eagle:~$ function alias { echo "Aliases are no-no" ; }
xieerqi@eagle:~$ alias TEST='rm'
Aliases are no-no

You could place function definition into the systemwide .bashrc , however as muru pointed out, smart users will find way to get aliases by sourcing a different bashrc file for example.
Another idea I've played with is enable built-in.
alias is a shell built in, and bash has nice enable command that allows enabling or disabling builtins. For instance, here's me disabling alias.
xieerqi@eagle:~$ enable -n alias
xieerqi@eagle:~$ alias
No command 'alias' found, did you mean:
 Command '0alias' from package 'zeroinstall-injector' (universe)
alias: command not found
xieerqi@eagle:~$ alias TEST='rm'
No command 'alias' found, did you mean:
 Command '0alias' from package 'zeroinstall-injector' (universe)
alias: command not found
xieerqi@eagle:~$ enable alias
xieerqi@eagle:~$ alias
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
xieerqi@eagle:~$

Again, using systemwide bashrc is an option here.
Comment: Previous comment removed as requested, and others,too, since they'll lack context now. Let me know if you need anything else
Comment: The function idea was nice. It came closest.
Answer: You could define (in /etc/profile) a function called alias which does the validation you want (probably using type -p) (after all "Ubuntu default commands" are "executables in $PATH") before calling the builtin alias, BUT, as others have pointed out, your users could get around that. Why not get a different set of users, or educate them ("Defining an alias that overrides a command is a Very Good Way of Shooting Oneself in the Foot, and causing confusion (e.g, Why does ls prompt for my password?))?


Expectation of a multivariate random variable

Question: Given a multivariate random variable $\mathbf{X}=(X_1, ..., X_n)^\intercal : \Omega \rightarrow \mathbb{R}^n$ I want to determine the expectation value of this RV. Now wikipedia says the expectation is simply given by:
$$\mathbb{E}[\mathbf{X}]=(\mathbb{E}[X_1], ..., \mathbb{E}[X_n])^\intercal.$$
However, the distribution of a random vector is the joint distribution of all its components, i.e., the distribution of $\mathbf{X}$ is $\mathbb{P}_{X_1, ..., X_n}$. Hence, for instance for $n=2$ if $X_1$ and $X_2$ are discrete the expected value would be computed like:
\begin{align}
\mathbb{E}[\mathbf{X}]&= \sum_{i=1}^\infty \mathbf{X}_i \mathbb{P}_{X_1,X_2}(x_1^{(i)}, x_2^{(i)})\\
&=\sum_{i=1}^\infty \binom{x_1^{(i)}}{x_2^{(i)}} \mathbb{P}_{X_1,X_2}(x_1^{(i)}, x_2^{(i)})\\
&=\binom{\sum_{i=1}^\infty x_1^{(i)} \mathbb{P}_{X_1,X_2}(x_1^{(i)}, x_2^{(i)})}{\sum_{i=1}^\infty x_2^{(i)} \mathbb{P}_{X_1,X_2}(x_1^{(i)}, x_2^{(i)})}
\end{align}
And this doesnt occur to me to be the same as
$$\mathbb{E}[\mathbf{X}]=(\mathbb{E}[X_1], \mathbb{E}[X_2])^\intercal.$$
How do these two definitions match?
Comment: Keep going with your derivation: write those sums in terms of the marginal distributions of $\mathbf X.$
Comment: I see no obstacle to marginalizing.  I would invite you to tackle a tiny concrete case.  How about making a table of the values and probabilities of such a distribution when both marginal variables are binary?  Working through this (which should take only a minute or two) will reveal what happens generally.
Comment: So I wanted to do that but for marginalization I would require another sum that does not depend on the respective variable right? I.e., like this I cannot marginalize because I also always have to sum over the sample point $x_k^{(i)}$, k=1,2.
Comment: hmm but if they are not independent then I also have to define the conditional probabilites to get the joint distribution, no?
Comment: But by properly conditioning you can eliminate the nuisance component of the joint in the sum...
Comment: So I have gone through such simple example and I am still confused. Since both $x_1^{(i)}$ and $x_2^{(i)}$ have the same summation index I can still not marginalise. Lets say $x_1^{(1)}=1$ and $x_1^{(2)}=2$ and $x_2^{(1)}=3$ and $x_2^{(2)}=4$. When I compute the sum over i, I get: $1\cdot \mathbb{P}(1, 3) + 2 \cdot \mathbb{P}(2, 4)$. But what I would need is $1\cdot \mathbb{P}(1, 3) + 1 \cdot \mathbb{P}(1, 4)$.
Answer: It looks like you might be getting tripped up with the indexing and summations. Here's how to handle the 2d discrete example using the same approach you were trying to take. The same logic applies to higher dimensions and/or continuous variables (in that case, replace sums with integrals).
Notation
Let $x = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}$ be a realization of the random vector $X = \begin{bmatrix} X_1 \\ X_2 \end{bmatrix}$. I'll use the shorthand $p(x_1, x_2)$ for the joint probability $Pr(X_1=x_1, X_2=x_2)$, and $p(x_1)$ for the marginal probabillity $Pr(X_1=x_1)$. Sums will be taken over all possible values of each variable. For example, if $X_1$ has range $\mathcal{X}_1$ then $\sum_{x_1}$ is shorthand for $\sum_{x_1 \in \mathcal{X}_1}$.
Expectation
$$E[X] = \sum_x x p(x)$$
$$= \sum_{x_1} \sum_{x_2}
\begin{bmatrix} x_1 \\ x_2 \end{bmatrix} p(x_1, x_2)$$
$$= \sum_{x_1} \sum_{x_2}
\begin{bmatrix}
  x_1 p(x_1, x_2) \\
  x_2 p(x_1, x_2) \\
\end{bmatrix}$$
$$= \begin{bmatrix}
  \sum_{x_1} \sum_{x_2} x_1 p(x_1, x_2) \\
  \sum_{x_1} \sum_{x_2} x_2 p(x_1, x_2) \\
\end{bmatrix}$$
$$= \begin{bmatrix}
  \sum_{x_1} \sum_{x_2} x_1 p(x_1, x_2) \\
  \sum_{x_2} \sum_{x_1} x_2 p(x_1, x_2) \\
\end{bmatrix}$$
$$= \begin{bmatrix}
  \sum_{x_1} x_1 \sum_{x_2} p(x_1, x_2) \\
  \sum_{x_2} x_2 \sum_{x_1} p(x_1, x_2) \\
\end{bmatrix}$$
$$= \begin{bmatrix}
  \sum_{x_1} x_1 p(x_1) \\
  \sum_{x_2} x_2 p(x_2) \\
\end{bmatrix}$$
$$= \begin{bmatrix}
  E[X_1] \\
  E[X_2] \\
\end{bmatrix}$$
Comment: @guest1 Note that the sums over $x_1$ and $x_2$ are *nested*, not separate. For example, in the binary case, we need to take a sum $\sum_{x \in \mathcal{X}} \cdots$ over all possible vectors $\mathcal{X} = \big\{ [0,0], [0,1], [1,0], [1,1] \big\}$. This can be written as a nested sum over the individual components: $\sum_{x_1 \in \{0,1\}} \sum_{x_2 \in \{0,1\}} \cdots$. We have two possible values for $x_1$ and two possible values for $x_2$, so the nested sum has 4 terms--one for each possible vector.
Comment: @guest1 To be more specific, a nested sum over binary values would be written out as: $\sum_{x_1 \in \{0,1\}} \sum_{x_2 \in \{0,1\}} f(x_1, x_2) = f(0,0) + f(0,1) + f(1,0) + f(1,1)$
Comment: Thanks for the answer, but why can you rewrite the sum over $x$ as two sums over $x_1$ and $x_2$. I mean there should be the same amount of $x_1$ as there are $x_2$ and this should be the same as the amount of vectors $x$ since the $x_1$ and $x_2$ are entries of the vector $x$, no?


Slang for someone who gives opinions unasked

Question: I'm looking for a good English slang for someone who gives opinions — usually negative — without being asked for them.
Are there any? I know in Hungarian they are called megmondóember but I can't find any good word for them in English.
Comment: Google Translate suggests "I'll tell you man" for the Hungarian word, presumably because their opinion starts with "I'll tell you this for free..." or some such.
Comment: I imagine that, in most cases, the other person is just trying to help, if only to try to clarify things in his own mind.  For sure, the other guy doesn't come knocking to find out if and what is wrong.  Someone told him of the trouble, likely in an invitational manner.  Insecure people need something to harp on, so they call the other guy a know-it-all or something.  To the extent that they go on the internet to find more words and phrases for it.  Lol.
Answer: In British English you might use:
know-it-all - someone who behaves as if they have all the answers to something, and know more than everybody else, usually giving these answers without being asked.
busybody - from the two words busy meaning engaged in an activity and body meaning person - somebody who interferes in others' affairs.
nosy parker - slightly archaic, nosy meaning interested in things which do not concern them, and Parker being a proper noun.
There aren't actually many precise words for this, but people that do it are said to butt in or mouth off.
Comment: I think *nosy parker* is more about prying than about advising.
Answer: Noun: kibitzer  ki-bit-su(r)
(Yiddish) a meddler who offers unwanted advice to others
Derived forms: kibitzers
Type of: meddler
-- WordWeb on line
And the verb is kibitz:
Verb: kibitz  ki-bits
Make unwanted and intrusive comments
"Don't kibitz: he's sensitive";

kibbitz [N. Amer]

Derived forms: kibitzed, kibitzing, kibitzes
Type of: comment, notice, point out, remark
Answer: buttinsky or buttinski, according to Merriam-Webster:

a person given to butting in --- a troublesome meddler.
Example of buttinsky in a sentence: there's always some buttinsky who
  has to tell you there's a better way to do whatever you're doing.

Although the word originated in the US, here are several examples from the OED of use by British writers:

1933   D. L. Sayers Murder must Advertise iv. 69,   I never..met with
  such a bunch of buttinskis... Nothing is sacred to you.
1960   P. G. Wodehouse Jeeves in Offing v. 50   It is never pleasant
  for a man of sensibility to find himself regarded as a buttinski and a
  trailing arbutus

For origin, the OED says:

Etymology: Jocular, < butt in  (see butt v.1 1d) + -sky, final element
  in many Slavonic names

butt in, OED

to butt in: to thrust oneself unceremoniously and uninvited into an
  affair, discussion, etc.; to intrude, interfere without good reason.
  orig. U.S.
Answer: backseat driver (n.)

Someone who gives unwanted advice or who tries to control something
that is supposed to be controlled by another person.
Several members of the board of directors have accused him of being a backseat driver. m-w

A person who is eager to advise without responsibility. Lexico

A meddler who insists on giving unwanted advice. vocabulary.com

An annoying person who is fond of giving advice to the person
performing a task or doing something, especially when the advice is
either wrong or unwelcome. V&S Publishers; Concise Dictionary of
Idioms


Is a non magical darkness creating spell balanced?

Question: I'm thinking of making the spell a level 1 copy of either fog cloud, but with darkness rather than fog. Or darkness, but with non magical darkness. The purpose of this spell would be to use with gloom stalkers umbral sight. Would this be balanced?
Comment: It may be prudent to provide a description of exactly what you're proposing so that we can review. Right now, you just have a conceptual idea, which makes it very difficult to answer 'correctly'.
Answer: No. If it's created by a spell, it's magical by default.
Simply put, if something is created by a spell, it's magical, by the definition of what constitutes a magical effect in this game. This includes the darkness created by spells like darkness. As such, a spell creating non-magical darkness is a contradiction in terms.
However, as pointed out in the comments, it might be plausible for a spell to "create" non-magical darkness by extinguishing light sources in an otherwise-darkened area; this can be accomplished with the cantrip control flames, or the 2nd-level spell pyrotechnics (which also causes additional effects as the flame is extinguished), though in each case they're only able to extinguish flames in a 5-foot cube. Homebrewing a higher-level spell that accomplishes this effect in a larger area but with less flexibility seems unlikely to be broken.
It should be noted that since control flames is a Druid cantrip, it is accessible to a Ranger with the Druidic Warrior Fighting Style.
Comment: Right, but the water isn't itself made magical simply because a spell froze it. I can picture a spell that instantaneously snuffs out or dispels all light sources in a fairly large radius, which would create an area of natural darkness (at least until someone relights something) without needing the magic itself to persist.
Comment: *Wall of Stone* creates a nonmagical wall of stone by saying "A nonmagical wall of solid stone". A spell can create a nonmagical effect by specifying that it is nonmagical. This answer is simply incorrect.
Comment: That's not necessarily true. There are lots of spells that leave effects after their duration has ended. For example, *Freezing Sphere* freezes the surface of any water it hits, and that water stays frozen for a while. Admittedly, it's a bit harder to imagine a persistent area of darkness that isn't magical.
Answer: Probably not.
Under normal circumstances (as in, without Umbral Sight involved), a 1st level spell that works exactly like Fog Cloud except that it creates nonmagical darkness instead of fog might possibly be balanced, maybe, but probably isn't (and probably isn't worth making either way, since it would probably just make the game less enjoyable for everyone).
Depending on who involved in the fight has Darkvision, it could work exactly like Fog Cloud, or it might do nothing, or it could grant most/all of the group advantage on all their attacks and grant most/all of the enemies disadvantage on all of their attacks. Adding Umbral Sight to the mix basically just extends the best case scenario to that character basically all the time (making it overpowered more often, rather than hitting greater heights of overpoweredness).
Now, since the spell creates nonmagical darkness, it would be easier to counter than Fog Cloud since any torch, Light or Dancing Lights spell, or whatever would get rid of it, but that requires that enemies either already have those ready (in which case whoever would potentially cast this spell would presumably know and just not waste their time), or requires that one or more enemies spend actions getting those going. They also need to have those available to them in the first place, and know to use them (which they may or may not, depending on how much they know about magic and how common this spell is in that setting).
So the spell is potentially far, far more powerful than even Darkness, which is a second level spell, but on the other hand it can be countered easily by competent opponents. I don't know what level I'd give this hypothetical spell overall, but I'd say it's probably not worth making since so much of the time it's either going to be way too powerful or way too weak.

If you really, really want to create a spell that creates nonmagical darkness so that character can take advantage of Umbral Sight, maybe think about something (with a smaller radius, maybe 10ft) that will last until the end of the caster's next turn. That way the Gloom Stalker can cast it one round, get some defensive bonuses until their next turn, then attack with advantage. It's powerful under the right circumstances, can still be countered easily by knowledgeable enemies, but unless the Gloom Stalker spams it continuously it might not be worth taking the time to counter.
If we compare it to Shield, which is a first level spell, it's stronger in some ways (since it gives offense and defense) but also weaker in others (since it would take an action to cast, not a reaction), plus there can sometimes be benefits to giving people disadvantage on their attacks (Rogues cannot Sneak Attack when they attack with disadvantage, for example). That might possibly be appropriate for a first level spell, but I'm leaning more toward it being second level. That said, if you make it second level you might want to let it last an extra round for each additional spell level it's given.


Merging leads with Source tagging

Question: My requirement is to tag the different sources of leads coming from web portals. If duplicate lead comes from different portal, it should be tagged so that business from different portals can be tracked.
Please note that lead is entering into the system via web services. i.e, Integration
Answer: Attach the Lead to Campaigns, and you'll be able to track all of the places a lead came from. This is the ideal way to track multiple lead sources.
Answer: You can create two fields at Lead object, External Lead Id and Source System. When you are creating leads capture those information.

Merging leads with Source tagging


How hard would it be to find something in the void between solar systems?

Question: So, assume that there's a superstructure roughly the size of Pluto (~1,475 miles in diameter is the figure I found) that an organization doesn't want to be easy to find. Hiding it in the void between solar systems in an out-of-the-way corner of the galaxy seems like an effective way to do so, given the sheer amount of distance involved. It is supremely unlikely that someone would just stumble across it- it would take reality-breaking levels of luck for them to just happen to pass within visual range- and this seems like an effective measure against discovery.
The only problem I can foresee is scanning technology. What would be an effective way of preventing scanners from picking up the superstructure? Or, at the very least, disguise it so that it appears to be something else that nobody would bother taking a closer look at?
Comment: What does that structure *do*? This is really important, in order to understand how much heat it dissipates and how bright it shines in infrared.
Comment: "Scanning technology" is pretty vague.  What level of technology are we dealing with?  Is the technology level of the people who are scanning equal to the technology level of the people who created the superstructure?
Comment: When it comes to space, "visual range" can encompass up to the entire galaxy (depending on luminosity, obscuring nebulae, and telescopic resolution).
Comment: Also, how long does it need to stay hidden for?  100 years?  100 million years?
Comment: VTC:Needs Details. (a) How far away is this space station from the closes inhabited system that could do something about it if it were detected? Information cannot travel faster than the speed of light. So if said object were 1,000 LY from Earth, the earliest we could detect it would be 1,000 years later even if it glowed white hot. (b) Agreeing with @cowlinator, how long must it remain hidden (speed of light....)? (c) what and how much energy is it producing, if any? (A dark object would be next to impossible to detect from any random direction.) (\*continued\*)
Comment: It's almost impossible to find things on Earth's oceans even if you know sort of where they are.
Comment: (d) What is the technology level of the most primitive people who could do anything about the station if they detected it? (e) Is the station "fixed in place" in its galactic orbit (its distance between stars doesn't change-ish), or is it mobile (it can be moved a LY in a decade or so, or better)? If you [edit] your Q to answer these questions, I'll gladly retract my close vote. (And please note that @user535733's issue with tracking traffic to-and-from the station is a very good observation that may render your Q moot.)
Comment: Don't hide it in the void - that makes it _relatively_ easy to pick up against the microwave background radiation; your station will have a very obvious IR "shine". Hide it in a random solar system instead - good luck finding any kind of station sitting next to a star. Of course, that assumes there are uninhabited stars in your galaxy, but come on - even in Star Wars, while much of the galaxy is mapped, there's something like 200 uninhabited star systems for every one that is inhabited, and there's so much traffic (including pirates etc.) it's pretty easy to hide in plain sight.
Comment: It really depends on the mass and range of this superstructure, the range of local space is still large but not beyond measuring.
Comment: "Professor? My astronomy data keeps getting ruined by unexpected rocket flares as ships travel to and from a really weird object in interstellar space. Can I study that instead for my term project?"
Comment: Really need more information. Don't know the tech level of those searching for it. There are 250 billion ± 150 billion stars in the milky way. You could put it anywhere and it's unlikely for anyone to stumble on it.
Comment: Answers should probably bear in mind that in a civilisation where a Pluto-sized space-based structure is possible, a telescope at least the size of Pluto is also possible. Most likely you could build one with an effective diameter the size of the *orbit* of Pluto by using interferometry. It's easy to underestimate the vast advancements in remote sensing that would come with that kind of tech level.
Comment: That said, if you have FTL travel then a telescope won't help anyone see it, unless they wait long enough for the light (including radio and infrared) to reach them. In that case it's easy to hide: just put it far enough away from everyone that no light will reach them on the kind of time scale you want it to stay hidden.
Answer: Really, really, really difficult.
Space is just that big. To give you an idea of how big space is, in the science fiction novel The Stars, Like Dust, one of the plot points is that they're seeking a (supposedly unmapped) star system which was found by a random jump within a nebula. One of the characters points out that the odds of jumping correctly to any star system was one 1/250,000,000,000,000,000. And that was an entire star system within a nebula and star systems are huge, dozens of orders of magnitude larger than Pluto and you're hiding this in an entire galaxy. The effective way of hiding it is generating a sufficiently random method of obtaining a set of blank space to put the space station in, and hide there. You will simply not be found, no matter how hard the enemy looks, unless they have access to literally quintillions of space ships all seeking you out.
Comment: Having cleared that up, I don't think the odds of it existing at any particular location are deeply related to the odds of finding it.  Anything that has mass exerts a gravitational pull, and that will effect the paths of brightly luminescent things like stars.  We can even find gas and dust this way.
Comment: It's unclear what a "jump" is, and whether it's possible in the questioner's universe.
Comment: @cowlinator The jump was executed completely randomly without a fixed endpoint in mind, so the ship could have showed up anywhere within the nebula and it (somehow) would up next to a star.
Comment: I see... so the probability includes all of the empty space outside of any star system
Comment: True. But that information is limited by the speed of light which means that it will take a long time for *that* information to get anywhere, and even when it does, moving your base every year or so via random jump neatly solves that problem.
Comment: "Space is big. Really big. You just won't believe how vastly hugely mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist, but that's just peanuts to space"" - *THGTTG*
Comment: @Halfthawed:  What's more, gravity is really, really weak, even for an object the size of Pluto.  If an object the mass of Pluto was sitting halfway between here & Alpha Centauri, its gravitational attraction would change the speed of the Sun by :::quick calculation::: about 10^(-13) m/s over the course of one year.
Comment: @JustinThymetheSecond the common frame of reference in Star Trek is called subspace. Everything at warp speed moves relative to that, which is why warp travel doesn't generally cause time paradoxes, except when you fly around the sun for some reason.
Comment: How are the odds of picking the correct star within one nebula 1 out of 250 quadrillion, when there are only up to 400 billion stars in the Milky Way Galaxy?
Comment: @cowlinator A 'jump' is referring specifically in this case to hyperspace travel, but it can refer to any form of FTL.
Comment: The main problem with space being really, really big is that nothing past say 10 light years is even close to where it was when you saw it. Really, you have to be within 10 light years of an object to have any confidence it even exists any more. 10 years is a very long time. So it is not just that space is so big, it is also that what we see of it is so very much mostly ancient history. Even within our own solar system, Pluto is five hours or more ago. Everything about where it is now (even if it still exists) is just an assumption. Everything we sense is where it WAS, not where it IS.
Comment: The question, therefore, is not 'Can the other guy find it?', but 'Can the organization find it again?' The one thing I never quite grasped about Star Trek is, how did they ever determine the coordinates to beam something down? What were they in reference to? What was the common relativistic frame of reference at warp speed?
Comment: @JustinThymetheSecond As I recall, they avoided doing any beaming at warp, but that doesn't really affect the reference frame. I would guess ''planetoid's units'' if the figure is really close or the ship's orientation otherwise. I did always wonder why nobody ever teleported in naked or otherwise unpresentable.
Comment: @ Nathaniel And there you have it - even the  Star Trek universe had some form of 'point zero' to reference everything else by, that could reference every other speed 'with relation to'. No matter how much one waffles around 'relativity', one always gets boxed in by its paradoxes. Inevitably, something has to be hand waved away.
Comment: As a note, I work on a space exploration game. You can travel around and witness the vast distance and scale of a galaxy with ~10.000.000 solar systems and a radius of 5E+10km. It is virtually impossible to ever spawn (= random jump) as close as even 20 times the size of the radius of an average star. Also, if you pick a random direction and move straight forward, you will NEVER collide with anything - you have to be perfeclty accurate to hit a stellar object. Another fun fact: The actual size of stars can not be perceived while standing, only by moving and seeing how other stars pass by.
Comment: The odds are going to be quite different for other forms of FTL travel. The FTL jumps Asimov used in his novels were instantaneous from point A to point B. If you have a warp drive, you actually cover the distance in between. Also, those odds do nothing to take into account how far you can see - if the object glows dimly enough in infrared to be visible only from a lightyear away, the random jump chance of being able to see it is 10000x better.
Answer:
Hiding it in the void between solar systems in an out-of-the-way corner of the galaxy seems like an effective way to do so

It is, if you have potential access to all of those star neighbourhoods.
Scanning the immediate neighbourhood of any given star is not too difficult, lengthy, or expensive. And your superstructure will radiate some heat due to simple thermodynamics. In interstellar space I would expect nothing to radiate above the cosmic background, and doing "milk runs" to a suitably also hidden solar system to resupply large quantities of frozen helium to act as a thermal sump would be really expensive.
Using FTL, scanning is made even easier because it allows you to look "back" in time: by making ten FTL jumps, one light-year apart, towards a likely zone, you get to see how it was for the last ten years (so, you need to guard not only against the current superstructure emission, but also against its, probably much larger, emission during construction and before baffles and stealth systems were installed. That emission is expanding throughout the galaxy at the speed of light, and can be detected and traced back).
But the stars are really many, so if you don't know which is the star the superstructure is nearest to, the need to run the "simple, fast and cheap scan" around all possible stars quickly balloons into a difficult, slow and horribly expensive endeavour. Mission accomplished.
A further possibility is to hide not too far from a very noisy system, that makes scans difficult. Provided that there are a lot of them, so the possibility of an extra deep scan near noisy systems avails nought: you don't want to be in the last place someone would look, because that is the first place where someone cleverer would look.
Something I would definitely do is disseminate decoys. Generating a small quantity of heat and radio disturbances is easy and cheap, so preparing a thousand decoys would be no great trouble. You find a trans-neptunian object that might be your superstructure, you plant inside a radio noise transmitter with random activation scheme. Then, whoever stumbles by will have to run extra scans to investigate, which will both make them lose valuable time and resources in striving to find something that isn't there, and warn you that a search is under way and what resources it may have (if you get one decoy hit per year, or two per years in the same area, or several all over the galaxy, it changes things).
Also, you want to built and distribute the decoys from some place at a random distance from the superstructure (i.e., anywhere else in the galaxy), so if anyone has the resources to thoroughly analyze the decoys and their placement, they will converge on the decoy's source, not on the superstructure.
More on decoys
As @Bohemian noted, you don't want the decoys to look like decoys. You would set up something that has a plausible reason of being, and just happens to duplicate the emissions from your stealthed superstructure.
For example, you get a cold trans-neptunian object and install a suitably powered WiFi mesh on its surface. The mesh connects sensors around cheap carbon crystals covered in lead, and all it does is report continuously "Device operating properly. Nothing to report" packets. Should someone find the network...

"We have analyzed the structure, Captain. It is a blend of some very simple and a little bit of very advanced technology, but very logical."
"Explain."
"There are some three thousand spheres all over the planet, apparently deployed from orbit. They are wirelessly linked, and it is their emissions that we detected. Each sphere is radiation-shielded and encloses a crude event detector not unlike those in use on Earth in the Twentieth Century. They are all connected with an advanced relay buried near the North Pole."
"So if one of them detects anything...?"

"Exactly, Captain. A very sophisticated medium-range omni-directional subspace transmitter at the Pole triggers an alarm. The explosion we detected the day after tampering with one of the spheres was in all likelihood the real relay station, thirty light-hours distant and running cold. It woke up, transmitted the true alert to its masters through means unknown, then self-destructed. The Pole central clearly misunderstood our tampering for whatever event it was designed to detect, and sent the alarm."
"But what should have normally caused such an alarm? What are those sensors for?"
"Unknown, Captain. Some extremely energetic event, some kind of subatomic particle perhaps, capable of bypassing the thick radiation shield, and yet interact with the carbon-silicon-aluminum matrix inside. Nothing known to Federation science could do this. The matrix is cheap, but clearly carefully designed for this specific purpose. Unfortunately, the builders apparently did not take into account the possibility of someone tampering with the detector itself. But the Oort station self-destructed in an extremely energetic manner; what you would call a serious case of overkill. They wanted to be sure nothing could ever be recovered from it."
"A dead-drop alarm... whoever did this was scared. Really, really scared. Of what? Of whom?"

(some months later)

"We have found fifteen planetoids converted to sensors in this arm of the Galaxy alone, Captain. There probably are many others, scattered at random. All within two light-years from the nearest star. We're now just cataloguing them with long range scans to see whether their distribution yields any insight; landing for samples would be illogical, seeing as how they're all essentially identical."
"Their builders are, or were, hiding from an enemy in possession of some technology we don't even comprehend, and potentially appearing anywhere in this part of the Galaxy. The builders themselves are probably extinct, but..."
"The one they hid from may not be. We are considering deploying the same kind of sensors they employed; we don't understand how they could work, but the sensor matrix is easily duplicated and their operation is straightforward."
Comment: +1 for mentioning the idea of using FTL for looking backwards in time. Also at first I thought decoys would just make it more obvious that there was something to look for, but I would +1 again for the idea of using those decoys as detection/analysis/prediction of who is looking at/for your stuff.
Comment: +1 for the decoys making your opponent paranoid .
Comment: One additional concept on top of the decoys: If you have a high enough level of technology and resources, you can also make them look believably like real installations. Like small outposts for travel or research or supply caching or defense. Suddenly it turns out that ancient forerunner race isn't really gone at all, and in fact all those "abandoned" facilities we keep finding have been subtly "watching" us the whole time. Or, if you're willing to be known as an organization/government/species, keeping them manned lets you shape the narrative and learning from them when anyone finds them.
Comment: The trouble with decoys is if the decoys are discovered to be artificial, it may tip an observer off that there's something they are a decoy for and bring more attention to the region.
Comment: Any decoys anywhere hint at something hidden.
Comment: @Bohemian and that's why you set the decoys at random throughout the whole galaxy. But yes, ideally you wouldn't set up them as *decoys*. Will amend answer.
Comment: Yes, I think the decoys might give out too much information just by their existence. Note that for a decoy to exist, the place it is, must be visited in past. It charts the possible paths of whoever made them.
Answer: Hidden in plain sight:
There are lots of small planetoids floating around out there, and we are continuing to find more of them. This is pretty much what the Kuiper belt consists of. Most of them are cold, airless balls of rock with little to nothing to interest anyone. In your future universe, I'm assuming there's some sort of FTL system that allows travelers to reach such bodies if they desire. The key is to make people not desire.
Since there are so many airless balls of cold interstellar rock, let's assume those who want such things can find them. Hopefully, there is no real demand - unless you're sneaky, a slightly warm ball of rock near a star has way more going for it.
Given enough tech, an advanced civilization will be tracking all these things with telescopes and the like, but academically. There's no real motive to care. So pick one, preferably one that has been investigated and found completely boring, and claim it for Intergalactic Amalgamated Metals Inc (fictitious shell corporation). Build your superstructure inside the planetoid, or fake a planetoid (less desirable, since a magically appearing planetoid is interesting...)
Of course, Intergalactic Amalgamated Metals Inc goes belly up because the planetoid is so uninteresting, and "abandons" their mining operation. So now you have a reason for ships to have gone there, reason for structures (should anyone bother to scan them), Ownership of your worthless rock so you can discourage visitors, and justification for ships to visit (the new owners are inspecting the site).
The only risk is that people may be interested in an abandoned mine, so the records should show there is no reason to go - the owners blew it up so uninvited visitors couldn't sue them, or there's a (fill in the blank) hazard that makes it both pointless and dangerous to go there, like an industrial accident has made it radioactive.
Comment: "Khyber" belt? Do you mean Kuiper belt?
Comment: If you're doing anything with it, you'll need power, and you'll need to radiate that power away as heat after you've used it. You probably can't feed a human for less than one megawatt by the time you concatenate the inefficiencies of a heat engine making electricity making light illuminating plants to fix CO2 and only eating the edible bits.
Comment: Just be sure to put your radiators on the side away from the Sun, so infrared telescopes won't pick you up.
Comment: The only problem I see is that Space is so big that by Amalgamated Metals Inc saying you don't want to go somewhere is a bigger claim to fame than saying nothing at all.  Chernobyl for example got over 10,000 tourists last year, which is a lot more tourism than it got when it when is was a boring old place that wouldn't kill you.
Comment: @Nzall Yes, thanks, darn spell check.
Comment: @John Doty That heat must be from the malfunctioning power plant melting down and spewing radiation in all directions...
Comment: @John Doty Maxwell's Equations are so over-rated by those who still use thin physics text books. Maxwells Equations were developed in the context of 'convection (atmospheric) heat transfer', in which the concept of 'heat' and 'temperature' are meaningful.  What we think of 'heat' is only 'energy of motion', and we now know it can be converted to other forms of energy directly.
Answer: It will be found pretty easily.
Technology evolves in leaps. The first time we suspected something was an exoplanet was in 1917. We got the first confirmation in 1992. On August 1, 2020 we knew of 4,301 exoplanets (it's all in this link). That's a huge leap in exoplanet detection - from 1 candidate to 1 confirmation in 75 years, then 4,300 new finds in 28 years. This year an AI scooping on old data from NASA found further 50 exoplanets.
Just the same - we know of a few objects that might be rogue planets, which is the class of object your structure would be. These are hard to detect, and the smaller they are the harder they are to pinpoint. In the past we could only detect things much larger than Jupiter, but three of the current candidates have sub-jovian masses. In a couple decades we might know of hundreds or thousands of these, and we'll be able to map their orbits around the galaxy.
If your organization has the technology to hide it in the interstellar void, then someone will have the means to find it. I can just imagine a bunch of nerds analyzing star orbits and going "hey, why is Proxima Centauri off its projected path for the next 10,000 years?"
Two scenes from Star Wars come to mind:

When the protagonists of Rogue One hack into a database to obtain data about the Death Star;
When Obi-Wan Kenobi is outsmarted by a child while trying to find a planet that is not in the stellar maps available to the Jedi Order.

OBI-WAN
This is where it ought to be...  but it isn't. Gravity is pulling all the stars in this area inward to this spot. There should be a star here... but there isn't.
YODA
Most interesting. Gravity's silhouette remains, but the star and all its planets have disappeared. How can this be?
There is a brief pause. Then a CHILD puts its hand up. YODA nods.
JEDI CHILD JACK
Because someone erased it from the archive memory.
CHILDREN
That's right! Yes! That's what happened! Someone erased it!
JEDI CHILD MAY
If the planet blew up, the gravity would go away.
OBI-WAN stares; YODA chuckles.
YODA
Truly wonderful, the mind of a child is. Uncluttered. To the centre of the pull of gravity go, and find your planet you will.
Comment: The gravitational effect of even a Jupiter-sized mass at one light-year on Sol would be negligible. At those levels, *all* stars will show errors in their projected paths, because there are a lot of rogue planets and opaque mass distributions that won't be charted.
Comment: This doesn't explain how to distinguish the installation from the other rogue planets. Easily finding all random asteroids and rogue planets doesn't mean you'll know which one is your target.
Answer: It all depends on what you mean by "scanning technology."
Space is, as we all know, very very big.  There are probably billions of rocks moving around and between the stars.  Our models of planet system formation say they should be there, but we haven't actually seen them, which tells you something right there.
Most of these rocks are (supposedly) much smaller than Pluto, but they would still add enough noise that scanning would be very hard.
With today's scanning technology hiding would be trivial.  The only reason we can see Pluto is because it is so close to us.
But who knows what future technology will bring?  You know, because you are the author.  You can decide both how future scanners work, and how future stealth technology works. As long as you are fairly consistent about it, nobody will complain.
Gravity
The one thing we cannot hide today, and we probably never will, is gravity.   Even if we discover artificial gravity, Pluto is probably too big to hide.  OR, it will use too much power.
With today's tech, we cannot see gravity directly, we can only see that other objects are moved by it. As long as you stay far away from everything, you are safe. Today.
Future tech might see gravity directly and more detailed.  That would make another Pluto stand out from the much smaller rocks around it.
Unless it is hollow. You have told us how big the thing is, but not how heavy it is. The obvious defense against a gravity detector would making your object as light as possible.  But that will also make it fragile, so there is a question of what is worst.
Power and heat
You haven't told us what this object is going to do.  If it is just a storehouse it won't
need power, but if it does something more active, it will use power.  And that means it will radiate heat.  If there are people on board, they will want to live and work in reasonably warm rooms.
Heat can be detected fairly easily, but space is still big.  A rock glowing a little bit will only be detectable from relatively close by.
Of course, this will change.  Detectors will be better in the future.  How much better, only you know.
One can limit power usage and room temperature, but probably not very much.
There are likely to be trade-offs where they can hide from one type of detector, like gravity, but only by using power and glowing hotter.
One can, for a short while, let the heat build up and not escape.  This is like holding your breath, not recommended for long periods.
More reasonable is controlling the directions heat escapes.  Let refrigerated panels shield the object in directions you expect scanners to be, that is nearby stars and shipping lanes.
The downside of this is that the object will glow brighter in other directions.  Refrigeration takes power, and power gives heat.  If an enemy ship approached from an unexpected angle, they have lost.
Travel time
A supply ship departs for parts unknown.  It returns two weeks later, empty.  A reasonable assumption is that there is something one week travel time away.
That in itself is not very interesting, but if the enemy combine travel times from several different directions the possible locations shrink rapidly.
This will be fairly inaccurate, but it allows them to let their scanner ships concentrate on a much smaller region.
This will be a spy vs spy game.  Obviously they aren't going to mark their supply ships "Secret Base Supply Ship",  but the enemy can find out in other ways. Keep your secrets secret!
The enemy can be aided by massive computer analysis.  This is likely to happen long after the fact, where they can infer the building of the object many years afterwards by going through old computer records.
Comment: We _can_ detect gravity, actually.  That's how we know how much dark matter is concentrated where.  We can observe the gravitational lensing caused by gravity.  And there is nowhere in space you can hide this, other than hiding it in something that's already massive, because the cosmic background radiation is everywhere.  And the problem with putting it somewhere there's already a lot of mass is, you want it far away from anything else.
Answer: DWKraus's answer - Hidden in Plain Sight - is excellent.
I'm just going to develop that idea a bit further, in a way that's too long for a comment.
DWKraus' answer boils down to: don't hide it - show it, but as an either utterly boring or unattractive phenomenon.  With several good ideas on how to do this.  I'm going to focus on the boring, "can't be bothered" aspect, inspired by two authors.

Douglas Adams (HitchHiker's Guide).  Making anything invisible is incredibly hard.  It's much easier to surround it with a Somebody Else's Problem (SEP) field.  People observe the thing, but instantly turn away and forget about it.
Iain Bank's idea of "interstitiality".  In that novel Banks's protagonist is a member of a quirky cult, one of whose rules is that, when forced to enter the normal, "unclean" world, you must never do things in the usual way, but find a way to slip through the cracks between systems, customs, normal way of living.  (The Hungarian concept of the kiskapú or "small [side] gate" is similar, but refers to getting things done in an overly bureaucratic state).

What I'm suggesting is to engineer the invisibility of your planetoid, but using social rather than technical engineering.
How, in the context of your world, might you encourage anyone who might be interested, who happens to stumble across evidence of your planetoid, to actively not want to investigate any further - to react not with curiosity but with indifference, or even with an active desire to do anything else (clean the bathroom, de-claw the cat)?  In other words, how to create a real SEP field?
Perhaps the disguise this planetoid adopts, in official records, could connect it with a difficult, burning issue, which people would rather just not deal with.  A recent traumatic war; a pandemic; some religious prohibition.  Whatever impression your planetoid projects, it needs to be tiresome rather than challenging, evidently boring rather than noteworthy or enigmatic.
Or, using the idea of interstitiality: you disguise it (using an artificially-created emissions spectrum, for example) as one of millions of objects which fall between two jurisdictions.  For example: according to Galactic Exploration Institute's records (which you have "improved" for your own purposes), this object is being surveyed by the Institute for Galactic Exploration; according to IGE's records, it's the GEI who are responsible for investigating it.  Both the GEI and IGE are immensely bureaucratic, and they loathe each other.
Answer: Hiding it is not a problem. Minimize all transmissions from it, make it as close to a black box object as possible, and burry it in random noise.
The provlem is, how do YOU know where it is? There is no GPS system for the galaxy. There is no galactic coordinate system. You can't put a dot on a star map and say 'there it is', because no star map is static. You know you put it somewhere, but where is it now?
If there is no way for the other side to detect it, there is no way for you to detect it.
As soon as you put some sort of tracking beam on it for your use, so you can find it, it is no longer invisible for the other side, either.
Comment: I am fairly certain that by the time we can build a Death Star in interstellar space, we can also navigate it.  The stars are moving, but in predictable paths.
Comment: @Stig Hemmer Unless they have instantaneous travel, wormholes or whatever, 'predictable paths' just can not stand up to light taking hundreds of years to traverse void space.'I am sure I saw it here yesterday - wait, that was two centuries ago by light travel. Travel through a worm hole to pooint B, everything is different because now the light is either earlier or later than it was at point A. Star charts show how it USED to be. Showing it as it is NOW is useless - no one can see them 'now'. Look at me, I'm here, but I will be there when you see me now. Problem starting to clear up?
Comment: @JustinThymetheSecond But we'll be able to predict how things are different. If we know its motion relative to some larger body with a known position, we can always calculate how to meet up with it at whatever speed we're going. We can tell distance and speed, so even if we only know where it was 300 years ago, we can tell where it is now.
Comment: @ Redwolf Programs When is 'now'? Unless one posits instantaneous communications and travel, even though we can calculate where on object SHOULD be, 100 light years away, we are not there 'now', it will take a long time to get 'there'. No matter how advanced computing power gets, we will never get there. Just too many variables, too many unknowns, too many equations. That 'some larger body with a known position''s 'known position' is no longer valid. We no longer know where that 'large body' is.
Answer: For humans - very hard, for computers, who create a 3d representation of disturbances- not so much.
You need two observatorys, that can capture all wavelengths, in all directions simultanously in hiRes and store it.
One can be near earth, the other- needs to be ahead or behind in flight direction of the solar system, best would be synced otherwise regarding orbits to earth.
From those two captures, a 3d model of all background oclusions to the neighbourhood could be computed. Apply physic predictions and orbital mechanics and you can map the void between the stars pretty good.
https://en.wikipedia.org/wiki/Parallax
You could even add some automated probes, that track "intersting occlussion object vectors" - something obscures a nearby star, you nudge a bunch of probes away from the observatory, tracking  the one for which the object stays occluded the longest.
Loads of fun.
Comment: And assumes instantaneous communications and instantaneous travel of those 'probes'. These monitoring stations would have to be everywhere in the galaxy, given that 'occluded light' coul dhappen anywhere in its one hundred thousand year journey through space.time. You would never know WHEN it was occluded. So many people just think 'space' when it is really 'space/time'. Think 'light-years/speed-of-light' for 'distance/time' and then realize that 'distance' is no longer valid over that 'time', the universe has expanded or even curved differently during the 'time' the light 'travelled'.
Comment: There is a certain 'time frame/time-period' point after which concepts of 'distance' become meaningless and no longer apply, because that 'distance' changed over that 'time'. Only if one considers instantaneous information transfer, instantaneous commuications, and instantaneous travel does really long (hundreds of light years) 'distance measurements' mean anything.
Answer: If the largest concern is detection via infrared radiation, then one possibility would be to hide closer to a (uninteresting, probably a red dwarf) star.
After all, if you need to emit enough radiation to heat your object to 50K, then if the other objects that you are mimicking are only 10K, then you'd stand out.  However, if you were closer to a star, and so you should be at 300k, well, you being 340K would not be that exceptional.
And, with a bit more effort, you could take an advantage of variable albedo to further hide your heat signature.  If we have an object with higher albedo towards the star (e.g. mostly white), and lower albedo away from it (e.g. mostly black), then it would be naturally cooler than if the albedo was evenly distributed (and this is not a violation of thermodynamics; it happens because the object is thermally more tightly coupled to the cold interstellar space than the hot star).
Now, if the object is rotating (and most natural objects will be), then this effect averages out over time.  On the other hand, if we have an artificial object, we can deliberately change the albedo, for example, one low-tech way would be to expose white shutters when facing the star, and black shutters when facing away.
This results in a thermal deficit over a natural object; we can use the away-from-the-star side as a thermal dump (and if we dump the right amount at the right time, we'd generate the same heat distribution as a natural object).
To detect this from thermal anaylsis, the scanner would have to get close enough to see that the albedo of a specific spot on our planetoid changes over time; that is plausibly out of scope for a general galaxy-wide scan.
Answer: Given that it can make FTL "jumps", all you have to do is move it every so often so that even if it is detected it is long gone by then.
As others have mentioned the radiation it gives off and gravitational pull it exerts are limited by the speed of light, so in order to detect it and then jump to its location it would have to be in the same place for at least as long as it takes light to travel from it to the nearest observer.
So then all you have to do is pick a random place that is at least one light year away from any possible detectors (preferably much further) and then have it move every six months or so just to be on the safe side. If jumps are expensive then have it hide even further from people and jump less often
Answer: Communications systems...
They csn hide in a bok globule, which is a solar mass dark cloud, perhaps more common than stars but uncountable currently because black against black backgrounds.
The hidden base would probably send and recieve communications and use energy, probably directional electromagnetic waves like light or radio of some wavelength.
Only energy that is emitted by the station energy systems or its communicatons can be detected by deflection from gravity or reflection by cloud or a panel of the station something.


How to best cache server responses on server side with Jetty and Spring?

Question: I'm using embedded Jetty 6 and Spring Web. What is the best way to cache served pages in this setup to avoid regenerating them on every request?
Answer: What are you trying to cache exactly? If you're trying to reduce file I/O from constantly reading template content from disk, StringTemplateGroup automatically does this.
You can configure the caching settings (how frequently the cache is invalidated) by using StringTemplateGroup#setRefreshInteval(int).
Comment: I'm trying to cache the entire response, on per-request basis. I guess I'd better delete reference to ST from my question.
Answer: Spring 3.1 supports a Cache Abstraction that can be used to cache web responses.


Where to ask questions on mathematics

Question: I need to know where to ask questions on Calculus
Comment: My bad, ignore my original answer.  Mathoverflow is not for general math questions. See discussion here: http://meta.stackexchange.com/questions/34570/mathoverflow-net-how-can-we-get-members-of-this-site-and-the-so-sf-su-sites-to-s
Answer: There is now Mathematics - Stack Exchange, which says in it's FAQ:

Mathematics - Stack Exchange is for people studying mathematics at any level and professionals in related
  fields. We welcome questions about:

Understanding mathematical concepts and theorems
Hints on mathematical problems (but please read our FAQ about homework questions)
History and development of mathematics
Solving mathematical puzzles
Software that mathematicians use

(Read the full FAQ to see the limits.)
Comment: Paulo, if you're going to answers all of the older questions similar to this one, could you also point them to the more general link from the faq: [here](http://meta.stackexchange.com/questions/8401/where-can-i-ask-questions-that-arent-stack-overflow-questions)
Comment: Ah, good idea, thanks. Not today, though. (If someone else wants to do this, simply look in the *Related questions* on the right. `==>`)
Answer: Per David Speyer on this answer:

If the question is an interesting but elementary puzzle: The Art of Problem Solving
For standard high school or undergraduate material: Dr. Math

More importantly, if the question falls into one of the above categories, DON'T go to mathoverflow.net.
Comment: I totally agree with the answer, but I would just like to throw out that Dr. Math is way too overworked (too many questions not enough doctors) to be a reliable source for new questions unless if your question has already been answered in the past.  Not mathoverflow's problem, but just wanted to weigh in.
Answer: In MathOverflow's FAQ, several alternative sites are suggested:

MathOverflow is not for homework help.  Try to make sure your
question is of interest to at least
one other mathematician. Though
there are no hard and fast rules about
who may post here, the intended
audience is professional
mathematicians, mathematics graduate
students, and advanced undergraduates.
If your question is closed as "off
topic," it might be because it was too
elementary. This doesn't mean that
your question is "bad," just that
MathOverflow isn't the right place for
it. But there are lots of other math
Q&A sites where your question might
fit right in, like Ask Dr. Math,
Art of Problem Solving, or
NRICH. If your question was
closed as "too localized," it was
probably an explicit homework problem
(or looked like one). MathOverflow is
not the right place for such
questions; they send the message that
you want somebody else to do your work
for you, and you're not even willing
to ask it in a general form. You may
want to try asking such questions at
Tutorii.

This is just a selection. Of course, if you ask Google, it will you more options.

Where to ask questions on mathematics


50mm mirror lens. Does one exist?

Question: I like the bokeh and limitations of mirror lenses. I however, also love my 50mm 1.4. Does a 50mm mirror lens exist? I searched but could not find one. If not 50mm what is the closest to 50mm one can get?
Comment: Other than for artistic reasons, what would be the point in building one?  Come to think of it, fitting the optics into a lens that short would be an interesting exercise, and you certainly wouldn't get f/1.4 out of it.
Comment: can you specify more your camera/system of interest?
Comment: @aaaaaa just in general. I would prefer cannon at the moment, but I am also looking to buy a new body, so any system is fine
Comment: @Blrfl not sure.. maybe more light transmission
Comment: For every mm² you cover in the center of the lens you would need to increase the area of the outer part of the lens by at least the same amount to maintain the same transmission. In practice, due to the depth of pixel wells and their lower sensitivity to angled edge rays compared to more collimated center rays, you would need to increase the outer area by more than you reduce the center area of the entrance pupil.
Answer: The mirror lens design resolves two key optical problems:

All lenses suffer from chromatic aberration. This is color fringing due to the failure of the lens to refract (bend inward) all colors of light accurately. In a conventional lens, this is accomplished by sandwiching two or more lenses, of different powers using different recipes for the glass. The result is an achromatic (without color error) lens. The mirror lens avoids chromatic aberration because it uses a "first surface" mirror. The mirror coat is thus on the surface of the primary lens. This configuration evades chromatic aberration because the image forming light does not transverse the primary lens element. Chromatic aberration gets worse if the lens is a powerful telephoto. Thus mirror lenses are favored for super long focal length lenses.
The mirror lens folds the light path thus a long focal length can be accommodated by a shorter lens barrel.

The 50mm lens is only about 2 inches in focal length. Correcting chromatic aberration in such a short lens is a piece of cake.  Lens designers would  never attempt to fold a 50mm and make the barrel super short except for a very specialize application. Bottom line, you are not likely to find a find a 50mm mirror lens.
You like the bokeh! It is created by the fact that the mirror lens uses two mirrors. The secondary is up front. It is a small silvered circular mirror centered in the tubes entrance. You can experiment and obtain nearly the same bokeh with your existing 50mm. Mount a UV filter and glue an obstructing circle on it's center. Cut some opaque disks, different sizes and using double stick tape, and affix one to the center of the UV. Now make a shot or two and then try a different size opaque center blocker. You might like to know, some famous portrait lenses of the past used a center opaque obstacle.
Comment: I went looking for examples - this is what I found: http://photocornucopia.com/1053.html
Comment: @ 10 Replies -- Chromatic aberration is mitigated but not eliminated by sandwiching a strong positive power lens and a weak negative power lens together. Both exhibit opposite chromatic aberration so this design mediates but does not eliminate. Highly corrected lens are expensive, you get what you pay for. Try the center obstacle it will deliver bokeh akin to the mirror lens.
Comment: I have a problem with your statement about chromatic aberration. My 50mm at 1.4 has ridiculous CA. I can't take pictures of shiny metallic things in any light at f1.4
Comment: @ rrauenza  --- A tip of the hat from Alan Marcus
Comment: @10Replies What you see as CA is probably [bleeding](https://photo.stackexchange.com/a/94798/15871).
Comment: @MichaelClark It is most definitely CA. Out of focus behind the focal point is green, in front of the focal point is magenta
Comment: @10Replies That is unusual for a 50mm prime. What lens is it?
Comment: @MichaelClark canons 50mm f1.4
Comment: @10Replies Have it checked out. My EF 50mm f/1.4 demonstrates very little CA, even at wider apertures.
Answer: I don't know if anyone still cares about this, but you can get very short focal length mirror lenses. Schwarzschild microscope objectives use mirrors. They might have focal lengths ~0.5-5mm. These are highly corrected for microscopic work, not for conventional photography.
As others have mentioned, mirror lenses have a central obstruction, this would reduce the speed of the lens (light input) and also lower contrast. Also, the sharpest part of a lens is near the optical axis (the centre), with a large central obstruction, this region is lost.
Answer: Here is a patent by Tamron on a quite wideangle lens for cameraphone.
(JP2016256557  JP2018109673A).
https://worldwide.espacenet.com/patent/search/family/062721391/publication/CN108254859A?q=JP2016256557%20&called_by=epo.org
Widest example from patent has FOV of 23.6 degrees which corresponds to about 95 mm in FF terms. Of course, such design is impossible to use on a SLR camera due to short backfocus, but possible with MILC camera.
If you find something wider, let me know.
(except there are even wider speciality mirror lenses but with a blind spot or non-rotationally symmetric)
Comment: I am disgusted by Alan Marcus' non-answer to another question. OP didn't ask "what are mirror lenses good for" or "why normal FOV mirror lenses don't exist"!
He asked what is the closest lens to normal FOV.

50mm mirror lens. Does one exist?


Show RSS Feeds of IE as Screensaver

Question: Is there a way I can display the rss feeds that I have subsribed to using IE7 or IE8 under Vista and Windows 7 as a screensaver?
Answer: RSS Screensaver allows you to add new feeds and choose a background to display them on for a screensaver, although it cannot read them directly from IE unfortunately.
Answer: News Screensaver 2.2 has the ability to import your feeds.
But its not freeware.
or You can use 2Flyer RSS screensaver or John T's one.

Show RSS Feeds of IE as Screensaver


Probit and logit Model

Question: Can you provide me with an intuition about what it means to derive a probit or logit model from an underlying latent variable model?
Answer: Logit and probit models can be derived from an underlying latent variable model. To see this, let $y^{\ast}$ be an unobserved (i.e. latent) variable, and suppose that
\begin{equation}
    y^{\ast} = \beta_0 + x\beta + \epsilon, ~y=1[y^{\ast}>\gamma]
    \label{latent}
\end{equation}
where $1[\cdot]$ is an indicator function taking value $1$ if $y^{\ast}>\gamma$ and zero otherwise. Here, $\gamma$ is a chosen threshold. If the latent unobserved utility $y^\ast$ is above the threshold, then $y$ takes the value one; otherwise, it takes the value zero.
The idea is to see the binary outcome $y=\{0,1 \}$ as a dichotomization of a latent continuous variable $y^{\ast}$ modeled with a canonical multiple linear regression model. For example, a bank can issue a loan ($y=1$) or choose not to ($y=0$). Think of it as having an underlying continuous latent outcome, $y^{\ast}$ which can be regarded as a measure of the choice utility.
In the model above, we assume that $\epsilon$ is independent of $x$ and that $\epsilon$ either has the standard logistic distribution or the standard normal distribution.
Recall, the standard logistic and standard normal distribution are symmetric about zero. Thus, $1-G(-z)=G(z)$.
From the model above, we can derive the response probability for $y$. First, we assumed that $y_i=1$ if and only if $y^{\ast}_i > \gamma$, with $\gamma$ set arbitrarily to zero. Thus,
\begin{align*}
    \mathbb{P}(y=1|x) =& \mathbb{P}(y^{\ast} >0|x) = \mathbb{P}(\beta_0 + x\beta + \epsilon >0|x) = \\
    =&\mathbb{P}[ \epsilon > -(\beta_0 + x\beta ) |x] =1 - \mathbb{P}[ \epsilon \le -(\beta_0 + x\beta ) |x] \\
    =& 1 - G[ - (\beta_0 + x\beta)] = G(\beta_0 + x \beta)
\end{align*}
where $\mathbb{P}[ \epsilon \le -(\beta_0 + x\beta ) |x]$ is the cdf of the error term of the latent outcome.

Probit and logit Model


How to start a new match offline

Question: I'm playing CSGO offline with bots. After all of the enemies have died and all of the objectives have been completed and the time is up, the game won't start a new match. I've tried vanilla maps and I've tried multiple workshop maps, but I still get the same exact problem. Does anybody have any ideas?
Comment: You mean that the vote doesn't pop up? Have you ever made any changes to the `mapgroup`? Also you can try this `mp_endmatch_votenextmap 1` in the console.
Answer: Here, start a new offline match and type
<code>mp_ignore_round_win_conditions 0
</code>
I can't explain why this happens but the problem shouldn't persist after you've entered the command.

How to start a new match offline


Negative Binomial Inverse Link Command in R

Question: I am working with a negative binomial model in R using the MASS library.  I am trying to estimate the predicted count for one of my explanatory variables.  Does anyone happen to know the command for the inverse link?  For instance, in R, regarding the probit model, the inverse link is pnorm (coefficients).  What is it for the negative binomial in R?  I have been looking online with little success.  Any help would be greatly appreciated.
Answer: The standard link in most negative binomial regression models is the log link $\log(\mu) = x_i^\top \beta$. Thus, the inverse is simply $\exp(x_i^\top \beta) = \mu$.
This is also the standard link in glm.nb() in R - as well as in other R packages implementing the model. By the way, in glm and negbin objects you can access the inverse link function by object$family$linkinv. So you can always take this from the fitted model object.
Previous versions of this response erroneously claimed that this is not only the "standard" link but also the "canonical" link. However, this is only the case for the Poisson distribution (a special case of the negative binomial for $\theta \rightarrow \infty$). For discussions of the canonical link, see: Negative binomial regression question - is it a poor model? An R implementation is available in the VGAM package, see https://www.rdocumentation.org/packages/VGAM/versions/1.0-6/topics/nbcanlink
Comment: Thank you. I always thought exp was for the Poisson model and didn't realize it was NB.  Thanks!
Comment: It is the canonical link in both models (and hence used by default in R).
Comment: @Achim log is definitely the default in R but are you sure it's canonical for the negative binomial?
Comment: @Glen_b You are too kind! Lesson learned: Don't answer SE questions before having a shower. I'll correct...


How do query a pardot prospect by email address

Question: I think i must be missing something simple, however I have looked through the documentation here:
http://developer.pardot.com/kb/api-version-3/prospects/
and I cannot find a simple way to query for prospect based on their email address.  None of the filters support it.  Is there something I'm missing here?  Or is there a different API I should be using to query for a Prospect and get their various attributes.
Answer: ahh. I found it. Here is the URL in case anyone needs it:
https://pi.pardot.com/api/prospect/version/3/do/read?email=
Comment: did you mean `/api/prospect/version/3/do/read/email/`?


Color code tasks in calendar based on who it is assigned to

Question: In Sharepoint tasks, in the calendar view, all the tasks are colored default blue. I'd like to be able to give different colors to it based on some criteria, preferably who the task is assigned to. Is it possible?
Answer: I to faced the same problem,then I used calendar overlay concept. For your scenario it is not good practice to create based on user(People Picker) i.e Assigned to for certain cases.

Because we can't predict number of users,so we can't create view for all the users.

Better create view based on choice columns like Priority,
For your reference.
Thank you


How to get this pixelated edge type effect in Photoshop?

Question:

How do I go about getting this slightly pixelated look in the image below (the circles being little squares rather than smooth curves).
Comment: Its called aliasing. Usually its because you do not apply antialiasing.
Answer: The easiest way to get a jaggy edge is to leave anti-aliasing OFF when one makes a selection with magic wand , lasso or ellipse selection tool. and uses the selection to separate or fill a part. The stairs can be too small to be seen if the image has too high pixel dimensions , but zoom in the edge and there it is. Scale to bigger size a small item which has non-antialised jaggy edge. The jagginess stays if you have interpolation mode "Nearest neighbour" =ON. Other interpolation modes, for ex. "Bicubic" smooth the stairs . The edges you want are seen as faults when one removes backgrounds.
A pixel artist can use small image sizes, say only 50 x 50 pixels. He draws his artwork with the pencil tool and often one pixel at a time (=the pencil is 1px wide). Jaggy lines and edges are a part of his art. The whole artwork must be designed from the start, it's very difficult to convert a normal photo to pixel art so that the result looks other than bad Photoshopping.
Opinions:  All of your examples have different qualities. The egg shapes in top left really look the result of a bad background removal because the fill patterns are smooth, but the edge isn't.
The red face below it has jaggy edge and dithered shading. It looks a solid piece of art(=made intentionally as it is). The style was common for ex. in videogames when computers had small color palettes, maybe only 16 colors on the screen at a time.
The top right version has very rich and complex set of offset paths with gradient colors - a thing which surely many of us would like to use if they knew how to control it easily. Jagginess is not there seen as stairs, but as a texture which resembles embroidery.
Comment: top left probably a 3d render that had no antialiasiong on. Not result of background removal. 3d shading is often smoothe ven if edges are not
Comment: That's possible. It only resembles my first background removal attempts. Instead of a colored ellipsoid there was a low resolution photo of a person. The edge pixels look like they have now a mixture  of a dark background and the actual edge color. That doubles the failure in case it's  a background removal attempt.  The edge is right only against a new dark background
Comment: +1 from me.  I'd go even further. The first and third images look like errors to me, not some deliberate effect or pixel art - just bad quality GIFs enlarged/zoomed in, and certainly not something desirable, unless of course the OP wants to create a deliberate 1995 amateur web design look.  This is one of those "but why would you even want to do that" questions.


Water electric dipole and time reversal

Question: Why some objects, such as water molecule, can have a (large) electric dipole moment without violating time reversal symmetry, while the existence of an electron or neutron electric dipole moment would imply time reversal invariance? Thank you!
Comment: Well a neutron electric dipole moment, is just like a water molecule electric dipole moment i.e. you have negative and positive charge on opposite sides (i.e. a charge distribution). The difference is that the separation between them is a lot smaller for a neutron. But this (the separation) doesn't explain why a neutron violates time reversal, while the water molecule doesn't. And that is my question.
Comment: I'm having a hard time comparing the two. Clearly one can have a dipole in a molecule if there is a charge distribution. Or have a positive and negative charge separated by a distance. Those have nothing to do with time reversal symmetry.
Comment: Keep in mind the neutron has a magnetic moment as well. Issues of time reversal only come up if you have a non-zero magnetic moment (charge doesn't do anything if you reverse time, but current changes sign). In the case of water molecules the magnetic moment is zero, and thus time reversal symmetry holds.
Answer: The proper statement is that the electric dipole moment of a neutral object restricted to a single irreducible representation of the rotation group must vanish, if $T$ symmetry holds.
A typical neutron in the lab is in such a state, because the rotational energy levels of nucleons are widely separated, by much greater energies than are available at room temperature. But the rotational energy levels of a typical water molecule are much closer together, so the argument doesn't work. (However, if you really did have a perfectly isolated water molecule brought to its ground state, it really would have no electric dipole moment; its orientation would enter a superposition in which the dipole moment cancels.)
Comment: It's not clear to me why your first sentence should be true. Can't you have an odd parity irrep of the rotation group that respects T-symm? This could have a dipole moment and obey T-symmetry, but not inversion symmetry. A classical linear dipole (positive charge at $+a$ and negative at $-a$) is overall neutral and does this.
Comment: @KF Gauss This is a quantum statement, and classical intuition doesn't apply. A classical rigid body described by a classical orientation isn't in a quantum irrep of the rotation group, instead it is in the sum of infinitely many such irreps.
Answer: Your question could be "is  CP (Charge reversal parity reversal) obeyed by water molecules?", because it is the CPT theorem that is used for getting a time reversal asymmetry check for the neutron.

A permanent electric dipole moment of a fundamental particle violates both parity (P) and time reversal symmetry (T). These violations can be understood by examining the neutron's magnetic dipole moment and hypothetical electric dipole moment. Under time reversal, the magnetic dipole moment changes its direction, whereas the electric dipole moment stays unchanged. Under parity, the electric dipole moment changes its direction but not the magnetic dipole moment. As the resulting system under P and T is not symmetric with respect to the initial system, these symmetries are violated in the case of the existence of an EDM. Having also CPT symmetry, the combined symmetry CP is violated as well.

There are experiments going on to measure permanent electric dipole moments in atoms and molecules including the water molecule.
I think the crucial word here is the dipole moment should be permanent in order to find time reversal violation via CPT, i.e. not dependent on the environment.
After all, the universe we observe has mainly baryons, so CP is mainly violated by the matter antimatter asymmetry observed. CP is violated  in weak interactions, but the size is not enough to explain the baryon antibaryon asymmetry observed. CP violation ( and consequently time reversal asymmetry) are an ongoing  research subject  both experimentally and theoretically.

Water electric dipole and time reversal


Unit Testing Framework for Oracle PL/SQL?

Question: I've seen the question (and answer) when posed for MS SQL Server, though I don't yet know of one for Oracle and PL/SQL.  Are there xUnit style testing frameworks for Oracle's PL/SQL?  What are they?
Comment: possible duplicate of [Unit testing for PL/SQL](http://stackoverflow.com/questions/152441/unit-testing-for-pl-sql)
Answer: The most commonly used is probably utPLSQL
The original author of this toolkit now works for Quest, which has a commercial PL/SQL unit testing application.
Answer: The last version of SQL Developer includes an Unit Test suite very interesting.
Answer: I have created and using PL/SQL unit testing framework using Ruby library ruby-plsql.
It provides much shorter and more readable tests than utPLSQL and gives more flexibility compared to GUI tools (like Quest Code Tester or SQLDeveloper 2.1).
Answer: PLUTO appears to be very new, and there doesn't appear to be a lot of documentation.  So I would be concerned that you'd be working through a decent number of bugs to get things working.  utPLSQL has been around for a number of years and pretty widely deployed, so there have been a lot more bug fixes and a lot more people who can help out if you run into problems.
Additionally, and not to disparage anyone, but Steven Feuerstein, who wrote utPLSQL is one of the most recognized PL/SQL experts in the world.  While I'm sure the author of PLUTO is a perfectly competent developer, I don't believe he has anywhere near the reputation Steven has.
Comment: You could ask him youself :)
http://stackoverflow.com/users/12731/josh-mcadams
Comment: My only issue with utPLSQL is that it seems steven has moved on to Quest, and is doing a utPLSQL thing for money now, which I don't have an issue with, but the windows driven nature of the app turns me off.
Comment: The Windows-driven nature of the utPLSQL library?  Or of the Quest Code Tester application?  While Steven isn't (I assume) doing a lot of utPLSQL development these days, there are plenty of other developers working with it that can contribute patches.
Comment: Quest Code Tester. If it wasn't all driven by a windows application, I might be looking at it, but for the moment its a utPLSQL, haven't had a chance to seriously look at PLUTO ye though
Answer: I found this question searching for a PL/SQL unit test framework. I've found an article where PLUTO's developer argues for it:

... there are a few products that help PL/SQL programmers test their code. Quest Software has a product called Code Tester for Oracle; however, the free version is cripple-ware and the for-pay version just adds one more obstacle for you to have to get by in convincing your organization to start testing. There is also a utPLSQL project that was abandoned a few years ago and it is starting to suffer from bit rot.
Answer: I've recently used successfully unit testing framework of PL/SQL Commons toolkit (see also author's slides). The toolkit is not yet publicly available (at the time of the writing) but if you drop an email to the authors you'll get a working package (or at least I got).
Answer: I also found another library: PLUTO - has anyone used these and can compare/contrast them?
Answer: We use DBUnit. It integrates nicely into a continuous integration tools like Cruise Control, though developers need to learn a little Java. Templates, utilities and code samples helped our pl/sql developers get up to speed quickly.
Answer: Haven't used any, but last realese of utPLSQL was on July 2005 and since the author is the same from the commercial code tester for oracle (http://www.quest.com/code-tester-for-oracle/) I don't think we'll be seeing much of utPLSQL in the future if any, so I think I'll take my chances with PLUTO (2008)
Answer: I looked at all of those, but the only one I liked was PLUnit.  It does seem to have been abandoned by its maintainers (I had to tweak the scripts to make them install).  But the API is extremely simple, and it doesn't try to force an OOP/xUnit approach into PL/SQL.


Is SharePoint throttling my load test?

Question: I have a Visual Studio 2015 load test that I am running against SharePoint 2013.  Once the test increases to around 100 users, page response times increase dramatically.  Once the load test hits 1000 users, the page response time is in excess of 100 seconds.  However, if I navigate to the site there is no slowdown whatsoever (even from the workstation executing the test); also the WFE servers are consuming 20% CPU, <50% RAM, and <5% network utilization during the test.  The CPU, RAM, and network utilization are also in great shape on the computer running Visual Studio 2015.  I am not running this test with any agents, only from one workstation.  Has anyone seen this before?  Could SharePoint be throttling my requests?
Comment: Just to make sure it wasn't the load balancer, I pointed the URL directly at one of the WFEs.  I am still getting the same result.
Comment: The SPHealthScore returned in http headers is typically at 0 and peaked at 1 very briefly.  (0 is best, 10 is worst).
Answer: Go to your Central Administration website->Manage Web Applications->Click to the right of the name of your SharePoint website->Click on the little arrow on the bottom right of the "General Settings" button on the Ribbon, and choose "Resource Throttling".
There are a number of settings here you might be interested in, but you might want to take a particular look at "HTTP Request Monitoring and Throttling".
Back in "Central Administration", you might also want to check the "Monitoring" tab, as the Health Analyzer, Health Reports, and Diagnostic logging might help you track down what is going on.
Answer: This turned out to be a network saturation issue and had nothing to do with SharePoint configuration or settings.

Is SharePoint throttling my load test?


JAR file behaving differently in a different place in file system

Question: I have project called test in Eclipse which I want to export into Runnable JAR file. During the process of exporting the project, when I choose as a location of JAR file the subfolder of test folder in file system, such as C:/.../test/App.jar, it will work. However, when I want to put it for example on my desktop, it will run but in a very limited look (some GUI components missing) and it throws a lot of exceptions saying something like that:
at java.awt.EventDispatchThread.run(Unknown Source) xception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class com.sun.opengl.impl.windows.WindowsGLDrawableFactory
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Unknown Source)
       at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java}

What can be the problem? I assume it is not good that I have to specify my JAR file concretely into one folder in file system, it would become unuseful for any other potentional user.
Answer: Looks like the jar needs other jars to execute. In this case you would have to set the classpath before you execute the jar
This might help you with your problem.


TLS/SSL Offloading to PA220 without requiring clients to load additional CA

Question: If I'm understanding this correctly, the Palo Alto PA-220 allows for SSL/TLS traffic decryption using its proxy feature. By generating a Certificate Signing Request and loading it into the firewall, Clients should never receive a browser warning when accessing HTTPS sites?
Comment: No. It can't work like that. If the device is a TLS Terminator (clients connect to it, it is a TLS server, it handles the TLS connection and proxies requests to backend servers), it needs the private key of your certificate. Either the private key is imported into it or it generates the key itself and exports a CSR that a CA signs to produce the certificate and you import the certificate to the device. If it's a self signed certificate, you don't need a CA. If it's a certificate signed by corporate CA, you need the corporate CA. But anyway the device needs the private key, not just a CSR.
Answer: You misunderstand how TLS works.
A certificate signing request is exactly what it sounds like: A request for a certificate authority to sign a certificate. The request alone is worth nothing. Compare that with the request to be released from prison, compared to a signed pardon letter.
As Z.T. pointed out in a comment, the requests needs to be signed from a certificate authority.
You have two ways of going about this:
For outgoing traffic
Your company should have an internal certificate authority, which is rolled out automatically to all clients using your endpoint management system. Then, the proxy can generate a private key and a CSR, and the IT department can sign the CSR with the private key of the internal certificate authority.
It is typically then configured that all outgoing traffic from employee hardware is rejected and required to pass through the proxy.
For incoming traffic
Since you mentioned that you don't want clients to install additional certificates, I assume what you want is to monitor incoming traffic. The proxy would then act as a reverse proxy, taking incoming traffic, inspecting it and forwarding it to the designated endpoint.
The setup is identical to that of your currently externally visible endpoint. You take the private key and certificate from that server and place it on your proxy. To the end-user's computer, this proxy is the endpoint. The TLS connection ends at the proxy, where the proxy can inspect the traffic.
The request must ultimately be forwarded to the endpoint (if deemed safe), and I recommend using an internal certificate for that, meaning you create a new TLS connection between the proxy and the endpoint. This has the advantage of making it harder for internal attackers to gather sensitive information from the communication between proxy and server.


How to Change an Icon based on what Collider the Player Hits

Question: So I have a 2D platform game where a player goes around collecting fruit but currently I only have one icon. Currently I use an image on a canvas to display the fruit image. How can I make the UI image change based on what fruit the player collects?
Comment: If we do not even know how you have your current one icon setup, we can't tell you how to change it to a different one.
Comment: I use an image on a canvas
Comment: Hi, like Zibelas also mentioned, could you provide a bit more details as to what the icon is used for and what you have tried so far? Without that, a lot is possible and a lot of guessing has to be done.
Comment: @D.Kallan I have an image of the fruit next to the score but I want the image to change dependingo n what fruit they collecy
Comment: Assuming the fruit itself has an image, when you pick it up, you can assign the sprite from the fruit's sprite-renderer to the sprite-renderer of your score icon, right? You might have to make the score icon accessible to the player / fruit (depending who detects the pickup) so that the one that detects/removes the fruit can say `scoreIcon.GetComponent().sprite = fruit.sprite`, for example. Ofc you can also just store a reference to said sprite renderer, so you don't have the GetComponent<...>() every time. (dont store the whole thing if you only need one component)
Answer: First, let's make a simple data container to put on our fruit items. For now, this will contain just the image we want to display when we collect it.
public class Collectable : MonoBehaviour {
    public Sprite sprite;

    public void Collect() {
        // Here you can spawn a collection effect or play a sound, etc.
        Destroy(gameObject);
    }
}

You could expand this to contain an enum of the different fruit types so you can react differently to them, or maybe make a ScriptableObject to hold the fruit's properties and gameplay effects, and hold a reference to that (ie. the Type Object pattern).
Next we'll make a script that detects when we've collided with a collectable. Put this on your player character.
public class Collector : MonoBehaviour {

    // Here I assume you're using Unity 2020 or higher.
    public UnityEvent<Sprite> onCollect;
    // On older versions, declare public class CollectionEvent : UnityEvent<Sprite>{}
    // then make this a public CollectionEvent onCollect;

    void OnTriggerEnter2D(Collider2D collider) {

        // Ignore any trigger collisions that aren't collectables.
        if (!collider.TryGetComponent(out Collectable item))
            return;

        // If anyone is listening to our collection event,
        // tell them what we collected.
        if (onCollect != null) { onCollect.Invoke(item.sprite); }

        // Collect the item so it disappears.
        item.Collect();
    }
}

Lastly, we can have an inventory script that tracks what collectable(s) you're carrying and updates the UI accordingly.
public class PlayerInventory : MonoBehaviour {

    public Image itemSlot;

    public void AddItemToInventory(Sprite sprite) {
        itemSlot.sprite = sprite;

        // Do other things you need to do with the collectable,
        // like applying gameplay effects or updating a counter.
    }
}

This can sit in your HUD. In the Collector script's Inspector, set the onCollect event to call the PlayerInventory script's AddItemToInventory() method. Or you can wire up this link after (re)spawning the player character with collector.onCollect.AddListener().
If different items have different properties, then you might want to send the Collectable itself through this event instead of a Sprite, or a CollectableType data structure that has the properties you need.


standard solution for managing files in os file system level for java?

Question: i am working on a web application.we are using java and jsp to upload user files on server and then do some management tasks on them, like checking that every one has only one profile picture (it is not a portal) or there should be only one folder for each user that contains all of its data. so is there any accepted solution, or manifest on how some one should do this, where to use db over file system and so on?
thnx
Answer: The traditional way of doing, in my experience, it to put all the structured and textual information in database.
Binary files as images, videos, sounds, etc. can be stored in database, but since they can't be queried and are more easily served and backed up from the file system, they're often stored as files.
Answer: If you are using relational DB do not store files there. It is possible but it does not might overload your DB. Better way is to store files in file system and references to theses files in DB.
Concerning the directories. If your system is relatively small you can store files in user dedicated directories. It is very convenient for debugging and for implementation of some features like retrieving list of files per user or removing user. The disadvantage of this approach is scalability. File systems typically cannot effectively work with directories that contain millions of files. So the more scalable solution is to create hierarchical structure of directories and fill them until number of files reaches certain threshold, e.g. 10000 files. In this case create new directory.
If you create 3-5 levels deep directory structure it is scalable enough. Still references to the files are stored in DB. So you can always retrieve files belonging to user utilizing query like
select path from files where user=USER_ID
then iterate over this list in Java and read files if you need.