Why Add button in EFS doesn't exists?

Question: I am trying to enable EFS on a folder and add some others users to access it too. but the Add button doesn't exist on the place it should be. I want to know what is the reason for that ?
Answer: You can add a user/key to a single encrypted file only, not on a entire directory. This depend on how EFS works. So, the "add" button will be present only when editing single file properties.
Comment: That's kind of disappointing for EFS. Do you know a way to do such a thing on a directory ?
btw, thank you @shodanshok.
Comment: Unfortunately, no workaround exist for apply directory-wide encryption policies with EFS.
Answer: You can use the following command to add a user to a directory:
<code> cipher ".\YourFolder" /adduser Dom\TestUser /s
</code>

Why Add button in EFS doesn't exists?


Is the code permanance spectrum real?

Question: I read in a data science book that there is the concept of a code permanence spectrum. If your code is low on the permanence spectrum the code is ad-hoc/throw away work. I work mostly as a scientist where the code is my tool for doing analysis. However, I've noticed from studying some of my colleague's code that there are many reusable components and that writing in sufficient abstraction does provide some generic reusability. I'm wondering what a computer scientist's perspective (and a software architect's) perspective is with respect to the notion of code permanence spectrum?
Comment: If you're reading _Scala for Data Science_, that term appears exactly twice in the whole book, and one of them is in the index.  The great search engine in the sky doesn't seem able to find that phrase anywhere else.
Comment: A more common term for the fancy "low on the permanence spectrum" would be "quick and dirty" . And it describes more of an intend at the time of writing then an actual trait. The funny thing is, in reality few things are as permanent as temporary solutions.
Comment: What you are talking about sounds a lot like Abstractness in [Abstractness vs. Instability](https://stackoverflow.com/questions/1031135/what-is-abstractness-vs-instability-graph) metric.
Answer: Apparently unique terminology notwithstanding (as per above comments), reusability is certainly a valuable design consideration in pretty much every development effort. Whenever possible, and as much as feasible, you should decompose an application into functional components whose external input/output behavior is abstractly meaningful, succinct, and likely reusable.
Take the C library function strcpy(target,source) as an example. If it didn't exist, and you came across a situation where you needed to copy a string, you could accomplish that several ways. Right at the point where you needed it, you could just write a little loop. Fine and dandy, and you're all done. Alternatively, you could say to yourself, "I've had to do this sort of thing many times before. Maybe I should take a few more minutes and write a separate function that encapsulates the general idea. Then next time I need it, no more little loops. Just call that function and I'm done."
For simple and straightforward and obviously-reusable functions like strcpy(), its abstraction as a separate function doesn't take much intellectual insight. However, it sometimes takes great insight to factor a large and complicated application in such a way that its decomposition maximizes the reusability and simplicity of its functional components. So that's a definitely worthwhile and challenging task, which can also be very satisfying when successfully accomplished.
And in my personal experience, despite investing time and effort, I've never completely successfully accomplished it in the first release of any non-trivial project. In other words, given the opportunity to go back and do it again, I'd do it at least slightly differently, and sometimes very differently. And I sometimes have had those opportunities, usually when new or modified functionality is requested. Whenever time/budget's available, I try to add ~15% overhead to improved re-design/coding.
And changed functionality frequently reveals better decomposition that hadn't been originally evident (at least not to me). Perhaps it's analogous to cutting up a picture into a jigsaw puzzle, in such a way so that many identical copies from a small number of different pieces can reconstruct the entire picture. Then, if somebody adds or changes a little of the picture, your optimal selection of jigsaw pieces is likely to change in some corresponding way.
Answer: Speaking from a development point of view, it is well understood that code is sometimes written in a quick and dirty way to get something working. At the other extreme is well designed, well written code that reaches a level of maturity over a period of time.
IMHO, these extremes do not a spectrum make. What appears (at first glance) to be throw away code run in an ad hoc manner may have been refined a large number of times. While what appears to be a mature software product may contain some relatively untested, unrefactored, duplicated code that could be improved vastly given some time and effort.
The concept has some merit, but I feel it vastly over simplifies what goes on in the real world. Furthermore, from a development point of view, even if there was a spectrum, knowing where the software sat on it (this itself, being highly subjective) is a bagatelle compared to other concerns.
Comment: I think this is pretty good analysis but I think this might be a decent concept for communication.  Sometimes developers will spend inordinate amounts of time trying to build a reusable solution when we need something quick to bridge the gap between solutions.  Other times, I've seen things slapped together when something robust was needed.  It's subjective but it might help everyone on a team understand what the plan is.

Is the code permanance spectrum real?


Rotate group of duplicate bones in edit mode

Question: This is the  first time rigging anything in Blender. I'm attempting to rig a spider. I have created a set of 6 bones for one leg. Now I simply want to duplicate those bones and place and rotate them about 20 degrees over the next leg. I can duplicate the bones and translate them, but I can't figure out how to rotate them as a unit to align them with the next leg without destroying their relative alignment and positions to one another. I'm looking for a shortcut to rigging each leg. Is this possible?
Answer: I think I've worked out a solution. I duplicate the bones then separate them into a new armature. I can then rotate the the armature in object mode. I then combine the separate armatures back into one.
Comment: Find on yoitube some basic tutorial how to rotate and translate objects in blender. With no such skills you maybe finish the legs of your spider, but you couldn't make it dance.
Comment: While your answer works, it's a little cumbersome.  Try the "3D Cursor" pivot from the bar on top of or below the 3D viewport, place a cursor using the cursor tool or via shift-s snap menu, and then rotate your selection in edit mode.


Is the Super Dragon Ball Heroes special part of the Super Dragon Ball Heroes anime story?

Question: I'm watching a "Super Dragon Ball Heroes special" and it has the size of a Dragon Ball Super Heroes anime episode, but it has 2 characters that doesnt appear in the anime, a fight between Gogeta and Vegito (I dont think this fit at all in the anime) and a videogame-like format, after one fight a "K.O.!" sign appears. Is the Super Dragon Ball Heroes special part of the Super Dragon Ball Heroes anime story?
Answer: Super Dragon Ball Heroes is an fan-made anime going with great popularity and anything can happen in fan-made animation. Although the release date of Dragon Ball Super 2 is not known yet but if you can read the manga for that if you are excited for that. Current arc if of Goku UI vs Moro is going on in that manga.
Comment: hmmm, it's not fan made, it's produced by Toei.
Comment: Actually, yeah it's not a completely fan-made, it's like a promotional anime series. It's like a series of how the Dragon Ball GT goes. There will be no connection b/w dragon ball super 2 and the super dragon ball heroes when the new season of that will come. But yeah It's fun watching Super Dragon Ball Heroes though.
Comment: Hi, just for your information, you can always [edit] your own post to improve it or fix incorrect info :) I don't think it's fan-made since it's official (probably not canonical, but still licensed).
Answer: "K.O.!" sign appears like a video game because it is promotional anime to promote dragon ball heroes game and cards. According to Wikipedia,

Super Dragon Ball Heroes is a Japanese original net animation and promotional anime series for card and video games of the same name. Similar to Dragon Ball GT, it is a manga-inspired installment of the Dragon Ball media franchise, created by Toei Animation instead of franchise creator Akira Toriyama. It premiered on July 1, 2018. Super Dragon Ball Heroes is presented with several alternate scenarios and possible outcomes within the franchise, taking place after the events of Dragon Ball Super.
In May 2018, V Jump announced a promotional anime for Super Dragon Ball Heroes that will adapt the game's Prison Planet arc. A teaser trailer for the first episode was released on June 21, 2018, and shows the new characters Fu and Cumber, the evil Saiyan. The first episode was shown at Aeon Lake Town, a shopping mall in Koshigaya, Saitama, on July 1, 2018, and was uploaded to the game's official website that same day. Likewise, the second episode was shown at Jump Victory Carnival Tokyo Kaijō on July 16, 2018, before being uploaded to the website.


Plug molding rated at 15 amps, for kitchen it should be 20 amps

Question: All Legrand plug molding is rated at 15 amps yet kitchen circuits are 20 amp with 12 guage wire.
How do I make this work. Connections inside plug mold need to be "butt type" as there is no room
for wire nuts.
Comment: Can you add  few pictures showing what you're trying to do?
Comment: I would verify the wire size. If it is wired with #12 wire 2 or more receptacles are allowed to be on a 20 amp circuit. I have been asked to install wire mold (same thing) and the inspector was fine with it I believe 1' was considered 1 outlet and the overhang in the counter could not be more than 6" , I talked him into also installing receptacles in the wall for resale and he was really happy with that when he got his stand up wheel chair.  wiremold of any brand that is listed can be used but remember 2 circuits are required in a kitchen.
Comment: Are you saying the Plugmold uses 15A sockets, or that the Plugmold you have is wired using 14AWG?
Answer: The fact of the sockets being 15A (common) instead of 20A (T-neutral) is nothing to worry about.
15A receptacles are allowed on 20A circuits, per NEC 210.21, provided there are 2 or more sockets. I mean sockets not receptacles: The common-as-dirt 2-socket receptacle is 2 sockets.
Interestingly, a Wiremold outlet strip counts as 1 receptacle even though it has like 20 sockets or something... not relevant to a kitchen, but some places in Code (and for houses in some local Codes) you must provision 180VA per receptacle and/or have an 8- or 12-receptacle limit per circuit.  So those plug strips are a fun "cheat" to get a bunch of sockets.
This only becomes an issue if you are trying to plug in an appliance that has a sideways neutral... and when's the last time you've seen one of those?
Comment: I thought the 180VA requirement in 220.14(I) didn't apply Dwelling Units in 220.14(J). Is there someplace else that specifies 180VA?
Comment: @NoSparksPlease Well, some localities bring it in... but you're right generally.
Answer: According to the Legrand spec sheet they have lots of variants available, including 12 AWG or 14 AWG, and including alternating receptacles between two circuits. So if you get the right stuff then there is no problem satisfying both the 20 A rule (by using 12 AWG wire and connecting to 20 A breakers) and the 2 circuit rule. Of course, you may have additional circuits elsewhere in the kitchen and use Legrand for just one, etc. - the possibilities are endless. But stick with 12 AWG and you're good.


Change set - Permission Set - Object and field permissions missing

Question: When I bring a number of change sets over from one org to another I find that only the user permissions are contained within the XML. How can I ensure the object and field permissions metadata is included as well?
Comment: Are you including the user profiles in the change sets?
Comment: can you explain a bit briefly about change sets over from one org to another.@EmilioSandoz
Comment: they let you push salesforce configuration data from one org to another
Answer: You need to include the objects, classes etc in the change set as well. This is the trigger for salesforce to include the object permissions, field level security, record type perms etc in the profile or perm sets. The rub however, is that this will deploy your objects etc even when you have don't want to do that. So, be very careful about doing this using change sets. You can do the same using other tools like Force.com IDE, ANT. These are developer focused tools. So, proceed appropriately.
There are vendors that publish tools to accomplish this stuff without too much difficulty, like the company I work for, DreamFactory.
Comment: Thanks  - luckily the use case was only for field information was able to include those without too much pain.
Comment: What if the object is a standard object?


Example of a non complete normed vector space.

Question: As we known, Banach spaces are normed vector spaces where Cauchy sequences converge. Can someone  give me some examples of  vector spaces, with a defined norm, which are not complete?
Comment: Compactly supported continuous functions on $\mathbb R$ with respect to sup norm.
Answer: As a Functional Analysis example, consider the space $X=C^0([0,1])$, the space of the continuous functions on the interval $[0,1]$. Consider the norm $\|\cdot\|_2$ on $X$ defined by
$$
\|f\|_2=\left(\int_0^1|f(t)|^2\, dt\right)^{1/2}.
$$
Then $(X,\|\cdot\|_2)$ is not complete. In fact, you can find a $\|\cdot\|_2$-Cauchy sequence which would converge to a discountinuous function (hence to something outside $X$). For example you can approximate (in the sense of the norm $\|\cdot\|_2$) the step function with jump at $1/2$ by menas of continuous functions. This would not be possible in the sense of the norm $\|\cdot\|_\infty$! After all, $(X,\|\cdot\|_\infty)$ is a complete normed space.
Comment: @RafaelRojas. Consider the continuous functions $f_n$ equal to 0 in the interval $[0,1/2-2^{-n}]$, equal to 1 in $[1/2+2^{-n},1]$, and  linearly interpolated in $[1/2-2^{-n},1/2+2^{-n}]$. It is a direct calculation to prove that $\|f_n-f_m\|_2\leq 2^{-n} $ for any $m\geq n$. So the sequence is Cauchy in $X$. At the same time it is easy to show that $\|f-f_n\|_2\to 0$, where $f\notin X$ is the step function equal to 0 in $[0,1/2]$ and to 1 in $[1/2,1]$. From this it follows that $f_n$ has not limit in $X$: any continuous function has a positive $\|\cdot\|$-distance from $f$.
Comment: nice answer, could you give a formal proof ?
Answer: The rationals $\Bbb Q$ form a field, which is thus a vector space over itself.  They inherit a norm from $\Bbb R$, but are not complete with respect to this norm. (Construct a sequence which seems to converge to an irrational number.)
Comment: But the vector space of $\mathbb{Q}$ over $\mathbb{Q}$ is not a **normed** vector space. The definition of normed vector space requires a vector space over $\mathbb{R}$ or $\mathbb{C}$ from the outset.
Comment: If you're gonna be pedantic, rationals don't inherent from the reals it's norm but rather the real norm comes from the rationals as it is constructed from the rational norm.
Comment: why can't you have a vector space over $\mathbb{Q}$? The rationals are a field. Can you not have vector spaces over any field?
Comment: @william_grisaitis Yes, but by definition **normed** vector spaces are over $\mathbb{R}$ or $\mathbb{C}$, at least that's what every functional analysis textbook I've read says.
Answer: Consider $V=C([0,1])$, the space of continuous real functions over $[0,1]$ with the norm
$$
\|f\|=\int_0^1 |f(x)|\,dx
$$
Its completion is the space $L^1([0,1])$, the space of Lebesgue-integrable function modulo the subspace of functions that are $0$ almost everywhere.
It should be easy for you to find a Cauchy sequence in $V$ that does not converge.
Comment: @OGC No, they aren't continuous on $[0,1]$
Comment: Sorry, I think it's $f_{n} = x^{n}$. I guess the trick here is to use step functions
Comment: @OGC That's right
Comment: Sorry for the same choice of $C([0,1])$!
Comment: @guestDiego The OP didn't ask for a prehilbert space that's not Hilbert. `;-)`
Comment: Would a Cauchy sequence of $\frac{1}{x^{n}}$ work in your example?
Answer: The other two answers are the first that came to my mind as well. You may already know this, but every finite dimensional normed vector space is complete. Hence, any counter-example will have to be something with an infinite dimensional vector space.
there are two basic considerations for vector spaces:

Some Abelian group structure on the vectors $+: V\times V \to V$
Scalar multiplication $(\cdot) : F \times V \to V$.

A norm on a vector space induces a metric topology, and what needs to happen is $\|\cdot\|$ should be continuous, and the aforementioned requirements are functions $(+,(\cdot))$ are continuous as well. Basically, the norm has to agree with the linear structure of the space in question. So, in this sense you can imagine that if you randomly choose a norm space, it is unlikely to be complete.
(But also, note that every norm on a finite dimensional vector space induces the same metric topology.)
On the other hand, every norm vector space sits densely inside of a Banach (complete) space with the same norm! This is done by just considering the completion of the vector space. For example, let $\phi([-1,1])$ and $P([-1,1])$ be the space of step functions and polynomials with some $L^p$ norm. Then:
$$\phi([-1,1]) \subseteq P([-1,1]) \subseteq C([-1,1]) \subseteq L^p([-1,1]).$$
In fact, each is a dense subspace of the next, so they all sit densely inside $L^p([-1,1])$.
Comment: So, when a vector space, $V$ is non-Banach, this is because we can have Cauchy sequences that converge to something that's in $W$ where $V$ is a subspace of $W$, right? Its not that we can find some Cauchy sequence that just goes crazy and doesn't converge to anything?
Answer: The space of polynomials over the field of real numbers is not a Banach space. For details, see the following questions.  Note that the norms are different.
Proving that $P[0, 1]$, the space of all polynomials on $[0, 1]$ is not complete.
The Space of Polynomials is Incomplete with Respect to the Summed Coeffcient Norm


flowchart best practices

Question: Could some one point to articles / books on how to create good flow chart diagrams?
Comment: what kind of flowcharts? program flow, user-interaction, plumbing, networking?
Answer: BoUML-it's free!
I've used this open source tool for the last 6 months at work to create UML diagrams:
bouml.free.fr/
I've used it on both a Macbook running OS X, as well as Ubuntu Linux on a desktop, both with success. It also does codegen (although I haven't used this feature myself). If you create a diagram from within BoUML, you can right click ->Tools->HTML etc,etc., and it and actually generate the diagram --  this will create a whole tree of html, css, etc., and include a .png file which you can later choose to import into a Word-like document.
If you're new to UML, and would like to explore that route, I suggest UML Distilled by Martin Fowler as a way to quickly ramp up. I still use this as a reference when I'm putting diagrams together and I forget some syntactical detail ;) The nice thing about UML is that most programmers will understand it. If you don't want to buy a book you can, of course, Google 'UML tutorial' and get a slew of free info.
Non-UML:
You can also use open office's draw application to do some simple flow charting. It has some nice non-uml shapes, so if you're not trying to be 'strict' in the sense of conforming to UML, and just want a simple flow chart, that may be a good choice.
Answer: Check this one out:
http://drakon-editor.sourceforge.net/DRAKON.pdf
Answer: Tutorial here.
Also get a copy of Microsoft Visio.

