What is the optimum number of projects in a Visual Studio 2008 solution?

Question: What is the optimum number of projects in a Visual Studio 2008 solution?
We have one Visual Studio 2008 solution that is around 50 projects right now.  It will likely continue to grow as the bulk of the projects within the solution consist of plugin assemblies for the main application.
If it seems like "too many projects" in one solution then how would you go about determining which projects should be grouped together in a solution?  Given our example of approximately 50 projects in one solution with the bulk of the projects being plugins and with the number of plugins likely to grow, how should solutions be structured?  Should all of the plugins be placed in their own solution?  How should the organization change when the number of plugins in the plugins solution hits the magic number of "too many"?
We don't have any issues with this many projects in the solution ... it loads quickly, it builds quickly, it uses a reasonable amount of memory, and doesn't cause VS2008 to crash or bump up against any VS2008 bugs.
I've looked for documentation from Microsoft (there doesn't seem to be any) and Google searches yeild recommendations from "every project gets its own solution" to "place all projects in a single solution."  Both extremes seem to be absurd.  I'm looking for some reasonable guidance in the middle.
There have been other questions on Stackoverflow related to the maximum you've seen.  That's not quite the same as what the optimum would be.
Answer: I'd say that you need at least 1 project for each layer on your system. If you need more projects, maybe it's a design problem. Meaning you can either "Over"-design or "Under"-design the application.
I nowdas use the following layers:
DataLayer - Responsible for the underlying data structure ( the database ). In the latest cases having the LINQ and partial classes for this in this project.
Interfaces - Having a layer for all interfaces, this to help extendabillity and not having to rely on some other layers to use these interfaces.
Logic - This defines itself, the business logic
GUI / Front - The Graphical user Interface ( Code )
These layers are the Minimum other Layers that COULD be possible would be Localization and other project that might grow.
But rahter simplify to directories and namespaces than using to many projects!
Comment: It is not that simple. Layers can (and most often should) be broken down into components, i.e. data layer may have an abstract (generic) part and one or more concrete implementations. Having one interfaces assembly may also result in adding dependencies to unused parts of the system.
Answer: This is akin to discussions such as "how many functions should I have in a class?" and "should each enum be defined in its own .cs file?".
I would be interested to know how many classes each of your projects has. You can think of your classes, projects and solutions as organisational units. They are there to make your life easier, and to allow you (and your team) to break the overall project into managable conceptual chunks.
If VS2008 isn't complaining, and you and your developers have no problem with 50 projects in one solution then I would not worry about it.
That said, it does sound like a rather large number - but then we know nothing about the size of your overall codebase so it's hard to comment further.
Comment: Stack Overflow have [said that they](http://highscalability.com/blog/2014/7/21/stackoverflow-update-560m-pageviews-a-month-25-servers-and-i.html):
_Have only 9 projects, others systems have 100s. Reason to have so few projects is is so compilation is lightning fast, which requires planning at the beginning. Compilation takes 10 seconds on a single computer._ With this in mind, 50 projects is more than ideal, from a speed-of-compilation perspective.
Answer: Obviously when you get to 500 then you're starting to look at "too many" it becomes impractical even to manage it.
I might suggest that you analyse "what really constitutes my application" and package that as a single solution.  Plugins are rarely considered part of the base application but add-ons to the base functionality.
If the application would cease to be useful without certain plugins, then include those in the base solution.
Other plugins might be grouped on Genre... much like the playlists on your iPod.  What does each plugin achieve on a more general level? (These are obviously rhetorical questions)  I would group plugins together in natural groups - much like PhotoShop plugins as they group on the menu.  i.e. do they affect 3D, do they affect color, do they affect geometric effects, do they affect distortion etc etc.
Answer: When I see a slow down, I tend to create a solution that has references to built versions (assemblies) of dependent projects rather than the project files (for any projects that I don't need to see the source code). I only open the source for projects I am working on - surely nobody needs to work on the source of 50 projects at one time.
If you are already referencing the dependent assemblies rather than source, then I think it is just a matter or organizational preference (organize in a way that is easiest for you to understand and maintain).


WordPress rewrite rule for RSS feed

Question: I have just moved a blog from Squarespace to self-hosted WordPress and am trying to set up a rewrite rule so that the old RSS links will continue to work for existing subscribers.
The URLs I am working with are as follow:
Squarespace: http://example.com/blog/atom.xml
WordPress: http://example.com/feed/
I sed the following code in my functions.php
<code>add_action( 'init', 'ss_feed' );
function ss_feed()
{
    global $wp_rewrite;
    $wp_rewrite->add_external_rule( 'blog/atom\.xml$', 'feed/' );
}
</code>
This has successfully caused my .htaccess file to be updated:
<code># BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^blog/atom\.xml$ /feed/ [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
</code>
However hitting http://example.com/blog/atom.xml still results in a WordPress 404. Can anyone shed any light on what might be the issue here? Note that I have WP Super Cache enabled and it has a large block inside the .htaccess as well, I can add here if folks think that might be relevant.
Answer: Refresh your permalinks within the Wordpress admin as a first troubleshooting step. That often fixes such issues.

WordPress rewrite rule for RSS feed


cron: run a process but only if it isnt running?

Question: Is there a way for me to tell cron to run an app BUT not run it if a process exist already?
Comment: Would you clarify whether the app should not run if it is already running, or if a different process is already running. Thanks
Answer: the simplest way, use pgrep
in crontab:
* * * * * pgrep processname > /dev/null || /path/to/processname -args0 -args1

Comment: No, you can't use the -f flag with pgrep inside a cronjob. The reason is that you'll match against the shell script used to run the cronjob itself.
Comment: Love the simplicity of this answer. FYI, you should be able to add the -f flag to pgrep, and you can then check the full process name, which is useful if you also want to inspect the arguments to the process as part of your condition.
Comment: When running a GUI process with cron, prepend with `export DISPLAY=:0` to prevent `Could not connect to display` errors.
`* * * * * export DISPLAY=:0 && pgrep processname > /dev/null || /path/to/processname -args0 -args1`
Answer: Run a script, instead of directly the program. There are many possibilities. For example :
MYPROG="myprog"
RESTART="myprog params"
PGREP="/usr/bin/pgrep"
# find myprog pid
$PGREP ${MYPROG}
# if not running
if [ $? -ne 0 ]
then
   $RESTART
fi

Comment: FYI -- using scalar variables to store argument lists is considered bad practice. See http://mywiki.wooledge.org/BashFAQ/050 for an example of a case where it fails.
Comment: ...similarly, `pgrep myprog; if [ $? -ne 0 ]; then ...` would be better written as `if ! pgrep myprog; then ...`
Comment: ...this latter style is not only more readable, but also less error-prone: It's easy to unintentionally disrupt the value of `$?`, for instance by adding log messages or error handling between lines.
Answer: This script will not run again if the previous instance hasn't finished. If you want to not run something if another specific process is running, see harrymc's script.
DATE=`date +%c`;
ME=`basename "$0"`;
LCK="./${ME}.LCK";
exec 8>$LCK;

if flock -n -x 8; then
  echo ""
  echo "Starting your script..."
  echo ""

[PUT YOUR STUFF HERE]

  echo ""
  echo "Script started  $DATE";
  echo "Script finished `date +%c`";
else
  echo "Script NOT started - previous one still running at $DATE";
fi

Answer: You could use a lock file in your script, but please see Process Management.
flock is one utility that can be used.
Comment: good one! now rsync over this slow line can take all the time it needs, firing within 5 minutes of the client host coming on line without manual intervention: `*/5 * * * *      root    flock /run/shm rsync -auhx --numeric-ids -e "ssh -T -c arcfour128 -o Compression=no -x" [source] [user]@[host]:[dest]`
Answer: This is usually handled by the program itself rather than by cron.  There are two standard techniques for this:
1) grep the output of ps to see whether there's a process by that name already running
2) On startup, first check for the existence of a pid (process id) file, usually at /var/run/program_name.pid, and, if it exists, read the pid out of the file and check whether that process still exists; if it does, refuse to start.  If the pid file doesn't exist or the pid in the file has gone away, then create a pid file, write your process id into it, and continue on with normal startup.
While it's technically possible to write bash pipes that will do either of these directly into your crontab, it's better to add them to the program being started (so that they'll apply no matter how it gets started) or to write a wrapper script to handle this, as harrymc suggested.
Answer: * * * * * pgrep -f "[p]attern" > /dev/null || /path/to/processname -args0 -args1
I have reused the above answer with an improvement in pattern matching. pgrep without f option doesnot match process pattern. Yet there is a problem with using f option. With f option, the shell spawning the cron is always matched and returns its pid hence the process is never restarted.
Adding a [] around one of the letters pattern matches only the process and the pid of cron shell is not returned.
Answer: Docs: https://www.timkay.com/solo/

solo is a very simple script (10 lines) that prevents a program from
  running more than one copy at a time. It is useful with cron to make
  sure that a job doesn't run before a previous one has finished.

Example
* * * * * solo -port=3801 ./job.pl blah blah


2005 Honda Pilot Subwoofer Lower Wattage than AF Headunit

Question: I have a 2005 Honda Pilot EX and I want to buy a Pioneer AVH-X5800BHS headunit for it and I heard in another StackExchange question that it had a 70W subwoofer output but I heard that my car has a 50W 2 ohm sub. I want to know if there is any way that I can limit the output wattage to 50W or if I have to keep the EQ at or below a certain level to prevent damage. Any reply would be appreciated.
Comment: You can control the subwoofer level via the head unit. Turn it down some and you'll be fine.
Answer: First and foremost, no. There is no (simple) way to specifically limit wattage output like that, nor is there a need for it. Wattage output is anything but constant, so it's really not something you can easily cap - even at constant volume different frequencies will pull different amounts of power. Your best control is the various opportunities you have to set relative volume. You can also help protect smaller subs with a HPF at 30-35hz, which would prevent them from getting signals they can't audibly reproduce anyway.
I'm not sure what you're planning with that head unit, but I don't see anything about a discrete subwoofer output in the specs. If you're planning on hooking up an external amplifier I suggest you be extremely careful for two reasons:

Most small amplifiers will have trouble driving a 2 ohm mono load.
Most larger amplifiers will be capable of ripping that speaker to pieces if you turn them up too high.

With that said, it is often ideal to have more power available on tap than is recommended for a speaker (my 300W "max" towers are safely being driven by a 440Wx2 amp). This is not because it's impossible to damage the speaker, but because extra available power means clean power. You can always turn it down to prevent over-driving the speaker, but if the amp isn't powerful enough you can easily start over-driving the amplifier, which is a great way to damage speakers with distortion. There are other benefits like cone control in challenging sections, but that's way more technical than we need to be here. Just don't overdo it - if you hear distortion, turn it down - and you'll be just fine.
Answer: In addition to @Lathejockey's answer:
Checking the manual, that headunit has a 70W/2 Ohm max. rating and ~44W continuous. The important rating is the continuous one: speakers are destroyed by heat (i.e. continuous power), not by the occasional peak load.
Comment: Do you know the RMS wattage of my sub? The only wattage it says is 50W but idk if that is peak or RMS.
Comment: I don't know. But as @Lathejockey said, that's not really important. As long as you don't turn up the bass so far that it starts to distort (which is easy to hear) you're okay.


Is the ideal reconstruction process BIBO stable?

Question: It is well known that ideal lowpass filter, i.e. the lowpass filter whose impulse response is $h(t) = \text{sinc}(t)$, is not BIBO-stable because $h(t)$ is not absolutely integrable. However, think about the ideal reconstruction process as a process that takes discrete signals to continuous time band-limited signals. In formulas, if $x_n$ is a discrete signal, then the corresponding output is
\begin{equation}
x(t) = \sum_{k = -\infty}^{+\infty} x_k \text{sinc}\left(\frac{t - kT}{T}\right).
\end{equation}
This process can be seen as the composition of a DAC, that transforms a discrete signal into the corresponding impulse-train continuous signal, and the ideal lowpass filter. Is this process BIBO?
Answer:
Is this process BIBO?

Not really. First, let's write it correctly
\begin{equation}
x(t) = \sum_{k = -\infty}^{+\infty} x_k \text{sinc}(\frac{t - kT}{T}).
\end{equation}
We can choose a bounded input sequence $x_k$ that maximizes the output as
$$x_k = \text{sign}( \text{sinc}(\frac{t - kT}{T}))$$ where $\text{sign}()$ is the signum function.
Let's evaluate that at $t = T/2$
$$x(\frac{T}{2}) = \sum_{k = -\infty}^{+\infty} |\text{sinc}(\frac{1}{2}-k)|  = \sum_{k = -\infty}^{+\infty} |\frac{\sin(\pi/2- k\pi)}{(k-1/2)\pi} | \\= \sum_{k = -\infty}^{+\infty} \frac{1}{|k-1/2|\pi} $$
which does not converge.
In practice this makes little difference since ideal reconstruction is not possible and every real DAC has a casual (but not ideal) lowpass filter.
Comment: Sorry for being a stickler but that would be $T = 1s$  A non-trivial difference between continuous and discrete signals is that continuous signals are function of a continuous  time variable with units of seconds. Discrete signal are a function of a unit-less index.
Comment: Thank you, your answer is definitely convincing. I was assuming $T = 1$ just for ease of notation.


Exclude one item from wp_list_pages( $args );

Question: I have a menu that is currently shown with wp_list_pages( 'title_li=' );
This shows all the sub pages from all the pages in the menu.
I want to exclude a page with id 56 from displaying its sub items.
When I use wp_list_pages( 'exclude=56&title_li=' ); the menu becomes huge and all over the page.
When I use wp_list_pages( 'exclude=56' ); the menu gets messed up (vertical instead of horizontal (no li) and all of them are displayed.
How can I fix this?
Answer: There's a filter called wp_list_pages_exclude that you could possibly hook into (put this in your functions.php):
function filter_wp_list_pages($exclude){
    $exclude[] = 56;
    return $exclude;
}

add_filter("wp_list_pages_excludes", "filter_wp_list_pages");

Answer: Try changing the exclude to exclude_tree, read more in the function parameters.


Reference for "almost all graphs have diameter 2"

Question: The property in the title is well-known. I am trying to find an original reference to its first appearance in print. The 4th edition of Graphs & Digraphs by Chartrand and Lesniak lists this as Theorem 13.6 and says that it's a generalization of a result by Gilbert, but gives no further reference.
Answer: I think you will find it in Moon, J. W.; Moser, L.
Almost all (0,1) matrices are primitive.
Studia Sci. Math. Hungar. 1 (1966) 153–156.
But I don't have time to visit the library to be sure and I don't see it online.
It is certainly in
Burtin, Ju. D.
Asymptotic estimates of the diameter and the independence and domination numbers of a random graph. (Russian)
Dokl. Akad. Nauk SSSR 209 (1973), 765–768.
I guess the Gilbert mentioned is Gilbert, E. N.
Random graphs.
Ann. Math. Statist. 30 (1959) 1141–1144.  It isn't clear exactly why...
Comment: The introductory paragraph of a 1981 *TAMS* paper by Bollobas available at http://www.ams.org/journals/tran/1981-267-01/S0002-9947-1981-0621971-7/S0002-9947-1981-0621971-7.pdf supports the likely Moon-Moser origin.  Also, an author search on "e.n. gilbert" at http://projecteuclid.org/ will produce his "Random Graphs" article.
Comment: I checked the Moon Moser paper, that is indeed your reference. I've emailed you a somewhat crappy but legible scan of the paper.
Answer: The result you asked about follows instantly from Fagin's proof of the zero-one law for finite graphs.  He shows that all of Gaifman's extension axioms have asymptotic probability 1, and "diameter $\leq 2$" is essentially one of the extension axioms.  Fagin's paper is "Probabilities on finite models" [J. Symbolic Logic 41 (1976) pp.50-58].  I believe the zero-one law was proved earlier by four Russians, but I don't have access to their paper and don't know whether their method immediately implies the "diameter $\leq2$" result.
Comment: The four Russians are Y.V. Glebskii, D.I. Kogan, M.I. Liogon'kii, and V.A. Talanov.  The paper is "Range and degree of realizability of formulas in the restricted predicate calculus" [Kibernetika (Kiev) 1969, no.2, 17-28; translation in Cybenetics (Kiev) 5 (1969) 142-154].  I've been told that this paper is rather difficult to read.
Comment: Thanks! I actually know this derivation, but I wanted a encapsulated reference to this precise fact.


Grid Modeler grid size

Question: Does anyone know how to increase the size of the grids for a mac with the Grid Modeler addon. I don't know if it was build for a Windows computer and the default button it list is the control button, and maybe it's a different button for the mac, but it's not changing the size of the grid. When I press "a" it changes the mode and the grid size goes from 10 to 5, and I'm still not able to change the grid size still. I found on their site where they say Ctrl or Alt + 7 or 8 may work, but that doesn't do anything either. I think it's because I am using the trackpad to scroll, so I used my wireless Mac mouse, and it still isn't working.
Comment: It's a third-party addon by the sound of it so you need to ask the author. Having said that, I believe the Mac equivalent of the  Windows control key is the command key so you could try that..
Answer: I emailed the maker, and he explained that I can not use the trackpad or the Apple mouse. It had to be a mouse with the wheel on it. also, that some macs either don't come with number keys or the number keys don't work, so he designed it to also use the brackets instead of the number 7 or 8. So you would press "Ctrl + [" or "Alt + [". (without the quotes) The same goes for the other bracket. I hope that helps anyone else.

Grid Modeler grid size


How do I reheat a casserole in the microwave?

Question: Would someone please tell me how long and at what power I should reheat a casserole or other pasta dish that has already been cooked?  Thank you.
Comment: Your question is a little confusing because you say "casserole or other pasta dish" - most casseroles aren't pasta dishes and most pasta dishes aren't casseroles. But I guess you're not asking how to reheat a plate of spaghetti, and the answers will be fine.
Comment: Also, it looks like you posted this with words in all caps because you were frustrated people misunderstood your previous question. But there's no need to get worked up - you can always edit your own question (or comment on it) to clarify.
Answer: There is no single way to answer this because:

Microwaves vary widely in power
The starting temperature of the casserole may vary
Casseroles vary in shape, size, thickness, and composition

and all of these factors will affect the time.
It is far from ideal to heat a full sized casserole in the microwave in any case; you would be better off using a conventional oven, as it will not have problems with hotspots.  Microwaves do much better with good that can be stirred to even out the heating, and this would be at the very least, aesthetically displeasing with most casseroles.
I would recommend starting with about 50% power (for a 1000+ watt microwave, higher for models with less power) to allow some time for the heat to conduct through the casserole.  Check regularly with an instant read thermometer until reads about 150 F at several spots.
It is likely to be unevenly reheated, since you are not stirring.  This is the downside of using a microwave.  Allowing it to stand for 10 minutes or so before service will help even it out.
The other downside is that microwaving to reheat will do nothing good for crispiness, browning, or texture, but that is not unique to casseroles.


How to get the total number of issues of a JIRA Project?

Question: Since JIRA API only allows to make a search request with a max result of 1000 issues, I need to know if there is a way to get the total number of issues a project so I can iterate through all thousands of issues.
IRestResponse responseIssues = client.Execute(new RestRequest("search?jql=project=" + "\"DATPROJECT\"" + "&maxResults=5000&fields=assignee,summary,timetracking,resolutiondate,resolution,worklog", Method.GET));

I am currently doing like the code above but I only get 1000 results and not 5000 that I need. I know that I can use the filter "startAt" to iterate over all results but I don't know how many issues exist.
Any ideas?
Answer: The search rest point returns total number of issues for a given JQL search. Example result from documentation
{
"expand": "names,schema",
"startAt": 0,
"maxResults": 50,
"total": 1,
"issues": [
    {
        "expand": "",
        "id": "10001",
        "self": "http://www.example.com/jira/rest/api/2/issue/10001",
        "key": "HSP-1"
    }
]

}
This "total":1 value is the one you're looking for.
Answer: Hey from rest Api I don't find any rest where you can get all issue.but if you want all issue you can get it from java side. if you need total number of issues use
long getIssueCountForProject (Long projectId)

and if you want all issues and want to iterate it use
Collection<Long> getIssueIdsForProject (Long projectId)

please refer atlassian documentation for all this method.
Thank you.
Answer: You can use maxResults=0 to get only descriptive data omitting the actual results.
For example, if we want to know the amount of open issues for the currently logged in user:
rest/api/2/search?jql=project=SP+AND+statusCategory!=3+AND+assignee+in+(currentUser())&maxResults=0

The result:
{
  "startAt": "0",
  "maxResults": "0",
  "total": "68",
  "issues": [
  ]
}

The "total" field here is just what we need.


Is a fat tail same as skew

Question: I keep hearing these terms, and it seems like both refer to the same thing: a greater probability of an event occurring at the extreme values of a distribution, far away from the mean (more than 3 standard deviations away)
Answer: The "heaviness" of the tail refers to how quickly the probability decays as you move away from the center of the distribution, while skewness deals with symmetry or lack thereof.  For instance, the exponential distribution is skewed but considered to have a fairly light tail, while the Cauchy distribution is perfectly symmetric but heavy-tailed.
Answer: As dsaxtron points out (+1), skewness refers to symmetry or asymmetry. Any symmetric distribution will have a skewness of zero - no matter how fat its tails. This is because of the third power in its definition, which allows deviations in both tails to cancel out.
Thus, there is no relationship between skewness and tail fatness.
However, and relatedly, I strongly recommend Westfall (2014), Kurtosis as Peakedness, 1905–2014. R.I.P. in The American Statistician, which extremely nicely debunks the common misconception (also found in the Wikipedia article) that kurtosis has anything to do with "peakedness". Instead, kurtosis measures the propensity to outliers, i.e., the fatness of tails of a distribution. This is because the kurtosis uses the fourth power of deviations from the mean, so positive and negative tails do not cancel out.
Comment: Kurtosis is not peakedness, but it _also_ isn't fat-tailedness unless you define it that way.  For example, (-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1) has a large kurtosis despite not having any "tail" at all past -1.  This is very unlike the tail of a power-law distribution, for instance, where once your probability density goes over that predicted from a Gaussian, it stays there.
Comment: Wellllllll, only for certain common distributions.  Even those which are strictly decreasing can decrease irregularly in such a way that the ultimate shape of the tail gives the opposite answer from the kurtosis.  I would say rather that kurtosis tends to indicate the fatness of the tails, just as skewness tends to indicate asymmetry.  (Because, of course, you can have zero third moment in a radically asymmetric distribution.)  That is, unless you _define_ fatness as what kurtosis tells you (e.g. exponential is "fat" compared to 0.9 Gaussian + 0.1 power law).
Comment: As demonstrated in Kendall and Stuart, moment kurtosis is *neither* peakedness nor heavy-tailedness, though it's associated with both. As Moors (Moors JJA (1986) The meaning of kurtosis: Darlington reexamined. The American Statistician 40 (4) 283-284) points out, kurtosis is a monotonic function of Var$(Z^2)$, (where if X is the variate under consideration, $Z = (X-\mu)/\sigma$ -- a standardized variate); so kurtosis then corresponds to the variation of $X$ about $\mu\pm\sigma$. As a result, low kurtosis is sometimes referred to as having "shoulders" and high kurtosis as "lack of shoulders".
Comment: Yes; and originally developed out of Yule&Kendall I believe. But anyway, in Volume I of Advanced Theory of Statistics. At least it was in 2nd and 3rd edition to my recollection; they have a table that shows that neither heavier tail nor higher peak necessarily leads to more kurtosis. It's some decades since I looked at that though, so my recollection of the specifics of their counterexamples is hazy. I'd say that the ability of the tail to impact kurtosis is generally greater than the peak, but it's more than just the tail.
Comment: Hum. I just added the [tag:kurtosis] tag to the question, since I believe it is helpful to understand the matter... and it turns out the tag wiki contains the same error. Gotta edit that.
Comment: @RexKerr: point taken, and for distributions with compact support, kurtosis does not measure the tendency to produce outliers, either, so "the fourth moment around the mean" in fact is the only correct definition of kurtosis. Nevertheless, can we agree that fat-tailedness is indeed a useful way to think about kurtosis for distributions with unbounded support?
Comment: @Glen_b: thanks! By "Kendall and Stuart", I assume you are referring to their *Advanced Theory of Statistics*, Volume 1, reissued by Stuart & Ord?
Answer: Sorry I am late to this thread. There have been several points of view expressed in the comments that express confusion about outliers and tails.
Rex Kerr's comment that kurtosis is not fat-tailedness is misguided. His counterexample with no outliers (and therefore, as he claims,  no fat tail) is  $(-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)$. I will convert those data to the empirical distribution $x = (-1,0,1)$, with $p(x) = (1/11, 9/11, 1/11)$ and calculate excess kurtosis $k = 2.5$.
His comment is that this example shows "large kurtosis despite not having any tail."
To shed some more light on this, let's simplify the example. Consider instead the Bernoulli distribution $x = (0,1)$, $p(x) = (1-p,p)$. There is even less in the tail of this distribution, yet kurtosis tends to infinity as $p$ tends to $0$. For example, imagine that this is a model for a belief that the moon landing was faked, with $p(x) = (.94, .06)$. I think we would all agree that the person who believes that the moon landing was faked is an "outlier." The excess kurtosis of this distribution bears that out, with $k = 11.7$.
The degree of "outlier-ness" can be characterized by $z$-score: Here the person who thinks the moon landing was faked has $z$-score $z= (1 - .06)/\sqrt{.06*.94} =  3.95$, quite a ways into the tail of the $z$-distribution.
If belief in the hoax were more rare (which apparently it is not, according to polls), such as $0.1\%$, then that person would have a $z$-score of $z= (1 - .001)/\sqrt{.001*.999} =  31.61$, which, all would agree, is an outlier: If these data were from a normal distribution, the likelihood of seeing an observation $31.61$ standard deviations from the mean or more would be so small as to be called impossible. Also, the excess kurtosis is now $k = 995$.
So, despite the fact that the normal distribution has tails that extend to infinity, the Bernoulli distribution is arguably "heavier-tailed" for small $p$ in the sense that it can produce extreme observations greatly exceeding what the normal distribution is capable of.
Kurtosis is, by definition, the expected value of the $Z$ scores, each raised to the fourth power. When you have extreme $z$-scores (outliers), you have high kurtosis.
There are infinitely measures of tail extremity. Kurtosis is a measure of tail extremity that focuses on the $z$-scores, thus, by this measure, a distribution with finite support can be heavier-tailed than one with infinite support.
This definition is perfectly logical, and quite applied. The reason we care about tails is because we care about outliers. The normal distribution simply does not produce outliers 31 standard deviations from the mean, by any practical way of thinking about it. The Bernoulli distribution, on the other hand, produces such values quite easily.
The focus on outliers is quite applied because statistical procedures of all kinds are affected by outliers. Take the variance estimate, for example: Its accuracy depends strongly on kurtosis, because the value of the estimate is strongly dependent upon whether or not outliers are in that particular sample. Power of means tests are also affected by outliers.  So the interpretation of kurtosis as a measure of outliers, and not peak or center, is not only correct, it also lines up correctly with statistical applications.
Back to Rex's "counterexample," he could make more extreme by letting $x = (-1,0,1)$, $p(x) = (.001, .998, .001)$. The excess kurtosis is now $k=497$. The reason is that the $+1$ and $-1$ responses are now extreme outliers, $22.4$ standard deviations from the mean. This distribution is heavier-tailed than the normal distribution in the sense that it produces occasional values $22.4$ standard deviations from the mean.
Also, while Rex's counterexample, and my enhanced version of it suggest that higher kurtosis corresponds to a "peaked" distribution, there are easy examples where the distribution is not peaked with the same kurtosis.  Take, for example, $x = (-1000, -2,-1,0,+1,+2, +1000)$, $p(x) = (.001, .25,.20, .098, .20, .25, .001)$. This distribution is "U" shaped, not peaked, and there are occasional outliers. Its excess kurtosis is $k=496$, similar to my enhanced counterexample, and the most extreme values are similarly $22.3$ standard deviations from the mean.
In summary, kurtosis does measure the tail (potential outliers) of the distribution, because it is the expected value of $Z^4$. If you have some large $Z$-values, then you have large kurtosis.
I give three mathematical theorems (for which there obviously can be no counterexamples) in my TAS article to support the connection between kurtosis and tails. To my knowledge, there are no theorems connecting kurtosis to the shape of the peak, or even to the probability content in the $\mu \pm \sigma$ range. If anyone has such a theorem, I'd love to see it.
Comment: Or maybe we care about power law phenomena.  Or maybe about lognormal distributions.  Or possibly about Student t distributions with small degrees of freedom when we're doing ANOVA with only two or three replicates.  Perhaps when studying extreme events like floods and finance.  Or times for random walks to recur.  I'm sure you can think of other applications, too.
Comment: Thanks whuber. Outliers are indeed important. The focus that many have placed on the central portion of the distribution as regards kurtosis, rather than on the outliers, is exactly the problem that I have been trying to point out. That interpretation of kurtosis is akin to the tail wagging the dog: Yes, you can understand kurtosis as a concentration of mass well inside the outliers, but it is more sensible and practically relevant to view kurtosis as outliers relative to the central mass. After all, to define something in terms of outliers is pretty unreliable. But central mass is stable.
Comment: If we were to understand @RexKerr's comment as motivated by the concept of a [*heavy tail* or a *long tail*,](https://stats.stackexchange.com/questions/168851) then it is fully justifiable.  The kurtosis may be arbitrarily large even for the lightest-tailed distributions.  That doesn't look "misguided" to me.
Comment: It is misguided in the sense of why we care about tails for practical purposes, which is that we care about outliers.

Is a fat tail same as skew


Exporting crosstab query results to Excel from within MS Access

Question: I've been trying with limited success to export a crosstab query result set to Excel using Access 2003. Occasionally, the export works correctly, and Excel shows with no errors. Other times, using the exact same query parameters, I get a 3190 error - too many fields. I am using the TransferSpreadsheet option in a macro that is called from VB code.
The macro has the following parameters:
Transfer type: Export
Spreadsheet type: Microsoft Excel 8-10
Table Name: (this is my query name)
File Name: (Excel output file, which exists in the directory)
Has Field Names: Yes
The query should not produce any more than 14 columns worth of information, so the Excel 255 col limit should not be a problem. Also,the data in the database is not changing during the time I am querying, so the same query will produce the same result set.
One of the only solutions I have read on the net thus far is to close the recordset before running the macro, but this is hit or miss.
Your thoughts/help are greatly appreciated!
Comment: Are you exporting to the same Excel file each time? Does the crosstab return a variable number of columns? And, just vaguely possible, have you installed sp3 and the sp3 hotfix?
Answer: I've got one working as an MS Access Macro.
It uses an OutputTo Action with:

Object Type=Query
Object Name=[WhateverQueryName]
Output Format=MicrosoftExcel(*.xls)
Auto Start=No
(all the rest blank)

I hate using Macros in MS Access (it feels unclean), but perhaps give that a try.
Answer: If you're willing to make use of a little vba rather than stick exclusively with macros, the following might help you. This module takes any sql you throw at it and exports it to a defined location in an excel worksheet. After the module are two examples of it's use, one to create a completely new workbook, one which opens an existing one. If you not confident with using SQL just create the query you want, save it and then supply "SELECT * FROM [YourQueryName]" to the Sub as the QueryString parameter.
Sub OutputQuery(ws As excel.Worksheet, CellRef As String, QueryString As String, Optional Transpose As Boolean = False)

    Dim q As New ADODB.Recordset
    Dim i, j As Integer

    i = 1

    q.Open QueryString, CurrentProject.Connection, adOpenForwardOnly, adLockReadOnly

    If Transpose Then
        For j = 0 To q.Fields.Count - 1
            ws.Range(CellRef).Offset(j, 0).Value = q(j).Name
            If InStr(1, q(j).Name, "Date") > 0 Or InStr(1, q(j).Name, "DOB") > 0 Then
                ws.Range(CellRef).Offset(j, 0).EntireRow.NumberFormat = "dd/mm/yyyy"
            End If
        Next

        Do Until q.EOF
            For j = 0 To q.Fields.Count - 1
                ws.Range(CellRef).Offset(j, i).Value = q(j)
            Next
            i = i + 1
            q.MoveNext
        Loop
    Else
        For j = 0 To q.Fields.Count - 1
            ws.Range(CellRef).Offset(0, j).Value = q(j).Name
            If InStr(1, q(j).Name, "Date") > 0 Or InStr(1, q(j).Name, "DOB") > 0 Then
                ws.Range(CellRef).Offset(0, j).EntireColumn.NumberFormat = "dd/mm/yyyy"
            End If
        Next

        Do Until q.EOF
            For j = 0 To q.Fields.Count - 1
                ws.Range(CellRef).Offset(i, j).Value = q(j)
            Next
            i = i + 1
            q.MoveNext
        Loop
    End If

    q.Close

End Sub

Example 1:
Sub Example1()
    Dim ex As excel.Application
    Dim wb As excel.Workbook
    Dim ws As excel.Worksheet

    'Create workbook
    Set ex = CreateObject("Excel.Application")
    ex.Visible = True
    Set wb = ex.Workbooks.Add
    Set ws = wb.Sheets(1)

    OutputQuery ws, "A1", "Select * From [TestQuery]"
End Sub

Example 2:
Sub Example2()
    Dim ex As excel.Application
    Dim wb As excel.Workbook
    Dim ws As excel.Worksheet

    'Create workbook
    Set ex = CreateObject("Excel.Application")
    ex.Visible = True
    Set wb = ex.Workbooks.Open("H:\Book1.xls")
    Set ws = wb.Sheets("DataSheet")

    OutputQuery ws, "E11", "Select * From [TestQuery]"
End Sub

Hope that's of some use to you.
Comment: I tried your code and it didn't actually work on a cross tab query for me.
Answer: A workaround would be to append the query to a table first and then export that.
DoCmd.SetWarnings False
 DoCmd.OpenQuery "TempTable-Make"
 DoCmd.RunSQL "DROP TABLE TempTable"
 ExportToExcel()
DoCmd.SetWarnings True

TempTable-Make is a make-table query based on the crosstab.
Here is an appropriate ExportToExcel function you can use.
Answer: The following code exports queries using the function in excel that was specifically designed to import recordsets CopyFromRecordset. Note that field names need to be added as this function only grabs the actual data. This code works even on crosstab queries.
'---------------------------------------------------------------------------------------
' Method : MoveQueryToWorksheet
' Author : ROLU
' Date   : 09.05.2018
' Purpose: Moves queries to specific worksheet in an Excel Workbook
'---------------------------------------------------------------------------------------
Function MoveQueryToWorksheet(wkb As Excel.Workbook, wks As Variant, strSQL As Variant) As Boolean
On Error GoTo MoveQueryToWorksheet_Error

'Dim rs As New ADODB.Recordset
'rs.Open strSQL, CurrentProject.Connection, adOpenForwardOnly, adLockReadOnly

Dim dbs As DAO.Database
Set dbs = CurrentDb
Dim rs
Set rs = dbs.OpenRecordset(strSQL)

Dim lCol As Long
For lCol = 0 To rs.Fields.Count - 1
    wkb.Worksheets(wks).Cells(1, lCol + 1).Value = rs.Fields(lCol).Name
Next lCol
wkb.Worksheets(wks).Range("A2").CopyFromRecordset rs

'Close out and clean
Set rs = Nothing
MoveQueryToWorksheet = True

    Exit Function

MoveQueryToWorksheet_Error:
On Error GoTo 0
Set rs = Nothing
MoveQueryToWorksheet = False

End Function


teamcity run several build projects with on revision

Question: I would like to run several Team-City build projects with the same SVN-revision. Is this possible?
Answer: Take a look at snapshot dependencies. If build configuration A has a snapshot dependency on B then when A is triggered B will be triggered too and both will run on the same sources.
If A and B have same VCS roots then builds of these configurations will be built on the same revision. If A and B have different VCS roots, then TeamCity will take sources on the same moment of time.
Answer: Sure, create several build configurations, and set them to trigger on SVN revision changes to a shared repository root.
You can also have one build trigger another.
Comment: When one build triggers another, do both use the same revision?
Comment: Thats really up to you...if you want them to then yes they can
Comment: This can cause a build storm if people frequently check-in. Better to build when needed.
Answer: SnapShot builds allow this, and reuse builds. So, if you have 5 steps, and steps 1-4 were run last week, running step 5 won't require running 1-4 again. Conversely, running step 5 would run 1-5 if none of them had been run before, and all will use the same checkout revision numbers.
For a simple case of 3 steps, just:

Set Build 3 to have a snapshot dependency on Build 2.
Set Build 2 to have a snapshot dependency on Build 1.

Now you'll have Build 1 -> Build 2 -> Build 3.
This does given you neat charts:


Does multiplying a nonzero scalar to a vector in a linearly independent set preserve linear independence?

Question: Let $\{v_1,v_2,\ldots,v_n\}$ be a linearly independent subset of a vector space $V$ over a field $F$. If $0\ne c\in F$, is $\{cv_1,v_2,\ldots,v_n\}$ linearly independent over $F$?
Answer: Yes. $$a_1(cv_1) + a_2v_2 + ... a_nv_n = 0 \implies a_1c=0; a_2=0; ... a_n =0$$ and since $c \neq 0$, the first equality on the right side of the implication boils down to $a_1=0$.
Comment: OH. RIGHT. THANKS.
Answer: Yes, since any linear dependence between $v_1,\ldots,v_n$ can be turned into a linear dependence between $cv_1,\ldots,v_n$ by dividing the first coefficient by $c$.


Spacetime and the conservation laws

Question: I'm reading Peter Atkins' book, Galileo's Finger, and in the chapter on energy, he makes the points that the conservation of momentum stems from the shape of space (that it's smooth and not lumpy) and that the conservation of energy stems from the shape of time (that it's smooth and not lumpy). I'm not totally clear on how the shape of spacetime leads to the conservation laws. Could someone elucidate the relationship, in layman's terms?
Comment: [John Reny's answer](http://physics.stackexchange.com/a/119161/44176), is to the point. Shift symmetry of the space means that if a relation for a system is valid in $x$, is also valid if the system is shifted to $x+dx$, so having this symmetry and calculating the total momenutm of a system, it leads to $dp_{tot}/dt = 0$, which is the consnervation of momentum. Noethers theorem states that whenever a system has some **symmetry** another (associated) **quantity is conserved**. Whether this is a *space* property per se (and not a *system* property), is sth that can be debated.
Answer: You might want to have a look at the answers to the question Can Noether's theorem be understood intuitively?. This is almost a duplicate of yours, though I suspect it might be pitched at slightly too complex a level for a non-physicist.
The conservation laws are related to a symmetry through a theorem proved by the mathematician Emmy Noether in 1915, and widely referred to as Noether's theorem.
For example conservation of momentum is related to position shift symmetry. This symmetry means that if you do some experiment, then move your kit some random distance in space and do the experiment again you'll get the same results. There are obvious objections to this: for example an experiment done on Earth's surface may well give a different result to one done in the weightless conditions of the International Space Station. But the experiment includes all interacting systems, so that includes the Earth (and the Sun, etc). If you moved the whole Solar System some random distance in space and redid your experiment you'd get the same results.
In a similar way conservation of energy is related to time shift symmetry. This symmetry means that if you do some experiment, then wait for some some random time and do the experiment again you'll get the same results. The experiment will give the same results tomorrow as it does today.
It's a long time since I read Galileo's finger and I don't remember exactly what point Atkins is making. However it should be obvious that space shift symmetry only works if spacetime is (on average) the same everywhere, otherwise moving in spacetime would affect your experiment. I assume that this is what Atkins means by not too lumpy.

Spacetime and the conservation laws


Scaling a sparse matrix

Question: I want to apply sparse PCA to a sparse matrix. I was wondering if scaling to mean 0 and unit variance would be appropriate given that my input is sparse?
Answer: Sparse matrix is a matrix that has a lot of zeros. Technically, we store such matrices in a way that is more computationally efficient, by storing only non-zero elements, what saves us some memory. There are also specialized algorithms that make computations on sparse matrices more efficient, that on non-sparse matrices by using the fact that a lot of values are zeros.
Now, going back to your question, you cannot really scale the zeroes in the sparse matrix, since $0/c = 0$, you would scale only the non-zero elements. You can center them by subtracting the mean, but first of all, the mean is probably already close to zero if most of values are zeros. Second, this would make your matrix non-sparse, so it would grow in the memory. So centering and scaling does not sound like something that you really want to do.
As described in this thread there are ways how you could make use of the sparsity when doing PCA. Additionally, there are algorithms designed for sparse data, e.g. scikit-learn has RandomizedPCA method that handles them. I would first try some of the approaches designed for sparse data, rather than making it non-sparse. Of course, if after transforming it into non-sparse format it still fits your memory, you could just proceed as usual and ignore the fact that it is sparse.
Comment: @BlueSky SparsePCA creates sparse representation of the data, it has nothing to do with data being sparse.
Comment: Thanks for the reply. The memory is not an issue here. Do you suggest doing the regular scaling then?
Comment: @BlueSky why not?
Comment: My concern is that scaling a matrix with lots of zeros might be an issue for sprasePCA? but I haven't read anywhere that it might be an issue. But I still need to double-check that with others who have more experience

Scaling a sparse matrix


Assertion failure message: java.lang.OutOfMemoryError: Java heap space in Jmeter

Question: Assertion failure message: java.lang.OutOfMemoryError: Java heap space
Comment: OperationNotAllowed (caused by NullPointerException)
Answer: This indicates that JMeter lacks Java Heap space. By default JMeter allocates for itself 512MB which is fine for tests development and debugging but not enough for the load test. I would suggest increasing this setting to ~70% of your total available physical RAM.
Look for the following line:
HEAP=-Xms512m -Xmx512

in

jmeter file - if you're using Linux, Unix or MacOSX
jmeter.bat file - if you're using Windows

and increase -Xmx setting accordingly.
You may also need to uncomment and tweak NEW="-XX:NewSize=128m -XX:MaxNewSize=128m" line by the same factor and play with GC settings.
See 9 Easy Solutions for a JMeter Load Test "Out of Memory" Failure guide for more detailed explanation of JVM settings and some more JMeter performance tweaks.
Answer: You need to increase the memory of java process that you are using for JMeter.
It iss normal as JMeter by default has a very low heap allocation. It can be controlled using -Xmx parameter.
There is a line in  jmeter.bat for windows or jmeter.sh for non window platform script which recommends launching JMeter as
JVM_ARGS="-Xms512m -Xmx512m" jmeter.sh

You can increase maximum heap size to the extent where you stop receiving these errors. I would suggest you to set it to more than 50% of your available RAM on the system that you are using.
Answer: I had some times problems with the logs, if you use the view results tree or view results in table options they store all the info in memory and that can create memory problems. To avoid that you can increase the memory as The_Amol said or/and save that info directly in a file with the Data Writer.


Electrostatics and potential of points around charged plates

Question: For an infinite plane charged surface electric field is constant above it no matter how far we go from the surface. So if the electric field remains constant in magnitude, how can the potential difference vary with distance .
I am confuse as with distance if potential decreases electric field strength also decreases.and the force on another charge will also decrease if it goes it weaker areas of electric field strength.
And in case of infinite sheet, EFL remains constant and hence the force but potential decreases with distance if the sheet is postive surface charged density.
Comment: Possible duplicate of [Electric Potential on an infinite plate](https://physics.stackexchange.com/q/208478).
Answer: The electric field $E$ is uniform, like that in a parallel plate capacitor. Because the plane is infinite in size it looks the same no matter how close to it or far from it you are. The electric field from the plate does not get weaker as you get further from the plane.
As is often the case when dealing with infinities, the absolute potential at any point is difficult to define. We usually define the potential as being zero at an infinite distance from the charged object, where the electric field is assumed to be zero. But in this case it never reaches zero even at infinity.
However, there is no problem in defining the potential difference between two points : it is simply $E$ x distance between the points. We could even define the potential to be zero at the plane - as we do when defining gravitational potential energy in a uniform field above a flat Earth, defining zero potential to be at ground level.
There is no conflict between a constant value of $E$ and a potential difference (increase or decrease) which varies with distance, just as in the gravitational case a constant value of $g$ gives a potential difference $gh$ per unit mass between two points a distance $h$ apart. $E$ is the force per unit charge, whereas potential $\phi$ is the energy per unit charge done to move the charge through a distance $x$ against that force. The force can be constant while we do a variable amount of work depending how far we move.
Comment: Sorry Akash, I am not sure I understand your question. The electric field in space is like the landscape. The potential is like height above sea level, and equipotential lines are like contours on a map, joining places of equal height. The electric field strength is like the slope of the land, 1:1 for very steep,  1:10 for a gentle hill.
Comment: ... The potential at any point (height above sea level) is always constant whether the electric field strength is zero (land perfectly flat) or very large (land very steep)  - unless charges are moving about (earthquakes which change the landscape).
Comment: Alright this makes sense.But when  can we find potential of a point to be constant.is it when we have no electric field lines or also in some other case
Answer: The electrostatic potential difference between two points $\vec r_1$ and $\vec r_2$ is defined as $$\phi=-\int_{\vec r_1}^{\vec r_2} \vec Ed\vec r$$ Thus for a constant electric field $\vec E$ with absolute value $E$ and an integration path in field direction, the potential difference becomes $$\phi=-E ∣\vec r_2 - \vec r_1∣=-E d$$ Thus, in a constant homogeneous electric field of strength $E$, the potential varies linearly with distance $d$ between two points on the same field line.


Allow users to sign into exchange email with their own account | One email address multiple users

Question: we have a "secure" mailbox which is set up in a specific manner, which is used by multiple users. As with other mailboxes, we just added it as a shared mailbox to the users Outlook. The problem is that emails sent from that mailbox land in the user's mailbox sent directory, which is against our policy. The sent email should be in the "secure" mailboxes sent folder and shouldn't touch the user's at all.
Our second approach was to just add the "secure" mailbox as a second mailbox to the user's outlook profile (not as shared mailbox). The problem here is that every user needs to know the password of the "secure" mailbox, which isn't really desirable.
Is there a way to configure the mailbox or make changes to the exchange set up to allow the users to sign into the "secure" mailbox with their own account?
thank you
Answer: There are two methods to save the sent items to the shared mailbox by default.
Method 1: Set the DelegateSentItemsStyle registry value on the Outlook client
Method 2: Configure the mailbox to save a copy of the message to the Sent Items folder of the shared mailbox in Exchange Online or in on-premises Exchange Server
See Messages sent from a shared mailbox aren't saved to the Sent Items folder of the shared mailbox in Outlook for more details.


What if a TCP handshake segment is lost?

Question: In TCP 3-way handshake, 3 segments will be sent (SYN, SYN ACK, ACK). What if the third segment(ACK) is lost? Is the sender going to resend the segment or give up establishing the connection? And how do the two hosts know the segment is lost?
Comment: https://tools.ietf.org/rfc/rfc793.txt will explain what happens.
Comment: @EdHeal: can you point to a specific part?
Comment: @EdHeal this link just tells nothing.
Answer: TCP has a sequence number in all packets. Hence it's easy to know if a packet was lost or not. If a host doesn't get an ACK on a packet he just resends it.
In most cases though, even if that ACK was lost, there will be no resending for a very simple reason. Directly after the ACK, the host that opened the TCP protocol is likely to start sending data. That data will, as all TCP packets, have an ACK number, so the recipient would get an ACK that way. Hence, the sender of the SYN-ACK should reasonably not care that it didn't get the ACK, because it gets an "implicit" ACK in the following package.
The re-send of the SYN-ACK is only necessary of there no data is received at all.
Update: I found the place in the RFC that specified exactly this:

If our SYN has been acknowledged (perhaps in this
  incoming segment) the precedence level of the incoming segment must
  match the local precedence level exactly, if it does not a reset
  must be sent.

In other words, if the ACK is dropped but the next packet is not dropped, then everything is fine. Otherwise, the connection must be reset. Which makes perfect sense.
Comment: ACKing an ACK would make transmission of actual data impossible.
Comment: The final ACK of the handshake is not itself ACK'ed, though.
Answer: I am not an expert on this particular situation, but I suspect what will happen is the client will think it is connected but the server will not.  If the client tries to send data to the server, the server will reject it and send a RST packet to the client so it can reset its "connection".
Comment: Found it: "If our SYN has been acknowledged (perhaps in this incoming segment) the precedence level of the incoming segment must
match the local precedence level exactly, if it does not a reset must be sent." In other words, if the ACK and *only* the ACK is dropped, the connection becomes established. If more things are dropped, there is a reset.
"
Comment: The server sees the connection as established when sending the SYN-ACK. But this may be an implementation detail, I haven't found the actual specifications for what to do in this case. Maybe there aren't any.
Comment: @LennartRegebro: according to [RFC 793 Section 3.4](http://tools.ietf.org/html/rfc793#section-3.4), the server does not enter the `ESTABLISHED` state until it receives the final ACK. When it sends the `SYN+ACK`, it is still in the `SYN-RECEIVED` state. The client enters the `ESTABLISHED` state when it receives the `SYN+ACK`.


What is the difference between "that's odd", "that's weird", and "that's strange"?

Question: What is the difference between that's odd, that's weird, and that's strange?
Comment: What about *bizarre, exotic* and *eccentric*? Add them to your question if you think they can be in the list too.
Comment: The differences would be largely dependent on the local culture.  Particularly among high school and college students particular terms will pass into and out of favor in the local community, and so the meaning will be shaded by that.
Answer: While they may be used interchangeably in casual conversation, they actually have different meanings. From an etymological dictionary:

Odd (a jut of land): something not usual or expected. Has no special positive or negative connotation. Winning a lottery would be odd but neither weird nor strange.
Weird (fated): Something supernatural or beyond human understanding. A fortune-teller predicting your future would be weird, but probably neither odd nor strange.
Strange (foreign): Something unfamiliar. A type of material (rock, cloth, or such) you've never seen before would be strange but not weird, and odd only if it were otherwise unusual or rare.
Comment: Thank you!!! I think these fine connotations are surely present in the native speakers' subconscious when they use these words.
Comment: Another thing to keep in mind is these are all subjective experiences; what is odd to one person may be strange but not odd to another, weird only to a third, all three to another person, and none to someone else.
Comment: nicely put
Answer: There isn't a lot of difference between them - they can be used almost interchangeably.  To the extent that there is a difference (and anyone pays attention to the fine gradations in the terms), then:

"That's odd" indicates the least surprise.
"That's strange" indicates a bit more surprise.
"That's weird" indicates more puzzlement and disbelief.

None of them expresses outright disbelief in whatever is being discussed, but there is always a background sentiment of "that should not be happening; are you sure it did?".


How time dilation happens by velocity?

Question: i got many explanation and proving that relative velocity causes time dilation. Einstein's moving light experiment proves it. but that is a clock works with light detector. as detecting the light gets latter the clock works slowly. but in reality how a real watch can be slowed down? And won't the man feel that the time is moving slowly as he knows the general speed of the clock? Sources says that if a man goes to space with very high speed if he returns after few years as his clock moved slowly earth would be moved for many years forward. But my doubt is won't he feels the fact that his clock was slow and he spend many years in space? If he won't feel it how does it happens? and how is he not getting older?
Comment: Hi Selvaratnam. Your question has finally prompted me to post the canonical Q/A on time dilation that I've been meaning to post for ages. Have a look at [What is time dilation really?](http://physics.stackexchange.com/questions/241772/what-is-time-dilation-really).
Answer: Have you ever draped a measuring tape from point A to point B in a looping indirect path and asked yourself why the path length of the tape is longer than the direct path between A and B?
The answer is that tape measures don't measure distances between points. They measure the length of the path they are on.
Well, it turns out clocks don't measure the time between points. No clock does. Not a light clock. Not a human brain. Not radio carbon dating. Nothing does that. Just like no tape measure measures distance, it only is capable of measuring the length of its own path.
So there is a 4d spacetime. Imagine the z direction as time. Each xyz giving and xy spatial point and z giving the time. Then a particle at rest is a vertical line. And a particle moving in the x direction is a line in the xz plane and a the steeper the line, the slower the particle is going. Each point just spells out a place and time something was located. It gives a when-where.
So clocks make paths in the 4d space. And like a tape measure they are only capable of measuring the length along the curve they actually make. You could have a straight path. Or a curvy one and the measurements will be different.
And nothing does anything other than measure along the path it goes.
You brain, the light clock, a spring clock, a quartz clock, each one changes not based on time, but along the length of their own path. Just like the tape measure makes its marks along its own path.
So now by moving clocks along different paths it is up to us to experimentally find out what lengths look like in the 4d space.
And it's different than you might expect. For instance, the direct path between one when-where and another when-where gives the longest length (not the shortest).
And we also learn in general relativity that passing through a region in a deeper gravity well could make your path shorter. So the longest path from here-now to the other side of the sun six months later isn't to go straight towards the sun at a slower speed, but instead the longest path is to go around the sun like the earth does.
In fact, we found out that is why the earth goes around the sun. When you learn the way the world is, and replace your ideas about what is natural with those ideas then the world actually makes more sense.
Comment: i didn't get it exactly, but what you are saying is that the man who travels also feels like less time than the man in earth and not only a light detecting clock all clock's rotating speed is related to its velocity. is it?
Comment: @SelvaratnamLavinan All clocks (in brains, with light, quartz, spring, whatever) measure the length of its own path in 4d which depends on the shape and the deepness of the gravitational well in the regions it travels.
Comment: one more doubt with this time dilation concept we can travel to future. is there any concept to travel to past?
Comment: @SelvaratnamLavinan Muons travels to the future, it's how we see them even though they live so short and are created so far away. Travel to the past is different.
Comment: ya i understood that travel to future happens as we move to future faster. is there other concepts like this to travel to the past? or is it impossible as of now.
Answer: Here's a very vague analogy. If we walk at the same speed, but in different directions, say in straight lines, then we would feel as if we are travelling at the same speed but if I measure your distance travelled in my direction, you would have travelled less than I in the same amount of time. If you think of the road as my perspective, then you could say that in my perspective you travelled slower than I. Likewise in your perspective I travelled slower than you. Note that this remains true if you and I were robots that just mindlessly measure each other's travels in our individual perspectives.
In reality time and space are part of the same spacetime continuum, and our paths are not paths in space over time, but paths in spacetime. In a vaguely analogous sense to the above paragraph, each of us feels normal in our own perspective, but observe the other to be travelling differently when viewed from our perspective. This is not merely a mental phenomenon, as the analogy suggests. We literally travel normally, just in a non-parallel direction in the spacetime continuum.
If you think about it carefully, it also explains the twin-paradox because one twin travels in a constant direction in spacetime, whereas the second has to change direction if he ever wants to return to a point with the same space coordinates as the first twin. The twins end up at different time coordinates.
Answer: I doubt there is an "intuitive" way to describe time dilation, since most people's intuition suggests against it, but there is probably a way to get the general idea without using a bunch of math.
So, the starting point for understanding the theory is that, as you've probably heard many times before, the speed of light is always constant for all observers. We know this through observations and measurements, and these observations are the ones that go against our intuition, and this presents a problem for pre-relativistic theories.
Trowing a ball inside a moving train
To understand why this is a problem, imagine what happens if you are standing in a moving train, and throw a ball at a certain speed in the forward direction of train's movement? To all observers inside the train, this ball will appear to be travelling at a certain speed $v$ until it hits the front of the train (ignoring forces like friction and gravity for the moment). But, to stationary observers outside the train, looking at the ball through the train's window as the train passes by, ball will appear to be travelling much faster, its speed being accumulated to the speed of the moving train. These two observers, having different (but constant) speeds relative to each other, are said to be in different reference frames.
Turning on a flashlight inside a moving train
Now imagine you wanted to measure the speed of light using a flashlight, inside a moving train. To measure the speed of light, you place two observers on the train, equipped with two synchronized clocks, one at the back of the train and the other one at the front of the train. The back observer fires the light-beam exactly as he passes a certain point on the stationary train station and marks the time on his clock, and the front observer marks the exact time the light-beam hits the front of the train. Diving their distance by the measured time gives them the speed of light, $c$.
At the same time, two carefully placed stationary observers are standing next to the train tracks, again equipped with two synchronized clocks. They place themselves so that the first of them is at the mentioned point on the train station (to record the moment the light-beam was sent), and the other one is placed at the position where the light will hit the train's front clock (the one inside the train, equipped with the sensor), but relative to train tracks; let's say the second stationary observer really needed to repeat the experiment several times to get this position accurately enough.
What do the stationary observers measure?
First of all, two stationary observers check their clocks and the distance between them, and it turns out the speed of light was again $c$. It didn't "add up" to train's speed at all this time, unlike the ball from the first experiment. But they also notice the weirdest of things: while the first observer saw the first train clock to show the same time as his stationary clock, the second observer (seeing the light-beam hit the front train's sensor) noticed that the clock on board the train was out of sync with his outside clock; it seemed to be running slightly slower. When the front was showing 0:20, the outside front clock was already at 0:21.
Which of the observers actually experienced the dilation?
At this point, outside observers conclude that the train observers must have experienced dilation; after all, after reuniting, they will all agree that both back clock met at 0:00, and front clock were out of sync in exactly the same fashion (front train clock at 0:20, front ground clock at 0:21).
But, as it turns out, when moving at a constant speed, no frame is "privileged". For the observers in the train, the two clocks outside the train didn't appear synchronized at all in the first place! In fact, when the back clocks aligned at 0:00, for the train observers, it seemed like the front ground clock was out of sync, and already showing 0:02!
So, from the train observers perspective, it seemed like ground observers experienced dilation, because the out-of-sync clock was supposed to show 0:22 at the moment they aligned.
Why is this so unintuitive?
First of all, relativistic effects are hardly noticeable unless you are observing reference frames moving at near the speed of light, which is something rarely observed in everyday life, by everyday people. Our intuition prefers the "safety and comfort" of the throwing ball experiment, because this is what we can perceive in everyday scenarios.
Next, unless you introduce acceleration, time dilation and other relativistic effects only exist as a perceived difference from observers in different frames of reference. No matter how fast you are moving, if you are moving at a constant speed (i.e. don't experience any inertial forces like the ones you experience when riding in an elevator and it slows down), your clocks, lengths, speed of light, and all physical laws as we know it will behave exactly as always. This is another reason why it's unintuitive; you can never observe any effects of relativity on yourself.

How time dilation happens by velocity?


How do I send a NavigationCommand to a control?

Question: FlowDocumentReader doesn't have a GoToPage method, but it supports NavigationCommands.GoToPage RoutedUICommand.
How do I send NavigationCommands.GoToPage with parameter (for example: 1) to my FlowDocumentReader from within my code (not using xaml)?
Thanks,
   Yariv
Edited:
Thanks! But though I can send the command with your help, I don't get the expected results. This is the code (and I tried to use FirstPage instead of PreviousPage too):
if (NavigationCommands.PreviousPage.CanExecute(null, this) == true)
{
    NavigationCommands.PreviousPage.Execute(null, this);
}

Even though the if statement is true and the inner code is being executed, the FlowDocumentReader stays in the last page...
Answer: FlowDocumentReader flowDoc;
...
NavigationCommands.GoToPage.Execute("my parameter", flowDoc);

Comment: Thanks! But though I can send the command with your help, I don't get the expected results. This is the code (and I tried to use FirstPage instead of PreviousPage too):

if (NavigationCommands.PreviousPage.CanExecute(null, this) == true) {
    NavigationCommands.PreviousPage.Execute(null, this);
}

Even though the if statement is true and the inner code is being executed, the FlowDocumentReader stays in the last page...


A question about ordinal definable sets and large cardinal axioms

Question: It is well known that the Large Cardinal Axiom which asserts the existence of a measurable cardinal number is inconsistent with V=L. Do any of the well-known Large Cardinal Axioms contradict V=OD?
Answer: Almost all of the usual large cardinal axioms can be preserved by the reverse-Easton support class forcing to make every set of ordinals coded into the GCH pattern, or the $\Diamond^*$ pattern, and these axioms imply V=HOD.
For example, this is true of the supercompact cardinals by the usual Laver argument, and analogues work with many other large cardinals, including much larger cardinals. Therefore, any smaller cardinal notion that is a consequence of supercompact cardinal or these other large cardinals will also be relatively consistent with V=HOD.
Meanwhile, there are some large cardinal notions that imply V=HOD outright. For example:
Theorem. If there are a proper class of Laver-indestructible supercompact cardinals, then V=HOD.
Proof. If $\kappa$ is supercompact and Laver indestructible, then for any bounded subset $x\subset\delta<\kappa$, there is $<\kappa$-directed closed forcing $\mathbb{Q}$ that codes $x$ into the GCH pattern above $\kappa$. If $\kappa$ is still supercompact after this forcing, then it would be $\Sigma_2$-reflecting in the extension, and the existence of a coding place for $x$ would reflect below $\kappa$ into $V_\kappa$, which was not changed by the forcing. Thus, $x$ is already coded in $V$, and hence every bounded subset of $\kappa$ is coded into the GCH pattern below $\kappa$. Since we have a proper class of such $\kappa$, it follows that every set is coded, and thus V=HOD. QED
It also works with indestructible strong cardinals and many others; really all you need is that the $\Sigma_2$-correctness is indestructible.
Comment: A similar argument shows that the Shelah philosophical attitude toward the GCH --- that it holds in a "random" pattern with all possible behaviors occuring somewhere --- implies V=HOD.
Comment: The theorem is false with only a bounded number of indestructible supercompact cardinals, since you can add a Cohen set above them all, and this preserves indestructibility while killing V=HOD.
Comment: Many thanks for this detailed response. It was a surprise for me, since I had expected that most of the Large Cardinal axioms would contradict V=OD outright. It shows how little I know about that area of Set Theory
Comment: These Large Cardinal Axioms bring many more sets into existence and I thought that quite a few of them would not be Ordinal Definable.


What do you call someone who is the "external" contact person for a department or section within a company?

Question: Let's say a company has six different departments: Department A, Department B and so on. At each department, there is one person who serves as an "outward", or "external" contact person, so all communication between departments should go via this contact person. That is, if someone from Department A wants to get help with something from Department B, they contact Department B's "external" contact person, who will then take the matter to the right person within Department B. What do you call this person? External contact person? Outward contact person? Entry contact person? What?
Answer: Such a person is often called a "point of contact". If you want to emphasize that this POC is only for external relations, then I can't think of a better way of saying that except explicitly, e.g.:

He/she is our point of contact for external (or in this case perhaps "interdepartmental") relations.
Comment: Thank you!! YES!! This is exactly the expression I was after! It was hiding somewhere in the back of my mind, but I just couldn't find it :)) Thank you so much!!
Answer: I would tend to call that person the "public face", whether of a department or an entire company. I believe this usage is fairly recent however (as in the last decade or two).
Comment: Yes, I see what you mean, but that's not *quite* what I was after. MarcinManhattan solved it for me though :) Thanks anyway :)


How to update product attribute with different values in magento 2?

Question: I've created custom product attribute which is set on catalog_product_save_before event. Now i want to update value (i have two options of this value) of this attribute for all product, depends on few conditions . How can i do this? The fastest possible method. I can loop through all products and call $product->save(). But i was wondering if there is faster method?
Thanks in advance
Answer: To mass update product attributes, use updateAttributes method, which is faster and better than looping through all the products and save each one of them.
Inject the model class Magento\Catalog\Model\Product\Action in your Observer class and
add the code below to update your product attributes
// $productIds is an array of product Ids array(1,2,3,...)
// $attrData is an array of product attributes array('attribute_code1','attribute_code2'...)
// $storeId - you can use the store scope that you wish to update these product attributes

$this->productMassAction->updateAttributes($productIds, $attrData, $storeId);

Comment: you are absolutely right :D I was wondering if there is a method which loop through all products and in this loop do some conditions. But your answer is 100% correct and very simple! Thanks.
Comment: Thank You for your answer, i've already tried this method, but my attribute is drop down and has two options (let say 'yes' and 'no'). I want some products to have this attribute set to 'yes' and other products should have this attribute set to 'no'. I think i can assign one value to all products using this method.
Comment: @SebastianT you can still use this method for quicker updates.  In your case. at first prepare the list of products where you want to set this attribute as 'Yes' or 1 , just use the updateAttributes method to save these products (product ids) with the attribute value as 'yes'  and then do the same for the list of products where you want to set this attribute as 'No' or 0.
Comment: @SebastianT glad it was helpful.


How can neutrinos have a magnetic moment in spite of being neutral and elementary?

Question: How can neutrinos have a magnetic moment in spite of being elementary (as opposed to a neutron) and electrically neutral (as opposed to a proton)? How can it even be defined, and measured?
Comment: Ask yourself this: what experimental obsevables would that imply and are they seen?
Comment: Dipole moments are related to charge; neutrinos are neutral.
Comment: How can photons have intrinsic angular momentum in spite of being massless and elementary?
Comment: So the origin of the magnetic moment of the neutrino is its intrinsic spin? Why do photons don't have magnetoc moment then? Because it's massless? @BenCrowell
Answer: The neutron has a magnetic moment despite being neutral. We usually attribute this to the internal structure of the neutron in terms of charged constituents, but this is not really necessary. Consider a theory (chiral perturbation theory), where elementary neutrons interact with protons and pions. Then there is a contribution to the magnetic moment of the neutron from intermediate states $n\to p\pi^-\to n$.
Similarly, neutrinos can have a magnetic moment because of intermediate states $\nu \to eW^+\to\nu$. This does not happen in the SM, because the magnetic moment operator is
$$
\bar\psi\sigma_{\mu\nu}F^{\mu\nu}\psi=\bar\psi_L\sigma_{\mu\nu}F^{\mu\nu}\psi_R + (L\leftrightarrow R)
$$
and requires a right handed neutrino. In extensions of the SM where the mass is Dirac, a neutrino magnetic moment is automatically generated (as pointed out by Ron below). The Majorana case is more complicated.
Comment: Absence of which intrinsic property would have caused your magnetic moment operator to vanish? By your logic, why can't photons have any magnetic moment? @Thomas
Comment: You still have to be able to write down an appropriate operator (which in the case of the SM neutrino does not exist). By magnetic moment we mean something that looks like $\vec\Sigma\cdot\vec{B}$ in the rest frame.
Comment: Not clear what this means for a massless particle (this is what happens for the neutrino), but the spatial part of the non-abelian three boson vertex $f^{abc}k_{[i}A^a_{j]}A^{bi}A^{cj}$ is usually called a "magnetic moment" coupling. But this only works for non-abelian fields (like the W) and not the photon.
Comment: Note that the extending the Standard Model to describe massive neutrinos also gives you right-handed neutrinos (in the neutrino's rest frame).
Answer: As seen in the answer by Thomas, within the original standard model the neutrino has no magnetic moment, but also no mass, whereas neutrino oscillations have been measured, thus there should be an extension to the SM. Once one goes to extensions of the standard model the search starts. The standard model has already been extended with assuming that neutrinos do have mass, as seen in the table here.
Here one can find, in section IV, a review on the search for magnetic moment for the neutrino, with a list of experiments(page 29).
On how to measure: the recoil spectrum of neutrino interactions is measured and compared with theoretical predictions for a magnetic moment for the neutrino, in extensions of the standard model.
This experiment has put limits

A search for the solar neutrino effective magnetic moment has been performed using data from 1291.5 days exposure during the second phase of the Borexino experiment. No significant deviations from the expected shape of the electron recoil spectrum from solar neutrinos have been found, and a new upper limit on the effective neutrino magnetic moment of
  $\mu^\text{eff}_\nu < 2.8\times10^{-11}\mu_B$ at 90% confidence limits
   has been set using constraints on the sum of the solar neutrino fluxes implied by the radiochemical gallium experiments.Using the limit for the effective neutrino moment, new limits for the magnetic moments of the neutrino flavor states, and for the elements of the neutrino magnetic moments matrix for Dirac and Majorana neutrinos, are derived.


submitting app to apple

Question: i have a question regarding submitting app to apple. I have my program written and tested on actual devices. I have a certificate and provision profile set up so i can load it unto my device. However, when i go on the apple official web site to see the steps that i need to take before submitting, it requires me to get a certificate and provisoin profile again? So what do i do? Do i delete my old provisioning profile or what do i do? Confused
Answer: You don't need to delete your Developer certificate or mobile-provisions. You do need to request and download a Distribution certificate and a distribution profile before building a submittable app.
Answer: The process is kind of confusing at first, but after some time you get used to it:
For distributing the app, you have to have a distribution certificate.
Do not delete your developing certificate. Leave it there ;)
after downbloading and installing the certificate on your Xcode (on organizer), change the signing identity from your project settings (if you have XCode 4, on the navigation menu click on your project main item, then go to build settings and change the signing identity for your project to the distribution profile).
After that you will be able to archive your application (on the product menu from your Xcode).
After archiving, you can test the build and upload it to apple from your Organizer Window...
Hope to have helped!
Best of luck...
Comment: hi, thx for your answer, right now i have two objects(same name) under my product menu. I am confused to why there are two...

submitting app to apple


How to to set fixed delta time for physics update?

Question: I need physics depended on FPS, not delta time. Or how to set fixed delta time, same for every frame for physics?
Answer: Blender as far as i know Blender not use delta time for physics, every frame the physics is  re-calculated.
To set the quantity of framerate per second go to Properties tab > render tab > Display > Animation frame rate.
To set the physics steps go to `Properties tab > scene tab >Physics > Physics steps``.


Set Properties: Irreflexivity and Transitivity

Question: This is not homework but has a direct relation to my homework.  In other words, I need to know this information to be able to do my homework.
Is R transitive: R = {(a,b),(b,a),(c,c)}?  I would think that it would also need to include (a,a),(b,b) but I am unsure.
Is the empty set {} irreflexive?
These are cases which have not been explained clearly and I would appreciate clarification.
Answer: If you look for example at Wikipedia: Transitive relation you have this nice quantified expression that becomes true if your relation is transitive.
Because it's universally quantified it's correct for the empty set (because universally quantified expressions about the empty set are true by definition).
And you are absolutely right. If there is (a,b) and (b,a) in R, then there also has to be (a,a) for R to be transitive.
The irreflexivity is also universally quantified ("It is a binary relation on a set where no element is related to itself." => ∀x:~(xRx) or ~∃x:xRx), so it holds for the empty set.
Comment: Then doesn't `(b,b)` need to be in there as well?
Comment: Yes, exactly. `(b,b)` has to be in there as well
Answer: Transitive law,  in mathematics and logic, statement that if A bears some relation to B and B bears the same relation to C, then A bears it to C. In arithmetic, the property of equality is transitive, for if A = B and B = C, then A = C. Likewise is the property inequality if the two inequalities have the same sense: that is, if A is greater than B (i.e., A > B) and B > C, then A > C; and if A is less than B (i.e., A < B) and B < C, then A < C. An example of an intransitive relation is: if B is the daughter of A, and C is the daughter of B, then C is not the daughter of A; and of a nontransitive relation: if A loves B, and B loves C, then A may or may not love C.
An irreflexive, or anti-reflexive, relation is the opposite of a reflexive relation. It is a binary relation on a set where no element is related to itself. An example is the "greater than" relation (x>y). Note that not every relation which is not reflexive is irreflexive; it is possible to define relations where some elements are related to themselves but not others. For example, the binary relation "the product of x and y is even" is reflexive on the set of even numbers, irreflexive on the set of odd numbers, and neither on the set of natural numbers.


getting access to outlook exchange global address book

Question: i am building a csharp application and i would like a dropdown list of all users in my outlook global address book (the same one when i click on To: from outlook gui.  is this possible to get this progrmaticall?  what are the security requirements here?
Answer: Security ramifications, in addition to the Outlook dependency left me unable to use this approach, in the past. As a result, I ended up building this in the form of an LDAP query. Another plus is that, (in response to your other question) you will be able to extract contact information because this information is stored in the Active Directory.
DISCLAIMER: It has been almost five years since I have looked at this code, so I'm afraid I no longer fully understand the query. Hopefully it's enough to get you started, however.
DirectoryEntry adFolderObject = new DirectoryEntry();
DirectorySearcher adSearcher = new DirectorySearcher(adFolderObject);

adSearcher.SearchScope = SearchScope.Subtree;
adSearcher.Filter = "(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*))) ))";

foreach (SearchResult adObject in adSearcher.FindAll())
{
    Console.WriteLine("CN={0}, Path={1}", adObject.Properties["CN"][0], adObject.Path);
}


What patterns will flash in the native-speaker's brain when using English?

Question: I think it is a common puzzle for ESL,especially for Chinese,since English is more abstract than Chinese, using which we can feel some specific patterns flashing in our brain.
For example, when I see 笑(which means smile), I feel it is smiling to me. What do you feel when you see "smile"?
Comment: This is not opinion-based question, I want to find the general thinking pattern of native English speakers
Comment: I have changed the question style to objective one !
Comment: @Lai The concept I associate with 笑 is halfway between a laugh and a smile, so it's not exactly the same as what I associate with *smile* in English, but I think in principle the same kinds of associations are possible with different writing systems.  At least, I don't see any reason why they wouldn't be.
Answer:
Chinese characters do not constitute an alphabet or a compact syllabary. Rather, the writing system is roughly logosyllabic; that is, a character generally represents one syllable of spoken Chinese and may be a word on its own or a part of a polysyllabic word. The characters themselves are often composed of parts that may represent physical objects, abstract notions,1 or pronunciation.2  (WP) [emphasis added]

On the other hand, "(t)he modern English alphabet is a Latin alphabet consisting of 26 letters" (WP), the individual letters or sometimes their combinations (supposedly) representing specific sounds of the word's pronunciation.
So you see that Chinese pictographs do indeed represent "things" that one can associate with and recall, English alphabets merely provide a clue to pronunciation, with no relation to the meaning.
Comment: So there is not some pattern in your brain when you see a English word, Even though you are speaking in English??
Comment: @Lai I think the same sorts of associations are possible, but it's difficult to know what you really mean by "patterns flashing in your brain", so it's hard to say, really.
Comment: @snailboat I do know it is hard to say, But I think it is essential to non-native speakers. it is useful to link the native language to English, which means I can learn English using English thinking method. you see?


Potential advisor asking which other programs I got into, but I haven't gotten into any others?

Question: I was recently accepted into a graduate school in my field, but I haven't heard from any of the other PhD programs I applied to (and am assuming that they're all rejections/waitlists if I haven't been contacted by now. In e-mails with a potential advisor at the school I was accepted to, he asked which other schools I was admitted to since graduate schools of a certain tier generally accept the same group of students. How do I tell her that I haven't been accepted to any other groups (only MS programs) and do I tell her this at all? I don't want her to feel like she was the only person to make a mistake by accepting me.
Comment: Hard to tell the reason.  Have you already formally accepted the admissions offer, or as far as your potential advisor knows could you still sitting on the fence about where to go?  If they think you still have a choice to make, they may simply be trying to gauge their level of involvement: if they learn you've been accepted to similar or better programs, they may view their odds of actually working with you low, whereas if you haven't then they may be willing to get dedicated to things more quickly.  Advising a student is a pretty big commitment, usually.
Comment: I do not see why you would need to answer.  Students have privacy rights (depending on jurisdiction).  Most likely the potential advisor wishes to forecast the likelihood you will enroll.  Another possibility is that the potential advisor is seeking information to try and convince you to enroll.  In either case, you have no obligation to help.  Always remember that faculty need PhD students.
Answer: You haven't been not accepted, you haven't heard. There's a difference.
"I'm still waiting to hear back from a couple other places." Should be a sufficient answer. If you want, a light quip about her university apparently being really on the ball.
Comment: @zibadawatimmy Whether or not it will be accurate in the future, it's accurate *now*, and dodges the idea that your choices are this or nothing.
Comment: On the other hand, 90% of the places I've applied to in Mathematics over the last 5 years have yet to send me either a rejection or an acceptance notice.  I'd still generally think that just saying "I'm waiting to hear back from some places" is a good idea, even when you actually aren't.  You can give them the impression that they're your top choice without implying they are your *only* choice.
Comment: Yes, that's what I meant after my first sentence.  The first was more of a humorous (but entirely truthful) jibe, which ultimately I think most people these days are quite familiar with (having been rejected by utter silence many times themselves).
Comment: Silence does not necessarily mean rejection. I was once contacted by a company who wanted to know why I hadn't responded to their offer. It turned out they had forgotten to tell me I got the job. ;-)


JQuery AJAX Event Problem

Question: I am having trouble fixing a bug in an existing ASP.NET MVC web site.
One of the views has a series of text boxes where the user enters data. Each text box has some javascript attached to the blur event in order to post back to the server when the text is changed. More specifically the code is using the JQuery $.ajax method to make these calls. This is in order to save temporary data to the session.
In the same view there is also a save button which also posts data via AJAX in the click event. The problem I am having is that if the user clicks the save button when one of the text boxes has focus, the blur event gets triggered at the same time as the button click event and two ajax posts get called simultaneously. This results in unreliable behaviour.
I know that the current design isn't great but I am looking for the easiest solution. Is it somehow possible to queue these two events or is there another solution? Thanks.
Answer: Instead of using timers that keep polling you can just use an actual queue.  This makes sure each ajax call gets executed in the correct order if someone is just tabbing through fields, not which happens to fire its timer at the right moment.
var queue = new Array(0);
$(function() {
  $('#inputID').blur(function() { AjaxQueue(this); });
});

function AjaxQueue(element) {
  var length = queue.push(element);
  if (length == 1) {
    ExecuteNextQueueItem();
  }
}

function ExecuteNextQueueItem() {
  var queueElement = queue.shift();
  if (queueElement != null) {
    // ajax call with queueElement
  }
}

then at the end of your result callback function just make a call to  ExecuteNextQueueItem();
Comment: to ensure the correct data is sent you can even create an object based on the field and its value and place that in the queue instead of just queuing up the element itself.
Answer: You could delay the ajax call when the blur event fires using setTimeout, then when the function referenced by setTimeout fires, check a variable to see if the save button was clicked first:
var isSaved = false;
function onblur(ev) {
    setTimeout(function(){
        if (!isSaved) {
            // make ajax call
        }
    }, 200);
}

function onsave(ev) {
    isSaved = true;
    // make ajax call
}

Comment: Ha. The same idea at the same time.
Answer: You can set the ajax call onblur just after some timeout if some status variable is not yet set to true, and that status variable can be set to true, when the form is submitted. Something like this:
$(document).ready(function() {
    var form_processed = false;
    $('input:text').blur(function() {
        var $el = $(this);
        setTimeout(function() {
            if (!form_processed) {
                // do ajax call with $el ...
            }
        }, 500);
    })
    $('form').submit(function() {
        form_processed = true;
        // submit form via ajax ...
        return false;
    });
});

(this code is untested, but hopefully it works)

JQuery AJAX Event Problem


What information do you keep about a project once it has been completed?

Question: Once a project reaches completion, which information do you keep/store for your records? Do you only keep a record of lessons learned, or do you also keep other project-specific information?
Comment: This question was asked from our private beta and only has 64 views as of 6/28/12. It *may* be possible to edit it to provide enough detail for there to be a solid answer, and then edit the answers to make them target the question.
Answer:
All metrics of estimation, and actuals
A Complete traceable matrix from requirement document (blueprint) to User Acceptance Testing
All official, approved documentation, and contract with vendors
Lessons learned
Initial budget, and final cost

I cannot think of anything, my last closing process was in April last year.
Comment: This list is very good. I would only add that a copy of the actual deliverables should also be saved.
Answer: We keep everything.  Initial business requirements, functional scope documents, technical design documents, schedules, emails,... everything.  Each project in our company has its own sharepoint site where this stuff is stored so it's easy to find later.  You never know what piece of information is going to be useful when maintaining a system later, or if at some point down the line you just want to know "How did we do this on the last project?"
Comment: I think that OP is asking about a summary close-out report. Don't you do such a thing? In 5 years after the project is closed one has to review the entire repository in order to find some particular information?
Comment: @yegor256: I'm not aware of a summary close-out report, but I'm not a PM.  I've never seen one when looking through past projects, so if there's a report created, it isn't kept with the other project documents.
Answer: Most documentation is probably not going to take up most space, so just store it on a file server, in the cloud, or in an archive.  There may be legal reasons for maintaining the documentation, so saving it will ensure you're covered.
Answer: Depends on why you are keeping records.
If you do work in a regulated environment e.g. financial services, defense contractor, pharmaceuticals industry, your compliance department will determine what needs to be kept and what shouldn't be kept.
If you are keeping records to improve performance over time, keep the information related to the metrics you want to improve e.g. estimated vs actual time, change requests, lessons learned.
Another category of items to keep is the history of the work product produced as part of the project, e.g. the history of a brochure, previous designs for a website, etc.


Adding fixed additional weight to my order final weight

Question: I can not figure out how to have every order add 1 lb before shipping calculation i.e. if my total order weight is 2lb I would like to add one more lb to it before shipping calculation so that shipping charge is calculated of 3lb.
Answer: That's going to be somewhat complicated, as shipping calculations aren't done with a single weight per order. Take a look at Mage_Shipping_Model_Shipping::collectCarrierRates() and the line to $packages = $this->composePackagesForCarrier($carrier, $request); The description of composePackagesForCarrier() states:

Devides order into items and items into parts if it's necessary

What you end up with is potentially multiple packages, each with their own weight. You could always rewrite this method to add (1lb / number of packages) to each package's weight, but this seems clunky to me.
My suggestion is to rethink the need for this. Is the another way that your business model requirements could be met? Perhaps by adding a fee to the order, dynamically calculated by the shipping cost? (If $10 is quoted for shipping, maybe you add $1.)
Answer: I think it is the wrong way to do it. Why not just change the configuration for the shipping prices and reduce every number by 1?