Magnetic declination - which magnetic model to choose?

Question: which model to determine the magnetic declination is more accurate WMM (2014-2019) or IGRF (1590-2019)? I just wanted to determine the magnetic declination for calibration TruPulse Laser Rangefinder. I did not know which model would give me greater precision measurements (Azimuth+Distance)+(GPS+GIS)
Comment: they have created more than one for specific reasons. That would help you determine what you need.  http://www.noaanews.noaa.gov/stories2014/20141215_worldmagneticmodel.html and http://www.ngdc.noaa.gov/geomag/WMM/ simply state that the model has been updated for accuracy and is updated every 5 yrs (for accuracy). If you need it for navigation. accuracy would be pertinent.
Comment: Brad, unfortunately both of those links have disappeared; if you know the new location could you update them?
Answer: Essentially, it doesn't matter.
From https://www.ngdc.noaa.gov/geomag/faqgeom.shtml#What_is_the_difference_between_IGRF_and_WMM_models :

The IGRF and WMM are both estimated from the most recent data and are
of comparable quality.

It does state that WMM is a 'predictive model only', and IGRF is 'retrospectively updated' which I take to mean IGRF allows for historic use (showing what it was) whereas WMM is only valid for the period of the model. Since you're looking for a current setting, either will serve. I note the sample I put in on their calculator is the same or within margin of error for both. WMM returns 8 degrees 39 minutes plus or minus 21 minutes, while IGRF returns 8 degrees 40 minutes (no plus or minus). Both say it moves west at 6 minutes per year.
Comment: Chris, unfortunately both of those links have disappeared.  If you know where they are now could you edit them in your answer?
Comment: @markgalassi Apparently there was a department or whatever name change and associated website restructuring. For whatever reason the links still use the old name abbreviation (NGDC) so it's possible they will again change at some point in the future to the new one (NCEI). A Google search for "magnetic declination calculator" had the relevant pages in the first few results should they break again.


how to find three vertices of a triangle.

Question: Where s=circumcenter, H= orthocenter, and A'= midpoint of one side of triangle.

How can can I determine the location of the three vertices of the triangle?
Answer:
Let us impose coordinates to facilitate the discussion. We will place $H$ at the origin which then gives $A' = (-1,\ 6)$ and $S=(-6,6)$.
From the geometry of the Euler line, we know that the centroid of the triangle $G$ lies on the line $SH$ in the ratio $|SG|:|GH| = 1:2$. Therefore the coordinate of $G$ is given by $G = (4,4)$.
We also know that $A'$ is the midpoint of a side, call it $a$. Since $S$ is the circumcenter of the triangle, it follows that the line $\overline{SA'}$ must be the perpendicular bisector of side $a$. This means that $a$ is perpendicular to $\overline{SA'}$ and in particular $a$ is parallel to the $y$-axis. Then the line perpendicular to $a$ and through $H$ must be an altitude of the triangle, i.e. the $x$-axis is an altitude of the triangle. Therefore the vertex $A$ opposite side $a$ must lie on the $x$-axis.
But $A$ must also lie on the line $\overline{A'G}$ for the centroid lies on lines joining vertices and midpoints of opposite sides. It follows that $A$ is the intersection of $\overline{A'G}$ with the $x$-axis and in particular we have $A = (-14,\ 0)$ in our case.
Finally, the circumcircle $\Gamma$ is the circle with center $S$ passing through $A$. The intersection of $\Gamma$ with the side $a$ then determines the remaining two vertices of the triangle. This determines the triangle uniquely given $A',\ S$ and $H$ and we can verify that each of the points are indeed the corresponding special points of the triangle.
Answer: Another way of solving the problem is to use vector algebra.
Let the coordinate system have origin at the circumcenter $\mathbf{S}=(x_s,y_s)=(0,0)$.  The orthocenter has position vector $\mathbf{H}=(x_h,y_h)=(6,-6)$.  Let $\mathbf{X}_1=(x_1,y_1), \mathbf{X}_2=(x_2,y_2),\mathbf{X}_3=(x_3,y_3)$ be the three vertices and let $\mathbf{A}=(x_a,y_a)=(7,0)$ be the the midpoint of line $23$.
Then $\mathbf{A} = 0.5 (\mathbf{X}_2+\mathbf{X}_3)$ and we can express $x_2$ and $y_2$ as
$$
  x_2 = 14 - x_3 ~,~~ y_2 = -y3 \,.
$$
Also, using the definition of the orthocenter and the vector scalar product,
$$
  (\mathbf{X}_3-\mathbf{H})\cdot(\mathbf{X}_1-\mathbf{X}_2) = 0 ~,~~
  (\mathbf{X}_2-\mathbf{H})\cdot(\mathbf{X}_1-\mathbf{X}_3) = 0 \,.
$$
We can solve these two equations to express $(x_1,y_1)$ in terms of $(x_3,y_3)$ after eliminating $(x_2,y_2)$ to get
$$
  \begin{align}
  x_1 &= \frac{y_3^3 + [x_3(x_3-14)+6]\,y_3 + 26(x_3-7)}{6x_3-y_3-42} \\
  y_1 &= \frac{(7-x_3)y_3^2 + 6y_3- x_3^3 + 21 x_3^2 - 146x_3  + 336}{6x_3-y_3-42}
  \end{align}
$$
To solve for $x_3$ we can use the relation
$$
 (\mathbf{S}-\mathbf{A})\cdot(\mathbf{X}_3-\mathbf{X}_2) = 0 \,.
$$
The solution is $x_3 = 7$.  To find $y_3$ we can use the definition of the circumcenter to get
$$
  (\mathbf{X}_1-\mathbf{S})\cdot(\mathbf{X}_1-\mathbf{S}) = (\mathbf{X}_3-\mathbf{S})\cdot(\mathbf{X}_3-\mathbf{S})
$$
The result is the equation
$$
  y_3^4 - 87 y_3^2 + 1836 = 0
$$
with solutions $(-7.14,-6,6,7.14)$.  If we assume that $y_3 >0$ we have two possible values only one of which, $y_3 = 7.14$, is a valid solution.  Using this solution we get $(x_1,y_1)=(-8,-6)$, $(x_2,y_2)=(7,-7.14)$, $(x_3,y_3)=(7,7.14)$.


What is the difference between Mapping and Morphism

Question: I wonder if there's differences between Mapping and Morphism. Although the terms are used in different context i.e. mapping for set theory and morphism for category theory, from my understanding they are both used to describe the relationship among objects, so what's the difference?
Comment: Morphism is "more" than just a mapping, see [here](http://math.stackexchange.com/questions/1594658/what-is-a-morphism).
Comment: @dietrich Could you elaborate? Thanks.
Comment: A morphism is a mapping that preserves some kind of structure inherent to the objects between which you map.
Comment: @ed to use a metaphor in real(or physical) world to illustrate my understanding of your comment: Mapping emphasized on the process, like how to process a apple into apple juice, the squeeze process is mapping; while morphism emphasized on the objects, like all relationship or differences between apple and apple juice. Is this the sense you want to make?
Answer: Let $G$ and $H$ simply be sets filled with numbers. We can easily define mappings between $G$ and $H$. Let's say that $f : G \to H$ is given by $f(g) = g * g = g^2$. We could also say that $f(g) = g^3$ or $f(g) = \frac{57}{g}$. These are all "mappings". A "mapping" is simply a rule that one uses to take an element of $G$ and "mess around" with it to get something out. Imagine a machine, that has an input and an output. Nothing is particularly special about a mapping, it is simply a rule as stated above.
A $\textit{Morphism}$ is a much more interesting kind of map. Let's endow $G$ and $H$ with group structure and call them $(G, *)$ and $(H, \diamond)$. Now we ask the question: can we look at some mapping, $\phi$ say, that $\underline{\textbf{preserves}}$ the group structure? That is to say, if $\phi : G \to H$, then to be a $\textit{homomorphism}$ we require that for $g, h \in G$
$$\phi(g*h) = \phi(g) \diamond \phi(h).$$
Now, several properties of the structure follow from this. If $e_G$ is the identity in $G$ then $\phi(e_G) = e_H$ in $H$. In English, we can state that via a group homomorphism, identities map to identities. Other properties of the structure are also preserved under the morphism.
There are several morphisms that have different requirements depending on your context. That is to say, Ring Homomorphisms differ from Group Homomorphisms, Linear Transformations are actually the morphisms of the category of Vector Spaces, the morphisms of topological spaces are continuous maps etc. etc.
LET IT BE SAID, however, that the terms "mapping" and "function" are often used interchangeably by different people and the description given above is that of my own usage of the term.
Comment: Thanks first. I'm still confusing about the concept of group structure. Could you help me by explaining what is group structure, and could you explain what does ϕ(g∗h)=ϕ(g)⋄ϕ(h). mean?
Comment: A group is an algebraic structure often used to encode and study symmetries of objects, among other things. I suggest learning about groups before trying to understand morphisms as it will give you a better understanding of why a morphism is slightly different from a mapping
Answer: A morphism is a concept introduced in the language of
categories to designate one element of the set  Hom (X, Y) where X and Y are two objects of said category.
So if we talk about the category of sets, a morphism is just a mapping.
if we talk about category of groups, a morphism is a group homomorphism ie mapping that complies with the laws of the groups in question.
Morphism of ring is ring homomorphism.
The morphism of topological space  is the  mapping that preserves the topology of concidered space,  ie  continuous mapping, areas so on ..


Formula student tag

Question: Could anyone with enough reputations create a Formula student tag? This will be good for all formula students in the world.
Comment: Tags are used to categorize questions, not askers...
Comment: What is a 'Formula student'?
Comment: @Cool https://en.wikipedia.org/wiki/Formula_Student `Formula Student is a student engineering competition held annually in the UK. Student teams from around the world design, build, test, and race a small-scale formula style racing car.` That does make *slightly* more sense than just creating a tag for a type of student - but it's still very unlikely to be a good tag for Stack Overflow. There are loosely related precedents I think with coding competitions (project Euler comes to mind) but this would really need to make a much stronger and detailed case to even consider it.
Comment: Absolutely unclear what this "formula student" supposed to mean. Please explain what this is and provide links to 3-5 questions that would benefit from this tag.
Comment: Here is a link about [project euler](https://meta.stackoverflow.com/questions/275935/burninate-project-euler/284302#284302) and how that got burninated
Comment: @Pekka웃 Ok, but how is it related to programming?
Comment: @CoolGuy I didn't say it is. `this would really need to make a much stronger and detailed case to even consider it.`
Comment: how is this tag gonna be helpful/usefull?
Answer: Tags are not just created because they might be useful. Tags are created when they apply to an existing question - for example, I have enough reputation to create a tag, so I could create a new tag when I ask a question if it were necessary.
To create a tag, there needs to be an existing question that the tag would apply to. Bear in mind also that tags that only apply to very few questions aren't actually that useful and tend to get removed again.
Comment: @AlexeiLevenkov No, this is an answer. "Can someone create X tag?" -- "No, because ".
Comment: @ChaoLI I haven't criticised you. This answer is just an explanation of why we can't do what you're asking at the moment. If you can demonstrate that there's a need for the tag with a link to (preferably multiple) questions that would benefit from it, then someone can add it. Since you haven't provided that, it won't get done. Additionally, the burden of research here is on you, not us. Please add links to your question to explain what formula student is.
Comment: This is all true. Suppose the OP offers a link to a question that is about the subject mentioned by the OP, do you create the tag?
Comment: This seem to be comment... Answer does not address whatever tag proposed in the question (assuming you know and can explain what tag OP is asking for)
Comment: I do not understand what you guys are talking about. If you do not know what formula student is you should research it before you criticise me not being specific. And I was told by the staff from stackoverflow to ask such a question.
Stop criticising, this is not I want. I want help by someone telling me where I should post such a question or who I need to speak to. Thanks
Comment: @ChaoLI *[...]I was told by the staff[...]*... May I ask where/when you were told that?

Formula student tag


Can one use Atiyah-Singer to prove that the Chern-Weil definition of Chern classes are $\mathbb{Z}$-cohomology classes?

Question: In Chern-Weil theory, we choose an arbitrary connection $\nabla$ on a complex vector bundle $E\rightarrow X$, obtain its curvature $F_\nabla$, and then we get Chern classes of $E$ from the curvature form.  A priori it looks like these live in $H^*(X;\mathbb{C})$, but by an argument that I don't feel like I really understand, they're in the image of $H^*(X;\mathbb{Z})$, which is where they're usually considered to actually live.  I've also recently been learning about the Atiyah-Singer index theorem, and I get the impression that whenever I see a arbitrary constants in geometry that end up having to live in $\mathbb{Z}$ I should ask myself whether the index theorem is lurking in there somewhere.  Is there anything to this wild guess?
Comment: I'm not sure how often anyone gets to make a comment like this, but... this question might actually be more suited for MO than math.SE.  :-)
Comment: @Eric: Certainly there's the algebraic topology proof (or even definition, really) that these are $\mathbb{Z}$-classes, but I saw an analytic argument in one my of lectures the other day that had nothing to do with classifying spaces or normalization.  I think it's really cool when the same story can be carried all the way through in two such distinct settings.
Comment: @Eric: The case of line bundles is Proposition 4.4.12 in Huybrechts' book, which just chases through the Cech-de Rham complex.  I think the proof in my class was different, but maybe it was essentially equivalent.  I'll try to find someone who took notes that day...
Comment: I think Jesse is right. An expert's answer to your question could help other non-experts in understanding the Atiyah-Singer theorem, and such an answer would better serve and interest the MO readers than the M.SE ones. Atiyah-Singer is strong voodoo, after all.
Comment: I don't know, I think it would also be good to leave the question here for at least a while and see if anyone has a go at answering  it.  I would also be quite interested in the answer.  If you *do* post it on MO, please link to it here.
Comment: If you accept the proof that Chern classes are characterized by the naturality, sum formula, and normalization axioms, then doesn't it follow that the Chern-Weil definition must lie in $\mathbb Z$-cohomology? But anyways, I am interested in an answer to this question.
Comment: @Jesse: Yeah there's definitely a lot going on in the index theorem, but it seemed like this might nevertheless be a pretty low-level question, since at its heart it's really just a question of identifying the appropriate elliptic differential operator.  If there are still no answers in a few days, I'll move the question to MO (and I'll certainly link it).
Comment: @Aaron: Do you have a link to the analytic proof?
Comment: Promoted: http://mathoverflow.net/questions/69085/can-one-use-atiyah-singer-to-prove-that-the-chern-weil-definition-of-chern-classe
Answer: The answer is no.  See https://mathoverflow.net/questions/69085/can-one-use-atiyah-singer-to-prove-that-the-chern-weil-definition-of-chern-classe


Unity Launcher API for C++

Question: I am trying to develop some program in QT with QT SDK. Yesterday I was reading about Unity Launcher API on official ubuntu website. But there is example only for Vala and python. Is possible to use Unity Launcher API(quicklists, counters, and progress bars) with C++ language and if it's possible, please post an example.
Comment: What is that Qt Language?. Are you talking about QScript or are you just asking for a C or C++ example?
Comment: I am talking about this: http://qt.nokia.com/products/ As much as I understand Qt is just a framework for C++.
Comment: Not just, it's a full library that can be used with loads of languages, including Python. I understand that you are asking for a C++ example, if you use Qt or any other library doesn't  matter. Can you edit the question to make it clear?. (BTW: Unity 2D is made with Qt),
Comment: Ok then...I mean an example for C++ :)
Answer: I'm also learning Qt and tried to find a way to use Unity API in Qt , I could only use Dbus API , but no luck with Quicklist since it needs a DbusMenu and I do not know how to implement that (still learning :) ).
This is the example I created for my self and I hope it's useful for others .
Maybe Unity devs can help to correct / fix / add new code (quicklist) to it :)
/*
    Unity Launcher Dbus API exmable for Qt
    foxoman [gplus.to/foxoman][firstname.lastname@example.com]

    https://wiki.ubuntu.com/Unity/LauncherAPI#Low_level_DBus_API:_com.canonical.Unity.LauncherEntry

    First step : add this line to your Qt project file .pro
     QT       += dbus
*/