flowchart best practices


How to calculate the phase difference between two squarewaves of same frequency but different dutycycle?

Question: I have two squarewaves of the same frequency but with different dutycycle. How can I calculate the phase difference between the two?
I know that for sinewaves one can use the correlation coefficient, but I am not sure how to do it with squarewaves, especially if the duty cycle is different.
I was thinking maybe it is possible by calculating the area under the product of the two waves, which is basically the correlation coefficient, but how is the phase difference related to that?
Comment: There is no such thing. Both square waves have a harmonic spectrum and each spectral line will have a different phase (and amplitude) difference. There is no single number you could meaningfully define as "the phase difference".
Comment: @Hilmar someone can identify the phase of the fundamental as being the reference phase for each square wave.
Answer: If I were to define the reference phase of a square wave with different duty cycles (PWM), it would be like this.  First I would define this PWM square wave as an even-symmetry function:
$$ x(t) \triangleq \begin{cases}
1 - K_\mathrm{d} \qquad & |t|<\frac{K_\mathrm{d}P}{2} \\
\\
-K_\mathrm{d} \qquad & \frac{K_\mathrm{d}P}{2}<|t|<\frac{P}{2} \\
\\
x\big(t-\left\lfloor\frac{t}{P}+\frac12\right\rfloor P\big) \qquad & |t|>\frac{P}{2} \\
\end{cases} $$
$x(t+P)=x(t) \quad \forall t$ is periodic with fundamental frequency $\frac1P$ and $0<K_\mathrm{d}<1$ is the duty cycle.  Because this is an even function (or $x(-t)=x(t)$), then only the cosine terms remain in the Fourier series.
Then phase aligning two of these square waves, with the same period $P$ but possibly different $K_\mathrm{d}$ can be well defined with cross-correlating the two and looking for the maximum lag.  After thinking about this, there could be flat spots in the result of cross-correlation, so pick the middle of the flat peak as the "maximum" lag.  Then that lag is normalized by $P$ and you have a relative phase.
Answer: This can be done with two flip flops and an xor gate (followed by an RC low pass filter). An XOR gate can be used as a multiplier of hard-limited sinusoids (square waves), which is ideal for producing a linear voltage versus phase response (phase detector), that is unique from 0 to 180 degrees.
Here specifically phase is used as an alternative to the time delay between the two waveforms, converting time delay to phase using:
$$\theta = 2\pi f \tau$$
Where $f = 1/T$ as the frequency of the square wave, and $T$ as the period.

