Faithful finite-dimensional unitary representations

Question: Is there any characterization of the non-compact connected Lie groups that possess faithful finite-dimensional unitary representations?
Comment: (You can remove "non-compact" from the question, no reason to exclude trivial case). The answer is: connected Lie groups that are are locally isomorphic to a compact group, or equivalently admitting a discrete central subgroup such that the quotient is a compact group, or equivalently whose quotient by the center is a semisimple compact Lie group.
Comment: This is great! I was not able to find a characterisation. Would you be kind enough to provide me with a reference? Especially to the first condition you mentioned - being locally isomorphic to a compact group. Thanks in advance. (You can also write it as an answer so that I can accept it.)
Comment: There's a more standard result of the same vein: if a Lie group admits a invariant (definite positive) scalar product on its Lie algebra, then it's locally isomorphic to a compact group (i.e. its Lie algebra is direct product of an abelian one and a semisimple compact one). (Maybe somebody has a reference?) Since this condition passes to closed subgroups, one implication follows.
Comment: Conversely if a connected Lie group $G$ has this condition, then it's quotient of a product $A\times H$, with $A$ an abelian connected Lie group, $H$ a semisimple compact connected Lie group, by a finite central subgroup which can be viewed as the anti-diagonal of $Z\times Z$ where $Z$ is a finite subgroup of both $A$ and $H$. So representations of $G\times G$ are in 1-1 correspondence with pairs consisting of a representation of $H$, a representation of $A$ in its centralizer, both coinciding on $Z$. (...)
Comment: (...) then fix one faithful unitary representation of $H$ on a f.dim. space $V$. Extend it to a representation of $A$. In an additional orthogonal space $W$, fix a faithful unitary representation of $A/Z$, and extend it to a representation of $G$, trivial on $H$. Then the resulting unitary representation of $G$ on $V\oplus W$ is faithful.
Answer: Proposition. Equivalences ($G$ connected Lie group):

(i) $G$ has a faithful finite-dimensional continuous unitary representation;

(ii) $G$ is locally isomorphic to some compact Lie group;

(iii) $G$ is direct product of some Euclidean group (=$\mathbf{R}^d$ for some $d$) with a compact Lie group.

$\bullet$ Indeed (iii) clearly implies (i).
$\bullet$ Suppose (ii), let $G$ be such a group. Write it as quotient of $V\times K$ with $V$ Euclidean group and $K$ compact semisimple, by a discrete central subgroup $Z$. Let $Z_1$ be the intersection of $Z$ with $V$, and $Z_2$ the projection of $Z$ on $V$. Since the kernel of the projection $Z\to Z_2$ is contained in the center of $K$ which is finite, $Z_1$ has finite index in $Z_2$, and hence both have the same span, say $W$, and let $M$ be a supplement subspace of $W$ in $V$. Then $G$ is direct product of $M$ and the compact group $(W\times K)/Z$. So (iii) holds.
$\bullet$ Now suppose (i).  Let $\mathfrak{g}$ be the Lie algebra, which thus embeds in $\mathfrak{u}(n)$ for some $n$, and $\mathfrak{r}$ the solvable radical of $\mathfrak{g}$.
It follows that for every $g\in \mathfrak{g}$, $\mathrm{ad}(g)$ is $\mathbf{C}$-diagonalizable. Hence $\mathfrak{g}$ has no subalgebra isomorphic to the non-abelian 2-dimensional Lie algebra. This already shows that $G$ modulo its solvable radical $R$ is compact [which is enough if you assume beforehand that $G$ is semisimple].
We can assume that $G$ is mapped injectively into $\mathrm{U}(n)$. Let $R$ be the solvable radical of $G$. Then its action can be written as a sum of irreducibles, which by Lie's theorem are 1-dimensional. Each of the eigenspaces determines a weight: a continuous homomorphism $\chi: R\to\mathbf{U}$. Hence $\mathbf{C}^n=\bigoplus_{\chi\in\Phi} V_\chi$, where $V_\chi=\{v:\forall r\in R:r.v=\chi(r)v\}$ and $\Phi=\{\chi:V_\chi\neq 0\}$. Note that faithfulness then already implies that $R$ is abelian.
The group $G$ permutes the weight spaces $V_\chi$, and hence by connectedness, preserves each $V_\chi$. Consider the homomorphism $d:g\mapsto (\det(g|_{V_\chi}))_{\chi\in\Phi}$, $G\to\mathbf{U}$. In restriction to $R$, $d$ has finite kernel. So the diagonal map $d'$ from $G$ into $(G/
R)\times G/\mathrm{Ker}(d)$ has finite kernel; it is readily seen to be surjective. This yields (ii).
(Sorry I should have posted this earlier and not just comment.)


Is there a way to disable Facetime from starting?

Question: I don't use facetime. I'd like to disable it so it doesn't automatically start following system startup. Is there a way to do this? (MacBook Pro, High Sierra)
Comment: Look in: System Preferences > Users & Groups > (select you) > Login Items. If Facetime is shown in the list of login items, remove it by unlocking the pane if necessary, selecting Facetime in the login list, then pressing the "-" button below the list.
Answer: I found this way to keep Facetime from running at startup.  Since it's a rather insidious program, you have to take much more drastic steps to force this program to play nicely.
There is a .plist file that can cause Facetime to run during startup.  Delete that file, and it should no longer start automatically.  It should still run normally if you want (by clicking on the app icon in the Applications folder).
The file can be found at:
/Users/[account_name]/Library/Preferences/com.apple.facetime.plist
...where [account_name] is your user name.  The easiest way to find it is through terminal as the Library/ directory is usually hidden in the graphical interfaces (Finder).
Just delete that file and reboot.  I'm pretty sure nothing important is stored in that file, other than "run me during startup!"
Tested on High Sierra.
Comment: This is the way to go! On Monterey I removed the files below and no more annoyance from an app I never want to use. com.apple.facetime.bag.plist
com.apple.messages.facetime.plist
Answer: Navigate to: System Preferences -> Users & Groups -> Login Items.
On this screen you can choose which programs will open automatically upon startup. You can remove FaceTime from this list to disable it opening on startup.
You can also add any programs you would actually like to start when you boot up.
Comment: Mine is not in the list and it's still starting. And it's not checked as `Open at Login`
Comment: Same problem.  It's not listed and still starts up whenever I boot.  How do I know, because it keeps nagging me to update and change my password.  Damn, I've had adware that's less annoying.


Easy way to add "Link To Item" on any column in SharePoint Online list set to Modern Experience

Question: Does anyone know any easy way to add the "Link to Item" or "Edit Menu" to any column on SharePoint Online when the list is using the Modern Experience?  It is simple when using the Classic Experience, but I have not found a good answer for doing this under the Modern Experience.
Answer: You can create column with name "Edit item" or something in Modern Experience and while creating column, go to "Column Formatting" section

And paste the below JSON:
<code>{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "editProps"
  },
  "attributes": {
    "class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover",
    "title": "Edit Item"
  },
  "style": {
    "border": "none",
    "background-color": "transparent",
    "cursor": "pointer"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "Edit",
        "class": "ms-font-xxl"
      }
    }
  ]
}
</code>
Go to your list view and now you should be able to see an edit icon for all of your rows. Click on it and editing on button click should work now.
Reference: Column Formatting in Modern Experience
Comment: how can I link a different column to the item, or show the menu?
I mean, get all the options available in the Title column.


How to deal with Java AssertionError(java.lang.SocketException)?

Question: I have Android application, which pulls xml from server.
public class FeedParser {

    private final URL mURL;

    public FeedParser(String feedUrl) {
        try {
            mURL = new URL(feedUrl);
        } catch (MalformedURLException e) {
            throw new RuntimeException();
        }
    }

    private InputStream getInputStream() throws IOException {
        return mURL.openConnection().getInputStream();
    }

    public FeedItem parseFeed() {
        // SAX stuff here

        try {
            Xml.parse(getInputStream(), Xml.Encoding.UTF_8,
                    root.getContentHandler());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
}

Sometimes, when XML.parse(...) executes, I get exception:
 AndroidRuntime: java.lang.RuntimeException: An error occured while executing doInBackground()
 AndroidRuntime:    at android.os.AsyncTask$3.done(AsyncTask.java:200)
 AndroidRuntime:    at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
 AndroidRuntime:    at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
 AndroidRuntime:    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
 AndroidRuntime:    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
 AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
 AndroidRuntime:    at java.lang.Thread.run(Thread.java:1019)
 AndroidRuntime: Caused by: java.lang.AssertionError: java.net.SocketException: Connection reset by peer
 AndroidRuntime:    at android.util.Xml.parse(Xml.java:89)
 AndroidRuntime:    at com.packagename.FeedParser.parseFeed(FeedParser.java:60)
 AndroidRuntime:    at com.packagename.UpdateService$FeedLookupTask.doInBackground(UpdateService.java:84)
 AndroidRuntime:    at com.packagename.UpdateService$FeedLookupTask.doInBackground(UpdateService.java:1)
 AndroidRuntime:    at android.os.AsyncTask$2.call(AsyncTask.java:185)
 AndroidRuntime:    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
 AndroidRuntime:    ... 4 more
 AndroidRuntime: Caused by: java.net.SocketException: Connection reset by peer
 AndroidRuntime:    at org.apache.harmony.luni.platform.OSNetworkSystem.read(Native Method)
 AndroidRuntime:    at dalvik.system.BlockGuard$WrappedNetworkSystem.read(BlockGuard.java:273)
 AndroidRuntime:    at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:458)
 AndroidRuntime:    at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:85)
 AndroidRuntime:    at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:65)
 AndroidRuntime:    at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:140)
 AndroidRuntime:    at java.io.BufferedInputStream.read(BufferedInputStream.java:225)
 AndroidRuntime:    at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.readLine(HttpURLConnectionImpl.java:660)
 AndroidRuntime:    at org.apache.harmony.luni.internal.net.www.protocol.http.ChunkedInputStream.readChunkSize(ChunkedInputStream.java:77)
 AndroidRuntime:    at org.apache.harmony.luni.internal.net.www.protocol.http.ChunkedInputStream.read(ChunkedInputStream.java:45)
 AndroidRuntime:    at java.io.InputStream.read(InputStream.java:157)
 AndroidRuntime:    at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:516)
 AndroidRuntime:    at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:479)
 AndroidRuntime:    at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:318)
 AndroidRuntime:    at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:275)