/* I will run this example as Qt console apps */
#include <QtCore/QCoreApplication>

/* Include Qt Dbus required */
#include <QtDBus>

// Qt Main Method
int main(int argc, char *argv[])
{

    /* Qt console Main Loop [ in GUI application the Main loop is QApplication ]
        Unity API need Main Loop to run */
    QCoreApplication a(argc, argv);

    /* Create Qt Dbus Signal to send Dbus Message to unity Dbus API
        signal com.canonical.Unity.LauncherEntry.Update (in s app_uri, in a{sv} properties)
    */
    QDBusMessage signal = QDBusMessage::createSignal(
     "/", /* Path */
     "com.canonical.Unity.LauncherEntry", /* Unity DBus Interface */
     "Update"); /* Update Signal */

    /* app_uri
       Desktop ID ex: firefox -> need to be pined in the launcher to see the effect
    */
    signal << "application://firefox.desktop";

    /* properties : A map of strings to variants with the properties to set on the launcher icon */
    QVariantMap setProperty;

    /* A number to display on the launcher icon */
    setProperty.insert("count", qint64(80));

    /* show count */
    setProperty.insert("count-visible", true);

    /* progress bar count must be float between 0 and 1 (mean from 0.00 to 0.100)*/
    setProperty.insert("progress", double(0.80));

    /* show progress bar */
    setProperty.insert("progress-visible", true);

    /* Tells the launcher to get the users attention  */
    setProperty.insert("urgent",true);

    /* Pack the properties Map to the signal */
    signal << setProperty;

    /* Send the signal */
    QDBusConnection::sessionBus().send(signal);

    return a.exec();
}

download the example here
http://ubuntuone.com/1SLDPcN9OhrU6LD1wgDs3r
Comment: @Javier Rivera : I tried to use libunity with the QLibrary help but it take to much effort to reach the same result with dbus api .
Comment: whoops, I forgot to install libunity-dev. But now, there is another problem with glib.h(`/usr/include/unity/unity/unity.h:7: error: glib.h: No such file or directory`), but I have `libglib2.0-dev` installed.
Comment: I haven't any experience in C++, but why don't you just import libunity (#include ) and use the API?
Comment: Thank you foxoman. This works like a charm :) Warning for everyone: Don't forget the first step(like I did), otherwise this will not work. :) (First step : add this line to your Qt project file .pro
     `QT       += dbus`)
Comment: @JavierRivera: I tried to import libunity, but it doesn't find unity.h. There is a ton of libraries I can import(according to autocomplete function), but there is no library named unity.
Comment: Is libunity-dev installed?
Comment: Now I understand. If unity.h will import glib and likely most gtk, it's certainly easier and cleaner to just use dbus. Stand corrected, thanks to both, this could be very valuable to me in the future.
Answer: There is not currently a specific library for accessing launcher functionality from Qt C++. There is a libunity library but this is heavily glib oriented so is relatively unsuited to Qt. As mentioned in the other answer, the most convenient way to integrate with the launcher is to use the low level dbus API.
The basic concept of how to integrate with the launcher is you send a signal to the launcher with an application ID and a set of properties. The application ID is the file name of the .desktop file, normally stored in /usr/share/applications:
//create the signal
QDBusMessage signal = QDBusMessage::createSignal("/",
    "com.canonical.Unity.LauncherEntry", "Update");

//set the application ID
signal << "application://firefox.desktop";

//set the properties
QVariantMap properties;
    ...
signal << properties;

//send the signal
QDBusConnection::sessionBus().send(signal);

Counter
To set the counter, you will need to set the properties such that the count is visible and give it the desired integer value:
qint64 counter_value = 1;
properties["count-visible"] = true; //set the count to visible
properties["count"] = counter_value; //set the counter value

Progress Bar
To set the progress bar, you will need to set the properties such that the progress is visible and give it the desired double value:
double progress_value = 0.5;
properties["progress-visible"] = true; //set the progress bar to visible
properties["progress"] = progress_value; //set the progress value

Quicklist
The quicklist can be set by using the dbusmenu Qt library. You will need to include the header file:
#include <dbusmenuexporter.h>