Each flip flip is used as a frequency divider, thus ensuring a 50% duty cycle as needed for the accurate phase measurement. Since we are dividing by two, the phase between the resulting 50% duty cycle square waves at half the original frequency will also be divided by two, so the result will be a voltage that is directly proportional to the phase divided by two.

In all digital implementations, Time Interval Counters can be used when a higher frequency reference clock is available. The rising edge of the first signal starts the counter, and the rising edge of the second signal stops the counter, providing a count proportional to the time delay (which is related to the phase as provided above).
Comment: So it's the phase difference of the half-frequency waveforms?
Comment: @robertbristow-johnson Right, the time difference is the same but the period is twice as long so the computed phase is half.  This is consistent with when we go the other way, frequency multiplication, from $2\cos(2\pi f t + \phi)^2 = 1 + \cos(2\pi 2f t + 2\phi)$: in a frequency doubler, we double the frequency but also double the phase.


Abstract-only presentation - How does it work?

Question: I submitted an abstract for presentation in an international conference. The paper was accepted, but with a caveat. The organizers replied me that it is an abstract-only presentation. Please what do I do?
Comment: Welcome on academia.SE. I took the liberty to remove your signature, since this is not customary on the site. Could you please clarify your question? For example, do you want to know what is expected form you in an abstract-only presentation?
Comment: What field is this?
Comment: Manufacturing Engineering
Comment: What is exactly your problem with presenting your abstract at the conference?
Comment: Did you ask the organizers?
Answer: You go and present a talk. No paper will be published in the proceedings. If proceedings are published at all for this conference, your abstract will probably be published therein. This is a pretty common conference format in many engineering disciplines. You should take any review feedback, apply it to your article, and find a journal to send it to. If there is a distinction between published papers and abstracts at this conference, you should think about beefing up the paper before you send it to a journal.
Comment: I already have the complete paper
Answer: I don't think there's a problem with an abstract-only presentation. Possibly the caveat is to remind you that only your abstract will be published in the conference proceedings, and not the full paper. This would work well for you as you can take the feedback at the conference and use it to improve your study. Moreover, for conference papers to be published in a journal, you need to have at least 30 percent new material (field specific); however, in your case, since you'll be presenting only the abstract at the conference, you don't need to think about these things.


What does the L returned from passwd --status mean

Question: I was checking my password status and noticed that instead of NP or P there was a L returned so i checked the man pages and found it was a locked password could someone explain what this is to me?
Answer: From the passwd manual on an Ubuntu system:

-S, --status
Display account status information. The status information consists of 7 fields. The first field is
             the user's login name. The second field indicates if the user account has a locked password (L), has
             no password (NP), or has a usable password (P). [...]

Getting L back from passwd --status hence means that the user's password has previously been locked with passwd --lock:

-l, --lock
Lock the password of the named account. This option disables a password by changing it to a value
             which matches no possible encrypted value (it adds a ! at the beginning of the password).
Note that this does not disable the account. The user may still be able to login using another
             authentication token (e.g. an SSH key). To disable the account, administrators should use usermod --expiredate 1 (this set the account's expire date to Jan 2, 1970).
Users with a locked password are not allowed to change their password.

This means that an account with a locked password still has the old password associated with it, but in a disable form (it's invalid).  The user may still log in through other means that do not involve using this password (e.g. through SSH with key authentication).  If an administrator unlocks the password, the old password is then again usable for logins.
Comment: So basically it removes a password from the account?
Comment: @Joe the password is usually still there (so you can unlock it later without having to set a password). This just prevents password-based login.
Comment: @Joe No, it invalidates it so that it can't be used. An administrator can then unlock the password so that the user may use it again. I have tried to clarified this in the answer now.
Comment: Thank you i believe i understand now
Answer: From the manual page of passwd:

-S, --status
Display account status information. The status information consists of 7 fields. The first field is the user's login name. The second field indicates if the user account has a locked password (L), has no password (NP), or has a usable password (P). The third field gives the date of the last password change. The next four fields are the minimum age, maximum age, warning period, and inactivity period for the password. These ages are expressed in days.

L indicates the account is locked.  If the other fields are blank, that implies that the account has no date of the last password change, minimum age, maximum age, et cetera.


Optimum memory split for a RasPi 2 streaming movies

Question: What's the optimum memory split for a Raspberry Pi 2 with 1 GB of RAM streaming movies.
Answer: This, unfortunately, isn't an easily answerable question. 'Optimal' depends to varying extents on what format your movies are in (i.e. how difficult the decoding is), what software you're using to receive your streams, what resolution your display is, what else you might be doing while streaming your movies, whether there are other clients streaming from the Pi, etc etc etc.

Start with a high CPU/low GPU balance.
Check your video playback
performance.  If it's not what it should be, decrease CPU and
increase GPU.
Repeat until you arrive at a split you're happy with.


MATLAB: Taking sample with same number of values from each class

Question: I have a full dataset of lets say 50000 observations which are assigned to 16 classes.
I now want to draw a Sample of let's say 70% of the full data, but I want MATLAB to take the same number of samples from each class (if possible of course, because some classes have less numbers than needed)
Is there a MATLAB function that can do this, or do I have to program a new one for myself? I'm just trying to save time here.
I found cvpartition, but as far as I know this can be used only to take a sample with the same distribution over the classes as the original dataset and not a uniformly distributed sample.
Thank you for your help!
Comment: For the small groups you may want to sample each value more than once. At least this will get you an equal amount of observations per group.
Comment: possible duplicate of [Load all the images from a directory](http://stackoverflow.com/questions/15655177/load-all-the-images-from-a-directory)
Answer: It shouldn't be too hard. Let's say that the observations are in a vector observations. Then you can do
fraction = 0.7;

classes = unique(observations);
nObs = length(observations);
nClasses = length(classes);
nSamples = round(nObs * fraction / nClasses);

for ii = 1:nClasses
    idx = observations == classes(ii);
    samples((ii-1)*nSamples+1:ii*nSamples) = randsample(observations(idx), nSamples);
end

Now samples is a vector of length nClasses * nsamples that contains your sampled observations, with an equal number from each class.
At the moment it will fail if one of the classes doesn't contain at least nSamples observations. The simplest fix is to add the additional arguments 'replace','true' to the call to randsample, which will tell it to replace each observation after being picked.
Comment: Thank you, saves me some thinking time :-) I just thought maybe there is a builtin Matlab function that can do that....BR, Mischa


How can I erase other versions of Ubuntu (backtrack, studio 10.04) from my computer's HD and boot selection.

Question: I have 4 choices for OS's, 3 on first boot screen (Winows 7, Backtrack 5, and Ubuntu Studio 10.04). Backtrack and Studio are problematic and I wish to erase all traces of them but leave my Windows 7 and Ubuntu 12.xx wubi intact. What is the best way to go about this? Thanks!
Comment: I guess you have all this on one partition?
Comment: Yes, all on one 2 TB HDD.
Comment: In the future please give every OS his own partition. When I set up Ubuntu I take one partition for the system (let's say 40GB), one for home(the largest slice for all my stuff), and a swap partition that only needs 4GB (depends on your RAM). You have 2TB of space... that's a lot. You should play by the term: Devide et impera ... you probably know what it means. :)
Answer: This is a little awkward. One way could be to erase all files that belong to Backtrack and Studio...and than also modify grub to delete that two options.
Probably better way would be to try out that OS Uninstaller software.
https://help.ubuntu.com/community/OS-Uninstaller
Be careful from where you run it. I recommend you to use live system for that.


When to use 'uses' and 'usage'

Question: I find the words 'uses' and 'usage' confusing. Most of the times, I fail to use them correctly. Can someone please tell me when to use them. Thank you.
Comment: Hi @Kirti, can you explain what you think is the same or different about them, and how you are confused?  As the question stands, it looks like checking a dictionary would resolve your issue.
Answer: usage is a noun, and use besides being a noun, it's also a verb. (When you use something, it's for you to employ it in some purpose. The usage is the customary way of doing something.) For instance,

I often use a pan to cook.
I often usage a pan to cook.
  The daily usage that you give to that pan is perfect.
Comment: Meanings, please?

When to use 'uses' and 'usage'


The infimum and supremum of a set containing rational numbers whose squares satisfies a certain property.

Question: Find the infimum,supremum,maximum and minimum of the following set or prove non existence:
$$E = \{\frac{p}{q} \in \mathbb{Q}: p^{2} < 2q^{2}, p,q >0 \}.$$
This question is solved in the following:

But I did not understand why he said that $\omega$ (as he defined in the second picture) is a rational number, Could anyone explain this for me?
Comment: There are simpler shorter proofs. See Heron's (Hero's) Fomula for square roots, for example. And a little bit of Number Theory makes proving that $\sqrt 2$ is irrational rather easy.
Comment: $[ x]$ is being used to denote the floor function, which returns the largest integer that is smaller than $x$.
Comment: Please see https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference for help with typesetting; posting screenshots or pictures of math is generally considered poor form.
Comment: I am so sorry @erfink .
Comment: No worries, just for future reference =) https://math.meta.stackexchange.com/questions/13677/what-should-i-do-when-i-see-a-pic-question for more discussion
Answer: I think that $[{}\cdot {}]$, as it appears in the first numerator in the definition of $w$, is the floor function (also called the greatest integer function). That makes $[(n+1)s]$ an integer (the greatest integer $m$ such that $m \leq [(n+1)s]$, by definition), so all numerators and denominators in the definition of $w$ are integers, which makes $w$ rational.
Comment: Ahh, ok. So it's not specifically rounding _down_ like the floor function does, but rather just rounding to the closest integer. No matter, $[(n+1)s]$ is still an integer.
Comment: it is the step(Dirichlet) function.
Comment: @MathLover When I google "Dirichlet function", I get something _entirely_ different, and the step function is just $0$ for negative input and $1$ for positive input, so I don't think that's what's used here either. What function do you mean, explicitly?
Comment: my mother tongue is not English,may be I said the name wrong sorry, but this function means to take the integer value that is nearer to your number, this what I understand.
Comment: yeah Thank u  :), but how can we find the nearer integer for the product of an integer $(n+1)$ and a number that we do not know if it is an integer or no which is s?
Comment: Needs to be the floor so we know that s < w < s + 1/n  if we round up we could have w > s + 1/(n+1) and we could have w >= s + 1/n.  Bur if we round *down* we *will* have s < w <= s + 1/(n+1) < s + 1/n.  But both ways w must be rational.
Comment: We don't have to find a number in order to talk about it; that's why they write it using the rounding function. What you're asking is like asking how we can find $s$ when we don't know whether it's a rational or an irrational number. The answer is we don't; we know the number exists, we know some of the properties it has, and we attach a name to it. In the latter case, that name is $s$, and in the former case, that name is $[(n+1)s]$, which is a bit longer because it is not just a name, it _contains a description_ of the aforementioned properties, but it is still as valid as a single letter.
Comment: For every real number $x$ there is a unique integer, $k$ so that $k \le x < k+1$.  That is true for all real numbers.  We notate $k$ as $[x]$.  so for $(n+1)s$ there is a unique integer $k$ so that $k \le (n+1)s < k + 1$.  We denote that integer as $k = [(n+1)s]$.
Answer: Another way to approach, e.g., the question of what the maximum is in this set: You are searching for rational numbers $p/q$ with both $p, q > 0$ for which $p^2 < 2q^2$. The last inequality is equivalent to $(p/q)^2 < 2$, which, in turn, is equivalent to $p/q < \sqrt{2}$.
So, you are trying to find the maximum rational $p/q$ that is less than $\sqrt{2}$; but clearly this does not exist, for you can take a rational sequence that is monotonically increasing and converges to $\sqrt{2} \not\in \mathbb{Q}$, which means that for any rational less than $\sqrt{2}$ you can go far out enough in this sequence to find an even greater rational that is still less than $\sqrt{2}$.
A concrete example of such a sequence can be found by looking at the decimal expansion of $\sqrt{2}$:
$$\sqrt{2} = 1.414213\ldots$$
Next, use rationals of the form "natural number" over "power of ten" corresponding to the above:
$$1/1, 14/10, 141/100, 1414/1000, 14142/10000, 141421/100000, 1414213/1000000, \ldots$$
Using this monotonically increasing sequence that converges to $\sqrt{2}$, we find that the maximum of the given set does not exist.