How do I handle such error?
EDIT Knowing that catching errors is bad programming style, I seek for more elegant solution.
Comment: retry the parsing/fetching? Basically an exception isn't bad, it just shows that something went wrong. So just think of a way to retry it and your done (don't retry forever! make a retry counter that limits it)...
Comment: I heard that it's bad idea to catch Errors. To do so I'll need to write catch(Throwable)?
Comment: No, you don't. catch(AssertionError e) is sufficient.
Comment: You could further guard against the pitfalls of catching errors by only handling AssertionErrors whose cause is a SocketException, rethrowing any other errors.
Answer: Connection reset by peer means the remote server you're reading from is closing the connection and then you're trying to read from it again.  It's not necessarily a network error for the remote side to do this--it could do it for any number of reasons.  Without knowing the protocol of your server, it's hard to know the exact reason.
You can set up your code to catch and retry a limited number of times, as suggested above.  It's not a bad idea to catch errors.
Another possibility, depending on the size of your xml, is to to read it into a string buffer and then parse it.  With large data, this reduces the likelihood of a reset since your server connections will be much shorter than when you're parsing as you go.  I'm thinking here of a scenario where the tcp window is closed down for a long time while you're parsing and eventually the other side decides you're dead and resets the connection.
Comment: @JarleHansen Why is it a bad idea to catch errors? If it's an exception you can handle, why not catch it, retry x times, and re-throw if it still fails?
Comment: @JarleHansen Of course, it is a "serious problem" that the remote hung up on the client, but perhaps the server was busy just then? It is eminently a good idea to catch the error in this case and retry a sensible number of times.
Comment: You guys are right, seems like this is a case where you actually need to catch the AssertionError. My mistake on this issue.
Answer: AssertionError provides a standard way to warn that an assertion that the programmer has made is incorrect.
So when well used, they are saying "there is a coding bug here" (because you throw them in places that you assert are unreacheable), and that is the reason why AssertionError is an (extends) Error and not an Exception: they inform about a non recoverable (at runtime) failure (since you have to recode the algorithm).
Other usages of this error are just wrong because they are violating its contract.
So, answering your question, you can handle it in to ways:

If the code throwing the error is yours (I doubt this is the case given your question, but in the future should be): Review and correct your algorithm.
If it is from a third-party library: Register the bug to its author (or try to solve it by your own)

But you should not handle it in your code.

As an additional note: your case makes me doubt about if android.util.Xml.parse() is making a correct usage of it. It is very strange that an AssertionError having a cause (having been constructed from another Throwable), so that is another option to have in mind: maybe this library is not well implemented...


How did it come to be determined that certain speech is unacceptable?

Question: What is the decisive point for classifying a certain speech as unacceptable?
Comment: This is very dependent on the law of particular countries.
Comment: Please do not ask [the same question](https://philosophy.stackexchange.com/q/77697/14362) on multiple sites at once.
Comment: Thank you for your words @Kevin. As we have different opinions here, I have [asked a question on meta](https://politics.meta.stackexchange.com/q/4653/23002) to see what is the best practice. Feel free to share your thoughts.
Answer: Even in democratic countries there are many types of speech which are illegal, not only hate speech. From Wikipedia:

Freedom of speech and expression, therefore, may not be recognized as
being absolute, and common limitations or boundaries to freedom of
speech relate to libel, slander, obscenity, pornography, sedition,
incitement, fighting words, classified information, copyright
violation, trade secrets, food labeling, non-disclosure agreements,
the right to privacy, dignity, the right to be forgotten, public
security, and perjury. Justifications for such include the harm
principle, proposed by John Stuart Mill in On Liberty, which suggests
that: "the only purpose for which power can be rightfully exercised
over any member of a civilized community, against his will, is to
prevent harm to others."

Of course different countries apply all or some of these exceptions to different degrees. As mentioned above, the general principle which guides these exceptions is the harm principle: if a speech is likely to cause harm to somebody, then it might not be covered by freedom of speech. The interpretations about what kind of harm and which level of harm is the exact limit are up to the lawmakers and courts of law of a country.
Comment: The harm principle is more often used as a justification for existing exceptions than as a mechanism for creating new ones. For example, the US attempted to create a brand-new exception for depictions of animal cruelty. In the resulting litigation, the Supreme Court specifically and categorically [rejected](https://supreme.justia.com/cases/federal/us/559/460/#tab-opinion-1963156) the use of an "ad hoc balancing of relative social costs and benefits" and characterized it as "startling and dangerous" for the government to even make such an argument.
Comment: @Kevin: which is why this Q is far too broad. Balancing human rights (vs. each other) on the other hand has been a cornerstone of European law decisions. Also it depends on the circumstances, aka there's a "margin of appreciation" https://www.echr.coe.int/librarydocs/dg2/hrfiles/dg2-en-hrfiles-17(2000).pdf


12.04 upgrade not working

Question: Help! I have upgraded from 11.10 to 12.04 but it doesn't pick up the keyboard so I cannot type in my login keyring password to do anything. I have tried a spare USB keyboard but this is not picked up either. Any if I put a USB stick in the menu comes up and I can open and edit a document - keyboard must work!
Any ideas?
I get an error message - cannot capture your keyboard so cannot get past 'Enter password to unlock your login keyring.'
Answer: I have solved both keyboard and networking issues (keyboard not recognized and no network connection) by rolling back to kernel 3.0.0-15-generic-pae.
Just selected 3.0.0-15 in "Previous Linux Versions" section of GRUB menu.
If that works yuo couldalso uninstall newer kernel (sudo apt-get remove 220.127.116.11) and update GRUB (sudo update-grub).
Hope this helps.
Comment: Thank you. What Iam getting now is an error message - 'The application Compiz has closed unexpectedly.' The keyboard is now recognised but I just get the desktop background with no icons on it. I can't seem to get any up.How can i get to the GRUB menu?
Comment: to enter GRUB menu press shift during boot (just after bios screen).

I even had to clean up my home directory from profile settigns but still got same error sometimes, but everything works ok.
Answer: I have a similar problem, and can get around it by clicking cancel on the keyring login.
Not sure if that helps or not. Unity still not working for me though !!

12.04 upgrade not working


How to rotate model so it matches X, Y and Z axises

Question: Hey blender stackexchange,
I am working on a remake of a game called Assaultcube, and want to use an original gun model as a reference. I found is in usr/lib/games/assaultcube/packages/models/weapons/assault/world/tris.md2. I used a md2 to .3ds converter (there was no direct md2 to blend converter I could find) and imported it to blender. I used Shift + Ctrl + Alt + C and set the origin to geometry and set the object's location to 0,0,0. However, the gun is at a weird angle. I want the gun to be perfectly snapped to all 3 axises, but I'm not sure how. Could someone please assist me? Thanks.
Here's the blend file, I hope google drive works:
https://drive.google.com/file/d/0B6smClKpjHImOWdvVFRJT3JVSTg/view?usp=sharing
Comment: Have the objects the transfrormations applied?
Comment: The rotations are all set to 0,0,0
Comment: If the object has the transformations applied it's impossible to match another one's transform parameters: https://stackoverflow.com/questions/3027817/restore-the-objects-properties-after-applying-in-blender-3d-apply-location-rot BTW I wonder why @ideasman42 got the downvote for his answer???
Comment: I edited your file and I fixed and applied the rotations.
https://drive.google.com/open?id=0B2r6fqaHYyfuclNDdmFDLXNuODQ
I hope it is good enough.
Bye.
Comment: Thanks so much! Could you please tell me what you did (there are 4 more models)? Thanks a lot either way :)
Comment: Ok. I switched to front view (1), side view (3), top view(7) and rotate it manually. After that I used Apply (ctrl A) rotate and location.
Comment: @Leonardo Nascimento I don't think it's a good method to do it manually :). It's not a precise way. BTW It's super hard to do this when the object has applied transformations to it.
Comment: Hello, Paul Gonet. The model had a wrong position and rotation. Mannuallly was the only way to do that. But it was fast to do. Quite simple.
Answer: While it is not a solution all on its own, How do I construct a transformation matrix from 3 vertices? shows how to create a matrix from 3 points.  You would have to get the coordinates of 3 points (and the first 2 you would pick to match one of the axes;  The third you would want to chose such that when combined with the other two defines one of the planes.)
Then you would need to take the inverse of that matrix and apply it to the matrix_world of your model.  Then it should align the model with the world axes.


USB virtual com port

Question: How do I recognize which com port I need for a connection with INAV, Betaflight, Cleanflight. My PC recognizes the com port I need automatically; my laptop doesn't recognize it.
Comment: More information needed = Laptop Model/specs, PC Model_+/Specs. and Virtual Comm over what transport
Comment: @BJsgoodlife I suggest asking a new question. Include the output of `dmesg -n 15` afer just plugging in the USB serial adapter, and `lsusb -t`. This question is not very good in my opinion :)
Comment: I dont know that a link to /dev/ttyS0 would work, but I think an alias for a com port could work. is it software looking for com1?
Answer: I believe that if the serial communication is successful it means that you installed the drivers (on the main page of clean flight).
So you have to install the drivers on the laptop if you did not do that yet.
The other reason i think it might be is that you have not uploaded the software inside the flight controller yet. You need to go on the Firmware Flasher and select the appropriate Firmware Then select No reboot sequence, Flash on connect and full chip erase. Then when you connect your drone make sure you are accessing the boot mode (could be a button or two pins where you need to put a wire to connect them).
if the laptop is running ubuntu try typing "hwinfo --short" It will output a list of all devices with names and ports connected.
The end of my list gives "/dev/ttyUSB0    Prolific PL2303 Serial port" and that is the device i have connected.
DOSBOX
So running your app in a DOSBox i would need to type "serial1 directserial realport:ttyUSB0" in the dosbox terminal to make the app able to connect to COM1.
WINE
But most likely you are running the app under WINE and you would have to make a ttyUSB0 redirect to a COM port.
wine does not support USB drivers, but if your device is being recognised as a serial device, and I think it is, then you need a symbolic link between com1 and /dev/usb and it must be in the folder ~/.wine/dosdevices
This will allow windows programs running under wine to see usb serial devices.
This should do it.
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1
see
http://ubuntuforums.org/showthread.p...66#post4969966

USB virtual com port


When Will Radicchio Leaves Change Colour