The quicklist is created as a QMenu menu in Qt. This menu is 'exported' over dbusmenu using a DBusMenuExporter object. When exporting, you give this object a unique path and then reference that path to tell the launcher item which menu to display as a quicklist.
In your main window class declaration, add the following instance variables:
QMenu *quicklist;
DBusMenuExporter *quicklist_exporter;

Then, in the constructor function:
quicklist = new QMenu(this);
//exports the menu over dbus using the object: /com/me/myapp/quicklist
quicklist_exporter = new DBusMenuExporter("/com/me/myapp/quicklist", quicklist);

To add items to the menu, use the [addAction](http: //qt-project.org/doc/qt-5.0/qtwidgets/qmenu.html#addAction) method of the menu to add [QAction](http: //qt-project.org/doc/qt-5.0/qtwidgets/qaction.html) objects.
To set the quicklist of the launcher icon, set the 'quicklist' property of the signal:
properties["quicklist"] = "/com/me/myapp/quicklist";

Configuring the Project File
You will need to configure the .pro file to add dbus support: QT += dbus. In order to build with quicklist support, you will need to have the dbusmenu-qt development libraries (libdbusmenu*dev) installed. You can then add the following to the project file to include the dbusmenu library:
#import the dbusmenu-qt library for quicklists
greaterThan(QT_MAJOR_VERSION, 4) {
    INCLUDEPATH += /usr/include/dbusmenu-qt5/
    LIBS += -ldbusmenu-qt5
} else {
    INCLUDEPATH += /usr/include/dbusmenu-qt/
    LIBS += -ldbusmenu-qt
}

Example Application
To see an full example using all of the launcher functionality from Qt, look at this Github project.

Unity Launcher API for C++


Blinded manuscripts and arXiv

Question: Very recently, I have submmited my paper to a journal published by Springer.
As required by the  policy of the journal, the manuscript must not contain the author's name and the corresponding contact information. However, I published the paper to arXiv as a preprint.
My question is What will happen next? My manuscript can be sent to reviewers?
Thank you for your supports.
Comment: The journal should have a policy for precisely this question.
Comment: See also https://academia.stackexchange.com/search?q=arxiv+double-blind ; this has come up quite a few times. My suggestion is "don't worry; if you're thinking about the issue, you're probably already paying more attention than most of the submitters".
Answer: Thomas is correct--any journal put out by Springer as well as by university presses will have a specific policy about preprints. Look for the policy on the journal home page or the press's "authors' rights" web page, which often has information for prospective authors (i.e., authors who have submitted a paper for consideration but haven't received a decision). For example, the "Guidelines for Authors' Rights" for the University of Chicago Press's journals division  (https://www.journals.uchicago.edu/cont/jrnl_rights#faq6) states:
"To avoid citation confusion and compromising of peer review, we discourage online posting of pre-prints and working papers. If you choose to submit a pre-publication version of your paper to a non-commercial, discipline-specific pre-print or working paper archive, however, we require that appropriate credit be given to the journal as described above and ask you to remove the working paper from the archive after your article is published or replace it with the published version. Any version of your paper submitted to a pre-print or working paper archive can be made available only under a license that forbids commercial reuse, or you will be required to remit the appropriate fee to make your article available in the journal under a comparable license. If you deposit the published version of your article, it may be made publicly available only after the appropriate embargo period* has been observed. You are responsible for informing the manager of the archive of the embargo period that must be observed.
Please also note the comments elsewhere in these Guidelines regarding prior publication and anonymous peer review and the use of copyrighted material in your article.
*The embargo period is twelve (12) months unless otherwise required by mandate."
So I would advise checking out the specific journal's policy as well as Springer's "authors' rights" pages. Depending on what you find, you may be better off removing your essay from the preprint archive, if that is possible, at least while the essay is under consideration for publication. Good luck!
Comment: "To avoid citation confusion and compromising of peer review, we discourage online posting of pre-prints and working papers." Yeah, sure, that's the reason. To avoid confusion.
Comment: FYI, in the case of arXiv, it is not possible to remove submissions.  There is a "withdraw" option, but this simply marks the paper as "withdrawn"; the public can still download it.

Blinded manuscripts and arXiv


What kind of wire would be good for a 160m - 40m fan dipole?

Question: I want to know the best copper wire or tinned copper wire for a fan dipole for 160, 75, 40 meters. It would be coax fed and I would like it to handle 1500 watts or more. I would like 65/30 strands of tinned copper wire. Please let me know what to get. I would like the best wire.
Comment: Hi Paul, welcome to the site! You should prob change the title of your question to something like "wire for fan dipole" or something that's related to your question so that people will be more likely to check it out. Also, please include some info about what you've already found in your research. Finally, is there a particular concern you're looking to have addressed in the engineering of your antenna?
Comment: I took the liberty of editing your question as @webmarc suggested, I hope you don't mind!  If you don't like my edit then you could always roll it back.
Comment: If you are asking for a brand name of wire, I believe that's off topic here.  What's important for antenna wire is 1) can it support its own weight 2) is it thick enough to carry the power (skin depth + current) 3) how corrosion resistant is it
Answer: The important things to consider when choosing wire for a wire antenna are mechanical strength, electrical resistance, power-handling capability, cost, and ease of handling.
As an unsupported horizontally-strung wire gets longer its tension increases, which makes mechanical strength more important.  A dipole for 160m is quite a long wire antenna.  One should also consider whether there may be additional mechanical loads, such as the weight of the feed line and balun, or weather-related loads such as wind and ice.  (When I lived in the Midwest, winter ice storms periodically would coat everything in thick layers of ice, which is hard on wire antennas.)  Adding mechanical support, such as using a strong bracket for the connections at the center of a dipole and then hanging the bracket from a strong rope, may be worth considering.
Unfortunately I don't have a source, but I read somewhere (a QST article maybe?) that copper wire may not be the best choice for long wire runs with additional mechanical loads.  I also seem to remember reading that ordinary copper wire will stretch under strong tension, and that being drawn in that way makes the copper stronger.  Copper has the advantage of being an excellent conductor, so if a wire antenna is made from thick copper wire, then one can rest assured that electrical resistance has been minimized.  I would consider 14 AWG (2.08 mm2) copper wire to have low resistance and enough power handling capability for nearly any amateur radio wire antenna.
Alternating current at RF frequencies traveling through a conductor passes mainly through the surface, a phenomenon known as the skin effect.  Since RF current doesn't flow through the center of an antenna wire, a type of wire that has a steel core for mechanical strength and an outer copper layer for low electrical resistance is popular for wire antennas.  The brand "Copperweld" seems to be common.
Whether wire is solid or stranded doesn't make much of a difference once the antenna is in place, but it does affect how easy the wire is to work with.  Stranded wire is more flexible than solid-core wire.  Solid wire on a spool wants to stay coiled until it is laid out and put under tension, especially with steel-core wire.  Raising an antenna made from solid-core wire is fairly straightforward, from what I've heard, but I also heard that taking down a wire antenna made from steel-core wire can be a pain.
The advantage of tinned-copper wire is slightly more convenient soldering, but this isn't much of an advantage for wire antennas because solder corrodes easily outdoors, so soldering should be used as little as possible.  (Protect any soldered connections from the elements.)


how do I get the program to Know which annotation is selected and be able to access properties of it?

Question: So far my program can display a database of custom annotation views. Eventually I want my program to be able to display extra information after a button on the annotation bubble is clicked. Each element in the database has a unique entry Number, so I thought it would be a good idea to add this entry number as a property of the custom annotation. The problem I am having is that after the button is clicked and the program switches to a new view I am unable to retrieve the entry number of the annotation I selected.
Below is the code that assigns the entry Number property to the annotation:
for (id mine in mines)
 {
 workingCoordinate.latitude = [[mine latitudeInitial] doubleValue];
 workingCoordinate.longitude = [[mine longitudeInitial] doubleValue];
 iProspectAnnotation *tempMine = [[iProspectAnnotation alloc] initWithCoordinate:workingCoordinate];
 [tempMine setTitle:[mine mineName]];
 [tempMine setAnnotationEntryNumber:[mine entryNumber]];
   }
[mines dealloc];

When the button on an annotation is selected, this is the code that initializes the new view:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
{
mineInformationController *controller = [[mineInformationController alloc] initWithNibName:@"mineInformationController" bundle:nil];

controller.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:controller animated:YES];
[controller release];
   }

and lastly is my attempt at retrieving the entryNumber property from the new view so that I can compare it to the mines database and retrieve more information on the array element.
iProspectFresno_LiteAppDelegate *appDelegate = (iProspectFresno_LiteAppDelegate *)[[UIApplication sharedApplication] delegate];
NSMutableArray* mines = [[NSMutableArray alloc] initWithArray:(NSMutableArray *)appDelegate.mines];
for(id mine in mines)
{
 if ([[mine entryNumber] isEqualToNumber: /*the entry Number of the selected annotation*/])
       {
       /* display the information in the mine object */
       }
  }

So how do I access this entry number property in this new view controller?
Answer: Had the same problem, you are gonna have to tag your annotations. Just check this out, it's definitely gonna help you:
http://www.everydayone.com/2009/08/mapkit_annotations/
Comment: So is the UIViewController park of the Mapkit Framework? or in this case is it the AnnotationView?


Backing up broken android device

Question: I have an android device running KitKat 4.4.2 (not rooted; developer stuff turned on) and I shattered the digitizer. I can still see what's on the screen but I can't interact with it1. I tried using adb to back it up, but I was unable to press the "confirm" button on the screen. Is there anything I can do now [i.e. without getting a USB OTG cable and a mouse]? I'm comfortable w/ ADB and the command line if necessary.
1I could get an OTG USB cable and connect a keyboard/mouse and use that to install a backup app, etc. but I'm hoping there's an easier way.
Answer: Install a vnc server on the phone through adb and then you can connect to it.
Comment: Can you suggest a VNC server that you can set up and run without touching the screen?

Backing up broken android device


Are there any Goodness of fit tests for Vine copulas?