Moving polygons to points using ArcPy

Question: I have a large number of polygons with matching points. I wish to move each respective polygon to its corresponding point (see attached image). I can't use the 'Move To' tool in the 'Editor', as I have too many polygons and points for this to be viable.
Is there a way to do this with ArcPy?
Answer: I assume you have some common id to link each polygon to Point. Then you can read each id and point xy coordinates as a Dictionary using da.SearchCursor. Then use the Dictionary with da.UpdateCursor to move polygons:
import arcpy

arcpy.env.workspace = r'C:\Default.gdb'
polys = 'areas'
points = 'areas_FeatureToPoint'
common_id_column = 'idcolumn'

d =  {idval:centroidxy for idval,centroidxy in arcpy.da.SearchCursor(points, [common_id_column,'SHAPE@XY'])} #Store Point id and centroid coordinates in a dictionary

with arcpy.da.UpdateCursor(polys,[common_id_column,'SHAPE@XY']) as cursor:
    for row in cursor:
        if row[0] in d:
            row[1] = d[row[0]]
            cursor.updateRow(row)
        else:
            print "Could not find polygon with point id {0}".format(row[0])

Answer: A starting point in arcpy could be this script, it overwrites the centroid of the polygon:
https://arcpy.wordpress.com/2012/11/15/shifting-features/
import arcpy

def shift_features(in_features, x_shift=None, y_shift=None):
    """
    Shifts features by an x and/or y value. The shift values are in
    the units of the in_features coordinate system.

    Parameters:
    in_features: string
        An existing feature class or feature layer.  If using a
        feature layer with a selection, only the selected features
        will be modified.

    x_shift: float
        The distance the x coordinates will be shifted.

    y_shift: float
        The distance the y coordinates will be shifted.
    """

    with arcpy.da.UpdateCursor(in_features, ['SHAPE@XY']) as cursor:
        for row in cursor:
            cursor.updateRow([[row[0][0] + (x_shift or 0),
                               row[0][1] + (y_shift or 0)]])

    return

If you have a equal ID field in the points and polygons features you could maybe rewrite the updateRow of the centroid like this:
def shiftPoly(inPoints, inFcS, inFcSL):

    arcpy.MakeFeatureLayer_management(inFcS, inFcSL)

    with arcpy.da.SearchCursor (inPoints, ['SHAPE@XY', 'ID']) as sCurs:
        for row in sCurs:
            print("{0}: {1}, {2}".format(row[1], row[0][0], row[0][1]))

            myX = row[0][0]
            myY = row[0][1]

            arcpy.SelectLayerByAttribute_management(inFcSL, "NEW_SELECTION",
                                        "ID = {}".format(row[1]))

            with arcpy.da.UpdateCursor(inFcSL, ['SHAPE@XY']) as cursor:
                for row in cursor:
                    cursor.updateRow([[myX, myY]])

    return

Moving polygons to points using ArcPy


Any light aerobatic aircraft suitable for a first aircraft after getting pilot's license?

Question: I plan on getting my pilot's license next spring and purchase an aircraft. My intention is to purchase an aircraft capable of light aerobatics but with flight characteristics suitable for a beginner. I will not be jumping into aerobatics but will take my time in a safe manner. My question is are there light aerobatic aircraft that would be suitable for this scenario?
Comment: LSA refers to Light Sport Aircraft, which is a category of airplanes in the EASA and FAA systems (with some slight differences). Basically, ~600kg MTOW and there are easier regulations which can apply.
Comment: Light in what sense? LSA compatible, or simply "not heavy"?
Comment: @KennSebesta I was referring to the aerobatic capabilities not the weight. Not sure what LSA refers to.
Answer: There is the Citabria to consider.
Comment: Wow, +5 gs. I would not have expected that.
Comment: +1. I have competed in aerobatics competitions with a Citabria. Indeed, the 7ECA model is considered the reference airplane for the Primary category aerobatics routine. Furthermore, for a long time the Citabria was used as a primary trainer, much like the Cessna 150, so it meets requirements for ease-of-flight.
Comment: @KennSebesta I just looked up the definition for that routine. That little plane can fly loops?
Comment: Can and does. It's rated for loops, spins, hammerheads, half-cubans, slow rolls, and barrel rolls. I competed in an aerobatics competition this summer, flying a 7ECA.
Comment: Citabria is the obvious choice if one only considers certified aircraft. But an RV-4 or RV-6 would do well too.
Answer: The Cessna A-152 Aerobat, a C152 structurally strengthened for flying aerobatics, would be a good choice as it is an honest flying aeroplane for doing positive G 'gentleman's' aerobatics in.  This would definitely be my first choice as there is probably going to be a lot of handling characteristics that you are familiar with from flying C152s and C172s in primary flight training.
As mentioned above, the champion Citabria and Decathalon are excellent choices as well.  The Decathalon is equipped with inverted fuel and oil systems so your aerobatic capabilities are expanded quite a bit.  They are also probably the easiest airplanes to transition into flying tailwheel airplanes in.
If you're interested in going the experimental route, the Vans RV-7/8/14 are very versatile airplanes capable of aerobatic flight and can cruise as fast as 170-180 kts depending on engine choice.  They can also be constructed with either conventional landing gear or a tricycle landing gear configuration, making for better performance on the ground.
One thing to consider be wary of exceeding your capabilities as a pilot, particularly early on as a newly minted private pilot.  Please seek professional instruction on aerobatics and aerobatic flight before attempting this solo.  There are a number of very good schools around the country, Patty Wagstaff's school down in Saint Augustine FL is perhaps one of the best for upset recovery training, and initial aerobatic training.
Another thing to consider in this purchase as well is the cost of insurance. Any aerobatic capable airplane that can carry passengers i.e. is not a single seat airplane, is going to cost a lot for liability insurance, particularly for a beginner pilot.  You can get around a lot of this by purchasing a single seat, only aircraft such as a Pitts S-1S.  This airplane is a very capable aerobatic aircraft and could be had for around $50,000 if you know where to look. The downside is that it is a very demanding and temperamental tailwheel aircraft and requires a skilled pilot with solid tailwheel time to handle and keep from ground looping.
Comment: I was expecting a plug for the Vans Air Force. Sort of the best modern option.
Comment: I was hoping someone would mention a P38 or F4U but I guess I can settle for a 152.
Comment: You aren't flying something like that fresh out of primary flight training.
Comment: @CarloFelicione That is just a facetious comment.


Scale adaption based on distance to object