Question: My plants have started to sprout! They are still short with 2 green leaves. When can I expect a colour change to red leaves?
Comment: When you say two leaves, do you mean literally just two leaves, which will be the cotyledons rather than the proper leaves?
Comment: yup not the real leaves. when can I expect to see red leaves?
Comment: Also when the initial leaves pop up, are they red instantly?
Answer: You can't judge what a plant will be like from the cotyledons, or first set of leaves, they're almost always green - the true leaves will be much more representative, and should show some colour and a different shape. How fast the second set of leaves, and subsequent leaves, will appear is down to how good the growing conditions are (light, temperature, water, etc).
Answer: I had no luck with the radicchio I tried for the first time this year, and probably will not try again in the future. All looked well for a while, but by the time the plant finally started forming a ball, it was rotten. Good luck with yours. Some things look cool, but just aren't worth the effort relative to other things. Artichokes are another. Mine kept forming little flowers, but never formed an artichoke head.I tried 40 different vegetables this year in my new planting beds, kept a spreadsheet of what I did, including mixing fertilizer specific to each plant, and what worked and what didn't, and where it worked best. I did well this year, but next year ...
Comment: Radichio is really hard unless you are in a mild (not hot or cold) climate. It has nothing to do with fertilizers.  It's all about when it grows and forms heads.  This it does when day length is short and temps are cool.  But not too cold.  You can get some to grow well if you do row covers, hoop houses, or cold frames. Then you can harvest in late fall or spring.   You can also bring in plants with large roots and force them (in a basement or other cool dark place). There are lots of cultivars and other plants in the same species that may work better for you.  Don't give up.
Comment: With artichokes the first year they do form small chokes, I like these even better than large ones! You can eat all of them.  But traditionally it's the second year and beyond when you get higher production.  Oh, and artichokes are flowers.
Comment: any idea as to when the radicchio leaves will start to appear? I'm seeing only the initial green leaves; it's been about a week


Difficulty splitting mercurial patches up

Question: I've got a web application I want to be able to create patches for. Specifically I want to create patches for enabling specific functionality in the web server.
JAVA_OPTS="-Xms128m -Xmx256m $JAVA_OPTS -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true "

# Perm Gen size needs to be increased if encountering OutOfMemoryError: PermGen problems. Specifying PermGen size is not valid on IBM JDKs
PRGDIR=`dirname $0`
JIRA_MAX_PERM_SIZE=128m
if [ -f "${PRGDIR}/permgen.sh" ]; then
    echo "Detecting JVM PermGen support..."
. ${PRGDIR}/permgen.sh
if [ $JAVA_PERMGEN_SUPPORTED = "true" ]; then
    echo "PermGen switch is supported. Setting to ${JIRA_MAX_PERM_SIZE}"
    JAVA_OPTS="-XX:MaxPermSize=${JIRA_MAX_PERM_SIZE} ${JAVA_OPTS}"
    else
        echo "PermGen switch is NOT supported and will NOT be set automatically."
    fi
fi

# use this if you want to import data without notifications
#JAVA_OPTS=" -Datlassian.mail.senddisabled=true -Datlassian.mail.fetchdisabled=true -Datlassian.mail.popdisabled=true $JAVA_OPTS "

export JAVA_OPTS

echo "If you encounter issues starting up JIRA Standalone Edition, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide"

What I want to do is save a patch for each individual modification I need to make to this file in such a way that the patches can be applied individually (using qpush -move) or all together (qpush -a)
I first tried the following with a clean version of the file:
hg qnew jmx.patch

Then I modified the first line of the file to include the following
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8089 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

then refreshed the patch
hg qrefresh

The popped the patch to begin work on the second modification from the clean base
hg qpop
hg qnew jelly.patch

The I modified the first line of the file to include the following
-Djira.jelly.on=true

then refreshed the patch
When I then tried to qpush the older patch, it failed to apply.
Then I tried an alternate approach, which was to first create a base patch:
hg qpop -a
hg qnew base.patch

,that added the following to the file
JMX_OPTS=
JELLY_OPTS=
JAVA_OPTS=" ${JAVA_OPTS} ${JELLY_OPTS} ${JMX_OPTS} "

,then refresh base.patch
hg qrefresh

Then create a new patch for jmx while base.patch was still applied:
hg qnew jmx.new

edit the file as follows:
JMX_OPTS=" -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8089 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false "

refresh the patch and pop :
hg qrefresh
hg qpop

Create new patch for jelly:
hg qnew jelly.patch

Edited the file as follows:
JELLY_OPTS=" -Djira.jelly.on=true "

refreshed the patch:
hg qrefresh

But again, when I tried to qpush the jmx.patch on top of the newly created jelly.patch, there was conflicts.
I thinking Mercurial is behaving as expected, but I'm wondering if I can structure the patches I'm making differently so they can apply individually or combined without rejection
Answer: Your second approach will work if you insert at least 3 empty lines between the lines you want to change.
And you could also shuffle your queue (after qpop!), apply jmx first, then jelly. You'll get "offset x lines" but the file will be correctly patched.
MQ has a hardcoded fuzz number 3 (see patchfile() in patch.py). When you have your JMX_OPTS and JELLY_OPTS in adjacent lines, MQ can't find the context in jmx.patch because it's changed in jelly.patch.


Information/File Manager

Question: I'm looking for a file manager application which helps to organize a large amount of movies, pictures, music, text documents, databases, audio-books and ebooks. Right now I only use the Finder which doesn't work well, because I really need a function to put single files into multiple categories. Simply using the file system for this creates a confusing nesting of files.
Comment: Some openmeta–tag based solutions can be found in question [Listing all Openmeta Tags and associated Files](http://apple.stackexchange.com/questions/24494/listing-all-openmeta-tags-and-associated-files/)
Answer: Depending on the number of categories you require to handle, you could always use a combination of the finder with the built in label functionality, thus a movie can be held in one area (movies directory, for example), but "tagged" as something else.  Using smart directories and saved searches you can view your files by a combination of the attributes (location, label, media type) to create custom views.  All without purchasing software.  Cheap and cheerful, but may be suitable to your needs.
Comment: But the finder has only 7 different labels, or so.
Comment: Hence my proviso based prefix and suffix ;)  Just a suggestion.
Answer: I use Leap. A meta tag organiser, possibly the best for OS X.

Ironic Software, developer of Leap, was at the forefront of development of OpenMeta. Three owners in the Google Code area:

ironicsu...@…
neuma...@…
tom.ande...@…