Question: Is there any goodness of fit tests like those based on probability integral transform (PIT) of Rosenblatt available for Vine copulas as a built in function in R?
I know we can use gofCopula from copula package for bivariate, but how can we do it for higher dimensions or Vine copulas?
Answer: The VineCopula package offers the function RVineGofTest:
"This function performs a goodness-of-fit test for R-vine copula models. There are 15 different goodness-of-fit tests implemented, described in Schepsmeier (2013)."
See the help page for further details.
Schepsmeier, U. (2013) A goodness-of-fit test for regular vine copula models.
Preprint http://arxiv.org/abs/1306.0818
Schepsmeier, U. (2013) Efficient goodness-of-fit tests in multi-dimensional vine copula models.
http://arxiv.org/abs/1309.5808
Comment: does the goodness of fit of vine copula deteriorate as number of covariates increases from 5 to say 1,000? I have yet to see an article that uses vine copula for a 10+ variable dataset, I guess because even at that stage there are already so many conditional copula combinations to estimate? Is this why vine copula have not caught on


How to print multiple artboards on one page each with individual trim marks in Illustrator?

Question: I've tried putting everything in one large artboard and printing that large artboard, but it would not show the trim marks for the smaller artboards.
Answer: To place trim marks around artboards
Select File → Save As (Ctrl+Shift+S) and select PDF
Once the PDF options come up, click on Marks and Bleeds and check Trim Marks

To place crop marks around individual objects
Select all items you want and go to Effect → Crop Marks this will apply crop marks (trim marks) to each object.
See this answer for more.
Comment: Is the PDF going to retain CMYK profile?
Comment: @KamilaMielczarek yes thats the purpose of PDF


Downloaded app won't open because it is from an unidentified developer

Question: I have download photo express mac version on my MacBook Pro and it won't open it said can't opened because it is from an unidentified developer. But I'm using there mac download so what do I do so I can get it to work
Answer: I would appear that for some reason the developer of Photo Express is not registered with Apple as an identified developer.
To get it to install you will need to go to System Preferences and change the default setting for application downloads...
System Prefs-> Security And Privacy -> and select Allow apps downloaded from Anywhere.

Remember to set the value back to Mac App Store and identified developers afterwards.
Comment: Or, more conveniently, right-click the downloaded .dmg or .pkg file and select Open. You will be asked to confirm that you want to open the unidentified installer, and then for your admin password if you agree. This way you don't have to remember to change anything back afterwards, which could leave you open to security breaches.


Re-bind helm-bibtex actions to number keys

Question: The default behavior for helm-bibtex is to bind actions to the function keys F1, F2,.... How can I change this to use the number keys 1,2,... instead?
Comment: Helm probably has a way to customize the keys. I'd check there.
Answer: Find out what keymap they are bound in, in that context, and create your own keybindings for the number keys to the same commands, in that map.
If you want to also remove the function-key bindings, bind those keys to nil instead of a command, in that keymap.
If the keymap is not the global-map (which is likely) then use define-key.
But before you do anything, find out what the number keys already do in the mode you are interested in.  In most modes they are bound to a command such as digit-argument, which is used for a prefix argument (e.g., for use with C-u).  Typically you do not want to sacrifice that use.


How to Turn Sharepoint lists into dropdown lists?

Question: I am trying to develope a functioning smart form on sharepoint 2010.  I want to avoid using infopath/solidQ at all costs.  Currently I have deployed the trial version of boostsolutions cascading forms, however I am having a hard time turning my "lists" into choosable dropdown lists, to use this 3rd party software.
The end result I want to achieve is to create a form where the user selects a dropdown choice populated threw lists, which "filter" the next dropdown option.  Think of it like Country -> Provence -> City -> Postal Code.
If anyone has a really detailed document or could go through the troubles of replying in detail, it would be much appriciated.  I have been on the google hunt for a few days now.
Thanks.
Answer: What about JavaScript with http://spservices.codeplex.com/wikipage?title=$().SPServices.SPCascadeDropdowns&referringTitle=Documentation ?


Adjusting default brightness upon boot

Question: When I boot to ubuntu 12.04, the back light on my display turns off and I have to press the increase brightness button 4 times to get it to the desired brightness.
Is there a terminal command I can input for a default brightness?
Answer: I use a small hack.

You need xbacklight. Try running it from terminal (Ctrl+Alt+T), and if the package is not already installed, it suggests you to install. Follow the instructions.

Commands you need to know. (Use a number instead of <...>) Aren't they self-explanatory?

xbacklight +<increment>
xbacklight -<decrement>
xbacklight =<value>

Usually the range is 0 to 100. Running with no arguments shows the current value.

It is now as simple as setting the corresponding command to run automatically.
Simplest way:
Open Startup applications (Search in dash) and add an entry with command xbacklight =25. Use your preferred value instead of 25.
More complicated way:
Cook up a bash script to detect time of the day and then set the backlight value, and set it to run on startup. Left as an exercise to the reader.
Even more complicated way:
Detect light from webcam and the precise position of your favorite electron, destroy universe, rebuild it, and then set backlight to your favorite number. Set it to run on startup.

Adjusting default brightness upon boot


Is there official documentation for the Mach-O file format/ABI used by OSX that still exists as of December 2018?

Question: Why can't I find any official documentation for the file format?
I've seen this link a lot, but it seems that they've taken whatever used to be there down.
The best I could find was some blog posts and this mirror of the older documentation on github. This information still seems to be accurate, but why did Apple take this down? Has the documentation been moved somewhere? Have they deprecated some of the information in that document or perhaps the file format as a whole?
Edit I have been looking into this a bit more, and it seems like the mirrored documentation isn't actually completely up to do date. For instance, when compiling a source file with gcc -c the resulting object file includes a load command of type LC_BUILD_VERSION. This command type is not present in the documentation, but the corresponding data structure is present in /usr/include/mach/loader.h (which is now present in 10.14 only when installed from a package). It looks like there are more load commands that aren't documented as well.
Answer: With my previous comment, it appears that the loader.h file located at https://opensource.apple.com/source/xnu/xnu-4903.221.2/EXTERNAL_HEADERS/mach-o/loader.h.auto.html
IS the official documentation. Near the top it says
/*
 * This file describes the format of mach object files.
 */

And the comments in the file are more extensive than I realized.


Should I include every header?

Question: Should I include every header even if it was included before? Or maybe I should avoid it when I can?
For example. If I use std::string and std::vector in some file. If <string> included <vector> should I include only <string> or <string> and <vector>?
Comment: I'm in favor of "Include what you use". Perhaps you might not need to include `vector` because another include contains it. But this might change in the future.
Comment: @DJBurb: Only if you don't have (or don't care about) people building your code with other library implementations.
Comment: I personally only use them when needed.  As long as the compiler is not complaining, the less the better
Comment: You should include all the header files that you need to include, but no more than that. Also I'd be pretty surprised if `` included ``...
Comment: @Barry, sorry it was an example with  and
Comment: Can't wait for [modules](http://clang.llvm.org/docs/Modules.html) tbh..
Comment: Favour forward declaration
Answer: TLDR
If you use it, include it.
The longer version...
If you use a header related entity (e.g. some type) in a file, you should include the related header for it. Don't rely on headers to include each other. If you use it, include it.
The C++ standard library doesn't mandate inclusion of <string> in <vector> nor vice-versa. Trying to make use of functionality like this would limit the code to a specific implementation. In general, the standard library headers may or may not include other headers (or their own internal headers) in an unspecified order or manner. One notable exception is <initializer_list> which is required to be included in a few of the other standard headers. Changes to this unspecified order or manner can also happen, thus breaking previously compiling code with the updated compiler or an updated standard library implementation (this has been known to happen).
Also consider that if the header file is the definition for the class, then it should include what is required for the definition of that class. The associated .cpp should include its associated .h and the remaining files required to implement the class. Don't need it, don't include it; don't include more than needed (llvm style guide). One exception here is templates (that don't have an associated .cpp); this exception would apply to other header only implementations.
It is noted that maintenance of the include what you use can be difficult in the long run; thus it makes sense that it is important in the beginning of the coding cycle to include what is required for the interface; and then again to check the includes with any reasonable change that is made to the code.
There seems to be some progress w.r.t. tools in this regard, such as the iwyu project, that uses the clang tool chain and seems to have support for msvc as well.
One counter example would be if the reason for the header is to include other headers, then maybe, but even then I would be very careful - make sure it is clearly defined what it includes. An example of this could be a precompiled header.
Comment: You may also want to mention that for one's own C++ files, the interface in the `.h` file should include only the headers used for the interface, but the implementation in the `.cpp` file would contain everything additionally required for the implementation.
Comment: I agree with this sentiment in theory. Unfortunately, it is fairly difficult to detect it if you slip up.
Comment: In general standard library headers may include each other in unspecified ways and you shouldn't rely on it. There are specific cases where a header is required to include another: a number of  headers are required to include ``, for instance.
Comment: It should be noted that the problem you describe is more pronounced with templates: Templates have to include their implementation, and, consequently the headers required for it. That is, with a template you can't follow the rule of separating interface and implementation includes that @Edward pointed out. However, if your headers only ever include stuff they need for the interface, that set of includes is usually relatively small, and it shrinks seldomly. So it's generally safe to only include a set of headers that pull in everything that's required if those headers do not define templates.
Comment: @dlf. This is true. I've also fallen afoul of the discipline as well. I'm not sure how some of the tooling is changing to support checking these things. Sometimes I just need to go back and audit my own code.
Comment: To add to the last paragraph: If classA uses classB (e.g. as result type of a method) I'd always prefer to `#include "classB"` only in `classA.cpp`, not in `classA.h` if possible (a `class classB;` may suffice there)
Answer: Generally, you should treat header dependencies as part of implementation, not as part of interface.
You should not rely on headers including other headers. If your class needs to use a std::vector, include <vector>; if you need std::string, include <string>. Otherwise you set yourself up for unexpected breakdowns when headers that used to include a file would suddenly stop including it, because they no longer need it.

Should I include every header?


Bell's Theorem with only two "traits"?