Question: I have situation illustrated on image above, name displayed over the player. Text is rendered as 3d rectangle and rotated to face camera as billboard. (I am using this article http://blogs.msdn.com/b/shawnhar/archive/2011/01/12/spritebatch-billboards-in-a-3d-world.aspx) I just want to have size of the text always the same.
Are there any common approach to adaptively scale object based on distance?
Comment: Draw your text as a screen space overlay rather than an object that is being transformed from an alternate coordinate system.
Answer: Objects in 3D space are transformed using world/view/projection matrices to give positions in projection space. You should be familiar with these from using BasicEffect.
You can use these matrices yourself to transform a position into projection space:
Matrix transform = (worldMatrix * viewMatrix * projMatrix);
Vector3 modelAttachPoint = Vector3.Zero; // where you want the label, in model space
Vector3 projPosition = Vector3.Transform(modelAttachPoint, transform);

Projection space runs from (-1,-1) in the bottom left corner of the viewport, to (1,1) in the top right (and from 0 to 1 on the Z axis for depth).
We could use simple maths to convert our projected position into pixel coordinates. But it's even easier to just take the matrix that SpriteBatch uses to go from pixel coordinates to projected coordinates, and invert it.
Fortunately - that very article you linked gives us the SpriteBatch projection matrix:
Viewport viewport = GraphicsDevice.Viewport;
Matrix spriteBatchMatrix = Matrix.CreateTranslation(-0.5f, -0.5f, 0) *
    Matrix.CreateOrthographicOffCenter(0, viewport.Width, viewport.Height, 0, 0, 1);

And we can use it like so:
Vector3 pixelPosition = Vector3.Transform(projPosition, spriteBatchMatrix.Invert());

Of course, that position won't necessarily line up with pixel boundaries (which you want for nice, sharp text). Also it has an unnecessary Z-coordinate. So let's finish up with something you can pass into SpriteBatch:
Vector2 spritePosition = new Vector2((float)Math.Floor(pixelPosition.X),
                                     (float)Math.Floor(pixelPosition.Y));

(Note: code in this answer is completely untested!)


Unix equivalent of XCOPY /D

Question: Windows has a nice option to its XCOPY command: /D. This copies only files where the source modification time is newer than the destination time. Is there any unix/linux equivalent of this? I'm trying to get a fast copy to my local testing server.
Comment: This should be asked on SuperUser as it has nothing to do with programming.
Answer: I usually do:
rsync -avz /from/where/ /to/dest/

If you want it to delete files that doesn't exist anymore in /from/where add --delete.
It can also be used from different boxes like this:
rsync -avz firstname.lastname@example.com:/from/where/ firstname.lastname@example.com:/to/dest/

Comment: I was under the impressions that rsync uses ssh by default. I think you need two colons to specify an rsync server.
Comment: Yeah, it uses ssh by default. Need to add more "options" for rsync. Funny huh?
Comment: Normally I'd add "-e ssh" to that last one.  I don't like running an rsync server because it's not secure enough.
Comment: Oh yeah, you might want to throw in the --update option, if you don't want to overwrite newer files in the destination, but only older ones. It depends on whether you just want to efficientlysynchronize the two directories, or you want the exact behavior described above, with modification times.
Answer: cp --update src dest

From the man page:

copy only when the SOURCE file is newer than the destination file or when the destination file is missing
Answer: My brain couldn't quite cope with the complexities of rsync so I installed  Lucky Backup.  This provides an easy to use graphical interface as a front end for rsync.  When you've set up your copy/backup task, you can run it from the programme.  You can also click on the "validate" button for the task and it will give you the full rsync command line such that you can run it in a terminal or paste it into a shell script.  It's a nice tool for teaching the use of rsync.

Clicking on the "Advanced" button in the "Task Properties" window gives access to some of rsync's features.
Comment: Can you expand upon your answer with some screenshots? Your answer reads a bit like spam.
Comment: I tried to add a screenshot but the system demanded I had at least 10 reputations!  I have added a link instead.

Unix equivalent of XCOPY /D


Friday the 13th poser

Question:
Find a year that has three Friday the thirteenths in it, either past or future.  (That is, find a year where the thirteenth of the month falls on a Friday in three different months.)
Find a year with 'a month of Sundays'.  That is, find a year that has a Sunday on every day of a month at least once (i.e. a Sunday the 1st, a Sunday the 2nd, a Sunday the 3rd, ..., a Sunday the 31st).
Comment: Please clarify what you mean with "assemble 'a month of Sundays'".
Comment: @TheDarkTruth; is that better?
Comment: Check out http://www.timeanddate.com/calendar/weekday-friday-13
Answer: A solution for both problems is

 This year (2015)

First we look for the variances between the days for each month.
Normal year
January    0
February   +3   (starts on the weekday that is 3 days after the weekday of January 1st)
March      +3
April      +6   (starts on the weekday that is 6 days after the weekday of January 1st)
May        +1   etc...
June       +4
July       +6
August     +2
September  +5
October    0
November   +3
December   +5

Leap year
January    0
February   +3
March      +4
April      0
May        +2
June       +5
July       0
August     +3
September  +6
October    +1
November   +4
December   +6

First, we need 3 different months with the same variance.
For a normal year, those are February, March and November.
For a leap year, those are January, April and July.
To find a year with 3 Fridays the 13th, we need the three months mentioned above to have their 13th on a Friday, which means those months start on a Sunday.
For a normal year, this means the year starts on a Thursday (those months have a variance of 3, so if they start on a Sunday, January (and thus the year) begins 3 days earlier, on a Thursday).
For a leap year, this means the year starts on a Sunday (one of the three months is January, and it must start on a Sunday, so that means the year starts on a Sunday).
Our current year (2015) began on a Thursday, therefore 2015 had 3 Fridays the 13th.

As for a 'month of Sundays':
Both a normal year and a leap year have all 7 possible variances in their months, so we only need to find a month with 31 days where the 31st is a Sunday.  This will mean the whole year has a 'month of Sundays'.
And surprise, this year's May did indeed have a Sunday the 31st.
Comment: i can't work your variances out 1jan == 5feb, so var should be +4?
Comment: @ Jon Mark Perry: The variances i state are between weekdays. First I say that the first of january has a variance of 0. Now january has 31 days so the first of february is 31 days later or in other words 4 complete weeks plus 3 days therefore having a variance of +3 weekdays.
Comment: interestingly enough you can roll the years on, december means var(jan|[year+1])=1 etc..., so we get a pattern 111211121112..., except for years divisible by 400
Comment: Actually it was May this year that had Sunday the 31st, not March
Comment: @orp My bad. Thanks for the pointer. Fixed it now.
Comment: You say it should be any "normal" year that starts on a Thursday or any leap year that starts on a Wednesday, but it seems to me that the leap year must start on a Sunday in order to have a Friday the 13th in January, April and July.

Friday the 13th poser


How to generate encoded polylines from shapefile/ kml?

Question: I need to convert a shapefile/ kml to encoded polyline format for a certain project. Does anyone know of a simple conversion tool or code that achieves the same ?
Answer: You'll first want to convert your KML/SHP to a list of lat/long pairs. For KML, you can simply open the KML file in an editor to get the lat/long pairs. For SHP, you can first use shp2kml to convert to KML.
Then, use the encoding library in the Maps API, or you can write your own encoder using the algorithm.
Comment: Actually i want a code to perform the encoding because the number of polylines that i want to encode is huge...
Answer: Your term shapefile/kml is confusing.  If you want to convert from an ESRI shapefile to a kml file, the utility ogr2ogr works like this:
 ogr2ogr -f "KML" outputfile.kml sourcefile.shp.

For downloads, ogr2ogr is part of the GDAL distribution: http://www.gdal.org/
Comment: 'shapefile/kml' means "shapefile, or kml". The OP most likely has both formats available, or can easily convert from one to the other. So they listed what they had available in case one or the other is possible/more easily achived. Hopefully this clears up your confusion.


3rd Party Platform Unique Identifier for Joins vs Internal Identifiers

Question: What is the general practice when it comes to choosing a unique identifier? In my case I have the option to use the eBay unique listing ID (Item ID) or my own internal ID for use in table joins and general identification. The argument could be made that some 3rd party identifiers are non-numeric and I would understand this proposition but in my specific case the identifier is numeric. Thanks for any advice or personal experiences in advance!
Answer: To be safe you'll want both. Internally you should create and use your own unique IDs to maintain a clean relational model with FKs between your tables while keeping a reference to the eBay unique ID in an appropriate table. If you need to reference something by the eBay ID you will have it available, but should the eBay unique ID rules change it does not affect the consistency of your existing table relations and architecture.
Answer: Your question has no right answer, and consequently stands to elicit many opinions.  Mine is foursquare in favor of using natural keys unless and until they become unwieldy.  My mantra is, store what you know.
The first reason to favor natural keys is that they force you to consider the table design in terms of identifying characteristics.  You're much more likely to develop a normalized design if you're grouping attributes into tables by cardinality, and 3NF is your friend.
The second reason to favor natural keys is that you preserve the information provided from the real world -- the "enterprise of interest" -- in the database.  If the key is an internally generated number, you risk disassociating the data with its real-world identifier.
The third reason is simplicity: internal identifiers add no information.  They add data, but they record no new information about the world being modeled.
Of the many thousands of tables I've designed, those relying on a synthetic key are just a handful, perhaps 0.1%.  I'll offer you an example of a case where it was necessary, and still could have been done better.
Stocks (and other instruments) on the stock market have no unique identifier.  Each exchange uses its own ticker; various bodies assign identifiers.  Several "identifiers" may therefore designate the same security.  Over time, some identifiers are reused to represent different securities.  (Consider what a 180-day future means as time progresses.)  Firms dealing in securities have the need to recognize securities regardless of the externally provided identifier.  The information to map from one identifier to another is a closely guarded trade secret, ironically much too valuable to be freely traded.
For example, IBM's stock is known as "IBM" on the NYSE, and to the Committee on Uniform Security Identification Procedures as #459200101.  The two organizations share no common designator for it.  In fact there are about 7 potential bodies to assign the identifier, depending on the domain.
A purely theoretical approach to capture that relationship would keep all the identifier pairs in the matrix for each instrument.  I doubt anyone's ever done that in a production system.  Instead, you design a table {Id, Identifier, Type, StartDate}, for which Id is an internally generated value that is common for all Identifiers for one instrument.  The matrix of combinations can then be generated by joining the table to itself.
That was the necessary part.  We needed something to associate different identifiers.  Because none existed, we generated one.  And all was good.
Then we took the next, seeming logical, step.  Possessed of a unique identifier of our own making, we could use it to identify instruments throughout the database.  Voila!  No more grotty, incompatible not-quite-unique externally provided identifiers.  Just good, clean numbers!
Three bad things came of that decision.

Sometimes the process of determining what maps to what produced results that later proved to be wrong.  Either two identifiers were not related as had been previously asserted, or two seemingly distinct instruments were in fact one and the same.  It therefore became necessary to change the mapping, and to propagate that change across the dozen or so tables that referenced it.  And, later, to the dozen or so other systems that used it.
Using our internal identifier "canonically" broke the association with the external identifier used when the information was provided by the external data source.  We knew the instrument, yes, but not the identifier by which it was known to a particular vendor.  That made reconciliation with external sources more difficult.
The problem of change over time eventually meant the internal identifier became undependable as an intersystem link.  If you didn't know when the identifier was applied, you couldn't know to which instrument it really referred.  Instead of clarifying, the internal identifier joined the technical debt, a source of error and unnecessary complexity.

How could the downside have been avoided?  At the cost of some query complexity, always and only storing instrument data by its externally supplied identifier.  Using the cross-reference matrix when necessary, and never exposing the internal identifier.  In retrospect it's impossible to come to any other conclusion.  Using the natural keys would have preserved information and prevented confusion & error.  Store what you know.
In my experience, the lesson is learnable, but unteachable.  Twice I've had the chance to explain it to someone newly confronting the same problem.  We need a unique identifier!  Both times the smart person listening to me decided my lessons didn't apply to his situation; he would invent the truly unique security identifier.  Hubris is a self-renewing resource.
What should you do?  Database design choices, good and bad, are magnified over space and time.  The larger the database -- rows and columns -- and the more the information is dispersed, and the longer it's around, the greater the payback or pain.  Whether or not my lesson applies to your situation depends in part on how important your database is or will be.  Naturally that's up to you to decide.


Coefficient of variation question?

Question: Is it appropriate to compare the coefficient of variation between discrete (e.g., clutch size) and continuous data (e.g., egg width)?
Comment: Appropriate for what purpose? And how do you propose to make the comparison?
Comment: A simple comparison to say, "clutch size was more variable than egg width in our population." Does this clarify my question?
Comment: Theoretically, a species should optimize their egg size and vary clutch size; therefore, there is a tradeoff between egg and clutch size. Some people essentially look at the coefficient of variation to determine if clutch size is more variable than egg size within a population to confirm the optimal egg size theory. My question is related to the appropriateness of making a comparison between a discrete and continuous variables'coefficient of variation.
Answer: There is a great variety of the different discrete variables: nominal, ordinal, and count. Gender is nominal: you cannot attach a meaningful number to gender. Strongly disagree/disagree/agree/strongly agree is ordinal: they represent discretization of an underlying spectrum. You can code them as 0/1/2/3, or 1/2/3/4, or -2/-1/1/2, with an understanding that higher values of the coded variable represent the greater strength of agreement, although the difference between 1 and 2 may not be the same as the difference between 2 and 3. Clutch size is a count variable: the value of 1 is meaningful, and the differences between 2 and 3 is the same difference as between 8 and 9. For most purposes, that works pretty much the same way as measuring egg width: the difference of 1cm between 1.5 cm and 2.5 cm is the same as between 3.2 cm and 4.2 cm. For both clutch size and egg width, the value of zero (nothing) is meaningful. So I would not see any objections to at least computing the CV for either variable.
Now, whether the substantive interpretation you offer would hold water should be an argument. For one thing, you have not convinced me! You would need to find sufficiently different nesting conditions to argue that a species reacts to the change in the environment by increasing CV of one or the other variable -- or, if you at the liberty of doing so, set up an experiment with whatever conditions are appropriate (dry vs. wet, warm vs. cold, plenty fish vs. no fish -- you know better.)
Comment: I wonder about the equations you are making in this answer. The total energy expended by a bird to make a clutch would be pretty close to the total *mass*. In this sense, a difference of egg widths from $1.5$ to $2.5$ cm corresponds to a mass change of a factor $(2.5/1.5)^3 = 4.6$ whereas a change from $3.2$ to $4.2$ is a factor of $(4.2/3.2)^3 =2.3$: it's only half as big. This suggests abandoning CV as having any kind of meaningful relationship to the underlying biology and trying to exploit biological understanding to express the variables appropriately and make useful comparisons.
Comment: @whuber, great comment. I also wondered whether the "natural" CV of the egg size need to be comparable to the "natural" variation in clutch size, but could not find a good way to express my concern (other than the second paragraph). Now, your simple example shows that the CV is not even scale independent (as I am used to in my economics work with figures like employment or revenue).
Comment: Back to my original question, can you compare CV between clutch size (count data) and egg width (continuous data) as a technique to test if a population is varying clutch size rather than egg size? There have been several papers that use this as a method to test the optimal egg size theory, but it seems inappropriate to me to compare dispersion this way.

Coefficient of variation question?


How to precisely set orthographic scale

Question: I am trying to get an orthographic render out of Blender with precise accuracy. The scale that I would like is 1"=1'. To prepare my scene, I have changed units to Imperial with separate values. I then changed the output dimensions to 7200x5400 - so that I can get an 24"x18" output at 300ppi. My problem now is setting the orthographic scale. I have tried 12 (for 12 inches in a foot), but the resulting render is too small. After fiddling with the scale manually, I figure that I'd need something less than 7.4, but I don't know how to get a precise scale for my use case.
Comment: https://blender.stackexchange.com/questions/64914/setting-camera-to-position-where-it-can-render-a-seamless-repetable-orthographic/64920#64920
Comment: I'm voting to reopen this so Qwerty can post his solution as a full answer. Not everyone has @Duarte's big brain :).
Comment: Hi :). I made it work with scene units set to *inches*. The orthographic scale is then 0,6096. But it took me another hour to figure out why. Turns out 24 inches=609,6mm.
Comment: reopened @qwerty you should post your edit as an actual answer below.
Answer: Summary