Mavericks Tagging In The Wild (2013-10-17) described Tom Anderson from Ironic Software as one of the creators of OpenMeta. https://de.wikipedia.org/wiki/OpenMeta describes him as a maintainer.
Comment: Welcome to Ask Different! Can you tell us why you like this app and provide a link? Please take a look at the [FAQs](http://apple.stackexchange.com/faq) for more info. Thanks.
Comment: Whilst [OS X use of HFS Plus may be unreliable for tagging](http://chat.stackexchange.com/transcript/message/23015066#23015066), I **do** recommend Leap – without hesitation. I found no problems with Leap with ZFS.
Answer: I don't use it myself, but I've heard a lot of good things about Bare Bones Software's Yojimbo
Also, note that iTunes and iPhoto cover a lot of the file types you mention (just not all in the same application).
Answer: Maybe use a file manager that supports Open Meta.
Or use symbolic links for organizing all your media files.
Or even use hardlinked files if you dare.
Answer: Pathfinder may be what you are looking for. It's a replacement for the Finder that offers a great deal of "power user" features, such as dual pane browsing, tabs, and a drop stack. I'm not sure if it offers the sorting tools that you desire, but regardless, give Pathfinder a look.
Answer: CompendiumNG (CNG)
From History and Motivation:

Initial Development
… built upon Compendium which was developed by the Compendium Institute, driven by the Knowledge Media Institute (KMi) at The Open University UK. The Open University group in turn built on the development of the Compendium "Conversational Modelling" methodology developed in the late 1990s by Al Selvin and Maarten Sierhuis at NYNEX Science & Technology Labs, NY (now Verizon). …

And:

… Motivation
During our search of a diagramming tools that would be more flexible than usual mind-mapping application we found only few that didn't limit its' features to mind mapping but brought its' own idea about diagraming complex issues. One of them was Compendium designed for dialog mapping based on the IBIS notation. Compendium expressiveness allows to diagram complex issues and in a way supersedes traditional mind-mapping by not forcing users into strict hierarchical mapping. On top of it, while based on IBIS notation it can be used more generally and it has some unique features not seen in other similar applications. For many users Compendium was a software of choice for various tasks and from our point of view an application with such unique features set should be further developed and improved.
In 2009 The Open University released Compendium as Open Source under the the LGPL license. However, in 2012, Compendium development was in a state where developement looked stalled. We therefore decided to continue the Compendium development, to fix bugs and improve it. For this we migrated software development to a GitHub repository and set up this project site. CompendiumNG (short CNG) now continues the development of Compendium. Our main motivation was to renew and revive the development of Compendium. With the development of CompendiumNG we are trying to bring a great software back to life and we hope that the usage and the CompendiumNG community will further grow into the future.

My own use of Compendium was rare, but enjoyable.
For each file that you drop into Compendium there are two options. Either:

link to the original; or
copy to the Linked Files directory

– if you choose the first option, take care to not move the original.
With or without drag-and-drop of files, Compendium has a powerful and flexible approach to management of information. When I last experimented, it was with a view to shared access; there was an option to use MySQL.
Not far from where I worked, someone else on campus made far greater use of Compendium; it was powerful and highly respected. I should expect CompendiumNG to have the same qualities.

More nebulous, patented by Apple
Graphical Multidimensional File Management System and Method (2014-02-09) under Apple Acquires 18 'Axis-Based User Interface' Patents from Maya-Systems | MacRumors Forums

Faceted classification
According to Wikipedia:

a classification scheme used in organizing knowledge into a systematic order. … semantic categories, either general or subject-specific, that are combined to create the full classification entry. Many library classification systems use a combination of a fixed, enumerative taxonomy of concepts with subordinate facets that further refine the topic. …

The subheading personal information management is essentially a single paragraph, a single product –

The HyperSet system formalised faceted classification using set theory, and implemented a prototype retrieval system, many of whose features are implemented in the Tinderbox personal content manager.

– with reference to Don't Link Me In: Set Based Hypermedia for Taxonomic Reasoning (H. Van Dyke Parunak), pages 233-242 of the Proceedings of the third annual ACM conference on Hypertext (HYPERTEXT '91).
http://aetos.it.teithe.gr/~cs1msa/hyperset.htm introduces HyperSet (Parunak, 1991) as:

a set based hypermedia prototype system designed to support an alternative model for structuring hypermedia information. This alternative model is intersecting sets of nodes and support of taxonomic reasoning.  Fundamental entity in HyperSet are sets, each containing zero or more artifacts (analogous to conventional hypermedia nodes). The basic browsing operation in  HyperSet is not moving from a node to node but moving from an artifact to a set which is a member and then to another member of that set. Traversing a link with multiple destinations is possible. A user can add or remove a artifact to a set in an analogous procedure of creating a link.

Beyond that 1991 HyperSet system, I expect readers to find other personal information managers that use faceted classification.

Information/File Manager


How to update webpack config for a react project created using create-react-app?

Question: I have created a react project using create-react-app. Now I need to update the webpack config, but I don't find the file anywhere.
Do I need to create this file myself or what is the process?
I am new to react and not really sure how to proceed from here.
Answer: No need to run npm run eject
Step 1
npm install react-app-rewired --save-dev
Step 2
Add config-overrides.js to the project root directory.(NOT ./src)
// config-overrides.js
module.exports = function override(config, env) {
    // New config, e.g. config.plugins.push...
    return config
}

Step 3
'Flip' the existing calls to react-scripts in npm scripts for start, build and test
/* package.json */
"scripts": {
    -   "start": "react-scripts start",
    +   "start": "react-app-rewired start",
    -   "build": "react-scripts build",
    +   "build": "react-app-rewired build",
    -   "test": "react-scripts test",
    +   "test": "react-app-rewired test",
        "eject": "react-scripts eject"
}

Step 4
Restart your app. Done
Comment: did not work for me
Comment: @Butri As the answer is simlified it's recommended for you to check the full [doc](https://www.npmjs.com/package/react-app-rewired). :-)
Answer: https://www.npmjs.com/package/react-app-rewired
Complete answer is :
How to rewire your create-react-app project
Create your app using create-react-app and then rewire it.

Install react-app-rewired
For create-react-app 2.x with Webpack 4:

npm install react-app-rewired --save-dev

For create-react-app 1.x or react-scripts-ts with Webpack 3:

npm install firstname.lastname@example.com --save-dev

Create a config-overrides.js file in the root directory

/* config-overrides.js */
module.exports = function override(config, env) {
  //do stuff with the webpack config...
  return config;
}

like this:
+-- your-project
|   +-- config-overrides.js
|   +-- node_modules
|   +-- package.json
|   +-- public
|   +-- README.md
|   +-- src

for example :

module.exports = function override(config, env) {
    // New config, e.g. config.plugins.push...

    config.module.rules = [...config.module.rules,
        {
            test: /\.m?js/,
            resolve: {
              fullySpecified: false
            }
        }
      ]

    return config
}

'Flip' the existing calls to react-scripts in npm scripts for start, build and test

from:

/* package.json */
  "scripts": {
   "start": "react-scripts start",
   "build": "react-scripts build",
   "test": "react-scripts test",
   "eject": "react-scripts eject"
}

To:

/* package.json */
  "scripts": {
   "start": "react-app-rewired start",
   "build": "react-app-rewired build",
   "test": "react-app-rewired test",
   "eject": "react-scripts eject"
}

Note: Do NOT flip the call for the eject script. That gets run only once for a project, after which you are given full control over the webpack configuration making react-app-rewired no longer required. There are no configuration options to rewire for the eject script.

Start the Dev Server

npm start

Build your app

npm run build

Comment: Thank you for the example! Finally something more useful than 'do stuff with the webpack config' from react-app-rewired docs
Answer: Option 1 - Eject your CRA
If you've just created your app using CRA, and haven't made big changes to it, you could use npm run eject - more about it here
Keep in mind that there is no going back (except by commits, of course) after doing this. This will basically provide you with webpack file and other files which are currently 'hidden' in CRA
Some critiques and second thoughts about this method here
Option 2 - React App Rewired
This might be the right choice for you. This allows you to extend your current webpack without ejecting, or messing up / making too many changes at your project as npm run eject will. Take a look at the package here
A great tutorial by Egghead.io using react-app-rewired here
Comment: An another option can be [craco](https://github.com/gsoft-inc/craco)
Answer: I solved this problem by running a script between yarn install and yarn build. After yarn install the webpack.config.json file is generated, then immediately run a script on Node that modifies it, and then run the build.
My code:
custom.webpack.config.js
const fs = require('fs')

// WebPack.config File
const fileConfig = 'node_modules/react-scripts/config/webpack.config.js'

new Promise((resolve) => {
   fs.readFile(fileConfig, 'utf8', function (err, data) {
      if (err) {
        return console.log(err)
      }
      resolve(data)
   })
}).then((file) => {

    let CodeAsString = "Code as String to save"

    let regexCode = /YourCodeRegex}/g

    let result = file.replace(regexCode, CodeAsString)

    fs.writeFile(fileConfig, result, function (err) {
        if (err) return console.log(err)
        console.log('The webpack.config file was modifed!')
    })
})

So, now do you need to edit the package.json to include this code in the process:
"scripts": {
    "prestart": "node custom.webpack.config.js",
    "prebuild": "node custom.webpack.config.js",
    "start": "react-scripts start",
    "build": "react-scripts build"
}

Done! :)
Answer: Webpack configuration is being handled by react-scripts. I assume that you don't want to eject and just want to look at the config, you will find them in /node_modules/react-scripts/config
webpack.config.dev.js. //used by `npm start`
webpack.config.prod.js //used by `npm run build`

Answer: You can modify your webpack config or any other node_module using patch-package https://www.npmjs.com/package/patch-package
Install the version of react-scripts you want with npm i email@example.com
Then go into node_modules/react-scripts/webpack/webpack.config.js. Make the changes you need and then npx patch-package react-scripts
patch-package will generate a file in your project root like patches/react-scripts+5.0.0.patch
Add post-install script to package.json with
"scripts": {
    "postinstall": "patch-package",
    ...
}

Now whenever you run npm i you will automatically get this patch included with the installed library.
Comment: but what if I update from v5 to v6 later on? won't this react-scripts v6 override my changes?
Answer: The best way is:

Install react-app-rewired and customize-cra

Create a config-overrides.js file in your root folder. Here is an example Webpack override file gist: https://gist.github.com/Nagibaba/209c1bddcc39ff0686a820806cfa8ee3

Also, consider that you need to change react-scripts inside your package.json to react-app-rewired like:

    "start": "react-app-rewired start",
    "build": "react-app-rewired build",
    "test": "react-app-rewired test",
    "eject": "react-scripts eject"

You are ready to go


QGIS Handling of HTTPS URL Strings

Question: I'm new to QGIS, and am using v2.18.3 with the cloud plugin.  I've published a map to the cloud, but am having problems with an attribute field in one of the layers.  It's a URL field, and the data contains http strings for some rows and https for others.  The http strings are properly displayed as hyperlinks and open up a new tab when clicked.  The https strings seem to be processed as normal text (no hyperlink, no action performed when clicked.)  Is there some trick to getting the software to process https strings as hyperlinks?
Answer: For SSL (HTTPS) you will need to authenticate before you access.
In QGIS>Settings>Options>Authentication [Tab] >Certificate Manager  >Custom Certificate Configuration you can apply your login credentials.

SSL(HTTPS) might have a time limit so you maybe have to repeat this each time you connect (depending how the server-side is set up).
Comment: Thanks.  I'll tinker around with this and see what happens.
Comment: It looks like the required websites do have time limited certificates.  This could be an issue.  The features in my map have more detailed information available through the URLs, and I would like for a user of the map to be able to use his own credentials to access it.  Is there any option for performing an open webpage action without prior ssl authentication?  I'm ok with a user being presented with a new tab requiring a login.
Comment: if SSL HTTPS you will require a login if HTTP that can be done without.
Comment: Thanks.  I've tested one of the domains, and know I can trick it by just removing the s, since it puts it back in automatically.  I'll have to test the other one to see if it handles things the same way.

QGIS Handling of HTTPS URL Strings


What is the difference between authorized_keys and known_hosts file for SSH?

Question: I am learning the basics of SSH protocol. I am confused between the contents of the following 2 files:

~/.ssh/authorized_keys: Holds a list of authorized public keys for servers. When the client connects to a server, the server authenticates the client by checking its signed public key stored within this file
~/.ssh/known_hosts: Contains DSA host keys of SSH servers accessed by the user. This file is very important for ensuring that the SSH client is connecting the correct SSH server.