Question: Every proof of Bell's Theorem I can find relies on there being three different "traits" of particles that we can choose to measure. Usually this is the spin of the particles along three different axes. However, trying the same logic and math with only two traits does not seem to work. Does this suggest that non-locality only becomes an issue when there are three possible traits a particle can have, or is it conceivable for particles to only have two measurable traits and have Bell's Theorem still hold?
Answer: No, classical local models can reproduce any correlations between two measurable traits, that is, Alice choses at random to measure either the $\theta_1$ or $\theta_2$ direction of the spin, and the same with Bob. For QM to predict something that classical correlations cannot reproduce, you need at least 3 different angles. Such as Alice to chose between $\theta_1$ and $\theta_2$, and Bob between $\theta_1$ and $\theta_3$.
Answer: There is no way to have quantum-mechanical particles with only two traits.  Bell's Inequalities are usually discussed in the context of spin-$\frac{1}{2}$ systems, but they apply to any system with a two-dimensional Hilbert space.
The simplest possible quantum Hilbert space would be only one-dimensional, but in that case the only observable is represented by an operator proportional to the $1\times 1$ identity matrix.  With only one state, everything is always completely known.
So the simplest system with nontrivial physics is one in which the state space is two-dimensional. The state vectors have the forms
$$|\psi\rangle=\left[\begin{array}{c}
a_{1} \\
a_{2}
\end{array}\right]$$
$a_{1}$ and $a_{2}$ are complex numbers, and they can be normalized so that $|a_{1}|^{2}+|a_{2}|^{2}=1$. Moreover, the relative phase of $a_{1}$ and $a_{2}$ is also unphysical; multiplying the state vector by an overall phase factor $e^{i\alpha}$ does not change the value of any observable $\langle\psi|M|\psi\rangle$, because $\langle\psi|$ is the transpose and complex conjugate of $|\psi\rangle$.
However, if we have a two-dimensional state space, we can always construct observables that are implemented by the operators
$$\sigma_{1}=\left[\begin{array}{cc}
0 & 1 \\
1 & 0
\end{array}\right],\quad
\sigma_{2}=\left[\begin{array}{cc}
0 & -i \\
i & 0
\end{array}\right],\quad
\sigma_{3}=\left[\begin{array}{cc}
1 & 0 \\
0 & -1
\end{array}\right].$$
These are the three "traits" you are asking about.  What they correspond to physically depends on the specific two-level system under consideration.  For a spin-$\frac{1}{2}$ particle, they correspond to spins along three perpendicular axes.  For the polarization states of a photon, they correspond to measurements of the polarization in three different bases:

$\sigma_{1}$:  vertical versus horizonal polarization (the $+$ polarization basis),
$\sigma_{2}$:  diagonal polarizations rotated $45^{\circ}$ relative to the vertical/horizontal basis (the $\times$ basis),
$\sigma_{3}$:  right versus left circular polarization.

For other two-state systems, the three observables may be even more different, and they may be difficult to realize in practice.  Classically, they might seem like very peculiar things to measure.  However, they always in principle exist.  There are always three traits; for a given system you can figure out what they would be, so that it is always possible to set up Bell's Inequalities.

Bell's Theorem with only two "traits"?


Steam tells me Morrowind is still running while it isn't

Question: I've recently been having issues where Steam tells me Morrowind is still running, even when it isn't.
I've checked Task Manager but Morrowind doesn't show up in the "Processes" tab. I also tried running it from the Morrowind launcher itself as an admin, and it tells me that InstallShield Engine's iKernal executable's class couldn't be found.
Some assistance would be appreciated.
Answer: Try adding the Morrowind executables as exceptions to your anti-virus software (and firewall).
Cross-referencing both issues (Steam thinking the game is still running and the InstallShield Engine iKernal (unregistered) class problem) that approach is what they have in common.
Steam having this particular problem with Morrowind seems to be more common, and a search for the InstallShield message yielded this result.

Another option is to run Morrowind using Windows XP compatibility.
Answer: Is the game folder for Steam in the Program Files directory? That can have some issues with Window's UAC (User Account Control) and should be avoided if possible.
If the issue is not related to a firewall like the other commented suggested and is instead a hardware/software issue, you may want to consider trying OpenMW as a modern engine replacement for Morrowind, or using a tool like the Morrowind Code Patch (get the 2.5b4 patch here) to help make the game significantly better performing and much more stable on modern systems. Either of these is a significant improvement from just running in compatibility mode. If your issue is a compatibility issue, then either of these should fix it.
You could also try disabling the Steam Overlay for Morrowind, but most suggestions that this causes issues have been debunked as little more than rumor. Still, easy to try out.


Required number of bits in nonce

Question: Is there a formal proof that with N bits to iterate in the nonce of the block, a hash satisfying proof of work will be ever found?
How large that N (number of bits in the nonce) should be to satisfy proof of work in 10 years, 100 years?
Answer: In addition to the 32-bit nonce in the block header, miners can also update the extraNonce of arbitrary length in the coinbase transaction to get a different merkelRoot, so that a proof of work hash can always be found.
Answer: No, however, the probability that a satisfactory hash will be found tends to 1 as N approaches infinity. Or, to speak imprecisely, you'll always find one eventually (just maybe not as soon as you'd hope).
Being a cryptographic hash, the output of SHA256 is similar to a pseudorandom number generator. It's not guaranteed that a random number generator will output a number meeting any given difficulty in any finite period of time (unless your difficulty can be defined so that every random number is valid), but you can make all sorts of accurate descriptions of what it will do on average.
This averaging is, of course, how the Bitcoin network is able to keep an average of about 10 minutes per confirmation in the face of a great many variables and unknowns.
Being that there's a maximum generally-accepted block size of 1MB, I suppose it is possible that some blocks are completely insoluble. For example, with N=1,048,576 (1024*1024) and the highest possible difficulty, requiring all zeroes in the hash: each attempt has a 1 in 2^256 probability of working. (let's assume you use up to the whole block for your nonce; maybe not quite realistic, but it's close enough) With 2^1048576 attempts, you'd probably expect something like 2^1048320 of them to succeed. But there is (if I did the math right) an e^-(2^1048320) probability that none of them will work. And it only gets smaller if you have a non-max difficulty. This number is incomprehensibly small, but is not quite 0.
Comment: The key to understanding is that the hash is indeed a (pseudo)-random value.

Required number of bits in nonce


How many times tennis majors champions played in the qualifiers round?