Pick the larger of your output width and height. E.g., my render is 4096 px wide by 1024 px tall, so I'd pick width, since 4096 > 1024.
Find the desired size of the output camera. E.g., my cliff is 1600 ft wide by 400 ft tall. Since width is higher, my camera size needs to be 1600 ft.
Convert from desired size in scene units to meters. E.g., 1600 ft is 487.68 m.
Plug the size, in meters, into the camera's scale. E.g., I would set my scale to 487.68.
Enjoy!

Explanation
This answer will focus on lining the camera up to a plane that's parallel to a major scene plane. Vertical, in the XZ or YZ planes, or horizontal in the XY plane. It will presume you have a rectangular object to line up to. In these cases, it's trivial to position and orient the camera so it's located at the center of the target plane, pointed straight at it.
If you're trying to line up with a non-standard angle, you'll need to do additional math. Duarte's answer to a similar question can give you some ideas about how to calculate the angles.
In my case, I have a flat, vertical plane that's 1600 feet wide by 400 feet tall. It will (hopefully) end up being a cliff face I plan to import into another scene as a bump-mapped diffuse texture. So I set up an orthographic camera that will render to a 4096 x 1024 image for the final material.

Since the plane is 1600 x 400, with the base centered on the world origin, that puts its center at [0 ft, 0 ft, 200 ft]. I simply put the camera at [0, 0, 200], then moved it along the -Y axis. Since cameras point down by default, I rotated it 90° on the X axis, then it was lined up. Again, for more complex angles you might need a bit more math.

As explained in Duarte's answer, the scale of the camera is such that the largest dimension of the output render will be mapped to scale units in the scene. In this case, the output is wider than it is tall, so our scale tells us the width, in Blender units, of the camera.
I initially tried using 4096, then noted that 409.6 was somewhat close. But it's not really close. AAARRGGG!!!! Why??!?!? Blender, whyyyyyy!?????????????

Manually playing with it, I can see that 483 is much closer, but still not quite right.

As noted in the comments and other answer on this page, it's because Blender is using the metric system behind the scenes. Even though Blender is set to Imperial with units of feet, the camera scale expects units of meters.
Now, we could create the entire scene in metric units to begin with, or convert the scene to metric now. But an easier way is just to calculate the factor between feet and meters. Unfortunately, you can't enter units into the camera scale to automatically convert. However, Google, WolframAlpha, etc. will do the math for us, or we can remember from grade school that 2.54 cm is 1 inch.
$1 \text{ ft} \cdot \frac{12 \text{ in}}{1 \text{ ft}} \cdot \frac{2.54 \text{ cm}}{1 \text{ in}} \cdot \frac{1 \text{ m}}{100 \text{ cm}}$ $= \frac{381}{1250} \text{ m}$ $= 0.3048 \text{ m}$ $\rightarrow 1 = \frac{0.3048 \text{ m}}{1 \text{ ft}}$
So we can multiply our values in feet by 0.3048 to get the value in meters.
$1600 \text{ ft} \cdot \frac{0.3048 \text{ m}}{1 \text{ ft}} = 487.68 \text{ m}$
$400 \text{ ft} \cdot \frac{0.3048 \text{ m}}{1 \text{ ft}} = 121.92 \text{ m}$
Since our output is wider than it is tall, we want to use our width value. Instead of plugging 1600 or 4096 or something into the scene, we just need to plug in 487.68. Flawless victory!

Addendum
This process can be used for any other units. You just need to find the scale from your units to meters.
Also, you can plug calculations right into the Blender interface. So if you want your scale to be 895 inches, you can just enter "895*0.0254" in the scale menu.
Imperial Units

$1 \text{ mile} $ $= \frac{201168}{125} \text{ m}$ $= 1609.344 \text{ m}$
$1 \text{ foot} $ $= \frac{381}{1250} \text{ m}$ $= 0.3048 \text{ m}$
$1 \text{ inch} $ $= \frac{127}{5000} \text{ m}$ $= 0.0254 \text{ m}$
$1 \text{ thou} $ $= \frac{127}{5000000} \text{ m}$ $= 0.0000254 \text{ m}$

Metric Units

$1 \text{ kilometer} $ $= 1000 \text{ m}$
$1 \text{ meter} $ $= 1 \text{ m}$ (*gasp*)
$1 \text{ centimeter} $ $= \frac{1}{100} \text{ m}$ $= 0.01 \text{ m}$
$1 \text{ millimeter} $ $= \frac{1}{1000} \text{ m}$ $= 0.001 \text{ m}$
$1 \text{ micrometer} $ $= \frac{1}{1000000} \text{ m}$ $= 0.000001 \text{ m}$

No Units

$1 \text{ internal Blender unit} $ $= 1 \text{ m}$