I am not sure what this means. Please help.
Comment: Similar question on [unix.se]: [SSH key-based authentication: known_hosts vs authorized_keys](http://unix.stackexchange.com/questions/42643/i-have-some-questions-about-ssh-key-based-authentication)
Comment: Thanks for asking. I couldn't figure out why adding my key to the server's known_hosts file had no effect on passwordless login until reading this thread.
Answer: The known_hosts file lets the client authenticate the server, to check that it isn't connecting to an impersonator. The authorized_keys file lets the server authenticate the user.
Server authentication
One of the first things that happens when the SSH connection is being established is that the server sends its public key to the client, and proves (thanks to public-key cryptography) to the client that it knows the associated private key. This authenticates the server: if this part of the protocol is successful, the client knows that the server is who it claims it is.
The client may check that the server is a known one, and not some rogue server trying to pass off as the right one. SSH provides only a simple mechanism to verify the server's legitimacy: it remembers servers you've already connected to, in the ~/.ssh/known_hosts file on the client machine (there's also a system-wide file /etc/ssh/known_hosts). The first time you connect to a server, you need to check by some other means that the public key presented by the server is really the public key of the server you wanted to connect to. If you have the public key of the server you're about to connect to, you can add it to ~/.ssh/known_hosts on the client manually.
By the way, known_hosts can contain any type of public key supported by the SSH implementation, not just DSA (also RSA and ECDSA).
Authenticating the server has to be done before you send any confidential data to it. In particular, if the user authentication involves a password, the password must not be sent to an unauthenticated server.
User authentication
The server only lets a remote user log in if that user can prove that they have the right to access that account. Depending on the server's configuration and the user's choice, the user may present one of several forms of credentials (the list below is not exhaustive).

The user may present the password for the account that he is trying to log into; the server then verifies that the password is correct.
The user may present a public key and prove that he possesses the private key associated with that public key. This is exactly the same method that is used to authenticate the server, but now the user is trying to prove its identity and the server is verifying it. The login attempt is accepted if the user proves that he knows the private key and the public key is in the account's authorization list (~/.ssh/authorized_keys on the server).
Another type of method involves delegating part of the work of authenticating the user to the client machine. This happens in controlled environments such as enterprises, when many machines share the same accounts. The server authenticates the client machine by the same mechanism that is used the other way round, then relies on the client to authenticate the user.
Comment: thanks this is very helpful. Would it be right to say that known_hosts file is maintained on client whereas authorized_key file is maintained on the server
Comment: @Ankit Yes, that is the case.
Comment: I have both files on the server and ssh to it to test it. But the 2 files have different contents. So the keys are different in these files?
Comment: @Timo The keys are completely unrelated. One is the key of a machine, the other is the key of a user.
Comment: @Gilles So once the entry for a server's public key is added to the *known_hosts* file in the client's machine, any subsequent ssh session between the two doesn't require the server to prove that it has the right private key?
Comment: @Geek No, the server needs to prove that each time, otherwise there'd be no way to know that it's the same server. `known_hosts` lets the client know what the server's public key should be.
Comment: @Geek -- see my explanation "About Secure Files Containing Secure Keys," below.
Comment: @Gilles'SO-stopbeingevil' Are the public-private keys bijective? If yes, couldn't someone who knows the public key generate the private key?
Comment: @adosar No, it's impossible to generate the private key from the public key. That's how public-key cryptography works.
Answer: Those two files are both used by SSH but for completely different purposes, which could easily explain your confusion.
Authorized Keys
By default SSH uses user accounts and passwords that are managed by the host OS. (Well, actually managed by PAM but that distinction probably isn't too useful here.) What this means is that when you attempt to connect to SSH with the username 'bob' and some password the SSH server program will ask the OS "I got this guy named 'bob' who's telling me his password is 'wonka'. Can I let him in?" If the answer is yes, then SSH allows you to authenticate and you go on your merry way.
In addition to passwords SSH will also let you use what's called public-key cryptography to identify you. The specific encryption algorithm can vary, but is usually RSA or DSA, or more recently ECDSA. In any case when you set up your keys, using the ssh-keygen program, you create two files. One that is your private key and one that is your public key. The names are fairly self-explanatory. By design the public key can be strewn about like dandelion seeds in the wind without compromising you. The private key should always be kept in the strictest of confidence.
So what you do is place your public key in the authorized_keys file. Then when you attempt to connect to SSH with username 'bob' and your private key it will ask the OS "I got this guy name 'bob', can be be here?" If the answer is yes then SSH will inspect your private key  and verify if the public key in the authorized_keys file is its pair. If both answers are yes, then you are allowed in.
Known Hosts
Much like how the authorized_keys file is used to authenticate users the known_hosts file is used to authenticate servers. Whenever SSH is configured on a new server it always generates a public and private key for the server, just like you did for your user. Every time you connect to an SSH server, it shows you its public key, together with a proof that it possesses the corresponding private key. If you do not have its public key, then your computer will ask for it and add it into the known_hosts file. If you have the key, and it matches, then you connect straight away. If the keys do not match, then you get a big nasty warning. This is where things get interesting. The 3 situations that a key mismatch typically happens are:

The key changed on the server. This could be from reinstalling the OS or on some OSes the key gets recreated when updating SSH.
The hostname or IP address you are connecting to used to belong to a different server. This could be address reassignment, DHCP, or something similar.
Malicious man-in-the-middle attack is happening. This is the biggest thing that key checking is trying to protect you from.

In both cases, known_hosts and authorized_keys, the SSH program is using public key cryptography in order to identify either the client or the server.
Comment: "Every time you connect to an SSH server it presents its private key in order to prove its identity." I certainly hope not! I assume you meant _its public key_. If a server presented me, the client, with its private key - it (A) wouldn't work for me to authenticate it and (B) is an indication that the server is so badly configured that I should stop doing business with it immediately. Private keys should only be accessible on the machine of origin by designated users. That's kinda the point. ;-)
Comment: This answer helped me more than the accepted one (:
Comment: If I ssh to a local server (local IP), and then later from the same computer but now remotely connect to the same server (public IP) will it trigger mismatching keys?  How can you mitigate this?
Answer: About Secure Files Containing Public Keys
To help you understand how "known_hosts" and "authorized_keys" are different, here is some context explaining how those files fit into "ssh".  This is an over-simplification; there are lots more capabilities and complications to "ssh" than are mentioned here.
Associations are in Trusted Sources
While it has been said that public-key values "can be safely strewn about like seeds in the wind," keep in mind that it's the gardner, not the seed-pod, who decides which seeds get established in the garden.  Altough a public-key is not secret, fierce protection is required to preserve the trusted association of the key with the thing that the key is authenticating.  The places entrusted to make this association include "known_hosts", "authorized_keys", and "Certificate Authority" listings.
The Trusted Sources Used by "ssh"
For a public-key to be relevant to "ssh," the key must be registered ahead of time, and stored in the appropriate secure file.  (This general truth has one important exception, which will be discussed later.) The server and client each have their own, securely stored list of public-keys; a login will succeed only if each side is registered with the other.

"known_hosts" resides on the client
"authorized_keys" resides on the server

The client's secure file is called "known_hosts", and the server's secure file is called "authorized_keys".  These files are similar in that each has text with one public-key per line, but they have subtle differences in format and usage.
Key-pairs are Used for Authentication
A public-private key pair are used to perform "asymmetric cryptography." The "ssh" program can use asymmetric cryptography for authentication, where an entity has to answer a challenge to prove its identity.  The challenge is created by encoding with one key, and answered by decoding with the other key.  (Note that asymmetric cryptogrophy is used only during the login phase; then "ssh" (TSL/SSL) switches to another form of encryption to handle the data stream.)
One Key-pair for Server, Another for Client
In "ssh", both sides (client and server) are suspicious of the other; this is an improvement over the predecessor to "ssh," which was "telnet".  With "telnet", the client was required to provide a password, but the server was not vetted.  The lack of vetting allowed "man-in-the-middle" attacks to occur, with catastrophic consequences to security.  By contrast, in the "ssh" process, the client surrenders no information until the server first answers a challenge.
The Steps in "ssh" Authentication
Before sharing any login information, the "ssh" client first eliminates the opportunity for a man-in-the-middle attack by challenging the server to prove "Are you really who I think you are?"  To make this challenge, the client needs to know the public-key that is associated with the target server.  The client must find the server's name in the "known_hosts" file; the associated public-key is on the same line, after the server name.  The association between server-name and public-key must be kept inviolate; therefore permissions on the "known_hosts" file must be 600 -- nobody else can write (nor read).
Once the server has authenticated, it gets a chance to challenge the client.  The authentication will involve one of the public-keys found in the "authorized_keys". (When none of those keys works, the "sshd" process falls-back on password style authentication.)
The File Formats
So for "ssh", as with any login process, there are lists of "friends", and only those on the list are allowed to attempt to pass a challenge.  For the client, the "known_hosts" file is a list of friends who can act as servers (hosts); these are listed by name.  For the server, the equivalent list of friends is the "authorized_keys" file; but there are no names in that file, since the public-keys themselves act like identifiers.  (The server doesn't care where the login is coming from, but only where it's going.  The client is attempting to access a particular account, the account name was specified as a parameter when "ssh" was invoked.  Remember that the "authorized_keys" file is specific to that account, since the file is under that account's home directory.)
Although there are many capabilities that can be expressed in a configuration entry, the basic, most common usage has the following parameters.  Note that parameters are separated by space characters.
For "known_hosts":
{server-id} ssh-rsa {public-key-string} {comment}

For "authorized_keys":
ssh-rsa {public-key-string} {comment}

Note that the token ssh-rsa indicates that the algorithm used for encoding is "rsa".  Other valid algorithms include "dsa" and "ecdsa".  Therefore, a different token might take the place of the ssh-rsa shown here.
Let "ssh" Auto-Configure the "known_hosts" Entry
In both cases, if the public key is not found within a secure file, then assymetric encryption does not happen.  As mentioned earlier, there is one exception to this rule.  A user is allowed to knowingly choose to risk the possibility of a man-in-the-middle attack by logging into a server that is not listed in the user's "known_hosts" file.  The "ssh" program warns the user, but if the user chooses to go forward, the "ssh" client allows it "just this once."  To assure it happens just once, the "ssh" process automatically configures the "known_hosts" file with the required information by asking the server for the public-key, and then writing that into the "known_hosts" file.  This exception totally subverts security by allowing the adversary to provide the association of a server-name with a public-key.  This security risk is allowed because it makes things so much easier for so many people.  Of course, the correct and secure method would have been for the user to manually insert a line with server-name and public-key into the "known_hosts" file before ever attempting to login to the server. (But for low-risk situations, the extra work might be pointless.)
The One-to-Many Relationships
An entry in the client's "known_hosts" file has the name of a server and a public-key that is applicable to the server machine.  The server has a single private-key that is used to answer all challenges, and the client's "known_hosts" entry must have the matching public-key.  Therefore, all clients that ever access a particular server will have the identical public-key entry in their "known_hosts" file.  The 1:N relation is that a server's public-key can appear in many client's "known_hosts" files.
An entry in the "authorized_keys" file identifies that a friendly client is allowed to access the account.  The friend might use the same public-private key pair to access multiple, different servers.  This allows a single key-pair to authenticate to all servers ever contacted.  Each of the targeted server accounts would have the identical public-key entry in their "authorized_keys" files.  The 1:N relation is that one client's public-key can appear in the "authorized_keys" files for multiple accounts on multiple servers.
Sometimes, users who work from multiple client machines will replicate the same key pair; typically this is done when a user works on a desk-top and a lap-top.  Because the client machines authenticate with identical keys, they will match the same entry in the server's "authorized_keys".
Location of Private Keys
For the server side, a system process, or daemon, handles all incoming "ssh" login requests.  The daemon is named "sshd".  The location of the private key depends upon the SSL installation, for example Apple puts it at /System/Library/OpenSSL, but after installing your own version of OpenSSL, the location will be /opt/local/etc/openssl.
For the client side, you invoke "ssh" (or "scp") when you need it.  Your command line will include various parameters, one of which may optionally specify which private key to use.  By default, the client side key-pair are often called $HOME/.ssh/id_rsa and $HOME/.ssh/id_rsa.pub.
Summary
Bottom line is that both "known_hosts" and "authorized_keys" contain public keys, but ...

known_hosts -- the client checks if host is genuine
authorized_keys -- the host checks whether client login is allowed
Comment: Thank you.  This is a very clear and easily understandable explanation of of the relationships between the files and the keys.
Comment: SSH clients usually don't have keys. The public keys that are listed in `authorized_keys` identify users, not machines.
Answer: Not true at all.
The known_hosts file contain the fingerprint of the host. It is not the public or private key of the remote host.
It is generated from their key - but it is emphatically NOT the key itself.
If you SFTP to an address that might resolve to several (varying) hosts (load balanced etc) you must add the fingerprints from all the possible end points, or it will work initially and then fail when it is routed to the second (or subsequent) host.
Comment: erm look at your known_hosts file and compare it to a host fingerprint when you connect.... That should clear it up a bit. Furthermore, your example would be exactly the same, regardless if it is fingerprints or public keys in the known_hosts file.
Comment: This answer would be better if it explained that ["the Debian openssh-client package sets several options as standard in `/etc/ssh/ssh_config` which are not the default"](https://manpages.debian.org/stretch/openssh-client/ssh_config.5.en.html) including `HashKnownHosts yes`.


I can't use sudo commands!

Question: When I go to terminal and try to enter a sudo commands it say's "Username not in the sudoers file." So how can I be able to use sudo commands.
Comment: Can you login as root by entering your password using `su -` command?
Comment: Do you have any other users on the machine, or a password set for root?
Comment: It asks for a password, I try mine but it won't work.
Answer: You need some user account with root priviledges to assign root priviledges to your own account.
To check if you have any such account on your computer you can either check:
a) Switchboard > User accounts
b) checking the content of sudoers file in /etc/sudoers. However I see no way of checking it without sudo other than booting from liveCD and opening it from there.
This is not exactly an answer and should have been a comment. However I don't have enough reputation points to comment your question so I've been forced to polute it with fake answer. Thanks for understanding.
Comment: I think this is probably fine as a partial answer :) Someone else could build off this to create a more complete answer
Comment: I do have another account with root privileges. So how do I assign it to my account.
Comment: you need to log into the other account with root priviledges and either do the change via switchboard (I don't know if it's possible as I have just one account) or opening terminal (WinKey+T) and entering 'sudo adduser  sudo'
Answer: I ran into a similar issue as the only administator of my machine. If you have another administative user, jena's answer is an easier way.
I was really helped by an anwser on askubuntu about resting a lost administrative password.
https://askubuntu.com/questions/24006/how-do-i-reset-a-lost-administrative-password
Full  steps :
You need to boot into recovery mode.
Boot up the machine, and after the BIOS screen, hold down the left Shift key. You will then be prompted by a menu that looks something like this:

I've noticed on some systems that timing when to hit the left Shift key can be tricky, sometimes I miss it and need to try it again.
If you have full disk encryption, you have to hold down the key before being asked for the disk password. (You will be asked for the password in a command line interface during boot).
Hit the down arrow until you select the 2nd entry from the top (the one with the recovery mode in the description) and then hit Enter.
Now you should see this menu:

Using the arrow keys scroll down to root and then hit Enter.
You should now see a root prompt, something like this:
root@elementary:~#

At this stage you should have a read-only filesystem. You have to remount it with write permissions:
mount -o rw,remount /

Now we can set the user back into the sudoers group with the adduser command. (In this example I will use jorge as the example, you need to substitute whatever the user's username is):
root@elementary:~# adduser jorge sudo

Now you can reboot, and you should be able to use sudo commands. You should make sure that you are part of following groups :

adm
sudo
lpadmin
sambashare
jorge (your username)

jorge@elementary:~$ groups
You can add your user back in these groups with sudo
jorge@elementary:~$ sudo adduser jorge adm
Answer: This can be achieved very easily by executing the following command in terminal
sudo usermod -aG sudo <username>

I can't use sudo commands!


How to have JHipster 6.10 produce open api 3.0. documentation instead or in addition to Swagger 2

Question: I have a Jhipster project as a monolith, that exposes Swagger 2 documentation at /v2/api-docs as a JSON file. The Jhipster UI also creates a Swagger 2 UI. However, I need JHipster to create an Open API 3.0 formatted JSON file but can't find any information about it. The JHipster documentation speaks about API first development with Open API 3.0 but not how to replace the produced Swagger with the new Open API standard.
Answer: This requires upgrading to Springfox 3 and it will be available in JHipster 7 but you can have a look at how it was done to replicate in your project:
https://github.com/jhipster/generator-jhipster/issues/12125


Is this cactus unhealthy, especially at the bottom?

Question: Our cactus is about 4 or 5 inches tall.  I think it's looking unhealthy in the lower half.  I also think it must receive a larger container.  Recommendations?   Thanks!
Comment: repotting definitely not required for a while.  usual issues are too much water, not enough light
Answer: This looks like root rot to me. How much do you water it and when?
In terms of saving it, you may be able to take cuttings from them as advised in this question
If you do, be careful not to over water it, especially whilst it is rooting as the new roots are very susceptible to rot. Water a small amount and then leave it until the soil is completely dry.
Use a free draining soil mixed with plenty of grit and of course a pot that drains easily.
Comment: Thank you for your reply.  Oops, it's been watered by different family members and together, watered too often!  It's in the brightest window sill in the house.


Which steps to follow in order to make configuration of NAPTR records in ejabberd

Question: I am newly in network and programming. I want to configure Sip in ejabberd.
After I added ejabberd_sip listening module in ejabberd.yml  as recommended in
the documentation the next step is described as below:

Next you need to configure DNS SIP records for your virtual domains.
Refer to RFC 3263 for the detailed explanation. Simply put, you should
add NAPTR and SRV records for your domains. Skip NAPTR configuration
if your DNS provider doesn't support this type of records. It's not
fatal, however, highly recommended.

The problem is I don't know where and How to do it.
I am running ejabberd server on localhost in windows 10 system.
Answer: Given they're DNS SIP records, and that they rely on your DNS provider supporting them, I think the documentation makes it pretty clear it's DNS.
Given you're running on localhost, don't expect to find a DNS provider that supports them. Forget it and move on, it's not mandatory and you're likely running an alpha deployment anyway.
(If this is not an alpha deployment, setup DNS beforehand and move away from localhost).


Where is the $email_text variable set on ubercart?

Question: With Ubercart, where is the $email_text variable set, the variable that determines whether the "do not reply to this email" should be displayed in the email received by a customer after they place an order.
Answer: It's set in template_preprocess_uc_order(&variables) in the order module ($variables['email_text']).
If you're looking to override this variable for your site it can be overridden by defining a function MYTHEME_preprocess_uc_order(&variables) in your theme's template.php
Comment: Thanks!  I had to tweak it to: MYTHEME_preprocess_uc_order($variables)
Comment: Thanks!  I had to tweak it to: MYTHEME_preprocess_uc_order($variables)
to get it to work (the amp sign swapped out for the dollar sign).

What is the gain to putting the coding in the theme template vs right there above where the variable is used in the custom tpl?  Is that simply a best practice thing or does it provide a benefit on a larger scale?
Comment: Correction:  It should be MYTHEME_preprocess_uc_order(&$variables)
Comment: It prevents your modification from being overwritten if you need to update the Ubercart module.


Nginx + HHVM + MariaDB + WordPress install -> Error establishing a database connection

Question: I'm setting up a VPS for a WordPress blog. I'm using Ubuntu 14.04 LTS 64 bits and then I've installed Nginx 1.7.8, HHVM 3.6.0, MariaDB (don't remember the version). Finally I've downloaded WordPress 4.1.1 and after creating the database and editing the wp-config.php file with the correct parameters (database name, user and password) I try to connect to the blog to set it up.
I've done this kind of installation before but it was some months ago and I don't remember having any problem. But after trying everything I know of I can't solve the problem: everytime I try to load the blog on my browser to start the final WordPress installation process (the form with the name, admin and password) I get the legendary, horrible message:
Error establishing a database connection

The fact is, mysql is running, but something that I don't understand is wrong. I've created a testconnection.php file on the root of my blog with the following content
<?php
$link = mysql_connect('localhost', 'root', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

editing with the right password, of course. When I load that php file on the browser I get a
"Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"

That file isn't anywhere, and my /etc/mysql/my.cnf points to /var/run/mysql/mysqld.sock (which is shown also if I do a ps xa | grep mysql. Trying to do a symbolic link doesn't work either:
ln -s /tmp/mysql.sock /var/run/mysql/mysqld.sock

and I'm getting out of ideas. The /var/run/mysql directory has www-data:www-data as owners, and the WordPress blog directory is owned by www-data:www-data as well.
I really don't know what's going on, I've read several messages over here and some other sites, but the things that they point to (check wp-config.php, restart mysql...) don't work because I've been careful with that. Ideas, please?
Comment: when you run the mysql client command (mysql -u root -p),  it gives you the same error?
Comment: No, I can access MySQL withouth problem (from the root account or from the user account I've created) and do whatever I want there :/
Answer: I've just found the solution: there seems to be some problem with HHVM and MySQL connection when you try to use "localhost" or "localhost:port", as shown on the HHVM documentation.
I've found the answer on GitHub. I needed to edit /etc/hhvm/php.ini file and add the line
hhvm.mysql.socket = /var/run/mysqld/mysqld.sock

Then I just have to do a sudo service hhvm restart and finally, finally, finally, everything works. Uauh.


Circle-Circle intersection area in the hyperbolic space

Question: Is there any closed formula for the area of the intersection of two circles  in the hyperbolic plane $\mathbb{H}^2$? The two circles have radii $R, R'$ and a distance of $d$ between centers. If possible, the curvature should be a parameter (though I am not sure if the curvature affects the area).
Answer: I have a version without any integrals: four acute angles related by four equations, but not an easy system to solve. Then your area is a simple function of those angles. If it will help, i can type it in. By the way, the calculation is intrinsic. The upper half plane or disc just makes everything worse.
Meanwhile, looking at your hyperbolic network question, you should become aware that the hyperbolic plane is the natural setting for any extremely regular network, one where every edge is the same length, each node is connected to the same number of neighbors, spaced at equal angles. See material on Ford Circles, but especially  http://en.wikipedia.org/wiki/Uniform_tilings_in_hyperbolic_plane
EDIT, Sunday 23 Feb.
$$ \frac{\sin \alpha}{\sinh a} = \frac{\sin \beta}{\sinh b} =\frac{\sin \gamma}{\sinh c}  $$
$$  \cos \alpha = \frac{\cosh b \cosh c - \cosh a}{\sinh b \sinh c }  $$
$$  \cosh a = \frac{\cos \alpha + \cos \beta \cos \gamma}{ \sin \beta \sin \gamma}  $$
IF $\gamma = \pi / 2,$
$$ \cosh c = \cosh a \cosh b = \cot \alpha \cot \beta  $$
$$  \cosh a = \frac{\cos \alpha}{\sin \beta},  \; \;   \sin \alpha = \frac{\sinh a}{\sinh c},  $$
$$  \cos \alpha = \frac{\tanh b}{\tanh c},  \; \;   \tan \alpha = \frac{\tanh a}{\sinh b} $$
IF also two infinite edges, we have a finite edge $t$ and an acute angle $\Pi(t).$
$$  \tanh t =  \cos \Pi(t), \; \;  \sinh t = \cot \Pi(t), $$
$$  \cosh t =  \csc \Pi(t), \; \;  e^{-t}  = \tan \frac{ \Pi(t)}{2}. $$
Circle. Area
$$ A = 2 \pi (\cosh r - 1) = 4 \pi \sinh^2 (r/2)   $$
Circumference
$$ C = 2 \pi \sinh r.  $$
% 523
$$ \cosh (x+y) = \cosh x \cosh y + \sinh x \sinh y   $$
$$ \sinh (x+y) = \sinh x \cosh y + \cosh x \sinh y   $$
% 559
If $ u = \tan (x/2), $
$$ \cos x = \frac{1 - u^2}{1 + u^2},  $$
$$ \sin x = \frac{2u}{1 + u^2},  $$
$$ \tan x = \frac{2u}{1 - u^2},  $$
$$   dx =   \frac{2 du}{1 + u^2}.  $$
Alright; your question, with distance scale set to $1,$ comes down naturally to four equations in four unknowns, which are angles. Area for triangles is most naturally stated in terms of angles, same on the surface of a sphere, but not in the Euclidean plane. For this material, including the distance scale $k,$ I recommend   George E. Martin, The Foundations of Geometry and the Non-Euclidean Plane. For example , Theorem 32.17 on page 434 includes $k.$
Anyway, I have always worked with $k=1.$ We get four acute angles $\alpha,\beta,\gamma, \delta,$ and three (given) intrinsic distances $R,R', d,$ with the supposition that $d < R + R'.$ The four equation system becomes
$$  \frac{\cos \alpha}{\sin \beta} =  \frac{\cos \gamma}{\sin \delta}   $$
$$  \cosh R = \cot \alpha \cot \beta   $$
$$  \cosh R' = \cot \gamma \cot \delta   $$
$$ \cosh d =  \frac{\cos \beta}{\sin \alpha}   \frac{\cos \delta}{\sin \gamma} + \sqrt{ \frac{\cos^2 \beta}{\sin^2 \alpha} -1 }  \sqrt{ \frac{\cos^2 \delta}{\sin^2 \gamma} -1 }    $$
After solving for the four angles, your area is
$$ 2 \alpha \cosh R  +  2 \gamma \cosh R' + 2 \alpha + 2 \beta  + 2 \gamma + 2 \delta   - 2 \pi - 2.     $$
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Comment: The area of the circle with radius $R$ is $2 \pi (\cosh R - 1).$ The area of the pie slice with central angle $2 \alpha $ is $2 \alpha (\cosh R - 1).$ The are of the triangle with angle $2\alpha, \beta,\beta$ is $\pi - 2 \alpha - \2 \beta.$ The area of the lens shape, line segment as one part of the boundary, circular arc of radius $R$ the rest of the boundary, is the difference.
Comment: It would be of help! I'm trying to learn about computing stuff in the hyperbolic plane, so every different view point is helpful to me. I do not understand what you're trying to get at with your second comment, though. I know that one can see the hyperbolic plane as a "continuous version" of a $d$-tree, if this is what you mean? I.e., that area and circumference of a circle grows exponentially, just like the number of nodes and leafs of a tree vs. its depth.
Comment: Thank you for writing it down, but I'm not sure I can follow your approach. Could you elaborate how exactly the area of the intersection relates to the 4 equation system?
Comment: see http://en.wikipedia.org/wiki/Hyperbolic_geometry#Circles.2C_disks.2C_spheres_and_balls  and http://en.wikipedia.org/wiki/Hyperbolic_law_of_cosines and http://math.stackexchange.com/questions/69345/the-law-of-sines-in-hyperbolic-geometry
Comment: I know about the laws of sine and cosine. What I don't understand is the very last step: If I see it correctly, you use the 4-equation system to compute the angles $\alpha,\beta,\gamma,\delta$. In the next line you use that to state the area. I do not understand where the very last formula comes from. Is this some sort of ratio between the areas of the two circles? I know the areas of the circles, but how can we use that to compute the intersection area?
Answer: I'll choose the half plane model for this. Wikipedia already tells us

A circle (curve equidistant from a central point) with center $\langle x,y\rangle$ and radius $R$ is modeled by a circle with center $\langle x,y\cosh R\rangle$ and radius $y\sinh R$.

I'll choose hyperbolic centers $(0, 1)$ and $(0, \cosh d + \sinh d)$, so I have these euclidean circles:
\begin{align*}
x^2 + \bigl(y-\cosh R\bigr)^2 &= \bigl(\sinh R\bigr)^2 \\
x^2 + \bigl(y-(\cosh d + \sinh d)\cosh R'\bigr)^2
&= \bigl((\cosh d + \sinh d)\sinh R'\bigr)^2
\end{align*}
You can compute the points of intersection. This will be one hell of a symbolic expression, but nothing fundamentally complicated. Just long.
So now for the area. I'll consider treating the two circular arcs separately. For each, I'll compute the area above, since that is finite. So given an Euclidean circle with center $(0, b)$ and radius $r$, the hyperbolic area above the upper arc of that circle for $-a\le x\le a$ can be computed as
\begin{align*}
\int_{-a}^a\int_{b+\sqrt{r^2-x^2}}^\infty\frac1{y^2}\,\mathrm dy\,\mathrm dx
=\int_{-a}^a\frac1{b+\sqrt{r^2-x^2}}\,\mathrm dx
\end{align*}
Wolfram Alpha knows the antiderivative of the integrand, but it is again a pretty large expression. Nevertheless, I see no reason why you can't plug in explicit values into that, to obtain the value of a definite integral. Similar, the area above the lower arc is given by writing $b-\sqrt{r^2-x^2}$ instead.
Then you could combine the various complicated expressions to form a single one, even more complicated. Start by taking the area above the lower arc of the upper circle, and subtract from that the area above the upper circle of the lower circle. In both cases, choose the limits so that you integrate between the points of intersection, which was our first complicated expression.
On the whole, I'd say a closed form does exist, but I wouldn't want to write it down. To give you an idea, here is some Sage code where I did the computation, and the result as well. I have no idea yet on how to obtain a simpler formula.
All of this was done assuming curvature $-1$, as is common in the half plane model. For other curvatures, you can either adapt this solution or transfer input and output of this solution by correcting for curvature.
Comment: Note that at the moment I don't fully trust my result: for $R=3, R'=5, d=7$ it returns a significantly different result than for $R=5, R'=3, d=7$, even if computed with 1024 bit precision. So either some functions are not evaluated with that much of precision, or the formula is extremely vulnerable to numeric errors, or there is something wrong with the formula per se.
Comment: Wow, thank you. This has got to be the most disgusting formula I've seen so far. I guess I have to take the physics approach here and ignore a few terms that are "small".


Have I made up this sentence correctly: "He never stays hungry."

Question:
He never stays hungry.

I mean he always is going to find something to eat. He never bothers his stomach by leaving it to be empty.
Answer: I find the sentence a little ambiguous as-is. You could change it to:

He never stays hungry for long.

if you mean that he finds something to eat as soon as any signs of hunger start in his belly.
Answer:
He never stays hungry.

This technically could mean what you want, but make sure the context reinforces it.
Staying hungry is a common expression meaning being determined to succeed.  As in: The goalie for the Ottoman Empire's national team stays hungry by rewatching the video of the first time someone scored a goal on him.
In total isolation, he never stays hungry could mean that he gives up on his goals before he accomplishes them.
If the context makes it clear that you are discussing literal hunger, then I would wonder if he doesn't stay hungry because he eats or because his body's response to lack of food is to stop noticing it.
A different suggestion:

He always addresses his hunger.

This means to me that when he gets hungry, he eats.  He does not put off eating because he is busy, or because he is worried about eating too much.  When the stomach calls with a sincere request for food, he answers the call.
Answer: "Stay" is a strong word, and implies a substantial period of time -- longer than you would normally expect someone to be hungry for. The sentence you've written could be applied to anyone who can find food on a regular basis. I would personally say it is too broad.
If you wanted to say that the person always has food in their stomach, you could say:

He's/He is never hungry.

This expresses that there isn't any point in time where that person lets their stomach get empty; they've always eaten something recently.
You could also express it the way I have in this question; that is, "he always has food in his stomach." That is a bit longer though.


Among Quantitative Feedback Theory and H infinity, which one is preferred for robust control of satellites esp. small satellites? And why?

Question: I am interested in designing a robust controller for a small satellite with antenna, sloshing propellant and flexible panels on board. I am mostly interested in achieving arcsec precision pointing given such a scenario. Avoiding microvibration and jitter analysis from reaction wheels.
Comment: This is a super interesting question! What sensors do you imagine this using?
Comment: Hi @Knudsen! Just the usual, nothing special. Sun sensors, magnetometers, IMU, maybe a star tracker.
Comment: If you are dealing with sloshing you may need something with a higher update frequency. Have you looked into Model Reference Adaptive Control (MRAC)
Comment: Hi @KnudsenNumber!

Thank you for your reply. It still is a Nanosat and, unlike CryoCube-1, has non-cryo propellant on board. The elimination of sloshing is to mitigate the last bit of arcsec numbers, amongst others micro-vibration/jitter. IMUs on board should cover the high freq sensing. Traditionally folks from the space domain have been using H-inf for GEO/Telecom sats with flexible appendages. It gives perfect support for model uncertainty. Even demonstrated marcsec precision in simulations....
Comment: ....But lately for drag free attitude control of LISA mission (12DoF) people have been looking into QFT. Which is also a robust strategy. Was wondering what the differences are.

I have looked into MRAC earlier for platooning of cars and velocity vector fields of UAVs, but not for arcsec flexible body pointing. What are your justifications for using MRAC for an arcsec flexible nanosat mission?

Thanks for getting back at the topic ;)
Comment: Regarding MRAC, do you know if there is a way to go from arcsec requirement and a NonLinear MIMO uncertain plant to systematically derive an MRAC controller?
Comment: The reason I though MRAC might be helpful is because of the sloshing propellant. Many robust control architectures exploit some sort of estimation of disturbances and then includes them in the controller. These approaches generally assume constant disturbances. As long as the disturbances change in a timescale longer then the estimation horizon, these controllers have decent performance. Since your system seems to have a lot of disturbances with higher frequency changes I thought MRAC might be something to look into.
Comment: I looked in MRAC for something similar, but ended up discovering the system dynamics were lower frequency than I had initially assumed.
Answer:
Among Quantitative Feedback Theory and H infinity, which one is preferred for robust control of satellites esp. small satellites? And why?

AFAIK Neither.
First, you should define what you mean by "small satellite", the definition can vary between 30kg to 300kg.
Second, in a small satellite, panels are generally mounted over faces rather than on deployable surfaces to avoid flexible mode disturbance, also flexible modes are usually specified to exist only in high frequencies, partially due to launcher restrictions. You can have guidance laws that prevent high torques from exciting the first mode, but that basically means limiting acceleration when needed.
Antennas in most small satellites are not steerable because this kind of mechanical part is prone to failure.
Many "small" satellites have no propulsion, so no problem with sloshing either. Some of the ones that do have propulsion also rely on fuel tanks with rolling diaphragm, so sloshing is severely attenuated as well.
Jitter is then mostly driven by reaction wheels, whose average speed in orbit requires very complex and mission specific analysis. However, jitter happens at high frequencies, above 100 Hz, while I'm yet to hear about any AOCS software running above 64Hz. Most of systems I know run at 10Hz or below. This means that no mater what control technique you are using, there is no way you can control jitter.
If you were to consider a large spacecraft such as GeoEye-1 then these techniques could be closer to making sense.
Finally, "arcsecond accuracy" is with respect to what? An inertial direction or maybe a location on Earth? If it is the latter, there are many other error contributors, including but not limited to time synchronization on board and Earth ephemeris prediction and computation.
So case in point, unless you are working with an academic problem, I doubt you gain much from robust control theories. You might as well use them, but when you find yourself in times of trouble, mother Mary will likely tell you to redesign the spacecraft rather than change your control algorithms.
Comment: This doesn't even attempt to answer which of QFT and H Infinity is better. Obviously you can design systems that are easier to control, but if you are stuck with something that is difficult then you have to deal with it.  BTW pointing accuracy is never defined with respect to something. It is the ability to accurately point at any arbitrary point in space.
Comment: @knudsen he does make a good point about you not having specified much about the satellite. It would be easier to answer if we knew if you spoke of a cubesat or something bigger than a human.
Comment: @MagicOctopusUrn the OP said a nanosat, which is generally the same language used for CubeSats. If you want more information writing an answer saying the question is incomplete, makes no sense. The comment sections are for asking the OP questions and improving knowledge.
Comment: Thank you for your comments! Well, imagine the case of NEA Scout. So a NanoSat with large solar sails and possibly underactuated actuators or lack of torque power availability. In such cases, robust control theory provides better confidence in your solutions.

Sorry for asking too many questions on one post, viewing these problems separately before combining them is a better alternative. If you want to extend the capabilities of the current satellites, at times you might end up with a very unconventional design. A de-orbiting satellite with complex robotic arms/flexible nets/harpoon for e.g
Comment: Consider a space tug/deorbiting satellite (25- 50 kg class), with some robotic arms/flexible nets/ harpoon ( something that gives rise to flexible modes), and half of the satellite mass is fuel because de-orbit. The other satellite has unknown inertia/modal properties and is tumbling around a single axis. And you wanna dock precisely, so good precision wrt body pointing. In such cases, robust control strategies like fixed-order H-inf or LPV will save you big time.
Comment: You are correct though, in most nominal cases, satellite control is not so fancy. But in the future, this will not hold true. Take the case of Rosetta for example: \url{https://link.springer.com/article/10.1007/s12567-015-0099-8} robust H-infinity based control saved it big time!

You are correct with jitter. Typically RW based jitter is a high-frequency phenomenon, either tackled with active base plate or via passive vibration isolation  considering that the isolation does not interact with ADCS control bandwidth typically <= 10Hz or by flying RW with some momentum offset.
Comment: Finally, I will answer my own question. The answer is both, and none at the same time. Control first, and the system later is the wrong way of looking at things. Model/system characterization/identification always comes first, before you synthesize a controller.

Some previous work on QFT and H-infinity controller comparison:
 https://doi.org/10.1115/1.2807067

More typical to the industry is the utilization of H-inf controllers. Why? My guess is that there is enough industrial support/heritage surrounding it, compared to QFT. Take it with a grain of salt though
Answer: The answer is both, and none at the same time. Control first, and the system later is the wrong way of looking at things. Model/system characterization/identification always comes first, before you synthesize a controller. It is the system characteristics that drive the control design process.
Some previous work on QFT and H-infinity controller comparison: doi.org/10.1115/1.2807067
More typical to the industry is the utilization of H-inf controllers. Why? My guess is that there is enough industrial support/heritage surrounding it, compared to QFT. Take it with a grain of salt though


Technological solutions for extremely long term data archiving?

Question: Are there any good technical solutions for extremely long term archiving of data, for example for 25 to 100 years?
Somehow I just don't have a lot of confidence that a SQL 2000 backup file will be usable in court cases or for historians in 25 to 100 years.
This is a customer requirement, not just speculation.
This is comparable to trying to trying to do something useful with a back up for ENIAC or reading Atari Writer wordprocesing files.  The hardware doesn't necessarily exist anymore, the storage media is likely corrupt, the professionals for using the technology probably don't exist anymore, etc.
Answer: Actually, printing on Acid-free paper is probably a much better solution than any more advanced technological one.  It is much more likely that the IT tech of +100 years will be able to high-speed scan and load print than any digital data storage based on 100 year-old media access HW, technology and standards, 100 year-old disk/file format standards and 100 year-old data encoding standards.
Disagree?  I've got a whole attic full of vinyl CD's, 8-tracks, cassette tapes, floppy disks (4 different densities!) that argue otherwise.  And they are only 20 years old! (OK, the 8-tracks are closer to 30).
The fact is that there is only one data storage & archiving technology that has ever withstood the test of time over 100 years or more and still been cost effectively retrievable, and thats writing/printing on physical media.
My advice?  Don't trust any archival strategy until it's been tested, and there's only one that has passed the 100-year test so far.
Comment: Agreed, but you will still need to spend some money on protecting the paper.  And you probably don't want to print with a laser printer, because the toner might flake off, and you better check the inks, too.
Comment: "Archival Paper" was made for just this purpose: http://en.wikipedia.org/wiki/Acid-free_paper, supposed to last thousands of years.
Answer: <joke>Print it.</joke>
Comment: That's because you haven't reached the hilarious part of printing but not on paper, but on stone.
Comment: Funny to read that suggestion after a week of indexing one of our customers' document repositories. They'll need another building to store printouts. :)
Answer: You'll need to convert to text - perhaps XML.
Then upload it to the cloud, make archival copies etc.
I think you need to pick a multi-modal approach.
If you have the budget: http://www.archives.gov/era/papers/thic-04.html
Comment: Ironically, it would appear that the link to the article about long term electronic archiving is no longer available.
Comment: https://web.archive.org/web/20060407053414/http://www.archives.gov/era/papers/thic-04.html
Answer: script the data into flat files (either one file per table or summarize multiple tables into a file), write them to high end archival CDs.  in 100 years they will have to load this data into whatever "database" they have, so so some manual conversion will be necessary, so a nice schema script dump into a single file would help the poor guy trying to read these files and make the proper joins.
EDIT
offer the client a service contract, where you make sure they are up to date with the latest archival technology on a yearly basis.  this could be a good thing $
Answer: I suggest you consult a specialist company in this field.
You might also be interested in this article:
Strategies for long-term data retention
It might help to speak to one of those companies/organisations
Answer: I don't know if anyone reads this thread or not anymore but there is a really good solution for this.
There is a new company called Millenniata, the have a product called M-Disc.  The M-Disc is essentially a DVD made out of rock like materials that give it an estimated shelf life of 1,000 years +. You have to have a special DVD burner to burn the DVD's but it is not that expensive.  Plus any normal DVD reader can read them.  I have a professor at BYU that helped form this company, it is some pretty cool technology.  Good Luck.
Link to M-Disc Website
Comment: That's part of the solution. The other part is-- will anyone be able to read a NTFS disk in 1000 years? Especially if the data is in a proprietary binary format.
Comment: Probably not, but most people don't need 1,000 yeras, they need 50  to 100.  The 1,00 year part just means that it will last a really long time without having to worry!


660 euro for portugal visa

Question: I will be applying 1st time for tourist schengen visa to portugal from india. presently I have balance of euro 660 for stay for 5-8 days including hotel expense. Is it enough so that visa do not reject. Also I have income tax return for last 2 years and not 3 years. I do not have any financial support except my salary. I am doing govt job, will that affect my visa chances? I will applying on my own and without any help of agency as they charge heavily, does it decrease your chances to get visa?
Comment: Is 660 euros the total in the account, or a separate amount you have for the trip? If you're planning to use the majority of your savings for the trip, they're not going to like that.
Comment: The balance is itself is within the guidelines but missing tax returns could be more of an issue and the consulate can also evaluate whether they think your income is appropriate.
Answer: According to the REFERENCE AMOUNTS REQUIRED FOR THE CROSSING OF THE EXTERNAL BORDER FIXED BY NATIONAL AUTHORITIES

Aliens must be in possession of the following amounts if they wish to
enter or stay in Portugal:

EUR 75 – for each entry
EUR 40 – for each day spent on the territory

Aliens who are able to prove that their board and lodging are guaranteed for the duration of
their stay may be exempted from paying the above amounts.

So if you have 600 euro (75 euro per day for 8 days) - you fulfil the requirement.
Comment: To me, that reads as though he should have: 1 entry (75) and 8 days at 40/day (320), in total 395. (40/day seems a bit light to me, but...) Either way, it appears he has enough.
Comment: @simonatrcl correct; I took an extreme example to show s(he) has enough money.

660 euro for portugal visa