Question: How many times a player who got in a grand slam through the qualifier round won the championship, and who are they?
Comment: I'm interested in men and women singles. But if get no answer for a few days, I may change it up
Comment: Marginally related - according to Wikipedia, [Mark Edmondson](https://en.wikipedia.org/wiki/Mark_Edmondson) is the lowest ranked grand slam winner, winning [1976 Australian Open](https://en.wikipedia.org/wiki/1976_Australian_Open_%E2%80%93_Men%27s_Singles) with rank 212.
Comment: Perhaps it could be clarified whether you are interested only in singles or whether this question is also about other events. (I mean doubles, mixed doubles, wheelchair, juniors. Although I do not think I have seen qualifying for mixed doubles or wheelchair competition.) I'd guess that this did not happen in singles, but let's wait to see whether somebody can actually confirm this.
Answer: After winning 2021 US Open, Emma Raducanu has become the first person to win a Grand Slam tournament as a qualifier.
Answer: No qualifier to one of the four major championships singles main draw has ever won that year's tournament. The farthest a qualifier has reached at a major is the semifinals with John McEnroe reaching the 1977 Wimbledon Semifinals as a qualifier. Other qualifiers to reach grand slam semifinals are Filip Dewulf at the 1997 French Open and Vladimir Voltchkov at the 2000 Wimbledon Championships. A wild card though has won a major before with Goran Ivanišević winning the 2001 Wimbledon Championships as a wild card.
On the women's side Alexandra Stevenson made the semis at Wimbledon in 1999 as a qualifier.


Setting up Intel Wireless AC 3160 NIC in FreeBSD

Question: I have a pretty frustrating issue with FreeBSD. I am a Linux user who decided to switch to FreeBSD because I liked the idea of the ports system that it uses. I decided to give it a try in a virtual machine on Linux Mint and it ran flawlessly (I had to setup the gui but the process was trivial) so I decided I'd try a switch from Linux Mint to FreeBSD on my physical machine... Well it turns out setting up FreeBSD on my physical machine is not as smooth of a process. The ifconfig command is not showing a wlan0 wireless interface, and FreeBSD is not able to detect my network card (an Intel Wireless AC 3160) through the dmesg command. I discovered FreeBSD 11.0 supports drivers for the Intel Wireless AC 3160 through the iwm driver, but since I am new to FreeBSD I am not sure how to setup this driver as well as the wlan0 interface to successfully use my network card. Any help to this problem or even just a link to the relevant information would be greatly appreciated.
Answer: The iwm driver is not in the GENERIC kernel. The man page man iwm specifies the methods required to pull the driver in. Either:

build a custom kernel
load at boot time with /boot/loader.conf
load at runtime with kldload

The man page does not appear to be online - but it is in the latest snapshot.
Comment: it is described [here](https://www.freebsd.org/cgi/man.cgi?query=iwm).


Can we add a [bedops] tag?

Question: I was wondering how tags are added. I'm a new user to this SE site, so I don't have the reputation to add new tags. Can we please add a bedops tag to make it easier to find, ask, and answer questions about this toolkit?
Comment: Yes, when people start to ask questions about bedops.
Comment: would definitely have `bedops` as one of the tag owing to its usage and popularity. I would definitely support it.
Answer: This early in the beta, there's a lot of flexibility in creating new tags. Users, even new ones, are unrestricted in which tags they can use, so tags are being created pretty quickly right now. There's some effort going into tag quality control right now, which is documented in some of the other questions in the meta.
Questions about bedops usage are definitely on topic here, and the bedops tag is definitely appropriate. That said, there's no way to create the tag until someone actually asks a question about bedops and tags it accordingly.
You're certainly welcome to seed the topic here with a couple of questions. Be careful though, the StackExchange community is wary about any content that feels too much like advertising. But done tactfully, using Bioinformatics.SE as a support forum for bedops should be fine. See relevant discussion here.

Can we add a [bedops] tag?


Andreev reflection graphene - metallic superconductor

Question: We have Bogoliubov-De Gennes (BdG) equation,
$$\left(\begin{array}{cc}
\mathbf{p}\cdot\boldsymbol{\sigma} - V & \Delta_{0}e^{i\phi} \\
\Delta_{0}e^{-i\phi} & V - \mathbf{p}\cdot\boldsymbol{\sigma}
\end{array}
\right)
\left( \begin{array}{c}u\\v\end{array}\right)
= \mathcal{E}\left( \begin{array}{c}u\\v\end{array}\right)$$
with definition,
$$\mathbf{p}\cdot\boldsymbol{\sigma} = -i\hbar v_{F}(\partial_{x}\sigma_x + \partial_y\sigma_y)$$
We solve the equation through ansatz,
$$\Phi = {\rm Const}\cdot \exp(iqy + ik_{0}x + \kappa x)$$
for $k_{0} > 0$ and $\kappa > 0$. The question is: How to use the assumption that $V >> \Delta_{0}, \mathcal{E}$ in the calculations to get nice looking formulas like in Beenakker (A13)?
Comment: Did you at least tried to find $k_{0}$, $q$ and $\kappa$ ? The assumption come from their expressions ...
Comment: Yes I did, but it involves double square root (nested). You can find Yourself expressions for $k_{0}$ and $\kappa$ in Mathematica which depend on $q$.
Answer: When you write down the formulas A15-A18, apply this assumption to these definitions and put it into wave functions, which are first calculated by solving BdG equation. You can reach the Beenakker results.
Answer: This is actually exactly the same question I was asking myself a while ago, and it took me quite some time to figure it out.
What I ended up doing was:

diagonalise the BdG Hamiltonian in Mathematica
solve the expressions for the eigenvalues for $\kappa$
neglect terms proportional to $\kappa^2$, $\kappa \Delta$ in the expressions for the eigenvectors, expand them to first order in $\kappa$, insert the expression for $\kappa$ you got from the eigenvalues
simplify everything (using the expression for $\epsilon$ and approximate $\hbar v k \approx E_F+U$) and arrive at Beenakker's simple-looking expressions (tedious)

I hope that helps some, in case you haven't figured it out yourself in the meantime. If you need more info/details don't hesitate to ask, I can elaborate some more if needed!
Comment: If you're still willing, please could you elaborate? This is still causing me trouble!


What is the meaning of the noun "set-up" in the following context?

Question: I cut the conversation short, reminded her again that if there is anything I could do I would do it, and hung up. Gina who had got the SET-UP from my expression said tactfully, "After all, she is the daughter of a millionaire."
Comment: It means "understood *the situation*".
Answer: "Setup" as a noun can be used to mean a configuration, or particular arrangement. For instance I could refer to the desk where my computer is kept, my desk chair, the sound system and all of its peripherals as my "gaming setup."
It has a slightly different meaning when used in context of social interactions. Instead of a previously-made arrangement of things, a setup is a previously-arranged strategy. In this particular instance, the narrator said a particular expression, possibly with some sort of special hint, that allowed Gina to pick up on the narrator's strategy and later act upon it.


Is it 'freshman female representative' or 'freshwoman representative'?

Question: Lexico has the word 'freshwoman', but, unlike 'freshman', it doesn't have the meaning 'a newcomer or novice, especially someone newly elected to Congress'. Which option would be better? 'Freshman female representative' sounds clumsy but, technically, it seems to be the only correct one. Yes, I want to mention gender.
Answer: Assuming the context is a U.S. congressional representative, freshman congresswoman would use freshman correctly to describe a member of congress in their first term, and congresswoman implies gender.
Comment: As I understand it, 'congressman'/'congresswoman' can be applied both to senators and representatives. Could you offer something with 'representative'?
Comment: I'll offer the suggestion that while you're technically correct (the best kind of correct!) that both senators and house members are members of congress, if you talk about a congress member I immediately think of a member of the U.S. House of Representatives, not a senator. You would never address a female member of the senate as "congresswoman", you'd address her as senator.
Comment: My question stands


Select entities with a specific player as a passenger in a Minecraft command (1.15.1)

Question: I need to use an entity selector in an /execute command to select all boats who have at least one player on board who is holding a specific item. However, because the id tag does not exist for players, no entity selectors arguments exist for selecting an entity with specific passengers, and I cannot select them by the type selector argument as passengers of an arbitrary entity can only be selected by their NBT data, I cannot select mounts with specific player passengers using an entity selector. Is there a workaround for this?
Comment: Wow, this is very difficult. You can only figure out what rides what by using the `RootVehicle` tag of the player, but you cannot modify player data, even for the root vehicle, you can't easily compare NBT of two entities, …
Answer: Minecraft has no proper method to compare NBT of two entities. So you have to choose one of many possible workarounds, each has their own downsides.
The simplest method: Select a player that is at the expected coordinates:
/execute at @e[type=boat] positioned ~ ~-.45 ~ if entity @p[distance=..1,nbt={SelectedItem:{id:"minecraft:stone"}}] run <command>

This has several downsides:

It is lag and motion dependent. If you ride a boat quickly on blue ice and have a bit of lag, that command will not match you, even though you are sitting in the boat.
Someone standing on or next to the boat can get selected as well. To prevent this, you could reduce the radius, but that would amplify your lag dependency problem.
The exact offset depends on the vehicle, so you need to figure out a new offset if you want to do the same for e.g. minecarts.
It needs to be done three times, once for a single passenger, once for the first and once for the second passenger of a boat with two passengers. (Going backwards or forwards relative to the boat can be done with "local coordinates": ^ ^ ^)

The exact method: I couldn't find a way without either looping over both all boats and all players, so this needs to be done in a function.
First you store part of the UUID of every player's root vehicle in a scoreboard. You could do this with the entire UUID, if you want, but that is much more complicated (it might require binary search), so I will only show the method of storing part of it:
/execute as @a store result score @s vehicle run data get entity @s RootVehicle.Entity.UUIDMost 0.00000000023283064365386962890625

That scale factor is 2^-32, that ensures that every possible value of UUIDMost fits into the score by cutting off the lower half.
Even if you have one boat in every single block up to render distance 32, the probability to match the wrong one is just 0.025%, so this method should be fine.
Now do the same for the UUID of all boats, but on their own scores:
/execute as @e[type=boat] store result score @s vehicle run data get entity @s UUIDMost 0.00000000023283064365386962890625

Comparing and doing something for every boat that has the same score in this scoreboard as a player with certain properties is the complicated part.
Execute a function as and at every player holding the item (or matching whatever condition):
/execute as @a[nbt={SelectedItem:{id:"minecraft:stone"}}] at @s run function test:vehicle

It would also work without at, but if you use at, in almost all cases only a single boat needs to be checked.
The contents of that function:
function test:vehicle_loop
tag @e[type=boat] remove checked
say @e[type=boat,tag=found]
tag @e[type=boat] remove found

This function calls a function that loops over all boats and eventually comes up with a single boat tagged "found", then cleans up (which is important, if you want to run it for multiple players in one tick) and gives you an opportunity to do something with the boat (still as the player, in case that is important).
The contents of the function vehicle_loop:
execute if score @e[type=boat,tag=!checked,sort=nearest,limit=1] vehicle = @s vehicle run tag @e[type=boat,tag=!checked,sort=nearest,limit=1] add found
tag @e[type=boat,tag=!checked,sort=nearest,limit=1] add checked
execute unless entity @e[type=boat,tag=found] if entity @e[type=boat,tag=!checked] run function test:vehicle_loop

This function first checks if the vehicle score of the closest boat to the player that has not been checked yet is the same as the vehicle score of the player. If that happens, you have successfully found the ridden boat for that player, so it gets tagged with "found". Then the boat gets tagged with "checked", no matter if it's the right one or not. Then the function calls itself if there are still any boats left to check (this is how loops are done in functions).
Answer: You cannot select an entity with specific passengers, but you can select an entity without specific passengers.
You can create named boats and select ones without a specific entity as passenger.
/summon minecraft:boat ~ ~ ~ {CustomName:"\"mcboat\"",Passengers:[{id:"minecraft:villager",CustomName:"\"boaty\""}]}
/summon minecraft:boat ~ ~ ~ {CustomName:"\"mcboat\""}
/kill @e[name="mcboat",nbt=!{Passengers:[{id:"minecraft:villager"}]}]

Unfortunately I can only get it to work by sorting passengers by id and not another tag like name. I am using this to make sure my riding villagers stay on their horse. Im using 1.14.4.


Cannot install Ubuntu 14.04 on ssd

Question: I have recently bought a Samsung 840 EVO 120gb SSD, I currently have Windows 7 installed and I want to dual boot with Ubuntu 14.04. In the installer I cant see the SSD in the dropdown menu (the one where you choose the hard drive for the installation) but if I try to specify the partitioning myself I can format the SSD and then allocate some space for Ubuntu. How can I install Ubuntu without losing my Windows 7 partition?
Comment: If I understand you correctly. You have Windows in the original HDD and you bought and installed a new SDD. You want to install Ubuntu in the new SDD without changing anything in the HDD. You have to use the "Something Else..." option and manually create the partitions in the SDD. See http://askubuntu.com/questions/193807/installing-ubuntu-on-one-of-two-hard-drives
Answer: If I understand the problem properly...
The best would be first to arrange a separate partition for Ubuntu. If the entire disk is used now for Win7, you would need to shrink the Win7 partition by a chosen amount and then what's left use for Linux partition.
However - if you're not sure what you're doing there's a chance you may lose you windows data - so better be careful. Backup would be recommended.
To resize the partition(s) you can use gparted - it should be also in Ubuntu Live, which you can also use later to install your Ubuntu system on the disk.
Answer: it seems like your windows partition is expanded to fit the whole disk. this is a simple fix. Press start on your windows OS. then right click on computer, then, from the drop down, press manage. then press disk management. then find your C: drive that windows is installed on, right click it, and press shrink. Then, shrink the volume to an appropriate size. then reboot back into the ubuntu install. then click on "Something else" when you get to that point. Create a partition and mount it as /, then make another partition 4GB partition and mount it as swap (This is optional but it speeds up tasks such as booting and installing files) then continue with the installation.
Comment: Is the swap partition not only used when the system is out of memory? How should that speed up boot time?

Cannot install Ubuntu 14.04 on ssd


When side loading mmpks to Field Map through the Iphone App Folder, paste is not an option

Question: We are needing to side load some maps into Field Map. Most Iphones we simply download the map from a site we have then copy and paste it to the Field Map folder from the File App. On a few iphones the paste option is not there under the File App when we drill down to the Field Maps folder. plugging directly to a computer is not an option - has anyone else seen this issue before?
Answer: For those with this same issue. After re-installing the app the 3rd time that seemed to fix the issue. Must have been bad installs the previous times.


Transfer of data from table to other database table have the same primary key

Question: I have a database with data, I want to copy the all tables with data to newly created database also with same existed auto incremented primary field. How I can do that process.
Comment: Any reason you can't do a backup and restore?
Answer: There are a couple of ways to do this.  It depends on your setup.  As per the previous question,  if you just need a copy of everything you can backup and restore the database onto a new instance or, on the same instance with a different name.
If you need to physically pipe data with identity columns, into a new database thats already setup, you could use the import export tool.  With that you can easily select just the tables you want data from, and the destination.  Its quick and easy for a one time load.  If you need to keep Identity columns, remember to select Column Mappings, and check the box to enable Identity insert per the article on Microsoft's website.
This is just one option to moving the data.  A quick google and you will find many other options, including BCP, Linked Servers, SSIS, etc.  It all depends on how often you want to do this load.  How often do you need to do this?


Android: How to implement "Facebook easy login"?

Question: It's hard to explain in words what I'm talking about.
When you open an app on your phone, sometimes it requires you to give a username/email and password credentials. Some applications have an option to "Login with Facebook" and quickly allows the user to login to facebook. By doing this, it gives you a new account by using your facebook information (I guess?).
I know you can do this with my websites too.
My question is what is this called? does facebook devs have a specific name for this? If so, how can I implement it through android, and even through web development?
Thanks!!
UPDATE: For example: When you log into this stackoverflow site. You are able to click on the "login with Facebook" and quickly login without have to fill in information. I know it's the same way with the stackoverflow android app.
Comment: StackOverflow uses [OpenID](http://openid.net/) for the login procedure.
Answer: Facebook uses OAuth 2.0.
Related: OAuth Facebook API Tutorial
Answer: I think you are looking for the word "OpenID". Facebook logins are OpenIDs. Allowing users to use the same credentials for different webpages
Answer: What you are looking for is called Facebook Single Sign-On.  The facebook developer docs should be enough to get you started.


Is VMware 8 compatible with Ubuntu 12.04?

Question: I am using VMware 8.0.4 and want to install Ubuntu 12.04, but I have not been able to do so successfully. Can you suggest compatible versions of VMware and Ubuntu? In particular, will Ubuntu 12.04 work with VMware 8?
Answer: VMware 8.0.4 is compatible with Ubuntu 12.04, you just need to apply a simple patch to allow the modules to build on the 3.2 kernel used by Ubuntu.
The patch is described and available on this page, but the version in there needs to be changed to 8.0.4 to apply successfully.
Here's how:
To download and apply the patch,

Open a terminal and type:

mkdir vmw_patch && cd vmw_patch
wget -O- http://weltall.heliohost.org/wordpress/wp-content/uploads/2012/01/vmware802fixlinux320.tar.gz | tar -xz
sed -i -e 's/8.0.2/8.0.4/g' patch-modules_3.2.0.sh
./patch-modules_3.2.0.sh

That should compile the modules without any errors.

Explanation: wget downloads the patch, and tar extracts it without actually saving the downloaded file. sed updates 8.0.2 to 8.0.4 in the patching script so that it will run.
Comment: Actually on my pc Win7 is running . i want to first install VMware(8.0.4) and then within VMware i want to install Ubuntu(12.04). is it possible? are they compatible?
Comment: Yes, they are; I use such an exact configuration to answer AU questions when I'm on Windows.
Comment: @izx - I tried to apply your patch but it says: "VMWare is not installed (properly) on this PC." :/
Comment: @Shiki: the patch is for VMware Player/Wkstn on Linux host, NOT for VMware tools on an Ubuntu guest...


Justifying differentiation of infinite product

Question: Let $(z_n)_{n\in\mathbb{Z}}$ be a sequence of complex numbers s.t. the product $P(z):=\prod_{n=1}^{\infty}{\left(1-\frac{z}{z_{-n}}\right)\left(1-\frac{z}{z_{n}}\right)}$ is absolutely convergent for every $z\in\mathbb{C}$, and hence defines an entire function with zeros at every $z_k$. Is there some nice way to justify $\frac{\mathrm{d}}{\mathrm{d} z}P(z_k)=\frac{-1}{z_k}\prod_{|n|\geq1, n\neq k}{\left(1-\frac{z_k}{z_{n}}\right)}$? I guess one is not allowed to simply use the product rule for differentiation here?
Comment: Although justification requires a little effort, of course the _outcome_ of application of the product rule must be correct if the thing makes sense at all... :)  The issue is about the limit of derivatives being the derivative of the limit. For $z$ in a compact, if a sequence $f_n$ has a sup-norm limit, and if the sequence of derivatives $f_n'$ has a sup-norm limit, then the derivative of the limit is the limit of the derivatives. If you mean to restrict to holomorphic functions, then Cauchy's integral formulas give a simpler mechanism. Is this what you are asking about?
Comment: Take the derivative of its logarithm it will transform it to a sum that is easily differentiatable
Comment: If you know that $P$ is entire, then presumably you know that the product converges uniformly on compact sets, and then differentiation commutes with the limit.
Comment: Thank's for that answer. So I guess it would be completely justified given your statement about the sup-norm limits since the product converges absolutely?
Comment: Something isn't quite right with your last expression. The left-hand side appears to be the derivative of $P$ evaluated at $z_k$.  The right-hand side has terms that embed $z$, not $z_k$.
Answer: Yes, this can be done. You can find this on ProofWiki: Derivative of Infinite Product of Analytic Functions
You don't even need the absolute convergence of the product $f=\prod f_n$, locally uniform convergence (=uniform convergence on compact sets, modulo some details, depending on the author, but many authors do not define it) suffices:

Theorem. Let $D\subset\mathbb C$ be open, $(f_n)$ analytic on $D$ and $f=\prod f_n$ locally uniformly convergent (thus analytic). Then $f'=\sum f_n'\prod_{k\neq n}f_k$ locally uniformly.

A practical sufficient condition is the locally uniform convergence of $\sum|f_n-1|$, which is satisfied by any reasonable sequence I can think of.
Outline of proof
First establish $$\frac{f'}f=\sum\frac{f_n'}{f_n}$$
locally uniformly, multiply everything by $f$, and check that both sides coincide at the zeroes of $f$.
To obtain this, we'd like $\log f = \sum \log f_n$, locally uniformly in order to differentiate term-wise. This is true, or at least locally:

Theorem. If $f=\prod f_n$ locally uniformly and $z_0\in D$, then $$\log \left(\prod_{n=n_0}^\infty f_n\right) = \sum_{n=n_0}^\infty \log f_n + 2k\pi i$$ uniformly on some neighborhood $U$ of $z_0$, for some $n_0\in\mathbb N$, $k\in\mathbb Z$ constant on $U$.

The proof consists of very carefully taking logarithms. The surprising part (to me) is that $k$ can be taken constant, i.e. eventually the product does not switch branches anymore.


What will the haftarah reading for Shabbat HaChodesh 5781 be?

Question: What will the various haftarah readings for Shabbat HaChodesh 5781 be according to different minhagim? What are the respective rationales behind them? Presumably it's not possible to enumerate each minhag and its rationale, but what are the broad strokes?
Answer: In the Mishna Bruah Orach Chaim Simen 685 Seif Katan 13 says that you read the Haftorah for Parshas HaChodash and not for Rosh Chodash. Since you always read the haftorah that is connected to the last Torah Reading that was read.
Comment: When it's erev rosh chodesh, is the haftarah connected to the last Torah reading?
Comment: @magicked according to some rishonim, that haftarah about a multiday rosh chodesh is read on Shabbat on the 30th of the month and is indeed connected to maftir. Makes soooo much more sense than our practice
Answer: Shulchan Aruch Orach Chaim 685:4:

On the fifth Sabbath, which is the twenty-ninth of Adar, we take out two [Torah] scrolls — in one [the Reader] reads the weekly portion, and in the second he reads "This month shall be for you..." (Exodus 12:1) and the haftarah is "In the first [month], on the first of the month..." (Ezekiel 45:18)

So it's clear that even in a year such as 5781, on which Parashat HaChodesh falls on 29th Adar (Erev Rosh Chodesh Nissan), the haftarah contains Ezekiel 45:18.
(The custom to read this haftarah in conjunction with Parashat HaChodesh is ancient, already being found in a beraita quoted in Megillah 30a.)
The precise parts of this passage in Ezekiel which are to be read indeed differs between communities. Hebrew Wikipedia has a handy list:

Sefardim: 45:18 - 46:15
Ashkenazim: 45:16 - 46:18 (apart from the communities of Frankfurt and Poznan who read like the Sefardim)
Italians: 45:18 - 46:11
Yemenites: 45:9 - 46:11
Romaniotes: 45:21 - 46:10

This year (5781), because Parashat HaChodesh falls the day before Rosh Chodesh, Sefardim have the custom to add the first and last verses of the machar chodesh reading (I Samuel 20:18 and 42) at the end of the haftarah. (See here (Hebrew) from R. Mordechai Eliyahu, paragraph 15.)
Comment: Thank you!! I'm wondering what the origin of the Sephardi minhag is . . .
Comment: @KinnardHockenhull Shulchan Aruch OC 425:2 mentions the custom in the case of a two-day Rosh Chodesh (Shabbat and Sunday) to read the regular Rosh Chodesh haftarah on Shabbat, and to add the first and last verses of Machar Chodesh. So it's not much of a stretch to apply that to the case of Parashat Hachodesh on Erev Rosh Chodesh as well. I spent a little time looking for a good early source with reference to Parashat Hachodesh but was unsuccessful. If this aspect interests you, it could be worth asking as a separate question...
Comment: I'm trying figure out how to word the question.


how to reinstall ubuntu 18.10 default desktop

Question: due to an unknown reason my ubuntu desktop is gone, I have tried to re install it by issuing the command bellow:
sudo apt-get install ubuntu-gnome-desktop

surprisingly I got this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ubuntu-gnome-desktop : Depends: ubuntu-desktop but it is not going to be installed
                        Depends: gnome-session but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I have googled my issue and applied some of the suggested solutions but the problem still exists.
I have deleted all of the ppa packages. tried fixing broken packages, etc
All I want is to re install my ubuntu desktop and fix packages installed on my system.
the output of cat /etc/apt/sources.list is:
# deb cdrom:[Ubuntu 18.10 _Cosmic Cuttlefish_ - Release amd64 (20181017.3)]/ cosmic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic main restricted
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-updates main restricted
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic universe
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic universe
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-updates universe
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic multiverse
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic multiverse
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-updates multiverse
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-backports main restricted universe multiverse
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu cosmic partner
# deb-src http://archive.canonical.com/ubuntu cosmic partner

deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu cosmic-security main restricted
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-security universe
# deb-src http://security.ubuntu.com/ubuntu cosmic-security universe
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu cosmic-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
deb [arch=amd64] https://download.docker.com/linux/ubuntu cosmic stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu cosmic stable

by the way this is the output of lsb_release -a command:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:    18.10
Codename:   cosmic

Comment: What does `sudo apt update` return. What is the output of `cat /etc/apt/sources.list`?
Comment: it's `ubuntu-gnome-desktop`. ...ubuntu-desktop is for 17 and under (actually maybe only 16 and under)
Comment: the same problem, however I have updated my issue to reflect your suggestion
Comment: updated my question
Comment: According to [archive mirrors page](https://launchpad.net/ubuntu/+archivemirrors), update time of Host Iran is unknown. Try changing the server.
Answer: Since ubuntu 17.10 default desktop is gnome3 not longer unity.
sudo apt install --reinstall ubuntu-desktop gnome-shell


Hibernate Vs iBATIS

Question: For our new product re-engineering, we are in the process of selecting the best framework from Java. As the consideration is to go for database agnostic approach for model, we are working on options between Struts + Spring with iBATIS or Hibernate. Please advice which is best as both offer persistence.
Answer: iBATIS and Hibernate are quite different beasts.
The way I tend to look at it is this: Hibernate works better if your view is more object-centric. If however you view is more database-centric then iBATIS is a much stronger choice.
If you're in complete control of your schema and you don't have an extremely high throughput requirement then Hibernate can work quite well. The object model makes for fairly convenient code but at a huge complexity cost.
If you're dealing with a "legacy" database schema where you need to write fairly complicated SQL queries then chances are iBATIS will work better.
HQL (Hibernate Query Language) is another language you'll have to learn and even then you'll probably find cases where you still need to write SQL. What's more, chances are you will at some spend half a day figuring out the right combination of XML, properties, annotations, etc to get Hibernate to generate a performant SQL query.
There is no universal "A is better than B" answer for this question.
Comment: Now 2 years later, is this still true with the advent of jpa, hibernate has changed quite a bit and ibatis is now mybatis, im wondering what current thoughts of people out there are.
Comment: You have more clear control with mybatis, thus more dirty work. But I like mybatis personally.
Comment: The cost of understanding your application from a data-centric (aka SQL) stand-point is far more clearer and easier to understand than from an ORM standpoint. Remember, if it is easier to understand, it's always easier to maintain. Also, noticed that if you go down the ORM path way you still end up having to learn extensively about SQL & Entity Relationships etc. Cletus's comment about "huge complexity" is correct.
Comment: For a lightweight and tiny ORM with SQL builder check MentaBean: http://mentabean.soliveirajr.com
Comment: But it is good to consider one of JPA2.0  compliant JPA provider like Hibernatate, EclipseLink,Toplink, etc. for new webapplication development.
As Cletus pointed out iBatis is also good.
Comment: @cletus Is it still true?
Comment: False statements. You can map legacy database with JPA entities. HQL or JPQL is derived from SQL, easy to understand. Don't scare.
Answer: Consider what you're trying to achieve. Typically, the Command Query Response Segregation
model works well for complex domains.
The reason is that you're trying to do one of two things typically:

Create/Update/Delete some complex domain entities
Run analytic fetch queries (i.e. summation/aggregation queries)

Hibernate works well for case 1 allowing you to just make a POJO and persist/update it. It also does this quickly, unless your domain is quite large.
myBatis is great for fetch queries (case 2) where you just want an answer. Hibernate would attempt to load the entire object graph and you'd need to start tuning queries with LazyLoading tricks to keep it working on a large domain. Conversely if you just want some analytic POJO page, the myBatis implementation of the same query would be trivial.
Because of this, myBatis is faster than Hibernate at SELECTS.
These two cases are the difference between Commands where you want to change the domain data and Responses where you just want to fetch some data.
So, consider these two cases and what your application does. If you have a simple domain and just fetch information, use myBatis. If you have a complex domain and persist entities, use Hibernate. If you do both, consider a hybrid approach. That's what we use on our project that has thousands of entities to keep it under control. ;)
Answer: ORM vs persistence framework
Hibernate is object-relation mapping framework (ORM) which maps Java classes to database tables. MyBatis is persistence framework - not ORM. It maps SQL statements to Java methods.
Database schema
Hibernate can create or validate database schema according to your Java model while MyBatis does not have such feature. Also it is convenient for testing environment when you're using in-memory DB. Related discussions:

Can MyBatis create the database schema?

Cache
Hibernate has first level cache which is impossible to disable. It means that if you query item through ORM and then delete it directly with SQL, it stays in the cache. You can explicitly clear the cache to get the most updated results from database. Related discussions:

Do Jpa& Hibernate load data which changes asynchronously in DB?
What are First and Second Level caching in Hibernate?

Optimistic lock management
Also there are differences for optimistic lock management:

MyBatis doesn't support optimistic concurrency control natively,
  unlike ORM tools like Hibernate/JPA with the @Version annotation.

Related discussions:

Optimistic concurrency control
How to prevent concurrency issue in UPDATE via iBatis

Lazy loading
Hibernate will try to load entire object graph except objects which are marked for lazy loading. myBatis will load data according a SQL query. Lazy loading may improve performance but it may cause connection leaks if it used with
<property name="hibernate.enable_lazy_load_no_trans" value="true" />
properties. Related discussions:

org.hibernate.LazyInitializationException - could not initialize proxy - no Session
Solve Hibernate Lazy-Init issue with hibernate.enable_lazy_load_no_trans

Hibernate Session management
Entities operations like saving, updating or deleting are performed via Hibernate Session. It requires good understanding how to implement proper Hibernate Session management strategy to avoid detached entity passed to persist and other phenomenons related to Hibernate.
Sometimes it may take more time trying to understand underlying Hibernate behavior than add a little bit more work and write raw SQL statements for myBatis.
Cascading
Hibernate provides cascading, orphan removal and other features for object graphs while they not present in myBatis - to implement them you'll need to write SQL queries explicitly.
Queries
In myBatis you'll write almost plain SQL queries. Hibernate has multiple options to form query: SQL, HQL, Criteria API. Sometimes it may be suitable to use Criteria API when you have many optional fields in criteria. It would provide more structured approach to form query and maybe avoid related mistakes.
Comment: The best answer
Comment: MyBatis is a fork from iBATIS, and according to Wikipedia most of iBATIS' developers moved over to MyBatis too. The iBATIS project is currently marked as Inactive, therefore you should go with MyBatis for new projects and only use iBATIS if you're maintaining an existing project which already uses iBATIS
https://stackoverflow.com/questions/28535900/difference-between-ibatis-and-mybatis#:~:text=MyBatis%20is%20a%20fork%20from,project%20which%20already%20uses%20iBATIS.
Answer: Cletus did a great job at summarizing this comparison. Hibernate works well when you control the data model and is more object-centric while iBATIS works well when you need to integrate with an existing database and is more data-centric.
Also I think that Hibernate has a bit more of learning curve. With iBATIS, it's pretty easy to know what is going on while more "magic" happens with Hibernate. In other words, newbies might find iBatis easier to use and to understand.
But I'm not saying that you should prefer iBatis, iBatis and Hibernate are just different as said above.
And by the way, if you go for Hibernate, maybe consider using standardized JPA and EJB 3.0 (JSR-220) object/relational mapping annotations provided by Hibernate Annotations.
Answer: Hibernate is an ORM, meaning (at its most basic level) it maps instances of java objects to actual rows in a database table. Generally, for pojo's retrieved via Hibernate: any manipulations and modifications to these pojo's will appear in the database. Hibernate will generate and execute the relevant SQL at an appropriate time.
Mybatis (at its most basic level) is simply a tool for piecing together and executing SQL that is stored in xml files. It does not map instances of Java objects to rows in a database table, rather it maps Java methods to SQL statements, and therefore it is not an ORM. It can also return pojo's of course, but they are not tied to any kind of a persistence context.
Both tools do a lot more than described above, but one is an ORM and one is not.
The criteria to enable you to choose which one to use, I believe, depends critically on the database model you have to work with.
For example imagine a large sprawling schema, representing some insurance model. Developers are required to retrieve
data, and interact with that data in a way that meets the business at hand.
Developer's come on go, and would never be expected to have the requisite business knowledge to write all
the sql by hand (which Mybatis would require). Hibernate would suit a scenario like that.
Business analysts define the datamodel, the entities, the relationships and the interactions, as is their expertise.
Java developer's then use Hibernate to "walk the model". The business developer's can become very productive
quickly without the need to write complicated error prone sql to run on a very complicated schema.
In my expierence, both Hibernate and Mybatis are used regularly on the same project.
Where Hibernate is being used for

General C.R.U.D functionality
'Walking' the 'domain object' relational model
Session management

and where Mybatis is being used for

ad hoc queries
kick off (and interact with) stored procedures
support very specific or intricate queries
support complicated search queries, where search criteria is dynamic, and paging of results
Answer: if you're already using Spring, I would start with Spring JDBC rather than plunging right into Hibernate or iBatis.  If you write your persistence tier in terms of interfaces, you should have no problem switching implementations after you've gotten Hibernate or iBatis under your belt.
There's no reason why it has to be an "all or none" decision.  Use what's best for your situation.
Comment: Spring JDBC is vastly inferior to Ibatis. For one thing you either have to write row mappers (tedious) or Spring's bean mapping is incredibly slow. That doesn't matter if you're binding a form in Spring MVC but it sure does if you're returning thousands of rows. I cut down execution timeon a query from 50+ seconds to <2 just by replacing Spring's bean mapping in Spring JDBC with an explicit row mapper but who wants to write those?

Hibernate Vs iBATIS