Post Script
I presume the camera's scale is actually just using internal Blender units, not metric. But because the units system maps 1 Blender unit to 1 meter, we can conveniently use real-world conversions instead of having to remember some arbitrary conversion from Blender units to one real unit, then convert real unit to real unit.
It's simpler to just pretend internal Blender units are meters.
Comment: Nice! Bookmarking this for future reference, thanks :)
Answer: Unfortunately the answer by Duarte Farrajota Ramos does not address the orthographic scaling in imperial units. However, after pulling my hair out for a few hours, I finally understood that the Blender cameras do not respect the scene units (is this a bug?). So what I did was to set the orthographic scaling to 0.9144 so that it would match a yard (it seems that a yard is a better target than a foot) and then adjust the unit scaling in the scene properties, and voila, it works!

How to precisely set orthographic scale


Single entry visa with stop-over

Question: I have a single entry visa to Spain from Abu Dhabi via Brussels. Flight from Abu Dhabi to Brussels is with Etihad airways and from Brussels to Barcelona is with Ryan Air. Knowing that I am changing the airline, and I need to collect my luggage upon arrival to Brussels, am I allowed to pass the passport control to collect my luggage and enter again from the passport control to take the flight to Barcelona?
The same scenario is for the return flight, I have a long stopover am I allowed to get out of the airport? I am worried that this may not be considered as a single entry?
Comment: For intra-Schengen flights, there should be no passport checks in general. But I'm not sure if there aren't any exceptions to this rule. Also, have your boarding pass or flight reservation for the Brussels-Barcelona leg ready before going through the passport check in Brussels, as they may want to see some evidence for the fact that you applied for the visa with the right embassy.
Comment: What's your nationality?
Comment: I have a Lebanese nationality
Comment: possible duplicate of [Can I travel to Paris for a day with a single entry visa for Schengen from Switzerland?](http://travel.stackexchange.com/questions/14692/can-i-travel-to-paris-for-a-day-with-a-single-entry-visa-for-schengen-from-switz)
Comment: As Belgium and Spain are both Schengen members, your itinerary constitutes a single entry into the "territory of the member states" of the Schengen area (this is the term used in the legal code).  The only problem would be if your visa is restricted in territorial validity.  What does it say under "valid for"?
Answer: The flights between Brussels and Barcelona are intra-Schengen flights, so you will not go through passport check (as already mentioned in the comments). You will enter the Schengen zone only once (in Brussel) so your single-entry visa is enough for your trip.
In Brussels you can get out of the airport, I see no problem.

Single entry visa with stop-over


Were "Fell" and "Fel" both correct spellings?

Question: I'm trying to describe evil magic and creatures to my players and to set the tone, I'm trying to use Middle and Old English words and phrases. After googling a while I couldn't find a definitive answer if Fell and Fel are both correct spellings of the same adjective?
Answer: Both are attested
Before Modern English, there were really no overarching prescriptivist entities, so the concept of "correct" spellings didn't exist. What we have are attested spellings, sometimes numbering in the hundreds for a single word.
The Middle English Dictionary is the best free resource I know of for seeing attested Middle English spellings. For fel (adjective), it shows quotes with both fel and fell spellings (and a few more like felle, double f spellings — equivalent to capital F, and even feolle).


Toyota Aygo stuck in some gear

Question: My daughter went to go to drive her car today and when she moved the gear shifter it jammed in some gear. The shifter will not move and the car will not select any gear. When you start the car you must press on the clutch for it to start. If you turn the key without pressing the clutch the engine will not turn and the car will not jump forward as it usually would if the car was in a gear. Once you release the clutch the car dies. Any help greatly appreciated. Thanks
Answer: That the gearbox is in a gear, and cannot be shifted into neutral, indicates that a) either the linkage that connects the gearshift lever to the transmission is broken or jammed, or b) something is broken or jammed within the gearbox itself.
Problem a) is probably solvable if the linkage can be exposed and worked on. This will depend upon the design of the car. Problem b) will probably require removal of the gearbox so that it can be opened and repaired on the workbench.

Toyota Aygo stuck in some gear


How do I play with others in neighbourhoods ... cannot access

Question: Ok, I don't get it.
I don't have any origin friends and cannot find any neighbourhood with vacant cities. When I finally find a lot, it says I cannot access it because I don't have items used in the city. What what what? Makes no sense to me, and let's face it, it's no fun playing SimCity solo. How do I become part of a neighbourhood?
Answer: i feel you are asking two questions. One, why do i get the message that I do not have the content:
Reclaiming an abandoned city results in an error message
Second: how to join a game with other people:
Joining a game with an empty slot
This question should be closed if I have answered your questions.


How to make corn tortillas without masa harina

Question: I'm in South America at the moment and want to make corn tortillas. I don't have access to masa harina, but I can get polenta, P.A.N, and arepa flour (which I think is basically the same thing as P.A.N?) With the understanding that the taste won't be exactly the same, can I use any one of these, or a combination, to get a decent approximation of a corn tortilla?
Comment: Er, can you just get whole dent corn kernels?  Seems like those should be readily available.
Comment: Because ... as far as I know, you can't make tortillas work with either of those things.
Comment: The taste won't be the same & the texture won't be the same. How much are you willing to give? I hear hominy might be close, but I've never seen/tasted hominy [just cannot get it here in the UK except on Amazon import etc].
Answer: You cannot make tortillas from arepa flour or from polenta.  In both cases, no amount of treatment of the grain will result in the tortilla holding together when you remove it from the press. I did some searching to see if you can nixtamalize the polenta yourself, and then grind it finer, but the answer appears to be no.
So, you have two reasonable workarounds:

If you're in South America, you should be able to find any number of high-starch whole corn kernels, either on the cob or (better) dried.  You can nixtamalize and grind these into masa yourself, and it'll be even better than masa harina.
Make wheat flour tortillas instead, or even part-wheat, part-PAN for some cornmeal flavor


Source developed using Android 2.3.3 google Apis does not work for Android 4.0.3

Question: I developer an Android app using Android 2.3.3 Google apis . The same source I tried to build again using Android 4.0.3 Google apis. But when I try to run the app the console is showing error as "Failed to install Shared Library" "Check LogCat  for more details". When checked in "Logcat" its showing error as  unable to find com.google.android.maps .Can anyone help me in sorting out this issue.
Answer: for eclipse you have to install GOOGle maps api seprately for each version might be your eclipse have Google Map api for 2.3 but not for 4.0
Answer: You might forgot to add librery in your mainfest file.
add the following code within mainfest file( Inside Appication tag)
<code>      <uses-library android:name="com.google.android.maps" />
</code>
Answer: Library management changed from r17. If you updated your ADT to this version or higher try this:
Right click project > Properties > Java Build > Order and Export
Move your libraries to the top


Hide url extension

Question: I want to hide or modify the url extension by default it is set to aspx. Can it be modified in asp.net
Answer: You have to use URL rewriting.
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
Answer: Probably you're trying to create friendly urls. If this is the case you need to use "URL rewriting". We could give you more info if you tell us which version of the .NET framework you're using and the version of the IIS.
Here you'll find a general definition of url rewriting.  Once you provide extra information about your infraestructure we can point you to the correct tool.

Hide url extension


Do I need to recheck in baggage in PVG?

Question: I'm flying on China Eastern JFK-PVG-ICN. My flights are on the same ticket. Will my baggage be checked through all the way from JFK to ICN or do I have to claim and recheck in my baggage at PVG? If I do need to recheck it at PVG, what is the process like? Where do I go and do I need a visa?
Answer: You do not need to claim your bags at PVG, they will be checked straight through to ICN.
You also do not need a visa, assuming you're an American citizen, your connection is less than 24 hours and you plan to stay within the airport.

Do I need to recheck in baggage in PVG?


Question on graphic designer positions in which one needs to know even HTML and CSS

Question: About graphic designer positions where it needs to know HTML and CSS, what are all the projects one needs to be able to do with HTML and CSS in order to be employable?
Answer: This is a fairly broad question and will most likely be closed due to that.
But to provide a general, broad list of some tasks....

Add images or text to a web page
Create a landing page
Create an HTMl email
Adjust or correct existing web site(s), landing page(s), emails
Understand what is and is not possible via HTMl/CSS when designing web content

This is merely a short list. Any employment position may have more specific needs.
Realize your question is akin to asking "What are all the things you can do with Photoshop?" the list is likely endless. Each employment position may only require a targeted set of skills, but what is possible is vast.
With HTML/CSS you either know it or you don't. It doesn't have quite the breadth of scope of image editing. If you know and understand HTML/CSS there is typically few things you can't do in relation to those markup languages.


How to change a referenced classprovider in Eclipse?

Question: I uninstalled the maven plugin but when trying to run the project that was perfectly running before the plugin I have "Referenced classpath provider does not exist: org.maven.ide.eclipse.launchconfig.classpathprovider". I assume I have to change the launch configuration for the project. Can anyone provide the steps to do so? Thank you.
Answer: This helped me http://sha.nnoncarey.com/blog/archives/33

If you get this error when launching a Run Configuration in Eclipse with the IAM (Maven) >plugin:
Referenced classpath provider does not exist: >org.maven.ide.eclipse.launchconfig.classpathProvider
It's probably because your Run Configuration was created on an old project, and has bad >entries in the Classpath section. The solution is to delete the Run Configuration and create >a new one.
Answer: The project could be having old/incorrect settings. Assuming it is a maven project, one possibility is you could regenerate the Eclipse settings for the project by
mvn eclipse:clean eclipse:eclipse
Answer: This link helped me:
http://osdir.com/ml/web.webobjects.woproject.devel/2005-09/msg00090.html
I commented out string with CLASSPATH_PROVIDER.


Visitor visa to England for students in Schengen area

Question: I am from Iran and I am going to study in Germany in a few months. My boyfriend (Iranian) is also going to start his studies in U.K. I am wondering if it is possible for both of us (or even one of us) to apply for a visitor visa so we can see each other during this time. I really would appreciate any information.
Comment: Yes, it is possible. Why wouldn't it be?
Comment: Because I thought maybe due to some restrictions on Iranian citizens there would be not easy to get a multiple entry visa to UK. Do you know is it a multiple visa or not? and do you know how long the visa is usually valid for?
Answer: A long-term UK Visit visa of 2, 5 or 10 years is available but approval typically requires a strong travel history eg several previous visas for the UK or similar eg Canada, US, Schengen. The UK Standard Visit visa is valid for up to 6 months and is usually multiple entry. https://www.gov.uk/standard-visitor-visa so you should be able to use it for eg weekend visits from time to time. Your study visa for Germany should count in your favour.


Do I need to screen share so that they can see my Bitcoin Wallet is genuine?

Question: An online trader (Brokerz) has called me saying they are closing down and are refunding everyone's money via Bitcoin.  I have a BC Wallet but they are saying they need to screen share to see if it is genuinely my wallet so that they are refunding the money to the right person.  This sounds like a scam - has anyone else had something similar?  I did trade with this company, and frankly thought I had lost the money due to a scam so are they just coming back for a second bite of the cherry?
Comment: Definitely strange. I don't see why a screen share would be any more proof than just providing an address. I also don't know how this would benefit them if it was a scam though. I'd be very cautious.
Comment: From a quick search it seems you are not the only one who believes to have been scammed by this company. Be careful not to inadvertently give out any sensitive information to them, and whatever they say don't send them any more money.
Answer:
Do I need to screen share so that they can see my Bitcoin Wallet is genuine?

No.
If a genuine person was concerned about paying to the wrong address, they just need to read out over the phone the address you gave them and have you confirm it is correct.

A genuine business that is closing down is much more likely to send you a message saying something like you have 30 days to withdraw your money from your account. Either that or leave the whole matter to insolvency administrators.

In this case the persons contacting you are obviously trying to use a false prospect of return of money to tempt you into giving them access to a computer on which you keep your private keys that will give them the means to steal your remaining money and plant malware that will steal future money.
The only sensible approach, I believe, is to break off contact with criminals. You have nothing to gain by giving criminals more access to your financial data. Don't give confidence tricksters endless opportunities to persuade you that something stupid is sensible - that's what they are good at.


Enforcing coding style with pre-receive Git hook

Question: I am working on an embedded Linux project with a small team, and we have decided to enforce a C coding style. We have chosen the Linux Kernel coding style, and we use the script provided in the Kernel tree checkpatch.pl to check our patches.
We would like to check the coding style before accepting a patch on the server, using a pre-receive hook. However, we cannot find a reliable script that does this job, specially when branches are created and deleted.
May we solve this problem via Git remote hooks? Specifically, we need to check all the modified files by a commit (or series of commit) with checkpatch.pl.
Comment: Didn't you like the given answer?
Answer: You can see in this gist an example of detection of branches being deleted or created
<code>case "$refname" in
  refs/heads/*)
    branch=$(expr "$refname" : "refs/heads/\(.*\)")
      if [ 0 -ne $(expr "$newrev" : "0*$") ]; then # deleting
      ...
      else #updating
        if [ 0 -ne $(expr "$oldrev" : "0*$") ]; then # pushing a new branch
</code>
You should be to adapt that in order to manage your coding style check.


Deepin White screen

Question: I installed deepin on Arch (fresh install) and it just isn't working, I can't log in, when I start the lightdm.service, it just shows blank white screen. I haven't enable the service yet. I was just checking if it worked and its not working.
Answer: There might be an issue with the lightdm-deepin-greeter.
Install an alternative greeter, e.g lightdm-gtk-greeter
sudo pacman -S lightdm-gtk-greeter

Then edit /etc/lightdm/lightdm.conf
sudo nano /etc/lightdm/lightdm.conf

Look for the line that is like
greeter-session=lightdm-deepin-greeter or the value could be something else
change it to
greeter-session=lightdm-gtk-greeter

Save, ctrl-x, y, [enter]
Stop & start the lightdm.service and see if that works.
systemctl stop lightdm
systemctl start lightdm

Regards.
Answer: Hey I've ran into the same issue as you
Turn out I have not create a non root user, fixed by:
useradd -m newuser
passwd newuser
systemctl restart lightdm

then the beautiful Deepin login screen is appear! Hope you fixed it

Deepin White screen


No properties option in Index context menu

Question: I am attempting to analyze the indexes of several of my tables according to a Microsoft article that describes Reorganizing and Rebuilding Indexes. The article says to right-click on the index within SSMS and then select properties. However, I don't see any option for properties on the right-click menu. I am using SSMS v17.1 with an Azure SQL Server v12.0.2000.8 (which I believe is SQL Server 2014).
Comment: SSMS lacks a few features in comparison to an In-Premise sql server db. They've improving a lot, but apparently, you still can't see those properties. You'll have to execute a query to see those values.
Answer: This functionality is not available for Azure yet.
You have to use INDEXPROPERTY.  Explained here with example for Azure.
On a side note Azure SQL Server v12.0.2000.8 is not SQL Server 2014. You cannot compare versions between Azure and On-premises.  Rather you should compare features if you have to.


How to interpret a "Thank you for all your hard work" statement before actual completion of work?

Question: When your supervisor or team lead says, thank you for all your hard work towards the end of the project , but the project has not concluded and some work still pending, are they being sarcastic or genuine how do I interpret this ? Thanks. From my perspective things are still a bit chaotic and some effort is still necessary to bring this project to a smooth conclusion.
Comment: The project doesn't have to be fully complete for a manager to be thankful for the effort you've put in so far. Good managers are appreciative of the people on their team.
Comment: If you are questioning this, are you really questioning yourself about your level of effort? Are you thinking you could, or should, have done better?
Comment: @AhirBhairavOrai How did you know Seth was not going to write another comment? Why did you say thanks after the first comment? Think about it, and compare with your scenario, and you're welcome. :)
Answer:
When your supervisor or team lead says, thank you for all your
hardwork towards the end of the project , but the project has not
concluded and some work still pending, are they being sarcastic or
genuine how do I interpret this ?

Assume positive intent.
Only you know your supervisor/team lead, and only you heard how it was actually said, so you are clearly in the best position to interpret what they mean.
But absent any indications to the contrary, just take it for what it is - a nice little "thank you" and an indication that they are noticing the work you are doing.
Comment: It is absolutely normal to thank people for their hard work when they have done hard work, even if the work is not finished.
Answer: It really does not matter what they are meaning, take it on the face value.

Mostly, it's only common (and expected) that as a lead, you should be able to recognize, appreciate and reward the achievements of your team on a regular basis. A simple thank you is a very welcome gesture to express the gratitude, irrespective of the project status. Sometimes, positive and encouraging words really do miracles. As the saying goes

Motivation is like bathing, it's needed and recommended regularly.

On a slimmer chance, if your team lead has resorted to sarcasm to convey the feedback about poor performance, then there there is some serious malfunction that has crept into the team dynamics that needs to be addressed first. This is a professional work environment, not a casual college gathering / friends' reunion. Also your team lead is overdue for an effective communication training. This is very unlikely (although not impossible) that this was sarcasm, unless there is a follow-up which strongly points towards that.

TL;DR Assume good intent, don't assume malice.
Comment: Your TL;DR is just good general advice for life. Most people just don't have the time or energy for real malice. See also: [Hanlon's Razor](https://en.wikipedia.org/wiki/Hanlon%27s_razor)
Answer: Saying, "Thank you," makes people feel appreciated, even mid-project. Towards the end of a project, people start updating their resumes because no one wants to be the last one on a project. Management needs to make sure that people feel appreciated so that they can actually get to end of the project. People who feel appreciated do more for you than people that don't feel appreciated.


ArcGIS Pro Shapefile : polygon not visible

Question: I'm a Master's student in oceanography research and I'm using the latest version of ArcGIS Pro. I am using data from the Canadian Ice Service Arctic Regional Sea Ice Charts in SIGRID-3 Format, Version 1. This type of data is based on a shapefile (.shp) format to store the shape geometry, this file is accompanied by an index file (.shx), there is a database file (.dbf) to store all the shape attributes in the main file, then there is an XML file (.xml) for the metadata related to each ice chart. This metadata includes projection, location, keywords and contact information. Since 2006, the Canadian Ice Service's ice charts have been made up of several different colored polygons (MMO) for different ice concentrations (CT = Concentration Total). However, when I open the shapefile (.shp) on ArcGIS Pro, the polygons are not displayed. I can open the shapefile as shown in the image below (figure 1 = What I see). The information is present when I touch a spot on the map, but I can't see the different-colored polygons as in the second figure (figure 2 = What I'd like to see). I can't find this information anywhere. Do you know how to help me, or do you know someone who does, please? Do you think that my version of ArcGIS Pro is too recent for this type of data?
Comment: Shapefile format is nearly 30 years old, and really ought to be retired by now. But that's got nothing to do with your problem.  In fact, the XML file, which does contain metadata is ***not*** used to define projection, which may be your problem.  If you don't have a .prj file, or didn't and set the wrong one, you would get the results you describe. Instead of describing the shapefile format, you should describe the *content* of the file, as described in layer metadata, like bounding rectangle and spatial reference contents.
Answer: Sounds like you just need to update the symbology. You can see if there's a .lyr or .lyrx file available (and then use it to run Apply Symbology from Layer), or you can do it manually.

Open the Symbology pane (you can find it under the View tab).
Under Primary symbology select Unique Values, and then select the CT field in the Field 1 dropdown.
Apply colors based on the version you show in ArcMap.
Comment: If you have the layer from the second example saved, you can copy it to your map and point it to your data (assuming the same data fields) by changing the source property. You don't have to keep rebuilding symbology for every dataset.
Comment: I haven't found an NSIDC layer, but do you think I could create my own layer based on the same colors as the Canadian Ice Service ice charts, and then apply it to my shapes?
Comment: Yes, you totally should be able to create your own symbology layer for on going use.
Comment: Do you know how to do this in ArcGIS Pro? I don't know this software very well, so I have a lot of gaps.
Comment: Here's how to save from Pro: https://support.esri.com/en-us/knowledge-base/how-to-save-the-symbology-of-a-feature-layer-permanentl-000027435